idlize

Форк
0
/
text_picker.d.ts 
1138 строк · 26.2 Кб
1
/*
2
 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3
 * Licensed under the Apache License, Version 2.0 (the "License");
4
 * you may not use this file except in compliance with the License.
5
 * You may obtain a copy of the License at
6
 *
7
 *     http://www.apache.org/licenses/LICENSE-2.0
8
 *
9
 * Unless required by applicable law or agreed to in writing, software
10
 * distributed under the License is distributed on an "AS IS" BASIS,
11
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 * See the License for the specific language governing permissions and
13
 * limitations under the License.
14
 */
15

16
/**
17
 * @file
18
 * @kit ArkUI
19
 */
20

21
/**
22
 * Define the contents of each selector item.
23
 *
24
 * @interface TextPickerRangeContent
25
 * @syscap SystemCapability.ArkUI.ArkUI.Full
26
 * @crossplatform
27
 * @since 10
28
 */
29
/**
30
 * Define the contents of each selector item.
31
 *
32
 * @interface TextPickerRangeContent
33
 * @syscap SystemCapability.ArkUI.ArkUI.Full
34
 * @crossplatform
35
 * @atomicservice
36
 * @since 11
37
 */
38
declare interface TextPickerRangeContent {
39
  /**
40
   * Specifies the icon content.
41
   *
42
   * @type { string | Resource }
43
   * @syscap SystemCapability.ArkUI.ArkUI.Full
44
   * @crossplatform
45
   * @since 10
46
   */
47
  /**
48
   * Specifies the icon content.
49
   *
50
   * @type { string | Resource }
51
   * @syscap SystemCapability.ArkUI.ArkUI.Full
52
   * @crossplatform
53
   * @atomicservice
54
   * @since 11
55
   */
56
  icon: string | Resource;
57

58
  /**
59
   * Specifies the text content.
60
   *
61
   * @type { ?(string | Resource) }
62
   * @syscap SystemCapability.ArkUI.ArkUI.Full
63
   * @crossplatform
64
   * @since 10
65
   */
66
  /**
67
   * Specifies the text content.
68
   *
69
   * @type { ?(string | Resource) }
70
   * @syscap SystemCapability.ArkUI.ArkUI.Full
71
   * @crossplatform
72
   * @atomicservice
73
   * @since 11
74
   */
75
  text?: string | Resource;
76
}
77

78
/**
79
 * Define the contents of text cascade picker.
80
 *
81
 * @interface TextCascadePickerRangeContent
82
 * @syscap SystemCapability.ArkUI.ArkUI.Full
83
 * @since 10
84
 */
85
/**
86
 * Define the contents of text cascade picker.
87
 *
88
 * @interface TextCascadePickerRangeContent
89
 * @syscap SystemCapability.ArkUI.ArkUI.Full
90
 * @crossplatform
91
 * @atomicservice
92
 * @since 11
93
 */
94
declare interface TextCascadePickerRangeContent {
95
  /**
96
   * Specifies the text content.
97
   *
98
   * @type { string | Resource }
99
   * @syscap SystemCapability.ArkUI.ArkUI.Full
100
   * @since 10
101
   */
102
  /**
103
   * Specifies the text content.
104
   *
105
   * @type { string | Resource }
106
   * @syscap SystemCapability.ArkUI.ArkUI.Full
107
   * @crossplatform
108
   * @atomicservice
109
   * @since 11
110
   */
111
  text: string | Resource;
112

113
  /**
114
   * Defines the text cascade picker children.
115
   *
116
   * @type { ?TextCascadePickerRangeContent[] }
117
   * @syscap SystemCapability.ArkUI.ArkUI.Full
118
   * @since 10
119
   */
120
  /**
121
   * Defines the text cascade picker children.
122
   *
123
   * @type { ?TextCascadePickerRangeContent[] }
124
   * @syscap SystemCapability.ArkUI.ArkUI.Full
125
   * @crossplatform
126
   * @atomicservice
127
   * @since 11
128
   */
129
  children?: TextCascadePickerRangeContent[];
130
}
131

132
/**
133
 * Defines the options of TextPicker.
134
 *
135
 * @interface TextPickerOptions
136
 * @syscap SystemCapability.ArkUI.ArkUI.Full
137
 * @since 8
138
 */
139
/**
140
 * Defines the options of TextPicker.
141
 *
142
 * @interface TextPickerOptions
143
 * @syscap SystemCapability.ArkUI.ArkUI.Full
144
 * @crossplatform
145
 * @since 10
146
 */
