• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 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 * Defining Component ClassDecorator * @since 7
18 */
19declare const Component: ClassDecorator;
20
21/**
22 * Defining Entry ClassDecorator.
23 * @since 7
24 */
25declare const Entry: ClassDecorator;
26
27/**
28 * Defining Observed ClassDecorator.
29 * @since 7
30 */
31declare const Observed: ClassDecorator;
32
33/**
34 * Defining Preview ClassDecorator.
35 * @since 7
36 */
37declare const Preview: ClassDecorator & ((value: PreviewParams) => ClassDecorator);
38
39/**
40 * Defining BuilderParam PropertyDecorator
41 * @since 7
42 */
43declare const BuilderParam: PropertyDecorator;
44
45/**
46 * Defining State PropertyDecorator.
47 * @since 7
48 */
49declare const State: PropertyDecorator;
50
51/**
52 * Defining Prop PropertyDecorator.
53 * @since 7
54 */
55declare const Prop: PropertyDecorator;
56
57/**
58 * Defining Link PropertyDecorator.
59 * @since 7
60 */
61declare const Link: PropertyDecorator;
62
63/**
64 * Defining ObjectLink PropertyDecorator.
65 * @since 7
66 */
67declare const ObjectLink: PropertyDecorator;
68
69/**
70 * Defining Provide PropertyDecorator.
71 * @since 7
72 */
73declare const Provide: PropertyDecorator & ((value: string) => PropertyDecorator);
74
75/**
76 * Defining Consume PropertyDecorator.
77 * @since 7
78 */
79declare const Consume: PropertyDecorator & ((value: string) => PropertyDecorator);
80
81/**
82 * Defining StorageProp PropertyDecorator.
83 * @since 7
84 */
85declare const StorageProp: (value: string) => PropertyDecorator;
86
87/**
88 * Defining StorageLink PropertyDecorator.
89 * @since 7
90 */
91declare const StorageLink: (value: string) => PropertyDecorator;
92
93/**
94 * Defining Watch PropertyDecorator.
95 * @since 7
96 */
97declare const Watch: (value: string) => PropertyDecorator;
98
99/**
100 * Defining Builder MethodDecorator
101 * @since 7
102 */
103declare const Builder: MethodDecorator;
104
105/**
106 * Defining Styles MethodDecorator
107 * @since 8
108 */
109declare const Styles: MethodDecorator;
110
111/**
112 * Defining Extend MethodDecorator
113 * @since 7
114 */
115declare const Extend: MethodDecorator & ((value: any) => MethodDecorator);
116
117/**
118 * Defining  CustomDialog ClassDecorator
119 * @since 7
120 */
121declare const CustomDialog: ClassDecorator;
122
123/**
124 * Defines the data type of the interface restriction.
125 * @since 7
126 */
127declare interface Configuration {
128  /**
129   * Set colorMode.
130   * @since 7
131   */
132  readonly colorMode: string;
133
134  /**
135   * Set fontScale.
136   * @since 7
137   */
138  readonly fontScale: number;
139}
140
141/**
142 * Defines the data type of the interface restriction.
143 * @since 8
144 */
145declare interface Rectangle {
146  /**
147   * x:Horizontal coordinate
148   * @since 8
149   */
150  x?: Length;
151
152  /**
153   * y:Vertical axis coordinate.
154   * @since 8
155   */
156  y?: Length;
157
158  /**
159   * Sets the width of the current touchRect.
160   * @since 8
161   */
162  width?: Length;
163
164  /**
165   * Sets the height of the current touchRect.
166   * @since 8
167   */
168  height?: Length;
169}
170
171/**
172 * Defining isSystemplugin Constants.
173 * @since 7
174 * @systemapi
175 */
176declare const isSystemplugin: (...args: string[]) => any;
177
178/**
179 * global $r function
180 * @since 7
181 */
182declare function $r(value: string, ...params: any[]): Resource;
183
184/**
185 * global $rawfile function
186 * @since 7
187 */
188declare function $rawfile(value: string): Resource;
189
190/**
191 * Defines the animate function params.
192 * @since 7
193 */
194declare interface AnimateParam {
195  /**
196   * Animation duration, in ms.
197   * @since 7
198   */
199  duration?: number;
200  /**
201   * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower
202   * animation playback. The value 0 means that there is no animation.
203   * @since 7
204   */
205  tempo?: number;
206  /**
207   * Animation curve.
208   * @since 7
209   */
210  curve?: Curve | string;
211  /**
212   * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
213   * @since 7
214   */
215  delay?: number;
216  /**
217   * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
218   * @since 7
219   */
220  iterations?: number;
221  /**
222   * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
223   * @since 7
224   */
225  playMode?: PlayMode;
226  /**
227   * Callback invoked when the animation playback is complete.
228   * @since 7
229   */
230  onFinish?: () => void;
231}
232
233/**
234 * Defines the motion path options.
235 * @since 7
236 */
237declare interface MotionPathOptions {
238  /**
239   * The path info.
240   * @since 7
241   */
242  path: string;
243  /**
244   * The origin point info.
245   * @since 7
246   */
247  from?: number;
248  /**
249   * The distance point info.
250   * @since 7
251   */
252  to?: number;
253  /**
254   * The rotate info.
255   * @since 7
256   */
257  rotatable?: boolean;
258}
259
260/**
261 * Defines the shard transition function params.
262 * @since 7
263 */
264declare interface sharedTransitionOptions {
265  /**
266   * Animation duration, in ms.
267   * @since 7
268   */
269  duration?: number;
270  /**
271   * Animation duration, in ms.
272   * @since 7
273   */
274  curve?: Curve | string;
275  /**
276   * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
277   * @since 7
278   */
279  delay?: number;
280  /**
281   * The motion path info.
282   * @since 7
283   */
284  motionPath?: MotionPathOptions;
285  /**
286   * Z index info.
287   * @since 7
288   */
289  zIndex?: number;
290  /**
291   * the animate type.
292   * @since 7
293   */
294  type?: SharedTransitionEffectType;
295}
296
297/**
298 * Defines the options of translate.
299 * @since 7
300 */
301declare interface TranslateOptions {
302  /**
303   * The param of x direction.
304   * @since 7
305   */
306  x?: number | string;
307  /**
308   * The param of y direction.
309   * @since 7
310   */
311  y?: number | string;
312  /**
313   * The param of z direction.
314   * @since 7
315   */
316  z?: number | string;
317}
318
319/**
320 * Defines the options of scale.
321 * @since 7
322 */
323declare interface ScaleOptions {
324  /**
325   * The param of x direction.
326   * @since 7
327   */
328  x?: number;
329  /**
330   * The param of y direction.
331   * @since 7
332   */
333  y?: number;
334  /**
335   * The param of z direction.
336   * @since 7
337   */
338  z?: number;
339  /**
340   * The param of center point of x.
341   * @since 7
342   */
343  centerX?: number | string;
344  /**
345   * The param of center point of y.
346   * @since 7
347   */
348  centerY?: number | string;
349}
350
351declare interface RotateOptions {
352  /**
353   * The param of x direction.
354   * @since 7
355   */
356  x?: number;
357  /**
358   * The param of y direction.
359   * @since 7
360   */
361  y?: number;
362  /**
363   * The param of z direction.
364   * @since 7
365   */
366  z?: number;
367  /**
368   * The param of center point of x.
369   * @since 7
370   */
371  centerX?: number | string;
372  /**
373   * The param of center point of y.
374   * @since 7
375   */
376  centerY?: number | string;
377  /**
378   * The param of angle.
379   * @since 7
380   */
381  angle: number | string;
382}
383
384/**
385 * Defines the param of transition.
386 * @since 7
387 */
388declare interface TransitionOptions {
389  /**
390   * Defines the param of type.
391   * @since 7
392   */
393  type?: TransitionType;
394  /**
395   * Defines the param of opacity.
396   * @since 7
397   */
398  opacity?: number;
399  /**
400   * Defines the param of translate.
401   * @since 7
402   */
403  translate?: TranslateOptions;
404  /**
405   * Defines the param of scale.
406   * @since 7
407   */
408  scale?: ScaleOptions;
409  /**
410   * Defines the param of rotate.
411   * @since 7
412   */
413  rotate?: RotateOptions;
414}
415
416/**
417 * Define Preview property
418 * @since 8
419 * @systemapi
420 */
421interface PreviewParams {
422  /**
423   * Define Preview title
424   * @since 8
425   * @systemapi
426   */
427  title?: string;
428  /**
429   * Define Preview width
430   * @since 8
431   * @systemapi
432   */
433  width?: number;
434  /**
435   * Define Preview height
436   * @since 8
437   * @systemapi
438   */
439  height?: number;
440  /**
441   * Define Preview locale
442   * @since 8
443   * @systemapi
444   */
445  locale?: string;
446  /**
447   * Define Preview colorMode
448   * @since 8
449   * @systemapi
450   */
451  colorMode?: string;
452  /**
453   * Define Preview deviceType
454   * @since 8
455   * @systemapi
456   */
457  deviceType?: string;
458  /**
459   * Define Preview dpi
460   * @since 8
461   * @systemapi
462   */
463  dpi?: number;
464  /**
465   * Define Preview orientation
466   * @since 8
467   * @systemapi
468   */
469  orientation?: string;
470  /**
471   * Define Preview roundScreen
472   * @since 8
473   * @systemapi
474   */
475  roundScreen?: boolean;
476}
477
478/**
479 * ItemDragInfo object description
480 * @since 8
481 */
482declare interface ItemDragInfo {
483  /**
484   * Obtains the X coordinate of the drag window, in vp.
485   * @since 8
486   */
487  x: number;
488
489  /**
490   * Obtains the Y coordinate of the drag window, in vp.
491   * @since 8
492   */
493  y: number;
494}
495
496/**
497 * DragItemInfo object description
498 * @since 8
499 */
500declare interface DragItemInfo {
501  /**
502   * Uses the pixelMap object for drawing.
503   * @since 8
504   */
505  pixelMap?: PixelMap;
506
507  /**
508   * Uses the custom builder for drawing, if pixelMap is set, this value is ignored.
509   * @since 8
510   */
511  builder?: CustomBuilder;
512
513  /**
514   * Sets the extra info for drag event.
515   * @since 8
516   */
517  extraInfo?: string;
518}
519
520/**
521 * Defining animation function.
522 * @since 7
523 */
524declare function animateTo(value: AnimateParam, event: () => void): void;
525
526/**
527 * Converts a value in vp units to a value in px.
528 * @since 7
529 */
530declare function vp2px(value: number): number;
531
532/**
533 * Converts a number in units of px to a number in units of vp.
534 * @since 7
535 */
536declare function px2vp(value: number): number;
537
538/**
539 * Converts a number in fp units to a number in px.
540 * @since 7
541 */
542declare function fp2px(value: number): number;
543
544/**
545 * Converts a number in units of px to a number in units of fp.
546 * @since 7
547 */
548declare function px2fp(value: number): number;
549
550/**
551 * Converts a number in units of lpx to a number in units of px.
552 * @since 7
553 */
554declare function lpx2px(value: number): number;
555
556/**
557 * Converts a number in units of px to a number in units of lpx.
558 * @since 7
559 */
560declare function px2lpx(value: number): number;
561
562/**
563 * Defines the event target.
564 * @since 8
565 */
566declare interface EventTarget {
567  /**
568   * Area of current target.
569   * @since 8
570   */
571  area: Area;
572}
573
574/**
575 * Defines the event source type.
576 * @since 8
577 */
578declare enum SourceType {
579  /**
580   * Unknown type.
581   * @since 8
582   */
583  Unknown,
584
585  /**
586   * The mouse type.
587   * @since 8
588   */
589  Mouse,
590
591  /**
592   * The touch screen type.
593   * @since 8
594   */
595  TouchScreen,
596}
597
598/**
599 * Defines the base event.
600 * @since 8
601 */
602declare interface BaseEvent {
603  /**
604   * Defines the current target which fires this event.
605   * @since 8
606   */
607  target: EventTarget;
608
609  /**
610   * Event timestamp.
611   * @since 8
612   */
613  timestamp: number;
614
615  /**
616   * the event source info.
617   * @since 8
618   */
619  source: SourceType;
620}
621
622/**
623 * The tap action triggers this method invocation.
624 * @since 7
625 */
626declare interface ClickEvent extends BaseEvent {
627  /**
628   * X coordinate of the click point relative to the left edge of the device screen.
629   * @since 7
630   */
631  screenX: number;
632
633  /**
634   * The Y coordinate of the touch point relative to the upper edge of the device screen.
635   * @since 7
636   */
637  screenY: number;
638
639  /**
640   * X coordinate of the click point relative to the left edge of the clicked element.
641   * @since 7
642   */
643  x: number;
644
645  /**
646   * Y coordinate of the click point relative to the upper edge of the clicked element.
647   * @since 7
648   */
649  y: number;
650}
651
652/**
653 * The mouse click action triggers this method invocation.
654 * @since 8
655 */
656declare interface MouseEvent extends BaseEvent {
657  /**
658   * Mouse button of the click event.
659   * @since 8
660   */
661  button: MouseButton;
662
663  /**
664   * Mouse action of the click event.
665   * @since 8
666   */
667  action: MouseAction;
668
669  /**
670   * X coordinate of the click point relative to the left edge of the device screen.
671   * @since 8
672   */
673  screenX: number;
674
675  /**
676   * The Y coordinate of the click point relative to the upper edge of the device screen.
677   * @since 8
678   */
679  screenY: number;
680
681  /**
682   * X coordinate of the click point relative to the left edge of the clicked element.
683   * @since 8
684   */
685  x: number;
686
687  /**
688   * Y coordinate of the click point relative to the upper edge of the clicked element.
689   * @since 8
690   */
691  y: number;
692
693  /**
694   * The blocking event pops up.
695   * @since 8
696   */
697  stopPropagation?: () => void;
698}
699
700/**
701 * Type of the touch event.
702 * @since 7
703 */
704declare interface TouchObject {
705  /**
706   * Type of the touch event.
707   * @since 7
708   */
709  type: TouchType;
710
711  /**
712   * Finger unique identifier.
713   * @since 7
714   */
715  id: number;
716
717  /**
718   * X coordinate of the touch point relative to the left edge of the device screen.
719   * @since 7
720   */
721  screenX: number;
722
723  /**
724   * The Y coordinate of the touch point relative to the upper edge of the device screen.
725   * @since 7
726   */
727  screenY: number;
728
729  /**
730   * X coordinate of the touch point relative to the left edge of the touched element.
731   * @since 7
732   */
733  x: number;
734
735  /**
736   * Y coordinate of the touch point relative to the upper edge of the touched element.
737   * @since 7
738   */
739  y: number;
740}
741
742/**
743 * Touch Action Function Parameters
744 * @since 7
745 */
746declare interface TouchEvent extends BaseEvent {
747  /**
748   * Type of the touch event.
749   * @since 7
750   */
751  type: TouchType;
752
753  /**
754   * All finger information.
755   * @since 7
756   */
757  touches: TouchObject[];
758
759  /**
760   * Indicates the current changed finger information.
761   * @since 7
762   */
763  changedTouches: TouchObject[];
764
765  /**
766   * The blocking event pops up.
767   * @since 7
768   */
769  stopPropagation?: () => void;
770}
771
772/**
773 * Defines the PixelMap type object for ui component.
774 * @since 7
775 */
776declare type PixelMap = PixelMapMock;
777
778/**
779 * pixelmap object with release function.
780 * @systemapi
781 * @since 7
782 */
783declare interface PixelMapMock {
784  /**
785   * release function.
786   * @systemapi
787   * @since 7
788   */
789  release(): void;
790}
791
792/**
793 * DragEvent object description
794 * @since 7
795 */
796declare interface DragEvent {
797  /**
798   * Obtains the X coordinate of the drag window, in vp.
799   * @since 7
800   */
801  getX(): number;
802
803  /**
804   * Obtains the Y coordinate of the drag window, in vp.
805   * @since 7
806   */
807  getY(): number;
808}
809
810/**
811 * KeyEvent object description:
812 * @since 7
813 */
814declare interface KeyEvent {
815  /**
816   * Type of a key.
817   * @since 7
818   */
819  type: KeyType;
820
821  /**
822   * Key code of a key
823   * @since 7
824   */
825  keyCode: number;
826
827  /**
828   * Key value of a key.
829   * @since 7
830   */
831  keyText: string;
832
833  /**
834   * Type of the input device that triggers the current key, such as the keyboard or handle.
835   * @since 7
836   */
837  keySource: KeySource;
838
839  /**
840   * Indicates the ID of the input device that triggers the current key.
841   * @since 7
842   */
843  deviceId: number;
844
845  /**
846   * Indicates the status of the key when the key is pressed.
847   * The value 1 indicates the pressed state, and the value 0 indicates the unpressed state.
848   * @since 7
849   */
850  metaKey: number;
851
852  /**
853   * Timestamp when the key was pressed.
854   * @since 7
855   */
856  timestamp: number;
857
858  /**
859   * Block event bubbling.
860   * @since 7
861   */
862  stopPropagation?: () => void;
863}
864
865/**
866 * Component State Styels.
867 * @since 8
868 */
869declare interface StateStyles {
870  /**
871   * Defines normal state styles.
872   * @since 8
873   */
874  normal?: any;
875
876  /**
877   * Defines pressed state styles.
878   * @since 8
879   */
880  pressed?: any;
881
882  /**
883   * Defines disabled state styles.
884   * @since 8
885   */
886  disabled?: any;
887
888  /**
889   * Defines focused state styles.
890   * @since 8
891   */
892  focused?: any;
893
894  /**
895   * Defines clicked state styles.
896   * @since 8
897   */
898  clicked?: any;
899}
900
901/**
902 * Defines the popup options.
903 * @since 7
904 */
905declare interface PopupOptions {
906  /**
907   * Information in the pop-up window.
908   * @since 7
909   */
910  message: string;
911
912  /**
913   * placement On Top
914   * @since 7
915   */
916  placementOnTop?: boolean;
917
918  /**
919   * The first button.
920   * @since 7
921   */
922  primaryButton?: {
923    /**
924     * Button text value
925     * @since 7
926     */
927    value: string;
928
929    /**
930     * action
931     * @since 7
932     */
933    action: () => void;
934  };
935
936  /**
937   * The second button.
938   * @since 7
939   */
940  secondaryButton?: {
941    /**
942     * Button text value
943     * @since 7
944     */
945    value: string;
946
947    /**
948     * action
949     * @since 7
950     */
951    action: () => void;
952  };
953
954  /**
955   * on State Change
956   * @since 7
957   */
958  onStateChange?: (event: { isVisible: boolean }) => void;
959}
960
961/**
962 * Defines the custom popup options.
963 * @since 8
964 */
965declare interface CustomPopupOptions {
966  /**
967   * builder of popup
968   * @since 8
969   */
970  builder: CustomBuilder;
971
972  /**
973   * placement of popup
974   * @since 8
975   */
976  placement?: Placement;
977
978  /**
979   * mask color of popup
980   * @since 8
981   */
982  maskColor?: Color | string | Resource | number;
983
984  /**
985   * background color of popup
986   * @since 8
987   */
988  popupColor?: Color | string | Resource | number;
989
990  /**
991   * whether show arrow
992   * @since 8
993   */
994  enableArrow?: boolean;
995
996  /**
997   * whether hide popup when click mask
998   * @since 8
999   */
1000  autoCancel?: boolean;
1001
1002  /**
1003   * on State Change
1004   * @since 8
1005   */
1006  onStateChange?: (event: { isVisible: boolean }) => void;
1007}
1008
1009/**
1010 * CommonMethod.
1011 * @since 7
1012 */
1013declare class CommonMethod<T> {
1014  /**
1015   * constructor.
1016   * @systemapi
1017   * @since 7
1018   * @ignore
1019   */
1020  constructor();
1021
1022  /**
1023   * Sets the width of the current component.
1024   * @since 7
1025   */
1026  width(value: Length): T;
1027
1028  /**
1029   * Sets the width of the current component.
1030   * @since 7
1031   */
1032  height(value: Length): T;
1033
1034  /**
1035   * Sets the response region of the current component.
1036   * @since 8
1037   */
1038  responseRegion(value: Array<Rectangle> | Rectangle): T;
1039
1040  /**
1041   * The size of the current component.
1042   * @since 7
1043   */
1044  size(value: SizeOptions): T;
1045
1046  /**
1047   * constraint Size:
1048   * minWidth:minimum Width,maxWidth:maximum Width,minHeight:minimum Height ,maxHeight:maximum Height,
1049   * @since 7
1050   */
1051  constraintSize(value: ConstraintSizeOptions): T;
1052
1053  /**
1054   * Sets the touchable of the current component
1055   * @since 7
1056   */
1057  touchable(value: boolean): T;
1058
1059  /**
1060   * layout Weight
1061   * @since 7
1062   */
1063  layoutWeight(value: number | string): T;
1064
1065  /**
1066   * Inner margin.
1067   * @since 7
1068   */
1069  padding(value: Padding | Length): T;
1070
1071  /**
1072   * Outer Margin.
1073   * @since 7
1074   */
1075  margin(value: Margin | Length): T;
1076
1077  /**
1078   * Background color
1079   * @since 7
1080   */
1081  backgroundColor(value: ResourceColor): T;
1082
1083  /**
1084   * Background image
1085   * src: Image address url
1086   * @since 7
1087   */
1088  backgroundImage(src: ResourceStr, repeat?: ImageRepeat): T;
1089
1090  /**
1091   * Background image size
1092   * @since 7
1093   */
1094  backgroundImageSize(value: SizeOptions | ImageSize): T;
1095
1096  /**
1097   * Background image position
1098   * x:Horizontal coordinate;y:Vertical axis coordinate.
1099   * @since 7
1100   */
1101  backgroundImagePosition(value: Position | Alignment): T;
1102
1103  /**
1104   * Opacity
1105   * @since 7
1106   */
1107  opacity(value: number | Resource): T;
1108
1109  /**
1110   * Opacity
1111   * width:Border width;color:Border color;radius:Border radius;
1112   * @since 7
1113   */
1114  border(value: BorderOptions): T;
1115
1116  /**
1117   * Border style
1118   * @since 7
1119   */
1120  borderStyle(value: BorderStyle): T;
1121
1122  /**
1123   * Border width
1124   * @since 7
1125   */
1126  borderWidth(value: Length): T;
1127
1128  /**
1129   * Border color
1130   * @since 7
1131   */
1132  borderColor(value: ResourceColor): T;
1133
1134  /**
1135   * Border radius
1136   * @since 7
1137   */
1138  borderRadius(value: Length): T;
1139
1140  /**
1141   * Trigger a click event when a click is clicked.
1142   * @since 7
1143   */
1144  onClick(event: (event?: ClickEvent) => void): T;
1145
1146  /**
1147   * Trigger a mouse hover event.
1148   * @since 8
1149   */
1150  onHover(event: (isHover?: boolean) => void): T;
1151
1152  /**
1153   * Set hover effect.
1154   * @since 8
1155   */
1156  hoverEffect(value: HoverEffect): T;
1157
1158  /**
1159   * Trigger a mouse event.
1160   * @since 8
1161   */
1162  onMouse(event: (event?: MouseEvent) => void): T;
1163
1164  /**
1165   * Trigger a touch event when touched.
1166   * @since 7
1167   */
1168  onTouch(event: (event?: TouchEvent) => void): T;
1169
1170  /**
1171   * Keyboard input
1172   * @since 7
1173   */
1174  onKeyEvent(event: (event?: KeyEvent) => void): T;
1175
1176  /**
1177   * Set focusable.
1178   * @since 8
1179   */
1180  focusable(value: boolean): T;
1181
1182  /**
1183   * Trigger a event when got focus.
1184   * @since 8
1185   */
1186  onFocus(event: () => void): T;
1187
1188  /**
1189   * Trigger a event when lose focus.
1190   * @since 8
1191   */
1192  onBlur(event: () => void): T;
1193
1194  /**
1195   * animation
1196   * @since 7
1197   */
1198  animation(value: AnimateParam): T;
1199
1200  /**
1201   * Transition parameter
1202   * @since 7
1203   */
1204  transition(value: TransitionOptions): T;
1205
1206  /**
1207   * Bind gesture recognition.
1208   * gesture:Bound Gesture Type,mask:GestureMask;
1209   * @since 7
1210   */
1211  gesture(gesture: GestureType, mask?: GestureMask): T;
1212
1213  /**
1214   * Binding Preferential Recognition Gestures
1215   * gesture:Bound Gesture Type,mask:GestureMask;
1216   * @since 7
1217   */
1218  priorityGesture(gesture: GestureType, mask?: GestureMask): T;
1219
1220  /**
1221   * Binding gestures that can be triggered simultaneously with internal component gestures
1222   * gesture:Bound Gesture Type,mask:GestureMask;
1223   * @since 7
1224   */
1225  parallelGesture(gesture: GestureType, mask?: GestureMask): T;
1226
1227  /**
1228   * Adds the content blurring effect for the current component. The input parameter is the blurring radius.
1229   * The larger the blurring radius, the more blurring the content.
1230   * If the value is 0, the content blurring effect is not blurring.
1231   * @since 7
1232   */
1233  blur(value: number): T;
1234
1235  /**
1236   * Adds a highlight effect to the current component.
1237   * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion.
1238   * The component is displayed as all white (percentage).
1239   * @since 7
1240   */
1241  brightness(value: number): T;
1242
1243  /**
1244   * Adds a contrast effect to the current component. The input parameter is the contrast value.
1245   * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%)
1246   * @since 7
1247   */
1248  contrast(value: number): T;
1249
1250  /**
1251   * Adds a grayscale effect to the current component.
1252   * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change.
1253   * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage)
1254   * @since 7
1255   */
1256  grayscale(value: number): T;
1257
1258  /**
1259   * Adds a color overlay effect for the current component. The input parameter is the superimposed color.
1260   * @since 7
1261   */
1262  colorBlend(value: Color | string | Resource): T;
1263
1264  /**
1265   * Adds a saturation effect to the current component.
1266   * The saturation is the ratio of the color-containing component to the achromatic component (gray).
1267   * The larger the color-containing component, the greater the saturation.
1268   * The larger the achromatic component, the smaller the saturation. (Percentage)
1269   * @since 7
1270   */
1271  saturate(value: number): T;
1272
1273  /**
1274   * Converts the image to sepia. Value defines the scale of the conversion.
1275   * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage)
1276   * @since 7
1277   */
1278  sepia(value: number): T;
1279
1280  /**
1281   * Inverts the input image. Value defines the scale of the conversion. 100% of the value is a complete reversal.
1282   * A value of 0% does not change the image. (Percentage)
1283   * @since 7
1284   */
1285  invert(value: number): T;
1286
1287  /**
1288   * Adds the hue rotation effect to the current component.
1289   * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value.
1290   * If the value exceeds 360deg, the image is circled again.
1291   * @since 7
1292   */
1293  hueRotate(value: number | string): T;
1294
1295  /**
1296   * Adds the background blur effect for the current component. The input parameter is the blur radius.
1297   * The larger the blur radius, the more blurred the background. If the value is 0, the background blur is not blurred.
1298   * @since 7
1299   */
1300  backdropBlur(value: number): T;
1301
1302  /**
1303   * Sets the translation effect during page transition.
1304   * The value is the start point of entry and end point of exit.
1305   * When this parameter is set together with slide, slide takes effect by default.
1306   * @since 7
1307   */
1308  translate(value: TranslateOptions): T;
1309
1310  /**
1311   * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit.
1312   * @since 7
1313   */
1314  scale(value: ScaleOptions): T;
1315
1316  /**
1317   * Default number of occupied columns, indicating the number of occupied grid columns when the number of columns (span) of the corresponding size is not set in the useSizeType attribute.
1318   * @since 7
1319   */
1320  gridSpan(value: number): T;
1321
1322  /**
1323   * The default offset column number indicates the number of offset columns of the current component in the start direction of the parent component when the useSizeType attribute does not set the offset of the corresponding dimension. That is,
1324   * the current component is located in the nth column.
1325   * @since 7
1326   */
1327  gridOffset(value: number): T;
1328
1329  /**
1330   * Sets the rotation effect during assembly transition.
1331   * The values are the start point during insertion and the end point during deletion.
1332   * @since 7
1333   */
1334  rotate(value: RotateOptions): T;
1335
1336  /**
1337   * Sets the transformation matrix for the current component.
1338   * @since 7
1339   */
1340  transform(value: object): T;
1341
1342  /**
1343   * This callback is triggered when a component mounts a display.
1344   * @since 7
1345   */
1346  onAppear(event: () => void): T;
1347
1348  /**
1349   * This callback is triggered when component uninstallation disappears.
1350   * @since 7
1351   */
1352  onDisAppear(event: () => void): T;
1353
1354  /**
1355   * This callback is triggered when the size or position of this component change finished.
1356   * @param event event callback.
1357   * @since 8
1358   */
1359  onAreaChange(event: (oldValue: Area, newValue: Area) => void): T;
1360
1361  /**
1362   * Controls the display or hide of the current component.
1363   * @since 7
1364   */
1365  visibility(value: Visibility): T;
1366
1367  /**
1368   * The percentage of the remaining space of the Flex container allocated to the component on which this property resides.
1369   * @since 7
1370   */
1371  flexGrow(value: number): T;
1372
1373  /**
1374   * The proportion of the Flex container compression size assigned to the component on which this attribute resides.
1375   * @since 7
1376   */
1377  flexShrink(value: number): T;
1378
1379  /**
1380   * The base dimension of the assembly on which this attribute is located in the direction of the principal axis in the Flex container.
1381   * @since 7
1382   */
1383  flexBasis(value: number | string): T;
1384
1385  /**
1386   * Overrides the default configuration of alignItems in the Flex Layout container.
1387   * @since 7
1388   */
1389  alignSelf(value: ItemAlign): T;
1390
1391  /**
1392   * Sets the current component and displays the priority in the layout container. This parameter is valid only in Row, Column, and Flex single-row layouts.
1393   * @since 7
1394   */
1395  displayPriority(value: number): T;
1396
1397  /**
1398   * The sibling components in the same container are hierarchically displayed. A larger value of z indicates a higher display level.
1399   * @since 7
1400   */
1401  zIndex(value: number): T;
1402
1403  /**
1404   * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description.
1405   * @since 7
1406   */
1407  sharedTransition(id: string, options?: sharedTransitionOptions): T;
1408
1409  /**
1410   * Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|).
1411   * @since 7
1412   */
1413  direction(value: Direction): T;
1414
1415  /**
1416   * align
1417   * @since 7
1418   */
1419  align(value: Alignment): T;
1420
1421  /**
1422   * position
1423   * @since 7
1424   */
1425  position(value: Position): T;
1426
1427  /**
1428   * Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element.
1429   * @since 7
1430   */
1431  markAnchor(value: Position): T;
1432
1433  /**
1434   * Coordinate offset relative to the layout completion position.
1435   * Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing.
1436   * @since 7
1437   */
1438  offset(value: Position): T;
1439
1440  /**
1441   * If the value is true, the component is available and can respond to operations such as clicking.
1442   *  If it is set to false, click operations are not responded.
1443   * @since 7
1444   */
1445  enabled(value: boolean): T;
1446
1447  /**
1448   * Sets the number of occupied columns and offset columns for a specific device width type.
1449   * @since 7
1450   */
1451  useSizeType(value: {
1452    xs?: number | { span: number; offset: number };
1453    sm?: number | { span: number; offset: number };
1454    md?: number | { span: number; offset: number };
1455    lg?: number | { span: number; offset: number };
1456  }): T;
1457
1458  /**
1459   * Specifies the aspect ratio of the current component.
1460   * @since 7
1461   */
1462  aspectRatio(value: number): T;
1463
1464  /**
1465   * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered.
1466   * (To be triggered, press and hold for 170 milliseconds (ms))
1467   * @since 8
1468   */
1469  onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): T;
1470
1471  /**
1472   * After binding, a callback is triggered when the component is dragged to the range of the component.
1473   * @since 8
1474   */
1475  onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T;
1476
1477  /**
1478   * After binding, a callback is triggered when the drag moves within the range of a placeable component.
1479   * @since 8
1480   */
1481  onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T;
1482
1483  /**
1484   * After binding, a callback is triggered when the component is dragged out of the component range.
1485   * @since 8
1486   */
1487  onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T;
1488
1489  /**
1490   * The component bound to this event can be used as the drag release target.
1491   * This callback is triggered when the drag behavior is stopped within the scope of the component.
1492   * @since 8
1493   */
1494  onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;
1495
1496  /**
1497   * Add mask text to the current component. The layout is the same as that of the current component.
1498   * @since 7
1499   */
1500  overlay(value: string, options?: { align?: Alignment; offset?: { x?: number; y?: number } }): T;
1501
1502  /**
1503   * Linear Gradient
1504   * angle: Angle of Linear Gradient; direction:Direction of Linear Gradient;  colors:Color description for gradients,repeating:repeating.
1505   * @since 7
1506   */
1507  linearGradient(value: {
1508    angle?: number | string;
1509    direction?: GradientDirection;
1510    colors: Array<any>;
1511    repeating?: boolean;
1512  }): T;
1513
1514  /**
1515   * Angle Gradient
1516   * center:is the center point of the angle gradient
1517   * start:Start point of angle gradient
1518   * end:End point of angle gradient
1519   * number:number
1520   * rotating:rotating
1521   * colors:Color description for gradients
1522   * repeating:repeating
1523   * @since 7
1524   */
1525  sweepGradient(value: {
1526    center: Array<any>;
1527    start?: number | string;
1528    end?: number | string;
1529    rotation?: number | string;
1530    colors: Array<any>;
1531    repeating?: boolean;
1532  }): T;
1533
1534  /**
1535   * Radial Gradient
1536   * center:Center point of radial gradient
1537   * radius:Radius of Radial Gradient
1538   * colors:Color description for gradients
1539   * repeating: Refill
1540   * @since 7
1541   */
1542  radialGradient(value: { center: Array<any>; radius: number | string; colors: Array<any>; repeating?: boolean }): T;
1543
1544  /**
1545   * Set the motion path of the component
1546   * path:Motion path for displacement animation, using the svg path string.
1547   * from:Start point of the motion path. The default value is 0.0.
1548   * to:End point of the motion path. The default value is 1.0.
1549   * rotatble:Whether to follow the path for rotation.
1550   * @since 7
1551   */
1552  motionPath(value: MotionPathOptions): T;
1553
1554  /**
1555   * Add a shadow effect to the current component
1556   * @since 7
1557   */
1558  shadow(value: {
1559    radius: number | Resource;
1560    color?: Color | string | Resource;
1561    offsetX?: number | Resource;
1562    offsetY?: number | Resource;
1563  }): T;
1564
1565  /**
1566   * When the parameter is of the Shape type, the current component is cropped according to the specified shape.
1567   * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour.
1568   * @since 7
1569   */
1570  clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T;
1571
1572  /**
1573   * Applies a mask of the specified shape to the current assembly.
1574   * @since 7
1575   */
1576  mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T;
1577
1578  /**
1579   * Key. User can set an key to the component to identify it.
1580   * @since 8
1581   * @systemapi
1582   * @test
1583   */
1584  key(value: string): T;
1585
1586  /**
1587   * Id. User can set an id to the component to identify it.
1588   * @since 8
1589   */
1590  id(value: string): T;
1591
1592  /**
1593   * geometryTransition
1594   * @since 7
1595   */
1596  geometryTransition(id: string): T;
1597
1598  /**
1599   * Popup control
1600   * @since 7
1601   */
1602  bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T;
1603
1604  /**
1605   * Menu control
1606   * @since 7
1607   */
1608  bindMenu(content: { value: string; action: () => void }[] | CustomBuilder): T;
1609
1610  /**
1611   * ContextMenu control
1612   * @since 8
1613   */
1614  bindContextMenu(content: CustomBuilder, responseType: ResponseType): T;
1615
1616  /**
1617   * Sets styles for component state.
1618   * @since 8
1619   */
1620  stateStyles(value: StateStyles): T;
1621
1622  /**
1623   * id for distrubte identification.
1624   * @since 8
1625   */
1626  restoreId(value: number): T;
1627}
1628
1629/**
1630 * CommonAttribute for ide.
1631 * @since 7
1632 */
1633declare class CommonAttribute extends CommonMethod<CommonAttribute> {}
1634
1635/**
1636 * CommonInterface for ide.
1637 * @since 7
1638 */
1639interface CommonInterface {
1640  (): CommonAttribute;
1641}
1642
1643/**
1644 * CommonInstance for ide.
1645 * @since 7
1646 */
1647declare const CommonInstance: CommonAttribute;
1648
1649/**
1650 * Common for ide.
1651 * @since 7
1652 */
1653declare const Common: CommonInterface;
1654
1655/**
1656 * Defines the CustomBuilder Type.
1657 * @since 7
1658 */
1659declare type CustomBuilder = (() => any) | void;
1660
1661/**
1662 * CommonShapeMethod
1663 * @since 7
1664 */
1665declare class CommonShapeMethod<T> extends CommonMethod<T> {
1666  /**
1667   * constructor.
1668   * @since 7
1669   * @syetemapi
1670   */
1671  constructor();
1672
1673  /**
1674   * border Color
1675   * @since 7
1676   */
1677  stroke(value: ResourceColor): T;
1678
1679  /**
1680   * Fill color.
1681   * @since 7
1682   */
1683  fill(value: ResourceColor): T;
1684
1685  /**
1686   * Offset from the start point of the border drawing.
1687   * @since 7
1688   */
1689  strokeDashOffset(value: number | string): T;
1690
1691  /**
1692   * Path endpoint drawing style.
1693   * @since 7
1694   */
1695  strokeLineCap(value: LineCapStyle): T;
1696
1697  /**
1698   * Border corner drawing style.
1699   * @since 7
1700   */
1701  strokeLineJoin(value: LineJoinStyle): T;
1702
1703  /**
1704   * Limits for drawing acute angles as bevels
1705   * @since 7
1706   */
1707  strokeMiterLimit(value: number | string): T;
1708
1709  /**
1710   * Sets the opacity of the border.
1711   * @since 7
1712   */
1713  strokeOpacity(value: number | string | Resource): T;
1714
1715  /**
1716   * fill Opacity
1717   * @since 7
1718   */
1719  fillOpacity(value: number | string | Resource): T;
1720
1721  /**
1722   * Sets the width of the dividing line.
1723   * @since 7
1724   */
1725  strokeWidth(value: Length): T;
1726
1727  /**
1728   * Indicates whether to enable anti-aliasing
1729   * @since 7
1730   */
1731  antiAlias(value: boolean): T;
1732
1733  /**
1734   * Sets the gap for the border.
1735   * @since 7
1736   */
1737  strokeDashArray(value: Array<any>): T;
1738}
1739
1740/**
1741 * Custom Component
1742 * @since 7
1743 */
1744declare class CustomComponent {
1745  /**
1746   * Customize the pop-up content constructor.
1747   * @since 7
1748   */
1749  build(): void;
1750
1751  /**
1752   * aboutToAppear Method
1753   * @since 7
1754   */
1755  aboutToAppear?(): void;
1756
1757  /**
1758   * aboutToDisappear Method
1759   * @since 7
1760   */
1761  aboutToDisappear?(): void;
1762
1763  /**
1764   * onPageShow Method
1765   * @since 7
1766   */
1767  onPageShow?(): void;
1768
1769  /**
1770   * onPageHide Method
1771   * @since 7
1772   */
1773  onPageHide?(): void;
1774
1775  /**
1776   * onBackPress Method
1777   * @since 7
1778   */
1779  onBackPress?(): void;
1780}
1781
1782/**
1783 * View
1784 * @ignore ide should ignore this class
1785 * @systemapi
1786 * @since 7
1787 */
1788declare class View {
1789  /**
1790   * Just use for generate tsbundle
1791   * @ignore ide should ignore this arrtibute
1792   * @systemapi
1793   * @since 7
1794   */
1795  create(value: any): any;
1796}
1797
1798declare module "SpecialEvent" {
1799  module "SpecialEvent" {
1800    // @ts-ignore
1801    export { TouchObject, KeyEvent, MouseEvent };
1802  }
1803}
1804