@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,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
ChangeDetectorRef,
|
|
4
|
+
Component,
|
|
5
|
+
ContentChild,
|
|
6
|
+
forwardRef,
|
|
7
|
+
HostBinding,
|
|
8
|
+
Input,
|
|
9
|
+
TemplateRef,
|
|
10
|
+
ViewChild,
|
|
11
|
+
} from '@angular/core';
|
|
12
|
+
import { OnemrvaMatTaskTitleComponent } from './onemrva-mat-task-title.component';
|
|
13
|
+
import { OnemrvaMatTaskContentComponent } from './onemrva-mat-task-content.component';
|
|
14
|
+
import { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';
|
|
15
|
+
import { FormControl, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'onemrva-mat-task',
|
|
19
|
+
templateUrl: './onemrva-mat-task.component.html',
|
|
20
|
+
styleUrls: ['onemrva-mat-task.component.scss'],
|
|
21
|
+
})
|
|
22
|
+
export class OnemrvaMatTaskComponent implements AfterViewInit {
|
|
23
|
+
@Input() customNgClass: any;
|
|
24
|
+
|
|
25
|
+
@Input() icon: string | undefined;
|
|
26
|
+
@Input() form: FormControl | undefined;
|
|
27
|
+
@Input() bubble: string | undefined;
|
|
28
|
+
@Input() arialLabel: string = 'select';
|
|
29
|
+
|
|
30
|
+
/** @hidden @internal */
|
|
31
|
+
@HostBinding('class.mat-disabled')
|
|
32
|
+
@Input()
|
|
33
|
+
disabled: boolean = false;
|
|
34
|
+
|
|
35
|
+
@ViewChild(TemplateRef) template!: TemplateRef<any>;
|
|
36
|
+
|
|
37
|
+
@ContentChild(OnemrvaMatTaskTitleComponent)
|
|
38
|
+
title?: OnemrvaMatTaskTitleComponent;
|
|
39
|
+
@ContentChild(OnemrvaMatTaskContentComponent)
|
|
40
|
+
content?: OnemrvaMatTaskContentComponent;
|
|
41
|
+
|
|
42
|
+
constructor(private cd: ChangeDetectorRef) {}
|
|
43
|
+
|
|
44
|
+
ngAfterViewInit() {
|
|
45
|
+
if (this.disabled) {
|
|
46
|
+
this.form?.disable();
|
|
47
|
+
}
|
|
48
|
+
//this.customNgClass = this.customNgClass.merge(['onemrva-mat-task']);
|
|
49
|
+
this.cd.detectChanges();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
private _color: OnemrvaMatColor = OnemrvaMatColor.NONE;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @param value
|
|
61
|
+
*/
|
|
62
|
+
public set color(value: OnemrvaMatColor) {
|
|
63
|
+
this._color = value;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** @hidden @internal */
|
|
67
|
+
@HostBinding('class.mat-accent')
|
|
68
|
+
public get _colorAccent(): boolean {
|
|
69
|
+
return this.color === OnemrvaMatColor.ACCENT;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** @hidden @internal */
|
|
73
|
+
@HostBinding('class.mat-primary')
|
|
74
|
+
public get _isPrimary(): boolean {
|
|
75
|
+
return this.color === OnemrvaMatColor.PRIMARY;
|
|
76
|
+
}
|
|
77
|
+
/** @hidden @internal */
|
|
78
|
+
@HostBinding('class.mat-accent')
|
|
79
|
+
public get _isAccent(): boolean {
|
|
80
|
+
return this.color === OnemrvaMatColor.ACCENT;
|
|
81
|
+
}
|
|
82
|
+
/** @hidden @internal */
|
|
83
|
+
@HostBinding('class.mat-error')
|
|
84
|
+
public get _isError(): boolean {
|
|
85
|
+
return this.color === OnemrvaMatColor.ERROR;
|
|
86
|
+
}
|
|
87
|
+
/** @hidden @internal */
|
|
88
|
+
@HostBinding('class.mat-warn')
|
|
89
|
+
public get _isWarn(): boolean {
|
|
90
|
+
return this.color === OnemrvaMatColor.WARN;
|
|
91
|
+
}
|
|
92
|
+
/** @hidden @internal */
|
|
93
|
+
@HostBinding('class.mat-success')
|
|
94
|
+
public get _isSuccess(): boolean {
|
|
95
|
+
return this.color === OnemrvaMatColor.SUCCESS;
|
|
96
|
+
}
|
|
97
|
+
/** @hidden @internal */
|
|
98
|
+
@HostBinding('class.mat-info')
|
|
99
|
+
public get _isInfo(): boolean {
|
|
100
|
+
return this.color === OnemrvaMatColor.INFO;
|
|
101
|
+
}
|
|
102
|
+
/** @hidden @internal */
|
|
103
|
+
@HostBinding('class.mat-grayscale')
|
|
104
|
+
public get _isGrayscale(): boolean {
|
|
105
|
+
return this.color === OnemrvaMatColor.GRAYSCALE;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@Input()
|
|
109
|
+
public get color(): OnemrvaMatColor {
|
|
110
|
+
return this._color;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
public matColor() {
|
|
114
|
+
if (this.color === OnemrvaMatColor.NONE) return '';
|
|
115
|
+
return `mat-${this.color}`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './src/onemrva-mat-timepicker.module';
|
|
2
|
+
export * from './src/onemrva-mat-timepicker.component';
|
|
3
|
+
export * from './src/timepicker-toggle/timepicker-toggle.component';
|
|
4
|
+
export * from './src/timepicker-dialog/timepicker-dialog.component';
|
|
5
|
+
export * from './src/clock/clock.component';
|
|
6
|
+
export * from './src/timepicker.directive';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<div class="root">
|
|
2
|
+
<div class="circle" (touchmove)="handleTouchMove($event)" (mousemove)="handleMouseMove($event)"
|
|
3
|
+
(touchstart)="disableAnimatedPointer()" (mousedown)="disableAnimatedPointer()" (touchend)="handleTouchEnd($event)"
|
|
4
|
+
(mouseup)="enableAnimatedPointer()" (click)="handleClick($event)">
|
|
5
|
+
<div class="pointer-container"
|
|
6
|
+
[ngClass]="{ 'small-pointer': viewType === 'hours' && (formattedValue === 0 || formattedValue > 12), 'animated-pointer': !touching }"
|
|
7
|
+
[style.transform]="'rotate(' + angle + 'deg)'">
|
|
8
|
+
<button mat-mini-fab [color]="color" class="inner-dot"></button>
|
|
9
|
+
<mat-toolbar [color]="color" class="pointer">
|
|
10
|
+
<button mat-mini-fab [color]="color" class="outer-dot"
|
|
11
|
+
[ngClass]=" { 'outer-dot-odd': viewType === 'minutes' && formattedValue % 5 !== 0 }">
|
|
12
|
+
<ng-container *ngIf="viewType === 'minutes' && formattedValue % 5 !== 0">·</ng-container>
|
|
13
|
+
</button>
|
|
14
|
+
</mat-toolbar>
|
|
15
|
+
</div>
|
|
16
|
+
<ng-container *ngFor="let digit of minuteDots;">
|
|
17
|
+
<button mat-mini-fab class="number minute-dot"
|
|
18
|
+
[ngClass]="{ 'selected': formattedValue === digit.display || (digit.display === 0 && formattedValue === 0), 'disabled': !isAvailable(digit.display === 60 ? 0 : digit.display)}"
|
|
19
|
+
[style.transform]="'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'">
|
|
20
|
+
<ng-container *ngIf="digit.display % 5 !== 0">·</ng-container>
|
|
21
|
+
</button>
|
|
22
|
+
</ng-container>
|
|
23
|
+
<ng-container *ngFor="let digit of numbers;">
|
|
24
|
+
<button mat-mini-fab [color]="color" class="number"
|
|
25
|
+
[ngClass]="{ 'selected': formattedValue === digit.display || (digit.display === 60 && formattedValue === 0), 'disabled': !isAvailable(digit.display === 60 ? 0 : digit.display)}"
|
|
26
|
+
[style.transform]="'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'">
|
|
27
|
+
<ng-template #hoursTemplate>{{ digit.display }}</ng-template>
|
|
28
|
+
<ng-template #minutesTemplate>{{ digit.display === 60 ? '00' : digit.display }}</ng-template>
|
|
29
|
+
<ng-container *ngIf="viewType === 'minutes' then minutesTemplate else hoursTemplate;"></ng-container>
|
|
30
|
+
</button>
|
|
31
|
+
|
|
32
|
+
</ng-container>
|
|
33
|
+
<ng-container *ngFor="let digit of secondaryNumbers;">
|
|
34
|
+
<button mat-mini-fab [color]="color" class="number small-number"
|
|
35
|
+
[ngClass]="{ 'selected': formattedValue === digit.display || (digit.display === 24 && formattedValue === 0), 'disabled': !isAvailable(digit.display === 24 ? 0 : digit.display)}"
|
|
36
|
+
[style.transform]="'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'">
|
|
37
|
+
{{ digit.display === 24 ? '00' : digit.display }}
|
|
38
|
+
</button>
|
|
39
|
+
|
|
40
|
+
</ng-container>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
width: 256px;
|
|
3
|
+
height: 256px;
|
|
4
|
+
cursor: default;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.circle {
|
|
8
|
+
width: 256px;
|
|
9
|
+
height: 256px;
|
|
10
|
+
border-radius: 50%;
|
|
11
|
+
position: relative;
|
|
12
|
+
background: #ededed;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.mat-mdc-mini-fab {
|
|
17
|
+
&.number {
|
|
18
|
+
width: 32px;
|
|
19
|
+
height: 32px;
|
|
20
|
+
left: calc(50% - 16px);
|
|
21
|
+
top: calc(50% - 16px);
|
|
22
|
+
position: absolute;
|
|
23
|
+
text-align: center;
|
|
24
|
+
line-height: 32px;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
user-select: none;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
box-shadow: none;
|
|
35
|
+
|
|
36
|
+
&.disabled {
|
|
37
|
+
color: rgba(1, 1, 1, 0.1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:not(.selected):not(.disabled) {
|
|
41
|
+
color: rgba(0, 0, 0, 0.87);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:not(.disabled).minute-dot {
|
|
45
|
+
color: rgba(1, 1, 1, 0.7);
|
|
46
|
+
&.selected {
|
|
47
|
+
color: transparent;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.small-number {
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
|
|
56
|
+
&:not(.selected):not(.disabled) {
|
|
57
|
+
color: rgba(0, 0, 0, 0.67);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.pointer-container {
|
|
62
|
+
width: calc(50% - 20px);
|
|
63
|
+
height: 2;
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 50%;
|
|
66
|
+
top: calc(50% - 1px);
|
|
67
|
+
transform-origin: left center;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
|
|
70
|
+
&.disabled {
|
|
71
|
+
* {
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.pointer {
|
|
78
|
+
height: 1px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.animated-pointer {
|
|
82
|
+
transition: all 200ms ease-out;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pointer-container {
|
|
86
|
+
&.small-pointer {
|
|
87
|
+
width: calc(50% - 52px);
|
|
88
|
+
.mini-fab {
|
|
89
|
+
}
|
|
90
|
+
mat-toolbar {
|
|
91
|
+
padding: 0 16px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
mat-toolbar {
|
|
95
|
+
padding: 0 54px;
|
|
96
|
+
button {
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.inner-dot {
|
|
102
|
+
position: absolute;
|
|
103
|
+
top: -3px;
|
|
104
|
+
left: -4px;
|
|
105
|
+
width: 8px;
|
|
106
|
+
height: 8px;
|
|
107
|
+
border-radius: 50%;
|
|
108
|
+
box-shadow: 0 3px 5px -1px #0003, 0 6px 10px #00000024, 0 1px 18px #0000001f;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.outer-dot {
|
|
112
|
+
width: 32px;
|
|
113
|
+
height: 32px;
|
|
114
|
+
position: absolute;
|
|
115
|
+
right: -16px;
|
|
116
|
+
box-shadow: 0 3px 5px -1px #0003, 0 6px 10px #00000024, 0 1px 18px #0000001f;
|
|
117
|
+
border-radius: 50%;
|
|
118
|
+
box-sizing: content-box;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.outer-dot-odd {
|
|
122
|
+
box-shadow: 0 3px 5px -1px #0003, 0 6px 10px #00000024, 0 1px 18px #0000001f;
|
|
123
|
+
width: 32px;
|
|
124
|
+
height: 32px;
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ClockComponent } from './clock.component';
|
|
4
|
+
|
|
5
|
+
describe('ClockComponent', () => {
|
|
6
|
+
let component: ClockComponent;
|
|
7
|
+
let fixture: ComponentFixture<ClockComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ClockComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(ClockComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should create', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
Input,
|
|
4
|
+
Output,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
OnChanges,
|
|
7
|
+
SimpleChanges,
|
|
8
|
+
ChangeDetectionStrategy,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import {
|
|
11
|
+
ClockViewType,
|
|
12
|
+
ClockNumber,
|
|
13
|
+
IAllowed24HourMap,
|
|
14
|
+
} from '../interfaces-and-types';
|
|
15
|
+
import { getIsAvailabeFn } from '../util';
|
|
16
|
+
import { ThemePalette } from '@angular/material/core';
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'mat-clock',
|
|
20
|
+
templateUrl: './clock.component.html',
|
|
21
|
+
styleUrls: ['./clock.component.scss'],
|
|
22
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
+
})
|
|
24
|
+
export class ClockComponent implements OnChanges {
|
|
25
|
+
@Input() viewType: ClockViewType = 'hours';
|
|
26
|
+
@Input() color: ThemePalette = 'primary';
|
|
27
|
+
@Input() formattedValue: number = 0;
|
|
28
|
+
@Input() minDate!: Date;
|
|
29
|
+
@Input() maxDate!: Date;
|
|
30
|
+
@Input() formattedHours: number = 0;
|
|
31
|
+
@Input() minutes!: number;
|
|
32
|
+
@Output() changeEvent: EventEmitter<any> = new EventEmitter<any>();
|
|
33
|
+
@Output() unavailableSelection: EventEmitter<any> = new EventEmitter<any>();
|
|
34
|
+
@Output() invalidSelection: EventEmitter<any> = new EventEmitter<any>();
|
|
35
|
+
|
|
36
|
+
@Input() allowed24HourMap!: IAllowed24HourMap;
|
|
37
|
+
|
|
38
|
+
isFormattedValueAllowed = true;
|
|
39
|
+
|
|
40
|
+
isAvailableFn?: ReturnType<typeof getIsAvailabeFn>;
|
|
41
|
+
|
|
42
|
+
touching = false;
|
|
43
|
+
angle?: number;
|
|
44
|
+
numbers: ClockNumber[] = [];
|
|
45
|
+
secondaryNumbers: ClockNumber[] = [];
|
|
46
|
+
minuteDots: ClockNumber[] = [];
|
|
47
|
+
invalidMeridiemEmitted = true;
|
|
48
|
+
|
|
49
|
+
initIsAllowedFn() {
|
|
50
|
+
if (!this.allowed24HourMap) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.isAvailableFn = getIsAvailabeFn(this.allowed24HourMap);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
isAvailable(value: number) {
|
|
57
|
+
return this.isAvailableFn
|
|
58
|
+
? this.isAvailableFn(value, this.viewType, this.formattedHours)
|
|
59
|
+
: true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
ngOnChanges(simpleChanges: SimpleChanges) {
|
|
63
|
+
if (
|
|
64
|
+
simpleChanges['allowed24HourMap'] ||
|
|
65
|
+
(simpleChanges['mode'] && !simpleChanges['mode'].firstChange)
|
|
66
|
+
) {
|
|
67
|
+
this.initIsAllowedFn();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
this.calculateAngule();
|
|
71
|
+
this.setNumbers();
|
|
72
|
+
|
|
73
|
+
if (simpleChanges['formattedValue'] && this.allowed24HourMap) {
|
|
74
|
+
this.isFormattedValueAllowed = this.isAvailable(this.formattedValue);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const isSelectedTimeAvailable = this.isAvailableFn
|
|
78
|
+
? this.isAvailableFn(this.formattedValue, 'minutes', this.formattedHours)
|
|
79
|
+
: true;
|
|
80
|
+
|
|
81
|
+
if (this.viewType === 'minutes' && this.isAvailableFn) {
|
|
82
|
+
const areMinitesAvailable = this.isAvailableFn(
|
|
83
|
+
this.minutes,
|
|
84
|
+
'minutes',
|
|
85
|
+
this.formattedHours
|
|
86
|
+
);
|
|
87
|
+
if (!areMinitesAvailable) {
|
|
88
|
+
if (this.minDate && this.minDate.getMinutes() > this.minutes) {
|
|
89
|
+
setTimeout(() => {
|
|
90
|
+
this.changeEvent.emit({
|
|
91
|
+
value: this.minDate.getMinutes(),
|
|
92
|
+
type: 'minutes',
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
} else {
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
this.changeEvent.emit({
|
|
98
|
+
value: this.maxDate.getMinutes(),
|
|
99
|
+
type: 'minutes',
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (isSelectedTimeAvailable && this.invalidMeridiemEmitted) {
|
|
107
|
+
this.invalidMeridiemEmitted = false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
this.invalidSelection.emit(!isSelectedTimeAvailable);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
calculateAngule() {
|
|
114
|
+
this.angle = this.getPointerAngle(this.formattedValue, this.viewType);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
setNumbers() {
|
|
118
|
+
if (this.viewType === 'hours') {
|
|
119
|
+
// if (this.mode === '12h') {
|
|
120
|
+
// const meridiem : string = this.isPm ? 'pm' : 'am';
|
|
121
|
+
// const isAllowedFn = this.allowed12HourMap ? (num : number) => this.allowed12HourMap[meridiem][num + 1][0] : undefined;
|
|
122
|
+
// this.numbers = this.getNumbers(12, { size: 256 }, isAllowedFn);
|
|
123
|
+
// this.secondaryNumbers = [];
|
|
124
|
+
// this.minuteDots = [];
|
|
125
|
+
// } else if (this.mode === '24h') {
|
|
126
|
+
const isAllowedFn = this.allowed24HourMap
|
|
127
|
+
? (num: number) => this.allowed24HourMap[num][0]
|
|
128
|
+
: undefined;
|
|
129
|
+
this.numbers = this.getNumbers(12, { size: 256 }, isAllowedFn);
|
|
130
|
+
this.secondaryNumbers = this.getNumbers(
|
|
131
|
+
12,
|
|
132
|
+
{ size: 256 - 64, start: 13 },
|
|
133
|
+
isAllowedFn
|
|
134
|
+
);
|
|
135
|
+
this.minuteDots = [];
|
|
136
|
+
//}
|
|
137
|
+
} else {
|
|
138
|
+
//const meridiem : string = this.isPm ? 'pm' : 'am';
|
|
139
|
+
const isAllowedFn =
|
|
140
|
+
// !!this.allowed12HourMap ? (num : number) => this.allowed12HourMap[meridiem][this.formattedHours][num] :
|
|
141
|
+
!!this.allowed24HourMap
|
|
142
|
+
? (num: number) => this.allowed24HourMap[this.formattedHours][num]
|
|
143
|
+
: undefined;
|
|
144
|
+
|
|
145
|
+
this.numbers = this.getNumbers(
|
|
146
|
+
12,
|
|
147
|
+
{ size: 256, start: 5, step: 5 },
|
|
148
|
+
isAllowedFn
|
|
149
|
+
);
|
|
150
|
+
this.minuteDots = this.getNumbers(60, { size: 256, start: 13 }).map(
|
|
151
|
+
(digit) => {
|
|
152
|
+
if (digit.display <= 59) {
|
|
153
|
+
digit.allowed = isAllowedFn ? isAllowedFn(digit.display) : true;
|
|
154
|
+
return digit;
|
|
155
|
+
}
|
|
156
|
+
digit.display = digit.display - 60;
|
|
157
|
+
digit.allowed = isAllowedFn ? isAllowedFn(digit.display) : true;
|
|
158
|
+
return digit;
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
this.secondaryNumbers = [];
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
disableAnimatedPointer() {
|
|
166
|
+
this.touching = true;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
enableAnimatedPointer() {
|
|
170
|
+
this.touching = false;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
handleTouchMove = (e: any) => {
|
|
174
|
+
e.preventDefault(); // prevent scrolling behind the clock on iOS
|
|
175
|
+
const rect = e.target.getBoundingClientRect();
|
|
176
|
+
this.movePointer(
|
|
177
|
+
e.changedTouches[0].clientX - rect.left,
|
|
178
|
+
e.changedTouches[0].clientY - rect.top
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
handleTouchEnd(e: any) {
|
|
183
|
+
this.handleTouchMove(e);
|
|
184
|
+
this.enableAnimatedPointer();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
handleMouseMove(e: any) {
|
|
188
|
+
// MouseEvent.which is deprecated, but MouseEvent.buttons is not supported in Safari
|
|
189
|
+
if (e.buttons === 1 || e.which === 1) {
|
|
190
|
+
const rect = e.target.getBoundingClientRect();
|
|
191
|
+
this.movePointer(e.clientX - rect.left, e.clientY - rect.top);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
handleClick(e: any) {
|
|
196
|
+
const rect = e.target.getBoundingClientRect();
|
|
197
|
+
this.movePointer(e.clientX - rect.left, e.clientY - rect.top);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
movePointer(x: number, y: number) {
|
|
201
|
+
const value = this.getPointerValue(x, y, 256);
|
|
202
|
+
if (!this.isAvailable(value)) {
|
|
203
|
+
this.unavailableSelection.emit();
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (value !== this.formattedValue) {
|
|
207
|
+
this.changeEvent.emit({
|
|
208
|
+
value,
|
|
209
|
+
type: this.viewType !== 'minutes' ? 'hours' : 'minutes',
|
|
210
|
+
});
|
|
211
|
+
if (this.viewType !== 'minutes') {
|
|
212
|
+
if (!this.isAvailable(value)) {
|
|
213
|
+
if (this.minDate && this.isAvailable(value)) {
|
|
214
|
+
this.changeEvent.emit({
|
|
215
|
+
value: this.minDate.getMinutes(),
|
|
216
|
+
type: 'minutes',
|
|
217
|
+
});
|
|
218
|
+
} else if (this.maxDate && this.isAvailable(value)) {
|
|
219
|
+
this.changeEvent.emit({
|
|
220
|
+
value: this.maxDate.getMinutes(),
|
|
221
|
+
type: 'minutes',
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
getNumbers(
|
|
230
|
+
count: number,
|
|
231
|
+
{ size = 0, start = 1, step = 1 },
|
|
232
|
+
isAllowedFn?: (num: number) => boolean
|
|
233
|
+
) {
|
|
234
|
+
return Array.apply(null, Array(count)).map((_, i) => ({
|
|
235
|
+
display: i * step + start,
|
|
236
|
+
translateX: (size / 2 - 20) * Math.cos((2 * Math.PI * (i - 2)) / count),
|
|
237
|
+
translateY: (size / 2 - 20) * Math.sin((2 * Math.PI * (i - 2)) / count),
|
|
238
|
+
allowed: isAllowedFn ? isAllowedFn(i) : true,
|
|
239
|
+
}));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
getPointerAngle(value: number, mode: ClockViewType) {
|
|
243
|
+
if (this.viewType === 'hours') {
|
|
244
|
+
return (360 / 12) * ((value % 12) - 3);
|
|
245
|
+
}
|
|
246
|
+
return (360 / 60) * (value - 15);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
getPointerValue(x: number, y: number, size: number) {
|
|
250
|
+
let value;
|
|
251
|
+
let angle = (Math.atan2(size / 2 - x, size / 2 - y) / Math.PI) * 180;
|
|
252
|
+
if (angle < 0) {
|
|
253
|
+
angle = 360 + angle;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (this.viewType === 'hours') {
|
|
257
|
+
const radius = Math.sqrt(
|
|
258
|
+
Math.pow(size / 2 - x, 2) + Math.pow(size / 2 - y, 2)
|
|
259
|
+
);
|
|
260
|
+
value = 12 - Math.round((angle * 12) / 360);
|
|
261
|
+
if (value === 0) {
|
|
262
|
+
value = 12;
|
|
263
|
+
}
|
|
264
|
+
if (radius < size / 2 - 32) {
|
|
265
|
+
value = value === 12 ? 0 : value + 12;
|
|
266
|
+
}
|
|
267
|
+
return value;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
value = Math.round(60 - (60 * angle) / 360);
|
|
271
|
+
return value === 60 ? 0 : value;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ClockViewType = 'hours' | 'minutes';
|
|
2
|
+
|
|
3
|
+
export interface ClockNumber {
|
|
4
|
+
display: number;
|
|
5
|
+
translateX: number;
|
|
6
|
+
translateY: number;
|
|
7
|
+
allowed: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ITimeData {
|
|
11
|
+
minutes: number;
|
|
12
|
+
hours: number;
|
|
13
|
+
meridiem: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IAllowed24HourMap { [hour: number]: { [minute: number]: boolean; }; }
|
package/projects/onemrva/design-system/mat-timepicker/src/onemrva-mat-timepicker.component.html
ADDED
|
File without changes
|