1/* 2 * Copyright (c) 2022-2024 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 { Resource } from '../../global/resource' 23import { CommonMethod, Callback, LayoutSafeAreaType, LayoutSafeAreaEdge, Optional, PixelMap } from './common' 24import { CustomBuilder } from './builder' 25import { Length, ResourceStr } from './units' 26import { TitleHeight, Curve } from './enums' 27import { 28 NavPathInfo, NavPathStack, NavigationTitleOptions, NavigationMenuItem, NavigationToolbarOptions, 29 ToolbarItem, NavigationMenuOptions, NavigationOperation, SystemBarStyle 30} from './navigation' 31import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier' 32import window from '../../@ohos.window' 33import image from '../../@ohos.multimedia.image' 34import { Scroller } from './scroll' 35/*** endif */ 36 37/** 38 * Import the Orientation type from @ohos.window. 39 * 40 * @typedef { import('../api/@ohos.window').default.Orientation } Orientation 41 * @syscap SystemCapability.ArkUI.ArkUI.Full 42 * @crossplatform 43 * @atomicservice 44 * @since 19 45 */ 46declare type Orientation = import('../api/@ohos.window').default.Orientation; 47 48/** 49 * Import the Orientation type from @ohos.window. 50 * 51 * @typedef { import('../api/@ohos.window').default.Orientation } Orientation 52 * @syscap SystemCapability.ArkUI.ArkUI.Full 53 * @crossplatform 54 * @atomicservice 55 * @since 20 56 * @arkts 1.2 57 */ 58declare type Orientation = window.Orientation; 59 60/** 61 * Defines the navigation destination common title. 62 * 63 * @interface NavDestinationCommonTitle 64 * @syscap SystemCapability.ArkUI.ArkUI.Full 65 * @since 9 66 */ 67/** 68 * Defines the navigation destination common title. 69 * 70 * @interface NavDestinationCommonTitle 71 * @syscap SystemCapability.ArkUI.ArkUI.Full 72 * @crossplatform 73 * @since 10 74 */ 75/** 76 * Defines the navigation destination common title. 77 * 78 * @interface NavDestinationCommonTitle 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @crossplatform 81 * @atomicservice 82 * @since arkts {'1.1':'11','1.2':'20'} 83 * @arkts 1.1&1.2 84 */ 85declare interface NavDestinationCommonTitle { 86 /** 87 * Sets the main title. 88 * 89 * @type { string } 90 * @syscap SystemCapability.ArkUI.ArkUI.Full 91 * @since 9 92 */ 93 /** 94 * Sets the main title. 95 * 96 * @type { string } 97 * @syscap SystemCapability.ArkUI.ArkUI.Full 98 * @crossplatform 99 * @since 10 100 */ 101 /** 102 * Sets the main title. 103 * 104 * @type { string } 105 * @syscap SystemCapability.ArkUI.ArkUI.Full 106 * @crossplatform 107 * @atomicservice 108 * @since 11 109 */ 110 /** 111 * Sets the main title. 112 * 113 * @type { string | Resource } 114 * @syscap SystemCapability.ArkUI.ArkUI.Full 115 * @crossplatform 116 * @atomicservice 117 * @since arkts {'1.1':'14','1.2':'20'} 118 * @arkts 1.1&1.2 119 */ 120 main: string | Resource; 121 122 /** 123 * Sets the sub title. 124 * 125 * @type { string } 126 * @syscap SystemCapability.ArkUI.ArkUI.Full 127 * @since 9 128 */ 129 /** 130 * Sets the sub title. 131 * 132 * @type { string } 133 * @syscap SystemCapability.ArkUI.ArkUI.Full 134 * @crossplatform 135 * @since 10 136 */ 137 /** 138 * Sets the sub title. 139 * 140 * @type { string } 141 * @syscap SystemCapability.ArkUI.ArkUI.Full 142 * @crossplatform 143 * @atomicservice 144 * @since 11 145 */ 146 /** 147 * Sets the sub title. 148 * 149 * @type { string | Resource } 150 * @syscap SystemCapability.ArkUI.ArkUI.Full 151 * @crossplatform 152 * @atomicservice 153 * @since arkts {'1.1':'14','1.2':'20'} 154 * @arkts 1.1&1.2 155 */ 156 sub: string | Resource; 157} 158 159/** 160 * Defines the navigation destination custom title. 161 * 162 * @interface NavDestinationCustomTitle 163 * @syscap SystemCapability.ArkUI.ArkUI.Full 164 * @since 9 165 */ 166/** 167 * Defines the navigation destination custom title. 168 * 169 * @interface NavDestinationCustomTitle 170 * @syscap SystemCapability.ArkUI.ArkUI.Full 171 * @crossplatform 172 * @since 10 173 */ 174/** 175 * Defines the navigation destination custom title. 176 * 177 * @interface NavDestinationCustomTitle 178 * @syscap SystemCapability.ArkUI.ArkUI.Full 179 * @crossplatform 180 * @atomicservice 181 * @since arkts {'1.1':'11','1.2':'20'} 182 * @arkts 1.1&1.2 183 */ 184declare interface NavDestinationCustomTitle { 185 /** 186 * Sets the custom title builder. 187 * 188 * @type { CustomBuilder } 189 * @syscap SystemCapability.ArkUI.ArkUI.Full 190 * @since 9 191 */ 192 /** 193 * Sets the custom title builder. 194 * 195 * @type { CustomBuilder } 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @crossplatform 198 * @since 10 199 */ 200 /** 201 * Sets the custom title builder. 202 * 203 * @type { CustomBuilder } 204 * @syscap SystemCapability.ArkUI.ArkUI.Full 205 * @crossplatform 206 * @atomicservice 207 * @since arkts {'1.1':'11','1.2':'20'} 208 * @arkts 1.1&1.2 209 */ 210 builder: CustomBuilder; 211 212 /** 213 * Sets the custom title height. 214 * 215 * @type { TitleHeight | Length } 216 * @syscap SystemCapability.ArkUI.ArkUI.Full 217 * @since 9 218 */ 219 /** 220 * Sets the custom title height. 221 * 222 * @type { TitleHeight | Length } 223 * @syscap SystemCapability.ArkUI.ArkUI.Full 224 * @crossplatform 225 * @since 10 226 */ 227 /** 228 * Sets the custom title height. 229 * 230 * @type { TitleHeight | Length } 231 * @syscap SystemCapability.ArkUI.ArkUI.Full 232 * @crossplatform 233 * @atomicservice 234 * @since arkts {'1.1':'11','1.2':'20'} 235 * @arkts 1.1&1.2 236 */ 237 height: TitleHeight | Length; 238} 239 240/** 241 * Types of system Transition. 242 * 243 * @enum { number } 244 * @syscap SystemCapability.ArkUI.ArkUI.Full 245 * @crossplatform 246 * @atomicservice 247 * @since arkts {'1.1':'14','1.2':'20'} 248 * @arkts 1.1&1.2 249 */ 250declare enum NavigationSystemTransitionType { 251 /** 252 * Default system transition animation. 253 * 254 * @syscap SystemCapability.ArkUI.ArkUI.Full 255 * @crossplatform 256 * @atomicservice 257 * @since arkts {'1.1':'14','1.2':'20'} 258 * @arkts 1.1&1.2 259 */ 260 DEFAULT = 0, 261 /** 262 * No system transition animation. 263 * 264 * @syscap SystemCapability.ArkUI.ArkUI.Full 265 * @crossplatform 266 * @atomicservice 267 * @since arkts {'1.1':'14','1.2':'20'} 268 * @arkts 1.1&1.2 269 */ 270 NONE = 1, 271 /** 272 * System transition animation of the title bar. 273 * 274 * @syscap SystemCapability.ArkUI.ArkUI.Full 275 * @crossplatform 276 * @atomicservice 277 * @since arkts {'1.1':'14','1.2':'20'} 278 * @arkts 1.1&1.2 279 */ 280 TITLE = 2, 281 /** 282 * System transition animation of the content area. 283 * 284 * @syscap SystemCapability.ArkUI.ArkUI.Full 285 * @crossplatform 286 * @atomicservice 287 * @since arkts {'1.1':'14','1.2':'20'} 288 * @arkts 1.1&1.2 289 */ 290 CONTENT = 3, 291 /** 292 * Fade-type system transition animation. 293 * 294 * @syscap SystemCapability.ArkUI.ArkUI.Full 295 * @crossplatform 296 * @atomicservice 297 * @since arkts {'1.1':'15','1.2':'20'} 298 * @arkts 1.1&1.2 299 */ 300 FADE = 4, 301 /** 302 * Center-scale type system transition animation. 303 * 304 * @syscap SystemCapability.ArkUI.ArkUI.Full 305 * @crossplatform 306 * @atomicservice 307 * @since arkts {'1.1':'15','1.2':'20'} 308 * @arkts 1.1&1.2 309 */ 310 EXPLODE = 5, 311 /** 312 * Right-slide type system transition animation. 313 * 314 * @syscap SystemCapability.ArkUI.ArkUI.Full 315 * @crossplatform 316 * @atomicservice 317 * @since arkts {'1.1':'15','1.2':'20'} 318 * @arkts 1.1&1.2 319 */ 320 SLIDE_RIGHT = 6, 321 /** 322 * Bottom-slide type system transition animation. 323 * 324 * @syscap SystemCapability.ArkUI.ArkUI.Full 325 * @crossplatform 326 * @atomicservice 327 * @since arkts {'1.1':'15','1.2':'20'} 328 * @arkts 1.1&1.2 329 */ 330 SLIDE_BOTTOM = 7, 331} 332 333/** 334 * NavDestination mode. 335 * 336 * @enum { number } 337 * @syscap SystemCapability.ArkUI.ArkUI.Full 338 * @crossplatform 339 * @since 11 340 */ 341/** 342 * NavDestination mode. 343 * 344 * @enum { number } 345 * @syscap SystemCapability.ArkUI.ArkUI.Full 346 * @crossplatform 347 * @atomicservice 348 * @since arkts {'1.1':'12','1.2':'20'} 349 * @arkts 1.1&1.2 350 */ 351declare enum NavDestinationMode { 352 /** 353 * Standard mode is default mode of NavDestination. 354 * 355 * @syscap SystemCapability.ArkUI.ArkUI.Full 356 * @crossplatform 357 * @since 11 358 */ 359 /** 360 * Standard mode is default mode of NavDestination. 361 * 362 * @syscap SystemCapability.ArkUI.ArkUI.Full 363 * @crossplatform 364 * @atomicservice 365 * @since arkts {'1.1':'12','1.2':'20'} 366 * @arkts 1.1&1.2 367 */ 368 STANDARD = 0, 369 370 /** 371 * Dialog mode, where the navigation destination is transparent by default, and adding or removing the navigation 372 * destination from the navigation stack does not affect the lifecycle of the lower-layer navigation destinations. 373 * 374 * @syscap SystemCapability.ArkUI.ArkUI.Full 375 * @crossplatform 376 * @since 11 377 */ 378 /** 379 * Dialog mode, where the navigation destination is transparent by default, and adding or removing the navigation 380 * destination from the navigation stack does not affect the lifecycle of the lower-layer navigation destinations. 381 * 382 * @syscap SystemCapability.ArkUI.ArkUI.Full 383 * @crossplatform 384 * @atomicservice 385 * @since arkts {'1.1':'12','1.2':'20'} 386 * @arkts 1.1&1.2 387 */ 388 DIALOG = 1, 389} 390 391/** 392 * Reason of navDestination be active or inactive. 393 * 394 * @enum { number } 395 * @syscap SystemCapability.ArkUI.ArkUI.Full 396 * @crossplatform 397 * @atomicservice 398 * @since arkts {'1.1':'17','1.2':'20'} 399 * @arkts 1.1&1.2 400 */ 401declare enum NavDestinationActiveReason { 402 /** 403 * The activation state changes through page navigation. 404 * 405 * @syscap SystemCapability.ArkUI.ArkUI.Full 406 * @crossplatform 407 * @atomicservice 408 * @since arkts {'1.1':'17','1.2':'20'} 409 * @arkts 1.1&1.2 410 */ 411 TRANSITION = 0, 412 413 /** 414 * The activation state changes due to the opening or closing of a modal page. 415 * 416 * @syscap SystemCapability.ArkUI.ArkUI.Full 417 * @crossplatform 418 * @atomicservice 419 * @since arkts {'1.1':'17','1.2':'20'} 420 * @arkts 1.1&1.2 421 */ 422 CONTENT_COVER = 1, 423 424 /** 425 * The activation state changes due to the opening or closing of a sheet. 426 * 427 * @syscap SystemCapability.ArkUI.ArkUI.Full 428 * @crossplatform 429 * @atomicservice 430 * @since arkts {'1.1':'17','1.2':'20'} 431 * @arkts 1.1&1.2 432 */ 433 SHEET = 2, 434 435 /** 436 * The activation state changes due to the opening or closing of a custom dialog. 437 * 438 * @syscap SystemCapability.ArkUI.ArkUI.Full 439 * @crossplatform 440 * @atomicservice 441 * @since arkts {'1.1':'17','1.2':'20'} 442 * @arkts 1.1&1.2 443 */ 444 DIALOG = 3, 445 446 /** 447 * The activation state changes due to the opening or closing of an overlay using **OverlayManager**. 448 * 449 * @syscap SystemCapability.ArkUI.ArkUI.Full 450 * @crossplatform 451 * @atomicservice 452 * @since arkts {'1.1':'17','1.2':'20'} 453 * @arkts 1.1&1.2 454 */ 455 OVERLAY = 4, 456 457 /** 458 * The activation state changes due to switching between foreground and background states of the application. 459 * 460 * @syscap SystemCapability.ArkUI.ArkUI.Full 461 * @crossplatform 462 * @atomicservice 463 * @since arkts {'1.1':'17','1.2':'20'} 464 * @arkts 1.1&1.2 465 */ 466 APP_STATE = 5, 467} 468 469/** 470 * The construct function of NavDestination. 471 * 472 * @interface NavDestinationInterface 473 * @syscap SystemCapability.ArkUI.ArkUI.Full 474 * @since 9 475 */ 476/** 477 * The construct function of NavDestination. 478 * 479 * @interface NavDestinationInterface 480 * @syscap SystemCapability.ArkUI.ArkUI.Full 481 * @crossplatform 482 * @since 10 483 */ 484/** 485 * The construct function of NavDestination. 486 * 487 * @interface NavDestinationInterface 488 * @syscap SystemCapability.ArkUI.ArkUI.Full 489 * @crossplatform 490 * @atomicservice 491 * @since arkts {'1.1':'11','1.2':'20'} 492 * @arkts 1.1&1.2 493 */ 494declare interface NavDestinationInterface { 495 /** 496 * Constructor. 497 * 498 * @returns { NavDestinationAttribute } 499 * @syscap SystemCapability.ArkUI.ArkUI.Full 500 * @since 9 501 */ 502 /** 503 * Constructor. 504 * 505 * @returns { NavDestinationAttribute } 506 * @syscap SystemCapability.ArkUI.ArkUI.Full 507 * @crossplatform 508 * @since 10 509 */ 510 /** 511 * Constructor. 512 * 513 * @returns { NavDestinationAttribute } 514 * @syscap SystemCapability.ArkUI.ArkUI.Full 515 * @crossplatform 516 * @atomicservice 517 * @since arkts {'1.1':'11','1.2':'20'} 518 * @arkts 1.1&1.2 519 */ 520 (): NavDestinationAttribute; 521} 522 523/** 524 * Indicates configuration info of destination. 525 * 526 * @interface RouteMapConfig 527 * @syscap SystemCapability.ArkUI.ArkUI.Full 528 * @crossplatform 529 * @atomicservice 530 * @since arkts {'1.1':'12','1.2':'20'} 531 * @arkts 1.1&1.2 532 */ 533declare interface RouteMapConfig { 534 /** 535 * Navdestination name. 536 * 537 * @type { string } 538 * @syscap SystemCapability.ArkUI.ArkUI.Full 539 * @crossplatform 540 * @atomicservice 541 * @since arkts {'1.1':'12','1.2':'20'} 542 * @arkts 1.1&1.2 543 */ 544 name: string; 545 546 /** 547 * Path of the navdestination in the current package. 548 * 549 * @type { string } 550 * @syscap SystemCapability.ArkUI.ArkUI.Full 551 * @crossplatform 552 * @atomicservice 553 * @since arkts {'1.1':'12','1.2':'20'} 554 * @arkts 1.1&1.2 555 */ 556 pageSourceFile: string; 557 558 /** 559 * Custom data of the page. 560 * 561 * @type { Object } 562 * @syscap SystemCapability.ArkUI.ArkUI.Full 563 * @crossplatform 564 * @atomicservice 565 * @since arkts {'1.1':'12','1.2':'20'} 566 * @arkts 1.1&1.2 567 */ 568 data: Object 569} 570 571/** 572 * Indicates the context of NavDestination. 573 * 574 * @interface NavDestinationContext 575 * @syscap SystemCapability.ArkUI.ArkUI.Full 576 * @crossplatform 577 * @atomicservice 578 * @since arkts {'1.1':'11','1.2':'20'} 579 * @arkts 1.1&1.2 580 */ 581declare interface NavDestinationContext { 582 /** 583 * Path information of the navigation destination page. 584 * 585 * @type { NavPathInfo } 586 * @syscap SystemCapability.ArkUI.ArkUI.Full 587 * @crossplatform 588 * @atomicservice 589 * @since arkts {'1.1':'11','1.2':'20'} 590 * @arkts 1.1&1.2 591 */ 592 pathInfo: NavPathInfo; 593 594 /** 595 * Page stack where the current navigation destination page is located. 596 * 597 * @type { NavPathStack } 598 * @syscap SystemCapability.ArkUI.ArkUI.Full 599 * @crossplatform 600 * @atomicservice 601 * @since arkts {'1.1':'11','1.2':'20'} 602 * @arkts 1.1&1.2 603 */ 604 pathStack: NavPathStack; 605 606 /** 607 * Unique ID of the current navigation destination page, which is automatically generated by the system 608 * and is irrelevant to the universal attribute **id** of the component. 609 * 610 * @type { ?string } 611 * @syscap SystemCapability.ArkUI.ArkUI.Full 612 * @crossplatform 613 * @atomicservice 614 * @since arkts {'1.1':'12','1.2':'20'} 615 * @arkts 1.1&1.2 616 */ 617 navDestinationId?: string; 618 619 /** 620 * Get configuration of current Destination in module.json 621 * 622 * @returns {RouteMapConfig | undefined} - Route map configuration of the current page. 623 * **undefined**, returned when the page is not configured through the route table. 624 * 625 * @syscap SystemCapability.ArkUI.ArkUI.Full 626 * @crossplatform 627 * @atomicservice 628 * @since arkts {'1.1':'12','1.2':'20'} 629 * @arkts 1.1&1.2 630 */ 631 getConfigInRouteMap(): RouteMapConfig | undefined; 632} 633 634/** 635 * Indicates the nested scrollable container components. 636 * 637 * @interface NestedScrollInfo 638 * @syscap SystemCapability.ArkUI.ArkUI.Full 639 * @crossplatform 640 * @atomicservice 641 * @since arkts {'1.1':'14','1.2':'20'} 642 * @arkts 1.1&1.2 643 */ 644declare interface NestedScrollInfo { 645 /** 646 * Controller of the target scrollable container. 647 * 648 * @type { Scroller } 649 * @syscap SystemCapability.ArkUI.ArkUI.Full 650 * @crossplatform 651 * @atomicservice 652 * @since arkts {'1.1':'14','1.2':'20'} 653 * @arkts 1.1&1.2 654 */ 655 parent: Scroller; 656 657 /** 658 * Controller of the scrollable container nested within the target scrollable container. 659 * This scrollable container is a child component of the target scrollable container. 660 * 661 * @type { Scroller } 662 * @syscap SystemCapability.ArkUI.ArkUI.Full 663 * @crossplatform 664 * @atomicservice 665 * @since arkts {'1.1':'14','1.2':'20'} 666 * @arkts 1.1&1.2 667 */ 668 child: Scroller; 669} 670 671/** 672* NavDestination animation protocol. 673* 674* @interface NavDestinationTransition 675* @syscap SystemCapability.ArkUI.ArkUI.Full 676* @crossplatform 677* @atomicservice 678* @since arkts {'1.1':'15','1.2':'20'} 679* @arkts 1.1&1.2 680*/ 681declare interface NavDestinationTransition { 682 /** 683 * Callback triggered when the transition animation ends. 684 * 685 * @type { ?Callback<void> } 686 * @syscap SystemCapability.ArkUI.ArkUI.Full 687 * @crossplatform 688 * @atomicservice 689 * @since arkts {'1.1':'15','1.2':'20'} 690 * @arkts 1.1&1.2 691 */ 692 onTransitionEnd?: Callback<void>; 693 694 /** 695 * Duration of the transition animation. 696 * Default value: **1000** (in milliseconds). 697 * 698 * @type { ?number } 699 * @syscap SystemCapability.ArkUI.ArkUI.Full 700 * @crossplatform 701 * @atomicservice 702 * @since arkts {'1.1':'15','1.2':'20'} 703 * @arkts 1.1&1.2 704 */ 705 duration?: number; 706 707 /** 708 * Curve type of the animation. 709 * Default value: Curve.EaseInOut. 710 * 711 * @type { ?Curve } 712 * @syscap SystemCapability.ArkUI.ArkUI.Full 713 * @crossplatform 714 * @atomicservice 715 * @since arkts {'1.1':'15','1.2':'20'} 716 * @arkts 1.1&1.2 717 */ 718 curve?: Curve; 719 720 /** 721 * Delay of the transition animation. 722 * Default value: **0** (in milliseconds) 723 * 724 * @type { ?number } 725 * @syscap SystemCapability.ArkUI.ArkUI.Full 726 * @crossplatform 727 * @atomicservice 728 * @since arkts {'1.1':'15','1.2':'20'} 729 * @arkts 1.1&1.2 730 */ 731 delay?: number; 732 733 /** 734 * Closure function specifying the transition animation. 735 * The system generates the corresponding transition animation based on the modifications 736 * to the component's UI state within the closure. 737 * 738 * @type { Callback<void> } 739 * @syscap SystemCapability.ArkUI.ArkUI.Full 740 * @crossplatform 741 * @atomicservice 742 * @since arkts {'1.1':'15','1.2':'20'} 743 * @arkts 1.1&1.2 744 */ 745 event: Callback<void>; 746} 747 748/** 749 * The attribute function of NavDestination 750 * 751 * @extends CommonMethod<NavDestinationAttribute> 752 * @syscap SystemCapability.ArkUI.ArkUI.Full 753 * @since 9 754 */ 755/** 756 * The attribute function of NavDestination 757 * 758 * @extends CommonMethod<NavDestinationAttribute> 759 * @syscap SystemCapability.ArkUI.ArkUI.Full 760 * @crossplatform 761 * @since 10 762 */ 763/** 764 * The attribute function of NavDestination 765 * 766 * @extends CommonMethod<NavDestinationAttribute> 767 * @syscap SystemCapability.ArkUI.ArkUI.Full 768 * @crossplatform 769 * @atomicservice 770 * @since arkts {'1.1':'11','1.2':'20'} 771 * @arkts 1.1&1.2 772 */ 773declare class NavDestinationAttribute extends CommonMethod<NavDestinationAttribute> { 774 /** 775 * Navigation title bar 776 * 777 * @param { string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle } value 778 * @returns { NavDestinationAttribute } 779 * @syscap SystemCapability.ArkUI.ArkUI.Full 780 * @since 9 781 */ 782 /** 783 * Navigation title bar 784 * 785 * @param { string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle } value 786 * @returns { NavDestinationAttribute } 787 * @syscap SystemCapability.ArkUI.ArkUI.Full 788 * @crossplatform 789 * @since 10 790 */ 791 /** 792 * Navigation title bar 793 * 794 * @param { string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle } value 795 * @returns { NavDestinationAttribute } 796 * @syscap SystemCapability.ArkUI.ArkUI.Full 797 * @crossplatform 798 * @atomicservice 799 * @since 11 800 */ 801 /** 802 * NavDestination title bar 803 * 804 * @param { string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle } value 805 * @param { NavigationTitleOptions } [options] - Indicates the options of titlebar. 806 * @returns { NavDestinationAttribute } 807 * @syscap SystemCapability.ArkUI.ArkUI.Full 808 * @crossplatform 809 * @atomicservice 810 * @since 12 811 */ 812 /** 813 * Sets the page title. When the NavigationCustomTitle type is used to set the height, 814 * the titleMode attribute does not take effect. 815 * When the title string is too long: (1) If no subtitle is set, the string is scaled down, 816 * wrapped in two lines, and then clipped with an ellipsis (...); (2) If a subtitle is set, 817 * the subtitle is scaled down and then clipped with an ellipsis (...). 818 * 819 * @param { string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource } value 820 * @param { NavigationTitleOptions } [options] - Indicates the options of titlebar. 821 * @returns { NavDestinationAttribute } 822 * @syscap SystemCapability.ArkUI.ArkUI.Full 823 * @crossplatform 824 * @atomicservice 825 * @since arkts {'1.1':'14','1.2':'20'} 826 * @arkts 1.1&1.2 827 */ 828 title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, 829 options?: NavigationTitleOptions): NavDestinationAttribute; 830 831 /** 832 * Hide navigation title bar 833 * 834 * @param { boolean } value 835 * @returns { NavDestinationAttribute } 836 * @syscap SystemCapability.ArkUI.ArkUI.Full 837 * @since 9 838 */ 839 /** 840 * Hide navigation title bar 841 * 842 * @param { boolean } value 843 * @returns { NavDestinationAttribute } 844 * @syscap SystemCapability.ArkUI.ArkUI.Full 845 * @crossplatform 846 * @since 10 847 */ 848 /** 849 * Specifies whether to hide the title bar. 850 * 851 * @param { boolean } value 852 * @returns { NavDestinationAttribute } 853 * @syscap SystemCapability.ArkUI.ArkUI.Full 854 * @crossplatform 855 * @atomicservice 856 * @since arkts {'1.1':'11','1.2':'20'} 857 * @arkts 1.1&1.2 858 */ 859 hideTitleBar(value: boolean): NavDestinationAttribute; 860 861 /** 862 * Sets whether to hide the title bar and whether to animate the visibility change. 863 * 864 * @param { boolean } hide 865 * @param { boolean } animated 866 * @returns { NavDestinationAttribute } 867 * @syscap SystemCapability.ArkUI.ArkUI.Full 868 * @crossplatform 869 * @atomicservice 870 * @since arkts {'1.1':'13','1.2':'20'} 871 * @arkts 1.1&1.2 872 */ 873 hideTitleBar(hide: boolean, animated: boolean): NavDestinationAttribute; 874 875 /** 876 * Sets whether to hide the back button in the title bar. 877 * 878 * @param { Optional<boolean> } hide 879 * @returns { NavDestinationAttribute } 880 * @syscap SystemCapability.ArkUI.ArkUI.Full 881 * @crossplatform 882 * @atomicservice 883 * @since arkts {'1.1':'15','1.2':'20'} 884 * @arkts 1.1&1.2 885 */ 886 hideBackButton(hide: Optional<boolean>): NavDestinationAttribute; 887 888 /** 889 * Called when the navigation destination page is displayed. 890 * 891 * @param { function } callback - Indicates callback when the navDestination page is displayed. 892 * @returns { NavDestinationAttribute } 893 * @syscap SystemCapability.ArkUI.ArkUI.Full 894 * @crossplatform 895 * @since 10 896 */ 897 /** 898 * Called when the navigation destination page is displayed. 899 * 900 * @param { function } callback - Indicates callback when the navDestination page is displayed. 901 * @returns { NavDestinationAttribute } 902 * @syscap SystemCapability.ArkUI.ArkUI.Full 903 * @crossplatform 904 * @atomicservice 905 * @since arkts {'1.1':'11','1.2':'20'} 906 * @arkts 1.1&1.2 907 */ 908 onShown(callback: () => void): NavDestinationAttribute; 909 910 /** 911 * Called when the navigation destination page is hidden. 912 * 913 * @param { function } callback - Indicates callback when the navDestination is hidden. 914 * @returns { NavDestinationAttribute } 915 * @syscap SystemCapability.ArkUI.ArkUI.Full 916 * @crossplatform 917 * @since 10 918 */ 919 /** 920 * Called when the navigation destination page is hidden. 921 * 922 * @param { function } callback - Indicates callback when the navDestination is hidden. 923 * @returns { NavDestinationAttribute } 924 * @syscap SystemCapability.ArkUI.ArkUI.Full 925 * @crossplatform 926 * @atomicservice 927 * @since arkts {'1.1':'11','1.2':'20'} 928 * @arkts 1.1&1.2 929 */ 930 onHidden(callback: () => void): NavDestinationAttribute; 931 932 /** 933 * Called when the navigation destination is about 934 * to be unmounted (or when the transition animation, if any, is about to start). 935 * 936 * @param { function } callback - Indicates callback when the backButton is pressed. 937 * @returns { NavDestinationAttribute } 938 * @syscap SystemCapability.ArkUI.ArkUI.Full 939 * @crossplatform 940 * @since 10 941 */ 942 /** 943 * Called when the navigation destination is about 944 * to be unmounted (or when the transition animation, if any, is about to start). 945 * 946 * @param { function } callback - Indicates callback when the backButton is pressed. 947 * @returns { NavDestinationAttribute } 948 * @syscap SystemCapability.ArkUI.ArkUI.Full 949 * @crossplatform 950 * @atomicservice 951 * @since arkts {'1.1':'11','1.2':'20'} 952 * @arkts 1.1&1.2 953 */ 954 onBackPressed(callback: () => boolean): NavDestinationAttribute; 955 956 /** 957 * Triggered when popping back from other NavDestination. 958 * 959 * @param {Optional<Callback<ESObject>>} callback - Indicates callback when pop to the navDestination with result. 960 * @returns {NavDestinationAttribute} 961 * @syscap SystemCapability.ArkUI.ArkUI.Full 962 * @crossplatform 963 * @atomicservice 964 * @since 15 965 */ 966 onResult(callback: Optional<Callback<ESObject>>): NavDestinationAttribute; 967 968 /** 969 * Sets the mode of the **NavDestination** component. Dynamic modification is not supported. 970 * 971 * @param { NavDestinationMode } value - Mode of the **NavDestination** component. 972 * <br>Default value: **NavDestinationMode.STANDARD**. 973 * @returns { NavDestinationAttribute } 974 * @syscap SystemCapability.ArkUI.ArkUI.Full 975 * @crossplatform 976 * @since 11 977 */ 978 /** 979 * Sets the mode of the **NavDestination** component. Dynamic modification is not supported. 980 * 981 * @param { NavDestinationMode } value - NavDestinationMode 982 * @returns { NavDestinationAttribute } 983 * @syscap SystemCapability.ArkUI.ArkUI.Full 984 * @crossplatform 985 * @atomicservice 986 * @since arkts {'1.1':'12','1.2':'20'} 987 * @arkts 1.1&1.2 988 */ 989 mode(value: NavDestinationMode): NavDestinationAttribute; 990 991 /** 992 * Sets the icon of the back button on the title bar. 993 * 994 * @param { ResourceStr | PixelMap } value - Icon of the back button in the title bar. 995 * @returns { NavDestinationAttribute } 996 * @syscap SystemCapability.ArkUI.ArkUI.Full 997 * @crossplatform 998 * @since 11 999 */ 1000 /** 1001 * Sets the icon of the back button on the title bar. 1002 * 1003 * <p>**NOTE**: 1004 * <br>The following are not allowed: modify the icon size through the **fontSize** attribute of the 1005 * **SymbolGlyphModifier** object, change the animation effects through the **effectStrategy** attribute, 1006 * or change the type of animation effects through the **symbolEffect** attribute. 1007 * </p> 1008 * 1009 * @param { ResourceStr | PixelMap | SymbolGlyphModifier } value - Icon of the back button in the title bar. 1010 * @returns { NavDestinationAttribute } 1011 * @syscap SystemCapability.ArkUI.ArkUI.Full 1012 * @crossplatform 1013 * @atomicservice 1014 * @since arkts {'1.1':'12','1.2':'20'} 1015 * @arkts 1.1&1.2 1016 */ 1017 backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): NavDestinationAttribute; 1018 1019 /** 1020 * Sets the icon and accessibility text for the back button on the title bar. 1021 * 1022 * <p>**NOTE**: 1023 * <br>The following are not allowed: modify the icon size through the **fontSize** attribute of the 1024 * **SymbolGlyphModifier** object, change the animation effects through the **effectStrategy** attribute, 1025 * or change the type of animation effects through the **symbolEffect** attribute. 1026 * </p> 1027 * 1028 * @param { ResourceStr | PixelMap | SymbolGlyphModifier } icon - Icon of the back button on the title bar. 1029 * @param { ResourceStr } [accessibilityText] - Accessibility text for the back button. 1030 * <br>Default value: **back** when the system language is English. 1031 * @returns { NavDestinationAttribute } 1032 * @syscap SystemCapability.ArkUI.ArkUI.Full 1033 * @crossplatform 1034 * @atomicservice 1035 * @since arkts {'1.1':'19','1.2':'20'} 1036 * @arkts 1.1&1.2 1037 */ 1038 backButtonIcon(icon: ResourceStr | PixelMap | SymbolGlyphModifier, accessibilityText?: ResourceStr): NavDestinationAttribute; 1039 1040 /** 1041 * Sets the menu items in the upper right corner of the page. 1042 * If this attribute is not set, no menu item is displayed. 1043 * When the value type is Array<NavigationMenuItem>, 1044 * the menu shows a maximum of three icons in portrait mode and a maximum of five icons in landscape mode, 1045 * with excess icons (if any) placed under the automatically generated **More** icon. 1046 * 1047 * <p>**NOTE**: 1048 * <br>he following are not allowed: modify the icon size through the **fontSize** attribute of 1049 * the **SymbolGlyphModifier** object, change the animation effects through the **effectStrategy** attribute, 1050 * or change the type of animation effects through the **symbolEffect** attribute. 1051 * </p> 1052 * @param { Array<NavigationMenuItem> | CustomBuilder } value - Menu items in the upper right corner of the NavDestination. 1053 * @returns { NavDestinationAttribute } 1054 * @syscap SystemCapability.ArkUI.ArkUI.Full 1055 * @crossplatform 1056 * @atomicservice 1057 * @since arkts {'1.1':'12','1.2':'20'} 1058 * @arkts 1.1&1.2 1059 */ 1060 menus(value: Array<NavigationMenuItem> | CustomBuilder): NavDestinationAttribute; 1061 1062 /** 1063 * NavDestination title bar's menus 1064 * 1065 * @param { Array<NavigationMenuItem> | CustomBuilder } items 1066 * @param { NavigationMenuOptions } [options] - Indicates the options of menu. 1067 * @returns { NavDestinationAttribute } 1068 * @syscap SystemCapability.ArkUI.ArkUI.Full 1069 * @crossplatform 1070 * @atomicservice 1071 * @since arkts {'1.1':'19','1.2':'20'} 1072 * @arkts 1.1&1.2 1073 */ 1074 menus(items: Array<NavigationMenuItem> | CustomBuilder, options?: NavigationMenuOptions): NavDestinationAttribute; 1075 1076 /** 1077 * Sets the content of the toolbar. If this API is not called, the toolbar remains hidden. 1078 * 1079 * @param { Array<ToolbarItem> | CustomBuilder } toolbarParam - Content of the toolbar. 1080 * <br>When configured with Array<ToolbarItem>, 1081 * the toolbar follows the rules below:<br>- Toolbar items are evenly distributed on the bottom toolbar, 1082 * with text and icons evenly spaced in each content area.<br>- If any item contains overlong text and 1083 * there are fewer than five items, the toolbar will: 1. Increase the item width to accommodate the text 1084 * until the toolbar spans the screen width; 2. Reduce the text size progressively; 3. Wrap the text over two lines; 1085 * 4. Clip the text with an ellipsis (...).<br>- In portrait mode, the toolbar shows a maximum of five icons, 1086 * with any additional icons placed under an automatically generated **More** icon. In landscape mode, 1087 * the behavior of the toolbar is determined by the display mode: (1) If the display mode is 1088 * Split, the toolbar follows the same rules as in portrait mode. (2) If the display mode is Stack, 1089 * the toolbar must be used together with Array<NavigationMenuItem> of the **menus** attribute; 1090 * in this configuration, the bottom toolbar is automatically hidden, and all items on the toolbar are relocated to 1091 * the menu in the upper right corner of the screen.<br>When configured with CustomBuilder, the toolbar does not 1092 * follow the above rules, except for evenly distributing items at the bottom of the toolbar. 1093 * 1094 * @param { NavigationToolbarOptions } [options] - Indicates the options of toolbar. 1095 * @returns { NavDestinationAttribute } 1096 * @syscap SystemCapability.ArkUI.ArkUI.Full 1097 * @crossplatform 1098 * @atomicservice 1099 * @since arkts {'1.1':'13','1.2':'20'} 1100 * @arkts 1.1&1.2 1101 */ 1102 toolbarConfiguration(toolbarParam: Array<ToolbarItem> | CustomBuilder, options?: NavigationToolbarOptions): NavDestinationAttribute; 1103 1104 /** 1105 * Sets whether to hide the toolbar and whether to animate the visibility change. 1106 * 1107 * @param { boolean } hide - Whether to hide the toolbar. 1108 * Default value: **false**. 1109 * **true**: Hide the toolbar. 1110 * **false**: Show the toolbar. 1111 * @param { boolean } [animated] - Whether to animate the visibility change. 1112 * Default value: **false** 1113 * **true**: Animate the visibility change. 1114 * **false**: Do not animate the visibility change. 1115 * @returns { NavDestinationAttribute } 1116 * @syscap SystemCapability.ArkUI.ArkUI.Full 1117 * @crossplatform 1118 * @atomicservice 1119 * @since arkts {'1.1':'13','1.2':'20'} 1120 * @arkts 1.1&1.2 1121 */ 1122 hideToolBar(hide: boolean, animated?: boolean): NavDestinationAttribute; 1123 1124 /** 1125 * Called when the **NavDestination** component is about to build a child component. 1126 * 1127 * @param { import('../api/@ohos.base').Callback<NavDestinationContext> } callback 1128 * - Indicates callback that invoked before sub-components of NavDestination are created. 1129 * @returns { NavDestinationAttribute } 1130 * @syscap SystemCapability.ArkUI.ArkUI.Full 1131 * @crossplatform 1132 * @atomicservice 1133 * @since 11 1134 */ 1135 onReady(callback: import('../api/@ohos.base').Callback<NavDestinationContext>): NavDestinationAttribute; 1136 1137 /** 1138 * Invoked before sub-components of NavDestination are created. 1139 * 1140 * @param { Callback<NavDestinationContext> } callback 1141 * - Indicates callback that invoked before sub-components of NavDestination are created. 1142 * @returns { NavDestinationAttribute } 1143 * @syscap SystemCapability.ArkUI.ArkUI.Full 1144 * @crossplatform 1145 * @atomicservice 1146 * @since 20 1147 * @arkts 1.2 1148 */ 1149 onReady(callback: Callback<NavDestinationContext>): NavDestinationAttribute; 1150 1151 /** 1152 * Called when the navigation destination is about to be mounted. 1153 * You can change the navigation stack in this callback function, and the change takes effect in the current frame. 1154 * 1155 * @param { Callback<void> } callback - Indicates callback before the navDestination is appeared. 1156 * @returns { NavDestinationAttribute } 1157 * @syscap SystemCapability.ArkUI.ArkUI.Full 1158 * @crossplatform 1159 * @atomicservice 1160 * @since arkts {'1.1':'12','1.2':'20'} 1161 * @arkts 1.1&1.2 1162 */ 1163 onWillAppear(callback: Callback<void>): NavDestinationAttribute; 1164 1165 /** 1166 * Called when the navigation destination is about to be unmounted (or when the transition animation, 1167 * if any, is about to start). 1168 * 1169 * @param { Callback<void> } callback - Indicates callback before the navDestination is disappeared. 1170 * @returns { NavDestinationAttribute } 1171 * @syscap SystemCapability.ArkUI.ArkUI.Full 1172 * @crossplatform 1173 * @atomicservice 1174 * @since arkts {'1.1':'12','1.2':'20'} 1175 * @arkts 1.1&1.2 1176 */ 1177 onWillDisappear(callback: Callback<void>): NavDestinationAttribute; 1178 1179 /** 1180 * Called when the navigation destination is about to be displayed. 1181 * 1182 * @param { Callback<void> } callback - Indicates callback before the navDestination is displayed. 1183 * @returns { NavDestinationAttribute } 1184 * @syscap SystemCapability.ArkUI.ArkUI.Full 1185 * @crossplatform 1186 * @atomicservice 1187 * @since arkts {'1.1':'12','1.2':'20'} 1188 * @arkts 1.1&1.2 1189 */ 1190 onWillShow(callback: Callback<void>): NavDestinationAttribute; 1191 1192 /** 1193 * Called when the navigation destination is about to be hidden. 1194 * 1195 * @param { Callback<void> } callback - Indicates callback before the navDestination is hidden. 1196 * @returns { NavDestinationAttribute } 1197 * @syscap SystemCapability.ArkUI.ArkUI.Full 1198 * @crossplatform 1199 * @atomicservice 1200 * @since arkts {'1.1':'12','1.2':'20'} 1201 * @arkts 1.1&1.2 1202 */ 1203 onWillHide(callback: Callback<void>): NavDestinationAttribute; 1204 1205 /** 1206 * Ignores the layout safe area by allowing the component to extend into the non-safe areas of the screen. 1207 * 1208 * @param { Array<LayoutSafeAreaType> } [types] - ypes of non-safe areas to extend into. 1209 * Default value:<br>[LayoutSafeAreaType.SYSTEM]. 1210 * @param { Array<LayoutSafeAreaEdge> } [edges] - Edges for expanding the safe area. 1211 * Default value:<br>[LayoutSafeAreaEdge.TOP, LayoutSafeAreaEdge.BOTTOM]. 1212 * @returns { NavDestinationAttribute } 1213 * @syscap SystemCapability.ArkUI.ArkUI.Full 1214 * @crossplatform 1215 * @atomicservice 1216 * @since arkts {'1.1':'12','1.2':'20'} 1217 * @arkts 1.1&1.2 1218 */ 1219 ignoreLayoutSafeArea(types?: Array<LayoutSafeAreaType>, edges?: Array<LayoutSafeAreaEdge>): NavDestinationAttribute; 1220 1221 /** 1222 * Sets the style of the system status bar 1223 * when this **NavDestination** page is displayed in the **Navigation** component. 1224 * 1225 * <p>**NOTE**: 1226 * <br>1. The setting takes effect only when the **NavDestination** component is used 1227 * in conjunction with the **Navigation** component. 1228 * <br>2. For other usage restrictions, see the description of systemBarStylefor the **Navigation** component. 1229 * </p> 1230 * @param { Optional<SystemBarStyle> } style - Style of the system status bar. 1231 * @returns { NavDestinationAttribute } 1232 * @syscap SystemCapability.ArkUI.ArkUI.Full 1233 * @atomicservice 1234 * @since arkts {'1.1':'12','1.2':'20'} 1235 * @arkts 1.1&1.2 1236 */ 1237 systemBarStyle(style: Optional<SystemBarStyle>): NavDestinationAttribute; 1238 1239 /** 1240 * Sets whether the **NavDestination** component is recoverable. 1241 * If set to recoverable, when the application process exits unexpectedly and restarts, 1242 * the **NavDestination** component will be automatically recreated. To use this feature, 1243 * ensure that the **recoverable** attribute is set for the **Navigation** component associated 1244 * with the **NavDestination** component. 1245 * 1246 * <p>**NOTE**: 1247 * <br>This API must be used together with 1248 * the recoverable API of **Navigation**. 1249 * </p> 1250 * @param { boolean } recoverable - Whether the **NavDestination** component is recoverable. 1251 * By default, it is not recoverable. 1252 * Default value: **false**. 1253 * **true**: The **NavDestination** component is recoverable. 1254 * **false**: The **NavDestination** component is not recoverable. 1255 * @returns { NavDestinationAttribute } 1256 * @syscap SystemCapability.ArkUI.ArkUI.Full 1257 * @since arkts {'1.1':'14','1.2':'20'} 1258 * @arkts 1.1&1.2 1259 */ 1260 recoverable(recoverable: Optional<boolean>): NavDestinationAttribute; 1261 1262 /** 1263 * Sets the system transition animation of the **NavDestination** component. 1264 * System transition animations for the title bar and content area can be configured separately. 1265 * 1266 * @param { NavigationSystemTransitionType } type - Type of the system transition animation. 1267 * Default value: **NavigationSystemTransitionType.DEFAULT**. 1268 * @returns { NavDestinationAttribute } 1269 * @syscap SystemCapability.ArkUI.ArkUI.Full 1270 * @crossplatform 1271 * @atomicservice 1272 * @since arkts {'1.1':'14','1.2':'20'} 1273 * @arkts 1.1&1.2 1274 */ 1275 systemTransition(type: NavigationSystemTransitionType): NavDestinationAttribute; 1276 1277 /** 1278 * Binds the **NavDestination** component with a scrollable container, which can be a List, Scroll, 1279 * or WaterFlow component. This way, scrolling in the scrollable container triggers 1280 * the display and hide animations of the title bar and toolbar of all **NavDestination** components that are bound 1281 * to it – scrolling up triggers the hide animation, and scrolling down triggers the show animation. 1282 * A single **NavDestination** component can be bound to multiple scrollable containers, 1283 * and a single scrollable container can be bound to multiple **NavDestination** components. 1284 * 1285 * <p>**NOTE**: 1286 * <br>The connection between the scrolling actions and the animations for showing or hiding the title bar 1287 * and toolbar of the **NavDestination** component takes effect only when the title bar or toolbar is visible. 1288 * If a **NavDestination** component is bound to multiple scrollable containers, scrolling in any of these containers 1289 * triggers the display or hiding animations of the title bar and toolbar. Specifically, when any scrollable 1290 * container reaches either the bottom or the top, the display animation for the title bar and 1291 * toolbar is triggered without delay. As such, to ensure the optimal user experience, 1292 * avoid triggering scroll events of multiple scrollable containers simultaneously. 1293 * </p> 1294 * 1295 * @param { Array<Scroller> } scrollers - Controller of the target scrollable container. 1296 * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. 1297 * @syscap SystemCapability.ArkUI.ArkUI.Full 1298 * @crossplatform 1299 * @atomicservice 1300 * @since arkts {'1.1':'14','1.2':'20'} 1301 * @arkts 1.1&1.2 1302 */ 1303 bindToScrollable(scrollers: Array<Scroller>): NavDestinationAttribute; 1304 1305 /** 1306 * Binds the **NavDestination** component with a nested scrollable container, 1307 * which can be a List, Scroll, Grid, or WaterFlow component. This way, scrolling in the scrollable container 1308 * triggers the display and hide animations of the title bar and toolbar of all **NavDestination** components that 1309 * are bound to it – scrolling up triggers the hide animation, and scrolling down triggers the show animation. 1310 * A single **NavDestination** component can be bound to multiple nested scrollable containers, and a single nested 1311 * scrollable container can be bound to multiple **NavDestination** components. 1312 * 1313 * <p>**NOTE**: 1314 * The connection between the scrolling actions and the animations for showing or hiding the title bar 1315 * <br>and toolbar of the **NavDestination** component takes effect only when the title bar or toolbar is visible. 1316 * If a **NavDestination** component is bound to multiple scrollable containers, scrolling in any of these containers 1317 * <br>triggers the display or hiding animations of the title bar and toolbar. Specifically, when any scrollable 1318 * <br>container reaches either the bottom or the top, the display animation for the title bar and 1319 * <br>toolbar is triggered without delay. As such, to ensure the optimal user experience, 1320 * <br>avoid triggering scroll events of multiple scrollable containers simultaneously. 1321 * </p> 1322 * 1323 * @param { Array<NestedScrollInfo> } scrollInfos - Controller of the target nested scrollable containers. 1324 1325 * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. 1326 * @syscap SystemCapability.ArkUI.ArkUI.Full 1327 * @crossplatform 1328 * @atomicservice 1329 * @since arkts {'1.1':'14','1.2':'20'} 1330 * @arkts 1.1&1.2 1331 */ 1332 bindToNestedScrollable(scrollInfos: Array<NestedScrollInfo>): NavDestinationAttribute; 1333 1334 /** 1335 * Triggered when the **NavDestination** component becomes active (on top of the stack and operable, 1336 * with no special components blocking it). 1337 * 1338 * @param { Optional<Callback<NavDestinationActiveReason>> } callback - Reason why the **NavDestination** component 1339 * switches from inactive to active. 1340 * @returns { NavDestinationAttribute } 1341 * @syscap SystemCapability.ArkUI.ArkUI.Full 1342 * @crossplatform 1343 * @atomicservice 1344 * @since arkts {'1.1':'17','1.2':'20'} 1345 * @arkts 1.1&1.2 1346 */ 1347 onActive(callback: Optional<Callback<NavDestinationActiveReason>>): NavDestinationAttribute; 1348 1349 /** 1350 * Triggered when **NavDestination** component becomes inactive 1351 * (not on top of the stack and inoperable, or on top but blocked by special components). 1352 * 1353 * @param { Optional<Callback<NavDestinationActiveReason>> } callback - Reason why the **NavDestination** component 1354 * switches from active to inactive. 1355 * @returns { NavDestinationAttribute } 1356 * @syscap SystemCapability.ArkUI.ArkUI.Full 1357 * @crossplatform 1358 * @atomicservice 1359 * @since arkts {'1.1':'17','1.2':'20'} 1360 * @arkts 1.1&1.2 1361 */ 1362 onInactive(callback: Optional<Callback<NavDestinationActiveReason>>): NavDestinationAttribute; 1363 1364 /** 1365 * Sets a custom transition animation for the **NavDestination** component. 1366 * 1367 * <p>**NOTE**: 1368 * <br>If both this attribute and systemTransition are set, whichever is set later takes effect. 1369 * </p> 1370 * @param { NavDestinationTransitionDelegate } delegate - Delegate function for custom animations of 1371 * the **NavDestination** component. 1372 * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. 1373 * @syscap SystemCapability.ArkUI.ArkUI.Full 1374 * @crossplatform 1375 * @atomicservice 1376 * @since arkts {'1.1':'15','1.2':'20'} 1377 * @arkts 1.1&1.2 1378 */ 1379 customTransition(delegate: NavDestinationTransitionDelegate): NavDestinationAttribute; 1380 1381 /** 1382 * Triggered when a **NavDestination** page that already exists in the stack is moved to the top using 1383 * launchMode.MOVE_TO_TOP_SINGLETON or launchMode.POP_TO_SINGLETON. 1384 * 1385 * <p>**NOTE**: 1386 * <br>This callback is not triggered by replacePath or replaceDestination. 1387 * </p> 1388 * @param { Optional<Callback<ESObject>> } callback - Callback triggered by **onNewParam**, with the parameter 1389 * being the data passed to the target page during navigation. 1390 * @returns { NavDestinationAttribute } 1391 * @syscap SystemCapability.ArkUI.ArkUI.Full 1392 * @crossplatform 1393 * @atomicservice 1394 * @since 19 1395 */ 1396 onNewParam(callback: Optional<Callback<ESObject>>): NavDestinationAttribute; 1397 1398 /** 1399 * Invoked when destination be pushed with singleton mode. 1400 * 1401 * @param { Optional<Callback<Object | null | undefined>> } callback - Indicates callback when destination be pushed with singleton mode. 1402 * @returns { NavDestinationAttribute } 1403 * @syscap SystemCapability.ArkUI.ArkUI.Full 1404 * @crossplatform 1405 * @atomicservice 1406 * @since 20 1407 * @arkts 1.2 1408 */ 1409 onNewParam(callback: Optional<Callback<Object | null | undefined>>): NavDestinationAttribute; 1410 1411 /** 1412 * Sets the display orientation for the **NavDestination** component. After the transition to the NavDestination, 1413 * the system also switches the application's main window to the specified display orientation. 1414 * 1415 * <p>**NOTE**: 1416 * <br>This attribute is effective only if the following conditions are all met: 1417 * <br>1. The **NavDestination** component belongs to the application's main window page, 1418 * and the main window is a full-screen window. 1419 * <br>2. The size of the **Navigation** container to which the **NavDestination** component belongs occupies 1420 * the entire application page. 1421 * <br>3. The type of **NavDestination** is STANDARD. 1422 * The actual effect of setting the display orientation depends on the specific device support. 1423 * </p> 1424 * 1425 * @param { Optional<Orientation> } orientation - Display orientation to set. 1426 * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. 1427 * @syscap SystemCapability.ArkUI.ArkUI.Full 1428 * @crossplatform 1429 * @atomicservice 1430 * @since arkts {'1.1':'19','1.2':'20'} 1431 * @arkts 1.1&1.2 1432 */ 1433 preferredOrientation(orientation: Optional<Orientation>): NavDestinationAttribute; 1434 1435 /** 1436 * Sets whether to show or hide the system status bar when entering this **NavDestination** component. 1437 * 1438 * <p>**NOTE**: 1439 * <br>This attribute is effective only if the following conditions are all met: 1440 * <br>1. The **NavDestination** component belongs to the application's main window page, and the main window is a 1441 * full-screen window. 1442 * <br>2. The size of the **Navigation** container to which the **NavDestination** component belongs 1443 * occupies the entire application page. 1444 * <br>3. The size of the **NavDestination** component occupies the entire **Navigation** container. 1445 * <br>4. The type of **NavDestination** is STANDARD. 1446 * The actual effect of setting the system status bar depends on the specific device support. 1447 * </p> 1448 * @param { Optional<boolean> } enabled - Whether to show or hide the system status bar when entering the current 1449 * <br>**NavDestination** component. 1450 * @param { boolean } [animated] - Whether to use an animation to show or hide the system status bar. 1451 * <br>Default value: **false**. 1452 * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. 1453 * @syscap SystemCapability.ArkUI.ArkUI.Full 1454 * @crossplatform 1455 * @atomicservice 1456 * @since arkts {'1.1':'19','1.2':'20'} 1457 * @arkts 1.1&1.2 1458 */ 1459 enableStatusBar(enabled: Optional<boolean>, animated?: boolean): NavDestinationAttribute; 1460 1461 /** 1462 * Sets whether to show or hide the system navigation bar when entering this **NavDestination** component. 1463 * 1464 * <p>**NOTE** 1465 * This attribute is effective only if the following conditions are all met: 1466 * 1. The **NavDestination** component belongs to the application's main window page, 1467 * <br>and the main window is a full-screen window. 1468 * 2. The size of the **Navigation** container to which the **NavDestination** component 1469 * <br>belongs occupies the entire application page. 1470 * 3. The size of the **NavDestination** component occupies the entire **Navigation** container. 1471 * 4. The type of **NavDestination** is STANDARD. 1472 * The actual effect of setting the system navigation bar depends on the specific device support. 1473 * </p> 1474 * @param { Optional<boolean> } enabled - Whether to show or hide the system navigation bar 1475 * when entering the current **NavDestination** component. 1476 * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. 1477 * @syscap SystemCapability.ArkUI.ArkUI.Full 1478 * @crossplatform 1479 * @atomicservice 1480 * @since arkts {'1.1':'19','1.2':'20'} 1481 * @arkts 1.1&1.2 1482 */ 1483 enableNavigationIndicator(enabled: Optional<boolean>): NavDestinationAttribute; 1484} 1485 1486/** 1487 * Defines NavDestination Component. 1488 * 1489 * @syscap SystemCapability.ArkUI.ArkUI.Full 1490 * @since 9 1491 */ 1492/** 1493 * Defines NavDestination Component. 1494 * 1495 * @syscap SystemCapability.ArkUI.ArkUI.Full 1496 * @crossplatform 1497 * @since 10 1498 */ 1499/** 1500 * Defines NavDestination Component. 1501 * 1502 * @syscap SystemCapability.ArkUI.ArkUI.Full 1503 * @crossplatform 1504 * @atomicservice 1505 * @since 11 1506 */ 1507declare const NavDestination: NavDestinationInterface; 1508 1509/** 1510 * Defines NavDestination Component instance. 1511 * 1512 * @syscap SystemCapability.ArkUI.ArkUI.Full 1513 * @since 9 1514 */ 1515/** 1516 * Defines NavDestination Component instance. 1517 * 1518 * @syscap SystemCapability.ArkUI.ArkUI.Full 1519 * @crossplatform 1520 * @since 10 1521 */ 1522/** 1523 * Defines NavDestination Component instance. 1524 * 1525 * @syscap SystemCapability.ArkUI.ArkUI.Full 1526 * @crossplatform 1527 * @atomicservice 1528 * @since 11 1529 */ 1530declare const NavDestinationInstance: NavDestinationAttribute; 1531 1532/** 1533 * Defines the delegate function for custom transition animations of the **NavDestination** component. 1534 * 1535 * @typedef { function } NavDestinationTransitionDelegate 1536 * @param { NavigationOperation } operation - Type of navigation operation for the current page transition. 1537 * @param { boolean } isEnter - Whether the current page is an entry page. 1538 * <br>**true**: The current page is an entry page. 1539 * <br>**false**: The current page is not an entry page. 1540 * @returns { Array<NavDestinationTransition> | undefined } Array of custom animations for the **NavDestination** page. 1541 * <br>If **undefined** is returned, the default system animation is used. 1542 * @syscap SystemCapability.ArkUI.ArkUI.Full 1543 * @crossplatform 1544 * @atomicservice 1545 * @since arkts {'1.1':'15','1.2':'20'} 1546 * @arkts 1.1&1.2 1547 */ 1548declare type NavDestinationTransitionDelegate = 1549 (operation: NavigationOperation, isEnter: boolean) => Array<NavDestinationTransition> | undefined;