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