@siemens/element-ng 49.6.0 → 49.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/siemens-element-ng-about.mjs +2 -2
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +8 -8
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +3 -3
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +5 -5
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +2 -2
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +2 -2
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +43 -8
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +8 -8
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +2 -2
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +2 -2
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +2 -2
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +4 -4
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +2 -2
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +31 -14
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +16 -4
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +59 -46
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +2 -2
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +9 -8
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +4 -4
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +12 -12
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +3 -3
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +19 -11
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +25 -26
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +316 -354
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +4 -4
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +4 -4
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +2 -2
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +2 -2
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +5 -2
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +2 -2
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +2 -2
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +4 -4
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +10 -3
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +10 -4
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +4 -4
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +8 -5
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +69 -29
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +2 -2
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +2 -2
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +2 -2
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +10 -10
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +2 -2
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +2 -2
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +10 -8
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +2 -2
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +88 -53
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/package.json +4 -4
- package/schematics/migrations/data/element-migration-data.js +20 -0
- package/schematics/migrations/data/index.js +1 -16
- package/schematics/migrations/ngx-translate/index.js +1 -137
- package/schematics/migrations/ngx-translate/missing-translate-migration.js +141 -0
- package/schematics/ng-add/index.js +1 -12
- package/schematics/ng-add/ng-add-rule.js +16 -0
- package/schematics/ng-update/index.js +1 -17
- package/schematics/ng-update/migrate-to-v49.js +21 -0
- package/template-i18n.json +3 -1
- package/types/siemens-element-ng-card.d.ts +26 -1
- package/types/siemens-element-ng-common.d.ts +3 -3
- package/types/siemens-element-ng-dashboard.d.ts +4 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +10 -1
- package/types/siemens-element-ng-file-uploader.d.ts +4 -3
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-loading-spinner.d.ts +4 -2
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +167 -183
- package/types/siemens-element-ng-navbar.d.ts +2 -2
- package/types/siemens-element-ng-popover.d.ts +9 -2
- package/types/siemens-element-ng-search-bar.d.ts +7 -1
- package/types/siemens-element-ng-side-panel.d.ts +2 -0
- package/types/siemens-element-ng-status-bar.d.ts +19 -10
- package/types/siemens-element-ng-tooltip.d.ts +9 -3
- package/types/siemens-element-ng-translate.d.ts +2 -0
- package/types/siemens-element-ng-wizard.d.ts +23 -5
|
@@ -77,11 +77,11 @@ class SiElectrontitlebarComponent {
|
|
|
77
77
|
ariaLabelMenu = input(t(() => $localize `:@@SI_ELECTRON_TITLEBAR.MENU:Menu`), ...(ngDevMode ? [{ debugName: "ariaLabelMenu" }] : []));
|
|
78
78
|
icons = addIcons({ elementLeft4, elementRight4, elementOptionsVertical });
|
|
79
79
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiElectrontitlebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiElectrontitlebarComponent, isStandalone: true, selector: "si-electron-titlebar", inputs: { appTitle: { classPropertyName: "appTitle", publicName: "appTitle", isSignal: true, isRequired: true, transformFunction: null }, canGoBack: { classPropertyName: "canGoBack", publicName: "canGoBack", isSignal: true, isRequired: false, transformFunction: null }, canGoForward: { classPropertyName: "canGoForward", publicName: "canGoForward", isSignal: true, isRequired: false, transformFunction: null }, hasFocus: { classPropertyName: "hasFocus", publicName: "hasFocus", isSignal: true, isRequired: false, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelForward: { classPropertyName: "ariaLabelForward", publicName: "ariaLabelForward", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelBack: { classPropertyName: "ariaLabelBack", publicName: "ariaLabelBack", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelMenu: { classPropertyName: "ariaLabelMenu", publicName: "ariaLabelMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { forward: "forward", back: "back" }, ngImport: i0, template: "<div class=\"electron-title-bar-container w-100 bg-base-1 border-bottom fixed-top\">\n <div class=\"electron-title-bar align-items-center d-flex h-100 gap-6\">\n <span\n class=\"mx-6 si-body electron-title-bar-app-name text-truncate\"\n [class.unfocused]=\"!hasFocus()\"\n >{{ appTitle() }}</span\n >\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelBack() | translate\"\n [disabled]=\"!canGoBack()\"\n (click)=\"back.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementLeft4\" />\n </button>\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelForward() | translate\"\n [disabled]=\"!canGoForward()\"\n (click)=\"forward.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementRight4\" />\n </button>\n @if (menuItems().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-icon electron-title-bar-btn btn-tertiary btn-sm\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelMenu() | translate\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n }\n <div class=\"electron-title-bar-draggable flex-grow-1 w-100 h-100\"></div>\n </div>\n</div>\n<ng-template #menu>\n <div class=\"mt-2\">\n <si-menu-factory [items]=\"menuItems()\" />\n </div>\n</ng-template>\n", styles: [".electron-title-bar-container{block-size:
|
|
80
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiElectrontitlebarComponent, isStandalone: true, selector: "si-electron-titlebar", inputs: { appTitle: { classPropertyName: "appTitle", publicName: "appTitle", isSignal: true, isRequired: true, transformFunction: null }, canGoBack: { classPropertyName: "canGoBack", publicName: "canGoBack", isSignal: true, isRequired: false, transformFunction: null }, canGoForward: { classPropertyName: "canGoForward", publicName: "canGoForward", isSignal: true, isRequired: false, transformFunction: null }, hasFocus: { classPropertyName: "hasFocus", publicName: "hasFocus", isSignal: true, isRequired: false, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelForward: { classPropertyName: "ariaLabelForward", publicName: "ariaLabelForward", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelBack: { classPropertyName: "ariaLabelBack", publicName: "ariaLabelBack", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelMenu: { classPropertyName: "ariaLabelMenu", publicName: "ariaLabelMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { forward: "forward", back: "back" }, ngImport: i0, template: "<div class=\"electron-title-bar-container w-100 bg-base-1 border-bottom fixed-top\">\n <div class=\"electron-title-bar align-items-center d-flex h-100 gap-6\">\n <span\n class=\"mx-6 si-body electron-title-bar-app-name text-truncate\"\n [class.unfocused]=\"!hasFocus()\"\n >{{ appTitle() }}</span\n >\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelBack() | translate\"\n [disabled]=\"!canGoBack()\"\n (click)=\"back.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementLeft4\" />\n </button>\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelForward() | translate\"\n [disabled]=\"!canGoForward()\"\n (click)=\"forward.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementRight4\" />\n </button>\n @if (menuItems().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-icon electron-title-bar-btn btn-tertiary btn-sm\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelMenu() | translate\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n }\n <div class=\"electron-title-bar-draggable flex-grow-1 w-100 h-100\"></div>\n </div>\n</div>\n<ng-template #menu>\n <div class=\"mt-2\">\n <si-menu-factory [items]=\"menuItems()\" />\n </div>\n</ng-template>\n", styles: [".electron-title-bar-container{block-size:calc(1.5rem + 12px);z-index:1033;inset-block-start:var(--element-system-banner-spacing, 0px)}.electron-title-bar{position:absolute;inset-inline-start:env(titlebar-area-x,0);inline-size:env(titlebar-area-width,100%)}.electron-title-bar-app-name{color:var(--element-text-secondary);-webkit-app-region:drag;-webkit-user-select:none;user-select:none}.electron-title-bar-draggable{flex-basis:content;-webkit-app-region:drag}.unfocused{color:var(--element-ui-3)}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
81
81
|
}
|
|
82
82
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiElectrontitlebarComponent, decorators: [{
|
|
83
83
|
type: Component,
|
|
84
|
-
args: [{ selector: 'si-electron-titlebar', imports: [CdkMenuTrigger, SiMenuFactoryComponent, SiIconComponent, SiTranslatePipe], template: "<div class=\"electron-title-bar-container w-100 bg-base-1 border-bottom fixed-top\">\n <div class=\"electron-title-bar align-items-center d-flex h-100 gap-6\">\n <span\n class=\"mx-6 si-body electron-title-bar-app-name text-truncate\"\n [class.unfocused]=\"!hasFocus()\"\n >{{ appTitle() }}</span\n >\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelBack() | translate\"\n [disabled]=\"!canGoBack()\"\n (click)=\"back.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementLeft4\" />\n </button>\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelForward() | translate\"\n [disabled]=\"!canGoForward()\"\n (click)=\"forward.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementRight4\" />\n </button>\n @if (menuItems().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-icon electron-title-bar-btn btn-tertiary btn-sm\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelMenu() | translate\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n }\n <div class=\"electron-title-bar-draggable flex-grow-1 w-100 h-100\"></div>\n </div>\n</div>\n<ng-template #menu>\n <div class=\"mt-2\">\n <si-menu-factory [items]=\"menuItems()\" />\n </div>\n</ng-template>\n", styles: [".electron-title-bar-container{block-size:
|
|
84
|
+
args: [{ selector: 'si-electron-titlebar', imports: [CdkMenuTrigger, SiMenuFactoryComponent, SiIconComponent, SiTranslatePipe], template: "<div class=\"electron-title-bar-container w-100 bg-base-1 border-bottom fixed-top\">\n <div class=\"electron-title-bar align-items-center d-flex h-100 gap-6\">\n <span\n class=\"mx-6 si-body electron-title-bar-app-name text-truncate\"\n [class.unfocused]=\"!hasFocus()\"\n >{{ appTitle() }}</span\n >\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelBack() | translate\"\n [disabled]=\"!canGoBack()\"\n (click)=\"back.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementLeft4\" />\n </button>\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelForward() | translate\"\n [disabled]=\"!canGoForward()\"\n (click)=\"forward.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementRight4\" />\n </button>\n @if (menuItems().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-icon electron-title-bar-btn btn-tertiary btn-sm\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelMenu() | translate\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n }\n <div class=\"electron-title-bar-draggable flex-grow-1 w-100 h-100\"></div>\n </div>\n</div>\n<ng-template #menu>\n <div class=\"mt-2\">\n <si-menu-factory [items]=\"menuItems()\" />\n </div>\n</ng-template>\n", styles: [".electron-title-bar-container{block-size:calc(1.5rem + 12px);z-index:1033;inset-block-start:var(--element-system-banner-spacing, 0px)}.electron-title-bar{position:absolute;inset-inline-start:env(titlebar-area-x,0);inline-size:env(titlebar-area-width,100%)}.electron-title-bar-app-name{color:var(--element-text-secondary);-webkit-app-region:drag;-webkit-user-select:none;user-select:none}.electron-title-bar-draggable{flex-basis:content;-webkit-app-region:drag}.unfocused{color:var(--element-ui-3)}\n"] }]
|
|
85
85
|
}], propDecorators: { appTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "appTitle", required: true }] }], canGoBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "canGoBack", required: false }] }], canGoForward: [{ type: i0.Input, args: [{ isSignal: true, alias: "canGoForward", required: false }] }], hasFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasFocus", required: false }] }], menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: false }] }], forward: [{ type: i0.Output, args: ["forward"] }], back: [{ type: i0.Output, args: ["back"] }], ariaLabelForward: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelForward", required: false }] }], ariaLabelBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelBack", required: false }] }], ariaLabelMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelMenu", required: false }] }] } });
|
|
86
86
|
|
|
87
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-electron-titlebar.mjs","sources":["../../../../projects/element-ng/electron-titlebar/si-electron-titlebar.component.ts","../../../../projects/element-ng/electron-titlebar/si-electron-titlebar.component.html","../../../../projects/element-ng/electron-titlebar/si-electron-titlebar.module.ts","../../../../projects/element-ng/electron-titlebar/electron.helpers.ts","../../../../projects/element-ng/electron-titlebar/index.ts","../../../../projects/element-ng/electron-titlebar/siemens-element-ng-electron-titlebar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkMenuTrigger } from '@angular/cdk/menu';\nimport { booleanAttribute, Component, input, output } from '@angular/core';\nimport { elementLeft4, elementOptionsVertical, elementRight4 } from '@siemens/element-icons';\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { MenuItem, SiMenuFactoryComponent } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';\n\n@Component({\n selector: 'si-electron-titlebar',\n imports: [CdkMenuTrigger, SiMenuFactoryComponent, SiIconComponent, SiTranslatePipe],\n templateUrl: './si-electron-titlebar.component.html',\n styleUrl: './si-electron-titlebar.component.scss'\n})\nexport class SiElectrontitlebarComponent {\n /**\n * Title of your application\n */\n readonly appTitle = input.required<string>();\n\n /**\n * Defines if the application can go back or not\n *\n * @defaultValue false\n */\n readonly canGoBack = input(false, { transform: booleanAttribute });\n\n /**\n * Defines if the application can go forward or not\n *\n * @defaultValue false\n */\n readonly canGoForward = input(false, { transform: booleanAttribute });\n\n /**\n * Defines if the application is focused or not\n *\n * @defaultValue true\n */\n readonly hasFocus = input(true, { transform: booleanAttribute });\n\n /**\n * List of menu items for the dropdown\n * In this dropdown should the zoom functionality as well as the refresh function be provided\n *\n * @defaultValue []\n */\n readonly menuItems = input<(MenuItemLegacy | MenuItem)[]>([]);\n\n /**\n * Browsing forward function\n */\n readonly forward = output<void>();\n\n /**\n * Browsing back function\n */\n readonly back = output<void>();\n\n /**\n * Aria Label for Forward Button\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_ELECTRON_TITLEBAR.FORWARD:Forward`)\n * ```\n */\n readonly ariaLabelForward = input(t(() => $localize`:@@SI_ELECTRON_TITLEBAR.FORWARD:Forward`));\n\n /**\n * Aria Label for Back Button\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_ELECTRON_TITLEBAR.BACK:Back`)\n * ```\n */\n readonly ariaLabelBack = input(t(() => $localize`:@@SI_ELECTRON_TITLEBAR.BACK:Back`));\n\n /**\n * Aria Label for Menu Button\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_ELECTRON_TITLEBAR.MENU:Menu`)\n * ```\n */\n readonly ariaLabelMenu = input(t(() => $localize`:@@SI_ELECTRON_TITLEBAR.MENU:Menu`));\n\n protected readonly icons = addIcons({ elementLeft4, elementRight4, elementOptionsVertical });\n}\n","<div class=\"electron-title-bar-container w-100 bg-base-1 border-bottom fixed-top\">\n <div class=\"electron-title-bar align-items-center d-flex h-100 gap-6\">\n <span\n class=\"mx-6 si-body electron-title-bar-app-name text-truncate\"\n [class.unfocused]=\"!hasFocus()\"\n >{{ appTitle() }}</span\n >\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelBack() | translate\"\n [disabled]=\"!canGoBack()\"\n (click)=\"back.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementLeft4\" />\n </button>\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelForward() | translate\"\n [disabled]=\"!canGoForward()\"\n (click)=\"forward.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementRight4\" />\n </button>\n @if (menuItems().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-icon electron-title-bar-btn btn-tertiary btn-sm\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelMenu() | translate\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n }\n <div class=\"electron-title-bar-draggable flex-grow-1 w-100 h-100\"></div>\n </div>\n</div>\n<ng-template #menu>\n <div class=\"mt-2\">\n <si-menu-factory [items]=\"menuItems()\" />\n </div>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiElectrontitlebarComponent } from './si-electron-titlebar.component';\n\n@NgModule({\n imports: [SiElectrontitlebarComponent],\n exports: [SiElectrontitlebarComponent]\n})\nexport class SiElectrontitlebarModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\n/** */\nexport const runsInElectron = (): boolean => {\n const windowAny = window as any;\n const processAny = windowAny.process as any;\n\n // Renderer process\n if (\n typeof windowAny !== 'undefined' &&\n typeof processAny === 'object' &&\n processAny.type === 'renderer'\n ) {\n return true;\n }\n\n // Main process\n if (\n typeof processAny !== 'undefined' &&\n typeof processAny.versions === 'object' &&\n !!processAny.versions.electron\n ) {\n return true;\n }\n\n // Detect the user agent when the `nodeIntegration` option is set to true\n if (\n typeof navigator === 'object' &&\n typeof navigator.userAgent === 'string' &&\n navigator.userAgent.includes('Electron')\n ) {\n return true;\n }\n return false;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-electron-titlebar.module';\nexport * from './si-electron-titlebar.component';\nexport * from './electron.helpers';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;AAGG;MAeU,2BAA2B,CAAA;AACtC;;AAEG;AACM,IAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,mDAAU;AAE5C;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAC,KAAK,sDAAI,SAAS,EAAE,gBAAgB,EAAA,CA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AChC,OAAO,UAAU,KAAK,QAAQ;AAC9B,QAAA,UAAU,CAAC,IAAI,KAAK,UAAU,EAC9B;AACA,QAAA,OAAO,IAAI;IACb;;IAGA,IACE,OAAO,UAAU,KAAK,WAAW;AACjC,QAAA,OAAO,UAAU,CAAC,QAAQ,KAAK,QAAQ;AACvC,QAAA,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAC9B;AACA,QAAA,OAAO,IAAI;IACb;;IAGA,IACE,OAAO,SAAS,KAAK,QAAQ;AAC7B,QAAA,OAAO,SAAS,CAAC,SAAS,KAAK,QAAQ;QACvC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EACxC;AACA,QAAA,OAAO,IAAI;IACb;AACA,IAAA,OAAO,KAAK;AACd;;ACpCA;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-electron-titlebar.mjs","sources":["../../../../projects/element-ng/electron-titlebar/si-electron-titlebar.component.ts","../../../../projects/element-ng/electron-titlebar/si-electron-titlebar.component.html","../../../../projects/element-ng/electron-titlebar/si-electron-titlebar.module.ts","../../../../projects/element-ng/electron-titlebar/electron.helpers.ts","../../../../projects/element-ng/electron-titlebar/index.ts","../../../../projects/element-ng/electron-titlebar/siemens-element-ng-electron-titlebar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkMenuTrigger } from '@angular/cdk/menu';\nimport { booleanAttribute, Component, input, output } from '@angular/core';\nimport { elementLeft4, elementOptionsVertical, elementRight4 } from '@siemens/element-icons';\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { MenuItem, SiMenuFactoryComponent } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';\n\n@Component({\n selector: 'si-electron-titlebar',\n imports: [CdkMenuTrigger, SiMenuFactoryComponent, SiIconComponent, SiTranslatePipe],\n templateUrl: './si-electron-titlebar.component.html',\n styleUrl: './si-electron-titlebar.component.scss'\n})\nexport class SiElectrontitlebarComponent {\n /**\n * Title of your application\n */\n readonly appTitle = input.required<string>();\n\n /**\n * Defines if the application can go back or not\n *\n * @defaultValue false\n */\n readonly canGoBack = input(false, { transform: booleanAttribute });\n\n /**\n * Defines if the application can go forward or not\n *\n * @defaultValue false\n */\n readonly canGoForward = input(false, { transform: booleanAttribute });\n\n /**\n * Defines if the application is focused or not\n *\n * @defaultValue true\n */\n readonly hasFocus = input(true, { transform: booleanAttribute });\n\n /**\n * List of menu items for the dropdown\n * In this dropdown should the zoom functionality as well as the refresh function be provided\n *\n * @defaultValue []\n */\n readonly menuItems = input<(MenuItemLegacy | MenuItem)[]>([]);\n\n /**\n * Browsing forward function\n */\n readonly forward = output<void>();\n\n /**\n * Browsing back function\n */\n readonly back = output<void>();\n\n /**\n * Aria Label for Forward Button\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_ELECTRON_TITLEBAR.FORWARD:Forward`)\n * ```\n */\n readonly ariaLabelForward = input(t(() => $localize`:@@SI_ELECTRON_TITLEBAR.FORWARD:Forward`));\n\n /**\n * Aria Label for Back Button\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_ELECTRON_TITLEBAR.BACK:Back`)\n * ```\n */\n readonly ariaLabelBack = input(t(() => $localize`:@@SI_ELECTRON_TITLEBAR.BACK:Back`));\n\n /**\n * Aria Label for Menu Button\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_ELECTRON_TITLEBAR.MENU:Menu`)\n * ```\n */\n readonly ariaLabelMenu = input(t(() => $localize`:@@SI_ELECTRON_TITLEBAR.MENU:Menu`));\n\n protected readonly icons = addIcons({ elementLeft4, elementRight4, elementOptionsVertical });\n}\n","<div class=\"electron-title-bar-container w-100 bg-base-1 border-bottom fixed-top\">\n <div class=\"electron-title-bar align-items-center d-flex h-100 gap-6\">\n <span\n class=\"mx-6 si-body electron-title-bar-app-name text-truncate\"\n [class.unfocused]=\"!hasFocus()\"\n >{{ appTitle() }}</span\n >\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelBack() | translate\"\n [disabled]=\"!canGoBack()\"\n (click)=\"back.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementLeft4\" />\n </button>\n <button\n type=\"button\"\n class=\"btn btn-icon btn-sm btn-tertiary\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelForward() | translate\"\n [disabled]=\"!canGoForward()\"\n (click)=\"forward.emit()\"\n >\n <si-icon class=\"flip-rtl\" [icon]=\"icons.elementRight4\" />\n </button>\n @if (menuItems().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-icon electron-title-bar-btn btn-tertiary btn-sm\"\n [class.unfocused]=\"!hasFocus()\"\n [attr.aria-label]=\"ariaLabelMenu() | translate\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n }\n <div class=\"electron-title-bar-draggable flex-grow-1 w-100 h-100\"></div>\n </div>\n</div>\n<ng-template #menu>\n <div class=\"mt-2\">\n <si-menu-factory [items]=\"menuItems()\" />\n </div>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiElectrontitlebarComponent } from './si-electron-titlebar.component';\n\n@NgModule({\n imports: [SiElectrontitlebarComponent],\n exports: [SiElectrontitlebarComponent]\n})\nexport class SiElectrontitlebarModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\n/** */\nexport const runsInElectron = (): boolean => {\n const windowAny = window as any;\n const processAny = windowAny.process as any;\n\n // Renderer process\n if (\n typeof windowAny !== 'undefined' &&\n typeof processAny === 'object' &&\n processAny.type === 'renderer'\n ) {\n return true;\n }\n\n // Main process\n if (\n typeof processAny !== 'undefined' &&\n typeof processAny.versions === 'object' &&\n !!processAny.versions.electron\n ) {\n return true;\n }\n\n // Detect the user agent when the `nodeIntegration` option is set to true\n if (\n typeof navigator === 'object' &&\n typeof navigator.userAgent === 'string' &&\n navigator.userAgent.includes('Electron')\n ) {\n return true;\n }\n return false;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-electron-titlebar.module';\nexport * from './si-electron-titlebar.component';\nexport * from './electron.helpers';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;AAGG;MAeU,2BAA2B,CAAA;AACtC;;AAEG;AACM,IAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,mDAAU;AAE5C;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAC,KAAK,sDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAElE;;;;AAIG;IACM,YAAY,GAAG,KAAK,CAAC,KAAK,yDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAErE;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAAC,IAAI,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEhE;;;;;AAKG;AACM,IAAA,SAAS,GAAG,KAAK,CAAgC,EAAE,qDAAC;AAE7D;;AAEG;IACM,OAAO,GAAG,MAAM,EAAQ;AAEjC;;AAEG;IACM,IAAI,GAAG,MAAM,EAAQ;AAE9B;;;;;;;AAOG;AACM,IAAA,gBAAgB,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,SAAS,CAAA,CAAA,uCAAA,CAAyC,CAAC,4DAAC;AAE9F;;;;;;;AAOG;AACM,IAAA,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,SAAS,CAAA,CAAA,iCAAA,CAAmC,CAAC,yDAAC;AAErF;;;;;;;AAOG;AACM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ultValue
|
|
52
52
|
* ```
|
|
53
|
-
* t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`)
|
|
53
|
+
* t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`)
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
errorTextFileMaxSize = input(t(() => $localize `:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`), ...(ngDevMode ? [{ debugName: "errorTextFileMaxSize" }] : []));
|
|
56
|
+
errorTextFileMaxSize = input(t(() => $localize `:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`), ...(ngDevMode ? [{ debugName: "errorTextFileMaxSize" }] : []));
|
|
57
57
|
/**
|
|
58
58
|
* Define which file types are suggested in file browser.
|
|
59
59
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept
|
|
@@ -212,6 +212,7 @@ class SiFileUploadDirective {
|
|
|
212
212
|
else if (!this.verifyFileSize(uploadFile.file.size)) {
|
|
213
213
|
uploadFile.status = 'invalid';
|
|
214
214
|
uploadFile.errorText = this.errorTextFileMaxSize();
|
|
215
|
+
uploadFile.errorParams = { maxFileSize: this.fileSizeToString(this.maxFileSize()) };
|
|
215
216
|
}
|
|
216
217
|
return uploadFile;
|
|
217
218
|
}
|
|
@@ -330,10 +331,10 @@ class SiFileDropzoneComponent {
|
|
|
330
331
|
*
|
|
331
332
|
* @defaultValue
|
|
332
333
|
* ```
|
|
333
|
-
* t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`)
|
|
334
|
+
* t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`)
|
|
334
335
|
* ```
|
|
335
336
|
*/
|
|
336
|
-
errorTextFileMaxSize = input(t(() => $localize `:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`), ...(ngDevMode ? [{ debugName: "errorTextFileMaxSize" }] : []));
|
|
337
|
+
errorTextFileMaxSize = input(t(() => $localize `:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`), ...(ngDevMode ? [{ debugName: "errorTextFileMaxSize" }] : []));
|
|
337
338
|
/**
|
|
338
339
|
* Define which file types are suggested in file browser.
|
|
339
340
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept
|
|
@@ -543,10 +544,10 @@ class SiFileUploaderComponent {
|
|
|
543
544
|
*
|
|
544
545
|
* @defaultValue
|
|
545
546
|
* ```
|
|
546
|
-
* t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`)
|
|
547
|
+
* t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`)
|
|
547
548
|
* ```
|
|
548
549
|
*/
|
|
549
|
-
errorTextFileMaxSize = input(t(() => $localize `:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`), ...(ngDevMode ? [{ debugName: "errorTextFileMaxSize" }] : []));
|
|
550
|
+
errorTextFileMaxSize = input(t(() => $localize `:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`), ...(ngDevMode ? [{ debugName: "errorTextFileMaxSize" }] : []));
|
|
550
551
|
/**
|
|
551
552
|
* Config for HTTP request to upload file.
|
|
552
553
|
*
|
|
@@ -868,7 +869,7 @@ class SiFileUploaderComponent {
|
|
|
868
869
|
return this.files.reduce((acc, f) => acc + (f.status !== 'invalid' ? 1 : 0), 0);
|
|
869
870
|
}
|
|
870
871
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiFileUploaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
871
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiFileUploaderComponent, isStandalone: true, selector: "si-file-uploader", inputs: { uploadTextFileSelect: { classPropertyName: "uploadTextFileSelect", publicName: "uploadTextFileSelect", isSignal: true, isRequired: false, transformFunction: null }, uploadDropText: { classPropertyName: "uploadDropText", publicName: "uploadDropText", isSignal: true, isRequired: false, transformFunction: null }, maxFileSizeText: { classPropertyName: "maxFileSizeText", publicName: "maxFileSizeText", isSignal: true, isRequired: false, transformFunction: null }, maxFilesReachedText: { classPropertyName: "maxFilesReachedText", publicName: "maxFilesReachedText", isSignal: true, isRequired: false, transformFunction: null }, acceptText: { classPropertyName: "acceptText", publicName: "acceptText", isSignal: true, isRequired: false, transformFunction: null }, uploadButtonText: { classPropertyName: "uploadButtonText", publicName: "uploadButtonText", isSignal: true, isRequired: false, transformFunction: null }, clearButtonText: { classPropertyName: "clearButtonText", publicName: "clearButtonText", isSignal: true, isRequired: false, transformFunction: null }, uploadingText: { classPropertyName: "uploadingText", publicName: "uploadingText", isSignal: true, isRequired: false, transformFunction: null }, removeButtonText: { classPropertyName: "removeButtonText", publicName: "removeButtonText", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonText: { classPropertyName: "cancelButtonText", publicName: "cancelButtonText", isSignal: true, isRequired: false, transformFunction: null }, successTextTitle: { classPropertyName: "successTextTitle", publicName: "successTextTitle", isSignal: true, isRequired: false, transformFunction: null }, errorUploadFailed: { classPropertyName: "errorUploadFailed", publicName: "errorUploadFailed", isSignal: true, isRequired: false, transformFunction: null }, showHttpError: { classPropertyName: "showHttpError", publicName: "showHttpError", isSignal: true, isRequired: false, transformFunction: null }, errorTextFileType: { classPropertyName: "errorTextFileType", publicName: "errorTextFileType", isSignal: true, isRequired: false, transformFunction: null }, errorTextFileMaxSize: { classPropertyName: "errorTextFileMaxSize", publicName: "errorTextFileMaxSize", isSignal: true, isRequired: false, transformFunction: null }, uploadConfig: { classPropertyName: "uploadConfig", publicName: "uploadConfig", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, maxConcurrentUploads: { classPropertyName: "maxConcurrentUploads", publicName: "maxConcurrentUploads", isSignal: true, isRequired: false, transformFunction: null }, retries: { classPropertyName: "retries", publicName: "retries", isSignal: true, isRequired: false, transformFunction: null }, autoUpload: { classPropertyName: "autoUpload", publicName: "autoUpload", isSignal: true, isRequired: false, transformFunction: null }, disableUpload: { classPropertyName: "disableUpload", publicName: "disableUpload", isSignal: true, isRequired: false, transformFunction: null }, directoryUpload: { classPropertyName: "directoryUpload", publicName: "directoryUpload", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { uploadCanceled: "uploadCanceled", uploadCompleted: "uploadCompleted", filesChanges: "filesChanges" }, viewQueries: [{ propertyName: "dropZone", first: true, predicate: ["dropZone"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<si-file-dropzone\n #dropZone\n [class]=\"autoUpload() ? 'mb-8' : 'mb-4'\"\n [uploadTextFileSelect]=\"uploadTextFileSelect()\"\n [uploadDropText]=\"uploadDropText()\"\n [multiple]=\"maxFiles() > 1\"\n [directoryUpload]=\"directoryUpload()\"\n [maxFileSizeText]=\"maxFileSizeText()\"\n [acceptText]=\"acceptText()\"\n [errorTextFileType]=\"errorTextFileType()\"\n [errorTextFileMaxSize]=\"errorTextFileMaxSize()\"\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n (filesAdded)=\"handleFiles($event)\"\n/>\n\n@if (maxFilesReached) {\n <si-inline-notification\n class=\"mb-4\"\n severity=\"info\"\n [message]=\"maxFilesReachedText()\"\n [translationParams]=\"{ maxFiles: maxFiles() }\"\n />\n}\n\n<div class=\"file-list\">\n @for (file of files; track file) {\n <div class=\"file\" [class.fade-out]=\"file.fadeOut\">\n <si-icon class=\"icon align-self-center ms-6 me-4\" icon=\"element-document\" />\n <div class=\"flex-fill overflow-hidden mt-6\">\n <div class=\"file-info\">\n <div class=\"file-name text-truncate si-h5\">{{ file.fileName }}</div>\n <div class=\"file-size text-secondary\">{{ file.size }}</div>\n @if (file.errorText) {\n <div\n class=\"d-inline-flex gap-2 error text-truncate\"\n [class.text-warning]=\"file.status === 'invalid'\"\n [class.text-danger]=\"file.status === 'error'\"\n >\n <si-status-icon\n class=\"icon-sm\"\n [status]=\"file.status === 'invalid' ? 'warning' : 'danger'\"\n />\n {{ file.errorText | translate }}\n @if (file.httpErrorText) {\n : {{ file.httpErrorText }}\n }\n </div>\n } @else {\n <div class=\"position-relative mt-1 mb-5\">\n <div class=\"position-absolute end-0 mt-n6\">{{ file.progress }} %</div>\n <si-progressbar\n height=\"small\"\n [value]=\"file.progress\"\n [ariaLabel]=\"uploadingText() | translate\"\n />\n </div>\n }\n </div>\n </div>\n <div class=\"status align-self-center text-nowrap ps-4 pe-6\">\n @if (file.status === 'error') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary me-4\"\n [disabled]=\"!uploadEnabled\"\n [title]=\"uploadButtonText() | translate\"\n [attr.aria-label]=\"uploadButtonText() | translate\"\n (click)=\"retryUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementRedo\" />\n </button>\n }\n @if (file.status === 'added' || file.status === 'error' || file.status === 'invalid') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-ghost\"\n [title]=\"removeButtonText() | translate\"\n [attr.aria-label]=\"removeButtonText() | translate\"\n (click)=\"removeFile($index)\"\n >\n <si-icon [icon]=\"icons.elementDelete\" />\n </button>\n }\n @if (file.status === 'uploading' || file.status === 'queued') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary\"\n [title]=\"cancelButtonText() | translate\"\n [attr.aria-label]=\"cancelButtonText() | translate\"\n (click)=\"cancelUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n @if (file.status === 'success') {\n <si-status-icon class=\"icon mx-2\" status=\"success\" />\n }\n </div>\n </div>\n }\n</div>\n\n@if (!autoUpload()) {\n <div class=\"buttons text-end\">\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"pending || !files.length\"\n (click)=\"reset()\"\n >{{ clearButtonText() | translate }}</button\n >\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"!uploadEnabled\"\n (click)=\"fileUpload()\"\n >{{ uploadButtonText() | translate }}</button\n >\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:stretch}:host>*{min-inline-size:320px;max-inline-size:680px;inline-size:100%;align-self:center}.file-list{overflow-y:auto}.file-info{display:flex;justify-content:center;flex-direction:column;block-size:56px}.file{display:flex;position:relative;margin-block-end:8px;min-block-size:72px;transition:opacity calc(.5s * var(--element-animations-enabled, 1))}.fade-out{opacity:0}\n"], dependencies: [{ kind: "component", type: SiStatusIconComponent, selector: "si-status-icon", inputs: ["status"] }, { kind: "component", type: SiFileDropzoneComponent, selector: "si-file-dropzone", inputs: ["uploadTextFileSelect", "uploadDropText", "maxFileSizeText", "acceptText", "errorTextFileType", "errorTextFileMaxSize", "accept", "maxFileSize", "multiple", "directoryUpload"], outputs: ["filesAdded", "fileError"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiInlineNotificationComponent, selector: "si-inline-notification", inputs: ["severity", "heading", "message", "action", "translationParams", "embedded"] }, { kind: "component", type: SiProgressbarComponent, selector: "si-progressbar", inputs: ["ariaLabel", "max", "value", "heading", "progress", "height"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
872
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiFileUploaderComponent, isStandalone: true, selector: "si-file-uploader", inputs: { uploadTextFileSelect: { classPropertyName: "uploadTextFileSelect", publicName: "uploadTextFileSelect", isSignal: true, isRequired: false, transformFunction: null }, uploadDropText: { classPropertyName: "uploadDropText", publicName: "uploadDropText", isSignal: true, isRequired: false, transformFunction: null }, maxFileSizeText: { classPropertyName: "maxFileSizeText", publicName: "maxFileSizeText", isSignal: true, isRequired: false, transformFunction: null }, maxFilesReachedText: { classPropertyName: "maxFilesReachedText", publicName: "maxFilesReachedText", isSignal: true, isRequired: false, transformFunction: null }, acceptText: { classPropertyName: "acceptText", publicName: "acceptText", isSignal: true, isRequired: false, transformFunction: null }, uploadButtonText: { classPropertyName: "uploadButtonText", publicName: "uploadButtonText", isSignal: true, isRequired: false, transformFunction: null }, clearButtonText: { classPropertyName: "clearButtonText", publicName: "clearButtonText", isSignal: true, isRequired: false, transformFunction: null }, uploadingText: { classPropertyName: "uploadingText", publicName: "uploadingText", isSignal: true, isRequired: false, transformFunction: null }, removeButtonText: { classPropertyName: "removeButtonText", publicName: "removeButtonText", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonText: { classPropertyName: "cancelButtonText", publicName: "cancelButtonText", isSignal: true, isRequired: false, transformFunction: null }, successTextTitle: { classPropertyName: "successTextTitle", publicName: "successTextTitle", isSignal: true, isRequired: false, transformFunction: null }, errorUploadFailed: { classPropertyName: "errorUploadFailed", publicName: "errorUploadFailed", isSignal: true, isRequired: false, transformFunction: null }, showHttpError: { classPropertyName: "showHttpError", publicName: "showHttpError", isSignal: true, isRequired: false, transformFunction: null }, errorTextFileType: { classPropertyName: "errorTextFileType", publicName: "errorTextFileType", isSignal: true, isRequired: false, transformFunction: null }, errorTextFileMaxSize: { classPropertyName: "errorTextFileMaxSize", publicName: "errorTextFileMaxSize", isSignal: true, isRequired: false, transformFunction: null }, uploadConfig: { classPropertyName: "uploadConfig", publicName: "uploadConfig", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, maxConcurrentUploads: { classPropertyName: "maxConcurrentUploads", publicName: "maxConcurrentUploads", isSignal: true, isRequired: false, transformFunction: null }, retries: { classPropertyName: "retries", publicName: "retries", isSignal: true, isRequired: false, transformFunction: null }, autoUpload: { classPropertyName: "autoUpload", publicName: "autoUpload", isSignal: true, isRequired: false, transformFunction: null }, disableUpload: { classPropertyName: "disableUpload", publicName: "disableUpload", isSignal: true, isRequired: false, transformFunction: null }, directoryUpload: { classPropertyName: "directoryUpload", publicName: "directoryUpload", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { uploadCanceled: "uploadCanceled", uploadCompleted: "uploadCompleted", filesChanges: "filesChanges" }, viewQueries: [{ propertyName: "dropZone", first: true, predicate: ["dropZone"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<si-file-dropzone\n #dropZone\n [class]=\"autoUpload() ? 'mb-8' : 'mb-4'\"\n [uploadTextFileSelect]=\"uploadTextFileSelect()\"\n [uploadDropText]=\"uploadDropText()\"\n [multiple]=\"maxFiles() > 1\"\n [directoryUpload]=\"directoryUpload()\"\n [maxFileSizeText]=\"maxFileSizeText()\"\n [acceptText]=\"acceptText()\"\n [errorTextFileType]=\"errorTextFileType()\"\n [errorTextFileMaxSize]=\"errorTextFileMaxSize()\"\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n (filesAdded)=\"handleFiles($event)\"\n/>\n\n@if (maxFilesReached) {\n <si-inline-notification\n class=\"mb-4\"\n severity=\"info\"\n [message]=\"maxFilesReachedText()\"\n [translationParams]=\"{ maxFiles: maxFiles() }\"\n />\n}\n\n<div class=\"file-list\">\n @for (file of files; track file) {\n <div class=\"file\" [class.fade-out]=\"file.fadeOut\">\n <si-icon class=\"icon align-self-center ms-6 me-4\" icon=\"element-document\" />\n <div class=\"flex-fill overflow-hidden mt-6\">\n <div class=\"file-info\">\n <div class=\"file-name text-truncate si-h5\">{{ file.fileName }}</div>\n <div class=\"file-size text-secondary\">{{ file.size }}</div>\n @if (file.errorText) {\n <div\n class=\"d-inline-flex gap-2 error text-truncate\"\n [class.text-warning]=\"file.status === 'invalid'\"\n [class.text-danger]=\"file.status === 'error'\"\n >\n <si-status-icon\n class=\"icon-sm\"\n [status]=\"file.status === 'invalid' ? 'warning' : 'danger'\"\n />\n {{ file.errorText | translate: file.errorParams }}\n @if (file.httpErrorText) {\n : {{ file.httpErrorText }}\n }\n </div>\n } @else {\n <div class=\"position-relative mt-1 mb-5\">\n <div class=\"position-absolute end-0 mt-n6\">{{ file.progress }} %</div>\n <si-progressbar\n height=\"small\"\n [value]=\"file.progress\"\n [ariaLabel]=\"uploadingText() | translate\"\n />\n </div>\n }\n </div>\n </div>\n <div class=\"status align-self-center text-nowrap ps-4 pe-6\">\n @if (file.status === 'error') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary me-4\"\n [disabled]=\"!uploadEnabled\"\n [title]=\"uploadButtonText() | translate\"\n [attr.aria-label]=\"uploadButtonText() | translate\"\n (click)=\"retryUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementRedo\" />\n </button>\n }\n @if (file.status === 'added' || file.status === 'error' || file.status === 'invalid') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary-ghost\"\n [title]=\"removeButtonText() | translate\"\n [attr.aria-label]=\"removeButtonText() | translate\"\n (click)=\"removeFile($index)\"\n >\n <si-icon [icon]=\"icons.elementDelete\" />\n </button>\n }\n @if (file.status === 'uploading' || file.status === 'queued') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary\"\n [title]=\"cancelButtonText() | translate\"\n [attr.aria-label]=\"cancelButtonText() | translate\"\n (click)=\"cancelUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n @if (file.status === 'success') {\n <si-status-icon class=\"icon mx-2\" status=\"success\" />\n }\n </div>\n </div>\n }\n</div>\n\n@if (!autoUpload()) {\n <div class=\"buttons text-end\">\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"pending || !files.length\"\n (click)=\"reset()\"\n >{{ clearButtonText() | translate }}</button\n >\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"!uploadEnabled\"\n (click)=\"fileUpload()\"\n >{{ uploadButtonText() | translate }}</button\n >\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:stretch}:host>*{min-inline-size:320px;max-inline-size:680px;inline-size:100%;align-self:center}.file-list{overflow-y:auto}.file-info{display:flex;justify-content:center;flex-direction:column;block-size:56px}.file{display:flex;position:relative;margin-block-end:8px;min-block-size:72px;transition:opacity calc(.5s * var(--element-animations-enabled, 1))}.fade-out{opacity:0}\n"], dependencies: [{ kind: "component", type: SiStatusIconComponent, selector: "si-status-icon", inputs: ["status"] }, { kind: "component", type: SiFileDropzoneComponent, selector: "si-file-dropzone", inputs: ["uploadTextFileSelect", "uploadDropText", "maxFileSizeText", "acceptText", "errorTextFileType", "errorTextFileMaxSize", "accept", "maxFileSize", "multiple", "directoryUpload"], outputs: ["filesAdded", "fileError"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiInlineNotificationComponent, selector: "si-inline-notification", inputs: ["severity", "heading", "message", "action", "translationParams", "embedded"] }, { kind: "component", type: SiProgressbarComponent, selector: "si-progressbar", inputs: ["ariaLabel", "max", "value", "heading", "progress", "height"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
872
873
|
}
|
|
873
874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiFileUploaderComponent, decorators: [{
|
|
874
875
|
type: Component,
|
|
@@ -879,7 +880,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
879
880
|
SiInlineNotificationComponent,
|
|
880
881
|
SiProgressbarComponent,
|
|
881
882
|
SiTranslatePipe
|
|
882
|
-
], template: "<si-file-dropzone\n #dropZone\n [class]=\"autoUpload() ? 'mb-8' : 'mb-4'\"\n [uploadTextFileSelect]=\"uploadTextFileSelect()\"\n [uploadDropText]=\"uploadDropText()\"\n [multiple]=\"maxFiles() > 1\"\n [directoryUpload]=\"directoryUpload()\"\n [maxFileSizeText]=\"maxFileSizeText()\"\n [acceptText]=\"acceptText()\"\n [errorTextFileType]=\"errorTextFileType()\"\n [errorTextFileMaxSize]=\"errorTextFileMaxSize()\"\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n (filesAdded)=\"handleFiles($event)\"\n/>\n\n@if (maxFilesReached) {\n <si-inline-notification\n class=\"mb-4\"\n severity=\"info\"\n [message]=\"maxFilesReachedText()\"\n [translationParams]=\"{ maxFiles: maxFiles() }\"\n />\n}\n\n<div class=\"file-list\">\n @for (file of files; track file) {\n <div class=\"file\" [class.fade-out]=\"file.fadeOut\">\n <si-icon class=\"icon align-self-center ms-6 me-4\" icon=\"element-document\" />\n <div class=\"flex-fill overflow-hidden mt-6\">\n <div class=\"file-info\">\n <div class=\"file-name text-truncate si-h5\">{{ file.fileName }}</div>\n <div class=\"file-size text-secondary\">{{ file.size }}</div>\n @if (file.errorText) {\n <div\n class=\"d-inline-flex gap-2 error text-truncate\"\n [class.text-warning]=\"file.status === 'invalid'\"\n [class.text-danger]=\"file.status === 'error'\"\n >\n <si-status-icon\n class=\"icon-sm\"\n [status]=\"file.status === 'invalid' ? 'warning' : 'danger'\"\n />\n {{ file.errorText | translate }}\n @if (file.httpErrorText) {\n : {{ file.httpErrorText }}\n }\n </div>\n } @else {\n <div class=\"position-relative mt-1 mb-5\">\n <div class=\"position-absolute end-0 mt-n6\">{{ file.progress }} %</div>\n <si-progressbar\n height=\"small\"\n [value]=\"file.progress\"\n [ariaLabel]=\"uploadingText() | translate\"\n />\n </div>\n }\n </div>\n </div>\n <div class=\"status align-self-center text-nowrap ps-4 pe-6\">\n @if (file.status === 'error') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary me-4\"\n [disabled]=\"!uploadEnabled\"\n [title]=\"uploadButtonText() | translate\"\n [attr.aria-label]=\"uploadButtonText() | translate\"\n (click)=\"retryUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementRedo\" />\n </button>\n }\n @if (file.status === 'added' || file.status === 'error' || file.status === 'invalid') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-ghost\"\n [title]=\"removeButtonText() | translate\"\n [attr.aria-label]=\"removeButtonText() | translate\"\n (click)=\"removeFile($index)\"\n >\n <si-icon [icon]=\"icons.elementDelete\" />\n </button>\n }\n @if (file.status === 'uploading' || file.status === 'queued') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary\"\n [title]=\"cancelButtonText() | translate\"\n [attr.aria-label]=\"cancelButtonText() | translate\"\n (click)=\"cancelUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n @if (file.status === 'success') {\n <si-status-icon class=\"icon mx-2\" status=\"success\" />\n }\n </div>\n </div>\n }\n</div>\n\n@if (!autoUpload()) {\n <div class=\"buttons text-end\">\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"pending || !files.length\"\n (click)=\"reset()\"\n >{{ clearButtonText() | translate }}</button\n >\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"!uploadEnabled\"\n (click)=\"fileUpload()\"\n >{{ uploadButtonText() | translate }}</button\n >\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:stretch}:host>*{min-inline-size:320px;max-inline-size:680px;inline-size:100%;align-self:center}.file-list{overflow-y:auto}.file-info{display:flex;justify-content:center;flex-direction:column;block-size:56px}.file{display:flex;position:relative;margin-block-end:8px;min-block-size:72px;transition:opacity calc(.5s * var(--element-animations-enabled, 1))}.fade-out{opacity:0}\n"] }]
|
|
883
|
+
], template: "<si-file-dropzone\n #dropZone\n [class]=\"autoUpload() ? 'mb-8' : 'mb-4'\"\n [uploadTextFileSelect]=\"uploadTextFileSelect()\"\n [uploadDropText]=\"uploadDropText()\"\n [multiple]=\"maxFiles() > 1\"\n [directoryUpload]=\"directoryUpload()\"\n [maxFileSizeText]=\"maxFileSizeText()\"\n [acceptText]=\"acceptText()\"\n [errorTextFileType]=\"errorTextFileType()\"\n [errorTextFileMaxSize]=\"errorTextFileMaxSize()\"\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n (filesAdded)=\"handleFiles($event)\"\n/>\n\n@if (maxFilesReached) {\n <si-inline-notification\n class=\"mb-4\"\n severity=\"info\"\n [message]=\"maxFilesReachedText()\"\n [translationParams]=\"{ maxFiles: maxFiles() }\"\n />\n}\n\n<div class=\"file-list\">\n @for (file of files; track file) {\n <div class=\"file\" [class.fade-out]=\"file.fadeOut\">\n <si-icon class=\"icon align-self-center ms-6 me-4\" icon=\"element-document\" />\n <div class=\"flex-fill overflow-hidden mt-6\">\n <div class=\"file-info\">\n <div class=\"file-name text-truncate si-h5\">{{ file.fileName }}</div>\n <div class=\"file-size text-secondary\">{{ file.size }}</div>\n @if (file.errorText) {\n <div\n class=\"d-inline-flex gap-2 error text-truncate\"\n [class.text-warning]=\"file.status === 'invalid'\"\n [class.text-danger]=\"file.status === 'error'\"\n >\n <si-status-icon\n class=\"icon-sm\"\n [status]=\"file.status === 'invalid' ? 'warning' : 'danger'\"\n />\n {{ file.errorText | translate: file.errorParams }}\n @if (file.httpErrorText) {\n : {{ file.httpErrorText }}\n }\n </div>\n } @else {\n <div class=\"position-relative mt-1 mb-5\">\n <div class=\"position-absolute end-0 mt-n6\">{{ file.progress }} %</div>\n <si-progressbar\n height=\"small\"\n [value]=\"file.progress\"\n [ariaLabel]=\"uploadingText() | translate\"\n />\n </div>\n }\n </div>\n </div>\n <div class=\"status align-self-center text-nowrap ps-4 pe-6\">\n @if (file.status === 'error') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary me-4\"\n [disabled]=\"!uploadEnabled\"\n [title]=\"uploadButtonText() | translate\"\n [attr.aria-label]=\"uploadButtonText() | translate\"\n (click)=\"retryUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementRedo\" />\n </button>\n }\n @if (file.status === 'added' || file.status === 'error' || file.status === 'invalid') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary-ghost\"\n [title]=\"removeButtonText() | translate\"\n [attr.aria-label]=\"removeButtonText() | translate\"\n (click)=\"removeFile($index)\"\n >\n <si-icon [icon]=\"icons.elementDelete\" />\n </button>\n }\n @if (file.status === 'uploading' || file.status === 'queued') {\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary\"\n [title]=\"cancelButtonText() | translate\"\n [attr.aria-label]=\"cancelButtonText() | translate\"\n (click)=\"cancelUpload(file)\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n }\n @if (file.status === 'success') {\n <si-status-icon class=\"icon mx-2\" status=\"success\" />\n }\n </div>\n </div>\n }\n</div>\n\n@if (!autoUpload()) {\n <div class=\"buttons text-end\">\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"pending || !files.length\"\n (click)=\"reset()\"\n >{{ clearButtonText() | translate }}</button\n >\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"!uploadEnabled\"\n (click)=\"fileUpload()\"\n >{{ uploadButtonText() | translate }}</button\n >\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:stretch}:host>*{min-inline-size:320px;max-inline-size:680px;inline-size:100%;align-self:center}.file-list{overflow-y:auto}.file-info{display:flex;justify-content:center;flex-direction:column;block-size:56px}.file{display:flex;position:relative;margin-block-end:8px;min-block-size:72px;transition:opacity calc(.5s * var(--element-animations-enabled, 1))}.fade-out{opacity:0}\n"] }]
|
|
883
884
|
}], propDecorators: { uploadTextFileSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadTextFileSelect", required: false }] }], uploadDropText: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadDropText", required: false }] }], maxFileSizeText: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSizeText", required: false }] }], maxFilesReachedText: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFilesReachedText", required: false }] }], acceptText: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptText", required: false }] }], uploadButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadButtonText", required: false }] }], clearButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonText", required: false }] }], uploadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadingText", required: false }] }], removeButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeButtonText", required: false }] }], cancelButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonText", required: false }] }], successTextTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "successTextTitle", required: false }] }], errorUploadFailed: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorUploadFailed", required: false }] }], showHttpError: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHttpError", required: false }] }], errorTextFileType: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorTextFileType", required: false }] }], errorTextFileMaxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorTextFileMaxSize", required: false }] }], uploadConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadConfig", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], maxConcurrentUploads: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxConcurrentUploads", required: false }] }], retries: [{ type: i0.Input, args: [{ isSignal: true, alias: "retries", required: false }] }], autoUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoUpload", required: false }] }], disableUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableUpload", required: false }] }], directoryUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "directoryUpload", required: false }] }], uploadCanceled: [{ type: i0.Output, args: ["uploadCanceled"] }], uploadCompleted: [{ type: i0.Output, args: ["uploadCompleted"] }], filesChanges: [{ type: i0.Output, args: ["filesChanges"] }], dropZone: [{ type: i0.ViewChild, args: ['dropZone', { isSignal: true }] }] } });
|
|
884
885
|
|
|
885
886
|
/**
|