@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,274 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import {
|
|
3
|
-
Component,
|
|
4
|
-
ElementRef,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Input,
|
|
7
|
-
OnDestroy,
|
|
8
|
-
OnInit,
|
|
9
|
-
Output,
|
|
10
|
-
ViewChild,
|
|
11
|
-
ViewEncapsulation,
|
|
12
|
-
} from '@angular/core';
|
|
13
|
-
import {
|
|
14
|
-
AbstractControl,
|
|
15
|
-
FormControl,
|
|
16
|
-
ReactiveFormsModule,
|
|
17
|
-
ValidationErrors,
|
|
18
|
-
ValidatorFn,
|
|
19
|
-
Validators,
|
|
20
|
-
} from '@angular/forms';
|
|
21
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
22
|
-
import { MatInputModule } from '@angular/material/input';
|
|
23
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
24
|
-
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
25
|
-
import {
|
|
26
|
-
Observable,
|
|
27
|
-
Subject,
|
|
28
|
-
map,
|
|
29
|
-
startWith,
|
|
30
|
-
debounceTime,
|
|
31
|
-
tap,
|
|
32
|
-
takeUntil,
|
|
33
|
-
withLatestFrom,
|
|
34
|
-
} from 'rxjs';
|
|
35
|
-
import { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';
|
|
36
|
-
import { PhoneNumberDirective } from './phone-number.directive';
|
|
37
|
-
import { PhoneNumberUtil, PhoneNumberFormat } from 'google-libphonenumber';
|
|
38
|
-
import {
|
|
39
|
-
getTranslatedCountries,
|
|
40
|
-
OnemrvaMaterialCountry,
|
|
41
|
-
} from '@onemrvapublic/design-system/mat-input-country';
|
|
42
|
-
|
|
43
|
-
@Component({
|
|
44
|
-
selector: 'onemrva-mat-input-phone',
|
|
45
|
-
styleUrls: [
|
|
46
|
-
'onemrva-mat-input-phone.component.scss',
|
|
47
|
-
'../../../../../node_modules/flag-icons/sass/flag-icons.scss',
|
|
48
|
-
],
|
|
49
|
-
templateUrl: 'onemrva-mat-input-phone.component.html',
|
|
50
|
-
standalone: true,
|
|
51
|
-
imports: [
|
|
52
|
-
CommonModule,
|
|
53
|
-
MatInputModule,
|
|
54
|
-
MatFormFieldModule,
|
|
55
|
-
MatSelectModule,
|
|
56
|
-
MatSelectSearchModule,
|
|
57
|
-
ReactiveFormsModule,
|
|
58
|
-
TranslateModule,
|
|
59
|
-
PhoneNumberDirective,
|
|
60
|
-
],
|
|
61
|
-
encapsulation: ViewEncapsulation.None,
|
|
62
|
-
})
|
|
63
|
-
export class OnemrvaMatInputPhoneComponent implements OnInit, OnDestroy {
|
|
64
|
-
@Input()
|
|
65
|
-
readonly: boolean = false;
|
|
66
|
-
|
|
67
|
-
@Input() phoneNumber!: FormControl;
|
|
68
|
-
@Input() label: string = 'Phone number';
|
|
69
|
-
@Input() noEntriesFoundLabel = 'Not found';
|
|
70
|
-
@Input() placeholderLabel = 'Search';
|
|
71
|
-
@Input() defaultPrefix: string = '+32';
|
|
72
|
-
@Input() searchAriaLabel = '';
|
|
73
|
-
@Input() hint: string = '';
|
|
74
|
-
@Output() getCountry = new EventEmitter<any>();
|
|
75
|
-
@ViewChild('numberInput') numberInput!: ElementRef;
|
|
76
|
-
|
|
77
|
-
countryCode: FormControl = new FormControl('');
|
|
78
|
-
|
|
79
|
-
public filterCtrl: FormControl<string | null> = new FormControl<string>('');
|
|
80
|
-
|
|
81
|
-
destroyNotifier$: Subject<void> = new Subject();
|
|
82
|
-
|
|
83
|
-
public countries$: Observable<OnemrvaMaterialCountry[]>;
|
|
84
|
-
public filteredCountries$: Observable<OnemrvaMaterialCountry[]>;
|
|
85
|
-
|
|
86
|
-
constructor(private translateService: TranslateService) {
|
|
87
|
-
this.countries$ = this.translateService.onLangChange.pipe(
|
|
88
|
-
startWith({ lang: this.translateService.currentLang }),
|
|
89
|
-
map(({ lang }) => getTranslatedCountries(lang)),
|
|
90
|
-
tap(() => {
|
|
91
|
-
this.filterCtrl.updateValueAndValidity({
|
|
92
|
-
onlySelf: false,
|
|
93
|
-
emitEvent: true,
|
|
94
|
-
});
|
|
95
|
-
}),
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
this.filteredCountries$ = this.filterCtrl.valueChanges.pipe(
|
|
99
|
-
debounceTime(400),
|
|
100
|
-
startWith(''),
|
|
101
|
-
withLatestFrom(this.countries$),
|
|
102
|
-
map(([search, countries]) => {
|
|
103
|
-
return countries.filter((country: OnemrvaMaterialCountry) => {
|
|
104
|
-
if (!search || search === '') return countries;
|
|
105
|
-
if (country.name === undefined) return false;
|
|
106
|
-
return country.name.toLowerCase().indexOf(search.toLowerCase()) > -1;
|
|
107
|
-
});
|
|
108
|
-
}),
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
get number(): FormControl {
|
|
113
|
-
return this.phoneNumber as FormControl;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
ngOnInit(): void {
|
|
117
|
-
this.number.valueChanges
|
|
118
|
-
.pipe(
|
|
119
|
-
startWith(this.number.getRawValue()),
|
|
120
|
-
takeUntil(this.destroyNotifier$),
|
|
121
|
-
)
|
|
122
|
-
.subscribe(number => {
|
|
123
|
-
if (number !== '') {
|
|
124
|
-
if (number.substring(0, 1) !== '+')
|
|
125
|
-
this.countryCode.setValue('', { emitEvent: false });
|
|
126
|
-
if (number === '0') {
|
|
127
|
-
const country = this.findCountryFromPrefix(this.defaultPrefix);
|
|
128
|
-
if (country) {
|
|
129
|
-
//this.getCountry.next(country);
|
|
130
|
-
this.number.setValue(this.defaultPrefix, { emitEvent: false });
|
|
131
|
-
this.countryCode.setValue(country.code);
|
|
132
|
-
} else {
|
|
133
|
-
this.countryCode.setValue('');
|
|
134
|
-
}
|
|
135
|
-
} else {
|
|
136
|
-
const country = this.findCountryFromPrefix(number);
|
|
137
|
-
if (country) {
|
|
138
|
-
//this.getCountry.next(country);
|
|
139
|
-
this.countryCode.setValue(country.code);
|
|
140
|
-
} else {
|
|
141
|
-
this.countryCode.setValue('');
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
this.formatPhoneNumber();
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
this.countryCode.valueChanges
|
|
149
|
-
.pipe(takeUntil(this.destroyNotifier$))
|
|
150
|
-
.subscribe(value => {
|
|
151
|
-
let number = this.number.getRawValue();
|
|
152
|
-
const prevCode = this.findCountryFromPrefix(number);
|
|
153
|
-
const country = this.findCountryFromCode(value);
|
|
154
|
-
|
|
155
|
-
if (prevCode) {
|
|
156
|
-
number = number.replace(prevCode.dial_code, '');
|
|
157
|
-
}
|
|
158
|
-
if (country) {
|
|
159
|
-
this.getCountry.next(country);
|
|
160
|
-
if (number.substring(0, 1) === '+') {
|
|
161
|
-
number = number.replace('+', '');
|
|
162
|
-
}
|
|
163
|
-
number = country.dial_code + number;
|
|
164
|
-
this.number.setValue(number, { emitEvent: false });
|
|
165
|
-
this.formatPhoneNumber();
|
|
166
|
-
}
|
|
167
|
-
setTimeout(() => {
|
|
168
|
-
this.numberInput.nativeElement.focus();
|
|
169
|
-
}, 200);
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
handleClick(e: any) {
|
|
174
|
-
e.stopPropagation();
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
private clearValidators() {
|
|
178
|
-
let required = false;
|
|
179
|
-
if (this.number.hasValidator(Validators.required)) {
|
|
180
|
-
required = true;
|
|
181
|
-
}
|
|
182
|
-
this.number.clearValidators();
|
|
183
|
-
if (required) {
|
|
184
|
-
this.number.addValidators(Validators.required);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
private formatPhoneNumber() {
|
|
189
|
-
this.clearValidators();
|
|
190
|
-
if (this.countryCode.getRawValue() !== '') {
|
|
191
|
-
this.number.addValidators([
|
|
192
|
-
phoneNumberValidator(this.countryCode.getRawValue()),
|
|
193
|
-
]);
|
|
194
|
-
}
|
|
195
|
-
const phoneUtil = PhoneNumberUtil.getInstance();
|
|
196
|
-
try {
|
|
197
|
-
const number = phoneUtil.parse(this.number.getRawValue(), '');
|
|
198
|
-
const code = phoneUtil.getRegionCodeForNumber(number);
|
|
199
|
-
if (code) {
|
|
200
|
-
this.countryCode.setValue(code, { emitEvent: false });
|
|
201
|
-
this.clearValidators();
|
|
202
|
-
this.number.addValidators([phoneNumberValidator(code)]);
|
|
203
|
-
this.number.setValue(
|
|
204
|
-
phoneUtil.format(number, PhoneNumberFormat.INTERNATIONAL),
|
|
205
|
-
{ emitEvent: false },
|
|
206
|
-
);
|
|
207
|
-
} else {
|
|
208
|
-
this.number.addValidators([genericValidator('input.phone.invalid')]);
|
|
209
|
-
}
|
|
210
|
-
} catch (e: any) {
|
|
211
|
-
this.number.addValidators([genericValidator(e.message)]);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
private findCountryFromCode(code: any) {
|
|
216
|
-
return getTranslatedCountries(this.translateService.currentLang).find(
|
|
217
|
-
(country: OnemrvaMaterialCountry) =>
|
|
218
|
-
country.code.toLowerCase() === code.toLowerCase(),
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
private findCountryFromPrefix(number: string) {
|
|
223
|
-
return getTranslatedCountries(this.translateService.currentLang).find(
|
|
224
|
-
(country: OnemrvaMaterialCountry) =>
|
|
225
|
-
country.dial_code === number.substring(0, country.dial_code.length),
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
ngOnDestroy() {
|
|
230
|
-
this.destroyNotifier$.next();
|
|
231
|
-
this.destroyNotifier$.complete();
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
errors() {
|
|
235
|
-
for (const k in this.number.errors) {
|
|
236
|
-
if (k === 'required') {
|
|
237
|
-
return 'input.phone.required';
|
|
238
|
-
} else {
|
|
239
|
-
return 'input.phone.invalid';
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return 'input.phone.unknown.error';
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function phoneNumberValidator(code: string): ValidatorFn {
|
|
247
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
248
|
-
let number: string = control.value;
|
|
249
|
-
|
|
250
|
-
if (number === '') {
|
|
251
|
-
return null;
|
|
252
|
-
}
|
|
253
|
-
number = number.replace(code, '');
|
|
254
|
-
|
|
255
|
-
const phoneUtil = PhoneNumberUtil.getInstance();
|
|
256
|
-
|
|
257
|
-
try {
|
|
258
|
-
const parsedNumber = phoneUtil.parse(number, code);
|
|
259
|
-
if (phoneUtil.isValidNumberForRegion(parsedNumber, code)) {
|
|
260
|
-
return null;
|
|
261
|
-
}
|
|
262
|
-
} catch (e: any) {
|
|
263
|
-
console.warn(e.message);
|
|
264
|
-
return { phoneNumber: { value: 'input.phone.invalid' } };
|
|
265
|
-
}
|
|
266
|
-
return { phoneNumber: { value: 'input.phone.invalid' } };
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function genericValidator(message: string): ValidatorFn {
|
|
271
|
-
return (_control: AbstractControl): ValidationErrors | null => {
|
|
272
|
-
return { phoneNumber: { value: message } };
|
|
273
|
-
};
|
|
274
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Directive, HostListener } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[phoneNumber]',
|
|
5
|
-
standalone: true,
|
|
6
|
-
})
|
|
7
|
-
export class PhoneNumberDirective {
|
|
8
|
-
constructor() {}
|
|
9
|
-
|
|
10
|
-
@HostListener('keydown', ['$event']) onKeyDown(event: any) {
|
|
11
|
-
const e = <KeyboardEvent>event;
|
|
12
|
-
|
|
13
|
-
const allowedKey = [
|
|
14
|
-
'0',
|
|
15
|
-
'1',
|
|
16
|
-
'2',
|
|
17
|
-
'3',
|
|
18
|
-
'4',
|
|
19
|
-
'5',
|
|
20
|
-
'6',
|
|
21
|
-
'7',
|
|
22
|
-
'8',
|
|
23
|
-
'9',
|
|
24
|
-
' ',
|
|
25
|
-
'Backspace',
|
|
26
|
-
'Delete',
|
|
27
|
-
'Tab',
|
|
28
|
-
'+',
|
|
29
|
-
'-',
|
|
30
|
-
'Enter',
|
|
31
|
-
'ArrowLeft',
|
|
32
|
-
'ArrowRight',
|
|
33
|
-
'ArrowUp',
|
|
34
|
-
'ArrowDown',
|
|
35
|
-
'Home',
|
|
36
|
-
'End',
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
if (allowedKey.indexOf(e.key) >= 0) return;
|
|
40
|
-
|
|
41
|
-
const allowedCtrlShortcuts = ['a', 'c', 'x', 'v'];
|
|
42
|
-
if (e.ctrlKey && allowedCtrlShortcuts.indexOf(e.key) >= 0) return;
|
|
43
|
-
|
|
44
|
-
e.preventDefault();
|
|
45
|
-
}
|
|
46
|
-
}
|
package/mat-message-box/index.ts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
Component,
|
|
4
|
-
ElementRef,
|
|
5
|
-
HostBinding,
|
|
6
|
-
Input,
|
|
7
|
-
ViewChild,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';
|
|
10
|
-
|
|
11
|
-
let NEXT_ID = 0;
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'onemrva-mat-message-box',
|
|
15
|
-
templateUrl: 'onemrva-mat-message-box.component.html',
|
|
16
|
-
})
|
|
17
|
-
export class OnemrvaMatMessageBoxComponent implements AfterViewInit {
|
|
18
|
-
@Input()
|
|
19
|
-
public label: false | string = false;
|
|
20
|
-
|
|
21
|
-
@Input()
|
|
22
|
-
public messageCode: string = '';
|
|
23
|
-
|
|
24
|
-
@ViewChild('mbcontent')
|
|
25
|
-
public mbcontent!: ElementRef;
|
|
26
|
-
/**
|
|
27
|
-
* Returns the `aria-label` attribute of the element.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
|
-
* let elementLabel = this.<element>.ariaLabel;
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
@HostBinding('attr.aria-label')
|
|
36
|
-
public ariaLabel = 'message-box';
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Returns the `role` attribute of the element.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```typescript
|
|
43
|
-
* let elementRole = this.<element>.role;
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
@HostBinding('attr.role')
|
|
47
|
-
public role = 'alert';
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Host `class.onemrva-mat-message-box` binding.
|
|
51
|
-
*
|
|
52
|
-
* @hidden
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
@HostBinding('class.onemrva-mat-message-box')
|
|
56
|
-
public cssClass = 'onemrva-mat-message-box';
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Sets the `id` of the element. If not set, the first component instance will have `id` = `"onemrva-mat-*-0"`.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```html
|
|
63
|
-
* <onemrva-mat-* id="my-first-*"></onemrva-mat-*>
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
@HostBinding('attr.id')
|
|
67
|
-
@Input()
|
|
68
|
-
public id = `onemrva-mat-message-box-${NEXT_ID++}`;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Sets the `data-cy` of the element. If not set, the first component instance will have `data-cy` = `"onemrva-mat-*-0"`.
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* ```html
|
|
75
|
-
* <onemrva-mat-* id="my-first-*"></onemrva-mat-*>
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
@HostBinding('attr.data-cy')
|
|
79
|
-
@Input()
|
|
80
|
-
public dataCy = `onemrva-mat-message-box-${NEXT_ID++}`;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @hidden
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
private _color: OnemrvaMatColor = OnemrvaMatColor.NONE;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Returns the color of the element.
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```typescript
|
|
93
|
-
* let color = this.<element>.color;
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
@Input()
|
|
97
|
-
public get color(): OnemrvaMatColor {
|
|
98
|
-
return this._color;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Sets the size of the element.
|
|
103
|
-
* By default, the size is `"small"`. It can be set to `"medium"` or `"large"`.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```html
|
|
107
|
-
* <onemrva-mat-* size="large"></onemrva-mat-*>
|
|
108
|
-
* ```
|
|
109
|
-
*/
|
|
110
|
-
public set color(value: OnemrvaMatColor) {
|
|
111
|
-
switch (value) {
|
|
112
|
-
case OnemrvaMatColor.SUCCESS:
|
|
113
|
-
case OnemrvaMatColor.WARN:
|
|
114
|
-
case OnemrvaMatColor.NONE:
|
|
115
|
-
case OnemrvaMatColor.INFO:
|
|
116
|
-
case OnemrvaMatColor.GRAYSCALE:
|
|
117
|
-
case OnemrvaMatColor.ERROR:
|
|
118
|
-
this._color = value;
|
|
119
|
-
break;
|
|
120
|
-
default:
|
|
121
|
-
this._color = OnemrvaMatColor.INFO;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/** @hidden @internal */
|
|
126
|
-
@HostBinding('class.mat-error')
|
|
127
|
-
public get _isError(): boolean {
|
|
128
|
-
return this.color === OnemrvaMatColor.ERROR;
|
|
129
|
-
}
|
|
130
|
-
/** @hidden @internal */
|
|
131
|
-
@HostBinding('class.mat-warn')
|
|
132
|
-
public get _isWarn(): boolean {
|
|
133
|
-
return this.color === OnemrvaMatColor.WARN;
|
|
134
|
-
}
|
|
135
|
-
/** @hidden @internal */
|
|
136
|
-
@HostBinding('class.mat-success')
|
|
137
|
-
public get _isSuccess(): boolean {
|
|
138
|
-
return this.color === OnemrvaMatColor.SUCCESS;
|
|
139
|
-
}
|
|
140
|
-
/** @hidden @internal */
|
|
141
|
-
@HostBinding('class.mat-grayscale')
|
|
142
|
-
public get isGrayscale(): boolean {
|
|
143
|
-
return (
|
|
144
|
-
this.color === OnemrvaMatColor.GRAYSCALE ||
|
|
145
|
-
this.color === OnemrvaMatColor.NONE
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
/** @hidden @internal */
|
|
149
|
-
@HostBinding('class.mat-info')
|
|
150
|
-
public get _isInfo(): boolean {
|
|
151
|
-
return (
|
|
152
|
-
this.color !== OnemrvaMatColor.ERROR &&
|
|
153
|
-
this.color !== OnemrvaMatColor.WARN &&
|
|
154
|
-
this.color !== OnemrvaMatColor.NONE &&
|
|
155
|
-
this.color !== OnemrvaMatColor.ACCENT &&
|
|
156
|
-
this.color !== OnemrvaMatColor.GRAYSCALE &&
|
|
157
|
-
this.color !== OnemrvaMatColor.SUCCESS
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
ngAfterViewInit(): void {
|
|
162
|
-
if (this.messageCode !== '') {
|
|
163
|
-
console.warn(
|
|
164
|
-
'messageCode input has been deprecated in message-box component, please review documentation to fix this!',
|
|
165
|
-
);
|
|
166
|
-
this.mbcontent.nativeElement.insertAdjacentHTML(
|
|
167
|
-
'beforeend',
|
|
168
|
-
this.messageCode,
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
4
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
-
import { OnemrvaMatMessageBoxComponent } from './onemrva-mat-message-box.component';
|
|
6
|
-
|
|
7
|
-
@NgModule({
|
|
8
|
-
declarations: [OnemrvaMatMessageBoxComponent],
|
|
9
|
-
imports: [CommonModule, MatIconModule, TranslateModule],
|
|
10
|
-
exports: [OnemrvaMatMessageBoxComponent],
|
|
11
|
-
})
|
|
12
|
-
export class OnemrvaMatMessageBoxModule {}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
@use '../../utils' as utils;
|
|
2
|
-
|
|
3
|
-
@mixin multiselect($theme) {
|
|
4
|
-
.mat-select-counter {
|
|
5
|
-
float: right;
|
|
6
|
-
top: 9px;
|
|
7
|
-
position: absolute;
|
|
8
|
-
right: 24px;
|
|
9
|
-
display: block;
|
|
10
|
-
padding: 2px 4px 2px 8px;
|
|
11
|
-
background: utils.palette($theme, 'primary', 50);
|
|
12
|
-
color: utils.palette($theme, 'primary', 500);
|
|
13
|
-
min-width: 24px;
|
|
14
|
-
text-align: center;
|
|
15
|
-
|
|
16
|
-
border: 1px solid utils.palette($theme, 'primary', 300);
|
|
17
|
-
border-radius: 500px;
|
|
18
|
-
span.text {
|
|
19
|
-
font-family: utils.fontFamily($theme, 'button');
|
|
20
|
-
font-style: normal;
|
|
21
|
-
font-weight: 500;
|
|
22
|
-
font-size: 12px;
|
|
23
|
-
line-height: 21px;
|
|
24
|
-
}
|
|
25
|
-
mat-icon {
|
|
26
|
-
font-size: 12px;
|
|
27
|
-
height: 13px;
|
|
28
|
-
width: 13px;
|
|
29
|
-
line-height: 16px;
|
|
30
|
-
padding: 0 2px 0 2px;
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
onemrva-mat-multi-select,
|
|
35
|
-
mat-select {
|
|
36
|
-
.mat-mdc-select-value {
|
|
37
|
-
// padding-right: 48px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
div.mat-mdc-select-panel {
|
|
41
|
-
//overflow: hidden;
|
|
42
|
-
padding: 0;
|
|
43
|
-
.selection-choice {
|
|
44
|
-
text-align: right;
|
|
45
|
-
background: white;
|
|
46
|
-
width: 98%;
|
|
47
|
-
.small {
|
|
48
|
-
font-size: 12px;
|
|
49
|
-
}
|
|
50
|
-
.grey {
|
|
51
|
-
color: utils.palette($theme, 'grayscale', 500) !important;
|
|
52
|
-
}
|
|
53
|
-
.disabled {
|
|
54
|
-
pointer-events: none;
|
|
55
|
-
cursor: default;
|
|
56
|
-
color: utils.palette($theme, 'grayscale', 500) !important;
|
|
57
|
-
text-decoration: none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
.option-list {
|
|
61
|
-
overflow-y: auto;
|
|
62
|
-
height: auto;
|
|
63
|
-
max-height: 226px;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<mat-select
|
|
2
|
-
multiple="true"
|
|
3
|
-
[formControl]="formControl"
|
|
4
|
-
[attr.data-cy]="dataCy"
|
|
5
|
-
[attr.aria-label]="label"
|
|
6
|
-
>
|
|
7
|
-
<div class="selection-choice" *ngIf="selectionToggle">
|
|
8
|
-
<a
|
|
9
|
-
class="small"
|
|
10
|
-
[ngClass]="{ disabled: isAllSelected() }"
|
|
11
|
-
(click)="selectAll()"
|
|
12
|
-
>{{ 'select.select.all' | translate }}</a
|
|
13
|
-
><span class="small grey"> | </span>
|
|
14
|
-
<a
|
|
15
|
-
class="small"
|
|
16
|
-
[ngClass]="{ disabled: isNoneSelected() }"
|
|
17
|
-
(click)="deselectAll($event)"
|
|
18
|
-
>{{ 'select.deselect.all' | translate }}</a
|
|
19
|
-
>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="option-list">
|
|
22
|
-
<mat-option *ngIf="showFilter">
|
|
23
|
-
<mat-select-search
|
|
24
|
-
[formControl]="searchFilter"
|
|
25
|
-
ariaLabel="{{ 'select.search.filter' | translate }}"
|
|
26
|
-
noEntriesFoundLabel="{{ 'select.search.notFound' | translate }}"
|
|
27
|
-
placeholderLabel="{{ 'select.search.filter' | translate }}"
|
|
28
|
-
></mat-select-search>
|
|
29
|
-
</mat-option>
|
|
30
|
-
<ng-container *ngFor="let matOption of matOptions$ | async">
|
|
31
|
-
<mat-option
|
|
32
|
-
[disabled]="matOption.disabled"
|
|
33
|
-
[value]="matOption.value"
|
|
34
|
-
[attr.data-cy]="matOption._getHostElement().dataset['cy']"
|
|
35
|
-
>
|
|
36
|
-
{{ matOption._text?.nativeElement?.innerHTML }}
|
|
37
|
-
</mat-option>
|
|
38
|
-
</ng-container>
|
|
39
|
-
</div>
|
|
40
|
-
</mat-select>
|
|
41
|
-
<div class="mat-select-counter" *ngIf="counter > 0">
|
|
42
|
-
<span class="text">{{ counter }}</span
|
|
43
|
-
><mat-icon (click)="deselectAll($event)">close</mat-icon>
|
|
44
|
-
</div>
|