@onemrvapublic/design-system 0.0.0
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/.dockerignore +4 -0
- package/.editorconfig +16 -0
- package/.github/workflows/npm-publish.yml +34 -0
- package/README.md +27 -0
- package/angular.json +214 -0
- package/build.sh +108 -0
- package/cypress.config.ts +40 -0
- package/index.html +10 -0
- package/npm-publish.sh +11 -0
- package/package.json +89 -0
- package/projects/onemrva/design-system/README.md +24 -0
- package/projects/onemrva/design-system/_index.scss +29 -0
- package/projects/onemrva/design-system/_utils.scss +25 -0
- package/projects/onemrva/design-system/layout/assets/logo_de.svg +3 -0
- package/projects/onemrva/design-system/layout/assets/logo_en.svg +3 -0
- package/projects/onemrva/design-system/layout/assets/logo_fr.svg +3 -0
- package/projects/onemrva/design-system/layout/assets/logo_nl.svg +3 -0
- package/projects/onemrva/design-system/layout/assets/logo_onem_rva.svg +32 -0
- package/projects/onemrva/design-system/layout/index.ts +7 -0
- package/projects/onemrva/design-system/layout/ng-package.json +6 -0
- package/projects/onemrva/design-system/layout/src/components/index.ts +31 -0
- package/projects/onemrva/design-system/layout/src/components/layout/_layout-mixin.component.scss +159 -0
- package/projects/onemrva/design-system/layout/src/components/layout/layout.component.html +194 -0
- package/projects/onemrva/design-system/layout/src/components/layout/layout.component.scss +137 -0
- package/projects/onemrva/design-system/layout/src/components/layout/layout.component.spec.ts +24 -0
- package/projects/onemrva/design-system/layout/src/components/layout/layout.component.ts +187 -0
- package/projects/onemrva/design-system/layout/src/components/layout-content/layout-content.component.spec.ts +24 -0
- package/projects/onemrva/design-system/layout/src/components/layout-content/layout-content.component.ts +23 -0
- package/projects/onemrva/design-system/layout/src/components/layout-footer/layout-footer.component.ts +11 -0
- package/projects/onemrva/design-system/layout/src/components/layout-login-menu/layout-login-menu.component.spec.ts +25 -0
- package/projects/onemrva/design-system/layout/src/components/layout-login-menu/layout-login-menu.component.ts +17 -0
- package/projects/onemrva/design-system/layout/src/components/layout-route/layout-route.component.html +57 -0
- package/projects/onemrva/design-system/layout/src/components/layout-route/layout-route.component.spec.ts +24 -0
- package/projects/onemrva/design-system/layout/src/components/layout-route/layout-route.component.ts +56 -0
- package/projects/onemrva/design-system/layout/src/components/layout-sidenav/layout-sidenav.component.html +104 -0
- package/projects/onemrva/design-system/layout/src/components/layout-sidenav/layout-sidenav.component.ts +88 -0
- package/projects/onemrva/design-system/layout/src/components/layout-sidenav-title/layout-sidenav-title.component.ts +9 -0
- package/projects/onemrva/design-system/layout/src/components/layout-subroute/layout-subroute.component.html +44 -0
- package/projects/onemrva/design-system/layout/src/components/layout-subroute/layout-subroute.component.spec.ts +24 -0
- package/projects/onemrva/design-system/layout/src/components/layout-subroute/layout-subroute.component.ts +35 -0
- package/projects/onemrva/design-system/layout/src/components/layout-title/layout-title.component.spec.ts +25 -0
- package/projects/onemrva/design-system/layout/src/components/layout-title/layout-title.component.ts +17 -0
- package/projects/onemrva/design-system/layout/src/decorators/coerce-boolean-input.decorator.ts +19 -0
- package/projects/onemrva/design-system/layout/src/decorators/observable-content.decorator.ts +13 -0
- package/projects/onemrva/design-system/layout/src/directives/drawer-host.directive.ts +10 -0
- package/projects/onemrva/design-system/layout/src/enums/environment.enum.ts +6 -0
- package/projects/onemrva/design-system/layout/src/layout.component.spec.ts +24 -0
- package/projects/onemrva/design-system/layout/src/layout.module.ts +103 -0
- package/projects/onemrva/design-system/layout/src/models/onem-language.model.ts +4 -0
- package/projects/onemrva/design-system/layout/src/models/onemrva-profile.model.ts +57 -0
- package/projects/onemrva/design-system/layout/src/services/drawer.service.ts +28 -0
- package/projects/onemrva/design-system/layout/src/striphtml.pipe.ts +11 -0
- package/projects/onemrva/design-system/layout/src/test.ts +25 -0
- package/projects/onemrva/design-system/mat-avatar/index.ts +2 -0
- package/projects/onemrva/design-system/mat-avatar/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.component.html +17 -0
- package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.component.scss +130 -0
- package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.component.ts +421 -0
- package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.module.ts +17 -0
- package/projects/onemrva/design-system/mat-badge/index.ts +6 -0
- package/projects/onemrva/design-system/mat-badge/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-badge/src/onemrva-mat-badge.component.scss +152 -0
- package/projects/onemrva/design-system/mat-badge/src/onemrva-mat-badge.component.ts +291 -0
- package/projects/onemrva/design-system/mat-badge/src/onemrva-mat-badge.module.ts +8 -0
- package/projects/onemrva/design-system/mat-breadcrumb/index.ts +7 -0
- package/projects/onemrva/design-system/mat-breadcrumb/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.html +37 -0
- package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.scss +70 -0
- package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.ts +16 -0
- package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.model.ts +4 -0
- package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.module.ts +12 -0
- package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.service.ts +65 -0
- package/projects/onemrva/design-system/mat-clipboard/index.ts +6 -0
- package/projects/onemrva/design-system/mat-clipboard/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-clipboard/src/_onemrva-mat-spinner.component.scss +62 -0
- package/projects/onemrva/design-system/mat-clipboard/src/onemrva-mat-clipboard.component.ts +16 -0
- package/projects/onemrva/design-system/mat-clipboard/src/onemrva-mat-clipboard.module.ts +14 -0
- package/projects/onemrva/design-system/mat-datepicker-header/index.ts +5 -0
- package/projects/onemrva/design-system/mat-datepicker-header/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-datepicker-header/src/_onemrva-mat-datepicker-header.component.scss +11 -0
- package/projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.html +53 -0
- package/projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.ts +285 -0
- package/projects/onemrva/design-system/mat-file-upload/index.ts +11 -0
- package/projects/onemrva/design-system/mat-file-upload/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-file-upload/src/components/index.ts +10 -0
- package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.html +59 -0
- package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.scss +24 -0
- package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.ts +79 -0
- package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.html +53 -0
- package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.scss +248 -0
- package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.ts +185 -0
- package/projects/onemrva/design-system/mat-file-upload/src/directives/dnd.directive.ts +43 -0
- package/projects/onemrva/design-system/mat-file-upload/src/models/action-config.model.ts +10 -0
- package/projects/onemrva/design-system/mat-file-upload/src/models/progress-file.model.ts +94 -0
- package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload-itf.store.ts +79 -0
- package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload.module.ts +28 -0
- package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload.service.ts +68 -0
- package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload.store.ts +473 -0
- package/projects/onemrva/design-system/mat-input-bank-account/index.ts +5 -0
- package/projects/onemrva/design-system/mat-input-bank-account/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.html +32 -0
- package/projects/onemrva/design-system/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.scss +9 -0
- package/projects/onemrva/design-system/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.ts +125 -0
- package/projects/onemrva/design-system/mat-input-country/index.ts +6 -0
- package/projects/onemrva/design-system/mat-input-country/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-input-country/src/countries.ts +3182 -0
- package/projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.html +29 -0
- package/projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.scss +29 -0
- package/projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.ts +144 -0
- package/projects/onemrva/design-system/mat-input-enterprise-number/index.ts +5 -0
- package/projects/onemrva/design-system/mat-input-enterprise-number/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.html +39 -0
- package/projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.scss +25 -0
- package/projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.ts +190 -0
- package/projects/onemrva/design-system/mat-input-phone/index.ts +6 -0
- package/projects/onemrva/design-system/mat-input-phone/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.html +43 -0
- package/projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.scss +29 -0
- package/projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.ts +261 -0
- package/projects/onemrva/design-system/mat-input-phone/src/phone-number.directive.ts +47 -0
- package/projects/onemrva/design-system/mat-message-box/index.ts +2 -0
- package/projects/onemrva/design-system/mat-message-box/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.component.scss +60 -0
- package/projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.component.ts +134 -0
- package/projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.module.ts +12 -0
- package/projects/onemrva/design-system/mat-multi-select/index.ts +2 -0
- package/projects/onemrva/design-system/mat-multi-select/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-multi-select/src/_onemrva-mat-multi-select.component.scss +66 -0
- package/projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.html +24 -0
- package/projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.ts +152 -0
- package/projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.module.ts +31 -0
- package/projects/onemrva/design-system/mat-notification/index.ts +1 -0
- package/projects/onemrva/design-system/mat-notification/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-notification/src/_onemrva-mat-notification.component.scss +71 -0
- package/projects/onemrva/design-system/mat-notification/src/onemrva-mat-notification.component.html +10 -0
- package/projects/onemrva/design-system/mat-notification/src/onemrva-mat-notification.component.ts +158 -0
- package/projects/onemrva/design-system/mat-paginator/index.ts +6 -0
- package/projects/onemrva/design-system/mat-paginator/ng-package.json +7 -0
- package/projects/onemrva/design-system/mat-paginator/package.json +7 -0
- package/projects/onemrva/design-system/mat-paginator/src/_onemrva-mat-paginator.component.scss +122 -0
- package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.component.html +104 -0
- package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.component.spec.ts +184 -0
- package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.component.ts +214 -0
- package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.module.ts +15 -0
- package/projects/onemrva/design-system/mat-panel/index.ts +6 -0
- package/projects/onemrva/design-system/mat-panel/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-content.component.ts +12 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-content.html +5 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-icon.component.ts +12 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-icon.html +5 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title-action.component.ts +12 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title-action.html +5 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title.component.ts +20 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title.html +8 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.component.html +10 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.component.scss +100 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.component.ts +122 -0
- package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.module.ts +26 -0
- package/projects/onemrva/design-system/mat-pop-over/index.ts +4 -0
- package/projects/onemrva/design-system/mat-pop-over/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over-content.component.ts +13 -0
- package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over-trigger.component.ts +13 -0
- package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.component.html +29 -0
- package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.component.scss +141 -0
- package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.component.ts +47 -0
- package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.module.ts +19 -0
- package/projects/onemrva/design-system/mat-progress-bar/index.ts +1 -0
- package/projects/onemrva/design-system/mat-progress-bar/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-progress-bar/src/_onemrva-mat-progress-bar-mixin.component.scss +37 -0
- package/projects/onemrva/design-system/mat-progress-bar/src/onemrva-mat-progress-bar.component.html +13 -0
- package/projects/onemrva/design-system/mat-progress-bar/src/onemrva-mat-progress-bar.component.ts +27 -0
- package/projects/onemrva/design-system/mat-select-search/index.ts +3 -0
- package/projects/onemrva/design-system/mat-select-search/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-select-search/src/default-options.ts +42 -0
- package/projects/onemrva/design-system/mat-select-search/src/mat-select-no-entries-found.directive.ts +15 -0
- package/projects/onemrva/design-system/mat-select-search/src/mat-select-search-clear.directive.ts +13 -0
- package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.html +67 -0
- package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.scss +126 -0
- package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.spec.ts +790 -0
- package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.ts +612 -0
- package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.module.ts +53 -0
- package/projects/onemrva/design-system/mat-side-menu/index.ts +6 -0
- package/projects/onemrva/design-system/mat-side-menu/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.html +36 -0
- package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.scss +50 -0
- package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.spec.ts +66 -0
- package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.ts +46 -0
- package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.module.ts +14 -0
- package/projects/onemrva/design-system/mat-skeleton/index.ts +3 -0
- package/projects/onemrva/design-system/mat-skeleton/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton-enums.ts +32 -0
- package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.component.html +17 -0
- package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.component.scss +216 -0
- package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.component.ts +173 -0
- package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.module.ts +16 -0
- package/projects/onemrva/design-system/mat-spinner/index.ts +6 -0
- package/projects/onemrva/design-system/mat-spinner/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-spinner/src/_onemrva-mat-spinner.component.scss +62 -0
- package/projects/onemrva/design-system/mat-spinner/src/onemrva-mat-spinner.component.ts +11 -0
- package/projects/onemrva/design-system/mat-spinner/src/onemrva-mat-spinner.module.ts +8 -0
- package/projects/onemrva/design-system/mat-stepper/index.ts +6 -0
- package/projects/onemrva/design-system/mat-stepper/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-stepper/src/_stepper-variables.scss +29 -0
- package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.component.spec.ts +23 -0
- package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.component.ts +60 -0
- package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.html +53 -0
- package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.module.ts +30 -0
- package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.scss +106 -0
- package/projects/onemrva/design-system/mat-stepper/src/onemrva-stepper-animations.ts +40 -0
- package/projects/onemrva/design-system/mat-table-of-content/index.ts +8 -0
- package/projects/onemrva/design-system/mat-table-of-content/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-table-of-content/src/_onemrva-mat-table-of-content.component.scss +79 -0
- package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.component.html +23 -0
- package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.component.ts +128 -0
- package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.directive.ts +67 -0
- package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.service.ts +51 -0
- package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-toc-anchor.model.ts +24 -0
- package/projects/onemrva/design-system/mat-task-list/index.ts +5 -0
- package/projects/onemrva/design-system/mat-task-list/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-content.component.ts +12 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-content.html +5 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.component.html +1 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.component.scss +150 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.component.ts +50 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.module.ts +31 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-title.component.ts +18 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-title.html +5 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task.component.html +17 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task.component.scss +0 -0
- package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task.component.ts +117 -0
- package/projects/onemrva/design-system/mat-timepicker/index.ts +6 -0
- package/projects/onemrva/design-system/mat-timepicker/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.html +42 -0
- package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.scss +129 -0
- package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.spec.ts +25 -0
- package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.ts +273 -0
- package/projects/onemrva/design-system/mat-timepicker/src/interfaces-and-types.ts +16 -0
- package/projects/onemrva/design-system/mat-timepicker/src/onemrva-mat-timepicker.component.html +0 -0
- package/projects/onemrva/design-system/mat-timepicker/src/onemrva-mat-timepicker.component.ts +289 -0
- package/projects/onemrva/design-system/mat-timepicker/src/onemrva-mat-timepicker.module.ts +40 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.html +53 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.scss +69 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.spec.ts +25 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.ts +169 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.html +15 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.scss +32 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.ts +135 -0
- package/projects/onemrva/design-system/mat-timepicker/src/timepicker.directive.ts +594 -0
- package/projects/onemrva/design-system/mat-timepicker/src/util.ts +97 -0
- package/projects/onemrva/design-system/mat-toast/index.ts +6 -0
- package/projects/onemrva/design-system/mat-toast/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-toast/src/onemrva-mat-toast.component.scss +54 -0
- package/projects/onemrva/design-system/mat-toast/src/onemrva-mat-toast.component.ts +36 -0
- package/projects/onemrva/design-system/mat-toast/src/onemrva-mat-toast.module.ts +11 -0
- package/projects/onemrva/design-system/mat-tooltip/index.ts +4 -0
- package/projects/onemrva/design-system/mat-tooltip/ng-package.json +6 -0
- package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.component.scss +9 -0
- package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.component.ts +21 -0
- package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.directive.ts +119 -0
- package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.module.ts +11 -0
- package/projects/onemrva/design-system/ng-package.json +20 -0
- package/projects/onemrva/design-system/package.json +27 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/Arri/303/250re-plan.svg +22 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/Halo.svg +10 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/Ombre.svg +3 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/Page.svg +21 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/Page2.svg +19 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/Soucoupe.svg +70 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/Yeux.svg +6 -0
- package/projects/onemrva/design-system/page-not-found/assets/404/shape.svg +3 -0
- package/projects/onemrva/design-system/page-not-found/index.ts +5 -0
- package/projects/onemrva/design-system/page-not-found/ng-package.json +9 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found-action.component.ts +9 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found-extra.component.ts +9 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found-invader.component.scss +16 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found-invader.component.ts +84 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found-mixin.component.scss +12 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found.component.html +31 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found.component.scss +206 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found.component.ts +59 -0
- package/projects/onemrva/design-system/page-not-found/src/page-not-found.module.ts +24 -0
- package/projects/onemrva/design-system/src/public-api.ts +5 -0
- package/projects/onemrva/design-system/tsconfig.lib.json +12 -0
- package/projects/onemrva/design-system/tsconfig.lib.prod.json +10 -0
- package/projects/onemrva/design-system/utils/index.ts +2 -0
- package/projects/onemrva/design-system/utils/ng-package.json +6 -0
- package/projects/onemrva/design-system/utils/src/enum.utils.ts +6 -0
- package/projects/onemrva/design-system/utils/src/enums/color.enum.ts +14 -0
- package/projects/onemrva/design-system/utils/src/enums/index.ts +2 -0
- package/projects/onemrva/design-system/utils/src/enums/size.enum.ts +11 -0
- package/projects/schematics/README.md +40 -0
- package/projects/schematics/package.json +25 -0
- package/projects/schematics/src/cmp-demo/schema.json +15 -0
- package/projects/schematics/src/collection.json +17 -0
- package/projects/schematics/src/component/files/root/ng-package.json +6 -0
- package/projects/schematics/src/component/files/src/onemrva-mat-__name__.component.html +4 -0
- package/projects/schematics/src/component/schema.json +11 -0
- package/projects/schematics/src/demo/files/demo/demo-__name__.component.html +2 -0
- package/projects/schematics/src/demo/files/demo/readme.md +26 -0
- package/projects/schematics/src/demo/schema.json +15 -0
- package/projects/schematics/tsconfig.json +24 -0
- package/projects/test/.nycrc +5 -0
- package/projects/test/cypress/coverage.webpack.ts +20 -0
- package/projects/test/cypress/cucumber-json/basictest.cucumber.json +402 -0
- package/projects/test/cypress/fixtures/example.json +5 -0
- package/projects/test/cypress/integration/basictest.feature +53 -0
- package/projects/test/cypress/integration/common/basicTestSteps.ts +54 -0
- package/projects/test/cypress/plugins/index.ts +13 -0
- package/projects/test/cypress/support/commands.ts +44 -0
- package/projects/test/cypress/support/e2e.ts +20 -0
- package/projects/test/cypress/tsconfig.json +10 -0
- package/projects/test/cypress/videos/basictest.feature.mp4 +0 -0
- package/projects/test/karma.conf.js +44 -0
- package/projects/test/src/app/app-routing.module.ts +14 -0
- package/projects/test/src/app/app.component.html +14 -0
- package/projects/test/src/app/app.component.scss +0 -0
- package/projects/test/src/app/app.component.spec.ts +35 -0
- package/projects/test/src/app/app.component.ts +51 -0
- package/projects/test/src/app/app.module.ts +103 -0
- package/projects/test/src/app/demos/avatar/demo-avatar.component.html +77 -0
- package/projects/test/src/app/demos/avatar/demo-avatar.component.scss +4 -0
- package/projects/test/src/app/demos/avatar/demo-avatar.component.ts +13 -0
- package/projects/test/src/app/demos/badge/demo-badge.component.html +389 -0
- package/projects/test/src/app/demos/badge/demo-badge.component.scss +4 -0
- package/projects/test/src/app/demos/badge/demo-badge.component.ts +22 -0
- package/projects/test/src/app/demos/badge/readme.md +30 -0
- package/projects/test/src/app/demos/breadcrumb/demo-breadcrumb.component.html +20 -0
- package/projects/test/src/app/demos/breadcrumb/demo-breadcrumb.component.ts +7 -0
- package/projects/test/src/app/demos/breadcrumb/demo-breadcrumb.module.ts +89 -0
- package/projects/test/src/app/demos/breadcrumb/readme.md +29 -0
- package/projects/test/src/app/demos/datepicker/demo-datepicker.component.html +10 -0
- package/projects/test/src/app/demos/datepicker/demo-datepicker.component.scss +5 -0
- package/projects/test/src/app/demos/datepicker/demo-datepicker.component.ts +12 -0
- package/projects/test/src/app/demos/datepicker/demo-datepicker.module.ts +43 -0
- package/projects/test/src/app/demos/datepicker/readme.md +36 -0
- package/projects/test/src/app/demos/file-upload/demo-file-upload.component.html +30 -0
- package/projects/test/src/app/demos/file-upload/demo-file-upload.component.ts +132 -0
- package/projects/test/src/app/demos/file-upload/demo-file-upload.service.ts +60 -0
- package/projects/test/src/app/demos/file-upload/readme.md +26 -0
- package/projects/test/src/app/demos/input-bank-account/demo-input-bank-account.component.ts +19 -0
- package/projects/test/src/app/demos/input-bank-account/demo-input-bank-account.module.ts +20 -0
- package/projects/test/src/app/demos/input-country/demo-input-country.component.html +9 -0
- package/projects/test/src/app/demos/input-country/demo-input-country.component.ts +14 -0
- package/projects/test/src/app/demos/input-country/demo-input-country.module.ts +26 -0
- package/projects/test/src/app/demos/input-enterprise-number/demo-input-enterprise-number.component.ts +13 -0
- package/projects/test/src/app/demos/input-enterprise-number/demo-input-enterprise-number.module.ts +20 -0
- package/projects/test/src/app/demos/input-phone/demo-input-phone.component.html +16 -0
- package/projects/test/src/app/demos/input-phone/demo-input-phone.component.ts +16 -0
- package/projects/test/src/app/demos/input-phone/demo-input-phone.module.ts +21 -0
- package/projects/test/src/app/demos/message-box/demo-message-box.component.html +32 -0
- package/projects/test/src/app/demos/message-box/demo-message-box.component.ts +12 -0
- package/projects/test/src/app/demos/message-box/readme.md +26 -0
- package/projects/test/src/app/demos/multiselect/demo-multiselect.component.html +53 -0
- package/projects/test/src/app/demos/multiselect/demo-multiselect.component.scss +23 -0
- package/projects/test/src/app/demos/multiselect/demo-multiselect.component.ts +53 -0
- package/projects/test/src/app/demos/multiselect/demo-multiselect.module.ts +38 -0
- package/projects/test/src/app/demos/multiselect/readme.md +34 -0
- package/projects/test/src/app/demos/not-found/demo-not-found.component.html +21 -0
- package/projects/test/src/app/demos/not-found/demo-not-found.component.scss +6 -0
- package/projects/test/src/app/demos/not-found/demo-not-found.component.ts +50 -0
- package/projects/test/src/app/demos/not-found/readme.md +44 -0
- package/projects/test/src/app/demos/notification/demo-notification.component.html +5 -0
- package/projects/test/src/app/demos/notification/demo-notification.component.ts +10 -0
- package/projects/test/src/app/demos/paginator/demo-paginator.component.html +35 -0
- package/projects/test/src/app/demos/paginator/demo-paginator.component.ts +25 -0
- package/projects/test/src/app/demos/paginator/readme.md +89 -0
- package/projects/test/src/app/demos/panel/demo-panel.component.html +53 -0
- package/projects/test/src/app/demos/panel/demo-panel.component.scss +3 -0
- package/projects/test/src/app/demos/panel/demo-panel.component.ts +20 -0
- package/projects/test/src/app/demos/panel/readme.md +26 -0
- package/projects/test/src/app/demos/pop-over/demo-pop-over.component.html +130 -0
- package/projects/test/src/app/demos/pop-over/demo-pop-over.component.scss +9 -0
- package/projects/test/src/app/demos/pop-over/demo-pop-over.component.ts +13 -0
- package/projects/test/src/app/demos/pop-over/readme.md +26 -0
- package/projects/test/src/app/demos/progress-bar/demo-progress-bar.component.html +19 -0
- package/projects/test/src/app/demos/progress-bar/demo-progress-bar.component.ts +35 -0
- package/projects/test/src/app/demos/side-menu/demo-side-menu.component.html +5 -0
- package/projects/test/src/app/demos/side-menu/demo-side-menu.component.ts +34 -0
- package/projects/test/src/app/demos/side-menu/readme.md +30 -0
- package/projects/test/src/app/demos/skeleton/demo-skeleton.component.html +119 -0
- package/projects/test/src/app/demos/skeleton/demo-skeleton.component.scss +0 -0
- package/projects/test/src/app/demos/skeleton/demo-skeleton.component.ts +35 -0
- package/projects/test/src/app/demos/spinner/demo-spinner.component.html +1 -0
- package/projects/test/src/app/demos/spinner/demo-spinner.component.ts +10 -0
- package/projects/test/src/app/demos/spinner/readme.md +24 -0
- package/projects/test/src/app/demos/summary-stepper/demo-summary-stepper.component.html +108 -0
- package/projects/test/src/app/demos/summary-stepper/demo-summary-stepper.component.scss +3 -0
- package/projects/test/src/app/demos/summary-stepper/demo-summary-stepper.component.ts +55 -0
- package/projects/test/src/app/demos/summary-stepper/readme.md +26 -0
- package/projects/test/src/app/demos/table/demo-table-datasource.ts +140 -0
- package/projects/test/src/app/demos/table/demo-table.component.html +41 -0
- package/projects/test/src/app/demos/table/demo-table.component.scss +17 -0
- package/projects/test/src/app/demos/table/demo-table.component.ts +51 -0
- package/projects/test/src/app/demos/table/demo-table.module.ts +45 -0
- package/projects/test/src/app/demos/table/readme.md +27 -0
- package/projects/test/src/app/demos/task-list/demo-task-list.component.html +37 -0
- package/projects/test/src/app/demos/task-list/demo-task-list.component.scss +3 -0
- package/projects/test/src/app/demos/task-list/demo-task-list.component.ts +14 -0
- package/projects/test/src/app/demos/task-list/demo-task-list.module.ts +29 -0
- package/projects/test/src/app/demos/task-list/readme.md +26 -0
- package/projects/test/src/app/demos/timepicker/demo-timepicker.component.html +9 -0
- package/projects/test/src/app/demos/timepicker/demo-timepicker.component.ts +31 -0
- package/projects/test/src/app/demos/timepicker/readme.md +26 -0
- package/projects/test/src/app/demos/toast/demo-toast.component.html +8 -0
- package/projects/test/src/app/demos/toast/demo-toast.component.scss +3 -0
- package/projects/test/src/app/demos/toast/demo-toast.component.ts +61 -0
- package/projects/test/src/app/demos/toast/readme.md +30 -0
- package/projects/test/src/app/demos/toc/demo-toc.component.html +288 -0
- package/projects/test/src/app/demos/toc/demo-toc.component.ts +26 -0
- package/projects/test/src/app/demos/tooltip/demo-tooltip.component.html +73 -0
- package/projects/test/src/app/demos/tooltip/demo-tooltip.component.scss +11 -0
- package/projects/test/src/app/demos/tooltip/demo-tooltip.component.ts +14 -0
- package/projects/test/src/app/home.component.ts +54 -0
- package/projects/test/src/app/material.module.ts +39 -0
- package/projects/test/src/app/onemrva-translate-http-loader.ts +35 -0
- package/projects/test/src/app/routes.ts +198 -0
- package/projects/test/src/assets/.gitkeep +0 -0
- package/projects/test/src/assets/i18n/de.json +80 -0
- package/projects/test/src/assets/i18n/en.json +80 -0
- package/projects/test/src/assets/i18n/fr.json +80 -0
- package/projects/test/src/assets/i18n/nl.json +79 -0
- package/projects/test/src/environments/environment.e2e.ts +3 -0
- package/projects/test/src/environments/environment.prod.ts +3 -0
- package/projects/test/src/environments/environment.ts +16 -0
- package/projects/test/src/favicon.ico +0 -0
- package/projects/test/src/index.html +15 -0
- package/projects/test/src/main.ts +12 -0
- package/projects/test/src/polyfills.ts +53 -0
- package/projects/test/src/styles.scss +22 -0
- package/projects/test/src/test.ts +26 -0
- package/projects/test/tsconfig.app.json +15 -0
- package/projects/test/tsconfig.spec.json +18 -0
- package/rva.crt +36 -0
- package/tsconfig.json +44 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<mat-chip-row
|
|
2
|
+
*ngIf="isSmall; else sideMenu"
|
|
3
|
+
class="onemrva-side-menu"
|
|
4
|
+
role="navigation"
|
|
5
|
+
>
|
|
6
|
+
<mat-chip
|
|
7
|
+
role=""
|
|
8
|
+
*ngFor="let menu of menus; let i = index"
|
|
9
|
+
class="onemrva-side-menu-option"
|
|
10
|
+
(click)="selectMenu(menu)"
|
|
11
|
+
[ngClass]="{
|
|
12
|
+
'onemrva-side-menu-current-option':
|
|
13
|
+
menu.path === currentMenu || menu.key === currentMenu
|
|
14
|
+
}"
|
|
15
|
+
[attr.data-cy]="'onemrva-side-menu-chip-option_' + i"
|
|
16
|
+
>
|
|
17
|
+
{{ menu.wordingKey | translate }}
|
|
18
|
+
</mat-chip>
|
|
19
|
+
</mat-chip-row>
|
|
20
|
+
<ng-template #sideMenu>
|
|
21
|
+
<nav class="onemrva-side-menu onemrva-expanded-side-menu">
|
|
22
|
+
<div class="onemrva-side-menu-header">{{ menuHeaderKey | translate }}</div>
|
|
23
|
+
<div
|
|
24
|
+
*ngFor="let menu of menus; let i = index"
|
|
25
|
+
class="onemrva-side-menu-option"
|
|
26
|
+
[ngClass]="{
|
|
27
|
+
'onemrva-side-menu-current-option':
|
|
28
|
+
menu.path === currentMenu || menu.key === currentMenu
|
|
29
|
+
}"
|
|
30
|
+
(click)="selectMenu(menu)"
|
|
31
|
+
[attr.data-cy]="'onemrva-side-menu-option_' + i"
|
|
32
|
+
>
|
|
33
|
+
{{ menu.wordingKey | translate }}
|
|
34
|
+
</div>
|
|
35
|
+
</nav>
|
|
36
|
+
</ng-template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use '../../utils';
|
|
2
|
+
|
|
3
|
+
@mixin sideMenu($theme) {
|
|
4
|
+
onemrva-mat-side-menu {
|
|
5
|
+
$divider: utils.palette($theme, 'grayscale', 900, 0.12);
|
|
6
|
+
|
|
7
|
+
$grey-1: utils.palette($theme, 'grayscale', 900);
|
|
8
|
+
$grey-3: utils.palette($theme, 'grayscale', 700);
|
|
9
|
+
$grey-8: utils.palette($theme, 'grayscale', 300);
|
|
10
|
+
$grey-12: utils.palette($theme, 'grayscale', 50);
|
|
11
|
+
|
|
12
|
+
mat-chip-list {
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
.onemrva-side-menu-option {
|
|
16
|
+
color: $grey-1;
|
|
17
|
+
background-color: $grey-12;
|
|
18
|
+
&:hover {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
background-color: $grey-8;
|
|
21
|
+
}
|
|
22
|
+
&.onemrva-side-menu-current-option {
|
|
23
|
+
background-color: $grey-8;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.onemrva-expanded-side-menu {
|
|
27
|
+
width: 250px;
|
|
28
|
+
border: 1px solid $divider;
|
|
29
|
+
border-radius: 20px;
|
|
30
|
+
|
|
31
|
+
.onemrva-side-menu-header {
|
|
32
|
+
border-radius: 20px 20px 0 0;
|
|
33
|
+
padding: 27px 30px 25px;
|
|
34
|
+
background-color: $grey-3;
|
|
35
|
+
color: white;
|
|
36
|
+
font-weight: 700;
|
|
37
|
+
text-transform: uppercase;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.onemrva-side-menu-option {
|
|
41
|
+
border-top: 1px solid $divider;
|
|
42
|
+
padding: 20px 30px;
|
|
43
|
+
|
|
44
|
+
&:last-child {
|
|
45
|
+
border-radius: 0 0 20px 20px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.spec.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { TestBed, ComponentFixture } from "@angular/core/testing";
|
|
2
|
+
import { By } from "@angular/platform-browser";
|
|
3
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
4
|
+
import { jest } from '@jest/globals';
|
|
5
|
+
|
|
6
|
+
import { OnemrvaMatSideMenuComponent, OnemrvaMenu } from './onemrva-mat-side-menu.component';
|
|
7
|
+
import { MatChipsModule } from "@angular/material/chips";
|
|
8
|
+
import { LayoutModule } from "@angular/cdk/layout";
|
|
9
|
+
|
|
10
|
+
describe('OnemrvaMatSideMenuComponent', () => {
|
|
11
|
+
let component: OnemrvaMatSideMenuComponent;
|
|
12
|
+
let fixture: ComponentFixture<OnemrvaMatSideMenuComponent>;
|
|
13
|
+
|
|
14
|
+
const menu1: OnemrvaMenu = {
|
|
15
|
+
wordingKey: "menu1",
|
|
16
|
+
path: "path1"
|
|
17
|
+
};
|
|
18
|
+
const menu2: OnemrvaMenu = {
|
|
19
|
+
wordingKey: "menu2",
|
|
20
|
+
path: "path2"
|
|
21
|
+
};
|
|
22
|
+
const menus: OnemrvaMenu[] = [menu1, menu2];
|
|
23
|
+
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
TestBed.configureTestingModule({
|
|
26
|
+
declarations: [OnemrvaMatSideMenuComponent],
|
|
27
|
+
imports: [TranslateModule.forRoot(), MatChipsModule, LayoutModule],
|
|
28
|
+
}).compileComponents(); // the component will be compiled
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
beforeEach(() => {
|
|
32
|
+
fixture = TestBed.createComponent(OnemrvaMatSideMenuComponent);
|
|
33
|
+
component = fixture.componentInstance;
|
|
34
|
+
component.menus = menus;
|
|
35
|
+
fixture.detectChanges();
|
|
36
|
+
|
|
37
|
+
component.ngOnInit()
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("Must display all the menus", () => {
|
|
41
|
+
const { debugElement } = fixture;
|
|
42
|
+
expect(debugElement.queryAll(By.css(".onemrva-side-menu-option")).length).toEqual(menus.length);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("Must notify the parent component about the selected option", () => {
|
|
46
|
+
jest.spyOn(component.onSelectOption, 'emit');
|
|
47
|
+
|
|
48
|
+
const option1 = fixture.nativeElement.querySelector("[data-cy=onemrva-side-menu-option_0]");
|
|
49
|
+
option1.click();
|
|
50
|
+
expect(component.onSelectOption.emit).toHaveBeenCalledWith(menu1);
|
|
51
|
+
|
|
52
|
+
const option2 = fixture.nativeElement.querySelector("[data-cy=onemrva-side-menu-option_1]");
|
|
53
|
+
option2.click();
|
|
54
|
+
expect(component.onSelectOption.emit).toHaveBeenCalledWith(menu2);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
describe("Responsivity", () => {
|
|
58
|
+
it("Must display chips when the resolution becomes too small", () => {
|
|
59
|
+
component.isSmall = true; // HWKTODO find out a way to manually resize the screen instead
|
|
60
|
+
fixture.detectChanges();
|
|
61
|
+
|
|
62
|
+
const { debugElement } = fixture;
|
|
63
|
+
expect(debugElement.queryAll(By.css(".mat-chip")).length).toEqual(menus.length);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { BreakpointObserver, Breakpoints, BreakpointState } from '@angular/cdk/layout';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
export interface OnemrvaMenu {
|
|
6
|
+
wordingKey: string;
|
|
7
|
+
path?: string;
|
|
8
|
+
key?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'onemrva-mat-side-menu',
|
|
13
|
+
templateUrl: 'onemrva-mat-side-menu.component.html',
|
|
14
|
+
styles: [],
|
|
15
|
+
})
|
|
16
|
+
export class OnemrvaMatSideMenuComponent implements OnInit, OnDestroy {
|
|
17
|
+
@Input() menuHeaderKey!: string;
|
|
18
|
+
@Input() menus!: OnemrvaMenu[];
|
|
19
|
+
@Input() currentMenu?: string; // string to be matched against menu.path or menu.key
|
|
20
|
+
@Output() onSelectOption: EventEmitter<OnemrvaMenu> = new EventEmitter();
|
|
21
|
+
|
|
22
|
+
isSmall = true;
|
|
23
|
+
breakpointObserverSubscription?: Subscription;
|
|
24
|
+
|
|
25
|
+
constructor(public breakpointObserver: BreakpointObserver) {}
|
|
26
|
+
|
|
27
|
+
ngOnInit(): void {
|
|
28
|
+
this.breakpointObserverSubscription = this.breakpointObserver
|
|
29
|
+
.observe([Breakpoints.XSmall, Breakpoints.Small])
|
|
30
|
+
.subscribe((state: BreakpointState) => {
|
|
31
|
+
if (state.matches) {
|
|
32
|
+
this.isSmall = true;
|
|
33
|
+
} else {
|
|
34
|
+
this.isSmall = false;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
ngOnDestroy(): void {
|
|
40
|
+
this.breakpointObserverSubscription?.unsubscribe();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
selectMenu(menu: OnemrvaMenu) {
|
|
44
|
+
this.onSelectOption.emit(menu);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
+
import { LayoutModule } from '@angular/cdk/layout';
|
|
5
|
+
|
|
6
|
+
import { OnemrvaMatSideMenuComponent } from './onemrva-mat-side-menu.component';
|
|
7
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
8
|
+
|
|
9
|
+
@NgModule({
|
|
10
|
+
declarations: [OnemrvaMatSideMenuComponent],
|
|
11
|
+
imports: [CommonModule, TranslateModule, MatChipsModule, LayoutModule],
|
|
12
|
+
exports: [OnemrvaMatSideMenuComponent],
|
|
13
|
+
})
|
|
14
|
+
export class OnemrvaMatSideMenuModule {}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { mkenum } from '@onemrvapublic/design-system/utils';
|
|
2
|
+
|
|
3
|
+
export type OnemrvaSkeletonLoaderConfigTheme = {
|
|
4
|
+
// This is required since ngStyle is using `any` as well
|
|
5
|
+
// More details in https://angular.io/api/common/NgStyle
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
[k: string]: any;
|
|
8
|
+
} | null;
|
|
9
|
+
|
|
10
|
+
export const OnemrvaMatSkeletonAnimations = mkenum({
|
|
11
|
+
PULSE: 'pulse',
|
|
12
|
+
PROGRESS: 'progress',
|
|
13
|
+
NONE: 'none',
|
|
14
|
+
});
|
|
15
|
+
export type OnemrvaMatSkeletonAnimations =
|
|
16
|
+
(typeof OnemrvaMatSkeletonAnimations)[keyof typeof OnemrvaMatSkeletonAnimations];
|
|
17
|
+
|
|
18
|
+
export const OnemrvaMatSkeletoTypes = mkenum({
|
|
19
|
+
H1: 'h1',
|
|
20
|
+
H2: 'h2',
|
|
21
|
+
H3: 'h3',
|
|
22
|
+
H4: 'h4',
|
|
23
|
+
H5: 'h5',
|
|
24
|
+
H6: 'h6',
|
|
25
|
+
BUTTON: 'button',
|
|
26
|
+
CIRCLE: 'circle',
|
|
27
|
+
SQUARE: 'square',
|
|
28
|
+
CUSTOM: 'custom',
|
|
29
|
+
LINE: '',
|
|
30
|
+
});
|
|
31
|
+
export type OnemrvaMatSkeletoTypes =
|
|
32
|
+
(typeof OnemrvaMatSkeletoTypes)[keyof typeof OnemrvaMatSkeletoTypes];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div
|
|
2
|
+
*ngFor="let item of items"
|
|
3
|
+
class="skeleton-loader"
|
|
4
|
+
aria-busy="true"
|
|
5
|
+
aria-valuemin="0"
|
|
6
|
+
aria-valuemax="100"
|
|
7
|
+
role="progressbar"
|
|
8
|
+
[ngStyle]="theme"
|
|
9
|
+
>
|
|
10
|
+
<ng-container *ngIf="type === 'custom'">
|
|
11
|
+
<ng-content ></ng-content>
|
|
12
|
+
</ng-container>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
onemrva-mat-skeleton {
|
|
2
|
+
|
|
3
|
+
&.circle, &.square {
|
|
4
|
+
--size: 56px;
|
|
5
|
+
--resize: 12px;
|
|
6
|
+
|
|
7
|
+
&.extrasmall {
|
|
8
|
+
--size: 32px;
|
|
9
|
+
--font-size: 12px;
|
|
10
|
+
--resize: 4px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.small {
|
|
14
|
+
--size: 40px;
|
|
15
|
+
--font-size: 16px;
|
|
16
|
+
--resize: 8px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.large {
|
|
20
|
+
--size: 72px;
|
|
21
|
+
--font-size: 32px;
|
|
22
|
+
--resize: 16px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.extralarge {
|
|
26
|
+
--resize: 22px;
|
|
27
|
+
--size: 124px;
|
|
28
|
+
--font-size: 60px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.skeleton-loader {
|
|
32
|
+
width: var(--size);
|
|
33
|
+
height: var(--size);
|
|
34
|
+
margin-top: var(--resize);
|
|
35
|
+
margin-left: var(--resize);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.circle {
|
|
40
|
+
.skeleton-loader {
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.h1 {
|
|
46
|
+
.skeleton-loader {
|
|
47
|
+
height: 51px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.h2 {
|
|
52
|
+
.skeleton-loader {
|
|
53
|
+
height: 46px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.h3 {
|
|
58
|
+
.skeleton-loader {
|
|
59
|
+
height: 40px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.h4 {
|
|
64
|
+
.skeleton-loader {
|
|
65
|
+
height: 35px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.button {
|
|
70
|
+
.skeleton-loader {
|
|
71
|
+
height: 36px;
|
|
72
|
+
width: 120px;
|
|
73
|
+
border-radius: 500px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Added only when `animation` attribute is `progress`
|
|
79
|
+
* at component level. So that we can load the
|
|
80
|
+
* animations only if needed
|
|
81
|
+
*/
|
|
82
|
+
&.progress {
|
|
83
|
+
|
|
84
|
+
.skeleton-loader {
|
|
85
|
+
&:after,
|
|
86
|
+
&:before {
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// position: relative;
|
|
91
|
+
// this adds GPU acceleration
|
|
92
|
+
transform: translate3d(0, 0, 0);
|
|
93
|
+
|
|
94
|
+
&:before {
|
|
95
|
+
animation: progress 2s ease-in-out infinite;
|
|
96
|
+
background-size: 200px 100%;
|
|
97
|
+
position: absolute;
|
|
98
|
+
z-index: 1;
|
|
99
|
+
top: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
width: 200px;
|
|
102
|
+
height: 100%;
|
|
103
|
+
content: '';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.progress {
|
|
110
|
+
|
|
111
|
+
.skeleton-loader {
|
|
112
|
+
|
|
113
|
+
&:before {
|
|
114
|
+
background-image: linear-gradient(
|
|
115
|
+
90deg,
|
|
116
|
+
rgba(255, 255, 255, 0),
|
|
117
|
+
rgba(255, 255, 255, 0.6),
|
|
118
|
+
rgba(255, 255, 255, 0)
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Added only when `animation` attribute is `pulse`
|
|
126
|
+
* at component level. So that we can load the
|
|
127
|
+
* animations only if needed
|
|
128
|
+
*/
|
|
129
|
+
&.pulse {
|
|
130
|
+
|
|
131
|
+
.skeleton-loader {
|
|
132
|
+
|
|
133
|
+
animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
134
|
+
animation-delay: 0.5s;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//For custom mark height to 100% and remove the background
|
|
139
|
+
&.custom {
|
|
140
|
+
|
|
141
|
+
.skeleton-loader {
|
|
142
|
+
|
|
143
|
+
height: 100%;
|
|
144
|
+
background: none;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Removing animation if user enabled the `Reduce Motion` option
|
|
149
|
+
// via operational system and/or browser
|
|
150
|
+
// More details about `prefers-reduced-motion` in https://web.dev/prefers-reduced-motion/
|
|
151
|
+
@media (prefers-reduced-motion: reduce) {
|
|
152
|
+
&.pulse,
|
|
153
|
+
&.progress-dark,
|
|
154
|
+
&.custom,
|
|
155
|
+
&.progress {
|
|
156
|
+
animation: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.progress,
|
|
160
|
+
&.progress-dark,
|
|
161
|
+
&.custom {
|
|
162
|
+
background-image: none;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.skeleton-loader {
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* `overflow` and `position` are required steps to make sure
|
|
171
|
+
* the component respects the specified dimensions
|
|
172
|
+
* given via `theme` object @Input attribute
|
|
173
|
+
*/
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
position: relative;
|
|
176
|
+
|
|
177
|
+
background: rgb(239, 241, 246) no-repeat;
|
|
178
|
+
|
|
179
|
+
border-radius: 4px;
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 20px;
|
|
182
|
+
display: inline-block;
|
|
183
|
+
margin-bottom: 10px;
|
|
184
|
+
|
|
185
|
+
// More details about CSS `will-change` property
|
|
186
|
+
// in https://developer.mozilla.org/en-US/docs/Web/CSS/will-change
|
|
187
|
+
will-change: transform;
|
|
188
|
+
|
|
189
|
+
&:after,
|
|
190
|
+
&:before {
|
|
191
|
+
box-sizing: border-box;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// CSS Animation Keyframes
|
|
197
|
+
@keyframes progress {
|
|
198
|
+
0% {
|
|
199
|
+
transform: translate3d(-200px, 0, 0);
|
|
200
|
+
}
|
|
201
|
+
100% {
|
|
202
|
+
transform: translate3d(calc(200px + 100vw), 0, 0);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@keyframes pulse {
|
|
207
|
+
0% {
|
|
208
|
+
opacity: 1;
|
|
209
|
+
}
|
|
210
|
+
50% {
|
|
211
|
+
opacity: 0.4;
|
|
212
|
+
}
|
|
213
|
+
100% {
|
|
214
|
+
opacity: 1;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
OnInit,
|
|
4
|
+
Input,
|
|
5
|
+
HostBinding,
|
|
6
|
+
SimpleChanges,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { OnemrvaMatSize } from '@onemrvapublic/design-system/utils';
|
|
9
|
+
import {
|
|
10
|
+
OnemrvaMatSkeletonAnimations,
|
|
11
|
+
OnemrvaMatSkeletoTypes,
|
|
12
|
+
OnemrvaSkeletonLoaderConfigTheme,
|
|
13
|
+
} from './onemrva-mat-skeleton-enums';
|
|
14
|
+
|
|
15
|
+
let NEXT_ID = 0;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Skeleton provides a way to display loading element while page is loading.
|
|
19
|
+
*
|
|
20
|
+
* @MatModule OnemrvaMatSkeletonModule
|
|
21
|
+
*
|
|
22
|
+
* @MatKeywords skeleton, loading, progress
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```html
|
|
26
|
+
* <onemrva-mat-skeleton type="avatar" size="large">
|
|
27
|
+
* </onemrva-mat-skeleton>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
@Component({
|
|
31
|
+
selector: 'onemrva-mat-skeleton',
|
|
32
|
+
templateUrl: 'onemrva-mat-skeleton.component.html',
|
|
33
|
+
styleUrls: ['onemrva-mat-skeleton.component.scss'],
|
|
34
|
+
})
|
|
35
|
+
export class OnemrvaMatSkeletonComponent implements OnInit {
|
|
36
|
+
@Input()
|
|
37
|
+
count: number = 1;
|
|
38
|
+
|
|
39
|
+
@Input()
|
|
40
|
+
animation: OnemrvaMatSkeletonAnimations =
|
|
41
|
+
OnemrvaMatSkeletonAnimations.PROGRESS;
|
|
42
|
+
|
|
43
|
+
@Input()
|
|
44
|
+
type: OnemrvaMatSkeletoTypes = OnemrvaMatSkeletoTypes.LINE;
|
|
45
|
+
|
|
46
|
+
@Input()
|
|
47
|
+
size: OnemrvaMatSize = OnemrvaMatSize.MEDIUM;
|
|
48
|
+
|
|
49
|
+
@Input()
|
|
50
|
+
theme: OnemrvaSkeletonLoaderConfigTheme = [];
|
|
51
|
+
|
|
52
|
+
@HostBinding('attr.aria-label')
|
|
53
|
+
@Input()
|
|
54
|
+
ariaLabel = 'loading';
|
|
55
|
+
|
|
56
|
+
@HostBinding('attr.role')
|
|
57
|
+
@Input()
|
|
58
|
+
public role = 'progressbar';
|
|
59
|
+
|
|
60
|
+
@HostBinding('attr.valuetext')
|
|
61
|
+
@Input()
|
|
62
|
+
public loadingText = 'Loading...';
|
|
63
|
+
|
|
64
|
+
@HostBinding('attr.id')
|
|
65
|
+
@Input()
|
|
66
|
+
public id = `onemrva-mat-skeleton-${NEXT_ID++}`;
|
|
67
|
+
|
|
68
|
+
/** @hidden @internal */
|
|
69
|
+
@HostBinding('class.progress')
|
|
70
|
+
public get _isProgress(): boolean {
|
|
71
|
+
return this.animation === OnemrvaMatSkeletonAnimations.PROGRESS;
|
|
72
|
+
}
|
|
73
|
+
/** @hidden @internal */
|
|
74
|
+
@HostBinding('class.pulse')
|
|
75
|
+
public get _isPulse(): boolean {
|
|
76
|
+
return this.animation === OnemrvaMatSkeletonAnimations.PULSE;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** @hidden @internal */
|
|
80
|
+
@HostBinding('class.h1')
|
|
81
|
+
public get isH1(): boolean {
|
|
82
|
+
return this.type === OnemrvaMatSkeletoTypes.H1;
|
|
83
|
+
}
|
|
84
|
+
/** @hidden @internal */
|
|
85
|
+
@HostBinding('class.h2')
|
|
86
|
+
public get isH2(): boolean {
|
|
87
|
+
return this.type === OnemrvaMatSkeletoTypes.H2;
|
|
88
|
+
}
|
|
89
|
+
/** @hidden @internal */
|
|
90
|
+
@HostBinding('class.h3')
|
|
91
|
+
public get isH3(): boolean {
|
|
92
|
+
return this.type === OnemrvaMatSkeletoTypes.H3;
|
|
93
|
+
}
|
|
94
|
+
/** @hidden @internal */
|
|
95
|
+
@HostBinding('class.h4')
|
|
96
|
+
public get isH4(): boolean {
|
|
97
|
+
return this.type === OnemrvaMatSkeletoTypes.H4;
|
|
98
|
+
}
|
|
99
|
+
/** @hidden @internal */
|
|
100
|
+
@HostBinding('class.h5')
|
|
101
|
+
public get isH5(): boolean {
|
|
102
|
+
return this.type === OnemrvaMatSkeletoTypes.H5;
|
|
103
|
+
}
|
|
104
|
+
/** @hidden @internal */
|
|
105
|
+
@HostBinding('class.h6')
|
|
106
|
+
public get isH6(): boolean {
|
|
107
|
+
return this.type === OnemrvaMatSkeletoTypes.H6;
|
|
108
|
+
}
|
|
109
|
+
/** @hidden @internal */
|
|
110
|
+
@HostBinding('class.line')
|
|
111
|
+
public get _isLine(): boolean {
|
|
112
|
+
return this.type === OnemrvaMatSkeletoTypes.LINE;
|
|
113
|
+
}
|
|
114
|
+
/** @hidden @internal */
|
|
115
|
+
@HostBinding('class.button')
|
|
116
|
+
public get _isButton(): boolean {
|
|
117
|
+
return this.type === OnemrvaMatSkeletoTypes.BUTTON;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** @hidden @internal */
|
|
121
|
+
@HostBinding('class.circle')
|
|
122
|
+
public get _isCircle(): boolean {
|
|
123
|
+
return this.type === OnemrvaMatSkeletoTypes.CIRCLE;
|
|
124
|
+
}
|
|
125
|
+
/** @hidden @internal */
|
|
126
|
+
@HostBinding('class.square')
|
|
127
|
+
public get _isSquare(): boolean {
|
|
128
|
+
return this.type === OnemrvaMatSkeletoTypes.SQUARE;
|
|
129
|
+
}
|
|
130
|
+
/** @hidden @internal */
|
|
131
|
+
@HostBinding('class.custom')
|
|
132
|
+
public get _isCustom(): boolean {
|
|
133
|
+
return this.type === OnemrvaMatSkeletoTypes.CUSTOM;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** @hidden @internal */
|
|
137
|
+
@HostBinding('class.extrasmall')
|
|
138
|
+
public get _isXSmallSize(): boolean {
|
|
139
|
+
return this.size === OnemrvaMatSize.XSMALL;
|
|
140
|
+
}
|
|
141
|
+
/** @hidden @internal */
|
|
142
|
+
@HostBinding('class.small')
|
|
143
|
+
public get _isSmallSize(): boolean {
|
|
144
|
+
return this.size === OnemrvaMatSize.SMALL;
|
|
145
|
+
}
|
|
146
|
+
/** @hidden @internal */
|
|
147
|
+
@HostBinding('class.medium')
|
|
148
|
+
public get _isMediumSize(): boolean {
|
|
149
|
+
return this.size === OnemrvaMatSize.MEDIUM;
|
|
150
|
+
}
|
|
151
|
+
/** @hidden @internal */
|
|
152
|
+
@HostBinding('class.large')
|
|
153
|
+
public get _isLargeSize(): boolean {
|
|
154
|
+
return this.size === OnemrvaMatSize.LARGE;
|
|
155
|
+
}
|
|
156
|
+
/** @hidden @internal */
|
|
157
|
+
@HostBinding('class.extralarge')
|
|
158
|
+
public get _isXLargeSize(): boolean {
|
|
159
|
+
return this.size === OnemrvaMatSize.XLARGE;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
public items: Array<any> = [];
|
|
163
|
+
|
|
164
|
+
constructor() {}
|
|
165
|
+
|
|
166
|
+
ngOnInit() {
|
|
167
|
+
this.items.length = this.count;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
171
|
+
this.items.length = this.count;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { OnemrvaMatSkeletonComponent } from "./onemrva-mat-skeleton.component";
|
|
4
|
+
|
|
5
|
+
@NgModule({
|
|
6
|
+
declarations: [
|
|
7
|
+
OnemrvaMatSkeletonComponent
|
|
8
|
+
],
|
|
9
|
+
imports: [
|
|
10
|
+
CommonModule
|
|
11
|
+
],
|
|
12
|
+
exports: [
|
|
13
|
+
OnemrvaMatSkeletonComponent
|
|
14
|
+
],
|
|
15
|
+
})
|
|
16
|
+
export class OnemrvaMatSkeletonModule {}
|