147
/**
148
 * Defines the options of TextPicker.
149
 *
150
 * @interface TextPickerOptions
151
 * @syscap SystemCapability.ArkUI.ArkUI.Full
152
 * @crossplatform
153
 * @atomicservice
154
 * @since 11
155
 */
156
declare interface TextPickerOptions {
157
  /**
158
   * Specifies the range of the text selector.
159
   *
160
   * @type {string[] | Resource}
161
   * @syscap SystemCapability.ArkUI.ArkUI.Full
162
   * @since 8
163
   */
164
  /**
165
   * Specifies the range of the selector.
166
   * Support the display of pictures, text and pictures plus text, or multi column plain text.
167
   *
168
   * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]}
169
   * @syscap SystemCapability.ArkUI.ArkUI.Full
170
   * @crossplatform
171
   * @since 10
172
   */
173
  /**
174
   * Specifies the range of the selector.
175
   * Support the display of pictures, text and pictures plus text, or multi column plain text.
176
   *
177
   * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]}
178
   * @syscap SystemCapability.ArkUI.ArkUI.Full
179
   * @crossplatform
180
   * @atomicservice
181
   * @since 11
182
   */
183
  range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[];
184

185
  /**
186
   * Value of the current selection.
187
   *
188
   * @type { ?string }
189
   * @syscap SystemCapability.ArkUI.ArkUI.Full
190
   * @since 8
191
   */
192
  /**
193
   * Value of the current selection.
194
   * Only valid when only text is displayed.
195
   *
196
   * @type { ?(string | string[]) }
197
   * @syscap SystemCapability.ArkUI.ArkUI.Full
198
   * @crossplatform
199
   * @since 10
200
   */
201
  /**
202
   * Value of the current selection.
203
   * Only valid when only text is displayed.
204
   *
205
   * @type { ?(string | string[]) }
206
   * @syscap SystemCapability.ArkUI.ArkUI.Full
207
   * @crossplatform
208
   * @atomicservice
209
   * @since 11
210
   */
211
  value?: string | string[];
212

213
  /**
214
   * Current selected subscript.
215
   *
216
   * @type { ?number }
217
   * @syscap SystemCapability.ArkUI.ArkUI.Full
218
   * @since 8
219
   */
220
  /**
221
   * Current selected subscript.
222
   *
223
   * @type { ?(number | number[]) }
224
   * @syscap SystemCapability.ArkUI.ArkUI.Full
225
   * @crossplatform
226
   * @since 10
227
   */
228
  /**
229
   * Current selected subscript.
230
   *
231
   * @type { ?(number | number[]) }
232
   * @syscap SystemCapability.ArkUI.ArkUI.Full
233
   * @crossplatform
234
   * @atomicservice
235
   * @since 11
236
   */
237
  selected?: number | number[];
238
}
239

240
/**
241
 * TextPickerInterface
242
 *
243
 * @interface TextPickerInterface
244
 * @syscap SystemCapability.ArkUI.ArkUI.Full
245
 * @since 8
246
 */
247
/**
248
 * TextPickerInterface
249
 *
250
 * @interface TextPickerInterface
251
 * @syscap SystemCapability.ArkUI.ArkUI.Full
252
 * @crossplatform
253
 * @since 10
254
 */
255
/**
256
 * TextPickerInterface
257
 *
258
 * @interface TextPickerInterface
259
 * @syscap SystemCapability.ArkUI.ArkUI.Full
260
 * @crossplatform
261
 * @atomicservice
262
 * @since 11
263
 */
264
interface TextPickerInterface {
265
  /**
266
   * Defines the TextPicker constructor.
267
   *
268
   * @param { TextPickerOptions } options
269
   * @returns { TextPickerAttribute }
270
   * @syscap SystemCapability.ArkUI.ArkUI.Full
271
   * @since 8
272
   */
273
  /**
274
   * Defines the TextPicker constructor.
275
   *
276
   * @param { TextPickerOptions } options
277
   * @returns { TextPickerAttribute }
278
   * @syscap SystemCapability.ArkUI.ArkUI.Full
279
   * @crossplatform
280
   * @since 10
281
   */
282
  /**
283
   * Defines the TextPicker constructor.
284
   *
285
   * @param { TextPickerOptions } options
286
   * @returns { TextPickerAttribute }
287
   * @syscap SystemCapability.ArkUI.ArkUI.Full
288
   * @crossplatform
289
   * @atomicservice
290
   * @since 11
291
   */
292
  (options?: TextPickerOptions): TextPickerAttribute;
293
}
294

