@ifsworld/granite-components 14.2.1 → 14.2.2

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,8 @@
1
- import { TemplateRef } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
2
2
  import { Carousel, CarouselResponsiveOptions } from 'primeng/carousel';
3
3
  import * as i0 from "@angular/core";
4
- export declare class GraniteCarouselComponent<T> {
4
+ export declare class GraniteCarouselComponent<T> implements OnChanges, AfterViewInit, OnDestroy {
5
+ private cdr;
5
6
  items: T[];
6
7
  responsiveOptions: CarouselResponsiveOptions[];
7
8
  numVisible: number;
@@ -9,11 +10,25 @@ export declare class GraniteCarouselComponent<T> {
9
10
  circular: boolean;
10
11
  prevButtonAriaLabel: string;
11
12
  nextButtonAriaLabel: string;
13
+ shrinkToContent: boolean;
12
14
  itemTemplateRef: TemplateRef<any>;
13
15
  carousel: Carousel;
16
+ visibleItems: T[];
17
+ isOneItemVisible: boolean;
18
+ private resizeObserver;
19
+ constructor(cdr: ChangeDetectorRef);
20
+ ngOnChanges(changes: SimpleChanges): void;
21
+ ngAfterViewInit(): void;
22
+ onResize(): void;
14
23
  onKeyDown(event: KeyboardEvent): void;
15
24
  navForward(event: MouseEvent): void;
16
25
  navBackward(event: MouseEvent): void;
26
+ ngOnDestroy(): void;
27
+ private triggerUpdate;
28
+ private handleResize;
29
+ private getDisplayItems;
30
+ private updateVisibleItems;
31
+ private updateNumVisibleBasedOnWidth;
17
32
  static ɵfac: i0.ɵɵFactoryDeclaration<GraniteCarouselComponent<any>, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<GraniteCarouselComponent<any>, "granite-carousel", never, { "items": { "alias": "items"; "required": false; }; "responsiveOptions": { "alias": "responsiveOptions"; "required": false; }; "numVisible": { "alias": "numVisible"; "required": false; }; "numScroll": { "alias": "numScroll"; "required": false; }; "circular": { "alias": "circular"; "required": false; }; "prevButtonAriaLabel": { "alias": "prevButtonAriaLabel"; "required": false; }; "nextButtonAriaLabel": { "alias": "nextButtonAriaLabel"; "required": false; }; }, {}, ["itemTemplateRef"], never, false, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<GraniteCarouselComponent<any>, "granite-carousel", never, { "items": { "alias": "items"; "required": false; }; "responsiveOptions": { "alias": "responsiveOptions"; "required": false; }; "numVisible": { "alias": "numVisible"; "required": false; }; "numScroll": { "alias": "numScroll"; "required": false; }; "circular": { "alias": "circular"; "required": false; }; "prevButtonAriaLabel": { "alias": "prevButtonAriaLabel"; "required": false; }; "nextButtonAriaLabel": { "alias": "nextButtonAriaLabel"; "required": false; }; "shrinkToContent": { "alias": "shrinkToContent"; "required": false; }; }, {}, ["itemTemplateRef"], never, false, never>;
19
34
  }
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, ContentChild, Input, TemplateRef, ViewChild, } from '@angular/core';
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, HostListener, Input, TemplateRef, ViewChild, } from '@angular/core';
2
2
  import { Carousel } from 'primeng/carousel';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "@angular/common";
@@ -6,14 +6,49 @@ import * as i2 from "primeng/carousel";
6
6
  import * as i3 from "primeng/api";
7
7
  import * as i4 from "@ifsworld/granite-components";
