1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Provides the method of switching the cursor position. 23 * 24 * @extends TextContentControllerBase 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 8 27 */ 28/** 29 * Provides the method of switching the cursor position. 30 * 31 * @extends TextContentControllerBase 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @since 10 35 */ 36/** 37 * Provides the method of switching the cursor position. 38 * 39 * @extends TextContentControllerBase 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @atomicservice 43 * @since 11 44 */ 45declare class SearchController extends TextContentControllerBase { 46 /** 47 * constructor. 48 * 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @since 8 51 */ 52 /** 53 * constructor. 54 * 55 * @syscap SystemCapability.ArkUI.ArkUI.Full 56 * @crossplatform 57 * @since 10 58 */ 59 /** 60 * constructor. 61 * 62 * @syscap SystemCapability.ArkUI.ArkUI.Full 63 * @crossplatform 64 * @atomicservice 65 * @since 11 66 */ 67 constructor(); 68 69 /** 70 * Called when the position of the insertion cursor is set. 71 * 72 * @param { number } value 73 * @syscap SystemCapability.ArkUI.ArkUI.Full 74 * @since 8 75 */ 76 /** 77 * Called when the position of the insertion cursor is set. 78 * 79 * @param { number } value 80 * @syscap SystemCapability.ArkUI.ArkUI.Full 81 * @crossplatform 82 * @since 10 83 */ 84 /** 85 * Called when the position of the insertion cursor is set. 86 * 87 * @param { number } value 88 * @syscap SystemCapability.ArkUI.ArkUI.Full 89 * @crossplatform 90 * @atomicservice 91 * @since 11 92 */ 93 caretPosition(value: number): void; 94 95 /** 96 * Exit edit state. 97 * 98 * @syscap SystemCapability.ArkUI.ArkUI.Full 99 * @crossplatform 100 * @since 10 101 */ 102 /** 103 * Exit edit state. 104 * 105 * @syscap SystemCapability.ArkUI.ArkUI.Full 106 * @crossplatform 107 * @atomicservice 108 * @since 11 109 */ 110 stopEditing(): void; 111 112 /** 113 * Text selection is achieved by specifying the start and end positions of the text. 114 * 115 * @param { number } selectionStart - The start position of the selected text. 116 * @param { number } selectionEnd - The end position of the selected text. 117 * @param { SelectionOptions } [options] - Indicates the options of the text selection. 118 * @syscap SystemCapability.ArkUI.ArkUI.Full 119 * @crossplatform 120 * @atomicservice 121 * @since 12 122 */ 123 setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; 124} 125 126/** 127 * Enum for the style of cancel button 128 * 129 * @enum { number } 130 * @syscap SystemCapability.ArkUI.ArkUI.Full 131 * @crossplatform 132 * @since 10 133 */ 134/** 135 * Enum for the style of cancel button 136 * 137 * @enum { number } 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @crossplatform 140 * @atomicservice 141 * @since 11 142 */ 143declare enum CancelButtonStyle { 144 /** 145 * The value of button style constant 146 * 147 * @syscap SystemCapability.ArkUI.ArkUI.Full 148 * @crossplatform 149 * @since 10 150 */ 151 /** 152 * The value of button style constant 153 * 154 * @syscap SystemCapability.ArkUI.ArkUI.Full 155 * @crossplatform 156 * @atomicservice 157 * @since 11 158 */ 159 CONSTANT, 160 161 /** 162 * The value of button style invisible 163 * 164 * @syscap SystemCapability.ArkUI.ArkUI.Full 165 * @crossplatform 166 * @since 10 167 */ 168 /** 169 * The value of button style invisible 170 * 171 * @syscap SystemCapability.ArkUI.ArkUI.Full 172 * @crossplatform 173 * @atomicservice 174 * @since 11 175 */ 176 INVISIBLE, 177 178 /** 179 * The value of button style input 180 * 181 * @syscap SystemCapability.ArkUI.ArkUI.Full 182 * @crossplatform 183 * @since 10 184 */ 185 /** 186 * The value of button style input 187 * 188 * @syscap SystemCapability.ArkUI.ArkUI.Full 189 * @crossplatform 190 * @atomicservice 191 * @since 11 192 */ 193 INPUT 194} 195 196/** 197 * Declare the type of search input box 198 * 199 * @enum { number } 200 * @syscap SystemCapability.ArkUI.ArkUI.Full 201 * @crossplatform 202 * @since 11 203 */ 204/** 205 * Declare the type of search input box 206 * 207 * @enum { number } 208 * @syscap SystemCapability.ArkUI.ArkUI.Full 209 * @crossplatform 210 * @atomicservice 211 * @since 12 212 */ 213declare enum SearchType { 214 /** 215 * Basic input mode. 216 * 217 * @syscap SystemCapability.ArkUI.ArkUI.Full 218 * @crossplatform 219 * @since 11 220 */ 221 /** 222 * Basic input mode. 223 * 224 * @syscap SystemCapability.ArkUI.ArkUI.Full 225 * @crossplatform 226 * @atomicservice 227 * @since 12 228 */ 229 NORMAL = 0, 230 231 /** 232 * Pure digital input mode. 233 * 234 * @syscap SystemCapability.ArkUI.ArkUI.Full 235 * @crossplatform 236 * @since 11 237 */ 238 /** 239 * Pure digital input mode. 240 * 241 * @syscap SystemCapability.ArkUI.ArkUI.Full 242 * @crossplatform 243 * @atomicservice 244 * @since 12 245 */ 246 NUMBER = 2, 247 248 /** 249 * Phone number entry mode. 250 * 251 * @syscap SystemCapability.ArkUI.ArkUI.Full 252 * @crossplatform 253 * @since 11 254 */ 255 /** 256 * Phone number entry mode. 257 * 258 * @syscap SystemCapability.ArkUI.ArkUI.Full 259 * @crossplatform 260 * @atomicservice 261 * @since 12 262 */ 263 PHONE_NUMBER = 3, 264 265 /** 266 * E-mail address input mode. 267 * 268 * @syscap SystemCapability.ArkUI.ArkUI.Full 269 * @crossplatform 270 * @since 11 271 */ 272 /** 273 * E-mail address input mode. 274 * 275 * @syscap SystemCapability.ArkUI.ArkUI.Full 276 * @crossplatform 277 * @atomicservice 278 * @since 12 279 */ 280 EMAIL = 5, 281 282 /** 283 * Number decimal entry mode. 284 * 285 * @syscap SystemCapability.ArkUI.ArkUI.Full 286 * @crossplatform 287 * @atomicservice 288 * @since 12 289 */ 290 NUMBER_DECIMAL = 12, 291 292 /** 293 * URL entry mode. 294 * 295 * @syscap SystemCapability.ArkUI.ArkUI.Full 296 * @crossplatform 297 * @atomicservice 298 * @since 12 299 */ 300 URL = 13, 301} 302 303/** 304 * Options used to construct the search. 305 * 306 * Anonymous Object Rectification. 307 * @typedef SearchOptions 308 * @syscap SystemCapability.ArkUI.ArkUI.Full 309 * @crossplatform 310 * @atomicservice 311 * @since 18 312 */ 313declare interface SearchOptions { 314 /** 315 * Text input in the search text box. 316 * 317 * @type { ?string } 318 * @syscap SystemCapability.ArkUI.ArkUI.Full 319 * @since 8 320 */ 321 /** 322 * Text input in the search text box. 323 * 324 * @type { ?string } 325 * @syscap SystemCapability.ArkUI.ArkUI.Full 326 * @atomicservice 327 * @since 11 328 */ 329 /** 330 * Text input in the search text box. 331 * 332 * Anonymous Object Rectification. 333 * @type { ?string } 334 * @syscap SystemCapability.ArkUI.ArkUI.Full 335 * @atomicservice 336 * @since 18 337 */ 338 value?: string; 339 340 /** 341 * Text displayed when there is no input. 342 * 343 * @type { string } 344 * @syscap SystemCapability.ArkUI.ArkUI.Full 345 * @since 8 346 */ 347 /** 348 * Text displayed when there is no input. 349 * 350 * @type { ?ResourceStr } 351 * @syscap SystemCapability.ArkUI.ArkUI.Full 352 * @since 10 353 */ 354 /** 355 * Text displayed when there is no input. 356 * 357 * @type { ?ResourceStr } 358 * @syscap SystemCapability.ArkUI.ArkUI.Full 359 * @atomicservice 360 * @since 11 361 */ 362 /** 363 * Text displayed when there is no input. 364 * 365 * Anonymous Object Rectification. 366 * @type { ?ResourceStr } 367 * @syscap SystemCapability.ArkUI.ArkUI.Full 368 * @atomicservice 369 * @since 18 370 */ 371 placeholder?: ResourceStr; 372 373 /** 374 * Path to the search icon. 375 * 376 * @type { ?string } 377 * @syscap SystemCapability.ArkUI.ArkUI.Full 378 * @since 8 379 */ 380 /** 381 * Path to the search icon. 382 * 383 * @type { ?string } 384 * @syscap SystemCapability.ArkUI.ArkUI.Full 385 * @atomicservice 386 * @since 11 387 */ 388 /** 389 * Path to the search icon. 390 * 391 * Anonymous Object Rectification. 392 * @type { ?string } 393 * @syscap SystemCapability.ArkUI.ArkUI.Full 394 * @atomicservice 395 * @since 18 396 */ 397 icon?: string; 398 399 /** 400 * Controller of the <Search> component. 401 * 402 * @type { ?SearchController } 403 * @syscap SystemCapability.ArkUI.ArkUI.Full 404 * @since 8 405 */ 406 /** 407 * Controller of the <Search> component. 408 * 409 * @type { ?SearchController } 410 * @syscap SystemCapability.ArkUI.ArkUI.Full 411 * @atomicservice 412 * @since 11 413 */ 414 /** 415 * Controller of the <Search> component. 416 * 417 * Anonymous Object Rectification. 418 * @type { ?SearchController } 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @atomicservice 421 * @since 18 422 */ 423 controller?: SearchController; 424} 425 426/** 427 * The construct function of search 428 * 429 * @interface SearchInterface 430 * @syscap SystemCapability.ArkUI.ArkUI.Full 431 * @since 8 432 */ 433/** 434 * The construct function of search 435 * 436 * @interface SearchInterface 437 * @syscap SystemCapability.ArkUI.ArkUI.Full 438 * @crossplatform 439 * @since 10 440 */ 441/** 442 * The construct function of search 443 * 444 * @interface SearchInterface 445 * @syscap SystemCapability.ArkUI.ArkUI.Full 446 * @crossplatform 447 * @atomicservice 448 * @since 11 449 */ 450interface SearchInterface { 451 /** 452 * The options of SearchInterface 453 * 454 * @param { object } options 455 * @returns { SearchAttribute } 456 * @syscap SystemCapability.ArkUI.ArkUI.Full 457 * @since 8 458 */ 459 /** 460 * The options of SearchInterface 461 * 462 * @param { object } options 463 * @returns { SearchAttribute } 464 * @syscap SystemCapability.ArkUI.ArkUI.Full 465 * @crossplatform 466 * @since 10 467 */ 468 /** 469 * The options of SearchInterface 470 * 471 * @param { object } options 472 * @returns { SearchAttribute } 473 * @syscap SystemCapability.ArkUI.ArkUI.Full 474 * @crossplatform 475 * @atomicservice 476 * @since 11 477 */ 478 /** 479 * The options of SearchInterface. 480 * 481 * Anonymous Object Rectification. 482 * @param { SearchOptions } [options] - Search options. 483 * @returns { SearchAttribute } 484 * @syscap SystemCapability.ArkUI.ArkUI.Full 485 * @crossplatform 486 * @atomicservice 487 * @since 18 488 */ 489 (options?: SearchOptions): SearchAttribute; 490} 491 492/** 493 * Defines the icon options 494 * 495 * @interface IconOptions 496 * @syscap SystemCapability.ArkUI.ArkUI.Full 497 * @crossplatform 498 * @since 10 499 */ 500/** 501 * Defines the icon options 502 * 503 * @interface IconOptions 504 * @syscap SystemCapability.ArkUI.ArkUI.Full 505 * @crossplatform 506 * @atomicservice 507 * @since 11 508 */ 509interface IconOptions { 510 /** 511 * Set the icon size 512 * 513 * @type { ?Length } 514 * @syscap SystemCapability.ArkUI.ArkUI.Full 515 * @crossplatform 516 * @since 10 517 */ 518 /** 519 * Set the icon size 520 * 521 * @type { ?Length } 522 * @syscap SystemCapability.ArkUI.ArkUI.Full 523 * @crossplatform 524 * @atomicservice 525 * @since 11 526 */ 527 size?: Length; 528 529 /** 530 * Set the icon color 531 * 532 * @type { ?ResourceColor } 533 * @syscap SystemCapability.ArkUI.ArkUI.Full 534 * @crossplatform 535 * @since 10 536 */ 537 /** 538 * Set the icon color 539 * 540 * @type { ?ResourceColor } 541 * @syscap SystemCapability.ArkUI.ArkUI.Full 542 * @crossplatform 543 * @atomicservice 544 * @since 11 545 */ 546 color?: ResourceColor; 547 548 /** 549 * Set the icon resource 550 * 551 * @type { ?ResourceStr } 552 * @syscap SystemCapability.ArkUI.ArkUI.Full 553 * @crossplatform 554 * @since 10 555 */ 556 /** 557 * Set the icon resource 558 * 559 * @type { ?ResourceStr } 560 * @syscap SystemCapability.ArkUI.ArkUI.Full 561 * @crossplatform 562 * @atomicservice 563 * @since 11 564 */ 565 src?: ResourceStr; 566} 567 568/** 569 * Defines the SearchButton options 570 * 571 * @interface SearchButtonOptions 572 * @syscap SystemCapability.ArkUI.ArkUI.Full 573 * @crossplatform 574 * @since 10 575 */ 576/** 577 * Defines the SearchButton options 578 * 579 * @interface SearchButtonOptions 580 * @syscap SystemCapability.ArkUI.ArkUI.Full 581 * @crossplatform 582 * @atomicservice 583 * @since 11 584 */ 585interface SearchButtonOptions { 586 /** 587 * Set the SearchButton fontSize 588 * 589 * @type { ?Length } 590 * @syscap SystemCapability.ArkUI.ArkUI.Full 591 * @crossplatform 592 * @since 10 593 */ 594 /** 595 * Set the SearchButton fontSize 596 * 597 * @type { ?Length } 598 * @syscap SystemCapability.ArkUI.ArkUI.Full 599 * @crossplatform 600 * @atomicservice 601 * @since 11 602 */ 603 fontSize?: Length; 604 605 /** 606 * Set the SearchButton fontColor 607 * 608 * @type { ?ResourceColor } 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @crossplatform 611 * @since 10 612 */ 613 /** 614 * Set the SearchButton fontColor 615 * 616 * @type { ?ResourceColor } 617 * @syscap SystemCapability.ArkUI.ArkUI.Full 618 * @crossplatform 619 * @atomicservice 620 * @since 11 621 */ 622 fontColor?: ResourceColor; 623 624 /** 625 * Automatically disables the search button before the user enters text 626 * 627 * @type { ?Boolean } 628 * @syscap SystemCapability.ArkUI.ArkUI.Full 629 * @crossplatform 630 * @atomicservice 631 * @since 18 632 */ 633 autoDisable?: Boolean; 634} 635 636/** 637 * Defines the CancelButton options 638 * 639 * @interface CancelButtonOptions 640 * @syscap SystemCapability.ArkUI.ArkUI.Full 641 * @crossplatform 642 * @atomicservice 643 * @since 12 644 */ 645interface CancelButtonOptions { 646 /** 647 * Set the CancelButton style 648 * 649 * @type { ?CancelButtonStyle } 650 * @syscap SystemCapability.ArkUI.ArkUI.Full 651 * @crossplatform 652 * @atomicservice 653 * @since 12 654 */ 655 style?: CancelButtonStyle; 656 657 /** 658 * Set the CancelButton icon 659 * 660 * @type { ?IconOptions } 661 * @syscap SystemCapability.ArkUI.ArkUI.Full 662 * @crossplatform 663 * @atomicservice 664 * @since 12 665 */ 666 icon?: IconOptions; 667} 668 669/** 670 * Defines the CancelButton symbol options 671 * 672 * @interface CancelButtonSymbolOptions 673 * @syscap SystemCapability.ArkUI.ArkUI.Full 674 * @atomicservice 675 * @since 12 676 */ 677interface CancelButtonSymbolOptions { 678 /** 679 * Set the CancelButton style 680 * 681 * @type { ?CancelButtonStyle } 682 * @syscap SystemCapability.ArkUI.ArkUI.Full 683 * @atomicservice 684 * @since 12 685 */ 686 style?: CancelButtonStyle; 687 688 /** 689 * Set the CancelButton symbol icon 690 * 691 * @type { ?SymbolGlyphModifier } 692 * @syscap SystemCapability.ArkUI.ArkUI.Full 693 * @atomicservice 694 * @since 12 695 */ 696 icon?: SymbolGlyphModifier; 697} 698 699/** 700 * Declare the event listener callback of the enter key. 701 * 702 * @typedef { function } SearchSubmitCallback 703 * @param { string } searchContent - The submitted content of search. 704 * @param { SubmitEvent } [event] - Provides the method of keeping Search editable state when submitted. 705 * @syscap SystemCapability.ArkUI.ArkUI.Full 706 * @crossplatform 707 * @atomicservice 708 * @since 14 709 */ 710declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void; 711 712/** 713 * The attribute function of search 714 * 715 * @extends CommonMethod<SearchAttribute> 716 * @syscap SystemCapability.ArkUI.ArkUI.Full 717 * @since 8 718 */ 719/** 720 * The attribute function of search 721 * 722 * @extends CommonMethod<SearchAttribute> 723 * @syscap SystemCapability.ArkUI.ArkUI.Full 724 * @crossplatform 725 * @since 10 726 */ 727/** 728 * The attribute function of search 729 * 730 * @extends CommonMethod<SearchAttribute> 731 * @syscap SystemCapability.ArkUI.ArkUI.Full 732 * @crossplatform 733 * @atomicservice 734 * @since 11 735 */ 736declare class SearchAttribute extends CommonMethod<SearchAttribute> { 737 /** 738 * Set the search button text 739 * 740 * @param { string } value - indicates the text of the search button. 741 * @param { SearchButtonOption } option 742 * @returns { SearchAttribute } 743 * @syscap SystemCapability.ArkUI.ArkUI.Full 744 * @since 8 745 */ 746 /** 747 * Set the search button text, fontSize and fontColor 748 * 749 * @param { string } value - indicates the text of the search button. 750 * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button. 751 * @returns { SearchAttribute } 752 * @syscap SystemCapability.ArkUI.ArkUI.Full 753 * @crossplatform 754 * @since 10 755 */ 756 /** 757 * Set the search button text, fontSize and fontColor 758 * 759 * @param { string } value - indicates the text of the search button. 760 * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button. 761 * @returns { SearchAttribute } 762 * @syscap SystemCapability.ArkUI.ArkUI.Full 763 * @crossplatform 764 * @atomicservice 765 * @since 11 766 */ 767 searchButton(value: string, option?: SearchButtonOptions): SearchAttribute; 768 769 /** 770 * Set the text Color 771 * 772 * @param { ResourceColor } value - indicates the color of the text. 773 * @returns { SearchAttribute } 774 * @syscap SystemCapability.ArkUI.ArkUI.Full 775 * @crossplatform 776 * @since 10 777 */ 778 /** 779 * Set the text Color 780 * 781 * @param { ResourceColor } value - indicates the color of the text. 782 * @returns { SearchAttribute } 783 * @syscap SystemCapability.ArkUI.ArkUI.Full 784 * @crossplatform 785 * @atomicservice 786 * @since 11 787 */ 788 fontColor(value: ResourceColor): SearchAttribute; 789 790 /** 791 * Set the search icon style 792 * 793 * @param { IconOptions } value - indicates the style of the search icon. 794 * @returns { SearchAttribute } 795 * @syscap SystemCapability.ArkUI.ArkUI.Full 796 * @crossplatform 797 * @since 10 798 */ 799 /** 800 * Set the search icon style 801 * 802 * @param { IconOptions } value - indicates the style of the search icon. 803 * @returns { SearchAttribute } 804 * @syscap SystemCapability.ArkUI.ArkUI.Full 805 * @crossplatform 806 * @atomicservice 807 * @since 11 808 */ 809 /** 810 * Set the search icon style 811 * 812 * @param { IconOptions | SymbolGlyphModifier } value - indicates the style of the search icon. 813 * @returns { SearchAttribute } 814 * @syscap SystemCapability.ArkUI.ArkUI.Full 815 * @crossplatform 816 * @atomicservice 817 * @since 12 818 */ 819 searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute; 820 821 /** 822 * Set the cancel button style 823 * 824 * @param { object } value - indicates the style of the cancel button. 825 * @returns { SearchAttribute } 826 * @syscap SystemCapability.ArkUI.ArkUI.Full 827 * @crossplatform 828 * @since 10 829 */ 830 /** 831 * Set the cancel button style 832 * 833 * @param { object } value - indicates the style of the cancel button. 834 * @returns { SearchAttribute } 835 * @syscap SystemCapability.ArkUI.ArkUI.Full 836 * @crossplatform 837 * @atomicservice 838 * @since 11 839 */ 840 /** 841 * Set the cancel button style 842 * 843 * @param { CancelButtonOptions | CancelButtonSymbolOptions } value - indicates the style of the cancel button. 844 * @returns { SearchAttribute } 845 * @syscap SystemCapability.ArkUI.ArkUI.Full 846 * @crossplatform 847 * @atomicservice 848 * @since 12 849 */ 850 cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute; 851 852 /** 853 * Specify the indentation of the first line in a text-block. 854 * 855 * @param { Dimension } value - The length of text indent. 856 * @returns { SearchAttribute } The attribute of the text. 857 * @syscap SystemCapability.ArkUI.ArkUI.Full 858 * @crossplatform 859 * @atomicservice 860 * @since 12 861 */ 862 textIndent(value: Dimension): SearchAttribute; 863 864 /** 865 * Called when the inputFilter of text is set. 866 * 867 * @param { ResourceStr } value 868 * @param { Callback<string> } error 869 * @returns { SearchAttribute } 870 * @syscap SystemCapability.ArkUI.ArkUI.Full 871 * @crossplatform 872 * @atomicservice 873 * @since 12 874 */ 875 inputFilter(value: ResourceStr, error?: Callback<string>): SearchAttribute; 876 877 /** 878 * Called when judging whether the text editing change finished. 879 * 880 * @param { Callback<boolean> } callback 881 * @returns { SearchAttribute } 882 * @syscap SystemCapability.ArkUI.ArkUI.Full 883 * @crossplatform 884 * @atomicservice 885 * @since 12 886 */ 887 onEditChange(callback: Callback<boolean>): SearchAttribute; 888 889 /** 890 * Define the text selected background color of the text input. 891 * 892 * @param { ResourceColor } value 893 * @returns { SearchAttribute } 894 * @syscap SystemCapability.ArkUI.ArkUI.Full 895 * @crossplatform 896 * @atomicservice 897 * @since 12 898 */ 899 selectedBackgroundColor(value: ResourceColor): SearchAttribute; 900 901 /** 902 * Set the cursor style 903 * 904 * @param { CaretStyle } value - indicates the style of the cursor. 905 * @returns { SearchAttribute } 906 * @syscap SystemCapability.ArkUI.ArkUI.Full 907 * @crossplatform 908 * @since 10 909 */ 910 /** 911 * Set the cursor style 912 * 913 * @param { CaretStyle } value - indicates the style of the cursor. 914 * @returns { SearchAttribute } 915 * @syscap SystemCapability.ArkUI.ArkUI.Full 916 * @crossplatform 917 * @atomicservice 918 * @since 11 919 */ 920 caretStyle(value: CaretStyle): SearchAttribute; 921 922 /** 923 * Set the place hold text color 924 * 925 * @param { ResourceColor } value 926 * @returns { SearchAttribute } 927 * @syscap SystemCapability.ArkUI.ArkUI.Full 928 * @since 8 929 */ 930 /** 931 * Set the place hold text color 932 * 933 * @param { ResourceColor } value 934 * @returns { SearchAttribute } 935 * @syscap SystemCapability.ArkUI.ArkUI.Full 936 * @crossplatform 937 * @since 10 938 */ 939 /** 940 * Set the place hold text color 941 * 942 * @param { ResourceColor } value 943 * @returns { SearchAttribute } 944 * @syscap SystemCapability.ArkUI.ArkUI.Full 945 * @crossplatform 946 * @atomicservice 947 * @since 11 948 */ 949 placeholderColor(value: ResourceColor): SearchAttribute; 950 951 /** 952 * Set the font used for place holder text 953 * 954 * @param { Font } value 955 * @returns { SearchAttribute } 956 * @syscap SystemCapability.ArkUI.ArkUI.Full 957 * @since 8 958 */ 959 /** 960 * Set the font used for place holder text 961 * 962 * @param { Font } value 963 * @returns { SearchAttribute } 964 * @syscap SystemCapability.ArkUI.ArkUI.Full 965 * @crossplatform 966 * @since 10 967 */ 968 /** 969 * Set the font used for place holder text 970 * 971 * @param { Font } value 972 * @returns { SearchAttribute } 973 * @syscap SystemCapability.ArkUI.ArkUI.Full 974 * @crossplatform 975 * @atomicservice 976 * @since 11 977 */ 978 placeholderFont(value?: Font): SearchAttribute; 979 980 /** 981 * Set the font used for input text 982 * 983 * @param { Font } value 984 * @returns { SearchAttribute } 985 * @syscap SystemCapability.ArkUI.ArkUI.Full 986 * @since 8 987 */ 988 /** 989 * Set the font used for input text 990 * 991 * @param { Font } value 992 * @returns { SearchAttribute } 993 * @syscap SystemCapability.ArkUI.ArkUI.Full 994 * @crossplatform 995 * @since 10 996 */ 997 /** 998 * Set the font used for input text 999 * 1000 * @param { Font } value 1001 * @returns { SearchAttribute } 1002 * @syscap SystemCapability.ArkUI.ArkUI.Full 1003 * @crossplatform 1004 * @atomicservice 1005 * @since 11 1006 */ 1007 textFont(value?: Font): SearchAttribute; 1008 1009 /** 1010 * Set enter key type of soft keyboard 1011 * 1012 * @param { EnterKeyType } value 1013 * @returns { SearchAttribute } 1014 * @syscap SystemCapability.ArkUI.ArkUI.Full 1015 * @crossplatform 1016 * @atomicservice 1017 * @since 12 1018 */ 1019 enterKeyType(value: EnterKeyType): SearchAttribute; 1020 1021 /** 1022 * Call the function when clicked the search button 1023 * 1024 * @param { function } callback 1025 * @returns { SearchAttribute } 1026 * @syscap SystemCapability.ArkUI.ArkUI.Full 1027 * @since 8 1028 */ 1029 /** 1030 * Call the function when clicked the search button 1031 * 1032 * @param { function } callback 1033 * @returns { SearchAttribute } 1034 * @syscap SystemCapability.ArkUI.ArkUI.Full 1035 * @crossplatform 1036 * @since 10 1037 */ 1038 /** 1039 * Call the function when clicked the search button 1040 * 1041 * @param { function } callback 1042 * @returns { SearchAttribute } 1043 * @syscap SystemCapability.ArkUI.ArkUI.Full 1044 * @crossplatform 1045 * @atomicservice 1046 * @since 11 1047 */ 1048 /** 1049 * Call the function when clicked the search button. 1050 * 1051 * Anonymous Object Rectification. 1052 * @param { Callback<string> } callback 1053 * @returns { SearchAttribute } 1054 * @syscap SystemCapability.ArkUI.ArkUI.Full 1055 * @crossplatform 1056 * @atomicservice 1057 * @since 18 1058 */ 1059 onSubmit(callback: Callback<string>): SearchAttribute; 1060 /** 1061 * Call the function when clicked the search button. 1062 * 1063 * @param { SearchSubmitCallback } callback - callback of the listened event. 1064 * @returns { SearchAttribute } 1065 * @syscap SystemCapability.ArkUI.ArkUI.Full 1066 * @crossplatform 1067 * @atomicservice 1068 * @since 14 1069 */ 1070 onSubmit(callback: SearchSubmitCallback): SearchAttribute; 1071 1072 /** 1073 * Call the function when editing the input text 1074 * 1075 * @param { function } callback 1076 * @returns { SearchAttribute } 1077 * @syscap SystemCapability.ArkUI.ArkUI.Full 1078 * @since 8 1079 */ 1080 /** 1081 * Call the function when editing the input text 1082 * 1083 * @param { function } callback 1084 * @returns { SearchAttribute } 1085 * @syscap SystemCapability.ArkUI.ArkUI.Full 1086 * @crossplatform 1087 * @since 10 1088 */ 1089 /** 1090 * Call the function when editing the input text 1091 * 1092 * @param { function } callback 1093 * @returns { SearchAttribute } 1094 * @syscap SystemCapability.ArkUI.ArkUI.Full 1095 * @crossplatform 1096 * @atomicservice 1097 * @since 11 1098 */ 1099 /** 1100 * Call the function when editing the input text 1101 * 1102 * @param { EditableTextOnChangeCallback } callback 1103 * @returns { SearchAttribute } 1104 * @syscap SystemCapability.ArkUI.ArkUI.Full 1105 * @crossplatform 1106 * @atomicservice 1107 * @since 12 1108 */ 1109 onChange(callback: EditableTextOnChangeCallback): SearchAttribute; 1110 1111 /** 1112 * Called when the text selection changes. 1113 * 1114 * @param { function } callback - callback of the listened event. 1115 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1116 * @syscap SystemCapability.ArkUI.ArkUI.Full 1117 * @crossplatform 1118 * @since 10 1119 */ 1120 /** 1121 * Called when the text selection changes. 1122 * 1123 * @param { function } callback - callback of the listened event. 1124 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1125 * @syscap SystemCapability.ArkUI.ArkUI.Full 1126 * @crossplatform 1127 * @atomicservice 1128 * @since 11 1129 */ 1130 /** 1131 * Called when the text selection changes. 1132 * 1133 * Anonymous Object Rectification. 1134 * @param { OnTextSelectionChangeCallback } callback - Callback of the listened event. 1135 * @returns { SearchAttribute } Returns the instance of the SearchAttribute. 1136 * @syscap SystemCapability.ArkUI.ArkUI.Full 1137 * @crossplatform 1138 * @atomicservice 1139 * @since 18 1140 */ 1141 onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute; 1142 1143 /** 1144 * Called when the content scrolls. 1145 * 1146 * @param { function } callback - callback of the listened event. 1147 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1148 * @syscap SystemCapability.ArkUI.ArkUI.Full 1149 * @crossplatform 1150 * @since 10 1151 */ 1152 /** 1153 * Called when the content scrolls. 1154 * 1155 * @param { function } callback - callback of the listened event. 1156 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1157 * @syscap SystemCapability.ArkUI.ArkUI.Full 1158 * @crossplatform 1159 * @atomicservice 1160 * @since 11 1161 */ 1162 /** 1163 * Called when the content scrolls. 1164 * 1165 * Anonymous Object Rectification. 1166 * @param { OnContentScrollCallback } callback - Callback of the listened event. 1167 * @returns { SearchAttribute } Returns the instance of the SearchAttribute. 1168 * @syscap SystemCapability.ArkUI.ArkUI.Full 1169 * @crossplatform 1170 * @atomicservice 1171 * @since 18 1172 */ 1173 onContentScroll(callback: OnContentScrollCallback): SearchAttribute; 1174 1175 /** 1176 * Called when using the Clipboard menu 1177 * 1178 * @param { function } callback 1179 * @returns { SearchAttribute } 1180 * @syscap SystemCapability.ArkUI.ArkUI.Full 1181 * @since 8 1182 */ 1183 /** 1184 * Called when using the Clipboard menu 1185 * 1186 * @param { function } callback 1187 * @returns { SearchAttribute } 1188 * @syscap SystemCapability.ArkUI.ArkUI.Full 1189 * @crossplatform 1190 * @since 10 1191 */ 1192 /** 1193 * Called when using the Clipboard menu 1194 * 1195 * @param { function } callback 1196 * @returns { SearchAttribute } 1197 * @syscap SystemCapability.ArkUI.ArkUI.Full 1198 * @crossplatform 1199 * @atomicservice 1200 * @since 11 1201 */ 1202 /** 1203 * Called when using the Clipboard menu. 1204 * 1205 * Anonymous Object Rectification. 1206 * @param { Callback<string> } callback 1207 * @returns { SearchAttribute } 1208 * @syscap SystemCapability.ArkUI.ArkUI.Full 1209 * @crossplatform 1210 * @atomicservice 1211 * @since 18 1212 */ 1213 onCopy(callback: Callback<string>): SearchAttribute; 1214 1215 /** 1216 * Called when using the Clipboard menu 1217 * 1218 * @param { function } callback 1219 * @returns { SearchAttribute } 1220 * @syscap SystemCapability.ArkUI.ArkUI.Full 1221 * @since 8 1222 */ 1223 /** 1224 * Called when using the Clipboard menu 1225 * 1226 * @param { function } callback 1227 * @returns { SearchAttribute } 1228 * @syscap SystemCapability.ArkUI.ArkUI.Full 1229 * @crossplatform 1230 * @since 10 1231 */ 1232 /** 1233 * Called when using the Clipboard menu 1234 * 1235 * @param { function } callback 1236 * @returns { SearchAttribute } 1237 * @syscap SystemCapability.ArkUI.ArkUI.Full 1238 * @crossplatform 1239 * @atomicservice 1240 * @since 11 1241 */ 1242 /** 1243 * Called when using the Clipboard menu. 1244 * 1245 * Anonymous Object Rectification. 1246 * @param { Callback<string> } callback 1247 * @returns { SearchAttribute } 1248 * @syscap SystemCapability.ArkUI.ArkUI.Full 1249 * @crossplatform 1250 * @atomicservice 1251 * @since 18 1252 */ 1253 onCut(callback: Callback<string>): SearchAttribute; 1254 1255 /** 1256 * Called when using the Clipboard menu 1257 * 1258 * @param { function } callback 1259 * @returns { SearchAttribute } 1260 * @syscap SystemCapability.ArkUI.ArkUI.Full 1261 * @since 8 1262 */ 1263 /** 1264 * Called when using the Clipboard menu 1265 * 1266 * @param { function } callback 1267 * @returns { SearchAttribute } 1268 * @syscap SystemCapability.ArkUI.ArkUI.Full 1269 * @crossplatform 1270 * @since 10 1271 */ 1272 /** 1273 * Called when using the Clipboard menu 1274 * 1275 * @param { function } callback 1276 * Executed when a paste operation is performed. 1277 * { string } value - The text content to be pasted. 1278 * { PasteEvent } event - The user-defined paste event. 1279 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1280 * @syscap SystemCapability.ArkUI.ArkUI.Full 1281 * @crossplatform 1282 * @atomicservice 1283 * @since 11 1284 */ 1285 /** 1286 * Called when using the Clipboard menu. 1287 * 1288 * Anonymous Object Rectification. 1289 * @param { OnPasteCallback } callback - Executed when a paste operation is performed. 1290 * @returns { SearchAttribute } Returns the instance of the SearchAttribute. 1291 * @syscap SystemCapability.ArkUI.ArkUI.Full 1292 * @crossplatform 1293 * @atomicservice 1294 * @since 18 1295 */ 1296 onPaste(callback: OnPasteCallback): SearchAttribute; 1297 1298 /** 1299 * Called when the copy option is set. 1300 * 1301 * @param { CopyOptions } value 1302 * @returns { SearchAttribute } 1303 * @syscap SystemCapability.ArkUI.ArkUI.Full 1304 * @since 9 1305 */ 1306 /** 1307 * Called when the copy option is set. 1308 * 1309 * @param { CopyOptions } value 1310 * @returns { SearchAttribute } 1311 * @syscap SystemCapability.ArkUI.ArkUI.Full 1312 * @crossplatform 1313 * @since 10 1314 */ 1315 /** 1316 * Called when the copy option is set. 1317 * 1318 * @param { CopyOptions } value 1319 * @returns { SearchAttribute } 1320 * @syscap SystemCapability.ArkUI.ArkUI.Full 1321 * @crossplatform 1322 * @atomicservice 1323 * @since 11 1324 */ 1325 copyOption(value: CopyOptions): SearchAttribute; 1326 1327 /** 1328 * Called when the input of maximum text length is set. 1329 * 1330 * @param { number } value 1331 * @returns { SearchAttribute } 1332 * @syscap SystemCapability.ArkUI.ArkUI.Full 1333 * crossplatform 1334 * @since 11 1335 */ 1336 /** 1337 * Called when the input of maximum text length is set. 1338 * 1339 * @param { number } value 1340 * @returns { SearchAttribute } 1341 * @syscap SystemCapability.ArkUI.ArkUI.Full 1342 * crossplatform 1343 * @atomicservice 1344 * @since 12 1345 */ 1346 maxLength(value: number): SearchAttribute; 1347 1348 /** 1349 * Called when the text align is set. 1350 * 1351 * @param { TextAlign } value 1352 * @returns { SearchAttribute } 1353 * @syscap SystemCapability.ArkUI.ArkUI.Full 1354 * @since 9 1355 */ 1356 /** 1357 * Called when the text align is set. 1358 * 1359 * @param { TextAlign } value 1360 * @returns { SearchAttribute } 1361 * @syscap SystemCapability.ArkUI.ArkUI.Full 1362 * @crossplatform 1363 * @since 10 1364 */ 1365 /** 1366 * Called when the text align is set. 1367 * 1368 * @param { TextAlign } value 1369 * @returns { SearchAttribute } 1370 * @syscap SystemCapability.ArkUI.ArkUI.Full 1371 * @crossplatform 1372 * @atomicservice 1373 * @since 11 1374 */ 1375 textAlign(value: TextAlign): SearchAttribute; 1376 1377 /** 1378 * Sets whether request keyboard or not when on focus. 1379 * 1380 * @param { boolean } value 1381 * @returns { SearchAttribute } Returns the instance of the SearchAttribute. 1382 * @syscap SystemCapability.ArkUI.ArkUI.Full 1383 * @crossplatform 1384 * @since 10 1385 */ 1386 /** 1387 * Sets whether request keyboard or not when on focus. 1388 * 1389 * @param { boolean } value 1390 * @returns { SearchAttribute } Returns the instance of the SearchAttribute. 1391 * @syscap SystemCapability.ArkUI.ArkUI.Full 1392 * @crossplatform 1393 * @atomicservice 1394 * @since 11 1395 */ 1396 enableKeyboardOnFocus(value: boolean): SearchAttribute; 1397 1398 /** 1399 * Controls whether the selection menu pops up. 1400 * 1401 * @param { boolean } value 1402 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1403 * @syscap SystemCapability.ArkUI.ArkUI.Full 1404 * @crossplatform 1405 * @since 10 1406 */ 1407 /** 1408 * Controls whether the selection menu pops up. 1409 * 1410 * @param { boolean } value 1411 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1412 * @syscap SystemCapability.ArkUI.ArkUI.Full 1413 * @crossplatform 1414 * @atomicservice 1415 * @since 11 1416 */ 1417 selectionMenuHidden(value: boolean): SearchAttribute; 1418 1419 /** 1420 * Called when the minimum font size of the font is set. 1421 * 1422 * @param { number | string | Resource } value 1423 * @returns { SearchAttribute } 1424 * @syscap SystemCapability.ArkUI.ArkUI.Full 1425 * @crossplatform 1426 * @atomicservice 1427 * @since 12 1428 */ 1429 minFontSize(value: number | string | Resource): SearchAttribute; 1430 1431 /** 1432 * Called when the maximum font size of the font is set. 1433 * 1434 * @param { number | string | Resource } value 1435 * @returns { SearchAttribute } 1436 * @syscap SystemCapability.ArkUI.ArkUI.Full 1437 * @crossplatform 1438 * @atomicservice 1439 * @since 12 1440 */ 1441 maxFontSize(value: number | string | Resource): SearchAttribute; 1442 1443 /** 1444 * Called when the minimum font scale of the font is set. 1445 * 1446 * @param { Optional<number | Resource> } scale 1447 * @returns { SearchAttribute } 1448 * @syscap SystemCapability.ArkUI.ArkUI.Full 1449 * @atomicservice 1450 * @since 18 1451 */ 1452 minFontScale(scale: Optional<number | Resource>): SearchAttribute; 1453 1454 /** 1455 * Called when the maximum font scale of the font is set. 1456 * 1457 * @param { Optional<number | Resource> } scale 1458 * @returns { SearchAttribute } 1459 * @syscap SystemCapability.ArkUI.ArkUI.Full 1460 * @atomicservice 1461 * @since 18 1462 */ 1463 maxFontScale(scale: Optional<number | Resource>): SearchAttribute; 1464 1465 /** 1466 * Define custom keyboard. 1467 * 1468 * @param { CustomBuilder } value 1469 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1470 * @syscap SystemCapability.ArkUI.ArkUI.Full 1471 * @since 10 1472 */ 1473 /** 1474 * Define custom keyboard. 1475 * 1476 * @param { CustomBuilder } value 1477 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1478 * @syscap SystemCapability.ArkUI.ArkUI.Full 1479 * @crossplatform 1480 * @atomicservice 1481 * @since 11 1482 */ 1483 /** 1484 * Define custom keyboard. 1485 * 1486 * @param { CustomBuilder } value - Set up a custom keyboard of Search 1487 * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of Search 1488 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1489 * @syscap SystemCapability.ArkUI.ArkUI.Full 1490 * @crossplatform 1491 * @atomicservice 1492 * @since 12 1493 */ 1494 customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute; 1495 1496 /** 1497 * Called when the text decoration of the text is set. 1498 * 1499 * @param { TextDecorationOptions } value 1500 * @returns { SearchAttribute } 1501 * @syscap SystemCapability.ArkUI.ArkUI.Full 1502 * @crossplatform 1503 * @atomicservice 1504 * @since 12 1505 */ 1506 decoration(value: TextDecorationOptions): SearchAttribute; 1507 1508 /** 1509 * Called when the distance between text fonts is set. 1510 * 1511 * @param { number | string | Resource } value 1512 * @returns { SearchAttribute } 1513 * @syscap SystemCapability.ArkUI.ArkUI.Full 1514 * @crossplatform 1515 * @atomicservice 1516 * @since 12 1517 */ 1518 letterSpacing(value: number | string | Resource): SearchAttribute; 1519 1520 /** 1521 * Called when the line height of the font is set. 1522 * 1523 * @param { number | string | Resource } value 1524 * @returns { SearchAttribute } 1525 * @syscap SystemCapability.ArkUI.ArkUI.Full 1526 * @crossplatform 1527 * @atomicservice 1528 * @since 12 1529 */ 1530 lineHeight(value: number | string | Resource): SearchAttribute; 1531 1532 /** 1533 * Called when the search type is set. 1534 * 1535 * @param { SearchType } value 1536 * @returns { SearchAttribute } 1537 * @syscap SystemCapability.ArkUI.ArkUI.Full 1538 * @crossplatform 1539 * @since 11 1540 */ 1541 /** 1542 * Called when the search type is set. 1543 * 1544 * @param { SearchType } value 1545 * @returns { SearchAttribute } 1546 * @syscap SystemCapability.ArkUI.ArkUI.Full 1547 * @crossplatform 1548 * @atomicservice 1549 * @since 12 1550 */ 1551 type(value: SearchType): SearchAttribute; 1552 1553 /** 1554 * Set font feature. 1555 * 1556 * @param { string } value - The fontFeature. 1557 * normal | <feature-tag-value>, 1558 * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0 1559 * the values of <feature-tag-value> reference to doc of search component 1560 * number of <feature-tag-value> can be single or multiple, and separated by comma ','. 1561 * @returns { SearchAttribute } 1562 * @syscap SystemCapability.ArkUI.ArkUI.Full 1563 * @crossplatform 1564 * @atomicservice 1565 * @since 12 1566 */ 1567 fontFeature(value: string): SearchAttribute; 1568 1569 /** 1570 * Get text value information when about to input. 1571 * 1572 * @param { Callback<InsertValue, boolean> } callback - The triggered function when text content is about to insert. 1573 * @returns { SearchAttribute } 1574 * @syscap SystemCapability.ArkUI.ArkUI.Full 1575 * @crossplatform 1576 * @atomicservice 1577 * @since 12 1578 */ 1579 onWillInsert(callback: Callback<InsertValue, boolean>): SearchAttribute; 1580 1581 /** 1582 * Get text value information when completed input. 1583 * 1584 * @param { Callback<InsertValue> } callback - The triggered function when text content has been inserted. 1585 * @returns { SearchAttribute } 1586 * @syscap SystemCapability.ArkUI.ArkUI.Full 1587 * @crossplatform 1588 * @atomicservice 1589 * @since 12 1590 */ 1591 onDidInsert(callback: Callback<InsertValue>): SearchAttribute; 1592 1593 /** 1594 * Get text value information when about to delete. 1595 * 1596 * @param { Callback<DeleteValue, boolean> } callback - The triggered function when text content is about to delete. 1597 * @returns { SearchAttribute } 1598 * @syscap SystemCapability.ArkUI.ArkUI.Full 1599 * @crossplatform 1600 * @atomicservice 1601 * @since 12 1602 */ 1603 onWillDelete(callback: Callback<DeleteValue, boolean>): SearchAttribute; 1604 1605 /** 1606 * Get text value information when the deletion has been completed 1607 * 1608 * @param { Callback<DeleteValue> } callback - The triggered function when text content has been deleted. 1609 * @returns { SearchAttribute } 1610 * @syscap SystemCapability.ArkUI.ArkUI.Full 1611 * @crossplatform 1612 * @atomicservice 1613 * @since 12 1614 */ 1615 onDidDelete(callback: Callback<DeleteValue>): SearchAttribute; 1616 1617 /** 1618 * Set the custom text menu. 1619 * 1620 * @param { EditMenuOptions } editMenu - Customize text menu options. 1621 * @returns { SearchAttribute } 1622 * @syscap SystemCapability.ArkUI.ArkUI.Full 1623 * @crossplatform 1624 * @atomicservice 1625 * @since 12 1626 */ 1627 editMenuOptions(editMenu: EditMenuOptions): SearchAttribute; 1628 1629 /** 1630 * Define the preview text mode of the text input. 1631 * 1632 * @param { boolean } enable - Indicates the preview text mode. 1633 * @returns { SearchAttribute } 1634 * @syscap SystemCapability.ArkUI.ArkUI.Full 1635 * @crossplatform 1636 * @atomicservice 1637 * @since 12 1638 */ 1639 enablePreviewText(enable: boolean): SearchAttribute; 1640 1641 /** 1642 * Enable or disable haptic feedback. 1643 * 1644 * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. 1645 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1646 * @syscap SystemCapability.ArkUI.ArkUI.Full 1647 * @crossplatform 1648 * @atomicservice 1649 * @since 13 1650 */ 1651 enableHapticFeedback(isEnabled: boolean): SearchAttribute; 1652 1653 /** 1654 * Set the text with half leading. 1655 * 1656 * @param { Optional<boolean> } halfLeading 1657 * @returns { SearchAttribute } 1658 * @syscap SystemCapability.ArkUI.ArkUI.Full 1659 * @crossplatform 1660 * @atomicservice 1661 * @since 18 1662 */ 1663 halfLeading(halfLeading: Optional<boolean>): SearchAttribute; 1664 1665 /** 1666 * Set whether stop backPressed callback event or not. 1667 * 1668 * @param { Optional<boolean> } isStopped - Default value is true, set false to trigger the latest callback event. 1669 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1670 * @syscap SystemCapability.ArkUI.ArkUI.Full 1671 * @atomicservice 1672 * @since 15 1673 */ 1674 stopBackPress(isStopped: Optional<boolean>): SearchAttribute; 1675 1676 /** 1677 * Get text value information when about to change. 1678 * 1679 * @param { Callback<EditableTextChangeValue, boolean> } callback - The triggered function when text content is about to change. 1680 * @returns { SearchAttribute } 1681 * @syscap SystemCapability.ArkUI.ArkUI.Full 1682 * @crossplatform 1683 * @atomicservice 1684 * @since 15 1685 */ 1686 onWillChange(callback: Callback<EditableTextChangeValue, boolean>): SearchAttribute; 1687 1688 /** 1689 * Set the keyboard appearance. 1690 * 1691 * @param { Optional<KeyboardAppearance> } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE 1692 * @returns { SearchAttribute } returns the instance of the SearchAttribute. 1693 * @syscap SystemCapability.ArkUI.ArkUI.Full 1694 * @atomicservice 1695 * @since 15 1696 */ 1697 keyboardAppearance(appearance: Optional<KeyboardAppearance>): SearchAttribute; 1698} 1699 1700/** 1701 * Defines Search Component. 1702 * 1703 * @syscap SystemCapability.ArkUI.ArkUI.Full 1704 * @since 8 1705 */ 1706/** 1707 * Defines Search Component. 1708 * 1709 * @syscap SystemCapability.ArkUI.ArkUI.Full 1710 * @crossplatform 1711 * @since 10 1712 */ 1713/** 1714 * Defines Search Component. 1715 * 1716 * @syscap SystemCapability.ArkUI.ArkUI.Full 1717 * @crossplatform 1718 * @atomicservice 1719 * @since 11 1720 */ 1721declare const Search: SearchInterface; 1722 1723/** 1724 * Defines Search Component instance. 1725 * 1726 * @syscap SystemCapability.ArkUI.ArkUI.Full 1727 * @since 8 1728 */ 1729/** 1730 * Defines Search Component instance. 1731 * 1732 * @syscap SystemCapability.ArkUI.ArkUI.Full 1733 * @crossplatform 1734 * @since 10 1735 */ 1736/** 1737 * Defines Search Component instance. 1738 * 1739 * @syscap SystemCapability.ArkUI.ArkUI.Full 1740 * @crossplatform 1741 * @atomicservice 1742 * @since 11 1743 */ 1744declare const SearchInstance: SearchAttribute; 1745