295
/**
296
 * Defines the struct of DividerOptions.
297
 *
298
 * @interface DividerOptions
299
 * @syscap SystemCapability.ArkUI.ArkUI.Full
300
 * @crossplatform
301
 * @since 12
302
 */
303
declare interface DividerOptions {
304
  /**
305
   * The strokeWidth of Divider.
306
   *
307
   * @type { ?Dimension }
308
   * @syscap SystemCapability.ArkUI.ArkUI.Full
309
   * @crossplatform
310
   * @since 12
311
   */
312
  strokeWidth?: Dimension;
313

314
  /**
315
   * The color of Divider.
316
   *
317
   * @type { ?ResourceColor }
318
   * @syscap SystemCapability.ArkUI.ArkUI.Full
319
   * @crossplatform
320
   * @since 12
321
   */
322
  color?: ResourceColor;
323

324
  /**
325
   * The startMargin of Divider.
326
   *
327
   * @type { ?Dimension }
328
   * @syscap SystemCapability.ArkUI.ArkUI.Full
329
   * @crossplatform
330
   * @since 12
331
   */
332
  startMargin?: Dimension;
333

334
  /**
335
   * The endMargin of Divider.
336
   *
337
   * @type { ?Dimension }
338
   * @syscap SystemCapability.ArkUI.ArkUI.Full
339
   * @crossplatform
340
   * @since 12
341
   */
342
  endMargin?: Dimension;
343
}
344

345
/**
346
 * Style the text selector.
347
 *
348
 * @extends CommonMethod<TextPickerAttribute>
349
 * @syscap SystemCapability.ArkUI.ArkUI.Full
350
 * @since 8
351
 */
352
/**
353
 * Style the text selector.
354
 *
355
 * @extends CommonMethod<TextPickerAttribute>
356
 * @syscap SystemCapability.ArkUI.ArkUI.Full
357
 * @crossplatform
358
 * @since 10
359
 */
360
/**
361
 * Style the text selector.
362
 *
363
 * @extends CommonMethod<TextPickerAttribute>
364
 * @syscap SystemCapability.ArkUI.ArkUI.Full
365
 * @crossplatform
366
 * @atomicservice
367
 * @since 11
368
 */
