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 */ 38declare 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 */ 94declare 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 */ 156declare 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 */ 264interface 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 * @atomicservice 302 * @since 12 303 */ 304declare interface DividerOptions { 305 /** 306 * The strokeWidth of Divider. 307 * 308 * @type { ?Dimension } 309 * @syscap SystemCapability.ArkUI.ArkUI.Full 310 * @crossplatform 311 * @atomicservice 312 * @since 12 313 */ 314 strokeWidth?: Dimension; 315 316 /** 317 * The color of Divider. 318 * 319 * @type { ?ResourceColor } 320 * @syscap SystemCapability.ArkUI.ArkUI.Full 321 * @crossplatform 322 * @atomicservice 323 * @since 12 324 */ 325 color?: ResourceColor; 326 327 /** 328 * The startMargin of Divider. 329 * 330 * @type { ?Dimension } 331 * @syscap SystemCapability.ArkUI.ArkUI.Full 332 * @crossplatform 333 * @atomicservice 334 * @since 12 335 */ 336 startMargin?: Dimension; 337 338 /** 339 * The endMargin of Divider. 340 * 341 * @type { ?Dimension } 342 * @syscap SystemCapability.ArkUI.ArkUI.Full 343 * @crossplatform 344 * @atomicservice 345 * @since 12 346 */ 347 endMargin?: Dimension; 348} 349 350/** 351 * Provide an interface for the text style of the text picker. 352 * 353 * @extends PickerTextStyle 354 * @interface TextPickerTextStyle 355 * @syscap SystemCapability.ArkUI.ArkUI.Full 356 * @crossplatform 357 * @atomicservice 358 * @since 15 359 */ 360declare interface TextPickerTextStyle extends PickerTextStyle { 361 /** 362 * Defines the minimum font size of the text. 363 * 364 * @type { ?(number | string | Resource) } 365 * @syscap SystemCapability.ArkUI.ArkUI.Full 366 * @crossplatform 367 * @atomicservice 368 * @since 15 369 */ 370 minFontSize?: number | string | Resource; 371 372 /** 373 * Defines the maximum font size of the text. 374 * 375 * @type { ?(number | string | Resource) } 376 * @syscap SystemCapability.ArkUI.ArkUI.Full 377 * @crossplatform 378 * @atomicservice 379 * @since 15 380 */ 381 maxFontSize?: number | string | Resource; 382 383 /** 384 * Defines the overflow mode of the text. 385 * 386 * @type { ?TextOverflow } 387 * @syscap SystemCapability.ArkUI.ArkUI.Full 388 * @crossplatform 389 * @atomicservice 390 * @since 15 391 */ 392 overflow?: TextOverflow; 393} 394 395/** 396 * Callback of the listened scroll stop event. 397 * 398 * @typedef {function} TextPickerScrollStopCallback 399 * @param { string | string[] } value - Value of the selected item. 400 * @param { number | number[] } index - Index of the selected item. 401 * @syscap SystemCapability.ArkUI.ArkUI.Full 402 * @crossplatform 403 * @atomicservice 404 * @since 14 405 */ 406declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void; 407 408/** 409 * Style the text selector. 410 * 411 * @extends CommonMethod<TextPickerAttribute> 412 * @syscap SystemCapability.ArkUI.ArkUI.Full 413 * @since 8 414 */ 415/** 416 * Style the text selector. 417 * 418 * @extends CommonMethod<TextPickerAttribute> 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @crossplatform 421 * @since 10 422 */ 423/** 424 * Style the text selector. 425 * 426 * @extends CommonMethod<TextPickerAttribute> 427 * @syscap SystemCapability.ArkUI.ArkUI.Full 428 * @crossplatform 429 * @atomicservice 430 * @since 11 431 */ 432declare class TextPickerAttribute extends CommonMethod<TextPickerAttribute> { 433 /** 434 * Called when the default height of the selected element is set. 435 * 436 * @param { number | string } value 437 * @returns { TextPickerAttribute } 438 * @syscap SystemCapability.ArkUI.ArkUI.Full 439 * @since 8 440 */ 441 /** 442 * Called when the default height of the selected element is set. 443 * 444 * @param { number | string } value 445 * @returns { TextPickerAttribute } 446 * @syscap SystemCapability.ArkUI.ArkUI.Full 447 * @crossplatform 448 * @since 10 449 */ 450 /** 451 * Called when the default height of the selected element is set. 452 * 453 * @param { number | string } value 454 * @returns { TextPickerAttribute } 455 * @syscap SystemCapability.ArkUI.ArkUI.Full 456 * @crossplatform 457 * @atomicservice 458 * @since 11 459 */ 460 defaultPickerItemHeight(value: number | string): TextPickerAttribute; 461 462 /** 463 * Can scroll loop if true is set, on the contrary it can not. 464 * 465 * @param { boolean } value 466 * @returns { TextPickerAttribute } 467 * @syscap SystemCapability.ArkUI.ArkUI.Full 468 * @since 10 469 */ 470 /** 471 * Can scroll loop if true is set, on the contrary it can not. 472 * 473 * @param { boolean } value 474 * @returns { TextPickerAttribute } 475 * @syscap SystemCapability.ArkUI.ArkUI.Full 476 * @crossplatform 477 * @atomicservice 478 * @since 11 479 */ 480 canLoop(value: boolean): TextPickerAttribute; 481 482 /** 483 * Sets the text style of disappearing items 484 * 485 * @param { PickerTextStyle } value - indicates the text style of disappearing items. 486 * @returns { TextPickerAttribute } 487 * @syscap SystemCapability.ArkUI.ArkUI.Full 488 * @crossplatform 489 * @since 10 490 */ 491 /** 492 * Sets the text style of disappearing items 493 * 494 * @param { PickerTextStyle } value - indicates the text style of disappearing items. 495 * @returns { TextPickerAttribute } 496 * @syscap SystemCapability.ArkUI.ArkUI.Full 497 * @crossplatform 498 * @atomicservice 499 * @since 11 500 */ 501 disappearTextStyle(value: PickerTextStyle): TextPickerAttribute; 502 503 /** 504 * Sets the text style of normal items 505 * 506 * @param { PickerTextStyle } value - indicates the text style of normal items. 507 * @returns { TextPickerAttribute } 508 * @syscap SystemCapability.ArkUI.ArkUI.Full 509 * @crossplatform 510 * @since 10 511 */ 512 /** 513 * Sets the text style of normal items 514 * 515 * @param { PickerTextStyle } value - indicates the text style of normal items. 516 * @returns { TextPickerAttribute } 517 * @syscap SystemCapability.ArkUI.ArkUI.Full 518 * @crossplatform 519 * @atomicservice 520 * @since 11 521 */ 522 textStyle(value: PickerTextStyle): TextPickerAttribute; 523 524 /** 525 * Sets the text style of selected items 526 * 527 * @param { PickerTextStyle } value - indicates the text style of selected items. 528 * @returns { TextPickerAttribute } 529 * @syscap SystemCapability.ArkUI.ArkUI.Full 530 * @crossplatform 531 * @since 10 532 */ 533 /** 534 * Sets the text style of selected items 535 * 536 * @param { PickerTextStyle } value - indicates the text style of selected items. 537 * @returns { TextPickerAttribute } 538 * @syscap SystemCapability.ArkUI.ArkUI.Full 539 * @crossplatform 540 * @atomicservice 541 * @since 11 542 */ 543 selectedTextStyle(value: PickerTextStyle): TextPickerAttribute; 544 545 /** 546 * Defines whether to disable the text style animation. 547 * 548 * @param { boolean } disabled 549 * @returns { TextPickerAttribute } 550 * @syscap SystemCapability.ArkUI.ArkUI.Full 551 * @crossplatform 552 * @atomicservice 553 * @since 15 554 */ 555 disableTextStyleAnimation(disabled: boolean): TextPickerAttribute; 556 557 /** 558 * Defines to set the default text style for options. 559 * 560 * @param { TextPickerTextStyle } style 561 * @returns { TextPickerAttribute } 562 * @syscap SystemCapability.ArkUI.ArkUI.Full 563 * @crossplatform 564 * @atomicservice 565 * @since 15 566 */ 567 defaultTextStyle(style: TextPickerTextStyle): TextPickerAttribute; 568 569 /** 570 * Called when the pop-up value is returned. 571 * 572 * @param { function } callback 573 * @returns { TextPickerAttribute } 574 * @syscap SystemCapability.ArkUI.ArkUI.Full 575 * @since 8 576 * @deprecated since 10 577 */ 578 onAccept(callback: (value: string, index: number) => void): TextPickerAttribute; 579 580 /** 581 * Called when the Cancel button in the pop-up window is clicked. 582 * 583 * @param { function } callback 584 * @returns { TextPickerAttribute } 585 * @syscap SystemCapability.ArkUI.ArkUI.Full 586 * @since 8 587 * @deprecated since 10 588 */ 589 onCancel(callback: () => void): TextPickerAttribute; 590 591 /** 592 * Called when the OK button in the pop-up window is clicked. 593 * 594 * @param { function } callback - the callback of onChange. 595 * @returns { TextPickerAttribute } 596 * @syscap SystemCapability.ArkUI.ArkUI.Full 597 * @since 8 598 */ 599 /** 600 * This event is triggered when a TextPicker item is selected. 601 * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". 602 * 603 * @param { function } callback - the callback of onChange. 604 * @returns { TextPickerAttribute } 605 * @syscap SystemCapability.ArkUI.ArkUI.Full 606 * @crossplatform 607 * @since 10 608 */ 609 /** 610 * This event is triggered when a TextPicker item is selected. 611 * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". 612 * 613 * @param { function } callback - the callback of onChange. 614 * @returns { TextPickerAttribute } 615 * @syscap SystemCapability.ArkUI.ArkUI.Full 616 * @crossplatform 617 * @atomicservice 618 * @since 11 619 */ 620 onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute; 621 622 /** 623 * This event is triggered when a TextPicker item is selected and scrolling has stopped. 624 * Only valid when only text is displayed. When picture or picture plus text is displayed, the value is "". 625 * 626 * @param { TextPickerScrollStopCallback } callback - the callback of onScrollStop. 627 * @returns { TextPickerAttribute } 628 * @syscap SystemCapability.ArkUI.ArkUI.Full 629 * @crossplatform 630 * @atomicservice 631 * @since 14 632 */ 633 onScrollStop(callback: TextPickerScrollStopCallback): TextPickerAttribute; 634 635 /** 636 * Set the selected indices. 637 * The array size is the total number of columns. 638 * 639 * @param { number | number[] } value - the selected indices. 640 * @returns { TextPickerAttribute } 641 * @syscap SystemCapability.ArkUI.ArkUI.Full 642 * @crossplatform 643 * @since 10 644 */ 645 /** 646 * Set the selected indices. 647 * The array size is the total number of columns. 648 * 649 * @param { number | number[] } value - the selected indices. 650 * @returns { TextPickerAttribute } 651 * @syscap SystemCapability.ArkUI.ArkUI.Full 652 * @crossplatform 653 * @atomicservice 654 * @since 11 655 */ 656 selectedIndex(value: number | number[]): TextPickerAttribute; 657 658 /** 659 * Set the divider of TextPicker 660 * 661 * @param { DividerOptions | null } value 662 * @returns { TextPickerAttribute } 663 * @syscap SystemCapability.ArkUI.ArkUI.Full 664 * @crossplatform 665 * @atomicservice 666 * @since 12 667 */ 668 divider(value: DividerOptions | null): TextPickerAttribute; 669 670 /** 671 * Called when set the height of gradient 672 * 673 * @param { Dimension } value - The value the gradient height 674 * @returns { TextPickerAttribute } 675 * @syscap SystemCapability.ArkUI.ArkUI.Full 676 * @crossplatform 677 * @atomicservice 678 * @since 12 679 */ 680 gradientHeight(value: Dimension): TextPickerAttribute; 681} 682 683/** 684 * Defines the struct of TextPickerResult. 685 * 686 * @interface TextPickerResult 687 * @syscap SystemCapability.ArkUI.ArkUI.Full 688 * @since 8 689 */ 690/** 691 * Defines the struct of TextPickerResult. 692 * 693 * @interface TextPickerResult 694 * @syscap SystemCapability.ArkUI.ArkUI.Full 695 * @crossplatform 696 * @since 10 697 */ 698/** 699 * Defines the struct of TextPickerResult. 700 * 701 * @interface TextPickerResult 702 * @syscap SystemCapability.ArkUI.ArkUI.Full 703 * @crossplatform 704 * @atomicservice 705 * @since 11 706 */ 707declare interface TextPickerResult { 708 /** 709 * The currently selected value. 710 * 711 * @type { string } 712 * @syscap SystemCapability.ArkUI.ArkUI.Full 713 * @since 8 714 */ 715 /** 716 * The currently selected value. 717 * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". 718 * 719 * @type { string | string[] } 720 * @syscap SystemCapability.ArkUI.ArkUI.Full 721 * @crossplatform 722 * @since 10 723 */ 724 /** 725 * The currently selected value. 726 * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". 727 * 728 * @type { string | string[] } 729 * @syscap SystemCapability.ArkUI.ArkUI.Full 730 * @crossplatform 731 * @atomicservice 732 * @since 11 733 */ 734 value: string | string[]; 735 736 /** 737 * The subscript of the current selection. 738 * 739 * @type { number } 740 * @syscap SystemCapability.ArkUI.ArkUI.Full 741 * @since 8 742 */ 743 /** 744 * The subscript of the current selection. 745 * 746 * @type { number | number[] } 747 * @syscap SystemCapability.ArkUI.ArkUI.Full 748 * @crossplatform 749 * @since 10 750 */ 751 /** 752 * The subscript of the current selection. 753 * 754 * @type { number | number[] } 755 * @syscap SystemCapability.ArkUI.ArkUI.Full 756 * @crossplatform 757 * @atomicservice 758 * @since 11 759 */ 760 index: number | number[]; 761} 762 763/** 764 * Defines the TextPickerDialogOptions for Text Picker Dialog. 765 * 766 * @interface TextPickerDialogOptions 767 * @syscap SystemCapability.ArkUI.ArkUI.Full 768 * @since 8 769 */ 770/** 771 * Defines the TextPickerDialogOptions for Text Picker Dialog. 772 * 773 * @interface TextPickerDialogOptions 774 * @syscap SystemCapability.ArkUI.ArkUI.Full 775 * @crossplatform 776 * @since 10 777 */ 778/** 779 * Defines the TextPickerDialogOptions for Text Picker Dialog. 780 * 781 * @interface TextPickerDialogOptions 782 * @syscap SystemCapability.ArkUI.ArkUI.Full 783 * @crossplatform 784 * @atomicservice 785 * @since 11 786 */ 787declare interface TextPickerDialogOptions extends TextPickerOptions { 788 /** 789 * Called when the default height of the selected element is set. 790 * 791 * @type { ?(number | string) } 792 * @syscap SystemCapability.ArkUI.ArkUI.Full 793 * @since 8 794 */ 795 /** 796 * Called when the default height of the selected element is set. 797 * 798 * @type { ?(number | string) } 799 * @syscap SystemCapability.ArkUI.ArkUI.Full 800 * @crossplatform 801 * @since 10 802 */ 803 /** 804 * Called when the default height of the selected element is set. 805 * 806 * @type { ?(number | string) } 807 * @syscap SystemCapability.ArkUI.ArkUI.Full 808 * @crossplatform 809 * @atomicservice 810 * @since 11 811 */ 812 defaultPickerItemHeight?: number | string; 813 814 /** 815 * Can scroll loop if true is set, on the contrary it can not. 816 * 817 * @type { ?boolean } 818 * @default true 819 * @syscap SystemCapability.ArkUI.ArkUI.Full 820 * @since 10 821 */ 822 /** 823 * Can scroll loop if true is set, on the contrary it can not. 824 * 825 * @type { ?boolean } 826 * @default true 827 * @syscap SystemCapability.ArkUI.ArkUI.Full 828 * @crossplatform 829 * @atomicservice 830 * @since 11 831 */ 832 canLoop?: boolean; 833 834 /** 835 * Text style of disappearing items 836 * 837 * @type { ?PickerTextStyle } 838 * @syscap SystemCapability.ArkUI.ArkUI.Full 839 * @crossplatform 840 * @since 10 841 */ 842 /** 843 * Text style of disappearing items 844 * 845 * @type { ?PickerTextStyle } 846 * @syscap SystemCapability.ArkUI.ArkUI.Full 847 * @crossplatform 848 * @atomicservice 849 * @since 11 850 */ 851 disappearTextStyle?: PickerTextStyle; 852 853 /** 854 * Text style of normal items 855 * 856 * @type { ?PickerTextStyle } 857 * @syscap SystemCapability.ArkUI.ArkUI.Full 858 * @crossplatform 859 * @since 10 860 */ 861 /** 862 * Text style of normal items 863 * 864 * @type { ?PickerTextStyle } 865 * @syscap SystemCapability.ArkUI.ArkUI.Full 866 * @crossplatform 867 * @atomicservice 868 * @since 11 869 */ 870 textStyle?: PickerTextStyle; 871 872 /** 873 * Style of accept button. 874 * 875 * @type { ?PickerDialogButtonStyle } 876 * @syscap SystemCapability.ArkUI.ArkUI.Full 877 * @crossplatform 878 * @atomicservice 879 * @since 12 880 */ 881 acceptButtonStyle?: PickerDialogButtonStyle; 882 883 /** 884 * Style of cancel button. 885 * 886 * @type { ?PickerDialogButtonStyle } 887 * @syscap SystemCapability.ArkUI.ArkUI.Full 888 * @crossplatform 889 * @atomicservice 890 * @since 12 891 */ 892 cancelButtonStyle?: PickerDialogButtonStyle; 893 894 /** 895 * Text style of selected items 896 * 897 * @type { ?PickerTextStyle } 898 * @syscap SystemCapability.ArkUI.ArkUI.Full 899 * @crossplatform 900 * @since 10 901 */ 902 /** 903 * Text style of selected items 904 * 905 * @type { ?PickerTextStyle } 906 * @syscap SystemCapability.ArkUI.ArkUI.Full 907 * @crossplatform 908 * @atomicservice 909 * @since 11 910 */ 911 selectedTextStyle?: PickerTextStyle; 912 913 /** 914 * Defines whether to disable the text style animation. 915 * 916 * @type { ?boolean } 917 * @syscap SystemCapability.ArkUI.ArkUI.Full 918 * @crossplatform 919 * @atomicservice 920 * @since 15 921 */ 922 disableTextStyleAnimation?: boolean; 923 924 /** 925 * Defines to set the default text style for options. 926 * 927 * @type { ?TextPickerTextStyle } 928 * @syscap SystemCapability.ArkUI.ArkUI.Full 929 * @crossplatform 930 * @atomicservice 931 * @since 15 932 */ 933 defaultTextStyle?: TextPickerTextStyle; 934 935 /** 936 * Called when the OK button in the dialog is clicked. 937 * 938 * @type { ?function } 939 * @syscap SystemCapability.ArkUI.ArkUI.Full 940 * @since 8 941 */ 942 /** 943 * Called when the OK button in the dialog is clicked. 944 * 945 * @type { ?function } 946 * @syscap SystemCapability.ArkUI.ArkUI.Full 947 * @crossplatform 948 * @since 10 949 */ 950 /** 951 * Called when the OK button in the dialog is clicked. 952 * 953 * @type { ?function } 954 * @syscap SystemCapability.ArkUI.ArkUI.Full 955 * @crossplatform 956 * @atomicservice 957 * @since 11 958 */ 959 onAccept?: (value: TextPickerResult) => void; 960 961 /** 962 * Called when the Cancel button in the dialog is clicked. 963 * 964 * @type { ?function } 965 * @syscap SystemCapability.ArkUI.ArkUI.Full 966 * @since 8 967 */ 968 /** 969 * Called when the Cancel button in the dialog is clicked. 970 * 971 * @type { ?function } 972 * @syscap SystemCapability.ArkUI.ArkUI.Full 973 * @crossplatform 974 * @since 10 975 */ 976 /** 977 * Called when the Cancel button in the dialog is clicked. 978 * 979 * @type { ?function } 980 * @syscap SystemCapability.ArkUI.ArkUI.Full 981 * @crossplatform 982 * @atomicservice 983 * @since 11 984 */ 985 onCancel?: () => void; 986 987 /** 988 * This event is triggered when a TextPicker text is selected in dialog. 989 * 990 * @type { ?function } 991 * @syscap SystemCapability.ArkUI.ArkUI.Full 992 * @since 8 993 */ 994 /** 995 * This event is triggered when a TextPicker text is selected in dialog. 996 * 997 * @type { ?function } 998 * @syscap SystemCapability.ArkUI.ArkUI.Full 999 * @crossplatform 1000 * @since 10 1001 */ 1002 /** 1003 * This event is triggered when a TextPicker text is selected in dialog. 1004 * 1005 * @type { ?function } 1006 * @syscap SystemCapability.ArkUI.ArkUI.Full 1007 * @crossplatform 1008 * @atomicservice 1009 * @since 11 1010 */ 1011 onChange?: (value: TextPickerResult) => void; 1012 1013 /** 1014 * This event is triggered when a TextPicker text is selected and scrolling has stopped in dialog. 1015 * 1016 * @type { ?Callback<TextPickerResult> } 1017 * @syscap SystemCapability.ArkUI.ArkUI.Full 1018 * @crossplatform 1019 * @atomicservice 1020 * @since 14 1021 */ 1022 onScrollStop?: Callback<TextPickerResult>; 1023 1024 /** 1025 * Mask Region of dialog. The size cannot exceed the main window. 1026 * 1027 * @type { ?Rectangle } 1028 * @syscap SystemCapability.ArkUI.ArkUI.Full 1029 * @crossplatform 1030 * @since 10 1031 */ 1032 /** 1033 * Mask Region of dialog. The size cannot exceed the main window. 1034 * 1035 * @type { ?Rectangle } 1036 * @syscap SystemCapability.ArkUI.ArkUI.Full 1037 * @crossplatform 1038 * @atomicservice 1039 * @since 11 1040 */ 1041 maskRect?: Rectangle; 1042 1043 /** 1044 * Defines the dialog alignment of the screen. 1045 * 1046 * @type { ?DialogAlignment } 1047 * @syscap SystemCapability.ArkUI.ArkUI.Full 1048 * @crossplatform 1049 * @since 10 1050 */ 1051 /** 1052 * Defines the dialog alignment of the screen. 1053 * 1054 * @type { ?DialogAlignment } 1055 * @syscap SystemCapability.ArkUI.ArkUI.Full 1056 * @crossplatform 1057 * @atomicservice 1058 * @since 11 1059 */ 1060 alignment?: DialogAlignment; 1061 1062 /** 1063 * Defines the dialog offset. 1064 * 1065 * @type { ?Offset } 1066 * @syscap SystemCapability.ArkUI.ArkUI.Full 1067 * @crossplatform 1068 * @since 10 1069 */ 1070 /** 1071 * Defines the dialog offset. 1072 * 1073 * @type { ?Offset } 1074 * @syscap SystemCapability.ArkUI.ArkUI.Full 1075 * @crossplatform 1076 * @atomicservice 1077 * @since 11 1078 */ 1079 offset?: Offset; 1080 1081 /** 1082 * Defines the textPickerDialog's background color 1083 * 1084 * @type { ?ResourceColor } 1085 * @default Color.Transparent 1086 * @syscap SystemCapability.ArkUI.ArkUI.Full 1087 * @crossplatform 1088 * @since 11 1089 */ 1090 /** 1091 * Defines the textPickerDialog's background color 1092 * 1093 * @type { ?ResourceColor } 1094 * @default Color.Transparent 1095 * @syscap SystemCapability.ArkUI.ArkUI.Full 1096 * @crossplatform 1097 * @atomicservice 1098 * @since 12 1099 */ 1100 backgroundColor?: ResourceColor; 1101 1102 /** 1103 * Defines the textPickerDialog's background blur Style 1104 * 1105 * @type { ?BlurStyle } 1106 * @default BlurStyle.COMPONENT_ULTRA_THICK 1107 * @syscap SystemCapability.ArkUI.ArkUI.Full 1108 * @crossplatform 1109 * @since 11 1110 */ 1111 /** 1112 * Defines the textPickerDialog's background blur Style 1113 * 1114 * @type { ?BlurStyle } 1115 * @default BlurStyle.COMPONENT_ULTRA_THICK 1116 * @syscap SystemCapability.ArkUI.ArkUI.Full 1117 * @crossplatform 1118 * @atomicservice 1119 * @since 12 1120 */ 1121 backgroundBlurStyle?: BlurStyle; 1122 1123 /** 1124 * Callback function when the dialog appears. 1125 * 1126 * @type { ?function } 1127 * @syscap SystemCapability.ArkUI.ArkUI.Full 1128 * @crossplatform 1129 * @atomicservice 1130 * @since 12 1131 */ 1132 onDidAppear?: () => void; 1133 1134 /** 1135 * Callback function when the dialog disappears. 1136 * 1137 * @type { ?function } 1138 * @syscap SystemCapability.ArkUI.ArkUI.Full 1139 * @crossplatform 1140 * @atomicservice 1141 * @since 12 1142 */ 1143 onDidDisappear?: () => void; 1144 1145 /** 1146 * Callback function before the dialog openAnimation starts. 1147 * 1148 * @type { ?function } 1149 * @syscap SystemCapability.ArkUI.ArkUI.Full 1150 * @crossplatform 1151 * @atomicservice 1152 * @since 12 1153 */ 1154 onWillAppear?: () => void; 1155 1156 /** 1157 * Callback function before the dialog closeAnimation starts. 1158 * 1159 * @type { ?function } 1160 * @syscap SystemCapability.ArkUI.ArkUI.Full 1161 * @crossplatform 1162 * @atomicservice 1163 * @since 12 1164 */ 1165 onWillDisappear?: () => void; 1166 1167 /** 1168 * Defines the dialog's shadow. 1169 * 1170 * @type { ?(ShadowOptions | ShadowStyle) } 1171 * @syscap SystemCapability.ArkUI.ArkUI.Full 1172 * @crossplatform 1173 * @atomicservice 1174 * @since 12 1175 */ 1176 shadow?: ShadowOptions | ShadowStyle; 1177 1178 /** 1179 * Defines whether to respond to the hover mode. 1180 * 1181 * @type { ?boolean } 1182 * @default false 1183 * @syscap SystemCapability.ArkUI.ArkUI.Full 1184 * @crossplatform 1185 * @atomicservice 1186 * @since 14 1187 */ 1188 enableHoverMode?: boolean; 1189 1190 /** 1191 * Defines the dialog's display area in hover mode. 1192 * 1193 * @type { ?HoverModeAreaType } 1194 * @default HoverModeAreaType.BOTTOM_SCREEN 1195 * @syscap SystemCapability.ArkUI.ArkUI.Full 1196 * @crossplatform 1197 * @atomicservice 1198 * @since 14 1199 */ 1200 hoverModeArea?: HoverModeAreaType; 1201} 1202 1203/** 1204 * Defines TextPickerDialog which uses show method to show TextPicker dialog. 1205 * 1206 * @syscap SystemCapability.ArkUI.ArkUI.Full 1207 * @since 8 1208 */ 1209/** 1210 * Defines TextPickerDialog which uses show method to show TextPicker dialog. 1211 * 1212 * @syscap SystemCapability.ArkUI.ArkUI.Full 1213 * @crossplatform 1214 * @since 10 1215 */ 1216/** 1217 * Defines TextPickerDialog which uses show method to show TextPicker dialog. 1218 * 1219 * @syscap SystemCapability.ArkUI.ArkUI.Full 1220 * @crossplatform 1221 * @atomicservice 1222 * @since 11 1223 */ 1224declare class TextPickerDialog { 1225 /** 1226 * Invoking method display. 1227 * 1228 * @param { TextPickerDialogOptions } options 1229 * @syscap SystemCapability.ArkUI.ArkUI.Full 1230 * @since 8 1231 */ 1232 /** 1233 * Invoking method display. 1234 * 1235 * @param { TextPickerDialogOptions } options 1236 * @syscap SystemCapability.ArkUI.ArkUI.Full 1237 * @crossplatform 1238 * @since 10 1239 */ 1240 /** 1241 * Invoking method display. 1242 * 1243 * @param { TextPickerDialogOptions } options 1244 * @syscap SystemCapability.ArkUI.ArkUI.Full 1245 * @crossplatform 1246 * @atomicservice 1247 * @since 11 1248 */ 1249 static show(options?: TextPickerDialogOptions); 1250} 1251 1252/** 1253 * Defines TextPicker Component. 1254 * 1255 * @syscap SystemCapability.ArkUI.ArkUI.Full 1256 * @since 8 1257 */ 1258/** 1259 * Defines TextPicker Component. 1260 * 1261 * @syscap SystemCapability.ArkUI.ArkUI.Full 1262 * @crossplatform 1263 * @since 10 1264 */ 1265/** 1266 * Defines TextPicker Component. 1267 * 1268 * @syscap SystemCapability.ArkUI.ArkUI.Full 1269 * @crossplatform 1270 * @atomicservice 1271 * @since 11 1272 */ 1273declare const TextPicker: TextPickerInterface; 1274 1275/** 1276 * Defines TextPicker Component instance. 1277 * 1278 * @syscap SystemCapability.ArkUI.ArkUI.Full 1279 * @since 8 1280 */ 1281/** 1282 * Defines TextPicker Component instance. 1283 * 1284 * @syscap SystemCapability.ArkUI.ArkUI.Full 1285 * @crossplatform 1286 * @since 10 1287 */ 1288/** 1289 * Defines TextPicker Component instance. 1290 * 1291 * @syscap SystemCapability.ArkUI.ArkUI.Full 1292 * @crossplatform 1293 * @atomicservice 1294 * @since 11 1295 */ 1296declare const TextPickerInstance: TextPickerAttribute; 1297 1298