@ifsworld/granite-components 15.0.2 → 16.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/date-picker/lib/date-picker-base.d.ts +3 -3
- package/date-picker/lib/date-picker.module.d.ts +2 -2
- package/fesm2022/ifsworld-granite-components-carousel.mjs +9 -9
- package/fesm2022/ifsworld-granite-components-carousel.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-date-picker.mjs +34 -30
- package/fesm2022/ifsworld-granite-components-date-picker.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-file-upload.mjs +13 -12
- package/fesm2022/ifsworld-granite-components-file-upload.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-table.mjs +32 -29
- package/fesm2022/ifsworld-granite-components-table.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-tooltip.mjs +16 -15
- package/fesm2022/ifsworld-granite-components-tooltip.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components.mjs +341 -322
- package/fesm2022/ifsworld-granite-components.mjs.map +1 -1
- package/lib/contacts/contacts-trigger/contacts-trigger-data.d.ts +1 -1
- package/lib/core/overlay-base.d.ts +1 -1
- package/lib/core/radio-checkbox-base.d.ts +1 -1
- package/lib/menu/menu-base.d.ts +1 -1
- package/lib/progress-bar/progress-bar-legend-base.d.ts +1 -1
- package/package.json +13 -25
- package/src/lib/core/style/_mixins.scss +10 -9
- package/src/lib/core/style/_range-functions.scss +6 -4
- package/src/lib/core/style/_z-index.scss +6 -4
- package/table/lib/cell/cell.d.ts +1 -1
- package/esm2022/carousel/ifsworld-granite-components-carousel.mjs +0 -5
- package/esm2022/carousel/index.mjs +0 -3
- package/esm2022/carousel/lib/carousel.component.mjs +0 -156
- package/esm2022/carousel/lib/carousel.module.mjs +0 -31
- package/esm2022/date-picker/ifsworld-granite-components-date-picker.mjs +0 -5
- package/esm2022/date-picker/index.mjs +0 -5
- package/esm2022/date-picker/lib/date-picker-base.mjs +0 -53
- package/esm2022/date-picker/lib/date-picker-trigger-for.directive.mjs +0 -228
- package/esm2022/date-picker/lib/date-picker.component.mjs +0 -30
- package/esm2022/date-picker/lib/date-picker.module.mjs +0 -58
- package/esm2022/date-picker/lib/date-range-picker.component.mjs +0 -46
- package/esm2022/file-upload/ifsworld-granite-components-file-upload.mjs +0 -5
- package/esm2022/file-upload/index.mjs +0 -3
- package/esm2022/file-upload/lib/directives/file-drag-and-drop.directive.mjs +0 -102
- package/esm2022/file-upload/lib/file-upload.component.mjs +0 -182
- package/esm2022/file-upload/lib/file-upload.constants.mjs +0 -45
- package/esm2022/file-upload/lib/file-upload.module.mjs +0 -32
- package/esm2022/file-upload/lib/file-upload.utils.mjs +0 -13
- package/esm2022/ifsworld-granite-components.mjs +0 -5
- package/esm2022/index.mjs +0 -90
- package/esm2022/lib/arrange-grid/arrange-grid-item.component.mjs +0 -44
- package/esm2022/lib/arrange-grid/arrange-grid.component.mjs +0 -125
- package/esm2022/lib/arrange-grid/arrange-grid.module.mjs +0 -19
- package/esm2022/lib/avatar/avatar-default-status/avatar-default-status.component.mjs +0 -36
- package/esm2022/lib/avatar/avatar.component.mjs +0 -68
- package/esm2022/lib/avatar/avatar.component.public-types.mjs +0 -7
- package/esm2022/lib/avatar/avatar.module.mjs +0 -37
- package/esm2022/lib/avatar/custom-avatar-status.directive.mjs +0 -18
- package/esm2022/lib/avatar/empty-avatar/empty-avatar.component.mjs +0 -37
- package/esm2022/lib/badge/badge.component.mjs +0 -39
- package/esm2022/lib/badge/badge.module.mjs +0 -18
- package/esm2022/lib/badge/testing/badge.harness.mjs +0 -25
- package/esm2022/lib/button/button.component.mjs +0 -87
- package/esm2022/lib/button/button.module.mjs +0 -16
- package/esm2022/lib/card-list/card/card-avatar.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card-content/card-actions.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card-content/card-body.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card-content/card-content.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card-content/card-footer.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card-content/card-header-subtitle.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card-content/card-header-title.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card-content/card-header.component.mjs +0 -11
- package/esm2022/lib/card-list/card/card.component.mjs +0 -11
- package/esm2022/lib/card-list/card-list.component.mjs +0 -24
- package/esm2022/lib/card-list/card-list.module.mjs +0 -68
- package/esm2022/lib/checkbox/checkbox-group.component.mjs +0 -17
- package/esm2022/lib/checkbox/checkbox.component.mjs +0 -99
- package/esm2022/lib/checkbox/checkbox.module.mjs +0 -17
- package/esm2022/lib/chips/chip-input.mjs +0 -195
- package/esm2022/lib/chips/chip-list.component.mjs +0 -567
- package/esm2022/lib/chips/chip.component.mjs +0 -288
- package/esm2022/lib/chips/chips.module.mjs +0 -31
- package/esm2022/lib/collapsible-group/collapsible-group-body.directive.mjs +0 -17
- package/esm2022/lib/collapsible-group/collapsible-group-header.directive.mjs +0 -17
- package/esm2022/lib/collapsible-group/collapsible-group.component.mjs +0 -46
- package/esm2022/lib/collapsible-group/collapsible-group.module.mjs +0 -33
- package/esm2022/lib/contacts/contact-item/contact-item.component.mjs +0 -27
- package/esm2022/lib/contacts/contact-item-default-status/contact-item-default-status.component.mjs +0 -20
- package/esm2022/lib/contacts/contact-item-title/contact-item-title.component.mjs +0 -15
- package/esm2022/lib/contacts/contacts-profile/contacts-profile.component.mjs +0 -18
- package/esm2022/lib/contacts/contacts-trigger/contacts-trigger-data.mjs +0 -24
- package/esm2022/lib/contacts/contacts-trigger/contacts-trigger-for.directive.mjs +0 -231
- package/esm2022/lib/contacts/contacts-types/contacts.component.private-types.mjs +0 -2
- package/esm2022/lib/contacts/contacts-types/contacts.component.public-types.mjs +0 -9
- package/esm2022/lib/contacts/contacts.component.mjs +0 -92
- package/esm2022/lib/contacts/contacts.module.mjs +0 -53
- package/esm2022/lib/contacts/custom-profile.directive.mjs +0 -16
- package/esm2022/lib/contacts/custom-status.directive.mjs +0 -18
- package/esm2022/lib/core/animation.mjs +0 -34
- package/esm2022/lib/core/client-environment.mjs +0 -20
- package/esm2022/lib/core/common-behaviors/disabled.mjs +0 -27
- package/esm2022/lib/core/core.module.mjs +0 -44
- package/esm2022/lib/core/devices/client-input-desktop.directive.mjs +0 -29
- package/esm2022/lib/core/devices/client-input-touch.directive.mjs +0 -29
- package/esm2022/lib/core/devices/client-output-desktop.directive.mjs +0 -29
- package/esm2022/lib/core/devices/client-output-touch.directive.mjs +0 -29
- package/esm2022/lib/core/hide-on-overflow.directive.mjs +0 -83
- package/esm2022/lib/core/overlay-base.mjs +0 -18
- package/esm2022/lib/core/overlay-position-config.mjs +0 -2
- package/esm2022/lib/core/overlay-trigger-for-base.directive.mjs +0 -121
- package/esm2022/lib/core/overlay.service.mjs +0 -90
- package/esm2022/lib/core/pipes/pure-pipes.module.mjs +0 -16
- package/esm2022/lib/core/pipes/title.pipe.mjs +0 -21
- package/esm2022/lib/core/radio-checkbox-base.mjs +0 -19
- package/esm2022/lib/core/services/names-utils-service.mjs +0 -51
- package/esm2022/lib/core/theme.library.mjs +0 -59
- package/esm2022/lib/core/types.mjs +0 -2
- package/esm2022/lib/grid/grid.component.mjs +0 -128
- package/esm2022/lib/grid/grid.module.mjs +0 -18
- package/esm2022/lib/icon/icon.component.mjs +0 -43
- package/esm2022/lib/icon/icon.module.mjs +0 -16
- package/esm2022/lib/input-field/input-field.component.mjs +0 -167
- package/esm2022/lib/input-field/input-field.module.mjs +0 -20
- package/esm2022/lib/label/label.component.mjs +0 -31
- package/esm2022/lib/label/label.module.mjs +0 -18
- package/esm2022/lib/menu/divider.directive.mjs +0 -23
- package/esm2022/lib/menu/menu-base.mjs +0 -364
- package/esm2022/lib/menu/menu-desktop-animations.mjs +0 -23
- package/esm2022/lib/menu/menu-errors.mjs +0 -37
- package/esm2022/lib/menu/menu-item.component.mjs +0 -89
- package/esm2022/lib/menu/menu-panel.mjs +0 -7
- package/esm2022/lib/menu/menu-positions.mjs +0 -9
- package/esm2022/lib/menu/menu-touch-animations.mjs +0 -137
- package/esm2022/lib/menu/menu-touch-close.component.mjs +0 -13
- package/esm2022/lib/menu/menu-touch-title.component.mjs +0 -59
- package/esm2022/lib/menu/menu-trigger-for.directive.mjs +0 -738
- package/esm2022/lib/menu/menu.component.mjs +0 -30
- package/esm2022/lib/menu/menu.module.mjs +0 -55
- package/esm2022/lib/menu/testing/menu.harness.mjs +0 -109
- package/esm2022/lib/menu/title.directive.mjs +0 -17
- package/esm2022/lib/progress-bar/progress-bar-legend/progress-bar-legend.component.mjs +0 -19
- package/esm2022/lib/progress-bar/progress-bar-legend-base.mjs +0 -17
- package/esm2022/lib/progress-bar/progress-bar-legend-trigger-for.directive.mjs +0 -54
- package/esm2022/lib/progress-bar/progress-bar.component.mjs +0 -92
- package/esm2022/lib/progress-bar/progress-bar.model.mjs +0 -2
- package/esm2022/lib/progress-bar/progress-bar.module.mjs +0 -44
- package/esm2022/lib/radio-button/radio-button.component.mjs +0 -119
- package/esm2022/lib/radio-button/radio-button.module.mjs +0 -17
- package/esm2022/lib/radio-button/radio-group.component.mjs +0 -17
- package/esm2022/lib/toggle-switch/toggle-switch.component.mjs +0 -100
- package/esm2022/lib/toggle-switch/toggle-switch.module.mjs +0 -16
- package/esm2022/table/ifsworld-granite-components-table.mjs +0 -5
- package/esm2022/table/index.mjs +0 -5
- package/esm2022/table/lib/cell/cell-align/cell-align-classes.directive.mjs +0 -26
- package/esm2022/table/lib/cell/cell.mjs +0 -15
- package/esm2022/table/lib/cell/table-data-cell.component.mjs +0 -25
- package/esm2022/table/lib/cell/table-header-cell.component.mjs +0 -14
- package/esm2022/table/lib/column/table-column.directive.mjs +0 -33
- package/esm2022/table/lib/column-size/column-size.directive.mjs +0 -34
- package/esm2022/table/lib/table-constants.library.mjs +0 -7
- package/esm2022/table/lib/table.component.mjs +0 -62
- package/esm2022/table/lib/table.model.mjs +0 -2
- package/esm2022/table/lib/table.module.mjs +0 -38
- package/esm2022/tooltip/ifsworld-granite-components-tooltip.mjs +0 -5
- package/esm2022/tooltip/index.mjs +0 -4
- package/esm2022/tooltip/lib/Services/granite-tooltip.service.mjs +0 -28
- package/esm2022/tooltip/lib/tooltip-constants.library.mjs +0 -4
- package/esm2022/tooltip/lib/tooltip-trigger-for.directive.mjs +0 -147
- package/esm2022/tooltip/lib/tooltip.component.mjs +0 -14
- package/esm2022/tooltip/lib/tooltip.module.mjs +0 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifsworld-granite-components-date-picker.mjs","sources":["../../../../libs/granite-components/date-picker/src/lib/date-picker-base.ts","../../../../libs/granite-components/date-picker/src/lib/date-picker.component.ts","../../../../libs/granite-components/date-picker/src/lib/date-picker.component.html","../../../../libs/granite-components/date-picker/src/lib/date-range-picker.component.ts","../../../../libs/granite-components/date-picker/src/lib/date-range-picker.component.html","../../../../libs/granite-components/date-picker/src/lib/date-picker-trigger-for.directive.ts","../../../../libs/granite-components/date-picker/src/lib/date-picker.module.ts","../../../../libs/granite-components/date-picker/src/ifsworld-granite-components-date-picker.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { Direction } from '@angular/cdk/bidi';\n// eslint-disable-next-line import/no-internal-modules\nimport { PrimeNGConfig } from 'primeng/api';\nimport {\n ClientInputInterface,\n ClientOutputInterface,\n} from '@ifsworld/granite-components';\n\nexport type PositionX = 'before' | 'after';\n\nexport type PositionY = 'above' | 'below';\n\nlet pickerPanelUid = 0;\n\n/** Base class with common functionality for date/date-range pickers. */\n@Directive()\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class _DatePickerBase implements OnInit {\n @Input()\n minDate: Date | null = null;\n\n @Input()\n maxDate: Date | null = null;\n\n @Input()\n firstDayOfWeek: number = 0;\n\n @Output()\n readonly pickerClosed: EventEmitter<any> = new EventEmitter();\n\n @ViewChild(TemplateRef) templateRef: TemplateRef<any>;\n\n xPosition: PositionX = 'before';\n yPosition: PositionY = 'below';\n\n direction: Direction;\n\n /**\n * Used for locating the panel in tests and setting the aria-control attribute\n * for the picker trigger.\n */\n readonly panelId = `granite-date-picker-panel-${pickerPanelUid++}`;\n\n /** Client input device information */\n clientInput: ClientInputInterface;\n\n /** Client output device information */\n clientOutput: ClientOutputInterface;\n\n constructor(\n public _elementRef: ElementRef,\n public config: PrimeNGConfig\n ) {}\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n ngOnInit() {\n this.config.setTranslation({\n dayNamesMin: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n });\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.pickerClosed.emit();\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n} from '@angular/core';\n// eslint-disable-next-line import/no-internal-modules\nimport { _DatePickerBase } from './date-picker-base';\n\n@Component({\n selector: 'granite-date-picker',\n templateUrl: './date-picker.component.html',\n styleUrls: ['./date-picker.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteDatePickerComponent extends _DatePickerBase {\n @Input()\n selectedDate: Date | undefined = undefined;\n\n @Output()\n readonly selectionChanged: EventEmitter<Date> = new EventEmitter<Date>();\n\n dateSelectionChanged(newDate: Date): void {\n this.selectedDate = newDate;\n this.selectionChanged.emit(newDate);\n }\n}\n","<ng-template>\n <div class=\"granite-date-picker\" cdkTrapFocus>\n <div *ngIf=\"selectedDate; else notSelected\">\n <p-calendar\n [(ngModel)]=\"selectedDate\"\n [focusTrap]=\"true\"\n [showButtonBar]=\"true\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput?.device === 'touch'\"\n (onSelect)=\"dateSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-calendar>\n </div>\n <ng-template #notSelected>\n <p-calendar\n [focusTrap]=\"true\"\n [showButtonBar]=\"true\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput?.device === 'touch'\"\n (onSelect)=\"dateSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-calendar>\n </ng-template>\n </div>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n Output,\n EventEmitter,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\n// eslint-disable-next-line import/no-internal-modules\nimport { _DatePickerBase } from './date-picker-base';\n\n@Component({\n selector: 'granite-date-range-picker',\n templateUrl: './date-range-picker.component.html',\n styleUrls: ['./date-picker.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteDateRangePickerComponent\n extends _DatePickerBase\n implements OnChanges\n{\n @Input()\n selectedDateRange: Date[] = null;\n\n @Output()\n readonly selectionChanged: EventEmitter<Date[]> = new EventEmitter<Date[]>();\n\n _selectedDateRangeInternal: Date[] = null;\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.selectedDateRange) {\n this._selectedDateRangeInternal =\n this.selectedDateRange?.length > 0 ? this.selectedDateRange : null;\n }\n }\n\n dateRangeSelectionChanged(date: Date): void {\n if (\n this._selectedDateRangeInternal == null ||\n this._selectedDateRangeInternal.length === 0\n ) {\n this._selectedDateRangeInternal = [date];\n } else if (this._selectedDateRangeInternal.length === 1) {\n this._selectedDateRangeInternal.push(date);\n } else if (\n this._selectedDateRangeInternal.length === 2 &&\n this._selectedDateRangeInternal[1] != null\n ) {\n this.selectionChanged.emit(this._selectedDateRangeInternal);\n }\n }\n}\n","<ng-template>\n <div\n class=\"granite-date-picker\"\n [class.granite-date-range-picker]=\"true\"\n cdkTrapFocus\n >\n <div *ngIf=\"_selectedDateRangeInternal !== null; else rangeNotSelected\">\n <p-calendar\n selectionMode=\"range\"\n [(ngModel)]=\"_selectedDateRangeInternal\"\n [focusTrap]=\"true\"\n [showButtonBar]=\"false\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput.device === 'touch'\"\n (onSelect)=\"dateRangeSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-calendar>\n </div>\n <ng-template #rangeNotSelected>\n <p-calendar\n selectionMode=\"range\"\n [focusTrap]=\"true\"\n [showButtonBar]=\"false\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput.device === 'touch'\"\n (onSelect)=\"dateRangeSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-calendar>\n </ng-template>\n </div>\n</ng-template>\n","import {\n AfterContentInit,\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n Overlay,\n OverlayConfig,\n OverlayOutsideClickDispatcher,\n OverlayRef,\n PositionStrategy,\n VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\n\nimport { merge, Observable, Subscription } from 'rxjs';\n\nimport {\n ClientInputInterface,\n ClientOutputInterface,\n GRANITE_CLIENT_INPUT,\n GRANITE_CLIENT_OUTPUT,\n} from '@ifsworld/granite-components';\nimport { GraniteDatePickerComponent } from './date-picker.component';\nimport { GraniteDateRangePickerComponent } from './date-range-picker.component';\n\n@Directive({\n selector: `[graniteDatePickerTriggerFor]`,\n host: {\n class: 'granite-date-picker-trigger',\n 'aria-haspopup': 'true',\n '[attr.aria-expanded]': '_isPickerOpen || null',\n '[attr.aria-controls]': '_isPickerOpen ? picker.panelId : null',\n '(keydown)': '_handleKeydown($event)',\n '(click)': '_handleClick($event)',\n },\n})\nexport class GraniteDatePickerTriggerForDirective\n implements AfterContentInit, OnDestroy\n{\n /** References the picker instance that the trigger is associated with. */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('graniteDatePickerTriggerFor')\n picker: GraniteDatePickerComponent | GraniteDateRangePickerComponent;\n\n /** Whether the associated picker is open */\n _isPickerOpen: boolean = false;\n\n private _pickerCloseSubscription = Subscription.EMPTY;\n\n private _portal: TemplatePortal | null = null;\n private _overlayRef: OverlayRef | null = null;\n\n constructor(\n private _overlay: Overlay,\n private _element: ElementRef<HTMLElement>,\n private _viewContainerRef: ViewContainerRef,\n private _outsideClickDispatcher: OverlayOutsideClickDispatcher,\n\n /** Client input device information */\n @Inject(GRANITE_CLIENT_INPUT)\n @Optional()\n public _clientInput: ClientInputInterface,\n\n /** Client output device information */\n @Inject(GRANITE_CLIENT_OUTPUT)\n @Optional()\n public _clientOutput: ClientOutputInterface,\n\n @Optional()\n private _dir: Directionality,\n\n private _focusMonitor: FocusMonitor\n ) {}\n\n ngAfterContentInit(): void {\n const selectionChanged = this.picker.selectionChanged as Observable<any>;\n const closed = this.picker.pickerClosed as Observable<any>;\n\n this._pickerCloseSubscription = merge(selectionChanged, closed).subscribe(\n () => {\n this.closePicker();\n }\n );\n }\n\n ngOnDestroy(): void {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n this._pickerCloseSubscription.unsubscribe();\n }\n\n isOpen(): boolean {\n return this._isPickerOpen;\n }\n\n openPicker(): void {\n if (this._isPickerOpen) {\n return;\n }\n\n this.picker.direction = this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n this.picker.clientInput = this._clientInput;\n this.picker.clientOutput = this._clientOutput;\n\n const panelClass: string[] = [];\n if (this._clientOutput?.device === 'touch') {\n panelClass.push('granite-overlay-pane-center');\n }\n\n const scrollStrategy =\n this._clientOutput?.device !== 'touch'\n ? this._overlay.scrollStrategies.reposition()\n : this._overlay.scrollStrategies.block();\n\n const hasBackdrop = this._clientOutput?.device === 'touch';\n\n if (!this._overlayRef) {\n const config = new OverlayConfig({\n positionStrategy: this._positionStrategy(),\n backdropClass: 'granite-overlay-dark-glass-backdrop',\n scrollStrategy,\n direction: this._dir,\n panelClass,\n hasBackdrop,\n });\n\n this._overlayRef = this._overlay.create(config);\n }\n\n if (!this._portal || this._portal.templateRef !== this.picker.templateRef) {\n this._portal = new TemplatePortal(\n this.picker.templateRef,\n this._viewContainerRef\n );\n }\n // Attach portal to overlay ref (which is a portal outlet)\n this._overlayRef.attach(this._portal);\n this._outsideClickDispatcher.add(this._overlayRef);\n this._overlayRef.outsidePointerEvents().subscribe((event: MouseEvent) => {\n event.stopPropagation();\n this.closePicker();\n });\n\n this._isPickerOpen = true;\n }\n\n /** Toggles the picker between the open and closed states. */\n togglePicker(): void {\n if (this._isPickerOpen) {\n this.closePicker();\n } else {\n this.openPicker();\n }\n }\n\n /** Close the associated picker */\n closePicker(): void {\n if (!this._overlayRef || !this._isPickerOpen) {\n return;\n }\n\n this._outsideClickDispatcher.remove(this._overlayRef);\n this._overlayRef.detach();\n\n this._restoreFocus();\n this._isPickerOpen = false;\n }\n\n /** Handles key presses on the trigger. */\n _handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n event.preventDefault();\n this.togglePicker();\n }\n }\n\n /** Handles click events on the trigger. */\n _handleClick(): void {\n this.togglePicker();\n }\n\n /**\n * Restores focus to the element that was focused before the picker was open.\n */\n _restoreFocus(origin: FocusOrigin = 'program', options?: FocusOptions): void {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(this._element, origin, options);\n } else {\n this._element.nativeElement.focus(options);\n }\n }\n\n /**\n * Returns strategy for positioning the overlay for desktop devices:\n */\n private _desktopPositionStrategy(): PositionStrategy {\n const positionStrategy: FlexibleConnectedPositionStrategy = this._overlay\n .position()\n .flexibleConnectedTo(this._element)\n .withLockedPosition()\n .withTransformOriginOn('.granite-date-picker')\n .withPush(false);\n\n this._setPosition(positionStrategy);\n return positionStrategy;\n }\n\n /**\n * Sets the appropriate positions on a position strategy\n * so the overlay connects with the trigger correctly.\n * @param positionStrategy Strategy whose position to update.\n */\n private _setPosition(positionStrategy: FlexibleConnectedPositionStrategy) {\n const [originX, originFallbackX]: HorizontalConnectionPos[] =\n this.picker.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];\n\n const [overlayY, overlayFallbackY]: VerticalConnectionPos[] =\n this.picker.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];\n\n let [originY, originFallbackY] = [overlayY, overlayFallbackY];\n const [overlayX, overlayFallbackX] = [originX, originFallbackX];\n const offsetY = 0;\n\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n\n positionStrategy.withPositions([\n { originX, originY, overlayX, overlayY, offsetY },\n {\n originX: originFallbackX,\n originY,\n overlayX: overlayFallbackX,\n overlayY,\n offsetY,\n },\n {\n originX,\n originY: originFallbackY,\n overlayX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n {\n originX: originFallbackX,\n originY: originFallbackY,\n overlayX: overlayFallbackX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n ]);\n }\n\n /**\n * Returns strategy for positioning the overlay depending on what type of\n * device the picker is being shown on\n */\n private _positionStrategy(): PositionStrategy {\n if (this._clientOutput?.device !== 'touch') {\n return this._desktopPositionStrategy();\n }\n return this._touchPositionStrategy();\n }\n\n /**\n * Returns strategy for positioning the overlay for touch devices:\n * Place centered in the screen.\n */\n private _touchPositionStrategy(): PositionStrategy {\n return this._overlay.position().global();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { GraniteDatePickerComponent } from './date-picker.component';\nimport { GraniteDateRangePickerComponent } from './date-range-picker.component';\nimport { CalendarModule } from 'primeng/calendar';\nimport {\n GraniteIconModule,\n GraniteButtonModule,\n} from '@ifsworld/granite-components';\nimport { GraniteDatePickerTriggerForDirective } from './date-picker-trigger-for.directive';\nimport { A11yModule } from '@angular/cdk/a11y';\n\n@NgModule({\n declarations: [\n GraniteDatePickerComponent,\n GraniteDateRangePickerComponent,\n GraniteDatePickerTriggerForDirective,\n ],\n imports: [\n CommonModule,\n OverlayModule,\n CalendarModule,\n FormsModule,\n GraniteIconModule,\n GraniteButtonModule,\n A11yModule,\n ],\n exports: [\n GraniteDatePickerComponent,\n GraniteDateRangePickerComponent,\n GraniteDatePickerTriggerForDirective,\n ],\n providers: [],\n})\nexport class GraniteDatePickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB;AAEA;MACa,eAAe,CAAA;IAgC1B,WACS,CAAA,WAAuB,EACvB,MAAqB,EAAA;QADrB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QACvB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAe;QAhC9B,IAAO,CAAA,OAAA,GAAgB,IAAI,CAAC;QAG5B,IAAO,CAAA,OAAA,GAAgB,IAAI,CAAC;QAG5B,IAA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A,EAAA,EAAA,IAAA,EAAA,uBAAuB,iBApBhC,0BAA0B;YAC1B,+BAA+B;AAC/B,YAAA,oCAAoC,aAGpC,YAAY;YACZ,aAAa;YACb,cAAc;YACd,WAAW;YACX,iBAAiB;YACjB,mBAAmB;AACnB,YAAA,UAAU,aAGV,0BAA0B;YAC1B,+BAA+B;YAC/B,oCAAoC,CAAA,EAAA,CAAA,CAAA,EAAA;AAI3B,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,YAfhC,YAAY;YACZ,aAAa;YACb,cAAc;YACd,WAAW;YACX,iBAAiB;YACjB,mBAAmB;YACnB,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FASD,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAtBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,+BAA+B;wBAC/B,oCAAoC;AACrC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,cAAc;wBACd,WAAW;wBACX,iBAAiB;wBACjB,mBAAmB;wBACnB,UAAU;AACX,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,0BAA0B;wBAC1B,+BAA+B;wBAC/B,oCAAoC;AACrC,qBAAA;AACD,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACnCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ifsworld-granite-components-date-picker.mjs","sources":["../../../../libs/granite-components/date-picker/src/lib/date-picker-base.ts","../../../../libs/granite-components/date-picker/src/lib/date-picker.component.ts","../../../../libs/granite-components/date-picker/src/lib/date-picker.component.html","../../../../libs/granite-components/date-picker/src/lib/date-range-picker.component.ts","../../../../libs/granite-components/date-picker/src/lib/date-range-picker.component.html","../../../../libs/granite-components/date-picker/src/lib/date-picker-trigger-for.directive.ts","../../../../libs/granite-components/date-picker/src/lib/date-picker.module.ts","../../../../libs/granite-components/date-picker/src/ifsworld-granite-components-date-picker.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { Direction } from '@angular/cdk/bidi';\n// eslint-disable-next-line import/no-internal-modules\nimport {\n ClientInputInterface,\n ClientOutputInterface,\n} from '@ifsworld/granite-components';\nimport { PrimeNG } from 'primeng/config';\n\nexport type PositionX = 'before' | 'after';\n\nexport type PositionY = 'above' | 'below';\n\nlet pickerPanelUid = 0;\n\n/** Base class with common functionality for date/date-range pickers. */\n@Directive({\n standalone: false,\n})\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class _DatePickerBase implements OnInit {\n @Input()\n minDate: Date | null = null;\n\n @Input()\n maxDate: Date | null = null;\n\n @Input()\n firstDayOfWeek: number = 0;\n\n @Output()\n readonly pickerClosed: EventEmitter<any> = new EventEmitter();\n\n @ViewChild(TemplateRef) templateRef: TemplateRef<any>;\n\n xPosition: PositionX = 'before';\n yPosition: PositionY = 'below';\n\n direction: Direction;\n\n /**\n * Used for locating the panel in tests and setting the aria-control attribute\n * for the picker trigger.\n */\n readonly panelId = `granite-date-picker-panel-${pickerPanelUid++}`;\n\n /** Client input device information */\n clientInput: ClientInputInterface;\n\n /** Client output device information */\n clientOutput: ClientOutputInterface;\n\n constructor(\n public _elementRef: ElementRef,\n public primeNG: PrimeNG\n ) {}\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n ngOnInit() {\n this.primeNG.setTranslation({\n dayNamesMin: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n });\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.pickerClosed.emit();\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n Output,\n EventEmitter,\n ViewEncapsulation,\n} from '@angular/core';\n// eslint-disable-next-line import/no-internal-modules\nimport { _DatePickerBase } from './date-picker-base';\n\n@Component({\n selector: 'granite-date-picker',\n templateUrl: './date-picker.component.html',\n styleUrls: ['./date-picker.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class GraniteDatePickerComponent extends _DatePickerBase {\n @Input()\n selectedDate: Date | undefined = undefined;\n\n @Output()\n readonly selectionChanged: EventEmitter<Date> = new EventEmitter<Date>();\n\n dateSelectionChanged(newDate: Date): void {\n this.selectedDate = newDate;\n this.selectionChanged.emit(newDate);\n }\n}\n","<ng-template>\n <div class=\"granite-date-picker\" cdkTrapFocus>\n <div *ngIf=\"selectedDate; else notSelected\">\n <p-datepicker\n [(ngModel)]=\"selectedDate\"\n [focusTrap]=\"true\"\n [showButtonBar]=\"true\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput?.device === 'touch'\"\n (onSelect)=\"dateSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-datepicker>\n </div>\n <ng-template #notSelected>\n <p-datepicker\n [focusTrap]=\"true\"\n [showButtonBar]=\"true\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput?.device === 'touch'\"\n (onSelect)=\"dateSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-datepicker>\n </ng-template>\n </div>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n Output,\n EventEmitter,\n Input,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\n// eslint-disable-next-line import/no-internal-modules\nimport { _DatePickerBase } from './date-picker-base';\n\n@Component({\n selector: 'granite-date-range-picker',\n templateUrl: './date-range-picker.component.html',\n styleUrls: ['./date-picker.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class GraniteDateRangePickerComponent\n extends _DatePickerBase\n implements OnChanges\n{\n @Input()\n selectedDateRange: Date[] = null;\n\n @Output()\n readonly selectionChanged: EventEmitter<Date[]> = new EventEmitter<Date[]>();\n\n _selectedDateRangeInternal: Date[] = null;\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.selectedDateRange) {\n this._selectedDateRangeInternal =\n this.selectedDateRange?.length > 0 ? this.selectedDateRange : null;\n }\n }\n\n dateRangeSelectionChanged(date: Date): void {\n if (\n this._selectedDateRangeInternal == null ||\n this._selectedDateRangeInternal.length === 0\n ) {\n this._selectedDateRangeInternal = [date];\n } else if (this._selectedDateRangeInternal.length === 1) {\n this._selectedDateRangeInternal.push(date);\n } else if (\n this._selectedDateRangeInternal.length === 2 &&\n this._selectedDateRangeInternal[1] != null\n ) {\n this.selectionChanged.emit(this._selectedDateRangeInternal);\n }\n }\n}\n","<ng-template>\n <div\n class=\"granite-date-picker\"\n [class.granite-date-range-picker]=\"true\"\n cdkTrapFocus\n >\n <div *ngIf=\"_selectedDateRangeInternal !== null; else rangeNotSelected\">\n <p-datepicker\n selectionMode=\"range\"\n [(ngModel)]=\"_selectedDateRangeInternal\"\n [focusTrap]=\"true\"\n [showButtonBar]=\"false\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput.device === 'touch'\"\n (onSelect)=\"dateRangeSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-datepicker>\n </div>\n <ng-template #rangeNotSelected>\n <p-datepicker\n selectionMode=\"range\"\n [focusTrap]=\"true\"\n [showButtonBar]=\"false\"\n [inline]=\"true\"\n [showIcon]=\"false\"\n [clearButtonStyleClass]=\"'hideClearButton'\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [firstDayOfWeek]=\"firstDayOfWeek\"\n [showWeek]=\"false\"\n [touchUI]=\"clientOutput.device === 'touch'\"\n (onSelect)=\"dateRangeSelectionChanged($event)\"\n (keydown)=\"_handleKeydown($event)\"\n ></p-datepicker>\n </ng-template>\n </div>\n</ng-template>\n","import {\n AfterContentInit,\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n Overlay,\n OverlayConfig,\n OverlayOutsideClickDispatcher,\n OverlayRef,\n PositionStrategy,\n VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\n\nimport { merge, Observable, Subscription } from 'rxjs';\n\nimport {\n ClientInputInterface,\n ClientOutputInterface,\n GRANITE_CLIENT_INPUT,\n GRANITE_CLIENT_OUTPUT,\n} from '@ifsworld/granite-components';\nimport { GraniteDatePickerComponent } from './date-picker.component';\nimport { GraniteDateRangePickerComponent } from './date-range-picker.component';\n\n@Directive({\n selector: `[graniteDatePickerTriggerFor]`,\n standalone: false,\n host: {\n class: 'granite-date-picker-trigger',\n 'aria-haspopup': 'true',\n '[attr.aria-expanded]': '_isPickerOpen || null',\n '[attr.aria-controls]': '_isPickerOpen ? picker.panelId : null',\n '(keydown)': '_handleKeydown($event)',\n '(click)': '_handleClick($event)',\n },\n})\nexport class GraniteDatePickerTriggerForDirective\n implements AfterContentInit, OnDestroy\n{\n /** References the picker instance that the trigger is associated with. */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('graniteDatePickerTriggerFor')\n picker: GraniteDatePickerComponent | GraniteDateRangePickerComponent;\n\n /** Whether the associated picker is open */\n _isPickerOpen: boolean = false;\n\n private _pickerCloseSubscription = Subscription.EMPTY;\n\n private _portal: TemplatePortal | null = null;\n private _overlayRef: OverlayRef | null = null;\n\n constructor(\n private _overlay: Overlay,\n private _element: ElementRef<HTMLElement>,\n private _viewContainerRef: ViewContainerRef,\n private _outsideClickDispatcher: OverlayOutsideClickDispatcher,\n\n /** Client input device information */\n @Inject(GRANITE_CLIENT_INPUT)\n @Optional()\n public _clientInput: ClientInputInterface,\n\n /** Client output device information */\n @Inject(GRANITE_CLIENT_OUTPUT)\n @Optional()\n public _clientOutput: ClientOutputInterface,\n\n @Optional()\n private _dir: Directionality,\n\n private _focusMonitor: FocusMonitor\n ) {}\n\n ngAfterContentInit(): void {\n const selectionChanged = this.picker.selectionChanged as Observable<any>;\n const closed = this.picker.pickerClosed as Observable<any>;\n\n this._pickerCloseSubscription = merge(selectionChanged, closed).subscribe(\n () => {\n this.closePicker();\n }\n );\n }\n\n ngOnDestroy(): void {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n this._pickerCloseSubscription.unsubscribe();\n }\n\n isOpen(): boolean {\n return this._isPickerOpen;\n }\n\n openPicker(): void {\n if (this._isPickerOpen) {\n return;\n }\n\n this.picker.direction = this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n this.picker.clientInput = this._clientInput;\n this.picker.clientOutput = this._clientOutput;\n\n const panelClass: string[] = [];\n if (this._clientOutput?.device === 'touch') {\n panelClass.push('granite-overlay-pane-center');\n }\n\n const scrollStrategy =\n this._clientOutput?.device !== 'touch'\n ? this._overlay.scrollStrategies.reposition()\n : this._overlay.scrollStrategies.block();\n\n const hasBackdrop = this._clientOutput?.device === 'touch';\n\n if (!this._overlayRef) {\n const config = new OverlayConfig({\n positionStrategy: this._positionStrategy(),\n backdropClass: 'granite-overlay-dark-glass-backdrop',\n scrollStrategy,\n direction: this._dir,\n panelClass,\n hasBackdrop,\n });\n\n this._overlayRef = this._overlay.create(config);\n }\n\n if (!this._portal || this._portal.templateRef !== this.picker.templateRef) {\n this._portal = new TemplatePortal(\n this.picker.templateRef,\n this._viewContainerRef\n );\n }\n // Attach portal to overlay ref (which is a portal outlet)\n this._overlayRef.attach(this._portal);\n this._outsideClickDispatcher.add(this._overlayRef);\n this._overlayRef.outsidePointerEvents().subscribe((event: MouseEvent) => {\n event.stopPropagation();\n this.closePicker();\n });\n\n this._isPickerOpen = true;\n }\n\n /** Toggles the picker between the open and closed states. */\n togglePicker(): void {\n if (this._isPickerOpen) {\n this.closePicker();\n } else {\n this.openPicker();\n }\n }\n\n /** Close the associated picker */\n closePicker(): void {\n if (!this._overlayRef || !this._isPickerOpen) {\n return;\n }\n\n this._outsideClickDispatcher.remove(this._overlayRef);\n this._overlayRef.detach();\n\n this._restoreFocus();\n this._isPickerOpen = false;\n }\n\n /** Handles key presses on the trigger. */\n _handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n event.preventDefault();\n this.togglePicker();\n }\n }\n\n /** Handles click events on the trigger. */\n _handleClick(): void {\n this.togglePicker();\n }\n\n /**\n * Restores focus to the element that was focused before the picker was open.\n */\n _restoreFocus(origin: FocusOrigin = 'program', options?: FocusOptions): void {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(this._element, origin, options);\n } else {\n this._element.nativeElement.focus(options);\n }\n }\n\n /**\n * Returns strategy for positioning the overlay for desktop devices:\n */\n private _desktopPositionStrategy(): PositionStrategy {\n const positionStrategy: FlexibleConnectedPositionStrategy = this._overlay\n .position()\n .flexibleConnectedTo(this._element)\n .withLockedPosition()\n .withTransformOriginOn('.granite-date-picker')\n .withPush(false);\n\n this._setPosition(positionStrategy);\n return positionStrategy;\n }\n\n /**\n * Sets the appropriate positions on a position strategy\n * so the overlay connects with the trigger correctly.\n * @param positionStrategy Strategy whose position to update.\n */\n private _setPosition(positionStrategy: FlexibleConnectedPositionStrategy) {\n const [originX, originFallbackX]: HorizontalConnectionPos[] =\n this.picker.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];\n\n const [overlayY, overlayFallbackY]: VerticalConnectionPos[] =\n this.picker.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];\n\n let [originY, originFallbackY] = [overlayY, overlayFallbackY];\n const [overlayX, overlayFallbackX] = [originX, originFallbackX];\n const offsetY = 0;\n\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n\n positionStrategy.withPositions([\n { originX, originY, overlayX, overlayY, offsetY },\n {\n originX: originFallbackX,\n originY,\n overlayX: overlayFallbackX,\n overlayY,\n offsetY,\n },\n {\n originX,\n originY: originFallbackY,\n overlayX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n {\n originX: originFallbackX,\n originY: originFallbackY,\n overlayX: overlayFallbackX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n ]);\n }\n\n /**\n * Returns strategy for positioning the overlay depending on what type of\n * device the picker is being shown on\n */\n private _positionStrategy(): PositionStrategy {\n if (this._clientOutput?.device !== 'touch') {\n return this._desktopPositionStrategy();\n }\n return this._touchPositionStrategy();\n }\n\n /**\n * Returns strategy for positioning the overlay for touch devices:\n * Place centered in the screen.\n */\n private _touchPositionStrategy(): PositionStrategy {\n return this._overlay.position().global();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { GraniteDatePickerComponent } from './date-picker.component';\nimport { GraniteDateRangePickerComponent } from './date-range-picker.component';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport {\n GraniteIconModule,\n GraniteButtonModule,\n} from '@ifsworld/granite-components';\nimport { GraniteDatePickerTriggerForDirective } from './date-picker-trigger-for.directive';\nimport { A11yModule } from '@angular/cdk/a11y';\n\n@NgModule({\n declarations: [\n GraniteDatePickerComponent,\n GraniteDateRangePickerComponent,\n GraniteDatePickerTriggerForDirective,\n ],\n imports: [\n CommonModule,\n OverlayModule,\n DatePickerModule,\n FormsModule,\n GraniteIconModule,\n GraniteButtonModule,\n A11yModule,\n ],\n exports: [\n GraniteDatePickerComponent,\n GraniteDateRangePickerComponent,\n GraniteDatePickerTriggerForDirective,\n ],\n providers: [],\n})\nexport class GraniteDatePickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAI,cAAc,GAAG,CAAC;AAEtB;AAIA;MACa,eAAe,CAAA;IAgC1B,WAAA,CACS,WAAuB,EACvB,OAAgB,EAAA;QADhB,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,OAAO,GAAP,OAAO;QAhChB,IAAA,CAAA,OAAO,GAAgB,IAAI;QAG3B,IAAA,CAAA,OAAO,GAAgB,IAAI;QAG3B,IAAA,CAAA,cAAc,GAAW,CAAC;AAGjB,QAAA,IAAA,CAAA,YAAY,GAAsB,IAAI,YAAY,EAAE;QAI7D,IAAA,CAAA,SAAS,GAAc,QAAQ;QAC/B,IAAA,CAAA,SAAS,GAAc,OAAO;AAI9B;;;AAGG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,CAAA,0BAAA,EAA6B,cAAc,EAAE,EAAE;IAW/D;;IAGH,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;AAC1B,YAAA,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AACjD,SAAA,CAAC;IACJ;AAEA,IAAA,cAAc,CAAC,KAAoB,EAAA;AACjC,QAAA,IAAI,KAAK,CAAC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mitter,
|
|
2
|
+
import { EventEmitter, HostListener, Output, Input, HostBinding, Directive, ElementRef, ViewChild, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
@@ -126,13 +126,14 @@ class GraniteFileDragAndDropDirective {
|
|
|
126
126
|
this.droppedFiles.emit(this.currentFiles);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
130
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileDragAndDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
130
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.4", type: GraniteFileDragAndDropDirective, isStandalone: false, selector: "[graniteFileDragAndDrop]", inputs: { multiFileUploadEnabled: "multiFileUploadEnabled", accept: "accept", currentFiles: "currentFiles" }, outputs: { droppedFiles: "droppedFiles", isFileOver: "isFileOver", fileUploadValidation: "fileUploadValidation" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "class.file-over": "this.fileOver", "class.file-error": "this.fileBrowseError" } }, exportAs: ["graniteFileDragAndDrop"], ngImport: i0 }); }
|
|
131
131
|
}
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileDragAndDropDirective, decorators: [{
|
|
133
133
|
type: Directive,
|
|
134
134
|
args: [{
|
|
135
135
|
selector: '[graniteFileDragAndDrop]',
|
|
136
|
+
standalone: false,
|
|
136
137
|
exportAs: 'graniteFileDragAndDrop',
|
|
137
138
|
}]
|
|
138
139
|
}], propDecorators: { fileOver: [{
|
|
@@ -286,12 +287,12 @@ class GraniteFileUploadComponent {
|
|
|
286
287
|
const exp = Math.floor(Math.log(bytes) / Math.log(bytesPerKB));
|
|
287
288
|
return `${parseFloat((bytes / Math.pow(bytesPerKB, exp)).toFixed(decimalPoints))} ${fileSizes[exp]}`;
|
|
288
289
|
}
|
|
289
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
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"] }] }); }
|
|
290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
291
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: GraniteFileUploadComponent, isStandalone: false, 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
292
|
}
|
|
292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileUploadComponent, decorators: [{
|
|
293
294
|
type: Component,
|
|
294
|
-
args: [{ selector: 'granite-file-upload', 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"] }]
|
|
295
|
+
args: [{ selector: 'granite-file-upload', standalone: false, 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"] }]
|
|
295
296
|
}], propDecorators: { fileDropRef: [{
|
|
296
297
|
type: ViewChild,
|
|
297
298
|
args: ['fileDropRef', { read: ElementRef }]
|
|
@@ -338,17 +339,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
338
339
|
}] } });
|
|
339
340
|
|
|
340
341
|
class GraniteFileUploadModule {
|
|
341
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
342
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
343
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileUploadModule, declarations: [GraniteFileUploadComponent, GraniteFileDragAndDropDirective], imports: [CommonModule,
|
|
343
344
|
GraniteButtonModule,
|
|
344
345
|
GraniteIconModule,
|
|
345
346
|
GraniteCarouselModule], exports: [GraniteFileUploadComponent] }); }
|
|
346
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
347
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileUploadModule, imports: [CommonModule,
|
|
347
348
|
GraniteButtonModule,
|
|
348
349
|
GraniteIconModule,
|
|
349
350
|
GraniteCarouselModule] }); }
|
|
350
351
|
}
|
|
351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: GraniteFileUploadModule, decorators: [{
|
|
352
353
|
type: NgModule,
|
|
353
354
|
args: [{
|
|
354
355
|
declarations: [GraniteFileUploadComponent, GraniteFileDragAndDropDirective],
|