@onemrvapublic/design-system 1.0.0-beta.4 → 1.0.0-develop.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/README.md +9 -4
- package/assets/i18n/de.json +84 -12
- package/assets/i18n/en.json +78 -6
- package/assets/i18n/fr.json +79 -7
- package/assets/i18n/nl.json +84 -12
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs +49 -0
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-layout.mjs +948 -0
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs +111 -0
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs +318 -0
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs +125 -0
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs +208 -0
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs +84 -0
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs +90 -0
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +33 -0
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs +211 -0
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs +42 -0
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +810 -0
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +138 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +135 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +98 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +189 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +308 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +295 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs +210 -0
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs +225 -0
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs +169 -0
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +103 -0
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs +269 -0
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs +185 -0
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs +118 -0
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs +52 -0
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs +612 -0
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs +96 -0
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs +72 -0
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs +241 -0
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs +65 -0
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs +146 -0
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs +36 -0
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs +232 -0
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs +170 -0
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs +1363 -0
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs +73 -0
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs +166 -0
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-page-error.mjs +80 -0
- package/fesm2022/onemrvapublic-design-system-page-error.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs +211 -0
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-shared.mjs +2188 -0
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-utils.mjs +35 -0
- package/fesm2022/onemrvapublic-design-system-utils.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system.mjs +10573 -0
- package/fesm2022/onemrvapublic-design-system.mjs.map +1 -0
- package/flag-icon/index.d.ts +18 -0
- package/flag-icon/src/flag-icon.component.scss +12 -0
- package/index.d.ts +3140 -0
- package/layout/index.d.ts +293 -0
- package/layout/src/components/layout/layout.component.scss +90 -80
- package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.scss +3 -2
- package/layout/src/components/layout-drawer-content/layout-drawer-content.component.scss +9 -0
- package/layout/src/components/layout-drawer-title/layout-drawer-title.component.scss +9 -5
- package/layout/src/components/layout-left-sidenav/layout-left-sidenav.component.scss +5 -0
- package/layout/src/components/layout-sidenav/layout-sidenav.component.scss +43 -0
- package/layout/src/index.scss +0 -1
- package/mat-address/index.d.ts +36 -0
- package/mat-address/src/onemrva-address.scss +14 -0
- package/mat-avatar/index.d.ts +187 -0
- package/mat-avatar/src/onemrva-mat-avatar.component.scss +79 -123
- package/mat-breadcrumb/index.d.ts +40 -0
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.scss +39 -53
- package/mat-carousel/index.d.ts +52 -0
- package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.scss +10 -0
- package/mat-carousel/src/onemrva-mat-carousel.component.scss +38 -45
- package/mat-choice-chip/index.d.ts +20 -0
- package/mat-choice-chip/src/onemrva-mat-choice-chip.component.scss +83 -0
- package/mat-copy-to-clipboard/index.d.ts +26 -0
- package/mat-country-item/index.d.ts +10 -0
- package/{mat-input-birthplace/src/country-item.component.scss → mat-country-item/src/onemrva-mat-country-item.component.scss} +6 -1
- package/mat-datepicker-header/index.d.ts +44 -0
- package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.scss +8 -0
- package/mat-empty-row/index.d.ts +19 -0
- package/mat-empty-row/src/onemrva-mat-empty-row.component.scss +29 -0
- package/mat-file-upload/index.d.ts +301 -0
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.scss +48 -16
- package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.scss +72 -218
- package/mat-input-address/index.d.ts +32 -0
- package/mat-input-address/src/onemrva-mat-input-address.component.scss +8 -0
- package/mat-input-birthplace/index.d.ts +36 -0
- package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.scss +4 -2
- package/mat-input-country/index.d.ts +32 -0
- package/mat-input-country/src/onemrva-mat-input-country.component.scss +13 -0
- package/mat-input-enterprise-number/index.d.ts +37 -0
- package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.scss +7 -0
- package/mat-input-iban/index.d.ts +79 -0
- package/mat-input-iban/src/onemrva-mat-input-iban.component.scss +10 -0
- package/mat-input-phone/index.d.ts +44 -0
- package/mat-message-box/index.d.ts +101 -0
- package/mat-message-box/src/onemrva-mat-message-box.component.scss +13 -65
- package/mat-multi-select/index.d.ts +57 -0
- package/mat-multi-select/src/onemrva-mat-multi-select.component.scss +35 -0
- package/mat-navigation/index.d.ts +54 -0
- package/mat-navigation/src/mat-navigation-item/onemrva-mat-navigation-item.component.scss +66 -0
- package/mat-navigation/src/onemrva-mat-navigation.component.scss +36 -0
- package/mat-notification/index.d.ts +43 -0
- package/mat-notification/src/onemrva-mat-notification.component.scss +26 -0
- package/mat-paginator/index.d.ts +58 -0
- package/mat-paginator/src/onemrva-mat-paginator.component.scss +146 -0
- package/mat-panel/index.d.ts +66 -0
- package/mat-panel/src/mat-expansion-panel-header-arrow-divider.scss +11 -0
- package/mat-panel/src/onemrva-mat-panel-content.scss +8 -0
- package/mat-panel/src/onemrva-mat-panel-icon.scss +7 -0
- package/mat-panel/src/onemrva-mat-panel-title.scss +13 -0
- package/mat-panel/src/onemrva-mat-panel.component.scss +75 -82
- package/mat-pop-over/index.d.ts +40 -0
- package/mat-pop-over/src/onemrva-mat-pop-over.component.scss +11 -11
- package/mat-progress-bar/index.d.ts +18 -0
- package/mat-progress-bar/src/onemrva-mat-progress-bar.component.scss +26 -0
- package/mat-select-search/index.d.ts +197 -0
- package/mat-select-search/src/mat-select-search.component.scss +62 -109
- package/mat-selectable-box/index.d.ts +29 -0
- package/mat-selectable-box/src/onemrva-mat-selectable-box.component.scss +68 -90
- package/mat-side-menu/index.d.ts +33 -0
- package/mat-side-menu/src/onemrva-mat-side-menu.component.scss +36 -38
- package/mat-skeleton/index.d.ts +100 -0
- package/mat-skeleton/src/onemrva-mat-skeleton.component.scss +10 -59
- package/mat-spinner/index.d.ts +25 -0
- package/mat-spinner/src/onemrva-mat-spinner.component.scss +21 -0
- package/mat-stepper/index.d.ts +36 -0
- package/mat-stepper/src/onemrva-mat-stepper.scss +40 -105
- package/mat-sticker/index.d.ts +14 -0
- package/mat-sticker/src/onemrva-mat-sticker.component.scss +26 -63
- package/mat-table-of-content/index.d.ts +84 -0
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.scss +57 -0
- package/mat-task-list/index.d.ts +57 -0
- package/mat-task-list/src/onemrva-mat-task-content.scss +11 -0
- package/mat-task-list/src/onemrva-mat-task-list.component.scss +0 -150
- package/mat-task-list/src/onemrva-mat-task-title.scss +16 -0
- package/mat-task-list/src/onemrva-mat-task.component.scss +67 -0
- package/mat-timepicker/index.d.ts +386 -0
- package/mat-timepicker/src/clock/clock.component.scss +13 -7
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.scss +2 -7
- package/mat-toast/index.d.ts +30 -0
- package/mat-toast/src/onemrva-mat-toast.component.scss +7 -49
- package/mat-tooltip/index.d.ts +39 -0
- package/mat-tooltip/src/onemrva-mat-tooltip.component.scss +8 -5
- package/package.json +196 -26
- package/page-error/index.d.ts +34 -0
- package/page-error/src/page-error.component.scss +25 -0
- package/page-not-found/index.d.ts +54 -0
- package/page-not-found/src/page-not-found-mixin.component.scss +1 -1
- package/page-not-found/src/page-not-found.component.scss +2 -2
- package/shared/index.d.ts +541 -0
- package/utils/index.d.ts +32 -0
- package/.eslintrc.json +0 -33
- package/_index.scss +0 -34
- package/_utils.scss +0 -30
- package/core/index.ts +0 -3
- package/core/ng-package.json +0 -6
- package/core/src/lib/core.module.ts +0 -26
- package/core/src/lib/modules/index.ts +0 -1
- package/core/src/lib/modules/translate.loader.ts +0 -34
- package/core/src/lib/modules/translate.module.ts +0 -66
- package/core/src/lib/services/index.ts +0 -2
- package/core/src/lib/services/onemrva-error-handler.service.ts +0 -24
- package/core/src/lib/services/onemrva-missing-translation.service.ts +0 -12
- package/core/src/test.ts +0 -30
- package/layout/index.ts +0 -7
- package/layout/ng-package.json +0 -6
- package/layout/src/components/index.ts +0 -37
- package/layout/src/components/layout/_layout-mixin.component.scss +0 -189
- package/layout/src/components/layout/layout.component.html +0 -213
- package/layout/src/components/layout/layout.component.spec.ts +0 -59
- package/layout/src/components/layout/layout.component.ts +0 -185
- package/layout/src/components/layout-after-nav/layout-after-nav.component.spec.ts +0 -24
- package/layout/src/components/layout-after-nav/layout-after-nav.component.ts +0 -24
- package/layout/src/components/layout-content/layout-content.component.spec.ts +0 -24
- package/layout/src/components/layout-content/layout-content.component.ts +0 -24
- package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.html +0 -1
- package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.ts +0 -14
- package/layout/src/components/layout-drawer-content/layout-drawer-content.component.html +0 -1
- package/layout/src/components/layout-drawer-content/layout-drawer-content.component.ts +0 -14
- package/layout/src/components/layout-drawer-title/layout-drawer-title.component.html +0 -7
- package/layout/src/components/layout-drawer-title/layout-drawer-title.component.ts +0 -18
- package/layout/src/components/layout-footer/layout-footer.component.ts +0 -11
- package/layout/src/components/layout-login-menu/layout-login-menu.component.spec.ts +0 -24
- package/layout/src/components/layout-login-menu/layout-login-menu.component.ts +0 -24
- package/layout/src/components/layout-route/layout-route.component.html +0 -64
- package/layout/src/components/layout-route/layout-route.component.spec.ts +0 -24
- package/layout/src/components/layout-route/layout-route.component.ts +0 -57
- package/layout/src/components/layout-sidenav/layout-sidenav.component.html +0 -104
- package/layout/src/components/layout-sidenav/layout-sidenav.component.ts +0 -88
- package/layout/src/components/layout-sidenav-title/layout-sidenav-title.component.ts +0 -9
- package/layout/src/components/layout-subroute/layout-subroute.component.html +0 -43
- package/layout/src/components/layout-subroute/layout-subroute.component.spec.ts +0 -24
- package/layout/src/components/layout-subroute/layout-subroute.component.ts +0 -62
- package/layout/src/components/layout-title/layout-title.component.spec.ts +0 -24
- package/layout/src/components/layout-title/layout-title.component.ts +0 -24
- package/layout/src/decorators/coerce-boolean-input.decorator.ts +0 -19
- package/layout/src/decorators/observable-content.decorator.ts +0 -13
- package/layout/src/directives/drawer-host.directive.ts +0 -42
- package/layout/src/enums/environment.enum.ts +0 -6
- package/layout/src/layout.module.ts +0 -47
- package/layout/src/models/onem-language.model.ts +0 -4
- package/layout/src/models/onemrva-profile.model.ts +0 -57
- package/layout/src/services/drawer.service.ts +0 -30
- package/layout/src/striphtml.pipe.ts +0 -10
- package/layout/src/test.ts +0 -31
- package/mat-avatar/index.ts +0 -2
- package/mat-avatar/ng-package.json +0 -6
- package/mat-avatar/src/onemrva-mat-avatar.component.html +0 -21
- package/mat-avatar/src/onemrva-mat-avatar.component.ts +0 -421
- package/mat-avatar/src/onemrva-mat-avatar.module.ts +0 -11
- package/mat-avatar/src/onemrva-mat.avatar.component.spec.ts +0 -54
- package/mat-badge/index.ts +0 -6
- package/mat-badge/ng-package.json +0 -6
- package/mat-badge/src/onemrva-mat-badge.component.scss +0 -157
- package/mat-badge/src/onemrva-mat-badge.component.ts +0 -331
- package/mat-badge/src/onemrva-mat-badge.module.ts +0 -8
- package/mat-breadcrumb/index.ts +0 -7
- package/mat-breadcrumb/ng-package.json +0 -6
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.html +0 -37
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.ts +0 -16
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.model.ts +0 -4
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.module.ts +0 -12
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.service.ts +0 -65
- package/mat-carousel/index.ts +0 -2
- package/mat-carousel/ng-package.json +0 -6
- package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.html +0 -5
- package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.ts +0 -27
- package/mat-carousel/src/onemrva-mat-carousel-item.directive.ts +0 -8
- package/mat-carousel/src/onemrva-mat-carousel.component.html +0 -43
- package/mat-carousel/src/onemrva-mat-carousel.component.ts +0 -160
- package/mat-copy-to-clipboard/index.ts +0 -1
- package/mat-copy-to-clipboard/ng-package.json +0 -6
- package/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.html +0 -14
- package/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.ts +0 -76
- package/mat-datepicker-header/index.ts +0 -5
- package/mat-datepicker-header/ng-package.json +0 -6
- package/mat-datepicker-header/src/_onemrva-mat-datepicker-header.component.scss +0 -12
- package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.html +0 -54
- package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.ts +0 -283
- package/mat-file-upload/index.ts +0 -11
- package/mat-file-upload/ng-package.json +0 -6
- package/mat-file-upload/src/components/index.ts +0 -10
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.html +0 -59
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.ts +0 -79
- package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.html +0 -58
- package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.ts +0 -209
- package/mat-file-upload/src/directives/dnd.directive.ts +0 -41
- package/mat-file-upload/src/models/action-config.model.ts +0 -10
- package/mat-file-upload/src/models/progress-file.model.ts +0 -94
- package/mat-file-upload/src/onemrva-mat-file-upload-itf.store.ts +0 -79
- package/mat-file-upload/src/onemrva-mat-file-upload.module.ts +0 -28
- package/mat-file-upload/src/onemrva-mat-file-upload.service.ts +0 -68
- package/mat-file-upload/src/onemrva-mat-file-upload.store.ts +0 -482
- package/mat-input-bank-account/index.ts +0 -5
- package/mat-input-bank-account/ng-package.json +0 -6
- package/mat-input-bank-account/src/bank-account.component.html +0 -36
- package/mat-input-bank-account/src/bank-account.component.scss +0 -42
- package/mat-input-bank-account/src/bank-account.component.ts +0 -308
- package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.html +0 -11
- package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.scss +0 -14
- package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.ts +0 -82
- package/mat-input-birthplace/index.ts +0 -5
- package/mat-input-birthplace/ng-package.json +0 -6
- package/mat-input-birthplace/src/country-item.component.html +0 -8
- package/mat-input-birthplace/src/country-item.component.ts +0 -33
- package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.html +0 -28
- package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.ts +0 -129
- package/mat-input-country/index.ts +0 -6
- package/mat-input-country/ng-package.json +0 -6
- package/mat-input-country/src/countries.ts +0 -3198
- package/mat-input-country/src/onemrva-mat-input-country.component.html +0 -25
- package/mat-input-country/src/onemrva-mat-input-country.component.ts +0 -152
- package/mat-input-enterprise-number/index.ts +0 -5
- package/mat-input-enterprise-number/ng-package.json +0 -6
- package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.html +0 -42
- package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.ts +0 -212
- package/mat-input-phone/index.ts +0 -6
- package/mat-input-phone/ng-package.json +0 -6
- package/mat-input-phone/src/onemrva-mat-input-phone.component.html +0 -47
- package/mat-input-phone/src/onemrva-mat-input-phone.component.ts +0 -274
- package/mat-input-phone/src/phone-number.directive.ts +0 -46
- package/mat-message-box/index.ts +0 -2
- package/mat-message-box/ng-package.json +0 -6
- package/mat-message-box/src/onemrva-mat-message-box.component.html +0 -3
- package/mat-message-box/src/onemrva-mat-message-box.component.ts +0 -172
- package/mat-message-box/src/onemrva-mat-message-box.module.ts +0 -12
- package/mat-multi-select/index.ts +0 -2
- package/mat-multi-select/ng-package.json +0 -6
- package/mat-multi-select/src/_onemrva-mat-multi-select.component.scss +0 -66
- package/mat-multi-select/src/onemrva-mat-multi-select.component.html +0 -44
- package/mat-multi-select/src/onemrva-mat-multi-select.component.ts +0 -194
- package/mat-multi-select/src/onemrva-mat-multi-select.module.ts +0 -27
- package/mat-multi-select/src/onemrva-mat-select-counter.component.ts +0 -0
- package/mat-notification/index.ts +0 -1
- package/mat-notification/ng-package.json +0 -6
- package/mat-notification/src/_onemrva-mat-notification.component.scss +0 -102
- package/mat-notification/src/onemrva-mat-notification.component.html +0 -15
- package/mat-notification/src/onemrva-mat-notification.component.ts +0 -158
- package/mat-paginator/index.ts +0 -6
- package/mat-paginator/ng-package.json +0 -6
- package/mat-paginator/src/_onemrva-mat-paginator.component.scss +0 -122
- package/mat-paginator/src/onemrva-mat-paginator.component.html +0 -108
- package/mat-paginator/src/onemrva-mat-paginator.component.spec.ts +0 -184
- package/mat-paginator/src/onemrva-mat-paginator.component.ts +0 -216
- package/mat-paginator/src/onemrva-mat-paginator.module.ts +0 -21
- package/mat-panel/index.ts +0 -6
- package/mat-panel/ng-package.json +0 -6
- package/mat-panel/src/onemrva-mat-panel-content.component.ts +0 -11
- package/mat-panel/src/onemrva-mat-panel-content.html +0 -5
- package/mat-panel/src/onemrva-mat-panel-icon.component.ts +0 -11
- package/mat-panel/src/onemrva-mat-panel-icon.html +0 -5
- package/mat-panel/src/onemrva-mat-panel-title-action.component.ts +0 -11
- package/mat-panel/src/onemrva-mat-panel-title-action.html +0 -5
- package/mat-panel/src/onemrva-mat-panel-title.component.ts +0 -29
- package/mat-panel/src/onemrva-mat-panel-title.html +0 -8
- package/mat-panel/src/onemrva-mat-panel.component.html +0 -10
- package/mat-panel/src/onemrva-mat-panel.component.ts +0 -122
- package/mat-panel/src/onemrva-mat-panel.module.ts +0 -26
- package/mat-pop-over/index.ts +0 -4
- package/mat-pop-over/ng-package.json +0 -6
- package/mat-pop-over/src/onemrva-mat-pop-over-content.component.ts +0 -13
- package/mat-pop-over/src/onemrva-mat-pop-over-trigger.component.ts +0 -13
- package/mat-pop-over/src/onemrva-mat-pop-over.component.html +0 -29
- package/mat-pop-over/src/onemrva-mat-pop-over.component.ts +0 -46
- package/mat-pop-over/src/onemrva-mat-pop-over.module.ts +0 -19
- package/mat-progress-bar/index.ts +0 -1
- package/mat-progress-bar/ng-package.json +0 -6
- package/mat-progress-bar/src/_onemrva-mat-progress-bar-mixin.component.scss +0 -37
- package/mat-progress-bar/src/onemrva-mat-progress-bar.component.html +0 -13
- package/mat-progress-bar/src/onemrva-mat-progress-bar.component.ts +0 -27
- package/mat-select-search/index.ts +0 -3
- package/mat-select-search/ng-package.json +0 -6
- package/mat-select-search/src/default-options.ts +0 -48
- package/mat-select-search/src/mat-select-no-entries-found.directive.ts +0 -15
- package/mat-select-search/src/mat-select-search-clear.directive.ts +0 -13
- package/mat-select-search/src/mat-select-search.component.html +0 -82
- package/mat-select-search/src/mat-select-search.component.spec.ts +0 -790
- package/mat-select-search/src/mat-select-search.component.ts +0 -705
- package/mat-select-search/src/mat-select-search.module.ts +0 -52
- package/mat-selectable-box/index.ts +0 -6
- package/mat-selectable-box/ng-package.json +0 -6
- package/mat-selectable-box/src/onemrva-mat-selectable-box.component.ts +0 -99
- package/mat-selectable-box/src/onemrva-mat-selectable-box.module.ts +0 -30
- package/mat-side-menu/index.ts +0 -6
- package/mat-side-menu/ng-package.json +0 -6
- package/mat-side-menu/src/onemrva-mat-side-menu.component.html +0 -36
- package/mat-side-menu/src/onemrva-mat-side-menu.component.spec.ts +0 -66
- package/mat-side-menu/src/onemrva-mat-side-menu.component.ts +0 -58
- package/mat-side-menu/src/onemrva-mat-side-menu.module.ts +0 -14
- package/mat-skeleton/index.ts +0 -3
- package/mat-skeleton/ng-package.json +0 -6
- package/mat-skeleton/src/onemrva-mat-skeleton-enums.ts +0 -32
- package/mat-skeleton/src/onemrva-mat-skeleton.component.html +0 -14
- package/mat-skeleton/src/onemrva-mat-skeleton.component.ts +0 -187
- package/mat-skeleton/src/onemrva-mat-skeleton.module.ts +0 -10
- package/mat-spinner/index.ts +0 -7
- package/mat-spinner/ng-package.json +0 -6
- package/mat-spinner/src/_onemrva-mat-spinner.component.scss +0 -151
- package/mat-spinner/src/onemrva-mat-loading.directive.ts +0 -41
- package/mat-spinner/src/onemrva-mat-spinner.component.html +0 -2138
- package/mat-spinner/src/onemrva-mat-spinner.component.ts +0 -52
- package/mat-spinner/src/onemrva-mat-spinner.module.ts +0 -10
- package/mat-stepper/index.ts +0 -6
- package/mat-stepper/ng-package.json +0 -6
- package/mat-stepper/src/_stepper-variables.scss +0 -29
- package/mat-stepper/src/onemrva-mat-stepper.component.spec.ts +0 -22
- package/mat-stepper/src/onemrva-mat-stepper.component.ts +0 -57
- package/mat-stepper/src/onemrva-mat-stepper.html +0 -61
- package/mat-stepper/src/onemrva-mat-stepper.module.ts +0 -24
- package/mat-stepper/src/onemrva-stepper-animations.ts +0 -42
- package/mat-sticker/index.ts +0 -6
- package/mat-sticker/ng-package.json +0 -6
- package/mat-sticker/src/onemrva-mat-sticker.component.spec.ts +0 -16
- package/mat-sticker/src/onemrva-mat-sticker.component.ts +0 -58
- package/mat-sticker/src/onemrva-mat-sticker.module.ts +0 -10
- package/mat-table-of-content/index.ts +0 -8
- package/mat-table-of-content/ng-package.json +0 -6
- package/mat-table-of-content/src/_onemrva-mat-table-of-content.component.scss +0 -79
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.html +0 -23
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.ts +0 -126
- package/mat-table-of-content/src/onemrva-mat-table-of-content.directive.ts +0 -67
- package/mat-table-of-content/src/onemrva-mat-table-of-content.service.ts +0 -51
- package/mat-table-of-content/src/onemrva-mat-toc-anchor.model.ts +0 -24
- package/mat-task-list/index.ts +0 -5
- package/mat-task-list/ng-package.json +0 -6
- package/mat-task-list/src/onemrva-mat-task-content.component.ts +0 -11
- package/mat-task-list/src/onemrva-mat-task-content.html +0 -5
- package/mat-task-list/src/onemrva-mat-task-list.component.html +0 -1
- package/mat-task-list/src/onemrva-mat-task-list.component.ts +0 -39
- package/mat-task-list/src/onemrva-mat-task-list.module.ts +0 -31
- package/mat-task-list/src/onemrva-mat-task-title.component.ts +0 -24
- package/mat-task-list/src/onemrva-mat-task-title.html +0 -5
- package/mat-task-list/src/onemrva-mat-task.component.html +0 -23
- package/mat-task-list/src/onemrva-mat-task.component.ts +0 -121
- package/mat-timepicker/index.ts +0 -6
- package/mat-timepicker/ng-package.json +0 -6
- package/mat-timepicker/src/clock/clock.component.html +0 -109
- package/mat-timepicker/src/clock/clock.component.spec.ts +0 -38
- package/mat-timepicker/src/clock/clock.component.ts +0 -274
- package/mat-timepicker/src/interfaces-and-types.ts +0 -18
- package/mat-timepicker/src/onemrva-mat-timepicker.component.html +0 -0
- package/mat-timepicker/src/onemrva-mat-timepicker.component.ts +0 -300
- package/mat-timepicker/src/onemrva-mat-timepicker.module.ts +0 -40
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.html +0 -53
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.spec.ts +0 -41
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.ts +0 -176
- package/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.html +0 -15
- package/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.ts +0 -140
- package/mat-timepicker/src/timepicker.directive.ts +0 -596
- package/mat-timepicker/src/util.ts +0 -109
- package/mat-toast/index.ts +0 -6
- package/mat-toast/ng-package.json +0 -6
- package/mat-toast/src/onemrva-mat-toast.component.ts +0 -36
- package/mat-toast/src/onemrva-mat-toast.module.ts +0 -11
- package/mat-tooltip/index.ts +0 -4
- package/mat-tooltip/ng-package.json +0 -6
- package/mat-tooltip/src/onemrva-mat-tooltip.component.ts +0 -21
- package/mat-tooltip/src/onemrva-mat-tooltip.directive.ts +0 -123
- package/mat-tooltip/src/onemrva-mat-tooltip.module.ts +0 -11
- package/ng-package.json +0 -25
- package/npm-shrinkwrap.json +0 -30
- package/page-not-found/index.ts +0 -5
- package/page-not-found/ng-package.json +0 -6
- package/page-not-found/src/page-not-found-action.component.ts +0 -9
- package/page-not-found/src/page-not-found-extra.component.ts +0 -9
- package/page-not-found/src/page-not-found-invader.component.ts +0 -93
- package/page-not-found/src/page-not-found.component.html +0 -47
- package/page-not-found/src/page-not-found.component.ts +0 -60
- package/page-not-found/src/page-not-found.module.ts +0 -24
- package/shared/index.ts +0 -17
- package/shared/ng-package.json +0 -6
- package/shared/src/lib/OnemrvaDateAdapter.ts +0 -78
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.css +0 -0
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.html +0 -1
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.spec.ts +0 -21
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.ts +0 -18
- package/shared/src/lib/containers/WebComponentOverlayContainer.ts +0 -90
- package/shared/src/lib/containers/index.ts +0 -1
- package/shared/src/lib/date.format.ts +0 -11
- package/shared/src/lib/directives/clipboard.directive.ts +0 -52
- package/shared/src/lib/directives/color.directive.ts +0 -46
- package/shared/src/lib/directives/digit-only.directive.ts +0 -46
- package/shared/src/lib/directives/if-width-is.directive.ts +0 -39
- package/shared/src/lib/directives/index.ts +0 -22
- package/shared/src/lib/directives/mask.directive.ts +0 -223
- package/shared/src/lib/directives/mat-row-clickable.directive.ts +0 -66
- package/shared/src/lib/interfaces/OnemRvaCommonCountry.interface.ts +0 -23
- package/shared/src/lib/interfaces/index.ts +0 -1
- package/shared/src/lib/pipes/index.ts +0 -2
- package/shared/src/lib/pipes/onemrva-bce.pipe.ts +0 -18
- package/shared/src/lib/pipes/onemrva-niss.pipe.ts +0 -18
- package/shared/src/lib/services/commonCountryLookup.service.ts +0 -50
- package/shared/src/lib/services/index.ts +0 -1
- package/shared/src/lib/shared.datepicker.module.ts +0 -60
- package/shared/src/lib/shared.module.ts +0 -10
- package/shared/src/lib/validators/bankAccountValidator.utils.ts +0 -61
- package/shared/src/lib/validators/onemrva-validators.spec.ts +0 -79
- package/shared/src/lib/validators/onemrva-validators.ts +0 -97
- package/shared/src/onemrva-validators.spec.ts +0 -14
- package/src/polyfills.ts +0 -52
- package/src/public-api.spec.ts +0 -7
- package/src/public-api.ts +0 -5
- package/tsconfig.lib.json +0 -12
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -10
- package/utils/index.ts +0 -2
- package/utils/ng-package.json +0 -6
- package/utils/src/enum.utils.ts +0 -8
- package/utils/src/enums/color.enum.ts +0 -14
- package/utils/src/enums/index.ts +0 -2
- package/utils/src/enums/size.enum.ts +0 -11
- /package/{assets/.gitkeep → mat-navigation/src/mat-navigation-tree/onemrva-mat-navigation-tree.component.scss} +0 -0
|
@@ -0,0 +1,810 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { HostBinding, Input, ChangeDetectionStrategy, Component, Injectable, InjectionToken, inject, EventEmitter, HostListener, Output, Directive, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';
|
|
4
|
+
import { of, BehaviorSubject, interval, take, map, catchError, tap, mergeMap, withLatestFrom, filter, throttle, takeWhile, switchMap, forkJoin, merge, Subject } from 'rxjs';
|
|
5
|
+
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
6
|
+
import { AsyncPipe, NgClass, NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
7
|
+
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
|
8
|
+
import { TranslatePipe, TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
9
|
+
import { MatProgressBar } from '@angular/material/progress-bar';
|
|
10
|
+
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
11
|
+
import { trigger, state, transition, style, animate, keyframes } from '@angular/animations';
|
|
12
|
+
import { ComponentStore } from '@ngrx/component-store';
|
|
13
|
+
import { HttpEventType, HttpResponse } from '@angular/common/http';
|
|
14
|
+
import { OnemRvaCDNMimeService } from '@onemrvapublic/design-system/shared';
|
|
15
|
+
import { MatError } from '@angular/material/form-field';
|
|
16
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
17
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
18
|
+
import { MatInputModule } from '@angular/material/input';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* format bytes
|
|
22
|
+
* @param bytes (File size in bytes)
|
|
23
|
+
* @param decimals (Decimals point)
|
|
24
|
+
*/
|
|
25
|
+
function formatBytes(bytes, decimals = 2) {
|
|
26
|
+
if (bytes === 0) {
|
|
27
|
+
return '0 Bytes';
|
|
28
|
+
}
|
|
29
|
+
const k = 1024;
|
|
30
|
+
const dm = decimals <= 0 ? 0 : decimals || 2;
|
|
31
|
+
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
32
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
33
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
|
34
|
+
}
|
|
35
|
+
function formattedSize(size, decimals = 2) {
|
|
36
|
+
if (size === null)
|
|
37
|
+
return '';
|
|
38
|
+
return formatBytes(size, decimals);
|
|
39
|
+
}
|
|
40
|
+
function convertToProgressFile(id, name, message = '', progress = 100, color = OnemrvaMatColor.PRIMARY, url = null, enableProgressBar = false, data = null, size = 0, type = '', maxSize = null) {
|
|
41
|
+
return {
|
|
42
|
+
id: id,
|
|
43
|
+
name: name,
|
|
44
|
+
message: message,
|
|
45
|
+
progress: progress,
|
|
46
|
+
color: color,
|
|
47
|
+
url: url,
|
|
48
|
+
enableProgressBar: enableProgressBar,
|
|
49
|
+
data: data,
|
|
50
|
+
size: size,
|
|
51
|
+
type: type,
|
|
52
|
+
maxSize: maxSize,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function convertToReferencedProgressFile(id, name, message = '', progress = 100, color = OnemrvaMatColor.PRIMARY, url = null, enableProgressBar = false, data = null, size = 0, type = '', maxSize = null) {
|
|
56
|
+
return {
|
|
57
|
+
id: id,
|
|
58
|
+
ref: Symbol(name),
|
|
59
|
+
name: name,
|
|
60
|
+
message: message,
|
|
61
|
+
progress: progress,
|
|
62
|
+
color: color,
|
|
63
|
+
url: url,
|
|
64
|
+
enableProgressBar: enableProgressBar,
|
|
65
|
+
data: data,
|
|
66
|
+
size: size,
|
|
67
|
+
type: type,
|
|
68
|
+
maxSize: maxSize,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let NEXT_ID$1 = 0;
|
|
73
|
+
class OnemrvaFilePanelComponent {
|
|
74
|
+
constructor() {
|
|
75
|
+
this.id = `onemrva-file-panel-${NEXT_ID$1++}`;
|
|
76
|
+
this.dataCy = 'onemrva-file-panel-' + NEXT_ID$1;
|
|
77
|
+
this.actions = [];
|
|
78
|
+
this.showProgress = true;
|
|
79
|
+
this.displayDate = '';
|
|
80
|
+
this.maxFileSize = 0;
|
|
81
|
+
this.formattedSize = formattedSize;
|
|
82
|
+
}
|
|
83
|
+
get progress$() {
|
|
84
|
+
return of(this.file.progress);
|
|
85
|
+
}
|
|
86
|
+
get size() {
|
|
87
|
+
return formattedSize(this.file.size);
|
|
88
|
+
}
|
|
89
|
+
get color() {
|
|
90
|
+
if (this.file.color !== undefined) {
|
|
91
|
+
return this.file.color;
|
|
92
|
+
}
|
|
93
|
+
return OnemrvaMatColor.NONE;
|
|
94
|
+
}
|
|
95
|
+
/** @hidden @internal */
|
|
96
|
+
get _colorAccent() {
|
|
97
|
+
return this.color === OnemrvaMatColor.ACCENT;
|
|
98
|
+
}
|
|
99
|
+
/** @hidden @internal */
|
|
100
|
+
get _isError() {
|
|
101
|
+
return this.color === OnemrvaMatColor.ERROR;
|
|
102
|
+
}
|
|
103
|
+
/** @hidden @internal */
|
|
104
|
+
get _isWarn() {
|
|
105
|
+
return this.color === OnemrvaMatColor.WARN;
|
|
106
|
+
}
|
|
107
|
+
/** @hidden @internal */
|
|
108
|
+
get _isSuccess() {
|
|
109
|
+
return this.color === OnemrvaMatColor.SUCCESS;
|
|
110
|
+
}
|
|
111
|
+
/** @hidden @internal */
|
|
112
|
+
get _isPrimary() {
|
|
113
|
+
return this.color === OnemrvaMatColor.PRIMARY;
|
|
114
|
+
}
|
|
115
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaFilePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
116
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaFilePanelComponent, isStandalone: true, selector: "file-panel", inputs: { id: "id", dataCy: "dataCy", file: "file", actions: "actions", showProgress: "showProgress", displayDate: "displayDate", maxFileSize: "maxFileSize", color: "color" }, host: { properties: { "attr.id": "this.id", "attr.data-cy": "this.dataCy", "mat-accent": "this._colorAccent", "class.mat-error": "this._isError", "class.mat-warn": "this._isWarn", "class.mat-success": "this._isSuccess", "class.mat-primary": "this._isPrimary" } }, ngImport: i0, template: "<div class=\"file-panel-title show-icon\" [attr.data-cy]=\"dataCy\">\n <div class=\"file-panel-title-left\">\n <span class=\"file-name\">\n {{ file.name }}\n </span>\n </div>\n <div class=\"file-panel-title-action float-right\">\n @if (actions.length > 0) {\n @for (action of actions; track action.dataCy) {\n @if (action.showAction(file)) {\n <mat-icon\n role=\"button\"\n color=\"primary\"\n [attr.data-cy]=\"action.dataCy\"\n matTooltip=\"{{ action.tooltipCode | translate }}\"\n [attr.aria-label]=\"action.ariaCode | translate\"\n class=\"clickable\"\n (click)=\"action.clickHandler(file)\"\n >{{ action.iconName }}</mat-icon\n >\n }\n }\n }\n </div>\n</div>\n<div class=\"file-panel-content\">\n @if (file.message === '') {\n <ng-container>\n <div class=\"fileInfos\">\n <span>{{ displayDate }}</span>\n\n @if (file.size > 0) {\n <span class=\"float-right\">{{ size }}</span>\n }\n </div>\n @if (showProgress && file.enableProgressBar) {\n <mat-progress-bar\n data-cy=\"file-upload-progress\"\n mode=\"determinate\"\n [value]=\"progress$ | async\"\n ></mat-progress-bar>\n }\n </ng-container>\n }\n @if (file.message !== '') {\n <p class=\"message\">\n {{ file.message | translate: { limit: formattedSize(file.maxSize) } }}\n </p>\n }\n</div>\n", styles: [":host{flex:1 1 100%;border-radius:var(--border-radius);background-color:var(--mat-sys-primary-container);padding:var(--double-spacer);display:block}:host .file-panel-content{padding:0}:host .file-panel-content p:last-child{margin:0}:host .fileInfos{display:inline-block;width:100%;height:1.5rem;font:var(--mat-sys-body-medium)}:host .fileInfos .float-right{margin-right:var(--spacer)}:host .file-panel-title{font:var(--mat-sys-title-medium);margin-bottom:0;color:var(--mat-sys-primary)}:host .file-panel-title .file-panel-title-left{display:inline-flex;align-items:center;gap:var(--spacer)}:host .file-panel-title:before{margin-right:var(--spacer);margin-top:var(--quarter-spacer)}:host .file-panel-title .mat-progress-bar-fill:after{background:var(--mat-sys-primary)}:host .file-panel-title .mat-progress-bar-buffer{background-color:var(--mat-sys-primary-container)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
117
|
+
}
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaFilePanelComponent, decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{ selector: 'file-panel', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatIcon, MatTooltip, TranslatePipe, AsyncPipe, MatProgressBar], template: "<div class=\"file-panel-title show-icon\" [attr.data-cy]=\"dataCy\">\n <div class=\"file-panel-title-left\">\n <span class=\"file-name\">\n {{ file.name }}\n </span>\n </div>\n <div class=\"file-panel-title-action float-right\">\n @if (actions.length > 0) {\n @for (action of actions; track action.dataCy) {\n @if (action.showAction(file)) {\n <mat-icon\n role=\"button\"\n color=\"primary\"\n [attr.data-cy]=\"action.dataCy\"\n matTooltip=\"{{ action.tooltipCode | translate }}\"\n [attr.aria-label]=\"action.ariaCode | translate\"\n class=\"clickable\"\n (click)=\"action.clickHandler(file)\"\n >{{ action.iconName }}</mat-icon\n >\n }\n }\n }\n </div>\n</div>\n<div class=\"file-panel-content\">\n @if (file.message === '') {\n <ng-container>\n <div class=\"fileInfos\">\n <span>{{ displayDate }}</span>\n\n @if (file.size > 0) {\n <span class=\"float-right\">{{ size }}</span>\n }\n </div>\n @if (showProgress && file.enableProgressBar) {\n <mat-progress-bar\n data-cy=\"file-upload-progress\"\n mode=\"determinate\"\n [value]=\"progress$ | async\"\n ></mat-progress-bar>\n }\n </ng-container>\n }\n @if (file.message !== '') {\n <p class=\"message\">\n {{ file.message | translate: { limit: formattedSize(file.maxSize) } }}\n </p>\n }\n</div>\n", styles: [":host{flex:1 1 100%;border-radius:var(--border-radius);background-color:var(--mat-sys-primary-container);padding:var(--double-spacer);display:block}:host .file-panel-content{padding:0}:host .file-panel-content p:last-child{margin:0}:host .fileInfos{display:inline-block;width:100%;height:1.5rem;font:var(--mat-sys-body-medium)}:host .fileInfos .float-right{margin-right:var(--spacer)}:host .file-panel-title{font:var(--mat-sys-title-medium);margin-bottom:0;color:var(--mat-sys-primary)}:host .file-panel-title .file-panel-title-left{display:inline-flex;align-items:center;gap:var(--spacer)}:host .file-panel-title:before{margin-right:var(--spacer);margin-top:var(--quarter-spacer)}:host .file-panel-title .mat-progress-bar-fill:after{background:var(--mat-sys-primary)}:host .file-panel-title .mat-progress-bar-buffer{background-color:var(--mat-sys-primary-container)}\n"] }]
|
|
121
|
+
}], propDecorators: { id: [{
|
|
122
|
+
type: HostBinding,
|
|
123
|
+
args: ['attr.id']
|
|
124
|
+
}, {
|
|
125
|
+
type: Input
|
|
126
|
+
}], dataCy: [{
|
|
127
|
+
type: HostBinding,
|
|
128
|
+
args: ['attr.data-cy']
|
|
129
|
+
}, {
|
|
130
|
+
type: Input
|
|
131
|
+
}], file: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], actions: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], showProgress: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], displayDate: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], maxFileSize: [{
|
|
140
|
+
type: Input
|
|
141
|
+
}], color: [{
|
|
142
|
+
type: Input
|
|
143
|
+
}], _colorAccent: [{
|
|
144
|
+
type: HostBinding,
|
|
145
|
+
args: ['mat-accent']
|
|
146
|
+
}], _isError: [{
|
|
147
|
+
type: HostBinding,
|
|
148
|
+
args: ['class.mat-error']
|
|
149
|
+
}], _isWarn: [{
|
|
150
|
+
type: HostBinding,
|
|
151
|
+
args: ['class.mat-warn']
|
|
152
|
+
}], _isSuccess: [{
|
|
153
|
+
type: HostBinding,
|
|
154
|
+
args: ['class.mat-success']
|
|
155
|
+
}], _isPrimary: [{
|
|
156
|
+
type: HostBinding,
|
|
157
|
+
args: ['class.mat-primary']
|
|
158
|
+
}] } });
|
|
159
|
+
|
|
160
|
+
class OnemrvaMatFileUploadService {
|
|
161
|
+
constructor() {
|
|
162
|
+
this.isSending = new BehaviorSubject(false);
|
|
163
|
+
alert("Don't forget to add a provider in your component with your own implementation of OnemrvaMatFileUploadInterface. Check out the demo to have an example of how to do it");
|
|
164
|
+
}
|
|
165
|
+
listUploadedFiles(_inputs) {
|
|
166
|
+
return of([]);
|
|
167
|
+
}
|
|
168
|
+
upload(_file) {
|
|
169
|
+
return interval(50).pipe(take(101), map(i => {
|
|
170
|
+
if (i < 100) {
|
|
171
|
+
return {
|
|
172
|
+
type: HttpEventType.UploadProgress,
|
|
173
|
+
loaded: i,
|
|
174
|
+
total: 100,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
if (i >= 100 && Math.random() > 0.5) {
|
|
179
|
+
throw 'Fake error thrown';
|
|
180
|
+
}
|
|
181
|
+
return new HttpResponse();
|
|
182
|
+
}
|
|
183
|
+
}), catchError(() => of(new HttpResponse({ body: {}, status: 500 }))));
|
|
184
|
+
}
|
|
185
|
+
deleteFile(_id) {
|
|
186
|
+
return of('F = m.a');
|
|
187
|
+
}
|
|
188
|
+
retry(file) {
|
|
189
|
+
return of(file);
|
|
190
|
+
}
|
|
191
|
+
downloadFile(id) {
|
|
192
|
+
alert(`Missing download implementation for file ID ${id}`);
|
|
193
|
+
return of(true);
|
|
194
|
+
}
|
|
195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
196
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadService, providedIn: 'root' }); }
|
|
197
|
+
}
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadService, decorators: [{
|
|
199
|
+
type: Injectable,
|
|
200
|
+
args: [{
|
|
201
|
+
providedIn: 'root',
|
|
202
|
+
}]
|
|
203
|
+
}], ctorParameters: () => [] });
|
|
204
|
+
|
|
205
|
+
const INIT_STATE = {
|
|
206
|
+
upload: [],
|
|
207
|
+
accept: [],
|
|
208
|
+
maxFileSize: 0,
|
|
209
|
+
fileUploadError: '',
|
|
210
|
+
event: {
|
|
211
|
+
type: 'INIT',
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
const CUSTOM_VALIDATION_FN = new InjectionToken('x1, x2 = (-b -+ sqrt(rho))/2a');
|
|
215
|
+
class OnemrvaMatFileUploadStore extends ComponentStore {
|
|
216
|
+
constructor() {
|
|
217
|
+
super(INIT_STATE);
|
|
218
|
+
this.fn = (x) => {
|
|
219
|
+
return x[0];
|
|
220
|
+
};
|
|
221
|
+
this.fileUploadService = inject(OnemrvaMatFileUploadService);
|
|
222
|
+
this.translateService = inject(TranslateService);
|
|
223
|
+
this.customValidationFn = inject(CUSTOM_VALIDATION_FN, {
|
|
224
|
+
optional: true,
|
|
225
|
+
});
|
|
226
|
+
this.isSending = this.fileUploadService.isSending;
|
|
227
|
+
/*
|
|
228
|
+
* U P D A T E R S
|
|
229
|
+
*/
|
|
230
|
+
this.setAccept = this.updater((state, accept) => ({
|
|
231
|
+
...state,
|
|
232
|
+
accept,
|
|
233
|
+
event: {
|
|
234
|
+
type: 'setAccept',
|
|
235
|
+
payload: accept,
|
|
236
|
+
},
|
|
237
|
+
}));
|
|
238
|
+
this.setMaxFileSize = this.updater((state, maxFileSize) => ({
|
|
239
|
+
...state,
|
|
240
|
+
maxFileSize,
|
|
241
|
+
event: {
|
|
242
|
+
type: 'setMaxFileSize',
|
|
243
|
+
payload: maxFileSize,
|
|
244
|
+
},
|
|
245
|
+
}));
|
|
246
|
+
this.emptyList = this.updater(state => {
|
|
247
|
+
return {
|
|
248
|
+
...state,
|
|
249
|
+
upload: [],
|
|
250
|
+
event: {
|
|
251
|
+
type: 'emptyList',
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
});
|
|
255
|
+
this.pushFile = this.updater((state, payload) => {
|
|
256
|
+
return {
|
|
257
|
+
...state,
|
|
258
|
+
upload: [...state.upload, { ...payload }],
|
|
259
|
+
event: {
|
|
260
|
+
type: 'pushFile',
|
|
261
|
+
payload,
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
});
|
|
265
|
+
this.setData = this.updater((state, payload) => {
|
|
266
|
+
return {
|
|
267
|
+
...state,
|
|
268
|
+
upload: state.upload.map((file) => file.ref === payload.ref ? { ...file, data: payload.data } : file),
|
|
269
|
+
event: {
|
|
270
|
+
type: 'setData',
|
|
271
|
+
payload,
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
});
|
|
275
|
+
this.setSuccess = this.updater((state, payload) => {
|
|
276
|
+
const newFile = {
|
|
277
|
+
...state.upload.find(f => f.ref === payload.ref),
|
|
278
|
+
...payload.body,
|
|
279
|
+
color: 'success',
|
|
280
|
+
progress: 100,
|
|
281
|
+
};
|
|
282
|
+
return {
|
|
283
|
+
...state,
|
|
284
|
+
upload: state.upload.map(file => file.ref === payload.ref ? newFile : file),
|
|
285
|
+
event: {
|
|
286
|
+
type: 'setData',
|
|
287
|
+
payload: newFile,
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
});
|
|
291
|
+
this.setFail = this.updater((state, payload) => ({
|
|
292
|
+
...state,
|
|
293
|
+
upload: state.upload.map(file => file.ref === payload.ref
|
|
294
|
+
? { ...file, message: payload.message, color: payload.color }
|
|
295
|
+
: file),
|
|
296
|
+
event: {
|
|
297
|
+
type: 'setFail',
|
|
298
|
+
payload,
|
|
299
|
+
},
|
|
300
|
+
}));
|
|
301
|
+
this.setProgress = this.updater((state, payload) => ({
|
|
302
|
+
...state,
|
|
303
|
+
upload: state.upload.map(file => file.ref === payload.ref
|
|
304
|
+
? { ...file, progress: payload.progress }
|
|
305
|
+
: file),
|
|
306
|
+
event: {
|
|
307
|
+
type: 'setProgress',
|
|
308
|
+
payload,
|
|
309
|
+
},
|
|
310
|
+
}));
|
|
311
|
+
this.reset = this.updater((state, ref) => ({
|
|
312
|
+
...state,
|
|
313
|
+
upload: state.upload.map(file => file.ref === ref
|
|
314
|
+
? { ...file, progress: 0, message: '', color: '' }
|
|
315
|
+
: file),
|
|
316
|
+
event: {
|
|
317
|
+
type: 'reset',
|
|
318
|
+
payload: ref,
|
|
319
|
+
},
|
|
320
|
+
}));
|
|
321
|
+
this.remove = this.updater((state, payload) => ({
|
|
322
|
+
...state,
|
|
323
|
+
upload: state.upload.filter(f => f.ref !== payload.ref),
|
|
324
|
+
event: {
|
|
325
|
+
type: 'remove',
|
|
326
|
+
payload,
|
|
327
|
+
},
|
|
328
|
+
}));
|
|
329
|
+
this.enableProgressBar = this.updater(state => ({
|
|
330
|
+
...state,
|
|
331
|
+
upload: state.upload.map(file => ({ ...file, enableProgressBar: true })),
|
|
332
|
+
event: {
|
|
333
|
+
type: 'enableProgressBar',
|
|
334
|
+
},
|
|
335
|
+
}));
|
|
336
|
+
this.setFileUploadError = this.updater((state, fileUploadError) => ({
|
|
337
|
+
...state,
|
|
338
|
+
fileUploadError,
|
|
339
|
+
event: {
|
|
340
|
+
type: 'setFileUploadError',
|
|
341
|
+
payload: fileUploadError,
|
|
342
|
+
},
|
|
343
|
+
}));
|
|
344
|
+
this.clearFileUploadError = this.updater(state => ({
|
|
345
|
+
...state,
|
|
346
|
+
fileUploadError: '',
|
|
347
|
+
event: {
|
|
348
|
+
type: 'clearFileUploadError',
|
|
349
|
+
},
|
|
350
|
+
}));
|
|
351
|
+
/*
|
|
352
|
+
* S E L E C T O R S
|
|
353
|
+
*/
|
|
354
|
+
this.files$ = this.select(state => state.upload);
|
|
355
|
+
this.accept$ = this.select(state => state.accept);
|
|
356
|
+
this.event$ = this.select(state => state.event);
|
|
357
|
+
this.maxFileSize$ = this.select(state => state.maxFileSize);
|
|
358
|
+
this.fileUploadError$ = this.select(state => state.fileUploadError);
|
|
359
|
+
/*
|
|
360
|
+
* A C T I O N S / E F F E C T S
|
|
361
|
+
*/
|
|
362
|
+
this.listUploadedFiles = this.effect((inputs$) => {
|
|
363
|
+
return inputs$.pipe(tap(() => {
|
|
364
|
+
this.emptyList();
|
|
365
|
+
}), mergeMap((inputs) => {
|
|
366
|
+
return this.fileUploadService.listUploadedFiles(inputs).pipe(
|
|
367
|
+
//take(1),
|
|
368
|
+
withLatestFrom(this.files$), tap(() => {
|
|
369
|
+
// added to avoid ide errors
|
|
370
|
+
}), tap(([newfiles, registeredFiles]) => {
|
|
371
|
+
newfiles.forEach(file => {
|
|
372
|
+
if (registeredFiles.findIndex(rfile => rfile.id === file.id) < 0) {
|
|
373
|
+
this.pushFile({
|
|
374
|
+
...file,
|
|
375
|
+
color: 'success',
|
|
376
|
+
progress: 100,
|
|
377
|
+
ref: Symbol('H.psi = E.psi'),
|
|
378
|
+
name: file.name,
|
|
379
|
+
lastModified: file.lastModified,
|
|
380
|
+
size: file.size,
|
|
381
|
+
type: file.type,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
}), catchError(() => of([])));
|
|
386
|
+
}));
|
|
387
|
+
});
|
|
388
|
+
this.deleteFile = this.effect((file$) => {
|
|
389
|
+
return file$.pipe(tap(() => {
|
|
390
|
+
this.clearFileUploadError();
|
|
391
|
+
}), withLatestFrom(this.files$), map(this.fn), mergeMap((file) => this.fileUploadService.deleteFile(file.id).pipe(
|
|
392
|
+
//take(1),
|
|
393
|
+
tap(() => {
|
|
394
|
+
this.remove(file);
|
|
395
|
+
}), catchError(() => {
|
|
396
|
+
this.setFail({
|
|
397
|
+
ref: file.ref,
|
|
398
|
+
color: OnemrvaMatColor.WARN,
|
|
399
|
+
message: 'file.upload.delete.error',
|
|
400
|
+
});
|
|
401
|
+
return of(null);
|
|
402
|
+
}))));
|
|
403
|
+
});
|
|
404
|
+
this.removeFile = this.effect((file$) => {
|
|
405
|
+
return file$.pipe(tap(() => {
|
|
406
|
+
this.clearFileUploadError();
|
|
407
|
+
}), withLatestFrom(this.files$), map(this.fn), tap(file => {
|
|
408
|
+
this.remove(file);
|
|
409
|
+
}));
|
|
410
|
+
});
|
|
411
|
+
this.progressFileChecker = (file$) => {
|
|
412
|
+
return file$.pipe(withLatestFrom(this.accept$), map(([file, accept]) => {
|
|
413
|
+
// Step 1 - Add a new file in the view
|
|
414
|
+
let f = { ...file };
|
|
415
|
+
if (file.ref === undefined) {
|
|
416
|
+
f = {
|
|
417
|
+
...f,
|
|
418
|
+
ref: Symbol('v_sound = sqrt(gamma.P / rho)'),
|
|
419
|
+
name: file.name,
|
|
420
|
+
lastModified: file.lastModified,
|
|
421
|
+
size: file.size,
|
|
422
|
+
type: file.type,
|
|
423
|
+
};
|
|
424
|
+
this.pushFile(f);
|
|
425
|
+
}
|
|
426
|
+
// Step 2 - Check file extension
|
|
427
|
+
if (accept.length > 0 && !accept.includes(file.file.type)) {
|
|
428
|
+
this.setFail({
|
|
429
|
+
ref: f.ref,
|
|
430
|
+
color: OnemrvaMatColor.ERROR,
|
|
431
|
+
message: 'file.upload.type.not.supported',
|
|
432
|
+
});
|
|
433
|
+
// This trick coupled with the next filter is used to avoid catchError, which would break the effect
|
|
434
|
+
return { ...f, message: 'ERROR' };
|
|
435
|
+
}
|
|
436
|
+
return f;
|
|
437
|
+
}), filter(x => x.message !== 'ERROR'), withLatestFrom(this.maxFileSize$), map(([refFile, maxFileSize]) => {
|
|
438
|
+
// Step 3 - Check file size
|
|
439
|
+
if (maxFileSize !== 0 && refFile.size > maxFileSize) {
|
|
440
|
+
this.setFail({
|
|
441
|
+
ref: refFile.ref,
|
|
442
|
+
color: OnemrvaMatColor.ERROR,
|
|
443
|
+
message: 'file.upload.too.big',
|
|
444
|
+
});
|
|
445
|
+
// Same trick for error management
|
|
446
|
+
return { ...refFile, message: 'ERROR' };
|
|
447
|
+
}
|
|
448
|
+
return refFile;
|
|
449
|
+
}), filter(x => x.message !== 'ERROR'), withLatestFrom(this.files$), map(this.fn), // For custom validations
|
|
450
|
+
tap(x => {
|
|
451
|
+
if (!!x.message && x.message.startsWith('ERROR:'))
|
|
452
|
+
this.setFileUploadError(x.message.replace('ERROR:', '').trim());
|
|
453
|
+
else
|
|
454
|
+
this.clearFileUploadError();
|
|
455
|
+
}), filter(x => !x.message.startsWith('ERROR')));
|
|
456
|
+
};
|
|
457
|
+
this.loadStep = (file) => {
|
|
458
|
+
if (file.color === OnemrvaMatColor.WARN)
|
|
459
|
+
this.reset(file.ref);
|
|
460
|
+
this.enableProgressBar();
|
|
461
|
+
return this.fileUploadService.upload(file).pipe(throttle(() => interval(200), { leading: true, trailing: true }), tap((event) => {
|
|
462
|
+
if (event.type === HttpEventType.UploadProgress) {
|
|
463
|
+
this.setProgress({
|
|
464
|
+
ref: file.ref,
|
|
465
|
+
progress: Math.round((100 * event.loaded) / event.total),
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
if (event.type === HttpEventType.Response) {
|
|
469
|
+
this.setSuccess({ ref: file.ref, body: event.body });
|
|
470
|
+
}
|
|
471
|
+
}), takeWhile((event) => event.type === HttpEventType.UploadProgress), catchError(() => {
|
|
472
|
+
this.setFail({
|
|
473
|
+
ref: file.ref,
|
|
474
|
+
color: OnemrvaMatColor.WARN,
|
|
475
|
+
message: 'file.upload.error.occurred',
|
|
476
|
+
});
|
|
477
|
+
return of(null);
|
|
478
|
+
}));
|
|
479
|
+
};
|
|
480
|
+
/**
|
|
481
|
+
* For adding one file panel (creation of file panel reference skipped if already created) at a time.
|
|
482
|
+
* Upload to BE not triggered
|
|
483
|
+
*/
|
|
484
|
+
this.addForPotentialUpload = this.effect((file$) => this.progressFileChecker(file$));
|
|
485
|
+
/**
|
|
486
|
+
* For adding an array of file panels (creation of file panels reference skipped if already created).
|
|
487
|
+
* Uploads to BE not triggered
|
|
488
|
+
*/
|
|
489
|
+
this.addSeveralForPotentialUpload = this.effect((files$) => files$.pipe(switchMap(files => forkJoin(files.map(file => this.progressFileChecker(of(file)))))));
|
|
490
|
+
/**
|
|
491
|
+
* For adding a file panel (creation of file panels reference skipped if already created) then uploading it
|
|
492
|
+
*/
|
|
493
|
+
this.uploadFile = this.effect((file$) => {
|
|
494
|
+
return this.progressFileChecker(file$).pipe(mergeMap(this.loadStep));
|
|
495
|
+
});
|
|
496
|
+
this.retryFile = this.effect((file$) => this.progressFileChecker(file$).pipe(mergeMap(this.loadStep)));
|
|
497
|
+
/**
|
|
498
|
+
* For adding several file panels (creation of file panels reference skipped if already created) then uploading them
|
|
499
|
+
*/
|
|
500
|
+
this.uploadFiles = this.effect((files$) => files$.pipe(switchMap(files => merge(...files.map(file => this.progressFileChecker(of(file)).pipe(switchMap(this.loadStep)))))));
|
|
501
|
+
if (this.customValidationFn)
|
|
502
|
+
this.fn = this.customValidationFn;
|
|
503
|
+
}
|
|
504
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
505
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadStore }); }
|
|
506
|
+
}
|
|
507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadStore, decorators: [{
|
|
508
|
+
type: Injectable
|
|
509
|
+
}], ctorParameters: () => [] });
|
|
510
|
+
|
|
511
|
+
class DndDirective {
|
|
512
|
+
constructor() {
|
|
513
|
+
this.fileOver = false;
|
|
514
|
+
this.fileDropped = new EventEmitter();
|
|
515
|
+
}
|
|
516
|
+
// Dragover listener
|
|
517
|
+
onDragOver(evt) {
|
|
518
|
+
evt.preventDefault();
|
|
519
|
+
evt.stopPropagation();
|
|
520
|
+
this.fileOver = true;
|
|
521
|
+
}
|
|
522
|
+
// Dragleave listener
|
|
523
|
+
onDragLeave(evt) {
|
|
524
|
+
evt.preventDefault();
|
|
525
|
+
evt.stopPropagation();
|
|
526
|
+
this.fileOver = false;
|
|
527
|
+
}
|
|
528
|
+
// Drop listener
|
|
529
|
+
ondrop(evt) {
|
|
530
|
+
evt.preventDefault();
|
|
531
|
+
evt.stopPropagation();
|
|
532
|
+
this.fileOver = false;
|
|
533
|
+
const files = evt.dataTransfer.files;
|
|
534
|
+
if (files.length > 0) {
|
|
535
|
+
this.fileDropped.emit(files);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DndDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
539
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: DndDirective, isStandalone: true, selector: "[appDnd]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.fileover": "this.fileOver" } }, ngImport: i0 }); }
|
|
540
|
+
}
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DndDirective, decorators: [{
|
|
542
|
+
type: Directive,
|
|
543
|
+
args: [{
|
|
544
|
+
selector: '[appDnd]',
|
|
545
|
+
standalone: true,
|
|
546
|
+
}]
|
|
547
|
+
}], propDecorators: { fileOver: [{
|
|
548
|
+
type: HostBinding,
|
|
549
|
+
args: ['class.fileover']
|
|
550
|
+
}], fileDropped: [{
|
|
551
|
+
type: Output
|
|
552
|
+
}], onDragOver: [{
|
|
553
|
+
type: HostListener,
|
|
554
|
+
args: ['dragover', ['$event']]
|
|
555
|
+
}], onDragLeave: [{
|
|
556
|
+
type: HostListener,
|
|
557
|
+
args: ['dragleave', ['$event']]
|
|
558
|
+
}], ondrop: [{
|
|
559
|
+
type: HostListener,
|
|
560
|
+
args: ['drop', ['$event']]
|
|
561
|
+
}] } });
|
|
562
|
+
|
|
563
|
+
let NEXT_ID = 0;
|
|
564
|
+
class OnemrvaMatFileUploadComponent {
|
|
565
|
+
constructor() {
|
|
566
|
+
this.accept = [];
|
|
567
|
+
this.maxFileSize = 0;
|
|
568
|
+
this.numberOfFiles = 0;
|
|
569
|
+
this.maxTotalFileSize = 0;
|
|
570
|
+
this.uploadOnDrop = true;
|
|
571
|
+
this.initialFiles = [];
|
|
572
|
+
this.errorMessage = '';
|
|
573
|
+
this.hideExtensions = [];
|
|
574
|
+
this.dropFilesHereTextTranslationKey = 'file.upload.drag.and.drop';
|
|
575
|
+
this.retryFile = new EventEmitter();
|
|
576
|
+
/**
|
|
577
|
+
* Sets the `data-cy` of the element. If not set, the first component instance will have `data-cy` = `"onemrva-mat-multi-select-0"`.
|
|
578
|
+
*
|
|
579
|
+
* @example
|
|
580
|
+
* ```html
|
|
581
|
+
* <onemrva-mat-multi-select id="my-first-multi-select"></onemrva-mat-multi-select>
|
|
582
|
+
* ```
|
|
583
|
+
*/
|
|
584
|
+
this.dataCy = `onemrva-mat-multi-select-${NEXT_ID++}`;
|
|
585
|
+
this.inputId = `fileDropRef-${NEXT_ID}`;
|
|
586
|
+
this.maxFileSizeFormatted = '';
|
|
587
|
+
this.error$ = new Subject();
|
|
588
|
+
this.dialog = inject(MatDialog);
|
|
589
|
+
this.mimeCDN = inject(OnemRvaCDNMimeService);
|
|
590
|
+
this.fileUploadStore = inject(OnemrvaMatFileUploadStore);
|
|
591
|
+
this.formattedSize = formattedSize;
|
|
592
|
+
this.files$ = this.fileUploadStore.files$;
|
|
593
|
+
this.fileUploadErrorMessage$ = merge(this.fileUploadStore.fileUploadError$, this.error$);
|
|
594
|
+
}
|
|
595
|
+
ngOnInit() {
|
|
596
|
+
if (this.accept.length > 0) {
|
|
597
|
+
this.acceptString$ = this.mimeCDN.getExtensionsForMime(this.accept).pipe(map(items => items.filter(item => !this.hideExtensions.includes(item))), map(arr => arr.map(item => `.${item}`).join(', ')));
|
|
598
|
+
this.fileUploadStore.setAccept(this.accept);
|
|
599
|
+
}
|
|
600
|
+
this.maxFileSizeFormatted = formatBytes(this.maxFileSize);
|
|
601
|
+
this.fileUploadStore.setMaxFileSize(this.maxFileSize);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* on file drop handler
|
|
605
|
+
*/
|
|
606
|
+
onFileDropped($event) {
|
|
607
|
+
this.prepareFilesList($event);
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* handle file from browsing
|
|
611
|
+
*/
|
|
612
|
+
fileBrowseHandler($event) {
|
|
613
|
+
const elm = $event.target, files = elm.files;
|
|
614
|
+
this.prepareFilesList(files);
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Convert Files list to normal array list
|
|
618
|
+
* @param files (Files List)
|
|
619
|
+
*/
|
|
620
|
+
prepareFilesList(files) {
|
|
621
|
+
this.fileUploadStore.files$.pipe(take(1)).subscribe(currentFiles => {
|
|
622
|
+
// if numberOffiles is set and the total length of files is smal
|
|
623
|
+
// ler than it
|
|
624
|
+
if (this.numberOfFiles > 0 &&
|
|
625
|
+
files.length + currentFiles.length > this.numberOfFiles) {
|
|
626
|
+
this.error$.next('file.upload.too.many.files');
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
629
|
+
if (this.maxTotalFileSize > 0) {
|
|
630
|
+
const total = Object.values(files).reduce((sum, obj) => sum + obj.size, 0) +
|
|
631
|
+
currentFiles.reduce((sum, obj) => sum + obj.size, 0);
|
|
632
|
+
if (total > this.maxTotalFileSize) {
|
|
633
|
+
this.error$.next('file.upload.total.max.size.exceeded');
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
this.error$.next('');
|
|
638
|
+
const fs = [];
|
|
639
|
+
for (let i = 0; i < files.length; i++) {
|
|
640
|
+
const file = files.item(i);
|
|
641
|
+
if (file === null)
|
|
642
|
+
continue;
|
|
643
|
+
const item = {
|
|
644
|
+
file,
|
|
645
|
+
progress: 0,
|
|
646
|
+
message: '',
|
|
647
|
+
color: 'primary',
|
|
648
|
+
url: null,
|
|
649
|
+
id: null,
|
|
650
|
+
enableProgressBar: this.uploadOnDrop,
|
|
651
|
+
name: file.name,
|
|
652
|
+
lastModified: file.lastModified,
|
|
653
|
+
size: file.size,
|
|
654
|
+
type: file.type,
|
|
655
|
+
maxSize: this.maxFileSize,
|
|
656
|
+
};
|
|
657
|
+
fs.push(item);
|
|
658
|
+
}
|
|
659
|
+
if (this.uploadOnDrop)
|
|
660
|
+
this.fileUploadStore.uploadFiles(fs);
|
|
661
|
+
else
|
|
662
|
+
this.fileUploadStore.addSeveralForPotentialUpload(fs);
|
|
663
|
+
this.fileDropRef.nativeElement.value = null;
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
667
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatFileUploadComponent, isStandalone: true, selector: "onemrva-mat-file-upload", inputs: { accept: "accept", maxFileSize: "maxFileSize", numberOfFiles: "numberOfFiles", maxTotalFileSize: "maxTotalFileSize", uploadOnDrop: "uploadOnDrop", initialFiles: "initialFiles", errorMessage: "errorMessage", hideExtensions: "hideExtensions", dropFilesHereTextTranslationKey: "dropFilesHereTextTranslationKey", filePanelTemplate: "filePanelTemplate", dataCy: "dataCy" }, host: { properties: { "attr.data-cy": "this.dataCy" } }, viewQueries: [{ propertyName: "fileDropRef", first: true, predicate: ["fileDropRef"], descendants: true }], ngImport: i0, template: "@if (files$ | async; as files) {\n <div\n class=\"onemrva-mat-file-upload-drop-area\"\n appDnd\n (fileDropped)=\"onFileDropped($event)\"\n [ngClass]=\"{\n filein: files.length > 0,\n }\"\n >\n <input\n type=\"file\"\n #fileDropRef\n [attr.id]=\"inputId\"\n role=\"button\"\n multiple\n (change)=\"fileBrowseHandler($event)\"\n accept=\"{{ acceptString$ | async }}\"\n />\n @if (numberOfFiles === 0 || numberOfFiles > files.length) {\n <div class=\"download-outer\">\n <div class=\"download-icon\">\n <mat-icon class=\"onemrva-upload xxlarge\">download</mat-icon>\n </div>\n\n <div class=\"download-text\">\n {{ dropFilesHereTextTranslationKey | translate }}\n {{ 'file.upload.or' | translate }}\n <label for=\"{{ inputId }}\" class=\"content\">\n {{ 'file.upload.browse.for.file' | translate }} </label\n ><br />\n @if (maxFileSize > 0) {\n <span class=\"restrictions\">\n {{ 'file.upload.maximum' | translate }}\n {{ maxFileSizeFormatted }}\n\n @if (accept.length > 0) {\n <span>{{ '| ' }}</span>\n }\n\n {{ acceptString$ | async }}\n </span>\n }\n </div>\n </div>\n }\n <ul class=\"files-list\">\n @for (file of files; track file.id) {\n <li>\n <ng-container\n *ngTemplateOutlet=\"\n filePanelTemplate;\n context: { file, $implicit: file }\n \"\n ></ng-container>\n </li>\n }\n </ul>\n </div>\n @if (fileUploadErrorMessage$ | async; as fileUploadErrorMessage) {\n <mat-error>\n {{\n fileUploadErrorMessage\n | translate\n : {\n limit: numberOfFiles,\n maxTotalFileSize: formattedSize(maxTotalFileSize),\n }\n }}\n @if (errorMessage !== '') {\n [ {{ errorMessage }} ]\n }\n </mat-error>\n }\n}\n", styles: [":host .mat-mdc-form-field-error{margin-bottom:var(--spacer);padding:var(--spacer) 1em;background-color:var(--mat-sys-error-container);color:var(--mat-sys-on-error-container);border-bottom:1px solid var(--mat-sys-error);display:flex;line-height:1.125rem}:host .mat-mdc-form-field-error:before{font-family:var(--icon-font);content:\"\\e000\";float:left;font-size:1rem;font-variation-settings:\"FILL\" 1;margin-right:var(--spacer);vertical-align:baseline;flex:0 0 var(--double-spacer)}:host ul{list-style:none;margin-block-start:0;margin-block-end:0;margin-inline-start:0;margin-inline-end:0;padding-inline-start:0}:host ul li{width:100%}:host .onemrva-mat-file-upload-drop-area{padding:var(--triple-spacer);text-align:left;border:dashed 2px var(--mat-sys-outline);position:relative;border-radius:var(--border-radius);transition:background-color .3s ease-in-out,border .3s ease-in-out}:host .onemrva-mat-file-upload-drop-area mat-icon{color:var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area.fu-error{border:dashed 2px var(--mat-sys-error)}:host .onemrva-mat-file-upload-drop-area input[type=file]{display:none}:host .onemrva-mat-file-upload-drop-area .download-outer{display:flex;width:100%;margin:0}:host .onemrva-mat-file-upload-drop-area .download-outer .download-icon{padding-right:var(--double-spacer)}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text label{display:block;color:var(--mat-sys-primary);text-decoration:underline;cursor:pointer;font-weight:700}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text .restrictions{display:block;color:var(--mat-sys-outline);margin-bottom:0}:host .onemrva-mat-file-upload-drop-area.filein .download-outer{margin:0 0 var(--triple-spacer) 0}:host .onemrva-mat-file-upload-drop-area.fileover{background:var(--mat-sys-primary-container);border:2px dashed var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area .files-list{display:flex;flex-flow:row wrap;gap:var(--double-spacer)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: DndDirective, selector: "[appDnd]", outputs: ["fileDropped"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
|
|
668
|
+
trigger('inOutAnimation', [
|
|
669
|
+
state('in', style({ opacity: 1 })),
|
|
670
|
+
transition(':enter', [
|
|
671
|
+
animate(300, keyframes([
|
|
672
|
+
style({ opacity: 0, offset: 0 }),
|
|
673
|
+
style({ opacity: 0.25, offset: 0.25 }),
|
|
674
|
+
style({ opacity: 0.5, offset: 0.5 }),
|
|
675
|
+
style({ opacity: 0.75, offset: 0.75 }),
|
|
676
|
+
style({ opacity: 1, offset: 1 }),
|
|
677
|
+
])),
|
|
678
|
+
]),
|
|
679
|
+
transition(':leave', [
|
|
680
|
+
animate(300, keyframes([
|
|
681
|
+
style({ opacity: 1, offset: 0 }),
|
|
682
|
+
style({ opacity: 0.75, offset: 0.25 }),
|
|
683
|
+
style({ opacity: 0.5, offset: 0.5 }),
|
|
684
|
+
style({ opacity: 0.25, offset: 0.75 }),
|
|
685
|
+
style({ opacity: 0, offset: 1 }),
|
|
686
|
+
])),
|
|
687
|
+
]),
|
|
688
|
+
]),
|
|
689
|
+
] }); }
|
|
690
|
+
}
|
|
691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadComponent, decorators: [{
|
|
692
|
+
type: Component,
|
|
693
|
+
args: [{ selector: 'onemrva-mat-file-upload', standalone: true, animations: [
|
|
694
|
+
trigger('inOutAnimation', [
|
|
695
|
+
state('in', style({ opacity: 1 })),
|
|
696
|
+
transition(':enter', [
|
|
697
|
+
animate(300, keyframes([
|
|
698
|
+
style({ opacity: 0, offset: 0 }),
|
|
699
|
+
style({ opacity: 0.25, offset: 0.25 }),
|
|
700
|
+
style({ opacity: 0.5, offset: 0.5 }),
|
|
701
|
+
style({ opacity: 0.75, offset: 0.75 }),
|
|
702
|
+
style({ opacity: 1, offset: 1 }),
|
|
703
|
+
])),
|
|
704
|
+
]),
|
|
705
|
+
transition(':leave', [
|
|
706
|
+
animate(300, keyframes([
|
|
707
|
+
style({ opacity: 1, offset: 0 }),
|
|
708
|
+
style({ opacity: 0.75, offset: 0.25 }),
|
|
709
|
+
style({ opacity: 0.5, offset: 0.5 }),
|
|
710
|
+
style({ opacity: 0.25, offset: 0.75 }),
|
|
711
|
+
style({ opacity: 0, offset: 1 }),
|
|
712
|
+
])),
|
|
713
|
+
]),
|
|
714
|
+
]),
|
|
715
|
+
], imports: [
|
|
716
|
+
NgClass,
|
|
717
|
+
AsyncPipe,
|
|
718
|
+
MatIcon,
|
|
719
|
+
TranslatePipe,
|
|
720
|
+
NgTemplateOutlet,
|
|
721
|
+
MatError,
|
|
722
|
+
DndDirective,
|
|
723
|
+
], template: "@if (files$ | async; as files) {\n <div\n class=\"onemrva-mat-file-upload-drop-area\"\n appDnd\n (fileDropped)=\"onFileDropped($event)\"\n [ngClass]=\"{\n filein: files.length > 0,\n }\"\n >\n <input\n type=\"file\"\n #fileDropRef\n [attr.id]=\"inputId\"\n role=\"button\"\n multiple\n (change)=\"fileBrowseHandler($event)\"\n accept=\"{{ acceptString$ | async }}\"\n />\n @if (numberOfFiles === 0 || numberOfFiles > files.length) {\n <div class=\"download-outer\">\n <div class=\"download-icon\">\n <mat-icon class=\"onemrva-upload xxlarge\">download</mat-icon>\n </div>\n\n <div class=\"download-text\">\n {{ dropFilesHereTextTranslationKey | translate }}\n {{ 'file.upload.or' | translate }}\n <label for=\"{{ inputId }}\" class=\"content\">\n {{ 'file.upload.browse.for.file' | translate }} </label\n ><br />\n @if (maxFileSize > 0) {\n <span class=\"restrictions\">\n {{ 'file.upload.maximum' | translate }}\n {{ maxFileSizeFormatted }}\n\n @if (accept.length > 0) {\n <span>{{ '| ' }}</span>\n }\n\n {{ acceptString$ | async }}\n </span>\n }\n </div>\n </div>\n }\n <ul class=\"files-list\">\n @for (file of files; track file.id) {\n <li>\n <ng-container\n *ngTemplateOutlet=\"\n filePanelTemplate;\n context: { file, $implicit: file }\n \"\n ></ng-container>\n </li>\n }\n </ul>\n </div>\n @if (fileUploadErrorMessage$ | async; as fileUploadErrorMessage) {\n <mat-error>\n {{\n fileUploadErrorMessage\n | translate\n : {\n limit: numberOfFiles,\n maxTotalFileSize: formattedSize(maxTotalFileSize),\n }\n }}\n @if (errorMessage !== '') {\n [ {{ errorMessage }} ]\n }\n </mat-error>\n }\n}\n", styles: [":host .mat-mdc-form-field-error{margin-bottom:var(--spacer);padding:var(--spacer) 1em;background-color:var(--mat-sys-error-container);color:var(--mat-sys-on-error-container);border-bottom:1px solid var(--mat-sys-error);display:flex;line-height:1.125rem}:host .mat-mdc-form-field-error:before{font-family:var(--icon-font);content:\"\\e000\";float:left;font-size:1rem;font-variation-settings:\"FILL\" 1;margin-right:var(--spacer);vertical-align:baseline;flex:0 0 var(--double-spacer)}:host ul{list-style:none;margin-block-start:0;margin-block-end:0;margin-inline-start:0;margin-inline-end:0;padding-inline-start:0}:host ul li{width:100%}:host .onemrva-mat-file-upload-drop-area{padding:var(--triple-spacer);text-align:left;border:dashed 2px var(--mat-sys-outline);position:relative;border-radius:var(--border-radius);transition:background-color .3s ease-in-out,border .3s ease-in-out}:host .onemrva-mat-file-upload-drop-area mat-icon{color:var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area.fu-error{border:dashed 2px var(--mat-sys-error)}:host .onemrva-mat-file-upload-drop-area input[type=file]{display:none}:host .onemrva-mat-file-upload-drop-area .download-outer{display:flex;width:100%;margin:0}:host .onemrva-mat-file-upload-drop-area .download-outer .download-icon{padding-right:var(--double-spacer)}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text label{display:block;color:var(--mat-sys-primary);text-decoration:underline;cursor:pointer;font-weight:700}:host .onemrva-mat-file-upload-drop-area .download-outer .download-text .restrictions{display:block;color:var(--mat-sys-outline);margin-bottom:0}:host .onemrva-mat-file-upload-drop-area.filein .download-outer{margin:0 0 var(--triple-spacer) 0}:host .onemrva-mat-file-upload-drop-area.fileover{background:var(--mat-sys-primary-container);border:2px dashed var(--mat-sys-primary)}:host .onemrva-mat-file-upload-drop-area .files-list{display:flex;flex-flow:row wrap;gap:var(--double-spacer)}\n"] }]
|
|
724
|
+
}], ctorParameters: () => [], propDecorators: { accept: [{
|
|
725
|
+
type: Input
|
|
726
|
+
}], maxFileSize: [{
|
|
727
|
+
type: Input
|
|
728
|
+
}], numberOfFiles: [{
|
|
729
|
+
type: Input
|
|
730
|
+
}], maxTotalFileSize: [{
|
|
731
|
+
type: Input
|
|
732
|
+
}], uploadOnDrop: [{
|
|
733
|
+
type: Input
|
|
734
|
+
}], initialFiles: [{
|
|
735
|
+
type: Input
|
|
736
|
+
}], errorMessage: [{
|
|
737
|
+
type: Input
|
|
738
|
+
}], hideExtensions: [{
|
|
739
|
+
type: Input
|
|
740
|
+
}], dropFilesHereTextTranslationKey: [{
|
|
741
|
+
type: Input
|
|
742
|
+
}], filePanelTemplate: [{
|
|
743
|
+
type: Input
|
|
744
|
+
}], dataCy: [{
|
|
745
|
+
type: HostBinding,
|
|
746
|
+
args: ['attr.data-cy']
|
|
747
|
+
}, {
|
|
748
|
+
type: Input
|
|
749
|
+
}], fileDropRef: [{
|
|
750
|
+
type: ViewChild,
|
|
751
|
+
args: [`fileDropRef`]
|
|
752
|
+
}] } });
|
|
753
|
+
|
|
754
|
+
const components = [
|
|
755
|
+
OnemrvaFilePanelComponent,
|
|
756
|
+
OnemrvaMatFileUploadComponent,
|
|
757
|
+
];
|
|
758
|
+
|
|
759
|
+
class OnemrvaMatFileUploadModule {
|
|
760
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
761
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadModule, imports: [OnemrvaFilePanelComponent, OnemrvaMatFileUploadComponent, DndDirective,
|
|
762
|
+
CommonModule,
|
|
763
|
+
ReactiveFormsModule,
|
|
764
|
+
MatButtonModule,
|
|
765
|
+
MatTooltipModule,
|
|
766
|
+
MatDialogModule,
|
|
767
|
+
TranslateModule,
|
|
768
|
+
MatIconModule,
|
|
769
|
+
MatInputModule], exports: [OnemrvaFilePanelComponent, OnemrvaMatFileUploadComponent, DndDirective] }); }
|
|
770
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadModule, providers: [OnemrvaMatFileUploadStore, OnemrvaMatFileUploadService], imports: [components,
|
|
771
|
+
CommonModule,
|
|
772
|
+
ReactiveFormsModule,
|
|
773
|
+
MatButtonModule,
|
|
774
|
+
MatTooltipModule,
|
|
775
|
+
MatDialogModule,
|
|
776
|
+
TranslateModule,
|
|
777
|
+
MatIconModule,
|
|
778
|
+
MatInputModule] }); }
|
|
779
|
+
}
|
|
780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatFileUploadModule, decorators: [{
|
|
781
|
+
type: NgModule,
|
|
782
|
+
args: [{
|
|
783
|
+
declarations: [],
|
|
784
|
+
imports: [
|
|
785
|
+
components,
|
|
786
|
+
DndDirective,
|
|
787
|
+
CommonModule,
|
|
788
|
+
ReactiveFormsModule,
|
|
789
|
+
MatButtonModule,
|
|
790
|
+
MatTooltipModule,
|
|
791
|
+
MatDialogModule,
|
|
792
|
+
TranslateModule,
|
|
793
|
+
MatIconModule,
|
|
794
|
+
MatInputModule,
|
|
795
|
+
],
|
|
796
|
+
exports: [components, DndDirective],
|
|
797
|
+
providers: [OnemrvaMatFileUploadStore, OnemrvaMatFileUploadService],
|
|
798
|
+
}]
|
|
799
|
+
}] });
|
|
800
|
+
|
|
801
|
+
/*
|
|
802
|
+
* Public API Surface of mat-file upload
|
|
803
|
+
*/
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Generated bundle index. Do not edit.
|
|
807
|
+
*/
|
|
808
|
+
|
|
809
|
+
export { CUSTOM_VALIDATION_FN, DndDirective, OnemrvaFilePanelComponent, OnemrvaMatFileUploadComponent, OnemrvaMatFileUploadModule, OnemrvaMatFileUploadService, OnemrvaMatFileUploadStore, components, convertToProgressFile, convertToReferencedProgressFile, formatBytes, formattedSize };
|
|
810
|
+
//# sourceMappingURL=onemrvapublic-design-system-mat-file-upload.mjs.map
|