@onemrvapublic/design-system 1.0.0-beta.4 → 1.0.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/assets/i18n/de.json +84 -12
- package/assets/i18n/en.json +78 -6
- package/assets/i18n/fr.json +79 -7
- package/assets/i18n/nl.json +84 -12
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs +49 -0
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-layout.mjs +948 -0
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs +111 -0
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs +318 -0
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs +125 -0
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs +208 -0
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs +84 -0
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs +90 -0
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +33 -0
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs +211 -0
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs +42 -0
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +810 -0
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +138 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +135 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +98 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +189 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +308 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +295 -0
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs +210 -0
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs +225 -0
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs +169 -0
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +103 -0
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs +269 -0
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs +185 -0
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs +118 -0
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs +52 -0
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs +612 -0
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs +96 -0
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs +72 -0
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs +241 -0
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs +65 -0
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs +146 -0
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs +36 -0
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs +232 -0
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs +170 -0
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs +1363 -0
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs +73 -0
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs +166 -0
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-page-error.mjs +80 -0
- package/fesm2022/onemrvapublic-design-system-page-error.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs +211 -0
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-shared.mjs +2188 -0
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system-utils.mjs +35 -0
- package/fesm2022/onemrvapublic-design-system-utils.mjs.map +1 -0
- package/fesm2022/onemrvapublic-design-system.mjs +10573 -0
- package/fesm2022/onemrvapublic-design-system.mjs.map +1 -0
- package/flag-icon/index.d.ts +18 -0
- package/flag-icon/src/flag-icon.component.scss +12 -0
- package/index.d.ts +3140 -0
- package/layout/index.d.ts +293 -0
- package/layout/src/components/layout/layout.component.scss +90 -80
- package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.scss +3 -2
- package/layout/src/components/layout-drawer-content/layout-drawer-content.component.scss +9 -0
- package/layout/src/components/layout-drawer-title/layout-drawer-title.component.scss +9 -5
- package/layout/src/components/layout-left-sidenav/layout-left-sidenav.component.scss +5 -0
- package/layout/src/components/layout-sidenav/layout-sidenav.component.scss +43 -0
- package/layout/src/index.scss +0 -1
- package/mat-address/index.d.ts +36 -0
- package/mat-address/src/onemrva-address.scss +14 -0
- package/mat-avatar/index.d.ts +187 -0
- package/mat-avatar/src/onemrva-mat-avatar.component.scss +79 -123
- package/mat-breadcrumb/index.d.ts +40 -0
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.scss +39 -53
- package/mat-carousel/index.d.ts +52 -0
- package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.scss +10 -0
- package/mat-carousel/src/onemrva-mat-carousel.component.scss +38 -45
- package/mat-choice-chip/index.d.ts +20 -0
- package/mat-choice-chip/src/onemrva-mat-choice-chip.component.scss +83 -0
- package/mat-copy-to-clipboard/index.d.ts +26 -0
- package/mat-country-item/index.d.ts +10 -0
- package/{mat-input-birthplace/src/country-item.component.scss → mat-country-item/src/onemrva-mat-country-item.component.scss} +6 -1
- package/mat-datepicker-header/index.d.ts +44 -0
- package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.scss +8 -0
- package/mat-empty-row/index.d.ts +19 -0
- package/mat-empty-row/src/onemrva-mat-empty-row.component.scss +29 -0
- package/mat-file-upload/index.d.ts +301 -0
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.scss +48 -16
- package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.scss +72 -218
- package/mat-input-address/index.d.ts +32 -0
- package/mat-input-address/src/onemrva-mat-input-address.component.scss +8 -0
- package/mat-input-birthplace/index.d.ts +36 -0
- package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.scss +4 -2
- package/mat-input-country/index.d.ts +32 -0
- package/mat-input-country/src/onemrva-mat-input-country.component.scss +13 -0
- package/mat-input-enterprise-number/index.d.ts +37 -0
- package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.scss +7 -0
- package/mat-input-iban/index.d.ts +79 -0
- package/mat-input-iban/src/onemrva-mat-input-iban.component.scss +10 -0
- package/mat-input-phone/index.d.ts +44 -0
- package/mat-message-box/index.d.ts +101 -0
- package/mat-message-box/src/onemrva-mat-message-box.component.scss +13 -65
- package/mat-multi-select/index.d.ts +57 -0
- package/mat-multi-select/src/onemrva-mat-multi-select.component.scss +35 -0
- package/mat-navigation/index.d.ts +54 -0
- package/mat-navigation/src/mat-navigation-item/onemrva-mat-navigation-item.component.scss +66 -0
- package/mat-navigation/src/onemrva-mat-navigation.component.scss +36 -0
- package/mat-notification/index.d.ts +43 -0
- package/mat-notification/src/onemrva-mat-notification.component.scss +26 -0
- package/mat-paginator/index.d.ts +58 -0
- package/mat-paginator/src/onemrva-mat-paginator.component.scss +146 -0
- package/mat-panel/index.d.ts +66 -0
- package/mat-panel/src/mat-expansion-panel-header-arrow-divider.scss +11 -0
- package/mat-panel/src/onemrva-mat-panel-content.scss +8 -0
- package/mat-panel/src/onemrva-mat-panel-icon.scss +7 -0
- package/mat-panel/src/onemrva-mat-panel-title.scss +13 -0
- package/mat-panel/src/onemrva-mat-panel.component.scss +75 -82
- package/mat-pop-over/index.d.ts +40 -0
- package/mat-pop-over/src/onemrva-mat-pop-over.component.scss +11 -11
- package/mat-progress-bar/index.d.ts +18 -0
- package/mat-progress-bar/src/onemrva-mat-progress-bar.component.scss +26 -0
- package/mat-select-search/index.d.ts +197 -0
- package/mat-select-search/src/mat-select-search.component.scss +62 -109
- package/mat-selectable-box/index.d.ts +29 -0
- package/mat-selectable-box/src/onemrva-mat-selectable-box.component.scss +68 -90
- package/mat-side-menu/index.d.ts +33 -0
- package/mat-side-menu/src/onemrva-mat-side-menu.component.scss +36 -38
- package/mat-skeleton/index.d.ts +100 -0
- package/mat-skeleton/src/onemrva-mat-skeleton.component.scss +10 -59
- package/mat-spinner/index.d.ts +25 -0
- package/mat-spinner/src/onemrva-mat-spinner.component.scss +21 -0
- package/mat-stepper/index.d.ts +36 -0
- package/mat-stepper/src/onemrva-mat-stepper.scss +40 -105
- package/mat-sticker/index.d.ts +14 -0
- package/mat-sticker/src/onemrva-mat-sticker.component.scss +26 -63
- package/mat-table-of-content/index.d.ts +84 -0
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.scss +57 -0
- package/mat-task-list/index.d.ts +57 -0
- package/mat-task-list/src/onemrva-mat-task-content.scss +11 -0
- package/mat-task-list/src/onemrva-mat-task-list.component.scss +0 -150
- package/mat-task-list/src/onemrva-mat-task-title.scss +16 -0
- package/mat-task-list/src/onemrva-mat-task.component.scss +67 -0
- package/mat-timepicker/index.d.ts +386 -0
- package/mat-timepicker/src/clock/clock.component.scss +13 -7
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.scss +2 -7
- package/mat-toast/index.d.ts +30 -0
- package/mat-toast/src/onemrva-mat-toast.component.scss +7 -49
- package/mat-tooltip/index.d.ts +39 -0
- package/mat-tooltip/src/onemrva-mat-tooltip.component.scss +8 -5
- package/package.json +196 -26
- package/page-error/index.d.ts +34 -0
- package/page-error/src/page-error.component.scss +25 -0
- package/page-not-found/index.d.ts +54 -0
- package/page-not-found/src/page-not-found-mixin.component.scss +1 -1
- package/page-not-found/src/page-not-found.component.scss +2 -2
- package/shared/index.d.ts +541 -0
- package/utils/index.d.ts +32 -0
- package/.eslintrc.json +0 -33
- package/_index.scss +0 -34
- package/_utils.scss +0 -30
- package/core/index.ts +0 -3
- package/core/ng-package.json +0 -6
- package/core/src/lib/core.module.ts +0 -26
- package/core/src/lib/modules/index.ts +0 -1
- package/core/src/lib/modules/translate.loader.ts +0 -34
- package/core/src/lib/modules/translate.module.ts +0 -66
- package/core/src/lib/services/index.ts +0 -2
- package/core/src/lib/services/onemrva-error-handler.service.ts +0 -24
- package/core/src/lib/services/onemrva-missing-translation.service.ts +0 -12
- package/core/src/test.ts +0 -30
- package/layout/index.ts +0 -7
- package/layout/ng-package.json +0 -6
- package/layout/src/components/index.ts +0 -37
- package/layout/src/components/layout/_layout-mixin.component.scss +0 -189
- package/layout/src/components/layout/layout.component.html +0 -213
- package/layout/src/components/layout/layout.component.spec.ts +0 -59
- package/layout/src/components/layout/layout.component.ts +0 -185
- package/layout/src/components/layout-after-nav/layout-after-nav.component.spec.ts +0 -24
- package/layout/src/components/layout-after-nav/layout-after-nav.component.ts +0 -24
- package/layout/src/components/layout-content/layout-content.component.spec.ts +0 -24
- package/layout/src/components/layout-content/layout-content.component.ts +0 -24
- package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.html +0 -1
- package/layout/src/components/layout-drawer-actions/layout-drawer-actions.component.ts +0 -14
- package/layout/src/components/layout-drawer-content/layout-drawer-content.component.html +0 -1
- package/layout/src/components/layout-drawer-content/layout-drawer-content.component.ts +0 -14
- package/layout/src/components/layout-drawer-title/layout-drawer-title.component.html +0 -7
- package/layout/src/components/layout-drawer-title/layout-drawer-title.component.ts +0 -18
- package/layout/src/components/layout-footer/layout-footer.component.ts +0 -11
- package/layout/src/components/layout-login-menu/layout-login-menu.component.spec.ts +0 -24
- package/layout/src/components/layout-login-menu/layout-login-menu.component.ts +0 -24
- package/layout/src/components/layout-route/layout-route.component.html +0 -64
- package/layout/src/components/layout-route/layout-route.component.spec.ts +0 -24
- package/layout/src/components/layout-route/layout-route.component.ts +0 -57
- package/layout/src/components/layout-sidenav/layout-sidenav.component.html +0 -104
- package/layout/src/components/layout-sidenav/layout-sidenav.component.ts +0 -88
- package/layout/src/components/layout-sidenav-title/layout-sidenav-title.component.ts +0 -9
- package/layout/src/components/layout-subroute/layout-subroute.component.html +0 -43
- package/layout/src/components/layout-subroute/layout-subroute.component.spec.ts +0 -24
- package/layout/src/components/layout-subroute/layout-subroute.component.ts +0 -62
- package/layout/src/components/layout-title/layout-title.component.spec.ts +0 -24
- package/layout/src/components/layout-title/layout-title.component.ts +0 -24
- package/layout/src/decorators/coerce-boolean-input.decorator.ts +0 -19
- package/layout/src/decorators/observable-content.decorator.ts +0 -13
- package/layout/src/directives/drawer-host.directive.ts +0 -42
- package/layout/src/enums/environment.enum.ts +0 -6
- package/layout/src/layout.module.ts +0 -47
- package/layout/src/models/onem-language.model.ts +0 -4
- package/layout/src/models/onemrva-profile.model.ts +0 -57
- package/layout/src/services/drawer.service.ts +0 -30
- package/layout/src/striphtml.pipe.ts +0 -10
- package/layout/src/test.ts +0 -31
- package/mat-avatar/index.ts +0 -2
- package/mat-avatar/ng-package.json +0 -6
- package/mat-avatar/src/onemrva-mat-avatar.component.html +0 -21
- package/mat-avatar/src/onemrva-mat-avatar.component.ts +0 -421
- package/mat-avatar/src/onemrva-mat-avatar.module.ts +0 -11
- package/mat-avatar/src/onemrva-mat.avatar.component.spec.ts +0 -54
- package/mat-badge/index.ts +0 -6
- package/mat-badge/ng-package.json +0 -6
- package/mat-badge/src/onemrva-mat-badge.component.scss +0 -157
- package/mat-badge/src/onemrva-mat-badge.component.ts +0 -331
- package/mat-badge/src/onemrva-mat-badge.module.ts +0 -8
- package/mat-breadcrumb/index.ts +0 -7
- package/mat-breadcrumb/ng-package.json +0 -6
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.html +0 -37
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.ts +0 -16
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.model.ts +0 -4
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.module.ts +0 -12
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.service.ts +0 -65
- package/mat-carousel/index.ts +0 -2
- package/mat-carousel/ng-package.json +0 -6
- package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.html +0 -5
- package/mat-carousel/src/mat-carousel-item/onemrva-mat-carousel-item.component.ts +0 -27
- package/mat-carousel/src/onemrva-mat-carousel-item.directive.ts +0 -8
- package/mat-carousel/src/onemrva-mat-carousel.component.html +0 -43
- package/mat-carousel/src/onemrva-mat-carousel.component.ts +0 -160
- package/mat-copy-to-clipboard/index.ts +0 -1
- package/mat-copy-to-clipboard/ng-package.json +0 -6
- package/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.html +0 -14
- package/mat-copy-to-clipboard/src/components/copy-to-clipboard.component.ts +0 -76
- package/mat-datepicker-header/index.ts +0 -5
- package/mat-datepicker-header/ng-package.json +0 -6
- package/mat-datepicker-header/src/_onemrva-mat-datepicker-header.component.scss +0 -12
- package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.html +0 -54
- package/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.ts +0 -283
- package/mat-file-upload/index.ts +0 -11
- package/mat-file-upload/ng-package.json +0 -6
- package/mat-file-upload/src/components/index.ts +0 -10
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.html +0 -59
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.ts +0 -79
- package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.html +0 -58
- package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.ts +0 -209
- package/mat-file-upload/src/directives/dnd.directive.ts +0 -41
- package/mat-file-upload/src/models/action-config.model.ts +0 -10
- package/mat-file-upload/src/models/progress-file.model.ts +0 -94
- package/mat-file-upload/src/onemrva-mat-file-upload-itf.store.ts +0 -79
- package/mat-file-upload/src/onemrva-mat-file-upload.module.ts +0 -28
- package/mat-file-upload/src/onemrva-mat-file-upload.service.ts +0 -68
- package/mat-file-upload/src/onemrva-mat-file-upload.store.ts +0 -482
- package/mat-input-bank-account/index.ts +0 -5
- package/mat-input-bank-account/ng-package.json +0 -6
- package/mat-input-bank-account/src/bank-account.component.html +0 -36
- package/mat-input-bank-account/src/bank-account.component.scss +0 -42
- package/mat-input-bank-account/src/bank-account.component.ts +0 -308
- package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.html +0 -11
- package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.scss +0 -14
- package/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.ts +0 -82
- package/mat-input-birthplace/index.ts +0 -5
- package/mat-input-birthplace/ng-package.json +0 -6
- package/mat-input-birthplace/src/country-item.component.html +0 -8
- package/mat-input-birthplace/src/country-item.component.ts +0 -33
- package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.html +0 -28
- package/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.ts +0 -129
- package/mat-input-country/index.ts +0 -6
- package/mat-input-country/ng-package.json +0 -6
- package/mat-input-country/src/countries.ts +0 -3198
- package/mat-input-country/src/onemrva-mat-input-country.component.html +0 -25
- package/mat-input-country/src/onemrva-mat-input-country.component.ts +0 -152
- package/mat-input-enterprise-number/index.ts +0 -5
- package/mat-input-enterprise-number/ng-package.json +0 -6
- package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.html +0 -42
- package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.ts +0 -212
- package/mat-input-phone/index.ts +0 -6
- package/mat-input-phone/ng-package.json +0 -6
- package/mat-input-phone/src/onemrva-mat-input-phone.component.html +0 -47
- package/mat-input-phone/src/onemrva-mat-input-phone.component.ts +0 -274
- package/mat-input-phone/src/phone-number.directive.ts +0 -46
- package/mat-message-box/index.ts +0 -2
- package/mat-message-box/ng-package.json +0 -6
- package/mat-message-box/src/onemrva-mat-message-box.component.html +0 -3
- package/mat-message-box/src/onemrva-mat-message-box.component.ts +0 -172
- package/mat-message-box/src/onemrva-mat-message-box.module.ts +0 -12
- package/mat-multi-select/index.ts +0 -2
- package/mat-multi-select/ng-package.json +0 -6
- package/mat-multi-select/src/_onemrva-mat-multi-select.component.scss +0 -66
- package/mat-multi-select/src/onemrva-mat-multi-select.component.html +0 -44
- package/mat-multi-select/src/onemrva-mat-multi-select.component.ts +0 -194
- package/mat-multi-select/src/onemrva-mat-multi-select.module.ts +0 -27
- package/mat-multi-select/src/onemrva-mat-select-counter.component.ts +0 -0
- package/mat-notification/index.ts +0 -1
- package/mat-notification/ng-package.json +0 -6
- package/mat-notification/src/_onemrva-mat-notification.component.scss +0 -102
- package/mat-notification/src/onemrva-mat-notification.component.html +0 -15
- package/mat-notification/src/onemrva-mat-notification.component.ts +0 -158
- package/mat-paginator/index.ts +0 -6
- package/mat-paginator/ng-package.json +0 -6
- package/mat-paginator/src/_onemrva-mat-paginator.component.scss +0 -122
- package/mat-paginator/src/onemrva-mat-paginator.component.html +0 -108
- package/mat-paginator/src/onemrva-mat-paginator.component.spec.ts +0 -184
- package/mat-paginator/src/onemrva-mat-paginator.component.ts +0 -216
- package/mat-paginator/src/onemrva-mat-paginator.module.ts +0 -21
- package/mat-panel/index.ts +0 -6
- package/mat-panel/ng-package.json +0 -6
- package/mat-panel/src/onemrva-mat-panel-content.component.ts +0 -11
- package/mat-panel/src/onemrva-mat-panel-content.html +0 -5
- package/mat-panel/src/onemrva-mat-panel-icon.component.ts +0 -11
- package/mat-panel/src/onemrva-mat-panel-icon.html +0 -5
- package/mat-panel/src/onemrva-mat-panel-title-action.component.ts +0 -11
- package/mat-panel/src/onemrva-mat-panel-title-action.html +0 -5
- package/mat-panel/src/onemrva-mat-panel-title.component.ts +0 -29
- package/mat-panel/src/onemrva-mat-panel-title.html +0 -8
- package/mat-panel/src/onemrva-mat-panel.component.html +0 -10
- package/mat-panel/src/onemrva-mat-panel.component.ts +0 -122
- package/mat-panel/src/onemrva-mat-panel.module.ts +0 -26
- package/mat-pop-over/index.ts +0 -4
- package/mat-pop-over/ng-package.json +0 -6
- package/mat-pop-over/src/onemrva-mat-pop-over-content.component.ts +0 -13
- package/mat-pop-over/src/onemrva-mat-pop-over-trigger.component.ts +0 -13
- package/mat-pop-over/src/onemrva-mat-pop-over.component.html +0 -29
- package/mat-pop-over/src/onemrva-mat-pop-over.component.ts +0 -46
- package/mat-pop-over/src/onemrva-mat-pop-over.module.ts +0 -19
- package/mat-progress-bar/index.ts +0 -1
- package/mat-progress-bar/ng-package.json +0 -6
- package/mat-progress-bar/src/_onemrva-mat-progress-bar-mixin.component.scss +0 -37
- package/mat-progress-bar/src/onemrva-mat-progress-bar.component.html +0 -13
- package/mat-progress-bar/src/onemrva-mat-progress-bar.component.ts +0 -27
- package/mat-select-search/index.ts +0 -3
- package/mat-select-search/ng-package.json +0 -6
- package/mat-select-search/src/default-options.ts +0 -48
- package/mat-select-search/src/mat-select-no-entries-found.directive.ts +0 -15
- package/mat-select-search/src/mat-select-search-clear.directive.ts +0 -13
- package/mat-select-search/src/mat-select-search.component.html +0 -82
- package/mat-select-search/src/mat-select-search.component.spec.ts +0 -790
- package/mat-select-search/src/mat-select-search.component.ts +0 -705
- package/mat-select-search/src/mat-select-search.module.ts +0 -52
- package/mat-selectable-box/index.ts +0 -6
- package/mat-selectable-box/ng-package.json +0 -6
- package/mat-selectable-box/src/onemrva-mat-selectable-box.component.ts +0 -99
- package/mat-selectable-box/src/onemrva-mat-selectable-box.module.ts +0 -30
- package/mat-side-menu/index.ts +0 -6
- package/mat-side-menu/ng-package.json +0 -6
- package/mat-side-menu/src/onemrva-mat-side-menu.component.html +0 -36
- package/mat-side-menu/src/onemrva-mat-side-menu.component.spec.ts +0 -66
- package/mat-side-menu/src/onemrva-mat-side-menu.component.ts +0 -58
- package/mat-side-menu/src/onemrva-mat-side-menu.module.ts +0 -14
- package/mat-skeleton/index.ts +0 -3
- package/mat-skeleton/ng-package.json +0 -6
- package/mat-skeleton/src/onemrva-mat-skeleton-enums.ts +0 -32
- package/mat-skeleton/src/onemrva-mat-skeleton.component.html +0 -14
- package/mat-skeleton/src/onemrva-mat-skeleton.component.ts +0 -187
- package/mat-skeleton/src/onemrva-mat-skeleton.module.ts +0 -10
- package/mat-spinner/index.ts +0 -7
- package/mat-spinner/ng-package.json +0 -6
- package/mat-spinner/src/_onemrva-mat-spinner.component.scss +0 -151
- package/mat-spinner/src/onemrva-mat-loading.directive.ts +0 -41
- package/mat-spinner/src/onemrva-mat-spinner.component.html +0 -2138
- package/mat-spinner/src/onemrva-mat-spinner.component.ts +0 -52
- package/mat-spinner/src/onemrva-mat-spinner.module.ts +0 -10
- package/mat-stepper/index.ts +0 -6
- package/mat-stepper/ng-package.json +0 -6
- package/mat-stepper/src/_stepper-variables.scss +0 -29
- package/mat-stepper/src/onemrva-mat-stepper.component.spec.ts +0 -22
- package/mat-stepper/src/onemrva-mat-stepper.component.ts +0 -57
- package/mat-stepper/src/onemrva-mat-stepper.html +0 -61
- package/mat-stepper/src/onemrva-mat-stepper.module.ts +0 -24
- package/mat-stepper/src/onemrva-stepper-animations.ts +0 -42
- package/mat-sticker/index.ts +0 -6
- package/mat-sticker/ng-package.json +0 -6
- package/mat-sticker/src/onemrva-mat-sticker.component.spec.ts +0 -16
- package/mat-sticker/src/onemrva-mat-sticker.component.ts +0 -58
- package/mat-sticker/src/onemrva-mat-sticker.module.ts +0 -10
- package/mat-table-of-content/index.ts +0 -8
- package/mat-table-of-content/ng-package.json +0 -6
- package/mat-table-of-content/src/_onemrva-mat-table-of-content.component.scss +0 -79
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.html +0 -23
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.ts +0 -126
- package/mat-table-of-content/src/onemrva-mat-table-of-content.directive.ts +0 -67
- package/mat-table-of-content/src/onemrva-mat-table-of-content.service.ts +0 -51
- package/mat-table-of-content/src/onemrva-mat-toc-anchor.model.ts +0 -24
- package/mat-task-list/index.ts +0 -5
- package/mat-task-list/ng-package.json +0 -6
- package/mat-task-list/src/onemrva-mat-task-content.component.ts +0 -11
- package/mat-task-list/src/onemrva-mat-task-content.html +0 -5
- package/mat-task-list/src/onemrva-mat-task-list.component.html +0 -1
- package/mat-task-list/src/onemrva-mat-task-list.component.ts +0 -39
- package/mat-task-list/src/onemrva-mat-task-list.module.ts +0 -31
- package/mat-task-list/src/onemrva-mat-task-title.component.ts +0 -24
- package/mat-task-list/src/onemrva-mat-task-title.html +0 -5
- package/mat-task-list/src/onemrva-mat-task.component.html +0 -23
- package/mat-task-list/src/onemrva-mat-task.component.ts +0 -121
- package/mat-timepicker/index.ts +0 -6
- package/mat-timepicker/ng-package.json +0 -6
- package/mat-timepicker/src/clock/clock.component.html +0 -109
- package/mat-timepicker/src/clock/clock.component.spec.ts +0 -38
- package/mat-timepicker/src/clock/clock.component.ts +0 -274
- package/mat-timepicker/src/interfaces-and-types.ts +0 -18
- package/mat-timepicker/src/onemrva-mat-timepicker.component.html +0 -0
- package/mat-timepicker/src/onemrva-mat-timepicker.component.ts +0 -300
- package/mat-timepicker/src/onemrva-mat-timepicker.module.ts +0 -40
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.html +0 -53
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.spec.ts +0 -41
- package/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.ts +0 -176
- package/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.html +0 -15
- package/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.ts +0 -140
- package/mat-timepicker/src/timepicker.directive.ts +0 -596
- package/mat-timepicker/src/util.ts +0 -109
- package/mat-toast/index.ts +0 -6
- package/mat-toast/ng-package.json +0 -6
- package/mat-toast/src/onemrva-mat-toast.component.ts +0 -36
- package/mat-toast/src/onemrva-mat-toast.module.ts +0 -11
- package/mat-tooltip/index.ts +0 -4
- package/mat-tooltip/ng-package.json +0 -6
- package/mat-tooltip/src/onemrva-mat-tooltip.component.ts +0 -21
- package/mat-tooltip/src/onemrva-mat-tooltip.directive.ts +0 -123
- package/mat-tooltip/src/onemrva-mat-tooltip.module.ts +0 -11
- package/ng-package.json +0 -25
- package/npm-shrinkwrap.json +0 -30
- package/page-not-found/index.ts +0 -5
- package/page-not-found/ng-package.json +0 -6
- package/page-not-found/src/page-not-found-action.component.ts +0 -9
- package/page-not-found/src/page-not-found-extra.component.ts +0 -9
- package/page-not-found/src/page-not-found-invader.component.ts +0 -93
- package/page-not-found/src/page-not-found.component.html +0 -47
- package/page-not-found/src/page-not-found.component.ts +0 -60
- package/page-not-found/src/page-not-found.module.ts +0 -24
- package/shared/index.ts +0 -17
- package/shared/ng-package.json +0 -6
- package/shared/src/lib/OnemrvaDateAdapter.ts +0 -78
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.css +0 -0
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.html +0 -1
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.spec.ts +0 -21
- package/shared/src/lib/components/clipboard-icon/clipboard-icon.component.ts +0 -18
- package/shared/src/lib/containers/WebComponentOverlayContainer.ts +0 -90
- package/shared/src/lib/containers/index.ts +0 -1
- package/shared/src/lib/date.format.ts +0 -11
- package/shared/src/lib/directives/clipboard.directive.ts +0 -52
- package/shared/src/lib/directives/color.directive.ts +0 -46
- package/shared/src/lib/directives/digit-only.directive.ts +0 -46
- package/shared/src/lib/directives/if-width-is.directive.ts +0 -39
- package/shared/src/lib/directives/index.ts +0 -22
- package/shared/src/lib/directives/mask.directive.ts +0 -223
- package/shared/src/lib/directives/mat-row-clickable.directive.ts +0 -66
- package/shared/src/lib/interfaces/OnemRvaCommonCountry.interface.ts +0 -23
- package/shared/src/lib/interfaces/index.ts +0 -1
- package/shared/src/lib/pipes/index.ts +0 -2
- package/shared/src/lib/pipes/onemrva-bce.pipe.ts +0 -18
- package/shared/src/lib/pipes/onemrva-niss.pipe.ts +0 -18
- package/shared/src/lib/services/commonCountryLookup.service.ts +0 -50
- package/shared/src/lib/services/index.ts +0 -1
- package/shared/src/lib/shared.datepicker.module.ts +0 -60
- package/shared/src/lib/shared.module.ts +0 -10
- package/shared/src/lib/validators/bankAccountValidator.utils.ts +0 -61
- package/shared/src/lib/validators/onemrva-validators.spec.ts +0 -79
- package/shared/src/lib/validators/onemrva-validators.ts +0 -97
- package/shared/src/onemrva-validators.spec.ts +0 -14
- package/src/polyfills.ts +0 -52
- package/src/public-api.spec.ts +0 -7
- package/src/public-api.ts +0 -5
- package/tsconfig.lib.json +0 -12
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -10
- package/utils/index.ts +0 -2
- package/utils/ng-package.json +0 -6
- package/utils/src/enum.utils.ts +0 -8
- package/utils/src/enums/color.enum.ts +0 -14
- package/utils/src/enums/index.ts +0 -2
- package/utils/src/enums/size.enum.ts +0 -11
- /package/{assets/.gitkeep → mat-navigation/src/mat-navigation-tree/onemrva-mat-navigation-tree.component.scss} +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import {
|
|
4
|
-
Observable,
|
|
5
|
-
map,
|
|
6
|
-
ReplaySubject,
|
|
7
|
-
skip,
|
|
8
|
-
distinctUntilChanged,
|
|
9
|
-
} from 'rxjs';
|
|
10
|
-
|
|
11
|
-
import { OnemRvaCommonCountry } from '../interfaces/OnemRvaCommonCountry.interface';
|
|
12
|
-
|
|
13
|
-
@Injectable({
|
|
14
|
-
providedIn: 'root',
|
|
15
|
-
})
|
|
16
|
-
export class CommonCountryLookupService {
|
|
17
|
-
public commonCountryServiceURL =
|
|
18
|
-
'http://services/lookupwpptservice/rest/lookup/getLookups?class=be.fgov.onerva.lookup.wppt.persistence.model.common.Country';
|
|
19
|
-
|
|
20
|
-
protected _countries$: ReplaySubject<Array<OnemRvaCommonCountry>> =
|
|
21
|
-
new ReplaySubject(1);
|
|
22
|
-
protected _customersInitialized: boolean = false;
|
|
23
|
-
|
|
24
|
-
constructor(public http: HttpClient) {}
|
|
25
|
-
|
|
26
|
-
public getCountries(
|
|
27
|
-
refresh = false,
|
|
28
|
-
): Observable<Array<OnemRvaCommonCountry>> {
|
|
29
|
-
if (refresh || !this._customersInitialized) {
|
|
30
|
-
this._customersInitialized = true;
|
|
31
|
-
this.http
|
|
32
|
-
.get<OnemRvaCommonCountry[]>(this.commonCountryServiceURL)
|
|
33
|
-
.subscribe(countries => {
|
|
34
|
-
this._countries$.next(countries);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return this._countries$.pipe(skip(+refresh), distinctUntilChanged());
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public getCountryByCode(code: string | null) {
|
|
42
|
-
return this._countries$.pipe(
|
|
43
|
-
map(countries => {
|
|
44
|
-
const country = countries.find(country => country.code === code);
|
|
45
|
-
|
|
46
|
-
return country || null;
|
|
47
|
-
}),
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './commonCountryLookup.service';
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
DateAdapter,
|
|
4
|
-
MAT_DATE_FORMATS,
|
|
5
|
-
MAT_DATE_LOCALE,
|
|
6
|
-
MatNativeDateModule,
|
|
7
|
-
} from '@angular/material/core';
|
|
8
|
-
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
9
|
-
import { MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
10
|
-
import { Observable, of } from 'rxjs';
|
|
11
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
12
|
-
import { OnemrvaDateAdapter } from './OnemrvaDateAdapter';
|
|
13
|
-
import { ONEMRVA_FORMAT } from './date.format';
|
|
14
|
-
|
|
15
|
-
function translateDatepicker(
|
|
16
|
-
translateService: TranslateService,
|
|
17
|
-
adapter: DateAdapter<Date>,
|
|
18
|
-
): () => Observable<any> {
|
|
19
|
-
return () => {
|
|
20
|
-
// For some cosmic reason, return translateService.onLangChange().asObservable()) + pipe(tap()) does not work
|
|
21
|
-
translateService.onLangChange.subscribe(event => {
|
|
22
|
-
adapter.setLocale(event.lang);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// But this works fine...
|
|
26
|
-
return of('sin (a +- b) = sin a . cos b +- cos a . sin b');
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@NgModule({
|
|
31
|
-
declarations: [],
|
|
32
|
-
imports: [
|
|
33
|
-
MatDatepickerModule,
|
|
34
|
-
TranslateModule,
|
|
35
|
-
MatNativeDateModule,
|
|
36
|
-
MatMomentDateModule,
|
|
37
|
-
],
|
|
38
|
-
exports: [],
|
|
39
|
-
providers: [
|
|
40
|
-
{
|
|
41
|
-
provide: MAT_DATE_LOCALE,
|
|
42
|
-
useValue: 'fr',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
provide: DateAdapter,
|
|
46
|
-
useClass: OnemrvaDateAdapter,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
provide: MAT_DATE_FORMATS,
|
|
50
|
-
useValue: ONEMRVA_FORMAT,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
provide: APP_INITIALIZER,
|
|
54
|
-
useFactory: translateDatepicker,
|
|
55
|
-
deps: [TranslateService, DateAdapter<any>],
|
|
56
|
-
multi: true,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
})
|
|
60
|
-
export class OnemrvaDatepickerSharedModule {}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { directives } from './directives';
|
|
4
|
-
|
|
5
|
-
@NgModule({
|
|
6
|
-
declarations: [...directives],
|
|
7
|
-
imports: [CommonModule],
|
|
8
|
-
exports: [...directives, CommonModule],
|
|
9
|
-
})
|
|
10
|
-
export class OnemrvaSharedModule {}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
2
|
-
import {
|
|
3
|
-
validateIBAN,
|
|
4
|
-
electronicFormatIBAN,
|
|
5
|
-
countrySpecs,
|
|
6
|
-
ValidationErrorsIBAN,
|
|
7
|
-
} from 'ibantools';
|
|
8
|
-
|
|
9
|
-
export const IBAN_SUPPORTED_COUNTRIES = Object.keys(countrySpecs);
|
|
10
|
-
|
|
11
|
-
const internValidateIban = (iban: string = '') => {
|
|
12
|
-
return validateIBAN(electronicFormatIBAN(iban) || undefined);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
// const getMappedCodes = (errorCodes: ValidationErrorsIBAN[], value?: any) => {
|
|
16
|
-
// const mappedCodes = errorCodes.map(code => ValidationErrorsIBAN[code]);
|
|
17
|
-
//
|
|
18
|
-
// if (mappedCodes.length > 0) {
|
|
19
|
-
// const listCodes: Record<string, any> = {};
|
|
20
|
-
//
|
|
21
|
-
// mappedCodes.forEach((code: string) => {
|
|
22
|
-
// listCodes[code] = { value };
|
|
23
|
-
// });
|
|
24
|
-
//
|
|
25
|
-
// return listCodes as ValidationErrors;
|
|
26
|
-
// }
|
|
27
|
-
//
|
|
28
|
-
// return null;
|
|
29
|
-
// };
|
|
30
|
-
|
|
31
|
-
export const bankAccountValidator = (): ValidatorFn => {
|
|
32
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
33
|
-
let finalErrorCodes;
|
|
34
|
-
|
|
35
|
-
if (typeof control.getRawValue() === 'string') {
|
|
36
|
-
const { valid: _valid, errorCodes } = internValidateIban(control.value);
|
|
37
|
-
finalErrorCodes = errorCodes;
|
|
38
|
-
} else {
|
|
39
|
-
const countryCodeValue: string = control.value['countryCode'];
|
|
40
|
-
const bankNumber: string = control.value['bban'];
|
|
41
|
-
|
|
42
|
-
const { valid: _valid, errorCodes } = internValidateIban(
|
|
43
|
-
`${countryCodeValue}${bankNumber}`,
|
|
44
|
-
);
|
|
45
|
-
finalErrorCodes = errorCodes;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (finalErrorCodes.length === 0) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const validationErrors: Record<string, { value: any }> = {};
|
|
53
|
-
finalErrorCodes.forEach(errCode => {
|
|
54
|
-
const key = ValidationErrorsIBAN[errCode];
|
|
55
|
-
|
|
56
|
-
validationErrors[key] = { value: control.getRawValue() };
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
return validationErrors;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { OnemrvaValidators } from './onemrva-validators';
|
|
2
|
-
import { AbstractControl, FormControl } from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
describe('validators', () => {
|
|
5
|
-
describe('NISS', () => {
|
|
6
|
-
let control: AbstractControl;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
const validator = OnemrvaValidators.niss(true);
|
|
10
|
-
control = new FormControl('', [validator]);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should validate this format', () => {
|
|
14
|
-
control.setValue('');
|
|
15
|
-
const result = control.errors;
|
|
16
|
-
expect(result).toEqual({ nissNull: true });
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should have a length of 11 to be a valid NISS number', () => {
|
|
20
|
-
const NISS_VALUE_WITH_12_NUMBERS = '99999999999999';
|
|
21
|
-
control.setValue(NISS_VALUE_WITH_12_NUMBERS);
|
|
22
|
-
|
|
23
|
-
expect(control.errors).toEqual({
|
|
24
|
-
nissLengthError: { value: NISS_VALUE_WITH_12_NUMBERS },
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('should be a valid number', () => {
|
|
29
|
-
const NISS_NOT_A_NUMBER = 'abcdefghijk';
|
|
30
|
-
control.setValue(NISS_NOT_A_NUMBER);
|
|
31
|
-
|
|
32
|
-
expect(control.errors).toEqual({ nissNan: { value: NISS_NOT_A_NUMBER } });
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
describe('final number checks', () => {
|
|
36
|
-
[
|
|
37
|
-
'99123100168',
|
|
38
|
-
'00123100126',
|
|
39
|
-
'00123100155',
|
|
40
|
-
'99000000141',
|
|
41
|
-
'99210100161',
|
|
42
|
-
'99200000184',
|
|
43
|
-
'99123100168', // 1999-12-31
|
|
44
|
-
'99400000130', // 1999-40-00 == 1999-00-00
|
|
45
|
-
'00123100126', // 1900-12-31
|
|
46
|
-
'00123100155', // 2000-12-31
|
|
47
|
-
'99000000141', // 1999-00-00
|
|
48
|
-
'99200000184', // 1999-20-00 == 1999-00-00
|
|
49
|
-
'99210100161', // 1999-21-01 == 1999-01-01
|
|
50
|
-
'99410100107', // 1999-41-01 == 1999-01-01
|
|
51
|
-
].forEach(val => {
|
|
52
|
-
it(`should be a valid number ${val}`, () => {
|
|
53
|
-
control.setValue(val);
|
|
54
|
-
expect(control.errors).toEqual(null);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
describe('final numbers fail check', () => {
|
|
60
|
-
[
|
|
61
|
-
'99123100161',
|
|
62
|
-
'99400000131',
|
|
63
|
-
'00123100121',
|
|
64
|
-
'00123100151',
|
|
65
|
-
'99000000142',
|
|
66
|
-
'99200000183',
|
|
67
|
-
'99210100164',
|
|
68
|
-
'99410100105',
|
|
69
|
-
].forEach(val => {
|
|
70
|
-
it(`should not be valid numbers ${val}`, () => {
|
|
71
|
-
control.setValue(val);
|
|
72
|
-
expect(control.errors).toEqual({
|
|
73
|
-
nissCheckDigitError: { value: val },
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
});
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { AbstractControl, ValidatorFn } from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
export class OnemrvaValidators {
|
|
5
|
-
private static bceValidator(required = false, control: AbstractControl) {
|
|
6
|
-
if (control.value === null || control.value.trim() === '') {
|
|
7
|
-
return !required ? null : { bceNull: true };
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const bceCandidate = control.value.trim().replace(/\/|\.|-/g, '');
|
|
11
|
-
|
|
12
|
-
if (bceCandidate.length !== 10)
|
|
13
|
-
return { bceLengthError: { value: bceCandidate } };
|
|
14
|
-
|
|
15
|
-
if (Number.isNaN(+bceCandidate)) return { bceNan: { value: bceCandidate } };
|
|
16
|
-
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static bce(required = false): ValidatorFn {
|
|
21
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
22
|
-
return this.bceValidator(required, control);
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
private static nissValidator(required = false, control: AbstractControl) {
|
|
27
|
-
if (control.value === null || control.value.trim() === '') {
|
|
28
|
-
return !required ? null : { nissNull: true };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const nissCandidate = control.value.trim().replace(/\/|\.|-/g, '');
|
|
32
|
-
|
|
33
|
-
if (nissCandidate.length !== 11) {
|
|
34
|
-
return { nissLengthError: { value: nissCandidate } };
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (Number.isNaN(+nissCandidate)) {
|
|
38
|
-
return { nissNan: { value: nissCandidate } };
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Niss day and year are actual values, the month can be different according to the logic below
|
|
42
|
-
// [20-32] & [40-52] => foreigners & temporary NISS values
|
|
43
|
-
// it is not necessary to check for the actual date to be valid
|
|
44
|
-
|
|
45
|
-
const checksumValue = nissCandidate.substring(9);
|
|
46
|
-
const nissNumbersToCheck = nissCandidate.substring(0, 9);
|
|
47
|
-
const isValidChecksumYear1900 =
|
|
48
|
-
97 - (+nissNumbersToCheck % 97) === +checksumValue;
|
|
49
|
-
const isValidChecksumYear2000 =
|
|
50
|
-
97 - (+`2${nissNumbersToCheck}` % 97) === +checksumValue;
|
|
51
|
-
|
|
52
|
-
if (!isValidChecksumYear1900 && !isValidChecksumYear2000) {
|
|
53
|
-
return { nissCheckDigitError: { value: nissCandidate } };
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
Below checks aren't really necessary but are here to exclude even more potential errors
|
|
58
|
-
We could still improve this to include february days & 30 day months + the real potential ranges
|
|
59
|
-
*/
|
|
60
|
-
const monthString = nissCandidate.substring(2, 4);
|
|
61
|
-
const month = parseInt(monthString) - 1;
|
|
62
|
-
const real_month = (parseInt(monthString) % 20) - 1;
|
|
63
|
-
|
|
64
|
-
if (real_month > 11 || month > 51) {
|
|
65
|
-
return { nissInvalidMonth: { value: nissCandidate } };
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const day = +nissCandidate.substring(4, 6);
|
|
69
|
-
if (day > 31) {
|
|
70
|
-
return { nissInvalidDate: { value: nissCandidate } };
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
static niss(required = false): ValidatorFn {
|
|
77
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
78
|
-
return this.nissValidator(required, control);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
static nissOrBce(required = false): ValidatorFn {
|
|
83
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
84
|
-
if (control.value === null || control.value.trim() === '')
|
|
85
|
-
return !required ? null : { nissNull: true };
|
|
86
|
-
|
|
87
|
-
const nissCandidate = control.value.trim().replace(/\/|\.|-/g, '');
|
|
88
|
-
|
|
89
|
-
if (control.value.length === 11) {
|
|
90
|
-
return this.nissValidator(required, control);
|
|
91
|
-
} else if (control.value.length === 10) {
|
|
92
|
-
return this.bceValidator(required, control);
|
|
93
|
-
}
|
|
94
|
-
return { lengthError: { value: nissCandidate } };
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OnemrvaValidators } from './lib/validators/onemrva-validators';
|
|
2
|
-
import { AbstractControl, FormControl } from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
describe('Validators', () => {
|
|
5
|
-
beforeEach(async () => {
|
|
6
|
-
OnemrvaValidators.niss();
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
it('should create', () => {
|
|
10
|
-
const validatorFn = OnemrvaValidators.niss();
|
|
11
|
-
const control: AbstractControl = new FormControl('27000100547');
|
|
12
|
-
expect(validatorFn(control)).toBe(null);
|
|
13
|
-
});
|
|
14
|
-
});
|
package/src/polyfills.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
-
* You can add your own extra polyfills to this file.
|
|
4
|
-
*
|
|
5
|
-
* This file is divided into 2 sections:
|
|
6
|
-
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
-
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
-
* file.
|
|
9
|
-
*
|
|
10
|
-
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
-
* automatically update themselves. This includes recent versions of Safari, Chrome (including
|
|
12
|
-
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
|
|
13
|
-
*
|
|
14
|
-
* Learn more in https://angular.io/guide/browser-support
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/***************************************************************************************************
|
|
18
|
-
* BROWSER POLYFILLS
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
23
|
-
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
24
|
-
* because those flags need to be set before `zone.js` being loaded, and webpack
|
|
25
|
-
* will put import in the top of bundle, so user need to create a separate file
|
|
26
|
-
* in this directory (for example: zone-flags.ts), and put the following flags
|
|
27
|
-
* into that file, and then add the following code before importing zone.js.
|
|
28
|
-
* import './zone-flags';
|
|
29
|
-
*
|
|
30
|
-
* The flags allowed in zone-flags.ts are listed here.
|
|
31
|
-
*
|
|
32
|
-
* The following flags will work for all browsers.
|
|
33
|
-
*
|
|
34
|
-
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
35
|
-
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
36
|
-
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
37
|
-
*
|
|
38
|
-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
39
|
-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
40
|
-
*
|
|
41
|
-
* (window as any).__Zone_enable_cross_context_check = true;
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/***************************************************************************************************
|
|
46
|
-
* Zone JS is required by default for Angular itself.
|
|
47
|
-
*/
|
|
48
|
-
import 'zone.js'; // Included with Angular CLI.
|
|
49
|
-
|
|
50
|
-
/***************************************************************************************************
|
|
51
|
-
* APPLICATION IMPORTS
|
|
52
|
-
*/
|
package/src/public-api.spec.ts
DELETED
package/src/public-api.ts
DELETED
package/tsconfig.lib.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/lib",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"inlineSources": true,
|
|
9
|
-
"types": []
|
|
10
|
-
},
|
|
11
|
-
"exclude": ["**/*.spec.ts"]
|
|
12
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/spec",
|
|
6
|
-
"types": ["jasmine"]
|
|
7
|
-
},
|
|
8
|
-
"files": ["src/polyfills.ts"],
|
|
9
|
-
"include": ["**/*.spec.ts", "**/*.d.ts"]
|
|
10
|
-
}
|
package/utils/index.ts
DELETED
package/utils/ng-package.json
DELETED
package/utils/src/enum.utils.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This utility type fills several purposes:
|
|
3
|
-
* - possibility to merge the enumeration and the list of possible values (not possible with an enum)
|
|
4
|
-
* - possibility to hardcode the value without using the enumeration (with enum, you have to use an enum option, not one of the strings listed among the enum options)
|
|
5
|
-
*/
|
|
6
|
-
export const mkenum = <T extends { [index: string]: U }, U extends string>(
|
|
7
|
-
x: T,
|
|
8
|
-
) => x;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { mkenum } from '../enum.utils';
|
|
2
|
-
|
|
3
|
-
export const OnemrvaMatColor = mkenum({
|
|
4
|
-
NONE: '',
|
|
5
|
-
PRIMARY: 'primary',
|
|
6
|
-
ACCENT: 'accent',
|
|
7
|
-
WARN: 'warn',
|
|
8
|
-
SUCCESS: 'success',
|
|
9
|
-
INFO: 'info',
|
|
10
|
-
ERROR: 'error',
|
|
11
|
-
GRAYSCALE: 'grayscale',
|
|
12
|
-
});
|
|
13
|
-
export type OnemrvaMatColor =
|
|
14
|
-
(typeof OnemrvaMatColor)[keyof typeof OnemrvaMatColor];
|
package/utils/src/enums/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { mkenum } from '../enum.utils';
|
|
2
|
-
|
|
3
|
-
export const OnemrvaMatSize = mkenum({
|
|
4
|
-
XSMALL: 'extrasmall',
|
|
5
|
-
SMALL: 'small',
|
|
6
|
-
MEDIUM: 'medium',
|
|
7
|
-
LARGE: 'large',
|
|
8
|
-
XLARGE: 'extralarge',
|
|
9
|
-
});
|
|
10
|
-
export type OnemrvaMatSize =
|
|
11
|
-
(typeof OnemrvaMatSize)[keyof typeof OnemrvaMatSize];
|
|
File without changes
|