369
declare class TextPickerAttribute extends CommonMethod<TextPickerAttribute> {
370
  /**
371
   * Called when the default height of the selected element is set.
372
   *
373
   * @param { number | string } value
374
   * @returns { TextPickerAttribute }
375
   * @syscap SystemCapability.ArkUI.ArkUI.Full
376
   * @since 8
377
   */
378
  /**
379
   * Called when the default height of the selected element is set.
380
   *
381
   * @param { number | string } value
382
   * @returns { TextPickerAttribute }
383
   * @syscap SystemCapability.ArkUI.ArkUI.Full
384
   * @crossplatform
385
   * @since 10
386
   */
387
  /**
388
   * Called when the default height of the selected element is set.
389
   *
390
   * @param { number | string } value
391
   * @returns { TextPickerAttribute }
392
   * @syscap SystemCapability.ArkUI.ArkUI.Full
393
   * @crossplatform
394
   * @atomicservice
395
   * @since 11
396
   */
397
  defaultPickerItemHeight(value: number | string): TextPickerAttribute;
398

399
  /**
400
   * Can scroll loop if true is set, on the contrary it can not.
401
   *
402
   * @param { boolean } value
403
   * @returns { TextPickerAttribute }
404
   * @syscap SystemCapability.ArkUI.ArkUI.Full
405
   * @since 10
406
   */
407
  /**
408
   * Can scroll loop if true is set, on the contrary it can not.
409
   *
410
   * @param { boolean } value
411
   * @returns { TextPickerAttribute }
412
   * @syscap SystemCapability.ArkUI.ArkUI.Full
413
   * @crossplatform
414
   * @atomicservice
415
   * @since 11
416
   */
417
  canLoop(value: boolean): TextPickerAttribute;
418

419
  /**
420
   * Sets the text style of disappearing items
421
   *
422
   * @param { PickerTextStyle } value - indicates the text style of disappearing items.
423
   * @returns { TextPickerAttribute }
424
   * @syscap SystemCapability.ArkUI.ArkUI.Full
425
   * @crossplatform
426
   * @since 10
427
   */
428
  /**
429
   * Sets the text style of disappearing items
430
   *
431
   * @param { PickerTextStyle } value - indicates the text style of disappearing items.
432
   * @returns { TextPickerAttribute }
433
   * @syscap SystemCapability.ArkUI.ArkUI.Full
434
   * @crossplatform
435
   * @atomicservice
436
   * @since 11
437
   */
438
  // disappearTextStyle(value: PickerTextStyle): TextPickerAttribute;
439

440
  /**
441
   * Sets the text style of normal items
442
   *
443
   * @param { PickerTextStyle } value - indicates the text style of normal items.
444
   * @returns { TextPickerAttribute }
445
   * @syscap SystemCapability.ArkUI.ArkUI.Full
446
   * @crossplatform
447
   * @since 10
448
   */
449
  /**
450
   * Sets the text style of normal items
451
   *
452
   * @param { PickerTextStyle } value - indicates the text style of normal items.
453
   * @returns { TextPickerAttribute }
454
   * @syscap SystemCapability.ArkUI.ArkUI.Full
455
   * @crossplatform
456
   * @atomicservice
457
   * @since 11
458
   */
459
  // textStyle(value: PickerTextStyle): TextPickerAttribute;
460

461
  /**
462
   * Sets the text style of selected items
463
   *
464
   * @param { PickerTextStyle } value - indicates the text style of selected items.
465
   * @returns { TextPickerAttribute }
466
   * @syscap SystemCapability.ArkUI.ArkUI.Full
467
   * @crossplatform
468
   * @since 10
469
   */
470
  /**
471
   * Sets the text style of selected items
472
   *
473
   * @param { PickerTextStyle } value - indicates the text style of selected items.
474
   * @returns { TextPickerAttribute }
475
   * @syscap SystemCapability.ArkUI.ArkUI.Full
476
   * @crossplatform
477
   * @atomicservice
478
   * @since 11
479
   */
480
  // selectedTextStyle(value: PickerTextStyle): TextPickerAttribute;
481

482
  /**
483
   * Called when the pop-up value is returned.
484
   *
485
   * @param { function } callback
486
   * @returns { TextPickerAttribute }
487
   * @syscap SystemCapability.ArkUI.ArkUI.Full
488
   * @since 8
489
   * @deprecated since 10
490
   */
491
  onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
492

493
  /**
494
   * Called when the Cancel button in the pop-up window is clicked.
495
   *
496
   * @param { function } callback
497
   * @returns { TextPickerAttribute }
498
   * @syscap SystemCapability.ArkUI.ArkUI.Full
499
   * @since 8
500
   * @deprecated since 10
501
   */
502
  onCancel(callback: () => void): TextPickerAttribute;
503

504
  /**
505
   * Called when the OK button in the pop-up window is clicked.
506
   *
507
   * @param { function } callback - the callback of onChange.
508
   * @returns { TextPickerAttribute }
509
   * @syscap SystemCapability.ArkUI.ArkUI.Full
510
   * @since 8
511
   */
512
  /**
513
   * This event is triggered when a TextPicker item is selected.
514
   * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "".
515
   *
516
   * @param { function } callback - the callback of onChange.
517
   * @returns { TextPickerAttribute }
518
   * @syscap SystemCapability.ArkUI.ArkUI.Full
519
   * @crossplatform
520
   * @since 10
521
   */
522
  /**
523
   * This event is triggered when a TextPicker item is selected.
524
   * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "".
525
   *
526
   * @param { function } callback - the callback of onChange.
527
   * @returns { TextPickerAttribute }
528
   * @syscap SystemCapability.ArkUI.ArkUI.Full
529
   * @crossplatform
530
   * @atomicservice
531
   * @since 11
532
   */
533
  onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute;
534

535
  /**
536
   * Set the selected indices.
537
   * The array size is the total number of columns.
538
   *
539
   * @param { number | number[] } value - the selected indices.
540
   * @returns { TextPickerAttribute }
541
   * @syscap SystemCapability.ArkUI.ArkUI.Full
542
   * @crossplatform
543
   * @since 10
544
   */
545
  /**
546
   * Set the selected indices.
547
   * The array size is the total number of columns.
548
   *
549
   * @param { number | number[] } value - the selected indices.
550
   * @returns { TextPickerAttribute }
551
   * @syscap SystemCapability.ArkUI.ArkUI.Full
552
   * @crossplatform
553
   * @atomicservice
554
   * @since 11
555
   */
556
  selectedIndex(value: number | number[]): TextPickerAttribute;
557

558
  /**
559
   * Set the divider of TextPicker
560
   *
561
   * @param { DividerOptions | null } value
562
   * @returns { TextPickerAttribute }
563
   * @syscap SystemCapability.ArkUI.ArkUI.Full
564
   * @crossplatform
565
   * @since 12
566
   */
567
  divider(value: DividerOptions | null): TextPickerAttribute;
568

569
  /**
570
   * Called when set the height of gradient
571
   *
572
   * @param { Dimension } value - The value the gradient height
573
   * @returns { TextPickerAttribute }
574
   * @syscap SystemCapability.ArkUI.ArkUI.Full
575
   * @crossplatform
576
   * @since 12
577
   */
578
  gradientHeight(value: Dimension): TextPickerAttribute;
579
}
580

