@ni/nimble-angular 33.4.7 → 33.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,15 +1,14 @@
1
+ import { RouterLink, Router, ActivatedRoute } from '@angular/router';
1
2
  import * as i0 from '@angular/core';
2
- import { OnChanges, OnDestroy, Renderer2, ElementRef, SimpleChanges, EventEmitter, AfterViewChecked, AfterViewInit, OnInit, Injector } from '@angular/core';
3
- import * as i2 from '@angular/common';
4
- import { LocationStrategy } from '@angular/common';
5
- import { Subject } from 'rxjs';
6
- import { Params, QueryParamsHandling, ActivatedRoute, Router, UrlTree } from '@angular/router';
3
+ import { Renderer2, ElementRef, EventEmitter, AfterViewChecked, AfterViewInit, OnDestroy, OnInit, Injector } from '@angular/core';
7
4
  import { Anchor } from '@ni/nimble-components/dist/esm/anchor';
8
5
  export { Anchor, anchorTag } from '@ni/nimble-components/dist/esm/anchor';
9
6
  import { AnchorAppearance } from '@ni/nimble-components/dist/esm/anchor/types';
10
7
  export { AnchorAppearance } from '@ni/nimble-components/dist/esm/anchor/types';
11
8
  import { BooleanValueOrAttribute, NumberValueOrAttribute } from '@ni/nimble-angular/internal-utilities';
12
9
  import { AnchorBase } from '@ni/nimble-components/dist/esm/anchor-base';
10
+ import * as i2 from '@angular/common';
11
+ import { LocationStrategy } from '@angular/common';
13
12
  import { AnchorButton } from '@ni/nimble-components/dist/esm/anchor-button';
14
13
  export { AnchorButton, anchorButtonTag } from '@ni/nimble-components/dist/esm/anchor-button';
15
14
  import { ButtonAppearance, ButtonAppearanceVariant } from '@ni/nimble-components/dist/esm/anchor-button/types';
@@ -356,249 +355,6 @@ export { TabsToolbar, tabsToolbarTag } from '@ni/nimble-components/dist/esm/tabs
356
355
  export { Toolbar, toolbarTag } from '@ni/nimble-components/dist/esm/toolbar';
357
356
  export { processUpdates } from '@ni/nimble-components/dist/esm/testing/async-helpers';
358
357
 
