@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
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HttpEvent,
|
|
3
|
-
HttpEventType,
|
|
4
|
-
HttpProgressEvent,
|
|
5
|
-
HttpResponse,
|
|
6
|
-
} from '@angular/common/http';
|
|
7
|
-
import { Injectable } from '@angular/core';
|
|
8
|
-
import { catchError, interval, map, Observable, of, take } from 'rxjs';
|
|
9
|
-
import { ProgressFile } from './models/progress-file.model';
|
|
10
|
-
|
|
11
|
-
export interface OnemrvaMatFileUploadInterface {
|
|
12
|
-
listUploadedFiles: (inputs: any) => Observable<ProgressFile[]>;
|
|
13
|
-
upload: (file: ProgressFile) => Observable<HttpEvent<any>>;
|
|
14
|
-
deleteFile: (id: any) => Observable<any>;
|
|
15
|
-
retry: (file: any) => Observable<any>;
|
|
16
|
-
downloadFile?: (id: any) => Observable<any>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Injectable({
|
|
20
|
-
providedIn: 'root',
|
|
21
|
-
})
|
|
22
|
-
export class OnemrvaMatFileUploadService
|
|
23
|
-
implements OnemrvaMatFileUploadInterface
|
|
24
|
-
{
|
|
25
|
-
constructor() {
|
|
26
|
-
alert(
|
|
27
|
-
"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",
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
listUploadedFiles(_inputs: any): Observable<ProgressFile[]> {
|
|
32
|
-
return of([]);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
upload(_file: ProgressFile): Observable<HttpEvent<any>> {
|
|
36
|
-
return interval(50).pipe(
|
|
37
|
-
take(101),
|
|
38
|
-
map(i => {
|
|
39
|
-
if (i < 100) {
|
|
40
|
-
return {
|
|
41
|
-
type: HttpEventType.UploadProgress,
|
|
42
|
-
loaded: i,
|
|
43
|
-
total: 100,
|
|
44
|
-
} as HttpProgressEvent;
|
|
45
|
-
} else {
|
|
46
|
-
if (i >= 100 && Math.random() > 0.5) {
|
|
47
|
-
throw 'Fake error thrown';
|
|
48
|
-
}
|
|
49
|
-
return new HttpResponse<any>();
|
|
50
|
-
}
|
|
51
|
-
}),
|
|
52
|
-
catchError(() => of(new HttpResponse<any>({ body: {}, status: 500 }))),
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
deleteFile(_id: any): Observable<any> {
|
|
57
|
-
return of('F = m.a');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
retry(file: any): Observable<any> {
|
|
61
|
-
return of(file);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
downloadFile(id: any): Observable<any> {
|
|
65
|
-
alert(`Missing download implementation for file ID ${id}`);
|
|
66
|
-
return of(true);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';
|
|
2
|
-
import { ComponentStore } from '@ngrx/component-store';
|
|
3
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import {
|
|
5
|
-
catchError,
|
|
6
|
-
filter,
|
|
7
|
-
forkJoin,
|
|
8
|
-
interval,
|
|
9
|
-
map,
|
|
10
|
-
merge,
|
|
11
|
-
mergeMap,
|
|
12
|
-
Observable,
|
|
13
|
-
of,
|
|
14
|
-
switchMap,
|
|
15
|
-
take,
|
|
16
|
-
takeWhile,
|
|
17
|
-
tap,
|
|
18
|
-
throttle,
|
|
19
|
-
withLatestFrom,
|
|
20
|
-
} from 'rxjs';
|
|
21
|
-
import { OnemrvaMatFileUploadService } from './onemrva-mat-file-upload.service';
|
|
22
|
-
import {
|
|
23
|
-
formattedSize,
|
|
24
|
-
ProgressFile,
|
|
25
|
-
ReferencedProgressFile,
|
|
26
|
-
} from './models/progress-file.model';
|
|
27
|
-
import { HttpEvent, HttpEventType } from '@angular/common/http';
|
|
28
|
-
import { OnemrvaMatFileUploadStoreItf } from './onemrva-mat-file-upload-itf.store';
|
|
29
|
-
import { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';
|
|
30
|
-
|
|
31
|
-
export interface FileUploadStoreEvent {
|
|
32
|
-
type: string;
|
|
33
|
-
payload?: any;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface UploadState {
|
|
37
|
-
upload: ReferencedProgressFile[];
|
|
38
|
-
accept: string[];
|
|
39
|
-
maxFileSize: number;
|
|
40
|
-
fileUploadError: string;
|
|
41
|
-
event: FileUploadStoreEvent;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const INIT_STATE: UploadState = {
|
|
45
|
-
upload: [],
|
|
46
|
-
accept: [],
|
|
47
|
-
maxFileSize: 0,
|
|
48
|
-
fileUploadError: '',
|
|
49
|
-
event: {
|
|
50
|
-
type: 'INIT',
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export type CustomValidationFn = (
|
|
55
|
-
input: [ReferencedProgressFile, ReferencedProgressFile[]],
|
|
56
|
-
) => ReferencedProgressFile;
|
|
57
|
-
|
|
58
|
-
export const CUSTOM_VALIDATION_FN = new InjectionToken<CustomValidationFn>(
|
|
59
|
-
'x1, x2 = (-b -+ sqrt(rho))/2a',
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
@Injectable()
|
|
63
|
-
export class OnemrvaMatFileUploadStore
|
|
64
|
-
extends ComponentStore<UploadState>
|
|
65
|
-
implements OnemrvaMatFileUploadStoreItf
|
|
66
|
-
{
|
|
67
|
-
private fn: CustomValidationFn = (
|
|
68
|
-
x: [ReferencedProgressFile, ReferencedProgressFile[]],
|
|
69
|
-
) => {
|
|
70
|
-
return x[0];
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
constructor(
|
|
74
|
-
private fileUploadService: OnemrvaMatFileUploadService,
|
|
75
|
-
private translateService: TranslateService,
|
|
76
|
-
@Optional()
|
|
77
|
-
@Inject(CUSTOM_VALIDATION_FN)
|
|
78
|
-
public customValidationFn: CustomValidationFn,
|
|
79
|
-
) {
|
|
80
|
-
super(INIT_STATE);
|
|
81
|
-
if (customValidationFn) this.fn = customValidationFn;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/*
|
|
85
|
-
* U P D A T E R S
|
|
86
|
-
*/
|
|
87
|
-
public readonly setAccept = this.updater((state, accept: string[]) => ({
|
|
88
|
-
...state,
|
|
89
|
-
accept,
|
|
90
|
-
event: {
|
|
91
|
-
type: 'setAccept',
|
|
92
|
-
payload: accept,
|
|
93
|
-
},
|
|
94
|
-
}));
|
|
95
|
-
|
|
96
|
-
public readonly setMaxFileSize = this.updater(
|
|
97
|
-
(state, maxFileSize: number) => ({
|
|
98
|
-
...state,
|
|
99
|
-
maxFileSize,
|
|
100
|
-
event: {
|
|
101
|
-
type: 'setMaxFileSize',
|
|
102
|
-
payload: maxFileSize,
|
|
103
|
-
},
|
|
104
|
-
}),
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
private readonly emptyList = this.updater(state => {
|
|
108
|
-
return {
|
|
109
|
-
...state,
|
|
110
|
-
upload: [],
|
|
111
|
-
event: {
|
|
112
|
-
type: 'emptyList',
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
private readonly pushFile = this.updater(
|
|
118
|
-
(state, payload: ReferencedProgressFile) => {
|
|
119
|
-
return {
|
|
120
|
-
...state,
|
|
121
|
-
upload: [...state.upload, { ...payload }],
|
|
122
|
-
event: {
|
|
123
|
-
type: 'pushFile',
|
|
124
|
-
payload,
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
},
|
|
128
|
-
);
|
|
129
|
-
|
|
130
|
-
public readonly setData = this.updater(
|
|
131
|
-
(state, payload: { ref: symbol; data: any }) => {
|
|
132
|
-
return {
|
|
133
|
-
...state,
|
|
134
|
-
upload: state.upload.map((file: ReferencedProgressFile) =>
|
|
135
|
-
file.ref === payload.ref ? { ...file, data: payload.data } : file,
|
|
136
|
-
),
|
|
137
|
-
event: {
|
|
138
|
-
type: 'setData',
|
|
139
|
-
payload,
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
);
|
|
144
|
-
|
|
145
|
-
private readonly setSuccess = this.updater(
|
|
146
|
-
(state, payload: { ref: symbol; body: any }) => {
|
|
147
|
-
const newFile = {
|
|
148
|
-
...state.upload.find(f => f.ref === payload.ref),
|
|
149
|
-
...payload.body,
|
|
150
|
-
color: 'success',
|
|
151
|
-
progress: 100,
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
return {
|
|
155
|
-
...state,
|
|
156
|
-
upload: state.upload.map(file =>
|
|
157
|
-
file.ref === payload.ref ? newFile : file,
|
|
158
|
-
),
|
|
159
|
-
event: {
|
|
160
|
-
type: 'setData',
|
|
161
|
-
payload: newFile,
|
|
162
|
-
},
|
|
163
|
-
};
|
|
164
|
-
},
|
|
165
|
-
);
|
|
166
|
-
|
|
167
|
-
private readonly setFail = this.updater(
|
|
168
|
-
(
|
|
169
|
-
state,
|
|
170
|
-
payload: { ref: symbol; message: string; color: OnemrvaMatColor },
|
|
171
|
-
) => ({
|
|
172
|
-
...state,
|
|
173
|
-
upload: state.upload.map(file =>
|
|
174
|
-
file.ref === payload.ref
|
|
175
|
-
? { ...file, message: payload.message, color: payload.color }
|
|
176
|
-
: file,
|
|
177
|
-
),
|
|
178
|
-
event: {
|
|
179
|
-
type: 'setFail',
|
|
180
|
-
payload,
|
|
181
|
-
},
|
|
182
|
-
}),
|
|
183
|
-
);
|
|
184
|
-
|
|
185
|
-
private readonly setProgress = this.updater(
|
|
186
|
-
(state, payload: { ref: symbol; progress: number }) => ({
|
|
187
|
-
...state,
|
|
188
|
-
upload: state.upload.map(file =>
|
|
189
|
-
file.ref === payload.ref
|
|
190
|
-
? { ...file, progress: payload.progress }
|
|
191
|
-
: file,
|
|
192
|
-
),
|
|
193
|
-
event: {
|
|
194
|
-
type: 'setProgress',
|
|
195
|
-
payload,
|
|
196
|
-
},
|
|
197
|
-
}),
|
|
198
|
-
);
|
|
199
|
-
|
|
200
|
-
private readonly reset = this.updater((state, ref: symbol) => ({
|
|
201
|
-
...state,
|
|
202
|
-
upload: state.upload.map(file =>
|
|
203
|
-
file.ref === ref
|
|
204
|
-
? { ...file, progress: 0, message: '', color: '' }
|
|
205
|
-
: file,
|
|
206
|
-
),
|
|
207
|
-
event: {
|
|
208
|
-
type: 'reset',
|
|
209
|
-
payload: ref,
|
|
210
|
-
},
|
|
211
|
-
}));
|
|
212
|
-
|
|
213
|
-
private readonly remove = this.updater(
|
|
214
|
-
(state, payload: ReferencedProgressFile) => ({
|
|
215
|
-
...state,
|
|
216
|
-
upload: state.upload.filter(f => f.ref !== payload.ref),
|
|
217
|
-
event: {
|
|
218
|
-
type: 'remove',
|
|
219
|
-
payload,
|
|
220
|
-
},
|
|
221
|
-
}),
|
|
222
|
-
);
|
|
223
|
-
|
|
224
|
-
private readonly enableProgressBar = this.updater(state => ({
|
|
225
|
-
...state,
|
|
226
|
-
upload: state.upload.map(file => ({ ...file, enableProgressBar: true })),
|
|
227
|
-
event: {
|
|
228
|
-
type: 'enableProgressBar',
|
|
229
|
-
},
|
|
230
|
-
}));
|
|
231
|
-
|
|
232
|
-
public readonly setFileUploadError = this.updater(
|
|
233
|
-
(state, fileUploadError: string) => ({
|
|
234
|
-
...state,
|
|
235
|
-
fileUploadError,
|
|
236
|
-
event: {
|
|
237
|
-
type: 'setFileUploadError',
|
|
238
|
-
payload: fileUploadError,
|
|
239
|
-
},
|
|
240
|
-
}),
|
|
241
|
-
);
|
|
242
|
-
|
|
243
|
-
public readonly clearFileUploadError = this.updater(state => ({
|
|
244
|
-
...state,
|
|
245
|
-
fileUploadError: '',
|
|
246
|
-
event: {
|
|
247
|
-
type: 'clearFileUploadError',
|
|
248
|
-
},
|
|
249
|
-
}));
|
|
250
|
-
|
|
251
|
-
/*
|
|
252
|
-
* S E L E C T O R S
|
|
253
|
-
*/
|
|
254
|
-
readonly files$ = this.select(state => state.upload);
|
|
255
|
-
readonly accept$ = this.select(state => state.accept);
|
|
256
|
-
readonly event$ = this.select(state => state.event);
|
|
257
|
-
readonly maxFileSize$ = this.select(state => state.maxFileSize);
|
|
258
|
-
readonly fileUploadError$ = this.select(state => state.fileUploadError);
|
|
259
|
-
|
|
260
|
-
/*
|
|
261
|
-
* A C T I O N S / E F F E C T S
|
|
262
|
-
*/
|
|
263
|
-
readonly listUploadedFiles = this.effect((inputs$: Observable<any>) => {
|
|
264
|
-
return inputs$.pipe(
|
|
265
|
-
tap(() => {
|
|
266
|
-
this.emptyList();
|
|
267
|
-
}),
|
|
268
|
-
mergeMap((inputs: any) => {
|
|
269
|
-
return this.fileUploadService.listUploadedFiles(inputs).pipe(
|
|
270
|
-
take(1),
|
|
271
|
-
withLatestFrom(this.files$),
|
|
272
|
-
tap(([newfiles, registeredFiles]) => {
|
|
273
|
-
newfiles.forEach(file => {
|
|
274
|
-
if (
|
|
275
|
-
registeredFiles.findIndex(rfile => rfile.id === file.id) < 0
|
|
276
|
-
) {
|
|
277
|
-
this.pushFile({
|
|
278
|
-
...file,
|
|
279
|
-
color: 'success',
|
|
280
|
-
progress: 100,
|
|
281
|
-
ref: Symbol('H.psi = E.psi'),
|
|
282
|
-
name: file!.name,
|
|
283
|
-
lastModified: file!.lastModified,
|
|
284
|
-
size: file!.size,
|
|
285
|
-
type: file!.type,
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
}),
|
|
290
|
-
catchError(() => of([])),
|
|
291
|
-
);
|
|
292
|
-
}),
|
|
293
|
-
);
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
readonly deleteFile = this.effect(
|
|
297
|
-
(file$: Observable<ReferencedProgressFile>) => {
|
|
298
|
-
return file$.pipe(
|
|
299
|
-
tap(() => {
|
|
300
|
-
this.clearFileUploadError();
|
|
301
|
-
}),
|
|
302
|
-
withLatestFrom(this.files$),
|
|
303
|
-
map(this.fn),
|
|
304
|
-
mergeMap((file: any) =>
|
|
305
|
-
this.fileUploadService.deleteFile(file.id).pipe(
|
|
306
|
-
take(1),
|
|
307
|
-
tap(() => {
|
|
308
|
-
this.remove(file);
|
|
309
|
-
}),
|
|
310
|
-
catchError(() => {
|
|
311
|
-
this.setFail({
|
|
312
|
-
ref: file.ref,
|
|
313
|
-
color: OnemrvaMatColor.WARN,
|
|
314
|
-
message: 'file.upload.delete.error',
|
|
315
|
-
});
|
|
316
|
-
return of(null);
|
|
317
|
-
}),
|
|
318
|
-
),
|
|
319
|
-
),
|
|
320
|
-
);
|
|
321
|
-
},
|
|
322
|
-
);
|
|
323
|
-
|
|
324
|
-
readonly removeFile = this.effect(
|
|
325
|
-
(file$: Observable<ReferencedProgressFile>) => {
|
|
326
|
-
return file$.pipe(
|
|
327
|
-
tap(() => {
|
|
328
|
-
this.clearFileUploadError();
|
|
329
|
-
}),
|
|
330
|
-
withLatestFrom(this.files$),
|
|
331
|
-
map(this.fn),
|
|
332
|
-
tap(file => {
|
|
333
|
-
this.remove(file);
|
|
334
|
-
}),
|
|
335
|
-
);
|
|
336
|
-
},
|
|
337
|
-
);
|
|
338
|
-
|
|
339
|
-
private progressFileChecker = (file$: Observable<any>) => {
|
|
340
|
-
return file$.pipe(
|
|
341
|
-
withLatestFrom(this.accept$),
|
|
342
|
-
map(([file, accept]) => {
|
|
343
|
-
// Step 1 - Add a new file in the view
|
|
344
|
-
let f: ReferencedProgressFile = { ...file };
|
|
345
|
-
if (file.ref === undefined) {
|
|
346
|
-
f = {
|
|
347
|
-
...f,
|
|
348
|
-
ref: Symbol('v_sound = sqrt(gamma.P / rho)'),
|
|
349
|
-
name: file!.name,
|
|
350
|
-
lastModified: file!.lastModified,
|
|
351
|
-
size: file!.size,
|
|
352
|
-
type: file!.type,
|
|
353
|
-
};
|
|
354
|
-
this.pushFile(f);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// Step 2 - Check file extension
|
|
358
|
-
if (!accept.includes(file.file!.type)) {
|
|
359
|
-
this.setFail({
|
|
360
|
-
ref: f.ref,
|
|
361
|
-
color: OnemrvaMatColor.ERROR,
|
|
362
|
-
message: this.translateService.instant(
|
|
363
|
-
'file.upload.type.not.supported',
|
|
364
|
-
),
|
|
365
|
-
});
|
|
366
|
-
// This trick coupled with the next filter is used to avoid catchError, which would break the effect
|
|
367
|
-
return { ...f, message: 'ERROR' };
|
|
368
|
-
}
|
|
369
|
-
return f;
|
|
370
|
-
}),
|
|
371
|
-
filter(x => x.message !== 'ERROR'),
|
|
372
|
-
withLatestFrom(this.maxFileSize$),
|
|
373
|
-
map(([refFile, maxFileSize]) => {
|
|
374
|
-
// Step 3 - Check file size
|
|
375
|
-
if (maxFileSize !== 0 && refFile.size > maxFileSize) {
|
|
376
|
-
this.setFail({
|
|
377
|
-
ref: refFile.ref,
|
|
378
|
-
color: OnemrvaMatColor.ERROR,
|
|
379
|
-
message:
|
|
380
|
-
this.translateService.instant('file.upload.too.big') +
|
|
381
|
-
' ' +
|
|
382
|
-
formattedSize(refFile.size),
|
|
383
|
-
});
|
|
384
|
-
// Same trick for error management
|
|
385
|
-
return { ...refFile, message: 'ERROR' };
|
|
386
|
-
}
|
|
387
|
-
return refFile;
|
|
388
|
-
}),
|
|
389
|
-
filter(x => x.message !== 'ERROR'),
|
|
390
|
-
withLatestFrom(this.files$),
|
|
391
|
-
map(this.fn), // For custom validations
|
|
392
|
-
tap(x => {
|
|
393
|
-
if (!!x.message && x.message.startsWith('ERROR:'))
|
|
394
|
-
this.setFileUploadError(x.message.replace('ERROR:', '').trim());
|
|
395
|
-
else this.clearFileUploadError();
|
|
396
|
-
}),
|
|
397
|
-
filter(x => !x.message.startsWith('ERROR')),
|
|
398
|
-
take(1),
|
|
399
|
-
);
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
private loadStep = (file: any) => {
|
|
403
|
-
if (file.color === OnemrvaMatColor.WARN) this.reset(file.ref);
|
|
404
|
-
|
|
405
|
-
this.enableProgressBar();
|
|
406
|
-
|
|
407
|
-
return this.fileUploadService.upload(file).pipe(
|
|
408
|
-
throttle(() => interval(200), { leading: true, trailing: true }),
|
|
409
|
-
tap((event: HttpEvent<any>) => {
|
|
410
|
-
if (event.type === HttpEventType.UploadProgress) {
|
|
411
|
-
this.setProgress({
|
|
412
|
-
ref: file.ref,
|
|
413
|
-
progress: Math.round((100 * event.loaded) / event.total!),
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
if (event.type === HttpEventType.Response) {
|
|
418
|
-
this.setSuccess({ ref: file.ref, body: event.body });
|
|
419
|
-
}
|
|
420
|
-
}),
|
|
421
|
-
takeWhile(
|
|
422
|
-
(event: HttpEvent<any>) => event.type === HttpEventType.UploadProgress,
|
|
423
|
-
),
|
|
424
|
-
catchError(() => {
|
|
425
|
-
this.setFail({
|
|
426
|
-
ref: file.ref,
|
|
427
|
-
color: OnemrvaMatColor.WARN,
|
|
428
|
-
message: 'file.upload.retry.error',
|
|
429
|
-
});
|
|
430
|
-
return of(null);
|
|
431
|
-
}),
|
|
432
|
-
);
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* For adding one file panel (creation of file panel reference skipped if already created) at a time.
|
|
437
|
-
* Upload to BE not triggered
|
|
438
|
-
*/
|
|
439
|
-
readonly addForPotentialUpload = this.effect(
|
|
440
|
-
(file$: Observable<ProgressFile>) => this.progressFileChecker(file$),
|
|
441
|
-
);
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* For adding an array of file panels (creation of file panels reference skipped if already created).
|
|
445
|
-
* Uploads to BE not triggered
|
|
446
|
-
*/
|
|
447
|
-
readonly addSeveralForPotentialUpload = this.effect(
|
|
448
|
-
(files$: Observable<ProgressFile[]>) =>
|
|
449
|
-
files$.pipe(
|
|
450
|
-
switchMap(files =>
|
|
451
|
-
forkJoin(files.map(file => this.progressFileChecker(of(file)))),
|
|
452
|
-
),
|
|
453
|
-
),
|
|
454
|
-
);
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* For adding a file panel (creation of file panels reference skipped if already created) then uploading it
|
|
458
|
-
*/
|
|
459
|
-
readonly uploadFile = this.effect((file$: Observable<ProgressFile>) => {
|
|
460
|
-
return this.progressFileChecker(file$).pipe(mergeMap(this.loadStep));
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
readonly retryFile = this.effect(
|
|
464
|
-
(file$: Observable<ReferencedProgressFile>) =>
|
|
465
|
-
this.progressFileChecker(file$).pipe(mergeMap(this.loadStep)),
|
|
466
|
-
);
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* For adding several file panels (creation of file panels reference skipped if already created) then uploading them
|
|
470
|
-
*/
|
|
471
|
-
readonly uploadFiles = this.effect((files$: Observable<ProgressFile[]>) =>
|
|
472
|
-
files$.pipe(
|
|
473
|
-
switchMap(files =>
|
|
474
|
-
merge(
|
|
475
|
-
...files.map(file =>
|
|
476
|
-
this.progressFileChecker(of(file)).pipe(switchMap(this.loadStep)),
|
|
477
|
-
),
|
|
478
|
-
),
|
|
479
|
-
),
|
|
480
|
-
),
|
|
481
|
-
);
|
|
482
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
role="group"
|
|
3
|
-
class="bank-account-input-group"
|
|
4
|
-
[formGroup]="parts"
|
|
5
|
-
[attr.aria-labelledby]="_formField.getLabelId()"
|
|
6
|
-
>
|
|
7
|
-
<mat-select
|
|
8
|
-
class="country-code-select"
|
|
9
|
-
matTextPrefix
|
|
10
|
-
formControlName="countryCode"
|
|
11
|
-
placeholder="XX"
|
|
12
|
-
(selectionChange)="_handleInput(parts.controls.countryCode)"
|
|
13
|
-
#countryCode
|
|
14
|
-
>
|
|
15
|
-
<mat-option>
|
|
16
|
-
<mat-select-search
|
|
17
|
-
[formControl]="filterCtrl"
|
|
18
|
-
noEntriesFoundLabel="no-entries-label"
|
|
19
|
-
placeholderLabel="placeholderLabel"
|
|
20
|
-
></mat-select-search>
|
|
21
|
-
</mat-option>
|
|
22
|
-
|
|
23
|
-
<mat-option *ngFor="let country of countryCodes$ | async" [value]="country">
|
|
24
|
-
<span>{{ country }}</span>
|
|
25
|
-
</mat-option>
|
|
26
|
-
</mat-select>
|
|
27
|
-
|
|
28
|
-
<input
|
|
29
|
-
id="bban-input"
|
|
30
|
-
name="bban-input"
|
|
31
|
-
class="bban-input"
|
|
32
|
-
formControlName="bban"
|
|
33
|
-
(input)="_handleInput(parts.controls.bban)"
|
|
34
|
-
#bban
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
.bank-account-input-group {
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
|
|
5
|
-
.country-code-input,
|
|
6
|
-
.bban-input {
|
|
7
|
-
border: none;
|
|
8
|
-
background: none;
|
|
9
|
-
padding: 0;
|
|
10
|
-
outline: none;
|
|
11
|
-
font: inherit;
|
|
12
|
-
text-align: left;
|
|
13
|
-
color: currentcolor;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.bban-input {
|
|
17
|
-
padding-left: 4px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
//.example-tel-input-container {
|
|
22
|
-
// display: flex;
|
|
23
|
-
//}
|
|
24
|
-
//
|
|
25
|
-
//.example-tel-input-element {
|
|
26
|
-
// border: none;
|
|
27
|
-
// background: none;
|
|
28
|
-
// padding: 0;
|
|
29
|
-
// outline: none;
|
|
30
|
-
// font: inherit;
|
|
31
|
-
// text-align: center;
|
|
32
|
-
// color: currentcolor;
|
|
33
|
-
//}
|
|
34
|
-
//
|
|
35
|
-
//.example-tel-input-spacer {
|
|
36
|
-
// opacity: 0;
|
|
37
|
-
// transition: opacity 200ms;
|
|
38
|
-
//}
|
|
39
|
-
|
|
40
|
-
//:host.example-floating .example-tel-input-spacer {
|
|
41
|
-
// opacity: 1;
|
|
42
|
-
//}
|