581
/**
582
 * Defines the struct of TextPickerResult.
583
 *
584
 * @interface TextPickerResult
585
 * @syscap SystemCapability.ArkUI.ArkUI.Full
586
 * @since 8
587
 */
588
/**
589
 * Defines the struct of TextPickerResult.
590
 *
591
 * @interface TextPickerResult
592
 * @syscap SystemCapability.ArkUI.ArkUI.Full
593
 * @crossplatform
594
 * @since 10
595
 */
596
/**
597
 * Defines the struct of TextPickerResult.
598
 *
599
 * @interface TextPickerResult
600
 * @syscap SystemCapability.ArkUI.ArkUI.Full
601
 * @crossplatform
602
 * @atomicservice
603
 * @since 11
604
 */
605
declare interface TextPickerResult {
606
  /**
607
   * The currently selected value.
608
   *
609
   * @type { string }
610
   * @syscap SystemCapability.ArkUI.ArkUI.Full
611
   * @since 8
612
   */
613
  /**
614
   * The currently selected value.
615
   * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "".
616
   *
617
   * @type { string | string[] }
618
   * @syscap SystemCapability.ArkUI.ArkUI.Full
619
   * @crossplatform
620
   * @since 10
621
   */
622
  /**
623
   * The currently selected value.
624
   * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "".
625
   *
626
   * @type { string | string[] }
627
   * @syscap SystemCapability.ArkUI.ArkUI.Full
628
   * @crossplatform
629
   * @atomicservice
630
   * @since 11
631
   */
632
  value: string | string[];
633

634
  /**
635
   * The subscript of the current selection.
636
   *
637
   * @type { number }
638
   * @syscap SystemCapability.ArkUI.ArkUI.Full
639
   * @since 8
640
   */
641
  /**
642
   * The subscript of the current selection.
643
   *
644
   * @type { number | number[] }
645
   * @syscap SystemCapability.ArkUI.ArkUI.Full
646
   * @crossplatform
647
   * @since 10
648
   */
649
  /**
650
   * The subscript of the current selection.
651
   *
652
   * @type { number | number[] }
653
   * @syscap SystemCapability.ArkUI.ArkUI.Full
654
   * @crossplatform
655
   * @atomicservice
656
   * @since 11
657
   */
658
  index: number | number[];
659
}
660

661
/**
662
 * Defines the TextPickerDialogOptions for Text Picker Dialog.
663
 *
664
 * @interface TextPickerDialogOptions
665
 * @syscap SystemCapability.ArkUI.ArkUI.Full
666
 * @since 8
667
 */
668
/**
669
 * Defines the TextPickerDialogOptions for Text Picker Dialog.
670
 *
671
 * @interface TextPickerDialogOptions
672
 * @syscap SystemCapability.ArkUI.ArkUI.Full
673
 * @crossplatform
674
 * @since 10
675
 */
676
/**
677
 * Defines the TextPickerDialogOptions for Text Picker Dialog.
678
 *
679
 * @interface TextPickerDialogOptions
680
 * @syscap SystemCapability.ArkUI.ArkUI.Full
681
 * @crossplatform
682
 * @atomicservice
683
 * @since 11
684
 */
