@porscheinformatik/material-addons 22.0.7 → 22.0.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/fesm2022/porscheinformatik-material-addons.mjs +169 -6
- package/fesm2022/porscheinformatik-material-addons.mjs.map +1 -1
- package/package.json +5 -2
- package/themes/common/foundation/_fonts.scss +0 -1
- package/themes/common/theme-entry.scss +1 -0
- package/themes/common/tokens/_tokens.scss +16 -0
- package/types/porscheinformatik-material-addons.d.ts +78 -5
- package/types/porscheinformatik-material-addons.d.ts.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, NgModule, HostBinding, ElementRef, ViewChild, Input, Optional, Directive, LOCALE_ID, Inject, Injectable, output, InjectionToken, inject, viewChild, computed, signal, ChangeDetectionStrategy, EventEmitter, Output, forwardRef, HostListener, model, TemplateRef, ViewChildren, ContentChild, SkipSelf, ContentChildren, ViewEncapsulation, QueryList } from '@angular/core';
|
|
2
|
+
import { input, Component, NgModule, HostBinding, ElementRef, ViewChild, Input, Optional, Directive, LOCALE_ID, Inject, Injectable, output, InjectionToken, inject, viewChild, computed, signal, ChangeDetectionStrategy, EventEmitter, Output, forwardRef, HostListener, model, TemplateRef, ViewChildren, ContentChild, SkipSelf, ContentChildren, ViewEncapsulation, QueryList, contentChildren, effect } from '@angular/core';
|
|
3
3
|
import * as i2$1 from '@angular/material/icon';
|
|
4
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
4
|
+
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
5
5
|
import * as i2 from '@angular/material/tooltip';
|
|
6
6
|
import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
|
|
7
7
|
import * as i1 from '@angular/material/button';
|
|
@@ -56,6 +56,7 @@ import * as i1$6 from '@angular/cdk/a11y';
|
|
|
56
56
|
import * as i1$7 from '@angular/cdk/bidi';
|
|
57
57
|
import * as i1$8 from '@angular/material/stepper';
|
|
58
58
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
59
|
+
import EmblaCarousel from 'embla-carousel';
|
|
59
60
|
import * as i9 from '@angular/cdk/portal';
|
|
60
61
|
import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
61
62
|
import * as i1$a from '@angular/cdk/layout';
|
|
@@ -3675,6 +3676,128 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3675
3676
|
}]
|
|
3676
3677
|
}] });
|
|
3677
3678
|
|
|
3679
|
+
class CarouselShortTextDirective {
|
|
3680
|
+
constructor() {
|
|
3681
|
+
this.text = input('', { ...(ngDevMode ? { debugName: "text" } : {}), alias: 'madCarouselShortText' });
|
|
3682
|
+
}
|
|
3683
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: CarouselShortTextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3684
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: CarouselShortTextDirective, isStandalone: true, selector: "[madCarouselShortText]", inputs: { text: { classPropertyName: "text", publicName: "madCarouselShortText", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
3685
|
+
}
|
|
3686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: CarouselShortTextDirective, decorators: [{
|
|
3687
|
+
type: Directive,
|
|
3688
|
+
args: [{
|
|
3689
|
+
selector: '[madCarouselShortText]',
|
|
3690
|
+
}]
|
|
3691
|
+
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "madCarouselShortText", required: false }] }] } });
|
|
3692
|
+
|
|
3693
|
+
class CarouselSlideDirective {
|
|
3694
|
+
constructor() {
|
|
3695
|
+
this.carousel = inject(CarouselComponent);
|
|
3696
|
+
}
|
|
3697
|
+
get hostClasses() {
|
|
3698
|
+
const loop = !!this.carousel.options()?.loop;
|
|
3699
|
+
const base = 'flex min-w-0 min-h-fit flex-[0_0_100%] items-center justify-center';
|
|
3700
|
+
const border = this.carousel.useSlideBorder() ? ' border border-gray-400' : '';
|
|
3701
|
+
const loopMargin = loop ? ' ml-4' : '';
|
|
3702
|
+
return base + border + loopMargin;
|
|
3703
|
+
}
|
|
3704
|
+
get hostHeight() {
|
|
3705
|
+
return this.carousel.slideHeight();
|
|
3706
|
+
}
|
|
3707
|
+
get hostBorderRadius() {
|
|
3708
|
+
return this.carousel.slideBorderRadius();
|
|
3709
|
+
}
|
|
3710
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: CarouselSlideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3711
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: CarouselSlideDirective, isStandalone: true, selector: "[madCarouselSlide]", host: { properties: { "class": "this.hostClasses", "style.height": "this.hostHeight", "style.border-radius": "this.hostBorderRadius" } }, ngImport: i0 }); }
|
|
3712
|
+
}
|
|
3713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: CarouselSlideDirective, decorators: [{
|
|
3714
|
+
type: Directive,
|
|
3715
|
+
args: [{
|
|
3716
|
+
selector: '[madCarouselSlide]',
|
|
3717
|
+
}]
|
|
3718
|
+
}], propDecorators: { hostClasses: [{
|
|
3719
|
+
type: HostBinding,
|
|
3720
|
+
args: ['class']
|
|
3721
|
+
}], hostHeight: [{
|
|
3722
|
+
type: HostBinding,
|
|
3723
|
+
args: ['style.height']
|
|
3724
|
+
}], hostBorderRadius: [{
|
|
3725
|
+
type: HostBinding,
|
|
3726
|
+
args: ['style.border-radius']
|
|
3727
|
+
}] } });
|
|
3728
|
+
|
|
3729
|
+
class CarouselComponent {
|
|
3730
|
+
constructor() {
|
|
3731
|
+
this.shortTexts = contentChildren(CarouselShortTextDirective, ...(ngDevMode ? [{ debugName: "shortTexts" }] : []));
|
|
3732
|
+
this.slides = contentChildren(CarouselSlideDirective, ...(ngDevMode ? [{ debugName: "slides" }] : []));
|
|
3733
|
+
this.options = input(undefined, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
3734
|
+
this.width = input('50%', ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
3735
|
+
this.slideHeight = input('12rem', ...(ngDevMode ? [{ debugName: "slideHeight" }] : []));
|
|
3736
|
+
this.slideBorderRadius = input('5px', ...(ngDevMode ? [{ debugName: "slideBorderRadius" }] : []));
|
|
3737
|
+
this.useSlideBorder = input(true, ...(ngDevMode ? [{ debugName: "useSlideBorder" }] : []));
|
|
3738
|
+
this.viewportRef = viewChild('viewport', ...(ngDevMode ? [{ debugName: "viewportRef" }] : []));
|
|
3739
|
+
this.containerRef = viewChild('container', ...(ngDevMode ? [{ debugName: "containerRef" }] : []));
|
|
3740
|
+
this.selectedIndex = signal(0, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : []));
|
|
3741
|
+
this.scrollSnaps = signal([], ...(ngDevMode ? [{ debugName: "scrollSnaps" }] : []));
|
|
3742
|
+
this.prevBtnDisabled = signal(true, ...(ngDevMode ? [{ debugName: "prevBtnDisabled" }] : []));
|
|
3743
|
+
this.nextBtnDisabled = signal(true, ...(ngDevMode ? [{ debugName: "nextBtnDisabled" }] : []));
|
|
3744
|
+
this.containerLoopClass = computed(() => (this.options()?.loop ? '-mr-4' : ''), ...(ngDevMode ? [{ debugName: "containerLoopClass" }] : []));
|
|
3745
|
+
effect(() => this.initEmbla());
|
|
3746
|
+
effect(() => {
|
|
3747
|
+
const slideCount = this.slides().length;
|
|
3748
|
+
if (slideCount > 0) {
|
|
3749
|
+
this.validateShortTexts(slideCount);
|
|
3750
|
+
}
|
|
3751
|
+
});
|
|
3752
|
+
}
|
|
3753
|
+
initEmbla() {
|
|
3754
|
+
this.emblaApi = EmblaCarousel(this.viewportRef().nativeElement, this.options());
|
|
3755
|
+
this.onInit();
|
|
3756
|
+
this.onSelect();
|
|
3757
|
+
this.emblaApi.on('select', () => this.onSelect());
|
|
3758
|
+
this.emblaApi.on('reInit', () => {
|
|
3759
|
+
this.onInit();
|
|
3760
|
+
this.onSelect();
|
|
3761
|
+
});
|
|
3762
|
+
}
|
|
3763
|
+
validateShortTexts(slideCount) {
|
|
3764
|
+
const shortTextCount = this.shortTexts().length;
|
|
3765
|
+
if (shortTextCount > 0 && shortTextCount !== slideCount) {
|
|
3766
|
+
console.error(`Found ${slideCount} slides but only ${shortTextCount} slides provide the \`carouselShortText\` directive! Make sure that either none, or all slides provide this value!`);
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
onInit() {
|
|
3770
|
+
if (!this.emblaApi)
|
|
3771
|
+
return;
|
|
3772
|
+
this.selectedIndex.set(this.emblaApi.selectedScrollSnap());
|
|
3773
|
+
this.scrollSnaps.set(this.emblaApi.scrollSnapList());
|
|
3774
|
+
this.prevBtnDisabled.set(!this.emblaApi.canScrollPrev());
|
|
3775
|
+
this.nextBtnDisabled.set(!this.emblaApi.canScrollNext());
|
|
3776
|
+
}
|
|
3777
|
+
onSelect() {
|
|
3778
|
+
if (!this.emblaApi)
|
|
3779
|
+
return;
|
|
3780
|
+
this.selectedIndex.set(this.emblaApi.selectedScrollSnap());
|
|
3781
|
+
this.prevBtnDisabled.set(!this.emblaApi.canScrollPrev());
|
|
3782
|
+
this.nextBtnDisabled.set(!this.emblaApi.canScrollNext());
|
|
3783
|
+
}
|
|
3784
|
+
scrollNext() {
|
|
3785
|
+
this.emblaApi?.scrollNext();
|
|
3786
|
+
}
|
|
3787
|
+
scrollPrev() {
|
|
3788
|
+
this.emblaApi?.scrollPrev();
|
|
3789
|
+
}
|
|
3790
|
+
scrollTo(index) {
|
|
3791
|
+
this.emblaApi?.scrollTo(index);
|
|
3792
|
+
}
|
|
3793
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3794
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: CarouselComponent, isStandalone: true, selector: "mad-carousel", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, slideHeight: { classPropertyName: "slideHeight", publicName: "slideHeight", isSignal: true, isRequired: false, transformFunction: null }, slideBorderRadius: { classPropertyName: "slideBorderRadius", publicName: "slideBorderRadius", isSignal: true, isRequired: false, transformFunction: null }, useSlideBorder: { classPropertyName: "useSlideBorder", publicName: "useSlideBorder", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "shortTexts", predicate: CarouselShortTextDirective, isSignal: true }, { propertyName: "slides", predicate: CarouselSlideDirective, isSignal: true }], viewQueries: [{ propertyName: "viewportRef", first: true, predicate: ["viewport"], descendants: true, isSignal: true }, { propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"h-fit min-w-fit\" [style.width]=\"width()\">\n <div class=\"flex flex-row items-center justify-center gap-4\">\n <button\n class=\"bg-(--carousel-button-background-color) cursor-pointer hover:border-[0.1rem] hover:border-(--carousel-button-border-color) w-7 h-7 rounded-full flex items-center justify-center disabled:opacity-50 disabled:hover:border-0 disabled:cursor-not-allowed\"\n [disabled]=\"prevBtnDisabled()\"\n (click)=\"scrollPrev()\"\n >\n <span class=\"material-symbols-outlined\">chevron_left</span>\n </button>\n\n <div class=\"flex-1 w-0 min-w-0 overflow-hidden\" #viewport>\n <div class=\"flex flex-row gap-4 w-full touch-pan-y touch-pinch-zoom\" [class]=\"containerLoopClass()\" #container>\n <ng-content></ng-content>\n </div>\n </div>\n\n <button\n class=\"bg-(--carousel-button-background-color) cursor-pointer hover:border-[0.1rem] hover:border-(--carousel-button-border-color) w-7 h-7 rounded-full flex items-center justify-center disabled:opacity-50 disabled:hover:border-0 disabled:cursor-not-allowed\"\n [disabled]=\"nextBtnDisabled()\"\n (click)=\"scrollNext()\"\n >\n <span class=\"material-symbols-outlined\">chevron_right</span>\n </button>\n </div>\n\n @let slideTexts = shortTexts();\n @let shouldDisplaySlideText = slideTexts.length > 0;\n <div class=\"flex gap-4 height-8 padding-x-4 mt-5 justify-center\">\n @for (snap of scrollSnaps(); let i = $index; track snap) {\n <button\n (click)=\"scrollTo(i)\"\n class=\"inline-flex items-center justify-center rounded-full border border-[0.1rem] border-(--carousel-dots-border-color) cursor-pointer hover:border-(carousel-dots-hover-border-color) transition-transform mx-w-6 max-h-6\"\n [class.scale-120]=\"i === selectedIndex()\"\n [class.border-gray-950]=\"i === selectedIndex()\"\n [class.py-1]=\"shouldDisplaySlideText\"\n [class.px-2]=\"shouldDisplaySlideText\"\n [class.size-4]=\"!shouldDisplaySlideText\"\n >\n @if (shouldDisplaySlideText) {\n {{ slideTexts[i]?.text() }}\n }\n </button>\n }\n </div>\n</div>\n", styles: [":host{width:100%;display:flex;align-items:center;justify-content:center;--slide-spacing: 1rem}button>.material-symbols-outlined{display:flex;align-items:center;justify-content:center;font-variation-settings:\"wght\" 300,\"FILL\" 0,\"GRAD\" 0,\"opsz\" 24;font-size:1.2rem}\n"] }); }
|
|
3795
|
+
}
|
|
3796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
3797
|
+
type: Component,
|
|
3798
|
+
args: [{ selector: 'mad-carousel', imports: [], template: "<div class=\"h-fit min-w-fit\" [style.width]=\"width()\">\n <div class=\"flex flex-row items-center justify-center gap-4\">\n <button\n class=\"bg-(--carousel-button-background-color) cursor-pointer hover:border-[0.1rem] hover:border-(--carousel-button-border-color) w-7 h-7 rounded-full flex items-center justify-center disabled:opacity-50 disabled:hover:border-0 disabled:cursor-not-allowed\"\n [disabled]=\"prevBtnDisabled()\"\n (click)=\"scrollPrev()\"\n >\n <span class=\"material-symbols-outlined\">chevron_left</span>\n </button>\n\n <div class=\"flex-1 w-0 min-w-0 overflow-hidden\" #viewport>\n <div class=\"flex flex-row gap-4 w-full touch-pan-y touch-pinch-zoom\" [class]=\"containerLoopClass()\" #container>\n <ng-content></ng-content>\n </div>\n </div>\n\n <button\n class=\"bg-(--carousel-button-background-color) cursor-pointer hover:border-[0.1rem] hover:border-(--carousel-button-border-color) w-7 h-7 rounded-full flex items-center justify-center disabled:opacity-50 disabled:hover:border-0 disabled:cursor-not-allowed\"\n [disabled]=\"nextBtnDisabled()\"\n (click)=\"scrollNext()\"\n >\n <span class=\"material-symbols-outlined\">chevron_right</span>\n </button>\n </div>\n\n @let slideTexts = shortTexts();\n @let shouldDisplaySlideText = slideTexts.length > 0;\n <div class=\"flex gap-4 height-8 padding-x-4 mt-5 justify-center\">\n @for (snap of scrollSnaps(); let i = $index; track snap) {\n <button\n (click)=\"scrollTo(i)\"\n class=\"inline-flex items-center justify-center rounded-full border border-[0.1rem] border-(--carousel-dots-border-color) cursor-pointer hover:border-(carousel-dots-hover-border-color) transition-transform mx-w-6 max-h-6\"\n [class.scale-120]=\"i === selectedIndex()\"\n [class.border-gray-950]=\"i === selectedIndex()\"\n [class.py-1]=\"shouldDisplaySlideText\"\n [class.px-2]=\"shouldDisplaySlideText\"\n [class.size-4]=\"!shouldDisplaySlideText\"\n >\n @if (shouldDisplaySlideText) {\n {{ slideTexts[i]?.text() }}\n }\n </button>\n }\n </div>\n</div>\n", styles: [":host{width:100%;display:flex;align-items:center;justify-content:center;--slide-spacing: 1rem}button>.material-symbols-outlined{display:flex;align-items:center;justify-content:center;font-variation-settings:\"wght\" 300,\"FILL\" 0,\"GRAD\" 0,\"opsz\" 24;font-size:1.2rem}\n"] }]
|
|
3799
|
+
}], ctorParameters: () => [], propDecorators: { shortTexts: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CarouselShortTextDirective), { isSignal: true }] }], slides: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CarouselSlideDirective), { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], slideHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "slideHeight", required: false }] }], slideBorderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "slideBorderRadius", required: false }] }], useSlideBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "useSlideBorder", required: false }] }], viewportRef: [{ type: i0.ViewChild, args: ['viewport', { isSignal: true }] }], containerRef: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }] } });
|
|
3800
|
+
|
|
3678
3801
|
class SidebarComponent {
|
|
3679
3802
|
constructor() {
|
|
3680
3803
|
this.collapsed = false;
|
|
@@ -4016,7 +4139,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4016
4139
|
|
|
4017
4140
|
class MaterialAddonsModule {
|
|
4018
4141
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MaterialAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4019
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: MaterialAddonsModule, exports: [ReadOnlyFormFieldModule,
|
|
4142
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: MaterialAddonsModule, imports: [CarouselComponent, CarouselShortTextDirective, CarouselSlideDirective], exports: [ReadOnlyFormFieldModule,
|
|
4020
4143
|
ButtonModule,
|
|
4021
4144
|
ToolbarModule,
|
|
4022
4145
|
MaterialActionButtonModule,
|
|
@@ -4024,7 +4147,10 @@ class MaterialAddonsModule {
|
|
|
4024
4147
|
CardModule,
|
|
4025
4148
|
QuickListModule,
|
|
4026
4149
|
ThrottleClickModule,
|
|
4027
|
-
SidebarModule
|
|
4150
|
+
SidebarModule,
|
|
4151
|
+
CarouselComponent,
|
|
4152
|
+
CarouselShortTextDirective,
|
|
4153
|
+
CarouselSlideDirective] }); }
|
|
4028
4154
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MaterialAddonsModule, imports: [ReadOnlyFormFieldModule,
|
|
4029
4155
|
ButtonModule,
|
|
4030
4156
|
ToolbarModule,
|
|
@@ -4038,6 +4164,7 @@ class MaterialAddonsModule {
|
|
|
4038
4164
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MaterialAddonsModule, decorators: [{
|
|
4039
4165
|
type: NgModule,
|
|
4040
4166
|
args: [{
|
|
4167
|
+
imports: [CarouselComponent, CarouselShortTextDirective, CarouselSlideDirective],
|
|
4041
4168
|
exports: [
|
|
4042
4169
|
ReadOnlyFormFieldModule,
|
|
4043
4170
|
ButtonModule,
|
|
@@ -4048,6 +4175,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4048
4175
|
QuickListModule,
|
|
4049
4176
|
ThrottleClickModule,
|
|
4050
4177
|
SidebarModule,
|
|
4178
|
+
CarouselComponent,
|
|
4179
|
+
CarouselShortTextDirective,
|
|
4180
|
+
CarouselSlideDirective,
|
|
4051
4181
|
],
|
|
4052
4182
|
}]
|
|
4053
4183
|
}] });
|
|
@@ -4188,7 +4318,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4188
4318
|
args: [{ selector: 'mad-file-upload', imports: [MatCardModule, MatIconModule, ButtonModule, TranslateModule, DragAndDropDirective, MatChipsModule], template: "<mat-card\n id=\"uploadFileContainer\"\n class=\"upload-file-container\"\n (click)=\"fileInput.click()\"\n madDragAndDrop\n (onFileDropped)=\"uploadFile($event)\"\n>\n <input\n #fileInput\n hidden\n type=\"file\"\n [id]=\"id()\"\n [multiple]=\"multiple()\"\n [accept]=\"acceptAttribute()\"\n (change)=\"uploadFile(fileInput.files)\"\n (click)=\"fileInput.value = ''\"\n />\n <mat-card-content class=\"upload-file-content\">\n @if (hasSingleFile()) {\n {{ fileList()[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ uploadLabel() }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList()) {\n <mat-chip-listbox>\n @for (file of fileList(); track file) {\n <mat-chip class=\"download\" (click)=\"openFile(file)\" [removable]=\"removable()\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable()) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".upload-file-container{height:100px;margin:0;border:2px dashed var(--main-primary);background-repeat:no-repeat;background-position:center}.upload-file-container:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.upload-file-container,.upload-file-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"] }]
|
|
4189
4319
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], showFileList: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFileList", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], fileEmitter: [{ type: i0.Output, args: ["fileEmitter"] }], errorEmitter: [{ type: i0.Output, args: ["errorEmitter"] }] } });
|
|
4190
4320
|
|
|
4191
|
-
|
|
4321
|
+
class TileComponent {
|
|
4322
|
+
constructor() {
|
|
4323
|
+
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
4324
|
+
this.variant = input('info', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
4325
|
+
this.size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
4326
|
+
/** Optional Material icon name */
|
|
4327
|
+
this.icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
4328
|
+
/** Icon position relative to label */
|
|
4329
|
+
this.iconPosition = input('start', ...(ngDevMode ? [{ debugName: "iconPosition" }] : []));
|
|
4330
|
+
}
|
|
4331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4332
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: TileComponent, isStandalone: true, selector: "mad-tile", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
4333
|
+
}
|
|
4334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TileComponent, decorators: [{
|
|
4335
|
+
type: Component,
|
|
4336
|
+
args: [{ selector: 'mad-tile', imports: [MatIcon], template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"] }]
|
|
4337
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }] } });
|
|
4338
|
+
|
|
4339
|
+
class BreadcrumbComponent {
|
|
4340
|
+
constructor() {
|
|
4341
|
+
this.breadcrumbs = input.required(...(ngDevMode ? [{ debugName: "breadcrumbs" }] : []));
|
|
4342
|
+
this.showCopy = input(false, ...(ngDevMode ? [{ debugName: "showCopy" }] : []));
|
|
4343
|
+
this.title = input('Copy', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
4344
|
+
this.copy = output();
|
|
4345
|
+
}
|
|
4346
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4347
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: BreadcrumbComponent, isStandalone: true, selector: "mad-breadcrumb", inputs: { breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: true, transformFunction: null }, showCopy: { classPropertyName: "showCopy", publicName: "showCopy", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copy: "copy" }, ngImport: i0, 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"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
4348
|
+
}
|
|
4349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
4350
|
+
type: Component,
|
|
4351
|
+
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"] }]
|
|
4352
|
+
}], 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"] }] } });
|
|
4353
|
+
|
|
4354
|
+
const VERSION = '22.0.8';
|
|
4192
4355
|
|
|
4193
4356
|
const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
|
|
4194
4357
|
providedIn: 'root',
|
|
@@ -4244,5 +4407,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4244
4407
|
* Generated bundle index. Do not edit.
|
|
4245
4408
|
*/
|
|
4246
4409
|
|
|
4247
|
-
export { AlertComponent, BaseQuickListComponent, ButtonModule, CardComponent, CardModule, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DangerButtonComponent, DataTableActionType, DataTableColumnsModalComponent, DataTableComponent, DataTablePersistenceService, DataTableTemplateCellDefinition, DataTableTemplateColumnDefinition, DataTableTemplateExpandableCellDefinition, DataTableTemplateExpandableColumnDefinition, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MAD_ALERT_DEFAULT_CONFIGURATION, MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY, MAD_DATA_TABLE_GLOBAL_CONFIGURATION, MAD_DATA_TABLE_PERSISTENCE_SERVICE, MAD_READONLY_FORM_FIELD_DEFAULT_CONFIGURATION, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarLayoutComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, ToolbarComponent, ToolbarModule, ToolbarService, VERSION, madStepperAnimations };
|
|
4410
|
+
export { AlertComponent, BaseQuickListComponent, BreadcrumbComponent, ButtonModule, CardComponent, CardModule, CarouselComponent, CarouselShortTextDirective, CarouselSlideDirective, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DangerButtonComponent, DataTableActionType, DataTableColumnsModalComponent, DataTableComponent, DataTablePersistenceService, DataTableTemplateCellDefinition, DataTableTemplateColumnDefinition, DataTableTemplateExpandableCellDefinition, DataTableTemplateExpandableColumnDefinition, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MAD_ALERT_DEFAULT_CONFIGURATION, MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY, MAD_DATA_TABLE_GLOBAL_CONFIGURATION, MAD_DATA_TABLE_PERSISTENCE_SERVICE, MAD_READONLY_FORM_FIELD_DEFAULT_CONFIGURATION, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarLayoutComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, TileComponent, ToolbarComponent, ToolbarModule, ToolbarService, VERSION, madStepperAnimations };
|
|
4248
4411
|
//# sourceMappingURL=porscheinformatik-material-addons.mjs.map
|