• 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/*** if arkts 1.2 */
22import { IndicatorComponentController } from './indicatorcomponent';
23import { CommonMethod, Callback, ICurve, Optional } from './common';
24import { EdgeEffect, Curve, PageFlipMode } from './enums';
25import { Length, LengthMetrics, VoidCallback, ResourceColor, VP, Font } from './units';
26/*** endif */
27
28/**
29 * Provides methods for switching components.
30 *
31 * @syscap SystemCapability.ArkUI.ArkUI.Full
32 * @since 7
33 */
34/**
35 * Provides methods for switching components.
36 *
37 * @syscap SystemCapability.ArkUI.ArkUI.Full
38 * @crossplatform
39 * @form
40 * @since 10
41 */
42/**
43 * Provides methods for switching components.
44 *
45 * @syscap SystemCapability.ArkUI.ArkUI.Full
46 * @crossplatform
47 * @form
48 * @atomicservice
49 * @since arkts {'1.1':'11','1.2':'20'}
50 * @arkts 1.1&1.2
51 */
52declare class SwiperController {
53  /**
54   * constructor.
55   *
56   * @syscap SystemCapability.ArkUI.ArkUI.Full
57   * @since 7
58   */
59  /**
60   * constructor.
61   *
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @form
65   * @since 10
66   */
67  /**
68   * constructor.
69   *
70   * @syscap SystemCapability.ArkUI.ArkUI.Full
71   * @crossplatform
72   * @form
73   * @atomicservice
74   * @since arkts {'1.1':'11','1.2':'20'}
75   * @arkts 1.1&1.2
76   */
77  constructor();
78
79  /**
80   * Called when the next child component is displayed.
81   *
82   * @syscap SystemCapability.ArkUI.ArkUI.Full
83   * @since 7
84   */
85  /**
86   * Called when the next child component is displayed.
87   *
88   * @syscap SystemCapability.ArkUI.ArkUI.Full
89   * @crossplatform
90   * @form
91   * @since 10
92   */
93  /**
94   * Called when the next child component is displayed.
95   *
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @crossplatform
98   * @form
99   * @atomicservice
100   * @since 11
101   */
102  showNext();
103
104  /**
105   * Called when the next child component is displayed.
106   *
107   * @syscap SystemCapability.ArkUI.ArkUI.Full
108   * @crossplatform
109   * @form
110   * @atomicservice
111   * @since 20
112   * @arkts 1.2
113   */
114  showNext(): void;
115
116  /**
117   * Called when the previous subcomponent is displayed.
118   *
119   * @syscap SystemCapability.ArkUI.ArkUI.Full
120   * @since 7
121   */
122  /**
123   * Called when the previous subcomponent is displayed.
124   *
125   * @syscap SystemCapability.ArkUI.ArkUI.Full
126   * @crossplatform
127   * @form
128   * @since 10
129   */
130  /**
131   * Called when the previous subcomponent is displayed.
132   *
133   * @syscap SystemCapability.ArkUI.ArkUI.Full
134   * @crossplatform
135   * @form
136   * @atomicservice
137   * @since 11
138   */
139  showPrevious();
140
141  /**
142   * Called when the previous subcomponent is displayed.
143   *
144   * @syscap SystemCapability.ArkUI.ArkUI.Full
145   * @crossplatform
146   * @form
147   * @atomicservice
148   * @since 20
149   * @arkts 1.2
150   */
151  showPrevious(): void;
152
153  /**
154   * Controlling Swiper to change to the specified subcomponent.
155   *
156   * @param { number } index - the index of item to be redirected.
157   * @param { boolean } useAnimation - If true, swipe to index item with animation. If false, swipe to index item without animation.
158   *      The default value is false.
159   * @syscap SystemCapability.ArkUI.ArkUI.Full
160   * @crossplatform
161   * @form
162   * @atomicservice
163   * @since 12
164   */
165  changeIndex(index: number, useAnimation?: boolean);
166
167  /**
168   * Controlling Swiper to change to the specified subcomponent.
169   *
170   * @param { number } index - the index of item to be redirected.
171   * @param { SwiperAnimationMode | boolean } [animationMode] - animation mode for changeIndex,
172   * true is equivalent to SwiperAnimationMode.DEFAULT_ANIMATION, false is equivalent to SwiperAnimationMode.NO_ANIMATION
173   * @syscap SystemCapability.ArkUI.ArkUI.Full
174   * @crossplatform
175   * @form
176   * @atomicservice
177   * @since 15
178   */
179  changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean);
180
181  /**
182   * Controlling Swiper to change to the specified subcomponent.
183   *
184   * @param { number } index - the index of item to be redirected.
185   * @param { SwiperAnimationMode | boolean } [animationMode] - animation mode for changeIndex,
186   * true is equivalent to SwiperAnimationMode.DEFAULT_ANIMATION, false is equivalent to SwiperAnimationMode.NO_ANIMATION
187   * @syscap SystemCapability.ArkUI.ArkUI.Full
188   * @crossplatform
189   * @form
190   * @atomicservice
191   * @since 20
192   * @arkts 1.2
193   */
194  changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean): void;
195
196  /**
197   * Called when need to stop the swiper animation.
198   *
199   * @param { function } callback
200   * @syscap SystemCapability.ArkUI.ArkUI.Full
201   * @since 7
202   */
203  /**
204   * Called when need to stop the swiper animation.
205   *
206   * @param { function } callback
207   * @syscap SystemCapability.ArkUI.ArkUI.Full
208   * @crossplatform
209   * @form
210   * @since 10
211   */
212  /**
213   * Called when need to stop the swiper animation.
214   *
215   * @param { function } callback
216   * @syscap SystemCapability.ArkUI.ArkUI.Full
217   * @crossplatform
218   * @form
219   * @atomicservice
220   * @since 11
221   */
222  /**
223   * Called when need to stop the swiper animation.
224   * Anonymous Object Rectification
225   *
226   * @param { ?VoidCallback } callback
227   * @syscap SystemCapability.ArkUI.ArkUI.Full
228   * @crossplatform
229   * @form
230   * @atomicservice
231   * @since 18
232   */
233  finishAnimation(callback?: VoidCallback);
234
235  /**
236   * Called when need to stop the swiper animation.
237   *
238   * @param { ?VoidCallback } callback
239   * @syscap SystemCapability.ArkUI.ArkUI.Full
240   * @crossplatform
241   * @form
242   * @atomicservice
243   * @since 20
244   * @arkts 1.2
245   */
246  finishAnimation(callback?: VoidCallback): void;
247
248  /**
249   * Called when need to preload specified child.
250   *
251   * @param { Optional<Array<number>> } indices - Indices of swiper child to be preloaded.
252   * @returns { Promise<void> } The promise returned by the function.
253   * @throws { BusinessError } 401 - Parameter invalid. Possible causes:
254   * <br> 1. The parameter type is not Array<number>.
255   * <br> 2. The parameter is an empty array.
256   * <br> 3. The parameter contains an invalid index.
257   * @throws { BusinessError } 100004 - Controller not bound to component.
258   * @syscap SystemCapability.ArkUI.ArkUI.Full
259   * @crossplatform
260   * @form
261   * @atomicservice
262   * @since arkts {'1.1':'18','1.2':'20'}
263   * @arkts 1.1&1.2
264   */
265  preloadItems(indices: Optional<Array<number>>): Promise<void>;
266}
267
268/**
269 * Defines the indicator class.
270 *
271 * @syscap SystemCapability.ArkUI.ArkUI.Full
272 * @crossplatform
273 * @form
274 * @since 10
275 */
276/**
277 * Defines the indicator class.
278 *
279 * @syscap SystemCapability.ArkUI.ArkUI.Full
280 * @crossplatform
281 * @form
282 * @atomicservice
283 * @since arkts {'1.1':'11','1.2':'20'}
284 * @arkts 1.1&1.2
285 */
286declare class Indicator<T> {
287  /**
288   * Set the indicator to the left.
289   *
290   * @param { Length } value - the indicator to the left.
291   * @returns { T }
292   * @syscap SystemCapability.ArkUI.ArkUI.Full
293   * @crossplatform
294   * @form
295   * @since 10
296   */
297  /**
298   * Sets the position of the navigation indicator relative to the left edge of the Swiper component.
299   *
300   * @param { Length } value - the indicator to the left.
301   * @returns { T }
302   * @syscap SystemCapability.ArkUI.ArkUI.Full
303   * @crossplatform
304   * @form
305   * @atomicservice
306   * @since arkts {'1.1':'11','1.2':'20'}
307   * @arkts 1.1&1.2
308   */
309  left(value: Length): T;
310
311  /**
312   * Set the indicator to the top.
313   *
314   * @param { Length } value - the indicator to the top.
315   * @returns { T }
316   * @syscap SystemCapability.ArkUI.ArkUI.Full
317   * @crossplatform
318   * @form
319   * @since 10
320   */
321  /**
322   * Sets the position of the navigation indicator relative to the top edge of the Swiper component.
323   *
324   * @param { Length } value - the indicator to the top.
325   * @returns { T }
326   * @syscap SystemCapability.ArkUI.ArkUI.Full
327   * @crossplatform
328   * @form
329   * @atomicservice
330   * @since arkts {'1.1':'11','1.2':'20'}
331   * @arkts 1.1&1.2
332   */
333  top(value: Length): T;
334
335  /**
336   * Set the indicator to the right.
337   *
338   * @param { Length } value - the indicator to the right.
339   * @returns { T }
340   * @syscap SystemCapability.ArkUI.ArkUI.Full
341   * @crossplatform
342   * @form
343   * @since 10
344   */
345  /**
346   * Sets the position of the navigation indicator relative to the right edge of the Swiper component.
347   *
348   * @param { Length } value - Position of the navigation indicator relative to the right edge of
349   * the Swiper component.
350   * @returns { T }
351   * @syscap SystemCapability.ArkUI.ArkUI.Full
352   * @crossplatform
353   * @form
354   * @atomicservice
355   * @since arkts {'1.1':'11','1.2':'20'}
356   * @arkts 1.1&1.2
357   */
358  right(value: Length): T;
359
360  /**
361   * Set the indicator to the bottom.
362   *
363   * @param { Length } value - the indicator to the bottom.
364   * @returns { T }
365   * @syscap SystemCapability.ArkUI.ArkUI.Full
366   * @crossplatform
367   * @form
368   * @since 10
369   */
370  /**
371   * Sets the position of the navigation indicator relative to the bottom edge of the Swiper component.
372   *
373   * @param { Length } value - Position of the navigation indicator relative to the bottom edge of
374   * the Swiper component.
375   * @returns { T }
376   * @syscap SystemCapability.ArkUI.ArkUI.Full
377   * @crossplatform
378   * @form
379   * @atomicservice
380   * @since arkts {'1.1':'11','1.2':'20'}
381   * @arkts 1.1&1.2
382   */
383  bottom(value: Length): T;
384
385  /**
386   * Sets the position of the navigation indicator relative to the bottom edge of the Swiper component.
387   * You can also choose to ignore the size of the navigation indicator using the ignoreSize property.
388   *
389   * @param { LengthMetrics | Length } bottom - the offset of indicator to the bottom.
390   * @param { boolean } ignoreSize - ignore the size of the indicator.
391   * @returns { T }
392   * @syscap SystemCapability.ArkUI.ArkUI.Full
393   * @crossplatform
394   * @form
395   * @atomicservice
396   * @since 19
397   */
398  bottom(bottom: LengthMetrics | Length, ignoreSize: boolean): T;
399
400  /**
401   * Sets the distance between the navigation indicator and the right edge (in right-to-left scripts)
402   * or the left edge (in left-to-right scripts) of the Swiper component.
403   *
404   * @param { LengthMetrics } value - the indicator to the right in LTR, indicator to the left in RTL
405   * @returns { T }
406   * @syscap SystemCapability.ArkUI.ArkUI.Full
407   * @crossplatform
408   * @form
409   * @atomicservice
410   * @since arkts {'1.1':'12','1.2':'20'}
411   * @arkts 1.1&1.2
412   */
413  start(value: LengthMetrics): T;
414
415  /**
416   * Sets the distance between the navigation indicator and the left edge (in right-to-left scripts)
417   * or the right edge (in left-to-right scripts) of the Swiper component.
418   *
419   * @param { LengthMetrics } value - the indicator to the left in RTL, Set the indicator to the right in LTR
420   * @returns { T }
421   * @syscap SystemCapability.ArkUI.ArkUI.Full
422   * @crossplatform
423   * @form
424   * @atomicservice
425   * @since arkts {'1.1':'12','1.2':'20'}
426   * @arkts 1.1&1.2
427   */
428  end(value: LengthMetrics): T;
429
430  /**
431   * DotIndicator class object.
432   *
433   * @returns { DotIndicator }
434   * @static
435   * @syscap SystemCapability.ArkUI.ArkUI.Full
436   * @crossplatform
437   * @form
438   * @since 10
439   */
440  /**
441   * DotIndicator class object.
442   *
443   * @returns { DotIndicator }
444   * @static
445   * @syscap SystemCapability.ArkUI.ArkUI.Full
446   * @crossplatform
447   * @form
448   * @atomicservice
449   * @since arkts {'1.1':'11','1.2':'20'}
450   * @arkts 1.1&1.2
451   */
452  static dot(): DotIndicator;
453
454  /**
455   * DigitIndicator class object.
456   *
457   * @returns { DigitIndicator }
458   * @static
459   * @syscap SystemCapability.ArkUI.ArkUI.Full
460   * @crossplatform
461   * @form
462   * @since 10
463   */
464  /**
465   * DigitIndicator class object.
466   *
467   * @returns { DigitIndicator }
468   * @static
469   * @syscap SystemCapability.ArkUI.ArkUI.Full
470   * @crossplatform
471   * @form
472   * @atomicservice
473   * @since arkts {'1.1':'11','1.2':'20'}
474   * @arkts 1.1&1.2
475   */
476  static digit(): DigitIndicator;
477}
478
479/**
480 * Define DotIndicator, the indicator type is dot.
481 *
482 * @extends Indicator<DotIndicator>
483 * @syscap SystemCapability.ArkUI.ArkUI.Full
484 * @crossplatform
485 * @form
486 * @since 10
487 */
488/**
489 * Define DotIndicator, the indicator type is dot.
490 *
491 * @extends Indicator<DotIndicator>
492 * @syscap SystemCapability.ArkUI.ArkUI.Full
493 * @crossplatform
494 * @form
495 * @atomicservice
496 * @since arkts {'1.1':'11','1.2':'20'}
497 * @arkts 1.1&1.2
498 */
499declare class DotIndicator extends Indicator<DotIndicator> {
500  /**
501   * Constructor.
502   *
503   * @syscap SystemCapability.ArkUI.ArkUI.Full
504   * @crossplatform
505   * @form
506   * @since 10
507   */
508  /**
509   * Constructor.
510   *
511   * @syscap SystemCapability.ArkUI.ArkUI.Full
512   * @crossplatform
513   * @form
514   * @atomicservice
515   * @since arkts {'1.1':'11','1.2':'20'}
516   * @arkts 1.1&1.2
517   */
518  constructor();
519
520  /**
521   * Set the indicator item width.
522   *
523   * @param { Length } value - the indicator item width.
524   * @returns { DotIndicator }
525   * @syscap SystemCapability.ArkUI.ArkUI.Full
526   * @crossplatform
527   * @form
528   * @since 10
529   */
530  /**
531   * Sets the width of the dot-style navigation indicator.
532   *
533   * @param { Length } value - Width of the dot-style navigation indicator. Default value is 6vp.
534   * This parameter cannot be set in percentage.
535   * @returns { DotIndicator }
536   * @syscap SystemCapability.ArkUI.ArkUI.Full
537   * @crossplatform
538   * @form
539   * @atomicservice
540   * @since arkts {'1.1':'11','1.2':'20'}
541   * @arkts 1.1&1.2
542   */
543  itemWidth(value: Length): DotIndicator;
544
545  /**
546   * Set the indicator item height.
547   *
548   * @param { Length } value - the indicator item height.
549   * @returns { DotIndicator }
550   * @syscap SystemCapability.ArkUI.ArkUI.Full
551   * @crossplatform
552   * @form
553   * @since 10
554   */
555  /**
556   * Sets the height of the dot-style navigation indicator.
557   *
558   * @param { Length } value - Height of the dot-style navigation indicator. Default value is 6vp.
559   * This parameter cannot be set in percentage.
560   * @returns { DotIndicator }
561   * @syscap SystemCapability.ArkUI.ArkUI.Full
562   * @crossplatform
563   * @form
564   * @atomicservice
565   * @since arkts {'1.1':'11','1.2':'20'}
566   * @arkts 1.1&1.2
567   */
568  itemHeight(value: Length): DotIndicator;
569
570  /**
571   * Set the indicator item width when selected.
572   *
573   * @param { Length } value - the indicator item width when selected.
574   * @returns { DotIndicator }
575   * @syscap SystemCapability.ArkUI.ArkUI.Full
576   * @crossplatform
577   * @form
578   * @since 10
579   */
580  /**
581   * Sets the width of the selected dot in the dot-style navigation indicator.
582   *
583   * @param { Length } value - Width of the selected dot in the dot-style navigation indicator.
584   * Default value is 12vp. This parameter cannot be set in percentage.
585   * @returns { DotIndicator }
586   * @syscap SystemCapability.ArkUI.ArkUI.Full
587   * @crossplatform
588   * @form
589   * @atomicservice
590   * @since arkts {'1.1':'11','1.2':'20'}
591   * @arkts 1.1&1.2
592   */
593  selectedItemWidth(value: Length): DotIndicator;
594
595  /**
596   * Set the indicator item height when selected.
597   *
598   * @param { Length } value - the indicator item height when selected.
599   * @returns { DotIndicator }
600   * @syscap SystemCapability.ArkUI.ArkUI.Full
601   * @crossplatform
602   * @form
603   * @since 10
604   */
605  /**
606   * Sets the height of the selected dot in the dot-style navigation indicator.
607   *
608   * @param { Length } value - Height of the selected dot in the dot-style navigation indicator.
609   * Default value is 6vp. This parameter cannot be set in percentage.
610   * @returns { DotIndicator }
611   * @syscap SystemCapability.ArkUI.ArkUI.Full
612   * @crossplatform
613   * @form
614   * @atomicservice
615   * @since arkts {'1.1':'11','1.2':'20'}
616   * @arkts 1.1&1.2
617   */
618  selectedItemHeight(value: Length): DotIndicator;
619
620  /**
621   * Setting indicator style mask.
622   *
623   * @param { boolean } value - the indicator item mask.
624   * @returns { DotIndicator }
625   * @syscap SystemCapability.ArkUI.ArkUI.Full
626   * @crossplatform
627   * @form
628   * @since 10
629   */
630  /**
631   * Sets whether to enable the mask for the dot-style navigation indicator.
632   *
633   * @param { boolean } value - Whether to enable the mask for the dot-style navigation indicator.
634   * Default value is false.
635   * @returns { DotIndicator }
636   * @syscap SystemCapability.ArkUI.ArkUI.Full
637   * @crossplatform
638   * @form
639   * @atomicservice
640   * @since arkts {'1.1':'11','1.2':'20'}
641   * @arkts 1.1&1.2
642   */
643  mask(value: boolean): DotIndicator;
644
645  /**
646   * Set the indicator color.
647   *
648   * @param { ResourceColor } value - the indicator item color.
649   * @returns { DotIndicator }
650   * @syscap SystemCapability.ArkUI.ArkUI.Full
651   * @crossplatform
652   * @form
653   * @since 10
654   */
655  /**
656   * Sets the color of the dot-style navigation indicator.
657   *
658   * @param { ResourceColor } value - Color of the dot-style navigation indicator.
659   * Default value is #182431(10% opacity).
660   * @returns { DotIndicator }
661   * @syscap SystemCapability.ArkUI.ArkUI.Full
662   * @crossplatform
663   * @form
664   * @atomicservice
665   * @since arkts {'1.1':'11','1.2':'20'}
666   * @arkts 1.1&1.2
667   */
668  color(value: ResourceColor): DotIndicator;
669
670  /**
671   * Set the navigation point color.
672   *
673   * @param { ResourceColor } value - the indicator item when selected.
674   * @returns { DotIndicator }
675   * @syscap SystemCapability.ArkUI.ArkUI.Full
676   * @crossplatform
677   * @form
678   * @since 10
679   */
680  /**
681   * Sets the color of the selected dot in the dot-style navigation indicator.
682   *
683   * @param { ResourceColor } value - Color of the selected dot in the dot-style navigation indicator.
684   * Default value is #007DFF.
685   * @returns { DotIndicator }
686   * @syscap SystemCapability.ArkUI.ArkUI.Full
687   * @crossplatform
688   * @form
689   * @atomicservice
690   * @since arkts {'1.1':'11','1.2':'20'}
691   * @arkts 1.1&1.2
692   */
693  selectedColor(value: ResourceColor): DotIndicator;
694
695  /**
696   * Sets the maximum number of navigation dots in the dot-style navigation indicator.
697   *
698   * @param { number } maxDisplayCount - Maximum number of navigation dots in the dot-style navigation indicator.
699   * @returns { DotIndicator } return the DotIndicator
700   * @syscap SystemCapability.ArkUI.ArkUI.Full
701   * @crossplatform
702   * @atomicservice
703   * @since arkts {'1.1':'12','1.2':'20'}
704   * @arkts 1.1&1.2
705   */
706  maxDisplayCount(maxDisplayCount: number): DotIndicator;
707
708  /**
709   * Set the space between dots.
710   *
711   * @param { LengthMetrics } space - the space between dots
712   * @returns { DotIndicator }
713   * @syscap SystemCapability.ArkUI.ArkUI.Full
714   * @crossplatform
715   * @form
716   * @atomicservice
717   * @since arkts {'1.1':'19','1.2':'20'}
718   * @arkts 1.1&1.2
719   */
720  space(space: LengthMetrics): DotIndicator;
721}
722
723/**
724 * Set Swiper column count adaptation.
725 *
726 * @typedef { object } SwiperAutoFill
727 * @syscap SystemCapability.ArkUI.ArkUI.Full
728 * @form
729 * @since 10
730 */
731/**
732 * Set Swiper column count adaptation.
733 *
734 * @typedef { object } SwiperAutoFill
735 * @syscap SystemCapability.ArkUI.ArkUI.Full
736 * @form
737 * @atomicservice
738 * @since 11
739 */
740/**
741 * Set Swiper column count adaptation.
742 *
743 * @typedef SwiperAutoFill
744 * @syscap SystemCapability.ArkUI.ArkUI.Full
745 * @form
746 * @atomicservice
747 * @since arkts {'1.1':'18','1.2':'20'}
748 * @arkts 1.1&1.2
749 */
750declare interface SwiperAutoFill {
751  /**
752   * Set minSize size.
753   *
754   * @syscap SystemCapability.ArkUI.ArkUI.Full
755   * @since 10
756   * @form
757   */
758  /**
759   * Set minSize size.
760   *
761   * @type { VP }
762   * @syscap SystemCapability.ArkUI.ArkUI.Full
763   * @atomicservice
764   * @since arkts {'1.1':'11','1.2':'20'}
765   * @arkts 1.1&1.2
766   * @form
767   */
768  minSize: VP;
769}
770
771/**
772 * Define DigitIndicator, the indicator type is digit.
773 *
774 * @extends Indicator<DigitIndicator>
775 * @syscap SystemCapability.ArkUI.ArkUI.Full
776 * @crossplatform
777 * @form
778 * @since 10
779 */
780/**
781 * Define DigitIndicator, the indicator type is digit.
782 *
783 * @extends Indicator<DigitIndicator>
784 * @syscap SystemCapability.ArkUI.ArkUI.Full
785 * @crossplatform
786 * @form
787 * @atomicservice
788 * @since arkts {'1.1':'11','1.2':'20'}
789 * @arkts 1.1&1.2
790 */
791declare class DigitIndicator extends Indicator<DigitIndicator> {
792  /**
793   * Constructor.
794   *
795   * @syscap SystemCapability.ArkUI.ArkUI.Full
796   * @crossplatform
797   * @form
798   * @since 10
799   */
800  /**
801   * Constructor.
802   *
803   * @syscap SystemCapability.ArkUI.ArkUI.Full
804   * @crossplatform
805   * @form
806   * @atomicservice
807   * @since arkts {'1.1':'11','1.2':'20'}
808   * @arkts 1.1&1.2
809   */
810  constructor();
811
812  /**
813   * Set font color of the digital indicator.
814   *
815   * @param { ResourceColor } value - the indicator font color.
816   * @returns { DigitIndicator }
817   * @syscap SystemCapability.ArkUI.ArkUI.Full
818   * @crossplatform
819   * @form
820   * @since 10
821   */
822  /**
823   * Sets the font color of the digit-style navigation indicator.
824   *
825   * @param { ResourceColor } value - Font color of the digit-style navigation indicator. Default value is #ff182431.
826   * @returns { DigitIndicator }
827   * @syscap SystemCapability.ArkUI.ArkUI.Full
828   * @crossplatform
829   * @form
830   * @atomicservice
831   * @since arkts {'1.1':'11','1.2':'20'}
832   * @arkts 1.1&1.2
833   */
834  fontColor(value: ResourceColor): DigitIndicator;
835
836  /**
837   * Set font color of the digital indicator when selected.
838   *
839   * @param { ResourceColor } value - the indicator font color when selected.
840   * @returns { DigitIndicator }
841   * @syscap SystemCapability.ArkUI.ArkUI.Full
842   * @crossplatform
843   * @form
844   * @since 10
845   */
846  /**
847   * Sets the font color of the selected digit in the digit-style navigation indicator.
848   *
849   * @param { ResourceColor } value - Font color of the selected digit in the digit-style navigation indicator.
850   * Default value is #ff182431.
851   * @returns { DigitIndicator }
852   * @syscap SystemCapability.ArkUI.ArkUI.Full
853   * @crossplatform
854   * @form
855   * @atomicservice
856   * @since arkts {'1.1':'11','1.2':'20'}
857   * @arkts 1.1&1.2
858   */
859  selectedFontColor(value: ResourceColor): DigitIndicator;
860
861  /**
862   * Set the digital indicator font (just support font size and weight).
863   *
864   * @param { Font } value - the indicator font size and weight.
865   * @returns { DigitIndicator }
866   * @syscap SystemCapability.ArkUI.ArkUI.Full
867   * @crossplatform
868   * @form
869   * @since 10
870   */
871  /**
872   * Sets the font style of the digit-style navigation indicator.
873   *
874   * <p><strong>NOTE</strong>:
875   * <br>Only the size and weight parameters in Font are adjustable.
876   * <brSetting family and style has no effect.
877   * </p>
878   *
879   * @param { Font } value - Font style of the digit-style navigation indicator.
880   * Default value is { size: 14, weight: FontWeight.Normal }.
881   * @returns { DigitIndicator }
882   * @syscap SystemCapability.ArkUI.ArkUI.Full
883   * @crossplatform
884   * @form
885   * @atomicservice
886   * @since arkts {'1.1':'11','1.2':'20'}
887   * @arkts 1.1&1.2
888   */
889  digitFont(value: Font): DigitIndicator;
890
891  /**
892   * Set the digital indicator font (just support font size and weight).
893   *
894   * @param { Font } value - the indicator font size and weight when selected.
895   * @returns { DigitIndicator }
896   * @syscap SystemCapability.ArkUI.ArkUI.Full
897   * @crossplatform
898   * @form
899   * @since 10
900   */
901  /**
902   * Sets the font style of the selected digit in the digit-style navigation indicator.
903   *
904   * @param { Font } value - Font style of the selected digit in the digit-style navigation indicator.
905   * Default value is { size: 14, weight: FontWeight.Normal }.
906   * @returns { DigitIndicator }
907   * @syscap SystemCapability.ArkUI.ArkUI.Full
908   * @crossplatform
909   * @form
910   * @atomicservice
911   * @since arkts {'1.1':'11','1.2':'20'}
912   * @arkts 1.1&1.2
913   */
914  selectedDigitFont(value: Font): DigitIndicator;
915}
916
917/**
918 * Arrow object.
919 *
920 * @interface ArrowStyle
921 * @syscap SystemCapability.ArkUI.ArkUI.Full
922 * @since 10
923 */
924/**
925 * Arrow object.
926 *
927 * @interface ArrowStyle
928 * @syscap SystemCapability.ArkUI.ArkUI.Full
929 * @crossplatform
930 * @atomicservice
931 * @since arkts {'1.1':'11','1.2':'20'}
932 * @arkts 1.1&1.2
933 */
934declare interface ArrowStyle {
935  /**
936   * Is show the arrow background or not.
937   *
938   * @type { ?boolean }
939   * @default false
940   * @syscap SystemCapability.ArkUI.ArkUI.Full
941   * @since 10
942   */
943  /**
944   * Is show the arrow background or not.
945   *
946   * @type { ?boolean }
947   * @default false
948   * @syscap SystemCapability.ArkUI.ArkUI.Full
949   * @crossplatform
950   * @atomicservice
951   * @since arkts {'1.1':'11','1.2':'20'}
952   * @arkts 1.1&1.2
953   */
954  showBackground?: boolean;
955
956  /**
957   * When the indicator show, set the arrow position is side of the indicator or in the middle of content area.
958   * The arrow is displayed on side of the indicator, if the value is false.
959   *
960   * @type { ?boolean }
961   * @default false
962   * @syscap SystemCapability.ArkUI.ArkUI.Full
963   * @since 10
964   */
965  /**
966   * When the indicator show, set the arrow position is side of the indicator or in the middle of content area.
967   * The arrow is displayed on side of the indicator, if the value is false.
968   *
969   * @type { ?boolean }
970   * @default false
971   * @syscap SystemCapability.ArkUI.ArkUI.Full
972   * @crossplatform
973   * @atomicservice
974   * @since arkts {'1.1':'11','1.2':'20'}
975   * @arkts 1.1&1.2
976   */
977  isSidebarMiddle?: boolean;
978
979  /**
980   * The arrow background size.
981   * The size of the arrow is three-quarters of the background size, when the background is displayed.
982   *
983   * @type { ?Length }
984   * @default When isSidebarMiddle is false, the default value is 24vp, Otherwise,the default value is 32vp
985   * @syscap SystemCapability.ArkUI.ArkUI.Full
986   * @since 10
987   */
988  /**
989   * The arrow background size.
990   * The size of the arrow is three-quarters of the background size, when the background is displayed.
991   *
992   * @type { ?Length }
993   * @default When isSidebarMiddle is false, the default value is 24vp, Otherwise,the default value is 32vp
994   * @syscap SystemCapability.ArkUI.ArkUI.Full
995   * @crossplatform
996   * @atomicservice
997   * @since arkts {'1.1':'11','1.2':'20'}
998   * @arkts 1.1&1.2
999   */
1000  backgroundSize?: Length;
1001
1002  /**
1003   * The arrow background background color.
1004   *
1005   * @type { ?ResourceColor }
1006   * @default When isSidebarMiddle is false, the default value is #00000000, Otherwise,the default value is #19182431
1007   * @syscap SystemCapability.ArkUI.ArkUI.Full
1008   * @since 10
1009   */
1010  /**
1011   * The arrow background background color.
1012   *
1013   * @type { ?ResourceColor }
1014   * @default When isSidebarMiddle is false, the default value is #00000000, Otherwise, the default value is #19182431
1015   * @syscap SystemCapability.ArkUI.ArkUI.Full
1016   * @crossplatform
1017   * @atomicservice
1018   * @since arkts {'1.1':'11','1.2':'20'}
1019   * @arkts 1.1&1.2
1020   */
1021  backgroundColor?: ResourceColor;
1022
1023  /**
1024   * The arrow size.
1025   * The arrow size can be set, when the background is not displayed.
1026   * The size of the arrow is three-quarters of the background size, when the background is displayed.
1027   *
1028   * @type { ?Length }
1029   * @default When isSidebarMiddle is false, the default value is 18vp, Otherwise, the default value is 24vp
1030   * @syscap SystemCapability.ArkUI.ArkUI.Full
1031   * @since 10
1032   */
1033  /**
1034   * The arrow size.
1035   * The arrow size can be set, when the background is not displayed.
1036   * The size of the arrow is three-quarters of the background size, when the background is displayed.
1037   *
1038   * @type { ?Length }
1039   * @default When isSidebarMiddle is false, the default value is 18vp, Otherwise, the default value is 24vp
1040   * @syscap SystemCapability.ArkUI.ArkUI.Full
1041   * @crossplatform
1042   * @atomicservice
1043   * @since arkts {'1.1':'11','1.2':'20'}
1044   * @arkts 1.1&1.2
1045   */
1046  arrowSize?: Length;
1047
1048  /**
1049   * The arrow color.
1050   *
1051   * @type { ?ResourceColor }
1052   * @default #182431
1053   * @syscap SystemCapability.ArkUI.ArkUI.Full
1054   * @since 10
1055   */
1056  /**
1057   * The arrow color.
1058   *
1059   * @type { ?ResourceColor }
1060   * @default #182431
1061   * @syscap SystemCapability.ArkUI.ArkUI.Full
1062   * @crossplatform
1063   * @atomicservice
1064   * @since arkts {'1.1':'11','1.2':'20'}
1065   * @arkts 1.1&1.2
1066   */
1067  arrowColor?: ResourceColor;
1068}
1069
1070/**
1071 * Declare the size of the swiper on the spindle.
1072 *
1073 * @enum { number }
1074 * @syscap SystemCapability.ArkUI.ArkUI.Full
1075 * @since 7
1076 */
1077/**
1078 * Declare the size of the swiper on the spindle.
1079 *
1080 * @enum { number }
1081 * @syscap SystemCapability.ArkUI.ArkUI.Full
1082 * @crossplatform
1083 * @form
1084 * @since 10
1085 */
1086/**
1087 * Declare the size of the swiper on the spindle.
1088 *
1089 * @enum { number }
1090 * @syscap SystemCapability.ArkUI.ArkUI.Full
1091 * @crossplatform
1092 * @form
1093 * @atomicservice
1094 * @since arkts {'1.1':'11','1.2':'20'}
1095 * @arkts 1.1&1.2
1096 */
1097declare enum SwiperDisplayMode {
1098  /**
1099   * Carousel map extension.
1100   *
1101   * @syscap SystemCapability.ArkUI.ArkUI.Full
1102   * @form
1103   * @since 7
1104   * @deprecated since 10
1105   * @useinstead SwiperDisplayMode#STRETCH
1106   */
1107  Stretch,
1108
1109  /**
1110   * The rotation chart is self linear.
1111   *
1112   * @syscap SystemCapability.ArkUI.ArkUI.Full
1113   * @form
1114   * @since 7
1115   * @deprecated since 10
1116   * @useinstead SwiperDisplayMode#AUTO_LINEAR
1117   */
1118  AutoLinear,
1119
1120  /**
1121   * Carousel map extension.
1122   *
1123   * @syscap SystemCapability.ArkUI.ArkUI.Full
1124   * @crossplatform
1125   * @form
1126   * @since 10
1127   */
1128  /**
1129   * Carousel map extension.
1130   *
1131   * @syscap SystemCapability.ArkUI.ArkUI.Full
1132   * @crossplatform
1133   * @form
1134   * @atomicservice
1135   * @since arkts {'1.1':'11','1.2':'20'}
1136   * @arkts 1.1&1.2
1137   */
1138  STRETCH,
1139
1140  /**
1141   * The rotation chart is self linear.
1142   *
1143   * @syscap SystemCapability.ArkUI.ArkUI.Full
1144   * @crossplatform
1145   * @form
1146   * @since 10
1147   */
1148  /**
1149   * The rotation chart is self linear.
1150   *
1151   * @syscap SystemCapability.ArkUI.ArkUI.Full
1152   * @crossplatform
1153   * @form
1154   * @atomicservice
1155   * @since 11
1156   * @deprecated since 12
1157   * @useinstead Scroller#scrollTo
1158   */
1159  AUTO_LINEAR,
1160}
1161
1162/**
1163 * Provides an interface for sliding containers.
1164 *
1165 * @interface SwiperInterface
1166 * @syscap SystemCapability.ArkUI.ArkUI.Full
1167 * @since 7
1168 */
1169/**
1170 * Provides an interface for sliding containers.
1171 *
1172 * @interface SwiperInterface
1173 * @syscap SystemCapability.ArkUI.ArkUI.Full
1174 * @crossplatform
1175 * @form
1176 * @since 10
1177 */
1178/**
1179 * Provides an interface for sliding containers.
1180 *
1181 * @interface SwiperInterface
1182 * @syscap SystemCapability.ArkUI.ArkUI.Full
1183 * @crossplatform
1184 * @form
1185 * @atomicservice
1186 * @since arkts {'1.1':'11','1.2':'20'}
1187 * @arkts 1.1&1.2
1188 */
1189interface SwiperInterface {
1190  /**
1191   * Called when a sliding container is set.
1192   *
1193   * @param { SwiperController } controller
1194   * @returns { SwiperAttribute }
1195   * @syscap SystemCapability.ArkUI.ArkUI.Full
1196   * @since 7
1197   */
1198  /**
1199   * Called when a sliding container is set.
1200   *
1201   * @param { SwiperController } controller
1202   * @returns { SwiperAttribute }
1203   * @syscap SystemCapability.ArkUI.ArkUI.Full
1204   * @crossplatform
1205   * @form
1206   * @since 10
1207   */
1208  /**
1209   * Called when a sliding container is set.
1210   *
1211   * @param { SwiperController } controller
1212   * @returns { SwiperAttribute }
1213   * @syscap SystemCapability.ArkUI.ArkUI.Full
1214   * @crossplatform
1215   * @form
1216   * @atomicservice
1217   * @since arkts {'1.1':'11','1.2':'20'}
1218   * @arkts 1.1&1.2
1219   */
1220  (controller?: SwiperController): SwiperAttribute;
1221}
1222
1223/**
1224 * Setting indicator style navigation.
1225 *
1226 * @interface IndicatorStyle
1227 * @syscap SystemCapability.ArkUI.ArkUI.Full
1228 * @since 8
1229 * @deprecated since 10
1230 */
1231declare interface IndicatorStyle {
1232  /**
1233   * Set the indicator to the left.
1234   *
1235   * @type { ?Length }
1236   * @syscap SystemCapability.ArkUI.ArkUI.Full
1237   * @since 8
1238   * @deprecated since 10
1239   */
1240  left?: Length;
1241
1242  /**
1243   * Set the indicator to the top.
1244   *
1245   * @type { ?Length }
1246   * @syscap SystemCapability.ArkUI.ArkUI.Full
1247   * @since 8
1248   * @deprecated since 10
1249   */
1250  top?: Length;
1251
1252  /**
1253   * Set the indicator to the right.
1254   *
1255   * @type { ?Length }
1256   * @syscap SystemCapability.ArkUI.ArkUI.Full
1257   * @since 8
1258   * @deprecated since 10
1259   */
1260  right?: Length;
1261
1262  /**
1263   * Set the indicator to the bottom.
1264   *
1265   * @type { ?Length }
1266   * @syscap SystemCapability.ArkUI.ArkUI.Full
1267   * @since 8
1268   * @deprecated since 10
1269   */
1270  bottom?: Length;
1271
1272  /**
1273   * Set the indicator size.
1274   *
1275   * @type { ?Length }
1276   * @syscap SystemCapability.ArkUI.ArkUI.Full
1277   * @since 8
1278   * @deprecated since 10
1279   */
1280  size?: Length;
1281
1282  /**
1283   * Setting indicator style mask.
1284   *
1285   * @type { ?boolean }
1286   * @syscap SystemCapability.ArkUI.ArkUI.Full
1287   * @since 8
1288   * @deprecated since 10
1289   */
1290  mask?: boolean;
1291
1292  /**
1293   * Set the indicator color.
1294   *
1295   * @type { ?ResourceColor }
1296   * @syscap SystemCapability.ArkUI.ArkUI.Full
1297   * @since 8
1298   * @deprecated since 10
1299   */
1300  color?: ResourceColor;
1301
1302  /**
1303   * Set the navigation point color.
1304   *
1305   * @type { ?ResourceColor }
1306   * @syscap SystemCapability.ArkUI.ArkUI.Full
1307   * @since 8
1308   * @deprecated since 10
1309   */
1310  selectedColor?: ResourceColor;
1311}
1312
1313/**
1314 * Provides an interface for swiper animation.
1315 *
1316 * @interface SwiperAnimationEvent
1317 * @syscap SystemCapability.ArkUI.ArkUI.Full
1318 * @crossplatform
1319 * @since 10
1320 */
1321/**
1322 * Provides an interface for swiper animation.
1323 *
1324 * @interface SwiperAnimationEvent
1325 * @syscap SystemCapability.ArkUI.ArkUI.Full
1326 * @crossplatform
1327 * @atomicservice
1328 * @since arkts {'1.1':'11','1.2':'20'}
1329 * @arkts 1.1&1.2
1330 */
1331declare interface SwiperAnimationEvent {
1332  /**
1333   * Offset of the current page to the start position of the swiper main axis. The unit is vp.
1334   *
1335   * @type { number }
1336   * @default 0.0 vp
1337   * @syscap SystemCapability.ArkUI.ArkUI.Full
1338   * @since 10
1339   */
1340  /**
1341   * Offset of the current page to the start position of the swiper main axis. The unit is vp.
1342   *
1343   * @type { number }
1344   * @default 0.0 vp
1345   * @syscap SystemCapability.ArkUI.ArkUI.Full
1346   * @crossplatform
1347   * @atomicservice
1348   * @since arkts {'1.1':'11','1.2':'20'}
1349   * @arkts 1.1&1.2
1350   */
1351  currentOffset: number;
1352
1353  /**
1354   * Offset of the target page to the start position of the swiper main axis. The unit is vp.
1355   *
1356   * @type { number }
1357   * @default 0.0 vp
1358   * @syscap SystemCapability.ArkUI.ArkUI.Full
1359   * @since 10
1360   */
1361  /**
1362   * Offset of the target page to the start position of the swiper main axis. The unit is vp.
1363   *
1364   * @type { number }
1365   * @default 0.0 vp
1366   * @syscap SystemCapability.ArkUI.ArkUI.Full
1367   * @crossplatform
1368   * @atomicservice
1369   * @since arkts {'1.1':'11','1.2':'20'}
1370   * @arkts 1.1&1.2
1371   */
1372  targetOffset: number;
1373
1374  /**
1375   * Start speed of the page-turning animation. The unit is vp/s.
1376   *
1377   * @type { number }
1378   * @default 0.0 vp/s
1379   * @syscap SystemCapability.ArkUI.ArkUI.Full
1380   * @since 10
1381   */
1382  /**
1383   * Start speed of the page-turning animation. The unit is vp/s.
1384   *
1385   * @type { number }
1386   * @default 0.0 vp/s
1387   * @syscap SystemCapability.ArkUI.ArkUI.Full
1388   * @crossplatform
1389   * @atomicservice
1390   * @since arkts {'1.1':'11','1.2':'20'}
1391   * @arkts 1.1&1.2
1392   */
1393  velocity: number;
1394}
1395
1396/**
1397 * Defines the properties for controlling the autoplay behavior.
1398 *
1399 * @interface AutoPlayOptions
1400 * @syscap SystemCapability.ArkUI.ArkUI.Full
1401 * @crossplatform
1402 * @form
1403 * @atomicservice
1404 * @since arkts {'1.1':'18','1.2':'20'}
1405 * @arkts 1.1&1.2
1406 */
1407declare interface AutoPlayOptions {
1408  /**
1409   * Whether the autoplay stops immediately when the component is touched.
1410   *
1411   * @type { boolean }
1412   * @default true
1413   * @syscap SystemCapability.ArkUI.ArkUI.Full
1414   * @crossplatform
1415   * @form
1416   * @atomicservice
1417   * @since arkts {'1.1':'18','1.2':'20'}
1418   * @arkts 1.1&1.2
1419   */
1420  stopWhenTouched: boolean;
1421}
1422
1423/**
1424 * Swiper nested scroll nested mode
1425
1426 * @enum { number } SwiperNestedScrollMode
1427 * @syscap SystemCapability.ArkUI.ArkUI.Full
1428 * @atomicservice
1429 * @since arkts {'1.1':'11','1.2':'20'}
1430 * @arkts 1.1&1.2
1431 */
1432declare enum SwiperNestedScrollMode {
1433  /**
1434   * The scrolling is contained within the Swiper component, and no scroll chaining occurs, that is,
1435   * the parent container does not scroll when the component scrolling reaches the boundary.
1436   *
1437   * @syscap SystemCapability.ArkUI.ArkUI.Full
1438   * @atomicservice
1439   * @since arkts {'1.1':'11','1.2':'20'}
1440   * @arkts 1.1&1.2
1441   */
1442  SELF_ONLY = 0,
1443
1444  /**
1445   * The Swiper component scrolls first, and when it hits the boundary, the parent container scrolls.
1446   *
1447   * @syscap SystemCapability.ArkUI.ArkUI.Full
1448   * @atomicservice
1449   * @since arkts {'1.1':'11','1.2':'20'}
1450   * @arkts 1.1&1.2
1451   */
1452  SELF_FIRST = 1,
1453}
1454
1455/**
1456 * Declare the animation mode of SwiperController's changeIndex method.
1457 *
1458 * @enum { number }
1459 * @syscap SystemCapability.ArkUI.ArkUI.Full
1460 * @crossplatform
1461 * @form
1462 * @atomicservice
1463 * @since arkts {'1.1':'15','1.2':'20'}
1464 * @arkts 1.1&1.2
1465 */
1466declare enum SwiperAnimationMode {
1467  /**
1468   * Jump to target index without animation.
1469   *
1470   * @syscap SystemCapability.ArkUI.ArkUI.Full
1471   * @crossplatform
1472   * @form
1473   * @atomicservice
1474   * @since arkts {'1.1':'15','1.2':'20'}
1475   * @arkts 1.1&1.2
1476   */
1477  NO_ANIMATION = 0,
1478
1479  /**
1480   * Scroll to target index with animation.
1481   *
1482   * @syscap SystemCapability.ArkUI.ArkUI.Full
1483   * @crossplatform
1484   * @form
1485   * @atomicservice
1486   * @since arkts {'1.1':'15','1.2':'20'}
1487   * @arkts 1.1&1.2
1488   */
1489  DEFAULT_ANIMATION = 1,
1490
1491  /**
1492   * Jump to some index near the target index without animation,
1493   * then scroll to target index with animation.
1494   *
1495   * @syscap SystemCapability.ArkUI.ArkUI.Full
1496   * @crossplatform
1497   * @form
1498   * @atomicservice
1499   * @since arkts {'1.1':'15','1.2':'20'}
1500   * @arkts 1.1&1.2
1501   */
1502  FAST_ANIMATION = 2,
1503}
1504
1505/**
1506 * Defines a swiper callback when onAnimationStart.
1507 *
1508 * @typedef { function } OnSwiperAnimationStartCallback
1509 * @param { number } index - The index value of the swiper page that when animation start.
1510 * @param { number } targetIndex - The target index value of the swiper page that when animation start.
1511 * @param { SwiperAnimationEvent } extraInfo - The extra callback info.
1512 * @syscap SystemCapability.ArkUI.ArkUI.Full
1513 * @crossplatform
1514 * @form
1515 * @atomicservice
1516 * @since arkts {'1.1':'18','1.2':'20'}
1517 * @arkts 1.1&1.2
1518 */
1519declare type OnSwiperAnimationStartCallback = (index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => void;
1520
1521/**
1522 * Defines a swiper callback when onAnimationEnd.
1523 *
1524 * @typedef { function } OnSwiperAnimationEndCallback
1525 * @param { number } index - The index value of the swiper page that when animation end.
1526 * @param { SwiperAnimationEvent } extraInfo - The extra callback info.
1527 * @syscap SystemCapability.ArkUI.ArkUI.Full
1528 * @crossplatform
1529 * @form
1530 * @atomicservice
1531 * @since arkts {'1.1':'18','1.2':'20'}
1532 * @arkts 1.1&1.2
1533 */
1534declare type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAnimationEvent) => void;
1535
1536/**
1537 * Defines a swiper callback when onGestureSwipe.
1538 *
1539 * @typedef { function } OnSwiperGestureSwipeCallback
1540 * @param { number } index - The index value of the swiper page before gesture swipe.
1541 * @param { SwiperAnimationEvent } extraInfo - The extra callback info.
1542 * @syscap SystemCapability.ArkUI.ArkUI.Full
1543 * @crossplatform
1544 * @atomicservice
1545 * @since arkts {'1.1':'18','1.2':'20'}
1546 * @arkts 1.1&1.2
1547 */
1548declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAnimationEvent) => void;
1549
1550/**
1551 * Defines the swiper attribute functions.
1552 *
1553 * @extends CommonMethod<SwiperAttribute>
1554 * @syscap SystemCapability.ArkUI.ArkUI.Full
1555 * @since 7
1556 */
1557/**
1558 * Defines the swiper attribute functions.
1559 *
1560 * @extends CommonMethod<SwiperAttribute>
1561 * @syscap SystemCapability.ArkUI.ArkUI.Full
1562 * @crossplatform
1563 * @form
1564 * @since 10
1565 */
1566/**
1567 * Defines the swiper attribute functions.
1568 *
1569 * @extends CommonMethod<SwiperAttribute>
1570 * @syscap SystemCapability.ArkUI.ArkUI.Full
1571 * @crossplatform
1572 * @form
1573 * @atomicservice
1574 * @since arkts {'1.1':'11','1.2':'20'}
1575 * @arkts 1.1&1.2
1576 */
1577declare class SwiperAttribute extends CommonMethod<SwiperAttribute> {
1578  /**
1579   * Called when the index value of the displayed subcomponent is set in the container.
1580   *
1581   * @param { number } value
1582   * @returns { SwiperAttribute }
1583   * @syscap SystemCapability.ArkUI.ArkUI.Full
1584   * @since 7
1585   */
1586  /**
1587   * Called when the index value of the displayed subcomponent is set in the container.
1588   *
1589   * @param { number } value
1590   * @returns { SwiperAttribute }
1591   * @syscap SystemCapability.ArkUI.ArkUI.Full
1592   * @crossplatform
1593   * @form
1594   * @since 10
1595   */
1596  /**
1597   * Sets the index of the child component currently displayed in the container.
1598   *
1599   * @param { number } value - Index of the child component currently displayed in the container. Default value is 0.
1600   * If the value is less than 0 or greater than or equal to the number of child components,
1601   * the default value 0 is used.
1602   * @returns { SwiperAttribute }
1603   * @syscap SystemCapability.ArkUI.ArkUI.Full
1604   * @crossplatform
1605   * @form
1606   * @atomicservice
1607   * @since arkts {'1.1':'11','1.2':'20'}
1608   * @arkts 1.1&1.2
1609   */
1610  index(value: number): SwiperAttribute;
1611
1612  /**
1613   * Called when setting whether the subcomponent plays automatically.
1614   *
1615   * @param { boolean } value
1616   * @returns { SwiperAttribute }
1617   * @syscap SystemCapability.ArkUI.ArkUI.Full
1618   * @since 7
1619   */
1620  /**
1621   * Called when setting whether the subcomponent plays automatically.
1622   *
1623   * @param { boolean } value
1624   * @returns { SwiperAttribute }
1625   * @syscap SystemCapability.ArkUI.ArkUI.Full
1626   * @crossplatform
1627   * @form
1628   * @since 10
1629   */
1630  /**
1631   * Sets whether to enable automatic playback for child component switching.
1632   *
1633   * <p><strong>NOTE</strong>:
1634   * <br>If loop is set to false, the playback stops when the last page is reached.
1635   * <br>The playback continues when the page is not the last page after a swipe gesture.
1636   * <br>If the Swiper component becomes invisible, the playback stops.
1637   * </p>
1638   *
1639   * @param { boolean } value - Whether to enable automatic playback for child component switching.
1640   * Default value is false.
1641   * @returns { SwiperAttribute }
1642   * @syscap SystemCapability.ArkUI.ArkUI.Full
1643   * @crossplatform
1644   * @form
1645   * @atomicservice
1646   * @since 11
1647   */
1648  autoPlay(value: boolean): SwiperAttribute;
1649
1650  /**
1651   * Sets whether child components automatically play when the screen is pressed by fingers, a mouse device,
1652   * or other input devices.
1653   *
1654   * <p><strong>NOTE</strong>:
1655   * <br>If loop is set to false, the playback stops when the last page is reached.
1656   * <br>The playback continues when the page is not the last page after a swipe gesture.
1657   * <br>If the Swiper component becomes invisible, the playback stops.
1658   * </p>
1659   *
1660   * @param { boolean } autoPlay - Whether to enable automatic playback for child component switching.
1661   * Default value is false.
1662   * @param { AutoPlayOptions } options - Whether child components stop autoplay when the screen is pressed by fingers,
1663   * a mouse device, or other input devices. Default value is { stopWhenTouched: true }.
1664   * @returns { SwiperAttribute }
1665   * @syscap SystemCapability.ArkUI.ArkUI.Full
1666   * @crossplatform
1667   * @form
1668   * @atomicservice
1669   * @since arkts {'1.1':'18','1.2':'20'}
1670   * @arkts 1.1&1.2
1671   */
1672  autoPlay(autoPlay: boolean, options: AutoPlayOptions): SwiperAttribute;
1673
1674  /**
1675   * Called when the time interval for automatic playback is set.
1676   *
1677   * @param { number } value
1678   * @returns { SwiperAttribute }
1679   * @syscap SystemCapability.ArkUI.ArkUI.Full
1680   * @since 7
1681   */
1682  /**
1683   * Called when the time interval for automatic playback is set.
1684   *
1685   * @param { number } value
1686   * @returns { SwiperAttribute }
1687   * @syscap SystemCapability.ArkUI.ArkUI.Full
1688   * @crossplatform
1689   * @form
1690   * @since 10
1691   */
1692  /**
1693   * Sets the interval for automatic playback.
1694   *
1695   * @param { number } value - Interval for automatic playback. Default value is 3000, the unit is ms.
1696   * Minimum value is 0ms. If a value less than 0 is set, the default value is used.
1697   * @returns { SwiperAttribute }
1698   * @syscap SystemCapability.ArkUI.ArkUI.Full
1699   * @crossplatform
1700   * @form
1701   * @atomicservice
1702   * @since arkts {'1.1':'11','1.2':'20'}
1703   * @arkts 1.1&1.2
1704   */
1705  interval(value: number): SwiperAttribute;
1706
1707  /**
1708   * Called when you set whether the navigation point indicator is enabled.
1709   *
1710   * @param { boolean } value - show indicator of the swiper indicator.
1711   * @returns { SwiperAttribute }
1712   * @syscap SystemCapability.ArkUI.ArkUI.Full
1713   * @since 7
1714   */
1715  /**
1716   * Set indicator is enabled, or set type style.
1717   *
1718   * @param { DotIndicator | DigitIndicator | boolean } value - the style value or show indicator of the swiper indicator.
1719   * @returns { SwiperAttribute }
1720   * @syscap SystemCapability.ArkUI.ArkUI.Full
1721   * @crossplatform
1722   * @form
1723   * @since 10
1724   */
1725  /**
1726   * Sets the style of the navigation indicator.
1727   *
1728   * @param { DotIndicator | DigitIndicator | boolean } value - Style of the navigation indicator.
1729   * Default value is true, default style is DotIndicator.
1730   * @returns { SwiperAttribute }
1731   * @syscap SystemCapability.ArkUI.ArkUI.Full
1732   * @crossplatform
1733   * @form
1734   * @atomicservice
1735   * @since 11
1736   */
1737  indicator(value: DotIndicator | DigitIndicator | boolean): SwiperAttribute;
1738
1739  /**
1740   * Sets the navigation indicator for the component.
1741   *
1742   * @param { IndicatorComponentController | DotIndicator | DigitIndicator | boolean } indicator -
1743   * Style of the navigation indicator. Default value is true, default style is DotIndicator.
1744   * @returns { SwiperAttribute }
1745   * @syscap SystemCapability.ArkUI.ArkUI.Full
1746   * @crossplatform
1747   * @form
1748   * @atomicservice
1749   * @since arkts {'1.1':'15','1.2':'20'}
1750   * @arkts 1.1&1.2
1751   */
1752  indicator(indicator: IndicatorComponentController | DotIndicator | DigitIndicator | boolean): SwiperAttribute;
1753
1754  /**
1755   * Set arrow is enabled, or set the arrow style.
1756   *
1757   * @param { ArrowStyle | boolean } value - arrow is displayed or set the arrow style.
1758   * @param { boolean } isHoverShow - arrow is display when mouse hover in indicator hotspot.
1759   * @returns { SwiperAttribute } return the component attribute.
1760   * @syscap SystemCapability.ArkUI.ArkUI.Full
1761   * @since 10
1762   */
1763  /**
1764   * Sets the arrow style of the navigation indicator.
1765   *
1766   * @param { ArrowStyle | boolean } value - arrow is displayed or set the arrow style. Default value is false.
1767   * @param { boolean } isHoverShow - Whether to show the arrow only when the mouse pointer hovers
1768   * over the navigation indicator. Default value is false.
1769   * @returns { SwiperAttribute } return the component attribute.
1770   * @syscap SystemCapability.ArkUI.ArkUI.Full
1771   * @crossplatform
1772   * @atomicservice
1773   * @since arkts {'1.1':'11','1.2':'20'}
1774   * @arkts 1.1&1.2
1775   */
1776  displayArrow(value: ArrowStyle | boolean, isHoverShow?: boolean): SwiperAttribute;
1777
1778  /**
1779   * Called when setting whether to turn on cyclic sliding.
1780   *
1781   * @param { boolean } value
1782   * @returns { SwiperAttribute }
1783   * @syscap SystemCapability.ArkUI.ArkUI.Full
1784   * @since 7
1785   */
1786  /**
1787   * Called when setting whether to turn on cyclic sliding.
1788   *
1789   * @param { boolean } value
1790   * @returns { SwiperAttribute }
1791   * @syscap SystemCapability.ArkUI.ArkUI.Full
1792   * @crossplatform
1793   * @form
1794   * @since 10
1795   */
1796  /**
1797   * Sets whether to enable loop playback.
1798   *
1799   * @param { boolean } value - Whether to enable loop playback. Default value is true.
1800   * @returns { SwiperAttribute }
1801   * @syscap SystemCapability.ArkUI.ArkUI.Full
1802   * @crossplatform
1803   * @form
1804   * @atomicservice
1805   * @since arkts {'1.1':'11','1.2':'20'}
1806   * @arkts 1.1&1.2
1807   */
1808  loop(value: boolean): SwiperAttribute;
1809
1810  /**
1811   * Called when the animation duration of the switch is set.
1812   *
1813   * @param { number } value
1814   * @returns { SwiperAttribute }
1815   * @syscap SystemCapability.ArkUI.ArkUI.Full
1816   * @since 7
1817   */
1818  /**
1819   * Called when the animation duration of the switch is set.
1820   *
1821   * @param { number } value
1822   * @returns { SwiperAttribute }
1823   * @syscap SystemCapability.ArkUI.ArkUI.Full
1824   * @crossplatform
1825   * @since 10
1826   */
1827  /**
1828   * Sets the duration of the animation for child component switching.
1829   *
1830   * @param { number } value - Duration of the autoplay for child component switching. Default value is 400,
1831   * the unit is ms. Minimum value is 0ms. If a value less than 0 is set, the default value is used.
1832   * @returns { SwiperAttribute }
1833   * @syscap SystemCapability.ArkUI.ArkUI.Full
1834   * @crossplatform
1835   * @atomicservice
1836   * @since arkts {'1.1':'11','1.2':'20'}
1837   * @arkts 1.1&1.2
1838   */
1839  duration(value: number): SwiperAttribute;
1840
1841  /**
1842   * Called when setting whether to slide vertically.
1843   *
1844   * @param { boolean } value
1845   * @returns { SwiperAttribute }
1846   * @syscap SystemCapability.ArkUI.ArkUI.Full
1847   * @since 7
1848   */
1849  /**
1850   * Called when setting whether to slide vertically.
1851   *
1852   * @param { boolean } value
1853   * @returns { SwiperAttribute }
1854   * @syscap SystemCapability.ArkUI.ArkUI.Full
1855   * @crossplatform
1856   * @form
1857   * @since 10
1858   */
1859  /**
1860   * Sets whether vertical swiping is used.
1861   *
1862   * @param { boolean } value - Whether vertical swiping is used. Default value is false.
1863   * @returns { SwiperAttribute }
1864   * @syscap SystemCapability.ArkUI.ArkUI.Full
1865   * @crossplatform
1866   * @form
1867   * @atomicservice
1868   * @since arkts {'1.1':'11','1.2':'20'}
1869   * @arkts 1.1&1.2
1870   */
1871  vertical(value: boolean): SwiperAttribute;
1872
1873  /**
1874   * Sets the space between child components.
1875   *
1876   * @param { number | string } value
1877   * @returns { SwiperAttribute }
1878   * @syscap SystemCapability.ArkUI.ArkUI.Full
1879   * @since 7
1880   */
1881  /**
1882   * Sets the space between child components.
1883   *
1884   * @param { number | string } value
1885   * @returns { SwiperAttribute }
1886   * @syscap SystemCapability.ArkUI.ArkUI.Full
1887   * @crossplatform
1888   * @form
1889   * @since 10
1890   */
1891  /**
1892   * Sets the space between child components.
1893   *
1894   * <p><strong>NOTE</strong>:
1895   * <br>If the type is number, the default unit is vp.
1896   * <br>If the type is string, the pixel unit must be explicitly specified, for example, '10px';
1897   * if the unit is not specified, for example, '10', the default unit vp is used.
1898   * </p>
1899   *
1900   * @param { number | string } value - Space between child components. Default value is 0,
1901   * Minimum value is 0. If a value less than 0 is set, the default value is used.
1902   * @returns { SwiperAttribute }
1903   * @syscap SystemCapability.ArkUI.ArkUI.Full
1904   * @crossplatform
1905   * @form
1906   * @atomicservice
1907   * @since arkts {'1.1':'11','1.2':'20'}
1908   * @arkts 1.1&1.2
1909   */
1910  itemSpace(value: number | string): SwiperAttribute;
1911
1912  /**
1913   * Called when setting the size of the swiper container on the spindle.
1914   *
1915   * @param { SwiperDisplayMode } value
1916   * @returns { SwiperAttribute }
1917   * @syscap SystemCapability.ArkUI.ArkUI.Full
1918   * @since 7
1919   */
1920  /**
1921   * Called when setting the size of the swiper container on the spindle.
1922   *
1923   * @param { SwiperDisplayMode } value
1924   * @returns { SwiperAttribute }
1925   * @syscap SystemCapability.ArkUI.ArkUI.Full
1926   * @crossplatform
1927   * @form
1928   * @since 10
1929   */
1930  /**
1931   * Sets the mode in which elements are displayed along the main axis.
1932   * This API takes effect only when displayCount is not set.
1933   *
1934   * @param { SwiperDisplayMode } value - Mode in which elements are displayed along the main axis.
1935   * Default value is SwiperDisplayMode.STRETCH.
1936   * @returns { SwiperAttribute }
1937   * @syscap SystemCapability.ArkUI.ArkUI.Full
1938   * @crossplatform
1939   * @form
1940   * @atomicservice
1941   * @since arkts {'1.1':'11','1.2':'20'}
1942   * @arkts 1.1&1.2
1943   */
1944  displayMode(value: SwiperDisplayMode): SwiperAttribute;
1945
1946  /**
1947   * Sets the number of child components to be preloaded(cached).
1948   *
1949   * @param { number } value
1950   * @returns { SwiperAttribute }
1951   * @syscap SystemCapability.ArkUI.ArkUI.Full
1952   * @since 8
1953   */
1954  /**
1955   * Sets the number of child components to be preloaded(cached).
1956   *
1957   * @param { number } value
1958   * @returns { SwiperAttribute }
1959   * @syscap SystemCapability.ArkUI.ArkUI.Full
1960   * @crossplatform
1961   * @form
1962   * @since 10
1963   */
1964  /**
1965   * Sets the number of child components to be preloaded(cached).
1966   *
1967   * <p><strong>NOTE</strong>:
1968   * <br>Which are needed for the specific number of pages immediately before and after the current page.
1969   * <br>If swipeByGroup in displayCount is set to true, child components are cached by group.
1970   * </p>
1971   *
1972   * @param { number } value - Number of child components to be preloaded (cached). Default value is 1.
1973   * Minimum value is 0. If a value less than 0 is set, the default value is used.
1974   * @returns { SwiperAttribute }
1975   * @syscap SystemCapability.ArkUI.ArkUI.Full
1976   * @crossplatform
1977   * @form
1978   * @atomicservice
1979   * @since arkts {'1.1':'11','1.2':'20'}
1980   * @arkts 1.1&1.2
1981   */
1982  cachedCount(value: number): SwiperAttribute;
1983
1984  /**
1985   * Sets the number of child components to be preloaded(cached).
1986   *
1987   * @param { number } count - Number of child components to be preloaded (cached).Default value is 1.
1988   * Minimum value is 0. If a value less than 0 is set, the default value is used.
1989   * @param { boolean } isShown - Whether the cached nodes within the range rendered
1990   * without being added to the render tree. Default value is false.
1991   * @returns { SwiperAttribute } the attribute of the swiper.
1992   * @syscap SystemCapability.ArkUI.ArkUI.Full
1993   * @crossplatform
1994   * @form
1995   * @atomicservice
1996   * @since arkts {'1.1':'15','1.2':'20'}
1997   * @arkts 1.1&1.2
1998   */
1999  cachedCount(count: number, isShown: boolean): SwiperAttribute;
2000
2001  /**
2002   * Sets the number of elements to display per page.
2003   *
2004   * @param { number | string } value
2005   * @returns { SwiperAttribute }
2006   * @syscap SystemCapability.ArkUI.ArkUI.Full
2007   * @since 8
2008   */
2009  /**
2010   * Sets the number of elements to display per page.
2011   *
2012   * @param { number | string | SwiperAutoFill } value
2013   * @returns { SwiperAttribute }
2014   * @syscap SystemCapability.ArkUI.ArkUI.Full
2015   * @crossplatform
2016   * @form
2017   * @since 10
2018   */
2019  /**
2020   * Sets the number of elements to display per page.
2021   *
2022   * If swipeByGroup is set to true:
2023   * 1、All sub-items are grouped from index 0.
2024   * 2、The number of sub-items in each group is the value of displayCount.
2025   * 3、If the number of sub-items in the last group is less than displayCount, placeholder items are added to supplement the number of last group.
2026   * 4、Placeholder items do not display any content and are only used as placeholders.
2027   * 5、When turning pages, turn pages by group.
2028   *
2029   * @param { number | string | SwiperAutoFill } value - Number of elements to display per page. Default value is 1.
2030   * @param { boolean } [swipeByGroup] - Whether to turn pages by group. Default value is false.
2031   * @returns { SwiperAttribute }
2032   * @syscap SystemCapability.ArkUI.ArkUI.Full
2033   * @crossplatform
2034   * @form
2035   * @atomicservice
2036   * @since arkts {'1.1':'11','1.2':'20'}
2037   * @arkts 1.1&1.2
2038   */
2039  displayCount(value: number | string | SwiperAutoFill, swipeByGroup?: boolean): SwiperAttribute;
2040
2041  /**
2042   * Invoked when setting the sliding effect
2043   *
2044   * @param { EdgeEffect } value
2045   * @returns { SwiperAttribute }
2046   * @syscap SystemCapability.ArkUI.ArkUI.Full
2047   * @since 8
2048   */
2049  /**
2050   * Invoked when setting the sliding effect
2051   *
2052   * @param { EdgeEffect } value
2053   * @returns { SwiperAttribute }
2054   * @syscap SystemCapability.ArkUI.ArkUI.Full
2055   * @crossplatform
2056   * @form
2057   * @since 10
2058   */
2059  /**
2060   * Sets the effect used when the component is at one of the edges.
2061   *
2062   * <p><strong>NOTE</strong>:
2063   * <br>This attribute takes effect when loop is set to false.
2064   * </p>
2065   *
2066   * @param { EdgeEffect } value - Effect used when the component is at one of the edges.
2067   * Default value is EdgeEffect.Spring.
2068   * @returns { SwiperAttribute }
2069   * @syscap SystemCapability.ArkUI.ArkUI.Full
2070   * @crossplatform
2071   * @form
2072   * @atomicservice
2073   * @since arkts {'1.1':'11','1.2':'20'}
2074   * @arkts 1.1&1.2
2075   */
2076  effectMode(value: EdgeEffect): SwiperAttribute;
2077
2078  /**
2079   * Sets whether to disable the swipe feature
2080   *
2081   * @param { boolean } value
2082   * @returns { SwiperAttribute }
2083   * @syscap SystemCapability.ArkUI.ArkUI.Full
2084   * @since 8
2085   */
2086  /**
2087   * Sets whether to disable the swipe feature
2088   *
2089   * @param { boolean } value
2090   * @returns { SwiperAttribute }
2091   * @syscap SystemCapability.ArkUI.ArkUI.Full
2092   * @crossplatform
2093   * @form
2094   * @since 10
2095   */
2096  /**
2097   * Sets whether to disable the swipe feature.
2098   *
2099   * @param { boolean } value - Whether to disable the swipe feature. Default value is false.
2100   * @returns { SwiperAttribute }
2101   * @syscap SystemCapability.ArkUI.ArkUI.Full
2102   * @crossplatform
2103   * @form
2104   * @atomicservice
2105   * @since arkts {'1.1':'11','1.2':'20'}
2106   * @arkts 1.1&1.2
2107   */
2108  disableSwipe(value: boolean): SwiperAttribute;
2109
2110  /**
2111   * Sets the animation curve
2112   *
2113   * @param { Curve | string } value
2114   * @returns { SwiperAttribute }
2115   * @syscap SystemCapability.ArkUI.ArkUI.Full
2116   * @since 8
2117   */
2118  /**
2119   * Sets the animation curve
2120   * Curve is an enumeration type for common curves
2121   * ICurve is a curve object
2122   *
2123   * @param { Curve | string | ICurve } value
2124   * @returns { SwiperAttribute }
2125   * @syscap SystemCapability.ArkUI.ArkUI.Full
2126   * @crossplatform
2127   * @form
2128   * @since 10
2129   */
2130  /**
2131   * Sets the animation curve.
2132   * Curve is an enumeration type for common curves
2133   * ICurve is a curve object
2134   *
2135   * @param { Curve | string | ICurve } value - Animation curve.
2136   * Default value is interpolatingSpring(-1, 1, 328, 34).
2137   * @returns { SwiperAttribute }
2138   * @syscap SystemCapability.ArkUI.ArkUI.Full
2139   * @crossplatform
2140   * @form
2141   * @atomicservice
2142   * @since arkts {'1.1':'11','1.2':'20'}
2143   * @arkts 1.1&1.2
2144   */
2145  curve(value: Curve | string | ICurve): SwiperAttribute;
2146
2147  /**
2148   * Called when the index value changes.
2149   *
2150   * @param { function } event
2151   * @returns { SwiperAttribute }
2152   * @syscap SystemCapability.ArkUI.ArkUI.Full
2153   * @since 7
2154   */
2155  /**
2156   * Called when the index value changes.
2157   *
2158   * @param { function } event
2159   * @returns { SwiperAttribute }
2160   * @syscap SystemCapability.ArkUI.ArkUI.Full
2161   * @crossplatform
2162   * @form
2163   * @since 10
2164   */
2165  /**
2166   * Called when the index value changes.
2167   *
2168   * @param { function } event
2169   * @returns { SwiperAttribute }
2170   * @syscap SystemCapability.ArkUI.ArkUI.Full
2171   * @crossplatform
2172   * @form
2173   * @atomicservice
2174   * @since 11
2175   */
2176  /**
2177   * Triggered when the index of the currently displayed child component changes.
2178   * Anonymous Object Rectification
2179   *
2180   * @param { Callback<number> } event
2181   * @returns { SwiperAttribute }
2182   * @syscap SystemCapability.ArkUI.ArkUI.Full
2183   * @crossplatform
2184   * @form
2185   * @atomicservice
2186   * @since arkts {'1.1':'18','1.2':'20'}
2187   * @arkts 1.1&1.2
2188   */
2189  onChange(event: Callback<number>): SwiperAttribute;
2190
2191  /**
2192   * Called when a new index becomes selected. Animation is not necessarily complete.
2193   *
2194   * @param { Callback<number> } event - callback to notify which index has been selected
2195   * @returns { SwiperAttribute }
2196   * @syscap SystemCapability.ArkUI.ArkUI.Full
2197   * @crossplatform
2198   * @form
2199   * @atomicservice
2200   * @since arkts {'1.1':'18','1.2':'20'}
2201   * @arkts 1.1&1.2
2202   */
2203  onSelected(event: Callback<number>): SwiperAttribute;
2204
2205  /**
2206   * Setting indicator style navigation.
2207   *
2208   * @param { IndicatorStyle } value
2209   * @returns { SwiperAttribute }
2210   * @syscap SystemCapability.ArkUI.ArkUI.Full
2211   * @since 8
2212   * @deprecated since 10
2213   */
2214  indicatorStyle(value?: IndicatorStyle): SwiperAttribute;
2215
2216  /**
2217   * The previous margin which can be used to expose a small portion of the previous item.
2218   *
2219   * @param { Length } value - The length of previous margin.
2220   * @returns { SwiperAttribute } The attribute of the swiper.
2221   * @syscap SystemCapability.ArkUI.ArkUI.Full
2222   * @since 10
2223   */
2224  /**
2225   * The previous margin which can be used to expose a small portion of the previous item.
2226   *
2227   * @param { Length } value - The length of previous margin.
2228   * @returns { SwiperAttribute } The attribute of the swiper.
2229   * @syscap SystemCapability.ArkUI.ArkUI.Full
2230   * @crossplatform
2231   * @atomicservice
2232   * @since 11
2233   */
2234  /**
2235   * Sets the previous margin, used to reveal a small part of the previous item.
2236   * When the previous item is empty, do not display blank space.
2237   *
2238   * <p><strong>NOTE</strong>:
2239   * <br>This attribute is effective only when the layout mode of the child components in Swiper is set to stretch,
2240   * which mainly includes two scenarios: 1. displayMode is set to SwiperDisplayMode.STRETCH;
2241   * 2. displayCount is assigned a numeric value.
2242   * <br>When the main axis runs horizontally and either the next margin or previous margin is greater than
2243   * the measured width of the child component, neither the next margin nor previous margin is displayed.
2244   * <br>When the main axis runs vertically and either the next margin or previous margin is greater than
2245   * the measured height of the child component, neither the next margin nor previous margin is displayed.
2246   * </p>
2247   *
2248   * @param { Length } value - The length of previous margin.This attribute cannot be set in percentage.
2249   * Default value is 0.
2250   * @param { boolean } [ignoreBlank] - Whether to hide(ignore) the previous margin on the first page in non-loop scenarios.
2251   * Default value is false.
2252   * @returns { SwiperAttribute } The attribute of the swiper.
2253   * @syscap SystemCapability.ArkUI.ArkUI.Full
2254   * @crossplatform
2255   * @atomicservice
2256   * @since arkts {'1.1':'12','1.2':'20'}
2257   * @arkts 1.1&1.2
2258   */
2259  prevMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute;
2260
2261  /**
2262   * The next margin which can be used to expose a small portion of the latter item.
2263   *
2264   * @param { Length } value - The length of next margin.
2265   * @returns { SwiperAttribute } The attribute of the swiper.
2266   * @syscap SystemCapability.ArkUI.ArkUI.Full
2267   * @since 10
2268   */
2269  /**
2270   * The next margin which can be used to expose a small portion of the latter item.
2271   *
2272   * @param { Length } value - The length of next margin.
2273   * @returns { SwiperAttribute } The attribute of the swiper.
2274   * @syscap SystemCapability.ArkUI.ArkUI.Full
2275   * @crossplatform
2276   * @atomicservice
2277   * @since 11
2278   */
2279  /**
2280   * Sets the next margin, used to reveal a small part of the next item.
2281   * When the next item is empty, do not display blank space.
2282   *
2283   * <p><strong>NOTE</strong>:
2284   * <br>This attribute is effective only when the layout mode of the child components in Swiper is set to stretch,
2285   * which mainly includes two scenarios: 1. displayMode is set to SwiperDisplayMode.STRETCH;
2286   * 2. displayCount is assigned a numeric value.
2287   * <br>When the main axis runs horizontally and either the next margin or previous margin is greater than
2288   * the measured width of the child component, neither the next margin nor previous margin is displayed.
2289   * <br>When the main axis runs vertically and either the next margin or previous margin is greater than
2290   * the measured height of the child component, neither the next margin nor previous margin is displayed.
2291   * </p>
2292   *
2293   * @param { Length } value - The length of next margin. This attribute cannot be set in percentage.
2294   * Default value is 0.
2295   * @param { boolean } [ignoreBlank] - Whether to hide(ignore) the next margin on the last page in non-loop scenarios.
2296   * Default value is false.
2297   * @returns { SwiperAttribute } The attribute of the swiper.
2298   * @syscap SystemCapability.ArkUI.ArkUI.Full
2299   * @crossplatform
2300   * @atomicservice
2301   * @since arkts {'1.1':'12','1.2':'20'}
2302   * @arkts 1.1&1.2
2303   */
2304  nextMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute;
2305
2306  /**
2307   * Called when a new index becomes unselected. Animation is not necessarily complete.
2308   *
2309   * @param { Callback<number> } event - callback to notify which index has been unselected
2310   * @returns { SwiperAttribute }
2311   * @syscap SystemCapability.ArkUI.ArkUI.Full
2312   * @crossplatform
2313   * @form
2314   * @atomicservice
2315   * @since arkts {'1.1':'18','1.2':'20'}
2316   * @arkts 1.1&1.2
2317   */
2318  onUnselected(event: Callback<number>): SwiperAttribute;
2319
2320  /**
2321   * Called when the scroll state of the swiper changed.
2322   *
2323   * @param { Callback<ScrollState> } event - callback to notify the change of the scroll state.
2324   * @returns { SwiperAttribute }
2325   * @syscap SystemCapability.ArkUI.ArkUI.Full
2326   * @crossplatform
2327   * @form
2328   * @atomicservice
2329   * @since 20
2330   */
2331  onScrollStateChanged(event: Callback<ScrollState>): SwiperAttribute
2332
2333  /**
2334   * Called when the swiper animation start.
2335   *
2336   * @param { function } event - the index value of the swiper page that when animation start.
2337   * @returns { SwiperAttribute }
2338   * @syscap SystemCapability.ArkUI.ArkUI.Full
2339   * @since 9
2340   */
2341  /**
2342   * Called when the swiper animation start.
2343   *
2344   * @param { function } event
2345   * "index": the index value of the swiper page that when animation start.
2346   * "targetIndex": the target index value of the swiper page that when animation start.
2347   * "extraInfo": the extra callback info.
2348   * @returns { SwiperAttribute }
2349   * @syscap SystemCapability.ArkUI.ArkUI.Full
2350   * @crossplatform
2351   * @form
2352   * @since 10
2353   */
2354  /**
2355   * Called when the swiper animation start.
2356   *
2357   * @param { function } event
2358   * "index": the index value of the swiper page that when animation start.
2359   * "targetIndex": the target index value of the swiper page that when animation start.
2360   * "extraInfo": the extra callback info.
2361   * @returns { SwiperAttribute }
2362   * @syscap SystemCapability.ArkUI.ArkUI.Full
2363   * @crossplatform
2364   * @form
2365   * @atomicservice
2366   * @since 11
2367   */
2368  /**
2369   * Triggered when the switching animation starts.
2370   * Anonymous Object Rectification
2371   *
2372   * @param { OnSwiperAnimationStartCallback } event
2373   * @returns { SwiperAttribute }
2374   * @syscap SystemCapability.ArkUI.ArkUI.Full
2375   * @crossplatform
2376   * @form
2377   * @atomicservice
2378   * @since arkts {'1.1':'18','1.2':'20'}
2379   * @arkts 1.1&1.2
2380   */
2381  onAnimationStart(event: OnSwiperAnimationStartCallback): SwiperAttribute;
2382
2383  /**
2384   * Called when the swiper animation end.
2385   *
2386   * @param { function } event - the index value of the swiper page that when animation end.
2387   * @returns { SwiperAttribute }
2388   * @syscap SystemCapability.ArkUI.ArkUI.Full
2389   * @since 9
2390   */
2391  /**
2392   * Called when the swiper animation end.
2393   *
2394   * @param { function } event
2395   * "index": the index value of the swiper page that when animation end.
2396   * "extraInfo": the extra callback info.
2397   * @returns { SwiperAttribute }
2398   * @syscap SystemCapability.ArkUI.ArkUI.Full
2399   * @crossplatform
2400   * @form
2401   * @since 10
2402   */
2403  /**
2404   * Called when the swiper animation end.
2405   *
2406   * @param { function } event
2407   * "index": the index value of the swiper page that when animation end.
2408   * "extraInfo": the extra callback info.
2409   * @returns { SwiperAttribute }
2410   * @syscap SystemCapability.ArkUI.ArkUI.Full
2411   * @crossplatform
2412   * @form
2413   * @atomicservice
2414   * @since 11
2415   */
2416  /**
2417   * Triggered when the switching animation ends.
2418   * Anonymous Object Rectification
2419   *
2420   * @param { OnSwiperAnimationEndCallback } event
2421   * @returns { SwiperAttribute }
2422   * @syscap SystemCapability.ArkUI.ArkUI.Full
2423   * @crossplatform
2424   * @form
2425   * @atomicservice
2426   * @since arkts {'1.1':'18','1.2':'20'}
2427   * @arkts 1.1&1.2
2428   */
2429  onAnimationEnd(event: OnSwiperAnimationEndCallback): SwiperAttribute;
2430
2431  /**
2432   * Called when the swiper swipe with the gesture.
2433   *
2434   * @param { function } event
2435   * "index": the index value of the swiper page before gesture swipe.
2436   * "extraInfo": the extra callback info.
2437   * @returns { SwiperAttribute }
2438   * @syscap SystemCapability.ArkUI.ArkUI.Full
2439   * @crossplatform
2440   * @since 10
2441   */
2442  /**
2443   * Called when the swiper swipe with the gesture.
2444   *
2445   * @param { function } event
2446   * "index": the index value of the swiper page before gesture swipe.
2447   * "extraInfo": the extra callback info.
2448   * @returns { SwiperAttribute }
2449   * @syscap SystemCapability.ArkUI.ArkUI.Full
2450   * @crossplatform
2451   * @atomicservice
2452   * @since 11
2453   */
2454  /**
2455   * Triggered on a frame-by-frame basis when the page is turned by a swipe.
2456   * Anonymous Object Rectification
2457   *
2458   * @param { OnSwiperGestureSwipeCallback } event
2459   * @returns { SwiperAttribute }
2460   * @syscap SystemCapability.ArkUI.ArkUI.Full
2461   * @crossplatform
2462   * @atomicservice
2463   * @since arkts {'1.1':'18','1.2':'20'}
2464   * @arkts 1.1&1.2
2465   */
2466  onGestureSwipe(event: OnSwiperGestureSwipeCallback): SwiperAttribute;
2467
2468  /**
2469   * Sets the nested scrolling mode of the Swiper component and its parent container.
2470   *
2471   * <p><strong>NOTE</strong>:
2472   * <br>When loop is set to true, the Swiper component has no edge effect and does not trigger
2473   * nested scrolling of its parent container.
2474   * </p>
2475   *
2476   *
2477   * @param { SwiperNestedScrollMode } value - mode for nested scrolling.
2478   * Default value is SwiperNestedScrollMode.SELF_ONLY.
2479   * @returns { SwiperAttribute } the attribute of the swiper.
2480   * @syscap SystemCapability.ArkUI.ArkUI.Full
2481   * @crossplatform
2482   * @atomicservice
2483   * @since arkts {'1.1':'11','1.2':'20'}
2484   * @arkts 1.1&1.2
2485   */
2486  nestedScroll(value: SwiperNestedScrollMode): SwiperAttribute;
2487
2488  /**
2489   * Defines a custom switching animation.
2490   *
2491   * <p><strong>NOTE</strong>:
2492   * <br>1. This API does not work when prevMargin and nextMargin are set in such a way that
2493   * the Swiper frontend and backend display the same page during loop playback.
2494   * <br>2. During page scrolling, the ContentDidScrollCallback callback is invoked for all pages in the viewport
2495   * on a frame-by-frame basis.
2496   * <br>3. When the swipeByGroup parameter of the displayCount attribute is set to true,
2497   * the callback is invoked for all pages in a group if any page in the group is within the viewport.
2498   * </p>
2499   *
2500   * @param { SwiperContentAnimatedTransition } transition - custom content transition animation.
2501   * @returns { SwiperAttribute } the attribute of the swiper.
2502   * @syscap SystemCapability.ArkUI.ArkUI.Full
2503   * @crossplatform
2504   * @atomicservice
2505   * @since arkts {'1.1':'12','1.2':'20'}
2506   * @arkts 1.1&1.2
2507   */
2508  customContentTransition(transition: SwiperContentAnimatedTransition): SwiperAttribute;
2509
2510  /**
2511   * Triggered when content in the Swiper component scrolls.
2512   *
2513   * <p><strong>NOTE</strong>:
2514   * <br>1. This API does not work when prevMargin and nextMargin are set in such a way that
2515   * the Swiper frontend and backend display the same page during loop playback.
2516   * <br>2. During page scrolling, the ContentDidScrollCallback callback is invoked for all pages in the viewport
2517   * on a frame-by-frame basis.
2518   * <br>3. When the swipeByGroup parameter of the displayCount** attribute is set to true,
2519   * the callback is invoked for all pages in a group if any page in the group is within the viewport.
2520   * </p>
2521   *
2522   * @param { ContentDidScrollCallback } handler - callback of scroll,
2523   * selectedIndex is the index value of the swiper content selected before animation start.
2524   * index is the index value of the swiper content.
2525   * position is the moving ratio of the swiper content from the start position of the swiper main axis.
2526   * mainAxisLength is the swiper main axis length for calculating position.
2527   * @returns { SwiperAttribute } the attribute of the swiper.
2528   * @syscap SystemCapability.ArkUI.ArkUI.Full
2529   * @crossplatform
2530   * @atomicservice
2531   * @since arkts {'1.1':'12','1.2':'20'}
2532   * @arkts 1.1&1.2
2533   */
2534  onContentDidScroll(handler: ContentDidScrollCallback): SwiperAttribute;
2535
2536  /**
2537   * Sets whether the navigation indicator is interactive.
2538   *
2539   * @param { boolean } value - Whether the navigation indicator is interactive. Default value is true.
2540   * @returns { SwiperAttribute }
2541   * @syscap SystemCapability.ArkUI.ArkUI.Full
2542   * @crossplatform
2543   * @atomicservice
2544   * @since arkts {'1.1':'12','1.2':'20'}
2545   * @arkts 1.1&1.2
2546   */
2547  indicatorInteractive(value: boolean): SwiperAttribute;
2548
2549  /**
2550   * Setting page flip mode on mouse wheel event.
2551   *
2552   * @param { Optional<PageFlipMode> } mode - page flip mode on mouse wheel event. The default value is PageFlipMode.CONTINUOUS.
2553   * @returns { SwiperAttribute }
2554   * @syscap SystemCapability.ArkUI.ArkUI.Full
2555   * @crossplatform
2556   * @form
2557   * @atomicservice
2558   * @since arkts {'1.1':'15','1.2':'20'}
2559   * @arkts 1.1&1.2
2560   */
2561  pageFlipMode(mode: Optional<PageFlipMode>): SwiperAttribute;
2562
2563  /**
2564   * Called when the swiper content will scroll.
2565   *
2566   * @param { ContentWillScrollCallback } handler - callback of will scroll.
2567   * @returns { SwiperAttribute } the attribute of the swiper.
2568   * @syscap SystemCapability.ArkUI.ArkUI.Full
2569   * @crossplatform
2570   * @form
2571   * @atomicservice
2572   * @since arkts {'1.1':'15','1.2':'20'}
2573   * @arkts 1.1&1.2
2574   */
2575  onContentWillScroll(handler: ContentWillScrollCallback): SwiperAttribute;
2576
2577  /**
2578   * Set maintain visible content position.
2579   *
2580   * @param { boolean } enabled - maintain visible content position.
2581   * Default value is false.
2582   * @returns { SwiperAttribute } the attribute of swiper.
2583   * @syscap SystemCapability.ArkUI.ArkUI.Full
2584   * @crossplatform
2585   * @form
2586   * @atomicservice
2587   * @since 20
2588   */
2589  maintainVisibleContentPosition(enabled: boolean): SwiperAttribute;
2590}
2591
2592/**
2593 * Defines the swiper content animated transition options.
2594 *
2595 * @interface SwiperContentAnimatedTransition
2596 * @syscap SystemCapability.ArkUI.ArkUI.Full
2597 * @crossplatform
2598 * @atomicservice
2599 * @since arkts {'1.1':'12','1.2':'20'}
2600 * @arkts 1.1&1.2
2601 */
2602declare interface SwiperContentAnimatedTransition {
2603  /**
2604   * Defines the timeout of custom content transition animation after the page is moved out of the swiper. The unit is ms.
2605   * If SwiperContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time.
2606   *
2607   * @type { ?number }
2608   * @default 0 ms
2609   * @syscap SystemCapability.ArkUI.ArkUI.Full
2610   * @crossplatform
2611   * @atomicservice
2612   * @since arkts {'1.1':'12','1.2':'20'}
2613   * @arkts 1.1&1.2
2614   */
2615  timeout?: number;
2616
2617  /**
2618   * Called when custom content transition animation start.
2619   *
2620   * @type { Callback<SwiperContentTransitionProxy> }
2621   * @syscap SystemCapability.ArkUI.ArkUI.Full
2622   * @crossplatform
2623   * @atomicservice
2624   * @since arkts {'1.1':'12','1.2':'20'}
2625   * @arkts 1.1&1.2
2626   */
2627  transition: Callback<SwiperContentTransitionProxy>;
2628}
2629
2630/**
2631 * The proxy of SwiperContentAnimatedTransition.
2632 *
2633 * @interface SwiperContentTransitionProxy
2634 * @syscap SystemCapability.ArkUI.ArkUI.Full
2635 * @crossplatform
2636 * @atomicservice
2637 * @since arkts {'1.1':'12','1.2':'20'}
2638 * @arkts 1.1&1.2
2639 */
2640declare interface SwiperContentTransitionProxy {
2641  /**
2642   * the index value of the swiper content selected before animation start.
2643   *
2644   * @type { number }
2645   * @syscap SystemCapability.ArkUI.ArkUI.Full
2646   * @crossplatform
2647   * @atomicservice
2648   * @since arkts {'1.1':'12','1.2':'20'}
2649   * @arkts 1.1&1.2
2650   */
2651  selectedIndex: number;
2652
2653  /**
2654   * The index value of the swiper content.
2655   *
2656   * @type { number }
2657   * @syscap SystemCapability.ArkUI.ArkUI.Full
2658   * @crossplatform
2659   * @atomicservice
2660   * @since arkts {'1.1':'12','1.2':'20'}
2661   * @arkts 1.1&1.2
2662   */
2663  index: number;
2664
2665  /**
2666   * the moving ratio of the swiper content from the start position of the swiper main axis.
2667   *
2668   * @type { number }
2669   * @syscap SystemCapability.ArkUI.ArkUI.Full
2670   * @crossplatform
2671   * @atomicservice
2672   * @since arkts {'1.1':'12','1.2':'20'}
2673   * @arkts 1.1&1.2
2674   */
2675  position: number;
2676
2677  /**
2678   * the swiper main axis length for calculating position.
2679   *
2680   * @type { number }
2681   * @syscap SystemCapability.ArkUI.ArkUI.Full
2682   * @crossplatform
2683   * @atomicservice
2684   * @since arkts {'1.1':'12','1.2':'20'}
2685   * @arkts 1.1&1.2
2686   */
2687  mainAxisLength: number;
2688
2689  /**
2690   * Notifies Swiper page the custom content transition animation is complete.
2691   *
2692   * @syscap SystemCapability.ArkUI.ArkUI.Full
2693   * @crossplatform
2694   * @atomicservice
2695   * @since arkts {'1.1':'12','1.2':'20'}
2696   * @arkts 1.1&1.2
2697   */
2698  finishTransition(): void;
2699}
2700
2701/**
2702 * The result of swiper ContentWillScrollCallback.
2703 *
2704 * @interface SwiperContentWillScrollResult
2705 * @syscap SystemCapability.ArkUI.ArkUI.Full
2706 * @crossplatform
2707 * @form
2708 * @atomicservice
2709 * @since arkts {'1.1':'15','1.2':'20'}
2710 * @arkts 1.1&1.2
2711 */
2712declare interface SwiperContentWillScrollResult {
2713  /**
2714   * the index value of the current child page.
2715   *
2716   * @type { number }
2717   * @syscap SystemCapability.ArkUI.ArkUI.Full
2718   * @crossplatform
2719   * @form
2720   * @atomicservice
2721   * @since arkts {'1.1':'15','1.2':'20'}
2722   * @arkts 1.1&1.2
2723   */
2724  currentIndex: number;
2725
2726  /**
2727   * the index value of the child page that will display.
2728   *
2729   * @type { number }
2730   * @syscap SystemCapability.ArkUI.ArkUI.Full
2731   * @crossplatform
2732   * @form
2733   * @atomicservice
2734   * @since arkts {'1.1':'15','1.2':'20'}
2735   * @arkts 1.1&1.2
2736   */
2737  comingIndex: number;
2738
2739  /**
2740   * the sliding offset of each frame. Positive numbers indicating slide backward(e.g. from index=1 to index=0),
2741   * negative numbers indicating slide forward(e.g. from index=0 to index=1).
2742   *
2743   * @type { number }
2744   * @syscap SystemCapability.ArkUI.ArkUI.Full
2745   * @crossplatform
2746   * @form
2747   * @atomicservice
2748   * @since arkts {'1.1':'15','1.2':'20'}
2749   * @arkts 1.1&1.2
2750   */
2751  offset: number;
2752}
2753
2754/**
2755 * The callback of onContentDidScroll.
2756 *
2757 * @typedef { function } ContentDidScrollCallback
2758 * @param { number } selectedIndex - the index value of the swiper content selected before animation start.
2759 * @param { number } index - the index value of the swiper content.
2760 * @param { number } position - the moving ratio of the swiper content from the start position of the swiper main axis.
2761 * @param { number } mainAxisLength - the swiper main axis length for calculating position.
2762 * @syscap SystemCapability.ArkUI.ArkUI.Full
2763 * @crossplatform
2764 * @atomicservice
2765 * @since arkts {'1.1':'12','1.2':'20'}
2766 * @arkts 1.1&1.2
2767 */
2768declare type ContentDidScrollCallback = (selectedIndex: number, index: number, position: number, mainAxisLength: number) => void;
2769
2770/**
2771 * The callback of onContentWillScroll.
2772 *
2773 * @typedef { function } ContentWillScrollCallback
2774 * @param { SwiperContentWillScrollResult } result - the result of swiper ContentWillScrollCallback.
2775 * @returns { boolean } whether to allow scroll, true indicating can scroll and false indicating can not scroll.
2776 * @syscap SystemCapability.ArkUI.ArkUI.Full
2777 * @crossplatform
2778 * @form
2779 * @atomicservice
2780 * @since arkts {'1.1':'15','1.2':'20'}
2781 * @arkts 1.1&1.2
2782 */
2783declare type ContentWillScrollCallback = (result: SwiperContentWillScrollResult) => boolean;
2784
2785/**
2786 * Defines Swiper Component.
2787 *
2788 * @syscap SystemCapability.ArkUI.ArkUI.Full
2789 * @since 7
2790 */
2791/**
2792 * Defines Swiper Component.
2793 *
2794 * @syscap SystemCapability.ArkUI.ArkUI.Full
2795 * @crossplatform
2796 * @form
2797 * @since 10
2798 */
2799/**
2800 * Defines Swiper Component.
2801 *
2802 * @syscap SystemCapability.ArkUI.ArkUI.Full
2803 * @crossplatform
2804 * @form
2805 * @atomicservice
2806 * @since 11
2807 */
2808declare const Swiper: SwiperInterface;
2809
2810/**
2811 * Defines Swiper Component instance.
2812 *
2813 * @syscap SystemCapability.ArkUI.ArkUI.Full
2814 * @since 7
2815 */
2816/**
2817 * Defines Swiper Component instance.
2818 *
2819 * @syscap SystemCapability.ArkUI.ArkUI.Full
2820 * @crossplatform
2821 * @form
2822 * @since 10
2823 */
2824/**
2825 * Defines Swiper Component instance.
2826 *
2827 * @syscap SystemCapability.ArkUI.ArkUI.Full
2828 * @crossplatform
2829 * @form
2830 * @atomicservice
2831 * @since 11
2832 */
2833declare const SwiperInstance: SwiperAttribute;
2834