685
declare interface TextPickerDialogOptions extends TextPickerOptions {
686
  /**
687
   * Called when the default height of the selected element is set.
688
   *
689
   * @type { ?(number | string) }
690
   * @syscap SystemCapability.ArkUI.ArkUI.Full
691
   * @since 8
692
   */
693
  /**
694
   * Called when the default height of the selected element is set.
695
   *
696
   * @type { ?(number | string) }
697
   * @syscap SystemCapability.ArkUI.ArkUI.Full
698
   * @crossplatform
699
   * @since 10
700
   */
701
  /**
702
   * Called when the default height of the selected element is set.
703
   *
704
   * @type { ?(number | string) }
705
   * @syscap SystemCapability.ArkUI.ArkUI.Full
706
   * @crossplatform
707
   * @atomicservice
708
   * @since 11
709
   */
710
  defaultPickerItemHeight?: number | string;
711

712
  /**
713
   * Can scroll loop if true is set, on the contrary it can not.
714
   *
715
   * @type { ?boolean }
716
   * @default true
717
   * @syscap SystemCapability.ArkUI.ArkUI.Full
718
   * @since 10
719
   */
720
  /**
721
   * Can scroll loop if true is set, on the contrary it can not.
722
   *
723
   * @type { ?boolean }
724
   * @default true
725
   * @syscap SystemCapability.ArkUI.ArkUI.Full
726
   * @crossplatform
727
   * @atomicservice
728
   * @since 11
729
   */
730
  canLoop?: boolean;
731

732
  /**
733
   * Text style of disappearing items
734
   *
735
   * @type { ?PickerTextStyle }
736
   * @syscap SystemCapability.ArkUI.ArkUI.Full
737
   * @crossplatform
738
   * @since 10
739
   */
740
  /**
741
   * Text style of disappearing items
742
   *
743
   * @type { ?PickerTextStyle }
744
   * @syscap SystemCapability.ArkUI.ArkUI.Full
745
   * @crossplatform
746
   * @atomicservice
747
   * @since 11
748
   */
749
  // disappearTextStyle?: PickerTextStyle;
750

751
  /**
752
   * Text style of normal items
753
   *
754
   * @type { ?PickerTextStyle }
755
   * @syscap SystemCapability.ArkUI.ArkUI.Full
756
   * @crossplatform
757
   * @since 10
758
   */
759
  /**
760
   * Text style of normal items
761
   *
762
   * @type { ?PickerTextStyle }
763
   * @syscap SystemCapability.ArkUI.ArkUI.Full
764
   * @crossplatform
765
   * @atomicservice
766
   * @since 11
767
   */
768
  // textStyle?: PickerTextStyle;
769

770
  /**
771
   * Style of accept button.
772
   *
773
   * @type { ?PickerDialogButtonStyle }
774
   * @syscap SystemCapability.ArkUI.ArkUI.Full
775
   * @crossplatform
776
   * @since 12
777
   */
778
  //acceptButtonStyle?: PickerDialogButtonStyle;
779

780
  /**
781
   * Style of cancel button.
782
   *
783
   * @type { ?PickerDialogButtonStyle }
784
   * @syscap SystemCapability.ArkUI.ArkUI.Full
785
   * @crossplatform
786
   * @since 12
787
   */
788
  //cancelButtonStyle?: PickerDialogButtonStyle;
789

790
  /**
791
   * Text style of selected items
792
   *
793
   * @type { ?PickerTextStyle }
794
   * @syscap SystemCapability.ArkUI.ArkUI.Full
795
   * @crossplatform
796
   * @since 10
797
   */
798
  /**
799
   * Text style of selected items
800
   *
801
   * @type { ?PickerTextStyle }
802
   * @syscap SystemCapability.ArkUI.ArkUI.Full
803
   * @crossplatform
804
   * @atomicservice
805
   * @since 11
806
   */
807
  // selectedTextStyle?: PickerTextStyle;
808
  /**
809
   * Called when the OK button in the dialog is clicked.
810
   *
811
   * @type { ?function }
812
   * @syscap SystemCapability.ArkUI.ArkUI.Full
813
   * @since 8
814
   */
815
  /**
816
   * Called when the OK button in the dialog is clicked.
817
   *
818
   * @type { ?function }
819
   * @syscap SystemCapability.ArkUI.ArkUI.Full
820
   * @crossplatform
821
   * @since 10
822
   */
823
  /**
824
   * Called when the OK button in the dialog is clicked.
825
   *
826
   * @type { ?function }
827
   * @syscap SystemCapability.ArkUI.ArkUI.Full
828
   * @crossplatform
829
   * @atomicservice
830
   * @since 11
831
   */
832
  onAccept?: (value: TextPickerResult) => void;
833

834
  /**
835
   * Called when the Cancel button in the dialog is clicked.
836
   *
837
   * @type { ?function }
838
   * @syscap SystemCapability.ArkUI.ArkUI.Full
839
   * @since 8
840
   */
841
  /**
842
   * Called when the Cancel button in the dialog is clicked.
843
   *
844
   * @type { ?function }
845
   * @syscap SystemCapability.ArkUI.ArkUI.Full
846
   * @crossplatform
847
   * @since 10
848
   */
849
  /**
850
   * Called when the Cancel button in the dialog is clicked.
851
   *
852
   * @type { ?function }
853
   * @syscap SystemCapability.ArkUI.ArkUI.Full
854
   * @crossplatform
855
   * @atomicservice
856
   * @since 11
857
   */
858
  onCancel?: () => void;
859

860
  /**
861
   * This event is triggered when a TextPicker text is selected in dialog.
862
   *
863
   * @type { ?function }
864
   * @syscap SystemCapability.ArkUI.ArkUI.Full
865
   * @since 8
866
   */
867
  /**
868
   * This event is triggered when a TextPicker text is selected in dialog.
869
   *
870
   * @type { ?function }
871
   * @syscap SystemCapability.ArkUI.ArkUI.Full
872
   * @crossplatform
873
   * @since 10
874
   */
875
  /**
876
   * This event is triggered when a TextPicker text is selected in dialog.
877
   *
878
   * @type { ?function }
879
   * @syscap SystemCapability.ArkUI.ArkUI.Full
880
   * @crossplatform
881
   * @atomicservice
882
   * @since 11
883
   */
884
  onChange?: (value: TextPickerResult) => void;
885

886
  /**
887
   * Mask Region of dialog. The size cannot exceed the main window.
888
   *
889
   * @type { ?Rectangle }
890
   * @syscap SystemCapability.ArkUI.ArkUI.Full
891
   * @crossplatform
892
   * @since 10
893
   */
894
  /**
895
   * Mask Region of dialog. The size cannot exceed the main window.
896
   *
897
   * @type { ?Rectangle }
898
   * @syscap SystemCapability.ArkUI.ArkUI.Full
899
   * @crossplatform
900
   * @atomicservice
901
   * @since 11
902
   */
903
  maskRect?: Rectangle;
904

905
  /**
906
   * Defines the dialog alignment of the screen.
907
   *
908
   * @type { ?DialogAlignment }
909
   * @syscap SystemCapability.ArkUI.ArkUI.Full
910
   * @crossplatform
911
   * @since 10
912
   */
913
  /**
914
   * Defines the dialog alignment of the screen.
915
   *
916
   * @type { ?DialogAlignment }
917
   * @syscap SystemCapability.ArkUI.ArkUI.Full
918
   * @crossplatform
919
   * @atomicservice
920
   * @since 11
921
   */
922
  //alignment?: DialogAlignment;
923

924
  /**
925
   * Defines the dialog offset.
926
   *
927
   * @type { ?Offset }
928
   * @syscap SystemCapability.ArkUI.ArkUI.Full
929
   * @crossplatform
930
   * @since 10
931
   */
932
  /**
933
   * Defines the dialog offset.
934
   *
935
   * @type { ?Offset }
936
   * @syscap SystemCapability.ArkUI.ArkUI.Full
937
   * @crossplatform
938
   * @atomicservice
939
   * @since 11
940
   */
941
  offset?: Offset;
942

943
  /**
944
   * Defines the textPickerDialog's background color
945
   *
946
   * @type { ?ResourceColor }
947
   * @default Color.Transparent
948
   * @syscap SystemCapability.ArkUI.ArkUI.Full
949
   * @crossplatform
950
   * @since 11
951
   */
952
  /**
953
   * Defines the textPickerDialog's background color
954
   *
955
   * @type { ?ResourceColor }
956
   * @default Color.Transparent
957
   * @syscap SystemCapability.ArkUI.ArkUI.Full
958
   * @crossplatform
959
   * @atomicservice
960
   * @since 12
961
   */
962
  backgroundColor?: ResourceColor;
963

964
  /**
965
   * Defines the textPickerDialog's background blur Style
966
   *
967
   * @type { ?BlurStyle }
968
   * @default BlurStyle.COMPONENT_ULTRA_THICK
969
   * @syscap SystemCapability.ArkUI.ArkUI.Full
970
   * @crossplatform
971
   * @since 11
972
   */
973
  /**
974
   * Defines the textPickerDialog's background blur Style
975
   *
976
   * @type { ?BlurStyle }
977
   * @default BlurStyle.COMPONENT_ULTRA_THICK
978
   * @syscap SystemCapability.ArkUI.ArkUI.Full
979
   * @crossplatform
980
   * @atomicservice
981
   * @since 12
982
   */
983
  backgroundBlurStyle?: BlurStyle;
984

985
  /**
986
   * Callback function when the dialog appears.
987
   *
988
   * @type { ?function }
989
   * @syscap SystemCapability.ArkUI.ArkUI.Full
990
   * @crossplatform
991
   * @atomicservice
992
   * @since 12
993
   */
994
  onDidAppear?: () => void;
995

996
  /**
997
   * Callback function when the dialog disappears.
998
   *
999
   * @type { ?function }
1000
   * @syscap SystemCapability.ArkUI.ArkUI.Full
1001
   * @crossplatform
1002
   * @atomicservice
1003
   * @since 12
1004
   */
1005
  onDidDisappear?: () => void;
1006

1007
  /**
1008
   * Callback function before the dialog openAnimation starts.
1009
   *
1010
   * @type { ?function }
1011
   * @syscap SystemCapability.ArkUI.ArkUI.Full
1012
   * @crossplatform
1013
   * @since 12
1014
   */
1015
  onWillAppear?: () => void;
1016

1017
  /**
1018
   * Callback function before the dialog closeAnimation starts.
1019
   *
1020
   * @type { ?function }
1021
   * @syscap SystemCapability.ArkUI.ArkUI.Full
1022
   * @crossplatform
1023
   * @since 12
1024
   */
1025
  onWillDisappear?: () => void;
1026

1027
  /**
1028
   * Defines the dialog's shadow.
1029
   *
1030
   * @type { ?(ShadowOptions | ShadowStyle) }
1031
   * @syscap SystemCapability.ArkUI.ArkUI.Full
1032
   * @crossplatform
1033
   * @since 12
1034
   */
1035
  //shadow?: ShadowOptions | ShadowStyle; 
1036
}
1037

