@ni/nimble-angular 17.8.4 → 17.8.6

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.
@@ -392,6 +392,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
392
392
  }]
393
393
  }] });
394
394
 
395
+ /**
396
+ * Base class for Nimble router link directives that go on disableable elements
397
+ */
398
+ class DisableableRouterLinkWithHrefDirective extends RouterLinkWithHref {
399
+ constructor(injector, elementRef) {
400
+ super(injector.get(Router), injector.get(ActivatedRoute), injector.get(LocationStrategy));
401
+ this.elementRef = elementRef;
402
+ }
403
+ onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
404
+ if (this.elementRef.nativeElement.disabled) {
405
+ return false;
406
+ }
407
+ return super.onClick(button, ctrlKey, shiftKey, altKey, metaKey);
408
+ }
409
+ }
410
+ DisableableRouterLinkWithHrefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DisableableRouterLinkWithHrefDirective, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
411
+ DisableableRouterLinkWithHrefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: DisableableRouterLinkWithHrefDirective, usesInheritance: true, ngImport: i0 });
412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DisableableRouterLinkWithHrefDirective, decorators: [{
413
+ type: Directive
414
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; } });
415
+
395
416
  /**
396
417
  * Selectors used for built-in Angular RouterLink directives:
397
418
  * RouterLink: ':not(a):not(area)[routerLink]'
@@ -404,7 +425,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
404
425
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
405
426
  * won't also be an active RouterLink directive incorrectly handling navigation.
406
427
  */
407
- class NimbleAnchorButtonRouterLinkWithHrefDirective extends RouterLinkWithHref {
428
+ class NimbleAnchorButtonRouterLinkWithHrefDirective extends DisableableRouterLinkWithHrefDirective {
408
429
  set nimbleRouterLink(commands) {
409
430
  this.routerLink = commands;
410
431
  }
@@ -516,7 +537,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
516
537
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
517
538
  * won't also be an active RouterLink directive incorrectly handling navigation.
518
539
  */
519
- class NimbleAnchorMenuItemRouterLinkWithHrefDirective extends RouterLinkWithHref {
540
+ class NimbleAnchorMenuItemRouterLinkWithHrefDirective extends DisableableRouterLinkWithHrefDirective {
520
541
  set nimbleRouterLink(commands) {
521
542
  this.routerLink = commands;
522
543
  }
@@ -598,7 +619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
598
619
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
599
620
  * won't also be an active RouterLink directive incorrectly handling navigation.
600
621
  */
601
- class NimbleAnchorTabRouterLinkWithHrefDirective extends RouterLinkWithHref {
622
+ class NimbleAnchorTabRouterLinkWithHrefDirective extends DisableableRouterLinkWithHrefDirective {
602
623
  set nimbleRouterLink(commands) {
603
624
  this.routerLink = commands;
604
625
  }
@@ -723,7 +744,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
723
744
  * Note: Clients need to use [nimbleRouterLink] instead of [routerLink], so that there
724
745
  * won't also be an active RouterLink directive incorrectly handling navigation.
725
746
  */
726
- class NimbleAnchorTreeItemRouterLinkWithHrefDirective extends RouterLinkWithHref {
747
+ class NimbleAnchorTreeItemRouterLinkWithHrefDirective extends DisableableRouterLinkWithHrefDirective {
727
748
  set nimbleRouterLink(commands) {
728
749
  this.routerLink = commands;
729
750
  }