8
8
  export class GraniteCarouselComponent {
9
- constructor() {
9
+ constructor(cdr) {
10
+ this.cdr = cdr;
10
11
  this.items = [];
11
- this.responsiveOptions = [];
12
+ this.responsiveOptions = [
13
+ {
14
+ breakpoint: '1024px',
15
+ numVisible: 3,
16
+ numScroll: 1,
17
+ },
18
+ {
19
+ breakpoint: '768px',
20
+ numVisible: 2,
21
+ numScroll: 1,
22
+ },
23
+ {
24
+ breakpoint: '560px',
25
+ numVisible: 1,
26
+ numScroll: 1,
27
+ },
28
+ ];
12
29
  this.numVisible = 1;
13
30
  this.numScroll = 1;
14
31
  this.circular = false;
15
32
  this.prevButtonAriaLabel = 'Previous page';
16
33
  this.nextButtonAriaLabel = 'Next page';
34
+ this.shrinkToContent = false;
35
+ this.visibleItems = [];
36
+ this.isOneItemVisible = false;
37
+ }
38
+ ngOnChanges(changes) {
39
+ if (changes['items'] && changes['items'].currentValue) {
40
+ this.items = changes['items'].currentValue;
41
+ this.triggerUpdate();
42
+ }
43
+ }
44
+ ngAfterViewInit() {
45
+ this.resizeObserver = new ResizeObserver((entries) => {
46
+ this.handleResize(entries);
47
+ });
48
+ this.resizeObserver.observe(this.carousel?.el?.nativeElement);
49
+ }
50
+ onResize() {
51
+ this.triggerUpdate();
17
52
  }
18
53
  onKeyDown(event) {
19
54
  const mouseEvent = new MouseEvent('click', { cancelable: true });
@@ -30,13 +65,67 @@ export class GraniteCarouselComponent {
30
65
  navBackward(event) {
31
66
  this.carousel?.navBackward(event);
32
67
  }
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
34
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: GraniteCarouselComponent, selector: "granite-carousel", inputs: { items: "items", responsiveOptions: "responsiveOptions", numVisible: "numVisible", numScroll: "numScroll", circular: "circular", prevButtonAriaLabel: "prevButtonAriaLabel", nextButtonAriaLabel: "nextButtonAriaLabel" }, queries: [{ propertyName: "itemTemplateRef", first: true, predicate: ["itemTemplate"], descendants: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true }], ngImport: i0, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"items\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.Carousel, selector: "p-carousel", inputs: ["page", "numVisible", "numScroll", "responsiveOptions", "orientation", "verticalViewPortHeight", "contentClass", "indicatorsContentClass", "indicatorsContentStyle", "indicatorStyleClass", "indicatorStyle", "value", "circular", "showIndicators", "showNavigators", "autoplayInterval", "style", "styleClass"], outputs: ["onPage"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i4.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
68
+ ngOnDestroy() {
69
+ this.resizeObserver?.disconnect();
70
+ }
71
+ triggerUpdate() {
72
+ if (this.carousel?.el?.nativeElement) {
73
+ const containerWidth = this.carousel.el.nativeElement.offsetWidth;
74
+ this.updateNumVisibleBasedOnWidth(containerWidth);
75
+ }
76
+ else {
77
+ this.updateVisibleItems();
78
+ }
79
+ }
80
+ handleResize(entries) {
81
+ entries.forEach((entry) => {
82
+ if (entry.contentRect) {
83
+ const containerWidth = entry.contentRect.width;
84
+ this.updateNumVisibleBasedOnWidth(containerWidth);
85
+ }
86
+ });
87
+ }
88
+ getDisplayItems(items, numVisible) {
89
+ const placeholders = Array(Math.max(0, numVisible - items.length)).fill({
90
+ placeholder: true,
91
+ });
92
+ return [...items, ...placeholders];
93
+ }
94
+ updateVisibleItems() {
95
+ if (!this.items || !this.carousel)
96
+ return;
97
+ const numVisible = this.carousel.numVisible || this.numVisible;
98
+ this.visibleItems = this.getDisplayItems(this.items, numVisible);
99
+ this.cdr.markForCheck();
100
+ }
101
+ updateNumVisibleBasedOnWidth(containerWidth) {
102
+ if (!this.carousel)
103
+ return;
104
+ let matched = false;
105
+ const sortedResponsiveOptions = [...this.responsiveOptions].sort((a, b) => parseInt(a.breakpoint) - parseInt(b.breakpoint));
106
+ if (containerWidth) {
107
+ for (const option of sortedResponsiveOptions) {
108
+ const breakpoint = parseInt(option.breakpoint);
109
+ if (containerWidth <= breakpoint) {
110
+ this.carousel.numVisible = option.numVisible;
111
+ this.isOneItemVisible = option.numVisible === 1;
112
+ matched = true;
113
+ break;
114
+ }
115
+ }
116
+ }
117
+ if (!matched) {
118
+ this.carousel.numVisible = this.numVisible;
119
+ }
120
+ this.updateVisibleItems();
121
+ }
122
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteCarouselComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
123
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: GraniteCarouselComponent, selector: "granite-carousel", inputs: { items: "items", responsiveOptions: "responsiveOptions", numVisible: "numVisible", numScroll: "numScroll", circular: "circular", prevButtonAriaLabel: "prevButtonAriaLabel", nextButtonAriaLabel: "nextButtonAriaLabel", shrinkToContent: "shrinkToContent" }, host: { listeners: { "window:resize": "onResize()" } }, queries: [{ propertyName: "itemTemplateRef", first: true, predicate: ["itemTemplate"], descendants: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"visibleItems\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n [class.auto-width]=\"shrinkToContent\"\n [class.is-one-item]=\"isOneItemVisible\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\" *ngIf=\"!item.placeholder\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}::ng-deep .auto-width .p-carousel-item{flex:0 0 auto!important}::ng-deep .is-one-item .p-carousel-item{flex:1 0 100%!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.Carousel, selector: "p-carousel", inputs: ["page", "numVisible", "numScroll", "responsiveOptions", "orientation", "verticalViewPortHeight", "contentClass", "indicatorsContentClass", "indicatorsContentStyle", "indicatorStyleClass", "indicatorStyle", "value", "circular", "showIndicators", "showNavigators", "autoplayInterval", "style", "styleClass"], outputs: ["onPage"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i4.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
35
124
  }
36
125
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteCarouselComponent, decorators: [{
37
126
  type: Component,
38
- args: [{ selector: 'granite-carousel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"items\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}\n"] }]
39
- }], propDecorators: { items: [{
127
+ args: [{ selector: 'granite-carousel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"visibleItems\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n [class.auto-width]=\"shrinkToContent\"\n [class.is-one-item]=\"isOneItemVisible\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\" *ngIf=\"!item.placeholder\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}::ng-deep .auto-width .p-carousel-item{flex:0 0 auto!important}::ng-deep .is-one-item .p-carousel-item{flex:1 0 100%!important}\n"] }]
128
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { items: [{
40
129
  type: Input
41
130
  }], responsiveOptions: [{
42
131
  type: Input
@@ -50,11 +139,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
50
139
  type: Input
51
140
  }], nextButtonAriaLabel: [{
52
141
  type: Input
142
+ }], shrinkToContent: [{
143
+ type: Input
53
144
  }], itemTemplateRef: [{
54
145
  type: ContentChild,
55
146
  args: ['itemTemplate', { static: false }]
56
147
  }], carousel: [{
57
148
  type: ViewChild,
58
149
  args: ['carousel']
150
+ }], onResize: [{
151
+ type: HostListener,
152
+ args: ['window:resize']
59
153
  }] } });
60
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fyb3VzZWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9ncmFuaXRlLWNvbXBvbmVudHMvY2Fyb3VzZWwvc3JjL2xpYi9jYXJvdXNlbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2dyYW5pdGUtY29tcG9uZW50cy9jYXJvdXNlbC9zcmMvbGliL2Nhcm91c2VsLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFlBQVksRUFDWixLQUFLLEVBQ0wsV0FBVyxFQUNYLFNBQVMsR0FDVixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsUUFBUSxFQUE2QixNQUFNLGtCQUFrQixDQUFDOzs7Ozs7QUFRdkUsTUFBTSxPQUFPLHdCQUF3QjtJQU5yQztRQVFFLFVBQUssR0FBUSxFQUFFLENBQUM7UUFHaEIsc0JBQWlCLEdBQWdDLEVBQUUsQ0FBQztRQUdwRCxlQUFVLEdBQVcsQ0FBQyxDQUFDO1FBR3ZCLGNBQVMsR0FBVyxDQUFDLENBQUM7UUFHdEIsYUFBUSxHQUFZLEtBQUssQ0FBQztRQUcxQix3QkFBbUIsR0FB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InNocmlua1RvQ29udGVudFwiXG4gICAgW2NsYXNzLmlzLW9uZS1pdGVtXT1cImlzT25lSXRlbVZpc2libGVcIlxuICAgIChrZXlkb3duKT1cIm9uS2V5RG93bigkZXZlbnQpXCJcbiAgICB0YWJpbmRleD1cIjBcIlxuICA+XG4gICAgPG5nLXRlbXBsYXRlIGxldC1pdGVtIHBUZW1wbGF0ZT1cIml0ZW1cIj5cbiAgICAgIDxkaXYgY2xhc3M9XCJpdGVtLXRlbXBsYXRlLXdyYXBwZXJcIiAqbmdJZj1cIiFpdGVtLnBsYWNlaG9sZGVyXCI+XG4gICAgICAgIDxuZy1jb250YWluZXJcbiAgICAgICAgICAqbmdUZW1wbGF0ZU91dGxldD1cIml0ZW1UZW1wbGF0ZVJlZjsgY29udGV4dDogeyAkaW1wbGljaXQ6IGl0ZW0gfVwiXG4gICAgICAgID48L25nLWNvbnRhaW5lcj5cbiAgICAgIDwvZGl2PlxuICAgIDwvbmctdGVtcGxhdGU+XG4gIDwvcC1jYXJvdXNlbD5cblxuICA8YnV0dG9uXG4gICAgZ3Jhbml0ZUZsYXRCdXR0b25cbiAgICBjbGFzcz1cImFycm93LWJ0blwiXG4gICAgW2Rpc2FibGVkXT1cImNhcm91c2VsLmlzRm9yd2FyZE5hdkRpc2FibGVkKClcIlxuICAgIFthdHRyLmFyaWEtbGFiZWxdPVwibmV4dEJ1dHRvbkFyaWFMYWJlbFwiXG4gICAgKGNsaWNrKT1cIm5hdkZvcndhcmQoJGV2ZW50KVwiXG4gID5cbiAgICA8Z3Jhbml0ZS1pY29uIGZvbnRJY29uPVwiaWNvbi1jYXJldC1yaWdodFwiPjwvZ3Jhbml0ZS1pY29uPlxuICA8L2J1dHRvbj5cbjwvZGl2PlxuIl19
@@ -130,7 +130,7 @@ export class GraniteFileUploadComponent {
130
130
  return `${parseFloat((bytes / Math.pow(bytesPerKB, exp)).toFixed(decimalPoints))} ${fileSizes[exp]}`;
131
131
  }
132
132
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
133
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: GraniteFileUploadComponent, selector: "granite-file-upload", inputs: { accept: "accept", uploadTitle: "uploadTitle", uploadIcon: "uploadIcon", browseIcon: "browseIcon", dropZoneText: "dropZoneText", browseButtonText: "browseButtonText", dropPlaceholderText: "dropPlaceholderText", dropZoneHint: "dropZoneHint", removeButtonText: "removeButtonText", uploadButtonText: "uploadButtonText", retryButtonText: "retryButtonText", cancelButtonText: "cancelButtonText", multiFileUpload: "multiFileUpload", responsiveOptions: "responsiveOptions", uploadStatus: "uploadStatus", autoUpload: "autoUpload" }, outputs: { browseOrDragFiles: "browseOrDragFiles", removeFiles: "removeFiles", filesUpload: "filesUpload", fileUploadValidation: "fileUploadValidation" }, viewQueries: [{ propertyName: "fileDropRef", first: true, predicate: ["fileDropRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"file-upload-wrapper\">\n <h2 class=\"file-upload-title\">{{ uploadTitle }}</h2>\n <div\n class=\"file-dropzone\"\n [ngClass]=\"{ 'upload-failed': uploadStatus === FileUploadStatus.Failed }\"\n graniteFileDragAndDrop\n (droppedFiles)=\"onFilesDropHandler($event)\"\n (isFileOver)=\"onFileOverDropzone($event)\"\n (fileUploadValidation)=\"onFileDropError($event)\"\n [multiFileUploadEnabled]=\"multiFileUpload\"\n [accept]=\"accept\"\n [currentFiles]=\"selectedFiles\"\n >\n <input\n class=\"file-input\"\n #fileDropRef\n type=\"file\"\n title=\"fileUpload\"\n (change)=\"fileBrowseHandler($event)\"\n [multiple]=\"multiFileUpload\"\n [accept]=\"accept\"\n />\n <div class=\"file-upload-body\">\n @if (!isFileOnDropzone && !fileError) {\n @switch (previewReadyFiles.length) {\n @case (0) {\n <div class=\"file-upload-browse\">\n <granite-icon\n class=\"file-upload-icon\"\n [fontIcon]=\"uploadIcon\"\n ></granite-icon>\n <div class=\"file-selection\">\n <h2 class=\"file-upload-body-text\">{{ dropZoneText }}</h2>\n <button\n class=\"file-select-button\"\n graniteButton\n (click)=\"fileDropRef.click()\"\n >\n <granite-icon\n class=\"browse-button-icon\"\n [fontIcon]=\"browseIcon\"\n ></granite-icon>\n <div class=\"browse-button-text\">{{ browseButtonText }}</div>\n </button>\n </div>\n <p *ngIf=\"dropZoneHint\" class=\"file-upload-hint\">\n {{ dropZoneHint }}\n </p>\n </div>\n }\n @case (1) {\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewReadyFiles[0] }\n \"\n ></ng-container>\n }\n @default {\n <granite-carousel\n [items]=\"previewReadyFiles\"\n [numVisible]=\"numVisible\"\n [responsiveOptions]=\"responsiveOptions\"\n >\n <ng-template let-previewFile #itemTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewFile }\n \"\n ></ng-container>\n </ng-template>\n </granite-carousel>\n }\n }\n } @else {\n <p class=\"drop-area-placeholder\">\n {{ dropPlaceholderText }}\n </p>\n }\n </div>\n </div>\n <div class=\"file-upload-footer\">\n <div class=\"footer-container\" *ngIf=\"previewReadyFiles.length > 0\">\n <button\n *ngIf=\"!autoUpload && uploadStatus === FileUploadStatus.NotStarted\"\n granitePrimaryButton\n (click)=\"uploadFiles()\"\n >\n {{ uploadButtonText }}\n </button>\n <ng-container *ngIf=\"uploadStatus === FileUploadStatus.Failed\">\n <button graniteButton (click)=\"cancelUpload()\">\n {{ cancelButtonText }}\n </button>\n <button\n class=\"retry-upload-button\"\n granitePrimaryButton\n (click)=\"retryUpload()\"\n >\n {{ retryButtonText }}\n </button>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #uploadingOverlay>\n <div class=\"file-preview-overlay\"></div>\n <div class=\"loading-container\">\n <div class=\"uploading-spinner\"></div>\n </div>\n</ng-template>\n\n<ng-template #uploadFailedOverlay>\n <div class=\"file-preview-overlay\"></div>\n</ng-template>\n\n<ng-template #filePreviewTemplate let-previewFile=\"previewFile\">\n <div class=\"file-preview-container\">\n @if (previewFile?.imageUrl) {\n <a\n class=\"file-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n [href]=\"previewFile?.imageUrl\"\n target=\"_blank\"\n >\n <div class=\"file-preview-holder\">\n <img\n role=\"presentation\"\n [src]=\"previewFile?.imageUrl\"\n [alt]=\"previewFile?.file?.name\"\n />\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.Failed\"\n [ngTemplateOutlet]=\"uploadFailedOverlay\"\n >\n </ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </a>\n } @else {\n <div\n class=\"document-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n >\n <div class=\"document-preview-holder\">\n <granite-icon\n class=\"document-file-preview\"\n [class.upload-failed]=\"uploadStatus === FileUploadStatus.Failed\"\n [fontIcon]=\"'icon-document-alt'\"\n ></granite-icon>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </div>\n }\n <button\n graniteButton\n *ngIf=\"\n [FileUploadStatus.Completed, FileUploadStatus.NotStarted].includes(\n uploadStatus\n )\n \"\n (click)=\"fileRemoveHandler(previewFile)\"\n >\n {{ removeButtonText }}\n </button>\n </div>\n</ng-template>\n", styles: [":host{width:100%}.file-upload-wrapper{display:flex;flex-direction:column;background-color:var(--granite-color-background);box-shadow:var(--granite-shadow-s);height:100%;width:100%}.file-upload-wrapper .file-upload-title{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-medium);font-weight:var(--granite-font-weight-bold);line-height:var(--granite-line-height-base-rem);color:var(--granite-color-text-weak);margin:0;padding:var(--granite-spacing-8) calc(var(--granite-spacing-16) * .813)}.file-upload-wrapper .file-dropzone{display:flex;flex-direction:column;border-width:var(--granite-border-width-focus);border-style:dashed;border-color:var(--granite-color-background-selected);border-radius:var(--granite-radius-m);margin:var(--granite-spacing-8);height:100%}.file-upload-wrapper .file-dropzone.upload-failed{border-color:var(--granite-color-categorical-4)}.file-upload-wrapper .file-dropzone.file-error{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-failure);border-color:var(--granite-color-state-error);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-error .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone.file-over{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-info);border-color:var(--granite-color-background-active);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-over .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone .file-input{opacity:0;position:absolute;width:0}.file-upload-wrapper .file-dropzone .file-upload-body{display:flex;align-items:center;justify-content:center;height:100%}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse{display:flex;flex-direction:column;gap:var(--granite-spacing-4);justify-content:center;align-items:center;padding:0 var(--granite-spacing-16)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-icon{font-size:var(--granite-font-size-display-small);color:var(--granite-color-text)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection{display:flex;justify-content:space-between;align-items:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-upload-body-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;width:100%;margin-inline-end:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button{display:flex;justify-content:space-between;align-items:center;color:var(--granite-color-text-link);padding-top:calc(var(--granite-spacing-24) / 4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-icon{font-size:var(--granite-font-size-body);color:var(--granite-color-text-link);margin-inline-end:var(--granite-spacing-4);padding:0}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-flowing) / 2);margin-top:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-icon,.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-text{color:var(--granite-color-text-inverse)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-hint{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * 1.125);text-align:center;color:var(--granite-color-text-hint);margin:calc(var(--granite-spacing-base-rem) * .625) 0 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container{display:flex;flex-direction:column;align-items:center;width:100%;max-height:100%;padding:calc(var(--granite-spacing-base-rem) * .375)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-size{text-decoration:underline}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:80px;height:114px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder img{width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(250%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .file-preview-overlay{position:absolute;top:0;inset-inline-start:0;width:100%;height:100%;pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder img{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.2}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder img,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-link);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-link);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:60px;height:60px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview{font-size:calc(var(--granite-font-size-body) * 3);color:var(--granite-color-text-hint);padding:calc(var(--granite-spacing-4) * 3) 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview.upload-failed{color:var(--granite-color-background-failure)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-10%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .document-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .document-file-preview,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-weak);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-week);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-upload-footer{margin-inline:var(--granite-spacing-8);margin-bottom:var(--granite-spacing-8)}.file-upload-wrapper .file-upload-footer .footer-container{display:flex;justify-content:flex-end;align-items:center}.file-upload-wrapper .file-upload-footer .footer-container .retry-upload-button{margin-inline-start:var(--granite-spacing-8)}@keyframes loading-keyframe{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i2.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: i3.GraniteCarouselComponent, selector: "granite-carousel", inputs: ["items", "responsiveOptions", "numVisible", "numScroll", "circular", "prevButtonAriaLabel", "nextButtonAriaLabel"] }, { kind: "directive", type: i4.GraniteFileDragAndDropDirective, selector: "[graniteFileDragAndDrop]", inputs: ["multiFileUploadEnabled", "accept", "currentFiles"], outputs: ["droppedFiles", "isFileOver", "fileUploadValidation"], exportAs: ["graniteFileDragAndDrop"] }] }); }
133
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: GraniteFileUploadComponent, selector: "granite-file-upload", inputs: { accept: "accept", uploadTitle: "uploadTitle", uploadIcon: "uploadIcon", browseIcon: "browseIcon", dropZoneText: "dropZoneText", browseButtonText: "browseButtonText", dropPlaceholderText: "dropPlaceholderText", dropZoneHint: "dropZoneHint", removeButtonText: "removeButtonText", uploadButtonText: "uploadButtonText", retryButtonText: "retryButtonText", cancelButtonText: "cancelButtonText", multiFileUpload: "multiFileUpload", responsiveOptions: "responsiveOptions", uploadStatus: "uploadStatus", autoUpload: "autoUpload" }, outputs: { browseOrDragFiles: "browseOrDragFiles", removeFiles: "removeFiles", filesUpload: "filesUpload", fileUploadValidation: "fileUploadValidation" }, viewQueries: [{ propertyName: "fileDropRef", first: true, predicate: ["fileDropRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"file-upload-wrapper\">\n <h2 class=\"file-upload-title\">{{ uploadTitle }}</h2>\n <div\n class=\"file-dropzone\"\n [ngClass]=\"{ 'upload-failed': uploadStatus === FileUploadStatus.Failed }\"\n graniteFileDragAndDrop\n (droppedFiles)=\"onFilesDropHandler($event)\"\n (isFileOver)=\"onFileOverDropzone($event)\"\n (fileUploadValidation)=\"onFileDropError($event)\"\n [multiFileUploadEnabled]=\"multiFileUpload\"\n [accept]=\"accept\"\n [currentFiles]=\"selectedFiles\"\n >\n <input\n class=\"file-input\"\n #fileDropRef\n type=\"file\"\n title=\"fileUpload\"\n (change)=\"fileBrowseHandler($event)\"\n [multiple]=\"multiFileUpload\"\n [accept]=\"accept\"\n />\n <div class=\"file-upload-body\">\n @if (!isFileOnDropzone && !fileError) {\n @switch (previewReadyFiles.length) {\n @case (0) {\n <div class=\"file-upload-browse\">\n <granite-icon\n class=\"file-upload-icon\"\n [fontIcon]=\"uploadIcon\"\n ></granite-icon>\n <div class=\"file-selection\">\n <h2 class=\"file-upload-body-text\">{{ dropZoneText }}</h2>\n <button\n class=\"file-select-button\"\n graniteButton\n (click)=\"fileDropRef.click()\"\n >\n <granite-icon\n class=\"browse-button-icon\"\n [fontIcon]=\"browseIcon\"\n ></granite-icon>\n <div class=\"browse-button-text\">{{ browseButtonText }}</div>\n </button>\n </div>\n <p *ngIf=\"dropZoneHint\" class=\"file-upload-hint\">\n {{ dropZoneHint }}\n </p>\n </div>\n }\n @case (1) {\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewReadyFiles[0] }\n \"\n ></ng-container>\n }\n @default {\n <granite-carousel\n [items]=\"previewReadyFiles\"\n [numVisible]=\"numVisible\"\n [responsiveOptions]=\"responsiveOptions\"\n >\n <ng-template let-previewFile #itemTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewFile }\n \"\n ></ng-container>\n </ng-template>\n </granite-carousel>\n }\n }\n } @else {\n <p class=\"drop-area-placeholder\">\n {{ dropPlaceholderText }}\n </p>\n }\n </div>\n </div>\n <div class=\"file-upload-footer\">\n <div class=\"footer-container\" *ngIf=\"previewReadyFiles.length > 0\">\n <button\n *ngIf=\"!autoUpload && uploadStatus === FileUploadStatus.NotStarted\"\n granitePrimaryButton\n (click)=\"uploadFiles()\"\n >\n {{ uploadButtonText }}\n </button>\n <ng-container *ngIf=\"uploadStatus === FileUploadStatus.Failed\">\n <button graniteButton (click)=\"cancelUpload()\">\n {{ cancelButtonText }}\n </button>\n <button\n class=\"retry-upload-button\"\n granitePrimaryButton\n (click)=\"retryUpload()\"\n >\n {{ retryButtonText }}\n </button>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #uploadingOverlay>\n <div class=\"file-preview-overlay\"></div>\n <div class=\"loading-container\">\n <div class=\"uploading-spinner\"></div>\n </div>\n</ng-template>\n\n<ng-template #uploadFailedOverlay>\n <div class=\"file-preview-overlay\"></div>\n</ng-template>\n\n<ng-template #filePreviewTemplate let-previewFile=\"previewFile\">\n <div class=\"file-preview-container\">\n @if (previewFile?.imageUrl) {\n <a\n class=\"file-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n [href]=\"previewFile?.imageUrl\"\n target=\"_blank\"\n >\n <div class=\"file-preview-holder\">\n <img\n role=\"presentation\"\n [src]=\"previewFile?.imageUrl\"\n [alt]=\"previewFile?.file?.name\"\n />\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.Failed\"\n [ngTemplateOutlet]=\"uploadFailedOverlay\"\n >\n </ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </a>\n } @else {\n <div\n class=\"document-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n >\n <div class=\"document-preview-holder\">\n <granite-icon\n class=\"document-file-preview\"\n [class.upload-failed]=\"uploadStatus === FileUploadStatus.Failed\"\n [fontIcon]=\"'icon-document-alt'\"\n ></granite-icon>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </div>\n }\n <button\n graniteButton\n *ngIf=\"\n [FileUploadStatus.Completed, FileUploadStatus.NotStarted].includes(\n uploadStatus\n )\n \"\n (click)=\"fileRemoveHandler(previewFile)\"\n >\n {{ removeButtonText }}\n </button>\n </div>\n</ng-template>\n", styles: [":host{width:100%}.file-upload-wrapper{display:flex;flex-direction:column;background-color:var(--granite-color-background);box-shadow:var(--granite-shadow-s);height:100%;width:100%}.file-upload-wrapper .file-upload-title{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-medium);font-weight:var(--granite-font-weight-bold);line-height:var(--granite-line-height-base-rem);color:var(--granite-color-text-weak);margin:0;padding:var(--granite-spacing-8) calc(var(--granite-spacing-16) * .813)}.file-upload-wrapper .file-dropzone{display:flex;flex-direction:column;border-width:var(--granite-border-width-focus);border-style:dashed;border-color:var(--granite-color-background-selected);border-radius:var(--granite-radius-m);margin:var(--granite-spacing-8);height:100%}.file-upload-wrapper .file-dropzone.upload-failed{border-color:var(--granite-color-categorical-4)}.file-upload-wrapper .file-dropzone.file-error{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-failure);border-color:var(--granite-color-state-error);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-error .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone.file-over{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-info);border-color:var(--granite-color-background-active);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-over .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone .file-input{opacity:0;position:absolute;width:0}.file-upload-wrapper .file-dropzone .file-upload-body{display:flex;align-items:center;justify-content:center;height:100%}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse{display:flex;flex-direction:column;gap:var(--granite-spacing-4);justify-content:center;align-items:center;padding:0 var(--granite-spacing-16)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-icon{font-size:var(--granite-font-size-display-small);color:var(--granite-color-text)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection{display:flex;justify-content:space-between;align-items:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-upload-body-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;width:100%;margin-inline-end:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button{display:flex;justify-content:space-between;align-items:center;color:var(--granite-color-text-link);padding-top:calc(var(--granite-spacing-24) / 4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-icon{font-size:var(--granite-font-size-body);color:var(--granite-color-text-link);margin-inline-end:var(--granite-spacing-4);padding:0}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-flowing) / 2);margin-top:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-icon,.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-text{color:var(--granite-color-text-inverse)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-hint{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * 1.125);text-align:center;color:var(--granite-color-text-hint);margin:calc(var(--granite-spacing-base-rem) * .625) 0 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container{display:flex;flex-direction:column;align-items:center;width:100%;max-height:100%;padding:calc(var(--granite-spacing-base-rem) * .375)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-size{text-decoration:underline}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:80px;height:114px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder img{width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(250%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .file-preview-overlay{position:absolute;top:0;inset-inline-start:0;width:100%;height:100%;pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder img{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.2}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder img,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-link);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-link);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:60px;height:60px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview{font-size:calc(var(--granite-font-size-body) * 3);color:var(--granite-color-text-hint);padding:calc(var(--granite-spacing-4) * 3) 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview.upload-failed{color:var(--granite-color-background-failure)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-10%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .document-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .document-file-preview,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-weak);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-week);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-upload-footer{margin-inline:var(--granite-spacing-8);margin-bottom:var(--granite-spacing-8)}.file-upload-wrapper .file-upload-footer .footer-container{display:flex;justify-content:flex-end;align-items:center}.file-upload-wrapper .file-upload-footer .footer-container .retry-upload-button{margin-inline-start:var(--granite-spacing-8)}@keyframes loading-keyframe{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i2.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: i3.GraniteCarouselComponent, selector: "granite-carousel", inputs: ["items", "responsiveOptions", "numVisible", "numScroll", "circular", "prevButtonAriaLabel", "nextButtonAriaLabel", "shrinkToContent"] }, { kind: "directive", type: i4.GraniteFileDragAndDropDirective, selector: "[graniteFileDragAndDrop]", inputs: ["multiFileUploadEnabled", "accept", "currentFiles"], outputs: ["droppedFiles", "isFileOver", "fileUploadValidation"], exportAs: ["graniteFileDragAndDrop"] }] }); }
134
134
  }
135
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteFileUploadComponent, decorators: [{
136
136
  type: Component,
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, ContentChild, ViewChild, NgModule } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, ContentChild, ViewChild, HostListener, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from 'primeng/carousel';
@@ -9,14 +9,49 @@ import * as i4 from '@ifsworld/granite-components';
9
9
  import { GraniteButtonModule, GraniteIconModule } from '@ifsworld/granite-components';
10
10
 
11
11
  class GraniteCarouselComponent {
12
- constructor() {
12
+ constructor(cdr) {
13
+ this.cdr = cdr;
13
14
  this.items = [];
14
- this.responsiveOptions = [];
15
+ this.responsiveOptions = [
16
+ {
17
+ breakpoint: '1024px',
18
+ numVisible: 3,
19
+ numScroll: 1,
20
+ },
21
+ {
22
+ breakpoint: '768px',
23
+ numVisible: 2,
24
+ numScroll: 1,
25
+ },
26
+ {
27
+ breakpoint: '560px',
28
+ numVisible: 1,
29
+ numScroll: 1,
30
+ },
31
+ ];
15
32
  this.numVisible = 1;
16
33
  this.numScroll = 1;
17
34
  this.circular = false;
18
35
  this.prevButtonAriaLabel = 'Previous page';
19
36
  this.nextButtonAriaLabel = 'Next page';
37
+ this.shrinkToContent = false;
38
+ this.visibleItems = [];
39
+ this.isOneItemVisible = false;
40
+ }
41
+ ngOnChanges(changes) {
42
+ if (changes['items'] && changes['items'].currentValue) {
43
+ this.items = changes['items'].currentValue;
44
+ this.triggerUpdate();
45
+ }
46
+ }
47
+ ngAfterViewInit() {
48
+ this.resizeObserver = new ResizeObserver((entries) => {
49
+ this.handleResize(entries);
50
+ });
51
+ this.resizeObserver.observe(this.carousel?.el?.nativeElement);
52
+ }
53
+ onResize() {
54
+ this.triggerUpdate();
20
55
  }
21
56
  onKeyDown(event) {
22
57
  const mouseEvent = new MouseEvent('click', { cancelable: true });
@@ -33,13 +68,67 @@ class GraniteCarouselComponent {
33
68
  navBackward(event) {
34
69
  this.carousel?.navBackward(event);
35
70
  }
36
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
37
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: GraniteCarouselComponent, selector: "granite-carousel", inputs: { items: "items", responsiveOptions: "responsiveOptions", numVisible: "numVisible", numScroll: "numScroll", circular: "circular", prevButtonAriaLabel: "prevButtonAriaLabel", nextButtonAriaLabel: "nextButtonAriaLabel" }, queries: [{ propertyName: "itemTemplateRef", first: true, predicate: ["itemTemplate"], descendants: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true }], ngImport: i0, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"items\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.Carousel, selector: "p-carousel", inputs: ["page", "numVisible", "numScroll", "responsiveOptions", "orientation", "verticalViewPortHeight", "contentClass", "indicatorsContentClass", "indicatorsContentStyle", "indicatorStyleClass", "indicatorStyle", "value", "circular", "showIndicators", "showNavigators", "autoplayInterval", "style", "styleClass"], outputs: ["onPage"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i4.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
71
+ ngOnDestroy() {
72
+ this.resizeObserver?.disconnect();
73
+ }
74
+ triggerUpdate() {
75
+ if (this.carousel?.el?.nativeElement) {
76
+ const containerWidth = this.carousel.el.nativeElement.offsetWidth;
77
+ this.updateNumVisibleBasedOnWidth(containerWidth);
78
+ }
79
+ else {
80
+ this.updateVisibleItems();
81
+ }
82
+ }
83
+ handleResize(entries) {
84
+ entries.forEach((entry) => {
85
+ if (entry.contentRect) {
86
+ const containerWidth = entry.contentRect.width;
87
+ this.updateNumVisibleBasedOnWidth(containerWidth);
88
+ }
89
+ });
90
+ }
91
+ getDisplayItems(items, numVisible) {
92
+ const placeholders = Array(Math.max(0, numVisible - items.length)).fill({
93
+ placeholder: true,
94
+ });
95
+ return [...items, ...placeholders];
96
+ }
97
+ updateVisibleItems() {
98
+ if (!this.items || !this.carousel)
99
+ return;
100
+ const numVisible = this.carousel.numVisible || this.numVisible;
101
+ this.visibleItems = this.getDisplayItems(this.items, numVisible);
102
+ this.cdr.markForCheck();
103
+ }
104
+ updateNumVisibleBasedOnWidth(containerWidth) {
105
+ if (!this.carousel)
106
+ return;
107
+ let matched = false;
108
+ const sortedResponsiveOptions = [...this.responsiveOptions].sort((a, b) => parseInt(a.breakpoint) - parseInt(b.breakpoint));
109
+ if (containerWidth) {
110
+ for (const option of sortedResponsiveOptions) {
111
+ const breakpoint = parseInt(option.breakpoint);
112
+ if (containerWidth <= breakpoint) {
113
+ this.carousel.numVisible = option.numVisible;
114
+ this.isOneItemVisible = option.numVisible === 1;
115
+ matched = true;
116
+ break;
117
+ }
118
+ }
119
+ }
120
+ if (!matched) {
121
+ this.carousel.numVisible = this.numVisible;
122
+ }
123
+ this.updateVisibleItems();
124
+ }
125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteCarouselComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
126
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: GraniteCarouselComponent, selector: "granite-carousel", inputs: { items: "items", responsiveOptions: "responsiveOptions", numVisible: "numVisible", numScroll: "numScroll", circular: "circular", prevButtonAriaLabel: "prevButtonAriaLabel", nextButtonAriaLabel: "nextButtonAriaLabel", shrinkToContent: "shrinkToContent" }, host: { listeners: { "window:resize": "onResize()" } }, queries: [{ propertyName: "itemTemplateRef", first: true, predicate: ["itemTemplate"], descendants: true }], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"visibleItems\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n [class.auto-width]=\"shrinkToContent\"\n [class.is-one-item]=\"isOneItemVisible\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\" *ngIf=\"!item.placeholder\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}::ng-deep .auto-width .p-carousel-item{flex:0 0 auto!important}::ng-deep .is-one-item .p-carousel-item{flex:1 0 100%!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.Carousel, selector: "p-carousel", inputs: ["page", "numVisible", "numScroll", "responsiveOptions", "orientation", "verticalViewPortHeight", "contentClass", "indicatorsContentClass", "indicatorsContentStyle", "indicatorStyleClass", "indicatorStyle", "value", "circular", "showIndicators", "showNavigators", "autoplayInterval", "style", "styleClass"], outputs: ["onPage"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i4.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
38
127
  }
39
128
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteCarouselComponent, decorators: [{
40
129
  type: Component,
41
- args: [{ selector: 'granite-carousel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"items\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}\n"] }]
42
- }], propDecorators: { items: [{
130
+ args: [{ selector: 'granite-carousel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"visibleItems\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n [class.auto-width]=\"shrinkToContent\"\n [class.is-one-item]=\"isOneItemVisible\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\" *ngIf=\"!item.placeholder\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n", styles: [":host{width:100%;overflow:hidden}.carousel-wrapper{display:flex;justify-content:center;align-items:center;gap:var(--granite-spacing-8);padding:var(--granite-spacing-8);width:100%;max-width:100%;overflow:hidden;box-sizing:border-box}p-carousel{flex:1;min-width:0}p-carousel .item-template-wrapper{margin:var(--granite-spacing-4)}.arrow-btn{width:calc(var(--granite-size-base-rem) * 2);height:calc(var(--granite-size-base-rem) * 2)}.arrow-btn granite-icon{font-size:var(--granite-font-size-body);position:relative;top:0}::ng-deep .auto-width .p-carousel-item{flex:0 0 auto!important}::ng-deep .is-one-item .p-carousel-item{flex:1 0 100%!important}\n"] }]
131
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { items: [{
43
132
  type: Input
44
133
  }], responsiveOptions: [{
45
134
  type: Input
@@ -53,12 +142,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
53
142
  type: Input
54
143
  }], nextButtonAriaLabel: [{
55
144
  type: Input
145
+ }], shrinkToContent: [{
146
+ type: Input
56
147
  }], itemTemplateRef: [{
57
148
  type: ContentChild,
58
149
  args: ['itemTemplate', { static: false }]
59
150
  }], carousel: [{
60
151
  type: ViewChild,
61
152
  args: ['carousel']
153
+ }], onResize: [{
154
+ type: HostListener,
155
+ args: ['window:resize']
62
156
  }] } });
63
157
 
64
158
  class GraniteCarouselModule {
@@ -1 +1 @@
1
- {"version":3,"file":"ifsworld-granite-components-carousel.mjs","sources":["../../../../libs/granite-components/carousel/src/lib/carousel.component.ts","../../../../libs/granite-components/carousel/src/lib/carousel.component.html","../../../../libs/granite-components/carousel/src/lib/carousel.module.ts","../../../../libs/granite-components/carousel/src/ifsworld-granite-components-carousel.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Input,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { Carousel, CarouselResponsiveOptions } from 'primeng/carousel';\n\n@Component({\n selector: 'granite-carousel',\n templateUrl: './carousel.component.html',\n styleUrl: './carousel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteCarouselComponent<T> {\n @Input()\n items: T[] = [];\n\n @Input()\n responsiveOptions: CarouselResponsiveOptions[] = [];\n\n @Input()\n numVisible: number = 1;\n\n @Input()\n numScroll: number = 1;\n\n @Input()\n circular: boolean = false;\n\n @Input()\n prevButtonAriaLabel: string = 'Previous page';\n\n @Input()\n nextButtonAriaLabel: string = 'Next page';\n\n @ContentChild('itemTemplate', { static: false })\n itemTemplateRef: TemplateRef<any>;\n\n @ViewChild('carousel')\n carousel: Carousel;\n\n onKeyDown(event: KeyboardEvent): void {\n const mouseEvent = new MouseEvent('click', { cancelable: true });\n if (event.key === 'ArrowRight') {\n this.navForward(mouseEvent);\n } else if (event.key === 'ArrowLeft') {\n this.navBackward(mouseEvent);\n }\n }\n\n navForward(event: MouseEvent): void {\n this.carousel?.navForward(event);\n }\n\n navBackward(event: MouseEvent): void {\n this.carousel?.navBackward(event);\n }\n}\n","<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"items\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GraniteCarouselComponent } from './carousel.component';\nimport { CarouselModule } from 'primeng/carousel';\nimport {\n GraniteIconModule,\n GraniteButtonModule,\n} from '@ifsworld/granite-components';\n\n@NgModule({\n declarations: [GraniteCarouselComponent],\n exports: [GraniteCarouselComponent],\n imports: [\n CommonModule,\n CarouselModule,\n GraniteButtonModule,\n GraniteIconModule,\n ],\n})\nexport class GraniteCarouselModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAgBa,wBAAwB,CAAA;AANrC,IAAA,WAAA,GAAA;QAQE,IAAK,CAAA,KAAA,GAAQ,EAAE,CAAC;QAGhB,IAAiB,CAAA,iBAAA,GAAgC,EAAE,CAAC;QAGpD,IAAU,CAAA,UAAA,GAAW,CAAC,CAAC;QAGvB,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;QAGtB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAG1B,IAAmB,CAAA,mBAAA,GAAW,eAAe,CAAC;QAG9C,IAAmB,CAAA,mBAAA,GAAW,WAAW,CAAC;AAwB3C,KAAA;AAhBC,IAAA,SAAS,CAAC,KAAoB,EAAA;AAC5B,QAAA,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACjE,QAAA,IAAI,KAAK,CAAC,GAAG,KAAK,YAAY,EAAE;AAC9B,YAAA,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;SAC7B;AAAM,aAAA,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,EAAE;AACpC,YAAA,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SAC9B;KACF;AAED,IAAA,UAAU,CAAC,KAAiB,EAAA;AAC1B,QAAA,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;KAClC;AAED,IAAA,WAAW,CAAC,KAAiB,EAAA;AAC3B,QAAA,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;KACnC;+GA3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,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAN9B,YAAY;YACZ,cAAc;YACd,mBAAmB;YACnB,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGR,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAVjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ifsworld-granite-components-carousel.mjs","sources":["../../../../libs/granite-components/carousel/src/lib/carousel.component.ts","../../../../libs/granite-components/carousel/src/lib/carousel.component.html","../../../../libs/granite-components/carousel/src/lib/carousel.module.ts","../../../../libs/granite-components/carousel/src/ifsworld-granite-components-carousel.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { Carousel, CarouselResponsiveOptions } from 'primeng/carousel';\n\n@Component({\n selector: 'granite-carousel',\n templateUrl: './carousel.component.html',\n styleUrl: './carousel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteCarouselComponent<T>\n implements OnChanges, AfterViewInit, OnDestroy\n{\n @Input()\n items: T[] = [];\n\n @Input()\n responsiveOptions: CarouselResponsiveOptions[] = [\n {\n breakpoint: '1024px',\n numVisible: 3,\n numScroll: 1,\n },\n {\n breakpoint: '768px',\n numVisible: 2,\n numScroll: 1,\n },\n {\n breakpoint: '560px',\n numVisible: 1,\n numScroll: 1,\n },\n ];\n\n @Input()\n numVisible: number = 1;\n\n @Input()\n numScroll: number = 1;\n\n @Input()\n circular: boolean = false;\n\n @Input()\n prevButtonAriaLabel: string = 'Previous page';\n\n @Input()\n nextButtonAriaLabel: string = 'Next page';\n\n @Input()\n shrinkToContent: boolean = false;\n\n @ContentChild('itemTemplate', { static: false })\n itemTemplateRef: TemplateRef<any>;\n\n @ViewChild('carousel')\n carousel: Carousel;\n\n visibleItems: T[] = [];\n isOneItemVisible: boolean = false;\n\n private resizeObserver: ResizeObserver;\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['items'] && changes['items'].currentValue) {\n this.items = changes['items'].currentValue;\n this.triggerUpdate();\n }\n }\n\n ngAfterViewInit(): void {\n this.resizeObserver = new ResizeObserver((entries) => {\n this.handleResize(entries);\n });\n\n this.resizeObserver.observe(this.carousel?.el?.nativeElement);\n }\n\n @HostListener('window:resize')\n onResize(): void {\n this.triggerUpdate();\n }\n\n onKeyDown(event: KeyboardEvent): void {\n const mouseEvent = new MouseEvent('click', { cancelable: true });\n if (event.key === 'ArrowRight') {\n this.navForward(mouseEvent);\n } else if (event.key === 'ArrowLeft') {\n this.navBackward(mouseEvent);\n }\n }\n\n navForward(event: MouseEvent): void {\n this.carousel?.navForward(event);\n }\n\n navBackward(event: MouseEvent): void {\n this.carousel?.navBackward(event);\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n }\n\n private triggerUpdate(): void {\n if (this.carousel?.el?.nativeElement) {\n const containerWidth = this.carousel.el.nativeElement.offsetWidth;\n this.updateNumVisibleBasedOnWidth(containerWidth);\n } else {\n this.updateVisibleItems();\n }\n }\n\n private handleResize(entries: ResizeObserverEntry[]): void {\n entries.forEach((entry) => {\n if (entry.contentRect) {\n const containerWidth = entry.contentRect.width;\n this.updateNumVisibleBasedOnWidth(containerWidth);\n }\n });\n }\n\n private getDisplayItems(items: T[], numVisible: number): T[] {\n const placeholders = Array(Math.max(0, numVisible - items.length)).fill({\n placeholder: true,\n });\n\n return [...items, ...placeholders];\n }\n\n private updateVisibleItems(): void {\n if (!this.items || !this.carousel) return;\n\n const numVisible = this.carousel.numVisible || this.numVisible;\n this.visibleItems = this.getDisplayItems(this.items, numVisible);\n this.cdr.markForCheck();\n }\n\n private updateNumVisibleBasedOnWidth(containerWidth: number): void {\n if (!this.carousel) return;\n\n let matched: boolean = false;\n const sortedResponsiveOptions = [...this.responsiveOptions].sort(\n (a, b) => parseInt(a.breakpoint) - parseInt(b.breakpoint)\n );\n\n if (containerWidth) {\n for (const option of sortedResponsiveOptions) {\n const breakpoint = parseInt(option.breakpoint);\n\n if (containerWidth <= breakpoint) {\n this.carousel.numVisible = option.numVisible;\n this.isOneItemVisible = option.numVisible === 1;\n matched = true;\n break;\n }\n }\n }\n\n if (!matched) {\n this.carousel.numVisible = this.numVisible;\n }\n\n this.updateVisibleItems();\n }\n}\n","<div class=\"carousel-wrapper\">\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isBackwardNavDisabled()\"\n [attr.aria-label]=\"prevButtonAriaLabel\"\n (click)=\"navBackward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-left\"></granite-icon>\n </button>\n\n <p-carousel\n #carousel\n [value]=\"visibleItems\"\n [numVisible]=\"numVisible\"\n [numScroll]=\"numScroll\"\n [circular]=\"circular\"\n [responsiveOptions]=\"responsiveOptions\"\n [showNavigators]=\"false\"\n [showIndicators]=\"false\"\n [class.auto-width]=\"shrinkToContent\"\n [class.is-one-item]=\"isOneItemVisible\"\n (keydown)=\"onKeyDown($event)\"\n tabindex=\"0\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div class=\"item-template-wrapper\" *ngIf=\"!item.placeholder\">\n <ng-container\n *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item }\"\n ></ng-container>\n </div>\n </ng-template>\n </p-carousel>\n\n <button\n graniteFlatButton\n class=\"arrow-btn\"\n [disabled]=\"carousel.isForwardNavDisabled()\"\n [attr.aria-label]=\"nextButtonAriaLabel\"\n (click)=\"navForward($event)\"\n >\n <granite-icon fontIcon=\"icon-caret-right\"></granite-icon>\n </button>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GraniteCarouselComponent } from './carousel.component';\nimport { CarouselModule } from 'primeng/carousel';\nimport {\n GraniteIconModule,\n GraniteButtonModule,\n} from '@ifsworld/granite-components';\n\n@NgModule({\n declarations: [GraniteCarouselComponent],\n exports: [GraniteCarouselComponent],\n imports: [\n CommonModule,\n CarouselModule,\n GraniteButtonModule,\n GraniteIconModule,\n ],\n})\nexport class GraniteCarouselModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAsBa,wBAAwB,CAAA;AAsDnC,IAAA,WAAA,CAAoB,GAAsB,EAAA;QAAtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAlD1C,IAAK,CAAA,KAAA,GAAQ,EAAE,CAAC;AAGhB,QAAA,IAAA,CAAA,iBAAiB,GAAgC;AAC/C,YAAA;AACE,gBAAA,UAAU,EAAE,QAAQ;AACpB,gBAAA,UAAU,EAAE,CAAC;AACb,gBAAA,SAAS,EAAE,CAAC;AACb,aAAA;AACD,YAAA;AACE,gBAAA,UAAU,EAAE,OAAO;AACnB,gBAAA,UAAU,EAAE,CAAC;AACb,gBAAA,SAAS,EAAE,CAAC;AACb,aAAA;AACD,YAAA;AACE,gBAAA,UAAU,EAAE,OAAO;AACnB,gBAAA,UAAU,EAAE,CAAC;AACb,gBAAA,SAAS,EAAE,CAAC;AACb,aAAA;SACF,CAAC;QAGF,IAAU,CAAA,UAAA,GAAW,CAAC,CAAC;QAGvB,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;QAGtB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAG1B,IAAmB,CAAA,mBAAA,GAAW,eAAe,CAAC;QAG9C,IAAmB,CAAA,mBAAA,GAAW,WAAW,CAAC;QAG1C,IAA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AAA;AAQvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAN9B,YAAY;YACZ,cAAc;YACd,mBAAmB;YACnB,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGR,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAVjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
@@ -287,7 +287,7 @@ class GraniteFileUploadComponent {
287
287
  return `${parseFloat((bytes / Math.pow(bytesPerKB, exp)).toFixed(decimalPoints))} ${fileSizes[exp]}`;
288
288
  }
289
289
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
290
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: GraniteFileUploadComponent, selector: "granite-file-upload", inputs: { accept: "accept", uploadTitle: "uploadTitle", uploadIcon: "uploadIcon", browseIcon: "browseIcon", dropZoneText: "dropZoneText", browseButtonText: "browseButtonText", dropPlaceholderText: "dropPlaceholderText", dropZoneHint: "dropZoneHint", removeButtonText: "removeButtonText", uploadButtonText: "uploadButtonText", retryButtonText: "retryButtonText", cancelButtonText: "cancelButtonText", multiFileUpload: "multiFileUpload", responsiveOptions: "responsiveOptions", uploadStatus: "uploadStatus", autoUpload: "autoUpload" }, outputs: { browseOrDragFiles: "browseOrDragFiles", removeFiles: "removeFiles", filesUpload: "filesUpload", fileUploadValidation: "fileUploadValidation" }, viewQueries: [{ propertyName: "fileDropRef", first: true, predicate: ["fileDropRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"file-upload-wrapper\">\n <h2 class=\"file-upload-title\">{{ uploadTitle }}</h2>\n <div\n class=\"file-dropzone\"\n [ngClass]=\"{ 'upload-failed': uploadStatus === FileUploadStatus.Failed }\"\n graniteFileDragAndDrop\n (droppedFiles)=\"onFilesDropHandler($event)\"\n (isFileOver)=\"onFileOverDropzone($event)\"\n (fileUploadValidation)=\"onFileDropError($event)\"\n [multiFileUploadEnabled]=\"multiFileUpload\"\n [accept]=\"accept\"\n [currentFiles]=\"selectedFiles\"\n >\n <input\n class=\"file-input\"\n #fileDropRef\n type=\"file\"\n title=\"fileUpload\"\n (change)=\"fileBrowseHandler($event)\"\n [multiple]=\"multiFileUpload\"\n [accept]=\"accept\"\n />\n <div class=\"file-upload-body\">\n @if (!isFileOnDropzone && !fileError) {\n @switch (previewReadyFiles.length) {\n @case (0) {\n <div class=\"file-upload-browse\">\n <granite-icon\n class=\"file-upload-icon\"\n [fontIcon]=\"uploadIcon\"\n ></granite-icon>\n <div class=\"file-selection\">\n <h2 class=\"file-upload-body-text\">{{ dropZoneText }}</h2>\n <button\n class=\"file-select-button\"\n graniteButton\n (click)=\"fileDropRef.click()\"\n >\n <granite-icon\n class=\"browse-button-icon\"\n [fontIcon]=\"browseIcon\"\n ></granite-icon>\n <div class=\"browse-button-text\">{{ browseButtonText }}</div>\n </button>\n </div>\n <p *ngIf=\"dropZoneHint\" class=\"file-upload-hint\">\n {{ dropZoneHint }}\n </p>\n </div>\n }\n @case (1) {\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewReadyFiles[0] }\n \"\n ></ng-container>\n }\n @default {\n <granite-carousel\n [items]=\"previewReadyFiles\"\n [numVisible]=\"numVisible\"\n [responsiveOptions]=\"responsiveOptions\"\n >\n <ng-template let-previewFile #itemTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewFile }\n \"\n ></ng-container>\n </ng-template>\n </granite-carousel>\n }\n }\n } @else {\n <p class=\"drop-area-placeholder\">\n {{ dropPlaceholderText }}\n </p>\n }\n </div>\n </div>\n <div class=\"file-upload-footer\">\n <div class=\"footer-container\" *ngIf=\"previewReadyFiles.length > 0\">\n <button\n *ngIf=\"!autoUpload && uploadStatus === FileUploadStatus.NotStarted\"\n granitePrimaryButton\n (click)=\"uploadFiles()\"\n >\n {{ uploadButtonText }}\n </button>\n <ng-container *ngIf=\"uploadStatus === FileUploadStatus.Failed\">\n <button graniteButton (click)=\"cancelUpload()\">\n {{ cancelButtonText }}\n </button>\n <button\n class=\"retry-upload-button\"\n granitePrimaryButton\n (click)=\"retryUpload()\"\n >\n {{ retryButtonText }}\n </button>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #uploadingOverlay>\n <div class=\"file-preview-overlay\"></div>\n <div class=\"loading-container\">\n <div class=\"uploading-spinner\"></div>\n </div>\n</ng-template>\n\n<ng-template #uploadFailedOverlay>\n <div class=\"file-preview-overlay\"></div>\n</ng-template>\n\n<ng-template #filePreviewTemplate let-previewFile=\"previewFile\">\n <div class=\"file-preview-container\">\n @if (previewFile?.imageUrl) {\n <a\n class=\"file-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n [href]=\"previewFile?.imageUrl\"\n target=\"_blank\"\n >\n <div class=\"file-preview-holder\">\n <img\n role=\"presentation\"\n [src]=\"previewFile?.imageUrl\"\n [alt]=\"previewFile?.file?.name\"\n />\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.Failed\"\n [ngTemplateOutlet]=\"uploadFailedOverlay\"\n >\n </ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </a>\n } @else {\n <div\n class=\"document-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n >\n <div class=\"document-preview-holder\">\n <granite-icon\n class=\"document-file-preview\"\n [class.upload-failed]=\"uploadStatus === FileUploadStatus.Failed\"\n [fontIcon]=\"'icon-document-alt'\"\n ></granite-icon>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </div>\n }\n <button\n graniteButton\n *ngIf=\"\n [FileUploadStatus.Completed, FileUploadStatus.NotStarted].includes(\n uploadStatus\n )\n \"\n (click)=\"fileRemoveHandler(previewFile)\"\n >\n {{ removeButtonText }}\n </button>\n </div>\n</ng-template>\n", styles: [":host{width:100%}.file-upload-wrapper{display:flex;flex-direction:column;background-color:var(--granite-color-background);box-shadow:var(--granite-shadow-s);height:100%;width:100%}.file-upload-wrapper .file-upload-title{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-medium);font-weight:var(--granite-font-weight-bold);line-height:var(--granite-line-height-base-rem);color:var(--granite-color-text-weak);margin:0;padding:var(--granite-spacing-8) calc(var(--granite-spacing-16) * .813)}.file-upload-wrapper .file-dropzone{display:flex;flex-direction:column;border-width:var(--granite-border-width-focus);border-style:dashed;border-color:var(--granite-color-background-selected);border-radius:var(--granite-radius-m);margin:var(--granite-spacing-8);height:100%}.file-upload-wrapper .file-dropzone.upload-failed{border-color:var(--granite-color-categorical-4)}.file-upload-wrapper .file-dropzone.file-error{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-failure);border-color:var(--granite-color-state-error);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-error .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone.file-over{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-info);border-color:var(--granite-color-background-active);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-over .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone .file-input{opacity:0;position:absolute;width:0}.file-upload-wrapper .file-dropzone .file-upload-body{display:flex;align-items:center;justify-content:center;height:100%}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse{display:flex;flex-direction:column;gap:var(--granite-spacing-4);justify-content:center;align-items:center;padding:0 var(--granite-spacing-16)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-icon{font-size:var(--granite-font-size-display-small);color:var(--granite-color-text)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection{display:flex;justify-content:space-between;align-items:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-upload-body-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;width:100%;margin-inline-end:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button{display:flex;justify-content:space-between;align-items:center;color:var(--granite-color-text-link);padding-top:calc(var(--granite-spacing-24) / 4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-icon{font-size:var(--granite-font-size-body);color:var(--granite-color-text-link);margin-inline-end:var(--granite-spacing-4);padding:0}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-flowing) / 2);margin-top:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-icon,.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-text{color:var(--granite-color-text-inverse)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-hint{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * 1.125);text-align:center;color:var(--granite-color-text-hint);margin:calc(var(--granite-spacing-base-rem) * .625) 0 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container{display:flex;flex-direction:column;align-items:center;width:100%;max-height:100%;padding:calc(var(--granite-spacing-base-rem) * .375)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-size{text-decoration:underline}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:80px;height:114px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder img{width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(250%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .file-preview-overlay{position:absolute;top:0;inset-inline-start:0;width:100%;height:100%;pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder img{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.2}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder img,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-link);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-link);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:60px;height:60px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview{font-size:calc(var(--granite-font-size-body) * 3);color:var(--granite-color-text-hint);padding:calc(var(--granite-spacing-4) * 3) 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview.upload-failed{color:var(--granite-color-background-failure)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-10%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .document-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .document-file-preview,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-weak);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-week);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-upload-footer{margin-inline:var(--granite-spacing-8);margin-bottom:var(--granite-spacing-8)}.file-upload-wrapper .file-upload-footer .footer-container{display:flex;justify-content:flex-end;align-items:center}.file-upload-wrapper .file-upload-footer .footer-container .retry-upload-button{margin-inline-start:var(--granite-spacing-8)}@keyframes loading-keyframe{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i2.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: i3.GraniteCarouselComponent, selector: "granite-carousel", inputs: ["items", "responsiveOptions", "numVisible", "numScroll", "circular", "prevButtonAriaLabel", "nextButtonAriaLabel"] }, { kind: "directive", type: GraniteFileDragAndDropDirective, selector: "[graniteFileDragAndDrop]", inputs: ["multiFileUploadEnabled", "accept", "currentFiles"], outputs: ["droppedFiles", "isFileOver", "fileUploadValidation"], exportAs: ["graniteFileDragAndDrop"] }] }); }
290
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: GraniteFileUploadComponent, selector: "granite-file-upload", inputs: { accept: "accept", uploadTitle: "uploadTitle", uploadIcon: "uploadIcon", browseIcon: "browseIcon", dropZoneText: "dropZoneText", browseButtonText: "browseButtonText", dropPlaceholderText: "dropPlaceholderText", dropZoneHint: "dropZoneHint", removeButtonText: "removeButtonText", uploadButtonText: "uploadButtonText", retryButtonText: "retryButtonText", cancelButtonText: "cancelButtonText", multiFileUpload: "multiFileUpload", responsiveOptions: "responsiveOptions", uploadStatus: "uploadStatus", autoUpload: "autoUpload" }, outputs: { browseOrDragFiles: "browseOrDragFiles", removeFiles: "removeFiles", filesUpload: "filesUpload", fileUploadValidation: "fileUploadValidation" }, viewQueries: [{ propertyName: "fileDropRef", first: true, predicate: ["fileDropRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"file-upload-wrapper\">\n <h2 class=\"file-upload-title\">{{ uploadTitle }}</h2>\n <div\n class=\"file-dropzone\"\n [ngClass]=\"{ 'upload-failed': uploadStatus === FileUploadStatus.Failed }\"\n graniteFileDragAndDrop\n (droppedFiles)=\"onFilesDropHandler($event)\"\n (isFileOver)=\"onFileOverDropzone($event)\"\n (fileUploadValidation)=\"onFileDropError($event)\"\n [multiFileUploadEnabled]=\"multiFileUpload\"\n [accept]=\"accept\"\n [currentFiles]=\"selectedFiles\"\n >\n <input\n class=\"file-input\"\n #fileDropRef\n type=\"file\"\n title=\"fileUpload\"\n (change)=\"fileBrowseHandler($event)\"\n [multiple]=\"multiFileUpload\"\n [accept]=\"accept\"\n />\n <div class=\"file-upload-body\">\n @if (!isFileOnDropzone && !fileError) {\n @switch (previewReadyFiles.length) {\n @case (0) {\n <div class=\"file-upload-browse\">\n <granite-icon\n class=\"file-upload-icon\"\n [fontIcon]=\"uploadIcon\"\n ></granite-icon>\n <div class=\"file-selection\">\n <h2 class=\"file-upload-body-text\">{{ dropZoneText }}</h2>\n <button\n class=\"file-select-button\"\n graniteButton\n (click)=\"fileDropRef.click()\"\n >\n <granite-icon\n class=\"browse-button-icon\"\n [fontIcon]=\"browseIcon\"\n ></granite-icon>\n <div class=\"browse-button-text\">{{ browseButtonText }}</div>\n </button>\n </div>\n <p *ngIf=\"dropZoneHint\" class=\"file-upload-hint\">\n {{ dropZoneHint }}\n </p>\n </div>\n }\n @case (1) {\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewReadyFiles[0] }\n \"\n ></ng-container>\n }\n @default {\n <granite-carousel\n [items]=\"previewReadyFiles\"\n [numVisible]=\"numVisible\"\n [responsiveOptions]=\"responsiveOptions\"\n >\n <ng-template let-previewFile #itemTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewFile }\n \"\n ></ng-container>\n </ng-template>\n </granite-carousel>\n }\n }\n } @else {\n <p class=\"drop-area-placeholder\">\n {{ dropPlaceholderText }}\n </p>\n }\n </div>\n </div>\n <div class=\"file-upload-footer\">\n <div class=\"footer-container\" *ngIf=\"previewReadyFiles.length > 0\">\n <button\n *ngIf=\"!autoUpload && uploadStatus === FileUploadStatus.NotStarted\"\n granitePrimaryButton\n (click)=\"uploadFiles()\"\n >\n {{ uploadButtonText }}\n </button>\n <ng-container *ngIf=\"uploadStatus === FileUploadStatus.Failed\">\n <button graniteButton (click)=\"cancelUpload()\">\n {{ cancelButtonText }}\n </button>\n <button\n class=\"retry-upload-button\"\n granitePrimaryButton\n (click)=\"retryUpload()\"\n >\n {{ retryButtonText }}\n </button>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #uploadingOverlay>\n <div class=\"file-preview-overlay\"></div>\n <div class=\"loading-container\">\n <div class=\"uploading-spinner\"></div>\n </div>\n</ng-template>\n\n<ng-template #uploadFailedOverlay>\n <div class=\"file-preview-overlay\"></div>\n</ng-template>\n\n<ng-template #filePreviewTemplate let-previewFile=\"previewFile\">\n <div class=\"file-preview-container\">\n @if (previewFile?.imageUrl) {\n <a\n class=\"file-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n [href]=\"previewFile?.imageUrl\"\n target=\"_blank\"\n >\n <div class=\"file-preview-holder\">\n <img\n role=\"presentation\"\n [src]=\"previewFile?.imageUrl\"\n [alt]=\"previewFile?.file?.name\"\n />\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.Failed\"\n [ngTemplateOutlet]=\"uploadFailedOverlay\"\n >\n </ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </a>\n } @else {\n <div\n class=\"document-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n >\n <div class=\"document-preview-holder\">\n <granite-icon\n class=\"document-file-preview\"\n [class.upload-failed]=\"uploadStatus === FileUploadStatus.Failed\"\n [fontIcon]=\"'icon-document-alt'\"\n ></granite-icon>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </div>\n }\n <button\n graniteButton\n *ngIf=\"\n [FileUploadStatus.Completed, FileUploadStatus.NotStarted].includes(\n uploadStatus\n )\n \"\n (click)=\"fileRemoveHandler(previewFile)\"\n >\n {{ removeButtonText }}\n </button>\n </div>\n</ng-template>\n", styles: [":host{width:100%}.file-upload-wrapper{display:flex;flex-direction:column;background-color:var(--granite-color-background);box-shadow:var(--granite-shadow-s);height:100%;width:100%}.file-upload-wrapper .file-upload-title{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-medium);font-weight:var(--granite-font-weight-bold);line-height:var(--granite-line-height-base-rem);color:var(--granite-color-text-weak);margin:0;padding:var(--granite-spacing-8) calc(var(--granite-spacing-16) * .813)}.file-upload-wrapper .file-dropzone{display:flex;flex-direction:column;border-width:var(--granite-border-width-focus);border-style:dashed;border-color:var(--granite-color-background-selected);border-radius:var(--granite-radius-m);margin:var(--granite-spacing-8);height:100%}.file-upload-wrapper .file-dropzone.upload-failed{border-color:var(--granite-color-categorical-4)}.file-upload-wrapper .file-dropzone.file-error{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-failure);border-color:var(--granite-color-state-error);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-error .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone.file-over{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;background-color:var(--granite-color-background-lobby-info);border-color:var(--granite-color-background-active);transition:background .15s ease}.file-upload-wrapper .file-dropzone.file-over .drop-area-placeholder{margin:0}.file-upload-wrapper .file-dropzone .file-input{opacity:0;position:absolute;width:0}.file-upload-wrapper .file-dropzone .file-upload-body{display:flex;align-items:center;justify-content:center;height:100%}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse{display:flex;flex-direction:column;gap:var(--granite-spacing-4);justify-content:center;align-items:center;padding:0 var(--granite-spacing-16)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-icon{font-size:var(--granite-font-size-display-small);color:var(--granite-color-text)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection{display:flex;justify-content:space-between;align-items:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-upload-body-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text);text-align:center;width:100%;margin-inline-end:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button{display:flex;justify-content:space-between;align-items:center;color:var(--granite-color-text-link);padding-top:calc(var(--granite-spacing-24) / 4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-icon{font-size:var(--granite-font-size-body);color:var(--granite-color-text-link);margin-inline-end:var(--granite-spacing-4);padding:0}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button .browse-button-text{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-flowing) / 2);margin-top:var(--granite-spacing-4)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-icon,.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-selection .file-select-button:hover .browse-button-text{color:var(--granite-color-text-inverse)}.file-upload-wrapper .file-dropzone .file-upload-body .file-upload-browse .file-upload-hint{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * 1.125);text-align:center;color:var(--granite-color-text-hint);margin:calc(var(--granite-spacing-base-rem) * .625) 0 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container{display:flex;flex-direction:column;align-items:center;width:100%;max-height:100%;padding:calc(var(--granite-spacing-base-rem) * .375)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link:hover .file-size{text-decoration:underline}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:80px;height:114px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder img{width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(250%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .file-preview-overlay{position:absolute;top:0;inset-inline-start:0;width:100%;height:100%;pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder img{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.2}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder img,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-link);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .file-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-link);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link{display:flex;flex-direction:column;align-items:center;max-width:50%;padding:0 var(--granite-spacing-8);text-decoration:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder{display:flex;justify-content:center;align-items:flex-end;position:relative;width:60px;height:60px}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview{font-size:calc(var(--granite-font-size-body) * 3);color:var(--granite-color-text-hint);padding:calc(var(--granite-spacing-4) * 3) 0}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .document-file-preview.upload-failed{color:var(--granite-color-background-failure)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container{position:absolute;top:50%;inset-inline-start:50%;transform:translate(-50%,-10%)}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .document-preview-holder .loading-container .uploading-spinner{width:50px;height:50px;border-radius:50%;border:6px solid;border-color:var(--granite-color-background-page);border-right-color:var(--granite-color-background-active);animation:loading-keyframe 1s infinite linear}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .document-preview-holder .file-preview-overlay{background-color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.upload-failed .file-size{color:var(--granite-color-signal-failure);opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress{pointer-events:none}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .document-file-preview,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .document-preview-holder .file-preview-overlay,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-name,.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link.uploading-in-progress .file-size{opacity:.4}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-name{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-flowing);color:var(--granite-color-text-weak);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:calc(var(--granite-spacing-base-rem) * .375) 0 0;width:100%;text-align:center}.file-upload-wrapper .file-dropzone .file-upload-body .file-preview-container .document-preview-link .file-size{font-family:var(--granite-font-family-default);font-size:var(--granite-font-size-micro);font-weight:var(--granite-font-weight-regular);line-height:calc(var(--granite-line-height-base-rem) * .625);color:var(--granite-color-text-week);margin:0 0 calc(var(--granite-spacing-base-rem) * .875)}.file-upload-wrapper .file-upload-footer{margin-inline:var(--granite-spacing-8);margin-bottom:var(--granite-spacing-8)}.file-upload-wrapper .file-upload-footer .footer-container{display:flex;justify-content:flex-end;align-items:center}.file-upload-wrapper .file-upload-footer .footer-container .retry-upload-button{margin-inline-start:var(--granite-spacing-8)}@keyframes loading-keyframe{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.GraniteButtonComponent, selector: "button[graniteButton], button[granitePrimaryButton], button[graniteFlatButton], button[graniteToolbarButton] ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: i2.GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: i3.GraniteCarouselComponent, selector: "granite-carousel", inputs: ["items", "responsiveOptions", "numVisible", "numScroll", "circular", "prevButtonAriaLabel", "nextButtonAriaLabel", "shrinkToContent"] }, { kind: "directive", type: GraniteFileDragAndDropDirective, selector: "[graniteFileDragAndDrop]", inputs: ["multiFileUploadEnabled", "accept", "currentFiles"], outputs: ["droppedFiles", "isFileOver", "fileUploadValidation"], exportAs: ["graniteFileDragAndDrop"] }] }); }
291
291
  }
292
292
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GraniteFileUploadComponent, decorators: [{
293
293
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ifsworld-granite-components-file-upload.mjs","sources":["../../../../libs/granite-components/file-upload/src/lib/file-upload.constants.ts","../../../../libs/granite-components/file-upload/src/lib/file-upload.utils.ts","../../../../libs/granite-components/file-upload/src/lib/directives/file-drag-and-drop.directive.ts","../../../../libs/granite-components/file-upload/src/lib/file-upload.component.ts","../../../../libs/granite-components/file-upload/src/lib/file-upload.component.html","../../../../libs/granite-components/file-upload/src/lib/file-upload.module.ts","../../../../libs/granite-components/file-upload/src/ifsworld-granite-components-file-upload.ts"],"sourcesContent":["import { CarouselResponsiveOptions } from 'primeng/carousel';\n\nexport interface SelectedFile {\n file: File;\n readableSize?: string;\n imageUrl?: string;\n}\n\nexport interface FileUploadError {\n isError: boolean;\n type: FilUploadErrorTypes;\n}\n\nexport const fileSizes: string[] = [\n 'Bytes',\n 'KB',\n 'MB',\n 'GB',\n 'TB',\n 'PB',\n 'EB',\n 'ZB',\n 'YB',\n];\n\nexport enum FileUploadStatus {\n NotStarted = 'NotStarted',\n InProgress = 'InProgress',\n Completed = 'Completed',\n Failed = 'Failed',\n Cancelled = 'Cancelled',\n}\n\nexport enum FilUploadErrorTypes {\n ExtensionNotSupported = 'ExtensionNotSupported',\n MultipleFilesNotSupported = 'MultipleFilesNotSupported',\n}\n\nexport const DEFAULT_MULTI_FILE_SUPPORT = false;\nexport const DEFAULT_ACCEPT_TYPE: string = '*.*';\nexport const DEFAULT_UPLOAD_TITLE: string = 'Upload Files';\nexport const DEFAULT_UPLOAD_ICON: string = 'icon-upload';\nexport const DEFAULT_FILE_BROWSE_BUTTON_ICON: string = 'icon-folder-alt';\nexport const DEFAULT_DROPZONE_TEXT: string = 'Drop here or';\nexport const DEFAULT_BROWSE_BUTTON_TEXT: string = 'Browse';\nexport const DEFAULT_DROP_PLACEHOLDER_TEXT: string = 'Drop files here';\nexport const DEFAULT_DROPZONE_HINT: string = '';\nexport const DEFAULT_REMOVE_BUTTON_TEXT: string = 'Remove';\nexport const DEFAULT_UPLOAD_BUTTON_TEXT: string = 'Upload Files';\nexport const DEFAULT_RETRY_BUTTON_TEXT: string = 'Retry';\nexport const DEFAULT_CANCEL_BUTTON_TEXT: string = 'Cancel';\nexport const DEFAULT_RESPONSIVE_OPTIONS: CarouselResponsiveOptions[] = [\n { breakpoint: '1200px', numVisible: 4, numScroll: 1 },\n { breakpoint: '992px', numVisible: 3, numScroll: 1 },\n { breakpoint: '768px', numVisible: 2, numScroll: 1 },\n { breakpoint: '576px', numVisible: 1, numScroll: 1 },\n];\nexport const DEFAULT_VISIBLE_FILES: number = 10;\n","export function validFileTypes<T>(\n mimeTypesStringToCheck: string,\n files: T[]\n): boolean {\n const supportedFileMimeTypes = mimeTypesStringToCheck\n .split(',')\n .map((ext) => ext.trim());\n\n if (!files || files.length === 0) {\n return false;\n }\n\n return files.every((file: T) => {\n const fileType = file['type'];\n return fileType && supportedFileMimeTypes.includes(fileType);\n });\n}\n","import {\n Directive,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n} from '@angular/core';\nimport { FileUploadError, FilUploadErrorTypes } from '../file-upload.constants';\nimport { validFileTypes } from '../file-upload.utils';\n\n@Directive({\n selector: '[graniteFileDragAndDrop]',\n exportAs: 'graniteFileDragAndDrop',\n})\nexport class GraniteFileDragAndDropDirective {\n @HostBinding('class.file-over')\n fileOver: boolean;\n\n @HostBinding('class.file-error')\n fileBrowseError: boolean;\n\n @Input()\n multiFileUploadEnabled: boolean;\n\n @Input()\n accept: string;\n\n @Input()\n currentFiles: File[] = [];\n\n @Output()\n droppedFiles: EventEmitter<File[]> = new EventEmitter<File[]>();\n\n @Output()\n isFileOver: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @Output()\n fileUploadValidation: EventEmitter<FileUploadError> =\n new EventEmitter<FileUploadError>();\n\n @HostListener('dragover', ['$event'])\n onDragOver(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const transferFiles = event.dataTransfer?.items ?? [];\n\n if (!validFileTypes(this.accept, Array.from(transferFiles))) {\n this.fileBrowseError = true;\n this.fileUploadValidation.emit({\n isError: this.fileBrowseError,\n type: FilUploadErrorTypes.ExtensionNotSupported,\n });\n return;\n }\n\n if (\n !this.multiFileUploadEnabled &&\n (transferFiles.length > 1 || this.currentFiles.length >= 1)\n ) {\n this.fileBrowseError = true;\n this.fileUploadValidation.emit({\n isError: this.fileBrowseError,\n type: FilUploadErrorTypes.MultipleFilesNotSupported,\n });\n return;\n }\n\n this.fileOver = true;\n this.isFileOver.emit(this.fileOver);\n }\n\n @HostListener('dragleave', ['$event'])\n onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.fileOver = false;\n this.fileBrowseError = false;\n this.fileUploadValidation.emit({ isError: false, type: null });\n this.isFileOver.emit(this.fileOver);\n }\n\n @HostListener('drop', ['$event'])\n onDrop(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.fileBrowseError) {\n this.fileBrowseError = false;\n this.fileUploadValidation.emit({\n isError: this.fileBrowseError,\n type: null,\n });\n return;\n }\n\n this.currentFiles = [\n ...this.currentFiles,\n ...Array.from(event.dataTransfer.files),\n ];\n\n this.fileOver = false;\n this.isFileOver.emit(this.fileOver);\n\n if (this.currentFiles.length > 0) {\n this.droppedFiles.emit(this.currentFiles);\n }\n }\n}\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {\n DEFAULT_BROWSE_BUTTON_TEXT,\n DEFAULT_CANCEL_BUTTON_TEXT,\n DEFAULT_DROP_PLACEHOLDER_TEXT,\n DEFAULT_DROPZONE_HINT,\n DEFAULT_DROPZONE_TEXT,\n DEFAULT_FILE_BROWSE_BUTTON_ICON,\n DEFAULT_ACCEPT_TYPE,\n DEFAULT_MULTI_FILE_SUPPORT,\n DEFAULT_REMOVE_BUTTON_TEXT,\n DEFAULT_RETRY_BUTTON_TEXT,\n DEFAULT_UPLOAD_BUTTON_TEXT,\n DEFAULT_UPLOAD_ICON,\n DEFAULT_UPLOAD_TITLE,\n fileSizes,\n FileUploadError,\n FileUploadStatus,\n FilUploadErrorTypes,\n SelectedFile,\n DEFAULT_RESPONSIVE_OPTIONS,\n DEFAULT_VISIBLE_FILES,\n} from './file-upload.constants';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { validFileTypes } from './file-upload.utils';\nimport { CarouselResponsiveOptions } from 'primeng/carousel';\n\n@Component({\n selector: 'granite-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n})\nexport class GraniteFileUploadComponent {\n @ViewChild('fileDropRef', { read: ElementRef })\n fileDropRef!: ElementRef<HTMLInputElement>;\n\n @Input()\n accept: string = DEFAULT_ACCEPT_TYPE;\n\n @Input()\n uploadTitle: string = DEFAULT_UPLOAD_TITLE;\n\n @Input()\n uploadIcon: string = DEFAULT_UPLOAD_ICON;\n\n @Input()\n browseIcon: string = DEFAULT_FILE_BROWSE_BUTTON_ICON;\n\n @Input()\n dropZoneText: string = DEFAULT_DROPZONE_TEXT;\n\n @Input()\n browseButtonText: string = DEFAULT_BROWSE_BUTTON_TEXT;\n\n @Input()\n dropPlaceholderText: string = DEFAULT_DROP_PLACEHOLDER_TEXT;\n\n @Input()\n dropZoneHint: string = DEFAULT_DROPZONE_HINT;\n\n @Input()\n removeButtonText: string = DEFAULT_REMOVE_BUTTON_TEXT;\n\n @Input()\n uploadButtonText: string = DEFAULT_UPLOAD_BUTTON_TEXT;\n\n @Input()\n retryButtonText: string = DEFAULT_RETRY_BUTTON_TEXT;\n\n @Input()\n cancelButtonText: string = DEFAULT_CANCEL_BUTTON_TEXT;\n\n @Input()\n multiFileUpload: boolean = DEFAULT_MULTI_FILE_SUPPORT;\n\n @Input()\n responsiveOptions: CarouselResponsiveOptions[] = DEFAULT_RESPONSIVE_OPTIONS;\n\n @Output()\n browseOrDragFiles: EventEmitter<SelectedFile[]> = new EventEmitter<\n SelectedFile[]\n >();\n\n @Output()\n removeFiles: EventEmitter<SelectedFile[]> = new EventEmitter<\n SelectedFile[]\n >();\n\n @Output()\n filesUpload: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n fileUploadValidation: EventEmitter<FileUploadError> =\n new EventEmitter<FileUploadError>();\n\n selectedFiles: File[] = [];\n previewReadyFiles: SelectedFile[] = [];\n isFileOnDropzone: boolean = false;\n FileUploadStatus = FileUploadStatus;\n fileError: boolean = false;\n fileDropErrorType: string;\n numVisible: number = DEFAULT_VISIBLE_FILES;\n\n protected _uploadStatus: FileUploadStatus = FileUploadStatus.NotStarted;\n\n @Input()\n get uploadStatus(): FileUploadStatus {\n return this._uploadStatus;\n }\n\n set uploadStatus(status: FileUploadStatus) {\n this._uploadStatus = status;\n }\n\n protected _autoUpload: boolean = true;\n\n @Input()\n get autoUpload(): boolean {\n return this._autoUpload;\n }\n\n set autoUpload(value: boolean) {\n this._autoUpload = coerceBooleanProperty(value);\n }\n\n fileBrowseHandler(event: Event): void {\n const target = event.target as HTMLInputElement;\n const files: File[] = Array.from(target.files);\n\n if (!validFileTypes(this.accept, files)) {\n this.fileUploadValidation.emit({\n isError: true,\n type: FilUploadErrorTypes.ExtensionNotSupported,\n });\n this.fileDropRef.nativeElement.value = null;\n return;\n }\n\n this.selectedFiles = [...this.selectedFiles, ...files];\n this.previewReadyFiles = this.prepareSelectedFiles(this.selectedFiles);\n this.browseOrDragFiles.emit(this.previewReadyFiles);\n }\n\n fileRemoveHandler(fileToRemove: SelectedFile): void {\n const index = this.previewReadyFiles.findIndex(\n (file) =>\n file.imageUrl === fileToRemove.imageUrl &&\n file.file?.name === fileToRemove.file?.name &&\n file.readableSize === fileToRemove.readableSize\n );\n this.selectedFiles.splice(index, 1);\n this.previewReadyFiles.splice(index, 1);\n\n if (\n this.selectedFiles.length === 0 &&\n this.previewReadyFiles.length === 0\n ) {\n this.fileDropRef.nativeElement.value = null;\n this.uploadStatus = FileUploadStatus.NotStarted;\n }\n\n this.removeFiles.emit(this.previewReadyFiles);\n }\n\n onFilesDropHandler(files: File[]): void {\n if (\n !this.multiFileUpload &&\n (this.selectedFiles.length === 1 || files.length !== 1)\n ) {\n this.fileError = true;\n return;\n }\n\n this.selectedFiles = files;\n\n this.previewReadyFiles = this.prepareSelectedFiles(this.selectedFiles);\n this.browseOrDragFiles.emit(this.previewReadyFiles);\n }\n\n onFileOverDropzone(isFileOver: boolean): void {\n this.isFileOnDropzone = isFileOver;\n }\n\n onFileDropError(validation: FileUploadError): void {\n this.fileError = validation.isError;\n this.fileDropErrorType = validation.type;\n }\n\n prepareSelectedFiles(files: File[]): SelectedFile[] {\n return files.map((file: File) => ({\n file,\n readableSize: this.formatBytesToReadableSize(file.size, 2),\n imageUrl: file.type.startsWith('image/')\n ? URL.createObjectURL(file)\n : null,\n }));\n }\n\n uploadFiles(): void {\n this.filesUpload.emit();\n }\n\n retryUpload(): void {\n this.filesUpload.emit();\n }\n\n cancelUpload(): void {\n this.resetFileUpload();\n this.removeFiles.emit(this.previewReadyFiles);\n }\n\n resetFileUpload(): void {\n this.fileDropRef.nativeElement.value = null;\n this.fileError = false;\n this.fileDropErrorType = '';\n this.selectedFiles = [];\n this.previewReadyFiles = [];\n this.uploadStatus = FileUploadStatus.NotStarted;\n }\n\n formatBytesToReadableSize(bytes: number, decimals: number): string {\n if (bytes === 0) {\n return `0 ${fileSizes[0]}`;\n }\n\n const bytesPerKB = 1024;\n const decimalPoints = decimals <= 0 ? 0 : decimals || 2;\n const exp = Math.floor(Math.log(bytes) / Math.log(bytesPerKB));\n return `${parseFloat(\n (bytes / Math.pow(bytesPerKB, exp)).toFixed(decimalPoints)\n )} ${fileSizes[exp]}`;\n }\n}\n","<div class=\"file-upload-wrapper\">\n <h2 class=\"file-upload-title\">{{ uploadTitle }}</h2>\n <div\n class=\"file-dropzone\"\n [ngClass]=\"{ 'upload-failed': uploadStatus === FileUploadStatus.Failed }\"\n graniteFileDragAndDrop\n (droppedFiles)=\"onFilesDropHandler($event)\"\n (isFileOver)=\"onFileOverDropzone($event)\"\n (fileUploadValidation)=\"onFileDropError($event)\"\n [multiFileUploadEnabled]=\"multiFileUpload\"\n [accept]=\"accept\"\n [currentFiles]=\"selectedFiles\"\n >\n <input\n class=\"file-input\"\n #fileDropRef\n type=\"file\"\n title=\"fileUpload\"\n (change)=\"fileBrowseHandler($event)\"\n [multiple]=\"multiFileUpload\"\n [accept]=\"accept\"\n />\n <div class=\"file-upload-body\">\n @if (!isFileOnDropzone && !fileError) {\n @switch (previewReadyFiles.length) {\n @case (0) {\n <div class=\"file-upload-browse\">\n <granite-icon\n class=\"file-upload-icon\"\n [fontIcon]=\"uploadIcon\"\n ></granite-icon>\n <div class=\"file-selection\">\n <h2 class=\"file-upload-body-text\">{{ dropZoneText }}</h2>\n <button\n class=\"file-select-button\"\n graniteButton\n (click)=\"fileDropRef.click()\"\n >\n <granite-icon\n class=\"browse-button-icon\"\n [fontIcon]=\"browseIcon\"\n ></granite-icon>\n <div class=\"browse-button-text\">{{ browseButtonText }}</div>\n </button>\n </div>\n <p *ngIf=\"dropZoneHint\" class=\"file-upload-hint\">\n {{ dropZoneHint }}\n </p>\n </div>\n }\n @case (1) {\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewReadyFiles[0] }\n \"\n ></ng-container>\n }\n @default {\n <granite-carousel\n [items]=\"previewReadyFiles\"\n [numVisible]=\"numVisible\"\n [responsiveOptions]=\"responsiveOptions\"\n >\n <ng-template let-previewFile #itemTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewFile }\n \"\n ></ng-container>\n </ng-template>\n </granite-carousel>\n }\n }\n } @else {\n <p class=\"drop-area-placeholder\">\n {{ dropPlaceholderText }}\n </p>\n }\n </div>\n </div>\n <div class=\"file-upload-footer\">\n <div class=\"footer-container\" *ngIf=\"previewReadyFiles.length > 0\">\n <button\n *ngIf=\"!autoUpload && uploadStatus === FileUploadStatus.NotStarted\"\n granitePrimaryButton\n (click)=\"uploadFiles()\"\n >\n {{ uploadButtonText }}\n </button>\n <ng-container *ngIf=\"uploadStatus === FileUploadStatus.Failed\">\n <button graniteButton (click)=\"cancelUpload()\">\n {{ cancelButtonText }}\n </button>\n <button\n class=\"retry-upload-button\"\n granitePrimaryButton\n (click)=\"retryUpload()\"\n >\n {{ retryButtonText }}\n </button>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #uploadingOverlay>\n <div class=\"file-preview-overlay\"></div>\n <div class=\"loading-container\">\n <div class=\"uploading-spinner\"></div>\n </div>\n</ng-template>\n\n<ng-template #uploadFailedOverlay>\n <div class=\"file-preview-overlay\"></div>\n</ng-template>\n\n<ng-template #filePreviewTemplate let-previewFile=\"previewFile\">\n <div class=\"file-preview-container\">\n @if (previewFile?.imageUrl) {\n <a\n class=\"file-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n [href]=\"previewFile?.imageUrl\"\n target=\"_blank\"\n >\n <div class=\"file-preview-holder\">\n <img\n role=\"presentation\"\n [src]=\"previewFile?.imageUrl\"\n [alt]=\"previewFile?.file?.name\"\n />\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.Failed\"\n [ngTemplateOutlet]=\"uploadFailedOverlay\"\n >\n </ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </a>\n } @else {\n <div\n class=\"document-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n >\n <div class=\"document-preview-holder\">\n <granite-icon\n class=\"document-file-preview\"\n [class.upload-failed]=\"uploadStatus === FileUploadStatus.Failed\"\n [fontIcon]=\"'icon-document-alt'\"\n ></granite-icon>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </div>\n }\n <button\n graniteButton\n *ngIf=\"\n [FileUploadStatus.Completed, FileUploadStatus.NotStarted].includes(\n uploadStatus\n )\n \"\n (click)=\"fileRemoveHandler(previewFile)\"\n >\n {{ removeButtonText }}\n </button>\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GraniteFileUploadComponent } from './file-upload.component';\nimport { GraniteFileDragAndDropDirective } from './directives/file-drag-and-drop.directive';\nimport { GraniteCarouselModule } from '@ifsworld/granite-components/carousel';\nimport {\n GraniteButtonModule,\n GraniteIconModule,\n} from '@ifsworld/granite-components';\n\n@NgModule({\n declarations: [GraniteFileUploadComponent, GraniteFileDragAndDropDirective],\n exports: [GraniteFileUploadComponent],\n imports: [\n CommonModule,\n GraniteButtonModule,\n GraniteIconModule,\n GraniteCarouselModule,\n ],\n})\nexport class GraniteFileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4.GraniteFileDragAndDropDirective"],"mappings":";;;;;;;;;;AAaO,MAAM,S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AEG;;;;"}
1
+ {"version":3,"file":"ifsworld-granite-components-file-upload.mjs","sources":["../../../../libs/granite-components/file-upload/src/lib/file-upload.constants.ts","../../../../libs/granite-components/file-upload/src/lib/file-upload.utils.ts","../../../../libs/granite-components/file-upload/src/lib/directives/file-drag-and-drop.directive.ts","../../../../libs/granite-components/file-upload/src/lib/file-upload.component.ts","../../../../libs/granite-components/file-upload/src/lib/file-upload.component.html","../../../../libs/granite-components/file-upload/src/lib/file-upload.module.ts","../../../../libs/granite-components/file-upload/src/ifsworld-granite-components-file-upload.ts"],"sourcesContent":["import { CarouselResponsiveOptions } from 'primeng/carousel';\n\nexport interface SelectedFile {\n file: File;\n readableSize?: string;\n imageUrl?: string;\n}\n\nexport interface FileUploadError {\n isError: boolean;\n type: FilUploadErrorTypes;\n}\n\nexport const fileSizes: string[] = [\n 'Bytes',\n 'KB',\n 'MB',\n 'GB',\n 'TB',\n 'PB',\n 'EB',\n 'ZB',\n 'YB',\n];\n\nexport enum FileUploadStatus {\n NotStarted = 'NotStarted',\n InProgress = 'InProgress',\n Completed = 'Completed',\n Failed = 'Failed',\n Cancelled = 'Cancelled',\n}\n\nexport enum FilUploadErrorTypes {\n ExtensionNotSupported = 'ExtensionNotSupported',\n MultipleFilesNotSupported = 'MultipleFilesNotSupported',\n}\n\nexport const DEFAULT_MULTI_FILE_SUPPORT = false;\nexport const DEFAULT_ACCEPT_TYPE: string = '*.*';\nexport const DEFAULT_UPLOAD_TITLE: string = 'Upload Files';\nexport const DEFAULT_UPLOAD_ICON: string = 'icon-upload';\nexport const DEFAULT_FILE_BROWSE_BUTTON_ICON: string = 'icon-folder-alt';\nexport const DEFAULT_DROPZONE_TEXT: string = 'Drop here or';\nexport const DEFAULT_BROWSE_BUTTON_TEXT: string = 'Browse';\nexport const DEFAULT_DROP_PLACEHOLDER_TEXT: string = 'Drop files here';\nexport const DEFAULT_DROPZONE_HINT: string = '';\nexport const DEFAULT_REMOVE_BUTTON_TEXT: string = 'Remove';\nexport const DEFAULT_UPLOAD_BUTTON_TEXT: string = 'Upload Files';\nexport const DEFAULT_RETRY_BUTTON_TEXT: string = 'Retry';\nexport const DEFAULT_CANCEL_BUTTON_TEXT: string = 'Cancel';\nexport const DEFAULT_RESPONSIVE_OPTIONS: CarouselResponsiveOptions[] = [\n { breakpoint: '1200px', numVisible: 4, numScroll: 1 },\n { breakpoint: '992px', numVisible: 3, numScroll: 1 },\n { breakpoint: '768px', numVisible: 2, numScroll: 1 },\n { breakpoint: '576px', numVisible: 1, numScroll: 1 },\n];\nexport const DEFAULT_VISIBLE_FILES: number = 10;\n","export function validFileTypes<T>(\n mimeTypesStringToCheck: string,\n files: T[]\n): boolean {\n const supportedFileMimeTypes = mimeTypesStringToCheck\n .split(',')\n .map((ext) => ext.trim());\n\n if (!files || files.length === 0) {\n return false;\n }\n\n return files.every((file: T) => {\n const fileType = file['type'];\n return fileType && supportedFileMimeTypes.includes(fileType);\n });\n}\n","import {\n Directive,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n} from '@angular/core';\nimport { FileUploadError, FilUploadErrorTypes } from '../file-upload.constants';\nimport { validFileTypes } from '../file-upload.utils';\n\n@Directive({\n selector: '[graniteFileDragAndDrop]',\n exportAs: 'graniteFileDragAndDrop',\n})\nexport class GraniteFileDragAndDropDirective {\n @HostBinding('class.file-over')\n fileOver: boolean;\n\n @HostBinding('class.file-error')\n fileBrowseError: boolean;\n\n @Input()\n multiFileUploadEnabled: boolean;\n\n @Input()\n accept: string;\n\n @Input()\n currentFiles: File[] = [];\n\n @Output()\n droppedFiles: EventEmitter<File[]> = new EventEmitter<File[]>();\n\n @Output()\n isFileOver: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @Output()\n fileUploadValidation: EventEmitter<FileUploadError> =\n new EventEmitter<FileUploadError>();\n\n @HostListener('dragover', ['$event'])\n onDragOver(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const transferFiles = event.dataTransfer?.items ?? [];\n\n if (!validFileTypes(this.accept, Array.from(transferFiles))) {\n this.fileBrowseError = true;\n this.fileUploadValidation.emit({\n isError: this.fileBrowseError,\n type: FilUploadErrorTypes.ExtensionNotSupported,\n });\n return;\n }\n\n if (\n !this.multiFileUploadEnabled &&\n (transferFiles.length > 1 || this.currentFiles.length >= 1)\n ) {\n this.fileBrowseError = true;\n this.fileUploadValidation.emit({\n isError: this.fileBrowseError,\n type: FilUploadErrorTypes.MultipleFilesNotSupported,\n });\n return;\n }\n\n this.fileOver = true;\n this.isFileOver.emit(this.fileOver);\n }\n\n @HostListener('dragleave', ['$event'])\n onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.fileOver = false;\n this.fileBrowseError = false;\n this.fileUploadValidation.emit({ isError: false, type: null });\n this.isFileOver.emit(this.fileOver);\n }\n\n @HostListener('drop', ['$event'])\n onDrop(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.fileBrowseError) {\n this.fileBrowseError = false;\n this.fileUploadValidation.emit({\n isError: this.fileBrowseError,\n type: null,\n });\n return;\n }\n\n this.currentFiles = [\n ...this.currentFiles,\n ...Array.from(event.dataTransfer.files),\n ];\n\n this.fileOver = false;\n this.isFileOver.emit(this.fileOver);\n\n if (this.currentFiles.length > 0) {\n this.droppedFiles.emit(this.currentFiles);\n }\n }\n}\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {\n DEFAULT_BROWSE_BUTTON_TEXT,\n DEFAULT_CANCEL_BUTTON_TEXT,\n DEFAULT_DROP_PLACEHOLDER_TEXT,\n DEFAULT_DROPZONE_HINT,\n DEFAULT_DROPZONE_TEXT,\n DEFAULT_FILE_BROWSE_BUTTON_ICON,\n DEFAULT_ACCEPT_TYPE,\n DEFAULT_MULTI_FILE_SUPPORT,\n DEFAULT_REMOVE_BUTTON_TEXT,\n DEFAULT_RETRY_BUTTON_TEXT,\n DEFAULT_UPLOAD_BUTTON_TEXT,\n DEFAULT_UPLOAD_ICON,\n DEFAULT_UPLOAD_TITLE,\n fileSizes,\n FileUploadError,\n FileUploadStatus,\n FilUploadErrorTypes,\n SelectedFile,\n DEFAULT_RESPONSIVE_OPTIONS,\n DEFAULT_VISIBLE_FILES,\n} from './file-upload.constants';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { validFileTypes } from './file-upload.utils';\nimport { CarouselResponsiveOptions } from 'primeng/carousel';\n\n@Component({\n selector: 'granite-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n})\nexport class GraniteFileUploadComponent {\n @ViewChild('fileDropRef', { read: ElementRef })\n fileDropRef!: ElementRef<HTMLInputElement>;\n\n @Input()\n accept: string = DEFAULT_ACCEPT_TYPE;\n\n @Input()\n uploadTitle: string = DEFAULT_UPLOAD_TITLE;\n\n @Input()\n uploadIcon: string = DEFAULT_UPLOAD_ICON;\n\n @Input()\n browseIcon: string = DEFAULT_FILE_BROWSE_BUTTON_ICON;\n\n @Input()\n dropZoneText: string = DEFAULT_DROPZONE_TEXT;\n\n @Input()\n browseButtonText: string = DEFAULT_BROWSE_BUTTON_TEXT;\n\n @Input()\n dropPlaceholderText: string = DEFAULT_DROP_PLACEHOLDER_TEXT;\n\n @Input()\n dropZoneHint: string = DEFAULT_DROPZONE_HINT;\n\n @Input()\n removeButtonText: string = DEFAULT_REMOVE_BUTTON_TEXT;\n\n @Input()\n uploadButtonText: string = DEFAULT_UPLOAD_BUTTON_TEXT;\n\n @Input()\n retryButtonText: string = DEFAULT_RETRY_BUTTON_TEXT;\n\n @Input()\n cancelButtonText: string = DEFAULT_CANCEL_BUTTON_TEXT;\n\n @Input()\n multiFileUpload: boolean = DEFAULT_MULTI_FILE_SUPPORT;\n\n @Input()\n responsiveOptions: CarouselResponsiveOptions[] = DEFAULT_RESPONSIVE_OPTIONS;\n\n @Output()\n browseOrDragFiles: EventEmitter<SelectedFile[]> = new EventEmitter<\n SelectedFile[]\n >();\n\n @Output()\n removeFiles: EventEmitter<SelectedFile[]> = new EventEmitter<\n SelectedFile[]\n >();\n\n @Output()\n filesUpload: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n fileUploadValidation: EventEmitter<FileUploadError> =\n new EventEmitter<FileUploadError>();\n\n selectedFiles: File[] = [];\n previewReadyFiles: SelectedFile[] = [];\n isFileOnDropzone: boolean = false;\n FileUploadStatus = FileUploadStatus;\n fileError: boolean = false;\n fileDropErrorType: string;\n numVisible: number = DEFAULT_VISIBLE_FILES;\n\n protected _uploadStatus: FileUploadStatus = FileUploadStatus.NotStarted;\n\n @Input()\n get uploadStatus(): FileUploadStatus {\n return this._uploadStatus;\n }\n\n set uploadStatus(status: FileUploadStatus) {\n this._uploadStatus = status;\n }\n\n protected _autoUpload: boolean = true;\n\n @Input()\n get autoUpload(): boolean {\n return this._autoUpload;\n }\n\n set autoUpload(value: boolean) {\n this._autoUpload = coerceBooleanProperty(value);\n }\n\n fileBrowseHandler(event: Event): void {\n const target = event.target as HTMLInputElement;\n const files: File[] = Array.from(target.files);\n\n if (!validFileTypes(this.accept, files)) {\n this.fileUploadValidation.emit({\n isError: true,\n type: FilUploadErrorTypes.ExtensionNotSupported,\n });\n this.fileDropRef.nativeElement.value = null;\n return;\n }\n\n this.selectedFiles = [...this.selectedFiles, ...files];\n this.previewReadyFiles = this.prepareSelectedFiles(this.selectedFiles);\n this.browseOrDragFiles.emit(this.previewReadyFiles);\n }\n\n fileRemoveHandler(fileToRemove: SelectedFile): void {\n const index = this.previewReadyFiles.findIndex(\n (file) =>\n file.imageUrl === fileToRemove.imageUrl &&\n file.file?.name === fileToRemove.file?.name &&\n file.readableSize === fileToRemove.readableSize\n );\n this.selectedFiles.splice(index, 1);\n this.previewReadyFiles.splice(index, 1);\n\n if (\n this.selectedFiles.length === 0 &&\n this.previewReadyFiles.length === 0\n ) {\n this.fileDropRef.nativeElement.value = null;\n this.uploadStatus = FileUploadStatus.NotStarted;\n }\n\n this.removeFiles.emit(this.previewReadyFiles);\n }\n\n onFilesDropHandler(files: File[]): void {\n if (\n !this.multiFileUpload &&\n (this.selectedFiles.length === 1 || files.length !== 1)\n ) {\n this.fileError = true;\n return;\n }\n\n this.selectedFiles = files;\n\n this.previewReadyFiles = this.prepareSelectedFiles(this.selectedFiles);\n this.browseOrDragFiles.emit(this.previewReadyFiles);\n }\n\n onFileOverDropzone(isFileOver: boolean): void {\n this.isFileOnDropzone = isFileOver;\n }\n\n onFileDropError(validation: FileUploadError): void {\n this.fileError = validation.isError;\n this.fileDropErrorType = validation.type;\n }\n\n prepareSelectedFiles(files: File[]): SelectedFile[] {\n return files.map((file: File) => ({\n file,\n readableSize: this.formatBytesToReadableSize(file.size, 2),\n imageUrl: file.type.startsWith('image/')\n ? URL.createObjectURL(file)\n : null,\n }));\n }\n\n uploadFiles(): void {\n this.filesUpload.emit();\n }\n\n retryUpload(): void {\n this.filesUpload.emit();\n }\n\n cancelUpload(): void {\n this.resetFileUpload();\n this.removeFiles.emit(this.previewReadyFiles);\n }\n\n resetFileUpload(): void {\n this.fileDropRef.nativeElement.value = null;\n this.fileError = false;\n this.fileDropErrorType = '';\n this.selectedFiles = [];\n this.previewReadyFiles = [];\n this.uploadStatus = FileUploadStatus.NotStarted;\n }\n\n formatBytesToReadableSize(bytes: number, decimals: number): string {\n if (bytes === 0) {\n return `0 ${fileSizes[0]}`;\n }\n\n const bytesPerKB = 1024;\n const decimalPoints = decimals <= 0 ? 0 : decimals || 2;\n const exp = Math.floor(Math.log(bytes) / Math.log(bytesPerKB));\n return `${parseFloat(\n (bytes / Math.pow(bytesPerKB, exp)).toFixed(decimalPoints)\n )} ${fileSizes[exp]}`;\n }\n}\n","<div class=\"file-upload-wrapper\">\n <h2 class=\"file-upload-title\">{{ uploadTitle }}</h2>\n <div\n class=\"file-dropzone\"\n [ngClass]=\"{ 'upload-failed': uploadStatus === FileUploadStatus.Failed }\"\n graniteFileDragAndDrop\n (droppedFiles)=\"onFilesDropHandler($event)\"\n (isFileOver)=\"onFileOverDropzone($event)\"\n (fileUploadValidation)=\"onFileDropError($event)\"\n [multiFileUploadEnabled]=\"multiFileUpload\"\n [accept]=\"accept\"\n [currentFiles]=\"selectedFiles\"\n >\n <input\n class=\"file-input\"\n #fileDropRef\n type=\"file\"\n title=\"fileUpload\"\n (change)=\"fileBrowseHandler($event)\"\n [multiple]=\"multiFileUpload\"\n [accept]=\"accept\"\n />\n <div class=\"file-upload-body\">\n @if (!isFileOnDropzone && !fileError) {\n @switch (previewReadyFiles.length) {\n @case (0) {\n <div class=\"file-upload-browse\">\n <granite-icon\n class=\"file-upload-icon\"\n [fontIcon]=\"uploadIcon\"\n ></granite-icon>\n <div class=\"file-selection\">\n <h2 class=\"file-upload-body-text\">{{ dropZoneText }}</h2>\n <button\n class=\"file-select-button\"\n graniteButton\n (click)=\"fileDropRef.click()\"\n >\n <granite-icon\n class=\"browse-button-icon\"\n [fontIcon]=\"browseIcon\"\n ></granite-icon>\n <div class=\"browse-button-text\">{{ browseButtonText }}</div>\n </button>\n </div>\n <p *ngIf=\"dropZoneHint\" class=\"file-upload-hint\">\n {{ dropZoneHint }}\n </p>\n </div>\n }\n @case (1) {\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewReadyFiles[0] }\n \"\n ></ng-container>\n }\n @default {\n <granite-carousel\n [items]=\"previewReadyFiles\"\n [numVisible]=\"numVisible\"\n [responsiveOptions]=\"responsiveOptions\"\n >\n <ng-template let-previewFile #itemTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n filePreviewTemplate;\n context: { previewFile: previewFile }\n \"\n ></ng-container>\n </ng-template>\n </granite-carousel>\n }\n }\n } @else {\n <p class=\"drop-area-placeholder\">\n {{ dropPlaceholderText }}\n </p>\n }\n </div>\n </div>\n <div class=\"file-upload-footer\">\n <div class=\"footer-container\" *ngIf=\"previewReadyFiles.length > 0\">\n <button\n *ngIf=\"!autoUpload && uploadStatus === FileUploadStatus.NotStarted\"\n granitePrimaryButton\n (click)=\"uploadFiles()\"\n >\n {{ uploadButtonText }}\n </button>\n <ng-container *ngIf=\"uploadStatus === FileUploadStatus.Failed\">\n <button graniteButton (click)=\"cancelUpload()\">\n {{ cancelButtonText }}\n </button>\n <button\n class=\"retry-upload-button\"\n granitePrimaryButton\n (click)=\"retryUpload()\"\n >\n {{ retryButtonText }}\n </button>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #uploadingOverlay>\n <div class=\"file-preview-overlay\"></div>\n <div class=\"loading-container\">\n <div class=\"uploading-spinner\"></div>\n </div>\n</ng-template>\n\n<ng-template #uploadFailedOverlay>\n <div class=\"file-preview-overlay\"></div>\n</ng-template>\n\n<ng-template #filePreviewTemplate let-previewFile=\"previewFile\">\n <div class=\"file-preview-container\">\n @if (previewFile?.imageUrl) {\n <a\n class=\"file-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n [href]=\"previewFile?.imageUrl\"\n target=\"_blank\"\n >\n <div class=\"file-preview-holder\">\n <img\n role=\"presentation\"\n [src]=\"previewFile?.imageUrl\"\n [alt]=\"previewFile?.file?.name\"\n />\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.Failed\"\n [ngTemplateOutlet]=\"uploadFailedOverlay\"\n >\n </ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </a>\n } @else {\n <div\n class=\"document-preview-link\"\n [ngClass]=\"{\n 'uploading-in-progress': uploadStatus === FileUploadStatus.InProgress,\n 'upload-failed': uploadStatus === FileUploadStatus.Failed\n }\"\n >\n <div class=\"document-preview-holder\">\n <granite-icon\n class=\"document-file-preview\"\n [class.upload-failed]=\"uploadStatus === FileUploadStatus.Failed\"\n [fontIcon]=\"'icon-document-alt'\"\n ></granite-icon>\n <ng-container\n *ngIf=\"uploadStatus === FileUploadStatus.InProgress\"\n [ngTemplateOutlet]=\"uploadingOverlay\"\n ></ng-container>\n </div>\n <p class=\"file-name\" [title]=\"previewFile?.file?.name\">\n {{ previewFile?.file?.name }}\n </p>\n <p class=\"file-size\">{{ previewFile?.readableSize }}</p>\n </div>\n }\n <button\n graniteButton\n *ngIf=\"\n [FileUploadStatus.Completed, FileUploadStatus.NotStarted].includes(\n uploadStatus\n )\n \"\n (click)=\"fileRemoveHandler(previewFile)\"\n >\n {{ removeButtonText }}\n </button>\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GraniteFileUploadComponent } from './file-upload.component';\nimport { GraniteFileDragAndDropDirective } from './directives/file-drag-and-drop.directive';\nimport { GraniteCarouselModule } from '@ifsworld/granite-components/carousel';\nimport {\n GraniteButtonModule,\n GraniteIconModule,\n} from '@ifsworld/granite-components';\n\n@NgModule({\n declarations: [GraniteFileUploadComponent, GraniteFileDragAndDropDirective],\n exports: [GraniteFileUploadComponent],\n imports: [\n CommonModule,\n GraniteButtonModule,\n GraniteIconModule,\n GraniteCarouselModule,\n ],\n})\nexport class GraniteFileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4.GraniteFileDragAndDropDirective"],"mappings":";;;;;;;;;;AAaO,MAAM,SAAS,GAAa;IACjC,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC;AAEF,IAAY,gBAMX,CAAA;AAND,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,gBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;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AA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,EATnB,YAAA,EAAA,CAAA,0BAA0B,EAAE,+BAA+B,aAGxE,YAAY;YACZ,mBAAmB;YACnB,iBAAiB;AACjB,YAAA,qBAAqB,aALb,0BAA0B,CAAA,EAAA,CAAA,CAAA,EAAA;AAQzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YANhC,YAAY;YACZ,mBAAmB;YACnB,iBAAiB;YACjB,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGZ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAVnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,0BAA0B,EAAE,+BAA+B,CAAC;oBAC3E,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,iBAAiB;wBACjB,qBAAqB;AACtB,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ifsworld/granite-components",
3
- "version": "14.2.1",
3
+ "version": "14.2.2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": ">=18.2.12",