@onemrvapublic/design-system 22.0.0-develop.4 → 22.0.0-develop.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.
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { viewChild, TemplateRef, signal, inject, ElementRef, Component, contentChildren, input, Renderer2, ViewEncapsulation } from '@angular/core';
3
3
  import { NgStyle } from '@angular/common';
4
- import { AnimationBuilder, animate, style, trigger, transition } from '@angular/animations';
5
4
  import * as i1 from '@angular/material/button';
6
5
  import { MatButtonModule } from '@angular/material/button';
7
6
  import * as i2 from '@angular/material/icon';
@@ -49,7 +48,6 @@ class OnemrvaMatCarouselComponent {
49
48
  this.carouselWrapperStyle = {};
50
49
  this.width = 0;
51
50
  this.destroyed = new Subject();
52
- this.builder = inject(AnimationBuilder);
53
51
  this.element = inject(ElementRef);
54
52
  this.renderer = inject(Renderer2);
55
53
  this.nativeElement = this.element.nativeElement;
@@ -76,11 +74,6 @@ class OnemrvaMatCarouselComponent {
76
74
  });
77
75
  this.resize();
78
76
  }
79
- buildAnimation(offset) {
80
- return this.builder.build([
81
- animate(this.timing(), style({ transform: `translateX(-${offset}px)` })),
82
- ]);
83
- }
84
77
  goto(index) {
85
78
  if (index >= 0 && index < this.items().length) {
86
79
  this.currentSlide = index;
@@ -105,9 +98,20 @@ class OnemrvaMatCarouselComponent {
105
98
  }
106
99
  animate() {
107
100
  const offset = this.currentSlide * (this.width + this.gap());
108
- const myAnimation = this.buildAnimation(offset);
109
- this.player = myAnimation.create(this.carousel().nativeElement);
110
- this.player.play();
101
+ const timingParts = this.timing().split(' ');
102
+ const duration = timingParts[0];
103
+ const easing = timingParts[1] || 'ease';
104
+ const durationMs = duration.endsWith('ms')
105
+ ? parseInt(duration)
106
+ : parseFloat(duration) * 1000;
107
+ // this.player = this.carousel().nativeElement.animate(
108
+ // [{ transform: `translateX(-${offset}px)` }],
109
+ // {
110
+ // duration: durationMs,
111
+ // easing: easing,
112
+ // fill: 'forwards',
113
+ // },
114
+ // );
111
115
  }
112
116
  ngAfterViewInit() {
113
117
  this.width = this.nativeElement.offsetWidth;
@@ -149,41 +153,13 @@ class OnemrvaMatCarouselComponent {
149
153
  });
150
154
  }
151
155
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
152
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaMatCarouselComponent, isStandalone: true, selector: "onemrva-mat-carousel", inputs: { timing: { classPropertyName: "timing", publicName: "timing", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, showDots: { classPropertyName: "showDots", publicName: "showDots", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize($event)" } }, queries: [{ propertyName: "items", predicate: OnemrvaMatCarouselItemComponent, isSignal: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carouselWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasPrev()) {\n <button\n [@inOutAnimation]\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n [@inOutAnimation]\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n", styles: [":host{position:relative;display:block;width:calc(100% - 128px);overflow:hidden;padding:0 calc(var(--spacer) * 8)}:host .carousel-wrapper{display:block;width:60000px;position:relative;overflow:hidden;margin:0;padding:0}:host .controls{position:absolute;top:calc(50% - 2rem);z-index:6}:host .controls.next{float:right;right:2rem}:host .controls.previous{float:left;left:2rem}:host .dots{text-align:center;margin-top:var(--spacer)}:host .dots .dot{cursor:pointer;width:.75rem;height:.75rem;margin:var(--spacer);background-color:var(--mat-sys-outline-variant);border-radius:50%;display:inline-block;transition:background-color .6s ease}:host .dots .dot.active{background-color:var(--mat-sys-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.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"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
153
- trigger('inOutAnimation', [
154
- transition(':enter', [
155
- style({ opacity: 0 }),
156
- animate('1000ms ease-out', style({ opacity: 1 })),
157
- ]),
158
- transition(':leave', [
159
- style({ opacity: 1 }),
160
- animate('1000ms ease-in', style({ opacity: 0 })),
161
- ]),
162
- ]),
163
- ] }); }
156
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaMatCarouselComponent, isStandalone: true, selector: "onemrva-mat-carousel", inputs: { timing: { classPropertyName: "timing", publicName: "timing", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, showDots: { classPropertyName: "showDots", publicName: "showDots", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize($event)" } }, queries: [{ propertyName: "items", predicate: OnemrvaMatCarouselItemComponent, isSignal: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carouselWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasPrev()) {\n <button\n animate.enter=\"fadeIn\"\n animate.leave=\"fadeOut\"\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n animate.enter=\"fadeIn\"\n animate.leave=\"fadeOut\"\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n", styles: [":host{position:relative;display:block;width:calc(100% - 128px);overflow:hidden;padding:0 calc(var(--spacer) * 8)}:host .carousel-wrapper{display:block;width:60000px;position:relative;overflow:hidden;margin:0;padding:0}:host .controls{position:absolute;top:calc(50% - 2rem);z-index:6}:host .controls.next{float:right;right:2rem}:host .controls.previous{float:left;left:2rem}:host .dots{text-align:center;margin-top:var(--spacer)}:host .dots .dot{cursor:pointer;width:.75rem;height:.75rem;margin:var(--spacer);background-color:var(--mat-sys-outline-variant);border-radius:50%;display:inline-block;transition:background-color .6s ease}:host .dots .dot.active{background-color:var(--mat-sys-primary)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.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"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
164
157
  }
165
158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatCarouselComponent, decorators: [{
166
159
  type: Component,
167
- args: [{ selector: 'onemrva-mat-carousel', standalone: true, imports: [
168
- MatButtonModule,
169
- MatIconModule,
170
- TranslatePipe,
171
- MatTooltip,
172
- NgStyle,
173
- ], encapsulation: ViewEncapsulation.Emulated, host: {
160
+ args: [{ selector: 'onemrva-mat-carousel', standalone: true, imports: [MatButtonModule, MatIconModule, TranslatePipe, MatTooltip, NgStyle], encapsulation: ViewEncapsulation.Emulated, host: {
174
161
  '(window:resize)': 'onResize($event)',
175
- }, animations: [
176
- trigger('inOutAnimation', [
177
- transition(':enter', [
178
- style({ opacity: 0 }),
179
- animate('1000ms ease-out', style({ opacity: 1 })),
180
- ]),
181
- transition(':leave', [
182
- style({ opacity: 1 }),
183
- animate('1000ms ease-in', style({ opacity: 0 })),
184
- ]),
185
- ]),
186
- ], template: "@if (hasPrev()) {\n <button\n [@inOutAnimation]\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n [@inOutAnimation]\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n", styles: [":host{position:relative;display:block;width:calc(100% - 128px);overflow:hidden;padding:0 calc(var(--spacer) * 8)}:host .carousel-wrapper{display:block;width:60000px;position:relative;overflow:hidden;margin:0;padding:0}:host .controls{position:absolute;top:calc(50% - 2rem);z-index:6}:host .controls.next{float:right;right:2rem}:host .controls.previous{float:left;left:2rem}:host .dots{text-align:center;margin-top:var(--spacer)}:host .dots .dot{cursor:pointer;width:.75rem;height:.75rem;margin:var(--spacer);background-color:var(--mat-sys-outline-variant);border-radius:50%;display:inline-block;transition:background-color .6s ease}:host .dots .dot.active{background-color:var(--mat-sys-primary)}\n"] }]
162
+ }, template: "@if (hasPrev()) {\n <button\n animate.enter=\"fadeIn\"\n animate.leave=\"fadeOut\"\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n animate.enter=\"fadeIn\"\n animate.leave=\"fadeOut\"\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n", styles: [":host{position:relative;display:block;width:calc(100% - 128px);overflow:hidden;padding:0 calc(var(--spacer) * 8)}:host .carousel-wrapper{display:block;width:60000px;position:relative;overflow:hidden;margin:0;padding:0}:host .controls{position:absolute;top:calc(50% - 2rem);z-index:6}:host .controls.next{float:right;right:2rem}:host .controls.previous{float:left;left:2rem}:host .dots{text-align:center;margin-top:var(--spacer)}:host .dots .dot{cursor:pointer;width:.75rem;height:.75rem;margin:var(--spacer);background-color:var(--mat-sys-outline-variant);border-radius:50%;display:inline-block;transition:background-color .6s ease}:host .dots .dot.active{background-color:var(--mat-sys-primary)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}\n"] }]
187
163
  }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => OnemrvaMatCarouselItemComponent), { isSignal: true }] }], carousel: [{ type: i0.ViewChild, args: ['carouselWrapper', { isSignal: true }] }], timing: [{ type: i0.Input, args: [{ isSignal: true, alias: "timing", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], showControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "showControls", required: false }] }], autoplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoplay", required: false }] }], showDots: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDots", required: false }] }] } });
