1/* 2 * Copyright (c) 2021-2025 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 window from '../../@ohos.window'; 23import { Resource } from '../../global/resource'; 24import { TextModifier } from '../../arkui/TextModifier'; 25import { LengthMetrics } from '../../arkui/Graphics'; 26import { Callback, BlurStyle, CommonMethod, Optional, LayoutSafeAreaType, LayoutSafeAreaEdge, BackgroundEffectOptions, BackgroundBlurStyleOptions, PixelMap, Bindable } from './common' 27import { CustomBuilder, PageMapBuilder } from './builder' 28import { Length, ResourceStr, ResourceColor, Dimension, VoidCallback } from './units' 29import { TitleHeight } from './enums' 30import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier' 31import { NavDestinationContext, NavDestinationMode } from './navDestination' 32/*** endif */ 33 34/** 35 * Import the SystemBarStyle type for Navigation. 36 * 37 * @typedef { import('../api/@ohos.window').default.SystemBarStyle } SystemBarStyle 38 * @syscap SystemCapability.ArkUI.ArkUI.Full 39 * @atomicservice 40 * @since 12 41 */ 42declare type SystemBarStyle = import('../api/@ohos.window').default.SystemBarStyle; 43 44 45/** 46 * Import the SystemBarStyle type for Navigation. 47 * 48 * @typedef { window.SystemBarStyle } SystemBarStyle 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @atomicservice 51 * @since 20 52 * @arkts 1.2 53 */ 54declare type SystemBarStyle = window.SystemBarStyle; 55 56/** 57 * Defines the navigation common title. 58 * 59 * @interface NavigationCommonTitle 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @since 9 62 */ 63/** 64 * Defines the navigation common title. 65 * 66 * @interface NavigationCommonTitle 67 * @syscap SystemCapability.ArkUI.ArkUI.Full 68 * @crossplatform 69 * @since 10 70 */ 71/** 72 * Defines the navigation common title. 73 * 74 * @interface NavigationCommonTitle 75 * @syscap SystemCapability.ArkUI.ArkUI.Full 76 * @crossplatform 77 * @atomicservice 78 * @since arkts {'1.1':'11','1.2':'20'} 79 * @arkts 1.1&1.2 80 */ 81declare interface NavigationCommonTitle { 82 /** 83 * Sets the main title. 84 * 85 * @type { string } 86 * @syscap SystemCapability.ArkUI.ArkUI.Full 87 * @since 9 88 */ 89 /** 90 * Sets the main title. 91 * 92 * @type { string } 93 * @syscap SystemCapability.ArkUI.ArkUI.Full 94 * @crossplatform 95 * @since 10 96 */ 97 /** 98 * Sets the main title. 99 * 100 * @type { string } 101 * @syscap SystemCapability.ArkUI.ArkUI.Full 102 * @crossplatform 103 * @atomicservice 104 * @since 11 105 */ 106 /** 107 * Sets the main title. 108 * 109 * @type { string | Resource } 110 * @syscap SystemCapability.ArkUI.ArkUI.Full 111 * @crossplatform 112 * @atomicservice 113 * @since arkts {'1.1':'14','1.2':'20'} 114 * @arkts 1.1&1.2 115 */ 116 main: string | Resource; 117 118 /** 119 * Sets the sub title. 120 * 121 * @type { string } 122 * @syscap SystemCapability.ArkUI.ArkUI.Full 123 * @since 9 124 */ 125 /** 126 * Sets the sub title. 127 * 128 * @type { string } 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @crossplatform 131 * @since 10 132 */ 133 /** 134 * Sets the sub title. 135 * 136 * @type { string } 137 * @syscap SystemCapability.ArkUI.ArkUI.Full 138 * @crossplatform 139 * @atomicservice 140 * @since 11 141 */ 142 /** 143 * Sets the sub title. 144 * 145 * @type { string | Resource } 146 * @syscap SystemCapability.ArkUI.ArkUI.Full 147 * @crossplatform 148 * @atomicservice 149 * @since arkts {'1.1':'14','1.2':'20'} 150 * @arkts 1.1&1.2 151 */ 152 sub: string | Resource; 153} 154 155/** 156 * Defines the navigation custom title. 157 * 158 * @interface NavigationCustomTitle 159 * @syscap SystemCapability.ArkUI.ArkUI.Full 160 * @since 9 161 */ 162/** 163 * Defines the navigation custom title. 164 * 165 * @interface NavigationCustomTitle 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @crossplatform 168 * @since 10 169 */ 170/** 171 * Defines the navigation custom title. 172 * 173 * @interface NavigationCustomTitle 174 * @syscap SystemCapability.ArkUI.ArkUI.Full 175 * @crossplatform 176 * @atomicservice 177 * @since arkts {'1.1':'11','1.2':'20'} 178 * @arkts 1.1&1.2 179 */ 180declare interface NavigationCustomTitle { 181 /** 182 * Custom content of the title bar. 183 * 184 * @type { CustomBuilder } 185 * @syscap SystemCapability.ArkUI.ArkUI.Full 186 * @since 9 187 */ 188 /** 189 * Custom content of the title bar. 190 * 191 * @type { CustomBuilder } 192 * @syscap SystemCapability.ArkUI.ArkUI.Full 193 * @crossplatform 194 * @since 10 195 */ 196 /** 197 * Custom content of the title bar. 198 * 199 * @type { CustomBuilder } 200 * @syscap SystemCapability.ArkUI.ArkUI.Full 201 * @crossplatform 202 * @atomicservice 203 * @since arkts {'1.1':'11','1.2':'20'} 204 * @arkts 1.1&1.2 205 */ 206 builder: CustomBuilder; 207 208 /** 209 * Height of the title bar. 210 * 211 * @type { TitleHeight | Length } 212 * @syscap SystemCapability.ArkUI.ArkUI.Full 213 * @since 9 214 */ 215 /** 216 * Height of the title bar. 217 * 218 * @type { TitleHeight | Length } 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @crossplatform 221 * @since 10 222 */ 223 /** 224 * Height of the title bar. 225 * 226 * @type { TitleHeight | Length } 227 * @syscap SystemCapability.ArkUI.ArkUI.Full 228 * @crossplatform 229 * @atomicservice 230 * @since arkts {'1.1':'11','1.2':'20'} 231 * @arkts 1.1&1.2 232 */ 233 height: TitleHeight | Length; 234} 235 236 237/** 238 * Navigation mode 239 * 240 * @enum { number } 241 * @syscap SystemCapability.ArkUI.ArkUI.Full 242 * @since 9 243 */ 244/** 245 * Navigation mode 246 * 247 * @enum { number } 248 * @syscap SystemCapability.ArkUI.ArkUI.Full 249 * @crossplatform 250 * @since 10 251 */ 252/** 253 * Navigation mode 254 * 255 * @enum { number } 256 * @syscap SystemCapability.ArkUI.ArkUI.Full 257 * @crossplatform 258 * @atomicservice 259 * @since arkts {'1.1':'11','1.2':'20'} 260 * @arkts 1.1&1.2 261 */ 262declare enum NavigationMode { 263 /** 264 * The navigation bar and the content area are displayed in stack. 265 * 266 * @syscap SystemCapability.ArkUI.ArkUI.Full 267 * @since 9 268 */ 269 /** 270 * The navigation bar and the content area are displayed in stack. 271 * 272 * @syscap SystemCapability.ArkUI.ArkUI.Full 273 * @crossplatform 274 * @since 10 275 */ 276 /** 277 * The navigation bar and the content area are displayed in stack. 278 * 279 * @syscap SystemCapability.ArkUI.ArkUI.Full 280 * @crossplatform 281 * @atomicservice 282 * @since arkts {'1.1':'11','1.2':'20'} 283 * @arkts 1.1&1.2 284 */ 285 Stack, 286 287 /** 288 * The navigation bar and the content area are displayed side by side. 289 * 290 * @syscap SystemCapability.ArkUI.ArkUI.Full 291 * @since 9 292 */ 293 /** 294 * The navigation bar and the content area are displayed side by side. 295 * 296 * @syscap SystemCapability.ArkUI.ArkUI.Full 297 * @crossplatform 298 * @since 10 299 */ 300 /** 301 * The navigation bar and the content area are displayed side by side. 302 * 303 * @syscap SystemCapability.ArkUI.ArkUI.Full 304 * @crossplatform 305 * @atomicservice 306 * @since arkts {'1.1':'11','1.2':'20'} 307 * @arkts 1.1&1.2 308 */ 309 Split, 310 311 /** 312 * If the window width is greater than 520vp, the navigation component is displayed in split mode. 313 * Otherwise it's displayed in stack mode. 314 * 315 * @syscap SystemCapability.ArkUI.ArkUI.Full 316 * @since 9 317 */ 318 /** 319 * If the window width is greater than the sum of minNavBarWidth and minContentWidth, the navigation component is displayed in split mode. 320 * Otherwise it's displayed in stack mode. 321 * 322 * @syscap SystemCapability.ArkUI.ArkUI.Full 323 * @crossplatform 324 * @since 10 325 */ 326 /** 327 * If the window width is greater than the sum of minNavBarWidth and minContentWidth, the navigation component is displayed in split mode. 328 * Otherwise it's displayed in stack mode. 329 * 330 * @syscap SystemCapability.ArkUI.ArkUI.Full 331 * @crossplatform 332 * @atomicservice 333 * @since arkts {'1.1':'11','1.2':'20'} 334 * @arkts 1.1&1.2 335 */ 336 Auto, 337} 338 339/** 340 * Navigation bar position 341 * 342 * @enum { number } 343 * @syscap SystemCapability.ArkUI.ArkUI.Full 344 * @since 9 345 */ 346/** 347 * Navigation bar position 348 * 349 * @enum { number } 350 * @syscap SystemCapability.ArkUI.ArkUI.Full 351 * @crossplatform 352 * @since 10 353 */ 354/** 355 * Navigation bar position 356 * 357 * @enum { number } 358 * @syscap SystemCapability.ArkUI.ArkUI.Full 359 * @crossplatform 360 * @atomicservice 361 * @since arkts {'1.1':'11','1.2':'20'} 362 * @arkts 1.1&1.2 363 */ 364declare enum NavBarPosition { 365 /** 366 * In navigation split mode, the main column is at the start of the main axis. 367 * 368 * @syscap SystemCapability.ArkUI.ArkUI.Full 369 * @since 9 370 */ 371 /** 372 * In navigation split mode, the main column is at the start of the main axis. 373 * 374 * @syscap SystemCapability.ArkUI.ArkUI.Full 375 * @crossplatform 376 * @since 10 377 */ 378 /** 379 * In navigation split mode, the main column is at the start of the main axis. 380 * 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 Start, 388 389 /** 390 * The navigation bar is on the End of the container 391 * 392 * @syscap SystemCapability.ArkUI.ArkUI.Full 393 * @since 9 394 */ 395 /** 396 * The navigation bar is on the End of the container 397 * 398 * @syscap SystemCapability.ArkUI.ArkUI.Full 399 * @crossplatform 400 * @since 10 401 */ 402 /** 403 * The navigation bar is on the End of the container 404 * 405 * @syscap SystemCapability.ArkUI.ArkUI.Full 406 * @crossplatform 407 * @atomicservice 408 * @since arkts {'1.1':'11','1.2':'20'} 409 * @arkts 1.1&1.2 410 */ 411 End, 412} 413 414/** 415 * Navigation title mode. 416 * 417 * @enum { number } 418 * @syscap SystemCapability.ArkUI.ArkUI.Full 419 * @since 8 420 */ 421/** 422 * Navigation title mode. 423 * 424 * @enum { number } 425 * @syscap SystemCapability.ArkUI.ArkUI.Full 426 * @crossplatform 427 * @since 10 428 */ 429/** 430 * Navigation title mode. 431 * 432 * @enum { number } 433 * @syscap SystemCapability.ArkUI.ArkUI.Full 434 * @crossplatform 435 * @atomicservice 436 * @since arkts {'1.1':'11','1.2':'20'} 437 * @arkts 1.1&1.2 438 */ 439declare enum NavigationTitleMode { 440 /** 441 * When the content is more than one screen in a scrollable component, the 442 * main title shrinks as the content scrolls down (the subtitle fades out 443 * with its size remaining unchanged) and restores as the content scrolls 444 * up to the top. 445 * <br>**NOTE** 446 * <br>The effect where the main title's size changes in response to content 447 * scrolling is effective only when **title** is set to **ResourceStr** or 448 * **NavigationCommonTitle**. If **title** is set to any other value type, the 449 * main title changes in mere location when pulled down. 450 * <br>For this effect to work when the content is less than one screen in a 451 * scrollable component, set the **options** parameter of the scrollable 452 * component's edgeEffect attribute to **true**. In the non-scrolling state, the 453 * height of the title bar is the same as in **Full** mode; in the scrolling state, 454 * the minimum height of the title bar is the same as in **Mini** mode. 455 * 456 * @syscap SystemCapability.ArkUI.ArkUI.Full 457 * @since 8 458 */ 459 /** 460 * When the content is more than one screen in a scrollable component, the 461 * main title shrinks as the content scrolls down (the subtitle fades out 462 * with its size remaining unchanged) and restores as the content scrolls 463 * up to the top. 464 * <br>**NOTE** 465 * <br>The effect where the main title's size changes in response to content 466 * scrolling is effective only when **title** is set to **ResourceStr** or 467 * **NavigationCommonTitle**. If **title** is set to any other value type, the 468 * main title changes in mere location when pulled down. 469 * <br>For this effect to work when the content is less than one screen in a 470 * scrollable component, set the **options** parameter of the scrollable 471 * component's edgeEffect attribute to **true**. In the non-scrolling state, the 472 * height of the title bar is the same as in **Full** mode; in the scrolling state, 473 * the minimum height of the title bar is the same as in **Mini** mode. 474 * 475 * @syscap SystemCapability.ArkUI.ArkUI.Full 476 * @crossplatform 477 * @since 10 478 */ 479 /** 480 * When the content is more than one screen in a scrollable component, the 481 * main title shrinks as the content scrolls down (the subtitle fades out 482 * with its size remaining unchanged) and restores as the content scrolls 483 * up to the top. 484 * <br>**NOTE** 485 * <br>The effect where the main title's size changes in response to content 486 * scrolling is effective only when **title** is set to **ResourceStr** or 487 * **NavigationCommonTitle**. If **title** is set to any other value type, the 488 * main title changes in mere location when pulled down. 489 * <br>For this effect to work when the content is less than one screen in a 490 * scrollable component, set the **options** parameter of the scrollable 491 * component's edgeEffect attribute to **true**. In the non-scrolling state, the 492 * height of the title bar is the same as in **Full** mode; in the scrolling state, 493 * the minimum height of the title bar is the same as in **Mini** mode. 494 * 495 * @syscap SystemCapability.ArkUI.ArkUI.Full 496 * @crossplatform 497 * @atomicservice 498 * @since arkts {'1.1':'11','1.2':'20'} 499 * @arkts 1.1&1.2 500 */ 501 Free = 0, 502 503 /** 504 * The title is fixed at full mode.<br>Default value: If there is only a main 505 * title, the title bar height is 112 vp; if there is both a main title and a 506 * subtitle, the title bar height is 138 vp. 507 * 508 * @syscap SystemCapability.ArkUI.ArkUI.Full 509 * @since 8 510 */ 511 /** 512 * The title is fixed at full mode.<br>Default value: If there is only a main 513 * title, the title bar height is 112 vp; if there is both a main title and a 514 * subtitle, the title bar height is 138 vp. 515 * 516 * @syscap SystemCapability.ArkUI.ArkUI.Full 517 * @crossplatform 518 * @since 10 519 */ 520 /** 521 * The title is fixed at full mode.<br>Default value: If there is only a main 522 * title, the title bar height is 112 vp; if there is both a main title and a 523 * subtitle, the title bar height is 138 vp. 524 * 525 * @syscap SystemCapability.ArkUI.ArkUI.Full 526 * @crossplatform 527 * @atomicservice 528 * @since arkts {'1.1':'11','1.2':'20'} 529 * @arkts 1.1&1.2 530 */ 531 Full, 532 533 /** 534 * The title is fixed at mini mode. 535 * Default value:if there is only a main title, The title bar height is 56 vp. 536 * If there are both a main title and a subtitle, the title bar height is 82 vp. 537 * 538 * @syscap SystemCapability.ArkUI.ArkUI.Full 539 * @since 8 540 */ 541 /** 542 * The title is fixed at mini mode. Default value: In versions earlier than API version 12, 543 * If there is only a main title, the title bar height is 56 vp; if there are both a main title and a subtitle, 544 * The title bar height is 82 vp. Since API version 12, the title bar height is 56 vp. 545 * 546 * @syscap SystemCapability.ArkUI.ArkUI.Full 547 * @crossplatform 548 * @since 10 549 */ 550 /** 551 * The title is fixed at mini mode. Default value: In versions earlier than API version 12, 552 * If there is only a main title, the title bar height is 56 vp; if there are both a main title and a subtitle, 553 * The title bar height is 82 vp. Since API version 12, the title bar height is 56 vp. 554 * 555 * @syscap SystemCapability.ArkUI.ArkUI.Full 556 * @crossplatform 557 * @atomicservice 558 * @since arkts {'1.1':'11','1.2':'20'} 559 * @arkts 1.1&1.2 560 */ 561 Mini, 562} 563 564/** 565 * Navigation menu item, include menu icon and menu info 566 * 567 * @interface NavigationMenuItem 568 * @syscap SystemCapability.ArkUI.ArkUI.Full 569 * @since 8 570 */ 571/** 572 * Navigation menu item, include menu icon and menu info 573 * 574 * @interface NavigationMenuItem 575 * @syscap SystemCapability.ArkUI.ArkUI.Full 576 * @crossplatform 577 * @since 10 578 */ 579/** 580 * Navigation menu item, include menu icon and menu info 581 * 582 * @interface NavigationMenuItem 583 * @syscap SystemCapability.ArkUI.ArkUI.Full 584 * @crossplatform 585 * @atomicservice 586 * @since arkts {'1.1':'11','1.2':'20'} 587 * @arkts 1.1&1.2 588 */ 589declare interface NavigationMenuItem { 590 /** 591 * The value of navigation menu item. 592 * 593 * @type { string } 594 * @syscap SystemCapability.ArkUI.ArkUI.Full 595 * @since 8 596 */ 597 /** 598 * The value of navigation menu item. 599 * 600 * @type { string } 601 * @syscap SystemCapability.ArkUI.ArkUI.Full 602 * @crossplatform 603 * @since 10 604 */ 605 /** 606 * The value of navigation menu item. 607 * 608 * @type { string } 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @crossplatform 611 * @atomicservice 612 * @since 11 613 */ 614 /** 615 * The value of navigation menu item. 616 * 617 * @type { string | Resource } 618 * @syscap SystemCapability.ArkUI.ArkUI.Full 619 * @crossplatform 620 * @atomicservice 621 * @since arkts {'1.1':'14','1.2':'20'} 622 * @arkts 1.1&1.2 623 */ 624 value: string | Resource; 625 626 /** 627 * The icon of navigation menu item. 628 * 629 * @type { ?string } 630 * @syscap SystemCapability.ArkUI.ArkUI.Full 631 * @since 8 632 */ 633 /** 634 * The icon of navigation menu item. 635 * 636 * @type { ?string } 637 * @syscap SystemCapability.ArkUI.ArkUI.Full 638 * @crossplatform 639 * @since 10 640 */ 641 /** 642 * The icon of navigation menu item. 643 * 644 * @type { ?string } 645 * @syscap SystemCapability.ArkUI.ArkUI.Full 646 * @crossplatform 647 * @atomicservice 648 * @since 11 649 */ 650 /** 651 * The icon of navigation menu item. 652 * 653 * @type { ?(string | Resource) } 654 * @syscap SystemCapability.ArkUI.ArkUI.Full 655 * @crossplatform 656 * @atomicservice 657 * @since arkts {'1.1':'14','1.2':'20'} 658 * @arkts 1.1&1.2 659 */ 660 icon?: string | Resource; 661 662 /** 663 * The symbol of navigation menu item. 664 * 665 * @type { ?SymbolGlyphModifier } 666 * @syscap SystemCapability.ArkUI.ArkUI.Full 667 * @atomicservice 668 * @since 12 669 */ 670 /** 671 * The symbol of navigation menu item. 672 * 673 * @type { ?SymbolGlyphModifier } 674 * @syscap SystemCapability.ArkUI.ArkUI.Full 675 * @crossplatform 676 * @atomicservice 677 * @since 20 678 * @arkts 1.1&1.2 679 */ 680 symbolIcon?: SymbolGlyphModifier; 681 682 /** 683 * Whether to enable this menu item. 684 * 685 * @type { ?boolean } 686 * @default true 687 * @syscap SystemCapability.ArkUI.ArkUI.Full 688 * @crossplatform 689 * @atomicservice 690 * @since arkts {'1.1':'12','1.2':'20'} 691 * @arkts 1.1&1.2 692 */ 693 isEnabled?: boolean; 694 695 /** 696 * Trigger by navigation menu item click. 697 * 698 * @type { ?(() => void) } 699 * @syscap SystemCapability.ArkUI.ArkUI.Full 700 * @since 8 701 */ 702 /** 703 * Trigger by navigation menu item click. 704 * 705 * @type { ?function } 706 * @syscap SystemCapability.ArkUI.ArkUI.Full 707 * @crossplatform 708 * @since 10 709 */ 710 /** 711 * Trigger by navigation menu item click. 712 * 713 * @type { ?function } 714 * @syscap SystemCapability.ArkUI.ArkUI.Full 715 * @crossplatform 716 * @atomicservice 717 * @since arkts {'1.1':'11','1.2':'20'} 718 * @arkts 1.1&1.2 719 */ 720 action?: () => void; 721} 722 723/** 724 * Indicates the information of the popped page. 725 * 726 * @interface PopInfo 727 * @syscap SystemCapability.ArkUI.ArkUI.Full 728 * @crossplatform 729 * @since 11 730 */ 731/** 732 * Indicates the information of the popped page. 733 * 734 * @interface PopInfo 735 * @syscap SystemCapability.ArkUI.ArkUI.Full 736 * @crossplatform 737 * @atomicservice 738 * @since arkts {'1.1':'12','1.2':'20'} 739 * @arkts 1.1&1.2 740 */ 741declare interface PopInfo { 742 /** 743 * The info of the popped page. 744 * 745 * @type { NavPathInfo } 746 * @syscap SystemCapability.ArkUI.ArkUI.Full 747 * @crossplatform 748 * @since 11 749 */ 750 /** 751 * The info of the popped page. 752 * 753 * @type { NavPathInfo } 754 * @syscap SystemCapability.ArkUI.ArkUI.Full 755 * @crossplatform 756 * @atomicservice 757 * @since arkts {'1.1':'12','1.2':'20'} 758 * @arkts 1.1&1.2 759 */ 760 info: NavPathInfo; 761 762 /** 763 * The result of the popped page. 764 * 765 * @type { Object } 766 * @syscap SystemCapability.ArkUI.ArkUI.Full 767 * @crossplatform 768 * @since 11 769 */ 770 /** 771 * The result of the popped page. 772 * 773 * @type { Object } 774 * @syscap SystemCapability.ArkUI.ArkUI.Full 775 * @crossplatform 776 * @atomicservice 777 * @since arkts {'1.1':'12','1.2':'20'} 778 * @arkts 1.1&1.2 779 */ 780 result: Object; 781} 782 783/** 784 * Indicates the information of NavDestination. 785 * 786 * @syscap SystemCapability.ArkUI.ArkUI.Full 787 * @crossplatform 788 * @since 10 789 */ 790/** 791 * Indicates the information of NavDestination. 792 * 793 * @syscap SystemCapability.ArkUI.ArkUI.Full 794 * @crossplatform 795 * @atomicservice 796 * @since arkts {'1.1':'11','1.2':'20'} 797 * @arkts 1.1&1.2 798 */ 799declare class NavPathInfo { 800 /** 801 * Creates an instance of NavPathInfo. 802 * 803 * @param { string } name - The name of NavDestination. 804 * @param { unknown } param - The detailed parameter of the NavDestination. 805 * @syscap SystemCapability.ArkUI.ArkUI.Full 806 * @crossplatform 807 * @since 10 808 */ 809 /** 810 * Creates an instance of NavPathInfo. 811 * 812 * @param { string } name - The name of NavDestination. 813 * @param { unknown } param - The detailed parameter of the NavDestination. 814 * @param { ?import('../api/@ohos.base').Callback<PopInfo> } onPop - The callback when next page returns. 815 * @syscap SystemCapability.ArkUI.ArkUI.Full 816 * @crossplatform 817 * @atomicservice 818 * @since 11 819 */ 820 /** 821 * Creates an instance of NavPathInfo. 822 * 823 * @param { string } name - The name of NavDestination. 824 * @param { unknown } param - The detailed parameter of the NavDestination. 825 * @param { ?import('../api/@ohos.base').Callback<PopInfo> } onPop - The callback when next page returns. 826 * @param { ?boolean } isEntry - Indicates whether it is an entry destination. 827 * Default value: **false**. 828 * **true**: The navigation destination page is the entry page. 829 * **false**: The navigation destination page is not the entry page. 830 * @syscap SystemCapability.ArkUI.ArkUI.Full 831 * @crossplatform 832 * @atomicservice 833 * @since 12 834 */ 835 constructor(name: string, param: unknown, onPop?: import('../api/@ohos.base').Callback<PopInfo>, isEntry?: boolean); 836 837 /** 838 * Creates an instance of NavPathInfo. 839 * 840 * @param { string } name - The name of NavDestination. 841 * @param { Object | null | undefined } param - The detailed parameter of the NavDestination. 842 * @param { Callback<PopInfo> } [onPop] - The callback when next page returns. 843 * @param { boolean } [isEntry] - Indicates whether it is an entry destination. 844 * @syscap SystemCapability.ArkUI.ArkUI.Full 845 * @crossplatform 846 * @atomicservice 847 * @since 20 848 * @arkts 1.2 849 */ 850 constructor(name: string, param: Object | null | undefined, onPop?: Callback<PopInfo>, isEntry?: boolean); 851 852 /** 853 * Name of the navigation destination page. 854 * 855 * @type { string } 856 * @syscap SystemCapability.ArkUI.ArkUI.Full 857 * @crossplatform 858 * @since 10 859 */ 860 /** 861 * Name of the navigation destination page. 862 * 863 * @type { string } 864 * @syscap SystemCapability.ArkUI.ArkUI.Full 865 * @crossplatform 866 * @atomicservice 867 * @since arkts {'1.1':'11','1.2':'20'} 868 * @arkts 1.1&1.2 869 */ 870 name: string; 871 872 /** 873 * Detailed parameters of the navigation destination page. 874 * 875 * @type { ?unknown } 876 * @syscap SystemCapability.ArkUI.ArkUI.Full 877 * @crossplatform 878 * @since 10 879 */ 880 /** 881 * Detailed parameters of the navigation destination page. 882 * 883 * @type { ?unknown } 884 * @syscap SystemCapability.ArkUI.ArkUI.Full 885 * @crossplatform 886 * @atomicservice 887 * @since 11 888 */ 889 param?: unknown; 890 891 /** 892 * The detailed parameter of the NavDestination. 893 * 894 * @type { ?(Object | null | undefined) } 895 * @syscap SystemCapability.ArkUI.ArkUI.Full 896 * @crossplatform 897 * @atomicservice 898 * @since 20 899 * @arkts 1.2 900 */ 901 param?: Object | null | undefined; 902 903 /** 904 * Callback returned when pop is called on the navigation destination page. 905 * It is invoked only after the **result** parameter is set in pop. 906 * 907 * @type { ?import('../api/@ohos.base').Callback<PopInfo> } 908 * @syscap SystemCapability.ArkUI.ArkUI.Full 909 * @crossplatform 910 * @since 11 911 */ 912 /** 913 * Callback returned when pop is called on the navigation destination page. 914 * It is invoked only after the **result** parameter is set in pop. 915 * 916 * @type { ?import('../api/@ohos.base').Callback<PopInfo> } 917 * @syscap SystemCapability.ArkUI.ArkUI.Full 918 * @crossplatform 919 * @atomicservice 920 * @since 12 921 */ 922 onPop?: import('../api/@ohos.base').Callback<PopInfo>; 923 924 /** 925 * The callback when next page returns. 926 * 927 * @type { ?Callback<PopInfo> } 928 * @syscap SystemCapability.ArkUI.ArkUI.Full 929 * @crossplatform 930 * @atomicservice 931 * @since 20 932 * @arkts 1.2 933 */ 934 onPop?: Callback<PopInfo>; 935 936 /** 937 * Indicates whether it is an entry destination. 938 * 939 * @type { ?boolean } 940 * @syscap SystemCapability.ArkUI.ArkUI.Full 941 * @crossplatform 942 * @atomicservice 943 * @since arkts {'1.1':'12','1.2':'20'} 944 * @arkts 1.1&1.2 945 */ 946 isEntry?: boolean; 947 948 /** 949 * The unique id of NavDestination. 950 * 951 * @type { ?string } 952 * @syscap SystemCapability.ArkUI.ArkUI.Full 953 * @crossplatform 954 * @atomicservice 955 * @since arkts {'1.1':'19','1.2':'20'} 956 * @arkts 1.1&1.2 957 */ 958 navDestinationId?: string; 959} 960 961/** 962 * Defines the mode of stack operation. 963 * 964 * @enum { number } 965 * @syscap SystemCapability.ArkUI.ArkUI.Full 966 * @crossplatform 967 * @atomicservice 968 * @since arkts {'1.1':'12','1.2':'20'} 969 * @arkts 1.1&1.2 970 */ 971declare enum LaunchMode { 972 /** 973 * Default navigation stack operation mode.<br>In this mode, 974 * push operations add the specified **NavDestination**page to 975 * the stack; replace operations replace the current top **NavDestination** page. 976 * 977 * @syscap SystemCapability.ArkUI.ArkUI.Full 978 * @crossplatform 979 * @atomicservice 980 * @since arkts {'1.1':'12','1.2':'20'} 981 * @arkts 1.1&1.2 982 */ 983 STANDARD = 0, 984 985 /** 986 * When the NavDestination with a specified name exists, it will be moved to top of stack, 987 * otherwise, the behavior will be consistent with the STANDARD mode. 988 * 989 * @syscap SystemCapability.ArkUI.ArkUI.Full 990 * @crossplatform 991 * @atomicservice 992 * @since arkts {'1.1':'12','1.2':'20'} 993 * @arkts 1.1&1.2 994 */ 995 MOVE_TO_TOP_SINGLETON = 1, 996 997 /** 998 * When the NavDestination with a specified name exists, the stack will pop until that NavDestination, 999 * otherwise, the behavior will be consistent with the STANDARD mode. 1000 * 1001 * @syscap SystemCapability.ArkUI.ArkUI.Full 1002 * @crossplatform 1003 * @atomicservice 1004 * @since arkts {'1.1':'12','1.2':'20'} 1005 * @arkts 1.1&1.2 1006 */ 1007 POP_TO_SINGLETON = 2, 1008 1009 /** 1010 * This mode creates an instance of **NavDestination**. Compared with 1011 * **STANDARD**, this mode does not reuse the instance with the same name in the stack. 1012 * 1013 * @syscap SystemCapability.ArkUI.ArkUI.Full 1014 * @crossplatform 1015 * @atomicservice 1016 * @since arkts {'1.1':'12','1.2':'20'} 1017 * @arkts 1.1&1.2 1018 */ 1019 NEW_INSTANCE = 3, 1020} 1021 1022/** 1023 * Indicates the options of stack operation. 1024 * 1025 * @interface NavigationOptions 1026 * @syscap SystemCapability.ArkUI.ArkUI.Full 1027 * @crossplatform 1028 * @atomicservice 1029 * @since arkts {'1.1':'12','1.2':'20'} 1030 * @arkts 1.1&1.2 1031 */ 1032declare interface NavigationOptions { 1033 /** 1034 * Navigation stack operation mode. 1035 * <br>Default value: **LaunchMode.STANDARD**. 1036 * 1037 * @type { ?LaunchMode } 1038 * @syscap SystemCapability.ArkUI.ArkUI.Full 1039 * @crossplatform 1040 * @atomicservice 1041 * @since arkts {'1.1':'12','1.2':'20'} 1042 * @arkts 1.1&1.2 1043 */ 1044 launchMode?: LaunchMode; 1045 1046 /** 1047 * Whether to support transition animation. 1048 * <br>Default value: **true**. 1049 * <br>**true**: The transition animation is supported. 1050 * <br>**false**: The transition animation is not supported. 1051 * 1052 * @type { ?boolean } 1053 * @syscap SystemCapability.ArkUI.ArkUI.Full 1054 * @crossplatform 1055 * @atomicservice 1056 * @since arkts {'1.1':'12','1.2':'20'} 1057 * @arkts 1.1&1.2 1058 */ 1059 animated?: boolean; 1060} 1061 1062/** 1063 * Indicates the information of NavDestinations. Providers methods for controlling destination page in the stack 1064 * 1065 * @syscap SystemCapability.ArkUI.ArkUI.Full 1066 * @crossplatform 1067 * @since 10 1068 */ 1069/** 1070 * Indicates the information of NavDestinations. Providers methods for controlling destination page in the stack 1071 * 1072 * @syscap SystemCapability.ArkUI.ArkUI.Full 1073 * @crossplatform 1074 * @atomicservice 1075 * @since arkts {'1.1':'11','1.2':'20'} 1076 * @arkts 1.1&1.2 1077 */ 1078declare class NavPathStack { 1079 /** 1080 * Creates an instance of NavPathStack. 1081 * 1082 * @syscap SystemCapability.ArkUI.ArkUI.Full 1083 * @crossplatform 1084 * @since 10 1085 */ 1086 /** 1087 * Creates an instance of NavPathStack. 1088 * 1089 * @syscap SystemCapability.ArkUI.ArkUI.Full 1090 * @crossplatform 1091 * @atomicservice 1092 * @since arkts {'1.1':'11','1.2':'20'} 1093 * @arkts 1.1&1.2 1094 */ 1095 constructor(); 1096 1097 /** 1098 * Pushes the navigation destination page specified by **info** onto the navigation stack. 1099 * 1100 * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. 1101 * @syscap SystemCapability.ArkUI.ArkUI.Full 1102 * @crossplatform 1103 * @since 10 1104 */ 1105 /** 1106 * Pushes the navigation destination page specified by **info** onto the navigation stack. 1107 * 1108 * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. 1109 * @param { boolean } [animated] - Whether to support the transition animation. 1110 * <br>Default value: **true**. 1111 * <br>**true**: The transition animation is supported. **false**: The transition animation is not supported. 1112 * @syscap SystemCapability.ArkUI.ArkUI.Full 1113 * @crossplatform 1114 * @atomicservice 1115 * @since arkts {'1.1':'11','1.2':'20'} 1116 * @arkts 1.1&1.2 1117 */ 1118 pushPath(info: NavPathInfo, animated?: boolean): void; 1119 1120 /** 1121 * Pushes the navigation destination page specified by **info** onto the navigation stack. 1122 * Depending on the launchMode specified in the **options** parameter, different behaviors will be triggered. 1123 * 1124 * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. 1125 * @param { NavigationOptions } [options] - Indicates options of stack operation. 1126 * @syscap SystemCapability.ArkUI.ArkUI.Full 1127 * @crossplatform 1128 * @atomicservice 1129 * @since arkts {'1.1':'12','1.2':'20'} 1130 * @arkts 1.1&1.2 1131 */ 1132 pushPath(info: NavPathInfo, options?: NavigationOptions): void; 1133 1134 /** 1135 * Pushes the navigation destination page specified by **info** onto 1136 * the navigation stack. This API uses a promise to return the result. 1137 * 1138 * @param { NavPathInfo } info - Information about the navigation destination page. 1139 * @param { boolean } [animated] - Whether to support the transition animation. 1140 * <br>Default value: **true**. 1141 * <br>**true**: The transition animation is supported. 1142 * <br>**false**: The transition animation is not supported. 1143 * @returns { Promise<void> } The promise returned by the function. 1144 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1145 * 1. Mandatory parameters are left unspecified. 1146 * 2. Incorrect parameters types. 1147 * 3. Parameter verification failed. 1148 * @throws { BusinessError } 100001 - Internal error. 1149 * @throws { BusinessError } 100005 - Builder function not registered. 1150 * @throws { BusinessError } 100006 - NavDestination not found. 1151 * @syscap SystemCapability.ArkUI.ArkUI.Full 1152 * @crossplatform 1153 * @since 11 1154 */ 1155 /** 1156 * Pushes the navigation destination page specified by **info** onto 1157 * the navigation stack. This API uses a promise to return the result. 1158 * 1159 * @param { NavPathInfo } info - Information about the navigation destination page. 1160 * @param { boolean } [animated] - Whether to support the transition animation. 1161 * <br>Default value: **true**. 1162 * <br>**true**: The transition animation is supported. 1163 * <br>**false**: The transition animation is not supported. 1164 * @returns { Promise<void> } The promise returned by the function. 1165 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1166 * 1. Mandatory parameters are left unspecified. 1167 * 2. Incorrect parameters types. 1168 * 3. Parameter verification failed. 1169 * @throws { BusinessError } 100001 - Internal error. 1170 * @throws { BusinessError } 100005 - Builder function not registered. 1171 * @throws { BusinessError } 100006 - NavDestination not found. 1172 * @syscap SystemCapability.ArkUI.ArkUI.Full 1173 * @crossplatform 1174 * @atomicservice 1175 * @since arkts {'1.1':'12','1.2':'20'} 1176 * @arkts 1.1&1.2 1177 */ 1178 pushDestination(info: NavPathInfo, animated?: boolean): Promise<void>; 1179 1180 /** 1181 * Pushes the navigation destination page specified by **info** onto the navigation stack. 1182 * This API uses a promise to return the result. Depending on the LaunchMode 1183 * specified in the **options** parameter, different behaviors will be triggered. 1184 * 1185 * @param { NavPathInfo } info - Information about the navigation destination page. 1186 * @param { NavigationOptions } [options] - Navigation options. 1187 * @returns { Promise<void> } The promise returned by the function. 1188 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1189 * 1. Mandatory parameters are left unspecified. 1190 * 2. Incorrect parameters types. 1191 * 3. Parameter verification failed. 1192 * @throws { BusinessError } 100001 - Internal error. 1193 * @throws { BusinessError } 100005 - Builder function not registered. 1194 * @throws { BusinessError } 100006 - NavDestination not found. 1195 * @syscap SystemCapability.ArkUI.ArkUI.Full 1196 * @crossplatform 1197 * @atomicservice 1198 * @since arkts {'1.1':'12','1.2':'20'} 1199 * @arkts 1.1&1.2 1200 */ 1201 pushDestination(info: NavPathInfo, options?: NavigationOptions): Promise<void>; 1202 1203 /** 1204 * Pushes the specified NavDestination into the stack. 1205 * 1206 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1207 * @param { unknown } param - Indicates the detailed parameter of the NavDestination to be pushed. 1208 * @syscap SystemCapability.ArkUI.ArkUI.Full 1209 * @crossplatform 1210 * @since 10 1211 */ 1212 /** 1213 * Pushes the specified NavDestination into the stack. 1214 * 1215 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1216 * @param { unknown } param - Indicates the detailed parameter of the NavDestination to be pushed. 1217 * @param { boolean } [animated] - Indicates whether the transition is animated. 1218 * <br>Default value: **true**. 1219 * <br>**true**: The transition animation is supported. **false**: The transition animation is not supported. 1220 * @syscap SystemCapability.ArkUI.ArkUI.Full 1221 * @crossplatform 1222 * @atomicservice 1223 * @since 11 1224 */ 1225 pushPathByName(name: string, param: unknown, animated?: boolean): void; 1226 1227 /** 1228 * Pushes the specified NavDestination into the stack. 1229 * 1230 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1231 * @param { Object | null | undefined } param - Indicates the detailed parameter of the NavDestination to be pushed. 1232 * @param { boolean } [animated] - Indicates whether the transition is animated. 1233 * @syscap SystemCapability.ArkUI.ArkUI.Full 1234 * @crossplatform 1235 * @atomicservice 1236 * @since 20 1237 * @arkts 1.2 1238 */ 1239 pushPathByName(name: string, param: Object | null | undefined, animated?: boolean): void; 1240 1241 /** 1242 * Pushes the specified NavDestination into the stack. 1243 * 1244 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1245 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1246 * @param { import('../api/@ohos.base').Callback<PopInfo> } onPop - The callback when next page returns. 1247 * @param { boolean } [animated] - Indicates whether the transition is animated. 1248 * <br>Default value: **true**. 1249 * <br>**true**: The transition animation is supported. **false**: The transition animation is not supported. 1250 * @syscap SystemCapability.ArkUI.ArkUI.Full 1251 * @crossplatform 1252 * @since 11 1253 */ 1254 /** 1255 * Pushes the specified NavDestination into the stack. 1256 * 1257 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1258 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1259 * @param { import('../api/@ohos.base').Callback<PopInfo> } onPop - The callback when next page returns. 1260 * @param { boolean } [animated] - Indicates whether the transition is animated. 1261 * <br>Default value: **true**. 1262 * <br>**true**: The transition animation is supported. **false**: The transition animation is not supported. 1263 * @syscap SystemCapability.ArkUI.ArkUI.Full 1264 * @crossplatform 1265 * @atomicservice 1266 * @since 12 1267 */ 1268 pushPathByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback<PopInfo>, animated?: boolean): void; 1269 1270 /** 1271 * Pushes the specified NavDestination into the stack. 1272 * 1273 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1274 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1275 * @param { Callback<PopInfo> } onPop - The callback when next page returns. 1276 * @param { boolean } [animated] - Indicates whether the transition is animated. 1277 * @syscap SystemCapability.ArkUI.ArkUI.Full 1278 * @crossplatform 1279 * @atomicservice 1280 * @since 20 1281 * @arkts 1.2 1282 */ 1283 pushPathByName(name: string, param: Object, onPop: Callback<PopInfo>, animated?: boolean): void; 1284 1285 /** 1286 * Pushes the specified NavDestination into the stack. 1287 * 1288 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1289 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1290 * @param { boolean } [animated] - Indicates whether the transition is animated. 1291 * @returns { Promise<void> } The promise returned by the function. 1292 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1293 * 1. Mandatory parameters are left unspecified. 1294 * 2. Incorrect parameters types. 1295 * 3. Parameter verification failed. 1296 * @throws { BusinessError } 100001 - Internal error. 1297 * @throws { BusinessError } 100005 - Builder function not registered. 1298 * @throws { BusinessError } 100006 - NavDestination not found. 1299 * @syscap SystemCapability.ArkUI.ArkUI.Full 1300 * @crossplatform 1301 * @since 11 1302 */ 1303 /** 1304 * Pushes the specified NavDestination into the stack. 1305 * 1306 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1307 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1308 * @param { boolean } [animated] - Indicates whether the transition is animated. 1309 * @returns { Promise<void> } The promise returned by the function. 1310 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1311 * 1. Mandatory parameters are left unspecified. 1312 * 2. Incorrect parameters types. 1313 * 3. Parameter verification failed. 1314 * @throws { BusinessError } 100001 - Internal error. 1315 * @throws { BusinessError } 100005 - Builder function not registered. 1316 * @throws { BusinessError } 100006 - NavDestination not found. 1317 * @syscap SystemCapability.ArkUI.ArkUI.Full 1318 * @crossplatform 1319 * @atomicservice 1320 * @since arkts {'1.1':'12','1.2':'20'} 1321 * @arkts 1.1&1.2 1322 */ 1323 pushDestinationByName(name: string, param: Object, animated?: boolean): Promise<void>; 1324 1325 /** 1326 * Pushes the specified NavDestination into the stack. 1327 * 1328 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1329 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1330 * @param { import('../api/@ohos.base').Callback<PopInfo> } onPop - The callback when next page returns. 1331 * @param { boolean } [animated] - Indicates whether the transition is animated. 1332 * @returns { Promise<void> } The promise returned by the function. 1333 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1334 * 1. Mandatory parameters are left unspecified. 1335 * 2. Incorrect parameters types. 1336 * 3. Parameter verification failed. 1337 * @throws { BusinessError } 100001 - Internal error. 1338 * @throws { BusinessError } 100005 - Builder function not registered. 1339 * @throws { BusinessError } 100006 - NavDestination not found. 1340 * @syscap SystemCapability.ArkUI.ArkUI.Full 1341 * @crossplatform 1342 * @since 11 1343 */ 1344 /** 1345 * Pushes the specified NavDestination into the stack. 1346 * 1347 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1348 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1349 * @param { import('../api/@ohos.base').Callback<PopInfo> } onPop - The callback when next page returns. 1350 * @param { boolean } [animated] - Indicates whether the transition is animated. 1351 * @returns { Promise<void> } The promise returned by the function. 1352 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1353 * 1. Mandatory parameters are left unspecified. 1354 * 2. Incorrect parameters types. 1355 * 3. Parameter verification failed. 1356 * @throws { BusinessError } 100001 - Internal error. 1357 * @throws { BusinessError } 100005 - Builder function not registered. 1358 * @throws { BusinessError } 100006 - NavDestination not found. 1359 * @syscap SystemCapability.ArkUI.ArkUI.Full 1360 * @crossplatform 1361 * @atomicservice 1362 * @since 12 1363 */ 1364 pushDestinationByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback<PopInfo>, animated?: boolean): Promise<void>; 1365 1366 /** 1367 * Pushes the specified NavDestination into the stack. 1368 * 1369 * @param { string } name - Indicates the name of the NavDestination to be pushed. 1370 * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. 1371 * @param { Callback<PopInfo> } onPop - The callback when next page returns. 1372 * @param { boolean } [animated] - Indicates whether the transition is animated. 1373 * @returns { Promise<void> } The promise returned by the function. 1374 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1375 * 1. Mandatory parameters are left unspecified. 1376 * 2. Incorrect parameters types. 1377 * 3. Parameter verification failed. 1378 * @throws { BusinessError } 100001 - Internal error. 1379 * @throws { BusinessError } 100005 - Builder function not registered. 1380 * @throws { BusinessError } 100006 - NavDestination not found. 1381 * @syscap SystemCapability.ArkUI.ArkUI.Full 1382 * @crossplatform 1383 * @atomicservice 1384 * @since 20 1385 * @arkts 1.2 1386 */ 1387 pushDestinationByName(name: string, param: Object, onPop: Callback<PopInfo>, animated?: boolean): Promise<void>; 1388 1389 /** 1390 * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. 1391 * 1392 * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. 1393 * @param { boolean } [animated] - Indicates whether the transition is animated. 1394 * @syscap SystemCapability.ArkUI.ArkUI.Full 1395 * @crossplatform 1396 * @since 11 1397 */ 1398 /** 1399 * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. 1400 * 1401 * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. 1402 * @param { boolean } [animated] - Indicates whether the transition is animated. 1403 * Default value: **true**. 1404 * **true**: The transition animation is supported. 1405 * **false**: The transition animation is not supported. 1406 * @syscap SystemCapability.ArkUI.ArkUI.Full 1407 * @crossplatform 1408 * @atomicservice 1409 * @since arkts {'1.1':'12','1.2':'20'} 1410 * @arkts 1.1&1.2 1411 */ 1412 replacePath(info: NavPathInfo, animated?: boolean): void; 1413 1414 /** 1415 * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. 1416 * 1417 * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. 1418 * @param { NavigationOptions } [options] - Indicates options of stack operation. 1419 * @syscap SystemCapability.ArkUI.ArkUI.Full 1420 * @crossplatform 1421 * @atomicservice 1422 * @since arkts {'1.1':'12','1.2':'20'} 1423 * @arkts 1.1&1.2 1424 */ 1425 replacePath(info: NavPathInfo, options?: NavigationOptions): void; 1426 1427 /** 1428 * Replace the NavDestination into the stack. 1429 * 1430 * @param { NavPathInfo } info - Indicates the NavDestination to replace in stack. 1431 * @param { NavigationOptions } [options] - Indicates options of stack operation. 1432 * @returns { Promise<void> } The promise returned by the function. 1433 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1434 * 1. Mandatory parameters are left unspecified. 1435 * 2. Incorrect parameters types. 1436 * 3. Parameter verification failed. 1437 * @throws { BusinessError } 100001 - Internal error. 1438 * @throws { BusinessError } 100005 - Builder function not registered. 1439 * @throws { BusinessError } 100006 - NavDestination not found. 1440 * @syscap SystemCapability.ArkUI.ArkUI.Full 1441 * @crossplatform 1442 * @atomicservice 1443 * @since arkts {'1.1':'18','1.2':'20'} 1444 * @arkts 1.1&1.2 1445 */ 1446 replaceDestination(info: NavPathInfo, options?: NavigationOptions): Promise<void>; 1447 1448 /** 1449 * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. 1450 * 1451 * @param { string } name - Indicates name of the new NavDestination in top of stack. 1452 * @param { Object } param - Indicates the detailed parameter of the new NavDestination in top of the stack. 1453 * @param { boolean } [animated] - Indicates whether the transition is animated. 1454 * <br>Default value: **true**. 1455 * <br>**true**: The transition animation is supported.<br>**false**: The transition animation is not supported. 1456 * @syscap SystemCapability.ArkUI.ArkUI.Full 1457 * @crossplatform 1458 * @since 11 1459 */ 1460 /** 1461 * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. 1462 * 1463 * @param { string } name - Indicates name of the new NavDestination in top of stack. 1464 * @param { Object } param - Indicates the detailed parameter of the new NavDestination in top of the stack. 1465 * @param { boolean } [animated] - Indicates whether the transition is animated. 1466 * <br>Default value: **true**. 1467 * <br>**true**: The transition animation is supported.<br>**false**: The transition animation is not supported. 1468 * @syscap SystemCapability.ArkUI.ArkUI.Full 1469 * @crossplatform 1470 * @atomicservice 1471 * @since arkts {'1.1':'12','1.2':'20'} 1472 * @arkts 1.1&1.2 1473 */ 1474 replacePathByName(name: string, param: Object, animated?: boolean): void; 1475 1476 /** 1477 * Remove the specified NavDestinations by indexes. 1478 * 1479 * @param { Array<number> } indexes - Indicates the indexes of the NavDestinations to be removed. 1480 * @returns { number } Returns the number of removed pages. Invalid indexes will be ignored. 1481 * @syscap SystemCapability.ArkUI.ArkUI.Full 1482 * @crossplatform 1483 * @since 11 1484 */ 1485 /** 1486 * Remove the specified NavDestinations by indexes. 1487 * 1488 * @param { Array<number> } indexes - Indicates the indexes of the NavDestinations to be removed. 1489 * @returns { number } Returns the number of removed pages. Invalid indexes will be ignored. 1490 * @syscap SystemCapability.ArkUI.ArkUI.Full 1491 * @crossplatform 1492 * @atomicservice 1493 * @since arkts {'1.1':'12','1.2':'20'} 1494 * @arkts 1.1&1.2 1495 */ 1496 removeByIndexes(indexes: Array<number>): number; 1497 1498 /** 1499 * Removes the navigation destination page specified by **name** from the navigation stack. 1500 * 1501 * @param { string } name - Indicates the name of the NavDestination to be removed. 1502 * @returns { number } Returns the number of removed NavDestinations. 1503 * @syscap SystemCapability.ArkUI.ArkUI.Full 1504 * @crossplatform 1505 * @since 11 1506 */ 1507 /** 1508 * Removes the navigation destination page specified by **name** from the navigation stack. 1509 * 1510 * @param { string } name - Indicates the name of the NavDestination to be removed. 1511 * @returns { number } Returns the number of removed NavDestinations. 1512 * @syscap SystemCapability.ArkUI.ArkUI.Full 1513 * @crossplatform 1514 * @atomicservice 1515 * @since arkts {'1.1':'12','1.2':'20'} 1516 * @arkts 1.1&1.2 1517 */ 1518 removeByName(name: string): number; 1519 1520 /** 1521 * Removes the navigation destination page specified by **navDestinationId** from 1522 * the navigation stack. **navDestinationId** can be obtained from the onReady callback 1523 * of **NavDestination** or from NavDestinationInfo. 1524 * 1525 * @param { string } navDestinationId - Unique ID of the navigation destination page to remove. 1526 * @returns { boolean } Returns true if remove successfully, otherwise returns false. 1527 * @syscap SystemCapability.ArkUI.ArkUI.Full 1528 * @crossplatform 1529 * @atomicservice 1530 * @since arkts {'1.1':'12','1.2':'20'} 1531 * @arkts 1.1&1.2 1532 */ 1533 removeByNavDestinationId(navDestinationId: string): boolean; 1534 1535 /** 1536 * Pops the top NavDestination out of the stack. 1537 * 1538 * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. 1539 * @syscap SystemCapability.ArkUI.ArkUI.Full 1540 * @crossplatform 1541 * @since 10 1542 */ 1543 /** 1544 * Pops the top NavDestination out of the stack. 1545 * 1546 * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. 1547 * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. 1548 * @syscap SystemCapability.ArkUI.ArkUI.Full 1549 * @crossplatform 1550 * @atomicservice 1551 * @since arkts {'1.1':'11','1.2':'20'} 1552 * @arkts 1.1&1.2 1553 */ 1554 pop(animated?: boolean): NavPathInfo | undefined; 1555 1556 /** 1557 * Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result. 1558 * 1559 * @param { Object } result - The result of the NavDestination. 1560 * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. 1561 * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. 1562 * @syscap SystemCapability.ArkUI.ArkUI.Full 1563 * @crossplatform 1564 * @since 11 1565 */ 1566 /** 1567 * Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result. 1568 * 1569 * @param { Object } result - The result of the NavDestination. 1570 * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. 1571 * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. 1572 * @syscap SystemCapability.ArkUI.ArkUI.Full 1573 * @crossplatform 1574 * @atomicservice 1575 * @since arkts {'1.1':'12','1.2':'20'} 1576 * @arkts 1.1&1.2 1577 */ 1578 pop(result: Object, animated?: boolean): NavPathInfo | undefined; 1579 1580 /** 1581 * Pops the specified NavDestination out of the stack. 1582 * 1583 * @param { string } name - Indicates the name of the NavDestination to be popped. 1584 * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; 1585 * @syscap SystemCapability.ArkUI.ArkUI.Full 1586 * @crossplatform 1587 * @since 10 1588 */ 1589 /** 1590 * Pops the specified NavDestination out of the stack. 1591 * 1592 * @param { string } name - Indicates the name of the NavDestination to be popped. 1593 * @param { boolean } [animated] - Indicates whether the transition is animated. 1594 * <br>Default value: **true**. 1595 * <br>**true**: The transition animation is supported.<br>**false**: The transition animation is not supported. 1596 * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; 1597 * @syscap SystemCapability.ArkUI.ArkUI.Full 1598 * @crossplatform 1599 * @atomicservice 1600 * @since arkts {'1.1':'11','1.2':'20'} 1601 * @arkts 1.1&1.2 1602 */ 1603 popToName(name: string, animated?: boolean): number; 1604 1605 /** 1606 * Pops pages until the first navigation destination page. 1607 * That matches **name** from the bottom of the navigation stack is at the top of the stack. 1608 * This API uses the **onPop** callback to pass in the page processing result. 1609 * 1610 * @param { string } name - Indicates the name of the NavDestination to be popped. 1611 * @param { Object } result - The result of the NavDestination. 1612 * @param { boolean } [animated] - Indicates whether the transition is animated. 1613 * <br>Default value: **true**. 1614 * <br>**true**: The transition animation is supported.<br>**false**: The transition animation is not supported. 1615 * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; 1616 * @syscap SystemCapability.ArkUI.ArkUI.Full 1617 * @crossplatform 1618 * @since 11 1619 */ 1620 /** 1621 * Pops pages until the first navigation destination page. 1622 * That matches **name** from the bottom of the navigation stack is at the top of the stack. 1623 * This API uses the **onPop** callback to pass in the page processing result. 1624 * 1625 * @param { string } name - Indicates the name of the NavDestination to be popped. 1626 * @param { Object } result - The result of the NavDestination. 1627 * @param { boolean } [animated] - Indicates whether the transition is animated. 1628 * <br>Default value: **true**. 1629 * <br>**true**: The transition animation is supported.<br>**false**: The transition animation is not supported. 1630 * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; 1631 * @syscap SystemCapability.ArkUI.ArkUI.Full 1632 * @crossplatform 1633 * @atomicservice 1634 * @since arkts {'1.1':'12','1.2':'20'} 1635 * @arkts 1.1&1.2 1636 */ 1637 popToName(name: string, result: Object, animated?: boolean): number; 1638 1639 /** 1640 * Pops the specified NavDestination out of the stack. 1641 * 1642 * @param { number } index - Indicates the index of the NavDestination to be popped. 1643 * @syscap SystemCapability.ArkUI.ArkUI.Full 1644 * @crossplatform 1645 * @since 10 1646 */ 1647 /** 1648 * Pops the specified NavDestination out of the stack. 1649 * 1650 * @param { number } index - Indicates the index of the NavDestination to be popped. 1651 * @param { boolean } [animated] - Indicates whether the transition is animated. 1652 * <br>Default value: **true**. 1653 * <br>**true**: The transition animation is supported.<br>**false**: The transition animation is not supported. 1654 * @syscap SystemCapability.ArkUI.ArkUI.Full 1655 * @crossplatform 1656 * @atomicservice 1657 * @since arkts {'1.1':'11','1.2':'20'} 1658 * @arkts 1.1&1.2 1659 */ 1660 popToIndex(index: number, animated?: boolean): void; 1661 1662 /** 1663 * Pops the specified NavDestination out of the stack. 1664 * 1665 * @param { number } index - Indicates the index of the NavDestination to be popped. 1666 * @param { Object } result - The result of the NavDestination. 1667 * @param { boolean } [animated] - Indicates whether the transition is animated. 1668 * <br>Default value: **true**. 1669 * <br>**true**: The transition animation is supported.<br>**false**: The transition animation is not supported. 1670 * @syscap SystemCapability.ArkUI.ArkUI.Full 1671 * @crossplatform 1672 * @atomicservice 1673 * @since arkts {'1.1':'11','1.2':'20'} 1674 * @arkts 1.1&1.2 1675 */ 1676 popToIndex(index: number, result: Object, animated?: boolean): void; 1677 1678 /** 1679 * Moves the first navigation destination page of this name to the top of stack. 1680 * That matches **name** from the bottom of the navigation stack to the top of the stack. 1681 * 1682 * @param { string } name - Indicates the name of the NavDestination to be moved to the top. 1683 * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; 1684 * @syscap SystemCapability.ArkUI.ArkUI.Full 1685 * @crossplatform 1686 * @since 10 1687 */ 1688 /** 1689 * Moves the first navigation destination page of this name to the top of stack. 1690 * That matches **name** from the bottom of the navigation stack to the top of the stack. 1691 * 1692 * @param { string } name - Indicates the name of the NavDestination to be moved to the top. 1693 * @param { boolean } [animated] - Indicates whether the transition is animated. 1694 * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; 1695 * @syscap SystemCapability.ArkUI.ArkUI.Full 1696 * @crossplatform 1697 * @atomicservice 1698 * @since arkts {'1.1':'11','1.2':'20'} 1699 * @arkts 1.1&1.2 1700 */ 1701 moveToTop(name: string, animated?: boolean): number; 1702 1703 /** 1704 * Moves to the top of the navigation stack the navigation destination page specified by **index**. 1705 * 1706 * @param { number } index - Index of the navigation destination page. The index is zero-based. 1707 * @syscap SystemCapability.ArkUI.ArkUI.Full 1708 * @crossplatform 1709 * @since 10 1710 */ 1711 /** 1712 * Moves to the top of the navigation stack the navigation destination page specified by **index**. 1713 * 1714 * @param { number } index - Index of the navigation destination page. The index is zero-based. 1715 * @param { boolean } [animated] - Whether to support the transition animation. 1716 * <br>Default value: **true**. 1717 * <br>**true**: The transition animation is supported. 1718 * <br>**false**: The transition animation is not supported. 1719 * @syscap SystemCapability.ArkUI.ArkUI.Full 1720 * @crossplatform 1721 * @atomicservice 1722 * @since arkts {'1.1':'11','1.2':'20'} 1723 * @arkts 1.1&1.2 1724 */ 1725 moveIndexToTop(index: number, animated?: boolean): void; 1726 1727 /** 1728 * Clears the navigation stack. 1729 * 1730 * @syscap SystemCapability.ArkUI.ArkUI.Full 1731 * @crossplatform 1732 * @since 10 1733 */ 1734 /** 1735 * Clears the navigation stack. 1736 * 1737 * @param { boolean } [animated] - Whether to support the transition animation. 1738 * <br>Default value: **true**. 1739 * <br>**true**: The transition animation is supported. 1740 * <br>**false**: The transition animation is not supported. 1741 * @syscap SystemCapability.ArkUI.ArkUI.Full 1742 * @crossplatform 1743 * @atomicservice 1744 * @since arkts {'1.1':'11','1.2':'20'} 1745 * @arkts 1.1&1.2 1746 */ 1747 clear(animated?: boolean): void; 1748 1749 /** 1750 * Obtains the names of all navigation destination pages in the navigation stack. 1751 * 1752 * @returns { Array<string> } Returns all the NavDestination name in the stack; 1753 * @syscap SystemCapability.ArkUI.ArkUI.Full 1754 * @crossplatform 1755 * @since 10 1756 */ 1757 /** 1758 * Obtains the names of all navigation destination pages in the navigation stack. 1759 * 1760 * @returns { Array<string> } Returns all the NavDestination name in the stack; 1761 * @syscap SystemCapability.ArkUI.ArkUI.Full 1762 * @crossplatform 1763 * @atomicservice 1764 * @since arkts {'1.1':'11','1.2':'20'} 1765 * @arkts 1.1&1.2 1766 */ 1767 getAllPathName(): Array<string>; 1768 1769 /** 1770 * Obtains the parameter information of the navigation destination page specified by **index**. 1771 * 1772 * @param { number } index - Index of the navigation destination page. The index is zero-based. 1773 * @returns { unknown | undefined } Returns the detailed parameter of the NavDestination. 1774 * <br>If it exists in the stack, otherwise returns undefined; 1775 * @syscap SystemCapability.ArkUI.ArkUI.Full 1776 * @crossplatform 1777 * @since 10 1778 */ 1779 /** 1780 * Obtains the parameter information of the navigation destination page specified by **index**. 1781 * 1782 * @param { number } index - Index of the navigation destination page. The index is zero-based. 1783 * @returns { unknown | undefined } Returns the detailed parameter of the NavDestination. 1784 * <br>If it exists in the stack, otherwise returns undefined; 1785 * @syscap SystemCapability.ArkUI.ArkUI.Full 1786 * @crossplatform 1787 * @atomicservice 1788 * @since 11 1789 */ 1790 getParamByIndex(index: number): unknown | undefined; 1791 1792 /** 1793 * Obtains the param of the specified NavDestination. 1794 * 1795 * @param { number } index - Indicates the index of the NavDestination. 1796 * @returns { Object | null | undefined } Returns the detailed parameter of the NavDestination if it exists in the stack, otherwise returns undefined; 1797 * @syscap SystemCapability.ArkUI.ArkUI.Full 1798 * @crossplatform 1799 * @atomicservice 1800 * @since 20 1801 * @arkts 1.2 1802 */ 1803 getParamByIndex(index: number): Object | null | undefined; 1804 1805 /** 1806 * Obtains the param of the specified NavDestination. 1807 * 1808 * @param { string } name - Indicates the name of the NavDestination. 1809 * @returns { Array<unknown> } Returns the detailed parameter of all the NavDestinations. 1810 * @syscap SystemCapability.ArkUI.ArkUI.Full 1811 * @crossplatform 1812 * @since 10 1813 */ 1814 /** 1815 * Obtains the param of the specified NavDestination. 1816 * 1817 * @param { string } name - Indicates the name of the NavDestination. 1818 * @returns { Array<unknown> } Returns the detailed parameter of all the NavDestinations. 1819 * @syscap SystemCapability.ArkUI.ArkUI.Full 1820 * @crossplatform 1821 * @atomicservice 1822 * @since 11 1823 */ 1824 getParamByName(name: string): Array<unknown>; 1825 1826 /** 1827 * Obtains the param of the specified NavDestination. 1828 * 1829 * @param { string } name - Indicates the name of the NavDestination. 1830 * @returns { Array<Object | null | undefined> } Returns the detailed parameter of all the NavDestinations. 1831 * @syscap SystemCapability.ArkUI.ArkUI.Full 1832 * @crossplatform 1833 * @atomicservice 1834 * @since 20 1835 * @arkts 1.2 1836 */ 1837 getParamByName(name: string): Array<Object | null | undefined>; 1838 1839 /** 1840 * Obtains the indexes of all the navigation destination pages that match **name**. 1841 * 1842 * @param { string } name - Indicates the name of the NavDestination. 1843 * @returns { Array<number> } Returns the index of all the NavDestinations. 1844 * @syscap SystemCapability.ArkUI.ArkUI.Full 1845 * @crossplatform 1846 * @since 10 1847 */ 1848 /** 1849 * Obtains the indexes of all the navigation destination pages that match **name**. 1850 * 1851 * @param { string } name - Indicates the name of the NavDestination. 1852 * @returns { Array<number> } Returns the index of all the NavDestinations. 1853 * @syscap SystemCapability.ArkUI.ArkUI.Full 1854 * @crossplatform 1855 * @atomicservice 1856 * @since arkts {'1.1':'11','1.2':'20'} 1857 * @arkts 1.1&1.2 1858 */ 1859 getIndexByName(name: string): Array<number>; 1860 1861 /** 1862 * Obtains the parent navigation path stack. 1863 * When a **Navigation** component is nested (directly or indirectly) insider another **Navigation** component, 1864 * The internal one can obtain the navigation path stack of the external one. 1865 * 1866 * @returns { NavPathStack | null } Returns the parent of the current stack. If no parent, it returns null. 1867 * @syscap SystemCapability.ArkUI.ArkUI.Full 1868 * @crossplatform 1869 * @atomicservice 1870 * @since arkts {'1.1':'11','1.2':'20'} 1871 * @arkts 1.1&1.2 1872 */ 1873 getParent(): NavPathStack | null; 1874 1875 /** 1876 * Obtains the stack size. 1877 * 1878 * @returns { number } Stack size. 1879 * <br>Value range: [0, +∞) 1880 * @syscap SystemCapability.ArkUI.ArkUI.Full 1881 * @crossplatform 1882 * @since 10 1883 */ 1884 /** 1885 * Obtains the stack size. 1886 * 1887 * @returns { number } Stack size. 1888 * <br>Value range: [0, +∞) 1889 * @syscap SystemCapability.ArkUI.ArkUI.Full 1890 * @crossplatform 1891 * @atomicservice 1892 * @since arkts {'1.1':'11','1.2':'20'} 1893 * @arkts 1.1&1.2 1894 */ 1895 size(): number; 1896 1897 /** 1898 * Disables or enables the transition animation in the **Navigation** component. 1899 * 1900 * @param { boolean } value - Whether to disable the transition animation. 1901 * <br>Default value: **false**. 1902 * <br>**true**:The transition animation is disabled. 1903 * <br>**false**: The transition animation is not disabled. 1904 * @syscap SystemCapability.ArkUI.ArkUI.Full 1905 * @crossplatform 1906 * @since 11 1907 */ 1908 /** 1909 * Disables or enables the transition animation in the **Navigation** component. 1910 * 1911 * @param { boolean } value - Whether to disable the transition animation. 1912 * <br>Default value: **false**. 1913 * <br>**true**:The transition animation is disabled. 1914 * <br>**false**: The transition animation is not disabled. 1915 * @syscap SystemCapability.ArkUI.ArkUI.Full 1916 * @crossplatform 1917 * @atomicservice 1918 * @since arkts {'1.1':'12','1.2':'20'} 1919 * @arkts 1.1&1.2 1920 */ 1921 disableAnimation(value: boolean): void; 1922 1923 /** 1924 * Sets the interception callback for navigation page redirection. 1925 * 1926 * @param { NavigationInterception } interception - Object to be intercepted during navigation redirection. 1927 * @syscap SystemCapability.ArkUI.ArkUI.Full 1928 * @crossplatform 1929 * @atomicservice 1930 * @since arkts {'1.1':'12','1.2':'20'} 1931 * @arkts 1.1&1.2 1932 */ 1933 setInterception(interception: NavigationInterception): void; 1934 1935 /** 1936 * Get the NavPathInfo array. 1937 * 1938 * @returns { Array<NavPathInfo> } The NavPathInfo array. 1939 * @syscap SystemCapability.ArkUI.ArkUI.Full 1940 * @crossplatform 1941 * @atomicservice 1942 * @since arkts {'1.1':'19','1.2':'20'} 1943 * @arkts 1.1&1.2 1944 */ 1945 getPathStack(): Array<NavPathInfo>; 1946 1947 /** 1948 * Set the NavPathInfo array. 1949 * 1950 * @param { Array<NavPathInfo> } pathStack - The NavPathInfo array. 1951 * @param { boolean } [animated] - Indicate whether the operation has animation. 1952 * @syscap SystemCapability.ArkUI.ArkUI.Full 1953 * @crossplatform 1954 * @atomicservice 1955 * @since arkts {'1.1':'19','1.2':'20'} 1956 * @arkts 1.1&1.2 1957 */ 1958 setPathStack(pathStack: Array<NavPathInfo>, animated?: boolean): void; 1959} 1960 1961/** 1962 * Defines the name of the navigation home page. 1963 * 1964 * @typedef { 'navBar' } NavBar 1965 * @syscap SystemCapability.ArkUI.ArkUI.Full 1966 * @crossplatform 1967 * @atomicservice 1968 * @since arkts {'1.1':'12','1.2':'20'} 1969 * @arkts 1.1&1.2 1970 */ 1971declare type NavBar = 'navBar' 1972 1973/** 1974 * navigation interception callback using in willShow and didShow 1975 * 1976 * @typedef { function } InterceptionShowCallback 1977 * @param { NavDestinationContext | NavBar } from - Indicates the starting NavDestination or NavBar. 1978 * @param { NavDestinationContext | NavBar } to - Indicates the destination NavDestination or NavBar. 1979 * @param { NavigationOperation } operation - Indicates the type of stack operation. 1980 * @param { boolean } isAnimated - Indicates whether the transition is animated. 1981 * @syscap SystemCapability.ArkUI.ArkUI.Full 1982 * @crossplatform 1983 * @atomicservice 1984 * @since arkts {'1.1':'12','1.2':'20'} 1985 * @arkts 1.1&1.2 1986 */ 1987declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: NavDestinationContext|NavBar, operation: NavigationOperation, isAnimated: boolean) => void; 1988 1989/** 1990 * navigation interception callback using in navigation mode change 1991 * 1992 * @typedef { function } InterceptionModeCallback 1993 * @param { NavigationMode } mode - Indicates the mode of Navigation. 1994 * @syscap SystemCapability.ArkUI.ArkUI.Full 1995 * @crossplatform 1996 * @atomicservice 1997 * @since arkts {'1.1':'12','1.2':'20'} 1998 * @arkts 1.1&1.2 1999 */ 2000declare type InterceptionModeCallback = (mode: NavigationMode) => void; 2001 2002/** 2003 * Provide navigation transition interception 2004 * 2005 * @interface NavigationInterception 2006 * @syscap SystemCapability.ArkUI.ArkUI.Full 2007 * @crossplatform 2008 * @atomicservice 2009 * @since arkts {'1.1':'12','1.2':'20'} 2010 * @arkts 1.1&1.2 2011 */ 2012declare interface NavigationInterception { 2013 /** 2014 * Interception before page redirection, allowing for stack operations. 2015 * The setting takes effect in the current redirection. 2016 * 2017 * @type { ?InterceptionShowCallback } 2018 * @syscap SystemCapability.ArkUI.ArkUI.Full 2019 * @crossplatform 2020 * @atomicservice 2021 * @since arkts {'1.1':'12','1.2':'20'} 2022 * @arkts 1.1&1.2 2023 */ 2024 willShow?: InterceptionShowCallback; 2025 2026 /** 2027 * Called after destination transition.For details, see { @Link InterceptionShowCallback}. 2028 * 2029 * @type { ?InterceptionShowCallback } 2030 * @syscap SystemCapability.ArkUI.ArkUI.Full 2031 * @crossplatform 2032 * @atomicservice 2033 * @since arkts {'1.1':'12','1.2':'20'} 2034 * @arkts 1.1&1.2 2035 */ 2036 didShow?: InterceptionShowCallback; 2037 2038 /** 2039 * Called when navigation mode changed.For details, see { @Link InterceptionModeCallback}. 2040 * 2041 * @type { ?InterceptionModeCallback } 2042 * @syscap SystemCapability.ArkUI.ArkUI.Full 2043 * @crossplatform 2044 * @atomicservice 2045 * @since arkts {'1.1':'12','1.2':'20'} 2046 * @arkts 1.1&1.2 2047 */ 2048 modeChange?: InterceptionModeCallback; 2049} 2050 2051/** 2052 * Indicates the information of home destination. 2053 * 2054 * @interface HomePathInfo 2055 * @syscap SystemCapability.ArkUI.ArkUI.Full 2056 * @crossplatform 2057 * @atomicservice 2058 * @since 20 2059 */ 2060declare interface HomePathInfo { 2061 /** 2062 * Name of the home destination. 2063 * 2064 * @type { string } 2065 * @syscap SystemCapability.ArkUI.ArkUI.Full 2066 * @crossplatform 2067 * @atomicservice 2068 * @since 20 2069 */ 2070 name: string; 2071 2072 /** 2073 * Detailed parameters of the home destination. 2074 * 2075 * @type { ?Object } 2076 * @syscap SystemCapability.ArkUI.ArkUI.Full 2077 * @crossplatform 2078 * @atomicservice 2079 * @since 20 2080 */ 2081 param?: Object; 2082} 2083 2084/** 2085 * Provide navigation view interface 2086 * 2087 * @interface NavigationInterface 2088 * @syscap SystemCapability.ArkUI.ArkUI.Full 2089 * @since 8 2090 */ 2091/** 2092 * Provide navigation view interface 2093 * 2094 * @interface NavigationInterface 2095 * @syscap SystemCapability.ArkUI.ArkUI.Full 2096 * @crossplatform 2097 * @since 10 2098 */ 2099/** 2100 * Provide navigation view interface 2101 * 2102 * @interface NavigationInterface 2103 * @syscap SystemCapability.ArkUI.ArkUI.Full 2104 * @crossplatform 2105 * @atomicservice 2106 * @since arkts {'1.1':'11','1.2':'20'} 2107 * @arkts 1.1&1.2 2108 */ 2109interface NavigationInterface { 2110 /** 2111 * Called when the navigation view interface is used. 2112 * 2113 * @returns { NavigationAttribute } 2114 * @syscap SystemCapability.ArkUI.ArkUI.Full 2115 * @since 8 2116 */ 2117 /** 2118 * Called when the navigation view interface is used. 2119 * 2120 * @returns { NavigationAttribute } 2121 * @syscap SystemCapability.ArkUI.ArkUI.Full 2122 * @crossplatform 2123 * @since 10 2124 */ 2125 /** 2126 * Called when the navigation view interface is used. 2127 * 2128 * @returns { NavigationAttribute } 2129 * @syscap SystemCapability.ArkUI.ArkUI.Full 2130 * @crossplatform 2131 * @atomicservice 2132 * @since arkts {'1.1':'11','1.2':'20'} 2133 * @arkts 1.1&1.2 2134 */ 2135 (): NavigationAttribute; 2136 2137 /** 2138 * Called when the navigation view interface is used, with route table provided. 2139 * 2140 * @param { NavPathStack } pathInfos - The stack of the route table. 2141 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 2142 * @syscap SystemCapability.ArkUI.ArkUI.Full 2143 * @crossplatform 2144 * @since 10 2145 */ 2146 /** 2147 * Called when the navigation view interface is used, with route table provided. 2148 * 2149 * @param { NavPathStack } pathInfos - The stack of the route table. 2150 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 2151 * @syscap SystemCapability.ArkUI.ArkUI.Full 2152 * @crossplatform 2153 * @atomicservice 2154 * @since arkts {'1.1':'11','1.2':'20'} 2155 * @arkts 1.1&1.2 2156 */ 2157 (pathInfos: NavPathStack): NavigationAttribute; 2158 2159 /** 2160 * Called when the navigation view interface is used, with route table and homeDestination are provided. 2161 * 2162 * @param { NavPathStack } pathInfos - The stack of the route table. 2163 * @param { HomePathInfo } homeDestination - The custom home destination info. 2164 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 2165 * @syscap SystemCapability.ArkUI.ArkUI.Full 2166 * @crossplatform 2167 * @atomicservice 2168 * @since 20 2169 */ 2170 (pathInfos: NavPathStack, homeDestination: HomePathInfo): NavigationAttribute; 2171} 2172 2173/** 2174 * Defines the status of toolbar item and it is used in the ToolbarItem interface. 2175 * 2176 * @enum { number } 2177 * @syscap SystemCapability.ArkUI.ArkUI.Full 2178 * @since 10 2179 */ 2180/** 2181 * Defines the status of toolbar item and it is used in the ToolbarItem interface. 2182 * 2183 * @enum { number } 2184 * @syscap SystemCapability.ArkUI.ArkUI.Full 2185 * @crossplatform 2186 * @atomicservice 2187 * @since arkts {'1.1':'11','1.2':'20'} 2188 * @arkts 1.1&1.2 2189 */ 2190declare enum ToolbarItemStatus { 2191 /** 2192 * Normal state. In this state, the toolbar item takes on the default style and 2193 * can switch to another state-specific style by responding to the hover, press, 2194 * and focus events. 2195 * 2196 * @syscap SystemCapability.ArkUI.ArkUI.Full 2197 * @since 10 2198 */ 2199 /** 2200 * Normal state. In this state, the toolbar item takes on the default style and 2201 * can switch to another state-specific style by responding to the hover, press, 2202 * and focus events. 2203 * 2204 * @syscap SystemCapability.ArkUI.ArkUI.Full 2205 * @crossplatform 2206 * @atomicservice 2207 * @since arkts {'1.1':'11','1.2':'20'} 2208 * @arkts 1.1&1.2 2209 */ 2210 NORMAL = 0, 2211 2212 /** 2213 * Disable state of toolbar item. 2214 * 2215 * @syscap SystemCapability.ArkUI.ArkUI.Full 2216 * @since 10 2217 */ 2218 /** 2219 * Disable state of toolbar item. 2220 * 2221 * @syscap SystemCapability.ArkUI.ArkUI.Full 2222 * @crossplatform 2223 * @atomicservice 2224 * @since arkts {'1.1':'11','1.2':'20'} 2225 * @arkts 1.1&1.2 2226 */ 2227 DISABLED = 1, 2228 2229 /** 2230 * Active state. In this state, the toolbar item can update its icon 2231 * to the one specified by **activeIcon** by responding to a click event. 2232 * 2233 * @syscap SystemCapability.ArkUI.ArkUI.Full 2234 * @since 10 2235 */ 2236 /** 2237 * Active state. In this state, the toolbar item can update its icon 2238 * to the one specified by **activeIcon** by responding to a click event. 2239 * 2240 * @syscap SystemCapability.ArkUI.ArkUI.Full 2241 * @crossplatform 2242 * @atomicservice 2243 * @since arkts {'1.1':'11','1.2':'20'} 2244 * @arkts 1.1&1.2 2245 */ 2246 ACTIVE = 2, 2247} 2248 2249/** 2250 * Defines the operation of current navigation transition. 2251 * 2252 * @enum { number } 2253 * @syscap SystemCapability.ArkUI.ArkUI.Full 2254 * @crossplatform 2255 * @since 11 2256 */ 2257/** 2258 * Defines the operation of current navigation transition. 2259 * 2260 * @enum { number } 2261 * @syscap SystemCapability.ArkUI.ArkUI.Full 2262 * @crossplatform 2263 * @atomicservice 2264 * @since arkts {'1.1':'12','1.2':'20'} 2265 * @arkts 1.1&1.2 2266 */ 2267declare enum NavigationOperation { 2268 /** 2269 * Push operation of navigation transition. 2270 * 2271 * @syscap SystemCapability.ArkUI.ArkUI.Full 2272 * @crossplatform 2273 * @since 11 2274 */ 2275 /** 2276 * Push operation of navigation transition. 2277 * 2278 * @syscap SystemCapability.ArkUI.ArkUI.Full 2279 * @crossplatform 2280 * @atomicservice 2281 * @since arkts {'1.1':'12','1.2':'20'} 2282 * @arkts 1.1&1.2 2283 */ 2284 PUSH = 1, 2285 2286 /** 2287 * Pop operation of navigation transition. 2288 * 2289 * @syscap SystemCapability.ArkUI.ArkUI.Full 2290 * @crossplatform 2291 * @since 11 2292 */ 2293 /** 2294 * Pop operation of navigation transition. 2295 * 2296 * @syscap SystemCapability.ArkUI.ArkUI.Full 2297 * @crossplatform 2298 * @atomicservice 2299 * @since arkts {'1.1':'12','1.2':'20'} 2300 * @arkts 1.1&1.2 2301 */ 2302 POP = 2, 2303 2304 /** 2305 * The transition is page replacement. 2306 * 2307 * @syscap SystemCapability.ArkUI.ArkUI.Full 2308 * @crossplatform 2309 * @since 11 2310 */ 2311 /** 2312 * The transition is page replacement. 2313 * 2314 * @syscap SystemCapability.ArkUI.ArkUI.Full 2315 * @crossplatform 2316 * @atomicservice 2317 * @since arkts {'1.1':'12','1.2':'20'} 2318 * @arkts 1.1&1.2 2319 */ 2320 REPLACE = 3, 2321} 2322 2323/** 2324 * Defines configurable parameters for toolbar item. 2325 * 2326 * @interface ToolbarItem 2327 * @syscap SystemCapability.ArkUI.ArkUI.Full 2328 * @since 10 2329 */ 2330/** 2331 * Defines configurable parameters for toolbar item. 2332 * 2333 * @interface ToolbarItem 2334 * @syscap SystemCapability.ArkUI.ArkUI.Full 2335 * @atomicservice 2336 * @since 11 2337 */ 2338/** 2339 * Defines configurable parameters for toolbar item. 2340 * 2341 * @interface ToolbarItem 2342 * @syscap SystemCapability.ArkUI.ArkUI.Full 2343 * @crossplatform 2344 * @atomicservice 2345 * @since 20 2346 * @arkts 1.1&1.2 2347 */ 2348declare interface ToolbarItem { 2349 /** 2350 * The value of navigation toolbar item. 2351 * 2352 * @type { ResourceStr } 2353 * @syscap SystemCapability.ArkUI.ArkUI.Full 2354 * @crossplatform 2355 * @since 10 2356 */ 2357 /** 2358 * The value of navigation toolbar item. 2359 * 2360 * @type { ResourceStr } 2361 * @syscap SystemCapability.ArkUI.ArkUI.Full 2362 * @crossplatform 2363 * @atomicservice 2364 * @since arkts {'1.1':'11','1.2':'20'} 2365 * @arkts 1.1&1.2 2366 */ 2367 value: ResourceStr; 2368 2369 /** 2370 * The icon of navigation toolbar item. 2371 * 2372 * @type { ?ResourceStr } 2373 * @syscap SystemCapability.ArkUI.ArkUI.Full 2374 * @crossplatform 2375 * @since 10 2376 */ 2377 /** 2378 * The icon of navigation toolbar item. 2379 * 2380 * @type { ?ResourceStr } 2381 * @syscap SystemCapability.ArkUI.ArkUI.Full 2382 * @crossplatform 2383 * @atomicservice 2384 * @since arkts {'1.1':'11','1.2':'20'} 2385 * @arkts 1.1&1.2 2386 */ 2387 icon?: ResourceStr; 2388 2389 /** 2390 * The symbol of navigation toolbar item. 2391 * 2392 * @type { ?SymbolGlyphModifier } 2393 * @syscap SystemCapability.ArkUI.ArkUI.Full 2394 * @atomicservice 2395 * @since 12 2396 */ 2397 /** 2398 * The symbol of navigation toolbar item. 2399 * 2400 * @type { ?SymbolGlyphModifier } 2401 * @syscap SystemCapability.ArkUI.ArkUI.Full 2402 * @crossplatform 2403 * @atomicservice 2404 * @since 20 2405 * @arkts 1.1&1.2 2406 */ 2407 symbolIcon?: SymbolGlyphModifier; 2408 2409 /** 2410 * Trigger by navigation toolbar item click. 2411 * 2412 * @type { ?function } 2413 * @syscap SystemCapability.ArkUI.ArkUI.Full 2414 * @crossplatform 2415 * @since 10 2416 */ 2417 /** 2418 * Trigger by navigation toolbar item click. 2419 * 2420 * @type { ?function } 2421 * @syscap SystemCapability.ArkUI.ArkUI.Full 2422 * @crossplatform 2423 * @atomicservice 2424 * @since arkts {'1.1':'11','1.2':'20'} 2425 * @arkts 1.1&1.2 2426 */ 2427 action?: () => void; 2428 2429 /** 2430 * The state of navigation toolbar item. 2431 * 2432 * @type { ?ToolbarItemStatus } 2433 * @default ToolbarItemStatus.NORMAL 2434 * @syscap SystemCapability.ArkUI.ArkUI.Full 2435 * @crossplatform 2436 * @since 10 2437 */ 2438 /** 2439 * The state of navigation toolbar item. 2440 * 2441 * @type { ?ToolbarItemStatus } 2442 * @default ToolbarItemStatus.NORMAL 2443 * @syscap SystemCapability.ArkUI.ArkUI.Full 2444 * @crossplatform 2445 * @atomicservice 2446 * @since arkts {'1.1':'11','1.2':'20'} 2447 * @arkts 1.1&1.2 2448 */ 2449 status?: ToolbarItemStatus; 2450 2451 /** 2452 * The icon of navigation toolbar item in active state. 2453 * 2454 * @type { ?ResourceStr } 2455 * @syscap SystemCapability.ArkUI.ArkUI.Full 2456 * @crossplatform 2457 * @since 10 2458 */ 2459 /** 2460 * The icon of navigation toolbar item in active state. 2461 * 2462 * @type { ?ResourceStr } 2463 * @syscap SystemCapability.ArkUI.ArkUI.Full 2464 * @crossplatform 2465 * @atomicservice 2466 * @since arkts {'1.1':'11','1.2':'20'} 2467 * @arkts 1.1&1.2 2468 */ 2469 activeIcon?: ResourceStr; 2470 2471 /** 2472 * The symbol of navigation toolbar item in active state. 2473 * 2474 * @type { ?SymbolGlyphModifier } 2475 * @syscap SystemCapability.ArkUI.ArkUI.Full 2476 * @atomicservice 2477 * @since 12 2478 */ 2479 /** 2480 * The symbol of navigation toolbar item in active state. 2481 * 2482 * @type { ?SymbolGlyphModifier } 2483 * @syscap SystemCapability.ArkUI.ArkUI.Full 2484 * @crossplatform 2485 * @atomicservice 2486 * @since 20 2487 * @arkts 1.1&1.2 2488 */ 2489 activeSymbolIcon?: SymbolGlyphModifier; 2490} 2491 2492/** 2493 * Indicates the options of Navigation's Titlebar. 2494 * 2495 * @interface NavigationTitleOptions 2496 * @syscap SystemCapability.ArkUI.ArkUI.Full 2497 * @crossplatform 2498 * @atomicservice 2499 * @since arkts {'1.1':'11','1.2':'20'} 2500 * @arkts 1.1&1.2 2501 */ 2502declare interface NavigationTitleOptions { 2503 /** 2504 * Background color of the title bar. If this parameter is not set, the default color is used. 2505 * 2506 * @type { ?ResourceColor } 2507 * @syscap SystemCapability.ArkUI.ArkUI.Full 2508 * @crossplatform 2509 * @atomicservice 2510 * @since arkts {'1.1':'11','1.2':'20'} 2511 * @arkts 1.1&1.2 2512 */ 2513 backgroundColor?: ResourceColor; 2514 2515 /** 2516 * Background blur style of the title bar. If this parameter is not set, the background 2517 * blur effect is disabled. 2518 * 2519 * @type { ?BlurStyle } 2520 * @syscap SystemCapability.ArkUI.ArkUI.Full 2521 * @crossplatform 2522 * @atomicservice 2523 * @since arkts {'1.1':'11','1.2':'20'} 2524 * @arkts 1.1&1.2 2525 */ 2526 backgroundBlurStyle?: BlurStyle; 2527 2528 /** 2529 * Background blur style options. 2530 * 2531 * @type { ?BackgroundBlurStyleOptions } 2532 * @syscap SystemCapability.ArkUI.ArkUI.Full 2533 * @crossplatform 2534 * @atomicservice 2535 * @since arkts {'1.1':'19','1.2':'20'} 2536 * @arkts 1.1&1.2 2537 */ 2538 backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; 2539 2540 /** 2541 * Background effect options. 2542 * 2543 * @type { ?BackgroundEffectOptions } 2544 * @syscap SystemCapability.ArkUI.ArkUI.Full 2545 * @crossplatform 2546 * @atomicservice 2547 * @since arkts {'1.1':'19','1.2':'20'} 2548 * @arkts 1.1&1.2 2549 */ 2550 backgroundEffect?: BackgroundEffectOptions; 2551 2552 /** 2553 * Layout style of the title bar. 2554 * <br>Default value: **BarStyle.STANDARD**. 2555 * 2556 * @type { ?BarStyle } 2557 * @default BarStyle.STANDARD 2558 * @syscap SystemCapability.ArkUI.ArkUI.Full 2559 * @crossplatform 2560 * @atomicservice 2561 * @since arkts {'1.1':'12','1.2':'20'} 2562 * @arkts 1.1&1.2 2563 */ 2564 barStyle?: BarStyle; 2565 2566 /** 2567 * Set title bar start padding. 2568 * 2569 * @type { ?LengthMetrics } 2570 * @default LengthMetrics.resource($r('sys.float.margin_left')) 2571 * @syscap SystemCapability.ArkUI.ArkUI.Full 2572 * @crossplatform 2573 * @atomicservice 2574 * @since arkts {'1.1':'12','1.2':'20'} 2575 * @arkts 1.1&1.2 2576 */ 2577 paddingStart?: LengthMetrics; 2578 2579 /** 2580 * Set title bar end padding. 2581 * 2582 * @type { ?LengthMetrics } 2583 * @default LengthMetrics.resource($r('sys.float.margin_right')) 2584 * @syscap SystemCapability.ArkUI.ArkUI.Full 2585 * @crossplatform 2586 * @atomicservice 2587 * @since arkts {'1.1':'12','1.2':'20'} 2588 * @arkts 1.1&1.2 2589 */ 2590 paddingEnd?: LengthMetrics; 2591 2592 /** 2593 * Text modifier for main title. 2594 * 2595 * @type { ?TextModifier } 2596 * @syscap SystemCapability.ArkUI.ArkUI.Full 2597 * @crossplatform 2598 * @atomicservice 2599 * @since arkts {'1.1':'13','1.2':'20'} 2600 * @arkts 1.1&1.2 2601 */ 2602 mainTitleModifier?: TextModifier; 2603 2604 /** 2605 * Text modifier for sub title. 2606 * 2607 * @type { ?TextModifier } 2608 * @syscap SystemCapability.ArkUI.ArkUI.Full 2609 * @crossplatform 2610 * @atomicservice 2611 * @since arkts {'1.1':'13','1.2':'20'} 2612 * @arkts 1.1&1.2 2613 */ 2614 subTitleModifier?: TextModifier; 2615 2616 /** 2617 * Defines whether to respond to the hover mode. 2618 * 2619 * @type { ?boolean } 2620 * @default false 2621 * @syscap SystemCapability.ArkUI.ArkUI.Full 2622 * @crossplatform 2623 * @atomicservice 2624 * @since arkts {'1.1':'13','1.2':'20'} 2625 * @arkts 1.1&1.2 2626 */ 2627 enableHoverMode?: boolean; 2628} 2629 2630/** 2631 * Declare BarStyle enum. 2632 * 2633 * @enum { number } 2634 * @syscap SystemCapability.ArkUI.ArkUI.Full 2635 * @crossplatform 2636 * @atomicservice 2637 * @since arkts {'1.1':'12','1.2':'20'} 2638 * @arkts 1.1&1.2 2639 */ 2640declare enum BarStyle { 2641 /** 2642 * In this mode, the title bar or toolbar is laid out above the content area. 2643 * 2644 * @syscap SystemCapability.ArkUI.ArkUI.Full 2645 * @crossplatform 2646 * @atomicservice 2647 * @since arkts {'1.1':'12','1.2':'20'} 2648 * @arkts 1.1&1.2 2649 */ 2650 STANDARD = 0, 2651 2652 /** 2653 * In this mode, the title bar or toolbar is overlaid on top of the content area. 2654 * 2655 * @syscap SystemCapability.ArkUI.ArkUI.Full 2656 * @crossplatform 2657 * @atomicservice 2658 * @since arkts {'1.1':'12','1.2':'20'} 2659 * @arkts 1.1&1.2 2660 */ 2661 STACK = 1, 2662 2663 /** 2664 * SafeAreaPadding style means the bar height will be taken as content's safeAreaPadding. 2665 * 2666 * @syscap SystemCapability.ArkUI.ArkUI.Full 2667 * @crossplatform 2668 * @atomicservice 2669 * @since arkts {'1.1':'14','1.2':'20'} 2670 * @arkts 1.1&1.2 2671 */ 2672 SAFE_AREA_PADDING = 2, 2673} 2674 2675/** 2676 * Indicates the options of Navigation's Toolbar. 2677 * 2678 * @interface NavigationToolbarOptions 2679 * @syscap SystemCapability.ArkUI.ArkUI.Full 2680 * @crossplatform 2681 * @atomicservice 2682 * @since arkts {'1.1':'11','1.2':'20'} 2683 * @arkts 1.1&1.2 2684 */ 2685declare interface NavigationToolbarOptions { 2686 /** 2687 * Background color of the toolbar. If this parameter is not set, the default color is used. 2688 * 2689 * @type { ?ResourceColor } 2690 * @syscap SystemCapability.ArkUI.ArkUI.Full 2691 * @crossplatform 2692 * @atomicservice 2693 * @since arkts {'1.1':'11','1.2':'20'} 2694 * @arkts 1.1&1.2 2695 */ 2696 backgroundColor?: ResourceColor; 2697 2698 /** 2699 * Background blur style of the toolbar. If this parameter is not set, the background blur 2700 * effect is disabled. 2701 * 2702 * @type { ?BlurStyle } 2703 * @syscap SystemCapability.ArkUI.ArkUI.Full 2704 * @crossplatform 2705 * @atomicservice 2706 * @since arkts {'1.1':'11','1.2':'20'} 2707 * @arkts 1.1&1.2 2708 */ 2709 backgroundBlurStyle?: BlurStyle; 2710 2711 /** 2712 * Background blur style options. 2713 * 2714 * @type { ?BackgroundBlurStyleOptions } 2715 * @syscap SystemCapability.ArkUI.ArkUI.Full 2716 * @crossplatform 2717 * @atomicservice 2718 * @since arkts {'1.1':'19','1.2':'20'} 2719 * @arkts 1.1&1.2 2720 */ 2721 backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; 2722 2723 /** 2724 * Background effect options. 2725 * 2726 * @type { ?BackgroundEffectOptions } 2727 * @syscap SystemCapability.ArkUI.ArkUI.Full 2728 * @crossplatform 2729 * @atomicservice 2730 * @since arkts {'1.1':'19','1.2':'20'} 2731 * @arkts 1.1&1.2 2732 */ 2733 backgroundEffect?: BackgroundEffectOptions; 2734 2735 /** 2736 * More button options. 2737 * 2738 * @type { ?MoreButtonOptions } 2739 * @syscap SystemCapability.ArkUI.ArkUI.Full 2740 * @crossplatform 2741 * @atomicservice 2742 * @since arkts {'1.1':'19','1.2':'20'} 2743 * @arkts 1.1&1.2 2744 */ 2745 moreButtonOptions?: MoreButtonOptions; 2746 2747 /** 2748 * Set tool bar style. 2749 * 2750 * @type { ?BarStyle } 2751 * @default BarStyle.STANDARD 2752 * @syscap SystemCapability.ArkUI.ArkUI.Full 2753 * @crossplatform 2754 * @atomicservice 2755 * @since arkts {'1.1':'14','1.2':'20'} 2756 * @arkts 1.1&1.2 2757 */ 2758 barStyle?: BarStyle; 2759 2760 /** 2761 * Set whether toolbar displays text. 2762 * 2763 * @type { ?boolean } 2764 * @default false 2765 * @syscap SystemCapability.ArkUI.ArkUI.Full 2766 * @crossplatform 2767 * @atomicservice 2768 * @since arkts {'1.1':'19','1.2':'20'} 2769 * @arkts 1.1&1.2 2770 */ 2771 hideItemValue?: boolean 2772} 2773 2774/** 2775 * Indicates the options of Navigation's Menu. 2776 * 2777 * @interface NavigationMenuOptions 2778 * @syscap SystemCapability.ArkUI.ArkUI.Full 2779 * @crossplatform 2780 * @atomicservice 2781 * @since arkts {'1.1':'19','1.2':'20'} 2782 * @arkts 1.1&1.2 2783 */ 2784declare interface NavigationMenuOptions { 2785/** 2786 * More button options. 2787 * 2788 * @type { ?MoreButtonOptions } 2789 * @syscap SystemCapability.ArkUI.ArkUI.Full 2790 * @crossplatform 2791 * @atomicservice 2792 * @since arkts {'1.1':'19','1.2':'20'} 2793 * @arkts 1.1&1.2 2794 */ 2795 moreButtonOptions?: MoreButtonOptions; 2796} 2797 2798/** 2799 * Indicates the options of Navigation's Menu. 2800 * 2801 * @interface MoreButtonOptions 2802 * @syscap SystemCapability.ArkUI.ArkUI.Full 2803 * @crossplatform 2804 * @atomicservice 2805 * @since arkts {'1.1':'19','1.2':'20'} 2806 * @arkts 1.1&1.2 2807 */ 2808declare interface MoreButtonOptions { 2809 /** 2810 * Background blur style. 2811 * 2812 * @type { ?BlurStyle } 2813 * @syscap SystemCapability.ArkUI.ArkUI.Full 2814 * @crossplatform 2815 * @atomicservice 2816 * @since arkts {'1.1':'19','1.2':'20'} 2817 * @arkts 1.1&1.2 2818 */ 2819 backgroundBlurStyle?: BlurStyle; 2820 2821 /** 2822 * Background blur style options. 2823 * 2824 * @type { ?BackgroundBlurStyleOptions } 2825 * @syscap SystemCapability.ArkUI.ArkUI.Full 2826 * @crossplatform 2827 * @atomicservice 2828 * @since arkts {'1.1':'19','1.2':'20'} 2829 * @arkts 1.1&1.2 2830 */ 2831 backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; 2832 2833 /** 2834 * Background effect options. 2835 * 2836 * @type { ?BackgroundEffectOptions } 2837 * @syscap SystemCapability.ArkUI.ArkUI.Full 2838 * @crossplatform 2839 * @atomicservice 2840 * @since arkts {'1.1':'19','1.2':'20'} 2841 * @arkts 1.1&1.2 2842 */ 2843 backgroundEffect?: BackgroundEffectOptions; 2844} 2845 2846/** 2847 * Declare Navigation view properties. 2848 * 2849 * @extends CommonMethod<NavigationAttribute> 2850 * @syscap SystemCapability.ArkUI.ArkUI.Full 2851 * @since 8 2852 */ 2853/** 2854 * Declare Navigation view properties. 2855 * 2856 * @extends CommonMethod<NavigationAttribute> 2857 * @syscap SystemCapability.ArkUI.ArkUI.Full 2858 * @crossplatform 2859 * @since 10 2860 */ 2861/** 2862 * Declare Navigation view properties. 2863 * 2864 * @extends CommonMethod<NavigationAttribute> 2865 * @syscap SystemCapability.ArkUI.ArkUI.Full 2866 * @crossplatform 2867 * @atomicservice 2868 * @since arkts {'1.1':'11','1.2':'20'} 2869 * @arkts 1.1&1.2 2870 */ 2871declare class NavigationAttribute extends CommonMethod<NavigationAttribute> { 2872 /** 2873 * Sets the width of the navigation bar. 2874 * This attribute takes effect only when the **Navigation** component is in split mode. 2875 * 2876 * @param { Length } value - Width of the navigation bar. 2877 * <br>Default value: **240**. Unit: vp. 2878 * <br>**undefined**: No action is taken, and the navigation bar width remains consistent with the default value. 2879 * @returns { NavigationAttribute } 2880 * @syscap SystemCapability.ArkUI.ArkUI.Full 2881 * @since 9 2882 */ 2883 /** 2884 * Sets the width of the navigation bar. 2885 * This attribute takes effect only when the **Navigation** component is in split mode. 2886 * 2887 * @param { Length } value - Width of the navigation bar. 2888 * <br>Default value: **240**. Unit: vp. 2889 * <br>**undefined**: No action is taken, and the navigation bar width remains consistent with the default value. 2890 * @returns { NavigationAttribute } 2891 * @syscap SystemCapability.ArkUI.ArkUI.Full 2892 * @crossplatform 2893 * @since 10 2894 */ 2895 /** 2896 * Sets the width of the navigation bar. 2897 * This attribute takes effect only when the **Navigation** component is in split mode. 2898 * 2899 * @param { Length } value - Width of the navigation bar. 2900 * <br>Default value: **240**. Unit: vp. 2901 * <br>**undefined**: No action is taken, and the navigation bar width remains consistent with the default value. 2902 * @returns { NavigationAttribute } 2903 * @syscap SystemCapability.ArkUI.ArkUI.Full 2904 * @crossplatform 2905 * @atomicservice 2906 * @since arkts {'1.1':'11','1.2':'20'} 2907 * @arkts 1.1&1.2 2908 */ 2909 navBarWidth(value: Length): NavigationAttribute; 2910 2911 /** 2912 * Sets the position of the navigation bar. This attribute takes effect 2913 * only when the **Navigation** component is split. 2914 * 2915 * @param { NavBarPosition } value - Position of the navigation bar. 2916 * <br>Default value: **NavBarPosition.Start**. 2917 * @returns { NavigationAttribute } 2918 * @syscap SystemCapability.ArkUI.ArkUI.Full 2919 * @since 9 2920 */ 2921 /** 2922 * Sets the position of the navigation bar. This attribute takes effect 2923 * only when the **Navigation** component is split. 2924 * 2925 * @param { NavBarPosition } value - Position of the navigation bar. 2926 * <br>Default value: **NavBarPosition.Start**. 2927 * @returns { NavigationAttribute } 2928 * @syscap SystemCapability.ArkUI.ArkUI.Full 2929 * @crossplatform 2930 * @since 10 2931 */ 2932 /** 2933 * Sets the position of the navigation bar. This attribute takes effect 2934 * only when the **Navigation** component is split. 2935 * 2936 * @param { NavBarPosition } value - Position of the navigation bar. 2937 * <br>Default value: **NavBarPosition.Start**. 2938 * @returns { NavigationAttribute } 2939 * @syscap SystemCapability.ArkUI.ArkUI.Full 2940 * @crossplatform 2941 * @atomicservice 2942 * @since arkts {'1.1':'11','1.2':'20'} 2943 * @arkts 1.1&1.2 2944 */ 2945 navBarPosition(value: NavBarPosition): NavigationAttribute; 2946 2947 /** 2948 * Sets the minimum and maximum widths of the navigation bar (effective in split mode). 2949 * 2950 * @param { [Dimension, Dimension] } value - Minimum and maximum widths of the navigation bar. 2951 * <br>Default value: 240 for the minimum value; 40% of the component width (not greater than 432) 2952 * for the maximum value; if either of the widths is not set, the default value is used for that width. 2953 * <br>Unit: vp. 2954 * @returns { NavigationAttribute } 2955 * @syscap SystemCapability.ArkUI.ArkUI.Full 2956 * @crossplatform 2957 * @since 10 2958 */ 2959 /** 2960 * Sets the minimum and maximum widths of the navigation bar (effective in split mode). 2961 * 2962 * @param { [Dimension, Dimension] } value - Minimum and maximum widths of the navigation bar. 2963 * <br>Default value: 240 for the minimum value; 40% of the component width (not greater than 432) 2964 * for the maximum value; if either of the widths is not set, the default value is used for that width. 2965 * <br>Unit: vp. 2966 * @returns { NavigationAttribute } 2967 * @syscap SystemCapability.ArkUI.ArkUI.Full 2968 * @crossplatform 2969 * @atomicservice 2970 * @since arkts {'1.1':'11','1.2':'20'} 2971 * @arkts 1.1&1.2 2972 */ 2973 navBarWidthRange(value: [Dimension, Dimension]): NavigationAttribute; 2974 2975 /** 2976 * Sets the minimum width of the navigation bar content area (effective in split mode). 2977 * 2978 * @param { Dimension } value - Minimum width of the navigation bar content area. 2979 * <br>Default value: **360**. 2980 * <br>Unit: vp. 2981 * <br>**undefined**: No action is taken, and the minimum width of the navigation bar remains 2982 * consistent with the default value.<br>Breakpoint calculation in Auto mode: default 600 vp = 2983 * minNavBarWidth (240 vp) + minContentWidth (360 vp). 2984 * @returns { NavigationAttribute } 2985 * @syscap SystemCapability.ArkUI.ArkUI.Full 2986 * @crossplatform 2987 * @since 10 2988 */ 2989 /** 2990 * Sets the minimum width of the navigation bar content area (effective in split mode). 2991 * 2992 * @param { Dimension } value - Minimum width of the navigation bar content area. 2993 * <br>Default value: **360**. 2994 * <br>Unit: vp. 2995 * <br>**undefined**: No action is taken, and the minimum width of the navigation bar remains 2996 * consistent with the default value.<br>Breakpoint calculation in Auto mode: default 600 vp = 2997 * minNavBarWidth (240 vp) + minContentWidth (360 vp). 2998 * @returns { NavigationAttribute } 2999 * @syscap SystemCapability.ArkUI.ArkUI.Full 3000 * @crossplatform 3001 * @atomicservice 3002 * @since arkts {'1.1':'11','1.2':'20'} 3003 * @arkts 1.1&1.2 3004 */ 3005 minContentWidth(value: Dimension): NavigationAttribute; 3006 3007 /** 3008 * Sets the mode of navigation. 3009 * 3010 * @param { NavigationMode } value - Display mode of the navigation. 3011 * <br>Default value: **NavigationMode.Auto**. 3012 * <br>At the default settings, the navigation adapts to stack or split mode based on the component width. 3013 * @returns { NavigationAttribute } 3014 * @syscap SystemCapability.ArkUI.ArkUI.Full 3015 * @since 9 3016 */ 3017 /** 3018 * Sets the mode of navigation. 3019 * 3020 * @param { NavigationMode } value - Display mode of the navigation. 3021 * <br>Default value: **NavigationMode.Auto**. 3022 * <br>At the default settings, the navigation adapts to stack or split mode based on the component width. 3023 * @returns { NavigationAttribute } 3024 * @syscap SystemCapability.ArkUI.ArkUI.Full 3025 * @crossplatform 3026 * @since 10 3027 */ 3028 /** 3029 * Sets the mode of navigation. 3030 * 3031 * @param { NavigationMode } value - Display mode of the navigation. 3032 * <br>Default value: **NavigationMode.Auto**. 3033 * <br>At the default settings, the navigation adapts to stack or split mode based on the component width. 3034 * @returns { NavigationAttribute } 3035 * @syscap SystemCapability.ArkUI.ArkUI.Full 3036 * @crossplatform 3037 * @atomicservice 3038 * @since arkts {'1.1':'11','1.2':'20'} 3039 * @arkts 1.1&1.2 3040 */ 3041 mode(value: NavigationMode): NavigationAttribute; 3042 3043 /** 3044 * Sets the icon of the back button in the title bar. 3045 * 3046 * @param { string | PixelMap | Resource } value - Icon of the back button in the title bar. 3047 * @returns { NavigationAttribute } 3048 * @syscap SystemCapability.ArkUI.ArkUI.Full 3049 * @since 9 3050 */ 3051 /** 3052 * Sets the icon of the back button in the title bar. 3053 * 3054 * @param { string | PixelMap | Resource } value - Icon of the back button in the title bar. 3055 * @returns { NavigationAttribute } 3056 * @syscap SystemCapability.ArkUI.ArkUI.Full 3057 * @crossplatform 3058 * @since 10 3059 */ 3060 /** 3061 * Sets the icon of the back button in the title bar. 3062 * 3063 * @param { string | PixelMap | Resource } value - Icon of the back button in the title bar. 3064 * @returns { NavigationAttribute } 3065 * @syscap SystemCapability.ArkUI.ArkUI.Full 3066 * @crossplatform 3067 * @atomicservice 3068 * @since 11 3069 */ 3070 /** 3071 * Sets the icon of the back button in the title bar. 3072 * 3073 * @param { string | PixelMap | Resource | SymbolGlyphModifier } value - Icon of the back button in the title bar. 3074 * @returns { NavigationAttribute } 3075 * @syscap SystemCapability.ArkUI.ArkUI.Full 3076 * @crossplatform 3077 * @atomicservice 3078 * @since arkts {'1.1':'12','1.2':'20'} 3079 * @arkts 1.1&1.2 3080 */ 3081 backButtonIcon(value: string | PixelMap | Resource | SymbolGlyphModifier): NavigationAttribute; 3082 3083 /** 3084 * Sets the back button icon and accessibility broadcast content. 3085 * 3086 * @param { string | PixelMap | Resource | SymbolGlyphModifier } icon - Indicates icon of back button 3087 * @param { ResourceStr } [accessibilityText] - Indicates content needs to broadcast. 3088 * Default value: **back** when the system language is English. 3089 * @returns { NavigationAttribute } 3090 * @syscap SystemCapability.ArkUI.ArkUI.Full 3091 * @crossplatform 3092 * @atomicservice 3093 * @since arkts {'1.1':'19','1.2':'20'} 3094 * @arkts 1.1&1.2 3095 */ 3096 backButtonIcon(icon: string | PixelMap | Resource | SymbolGlyphModifier, accessibilityText?: ResourceStr): NavigationAttribute; 3097 3098 /** 3099 * Hide the NavBar, which includes title bar, the child of Navigation and tool bar. Supported in split mode. 3100 * 3101 * @param { boolean } value - Whether to hide the navigation bar. 3102 * <br>Default value: **false**. **true**: Hide the navigation bar. **false**: Show the navigation bar. 3103 * @returns { NavigationAttribute } 3104 * @syscap SystemCapability.ArkUI.ArkUI.Full 3105 * @since 9 3106 */ 3107 /** 3108 * Hide the NavBar, which includes title bar, the child of Navigation and tool bar. Supported in split mode. 3109 * 3110 * @param { boolean } value - Whether to hide the navigation bar. 3111 * <br>Default value: **false**. **true**: Hide the navigation bar. **false**: Show the navigation bar. 3112 * @returns { NavigationAttribute } 3113 * @syscap SystemCapability.ArkUI.ArkUI.Full 3114 * @crossplatform 3115 * @since 10 3116 */ 3117 /** 3118 * Hide the NavBar, which includes title bar, the child of Navigation and tool bar. Supported in all mode. 3119 * It will show top page in the NavPathStack directly or empty if there is no page in the NavPathStack. 3120 * 3121 * @param { boolean } value - Whether to hide the navigation bar. 3122 * <br>Default value: **false**. **true**: Hide the navigation bar. **false**: Show the navigation bar. 3123 * @returns { NavigationAttribute } 3124 * @syscap SystemCapability.ArkUI.ArkUI.Full 3125 * @crossplatform 3126 * @atomicservice 3127 * @since arkts {'1.1':'11','1.2':'20'} 3128 * @arkts 1.1&1.2 3129 */ 3130 hideNavBar(value: boolean): NavigationAttribute; 3131 3132 /** 3133 * Navigation title 3134 * 3135 * @param { string | CustomBuilder } value 3136 * @returns { NavigationAttribute } 3137 * @syscap SystemCapability.ArkUI.ArkUI.Full 3138 * @since 8 3139 */ 3140 /** 3141 * Navigation title 3142 * 3143 * @param { string | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value - Navigation title. 3144 * <br>When the NavigationCustomTitle type is used to set the height, titleMode does not take effect. 3145 * <br>When the title string is too long: 3146 * <br>If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped. 3147 * <br>If a subtitle is set, the subtitle is scaled down and then clipped. 3148 * @returns { NavigationAttribute } 3149 * @syscap SystemCapability.ArkUI.ArkUI.Full 3150 * @since 9 3151 */ 3152 /** 3153 * Navigation title 3154 * 3155 * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value - Navigation title. 3156 * <br>When the NavigationCustomTitle type is used to set the height, titleMode does not take effect. 3157 * <br>When the title string is too long: 3158 * <br>If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped. 3159 * <br>If a subtitle is set, the subtitle is scaled down and then clipped. 3160 * @returns { NavigationAttribute } 3161 * @syscap SystemCapability.ArkUI.ArkUI.Full 3162 * @crossplatform 3163 * @since 10 3164 */ 3165 /** 3166 * Navigation title 3167 * 3168 * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value - Navigation title. 3169 * <br>When the NavigationCustomTitle type is used to set the height, titleMode does not take effect. 3170 * <br>When the title string is too long: 3171 * <br>If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped. 3172 * <br>If a subtitle is set, the subtitle is scaled down and then clipped. 3173 * @param { NavigationTitleOptions } [options] - Indicates the options of titlebar. 3174 * @returns { NavigationAttribute } 3175 * @syscap SystemCapability.ArkUI.ArkUI.Full 3176 * @crossplatform 3177 * @atomicservice 3178 * @since arkts {'1.1':'11','1.2':'20'} 3179 * @arkts 1.1&1.2 3180 */ 3181 title(value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle, options?: NavigationTitleOptions): NavigationAttribute; 3182 3183 /** 3184 * Sets the subtitle of the navigation. 3185 * 3186 * @param { string } value - Content of subtitle. 3187 * @returns { NavigationAttribute } 3188 * @syscap SystemCapability.ArkUI.ArkUI.Full 3189 * @since 8 3190 * @deprecated since 9 3191 * @useinstead title 3192 */ 3193 subTitle(value: string): NavigationAttribute; 3194 3195 /** 3196 * Hide navigation title bar 3197 * 3198 * @param { boolean } value - Whether to hide the title bar. 3199 * <br>Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. 3200 * @returns { NavigationAttribute } 3201 * @syscap SystemCapability.ArkUI.ArkUI.Full 3202 * @since 8 3203 */ 3204 /** 3205 * Hide navigation title bar 3206 * 3207 * @param { boolean } value - Whether to hide the title bar. 3208 * <br>Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. 3209 * @returns { NavigationAttribute } 3210 * @syscap SystemCapability.ArkUI.ArkUI.Full 3211 * @crossplatform 3212 * @since 10 3213 */ 3214 /** 3215 * Hide navigation title bar 3216 * 3217 * @param { boolean } value - Whether to hide the title bar. 3218 * <br>Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. 3219 * @returns { NavigationAttribute } 3220 * @syscap SystemCapability.ArkUI.ArkUI.Full 3221 * @crossplatform 3222 * @atomicservice 3223 * @since arkts {'1.1':'11','1.2':'20'} 3224 * @arkts 1.1&1.2 3225 */ 3226 hideTitleBar(value: boolean): NavigationAttribute; 3227 3228 /** 3229 * Sets whether to hide the title bar and whether to animate the visibility change. 3230 * 3231 * @param { boolean } hide - Whether to hide the title bar. 3232 * <br>Default value is **false**. **true**: Hide the title bar. **false**: Show the title bar. 3233 * @param { boolean } animated - Whether to animate the visibility change. 3234 * <br>Default value is **false**. 3235 * <br>**true**: Animate the visibility change. **false**: Do not animate the visibility change. 3236 * @returns { NavigationAttribute } 3237 * @syscap SystemCapability.ArkUI.ArkUI.Full 3238 * @crossplatform 3239 * @atomicservice 3240 * @since arkts {'1.1':'13','1.2':'20'} 3241 * @arkts 1.1&1.2 3242 */ 3243 hideTitleBar(hide: boolean, animated: boolean): NavigationAttribute; 3244 3245 /** 3246 * Sets whether to hide the back button in the title bar. 3247 * The back button is available only when titleMode is set to **NavigationTitleMode.Mini**. 3248 * 3249 * @param { boolean } value - Whether to hide the back button in the title bar. 3250 * <br>Default value: **false**. **true**: Hide the back button. **false**: Show the back button. 3251 * @returns { NavigationAttribute } 3252 * @syscap SystemCapability.ArkUI.ArkUI.Full 3253 * @since 8 3254 */ 3255 /** 3256 * Sets whether to hide the back button in the title bar. 3257 * The back button is available only when titleMode is set to **NavigationTitleMode.Mini**. 3258 * 3259 * @param { boolean } value - Whether to hide the back button in the title bar. 3260 * <br>Default value: **false**. **true**: Hide the back button. **false**: Show the back button. 3261 * @returns { NavigationAttribute } 3262 * @syscap SystemCapability.ArkUI.ArkUI.Full 3263 * @crossplatform 3264 * @since 10 3265 */ 3266 /** 3267 * Sets whether to hide the back button in the title bar. 3268 * The back button is available only when titleMode is set to **NavigationTitleMode.Mini**. 3269 * 3270 * @param { boolean } value - Whether to hide the back button in the title bar. 3271 * <br>Default value: **false**. **true**: Hide the back button. **false**: Show the back button. 3272 * @returns { NavigationAttribute } 3273 * @syscap SystemCapability.ArkUI.ArkUI.Full 3274 * @crossplatform 3275 * @atomicservice 3276 * @since arkts {'1.1':'11','1.2':'20'} 3277 * @arkts 1.1&1.2 3278 */ 3279 hideBackButton(value: boolean): NavigationAttribute; 3280 3281 /** 3282 * Sets the display mode of the navigation title mode. 3283 * 3284 * @param { NavigationTitleMode } value - Display mode of the page title bar. 3285 * <br>Default value: **NavigationTitleMode.Free** 3286 * @returns { NavigationAttribute } 3287 * @syscap SystemCapability.ArkUI.ArkUI.Full 3288 * @since 8 3289 */ 3290 /** 3291 * Sets the display mode of the navigation title mode. 3292 * 3293 * @param { NavigationTitleMode } value - Display mode of the page title bar. 3294 * <br>Default value: **NavigationTitleMode.Free** 3295 * @returns { NavigationAttribute } 3296 * @syscap SystemCapability.ArkUI.ArkUI.Full 3297 * @crossplatform 3298 * @since 10 3299 */ 3300 /** 3301 * Sets the display mode of the navigation title mode. 3302 * 3303 * @param { NavigationTitleMode } value - Display mode of the page title bar. 3304 * <br>Default value: **NavigationTitleMode.Free** 3305 * @returns { NavigationAttribute } 3306 * @syscap SystemCapability.ArkUI.ArkUI.Full 3307 * @crossplatform 3308 * @atomicservice 3309 * @since arkts {'1.1':'11','1.2':'20'} 3310 * @arkts 1.1&1.2 3311 */ 3312 titleMode(value: NavigationTitleMode): NavigationAttribute; 3313 3314 /** 3315 * Sets the menu items in the upper right corner of the navigation. 3316 * If this attribute is not set, no menu item is displayed. When the value type is NavigationMenuItem, 3317 * The menu shows a maximum of three icons in portrait mode and a maximum of five icons in landscape mode, 3318 * With excess icons (if any) placed under the automatically generated **More** icon. 3319 * 3320 * @param { Array<NavigationMenuItem> | CustomBuilder } value - 3321 * <br>Menu items in the upper right corner of the navigation. 3322 * @returns { NavigationAttribute } 3323 * @syscap SystemCapability.ArkUI.ArkUI.Full 3324 * @since 8 3325 */ 3326 /** 3327 * Sets the menu items in the upper right corner of the navigation. 3328 * If this attribute is not set, no menu item is displayed. When the value type is NavigationMenuItem, 3329 * The menu shows a maximum of three icons in portrait mode and a maximum of five icons in landscape mode, 3330 * With excess icons (if any) placed under the automatically generated **More** icon. 3331 * 3332 * @param { Array<NavigationMenuItem> | CustomBuilder } value - 3333 * <br>Menu items in the upper right corner of the navigation. 3334 * @returns { NavigationAttribute } 3335 * @syscap SystemCapability.ArkUI.ArkUI.Full 3336 * @crossplatform 3337 * @since 10 3338 */ 3339 /** 3340 * Sets the menu items in the upper right corner of the navigation. 3341 * If this attribute is not set, no menu item is displayed. When the value type is NavigationMenuItem, 3342 * The menu shows a maximum of three icons in portrait mode and a maximum of five icons in landscape mode, 3343 * With excess icons (if any) placed under the automatically generated **More** icon. 3344 * 3345 * @param { Array<NavigationMenuItem> | CustomBuilder } value - 3346 * <br>Menu items in the upper right corner of the navigation. 3347 * @returns { NavigationAttribute } 3348 * @syscap SystemCapability.ArkUI.ArkUI.Full 3349 * @crossplatform 3350 * @atomicservice 3351 * @since arkts {'1.1':'11','1.2':'20'} 3352 * @arkts 1.1&1.2 3353 */ 3354 menus(value: Array<NavigationMenuItem> | CustomBuilder): NavigationAttribute; 3355 3356 /** 3357 * Navigation title bar's menus 3358 * 3359 * @param { Array<NavigationMenuItem> | CustomBuilder } items 3360 * @param { NavigationMenuOptions } [options] - Indicates the options of menu. 3361 * @returns { NavigationAttribute } 3362 * @syscap SystemCapability.ArkUI.ArkUI.Full 3363 * @crossplatform 3364 * @atomicservice 3365 * @since arkts {'1.1':'19','1.2':'20'} 3366 * @arkts 1.1&1.2 3367 */ 3368 menus(items: Array<NavigationMenuItem> | CustomBuilder, options?: NavigationMenuOptions): NavigationAttribute; 3369 3370 /** 3371 * Sets the content of the toolbar. If this attribute is not set, no toolbar is displayed. 3372 * Toolbar items are evenly distributed on the bottom toolbar, with text and icons evenly 3373 * spaced in each content area. If any item contains overlong text and there are fewer than 3374 * five items, the toolbar will reduce the text size progressively, wrap the text over two 3375 * lines if necessary, and then clip the text to fit. 3376 * 3377 * @param { object | CustomBuilder } value - Content of the toolbar. 3378 * @returns { NavigationAttribute } 3379 * @syscap SystemCapability.ArkUI.ArkUI.Full 3380 * @since 8 3381 * @deprecated since 10 3382 * @useinstead navigation/NavigationAttribute#toolbarConfiguration 3383 */ 3384 toolBar(value: object | CustomBuilder): NavigationAttribute; 3385 3386 /** 3387 * Sets the content of the toolbar. If this attribute is not set, no toolbar is displayed. 3388 * 3389 * @param { Array<ToolbarItem> | CustomBuilder } value - Toolbar configuration parameters. 3390 * @returns { NavigationAttribute } 3391 * @syscap SystemCapability.ArkUI.ArkUI.Full 3392 * @crossplatform 3393 * @since 10 3394 */ 3395 /** 3396 * Sets the content of the toolbar. If this attribute is not set, no toolbar is displayed. 3397 * 3398 * @param { Array<ToolbarItem> | CustomBuilder } value - Toolbar configuration parameters. 3399 * @param { NavigationToolbarOptions } [options] - Indicates the options of toolbar. 3400 * @returns { NavigationAttribute } 3401 * @syscap SystemCapability.ArkUI.ArkUI.Full 3402 * @crossplatform 3403 * @atomicservice 3404 * @since arkts {'1.1':'11','1.2':'20'} 3405 * @arkts 1.1&1.2 3406 */ 3407 toolbarConfiguration(value: Array<ToolbarItem> | CustomBuilder, options?: NavigationToolbarOptions): NavigationAttribute; 3408 3409 /** 3410 * Hide tool bar 3411 * 3412 * @param { boolean } value - Whether to hide the toolbar. 3413 * <br>Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. 3414 * @returns { NavigationAttribute } 3415 * @syscap SystemCapability.ArkUI.ArkUI.Full 3416 * @since 8 3417 */ 3418 /** 3419 * Hide tool bar 3420 * 3421 * @param { boolean } value - Whether to hide the toolbar. 3422 * <br>Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. 3423 * @returns { NavigationAttribute } 3424 * @syscap SystemCapability.ArkUI.ArkUI.Full 3425 * @crossplatform 3426 * @since 10 3427 */ 3428 /** 3429 * Hide tool bar 3430 * 3431 * @param { boolean } value - Whether to hide the toolbar. 3432 * <br>Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. 3433 * @returns { NavigationAttribute } 3434 * @syscap SystemCapability.ArkUI.ArkUI.Full 3435 * @crossplatform 3436 * @atomicservice 3437 * @since arkts {'1.1':'11','1.2':'20'} 3438 * @arkts 1.1&1.2 3439 */ 3440 hideToolBar(value: boolean): NavigationAttribute; 3441 3442 /** 3443 * Sets whether to hide the toolbar and whether to animate the visibility change. 3444 * 3445 * @param { boolean } hide - Whether to hide the toolbar. 3446 * <br>Default value: **false**. **true**: Hide the toolbar. **false**: Show the toolbar. 3447 * @param { boolean } animated - Whether to animate the visibility change. 3448 * <br>Default value: **false**. 3449 * <br>**true**: Animate the visibility change. **false**: Do not animate the visibility change. 3450 * @returns { NavigationAttribute } 3451 * @syscap SystemCapability.ArkUI.ArkUI.Full 3452 * @crossplatform 3453 * @atomicservice 3454 * @since arkts {'1.1':'13','1.2':'20'} 3455 * @arkts 1.1&1.2 3456 */ 3457 hideToolBar(hide: boolean, animated: boolean): NavigationAttribute; 3458 3459 /** 3460 * Enable tool bar adaptation 3461 * 3462 * @param { Optional<boolean> } enable - Enable or disable tool bar adaptation. 3463 * Default value: **true**. 3464 * **true**: Enable toolbar adaptation. 3465 * **false**: Disable toolbar adaptation. 3466 * @returns { NavigationAttribute } 3467 * @syscap SystemCapability.ArkUI.ArkUI.Full 3468 * @crossplatform 3469 * @atomicservice 3470 * @since arkts {'1.1':'19','1.2':'20'} 3471 * @arkts 1.1&1.2 3472 */ 3473 enableToolBarAdaptation(enable: Optional<boolean>): NavigationAttribute; 3474 3475 /** 3476 * Triggered when titleMode is set to **NavigationTitleMode.Free** 3477 * and the title bar mode changes as content scrolls. 3478 * 3479 * @param { (titleMode: NavigationTitleMode) => void } callback 3480 * @returns { NavigationAttribute } 3481 * @syscap SystemCapability.ArkUI.ArkUI.Full 3482 * @since 8 3483 */ 3484 /** 3485 * Triggered when titleMode is set to **NavigationTitleMode.Free** 3486 * and the title bar mode changes as content scrolls. 3487 * 3488 * @param { function } callback 3489 * @returns { NavigationAttribute } 3490 * @syscap SystemCapability.ArkUI.ArkUI.Full 3491 * @crossplatform 3492 * @since 10 3493 */ 3494 /** 3495 * Triggered when titleMode is set to **NavigationTitleMode.Free** 3496 * and the title bar mode changes as content scrolls. 3497 * 3498 * @param { function } callback 3499 * @returns { NavigationAttribute } 3500 * @syscap SystemCapability.ArkUI.ArkUI.Full 3501 * @crossplatform 3502 * @atomicservice 3503 * @since arkts {'1.1':'11','1.2':'20'} 3504 * @arkts 1.1&1.2 3505 */ 3506 onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; 3507 3508 /** 3509 * Trigger callback when the visibility of navigation bar change. 3510 * 3511 * @param { (isVisible: boolean) => void } callback - Whether the navigation bar is visible. 3512 * <br>The value **true** means that the navigation bar is visible, and **false** means the opposite. 3513 * @returns { NavigationAttribute } 3514 * @syscap SystemCapability.ArkUI.ArkUI.Full 3515 * @since 9 3516 */ 3517 /** 3518 * Trigger callback when the visibility of navigation bar change. 3519 * 3520 * @param { function } callback - Whether the navigation bar is visible. 3521 * <br>The value **true** means that the navigation bar is visible, and **false** means the opposite. 3522 * @returns { NavigationAttribute } 3523 * @syscap SystemCapability.ArkUI.ArkUI.Full 3524 * @crossplatform 3525 * @since 10 3526 */ 3527 /** 3528 * Trigger callback when the visibility of navigation bar change. 3529 * 3530 * @param { function } callback - Whether the navigation bar is visible. 3531 * <br>The value **true** means that the navigation bar is visible, and **false** means the opposite. 3532 * @returns { NavigationAttribute } 3533 * @syscap SystemCapability.ArkUI.ArkUI.Full 3534 * @crossplatform 3535 * @atomicservice 3536 * @since arkts {'1.1':'11','1.2':'20'} 3537 * @arkts 1.1&1.2 3538 */ 3539 onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; 3540 3541 /** 3542 * Triggered when the **Navigation** component is displayed for the first time or 3543 * its display mode switches between Stack and Split. 3544 * 3545 * @param { function } callback 3546 * @returns { NavigationAttribute } 3547 * @syscap SystemCapability.ArkUI.ArkUI.Full 3548 * @crossplatform 3549 * @atomicservice 3550 * @since arkts {'1.1':'11','1.2':'20'} 3551 * @arkts 1.1&1.2 3552 */ 3553 onNavigationModeChange(callback: (mode: NavigationMode) => void): NavigationAttribute; 3554 3555 /** 3556 * Set builder for user-defined NavDestination component. 3557 * 3558 * @param { function } builder - The builder function of NavDestination component. 3559 * <br>**name**: name of the navigation destination page. 3560 * <br>**param**: detailed parameters of the navigation destination page. 3561 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3562 * @syscap SystemCapability.ArkUI.ArkUI.Full 3563 * @crossplatform 3564 * @since 10 3565 */ 3566 /** 3567 * Set builder for user-defined NavDestination component. 3568 * 3569 * @param { function } builder - The builder function of NavDestination component. 3570 * <br>**name**: name of the navigation destination page. 3571 * <br>**param**: detailed parameters of the navigation destination page. 3572 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3573 * @syscap SystemCapability.ArkUI.ArkUI.Full 3574 * @crossplatform 3575 * @atomicservice 3576 * @since 11 3577 */ 3578 navDestination(builder: (name: string, param: unknown) => void): NavigationAttribute; 3579 3580 /** 3581 * Set builder for user-defined NavDestination component. 3582 * 3583 * @param { PageMapBuilder | undefined } builder - The builder function of NavDestination component. 3584 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3585 * @syscap SystemCapability.ArkUI.ArkUI.Full 3586 * @crossplatform 3587 * @atomicservice 3588 * @since 20 3589 * @arkts 1.2 3590 */ 3591 navDestination(builder: PageMapBuilder | undefined): NavigationAttribute; 3592 3593 /** 3594 * Set custom navigation content transition animation. 3595 * 3596 * @param { function } delegate - Custom transition delegate. 3597 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3598 * @syscap SystemCapability.ArkUI.ArkUI.Full 3599 * @crossplatform 3600 * @since 11 3601 */ 3602 /** 3603 * Set custom navigation content transition animation. 3604 * 3605 * @param { function } delegate - Custom transition delegate. 3606 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3607 * @syscap SystemCapability.ArkUI.ArkUI.Full 3608 * @crossplatform 3609 * @atomicservice 3610 * @since arkts {'1.1':'12','1.2':'20'} 3611 * @arkts 1.1&1.2 3612 */ 3613 customNavContentTransition(delegate: (from: NavContentInfo, to: NavContentInfo, operation: NavigationOperation) => NavigationAnimatedTransition | undefined): NavigationAttribute; 3614 3615 /** 3616 * Ignores the layout safe area by allowing the component to extend into the non-safe areas of the screen. 3617 * 3618 * @param { Array<LayoutSafeAreaType> } [types] - Types of non-safe areas to extend into. 3619 * <br>Default value:<br>[LayoutSafeAreaType.SYSTEM]. 3620 * @param { Array<LayoutSafeAreaEdge> } [edges] - Edges for expanding the safe area. 3621 * <br> Default value:<br>[LayoutSafeAreaEdge.TOP, LayoutSafeAreaEdge.BOTTOM]. 3622 * @returns { NavigationAttribute } 3623 * @syscap SystemCapability.ArkUI.ArkUI.Full 3624 * @crossplatform 3625 * @atomicservice 3626 * @since arkts {'1.1':'12','1.2':'20'} 3627 * @arkts 1.1&1.2 3628 */ 3629 ignoreLayoutSafeArea(types?: Array<LayoutSafeAreaType>, edges?: Array<LayoutSafeAreaEdge>): NavigationAttribute; 3630 3631 /** 3632 * Sets the style of the system status bar when the navbar of the **Navigation** component is displayed. 3633 * 3634 * @param { Optional<SystemBarStyle> } style - Style of the system status bar. 3635 * @returns { NavigationAttribute } 3636 * @syscap SystemCapability.ArkUI.ArkUI.Full 3637 * @atomicservice 3638 * @since arkts {'1.1':'12','1.2':'20'} 3639 * @arkts 1.1&1.2 3640 */ 3641 systemBarStyle(style: Optional<SystemBarStyle>): NavigationAttribute; 3642 3643 /** 3644 * Set the Navigation can be restored after the application is terminated. 3645 * To enable this attribute, a navigation id must be set. 3646 * 3647 * @param { boolean } recoverable - navigation can be recovered. 3648 * Default value: **false**. 3649 * **true**: The **Navigation** component is recoverable. 3650 * **false**: The **Navigation** component is not recoverable. 3651 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3652 * @syscap SystemCapability.ArkUI.ArkUI.Full 3653 * @since arkts {'1.1':'14','1.2':'20'} 3654 * @arkts 1.1&1.2 3655 */ 3656 recoverable(recoverable: Optional<boolean>): NavigationAttribute; 3657 3658 /** 3659 * Enable dragbar 3660 * 3661 * @param { Optional<boolean> } isEnabled - enable dragbar or disable dragbar. 3662 * Default value: **false**. 3663 * **true**: Enable the drag bar. 3664 * **false**: Disable the drag bar. 3665 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3666 * @syscap SystemCapability.ArkUI.ArkUI.Full 3667 * @crossplatform 3668 * @atomicservice 3669 * @since arkts {'1.1':'14','1.2':'20'} 3670 * @arkts 1.1&1.2 3671 */ 3672 enableDragBar(isEnabled: Optional<boolean>): NavigationAttribute; 3673 3674 /** 3675 * whether to enable modeChangeAnimation 3676 * 3677 * @param { Optional<boolean> } isEnabled - enableModeChangeAnimation. 3678 * Default value: **true**. 3679 * **true**: Enable the animation for switching between stack and split mode. 3680 * **false**: Disable the animation for switching between stack and split mode. 3681 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3682 * @syscap SystemCapability.ArkUI.ArkUI.Full 3683 * @crossplatform 3684 * @atomicservice 3685 * @since arkts {'1.1':'15','1.2':'20'} 3686 * @arkts 1.1&1.2 3687 */ 3688 enableModeChangeAnimation(isEnabled: Optional<boolean>): NavigationAttribute; 3689 3690 /** 3691 * Set placeholder in split mode. 3692 * 3693 * @param { ComponentContent } placeholder - Set placeholder in split mode. 3694 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 3695 * @syscap SystemCapability.ArkUI.ArkUI.Full 3696 * @crossplatform 3697 * @atomicservice 3698 * @since 20 3699 */ 3700 splitPlaceholder(placeholder: ComponentContent): NavigationAttribute; 3701} 3702 3703/** 3704* Navigation transition animation protocol. 3705* 3706* @interface NavigationAnimatedTransition 3707* @syscap SystemCapability.ArkUI.ArkUI.Full 3708* @crossplatform 3709* @since 11 3710*/ 3711/** 3712* Navigation transition animation protocol. 3713* 3714* @interface NavigationAnimatedTransition 3715* @syscap SystemCapability.ArkUI.ArkUI.Full 3716* @crossplatform 3717* @atomicservice 3718* @since arkts {'1.1':'12','1.2':'20'} 3719* @arkts 1.1&1.2 3720*/ 3721declare interface NavigationAnimatedTransition { 3722 /** 3723 * This method is called after the transition ends to notify whether the transition was successful. 3724 * 3725 * @type { ?function } 3726 * @syscap SystemCapability.ArkUI.ArkUI.Full 3727 * @crossplatform 3728 * @since 11 3729 */ 3730 /** 3731 * This method is called after the transition ends to notify whether the transition was successful. 3732 * 3733 * @type { ?function } 3734 * @syscap SystemCapability.ArkUI.ArkUI.Full 3735 * @crossplatform 3736 * @atomicservice 3737 * @since arkts {'1.1':'12','1.2':'20'} 3738 * @arkts 1.1&1.2 3739 */ 3740 onTransitionEnd?: (success: boolean) => void 3741 3742 /** 3743 * Define the limit duration of the transition animation. 3744 * 3745 * @type { ?number } 3746 * @syscap SystemCapability.ArkUI.ArkUI.Full 3747 * @crossplatform 3748 * @since 11 3749 */ 3750 /** 3751 * Define the limit duration of the transition animation. 3752 * 3753 * @type { ?number } 3754 * @syscap SystemCapability.ArkUI.ArkUI.Full 3755 * @crossplatform 3756 * @atomicservice 3757 * @since arkts {'1.1':'12','1.2':'20'} 3758 * @arkts 1.1&1.2 3759 */ 3760 timeout?: number; 3761 3762 /** 3763 * Indicates whether it is an interactive transition. 3764 * 3765 * @type { ?boolean } 3766 * @default false 3767 * @syscap SystemCapability.ArkUI.ArkUI.Full 3768 * @crossplatform 3769 * @atomicservice 3770 * @since arkts {'1.1':'12','1.2':'20'} 3771 * @arkts 1.1&1.2 3772 */ 3773 isInteractive?: boolean; 3774 3775 /** 3776 * Configure the animations associated with custom transition. 3777 * 3778 * @type { function } 3779 * @syscap SystemCapability.ArkUI.ArkUI.Full 3780 * @crossplatform 3781 * @since 11 3782 */ 3783 /** 3784 * Configure the animations associated with custom transition. 3785 * 3786 * @type { function } 3787 * @syscap SystemCapability.ArkUI.ArkUI.Full 3788 * @crossplatform 3789 * @atomicservice 3790 * @since arkts {'1.1':'12','1.2':'20'} 3791 * @arkts 1.1&1.2 3792 */ 3793 transition: (transitionProxy: NavigationTransitionProxy) => void 3794} 3795 3796/** 3797 * Navigation transition proxy. 3798 * 3799 * @interface NavigationTransitionProxy 3800 * @syscap SystemCapability.ArkUI.ArkUI.Full 3801 * @crossplatform 3802 * @since 11 3803 */ 3804/** 3805 * Navigation transition proxy. 3806 * 3807 * @interface NavigationTransitionProxy 3808 * @syscap SystemCapability.ArkUI.ArkUI.Full 3809 * @crossplatform 3810 * @atomicservice 3811* @since arkts {'1.1':'12','1.2':'20'} 3812* @arkts 1.1&1.2 3813 */ 3814declare interface NavigationTransitionProxy { 3815 /** 3816 * From navigation content info. 3817 * 3818 * @type { NavContentInfo } 3819 * @syscap SystemCapability.ArkUI.ArkUI.Full 3820 * @crossplatform 3821 * @since 11 3822 */ 3823 /** 3824 * From navigation content info. 3825 * 3826 * @type { NavContentInfo } 3827 * @syscap SystemCapability.ArkUI.ArkUI.Full 3828 * @crossplatform 3829 * @atomicservice 3830 * @since arkts {'1.1':'12','1.2':'20'} 3831 * @arkts 1.1&1.2 3832 */ 3833 from: NavContentInfo; 3834 3835 /** 3836 * To navigation content info. 3837 * 3838 * @type { NavContentInfo } 3839 * @syscap SystemCapability.ArkUI.ArkUI.Full 3840 * @crossplatform 3841 * @since 11 3842 */ 3843 /** 3844 * To navigation content info. 3845 * 3846 * @type { NavContentInfo } 3847 * @syscap SystemCapability.ArkUI.ArkUI.Full 3848 * @crossplatform 3849 * @atomicservice 3850 * @since arkts {'1.1':'12','1.2':'20'} 3851 * @arkts 1.1&1.2 3852 */ 3853 to: NavContentInfo; 3854 3855 /** 3856 * Indicates whether it is an interactive transition. 3857 * 3858 * @type { ?boolean } 3859 * @default false 3860 * @syscap SystemCapability.ArkUI.ArkUI.Full 3861 * @crossplatform 3862 * @atomicservice 3863 * @since arkts {'1.1':'12','1.2':'20'} 3864 * @arkts 1.1&1.2 3865 */ 3866 isInteractive?: boolean; 3867 3868 /** 3869 * Notification system transition animation completed. 3870 * 3871 * @syscap SystemCapability.ArkUI.ArkUI.Full 3872 * @crossplatform 3873 * @since 11 3874 */ 3875 /** 3876 * Notification system transition animation completed. 3877 * 3878 * @syscap SystemCapability.ArkUI.ArkUI.Full 3879 * @crossplatform 3880 * @atomicservice 3881 * @since arkts {'1.1':'12','1.2':'20'} 3882 * @arkts 1.1&1.2 3883 */ 3884 finishTransition(): void; 3885 3886 /** 3887 * Cancels this interactive transition animation, restoring the navigation 3888 * stack to its state before page redirection. (Non-interactive transition 3889 * animations cannot be canceled.) 3890 * 3891 * @syscap SystemCapability.ArkUI.ArkUI.Full 3892 * @crossplatform 3893 * @atomicservice 3894 * @since 12 3895 */ 3896 cancelTransition?(): void; 3897 3898 /** 3899 * Notification system transition animation canceled. 3900 * 3901 * @type { ?VoidCallback } 3902 * @syscap SystemCapability.ArkUI.ArkUI.Full 3903 * @crossplatform 3904 * @atomicservice 3905 * @since 20 3906 * @arkts 1.2 3907 */ 3908 cancelTransition?: VoidCallback; 3909 3910 /** 3911 * Updates the progress of this interactive transition animation. (Non-interactive 3912 * animations do not support setting the animation progress). 3913 * 3914 * @param { number } progress - The progress of transition animation. 3915 * @syscap SystemCapability.ArkUI.ArkUI.Full 3916 * @crossplatform 3917 * @atomicservice 3918 * @since 12 3919 */ 3920 updateTransition?(progress: number): void; 3921 3922 /** 3923 * Notification system transition animation update. 3924 * 3925 * @type { ?UpdateTransitionCallback } 3926 * @syscap SystemCapability.ArkUI.ArkUI.Full 3927 * @crossplatform 3928 * @atomicservice 3929 * @since 20 3930 * @arkts 1.2 3931 */ 3932 updateTransition?: UpdateTransitionCallback; 3933} 3934 3935/** 3936 * navigation update transition callback. 3937 * 3938 * @typedef { function } UpdateTransitionCallback 3939 * @param { number } progress - Indicates the process of transition 3940 * @syscap SystemCapability.ArkUI.ArkUI.Full 3941 * @crossplatform 3942 * @atomicservice 3943 * @since 20 3944 * @arkts 1.2 3945 */ 3946declare type UpdateTransitionCallback = (progress: number) => void; 3947 3948/** 3949 * Navigation content info. 3950 * 3951 * @interface NavContentInfo 3952 * @syscap SystemCapability.ArkUI.ArkUI.Full 3953 * @crossplatform 3954 * @since 11 3955 */ 3956/** 3957 * Navigation content info. 3958 * 3959 * @interface NavContentInfo 3960 * @syscap SystemCapability.ArkUI.ArkUI.Full 3961 * @crossplatform 3962 * @atomicservice 3963 * @since arkts {'1.1':'12','1.2':'20'} 3964 * @arkts 1.1&1.2 3965 */ 3966declare interface NavContentInfo { 3967 /** 3968 * Navigation content name. 3969 * 3970 * @type { ?string } 3971 * @syscap SystemCapability.ArkUI.ArkUI.Full 3972 * @crossplatform 3973 * @since 11 3974 */ 3975 /** 3976 * Navigation content name. 3977 * 3978 * @type { ?string } 3979 * @syscap SystemCapability.ArkUI.ArkUI.Full 3980 * @crossplatform 3981 * @atomicservice 3982 * @since arkts {'1.1':'12','1.2':'20'} 3983 * @arkts 1.1&1.2 3984 */ 3985 name?: string; 3986 3987 /** 3988 * Navigation content index. 3989 * 3990 * @type { number } 3991 * @syscap SystemCapability.ArkUI.ArkUI.Full 3992 * @crossplatform 3993 * @since 11 3994 */ 3995 /** 3996 * Navigation content index. 3997 * 3998 * @type { number } 3999 * @syscap SystemCapability.ArkUI.ArkUI.Full 4000 * @crossplatform 4001 * @atomicservice 4002 * @since arkts {'1.1':'12','1.2':'20'} 4003 * @arkts 1.1&1.2 4004 */ 4005 index: number; 4006 4007 /** 4008 * Navigation content mode. 4009 * 4010 * @type { ?NavDestinationMode } 4011 * @syscap SystemCapability.ArkUI.ArkUI.Full 4012 * @crossplatform 4013 * @since 11 4014 */ 4015 /** 4016 * Navigation content mode. 4017 * 4018 * @type { ?NavDestinationMode } 4019 * @syscap SystemCapability.ArkUI.ArkUI.Full 4020 * @crossplatform 4021 * @atomicservice 4022 * @since arkts {'1.1':'12','1.2':'20'} 4023 * @arkts 1.1&1.2 4024 */ 4025 mode?: NavDestinationMode; 4026 4027 /** 4028 * Navigation content param. 4029 * 4030 * @type { ?Object } 4031 * @syscap SystemCapability.ArkUI.ArkUI.Full 4032 * @crossplatform 4033 * @atomicservice 4034 * @since arkts {'1.1':'12','1.2':'20'} 4035 * @arkts 1.1&1.2 4036 */ 4037 param?: Object; 4038 4039 /** 4040 * The unique id of NavDestination. 4041 * 4042 * @type { ?string } 4043 * @syscap SystemCapability.ArkUI.ArkUI.Full 4044 * @crossplatform 4045 * @atomicservice 4046 * @since arkts {'1.1':'12','1.2':'20'} 4047 * @arkts 1.1&1.2 4048 */ 4049 navDestinationId?: string; 4050} 4051 4052/** 4053 * Defines Navigation Component. 4054 * 4055 * @syscap SystemCapability.ArkUI.ArkUI.Full 4056 * @since 8 4057 */ 4058/** 4059 * Defines Navigation Component. 4060 * 4061 * @syscap SystemCapability.ArkUI.ArkUI.Full 4062 * @crossplatform 4063 * @since 10 4064 */ 4065/** 4066 * Defines Navigation Component. 4067 * 4068 * @syscap SystemCapability.ArkUI.ArkUI.Full 4069 * @crossplatform 4070 * @atomicservice 4071 * @since 11 4072 */ 4073declare const Navigation: NavigationInterface; 4074 4075/** 4076 * Defines Navigation Component instance. 4077 * 4078 * @syscap SystemCapability.ArkUI.ArkUI.Full 4079 * @since 8 4080 */ 4081/** 4082 * Defines Navigation Component instance. 4083 * 4084 * @syscap SystemCapability.ArkUI.ArkUI.Full 4085 * @crossplatform 4086 * @since 10 4087 */ 4088/** 4089 * Defines Navigation Component instance. 4090 * 4091 * @syscap SystemCapability.ArkUI.ArkUI.Full 4092 * @crossplatform 4093 * @atomicservice 4094 * @since 11 4095 */ 4096declare const NavigationInstance: NavigationAttribute; 4097