1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/*** if arkts 1.2 */ 22import { CommonMethod, BlurStyle } from './common' 23import { ResourceColor, Length, Position } from './units' 24import { Font } from './units' 25/*** endif */ 26 27/** 28 * indexer align property. 29 * 30 * @enum { number } 31 * @syscap SystemCapability.ArkUI.ArkUI.Full 32 * @since 7 33 */ 34/** 35 * indexer align property. 36 * 37 * @enum { number } 38 * @syscap SystemCapability.ArkUI.ArkUI.Full 39 * @crossplatform 40 * @since 10 41 */ 42/** 43 * indexer align property. 44 * 45 * @enum { number } 46 * @syscap SystemCapability.ArkUI.ArkUI.Full 47 * @crossplatform 48 * @atomicservice 49 * @since arkts {'1.1':'11','1.2':'20'} 50 * @arkts 1.1&1.2 51 */ 52declare enum IndexerAlign { 53 /** 54 * A dialog box is displayed on the right of the index bar. 55 * 56 * @syscap SystemCapability.ArkUI.ArkUI.Full 57 * @since 7 58 */ 59 /** 60 * A dialog box is displayed on the right of the index bar. 61 * 62 * @syscap SystemCapability.ArkUI.ArkUI.Full 63 * @crossplatform 64 * @since 10 65 */ 66 /** 67 * A dialog box is displayed on the right of the index bar. 68 * 69 * @syscap SystemCapability.ArkUI.ArkUI.Full 70 * @crossplatform 71 * @atomicservice 72 * @since arkts {'1.1':'11','1.2':'20'} 73 * @arkts 1.1&1.2 74 */ 75 Left, 76 77 /** 78 * A dialog box is displayed on the left of the index bar. 79 * 80 * @syscap SystemCapability.ArkUI.ArkUI.Full 81 * @since 7 82 */ 83 /** 84 * A dialog box is displayed on the left of the index bar. 85 * 86 * @syscap SystemCapability.ArkUI.ArkUI.Full 87 * @crossplatform 88 * @since 10 89 */ 90 /** 91 * A dialog box is displayed on the left of the index bar. 92 * 93 * @syscap SystemCapability.ArkUI.ArkUI.Full 94 * @crossplatform 95 * @atomicservice 96 * @since arkts {'1.1':'11','1.2':'20'} 97 * @arkts 1.1&1.2 98 */ 99 Right, 100 101 /** 102 * A dialog box is displayed on the start of the index bar. 103 * 104 * @syscap SystemCapability.ArkUI.ArkUI.Full 105 * @crossplatform 106 * @atomicservice 107 * @since arkts {'1.1':'12','1.2':'20'} 108 * @arkts 1.1&1.2 109 */ 110 START, 111 112 /** 113 * A dialog box is displayed on the end of the index bar. 114 * 115 * @syscap SystemCapability.ArkUI.ArkUI.Full 116 * @crossplatform 117 * @atomicservice 118 * @since arkts {'1.1':'12','1.2':'20'} 119 * @arkts 1.1&1.2 120 */ 121 END, 122} 123 124/** 125 * AlphabetIndexer constructor options. 126 * 127 * @interface AlphabetIndexerOptions 128 * @syscap SystemCapability.ArkUI.ArkUI.Full 129 * @crossplatform 130 * @atomicservice 131 * @since arkts {'1.1':'18','1.2':'20'} 132 * @arkts 1.1&1.2 133 */ 134interface AlphabetIndexerOptions { 135 /** 136 * Alphabetical index string array. 137 * 138 * @type { Array<string> } 139 * @syscap SystemCapability.ArkUI.ArkUI.Full 140 * @since 7 141 */ 142 /** 143 * Alphabetical index string array. 144 * 145 * @type { Array<string> } 146 * @syscap SystemCapability.ArkUI.ArkUI.Full 147 * @crossplatform 148 * @since 10 149 */ 150 /** 151 * Alphabetical index string array. 152 * 153 * @type { Array<string> } 154 * @syscap SystemCapability.ArkUI.ArkUI.Full 155 * @crossplatform 156 * @atomicservice 157 * @since 11 158 */ 159 /** 160 * Alphabetical index string array. 161 * Anonymous Object Rectification. 162 * 163 * @type { Array<string> } 164 * @syscap SystemCapability.ArkUI.ArkUI.Full 165 * @crossplatform 166 * @atomicservice 167 * @since arkts {'1.1':'18','1.2':'20'} 168 * @arkts 1.1&1.2 169 */ 170 arrayValue: Array<string>; 171 /** 172 * ID of the selected item. 173 * 174 * @type { number } 175 * @syscap SystemCapability.ArkUI.ArkUI.Full 176 * @since 7 177 */ 178 /** 179 * ID of the selected item. 180 * 181 * @type { number } 182 * @syscap SystemCapability.ArkUI.ArkUI.Full 183 * @crossplatform 184 * @since 10 185 */ 186 /** 187 * ID of the selected item. 188 * 189 * @type { number } 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @crossplatform 192 * @atomicservice 193 * @since 11 194 */ 195 /** 196 * ID of the selected item. 197 * Anonymous Object Rectification. 198 * 199 * @type { number } 200 * @syscap SystemCapability.ArkUI.ArkUI.Full 201 * @crossplatform 202 * @atomicservice 203 * @since arkts {'1.1':'18','1.2':'20'} 204 * @arkts 1.1&1.2 205 */ 206 selected: number; 207} 208 209/** 210 * Alphabet index bar. 211 * 212 * @interface AlphabetIndexerInterface 213 * @syscap SystemCapability.ArkUI.ArkUI.Full 214 * @since 7 215 */ 216/** 217 * Alphabet index bar. 218 * 219 * @interface AlphabetIndexerInterface 220 * @syscap SystemCapability.ArkUI.ArkUI.Full 221 * @crossplatform 222 * @since 10 223 */ 224/** 225 * Alphabet index bar. 226 * 227 * @interface AlphabetIndexerInterface 228 * @syscap SystemCapability.ArkUI.ArkUI.Full 229 * @crossplatform 230 * @atomicservice 231 * @since arkts {'1.1':'11','1.2':'20'} 232 * @arkts 1.1&1.2 233 */ 234interface AlphabetIndexerInterface { 235 /** 236 * ArrayValue: Alphabetical index string array. 237 * selected: ID of the selected item. 238 * 239 * @param { object } value 240 * @returns { AlphabetIndexerAttribute } 241 * @syscap SystemCapability.ArkUI.ArkUI.Full 242 * @since 7 243 */ 244 /** 245 * ArrayValue: Alphabetical index string array. 246 * selected: ID of the selected item. 247 * 248 * @param { object } value 249 * @returns { AlphabetIndexerAttribute } 250 * @syscap SystemCapability.ArkUI.ArkUI.Full 251 * @crossplatform 252 * @since 10 253 */ 254 /** 255 * ArrayValue: Alphabetical index string array. 256 * selected: ID of the selected item. 257 * 258 * @param { object } value 259 * @returns { AlphabetIndexerAttribute } 260 * @syscap SystemCapability.ArkUI.ArkUI.Full 261 * @crossplatform 262 * @atomicservice 263 * @since 11 264 */ 265 /** 266 * Construct the alphabet indexer component. 267 * Called when the alphabet indexer component is used. 268 * Anonymous Object Rectification. 269 * 270 * @param { AlphabetIndexerOptions } options - alphabet indexer options 271 * @returns { AlphabetIndexerAttribute } 272 * @syscap SystemCapability.ArkUI.ArkUI.Full 273 * @crossplatform 274 * @atomicservice 275 * @since arkts {'1.1':'18','1.2':'20'} 276 * @arkts 1.1&1.2 277 */ 278 (options: AlphabetIndexerOptions): AlphabetIndexerAttribute; 279} 280 281/** 282 * Defines an AlphabetIndexer callback when onSelect. 283 * 284 * @typedef { function } OnAlphabetIndexerSelectCallback 285 * @param { number } index - selected index 286 * @syscap SystemCapability.ArkUI.ArkUI.Full 287 * @crossplatform 288 * @atomicservice 289 * @since arkts {'1.1':'18','1.2':'20'} 290 * @arkts 1.1&1.2 291 */ 292declare type OnAlphabetIndexerSelectCallback = (index: number) => void; 293 294/** 295 * Defines an AlphabetIndexer callback when onPopupSelect. 296 * 297 * @typedef { function } OnAlphabetIndexerPopupSelectCallback 298 * @param { number } index - selected index 299 * @syscap SystemCapability.ArkUI.ArkUI.Full 300 * @crossplatform 301 * @atomicservice 302 * @since arkts {'1.1':'18','1.2':'20'} 303 * @arkts 1.1&1.2 304 */ 305declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; 306 307/** 308 * Defines an AlphabetIndexer callback when onRequestPopupData. 309 * 310 * @typedef { function } OnAlphabetIndexerRequestPopupDataCallback 311 * @param { number } index - selected index 312 * @returns { Array<string> } string array corresponding to the index 313 * @syscap SystemCapability.ArkUI.ArkUI.Full 314 * @crossplatform 315 * @atomicservice 316 * @since arkts {'1.1':'18','1.2':'20'} 317 * @arkts 1.1&1.2 318 */ 319declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array<string>; 320 321/** 322 * Defines the alphabet index bar attribute functions. 323 * 324 * @extends CommonMethod<AlphabetIndexerAttribute> 325 * @syscap SystemCapability.ArkUI.ArkUI.Full 326 * @since 7 327 */ 328/** 329 * Defines the alphabet index bar attribute functions. 330 * 331 * @extends CommonMethod<AlphabetIndexerAttribute> 332 * @syscap SystemCapability.ArkUI.ArkUI.Full 333 * @crossplatform 334 * @since 10 335 */ 336/** 337 * Defines the alphabet index bar attribute functions. 338 * 339 * @extends CommonMethod<AlphabetIndexerAttribute> 340 * @syscap SystemCapability.ArkUI.ArkUI.Full 341 * @crossplatform 342 * @atomicservice 343 * @since arkts {'1.1':'11','1.2':'20'} 344 * @arkts 1.1&1.2 345 */ 346declare class AlphabetIndexerAttribute extends CommonMethod<AlphabetIndexerAttribute> { 347 /** 348 * Index bar selection callback. 349 * 350 * @param { function } callback 351 * @returns { AlphabetIndexerAttribute } 352 * @syscap SystemCapability.ArkUI.ArkUI.Full 353 * @since 7 354 * @deprecated since 8 355 * @useinstead onSelect 356 */ 357 onSelected(callback: (index: number) => void): AlphabetIndexerAttribute; 358 359 /** 360 * Definitions color. 361 * 362 * @param { ResourceColor } value 363 * @returns { AlphabetIndexerAttribute } 364 * @syscap SystemCapability.ArkUI.ArkUI.Full 365 * @since 7 366 */ 367 /** 368 * Definitions color. 369 * 370 * @param { ResourceColor } value 371 * @returns { AlphabetIndexerAttribute } 372 * @syscap SystemCapability.ArkUI.ArkUI.Full 373 * @crossplatform 374 * @since 10 375 */ 376 /** 377 * Definitions color. 378 * 379 * @param { ResourceColor } value 380 * @returns { AlphabetIndexerAttribute } 381 * @syscap SystemCapability.ArkUI.ArkUI.Full 382 * @crossplatform 383 * @atomicservice 384 * @since arkts {'1.1':'11','1.2':'20'} 385 * @arkts 1.1&1.2 386 */ 387 color(value: ResourceColor): AlphabetIndexerAttribute; 388 389 /** 390 * Select the text color. 391 * 392 * @param { ResourceColor } value 393 * @returns { AlphabetIndexerAttribute } 394 * @syscap SystemCapability.ArkUI.ArkUI.Full 395 * @since 7 396 */ 397 /** 398 * Select the text color. 399 * 400 * @param { ResourceColor } value 401 * @returns { AlphabetIndexerAttribute } 402 * @syscap SystemCapability.ArkUI.ArkUI.Full 403 * @crossplatform 404 * @since 10 405 */ 406 /** 407 * Select the text color. 408 * 409 * @param { ResourceColor } value 410 * @returns { AlphabetIndexerAttribute } 411 * @syscap SystemCapability.ArkUI.ArkUI.Full 412 * @crossplatform 413 * @atomicservice 414 * @since arkts {'1.1':'11','1.2':'20'} 415 * @arkts 1.1&1.2 416 */ 417 selectedColor(value: ResourceColor): AlphabetIndexerAttribute; 418 419 /** 420 * Font color of the pop-up prompt text. 421 * 422 * @param { ResourceColor } value 423 * @returns { AlphabetIndexerAttribute } 424 * @syscap SystemCapability.ArkUI.ArkUI.Full 425 * @since 7 426 */ 427 /** 428 * Font color of the pop-up prompt text. 429 * 430 * @param { ResourceColor } value 431 * @returns { AlphabetIndexerAttribute } 432 * @syscap SystemCapability.ArkUI.ArkUI.Full 433 * @crossplatform 434 * @since 10 435 */ 436 /** 437 * Font color of the pop-up prompt text. 438 * 439 * @param { ResourceColor } value 440 * @returns { AlphabetIndexerAttribute } 441 * @syscap SystemCapability.ArkUI.ArkUI.Full 442 * @crossplatform 443 * @atomicservice 444 * @since arkts {'1.1':'11','1.2':'20'} 445 * @arkts 1.1&1.2 446 */ 447 popupColor(value: ResourceColor): AlphabetIndexerAttribute; 448 449 /** 450 * Select the text background color. 451 * 452 * @param { ResourceColor } value 453 * @returns { AlphabetIndexerAttribute } 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @since 7 456 */ 457 /** 458 * Select the text background color. 459 * 460 * @param { ResourceColor } value 461 * @returns { AlphabetIndexerAttribute } 462 * @syscap SystemCapability.ArkUI.ArkUI.Full 463 * @crossplatform 464 * @since 10 465 */ 466 /** 467 * Select the text background color. 468 * 469 * @param { ResourceColor } value 470 * @returns { AlphabetIndexerAttribute } 471 * @syscap SystemCapability.ArkUI.ArkUI.Full 472 * @crossplatform 473 * @atomicservice 474 * @since arkts {'1.1':'11','1.2':'20'} 475 * @arkts 1.1&1.2 476 */ 477 selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute; 478 479 /** 480 * Background color of the pop-up window index. 481 * 482 * @param { ResourceColor } value 483 * @returns { AlphabetIndexerAttribute } 484 * @syscap SystemCapability.ArkUI.ArkUI.Full 485 * @since 7 486 */ 487 /** 488 * Background color of the pop-up window index. 489 * 490 * @param { ResourceColor } value 491 * @returns { AlphabetIndexerAttribute } 492 * @syscap SystemCapability.ArkUI.ArkUI.Full 493 * @crossplatform 494 * @since 10 495 */ 496 /** 497 * Background color of the pop-up window index. 498 * 499 * @param { ResourceColor } value 500 * @returns { AlphabetIndexerAttribute } 501 * @syscap SystemCapability.ArkUI.ArkUI.Full 502 * @crossplatform 503 * @atomicservice 504 * @since arkts {'1.1':'11','1.2':'20'} 505 * @arkts 1.1&1.2 506 */ 507 popupBackground(value: ResourceColor): AlphabetIndexerAttribute; 508 509 /** 510 * Set the selected font color of non-alphabetic part of the pop-up window. 511 * 512 * @param { ResourceColor } value - indicates the color of the selected font. 513 * @returns { AlphabetIndexerAttribute } 514 * @syscap SystemCapability.ArkUI.ArkUI.Full 515 * @crossplatform 516 * @since 10 517 */ 518 /** 519 * Set the selected font color of non-alphabetic part of the pop-up window. 520 * 521 * @param { ResourceColor } value - indicates the color of the selected font. 522 * @returns { AlphabetIndexerAttribute } 523 * @syscap SystemCapability.ArkUI.ArkUI.Full 524 * @crossplatform 525 * @atomicservice 526 * @since arkts {'1.1':'11','1.2':'20'} 527 * @arkts 1.1&1.2 528 */ 529 popupSelectedColor(value: ResourceColor): AlphabetIndexerAttribute; 530 531 /** 532 * Set the unselected font color of non-alphabetic part of the pop-up window. 533 * 534 * @param { ResourceColor } value - indicates the color of the unselected font. 535 * @returns { AlphabetIndexerAttribute } 536 * @syscap SystemCapability.ArkUI.ArkUI.Full 537 * @crossplatform 538 * @since 10 539 */ 540 /** 541 * Set the unselected font color of non-alphabetic part of the pop-up window. 542 * 543 * @param { ResourceColor } value - indicates the color of the unselected font. 544 * @returns { AlphabetIndexerAttribute } 545 * @syscap SystemCapability.ArkUI.ArkUI.Full 546 * @crossplatform 547 * @atomicservice 548 * @since arkts {'1.1':'11','1.2':'20'} 549 * @arkts 1.1&1.2 550 */ 551 popupUnselectedColor(value: ResourceColor): AlphabetIndexerAttribute; 552 553 /** 554 * Set the background color of non-alphabetic part of the pop-up window. 555 * 556 * @param { ResourceColor } value - indicates the color of background. 557 * @returns { AlphabetIndexerAttribute } 558 * @syscap SystemCapability.ArkUI.ArkUI.Full 559 * @crossplatform 560 * @since 10 561 */ 562 /** 563 * Set the background color of non-alphabetic part of the pop-up window. 564 * 565 * @param { ResourceColor } value - indicates the color of background. 566 * @returns { AlphabetIndexerAttribute } 567 * @syscap SystemCapability.ArkUI.ArkUI.Full 568 * @crossplatform 569 * @atomicservice 570 * @since arkts {'1.1':'11','1.2':'20'} 571 * @arkts 1.1&1.2 572 */ 573 popupItemBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute; 574 575 /** 576 * Whether to use pop-up index hints. 577 * 578 * @param { boolean } value 579 * @returns { AlphabetIndexerAttribute } 580 * @syscap SystemCapability.ArkUI.ArkUI.Full 581 * @since 7 582 */ 583 /** 584 * Whether to use pop-up index hints. 585 * 586 * @param { boolean } value 587 * @returns { AlphabetIndexerAttribute } 588 * @syscap SystemCapability.ArkUI.ArkUI.Full 589 * @crossplatform 590 * @since 10 591 */ 592 /** 593 * Whether to use pop-up index hints. 594 * 595 * @param { boolean } value 596 * @returns { AlphabetIndexerAttribute } 597 * @syscap SystemCapability.ArkUI.ArkUI.Full 598 * @crossplatform 599 * @atomicservice 600 * @since arkts {'1.1':'11','1.2':'20'} 601 * @arkts 1.1&1.2 602 */ 603 usingPopup(value: boolean): AlphabetIndexerAttribute; 604 605 /** 606 * Select the text text style, 607 * 608 * @param { Font } value 609 * @returns { AlphabetIndexerAttribute } 610 * @syscap SystemCapability.ArkUI.ArkUI.Full 611 * @since 7 612 */ 613 /** 614 * Select the text text style, 615 * 616 * @param { Font } value 617 * @returns { AlphabetIndexerAttribute } 618 * @syscap SystemCapability.ArkUI.ArkUI.Full 619 * @crossplatform 620 * @since 10 621 */ 622 /** 623 * Select the text text style, 624 * 625 * @param { Font } value 626 * @returns { AlphabetIndexerAttribute } 627 * @syscap SystemCapability.ArkUI.ArkUI.Full 628 * @crossplatform 629 * @atomicservice 630 * @since arkts {'1.1':'11','1.2':'20'} 631 * @arkts 1.1&1.2 632 */ 633 selectedFont(value: Font): AlphabetIndexerAttribute; 634 635 /** 636 * Select the text background color. 637 * 638 * @param { Font } value 639 * @returns { AlphabetIndexerAttribute } 640 * @syscap SystemCapability.ArkUI.ArkUI.Full 641 * @since 7 642 */ 643 /** 644 * Select the text background color. 645 * 646 * @param { Font } value 647 * @returns { AlphabetIndexerAttribute } 648 * @syscap SystemCapability.ArkUI.ArkUI.Full 649 * @crossplatform 650 * @since 10 651 */ 652 /** 653 * Select the text background color. 654 * 655 * @param { Font } value 656 * @returns { AlphabetIndexerAttribute } 657 * @syscap SystemCapability.ArkUI.ArkUI.Full 658 * @crossplatform 659 * @atomicservice 660 * @since arkts {'1.1':'11','1.2':'20'} 661 * @arkts 1.1&1.2 662 */ 663 popupFont(value: Font): AlphabetIndexerAttribute; 664 665 /** 666 * Set the font style of non-alphabetic part of the prompt pop-up window. 667 * Family and style are not supported currently and will be fixed in future. 668 * 669 * @param { Font } value - indicates the style of the font. 670 * @returns { AlphabetIndexerAttribute } 671 * @syscap SystemCapability.ArkUI.ArkUI.Full 672 * @crossplatform 673 * @since 10 674 */ 675 /** 676 * Set the font style of non-alphabetic part of the prompt pop-up window. 677 * Family and style are not supported currently and will be fixed in future. 678 * 679 * @param { Font } value - indicates the style of the font. 680 * @returns { AlphabetIndexerAttribute } 681 * @syscap SystemCapability.ArkUI.ArkUI.Full 682 * @crossplatform 683 * @atomicservice 684 * @since arkts {'1.1':'11','1.2':'20'} 685 * @arkts 1.1&1.2 686 */ 687 popupItemFont(value: Font): AlphabetIndexerAttribute; 688 689 /** 690 * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. 691 * 692 * @param { string | number } value 693 * @returns { AlphabetIndexerAttribute } 694 * @syscap SystemCapability.ArkUI.ArkUI.Full 695 * @since 7 696 */ 697 /** 698 * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. 699 * 700 * @param { string | number } value 701 * @returns { AlphabetIndexerAttribute } 702 * @syscap SystemCapability.ArkUI.ArkUI.Full 703 * @crossplatform 704 * @since 10 705 */ 706 /** 707 * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. 708 * 709 * @param { string | number } value 710 * @returns { AlphabetIndexerAttribute } 711 * @syscap SystemCapability.ArkUI.ArkUI.Full 712 * @crossplatform 713 * @atomicservice 714 * @since arkts {'1.1':'11','1.2':'20'} 715 * @arkts 1.1&1.2 716 */ 717 itemSize(value: string | number): AlphabetIndexerAttribute; 718 719 /** 720 * Definitions fonts. 721 * 722 * @param { Font } value 723 * @returns { AlphabetIndexerAttribute } 724 * @syscap SystemCapability.ArkUI.ArkUI.Full 725 * @since 7 726 */ 727 /** 728 * Definitions fonts. 729 * 730 * @param { Font } value 731 * @returns { AlphabetIndexerAttribute } 732 * @syscap SystemCapability.ArkUI.ArkUI.Full 733 * @crossplatform 734 * @since 10 735 */ 736 /** 737 * Definitions fonts. 738 * 739 * @param { Font } value 740 * @returns { AlphabetIndexerAttribute } 741 * @syscap SystemCapability.ArkUI.ArkUI.Full 742 * @crossplatform 743 * @atomicservice 744 * @since arkts {'1.1':'11','1.2':'20'} 745 * @arkts 1.1&1.2 746 */ 747 font(value: Font): AlphabetIndexerAttribute; 748 749 /** 750 * Alphabet index bar alignment style. The left and right alignment styles are supported, 751 * which affects the pop-up position of the pop-up window. 752 * 753 * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. 754 * @returns { AlphabetIndexerAttribute } 755 * @syscap SystemCapability.ArkUI.ArkUI.Full 756 * @since 7 757 */ 758 /** 759 * Alphabet index bar alignment style. The left and right alignment styles are supported, 760 * which affects the pop-up position of the pop-up window. 761 * 762 * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. 763 * @param { Length } [offset] - indicates the horizontal space between pop-up window and indexer bar. 764 * @returns { AlphabetIndexerAttribute } 765 * @syscap SystemCapability.ArkUI.ArkUI.Full 766 * @crossplatform 767 * @since 10 768 */ 769 /** 770 * Alphabet index bar alignment style. The left and right alignment styles are supported, 771 * which affects the pop-up position of the pop-up window. 772 * 773 * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. 774 * @param { Length } [offset] - indicates the horizontal space between pop-up window and indexer bar. 775 * @returns { AlphabetIndexerAttribute } 776 * @syscap SystemCapability.ArkUI.ArkUI.Full 777 * @crossplatform 778 * @atomicservice 779 * @since arkts {'1.1':'11','1.2':'20'} 780 * @arkts 1.1&1.2 781 */ 782 alignStyle(value: IndexerAlign, offset?: Length): AlphabetIndexerAttribute; 783 784 /** 785 * Index bar selection callback. 786 * 787 * @param { function } callback 788 * @returns { AlphabetIndexerAttribute } 789 * @syscap SystemCapability.ArkUI.ArkUI.Full 790 * @since 8 791 */ 792 /** 793 * Index bar selection callback. 794 * 795 * @param { function } callback 796 * @returns { AlphabetIndexerAttribute } 797 * @syscap SystemCapability.ArkUI.ArkUI.Full 798 * @crossplatform 799 * @since 10 800 */ 801 /** 802 * Index bar selection callback. 803 * 804 * @param { function } callback 805 * @returns { AlphabetIndexerAttribute } 806 * @syscap SystemCapability.ArkUI.ArkUI.Full 807 * @crossplatform 808 * @atomicservice 809 * @since 11 810 */ 811 /** 812 * Index bar selection callback. 813 * Anonymous Object Rectification. 814 * 815 * @param { OnAlphabetIndexerSelectCallback } callback 816 * @returns { AlphabetIndexerAttribute } 817 * @syscap SystemCapability.ArkUI.ArkUI.Full 818 * @crossplatform 819 * @atomicservice 820 * @since arkts {'1.1':'18','1.2':'20'} 821 * @arkts 1.1&1.2 822 */ 823 onSelect(callback: OnAlphabetIndexerSelectCallback): AlphabetIndexerAttribute; 824 825 /** 826 * Index bar selection callback and return the strings which display on pop-up. 827 * 828 * @param { function } callback 829 * @returns { AlphabetIndexerAttribute } 830 * @syscap SystemCapability.ArkUI.ArkUI.Full 831 * @since 8 832 */ 833 /** 834 * Index bar selection callback and return the strings which display on pop-up. 835 * 836 * @param { function } callback 837 * @returns { AlphabetIndexerAttribute } 838 * @syscap SystemCapability.ArkUI.ArkUI.Full 839 * @crossplatform 840 * @since 10 841 */ 842 /** 843 * Index bar selection callback and return the strings which display on pop-up. 844 * 845 * @param { function } callback 846 * @returns { AlphabetIndexerAttribute } 847 * @syscap SystemCapability.ArkUI.ArkUI.Full 848 * @crossplatform 849 * @atomicservice 850 * @since 11 851 */ 852 /** 853 * Index bar selection callback and return the strings which display on pop-up. 854 * Anonymous Object Rectification. 855 * 856 * @param { OnAlphabetIndexerRequestPopupDataCallback } callback 857 * @returns { AlphabetIndexerAttribute } 858 * @syscap SystemCapability.ArkUI.ArkUI.Full 859 * @crossplatform 860 * @atomicservice 861 * @since arkts {'1.1':'18','1.2':'20'} 862 * @arkts 1.1&1.2 863 */ 864 onRequestPopupData(callback: OnAlphabetIndexerRequestPopupDataCallback): AlphabetIndexerAttribute; 865 866 /** 867 * Pop-up selection callback. 868 * 869 * @param { function } callback 870 * @returns { AlphabetIndexerAttribute } 871 * @syscap SystemCapability.ArkUI.ArkUI.Full 872 * @since 8 873 */ 874 /** 875 * Pop-up selection callback. 876 * 877 * @param { function } callback 878 * @returns { AlphabetIndexerAttribute } 879 * @syscap SystemCapability.ArkUI.ArkUI.Full 880 * @crossplatform 881 * @since 10 882 */ 883 /** 884 * Pop-up selection callback. 885 * 886 * @param { function } callback 887 * @returns { AlphabetIndexerAttribute } 888 * @syscap SystemCapability.ArkUI.ArkUI.Full 889 * @crossplatform 890 * @atomicservice 891 * @since 11 892 */ 893 /** 894 * Pop-up selection callback. 895 * Anonymous Object Rectification. 896 * 897 * @param { OnAlphabetIndexerPopupSelectCallback } callback 898 * @returns { AlphabetIndexerAttribute } 899 * @syscap SystemCapability.ArkUI.ArkUI.Full 900 * @crossplatform 901 * @atomicservice 902 * @since arkts {'1.1':'18','1.2':'20'} 903 * @arkts 1.1&1.2 904 */ 905 onPopupSelect(callback: OnAlphabetIndexerPopupSelectCallback): AlphabetIndexerAttribute; 906 907 /** 908 * Sets the selected index. 909 * 910 * @param { number } index 911 * @returns { AlphabetIndexerAttribute } 912 * @syscap SystemCapability.ArkUI.ArkUI.Full 913 * @since 8 914 */ 915 /** 916 * Sets the selected index. 917 * 918 * @param { number } index 919 * @returns { AlphabetIndexerAttribute } 920 * @syscap SystemCapability.ArkUI.ArkUI.Full 921 * @crossplatform 922 * @since 10 923 */ 924 /** 925 * Sets the selected index. 926 * 927 * @param { number } index 928 * @returns { AlphabetIndexerAttribute } 929 * @syscap SystemCapability.ArkUI.ArkUI.Full 930 * @crossplatform 931 * @atomicservice 932 * @since arkts {'1.1':'11','1.2':'20'} 933 * @arkts 1.1&1.2 934 */ 935 selected(index: number): AlphabetIndexerAttribute; 936 937 /** 938 * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. 939 * 940 * @param { Position } value 941 * @returns { AlphabetIndexerAttribute } 942 * @syscap SystemCapability.ArkUI.ArkUI.Full 943 * @since 8 944 */ 945 /** 946 * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. 947 * 948 * @param { Position } value 949 * @returns { AlphabetIndexerAttribute } 950 * @syscap SystemCapability.ArkUI.ArkUI.Full 951 * @crossplatform 952 * @since 10 953 */ 954 /** 955 * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. 956 * 957 * @param { Position } value 958 * @returns { AlphabetIndexerAttribute } 959 * @syscap SystemCapability.ArkUI.ArkUI.Full 960 * @crossplatform 961 * @atomicservice 962 * @since arkts {'1.1':'11','1.2':'20'} 963 * @arkts 1.1&1.2 964 */ 965 popupPosition(value: Position): AlphabetIndexerAttribute; 966 967 /** 968 * Automatically collapses the characters when the indexer bar not high enough to display all characters. 969 * 970 * @param { boolean } value - A boolean value determines whether auto collapses is enabled for indexer bar. 971 * @returns { AlphabetIndexerAttribute } 972 * @syscap SystemCapability.ArkUI.ArkUI.Full 973 * @crossplatform 974 * @since 11 975 */ 976 /** 977 * Automatically collapses the characters when the indexer bar not high enough to display all characters. 978 * 979 * @param { boolean } value - A boolean value determines whether auto collapses is enabled for indexer bar. 980 * @returns { AlphabetIndexerAttribute } 981 * @syscap SystemCapability.ArkUI.ArkUI.Full 982 * @crossplatform 983 * @atomicservice 984 * @since arkts {'1.1':'12','1.2':'20'} 985 * @arkts 1.1&1.2 986 */ 987 autoCollapse(value: boolean): AlphabetIndexerAttribute; 988 989 /** 990 * Set the radius of the item of the pop-up window. 991 * 992 * @param { number } value 993 * @returns { AlphabetIndexerAttribute } 994 * @syscap SystemCapability.ArkUI.ArkUI.Full 995 * @crossplatform 996 * @atomicservice 997 * @since arkts {'1.1':'12','1.2':'20'} 998 * @arkts 1.1&1.2 999 */ 1000 popupItemBorderRadius(value: number): AlphabetIndexerAttribute; 1001 1002 /** 1003 * Set the radius of the item of the indexer. 1004 * 1005 * @param { number } value 1006 * @returns { AlphabetIndexerAttribute } 1007 * @syscap SystemCapability.ArkUI.ArkUI.Full 1008 * @crossplatform 1009 * @atomicservice 1010 * @since arkts {'1.1':'12','1.2':'20'} 1011 * @arkts 1.1&1.2 1012 */ 1013 itemBorderRadius(value: number): AlphabetIndexerAttribute; 1014 1015 /** 1016 * Set the background blurStyle of title of the pop-up window. 1017 * 1018 * @param { BlurStyle } value 1019 * @returns { AlphabetIndexerAttribute } 1020 * @syscap SystemCapability.ArkUI.ArkUI.Full 1021 * @crossplatform 1022 * @atomicservice 1023 * @since arkts {'1.1':'12','1.2':'20'} 1024 * @arkts 1.1&1.2 1025 */ 1026 popupBackgroundBlurStyle(value: BlurStyle): AlphabetIndexerAttribute; 1027 1028 /** 1029 * Set the background color of title of the pop-up window. 1030 * 1031 * @param { ResourceColor } value 1032 * @returns { AlphabetIndexerAttribute } 1033 * @syscap SystemCapability.ArkUI.ArkUI.Full 1034 * @crossplatform 1035 * @atomicservice 1036 * @since arkts {'1.1':'12','1.2':'20'} 1037 * @arkts 1.1&1.2 1038 */ 1039 popupTitleBackground(value: ResourceColor): AlphabetIndexerAttribute; 1040 1041 /** 1042 * Enable or disable haptic feedback. 1043 * 1044 * @param { boolean } value - Default value is true, set false to disable haptic feedback. 1045 * @returns { AlphabetIndexerAttribute } 1046 * @syscap SystemCapability.ArkUI.ArkUI.Full 1047 * @atomicservice 1048 * @since arkts {'1.1':'12','1.2':'20'} 1049 * @arkts 1.1&1.2 1050 */ 1051 enableHapticFeedback(value: boolean): AlphabetIndexerAttribute; 1052} 1053 1054/** 1055 * Defines AlphabetIndexer Component. 1056 * 1057 * @syscap SystemCapability.ArkUI.ArkUI.Full 1058 * @since 7 1059 */ 1060/** 1061 * Defines AlphabetIndexer Component. 1062 * 1063 * @syscap SystemCapability.ArkUI.ArkUI.Full 1064 * @crossplatform 1065 * @since 10 1066 */ 1067/** 1068 * Defines AlphabetIndexer Component. 1069 * 1070 * @syscap SystemCapability.ArkUI.ArkUI.Full 1071 * @crossplatform 1072 * @atomicservice 1073 * @since 11 1074 */ 1075declare const AlphabetIndexer: AlphabetIndexerInterface; 1076 1077/** 1078 * Defines AlphabetIndexer Component instance. 1079 * 1080 * @syscap SystemCapability.ArkUI.ArkUI.Full 1081 * @since 7 1082 */ 1083/** 1084 * Defines AlphabetIndexer Component instance. 1085 * 1086 * @syscap SystemCapability.ArkUI.ArkUI.Full 1087 * @crossplatform 1088 * @since 10 1089 */ 1090/** 1091 * Defines AlphabetIndexer Component instance. 1092 * 1093 * @syscap SystemCapability.ArkUI.ArkUI.Full 1094 * @crossplatform 1095 * @atomicservice 1096 * @since 11 1097 */ 1098declare const AlphabetIndexerInstance: AlphabetIndexerAttribute; 1099