188
164
 
189
165
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"onemrvapublic-design-system-mat-carousel.mjs","sources":["../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.html","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.html","../../../../projects/onemrva/design-system/mat-carousel/onemrvapublic-design-system-mat-carousel.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n TemplateRef,\n inject,\n viewChild,\n signal,\n} from '@angular/core';\n\n@Component({\n selector: 'onemrva-mat-carousel-item',\n standalone: true,\n imports: [],\n templateUrl: './onemrva-mat-carousel-item.component.html',\n styleUrl: './onemrva-mat-carousel-item.component.scss',\n host: {\n '[class.show]': 'show()',\n },\n})\nexport class OnemrvaMatCarouselItemComponent {\n readonly tpl = viewChild.required(TemplateRef);\n\n public nativeElement: HTMLElement;\n\n readonly show = signal(false);\n\n element: ElementRef = inject(ElementRef);\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n}\n","<!--<ng-template>-->\n<!-- <ng-content></ng-content>-->\n<!--</ng-template>-->\n\n<ng-content />\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n inject,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n input,\n contentChildren,\n viewChild,\n} from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { OnemrvaMatCarouselItemComponent } from './mat-carousel-item/onemrva-mat-carousel-item.component';\nimport {\n animate,\n AnimationBuilder,\n AnimationFactory,\n AnimationPlayer,\n style,\n transition,\n trigger,\n} from '@angular/animations';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { interval, Subject, takeUntil } from 'rxjs';\nimport { MatTooltip } from '@angular/material/tooltip';\n\n@Component({\n selector: 'onemrva-mat-carousel',\n standalone: true,\n imports: [\n MatButtonModule,\n MatIconModule,\n TranslatePipe,\n MatTooltip,\n NgStyle,\n ],\n templateUrl: './onemrva-mat-carousel.component.html',\n styleUrl: './onemrva-mat-carousel.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '(window:resize)': 'onResize($event)',\n },\n animations: [\n trigger('inOutAnimation', [\n transition(':enter', [\n style({ opacity: 0 }),\n animate('1000ms ease-out', style({ opacity: 1 })),\n ]),\n transition(':leave', [\n style({ opacity: 1 }),\n animate('1000ms ease-in', style({ opacity: 0 })),\n ]),\n ]),\n ],\n})\nexport class OnemrvaMatCarouselComponent\n implements AfterViewInit, OnInit, OnDestroy\n{\n readonly items = contentChildren(OnemrvaMatCarouselItemComponent);\n\n nativeElement: HTMLElement;\n\n readonly carousel = viewChild.required<ElementRef>('carouselWrapper');\n\n private player?: AnimationPlayer;\n\n readonly timing = input('250ms ease-in');\n readonly gap = input(32);\n readonly padding = input(64);\n readonly showControls = input(true);\n readonly autoplay = input(0);\n readonly showDots = input(true);\n\n public currentSlide = 0;\n carouselWrapperStyle = {};\n\n width = 0;\n destroyed: Subject<any> = new Subject<any>();\n\n builder: AnimationBuilder = inject(AnimationBuilder);\n element: ElementRef = inject(ElementRef);\n renderer: Renderer2 = inject(Renderer2);\n\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n\n ngOnInit() {\n if (this.autoplay() > 0) {\n interval(this.autoplay())\n .pipe(takeUntil(this.destroyed))\n .subscribe(_i => {\n this.next();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroyed.next(null);\n this.destroyed.complete();\n }\n\n onResize(_event: any) {\n this.width = this.nativeElement.offsetWidth - 2 * this.padding();\n this.items().forEach(item => {\n this.renderer.setStyle(item.nativeElement, 'width', `${this.width}px`);\n this.renderer.setStyle(\n item.nativeElement,\n 'margin-right',\n `${this.gap()}px`,\n );\n this.animate();\n });\n this.resize();\n }\n\n buildAnimation(offset: number) {\n return this.builder.build([\n animate(this.timing(), style({ transform: `translateX(-${offset}px)` })),\n ]);\n }\n\n goto(index: number) {\n if (index >= 0 && index < this.items().length) {\n this.currentSlide = index;\n this.animate();\n this.opacify();\n }\n }\n\n next() {\n //if( this.currentSlide + 1 === this.items.length ) return;\n this.currentSlide = (this.currentSlide + 1) % this.items().length;\n this.currentSlide = isNaN(this.currentSlide) ? 1 : this.currentSlide;\n\n this.animate();\n this.opacify();\n }\n\n prev() {\n if (this.currentSlide === 0) return;\n this.currentSlide =\n (this.currentSlide - 1 + this.items().length) % this.items().length;\n this.animate();\n this.opacify();\n }\n\n animate() {\n const offset = this.currentSlide * (this.width + this.gap());\n const myAnimation: AnimationFactory = this.buildAnimation(offset);\n this.player = myAnimation.create(this.carousel().nativeElement);\n this.player.play();\n }\n\n ngAfterViewInit() {\n this.width = this.nativeElement.offsetWidth;\n setTimeout(() => {\n this.onResize(null);\n }, 10);\n this.opacify();\n }\n\n hasPrev() {\n return (\n this.items().length > 0 && this.showControls() && this.currentSlide > 0\n );\n }\n\n hasNext() {\n return (\n this.items().length > 0 &&\n this.showControls() &&\n this.currentSlide < this.items().length - 1\n );\n }\n\n opacify() {\n this.items().forEach((item, index) => {\n if (index !== this.currentSlide) {\n item.nativeElement.className = 'semiTransparent';\n } else {\n item.nativeElement.className = '';\n }\n });\n }\n resize() {\n let biggest = 80;\n\n this.items().forEach(item => {\n item.nativeElement.style.height = 'auto';\n });\n this.items().forEach(item => {\n if (item.nativeElement.offsetHeight > biggest) {\n biggest = item.nativeElement.offsetHeight;\n }\n });\n this.items().forEach(item => {\n item.nativeElement.style.height = biggest + 'px';\n });\n }\n}\n","@if (hasPrev()) {\n <button\n [@inOutAnimation]\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n [@inOutAnimation]\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAmBa,+BAA+B,CAAA;AAQ1C,IAAA,WAAA,GAAA;AAPS,QAAA,IAAA,CAAA,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC;QAIrC,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,KAAK;iFAAC;AAE7B,QAAA,IAAA,CAAA,OAAO,GAAe,MAAM,CAAC,UAAU,CAAC;QAEtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa;IACjD;8GAVW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA/B,+BA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,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElEtE;;AAEG;;;;"}
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-carousel.mjs","sources":["../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.html","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.ts","../../../../projects/onemrva/design-system/mat-carousel/src/onemrva-mat-carousel.component.html","../../../../projects/onemrva/design-system/mat-carousel/onemrvapublic-design-system-mat-carousel.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n TemplateRef,\n inject,\n viewChild,\n signal,\n} from '@angular/core';\n\n@Component({\n selector: 'onemrva-mat-carousel-item',\n standalone: true,\n imports: [],\n templateUrl: './onemrva-mat-carousel-item.component.html',\n styleUrl: './onemrva-mat-carousel-item.component.scss',\n host: {\n '[class.show]': 'show()',\n },\n})\nexport class OnemrvaMatCarouselItemComponent {\n readonly tpl = viewChild.required(TemplateRef);\n\n public nativeElement: HTMLElement;\n\n readonly show = signal(false);\n\n element: ElementRef = inject(ElementRef);\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n}\n","<!--<ng-template>-->\n<!-- <ng-content></ng-content>-->\n<!--</ng-template>-->\n\n<ng-content />\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n inject,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n input,\n contentChildren,\n viewChild,\n} from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { OnemrvaMatCarouselItemComponent } from './mat-carousel-item/onemrva-mat-carousel-item.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { interval, Subject, takeUntil } from 'rxjs';\nimport { MatTooltip } from '@angular/material/tooltip';\n\n@Component({\n selector: 'onemrva-mat-carousel',\n standalone: true,\n imports: [MatButtonModule, MatIconModule, TranslatePipe, MatTooltip, NgStyle],\n templateUrl: './onemrva-mat-carousel.component.html',\n styleUrl: './onemrva-mat-carousel.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '(window:resize)': 'onResize($event)',\n },\n})\nexport class OnemrvaMatCarouselComponent\n implements AfterViewInit, OnInit, OnDestroy\n{\n readonly items = contentChildren(OnemrvaMatCarouselItemComponent);\n\n nativeElement: HTMLElement;\n\n readonly carousel = viewChild.required<ElementRef>('carouselWrapper');\n\n private player?: Animation;\n\n readonly timing = input('250ms ease-in');\n readonly gap = input(32);\n readonly padding = input(64);\n readonly showControls = input(true);\n readonly autoplay = input(0);\n readonly showDots = input(true);\n\n public currentSlide = 0;\n carouselWrapperStyle = {};\n\n width = 0;\n destroyed: Subject<any> = new Subject<any>();\n\n element: ElementRef = inject(ElementRef);\n renderer: Renderer2 = inject(Renderer2);\n\n constructor() {\n this.nativeElement = this.element.nativeElement;\n }\n\n ngOnInit() {\n if (this.autoplay() > 0) {\n interval(this.autoplay())\n .pipe(takeUntil(this.destroyed))\n .subscribe(_i => {\n this.next();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroyed.next(null);\n this.destroyed.complete();\n }\n\n onResize(_event: any) {\n this.width = this.nativeElement.offsetWidth - 2 * this.padding();\n this.items().forEach(item => {\n this.renderer.setStyle(item.nativeElement, 'width', `${this.width}px`);\n this.renderer.setStyle(\n item.nativeElement,\n 'margin-right',\n `${this.gap()}px`,\n );\n this.animate();\n });\n this.resize();\n }\n\n goto(index: number) {\n if (index >= 0 && index < this.items().length) {\n this.currentSlide = index;\n this.animate();\n this.opacify();\n }\n }\n\n next() {\n //if( this.currentSlide + 1 === this.items.length ) return;\n this.currentSlide = (this.currentSlide + 1) % this.items().length;\n this.currentSlide = isNaN(this.currentSlide) ? 1 : this.currentSlide;\n\n this.animate();\n this.opacify();\n }\n\n prev() {\n if (this.currentSlide === 0) return;\n this.currentSlide =\n (this.currentSlide - 1 + this.items().length) % this.items().length;\n this.animate();\n this.opacify();\n }\n\n animate() {\n const offset = this.currentSlide * (this.width + this.gap());\n const timingParts = this.timing().split(' ');\n const duration = timingParts[0];\n const easing = timingParts[1] || 'ease';\n\n const durationMs = duration.endsWith('ms')\n ? parseInt(duration)\n : parseFloat(duration) * 1000;\n\n // this.player = this.carousel().nativeElement.animate(\n // [{ transform: `translateX(-${offset}px)` }],\n // {\n // duration: durationMs,\n // easing: easing,\n // fill: 'forwards',\n // },\n // );\n }\n\n ngAfterViewInit() {\n this.width = this.nativeElement.offsetWidth;\n setTimeout(() => {\n this.onResize(null);\n }, 10);\n this.opacify();\n }\n\n hasPrev() {\n return (\n this.items().length > 0 && this.showControls() && this.currentSlide > 0\n );\n }\n\n hasNext() {\n return (\n this.items().length > 0 &&\n this.showControls() &&\n this.currentSlide < this.items().length - 1\n );\n }\n\n opacify() {\n this.items().forEach((item, index) => {\n if (index !== this.currentSlide) {\n item.nativeElement.className = 'semiTransparent';\n } else {\n item.nativeElement.className = '';\n }\n });\n }\n resize() {\n let biggest = 80;\n\n this.items().forEach(item => {\n item.nativeElement.style.height = 'auto';\n });\n this.items().forEach(item => {\n if (item.nativeElement.offsetHeight > biggest) {\n biggest = item.nativeElement.offsetHeight;\n }\n });\n this.items().forEach(item => {\n item.nativeElement.style.height = biggest + 'px';\n });\n }\n}\n","@if (hasPrev()) {\n <button\n animate.enter=\"fadeIn\"\n animate.leave=\"fadeOut\"\n (click)=\"prev()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.previous' | translate\"\n [matTooltip]=\"'carousel.previous' | translate\"\n class=\"controls previous\"\n >\n <mat-icon class=\"large\">chevron_left</mat-icon>\n </button>\n}\n@if (hasNext()) {\n <button\n animate.enter=\"fadeIn\"\n animate.leave=\"fadeOut\"\n (click)=\"next()\"\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"'carousel.next' | translate\"\n [matTooltip]=\"'carousel.next' | translate\"\n class=\"controls next\"\n >\n <mat-icon class=\"large\">chevron_right</mat-icon>\n </button>\n}\n<section\n class=\"carousel-wrapper\"\n [ngStyle]=\"carouselWrapperStyle\"\n #carouselWrapper\n>\n <ng-content />\n</section>\n\n@if (showDots()) {\n <div class=\"dots\">\n @for (item of items(); track item; let dotidx = $index) {\n <span\n tabindex=\"1\"\n class=\"dot\"\n role=\"button\"\n [attr.aria-label]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [matTooltip]=\"\n ('carousel.goto' | translate) +\n ' ' +\n (dotidx + 1) +\n '/' +\n items().length\n \"\n [class.active]=\"dotidx === currentSlide\"\n (click)=\"goto(dotidx)\"\n ></span>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAmBa,+BAA+B,CAAA;AAQ1C,IAAA,WAAA,GAAA;AAPS,QAAA,IAAA,CAAA,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC;QAIrC,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,KAAK;iFAAC;AAE7B,QAAA,IAAA,CAAA,OAAO,GAAe,MAAM,CAAC,UAAU,CAAC;QAEtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa;IACjD;8GAVW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA/B,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,QAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,KAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EACR,WAAW,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpB/C,uGAKA,EAAA,MAAA,EAAA,CAAA,kJAAA,CAAA,EAAA,CAAA,CAAA;;2FDca,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAV3C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,EAAA,UAAA,EACzB,IAAI,EAAA,OAAA,EACP,EAAE,EAAA,IAAA,EAGL;AACJ,wBAAA,cAAc,EAAE,QAAQ;AACzB,qBAAA,EAAA,QAAA,EAAA,uGAAA,EAAA,MAAA,EAA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AAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvCtE;;AAEG;;;;"}
@@ -9,7 +9,6 @@ import { TranslatePipe, TranslateService, TranslateDirective } from '@ngx-transl
9
9
  import { MatProgressBar } from '@angular/material/progress-bar';
10
10
  import { MatDialog, MatDialogModule } from '@angular/material/dialog';
11
11
  import { BehaviorSubject, of, interval, take, map, catchError, tap, mergeMap, withLatestFrom, filter, throttle, takeWhile, switchMap, forkJoin, merge, Subject } from 'rxjs';
12
- import { trigger, state, style, transition, animate, keyframes } from '@angular/animations';
13
12
  import { ComponentStore } from '@ngrx/component-store';
14
13
  import { HttpEventType, HttpResponse } from '@angular/common/http';
15
14
  import { OnemRvaCDNMimeService } from '@onemrvapublic/design-system/shared';
@@ -680,55 +679,11 @@ class OnemrvaMatFileUploadComponent {
680
679
  });
681
680
  }
682
681
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
683
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaMatFileUploadComponent, isStandalone: true, selector: "onemrva-mat-file-upload", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, numberOfFiles: { classPropertyName: "numberOfFiles", publicName: "numberOfFiles", isSignal: true, isRequired: false, transformFunction: null }, maxTotalFileSize: { classPropertyName: "maxTotalFileSize", publicName: "maxTotalFileSize", isSignal: true, isRequired: false, transformFunction: null }, uploadOnDrop: { classPropertyName: "uploadOnDrop", publicName: "uploadOnDrop", isSignal: true, isRequired: false, transformFunction: null }, initialFiles: { classPropertyName: "initialFiles", publicName: "initialFiles", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hideExtensions: { classPropertyName: "hideExtensions", publicName: "hideExtensions", isSignal: true, isRequired: false, transformFunction: null }, dropFilesHereTextTranslationKey: { classPropertyName: "dropFilesHereTextTranslationKey", publicName: "dropFilesHereTextTranslationKey", isSignal: true, isRequired: false, transformFunction: null }, filePanelTemplate: { classPropertyName: "filePanelTemplate", publicName: "filePanelTemplate", isSignal: true, isRequired: true, transformFunction: null }, dataCy: { classPropertyName: "dataCy", publicName: "dataCy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-cy": "dataCy()" } }, viewQueries: [{ propertyName: "fileDropRef", first: true, predicate: ["fileDropRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (files$ | async; as files) {\n <div\n class=\"onemrva-mat-file-upload-drop-area\"\n appDnd\n (fileDropped)=\"onFileDropped($event)\"\n [class.filein]=\"files.length > 0\"\n >\n <input\n type=\"file\"\n #fileDropRef\n [attr.id]=\"inputId\"\n role=\"button\"\n multiple\n (change)=\"fileBrowseHandler($event)\"\n accept=\"{{ acceptString$ | async }}\"\n />\n @if (numberOfFiles() === 0 || numberOfFiles() > files.length) {\n <div class=\"download-outer\">\n <div class=\"download-icon\">\n <mat-icon class=\"onemrva-upload xxlarge\">download</mat-icon>\n </div>\n\n <div class=\"download-text\">\n {{ dropFilesHereTextTranslationKey() | translate }}\n {{ 'file.upload.or' | translate }}\n <label for=\"{{ inputId }}\" class=\"content\">\n {{ 'file.upload.browse.for.file' | translate }} </label\n ><br />\n @if (maxFileSize() > 0) {\n <span class=\"restrictions\">\n {{ 'file.upload.maximum' | translate }}\n {{ maxFileSizeFormatted }}\n\n @if (accept().length > 0) {\n <span>{{ '| ' }}</span>\n }\n\n {{ acceptString$ | async }}\n </span>\n }\n </div>\n </div>\n }\n <ul class=\"files-list\">\n @for (file of files; track file.id) {\n <li>\n <ng-container\n *ngTemplateOutlet=\"\n filePanelTemplate();\n context: { file, $implicit: file }\n \"\n />\n </li>\n }\n </ul>\n </div>\n @if (fileUploadErrorMessage$ | async; as fileUploadErrorMessage) {\n <mat-error>\n {{\n fileUploadErrorMessage\n | translate\n : {\n limit: numberOfFiles(),\n maxTotalFileSize: formattedSize(maxTotalFileSize()),\n }\n }}\n @if (errorMessage() !== '') {\n [ {{ errorMessage() }} ]\n }\n </mat-error>\n }\n}\n", styles: [":host .mat-mdc-form-field-error{margin-bottom:var(--spacer);padding:var(--spacer) 1em;background-color:var(--mat-sys-error-container);color:var(--mat-sys-on-error-container);border-bottom:1px solid var(--mat-sys-error);display:flex;line-height:1.125rem}:host .mat-mdc-form-field-error:before{font-family:var(--icon-font);content:\"\\e000\";float:left;font-size:1rem;font-variation-settings:\"FILL\" 1;margin-right:var(--spacer);vertical-align:baseline;flex:0 0 var(--double-spacer)}:host ul{list-style:none;margin-block-start:0;margin-block-end:0;margin-inline-start:0;margin-inline-end:0;padding-inline-start:0}:host ul li{width:100%}:host .onemrva-mat-file-upload-drop-area{padding:var(--triple-spacer);text-align:left;border:dashed 2px var(--mat-sys-outline);position:relative;border-radius:var(--border-radius);transition:background-color .3s ease-in-out,border .3s ease-in-out}:host .onemrva-mat-file-upload-drop-area mat-icon{color:var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area.fu-error{border:dashed 2px var(--mat-sys-error)}:host .onemrva-mat-file-upload-drop-area input[type=file]{display:none}:host .onemrva-mat-file-upload-drop-area .download-outer{display:flex;width:100%;margin:0}:host .onemrva-mat-file-upload-drop-area .download-outer .download-icon{padding-right:var(--double-spacer)}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text label{display:block;color:var(--mat-sys-primary);text-decoration:underline;cursor:pointer;font-weight:700}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text .restrictions{display:block;color:var(--mat-sys-on-surface-variant);margin-bottom:0}:host .onemrva-mat-file-upload-drop-area.filein .download-outer{margin:0 0 var(--triple-spacer) 0}:host .onemrva-mat-file-upload-drop-area.fileover{background:var(--mat-sys-primary-container);border:2px dashed var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area .files-list{display:flex;flex-flow:row wrap;gap:var(--double-spacer)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: DndDirective, selector: "[appDnd]", outputs: ["fileDropped"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
684
- trigger('inOutAnimation', [
685
- state('in', style({ opacity: 1 })),
686
- transition(':enter', [
687
- animate(300, keyframes([
688
- style({ opacity: 0, offset: 0 }),
689
- style({ opacity: 0.25, offset: 0.25 }),
690
- style({ opacity: 0.5, offset: 0.5 }),
691
- style({ opacity: 0.75, offset: 0.75 }),
692
- style({ opacity: 1, offset: 1 }),
693
- ])),
694
- ]),
695
- transition(':leave', [
696
- animate(300, keyframes([
697
- style({ opacity: 1, offset: 0 }),
698
- style({ opacity: 0.75, offset: 0.25 }),
699
- style({ opacity: 0.5, offset: 0.5 }),
700
- style({ opacity: 0.25, offset: 0.75 }),
701
- style({ opacity: 0, offset: 1 }),
702
- ])),
703
- ]),
704
- ]),
705
- ] }); }
682
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: OnemrvaMatFileUploadComponent, isStandalone: true, selector: "onemrva-mat-file-upload", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, numberOfFiles: { classPropertyName: "numberOfFiles", publicName: "numberOfFiles", isSignal: true, isRequired: false, transformFunction: null }, maxTotalFileSize: { classPropertyName: "maxTotalFileSize", publicName: "maxTotalFileSize", isSignal: true, isRequired: false, transformFunction: null }, uploadOnDrop: { classPropertyName: "uploadOnDrop", publicName: "uploadOnDrop", isSignal: true, isRequired: false, transformFunction: null }, initialFiles: { classPropertyName: "initialFiles", publicName: "initialFiles", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hideExtensions: { classPropertyName: "hideExtensions", publicName: "hideExtensions", isSignal: true, isRequired: false, transformFunction: null }, dropFilesHereTextTranslationKey: { classPropertyName: "dropFilesHereTextTranslationKey", publicName: "dropFilesHereTextTranslationKey", isSignal: true, isRequired: false, transformFunction: null }, filePanelTemplate: { classPropertyName: "filePanelTemplate", publicName: "filePanelTemplate", isSignal: true, isRequired: true, transformFunction: null }, dataCy: { classPropertyName: "dataCy", publicName: "dataCy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-cy": "dataCy()" } }, viewQueries: [{ propertyName: "fileDropRef", first: true, predicate: ["fileDropRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (files$ | async; as files) {\n <div\n class=\"onemrva-mat-file-upload-drop-area\"\n appDnd\n (fileDropped)=\"onFileDropped($event)\"\n [class.filein]=\"files.length > 0\"\n >\n <input\n type=\"file\"\n #fileDropRef\n [attr.id]=\"inputId\"\n role=\"button\"\n multiple\n (change)=\"fileBrowseHandler($event)\"\n accept=\"{{ acceptString$ | async }}\"\n />\n @if (numberOfFiles() === 0 || numberOfFiles() > files.length) {\n <div class=\"download-outer\">\n <div class=\"download-icon\">\n <mat-icon class=\"onemrva-upload xxlarge\">download</mat-icon>\n </div>\n\n <div class=\"download-text\">\n {{ dropFilesHereTextTranslationKey() | translate }}\n {{ 'file.upload.or' | translate }}\n <label for=\"{{ inputId }}\" class=\"content\">\n {{ 'file.upload.browse.for.file' | translate }} </label\n ><br />\n @if (maxFileSize() > 0) {\n <span class=\"restrictions\">\n {{ 'file.upload.maximum' | translate }}\n {{ maxFileSizeFormatted }}\n\n @if (accept().length > 0) {\n <span>{{ '| ' }}</span>\n }\n\n {{ acceptString$ | async }}\n </span>\n }\n </div>\n </div>\n }\n <ul class=\"files-list\">\n @for (file of files; track file.id) {\n <li>\n <ng-container\n *ngTemplateOutlet=\"\n filePanelTemplate();\n context: { file, $implicit: file }\n \"\n />\n </li>\n }\n </ul>\n </div>\n @if (fileUploadErrorMessage$ | async; as fileUploadErrorMessage) {\n <mat-error>\n {{\n fileUploadErrorMessage\n | translate\n : {\n limit: numberOfFiles(),\n maxTotalFileSize: formattedSize(maxTotalFileSize()),\n }\n }}\n @if (errorMessage() !== '') {\n [ {{ errorMessage() }} ]\n }\n </mat-error>\n }\n}\n", styles: [":host .mat-mdc-form-field-error{margin-bottom:var(--spacer);padding:var(--spacer) 1em;background-color:var(--mat-sys-error-container);color:var(--mat-sys-on-error-container);border-bottom:1px solid var(--mat-sys-error);display:flex;line-height:1.125rem}:host .mat-mdc-form-field-error:before{font-family:var(--icon-font);content:\"\\e000\";float:left;font-size:1rem;font-variation-settings:\"FILL\" 1;margin-right:var(--spacer);vertical-align:baseline;flex:0 0 var(--double-spacer)}:host ul{list-style:none;margin-block-start:0;margin-block-end:0;margin-inline-start:0;margin-inline-end:0;padding-inline-start:0}:host ul li{width:100%}:host .onemrva-mat-file-upload-drop-area{padding:var(--triple-spacer);text-align:left;border:dashed 2px var(--mat-sys-outline);position:relative;border-radius:var(--border-radius);transition:background-color .3s ease-in-out,border .3s ease-in-out}:host .onemrva-mat-file-upload-drop-area mat-icon{color:var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area.fu-error{border:dashed 2px var(--mat-sys-error)}:host .onemrva-mat-file-upload-drop-area input[type=file]{display:none}:host .onemrva-mat-file-upload-drop-area .download-outer{display:flex;width:100%;margin:0}:host .onemrva-mat-file-upload-drop-area .download-outer .download-icon{padding-right:var(--double-spacer)}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text label{display:block;color:var(--mat-sys-primary);text-decoration:underline;cursor:pointer;font-weight:700}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text .restrictions{display:block;color:var(--mat-sys-on-surface-variant);margin-bottom:0}:host .onemrva-mat-file-upload-drop-area.filein .download-outer{margin:0 0 var(--triple-spacer) 0}:host .onemrva-mat-file-upload-drop-area.fileover{background:var(--mat-sys-primary-container);border:2px dashed var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area .files-list{display:flex;flex-flow:row wrap;gap:var(--double-spacer)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: DndDirective, selector: "[appDnd]", outputs: ["fileDropped"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
706
683
  }
707
684
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OnemrvaMatFileUploadComponent, decorators: [{
708
685
  type: Component,
709
- args: [{ selector: 'onemrva-mat-file-upload', standalone: true, animations: [
710
- trigger('inOutAnimation', [
711
- state('in', style({ opacity: 1 })),
712
- transition(':enter', [
713
- animate(300, keyframes([
714
- style({ opacity: 0, offset: 0 }),
715
- style({ opacity: 0.25, offset: 0.25 }),
716
- style({ opacity: 0.5, offset: 0.5 }),
717
- style({ opacity: 0.75, offset: 0.75 }),
718
- style({ opacity: 1, offset: 1 }),
719
- ])),
720
- ]),
721
- transition(':leave', [
722
- animate(300, keyframes([
723
- style({ opacity: 1, offset: 0 }),
724
- style({ opacity: 0.75, offset: 0.25 }),
725
- style({ opacity: 0.5, offset: 0.5 }),
726
- style({ opacity: 0.25, offset: 0.75 }),
727
- style({ opacity: 0, offset: 1 }),
728
- ])),
729
- ]),
730
- ]),
731
- ], imports: [
686
+ args: [{ selector: 'onemrva-mat-file-upload', standalone: true, imports: [
732
687
  AsyncPipe,
733
688
  MatIcon,
734
689
  TranslatePipe,