1038
/**
1039
 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
1040
 *
1041
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1042
 * @since 8
1043
 */
1044
/**
1045
 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
1046
 *
1047
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1048
 * @crossplatform
1049
 * @since 10
1050
 */
1051
/**
1052
 * Defines TextPickerDialog which uses show method to show TextPicker dialog.
1053
 *
1054
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1055
 * @crossplatform
1056
 * @atomicservice
1057
 * @since 11
1058
 */
1059
declare class TextPickerDialog {
1060
  /**
1061
   * Invoking method display.
1062
   *
1063
   * @param { TextPickerDialogOptions } options
1064
   * @syscap SystemCapability.ArkUI.ArkUI.Full
1065
   * @since 8
1066
   */
1067
  /**
1068
   * Invoking method display.
1069
   *
1070
   * @param { TextPickerDialogOptions } options
1071
   * @syscap SystemCapability.ArkUI.ArkUI.Full
1072
   * @crossplatform
1073
   * @since 10
1074
   */
1075
  /**
1076
   * Invoking method display.
1077
   *
1078
   * @param { TextPickerDialogOptions } options
1079
   * @syscap SystemCapability.ArkUI.ArkUI.Full
1080
   * @crossplatform
1081
   * @atomicservice
1082
   * @since 11
1083
   */
1084
  static show(options?: TextPickerDialogOptions): undefined;
1085
}
1086

