• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 * The construct function of search
305 *
306 * @interface SearchInterface
307 * @syscap SystemCapability.ArkUI.ArkUI.Full
308 * @since 8
309 */
310/**
311 * The construct function of search
312 *
313 * @interface SearchInterface
314 * @syscap SystemCapability.ArkUI.ArkUI.Full
315 * @crossplatform
316 * @since 10
317 */
318/**
319 * The construct function of search
320 *
321 * @interface SearchInterface
322 * @syscap SystemCapability.ArkUI.ArkUI.Full
323 * @crossplatform
324 * @atomicservice
325 * @since 11
326 */
327interface SearchInterface {
328  /**
329   * The options of SearchInterface
330   *
331   * @param { object } options
332   * @returns { SearchAttribute }
333   * @syscap SystemCapability.ArkUI.ArkUI.Full
334   * @since 8
335   */
336  /**
337   * The options of SearchInterface
338   *
339   * @param { object } options
340   * @returns { SearchAttribute }
341   * @syscap SystemCapability.ArkUI.ArkUI.Full
342   * @crossplatform
343   * @since 10
344   */
345  /**
346   * The options of SearchInterface
347   *
348   * @param { object } options
349   * @returns { SearchAttribute }
350   * @syscap SystemCapability.ArkUI.ArkUI.Full
351   * @crossplatform
352   * @atomicservice
353   * @since 11
354   */
355  (options?: {
356    /**
357     * Text input in the search text box
358     *
359     * @type { ?string }
360     * @syscap SystemCapability.ArkUI.ArkUI.Full
361     * @since 8
362     */
363    /**
364     * Text input in the search text box
365     *
366     * @type { ?string }
367     * @syscap SystemCapability.ArkUI.ArkUI.Full
368     * @atomicservice
369     * @since 11
370     */
371    value?: string;
372
373    /**
374     * Text displayed when there is no input
375     *
376     * @type { string }
377     * @syscap SystemCapability.ArkUI.ArkUI.Full
378     * @since 8
379     */
380    /**
381     * Text displayed when there is no input
382     *
383     * @type { ?ResourceStr }
384     * @syscap SystemCapability.ArkUI.ArkUI.Full
385     * @since 10
386     */
387    /**
388     * Text displayed when there is no input
389     *
390     * @type { ?ResourceStr }
391     * @syscap SystemCapability.ArkUI.ArkUI.Full
392     * @atomicservice
393     * @since 11
394     */
395    placeholder?: ResourceStr;
396
397    /**
398     * Path to the search icon
399     *
400     * @type { ?string }
401     * @syscap SystemCapability.ArkUI.ArkUI.Full
402     * @since 8
403     */
404    /**
405     * Path to the search icon
406     *
407     * @type { ?string }
408     * @syscap SystemCapability.ArkUI.ArkUI.Full
409     * @atomicservice
410     * @since 11
411     */
412    icon?: string;
413
414    /**
415     * Controller of the <Search> component
416     *
417     * @type { ?SearchController }
418     * @syscap SystemCapability.ArkUI.ArkUI.Full
419     * @since 8
420     */
421    /**
422     * Controller of the <Search> component
423     *
424     * @type { ?SearchController }
425     * @syscap SystemCapability.ArkUI.ArkUI.Full
426     * @atomicservice
427     * @since 11
428     */
429    controller?: SearchController
430  }): SearchAttribute;
431}
432
433/**
434 * Defines the icon options
435 *
436 * @interface IconOptions
437 * @syscap SystemCapability.ArkUI.ArkUI.Full
438 * @crossplatform
439 * @since 10
440 */
441/**
442 * Defines the icon options
443 *
444 * @interface IconOptions
445 * @syscap SystemCapability.ArkUI.ArkUI.Full
446 * @crossplatform
447 * @atomicservice
448 * @since 11
449 */
450interface IconOptions {
451  /**
452   * Set the icon size
453   *
454   * @type { ?Length }
455   * @syscap SystemCapability.ArkUI.ArkUI.Full
456   * @crossplatform
457   * @since 10
458   */
459  /**
460   * Set the icon size
461   *
462   * @type { ?Length }
463   * @syscap SystemCapability.ArkUI.ArkUI.Full
464   * @crossplatform
465   * @atomicservice
466   * @since 11
467   */
468  size?: Length;
469
470  /**
471   * Set the icon color
472   *
473   * @type { ?ResourceColor }
474   * @syscap SystemCapability.ArkUI.ArkUI.Full
475   * @crossplatform
476   * @since 10
477   */
478  /**
479   * Set the icon color
480   *
481   * @type { ?ResourceColor }
482   * @syscap SystemCapability.ArkUI.ArkUI.Full
483   * @crossplatform
484   * @atomicservice
485   * @since 11
486   */
487  color?: ResourceColor;
488
489  /**
490   * Set the icon resource
491   *
492   * @type { ?ResourceStr }
493   * @syscap SystemCapability.ArkUI.ArkUI.Full
494   * @crossplatform
495   * @since 10
496   */
497  /**
498   * Set the icon resource
499   *
500   * @type { ?ResourceStr }
501   * @syscap SystemCapability.ArkUI.ArkUI.Full
502   * @crossplatform
503   * @atomicservice
504   * @since 11
505   */
506  src?: ResourceStr;
507}
508
509/**
510 * Defines the SearchButton options
511 *
512 * @interface SearchButtonOptions
513 * @syscap SystemCapability.ArkUI.ArkUI.Full
514 * @crossplatform
515 * @since 10
516 */
517/**
518 * Defines the SearchButton options
519 *
520 * @interface SearchButtonOptions
521 * @syscap SystemCapability.ArkUI.ArkUI.Full
522 * @crossplatform
523 * @atomicservice
524 * @since 11
525 */
526interface SearchButtonOptions {
527  /**
528   * Set the SearchButton fontSize
529   *
530   * @type { ?Length }
531   * @syscap SystemCapability.ArkUI.ArkUI.Full
532   * @crossplatform
533   * @since 10
534   */
535  /**
536   * Set the SearchButton fontSize
537   *
538   * @type { ?Length }
539   * @syscap SystemCapability.ArkUI.ArkUI.Full
540   * @crossplatform
541   * @atomicservice
542   * @since 11
543   */
544  fontSize?: Length;
545
546  /**
547   * Set the SearchButton fontColor
548   *
549   * @type { ?ResourceColor }
550   * @syscap SystemCapability.ArkUI.ArkUI.Full
551   * @crossplatform
552   * @since 10
553   */
554  /**
555   * Set the SearchButton fontColor
556   *
557   * @type { ?ResourceColor }
558   * @syscap SystemCapability.ArkUI.ArkUI.Full
559   * @crossplatform
560   * @atomicservice
561   * @since 11
562   */
563  fontColor?: ResourceColor;
564}
565
566/**
567 * Defines the CancelButton options
568 *
569 * @interface CancelButtonOptions
570 * @syscap SystemCapability.ArkUI.ArkUI.Full
571 * @crossplatform
572 * @atomicservice
573 * @since 12
574 */
575interface CancelButtonOptions {
576  /**
577   * Set the CancelButton style
578   *
579   * @type { ?CancelButtonStyle }
580   * @syscap SystemCapability.ArkUI.ArkUI.Full
581   * @crossplatform
582   * @atomicservice
583   * @since 12
584   */
585  style?: CancelButtonStyle;
586
587  /**
588   * Set the CancelButton icon
589   *
590   * @type { ?IconOptions }
591   * @syscap SystemCapability.ArkUI.ArkUI.Full
592   * @crossplatform
593   * @atomicservice
594   * @since 12
595   */
596  icon?: IconOptions;
597}
598
599/**
600 * Defines the CancelButton symbol options
601 *
602 * @interface CancelButtonSymbolOptions
603 * @syscap SystemCapability.ArkUI.ArkUI.Full
604 * @crossplatform
605 * @atomicservice
606 * @since 12
607 */
608interface CancelButtonSymbolOptions {
609  /**
610   * Set the CancelButton style
611   *
612   * @type { ?CancelButtonStyle }
613   * @syscap SystemCapability.ArkUI.ArkUI.Full
614   * @crossplatform
615   * @atomicservice
616   * @since 12
617   */
618  style?: CancelButtonStyle;
619
620  /**
621   * Set the CancelButton symbol icon
622   *
623   * @type { ?SymbolGlyphModifier }
624   * @syscap SystemCapability.ArkUI.ArkUI.Full
625   * @crossplatform
626   * @atomicservice
627   * @since 12
628   */
629  icon?: SymbolGlyphModifier;
630}
631
632/**
633 * The attribute function of search
634 *
635 * @extends CommonMethod<SearchAttribute>
636 * @syscap SystemCapability.ArkUI.ArkUI.Full
637 * @since 8
638 */
639/**
640 * The attribute function of search
641 *
642 * @extends CommonMethod<SearchAttribute>
643 * @syscap SystemCapability.ArkUI.ArkUI.Full
644 * @crossplatform
645 * @since 10
646 */
647/**
648 * The attribute function of search
649 *
650 * @extends CommonMethod<SearchAttribute>
651 * @syscap SystemCapability.ArkUI.ArkUI.Full
652 * @crossplatform
653 * @atomicservice
654 * @since 11
655 */
656declare class SearchAttribute extends CommonMethod<SearchAttribute> {
657  /**
658   * Set the search button text
659   *
660   * @param { string } value - indicates the text of the search button.
661   * @param { SearchButtonOption } option
662   * @returns { SearchAttribute }
663   * @syscap SystemCapability.ArkUI.ArkUI.Full
664   * @since 8
665   */
666  /**
667   * Set the search button text, fontSize and fontColor
668   *
669   * @param { string } value - indicates the text of the search button.
670   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
671   * @returns { SearchAttribute }
672   * @syscap SystemCapability.ArkUI.ArkUI.Full
673   * @crossplatform
674   * @since 10
675   */
676  /**
677   * Set the search button text, fontSize and fontColor
678   *
679   * @param { string } value - indicates the text of the search button.
680   * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.
681   * @returns { SearchAttribute }
682   * @syscap SystemCapability.ArkUI.ArkUI.Full
683   * @crossplatform
684   * @atomicservice
685   * @since 11
686   */
687  searchButton(value: string, option?: SearchButtonOptions): SearchAttribute;
688
689  /**
690   * Set the text Color
691   *
692   * @param { ResourceColor } value - indicates the color of the text.
693   * @returns { SearchAttribute }
694   * @syscap SystemCapability.ArkUI.ArkUI.Full
695   * @crossplatform
696   * @since 10
697   */
698  /**
699   * Set the text Color
700   *
701   * @param { ResourceColor } value - indicates the color of the text.
702   * @returns { SearchAttribute }
703   * @syscap SystemCapability.ArkUI.ArkUI.Full
704   * @crossplatform
705   * @atomicservice
706   * @since 11
707   */
708  fontColor(value: ResourceColor): SearchAttribute;
709
710  /**
711   * Set the search icon style
712   *
713   * @param { IconOptions } value - indicates the style of the search icon.
714   * @returns { SearchAttribute }
715   * @syscap SystemCapability.ArkUI.ArkUI.Full
716   * @crossplatform
717   * @since 10
718   */
719  /**
720   * Set the search icon style
721   *
722   * @param { IconOptions } value - indicates the style of the search icon.
723   * @returns { SearchAttribute }
724   * @syscap SystemCapability.ArkUI.ArkUI.Full
725   * @crossplatform
726   * @atomicservice
727   * @since 11
728   */
729  /**
730   * Set the search icon style
731   *
732   * @param { IconOptions | SymbolGlyphModifier } value - indicates the style of the search icon.
733   * @returns { SearchAttribute }
734   * @syscap SystemCapability.ArkUI.ArkUI.Full
735   * @crossplatform
736   * @atomicservice
737   * @since 12
738   */
739  searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute;
740
741  /**
742   * Set the cancel button style
743   *
744   * @param { object } value - indicates the style of the cancel button.
745   * @returns { SearchAttribute }
746   * @syscap SystemCapability.ArkUI.ArkUI.Full
747   * @crossplatform
748   * @since 10
749   */
750  /**
751   * Set the cancel button style
752   *
753   * @param { object } value - indicates the style of the cancel button.
754   * @returns { SearchAttribute }
755   * @syscap SystemCapability.ArkUI.ArkUI.Full
756   * @crossplatform
757   * @atomicservice
758   * @since 11
759   */
760  /**
761   * Set the cancel button style
762   *
763   * @param { CancelButtonOptions | CancelButtonSymbolOptions } value - indicates the style of the cancel button.
764   * @returns { SearchAttribute }
765   * @syscap SystemCapability.ArkUI.ArkUI.Full
766   * @crossplatform
767   * @atomicservice
768   * @since 12
769   */
770  cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute;
771
772  /**
773   * Specify the indentation of the first line in a text-block.
774   *
775   * @param { Dimension } value - The length of text indent.
776   * @returns { SearchAttribute } The attribute of the text.
777   * @syscap SystemCapability.ArkUI.ArkUI.Full
778   * @crossplatform
779   * @atomicservice
780   * @since 12
781   */
782  textIndent(value: Dimension): SearchAttribute;
783
784  /**
785   * Called when the inputFilter of text is set.
786   *
787   * @param { ResourceStr } value
788   * @param { Callback<string> } error
789   * @returns { SearchAttribute }
790   * @syscap SystemCapability.ArkUI.ArkUI.Full
791   * @crossplatform
792   * @atomicservice
793   * @since 12
794   */
795  inputFilter(value: ResourceStr, error?: Callback<string>): SearchAttribute;
796
797  /**
798   * Called when judging whether the text editing change finished.
799   *
800   * @param { Callback<boolean> } callback
801   * @returns { SearchAttribute }
802   * @syscap SystemCapability.ArkUI.ArkUI.Full
803   * @crossplatform
804   * @atomicservice
805   * @since 12
806   */
807  onEditChange(callback: Callback<boolean>): SearchAttribute;
808
809  /**
810   * Define the text selected background color of the text input.
811   *
812   * @param { ResourceColor } value
813   * @returns { SearchAttribute }
814   * @syscap SystemCapability.ArkUI.ArkUI.Full
815   * @crossplatform
816   * @atomicservice
817   * @since 12
818   */
819  selectedBackgroundColor(value: ResourceColor): SearchAttribute;
820
821  /**
822   * Set the cursor style
823   *
824   * @param { CaretStyle } value - indicates the style of the cursor.
825   * @returns { SearchAttribute }
826   * @syscap SystemCapability.ArkUI.ArkUI.Full
827   * @crossplatform
828   * @since 10
829   */
830  /**
831   * Set the cursor style
832   *
833   * @param { CaretStyle } value - indicates the style of the cursor.
834   * @returns { SearchAttribute }
835   * @syscap SystemCapability.ArkUI.ArkUI.Full
836   * @crossplatform
837   * @atomicservice
838   * @since 11
839   */
840  caretStyle(value: CaretStyle): SearchAttribute;
841
842  /**
843   * Set the place hold text color
844   *
845   * @param { ResourceColor } value
846   * @returns { SearchAttribute }
847   * @syscap SystemCapability.ArkUI.ArkUI.Full
848   * @since 8
849   */
850  /**
851   * Set the place hold text color
852   *
853   * @param { ResourceColor } value
854   * @returns { SearchAttribute }
855   * @syscap SystemCapability.ArkUI.ArkUI.Full
856   * @crossplatform
857   * @since 10
858   */
859  /**
860   * Set the place hold text color
861   *
862   * @param { ResourceColor } value
863   * @returns { SearchAttribute }
864   * @syscap SystemCapability.ArkUI.ArkUI.Full
865   * @crossplatform
866   * @atomicservice
867   * @since 11
868   */
869  placeholderColor(value: ResourceColor): SearchAttribute;
870
871  /**
872   * Set the font used for place holder text
873   *
874   * @param { Font } value
875   * @returns { SearchAttribute }
876   * @syscap SystemCapability.ArkUI.ArkUI.Full
877   * @since 8
878   */
879  /**
880   * Set the font used for place holder text
881   *
882   * @param { Font } value
883   * @returns { SearchAttribute }
884   * @syscap SystemCapability.ArkUI.ArkUI.Full
885   * @crossplatform
886   * @since 10
887   */
888  /**
889   * Set the font used for place holder text
890   *
891   * @param { Font } value
892   * @returns { SearchAttribute }
893   * @syscap SystemCapability.ArkUI.ArkUI.Full
894   * @crossplatform
895   * @atomicservice
896   * @since 11
897   */
898  placeholderFont(value?: Font): SearchAttribute;
899
900  /**
901   * Set the font used for input text
902   *
903   * @param { Font } value
904   * @returns { SearchAttribute }
905   * @syscap SystemCapability.ArkUI.ArkUI.Full
906   * @since 8
907   */
908  /**
909   * Set the font used for input text
910   *
911   * @param { Font } value
912   * @returns { SearchAttribute }
913   * @syscap SystemCapability.ArkUI.ArkUI.Full
914   * @crossplatform
915   * @since 10
916   */
917  /**
918   * Set the font used for input text
919   *
920   * @param { Font } value
921   * @returns { SearchAttribute }
922   * @syscap SystemCapability.ArkUI.ArkUI.Full
923   * @crossplatform
924   * @atomicservice
925   * @since 11
926   */
927  textFont(value?: Font): SearchAttribute;
928
929  /**
930   * Set enter key type of soft keyboard
931   *
932   * @param { EnterKeyType } value
933   * @returns { SearchAttribute }
934   * @syscap SystemCapability.ArkUI.ArkUI.Full
935   * @crossplatform
936   * @atomicservice
937   * @since 12
938   */
939  enterKeyType(value: EnterKeyType): SearchAttribute;
940
941  /**
942   * Call the function when clicked the search button
943   *
944   * @param { function } callback
945   * @returns { SearchAttribute }
946   * @syscap SystemCapability.ArkUI.ArkUI.Full
947   * @since 8
948   */
949  /**
950   * Call the function when clicked the search button
951   *
952   * @param { function } callback
953   * @returns { SearchAttribute }
954   * @syscap SystemCapability.ArkUI.ArkUI.Full
955   * @crossplatform
956   * @since 10
957   */
958  /**
959   * Call the function when clicked the search button
960   *
961   * @param { function } callback
962   * @returns { SearchAttribute }
963   * @syscap SystemCapability.ArkUI.ArkUI.Full
964   * @crossplatform
965   * @atomicservice
966   * @since 11
967   */
968  onSubmit(callback: (value: string) => void): SearchAttribute;
969
970  /**
971   * Call the function when editing the input text
972   *
973   * @param { function } callback
974   * @returns { SearchAttribute }
975   * @syscap SystemCapability.ArkUI.ArkUI.Full
976   * @since 8
977   */
978  /**
979   * Call the function when editing the input text
980   *
981   * @param { function } callback
982   * @returns { SearchAttribute }
983   * @syscap SystemCapability.ArkUI.ArkUI.Full
984   * @crossplatform
985   * @since 10
986   */
987  /**
988   * Call the function when editing the input text
989   *
990   * @param { function } callback
991   * @returns { SearchAttribute }
992   * @syscap SystemCapability.ArkUI.ArkUI.Full
993   * @crossplatform
994   * @atomicservice
995   * @since 11
996   */
997  /**
998   * Call the function when editing the input text
999   *
1000   * @param { EditableTextOnChangeCallback } callback
1001   * @returns { SearchAttribute }
1002   * @syscap SystemCapability.ArkUI.ArkUI.Full
1003   * @crossplatform
1004   * @atomicservice
1005   * @since 12
1006   */
1007  onChange(callback: EditableTextOnChangeCallback): SearchAttribute;
1008
1009  /**
1010   * Called when the text selection changes.
1011   *
1012   * @param { function } callback - callback of the listened event.
1013   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1014   * @syscap SystemCapability.ArkUI.ArkUI.Full
1015   * @crossplatform
1016   * @since 10
1017   */
1018  /**
1019   * Called when the text selection changes.
1020   *
1021   * @param { function } callback - callback of the listened event.
1022   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1023   * @syscap SystemCapability.ArkUI.ArkUI.Full
1024   * @crossplatform
1025   * @atomicservice
1026   * @since 11
1027   */
1028  onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): SearchAttribute;
1029
1030  /**
1031   * Called when the content scrolls.
1032   *
1033   * @param { function } callback - callback of the listened event.
1034   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1035   * @syscap SystemCapability.ArkUI.ArkUI.Full
1036   * @crossplatform
1037   * @since 10
1038   */
1039  /**
1040   * Called when the content scrolls.
1041   *
1042   * @param { function } callback - callback of the listened event.
1043   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1044   * @syscap SystemCapability.ArkUI.ArkUI.Full
1045   * @crossplatform
1046   * @atomicservice
1047   * @since 11
1048   */
1049  onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): SearchAttribute;
1050
1051  /**
1052   * Called when using the Clipboard menu
1053   *
1054   * @param { function } callback
1055   * @returns { SearchAttribute }
1056   * @syscap SystemCapability.ArkUI.ArkUI.Full
1057   * @since 8
1058   */
1059  /**
1060   * Called when using the Clipboard menu
1061   *
1062   * @param { function } callback
1063   * @returns { SearchAttribute }
1064   * @syscap SystemCapability.ArkUI.ArkUI.Full
1065   * @crossplatform
1066   * @since 10
1067   */
1068  /**
1069   * Called when using the Clipboard menu
1070   *
1071   * @param { function } callback
1072   * @returns { SearchAttribute }
1073   * @syscap SystemCapability.ArkUI.ArkUI.Full
1074   * @crossplatform
1075   * @atomicservice
1076   * @since 11
1077   */
1078  onCopy(callback: (value: string) => void): SearchAttribute;
1079
1080  /**
1081   * Called when using the Clipboard menu
1082   *
1083   * @param { function } callback
1084   * @returns { SearchAttribute }
1085   * @syscap SystemCapability.ArkUI.ArkUI.Full
1086   * @since 8
1087   */
1088  /**
1089   * Called when using the Clipboard menu
1090   *
1091   * @param { function } callback
1092   * @returns { SearchAttribute }
1093   * @syscap SystemCapability.ArkUI.ArkUI.Full
1094   * @crossplatform
1095   * @since 10
1096   */
1097  /**
1098   * Called when using the Clipboard menu
1099   *
1100   * @param { function } callback
1101   * @returns { SearchAttribute }
1102   * @syscap SystemCapability.ArkUI.ArkUI.Full
1103   * @crossplatform
1104   * @atomicservice
1105   * @since 11
1106   */
1107  onCut(callback: (value: string) => void): SearchAttribute;
1108
1109  /**
1110   * Called when using the Clipboard menu
1111   *
1112   * @param { function } callback
1113   * @returns { SearchAttribute }
1114   * @syscap SystemCapability.ArkUI.ArkUI.Full
1115   * @since 8
1116   */
1117  /**
1118   * Called when using the Clipboard menu
1119   *
1120   * @param { function } callback
1121   * @returns { SearchAttribute }
1122   * @syscap SystemCapability.ArkUI.ArkUI.Full
1123   * @crossplatform
1124   * @since 10
1125   */
1126  /**
1127   * Called when using the Clipboard menu
1128   *
1129   * @param { function } callback
1130   *          Executed when a paste operation is performed.
1131   *          { string } value - The text content to be pasted.
1132   *          { PasteEvent } event - The user-defined paste event.
1133   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1134   * @syscap SystemCapability.ArkUI.ArkUI.Full
1135   * @crossplatform
1136   * @atomicservice
1137   * @since 11
1138   */
1139  onPaste(callback: (value: string, event: PasteEvent) => void): SearchAttribute;
1140
1141  /**
1142   * Called when the copy option is set.
1143   *
1144   * @param { CopyOptions } value
1145   * @returns { SearchAttribute }
1146   * @syscap SystemCapability.ArkUI.ArkUI.Full
1147   * @since 9
1148   */
1149  /**
1150   * Called when the copy option is set.
1151   *
1152   * @param { CopyOptions } value
1153   * @returns { SearchAttribute }
1154   * @syscap SystemCapability.ArkUI.ArkUI.Full
1155   * @crossplatform
1156   * @since 10
1157   */
1158  /**
1159   * Called when the copy option is set.
1160   *
1161   * @param { CopyOptions } value
1162   * @returns { SearchAttribute }
1163   * @syscap SystemCapability.ArkUI.ArkUI.Full
1164   * @crossplatform
1165   * @atomicservice
1166   * @since 11
1167   */
1168  copyOption(value: CopyOptions): SearchAttribute;
1169
1170  /**
1171   * Called when the input of maximum text length is set.
1172   *
1173   * @param { number } value
1174   * @returns { SearchAttribute }
1175   * @syscap SystemCapability.ArkUI.ArkUI.Full
1176   * crossplatform
1177   * @since 11
1178   */
1179  /**
1180   * Called when the input of maximum text length is set.
1181   *
1182   * @param { number } value
1183   * @returns { SearchAttribute }
1184   * @syscap SystemCapability.ArkUI.ArkUI.Full
1185   * crossplatform
1186   * @atomicservice
1187   * @since 12
1188   */
1189  maxLength(value: number): SearchAttribute;
1190
1191  /**
1192   * Called when the text align is set.
1193   *
1194   * @param { TextAlign } value
1195   * @returns { SearchAttribute }
1196   * @syscap SystemCapability.ArkUI.ArkUI.Full
1197   * @since 9
1198   */
1199  /**
1200   * Called when the text align is set.
1201   *
1202   * @param { TextAlign } value
1203   * @returns { SearchAttribute }
1204   * @syscap SystemCapability.ArkUI.ArkUI.Full
1205   * @crossplatform
1206   * @since 10
1207   */
1208  /**
1209   * Called when the text align is set.
1210   *
1211   * @param { TextAlign } value
1212   * @returns { SearchAttribute }
1213   * @syscap SystemCapability.ArkUI.ArkUI.Full
1214   * @crossplatform
1215   * @atomicservice
1216   * @since 11
1217   */
1218  textAlign(value: TextAlign): SearchAttribute;
1219
1220  /**
1221   * Sets whether request keyboard or not when on focus.
1222   *
1223   * @param { boolean } value
1224   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1225   * @syscap SystemCapability.ArkUI.ArkUI.Full
1226   * @crossplatform
1227   * @since 10
1228   */
1229  /**
1230   * Sets whether request keyboard or not when on focus.
1231   *
1232   * @param { boolean } value
1233   * @returns { SearchAttribute } Returns the instance of the SearchAttribute.
1234   * @syscap SystemCapability.ArkUI.ArkUI.Full
1235   * @crossplatform
1236   * @atomicservice
1237   * @since 11
1238   */
1239  enableKeyboardOnFocus(value: boolean): SearchAttribute;
1240
1241  /**
1242   * Controls whether the selection menu pops up.
1243   *
1244   * @param { boolean } value
1245   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1246   * @syscap SystemCapability.ArkUI.ArkUI.Full
1247   * @crossplatform
1248   * @since 10
1249   */
1250  /**
1251   * Controls whether the selection menu pops up.
1252   *
1253   * @param { boolean } value
1254   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1255   * @syscap SystemCapability.ArkUI.ArkUI.Full
1256   * @crossplatform
1257   * @atomicservice
1258   * @since 11
1259   */
1260  selectionMenuHidden(value: boolean): SearchAttribute;
1261
1262  /**
1263   * Called when the minimum font size of the font is set.
1264   *
1265   * @param { number | string | Resource } value
1266   * @returns { SearchAttribute }
1267   * @syscap SystemCapability.ArkUI.ArkUI.Full
1268   * @crossplatform
1269   * @atomicservice
1270   * @since 12
1271   */
1272  minFontSize(value: number | string | Resource): SearchAttribute;
1273
1274  /**
1275   * Called when the maximum font size of the font is set.
1276   *
1277   * @param { number | string | Resource } value
1278   * @returns { SearchAttribute }
1279   * @syscap SystemCapability.ArkUI.ArkUI.Full
1280   * @crossplatform
1281   * @atomicservice
1282   * @since 12
1283   */
1284  maxFontSize(value: number | string | Resource): SearchAttribute;
1285
1286  /**
1287   * Define custom keyboard.
1288   *
1289   * @param { CustomBuilder } value
1290   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1291   * @syscap SystemCapability.ArkUI.ArkUI.Full
1292   * @since 10
1293   */
1294  /**
1295   * Define custom keyboard.
1296   *
1297   * @param { CustomBuilder } value
1298   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1299   * @syscap SystemCapability.ArkUI.ArkUI.Full
1300   * @crossplatform
1301   * @atomicservice
1302   * @since 11
1303   */
1304  /**
1305   * Define custom keyboard.
1306   *
1307   * @param { CustomBuilder } value - Set up a custom keyboard of Search
1308   * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of Search
1309   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1310   * @syscap SystemCapability.ArkUI.ArkUI.Full
1311   * @crossplatform
1312   * @atomicservice
1313   * @since 12
1314   */
1315  customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute;
1316
1317  /**
1318   * Called when the text decoration of the text is set.
1319   *
1320   * @param { TextDecorationOptions } value
1321   * @returns { SearchAttribute }
1322   * @syscap SystemCapability.ArkUI.ArkUI.Full
1323   * @crossplatform
1324   * @atomicservice
1325   * @since 12
1326   */
1327  decoration(value: TextDecorationOptions): SearchAttribute;
1328
1329  /**
1330   * Called when the distance between text fonts is set.
1331   *
1332   * @param { number | string | Resource } value
1333   * @returns { SearchAttribute }
1334   * @syscap SystemCapability.ArkUI.ArkUI.Full
1335   * @crossplatform
1336   * @atomicservice
1337   * @since 12
1338   */
1339  letterSpacing(value: number | string | Resource): SearchAttribute;
1340
1341  /**
1342   * Called when the line height of the font is set.
1343   *
1344   * @param { number | string | Resource } value
1345   * @returns { SearchAttribute }
1346   * @syscap SystemCapability.ArkUI.ArkUI.Full
1347   * @crossplatform
1348   * @atomicservice
1349   * @since 12
1350   */
1351  lineHeight(value: number | string | Resource): SearchAttribute;
1352
1353  /**
1354   * Called when the search type is set.
1355   *
1356   * @param { SearchType } value
1357   * @returns { SearchAttribute }
1358   * @syscap SystemCapability.ArkUI.ArkUI.Full
1359   * @crossplatform
1360   * @since 11
1361   */
1362  /**
1363   * Called when the search type is set.
1364   *
1365   * @param { SearchType } value
1366   * @returns { SearchAttribute }
1367   * @syscap SystemCapability.ArkUI.ArkUI.Full
1368   * @crossplatform
1369   * @atomicservice
1370   * @since 12
1371   */
1372  type(value: SearchType): SearchAttribute;
1373
1374  /**
1375   * Set font feature.
1376   *
1377   * @param { string } value - The fontFeature.
1378   * normal | <feature-tag-value>,
1379   * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0
1380   * the values of <feature-tag-value> reference to doc of search component
1381   * number of <feature-tag-value> can be single or multiple, and separated by comma ','.
1382   * @returns { SearchAttribute }
1383   * @syscap SystemCapability.ArkUI.ArkUI.Full
1384   * @crossplatform
1385   * @atomicservice
1386   * @since 12
1387   */
1388  fontFeature(value: string): SearchAttribute;
1389
1390  /**
1391   * Get text value information when about to input.
1392   *
1393   * @param { Callback<InsertValue, boolean> } callback - The triggered function when text content is about to insert.
1394   * @returns { SearchAttribute }
1395   * @syscap SystemCapability.ArkUI.ArkUI.Full
1396   * @crossplatform
1397   * @atomicservice
1398   * @since 12
1399   */
1400  onWillInsert(callback: Callback<InsertValue, boolean>): SearchAttribute;
1401
1402  /**
1403   * Get text value information when completed input.
1404   *
1405   * @param { Callback<InsertValue> } callback - The triggered function when text content has been inserted.
1406   * @returns { SearchAttribute }
1407   * @syscap SystemCapability.ArkUI.ArkUI.Full
1408   * @crossplatform
1409   * @atomicservice
1410   * @since 12
1411   */
1412  onDidInsert(callback: Callback<InsertValue>): SearchAttribute;
1413
1414  /**
1415   * Get text value information when about to delete.
1416   *
1417   * @param { Callback<DeleteValue, boolean> } callback - The triggered function when text content is about to delete.
1418   * @returns { SearchAttribute }
1419   * @syscap SystemCapability.ArkUI.ArkUI.Full
1420   * @crossplatform
1421   * @atomicservice
1422   * @since 12
1423   */
1424  onWillDelete(callback: Callback<DeleteValue, boolean>): SearchAttribute;
1425
1426  /**
1427   * Get text value information when the deletion has been completed
1428   *
1429   * @param { Callback<DeleteValue> } callback - The triggered function when text content has been deleted.
1430   * @returns { SearchAttribute }
1431   * @syscap SystemCapability.ArkUI.ArkUI.Full
1432   * @crossplatform
1433   * @atomicservice
1434   * @since 12
1435   */
1436  onDidDelete(callback: Callback<DeleteValue>): SearchAttribute;
1437
1438  /**
1439   * Set the custom text menu.
1440   *
1441   * @param { EditMenuOptions } editMenu - Customize text menu options.
1442   * @returns { SearchAttribute }
1443   * @syscap SystemCapability.ArkUI.ArkUI.Full
1444   * @crossplatform
1445   * @atomicservice
1446   * @since 12
1447   */
1448  editMenuOptions(editMenu: EditMenuOptions): SearchAttribute;
1449
1450  /**
1451   * Define the preview text mode of the text input.
1452   *
1453   * @param { boolean } enable - Indicates the preview text mode.
1454   * @returns { SearchAttribute }
1455   * @syscap SystemCapability.ArkUI.ArkUI.Full
1456   * @crossplatform
1457   * @atomicservice
1458   * @since 12
1459   */
1460  enablePreviewText(enable: boolean): SearchAttribute;
1461
1462  /**
1463   * Enable or disable haptic feedback.
1464   *
1465   * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback.
1466   * @returns { SearchAttribute } returns the instance of the SearchAttribute.
1467   * @syscap SystemCapability.ArkUI.ArkUI.Full
1468   * @crossplatform
1469   * @atomicservice
1470   * @since 13
1471   */
1472  enableHapticFeedback(isEnabled: boolean): SearchAttribute;
1473}
1474
1475/**
1476 * Defines Search Component.
1477 *
1478 * @syscap SystemCapability.ArkUI.ArkUI.Full
1479 * @since 8
1480 */
1481/**
1482 * Defines Search Component.
1483 *
1484 * @syscap SystemCapability.ArkUI.ArkUI.Full
1485 * @crossplatform
1486 * @since 10
1487 */
1488/**
1489 * Defines Search Component.
1490 *
1491 * @syscap SystemCapability.ArkUI.ArkUI.Full
1492 * @crossplatform
1493 * @atomicservice
1494 * @since 11
1495 */
1496declare const Search: SearchInterface;
1497
1498/**
1499 * Defines Search Component instance.
1500 *
1501 * @syscap SystemCapability.ArkUI.ArkUI.Full
1502 * @since 8
1503 */
1504/**
1505 * Defines Search Component instance.
1506 *
1507 * @syscap SystemCapability.ArkUI.ArkUI.Full
1508 * @crossplatform
1509 * @since 10
1510 */
1511/**
1512 * Defines Search Component instance.
1513 *
1514 * @syscap SystemCapability.ArkUI.ArkUI.Full
1515 * @crossplatform
1516 * @atomicservice
1517 * @since 11
1518 */
1519declare const SearchInstance: SearchAttribute;
1520