@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,2188 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Component, InjectionToken, Injectable, HostListener, Directive, HostBinding, Input, EventEmitter, Output, TemplateRef, ViewContainerRef, Renderer2, ComponentFactoryResolver, input, Pipe, RendererFactory2, NgModule, ErrorHandler } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/icon';
|
|
4
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
+
import * as i2 from '@angular/material/tooltip';
|
|
6
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
7
|
+
import { Clipboard } from '@angular/cdk/clipboard';
|
|
8
|
+
import { DOCUMENT } from '@angular/common';
|
|
9
|
+
import { Platform, _isTestEnvironment } from '@angular/cdk/platform';
|
|
10
|
+
import { Subject, merge, NEVER, take, tap, catchError, startWith, switchMap, shareReplay, filter, finalize, of, forkJoin, ReplaySubject, skip, distinctUntilChanged, map as map$1, combineLatestWith, from, takeUntil } from 'rxjs';
|
|
11
|
+
import { OnemrvaMatColor, OnemrvaMatSize } from '@onemrvapublic/design-system/utils';
|
|
12
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
13
|
+
import { catchError as catchError$1, map, startWith as startWith$1 } from 'rxjs/operators';
|
|
14
|
+
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
15
|
+
import { __decorate } from 'tslib';
|
|
16
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
17
|
+
import { countrySpecs, validateIBAN, electronicFormatIBAN, ValidationErrorsIBAN } from 'ibantools';
|
|
18
|
+
import { NativeDateAdapter, DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
|
|
19
|
+
import { DateTime, Info } from 'luxon';
|
|
20
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
21
|
+
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
22
|
+
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
23
|
+
|
|
24
|
+
class ClipboardIconComponent {
|
|
25
|
+
constructor() {
|
|
26
|
+
this._elementRef = inject(ElementRef);
|
|
27
|
+
this.clipboardService = inject(Clipboard);
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClipboardIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: ClipboardIconComponent, isStandalone: true, selector: "lib-clipboard-icon", ngImport: i0, template: "<mat-icon [matTooltip]=\"'TEST'\">content_copy</mat-icon>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClipboardIconComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{ selector: 'lib-clipboard-icon', standalone: true, imports: [MatIconModule, MatTooltipModule], template: "<mat-icon [matTooltip]=\"'TEST'\">content_copy</mat-icon>\n" }]
|
|
35
|
+
}] });
|
|
36
|
+
|
|
37
|
+
var CDNUrlModeOptions;
|
|
38
|
+
(function (CDNUrlModeOptions) {
|
|
39
|
+
CDNUrlModeOptions["PROD"] = "production";
|
|
40
|
+
CDNUrlModeOptions["VAL"] = "validation";
|
|
41
|
+
})(CDNUrlModeOptions || (CDNUrlModeOptions = {}));
|
|
42
|
+
|
|
43
|
+
const CDN_URLS = {
|
|
44
|
+
prod: 'https://cdn.services.rvaonem.fgov.be',
|
|
45
|
+
val: 'https://cdn.servicesval.rvaonem.fgov.be',
|
|
46
|
+
};
|
|
47
|
+
const NISS_MASK = '000000/000-00';
|
|
48
|
+
const LOOKUP_COUNTRY_URL = 'http://services/lookupwpptservice/rest/lookup/getLookups?class=be.fgov.onerva.lookup.wppt.persistence.model.common.Country';
|
|
49
|
+
const ONEMRVA_THEME = 'onemrva-theme';
|
|
50
|
+
// export const LOOKUP_POSTAL_CODE_URL =
|
|
51
|
+
// 'https://services/lookupwpptservice/rest/lookup/getBelgianCommunityByPostalCode?postalCode=';
|
|
52
|
+
|
|
53
|
+
const parseNativeDateFormats = [
|
|
54
|
+
'ddMMyyyy',
|
|
55
|
+
'dd/MM/yyyy',
|
|
56
|
+
'd/M/yyyy',
|
|
57
|
+
'dd/M/yyyy',
|
|
58
|
+
'd/MM/yyyy',
|
|
59
|
+
'd.M.yyyy',
|
|
60
|
+
'dd.M.yyyy',
|
|
61
|
+
'd.MM.yyyy',
|
|
62
|
+
'd/M/yy',
|
|
63
|
+
'dd/M/yy',
|
|
64
|
+
'd/MM/yy',
|
|
65
|
+
'd.M.yy',
|
|
66
|
+
'dd.M.yy',
|
|
67
|
+
'd.MM.yy',
|
|
68
|
+
];
|
|
69
|
+
const parseNativeYearMonthFormats = [
|
|
70
|
+
'MMyyyy',
|
|
71
|
+
'M/yyyy',
|
|
72
|
+
'M/yy',
|
|
73
|
+
'MM/yyyy',
|
|
74
|
+
'MM/yy',
|
|
75
|
+
'M.yyyy',
|
|
76
|
+
'MM.yyyy',
|
|
77
|
+
];
|
|
78
|
+
const parseLuxonYearMonthFormats = [
|
|
79
|
+
'LLyyyy',
|
|
80
|
+
'L/yyyy',
|
|
81
|
+
'L/yy',
|
|
82
|
+
'LL/yyyy',
|
|
83
|
+
'LL/yy',
|
|
84
|
+
'L.yyyy',
|
|
85
|
+
'LL.yyyy',
|
|
86
|
+
];
|
|
87
|
+
const parseLuxonDateFormat = [
|
|
88
|
+
'ddLLyyyy',
|
|
89
|
+
'd/LL/yyyy',
|
|
90
|
+
'd/L/yyyy',
|
|
91
|
+
'dd/L/yyyy',
|
|
92
|
+
'd/LL/yyyy',
|
|
93
|
+
'd.L.yyyy',
|
|
94
|
+
'dd.L.yyyy',
|
|
95
|
+
'd.LL.yyyy',
|
|
96
|
+
'd/L/yy',
|
|
97
|
+
'dd/L/yy',
|
|
98
|
+
'd/LL/yy',
|
|
99
|
+
'd.L.yy',
|
|
100
|
+
'dd.L.yy',
|
|
101
|
+
'd.LL.yy',
|
|
102
|
+
];
|
|
103
|
+
const ONEMRVA_MAT_NATIVE_DATE_FORMAT = {
|
|
104
|
+
parse: {
|
|
105
|
+
dateInput: parseNativeDateFormats,
|
|
106
|
+
},
|
|
107
|
+
display: {
|
|
108
|
+
dateInput: 'dd/MM/yyyy',
|
|
109
|
+
monthYearLabel: 'LL / yyyy',
|
|
110
|
+
dateA11yLabel: 'LL',
|
|
111
|
+
monthYearA11yLabel: 'MMMM yyyy',
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
const ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT = {
|
|
115
|
+
parse: {
|
|
116
|
+
dateInput: parseNativeYearMonthFormats,
|
|
117
|
+
},
|
|
118
|
+
display: {
|
|
119
|
+
dateInput: 'dd/MM/yyyy',
|
|
120
|
+
monthYearLabel: 'LL / yyyy',
|
|
121
|
+
dateA11yLabel: 'LL',
|
|
122
|
+
monthYearA11yLabel: 'MMM yyyy',
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
const ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS = {
|
|
126
|
+
parse: {
|
|
127
|
+
dateInput: parseLuxonYearMonthFormats,
|
|
128
|
+
},
|
|
129
|
+
display: {
|
|
130
|
+
dateInput: 'LL/yyyy',
|
|
131
|
+
monthYearLabel: 'LLL yyyy',
|
|
132
|
+
dateA11yLabel: 'DDD',
|
|
133
|
+
monthYearA11yLabel: 'LLLL yyyy',
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
const ONEMRVA_MAT_LUXON_DATE_FORMATS = {
|
|
137
|
+
parse: {
|
|
138
|
+
dateInput: parseLuxonDateFormat,
|
|
139
|
+
},
|
|
140
|
+
display: {
|
|
141
|
+
dateInput: 'dd/LL/yyyy',
|
|
142
|
+
monthYearLabel: 'LLL yyyy',
|
|
143
|
+
dateA11yLabel: 'DDD',
|
|
144
|
+
monthYearA11yLabel: 'LLL yyyy',
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const CDN_URL_MODE = new InjectionToken('This is cdn url that will be used (val/prod)');
|
|
149
|
+
|
|
150
|
+
const LOOKUP_COUNTRY_SERVICE_URL = new InjectionToken('LOOKUP_COUNTRY_SERVICE_URL', {
|
|
151
|
+
providedIn: 'root',
|
|
152
|
+
factory: () => LOOKUP_COUNTRY_URL,
|
|
153
|
+
});
|
|
154
|
+
const ONEMRVA_THEME_CLASS = new InjectionToken('ONEMRVA_THEME_CLASS', {
|
|
155
|
+
providedIn: 'root',
|
|
156
|
+
factory: () => ONEMRVA_THEME,
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @license
|
|
161
|
+
* Copyright 2025 OneMRVA
|
|
162
|
+
*
|
|
163
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
164
|
+
* found in the LICENSE file at https://angular.io/license
|
|
165
|
+
*/
|
|
166
|
+
/** Container inside which all overlays will render. */
|
|
167
|
+
class WebComponentOverlayContainer {
|
|
168
|
+
constructor() {
|
|
169
|
+
this._containerElement = null;
|
|
170
|
+
this._themeObserver = null;
|
|
171
|
+
this.platform = inject(Platform);
|
|
172
|
+
this._document = inject(DOCUMENT);
|
|
173
|
+
this.themeClass = inject(ONEMRVA_THEME_CLASS);
|
|
174
|
+
}
|
|
175
|
+
ngOnDestroy() {
|
|
176
|
+
this._containerElement?.remove();
|
|
177
|
+
this._themeObserver?.disconnect();
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* This method returns the overlay container element. It will lazily
|
|
181
|
+
* create the element the first time it is called to facilitate using
|
|
182
|
+
* the container in non-browser environments.
|
|
183
|
+
* @returns the container element
|
|
184
|
+
*/
|
|
185
|
+
getContainerElement() {
|
|
186
|
+
if (this._containerElement === null) {
|
|
187
|
+
this._createContainer();
|
|
188
|
+
}
|
|
189
|
+
return this._containerElement;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Create the overlay container element, which is simply a div
|
|
193
|
+
* with the 'cdk-overlay-container' class on the document body.
|
|
194
|
+
*/
|
|
195
|
+
_createContainer() {
|
|
196
|
+
const containerClass = 'cdk-overlay-container';
|
|
197
|
+
if (this.platform.isBrowser || _isTestEnvironment()) {
|
|
198
|
+
const oppositePlatformContainers = this._document.querySelectorAll(`.${containerClass}[platform="server"], ` +
|
|
199
|
+
`.${containerClass}[platform="test"]`);
|
|
200
|
+
oppositePlatformContainers.forEach(platform => {
|
|
201
|
+
platform.remove();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
const containerwrap = this._document.createElement('div');
|
|
205
|
+
containerwrap.classList.add(this.themeClass);
|
|
206
|
+
const themeElements = this._document.querySelectorAll(`.${this.themeClass}`);
|
|
207
|
+
const existingThemeElement = Array.from(themeElements).find(el => el !== containerwrap);
|
|
208
|
+
if (existingThemeElement) {
|
|
209
|
+
if (existingThemeElement.classList.contains('dark-theme')) {
|
|
210
|
+
containerwrap.classList.add('dark-theme');
|
|
211
|
+
}
|
|
212
|
+
else if (existingThemeElement.classList.contains('light-theme')) {
|
|
213
|
+
containerwrap.classList.add('light-theme');
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
this._themeObserver = new MutationObserver(mutations => {
|
|
217
|
+
mutations.forEach(mutation => {
|
|
218
|
+
if (mutation.type === 'attributes' &&
|
|
219
|
+
mutation.attributeName === 'class') {
|
|
220
|
+
const target = mutation.target;
|
|
221
|
+
if (target.classList.contains(this.themeClass) &&
|
|
222
|
+
target !== containerwrap) {
|
|
223
|
+
containerwrap.classList.remove('dark-theme', 'light-theme');
|
|
224
|
+
if (target.classList.contains('dark-theme')) {
|
|
225
|
+
containerwrap.classList.add('dark-theme');
|
|
226
|
+
}
|
|
227
|
+
else if (target.classList.contains('light-theme')) {
|
|
228
|
+
containerwrap.classList.add('light-theme');
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
if (existingThemeElement) {
|
|
235
|
+
this._themeObserver.observe(existingThemeElement, {
|
|
236
|
+
attributes: true,
|
|
237
|
+
attributeFilter: ['class'],
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
const container = this._document.createElement('div');
|
|
241
|
+
container.classList.add(containerClass);
|
|
242
|
+
if (_isTestEnvironment()) {
|
|
243
|
+
container.setAttribute('platform', 'test');
|
|
244
|
+
}
|
|
245
|
+
else if (!this.platform.isBrowser) {
|
|
246
|
+
container.setAttribute('platform', 'server');
|
|
247
|
+
}
|
|
248
|
+
containerwrap.appendChild(container);
|
|
249
|
+
this._document.body.appendChild(containerwrap);
|
|
250
|
+
this._containerElement = container;
|
|
251
|
+
}
|
|
252
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: WebComponentOverlayContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
253
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: WebComponentOverlayContainer, providedIn: 'root' }); }
|
|
254
|
+
}
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: WebComponentOverlayContainer, decorators: [{
|
|
256
|
+
type: Injectable,
|
|
257
|
+
args: [{ providedIn: 'root' }]
|
|
258
|
+
}] });
|
|
259
|
+
|
|
260
|
+
class DefaultStorage {
|
|
261
|
+
constructor() {
|
|
262
|
+
this.storage = new Map();
|
|
263
|
+
}
|
|
264
|
+
getItem(key) {
|
|
265
|
+
return this.storage.get(key);
|
|
266
|
+
}
|
|
267
|
+
setItem(key, item) {
|
|
268
|
+
this.storage.set(key, item);
|
|
269
|
+
}
|
|
270
|
+
deleteItem(key) {
|
|
271
|
+
this.storage.delete(key);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
class RequestTimes {
|
|
275
|
+
constructor() {
|
|
276
|
+
this.storage = new Map();
|
|
277
|
+
}
|
|
278
|
+
getItem(key) {
|
|
279
|
+
return this.storage.get(key);
|
|
280
|
+
}
|
|
281
|
+
setItem(key, item) {
|
|
282
|
+
this.storage.set(key, item);
|
|
283
|
+
}
|
|
284
|
+
deleteItem(key) {
|
|
285
|
+
this.storage.delete(key);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
const HttpRequestCache = (optionsHandler) => {
|
|
289
|
+
return (target, methodName, descriptor) => {
|
|
290
|
+
if (!(descriptor?.value instanceof Function)) {
|
|
291
|
+
throw Error(`'@HttpRequestCache' can be applied only to the class method which returns an Observable`);
|
|
292
|
+
}
|
|
293
|
+
const cacheKeyPrefix = `${target.constructor.name}_${methodName}`;
|
|
294
|
+
const originalMethod = descriptor.value;
|
|
295
|
+
const working = {};
|
|
296
|
+
let subscribers = 0;
|
|
297
|
+
descriptor.value = function (...args) {
|
|
298
|
+
const options = optionsHandler?.call(this, this, ...args);
|
|
299
|
+
if (!options?.storage && !target._____storage_____) {
|
|
300
|
+
target._____storage_____ = new DefaultStorage();
|
|
301
|
+
}
|
|
302
|
+
if (options?.ttl && !target._____ttl_storage_____) {
|
|
303
|
+
target._____ttl_storage_____ = new RequestTimes();
|
|
304
|
+
}
|
|
305
|
+
const storage = options?.storage ?? target._____storage_____;
|
|
306
|
+
const key = `${cacheKeyPrefix}_${JSON.stringify(args)}`;
|
|
307
|
+
let ttl = undefined;
|
|
308
|
+
if (options?.ttl) {
|
|
309
|
+
ttl = target._____ttl_storage_____.getItem(key);
|
|
310
|
+
if (!ttl) {
|
|
311
|
+
ttl = {
|
|
312
|
+
requestTime: Date.now(),
|
|
313
|
+
subject: new Subject(),
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
else if (ttl.requestTime + options.ttl <= Date.now()) {
|
|
317
|
+
working[key] = true;
|
|
318
|
+
ttl.requestTime = Date.now();
|
|
319
|
+
ttl.subject.next();
|
|
320
|
+
}
|
|
321
|
+
target._____ttl_storage_____.setItem(key, ttl);
|
|
322
|
+
}
|
|
323
|
+
const refreshOn = merge(options?.refreshOn ?? NEVER, ttl?.subject ?? NEVER);
|
|
324
|
+
return storage.getItem(key).pipe(take(1), tap(value => {
|
|
325
|
+
subscribers++;
|
|
326
|
+
if (value === null)
|
|
327
|
+
throw '';
|
|
328
|
+
}), catchError(() => {
|
|
329
|
+
const observable = refreshOn.pipe(startWith(true), switchMap(() => originalMethod.apply(this, [...args])), tap(() => {
|
|
330
|
+
delete working[key];
|
|
331
|
+
}), shareReplay({
|
|
332
|
+
bufferSize: 1,
|
|
333
|
+
refCount: options?.refCount ?? false,
|
|
334
|
+
windowTime: options?.windowTime ?? Infinity,
|
|
335
|
+
}), filter(() => {
|
|
336
|
+
return !working[key];
|
|
337
|
+
}), finalize(() => {
|
|
338
|
+
subscribers--;
|
|
339
|
+
if (subscribers === 0 && options?.refCount) {
|
|
340
|
+
storage.deleteItem(key);
|
|
341
|
+
target._____ttl_storage_____?.deleteItem(key);
|
|
342
|
+
}
|
|
343
|
+
}));
|
|
344
|
+
storage.setItem(key, observable);
|
|
345
|
+
return observable;
|
|
346
|
+
}));
|
|
347
|
+
// let observable = storage.getItem(key);
|
|
348
|
+
//
|
|
349
|
+
// if (!observable) {
|
|
350
|
+
//
|
|
351
|
+
// observable = refreshOn.pipe(
|
|
352
|
+
// startWith(true),
|
|
353
|
+
// switchMap(() => originalMethod.apply(this, [...args])),
|
|
354
|
+
// tap(() => {
|
|
355
|
+
// delete working[key];
|
|
356
|
+
// }),
|
|
357
|
+
// shareReplay({
|
|
358
|
+
// bufferSize: 1,
|
|
359
|
+
// refCount: options?.refCount ?? false,
|
|
360
|
+
// windowTime: options?.windowTime ?? Infinity,
|
|
361
|
+
// }),
|
|
362
|
+
// filter(() => {
|
|
363
|
+
// return !working[key];
|
|
364
|
+
// }),
|
|
365
|
+
// finalize(() => {
|
|
366
|
+
// subscribers--;
|
|
367
|
+
// if (subscribers === 0 && options?.refCount) {
|
|
368
|
+
// storage.deleteItem(key);
|
|
369
|
+
// (target as any)._____ttl_storage_____?.deleteItem(key);
|
|
370
|
+
// }
|
|
371
|
+
// })
|
|
372
|
+
// );
|
|
373
|
+
// storage.setItem(key, observable);
|
|
374
|
+
// }
|
|
375
|
+
// subscribers++;
|
|
376
|
+
// return observable;
|
|
377
|
+
};
|
|
378
|
+
return descriptor;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
class DigitOnlyDirective {
|
|
383
|
+
onKeyDown(event) {
|
|
384
|
+
const e = event;
|
|
385
|
+
const allowedKey = [
|
|
386
|
+
'0',
|
|
387
|
+
'1',
|
|
388
|
+
'2',
|
|
389
|
+
'3',
|
|
390
|
+
'4',
|
|
391
|
+
'5',
|
|
392
|
+
'6',
|
|
393
|
+
'7',
|
|
394
|
+
'8',
|
|
395
|
+
'9',
|
|
396
|
+
'.',
|
|
397
|
+
',',
|
|
398
|
+
' ',
|
|
399
|
+
'Backspace',
|
|
400
|
+
'Delete',
|
|
401
|
+
'Tab',
|
|
402
|
+
'-',
|
|
403
|
+
'Enter',
|
|
404
|
+
'ArrowLeft',
|
|
405
|
+
'ArrowRight',
|
|
406
|
+
'ArrowUp',
|
|
407
|
+
'ArrowDown',
|
|
408
|
+
'Home',
|
|
409
|
+
'End',
|
|
410
|
+
];
|
|
411
|
+
if (allowedKey.indexOf(e.key) >= 0)
|
|
412
|
+
return;
|
|
413
|
+
// HWKTODO manage ctrl Z and ctrl U
|
|
414
|
+
const allowedCtrlShortcuts = ['a', 'c', 'x', 'v'];
|
|
415
|
+
if (e.ctrlKey && allowedCtrlShortcuts.indexOf(e.key) >= 0)
|
|
416
|
+
return;
|
|
417
|
+
e.preventDefault();
|
|
418
|
+
}
|
|
419
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DigitOnlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
420
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: DigitOnlyDirective, isStandalone: true, selector: "[digitOnly]", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 }); }
|
|
421
|
+
}
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DigitOnlyDirective, decorators: [{
|
|
423
|
+
type: Directive,
|
|
424
|
+
args: [{
|
|
425
|
+
selector: '[digitOnly]',
|
|
426
|
+
standalone: true,
|
|
427
|
+
}]
|
|
428
|
+
}], propDecorators: { onKeyDown: [{
|
|
429
|
+
type: HostListener,
|
|
430
|
+
args: ['keydown', ['$event']]
|
|
431
|
+
}] } });
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Conditionally adds component to the tree if screen width matches at least one size in input
|
|
435
|
+
*/
|
|
436
|
+
class OnemRvaColorDirective {
|
|
437
|
+
constructor() {
|
|
438
|
+
this.color = '';
|
|
439
|
+
}
|
|
440
|
+
/** @hidden @internal */
|
|
441
|
+
get _isPrimary() {
|
|
442
|
+
return this.color === OnemrvaMatColor.PRIMARY;
|
|
443
|
+
}
|
|
444
|
+
/** @hidden @internal */
|
|
445
|
+
get _isAccent() {
|
|
446
|
+
return this.color === OnemrvaMatColor.ACCENT;
|
|
447
|
+
}
|
|
448
|
+
/** @hidden @internal */
|
|
449
|
+
get _isError() {
|
|
450
|
+
return this.color === OnemrvaMatColor.ERROR;
|
|
451
|
+
}
|
|
452
|
+
/** @hidden @internal */
|
|
453
|
+
get _isWarn() {
|
|
454
|
+
return this.color === OnemrvaMatColor.WARN;
|
|
455
|
+
}
|
|
456
|
+
/** @hidden @internal */
|
|
457
|
+
get _isSuccess() {
|
|
458
|
+
return this.color === OnemrvaMatColor.SUCCESS;
|
|
459
|
+
}
|
|
460
|
+
/** @hidden @internal */
|
|
461
|
+
get _isInfo() {
|
|
462
|
+
return this.color === OnemrvaMatColor.INFO;
|
|
463
|
+
}
|
|
464
|
+
/** @hidden @internal */
|
|
465
|
+
get _isNeutral() {
|
|
466
|
+
return this.color === OnemrvaMatColor.NEUTRAL;
|
|
467
|
+
}
|
|
468
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
469
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaColorDirective, isStandalone: true, selector: "onemrva-mat-selectable-box[color],div[color],onemrva-mat-avatar[color],mat-card[color],mat-toolbar[color],onemrva-mat-spinner[color],onemrva-mat-notification[color],onemrva-mat-task-list[color],onemrva-mat-sticker[color],onemrva-mat-panel[color],onemrva-mat-task[color],onemrva-mat-choice-chip[color],mat-form-field[color],button[color],mat-icon[color],mat-chip[color],mat-chip-option[color]", inputs: { color: "color" }, host: { properties: { "class.mat-primary": "this._isPrimary", "class.mat-accent": "this._isAccent", "class.mat-error": "this._isError", "class.mat-warn": "this._isWarn", "class.mat-success": "this._isSuccess", "class.mat-info": "this._isInfo", "class.mat-neutral": "this._isNeutral" } }, ngImport: i0 }); }
|
|
470
|
+
}
|
|
471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaColorDirective, decorators: [{
|
|
472
|
+
type: Directive,
|
|
473
|
+
args: [{
|
|
474
|
+
selector: 'onemrva-mat-selectable-box[color],' +
|
|
475
|
+
'div[color],' +
|
|
476
|
+
'onemrva-mat-avatar[color],' +
|
|
477
|
+
'mat-card[color],' +
|
|
478
|
+
'mat-toolbar[color],' +
|
|
479
|
+
'onemrva-mat-spinner[color],' +
|
|
480
|
+
'onemrva-mat-notification[color],' +
|
|
481
|
+
'onemrva-mat-task-list[color],' +
|
|
482
|
+
'onemrva-mat-sticker[color],' +
|
|
483
|
+
'onemrva-mat-panel[color],' +
|
|
484
|
+
'onemrva-mat-task[color],' +
|
|
485
|
+
'onemrva-mat-choice-chip[color],' +
|
|
486
|
+
'mat-form-field[color],' +
|
|
487
|
+
'button[color],' +
|
|
488
|
+
'mat-icon[color],' +
|
|
489
|
+
'mat-chip[color],' +
|
|
490
|
+
'mat-chip-option[color]',
|
|
491
|
+
standalone: true,
|
|
492
|
+
}]
|
|
493
|
+
}], propDecorators: { color: [{
|
|
494
|
+
type: Input
|
|
495
|
+
}], _isPrimary: [{
|
|
496
|
+
type: HostBinding,
|
|
497
|
+
args: ['class.mat-primary']
|
|
498
|
+
}], _isAccent: [{
|
|
499
|
+
type: HostBinding,
|
|
500
|
+
args: ['class.mat-accent']
|
|
501
|
+
}], _isError: [{
|
|
502
|
+
type: HostBinding,
|
|
503
|
+
args: ['class.mat-error']
|
|
504
|
+
}], _isWarn: [{
|
|
505
|
+
type: HostBinding,
|
|
506
|
+
args: ['class.mat-warn']
|
|
507
|
+
}], _isSuccess: [{
|
|
508
|
+
type: HostBinding,
|
|
509
|
+
args: ['class.mat-success']
|
|
510
|
+
}], _isInfo: [{
|
|
511
|
+
type: HostBinding,
|
|
512
|
+
args: ['class.mat-info']
|
|
513
|
+
}], _isNeutral: [{
|
|
514
|
+
type: HostBinding,
|
|
515
|
+
args: ['class.mat-neutral']
|
|
516
|
+
}] } });
|
|
517
|
+
|
|
518
|
+
class MatRowClickableDirective extends OnemRvaColorDirective {
|
|
519
|
+
constructor() {
|
|
520
|
+
super(...arguments);
|
|
521
|
+
this.matRowClickable = new EventEmitter();
|
|
522
|
+
this.cssClass = true;
|
|
523
|
+
}
|
|
524
|
+
click() {
|
|
525
|
+
this.matRowClickable.emit();
|
|
526
|
+
}
|
|
527
|
+
/** @hidden @internal */
|
|
528
|
+
get _isClickable() {
|
|
529
|
+
return this.matRowClickable.observed;
|
|
530
|
+
}
|
|
531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MatRowClickableDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
532
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: MatRowClickableDirective, isStandalone: true, selector: "tr[matRowClickable]", outputs: { matRowClickable: "matRowClickable" }, host: { listeners: { "click": "click($event)" }, properties: { "class.clickable": "this._isClickable", "class.onemrva-clickable-row": "this.cssClass" } }, usesInheritance: true, ngImport: i0 }); }
|
|
533
|
+
}
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MatRowClickableDirective, decorators: [{
|
|
535
|
+
type: Directive,
|
|
536
|
+
args: [{
|
|
537
|
+
selector: 'tr[matRowClickable]',
|
|
538
|
+
standalone: true,
|
|
539
|
+
}]
|
|
540
|
+
}], propDecorators: { matRowClickable: [{
|
|
541
|
+
type: Output
|
|
542
|
+
}], click: [{
|
|
543
|
+
type: HostListener,
|
|
544
|
+
args: ['click', ['$event']]
|
|
545
|
+
}], _isClickable: [{
|
|
546
|
+
type: HostBinding,
|
|
547
|
+
args: ['class.clickable']
|
|
548
|
+
}], cssClass: [{
|
|
549
|
+
type: HostBinding,
|
|
550
|
+
args: ['class.onemrva-clickable-row']
|
|
551
|
+
}] } });
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Conditionally adds component to the tree if screen width matches at least one size in input
|
|
555
|
+
*/
|
|
556
|
+
class IfWidthIsDirective {
|
|
557
|
+
constructor() {
|
|
558
|
+
this.breakpointObserver = inject(BreakpointObserver);
|
|
559
|
+
this._templateRef = inject(TemplateRef);
|
|
560
|
+
this._viewContainer = inject(ViewContainerRef);
|
|
561
|
+
}
|
|
562
|
+
ngOnInit() {
|
|
563
|
+
this.breakpointObserver
|
|
564
|
+
.observe([...this.ifWidthIs])
|
|
565
|
+
.subscribe((state) => {
|
|
566
|
+
this._viewContainer.clear();
|
|
567
|
+
if (state.matches) {
|
|
568
|
+
this._viewContainer.createEmbeddedView(this._templateRef);
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IfWidthIsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
573
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: IfWidthIsDirective, isStandalone: true, selector: "[ifWidthIs]", inputs: { ifWidthIs: "ifWidthIs" }, ngImport: i0 }); }
|
|
574
|
+
}
|
|
575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IfWidthIsDirective, decorators: [{
|
|
576
|
+
type: Directive,
|
|
577
|
+
args: [{
|
|
578
|
+
selector: '[ifWidthIs]',
|
|
579
|
+
standalone: true,
|
|
580
|
+
}]
|
|
581
|
+
}], propDecorators: { ifWidthIs: [{
|
|
582
|
+
type: Input
|
|
583
|
+
}] } });
|
|
584
|
+
|
|
585
|
+
const UNDO_STACK_MAX_LENGTH = 50;
|
|
586
|
+
/**
|
|
587
|
+
* 0: digits
|
|
588
|
+
* A: letters (uppercase or lowercase) and digits
|
|
589
|
+
* S: only letters (uppercase or lowercase)
|
|
590
|
+
* U: only letters uppercase
|
|
591
|
+
* L: only letters lowercase
|
|
592
|
+
*/
|
|
593
|
+
class OnemrvaMaskDirective {
|
|
594
|
+
constructor() {
|
|
595
|
+
this.el = inject(ElementRef);
|
|
596
|
+
this.inputStack = ['']; // Stack for undo/redo
|
|
597
|
+
this.stackIdx = 0; // Current index in undo/redo stack
|
|
598
|
+
this.markForDelete = false;
|
|
599
|
+
}
|
|
600
|
+
onKeyDown(event) {
|
|
601
|
+
// Allow functional keystrokes
|
|
602
|
+
const e = event;
|
|
603
|
+
let specialKeys = [
|
|
604
|
+
'Tab',
|
|
605
|
+
'Enter',
|
|
606
|
+
'ArrowLeft',
|
|
607
|
+
'ArrowRight',
|
|
608
|
+
'ArrowUp',
|
|
609
|
+
'ArrowDown',
|
|
610
|
+
'Home',
|
|
611
|
+
'End',
|
|
612
|
+
];
|
|
613
|
+
if (specialKeys.indexOf(e.key) >= 0)
|
|
614
|
+
return;
|
|
615
|
+
specialKeys = ['Backspace', 'Delete'];
|
|
616
|
+
if (specialKeys.indexOf(e.key) >= 0) {
|
|
617
|
+
this.markForDelete = true;
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
// Undo
|
|
621
|
+
if (e.ctrlKey && 'z' === e.key && this.stackIdx > 0) {
|
|
622
|
+
this.stackIdx--;
|
|
623
|
+
this.el.nativeElement.value = this.inputStack[this.stackIdx];
|
|
624
|
+
event.preventDefault();
|
|
625
|
+
}
|
|
626
|
+
// Redo
|
|
627
|
+
if (e.ctrlKey &&
|
|
628
|
+
'u' === e.key &&
|
|
629
|
+
this.stackIdx < this.inputStack.length - 1) {
|
|
630
|
+
this.stackIdx++;
|
|
631
|
+
this.el.nativeElement.value = this.inputStack[this.stackIdx];
|
|
632
|
+
event.preventDefault();
|
|
633
|
+
}
|
|
634
|
+
const allowedCtrlShortcuts = ['a', 'c', 'x', 'v'];
|
|
635
|
+
if (e.ctrlKey && allowedCtrlShortcuts.indexOf(e.key) >= 0)
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
onInput(event) {
|
|
639
|
+
const selectionStart = event.target?.selectionStart;
|
|
640
|
+
/*
|
|
641
|
+
* Step 1
|
|
642
|
+
* This block lets a delete execution if the new value is compliant.
|
|
643
|
+
* There are 2 deletion cases, after which the new value is not compliant
|
|
644
|
+
* - dd/MX/yyyy: X is deleted, then the date becomes dd/M/yyyy
|
|
645
|
+
* This case is resolved by step 2 and the date will become: dd/My/yyy
|
|
646
|
+
* - dd/MMXyyyy: the last '/' is deleted, then the date becomes dd/MMyyyy
|
|
647
|
+
* In this particular case, step 2 will automatically add the missing slash, so the date will remain dd/MM/yyyy
|
|
648
|
+
* The issue is that the caret position will remain stuck where it was, so if the user keeps hitting the delete key, nothing will change at all. This is resolved in step 4 by moving the caret to the left
|
|
649
|
+
*/
|
|
650
|
+
if (this.markForDelete) {
|
|
651
|
+
const isCompliantAfterDeletion = [...this.el.nativeElement.value].findIndex((char, idx) => {
|
|
652
|
+
const rule = this.onemrvamask[idx];
|
|
653
|
+
if (rule === null || rule === undefined)
|
|
654
|
+
return true;
|
|
655
|
+
if (isNaN(char) && char.toLowerCase() === char.toUpperCase())
|
|
656
|
+
return char !== rule;
|
|
657
|
+
return !isAllowed(rule, char);
|
|
658
|
+
}) < 0;
|
|
659
|
+
if (isCompliantAfterDeletion) {
|
|
660
|
+
this.markForDelete = false;
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
// Step 2
|
|
665
|
+
const compliantValue = [...this.el.nativeElement.value]
|
|
666
|
+
.filter(char => isAllowed('A', char)) // Necessary when several special char in a row
|
|
667
|
+
.reduce((newValue, char) => {
|
|
668
|
+
let idx = newValue.length;
|
|
669
|
+
const rule = this.onemrvamask[idx];
|
|
670
|
+
if (rule === null || rule === undefined)
|
|
671
|
+
return newValue;
|
|
672
|
+
newValue = !isAllowed(rule, char) ? newValue : newValue + char;
|
|
673
|
+
// Add all trailing special characters
|
|
674
|
+
let nextRule = this.onemrvamask[++idx];
|
|
675
|
+
let i = 0;
|
|
676
|
+
while (nextRule !== null &&
|
|
677
|
+
nextRule !== undefined &&
|
|
678
|
+
['0', 'A', 'S', 'U', 'L'].indexOf(nextRule) < 0) {
|
|
679
|
+
i++;
|
|
680
|
+
newValue += nextRule;
|
|
681
|
+
nextRule = this.onemrvamask[++idx];
|
|
682
|
+
if (i > 50)
|
|
683
|
+
break;
|
|
684
|
+
}
|
|
685
|
+
return newValue;
|
|
686
|
+
}, '');
|
|
687
|
+
this.el.nativeElement.value = compliantValue;
|
|
688
|
+
// Step 3 - Find the new cursor position. If the last new character is just before special character, move the caret after
|
|
689
|
+
let idx = selectionStart;
|
|
690
|
+
let nextRule = this.onemrvamask[idx];
|
|
691
|
+
while (nextRule !== null &&
|
|
692
|
+
nextRule !== undefined &&
|
|
693
|
+
['0', 'A', 'S', 'U', 'L'].indexOf(nextRule) < 0) {
|
|
694
|
+
idx++;
|
|
695
|
+
nextRule = this.onemrvamask[idx];
|
|
696
|
+
if (nextRule !== null &&
|
|
697
|
+
nextRule &&
|
|
698
|
+
['0', 'A', 'S', 'U', 'L'].indexOf(nextRule) < 0) {
|
|
699
|
+
/* empty */
|
|
700
|
+
}
|
|
701
|
+
else
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
// Step 4 - Update inputStack only when all characters are processed
|
|
705
|
+
if (compliantValue !== this.inputStack[this.stackIdx]) {
|
|
706
|
+
this.stackIdx++;
|
|
707
|
+
const stack = this.stackIdx > UNDO_STACK_MAX_LENGTH - 1
|
|
708
|
+
? this.inputStack.slice(1)
|
|
709
|
+
: this.inputStack.splice(0, this.stackIdx);
|
|
710
|
+
this.stackIdx =
|
|
711
|
+
this.stackIdx > UNDO_STACK_MAX_LENGTH - 1
|
|
712
|
+
? UNDO_STACK_MAX_LENGTH - 1
|
|
713
|
+
: this.stackIdx;
|
|
714
|
+
this.inputStack = [...stack, compliantValue];
|
|
715
|
+
this.el.nativeElement.setSelectionRange(idx, idx);
|
|
716
|
+
}
|
|
717
|
+
else {
|
|
718
|
+
if (this.markForDelete) {
|
|
719
|
+
let i = idx - 1;
|
|
720
|
+
/* Finds the last rule character before the special character.
|
|
721
|
+
* e.g: (nnn)/nnnn
|
|
722
|
+
* If the user tries to delete '/', the caret will move just before ')'
|
|
723
|
+
*/
|
|
724
|
+
while (i > 0) {
|
|
725
|
+
const previousRule = this.onemrvamask[i - 1];
|
|
726
|
+
if (['0', 'A', 'S', 'U', 'L'].indexOf(previousRule) < 0) {
|
|
727
|
+
i--;
|
|
728
|
+
}
|
|
729
|
+
else
|
|
730
|
+
break;
|
|
731
|
+
}
|
|
732
|
+
this.el.nativeElement.setSelectionRange(i, i);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
this.markForDelete = false;
|
|
736
|
+
}
|
|
737
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMaskDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
738
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: OnemrvaMaskDirective, isStandalone: true, selector: "[onemrvamask]", inputs: { onemrvamask: "onemrvamask" }, host: { listeners: { "keydown": "onKeyDown($event)", "input": "onInput($event)" } }, ngImport: i0 }); }
|
|
739
|
+
}
|
|
740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMaskDirective, decorators: [{
|
|
741
|
+
type: Directive,
|
|
742
|
+
args: [{
|
|
743
|
+
selector: '[onemrvamask]',
|
|
744
|
+
standalone: true,
|
|
745
|
+
}]
|
|
746
|
+
}], propDecorators: { onemrvamask: [{
|
|
747
|
+
type: Input
|
|
748
|
+
}], onKeyDown: [{
|
|
749
|
+
type: HostListener,
|
|
750
|
+
args: ['keydown', ['$event']]
|
|
751
|
+
}], onInput: [{
|
|
752
|
+
type: HostListener,
|
|
753
|
+
args: ['input', ['$event']]
|
|
754
|
+
}] } });
|
|
755
|
+
function isAllowed(rule, character) {
|
|
756
|
+
switch (rule) {
|
|
757
|
+
// Any digit
|
|
758
|
+
case '0':
|
|
759
|
+
if (character === ' ')
|
|
760
|
+
return false;
|
|
761
|
+
return !isNaN(+character);
|
|
762
|
+
// A: letters (uppercase or lowercase) and digits
|
|
763
|
+
case 'A':
|
|
764
|
+
if (character === ' ')
|
|
765
|
+
return false;
|
|
766
|
+
return (!isNaN(+character) || character.toLowerCase() != character.toUpperCase());
|
|
767
|
+
// only letters (uppercase or lowercase)
|
|
768
|
+
case 'S':
|
|
769
|
+
return character.toLowerCase() != character.toUpperCase();
|
|
770
|
+
// only uppercase letters
|
|
771
|
+
case 'U':
|
|
772
|
+
return (character.toLowerCase() != character.toUpperCase() &&
|
|
773
|
+
character === character.toUpperCase());
|
|
774
|
+
// only lowercase letters
|
|
775
|
+
case 'L':
|
|
776
|
+
return (character.toLowerCase() != character.toUpperCase() &&
|
|
777
|
+
character === character.toLowerCase());
|
|
778
|
+
}
|
|
779
|
+
return false;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Conditionally adds component to the tree if screen width matches at least one size in input
|
|
784
|
+
*/
|
|
785
|
+
class OnemRvaClipboardDirective {
|
|
786
|
+
constructor() {
|
|
787
|
+
this.elementRef = inject(ElementRef);
|
|
788
|
+
this.renderer = inject(Renderer2);
|
|
789
|
+
this.factory = inject(ComponentFactoryResolver);
|
|
790
|
+
this.vcRef = inject(ViewContainerRef);
|
|
791
|
+
this.clipboardService = inject(Clipboard);
|
|
792
|
+
this.class = '';
|
|
793
|
+
this.clipboard = '';
|
|
794
|
+
const miFactory = this.factory.resolveComponentFactory(ClipboardIconComponent);
|
|
795
|
+
this.icon = this.vcRef.createComponent(miFactory);
|
|
796
|
+
this.iconEl = this.icon.injector.get(ClipboardIconComponent)._elementRef.nativeElement;
|
|
797
|
+
}
|
|
798
|
+
ngOnInit() {
|
|
799
|
+
this.vcRef.clear();
|
|
800
|
+
this.renderer.appendChild(this.elementRef.nativeElement, this.iconEl);
|
|
801
|
+
}
|
|
802
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaClipboardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
803
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaClipboardDirective, isStandalone: true, selector: "span[clipboard]", inputs: { clipboard: "clipboard" }, host: { properties: { "class": "this.class" } }, ngImport: i0 }); }
|
|
804
|
+
}
|
|
805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaClipboardDirective, decorators: [{
|
|
806
|
+
type: Directive,
|
|
807
|
+
args: [{
|
|
808
|
+
selector: 'span[clipboard]',
|
|
809
|
+
standalone: true,
|
|
810
|
+
}]
|
|
811
|
+
}], ctorParameters: () => [], propDecorators: { class: [{
|
|
812
|
+
type: HostBinding,
|
|
813
|
+
args: ['class']
|
|
814
|
+
}], clipboard: [{
|
|
815
|
+
type: Input
|
|
816
|
+
}] } });
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Conditionally adds component to the tree if screen width matches at least one size in input
|
|
820
|
+
*/
|
|
821
|
+
class OnemRvaIconRightDirective {
|
|
822
|
+
constructor() {
|
|
823
|
+
this.class = true;
|
|
824
|
+
}
|
|
825
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaIconRightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
826
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaIconRightDirective, isStandalone: true, selector: "button[iconRight]", host: { properties: { "class.onemrva-icon-right": "this.class" } }, ngImport: i0 }); }
|
|
827
|
+
}
|
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaIconRightDirective, decorators: [{
|
|
829
|
+
type: Directive,
|
|
830
|
+
args: [{
|
|
831
|
+
selector: 'button[iconRight]',
|
|
832
|
+
standalone: true,
|
|
833
|
+
}]
|
|
834
|
+
}], propDecorators: { class: [{
|
|
835
|
+
type: HostBinding,
|
|
836
|
+
args: ['class.onemrva-icon-right']
|
|
837
|
+
}] } });
|
|
838
|
+
|
|
839
|
+
class OnemrvaDateFormatDirective {
|
|
840
|
+
constructor() {
|
|
841
|
+
this.el = inject(ElementRef);
|
|
842
|
+
this.template = '__/__/____';
|
|
843
|
+
}
|
|
844
|
+
onPaste(event) {
|
|
845
|
+
const input = this.el.nativeElement;
|
|
846
|
+
// Get pasted content
|
|
847
|
+
const pasted = event.clipboardData?.getData('text/plain') || '';
|
|
848
|
+
const digitsOnly = pasted.replace(/\D/g, '');
|
|
849
|
+
if (!digitsOnly) {
|
|
850
|
+
event.preventDefault(); // Ignore invalid paste
|
|
851
|
+
return;
|
|
852
|
+
}
|
|
853
|
+
event.preventDefault(); // Stop default paste
|
|
854
|
+
// Start at current caret position
|
|
855
|
+
let pos = input.selectionStart ?? 0;
|
|
856
|
+
const chars = input.value.split('');
|
|
857
|
+
let digitIndex = 0;
|
|
858
|
+
while (pos < this.template.length && digitIndex < digitsOnly.length) {
|
|
859
|
+
if (this.template[pos] === '/') {
|
|
860
|
+
pos++;
|
|
861
|
+
continue;
|
|
862
|
+
}
|
|
863
|
+
chars[pos] = digitsOnly[digitIndex++];
|
|
864
|
+
pos++;
|
|
865
|
+
}
|
|
866
|
+
input.value = chars.join('');
|
|
867
|
+
this.emitInputEvent(input);
|
|
868
|
+
// Set caret after the last replaced character
|
|
869
|
+
this.setCaretToNextEditable(pos);
|
|
870
|
+
}
|
|
871
|
+
onCut(event) {
|
|
872
|
+
const input = this.el.nativeElement;
|
|
873
|
+
const start = input.selectionStart ?? 0;
|
|
874
|
+
const end = input.selectionEnd ?? 0;
|
|
875
|
+
// Capture the selected value (optional: log or store it)
|
|
876
|
+
const cutText = input.value.substring(start, end);
|
|
877
|
+
// Replace the selected portion with underscores (skip slashes)
|
|
878
|
+
const chars = input.value.split('');
|
|
879
|
+
for (let i = start; i < end; i++) {
|
|
880
|
+
if (this.template[i] !== '/') {
|
|
881
|
+
chars[i] = '_';
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
// Update input value
|
|
885
|
+
input.value = chars.join('');
|
|
886
|
+
this.emitInputEvent(input);
|
|
887
|
+
// Move caret to next editable position
|
|
888
|
+
this.setCaretToNextEditable(start);
|
|
889
|
+
// Prevent default cut behavior from modifying content further
|
|
890
|
+
event.preventDefault();
|
|
891
|
+
// ✅ Optionally copy to clipboard manually (optional)
|
|
892
|
+
if (event.clipboardData) {
|
|
893
|
+
event.clipboardData.setData('text/plain', cutText.replace(/\//g, ''));
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
onFocus() {
|
|
897
|
+
const input = this.el.nativeElement;
|
|
898
|
+
if (!input.value || input.value === this.template) {
|
|
899
|
+
input.value = this.template;
|
|
900
|
+
}
|
|
901
|
+
this.setCaretToNextEditable(0);
|
|
902
|
+
}
|
|
903
|
+
onClick() {
|
|
904
|
+
const input = this.el.nativeElement;
|
|
905
|
+
// Only reposition the caret if there's no selection (start === end)
|
|
906
|
+
const selectionStart = input.selectionStart ?? 0;
|
|
907
|
+
const selectionEnd = input.selectionEnd ?? 0;
|
|
908
|
+
if (selectionStart === selectionEnd) {
|
|
909
|
+
if (input.value === this.template) {
|
|
910
|
+
this.setCaretToNextEditable(0);
|
|
911
|
+
}
|
|
912
|
+
else {
|
|
913
|
+
this.setCaretToNextEditable(selectionStart);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
onKeyDown(event) {
|
|
918
|
+
const input = this.el.nativeElement;
|
|
919
|
+
let pos = input.selectionStart ?? 0;
|
|
920
|
+
const allowedCtrlShortcuts = ['a', 'c', 'x', 'v'];
|
|
921
|
+
if (event.ctrlKey && allowedCtrlShortcuts.indexOf(event.key) >= 0) {
|
|
922
|
+
if (event.key === 'x' && input.value === '') {
|
|
923
|
+
input.value = this.template;
|
|
924
|
+
this.emitInputEvent(input);
|
|
925
|
+
}
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
// Allow navigation
|
|
929
|
+
if (['ArrowLeft', 'ArrowRight', 'Tab'].includes(event.key))
|
|
930
|
+
return;
|
|
931
|
+
// Handle Backspace or Delete with selection
|
|
932
|
+
if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
933
|
+
event.preventDefault();
|
|
934
|
+
const start = input.selectionStart ?? 0;
|
|
935
|
+
const end = input.selectionEnd ?? start;
|
|
936
|
+
// If there's a selection
|
|
937
|
+
if (end > start) {
|
|
938
|
+
const chars = input.value.split('');
|
|
939
|
+
for (let i = start; i < end; i++) {
|
|
940
|
+
if (this.template[i] !== '/') {
|
|
941
|
+
chars[i] = '_';
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
input.value = chars.join('');
|
|
945
|
+
this.emitInputEvent(input);
|
|
946
|
+
this.setCaretToNextEditable(start);
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
// If no selection, handle as usual (delete previous or next char)
|
|
950
|
+
let pos = start;
|
|
951
|
+
if (event.key === 'Backspace' && pos > 0) {
|
|
952
|
+
do {
|
|
953
|
+
pos--;
|
|
954
|
+
} while (this.template[pos] === '/' && pos > 0);
|
|
955
|
+
this.replaceCharAt(input, pos, '_');
|
|
956
|
+
this.emitInputEvent(input);
|
|
957
|
+
this.setCaretToNextEditable(pos);
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
if (event.key === 'Delete' && pos < this.template.length) {
|
|
961
|
+
while (this.template[pos] === '/' && pos < this.template.length) {
|
|
962
|
+
pos++;
|
|
963
|
+
}
|
|
964
|
+
this.replaceCharAt(input, pos, '_');
|
|
965
|
+
this.emitInputEvent(input);
|
|
966
|
+
this.setCaretToNextEditable(pos);
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
// Handle Slash `/` key
|
|
971
|
+
if (event.key === '/' ||
|
|
972
|
+
event.key === '.' ||
|
|
973
|
+
event.key === '-' ||
|
|
974
|
+
event.key === ' ') {
|
|
975
|
+
event.preventDefault();
|
|
976
|
+
if (pos === 1 || pos === 4) {
|
|
977
|
+
// Typing `/` at end of day field
|
|
978
|
+
const currentVal = input.value.substring(pos - 1, pos);
|
|
979
|
+
if (!currentVal.includes('_')) {
|
|
980
|
+
this.replaceCharAt(input, pos - 1, '0');
|
|
981
|
+
this.replaceCharAt(input, pos, currentVal);
|
|
982
|
+
this.setCaretToNextEditable(pos + 2);
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
// Default: just skip to next editable section if allowed
|
|
987
|
+
this.setCaretToNextEditable(pos + 1);
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
// Handle Backspace
|
|
991
|
+
if (event.key === 'Backspace') {
|
|
992
|
+
event.preventDefault();
|
|
993
|
+
if (pos === 0)
|
|
994
|
+
return;
|
|
995
|
+
do {
|
|
996
|
+
pos--;
|
|
997
|
+
} while (this.template[pos] === '/' && pos > 0);
|
|
998
|
+
this.replaceCharAt(input, pos, '_');
|
|
999
|
+
this.setCaretToNextEditable(pos);
|
|
1000
|
+
this.emitInputEvent(input);
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
// Allow only digits
|
|
1004
|
+
if (!/^\d$/.test(event.key)) {
|
|
1005
|
+
event.preventDefault();
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
// Prevent typing beyond mask
|
|
1009
|
+
if (pos >= this.template.length) {
|
|
1010
|
+
event.preventDefault();
|
|
1011
|
+
return;
|
|
1012
|
+
}
|
|
1013
|
+
// Skip slashes forward
|
|
1014
|
+
while (this.template[pos] === '/' && pos < this.template.length) {
|
|
1015
|
+
pos++;
|
|
1016
|
+
}
|
|
1017
|
+
this.replaceCharAt(input, pos, event.key);
|
|
1018
|
+
event.preventDefault();
|
|
1019
|
+
this.setCaretToNextEditable(pos + 1);
|
|
1020
|
+
this.emitInputEvent(input);
|
|
1021
|
+
}
|
|
1022
|
+
emitInputEvent(input) {
|
|
1023
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
1024
|
+
}
|
|
1025
|
+
onBlur() {
|
|
1026
|
+
// Optionally keep the mask visible on blur — do nothing
|
|
1027
|
+
}
|
|
1028
|
+
replaceCharAt(input, index, char) {
|
|
1029
|
+
const value = input.value.split('');
|
|
1030
|
+
value[index] = char;
|
|
1031
|
+
input.value = value.join('');
|
|
1032
|
+
}
|
|
1033
|
+
setCaretToNextEditable(pos) {
|
|
1034
|
+
const input = this.el.nativeElement;
|
|
1035
|
+
while (this.template[pos] === '/' && pos < this.template.length) {
|
|
1036
|
+
pos++;
|
|
1037
|
+
}
|
|
1038
|
+
input.setSelectionRange(pos, pos);
|
|
1039
|
+
}
|
|
1040
|
+
sanitizeDateInput(input) {
|
|
1041
|
+
if (typeof input !== 'string')
|
|
1042
|
+
return '';
|
|
1043
|
+
return input
|
|
1044
|
+
.replace(/[.\s-]/g, '/') // Replace dot, space, dash with slash
|
|
1045
|
+
.replace(/[^0-9/]/g, '')
|
|
1046
|
+
.replace('//', ''); // Remove everything except digits and slash
|
|
1047
|
+
}
|
|
1048
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaDateFormatDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1049
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: OnemrvaDateFormatDirective, isStandalone: true, selector: "[onemrvaDateFormat]", host: { listeners: { "paste": "onPaste($event)", "cut": "onCut($event)", "focus": "onFocus()", "click": "onClick()", "keydown": "onKeyDown($event)", "blur": "onBlur()" } }, ngImport: i0 }); }
|
|
1050
|
+
}
|
|
1051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaDateFormatDirective, decorators: [{
|
|
1052
|
+
type: Directive,
|
|
1053
|
+
args: [{
|
|
1054
|
+
selector: '[onemrvaDateFormat]',
|
|
1055
|
+
standalone: true,
|
|
1056
|
+
}]
|
|
1057
|
+
}], propDecorators: { onPaste: [{
|
|
1058
|
+
type: HostListener,
|
|
1059
|
+
args: ['paste', ['$event']]
|
|
1060
|
+
}], onCut: [{
|
|
1061
|
+
type: HostListener,
|
|
1062
|
+
args: ['cut', ['$event']]
|
|
1063
|
+
}], onFocus: [{
|
|
1064
|
+
type: HostListener,
|
|
1065
|
+
args: ['focus']
|
|
1066
|
+
}], onClick: [{
|
|
1067
|
+
type: HostListener,
|
|
1068
|
+
args: ['click']
|
|
1069
|
+
}], onKeyDown: [{
|
|
1070
|
+
type: HostListener,
|
|
1071
|
+
args: ['keydown', ['$event']]
|
|
1072
|
+
}], onBlur: [{
|
|
1073
|
+
type: HostListener,
|
|
1074
|
+
args: ['blur']
|
|
1075
|
+
}] } });
|
|
1076
|
+
|
|
1077
|
+
class OnemRvaReadonlyDirective {
|
|
1078
|
+
constructor() {
|
|
1079
|
+
this.readonly = input(true, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
1080
|
+
}
|
|
1081
|
+
/** @hidden @internal */
|
|
1082
|
+
get isReadOnly() {
|
|
1083
|
+
return this.readonly();
|
|
1084
|
+
}
|
|
1085
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaReadonlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1086
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: OnemRvaReadonlyDirective, isStandalone: true, selector: "form[readonly], mat-checkbox[readonly], mat-radio-group[readonly], mat-form-field[readonly], onemrva-mat-input-phone[readonly],onemrva-mat-task-list[readonly],onemrva-mat-selectable-box[readonly],onemrva-mat-choice-chip[readonly],onemrva-mat-input-birthplace[readonly],onemrva-mat-input-country[readonly],onemrva-mat-input-enterprise-number[readonly]", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.onemrva-readonly": "this.isReadOnly" } }, ngImport: i0 }); }
|
|
1087
|
+
}
|
|
1088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaReadonlyDirective, decorators: [{
|
|
1089
|
+
type: Directive,
|
|
1090
|
+
args: [{
|
|
1091
|
+
selector: 'form[readonly], ' +
|
|
1092
|
+
'mat-checkbox[readonly], ' +
|
|
1093
|
+
'mat-radio-group[readonly], ' +
|
|
1094
|
+
'mat-form-field[readonly], ' +
|
|
1095
|
+
'onemrva-mat-input-phone[readonly],' +
|
|
1096
|
+
'onemrva-mat-task-list[readonly],' +
|
|
1097
|
+
'onemrva-mat-selectable-box[readonly],' +
|
|
1098
|
+
'onemrva-mat-choice-chip[readonly],' +
|
|
1099
|
+
'onemrva-mat-input-birthplace[readonly],' +
|
|
1100
|
+
'onemrva-mat-input-country[readonly],' +
|
|
1101
|
+
'onemrva-mat-input-enterprise-number[readonly]',
|
|
1102
|
+
standalone: true,
|
|
1103
|
+
}]
|
|
1104
|
+
}], propDecorators: { isReadOnly: [{
|
|
1105
|
+
type: HostBinding,
|
|
1106
|
+
args: ['class.onemrva-readonly']
|
|
1107
|
+
}] } });
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Conditionally adds component to the tree if screen width matches at least one size in input
|
|
1111
|
+
*/
|
|
1112
|
+
class OnemRvaSizeDirective {
|
|
1113
|
+
constructor() {
|
|
1114
|
+
this.size = '';
|
|
1115
|
+
}
|
|
1116
|
+
/** @hidden @internal */
|
|
1117
|
+
get _isXSmall() {
|
|
1118
|
+
return this.size === OnemrvaMatSize.XSMALL;
|
|
1119
|
+
}
|
|
1120
|
+
/** @hidden @internal */
|
|
1121
|
+
get _isSmall() {
|
|
1122
|
+
return this.size === OnemrvaMatSize.SMALL;
|
|
1123
|
+
}
|
|
1124
|
+
/** @hidden @internal */
|
|
1125
|
+
get _isLarge() {
|
|
1126
|
+
return this.size === OnemrvaMatSize.LARGE;
|
|
1127
|
+
}
|
|
1128
|
+
/** @hidden @internal */
|
|
1129
|
+
get _isXLarge() {
|
|
1130
|
+
return this.size === OnemrvaMatSize.XLARGE;
|
|
1131
|
+
}
|
|
1132
|
+
/** @hidden @internal */
|
|
1133
|
+
get _isXXLarge() {
|
|
1134
|
+
return this.size === OnemrvaMatSize.XXLARGE;
|
|
1135
|
+
}
|
|
1136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1137
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaSizeDirective, isStandalone: true, selector: "mat-icon[size], onemrva-mat-skeleton[size], onemrva-mat-avatar[size], button[size]", inputs: { size: "size" }, host: { properties: { "class.xsmall": "this._isXSmall", "class.small": "this._isSmall", "class.large": "this._isLarge", "class.xlarge": "this._isXLarge", "class.xxlarge": "this._isXXLarge" } }, ngImport: i0 }); }
|
|
1138
|
+
}
|
|
1139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaSizeDirective, decorators: [{
|
|
1140
|
+
type: Directive,
|
|
1141
|
+
args: [{
|
|
1142
|
+
selector: 'mat-icon[size], onemrva-mat-skeleton[size], onemrva-mat-avatar[size], button[size]',
|
|
1143
|
+
standalone: true,
|
|
1144
|
+
}]
|
|
1145
|
+
}], propDecorators: { size: [{
|
|
1146
|
+
type: Input
|
|
1147
|
+
}], _isXSmall: [{
|
|
1148
|
+
type: HostBinding,
|
|
1149
|
+
args: ['class.xsmall']
|
|
1150
|
+
}], _isSmall: [{
|
|
1151
|
+
type: HostBinding,
|
|
1152
|
+
args: ['class.small']
|
|
1153
|
+
}], _isLarge: [{
|
|
1154
|
+
type: HostBinding,
|
|
1155
|
+
args: ['class.large']
|
|
1156
|
+
}], _isXLarge: [{
|
|
1157
|
+
type: HostBinding,
|
|
1158
|
+
args: ['class.xlarge']
|
|
1159
|
+
}], _isXXLarge: [{
|
|
1160
|
+
type: HostBinding,
|
|
1161
|
+
args: ['class.xxlarge']
|
|
1162
|
+
}] } });
|
|
1163
|
+
|
|
1164
|
+
const directives = [
|
|
1165
|
+
DigitOnlyDirective,
|
|
1166
|
+
MatRowClickableDirective,
|
|
1167
|
+
OnemRvaClipboardDirective,
|
|
1168
|
+
OnemRvaIconRightDirective,
|
|
1169
|
+
IfWidthIsDirective,
|
|
1170
|
+
OnemRvaColorDirective,
|
|
1171
|
+
OnemrvaMaskDirective,
|
|
1172
|
+
OnemrvaDateFormatDirective,
|
|
1173
|
+
OnemRvaReadonlyDirective,
|
|
1174
|
+
];
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Get language from local storage or browser.ééééééééééééé
|
|
1178
|
+
* é
|
|
1179
|
+
* @param translateService
|
|
1180
|
+
* @param languages
|
|
1181
|
+
* @param default_language
|
|
1182
|
+
*/
|
|
1183
|
+
function setTranslationLanguage(translateService, languages = ['en', 'fr', 'nl', 'de'], default_language = 'en') {
|
|
1184
|
+
return async () => {
|
|
1185
|
+
translateService.onLangChange.subscribe(value => {
|
|
1186
|
+
localStorage.setItem('language', value.lang);
|
|
1187
|
+
});
|
|
1188
|
+
translateService.addLangs(languages);
|
|
1189
|
+
let language = localStorage.getItem('language');
|
|
1190
|
+
if (language === null || languages.indexOf(language) < 0) {
|
|
1191
|
+
// getting language from browser
|
|
1192
|
+
if (languages.indexOf(navigator.language) >= 0) {
|
|
1193
|
+
language = navigator.language;
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
// getting language from one of the browser's languages
|
|
1197
|
+
for (const lng of navigator.languages) {
|
|
1198
|
+
if (languages.indexOf(lng) >= 0) {
|
|
1199
|
+
language = lng;
|
|
1200
|
+
break;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
// getting default language
|
|
1204
|
+
if (language === null || languages.indexOf(language) < 0) {
|
|
1205
|
+
language = default_language;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
await translateService.use(language).toPromise();
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Get language from WO
|
|
1214
|
+
*
|
|
1215
|
+
* @param translateService
|
|
1216
|
+
* @param languages
|
|
1217
|
+
* @param default_language
|
|
1218
|
+
*/
|
|
1219
|
+
function setTranslationLanguageFromWO(translateService, languages = ['fr', 'nl'], default_language = 'fr') {
|
|
1220
|
+
return async () => {
|
|
1221
|
+
translateService.addLangs(languages);
|
|
1222
|
+
let language = localStorage.getItem('be_social_security_workenv_language');
|
|
1223
|
+
if (language !== null) {
|
|
1224
|
+
language = language.toLowerCase();
|
|
1225
|
+
if (languages.indexOf(language) >= 0) {
|
|
1226
|
+
await translateService.use(language).toPromise();
|
|
1227
|
+
return;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
await translateService.use(default_language).toPromise();
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
class OnemrvaTranslateCDNLoader {
|
|
1235
|
+
constructor(cdn, projects = [], prefix = '/i18n/', suffix = '.json') {
|
|
1236
|
+
this.cdn = cdn;
|
|
1237
|
+
this.projects = projects;
|
|
1238
|
+
this.prefix = prefix;
|
|
1239
|
+
this.suffix = suffix;
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Gets the translations from the server
|
|
1243
|
+
*/
|
|
1244
|
+
getTranslation(lang) {
|
|
1245
|
+
return this.cdn.getTranslations(this.projects, lang, this.prefix, this.suffix);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
class OnemrvaTranslateHttpLoader {
|
|
1250
|
+
constructor(http, prefix = '/assets/i18n/', suffix = '.json', modules = []) {
|
|
1251
|
+
this.http = http;
|
|
1252
|
+
this.prefix = prefix;
|
|
1253
|
+
this.suffix = suffix;
|
|
1254
|
+
this.modules = modules;
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Gets the translations from the server
|
|
1258
|
+
*/
|
|
1259
|
+
getTranslation(lang) {
|
|
1260
|
+
const observables = [
|
|
1261
|
+
this.http
|
|
1262
|
+
.get(`${this.prefix}${lang}${this.suffix}`)
|
|
1263
|
+
.pipe(catchError$1(() => of(null))),
|
|
1264
|
+
...this.modules.map(m => {
|
|
1265
|
+
this.http
|
|
1266
|
+
.get(`${this.prefix}${m}/${lang}${this.suffix}`)
|
|
1267
|
+
.pipe(catchError$1(() => of(null)));
|
|
1268
|
+
//console.log(`${this.prefix}${m}/${lang}${this.suffix}`);
|
|
1269
|
+
}),
|
|
1270
|
+
];
|
|
1271
|
+
return forkJoin(observables).pipe(map(all => {
|
|
1272
|
+
return all.filter(v => !!v).reduce((s, c) => ({ ...s, ...c }), {});
|
|
1273
|
+
}));
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
class OnemrvaBcePipe {
|
|
1278
|
+
transform(value) {
|
|
1279
|
+
const strOut = value.trim().replace(/\/|\.|-/g, '');
|
|
1280
|
+
if (strOut.length !== 10)
|
|
1281
|
+
return '?01?.???.???';
|
|
1282
|
+
return `${strOut.substring(0, 4)}.${strOut.substring(4, 7)}.${strOut.substring(7, 10)}`;
|
|
1283
|
+
}
|
|
1284
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaBcePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1285
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaBcePipe, isStandalone: true, name: "onemrvaBce" }); }
|
|
1286
|
+
}
|
|
1287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaBcePipe, decorators: [{
|
|
1288
|
+
type: Pipe,
|
|
1289
|
+
args: [{
|
|
1290
|
+
name: 'onemrvaBce',
|
|
1291
|
+
standalone: true,
|
|
1292
|
+
}]
|
|
1293
|
+
}] });
|
|
1294
|
+
|
|
1295
|
+
class OnemrvaNissPipe {
|
|
1296
|
+
transform(value) {
|
|
1297
|
+
const strOut = value.trim().replace(/\/|\.|-/g, '');
|
|
1298
|
+
if (strOut.length !== 11)
|
|
1299
|
+
return '??01??/???-??';
|
|
1300
|
+
return `${strOut.substring(0, 6)}/${strOut.substring(6, 9)}-${strOut.substring(9, 11)}`;
|
|
1301
|
+
}
|
|
1302
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaNissPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1303
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaNissPipe, isStandalone: true, name: "onemrvaNiss" }); }
|
|
1304
|
+
}
|
|
1305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaNissPipe, decorators: [{
|
|
1306
|
+
type: Pipe,
|
|
1307
|
+
args: [{
|
|
1308
|
+
name: 'onemrvaNiss',
|
|
1309
|
+
standalone: true,
|
|
1310
|
+
}]
|
|
1311
|
+
}] });
|
|
1312
|
+
|
|
1313
|
+
class CommonCountryLookupService {
|
|
1314
|
+
constructor() {
|
|
1315
|
+
this._countries$ = new ReplaySubject(1);
|
|
1316
|
+
this._customersInitialized = false;
|
|
1317
|
+
this.http = inject(HttpClient);
|
|
1318
|
+
this.commonCountryServiceURL = inject(LOOKUP_COUNTRY_SERVICE_URL);
|
|
1319
|
+
}
|
|
1320
|
+
getCountries(refresh = false) {
|
|
1321
|
+
if (refresh || !this._customersInitialized) {
|
|
1322
|
+
this._customersInitialized = true;
|
|
1323
|
+
this.http
|
|
1324
|
+
.get(this.commonCountryServiceURL)
|
|
1325
|
+
.subscribe(countries => {
|
|
1326
|
+
this._countries$.next(countries);
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
return this._countries$.pipe(skip(+refresh), distinctUntilChanged());
|
|
1330
|
+
}
|
|
1331
|
+
getCountryByCode(code) {
|
|
1332
|
+
return this._countries$.pipe(map$1(countries => {
|
|
1333
|
+
const country = countries.find(country => country.code === code);
|
|
1334
|
+
return country || null;
|
|
1335
|
+
}));
|
|
1336
|
+
}
|
|
1337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CommonCountryLookupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1338
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CommonCountryLookupService, providedIn: 'root' }); }
|
|
1339
|
+
}
|
|
1340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CommonCountryLookupService, decorators: [{
|
|
1341
|
+
type: Injectable,
|
|
1342
|
+
args: [{
|
|
1343
|
+
providedIn: 'root',
|
|
1344
|
+
}]
|
|
1345
|
+
}] });
|
|
1346
|
+
|
|
1347
|
+
class CacheService {
|
|
1348
|
+
setItem(key, item) {
|
|
1349
|
+
//console.log("SET " + key);
|
|
1350
|
+
item.subscribe(value => {
|
|
1351
|
+
localStorage.setItem(key, JSON.stringify(value));
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
getItem(key) {
|
|
1355
|
+
const r = localStorage.getItem(key);
|
|
1356
|
+
if (r === null) {
|
|
1357
|
+
return of(null);
|
|
1358
|
+
}
|
|
1359
|
+
return of(JSON.parse(r));
|
|
1360
|
+
}
|
|
1361
|
+
deleteItem(key) {
|
|
1362
|
+
//console.log("DELETE " + key);
|
|
1363
|
+
localStorage.removeItem(key);
|
|
1364
|
+
}
|
|
1365
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1366
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CacheService, providedIn: 'root' }); }
|
|
1367
|
+
}
|
|
1368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CacheService, decorators: [{
|
|
1369
|
+
type: Injectable,
|
|
1370
|
+
args: [{
|
|
1371
|
+
providedIn: 'root',
|
|
1372
|
+
}]
|
|
1373
|
+
}] });
|
|
1374
|
+
|
|
1375
|
+
class OnemRvaCDNService {
|
|
1376
|
+
constructor() {
|
|
1377
|
+
this.rendererFactory = inject(RendererFactory2);
|
|
1378
|
+
this.cacheService = inject(CacheService);
|
|
1379
|
+
this.http = inject(HttpClient);
|
|
1380
|
+
this.refresh$ = new Subject();
|
|
1381
|
+
const cdnUrlMode = inject(CDN_URL_MODE, {
|
|
1382
|
+
optional: true,
|
|
1383
|
+
});
|
|
1384
|
+
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
1385
|
+
switch (cdnUrlMode) {
|
|
1386
|
+
case CDNUrlModeOptions.PROD:
|
|
1387
|
+
this.cdnUrl = CDN_URLS.prod;
|
|
1388
|
+
break;
|
|
1389
|
+
case CDNUrlModeOptions.VAL:
|
|
1390
|
+
this.cdnUrl = CDN_URLS.val;
|
|
1391
|
+
break;
|
|
1392
|
+
default:
|
|
1393
|
+
this.cdnUrl = CDN_URLS.prod;
|
|
1394
|
+
}
|
|
1395
|
+
const linkElement = this.renderer.createElement('link');
|
|
1396
|
+
// Set the attributes
|
|
1397
|
+
this.renderer.setAttribute(linkElement, 'rel', 'preconnect');
|
|
1398
|
+
this.renderer.setAttribute(linkElement, 'href', this.cdnUrl);
|
|
1399
|
+
// Append the <link> element to the <head>
|
|
1400
|
+
this.renderer.appendChild(document.head, linkElement);
|
|
1401
|
+
}
|
|
1402
|
+
getUrl(path = '') {
|
|
1403
|
+
return this.cdnUrl + path;
|
|
1404
|
+
}
|
|
1405
|
+
getImg(path = '') {
|
|
1406
|
+
return this.getUrl('/img/' + path);
|
|
1407
|
+
}
|
|
1408
|
+
getOri(path = '') {
|
|
1409
|
+
return this.getImg('ori/' + path);
|
|
1410
|
+
}
|
|
1411
|
+
fetch(endpoint) {
|
|
1412
|
+
return this.http.get(this.cdnUrl + endpoint);
|
|
1413
|
+
}
|
|
1414
|
+
fetchNoCache(endpoint) {
|
|
1415
|
+
return this.http.get(this.cdnUrl + endpoint);
|
|
1416
|
+
}
|
|
1417
|
+
getTranslations(projects, lang, prefix = '', suffix = '') {
|
|
1418
|
+
const observables = [
|
|
1419
|
+
this.http
|
|
1420
|
+
.get(`${this.cdnUrl}${prefix}design-system/design-system/${lang}${suffix}`)
|
|
1421
|
+
.pipe(catchError$1(() => of({}))),
|
|
1422
|
+
...projects.map(m => {
|
|
1423
|
+
return this.http
|
|
1424
|
+
.get(`${this.cdnUrl}${prefix}${m}/${lang}${suffix}`)
|
|
1425
|
+
.pipe(catchError$1(() => {
|
|
1426
|
+
return of({});
|
|
1427
|
+
}));
|
|
1428
|
+
}),
|
|
1429
|
+
];
|
|
1430
|
+
return forkJoin(observables).pipe(map(all => {
|
|
1431
|
+
return all.filter(v => !!v).reduce((s, c) => ({ ...s, ...c }), {});
|
|
1432
|
+
}));
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* Loads a CSS file dynamically into the document head.
|
|
1436
|
+
* @param href The URL of the CSS file.
|
|
1437
|
+
* @returns A promise that resolves when the CSS file is loaded.
|
|
1438
|
+
* //
|
|
1439
|
+
*/
|
|
1440
|
+
loadCss(href) {
|
|
1441
|
+
return new Promise((resolve, reject) => {
|
|
1442
|
+
const existingLink = document.querySelector(`link[href="${href}"]`);
|
|
1443
|
+
if (existingLink) {
|
|
1444
|
+
resolve(); // CSS is already loaded
|
|
1445
|
+
return;
|
|
1446
|
+
}
|
|
1447
|
+
const link = this.renderer.createElement('link');
|
|
1448
|
+
this.renderer.setAttribute(link, 'rel', 'stylesheet');
|
|
1449
|
+
this.renderer.setAttribute(link, 'type', 'text/css');
|
|
1450
|
+
this.renderer.setAttribute(link, 'href', href);
|
|
1451
|
+
link.onload = () => resolve();
|
|
1452
|
+
link.onerror = () => reject(new Error(`Failed to load CSS: ${href}`));
|
|
1453
|
+
this.renderer.appendChild(document.head, link);
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1457
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNService, providedIn: 'root' }); }
|
|
1458
|
+
}
|
|
1459
|
+
__decorate([
|
|
1460
|
+
HttpRequestCache(cdnService => ({
|
|
1461
|
+
refreshOn: cdnService.refresh$,
|
|
1462
|
+
storage: cdnService.cacheService,
|
|
1463
|
+
ttl: 3600000,
|
|
1464
|
+
}))
|
|
1465
|
+
], OnemRvaCDNService.prototype, "fetch", null);
|
|
1466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNService, decorators: [{
|
|
1467
|
+
type: Injectable,
|
|
1468
|
+
args: [{
|
|
1469
|
+
providedIn: 'root',
|
|
1470
|
+
}]
|
|
1471
|
+
}], ctorParameters: () => [], propDecorators: { fetch: [] } });
|
|
1472
|
+
|
|
1473
|
+
class OnemRvaCDNCountryService {
|
|
1474
|
+
constructor() {
|
|
1475
|
+
this.cdnService = inject(OnemRvaCDNService);
|
|
1476
|
+
this.translateService = inject(TranslateService);
|
|
1477
|
+
}
|
|
1478
|
+
getCountries() {
|
|
1479
|
+
return this.cdnService.fetch('/json/countries.json').pipe(map(response => response), // ✅ Explicitly cast response
|
|
1480
|
+
combineLatestWith(from(this.translateService.onLangChange).pipe(startWith$1(this.translateService.currentLang ?? 'fr'), map(event => {
|
|
1481
|
+
return typeof event === 'string' ? event : event.lang;
|
|
1482
|
+
}))), map(([response, currentLang]) => {
|
|
1483
|
+
// ✅ Explicit type definition
|
|
1484
|
+
return response
|
|
1485
|
+
.map((country) => ({
|
|
1486
|
+
...country,
|
|
1487
|
+
name: this.getTranslatedCountryName(country, currentLang),
|
|
1488
|
+
}))
|
|
1489
|
+
.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()));
|
|
1490
|
+
}));
|
|
1491
|
+
}
|
|
1492
|
+
getCountriesByZone(zone) {
|
|
1493
|
+
return this.getCountries().pipe(map(countries => {
|
|
1494
|
+
return countries.filter(country => country.zone === zone);
|
|
1495
|
+
}));
|
|
1496
|
+
}
|
|
1497
|
+
getTranslatedCountryName(country, languageCode = this.translateService.currentLang) {
|
|
1498
|
+
if (languageCode === 'fr' ||
|
|
1499
|
+
languageCode === 'nl' ||
|
|
1500
|
+
languageCode === 'de') {
|
|
1501
|
+
if (country.translations[languageCode] !== undefined)
|
|
1502
|
+
return country.translations[languageCode];
|
|
1503
|
+
}
|
|
1504
|
+
return country.name;
|
|
1505
|
+
}
|
|
1506
|
+
findCountryFromCode(code) {
|
|
1507
|
+
return this.getCountries().pipe(map(countries => {
|
|
1508
|
+
return countries.find((country) => country.code.toLowerCase() === code.toLowerCase());
|
|
1509
|
+
}));
|
|
1510
|
+
}
|
|
1511
|
+
findCountryFromVIESCode(code) {
|
|
1512
|
+
return this.getCountriesByZone('EU').pipe(map(countries => {
|
|
1513
|
+
return countries.find((country) => country.pattern.substring(0, 2) === code.substring(0, 2));
|
|
1514
|
+
}));
|
|
1515
|
+
}
|
|
1516
|
+
findCountryFromPrefix(number) {
|
|
1517
|
+
return this.getCountries().pipe(map(countries => {
|
|
1518
|
+
return countries.find((country) => {
|
|
1519
|
+
return (country.dial_code === number.substring(0, country.dial_code.length));
|
|
1520
|
+
});
|
|
1521
|
+
}));
|
|
1522
|
+
}
|
|
1523
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNCountryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1524
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNCountryService, providedIn: 'root' }); }
|
|
1525
|
+
}
|
|
1526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNCountryService, decorators: [{
|
|
1527
|
+
type: Injectable,
|
|
1528
|
+
args: [{
|
|
1529
|
+
providedIn: 'root',
|
|
1530
|
+
}]
|
|
1531
|
+
}] });
|
|
1532
|
+
|
|
1533
|
+
class OnemRvaCDNMimeService {
|
|
1534
|
+
constructor() {
|
|
1535
|
+
this.cdnService = inject(OnemRvaCDNService);
|
|
1536
|
+
}
|
|
1537
|
+
static { this.mimetypeFile = '/json/mimetypes.json'; }
|
|
1538
|
+
getMimesForExtension(extensions) {
|
|
1539
|
+
return this.cdnService.fetch(OnemRvaCDNMimeService.mimetypeFile).pipe(catchError(() => {
|
|
1540
|
+
return [];
|
|
1541
|
+
}), map$1(response => {
|
|
1542
|
+
return response
|
|
1543
|
+
.filter(mime => {
|
|
1544
|
+
return extensions.includes(mime.extension);
|
|
1545
|
+
})
|
|
1546
|
+
.map(mime => {
|
|
1547
|
+
return mime.mimeType;
|
|
1548
|
+
});
|
|
1549
|
+
}));
|
|
1550
|
+
}
|
|
1551
|
+
getExtensionsForMime(mimTypes) {
|
|
1552
|
+
return this.cdnService.fetch(OnemRvaCDNMimeService.mimetypeFile).pipe(catchError(() => {
|
|
1553
|
+
return [];
|
|
1554
|
+
}), map$1(response => {
|
|
1555
|
+
return response
|
|
1556
|
+
.filter(mime => {
|
|
1557
|
+
return mimTypes.includes(mime.mimeType);
|
|
1558
|
+
})
|
|
1559
|
+
.map(mime => {
|
|
1560
|
+
return mime.extension;
|
|
1561
|
+
});
|
|
1562
|
+
}));
|
|
1563
|
+
}
|
|
1564
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNMimeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1565
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNMimeService, providedIn: 'root' }); }
|
|
1566
|
+
}
|
|
1567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaCDNMimeService, decorators: [{
|
|
1568
|
+
type: Injectable,
|
|
1569
|
+
args: [{
|
|
1570
|
+
providedIn: 'root',
|
|
1571
|
+
}]
|
|
1572
|
+
}] });
|
|
1573
|
+
|
|
1574
|
+
class OnemRvaOSMService {
|
|
1575
|
+
constructor() {
|
|
1576
|
+
this.http = inject(HttpClient);
|
|
1577
|
+
this.nominatimUrl = 'https://nominatim.openstreetmap.org/search';
|
|
1578
|
+
}
|
|
1579
|
+
searchAddress(query, countryCodes = ['be'], format = 'json', addressdetails = 1, limit = 10) {
|
|
1580
|
+
const params = new HttpParams()
|
|
1581
|
+
.set('q', query)
|
|
1582
|
+
.set('format', format)
|
|
1583
|
+
// .set('accept-language', 'fr') // TODO how do we manage multiple languages ??
|
|
1584
|
+
.set('countrycodes', countryCodes.join(','))
|
|
1585
|
+
.set('addressdetails', addressdetails)
|
|
1586
|
+
.set('limit', limit);
|
|
1587
|
+
return this.http.get(this.nominatimUrl, { params });
|
|
1588
|
+
}
|
|
1589
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaOSMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1590
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaOSMService, providedIn: 'root' }); }
|
|
1591
|
+
}
|
|
1592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaOSMService, decorators: [{
|
|
1593
|
+
type: Injectable,
|
|
1594
|
+
args: [{
|
|
1595
|
+
providedIn: 'root',
|
|
1596
|
+
}]
|
|
1597
|
+
}] });
|
|
1598
|
+
|
|
1599
|
+
class OnemrvaErrorHandler {
|
|
1600
|
+
handleError(error) {
|
|
1601
|
+
console.error(error);
|
|
1602
|
+
//alert("Error: " + error.message);
|
|
1603
|
+
// this._snackBar.open(`Error: ${error.message}`, '', {
|
|
1604
|
+
// duration: 5000,
|
|
1605
|
+
// panelClass: 'mat-primary',
|
|
1606
|
+
// horizontalPosition: this.horizontalPosition,
|
|
1607
|
+
// verticalPosition: this.verticalPosition,
|
|
1608
|
+
// });
|
|
1609
|
+
}
|
|
1610
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1611
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaErrorHandler }); }
|
|
1612
|
+
}
|
|
1613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaErrorHandler, decorators: [{
|
|
1614
|
+
type: Injectable
|
|
1615
|
+
}] });
|
|
1616
|
+
|
|
1617
|
+
class OnemrvaMissingTranslationHandler {
|
|
1618
|
+
handle(params) {
|
|
1619
|
+
return `???${params.key}???`;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
class OnemrvaValidators {
|
|
1624
|
+
static bceValidator(required = false, control) {
|
|
1625
|
+
if (control.value === null || control.value.trim() === '') {
|
|
1626
|
+
return !required ? null : { bceNull: true };
|
|
1627
|
+
}
|
|
1628
|
+
const bceCandidate = control.value.trim().replace(/\/|\.|-/g, '');
|
|
1629
|
+
if (bceCandidate.length !== 10)
|
|
1630
|
+
return { bceLengthError: { value: bceCandidate } };
|
|
1631
|
+
if (Number.isNaN(+bceCandidate))
|
|
1632
|
+
return { bceNan: { value: bceCandidate } };
|
|
1633
|
+
return null;
|
|
1634
|
+
}
|
|
1635
|
+
static bce(required = false) {
|
|
1636
|
+
return (control) => {
|
|
1637
|
+
return this.bceValidator(required, control);
|
|
1638
|
+
};
|
|
1639
|
+
}
|
|
1640
|
+
static nissValidator(required = false, control) {
|
|
1641
|
+
if (control.value === null || control.value.trim() === '') {
|
|
1642
|
+
return !required ? null : { nissNull: true };
|
|
1643
|
+
}
|
|
1644
|
+
const nissCandidate = control.value.trim().replace(/\/|\.|-/g, '');
|
|
1645
|
+
if (nissCandidate.length !== 11) {
|
|
1646
|
+
return { nissLengthError: { value: nissCandidate } };
|
|
1647
|
+
}
|
|
1648
|
+
if (Number.isNaN(+nissCandidate)) {
|
|
1649
|
+
return { nissNan: { value: nissCandidate } };
|
|
1650
|
+
}
|
|
1651
|
+
// Niss day and year are actual values, the month can be different according to the logic below
|
|
1652
|
+
// [20-32] & [40-52] => foreigners & temporary NISS values
|
|
1653
|
+
// it is not necessary to check for the actual date to be valid
|
|
1654
|
+
const checksumValue = nissCandidate.substring(9);
|
|
1655
|
+
const nissNumbersToCheck = nissCandidate.substring(0, 9);
|
|
1656
|
+
const isValidChecksumYear1900 = 97 - (+nissNumbersToCheck % 97) === +checksumValue;
|
|
1657
|
+
const isValidChecksumYear2000 = 97 - (+`2${nissNumbersToCheck}` % 97) === +checksumValue;
|
|
1658
|
+
if (!isValidChecksumYear1900 && !isValidChecksumYear2000) {
|
|
1659
|
+
return { nissCheckDigitError: { value: nissCandidate } };
|
|
1660
|
+
}
|
|
1661
|
+
/*
|
|
1662
|
+
Below checks aren't really necessary but are here to exclude even more potential errors
|
|
1663
|
+
We could still improve this to include february days & 30 day months + the real potential ranges
|
|
1664
|
+
*/
|
|
1665
|
+
const monthString = nissCandidate.substring(2, 4);
|
|
1666
|
+
const month = parseInt(monthString) - 1;
|
|
1667
|
+
const real_month = (parseInt(monthString) % 20) - 1;
|
|
1668
|
+
if (real_month > 11 || month > 51) {
|
|
1669
|
+
return { nissInvalidMonth: { value: nissCandidate } };
|
|
1670
|
+
}
|
|
1671
|
+
const day = +nissCandidate.substring(4, 6);
|
|
1672
|
+
if (day > 31) {
|
|
1673
|
+
return { nissInvalidDate: { value: nissCandidate } };
|
|
1674
|
+
}
|
|
1675
|
+
return null;
|
|
1676
|
+
}
|
|
1677
|
+
static niss(required = false) {
|
|
1678
|
+
return (control) => {
|
|
1679
|
+
return this.nissValidator(required, control);
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
static nissOrBce(required = false) {
|
|
1683
|
+
return (control) => {
|
|
1684
|
+
if (control.value === null || control.value.trim() === '')
|
|
1685
|
+
return !required ? null : { nissNull: true };
|
|
1686
|
+
const nissCandidate = control.value.trim().replace(/\/|\.|-/g, '');
|
|
1687
|
+
if (control.value.length === 11) {
|
|
1688
|
+
return this.nissValidator(required, control);
|
|
1689
|
+
}
|
|
1690
|
+
else if (control.value.length === 10) {
|
|
1691
|
+
return this.bceValidator(required, control);
|
|
1692
|
+
}
|
|
1693
|
+
return { lengthError: { value: nissCandidate } };
|
|
1694
|
+
};
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
const IBAN_SUPPORTED_COUNTRIES = Object.entries(countrySpecs)
|
|
1699
|
+
.filter(value => {
|
|
1700
|
+
return value[1].IBANRegistry;
|
|
1701
|
+
})
|
|
1702
|
+
.map(value => {
|
|
1703
|
+
return value[0];
|
|
1704
|
+
});
|
|
1705
|
+
const SEPA_ONLY_SUPPORTED_COUNTRIES = Object.entries(countrySpecs)
|
|
1706
|
+
.filter(value => {
|
|
1707
|
+
return value[1].SEPA;
|
|
1708
|
+
})
|
|
1709
|
+
.map(value => {
|
|
1710
|
+
return value[0];
|
|
1711
|
+
});
|
|
1712
|
+
const internValidateIban = (iban = '') => {
|
|
1713
|
+
return validateIBAN(electronicFormatIBAN(iban) || undefined);
|
|
1714
|
+
};
|
|
1715
|
+
// const getMappedCodes = (errorCodes: ValidationErrorsIBAN[], value?: any) => {
|
|
1716
|
+
// const mappedCodes = errorCodes.map(code => ValidationErrorsIBAN[code]);
|
|
1717
|
+
//
|
|
1718
|
+
// if (mappedCodes.length > 0) {
|
|
1719
|
+
// const listCodes: Record<string, any> = {};
|
|
1720
|
+
//
|
|
1721
|
+
// mappedCodes.forEach((code: string) => {
|
|
1722
|
+
// listCodes[code] = { value };
|
|
1723
|
+
// });
|
|
1724
|
+
//
|
|
1725
|
+
// return listCodes as ValidationErrors;
|
|
1726
|
+
// }
|
|
1727
|
+
//
|
|
1728
|
+
// return null;
|
|
1729
|
+
// };
|
|
1730
|
+
const bankAccountValidator = (allowEmptyCountry = true) => {
|
|
1731
|
+
return (control) => {
|
|
1732
|
+
let finalErrorCodes = [];
|
|
1733
|
+
if (typeof control.getRawValue() === 'string') {
|
|
1734
|
+
const regex = /^[a-zA-Z]{2}/;
|
|
1735
|
+
if (regex.test(control.getRawValue().substring(0, 2))) {
|
|
1736
|
+
const { valid: _valid, errorCodes } = internValidateIban(control.value);
|
|
1737
|
+
finalErrorCodes = errorCodes;
|
|
1738
|
+
}
|
|
1739
|
+
else if (!allowEmptyCountry) {
|
|
1740
|
+
finalErrorCodes.push(ValidationErrorsIBAN.NoIBANCountry);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
else {
|
|
1744
|
+
const countryCodeValue = control.value !== null ? control.value['countryCode'] : '';
|
|
1745
|
+
const bankNumber = control.value !== null ? control.value['bban'] : '';
|
|
1746
|
+
if (countryCodeValue !== '') {
|
|
1747
|
+
const { valid: _valid, errorCodes } = internValidateIban(`${countryCodeValue}${bankNumber}`);
|
|
1748
|
+
finalErrorCodes = errorCodes;
|
|
1749
|
+
}
|
|
1750
|
+
else if (!allowEmptyCountry) {
|
|
1751
|
+
//
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
if (finalErrorCodes.length === 0) {
|
|
1755
|
+
return null;
|
|
1756
|
+
}
|
|
1757
|
+
const validationErrors = {};
|
|
1758
|
+
finalErrorCodes.forEach(errCode => {
|
|
1759
|
+
const key = ValidationErrorsIBAN[errCode];
|
|
1760
|
+
validationErrors[key] = { value: control.getRawValue() };
|
|
1761
|
+
});
|
|
1762
|
+
return validationErrors;
|
|
1763
|
+
};
|
|
1764
|
+
};
|
|
1765
|
+
|
|
1766
|
+
class OnemrvaSharedModule {
|
|
1767
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1768
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, imports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, OnemRvaReadonlyDirective], exports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, OnemRvaReadonlyDirective] }); }
|
|
1769
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule }); }
|
|
1770
|
+
}
|
|
1771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, decorators: [{
|
|
1772
|
+
type: NgModule,
|
|
1773
|
+
args: [{
|
|
1774
|
+
imports: [...directives],
|
|
1775
|
+
exports: [...directives],
|
|
1776
|
+
}]
|
|
1777
|
+
}] });
|
|
1778
|
+
|
|
1779
|
+
class OnemrvaNativeDateAdapter extends NativeDateAdapter {
|
|
1780
|
+
constructor() {
|
|
1781
|
+
super();
|
|
1782
|
+
this.translateService = inject(TranslateService);
|
|
1783
|
+
this.destroyNotifier$ = new Subject();
|
|
1784
|
+
this.localeChanges = new Subject();
|
|
1785
|
+
this.setLocale(this.translateService.currentLang);
|
|
1786
|
+
this.localeChanges.next(this);
|
|
1787
|
+
if (this.translateService !== undefined) {
|
|
1788
|
+
this.translateService.onLangChange
|
|
1789
|
+
.pipe(takeUntil(this.destroyNotifier$))
|
|
1790
|
+
.subscribe(({ lang }) => {
|
|
1791
|
+
this.setLocale(lang);
|
|
1792
|
+
this.localeChanges.next(this);
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
format(date, formats) {
|
|
1797
|
+
const dt = DateTime.fromJSDate(date);
|
|
1798
|
+
return dt.toFormat(formats);
|
|
1799
|
+
}
|
|
1800
|
+
parse(value) {
|
|
1801
|
+
const formats = ONEMRVA_MAT_NATIVE_DATE_FORMAT;
|
|
1802
|
+
if (value && typeof value === 'string') {
|
|
1803
|
+
value = value.replace(/\D/g, '/');
|
|
1804
|
+
}
|
|
1805
|
+
if (value === null || value === '') {
|
|
1806
|
+
return null;
|
|
1807
|
+
}
|
|
1808
|
+
const dt = DateTime.fromFormat(value, formats.display.dateInput, {
|
|
1809
|
+
locale: this.locale,
|
|
1810
|
+
});
|
|
1811
|
+
if (dt.isValid) {
|
|
1812
|
+
return dt.toJSDate();
|
|
1813
|
+
}
|
|
1814
|
+
for (const format of formats.parse.dateInput) {
|
|
1815
|
+
const parsed = DateTime.fromFormat(value, format, {
|
|
1816
|
+
locale: this.locale,
|
|
1817
|
+
});
|
|
1818
|
+
if (parsed.isValid) {
|
|
1819
|
+
return parsed.toJSDate();
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
return this.invalid();
|
|
1823
|
+
}
|
|
1824
|
+
getFirstDayOfWeek() {
|
|
1825
|
+
return 1;
|
|
1826
|
+
}
|
|
1827
|
+
ngOnDestroy() {
|
|
1828
|
+
this.destroyNotifier$.next();
|
|
1829
|
+
this.destroyNotifier$.complete();
|
|
1830
|
+
}
|
|
1831
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaNativeDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1832
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaNativeDateAdapter }); }
|
|
1833
|
+
}
|
|
1834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaNativeDateAdapter, decorators: [{
|
|
1835
|
+
type: Injectable
|
|
1836
|
+
}], ctorParameters: () => [] });
|
|
1837
|
+
|
|
1838
|
+
/** InjectionToken for LuxonDateAdapter to configure options. */
|
|
1839
|
+
const MAT_LUXON_DATE_ADAPTER_OPTIONS = new InjectionToken('MAT_LUXON_DATE_ADAPTER_OPTIONS', {
|
|
1840
|
+
providedIn: 'root',
|
|
1841
|
+
factory: MAT_LUXON_DATE_ADAPTER_OPTIONS_FACTORY,
|
|
1842
|
+
});
|
|
1843
|
+
/** @docs-private */
|
|
1844
|
+
function MAT_LUXON_DATE_ADAPTER_OPTIONS_FACTORY() {
|
|
1845
|
+
return {
|
|
1846
|
+
useUtc: false,
|
|
1847
|
+
firstDayOfWeek: 0,
|
|
1848
|
+
defaultOutputCalendar: 'gregory',
|
|
1849
|
+
};
|
|
1850
|
+
}
|
|
1851
|
+
/** Creates an array and fills it with values. */
|
|
1852
|
+
function luxonRange(length, valueFunction) {
|
|
1853
|
+
const valuesArray = Array(length);
|
|
1854
|
+
for (let i = 0; i < length; i++) {
|
|
1855
|
+
valuesArray[i] = valueFunction(i);
|
|
1856
|
+
}
|
|
1857
|
+
return valuesArray;
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
/**
|
|
1861
|
+
* @license
|
|
1862
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1863
|
+
*
|
|
1864
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1865
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
1866
|
+
*/
|
|
1867
|
+
/** Adapts Luxon Dates for use with Angular Material. */
|
|
1868
|
+
class OnemrvaLuxonDateAdapter extends DateAdapter {
|
|
1869
|
+
constructor() {
|
|
1870
|
+
super();
|
|
1871
|
+
this.translateService = inject(TranslateService);
|
|
1872
|
+
const dateLocale = inject(MAT_DATE_LOCALE, { optional: true });
|
|
1873
|
+
const options = inject(MAT_LUXON_DATE_ADAPTER_OPTIONS, {
|
|
1874
|
+
optional: true,
|
|
1875
|
+
});
|
|
1876
|
+
this._useUTC = !!options?.useUtc;
|
|
1877
|
+
this._firstDayOfWeek = options?.firstDayOfWeek || 0;
|
|
1878
|
+
this._defaultOutputCalendar = options?.defaultOutputCalendar || 'gregory';
|
|
1879
|
+
this.setLocale(dateLocale || DateTime.local().locale);
|
|
1880
|
+
this.setLocale(this.translateService.currentLang);
|
|
1881
|
+
if (this.translateService !== undefined) {
|
|
1882
|
+
this.translateService.onLangChange
|
|
1883
|
+
.pipe(takeUntilDestroyed())
|
|
1884
|
+
.subscribe(({ lang }) => {
|
|
1885
|
+
this.setLocale(lang);
|
|
1886
|
+
});
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
getYear(date) {
|
|
1890
|
+
return date.year;
|
|
1891
|
+
}
|
|
1892
|
+
getMonth(date) {
|
|
1893
|
+
// Luxon works with 1-indexed months whereas our code expects 0-indexed.
|
|
1894
|
+
return date.month - 1;
|
|
1895
|
+
}
|
|
1896
|
+
getDate(date) {
|
|
1897
|
+
return date.day;
|
|
1898
|
+
}
|
|
1899
|
+
getDayOfWeek(date) {
|
|
1900
|
+
return date.weekday;
|
|
1901
|
+
}
|
|
1902
|
+
getMonthNames(style) {
|
|
1903
|
+
// Adding outputCalendar option, because LuxonInfo doesn't get effected by LuxonSettings
|
|
1904
|
+
return Info.months(style, {
|
|
1905
|
+
locale: this.locale,
|
|
1906
|
+
outputCalendar: this._defaultOutputCalendar,
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
getDateNames() {
|
|
1910
|
+
// At the time of writing, Luxon doesn't offer similar
|
|
1911
|
+
// functionality so we have to fall back to the Intl API.
|
|
1912
|
+
const dtf = new Intl.DateTimeFormat(this.locale, {
|
|
1913
|
+
day: 'numeric',
|
|
1914
|
+
timeZone: 'utc',
|
|
1915
|
+
});
|
|
1916
|
+
// Format a UTC date in order to avoid DST issues.
|
|
1917
|
+
return luxonRange(31, i => dtf.format(DateTime.utc(2017, 1, i + 1).toJSDate()));
|
|
1918
|
+
}
|
|
1919
|
+
getDayOfWeekNames(style) {
|
|
1920
|
+
// Note that we shift the array once, because Luxon returns Monday as the
|
|
1921
|
+
// first day of the week, whereas our logic assumes that it's Sunday. See:
|
|
1922
|
+
// https://moment.github.io/luxon/api-docs/index.html#infoweekdays
|
|
1923
|
+
const days = Info.weekdays(style, { locale: this.locale });
|
|
1924
|
+
days.unshift(days.pop());
|
|
1925
|
+
return days;
|
|
1926
|
+
}
|
|
1927
|
+
getYearName(date) {
|
|
1928
|
+
return date.toFormat('yyyy', this._getOptions());
|
|
1929
|
+
}
|
|
1930
|
+
getFirstDayOfWeek() {
|
|
1931
|
+
return this._firstDayOfWeek;
|
|
1932
|
+
}
|
|
1933
|
+
getNumDaysInMonth(date) {
|
|
1934
|
+
return date.daysInMonth;
|
|
1935
|
+
}
|
|
1936
|
+
clone(date) {
|
|
1937
|
+
return DateTime.fromObject(date.toObject(), this._getOptions());
|
|
1938
|
+
}
|
|
1939
|
+
createDate(year, month, date) {
|
|
1940
|
+
const options = this._getOptions();
|
|
1941
|
+
if (month < 0 || month > 11) {
|
|
1942
|
+
throw Error(`Invalid month index "${month}". Month index has to be between 0 and 11.`);
|
|
1943
|
+
}
|
|
1944
|
+
if (date < 1) {
|
|
1945
|
+
throw Error(`Invalid date "${date}". Date has to be greater than 0.`);
|
|
1946
|
+
}
|
|
1947
|
+
// Luxon uses 1-indexed months so we need to add one to the month.
|
|
1948
|
+
const result = this._useUTC
|
|
1949
|
+
? DateTime.utc(year, month + 1, date, options)
|
|
1950
|
+
: DateTime.local(year, month + 1, date, options);
|
|
1951
|
+
if (!this.isValid(result)) {
|
|
1952
|
+
throw Error(`Invalid date "${date}". Reason: "${result.invalidReason}".`);
|
|
1953
|
+
}
|
|
1954
|
+
return result;
|
|
1955
|
+
}
|
|
1956
|
+
today() {
|
|
1957
|
+
const options = this._getOptions();
|
|
1958
|
+
return this._useUTC
|
|
1959
|
+
? DateTime.utc(options)
|
|
1960
|
+
: DateTime.local(options);
|
|
1961
|
+
}
|
|
1962
|
+
parse(value, parseFormat) {
|
|
1963
|
+
const options = this._getOptions();
|
|
1964
|
+
if (typeof value == 'string' && value.length > 0) {
|
|
1965
|
+
// This is screwing things up as 062005 would become 05 0602
|
|
1966
|
+
// const iso8601Date = LuxonDateTime.fromISO(value, options);
|
|
1967
|
+
//
|
|
1968
|
+
// if (this.isValid(iso8601Date)) {
|
|
1969
|
+
// console.log(iso8601Date);
|
|
1970
|
+
// return iso8601Date;
|
|
1971
|
+
// }
|
|
1972
|
+
const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];
|
|
1973
|
+
if (!parseFormat.length) {
|
|
1974
|
+
throw Error('Formats array must not be empty.');
|
|
1975
|
+
}
|
|
1976
|
+
for (const format of formats) {
|
|
1977
|
+
const fromFormat = DateTime.fromFormat(value, format, options);
|
|
1978
|
+
if (this.isValid(fromFormat)) {
|
|
1979
|
+
return fromFormat;
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
return this.invalid();
|
|
1983
|
+
}
|
|
1984
|
+
else if (typeof value === 'number') {
|
|
1985
|
+
return DateTime.fromMillis(value, options);
|
|
1986
|
+
}
|
|
1987
|
+
else if (value instanceof Date) {
|
|
1988
|
+
return DateTime.fromJSDate(value, options);
|
|
1989
|
+
}
|
|
1990
|
+
else if (value instanceof DateTime) {
|
|
1991
|
+
return DateTime.fromMillis(value.toMillis(), options);
|
|
1992
|
+
}
|
|
1993
|
+
return null;
|
|
1994
|
+
}
|
|
1995
|
+
format(date, displayFormat) {
|
|
1996
|
+
if (!this.isValid(date)) {
|
|
1997
|
+
throw Error('LuxonDateAdapter: Cannot format invalid date.');
|
|
1998
|
+
}
|
|
1999
|
+
if (this._useUTC) {
|
|
2000
|
+
return date.setLocale(this.locale).setZone('utc').toFormat(displayFormat);
|
|
2001
|
+
}
|
|
2002
|
+
else {
|
|
2003
|
+
return date.setLocale(this.locale).toFormat(displayFormat);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
addCalendarYears(date, years) {
|
|
2007
|
+
return date.reconfigure(this._getOptions()).plus({ years });
|
|
2008
|
+
}
|
|
2009
|
+
addCalendarMonths(date, months) {
|
|
2010
|
+
return date.reconfigure(this._getOptions()).plus({ months });
|
|
2011
|
+
}
|
|
2012
|
+
addCalendarDays(date, days) {
|
|
2013
|
+
return date.reconfigure(this._getOptions()).plus({ days });
|
|
2014
|
+
}
|
|
2015
|
+
toIso8601(date) {
|
|
2016
|
+
return date.toISO();
|
|
2017
|
+
}
|
|
2018
|
+
/**
|
|
2019
|
+
* Returns the given value if given a valid Luxon or null. Deserializes valid ISO 8601 strings
|
|
2020
|
+
* (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid DateTime and empty
|
|
2021
|
+
* string into null. Returns an invalid date for all other values.
|
|
2022
|
+
*/
|
|
2023
|
+
deserialize(value) {
|
|
2024
|
+
const options = this._getOptions();
|
|
2025
|
+
let date;
|
|
2026
|
+
if (value instanceof Date) {
|
|
2027
|
+
date = DateTime.fromJSDate(value, options);
|
|
2028
|
+
}
|
|
2029
|
+
if (typeof value === 'string') {
|
|
2030
|
+
if (!value) {
|
|
2031
|
+
return null;
|
|
2032
|
+
}
|
|
2033
|
+
date = DateTime.fromISO(value, options);
|
|
2034
|
+
}
|
|
2035
|
+
if (date && this.isValid(date)) {
|
|
2036
|
+
return date;
|
|
2037
|
+
}
|
|
2038
|
+
return super.deserialize(value);
|
|
2039
|
+
}
|
|
2040
|
+
isDateInstance(obj) {
|
|
2041
|
+
return obj instanceof DateTime;
|
|
2042
|
+
}
|
|
2043
|
+
isValid(date) {
|
|
2044
|
+
return date.isValid;
|
|
2045
|
+
}
|
|
2046
|
+
invalid() {
|
|
2047
|
+
return DateTime.invalid('Invalid Luxon DateTime object.');
|
|
2048
|
+
}
|
|
2049
|
+
setTime(target, hours, minutes, seconds) {
|
|
2050
|
+
//if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2051
|
+
if (hours < 0 || hours > 23) {
|
|
2052
|
+
throw Error(`Invalid hours "${hours}". Hours value must be between 0 and 23.`);
|
|
2053
|
+
}
|
|
2054
|
+
if (minutes < 0 || minutes > 59) {
|
|
2055
|
+
throw Error(`Invalid minutes "${minutes}". Minutes value must be between 0 and 59.`);
|
|
2056
|
+
}
|
|
2057
|
+
if (seconds < 0 || seconds > 59) {
|
|
2058
|
+
throw Error(`Invalid seconds "${seconds}". Seconds value must be between 0 and 59.`);
|
|
2059
|
+
}
|
|
2060
|
+
//}
|
|
2061
|
+
return this.clone(target).set({
|
|
2062
|
+
hour: hours,
|
|
2063
|
+
minute: minutes,
|
|
2064
|
+
second: seconds,
|
|
2065
|
+
millisecond: 0,
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2068
|
+
getHours(date) {
|
|
2069
|
+
return date.hour;
|
|
2070
|
+
}
|
|
2071
|
+
getMinutes(date) {
|
|
2072
|
+
return date.minute;
|
|
2073
|
+
}
|
|
2074
|
+
getSeconds(date) {
|
|
2075
|
+
return date.second;
|
|
2076
|
+
}
|
|
2077
|
+
parseTime(value, parseFormat) {
|
|
2078
|
+
const result = this.parse(value, parseFormat);
|
|
2079
|
+
if ((!result || !this.isValid(result)) && typeof value === 'string') {
|
|
2080
|
+
// It seems like Luxon doesn't work well cross-browser for strings that have
|
|
2081
|
+
// additional characters around the time. Try parsing without those characters.
|
|
2082
|
+
return (this.parse(value.replace(/[^0-9:(AM|PM)]/gi, ''), parseFormat) || result);
|
|
2083
|
+
}
|
|
2084
|
+
return result;
|
|
2085
|
+
}
|
|
2086
|
+
addSeconds(date, amount) {
|
|
2087
|
+
return date.reconfigure(this._getOptions()).plus({ seconds: amount });
|
|
2088
|
+
}
|
|
2089
|
+
/** Gets the options that should be used when constructing a new `DateTime` object. */
|
|
2090
|
+
_getOptions() {
|
|
2091
|
+
return {
|
|
2092
|
+
zone: this._useUTC ? 'utc' : undefined,
|
|
2093
|
+
locale: this.locale,
|
|
2094
|
+
outputCalendar: this._defaultOutputCalendar,
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaLuxonDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2098
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaLuxonDateAdapter }); }
|
|
2099
|
+
}
|
|
2100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaLuxonDateAdapter, decorators: [{
|
|
2101
|
+
type: Injectable
|
|
2102
|
+
}], ctorParameters: () => [] });
|
|
2103
|
+
|
|
2104
|
+
function onemrvaDateNativeYearMonthProvider() {
|
|
2105
|
+
return [
|
|
2106
|
+
{
|
|
2107
|
+
provide: MAT_DATE_FORMATS,
|
|
2108
|
+
useValue: ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT,
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
provide: DateAdapter,
|
|
2112
|
+
useClass: OnemrvaNativeDateAdapter,
|
|
2113
|
+
},
|
|
2114
|
+
];
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
function onemrvaDateNativeProvider() {
|
|
2118
|
+
return [
|
|
2119
|
+
{
|
|
2120
|
+
provide: MAT_DATE_FORMATS,
|
|
2121
|
+
useValue: ONEMRVA_MAT_NATIVE_DATE_FORMAT,
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
provide: DateAdapter,
|
|
2125
|
+
useClass: OnemrvaNativeDateAdapter,
|
|
2126
|
+
},
|
|
2127
|
+
];
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
function onemrvaDateLuxonProvider() {
|
|
2131
|
+
return [
|
|
2132
|
+
{
|
|
2133
|
+
provide: MAT_DATE_FORMATS,
|
|
2134
|
+
useValue: ONEMRVA_MAT_LUXON_DATE_FORMATS,
|
|
2135
|
+
},
|
|
2136
|
+
{
|
|
2137
|
+
provide: DateAdapter,
|
|
2138
|
+
useClass: OnemrvaLuxonDateAdapter,
|
|
2139
|
+
},
|
|
2140
|
+
];
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
function onemrvaDateLuxonYearMonthProvider() {
|
|
2144
|
+
return [
|
|
2145
|
+
{
|
|
2146
|
+
provide: MAT_DATE_FORMATS,
|
|
2147
|
+
useValue: ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS,
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
provide: DateAdapter,
|
|
2151
|
+
useClass: OnemrvaLuxonDateAdapter,
|
|
2152
|
+
},
|
|
2153
|
+
];
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
// import { MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
2157
|
+
// import { ONEMRVA_THEME_CLASS } from '@onemrvapublic/design-system/shared';
|
|
2158
|
+
function onemrvaThemeProvider() {
|
|
2159
|
+
return [
|
|
2160
|
+
{
|
|
2161
|
+
provide: ErrorHandler,
|
|
2162
|
+
useClass: OnemrvaErrorHandler,
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
2166
|
+
useValue: {
|
|
2167
|
+
appearance: 'outline',
|
|
2168
|
+
floatLabel: 'always',
|
|
2169
|
+
subscriptSizing: 'dynamic',
|
|
2170
|
+
},
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
provide: OverlayContainer,
|
|
2174
|
+
useClass: WebComponentOverlayContainer,
|
|
2175
|
+
},
|
|
2176
|
+
];
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
/*
|
|
2180
|
+
* Public API Surface of shared
|
|
2181
|
+
*/
|
|
2182
|
+
|
|
2183
|
+
/**
|
|
2184
|
+
* Generated bundle index. Do not edit.
|
|
2185
|
+
*/
|
|
2186
|
+
|
|
2187
|
+
export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, CacheService, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, LOOKUP_COUNTRY_SERVICE_URL, LOOKUP_COUNTRY_URL, MatRowClickableDirective, NISS_MASK, ONEMRVA_MAT_LUXON_DATE_FORMATS, ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS, ONEMRVA_MAT_NATIVE_DATE_FORMAT, ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT, ONEMRVA_THEME, ONEMRVA_THEME_CLASS, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemRvaOSMService, OnemRvaReadonlyDirective, OnemRvaSizeDirective, OnemrvaBcePipe, OnemrvaDateFormatDirective, OnemrvaErrorHandler, OnemrvaLuxonDateAdapter, OnemrvaMaskDirective, OnemrvaMissingTranslationHandler, OnemrvaNativeDateAdapter, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, RequestTimes, SEPA_ONLY_SUPPORTED_COUNTRIES, WebComponentOverlayContainer, bankAccountValidator, directives, onemrvaDateLuxonProvider, onemrvaDateLuxonYearMonthProvider, onemrvaDateNativeProvider, onemrvaDateNativeYearMonthProvider, onemrvaThemeProvider, setTranslationLanguage, setTranslationLanguageFromWO };
|
|
2188
|
+
//# sourceMappingURL=onemrvapublic-design-system-shared.mjs.map
|