359
- /**
360
- * @description
361
- *
362
- * When applied to an element in a template, makes that element a link
363
- * that initiates navigation to a route. Navigation opens one or more routed components
364
- * in one or more `<router-outlet>` locations on the page.
365
- *
366
- * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,
367
- * the following creates a static link to the route:
368
- * `<a routerLink="/user/bob">link to user component</a>`
369
- *
370
- * You can use dynamic values to generate the link.
371
- * For a dynamic link, pass an array of path segments,
372
- * followed by the params for each segment.
373
- * For example, `['/team', teamId, 'user', userName, {details: true}]`
374
- * generates a link to `/team/11/user/bob;details=true`.
375
- *
376
- * Multiple static segments can be merged into one term and combined with dynamic segments.
377
- * For example, `['/team/11/user', userName, {details: true}]`
378
- *
379
- * The input that you provide to the link is treated as a delta to the current URL.
380
- * For instance, suppose the current URL is `/user/(box//aux:team)`.
381
- * The link `<a [routerLink]="['/user/jim']">Jim</a>` creates the URL
382
- * `/user/(jim//aux:team)`.
383
- * See {@link Router#createUrlTree} for more information.
384
- *
385
- * @usageNotes
386
- *
387
- * You can use absolute or relative paths in a link, set query parameters,
388
- * control how parameters are handled, and keep a history of navigation states.
389
- *
390
- * ### Relative link paths
391
- *
392
- * The first segment name can be prepended with `/`, `./`, or `../`.
393
- * * If the first segment begins with `/`, the router looks up the route from the root of the
394
- * app.
395
- * * If the first segment begins with `./`, or doesn't begin with a slash, the router
396
- * looks in the children of the current activated route.
397
- * * If the first segment begins with `../`, the router goes up one level in the route tree.
398
- *
399
- * ### Setting and handling query params and fragments
400
- *
401
- * The following link adds a query parameter and a fragment to the generated URL:
402
- *
403
- * ```html
404
- * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" fragment="education">
405
- * link to user component
406
- * </a>
407
- * ```
408
- * By default, the directive constructs the new URL using the given query parameters.
409
- * The example generates the link: `/user/bob?debug=true#education`.
410
- *
411
- * You can instruct the directive to handle query parameters differently
412
- * by specifying the `queryParamsHandling` option in the link.
413
- * Allowed values are:
414
- *
415
- * - `'merge'`: Merge the given `queryParams` into the current query params.
416
- * - `'preserve'`: Preserve the current query params.
417
- *
418
- * For example:
419
- *
420
- * ```html
421
- * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" queryParamsHandling="merge">
422
- * link to user component
423
- * </a>
424
- * ```
425
- *
426
- * `queryParams`, `fragment`, `queryParamsHandling`, `preserveFragment`, and `relativeTo`
427
- * cannot be used when the `routerLink` input is a `UrlTree`.
428
- *
429
- * See {@link UrlCreationOptions#queryParamsHandling}.
430
- *
431
- * ### Preserving navigation history
432
- *
433
- * You can provide a `state` value to be persisted to the browser's
434
- * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).
435
- * For example:
436
- *
437
- * ```html
438
- * <a [routerLink]="['/user/bob']" [state]="{tracingId: 123}">
439
- * link to user component
440
- * </a>
441
- * ```
442
- *
443
- * Use {@link Router#getCurrentNavigation} to retrieve a saved
444
- * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`
445
- * event:
446
- *
447
- * ```ts
448
- * // Get NavigationStart events
449
- * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {
450
- * const navigation = router.getCurrentNavigation();
451
- * tracingService.trace({id: navigation.extras.state.tracingId});
452
- * });
453
- * ```
454
- *
455
- * ### RouterLink compatible custom elements
456
- *
457
- * In order to make a custom element work with routerLink, the corresponding custom
458
- * element must implement the `href` attribute and must list `href` in the array of
459
- * the static property/getter `observedAttributes`.
460
- *
461
- * @ngModule RouterModule
462
- *
463
- * @publicApi
464
- */
465
- declare class RouterLink implements OnChanges, OnDestroy {
466
- private router;
467
- private route;
468
- private readonly tabIndexAttribute;
469
- private readonly renderer;
470
- private readonly el;
471
- private locationStrategy?;
472
- /** @nodoc */
473
- protected readonly reactiveHref: i0.WritableSignal<string | null>;
474
- /**
475
- * Represents an `href` attribute value applied to a host element,
476
- * when a host element is an `<a>`/`<area>` tag or a compatible custom element.
477
- * For other tags, the value is `null`.
478
- */
479
- href: string | null;
480
- /**
481
- * Represents the `target` attribute on a host element.
482
- * This is only used when the host element is
483
- * an `<a>`/`<area>` tag or a compatible custom element.
484
- */
485
- target?: string;
486
- /**
487
- * Passed to {@link Router#createUrlTree} as part of the
488
- * `UrlCreationOptions`.
489
- * @see {@link UrlCreationOptions#queryParams}
490
- * @see {@link Router#createUrlTree}
491
- */
492
- queryParams?: Params | null;
493
- /**
494
- * Passed to {@link Router#createUrlTree} as part of the
495
- * `UrlCreationOptions`.
496
- * @see {@link UrlCreationOptions#fragment}
497
- * @see {@link Router#createUrlTree}
498
- */
499
- fragment?: string;
500
- /**
501
- * Passed to {@link Router#createUrlTree} as part of the
502
- * `UrlCreationOptions`.
503
- * @see {@link UrlCreationOptions#queryParamsHandling}
504
- * @see {@link Router#createUrlTree}
505
- */
506
- queryParamsHandling?: QueryParamsHandling | null;
507
- /**
508
- * Passed to {@link Router#navigateByUrl} as part of the
509
- * `NavigationBehaviorOptions`.
510
- * @see {@link NavigationBehaviorOptions#state}
511
- * @see {@link Router#navigateByUrl}
512
- */
513
- state?: {
514
- [k: string]: any;
515
- };
516
- /**
517
- * Passed to {@link Router#navigateByUrl} as part of the
518
- * `NavigationBehaviorOptions`.
519
- * @see {@link NavigationBehaviorOptions#info}
520
- * @see {@link Router#navigateByUrl}
521
- */
522
- info?: unknown;
523
- /**
524
- * Passed to {@link Router#createUrlTree} as part of the
525
- * `UrlCreationOptions`.
526
- * Specify a value here when you do not want to use the default value
527
- * for `routerLink`, which is the current activated route.
528
- * Note that a value of `undefined` here will use the `routerLink` default.
529
- * @see {@link UrlCreationOptions#relativeTo}
530
- * @see {@link Router#createUrlTree}
531
- */
532
- relativeTo?: ActivatedRoute | null;
533
- /** Whether a host element is an `<a>`/`<area>` tag or a compatible custom element. */
534
- private isAnchorElement;
535
- private subscription?;
536
- /** @internal */
537
- onChanges: Subject<RouterLink>;
538
- private readonly applicationErrorHandler;
539
- private readonly options;
540
- constructor(router: Router, route: ActivatedRoute, tabIndexAttribute: string | null | undefined, renderer: Renderer2, el: ElementRef, locationStrategy?: LocationStrategy | undefined);
541
- private subscribeToNavigationEventsIfNecessary;
542
- /**
543
- * Passed to {@link Router#createUrlTree} as part of the
544
- * `UrlCreationOptions`.
545
- * @see {@link UrlCreationOptions#preserveFragment}
546
- * @see {@link Router#createUrlTree}
547
- */
548
- preserveFragment: boolean;
549
- /**
550
- * Passed to {@link Router#navigateByUrl} as part of the
551
- * `NavigationBehaviorOptions`.
552
- * @see {@link NavigationBehaviorOptions#skipLocationChange}
553
- * @see {@link Router#navigateByUrl}
554
- */
555
- skipLocationChange: boolean;
556
- /**
557
- * Passed to {@link Router#navigateByUrl} as part of the
558
- * `NavigationBehaviorOptions`.
559
- * @see {@link NavigationBehaviorOptions#replaceUrl}
560
- * @see {@link Router#navigateByUrl}
561
- */
562
- replaceUrl: boolean;
563
- /**
564
- * Modifies the tab index if there was not a tabindex attribute on the element during
565
- * instantiation.
566
- */
567
- private setTabIndexIfNotOnNativeEl;
568
- /** @docs-private */
569
- ngOnChanges(changes?: SimpleChanges): void;
570
- private routerLinkInput;
571
- /**
572
- * Commands to pass to {@link Router#createUrlTree} or a `UrlTree`.
573
- * - **array**: commands to pass to {@link Router#createUrlTree}.
574
- * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`
575
- * - **UrlTree**: a `UrlTree` for this link rather than creating one from the commands
576
- * and other inputs that correspond to properties of `UrlCreationOptions`.
577
- * - **null|undefined**: effectively disables the `routerLink`
578
- * @see {@link Router#createUrlTree}
579
- */
580
- set routerLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined);
581
- /** @docs-private */
582
- onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean;
583
- /** @docs-private */
584
- ngOnDestroy(): any;
585
- private updateHref;
586
- private applyAttributeValue;
587
- get urlTree(): UrlTree | null;
588
- static ɵfac: i0.ɵɵFactoryDeclaration<RouterLink, [null, null, { attribute: "tabindex"; }, null, null, null]>;
589
- static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLink, never, never, { "target": { "alias": "target"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; "fragment": { "alias": "fragment"; "required": false; }; "queryParamsHandling": { "alias": "queryParamsHandling"; "required": false; }; "state": { "alias": "state"; "required": false; }; "info": { "alias": "info"; "required": false; }; "relativeTo": { "alias": "relativeTo"; "required": false; }; "preserveFragment": { "alias": "preserveFragment"; "required": false; }; "skipLocationChange": { "alias": "skipLocationChange"; "required": false; }; "replaceUrl": { "alias": "replaceUrl"; "required": false; }; "routerLink": { "alias": "routerLink"; "required": false; }; }, {}, never, never, true, never>;
590
- static ngAcceptInputType_preserveFragment: unknown;
591
- static ngAcceptInputType_skipLocationChange: unknown;
592
- static ngAcceptInputType_replaceUrl: unknown;
593
- }
594
-
595
- /**
596
- * Selectors used for built-in Angular RouterLink directives:
597
- * RouterLink: ':not(a):not(area)[routerLink]'
598
- * RouterLinkWithHref: 'a[routerLink],area[routerLink]'
599
- *
600
- * See https://github.com/angular/angular/blob/5957ff4163f55d814be2cf80b9909244f1ce5262/packages/router/src/directives/router_link.ts
601
- */
602
358
  /**
603
359
  * Directive to handle nimble-anchor RouterLink support.
604
360
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
@@ -699,13 +455,6 @@ declare class NimbleAnchorButtonDirective extends NimbleAnchorBaseDirective<Anch
699
455
  static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleAnchorButtonDirective, "nimble-anchor-button", never, { "appearance": { "alias": "appearance"; "required": false; }; "appearanceVariant": { "alias": "appearance-variant"; "required": false; }; "contentHidden": { "alias": "content-hidden"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
700
456
  }
701
457
 
702
- /**
703
- * Selectors used for built-in Angular RouterLink directives:
704
- * RouterLink: ':not(a):not(area)[routerLink]'
705
- * RouterLinkWithHref: 'a[routerLink],area[routerLink]'
706
- *
707
- * See https://github.com/angular/angular/blob/5957ff4163f55d814be2cf80b9909244f1ce5262/packages/router/src/directives/router_link.ts
708
- */
709
458
  /**
710
459
  * Directive to handle nimble-anchor-button RouterLink support.
711
460
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
@@ -745,13 +494,6 @@ declare class NimbleAnchorMenuItemDirective extends NimbleAnchorBaseDirective<An
745
494
  static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleAnchorMenuItemDirective, "nimble-anchor-menu-item", never, { "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
746
495
  }
747
496
 
748
- /**
749
- * Selectors used for built-in Angular RouterLink directives:
750
- * RouterLink: ':not(a):not(area)[routerLink]'
751
- * RouterLinkWithHref: 'a[routerLink],area[routerLink]'
752
- *
753
- * See https://github.com/angular/angular/blob/5957ff4163f55d814be2cf80b9909244f1ce5262/packages/router/src/directives/router_link.ts
754
- */
755
497
  /**
756
498
  * Directive to handle nimble-anchor-menu-item RouterLink support.
757
499
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
@@ -791,13 +533,6 @@ declare class NimbleAnchorTabDirective extends NimbleAnchorBaseDirective<AnchorT
791
533
  static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleAnchorTabDirective, "nimble-anchor-tab", never, { "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
792
534
  }
793
535
 
794
- /**
795
- * Selectors used for built-in Angular RouterLink directives:
796
- * RouterLink: ':not(a):not(area)[routerLink]'
797
- * RouterLinkWithHref: 'a[routerLink],area[routerLink]'
798
- *
799
- * See https://github.com/angular/angular/blob/5957ff4163f55d814be2cf80b9909244f1ce5262/packages/router/src/directives/router_link.ts
800
- */
801
536
  /**
802
537
  * Directive to handle nimble-anchor-tab RouterLink support.
803
538
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
@@ -859,13 +594,6 @@ declare class NimbleAnchorTreeItemDirective extends NimbleAnchorBaseDirective<An
859
594
  static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleAnchorTreeItemDirective, "nimble-anchor-tree-item", never, { "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, {}, never, never, false, never>;
860
595
  }
861
596
 
862
- /**
863
- * Selectors used for built-in Angular RouterLink directives:
864
- * RouterLink: ':not(a):not(area)[routerLink]'
865
- * RouterLinkWithHref: 'a[routerLink],area[routerLink]'
866
- *
867
- * See https://github.com/angular/angular/blob/5957ff4163f55d814be2cf80b9909244f1ce5262/packages/router/src/directives/router_link.ts
868
- */
869
597
  /**
870
598
  * Directive to handle nimble-anchor-tree-item RouterLink support.
871
599
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
@@ -940,13 +668,6 @@ declare class NimbleBreadcrumbModule {
940
668
  static ɵinj: i0.ɵɵInjectorDeclaration<NimbleBreadcrumbModule>;
941
669
  }
942
670
 
943
- /**
944
- * Selectors used for built-in Angular RouterLink directives:
945
- * RouterLink: ':not(a):not(area)[routerLink]'
946
- * RouterLinkWithHref: 'a[routerLink],area[routerLink]'
947
- *
948
- * See https://github.com/angular/angular/blob/5957ff4163f55d814be2cf80b9909244f1ce5262/packages/router/src/directives/router_link.ts
949
- */
950
671
  /**
951
672
  * Directive to handle nimble-breadcrumb-item RouterLink support.
952
673
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/nimble-angular",
3
- "version": "33.4.7",
3
+ "version": "33.4.9",
4
4
  "description": "Angular components for the NI Nimble Design System",
5
5
  "type": "module",
6
6
  "exports": {
@@ -215,7 +215,7 @@
215
215
  "@angular/forms": "^20.3.19",
216
216
  "@angular/localize": "^20.3.19",
217
217
  "@angular/router": "^20.3.19",
218
- "@ni/nimble-components": "^35.12.6",
218
+ "@ni/nimble-components": "^35.12.7",
219
219
  "@ni/unit-format": "^1.0.5"
220
220
  },
221
221
  "module": "fesm2022/ni-nimble-angular.mjs",