@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,53 @@
|
|
|
1
|
+
<div class="mat-calendar-header">
|
|
2
|
+
<div class="mat-calendar-controls">
|
|
3
|
+
<button
|
|
4
|
+
mat-button
|
|
5
|
+
type="button"
|
|
6
|
+
class="mat-calendar-period-button"
|
|
7
|
+
(click)="currentPeriodClicked()"
|
|
8
|
+
[attr.aria-label]="periodButtonLabel"
|
|
9
|
+
[attr.aria-describedby]="_periodButtonLabelId"
|
|
10
|
+
aria-live="polite"
|
|
11
|
+
>
|
|
12
|
+
<span aria-hidden="true">{{ periodButtonText }}</span>
|
|
13
|
+
<svg
|
|
14
|
+
class="mat-calendar-arrow"
|
|
15
|
+
[class.mat-calendar-invert]="calendar.currentView !== 'month'"
|
|
16
|
+
viewBox="0 0 10 5"
|
|
17
|
+
focusable="false"
|
|
18
|
+
aria-hidden="true"
|
|
19
|
+
>
|
|
20
|
+
<polygon points="0,0 5,5 10,0" />
|
|
21
|
+
</svg>
|
|
22
|
+
</button>
|
|
23
|
+
|
|
24
|
+
<div class="mat-calendar-spacer"></div>
|
|
25
|
+
<!-- Component a is the only difference with the view coming from @angular/material -->
|
|
26
|
+
<a class="onemrva-calendar-header-today" (click)="setToday()">{{
|
|
27
|
+
"today" | translate
|
|
28
|
+
}}</a>
|
|
29
|
+
|
|
30
|
+
<ng-content></ng-content>
|
|
31
|
+
|
|
32
|
+
<button
|
|
33
|
+
mat-icon-button
|
|
34
|
+
type="button"
|
|
35
|
+
class="mat-calendar-previous-button"
|
|
36
|
+
[disabled]="!previousEnabled()"
|
|
37
|
+
(click)="previousClicked()"
|
|
38
|
+
[attr.aria-label]="prevButtonLabel"
|
|
39
|
+
></button>
|
|
40
|
+
|
|
41
|
+
<button
|
|
42
|
+
mat-icon-button
|
|
43
|
+
type="button"
|
|
44
|
+
class="mat-calendar-next-button"
|
|
45
|
+
[disabled]="!nextEnabled()"
|
|
46
|
+
(click)="nextClicked()"
|
|
47
|
+
[attr.aria-label]="nextButtonLabel"
|
|
48
|
+
></button>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<label [id]="_periodButtonLabelId" class="mat-calendar-hidden-label">{{
|
|
52
|
+
periodButtonDescription
|
|
53
|
+
}}</label>
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectorRef,
|
|
4
|
+
Component,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
Inject,
|
|
7
|
+
Optional,
|
|
8
|
+
forwardRef,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
+
import {
|
|
12
|
+
DateAdapter,
|
|
13
|
+
MAT_DATE_FORMATS,
|
|
14
|
+
MatDateFormats,
|
|
15
|
+
} from '@angular/material/core';
|
|
16
|
+
import { MatCalendar, MatDatepickerIntl } from '@angular/material/datepicker';
|
|
17
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
18
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
19
|
+
import { Subject } from 'rxjs';
|
|
20
|
+
|
|
21
|
+
const YEARS_PER_PAGE = 24;
|
|
22
|
+
let calendarHeaderId = 1;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Code completely copied from https://github.com/angular/components/tree/main/src/material/datepicker
|
|
26
|
+
* The only difference is the method setToday()
|
|
27
|
+
*/
|
|
28
|
+
@Component({
|
|
29
|
+
selector: 'onemrva-mat-datepicker-header',
|
|
30
|
+
standalone: true,
|
|
31
|
+
imports: [CommonModule, MatButtonModule, MatIconModule, TranslateModule],
|
|
32
|
+
templateUrl: 'onemrva-mat-datepicker-header.component.html',
|
|
33
|
+
providers: [],
|
|
34
|
+
})
|
|
35
|
+
export class OnemrvaMatDatepickerHeader<D> {
|
|
36
|
+
private _destroyed = new Subject<void>();
|
|
37
|
+
|
|
38
|
+
today: EventEmitter<void> = new EventEmitter();
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
private _intl: MatDatepickerIntl,
|
|
42
|
+
@Inject(forwardRef(() => MatCalendar))
|
|
43
|
+
public calendar: MatCalendar<D>,
|
|
44
|
+
@Optional() private _dateAdapter: DateAdapter<D>,
|
|
45
|
+
@Optional()
|
|
46
|
+
@Inject(MAT_DATE_FORMATS)
|
|
47
|
+
private _dateFormats: MatDateFormats,
|
|
48
|
+
changeDetectorRef: ChangeDetectorRef
|
|
49
|
+
) {}
|
|
50
|
+
|
|
51
|
+
setToday() {
|
|
52
|
+
(this.calendar as unknown as MatCalendar<Date>)._goToDateInView(
|
|
53
|
+
new Date(),
|
|
54
|
+
'month'
|
|
55
|
+
);
|
|
56
|
+
this.today.emit();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The display text for the current calendar view. */
|
|
60
|
+
get periodButtonText(): string {
|
|
61
|
+
if (this.calendar.currentView == 'month') {
|
|
62
|
+
return this._dateAdapter
|
|
63
|
+
.format(
|
|
64
|
+
this.calendar.activeDate,
|
|
65
|
+
this._dateFormats.display.monthYearLabel
|
|
66
|
+
)
|
|
67
|
+
.toLocaleUpperCase();
|
|
68
|
+
}
|
|
69
|
+
if (this.calendar.currentView == 'year') {
|
|
70
|
+
return this._dateAdapter.getYearName(this.calendar.activeDate);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return this._intl.formatYearRange(...this._formatMinAndMaxYearLabels());
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** The aria description for the current calendar view. */
|
|
77
|
+
get periodButtonDescription(): string {
|
|
78
|
+
if (this.calendar.currentView == 'month') {
|
|
79
|
+
return this._dateAdapter
|
|
80
|
+
.format(
|
|
81
|
+
this.calendar.activeDate,
|
|
82
|
+
this._dateFormats.display.monthYearLabel
|
|
83
|
+
)
|
|
84
|
+
.toLocaleUpperCase();
|
|
85
|
+
}
|
|
86
|
+
if (this.calendar.currentView == 'year') {
|
|
87
|
+
return this._dateAdapter.getYearName(this.calendar.activeDate);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Format a label for the window of years displayed in the multi-year calendar view. Use
|
|
91
|
+
// `formatYearRangeLabel` because it is TTS friendly.
|
|
92
|
+
return this._intl.formatYearRangeLabel(
|
|
93
|
+
...this._formatMinAndMaxYearLabels()
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** The `aria-label` for changing the calendar view. */
|
|
98
|
+
get periodButtonLabel(): string {
|
|
99
|
+
return this.calendar.currentView == 'month'
|
|
100
|
+
? this._intl.switchToMultiYearViewLabel
|
|
101
|
+
: this._intl.switchToMonthViewLabel;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** The label for the previous button. */
|
|
105
|
+
get prevButtonLabel(): string {
|
|
106
|
+
return {
|
|
107
|
+
month: this._intl.prevMonthLabel,
|
|
108
|
+
year: this._intl.prevYearLabel,
|
|
109
|
+
'multi-year': this._intl.prevMultiYearLabel,
|
|
110
|
+
}[this.calendar.currentView];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** The label for the next button. */
|
|
114
|
+
get nextButtonLabel(): string {
|
|
115
|
+
return {
|
|
116
|
+
month: this._intl.nextMonthLabel,
|
|
117
|
+
year: this._intl.nextYearLabel,
|
|
118
|
+
'multi-year': this._intl.nextMultiYearLabel,
|
|
119
|
+
}[this.calendar.currentView];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Handles user clicks on the period label. */
|
|
123
|
+
currentPeriodClicked(): void {
|
|
124
|
+
this.calendar.currentView =
|
|
125
|
+
this.calendar.currentView == 'month' ? 'multi-year' : 'month';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Handles user clicks on the previous button. */
|
|
129
|
+
previousClicked(): void {
|
|
130
|
+
this.calendar.activeDate =
|
|
131
|
+
this.calendar.currentView == 'month'
|
|
132
|
+
? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1)
|
|
133
|
+
: this._dateAdapter.addCalendarYears(
|
|
134
|
+
this.calendar.activeDate,
|
|
135
|
+
this.calendar.currentView == 'year' ? -1 : -YEARS_PER_PAGE
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Handles user clicks on the next button. */
|
|
140
|
+
nextClicked(): void {
|
|
141
|
+
this.calendar.activeDate =
|
|
142
|
+
this.calendar.currentView == 'month'
|
|
143
|
+
? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1)
|
|
144
|
+
: this._dateAdapter.addCalendarYears(
|
|
145
|
+
this.calendar.activeDate,
|
|
146
|
+
this.calendar.currentView == 'year' ? 1 : YEARS_PER_PAGE
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** Whether the previous period button is enabled. */
|
|
151
|
+
previousEnabled(): boolean {
|
|
152
|
+
if (!this.calendar.minDate) {
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
return (
|
|
156
|
+
!this.calendar.minDate ||
|
|
157
|
+
!this._isSameView(this.calendar.activeDate, this.calendar.minDate)
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** Whether the next period button is enabled. */
|
|
162
|
+
nextEnabled(): boolean {
|
|
163
|
+
return (
|
|
164
|
+
!this.calendar.maxDate ||
|
|
165
|
+
!this._isSameView(this.calendar.activeDate, this.calendar.maxDate)
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Whether the two dates represent the same view in the current view mode (month or year). */
|
|
170
|
+
private _isSameView(date1: D, date2: D): boolean {
|
|
171
|
+
if (this.calendar.currentView == 'month') {
|
|
172
|
+
return (
|
|
173
|
+
this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&
|
|
174
|
+
this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2)
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
if (this.calendar.currentView == 'year') {
|
|
178
|
+
return (
|
|
179
|
+
this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2)
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
// Otherwise we are in 'multi-year' view.
|
|
183
|
+
return isSameMultiYearView(
|
|
184
|
+
this._dateAdapter,
|
|
185
|
+
date1,
|
|
186
|
+
date2,
|
|
187
|
+
this.calendar.minDate,
|
|
188
|
+
this.calendar.maxDate
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Format two individual labels for the minimum year and maximum year available in the multi-year
|
|
194
|
+
* calendar view. Returns an array of two strings where the first string is the formatted label
|
|
195
|
+
* for the minimum year, and the second string is the formatted label for the maximum year.
|
|
196
|
+
*/
|
|
197
|
+
private _formatMinAndMaxYearLabels(): [
|
|
198
|
+
minYearLabel: string,
|
|
199
|
+
maxYearLabel: string
|
|
200
|
+
] {
|
|
201
|
+
// The offset from the active year to the "slot" for the starting year is the
|
|
202
|
+
// *actual* first rendered year in the multi-year view, and the last year is
|
|
203
|
+
// just yearsPerPage - 1 away.
|
|
204
|
+
const activeYear = this._dateAdapter.getYear(this.calendar.activeDate);
|
|
205
|
+
const minYearOfPage =
|
|
206
|
+
activeYear -
|
|
207
|
+
getActiveOffset(
|
|
208
|
+
this._dateAdapter,
|
|
209
|
+
this.calendar.activeDate,
|
|
210
|
+
this.calendar.minDate,
|
|
211
|
+
this.calendar.maxDate
|
|
212
|
+
);
|
|
213
|
+
const maxYearOfPage = minYearOfPage + YEARS_PER_PAGE - 1;
|
|
214
|
+
const minYearLabel = this._dateAdapter.getYearName(
|
|
215
|
+
this._dateAdapter.createDate(minYearOfPage, 0, 1)
|
|
216
|
+
);
|
|
217
|
+
const maxYearLabel = this._dateAdapter.getYearName(
|
|
218
|
+
this._dateAdapter.createDate(maxYearOfPage, 0, 1)
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
return [minYearLabel, maxYearLabel];
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
private _id = `mat-calendar-header-${calendarHeaderId++}`;
|
|
225
|
+
|
|
226
|
+
_periodButtonLabelId = `${this._id}-period-label`;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function isSameMultiYearView<D>(
|
|
230
|
+
dateAdapter: DateAdapter<D>,
|
|
231
|
+
date1: D,
|
|
232
|
+
date2: D,
|
|
233
|
+
minDate: D | null,
|
|
234
|
+
maxDate: D | null
|
|
235
|
+
): boolean {
|
|
236
|
+
const year1 = dateAdapter.getYear(date1);
|
|
237
|
+
const year2 = dateAdapter.getYear(date2);
|
|
238
|
+
const startingYear = getStartingYear(dateAdapter, minDate, maxDate);
|
|
239
|
+
return (
|
|
240
|
+
Math.floor((year1 - startingYear) / YEARS_PER_PAGE) ===
|
|
241
|
+
Math.floor((year2 - startingYear) / YEARS_PER_PAGE)
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* We pick a "starting" year such that either the maximum year would be at the end
|
|
247
|
+
* or the minimum year would be at the beginning of a page.
|
|
248
|
+
*/
|
|
249
|
+
function getStartingYear<D>(
|
|
250
|
+
dateAdapter: DateAdapter<D>,
|
|
251
|
+
minDate: D | null,
|
|
252
|
+
maxDate: D | null
|
|
253
|
+
): number {
|
|
254
|
+
let startingYear = 0;
|
|
255
|
+
if (maxDate) {
|
|
256
|
+
const maxYear = dateAdapter.getYear(maxDate);
|
|
257
|
+
startingYear = maxYear - YEARS_PER_PAGE + 1;
|
|
258
|
+
} else if (minDate) {
|
|
259
|
+
startingYear = dateAdapter.getYear(minDate);
|
|
260
|
+
}
|
|
261
|
+
return startingYear;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* When the multi-year view is first opened, the active year will be in view.
|
|
266
|
+
* So we compute how many years are between the active year and the *slot* where our
|
|
267
|
+
* "startingYear" will render when paged into view.
|
|
268
|
+
*/
|
|
269
|
+
function getActiveOffset<D>(
|
|
270
|
+
dateAdapter: DateAdapter<D>,
|
|
271
|
+
activeDate: D,
|
|
272
|
+
minDate: D | null,
|
|
273
|
+
maxDate: D | null
|
|
274
|
+
): number {
|
|
275
|
+
const activeYear = dateAdapter.getYear(activeDate);
|
|
276
|
+
return euclideanModulo(
|
|
277
|
+
activeYear - getStartingYear(dateAdapter, minDate, maxDate),
|
|
278
|
+
YEARS_PER_PAGE
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/** Gets remainder that is non-negative, even if first number is negative */
|
|
283
|
+
function euclideanModulo(a: number, b: number): number {
|
|
284
|
+
return ((a % b) + b) % b;
|
|
285
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of mat-file upload
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './src/components';
|
|
6
|
+
export * from './src/onemrva-mat-file-upload.module';
|
|
7
|
+
export * from './src/onemrva-mat-file-upload.store';
|
|
8
|
+
export * from './src/onemrva-mat-file-upload.service';
|
|
9
|
+
export * from './src/models/progress-file.model';
|
|
10
|
+
export * from './src/models/action-config.model';
|
|
11
|
+
export * from './src/onemrva-mat-file-upload-itf.store';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnemrvaFilePanelComponent } from './onemrva-mat-file-panel/onemrva-file-panel.component';
|
|
2
|
+
import { OnemrvaMatFileUploadComponent } from './onemrva-mat-file-upload/onemrva-mat-file-upload.component';
|
|
3
|
+
|
|
4
|
+
export const components: any[] = [
|
|
5
|
+
OnemrvaFilePanelComponent,
|
|
6
|
+
OnemrvaMatFileUploadComponent,
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
export * from './onemrva-mat-file-panel/onemrva-file-panel.component';
|
|
10
|
+
export * from './onemrva-mat-file-upload/onemrva-mat-file-upload.component';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<div class="file-panel-title" [attr.data-cy]="dataCy">
|
|
2
|
+
<div class="file-panel-title-left">
|
|
3
|
+
<mat-icon *ngIf="file.color === 'error'" class="filled mat-error"
|
|
4
|
+
>error</mat-icon
|
|
5
|
+
>
|
|
6
|
+
<mat-icon *ngIf="file.color === 'success'" class="filled mat-success"
|
|
7
|
+
>check_circle</mat-icon
|
|
8
|
+
>
|
|
9
|
+
<mat-icon *ngIf="file.color === 'warn'" class="filled mat-warn"
|
|
10
|
+
>warning</mat-icon
|
|
11
|
+
>
|
|
12
|
+
<span class="file-name">
|
|
13
|
+
{{ file.name }}
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="file-panel-title-action">
|
|
17
|
+
<ng-container *ngIf="actions.length > 0">
|
|
18
|
+
<ng-container *ngFor="let action of actions">
|
|
19
|
+
<mat-icon
|
|
20
|
+
*ngIf="action.showAction(file)"
|
|
21
|
+
role="button"
|
|
22
|
+
color="primary"
|
|
23
|
+
[attr.data-cy]="action.dataCy"
|
|
24
|
+
matTooltip="{{ action.tooltipCode | translate }}"
|
|
25
|
+
[attr.aria-label]="action.ariaCode | translate"
|
|
26
|
+
class="clickable"
|
|
27
|
+
(click)="action.clickHandler(file)"
|
|
28
|
+
>{{ action.iconName }}</mat-icon
|
|
29
|
+
>
|
|
30
|
+
</ng-container>
|
|
31
|
+
</ng-container>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="file-panel-content">
|
|
35
|
+
<ng-container *ngIf="file.message === ''">
|
|
36
|
+
<div class="fileInfos">
|
|
37
|
+
{{ file.lastModified | date }}
|
|
38
|
+
<span class="float-right" *ngIf="file.size > 0">{{ size }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div
|
|
42
|
+
class="onemrva-progress-bar"
|
|
43
|
+
*ngIf="showProgress && file.enableProgressBar"
|
|
44
|
+
>
|
|
45
|
+
<div class="onemrva-progress-bar-outer mt-s" #onemrvaProgressBar>
|
|
46
|
+
<div
|
|
47
|
+
class="onemrva-progress-bar-inner"
|
|
48
|
+
[ngStyle]="{ width: (progress$ | async) + '%' }"
|
|
49
|
+
[ngClass]="{
|
|
50
|
+
'progress-success': (progress$ | async)! >= 100
|
|
51
|
+
}"
|
|
52
|
+
data-cy="file-upload-progress"
|
|
53
|
+
[attr.value]="progress$ | async"
|
|
54
|
+
></div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</ng-container>
|
|
58
|
+
<p *ngIf="file.message !== ''" class="message">{{ file.message }}</p>
|
|
59
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$box-shadow: 0px 3px 3px #312f3a29;
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
flex: 1 1 100%;
|
|
5
|
+
&.clickable:hover {
|
|
6
|
+
box-shadow: $box-shadow;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.fileInfos {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 24px;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
.float-right {
|
|
16
|
+
margin-right: 8px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.file-panel-title-left {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
HostBinding,
|
|
5
|
+
Input,
|
|
6
|
+
} from '@angular/core';
|
|
7
|
+
import { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';
|
|
8
|
+
import { of } from 'rxjs';
|
|
9
|
+
import { ActionConfig } from '../../models/action-config.model';
|
|
10
|
+
import {
|
|
11
|
+
formattedSize,
|
|
12
|
+
ReferencedProgressFile,
|
|
13
|
+
} from '../../models/progress-file.model';
|
|
14
|
+
|
|
15
|
+
let NEXT_ID = 0;
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'file-panel',
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
styleUrls: ['./onemrva-file-panel.component.scss'],
|
|
21
|
+
templateUrl: './onemrva-file-panel.component.html',
|
|
22
|
+
})
|
|
23
|
+
export class OnemrvaFilePanelComponent {
|
|
24
|
+
@HostBinding('attr.id')
|
|
25
|
+
@Input()
|
|
26
|
+
public id = `onemrva-file-panel-${NEXT_ID++}`;
|
|
27
|
+
|
|
28
|
+
@HostBinding('attr.data-cy')
|
|
29
|
+
@Input()
|
|
30
|
+
dataCy: string = 'onemrva-file-panel-' + NEXT_ID;
|
|
31
|
+
|
|
32
|
+
@Input()
|
|
33
|
+
file!: ReferencedProgressFile;
|
|
34
|
+
|
|
35
|
+
@Input()
|
|
36
|
+
actions: ActionConfig[] = [];
|
|
37
|
+
|
|
38
|
+
@Input()
|
|
39
|
+
showProgress: boolean = true;
|
|
40
|
+
|
|
41
|
+
get progress$() {
|
|
42
|
+
return of(this.file.progress);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get size() {
|
|
46
|
+
return formattedSize(this.file.size);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
get color(): OnemrvaMatColor {
|
|
50
|
+
return this.file.color;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @hidden @internal */
|
|
54
|
+
@HostBinding('mat-accent')
|
|
55
|
+
public get _colorAccent(): boolean {
|
|
56
|
+
return this.color === OnemrvaMatColor.ACCENT;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** @hidden @internal */
|
|
60
|
+
@HostBinding('class.mat-error')
|
|
61
|
+
public get _isError(): boolean {
|
|
62
|
+
return this.color === OnemrvaMatColor.ERROR;
|
|
63
|
+
}
|
|
64
|
+
/** @hidden @internal */
|
|
65
|
+
@HostBinding('class.mat-warn')
|
|
66
|
+
public get _isWarn(): boolean {
|
|
67
|
+
return this.color === OnemrvaMatColor.WARN;
|
|
68
|
+
}
|
|
69
|
+
/** @hidden @internal */
|
|
70
|
+
@HostBinding('class.mat-success')
|
|
71
|
+
public get _isSuccess(): boolean {
|
|
72
|
+
return this.color === OnemrvaMatColor.SUCCESS;
|
|
73
|
+
}
|
|
74
|
+
/** @hidden @internal */
|
|
75
|
+
@HostBinding('class.mat-primary')
|
|
76
|
+
public get _isPrimary(): boolean {
|
|
77
|
+
return this.color === OnemrvaMatColor.PRIMARY;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<ng-container *ngIf="files$ | async as files">
|
|
2
|
+
<div
|
|
3
|
+
class="onemrva-mat-file-upload-drop-area"
|
|
4
|
+
appDnd
|
|
5
|
+
[ngClass]="{ filein: files.length > 0 }"
|
|
6
|
+
(fileDropped)="onFileDropped($event)"
|
|
7
|
+
[ngClass]="{ 'fu-error': errorMessage !== '' }"
|
|
8
|
+
>
|
|
9
|
+
<input
|
|
10
|
+
type="file"
|
|
11
|
+
#fileDropRef
|
|
12
|
+
[attr.id]="inputId"
|
|
13
|
+
role="button"
|
|
14
|
+
multiple
|
|
15
|
+
(change)="fileBrowseHandler($event)"
|
|
16
|
+
accept="{{ acceptString }}"
|
|
17
|
+
/>
|
|
18
|
+
<p class="outer">
|
|
19
|
+
<span class="inner"
|
|
20
|
+
><mat-icon class="onemrva-upload">download</mat-icon></span
|
|
21
|
+
>
|
|
22
|
+
<span class="inner">{{ "file.upload.drag.and.drop" | translate }}</span>
|
|
23
|
+
<span class="inner"
|
|
24
|
+
>{{ "file.upload.or" | translate }}
|
|
25
|
+
<label for="{{ inputId }}" role="button" class="content">{{
|
|
26
|
+
"file.upload.browse.for.file" | translate
|
|
27
|
+
}}</label></span
|
|
28
|
+
>
|
|
29
|
+
<span class="inner"
|
|
30
|
+
><span *ngIf="maxFileSize > 0"
|
|
31
|
+
>{{ "file.upload.maximum" | translate }} {{ maxFileSizeFormatted }}
|
|
32
|
+
<span *ngIf="acceptString.length > 0">{{ "| " }}</span>
|
|
33
|
+
{{ acceptString }}</span
|
|
34
|
+
></span
|
|
35
|
+
>
|
|
36
|
+
</p>
|
|
37
|
+
<ul class="files-list">
|
|
38
|
+
<li *ngFor="let file of files">
|
|
39
|
+
<ng-container
|
|
40
|
+
*ngTemplateOutlet="
|
|
41
|
+
filePanelTemplate;
|
|
42
|
+
context: { file, $implicit: file }
|
|
43
|
+
"
|
|
44
|
+
></ng-container>
|
|
45
|
+
</li>
|
|
46
|
+
</ul>
|
|
47
|
+
</div>
|
|
48
|
+
<mat-error *ngIf="errorMessage">{{ errorMessage | translate }}</mat-error>
|
|
49
|
+
<mat-error
|
|
50
|
+
*ngIf="fileUploadErrorMessage$ | async as fileUploadErrorMessage"
|
|
51
|
+
>{{ fileUploadErrorMessage | translate }}</mat-error
|
|
52
|
+
>
|
|
53
|
+
</ng-container>
|