1087
/**
1088
 * Defines TextPicker Component.
1089
 *
1090
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1091
 * @since 8
1092
 */
1093
/**
1094
 * Defines TextPicker Component.
1095
 *
1096
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1097
 * @crossplatform
1098
 * @since 10
1099
 */
1100
/**
1101
 * Defines TextPicker Component.
1102
 *
1103
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1104
 * @crossplatform
1105
 * @atomicservice
1106
 * @since 11
1107
 */
1108
declare const TextPicker: TextPickerInterface;
1109

1110
/**
1111
 * Defines TextPicker Component instance.
1112
 *
1113
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1114
 * @since 8
1115
 */
1116
/**
1117
 * Defines TextPicker Component instance.
1118
 *
1119
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1120
 * @crossplatform
1121
 * @since 10
1122
 */
1123
/**
1124
 * Defines TextPicker Component instance.
1125
 *
1126
 * @syscap SystemCapability.ArkUI.ArkUI.Full
1127
 * @crossplatform
1128
 * @atomicservice
1129
 * @since 11
1130
 */
1131
declare const TextPickerInstance: TextPickerAttribute;
1132

1133
declare module "textPickerDialogParam" {
1134
  module "textPickerDialogParam" {
1135
    // @ts-ignore
1136
    export { TextPickerDialogOptions };
1137
  }
1138
}
1139

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.