@porscheinformatik/material-addons 22.0.12 → 22.0.13

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Component, NgModule, booleanAttribute, Directive, ChangeDetectionStrategy, effect, Optional, HostBinding, LOCALE_ID, Inject, Injectable, output, InjectionToken, inject, viewChild, computed, signal, EventEmitter, Output, Input, ViewChild, forwardRef, HostListener, model, TemplateRef, ViewChildren, ContentChild, SkipSelf, ContentChildren, ViewEncapsulation, QueryList, contentChildren } from '@angular/core';
2
+ import { input, Component, NgModule, booleanAttribute, inject, ElementRef, Renderer2, DestroyRef, Directive, ChangeDetectionStrategy, effect, Optional, HostBinding, LOCALE_ID, Inject, Injectable, output, InjectionToken, viewChild, computed, signal, EventEmitter, Output, Input, ViewChild, forwardRef, HostListener, model, TemplateRef, ViewChildren, ContentChild, SkipSelf, ContentChildren, ViewEncapsulation, QueryList, contentChildren } from '@angular/core';
3
3
  import * as i2$1 from '@angular/material/icon';
4
4
  import { MatIconModule, MatIcon } from '@angular/material/icon';
5
5
  import * as i2 from '@angular/material/tooltip';
@@ -104,13 +104,23 @@ class MadBasicButton {
104
104
  this.type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
105
105
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
106
106
  this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
107
+ this.host = inject(ElementRef);
108
+ this.renderer = inject(Renderer2);
109
+ this.destroyRef = inject(DestroyRef);
110
+ const removeClickListener = this.renderer.listen(this.host.nativeElement, 'click', (event) => {
111
+ if (this.disabled()) {
112
+ event.preventDefault();
113
+ event.stopImmediatePropagation();
114
+ }
115
+ }, { capture: true });
116
+ this.destroyRef.onDestroy(removeClickListener);
107
117
  }
108
118
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MadBasicButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
109
119
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: MadBasicButton, isStandalone: true, inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
110
120
  }
111
121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MadBasicButton, decorators: [{
112
122
  type: Directive
113
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }] } });
123
+ }], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }] } });
114
124
 
115
125
  class DangerButtonComponent extends MadBasicButton {
116
126
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DangerButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
@@ -4261,7 +4271,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
4261
4271
  args: [{ selector: 'mad-breadcrumb', imports: [RouterLink, IconButtonComponent, MatIcon, MatTooltip], template: "@if (breadcrumbs().length) {\n <div class=\"breadcrumb\">\n <nav data-cy=\"breadcrumb-nav\" class=\"breadcrumb__nav\">\n @for (crumb of breadcrumbs(); track crumb.label; let last = $last) {\n @if (crumb.route?.length) {\n <a data-cy=\"breadcrumb-link\" [routerLink]=\"crumb.route\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else if (crumb.href?.length) {\n <a data-cy=\"breadcrumb-link\" [href]=\"crumb.href\" target=\"_blank\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else {\n <span data-cy=\"breadcrumb-current\" class=\"breadcrumb__current\">{{ crumb.label }}</span>\n }\n @if (!last) {\n <span data-cy=\"breadcrumb-separator\" class=\"breadcrumb__separator\">/</span>\n }\n }\n </nav>\n @if (showCopy()) {\n <mad-icon-button\n data-cy=\"breadcrumb-copy\"\n class=\"breadcrumb__copy\"\n (click)=\"copy.emit()\"\n [matTooltip]=\"title()\"\n matTooltipPosition=\"above\"\n >\n <mat-icon>content_copy</mat-icon>\n </mad-icon-button>\n }\n </div>\n}\n", styles: [".breadcrumb{display:flex;align-items:center;gap:.5rem}.breadcrumb__nav{display:flex;align-items:center;gap:.625rem;min-height:3.5rem;padding-block:.25rem;font-size:.875rem;line-height:1.25rem}.breadcrumb__link{color:var(--main-primary);text-decoration:none}.breadcrumb__link:hover{text-decoration:underline}.breadcrumb__current,.breadcrumb__separator{color:var(--breadcrumb-separator-color)}.breadcrumb__copy{flex-shrink:0}\n"] }]
4262
4272
  }], propDecorators: { breadcrumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumbs", required: true }] }], showCopy: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCopy", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], copy: [{ type: i0.Output, args: ["copy"] }] } });
4263
4273
 
4264
- const VERSION = '22.0.12';
4274
+ const VERSION = '22.0.13';
4265
4275
 
4266
4276
  const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
4267
4277
  providedIn: 'root',