@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.
Files changed (434) hide show
  1. package/.dockerignore +4 -0
  2. package/.editorconfig +16 -0
  3. package/.github/workflows/npm-publish.yml +34 -0
  4. package/README.md +27 -0
  5. package/angular.json +214 -0
  6. package/build.sh +108 -0
  7. package/cypress.config.ts +40 -0
  8. package/index.html +10 -0
  9. package/npm-publish.sh +11 -0
  10. package/package.json +89 -0
  11. package/projects/onemrva/design-system/README.md +24 -0
  12. package/projects/onemrva/design-system/_index.scss +29 -0
  13. package/projects/onemrva/design-system/_utils.scss +25 -0
  14. package/projects/onemrva/design-system/layout/assets/logo_de.svg +3 -0
  15. package/projects/onemrva/design-system/layout/assets/logo_en.svg +3 -0
  16. package/projects/onemrva/design-system/layout/assets/logo_fr.svg +3 -0
  17. package/projects/onemrva/design-system/layout/assets/logo_nl.svg +3 -0
  18. package/projects/onemrva/design-system/layout/assets/logo_onem_rva.svg +32 -0
  19. package/projects/onemrva/design-system/layout/index.ts +7 -0
  20. package/projects/onemrva/design-system/layout/ng-package.json +6 -0
  21. package/projects/onemrva/design-system/layout/src/components/index.ts +31 -0
  22. package/projects/onemrva/design-system/layout/src/components/layout/_layout-mixin.component.scss +159 -0
  23. package/projects/onemrva/design-system/layout/src/components/layout/layout.component.html +194 -0
  24. package/projects/onemrva/design-system/layout/src/components/layout/layout.component.scss +137 -0
  25. package/projects/onemrva/design-system/layout/src/components/layout/layout.component.spec.ts +24 -0
  26. package/projects/onemrva/design-system/layout/src/components/layout/layout.component.ts +187 -0
  27. package/projects/onemrva/design-system/layout/src/components/layout-content/layout-content.component.spec.ts +24 -0
  28. package/projects/onemrva/design-system/layout/src/components/layout-content/layout-content.component.ts +23 -0
  29. package/projects/onemrva/design-system/layout/src/components/layout-footer/layout-footer.component.ts +11 -0
  30. package/projects/onemrva/design-system/layout/src/components/layout-login-menu/layout-login-menu.component.spec.ts +25 -0
  31. package/projects/onemrva/design-system/layout/src/components/layout-login-menu/layout-login-menu.component.ts +17 -0
  32. package/projects/onemrva/design-system/layout/src/components/layout-route/layout-route.component.html +57 -0
  33. package/projects/onemrva/design-system/layout/src/components/layout-route/layout-route.component.spec.ts +24 -0
  34. package/projects/onemrva/design-system/layout/src/components/layout-route/layout-route.component.ts +56 -0
  35. package/projects/onemrva/design-system/layout/src/components/layout-sidenav/layout-sidenav.component.html +104 -0
  36. package/projects/onemrva/design-system/layout/src/components/layout-sidenav/layout-sidenav.component.ts +88 -0
  37. package/projects/onemrva/design-system/layout/src/components/layout-sidenav-title/layout-sidenav-title.component.ts +9 -0
  38. package/projects/onemrva/design-system/layout/src/components/layout-subroute/layout-subroute.component.html +44 -0
  39. package/projects/onemrva/design-system/layout/src/components/layout-subroute/layout-subroute.component.spec.ts +24 -0
  40. package/projects/onemrva/design-system/layout/src/components/layout-subroute/layout-subroute.component.ts +35 -0
  41. package/projects/onemrva/design-system/layout/src/components/layout-title/layout-title.component.spec.ts +25 -0
  42. package/projects/onemrva/design-system/layout/src/components/layout-title/layout-title.component.ts +17 -0
  43. package/projects/onemrva/design-system/layout/src/decorators/coerce-boolean-input.decorator.ts +19 -0
  44. package/projects/onemrva/design-system/layout/src/decorators/observable-content.decorator.ts +13 -0
  45. package/projects/onemrva/design-system/layout/src/directives/drawer-host.directive.ts +10 -0
  46. package/projects/onemrva/design-system/layout/src/enums/environment.enum.ts +6 -0
  47. package/projects/onemrva/design-system/layout/src/layout.component.spec.ts +24 -0
  48. package/projects/onemrva/design-system/layout/src/layout.module.ts +103 -0
  49. package/projects/onemrva/design-system/layout/src/models/onem-language.model.ts +4 -0
  50. package/projects/onemrva/design-system/layout/src/models/onemrva-profile.model.ts +57 -0
  51. package/projects/onemrva/design-system/layout/src/services/drawer.service.ts +28 -0
  52. package/projects/onemrva/design-system/layout/src/striphtml.pipe.ts +11 -0
  53. package/projects/onemrva/design-system/layout/src/test.ts +25 -0
  54. package/projects/onemrva/design-system/mat-avatar/index.ts +2 -0
  55. package/projects/onemrva/design-system/mat-avatar/ng-package.json +6 -0
  56. package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.component.html +17 -0
  57. package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.component.scss +130 -0
  58. package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.component.ts +421 -0
  59. package/projects/onemrva/design-system/mat-avatar/src/onemrva-mat-avatar.module.ts +17 -0
  60. package/projects/onemrva/design-system/mat-badge/index.ts +6 -0
  61. package/projects/onemrva/design-system/mat-badge/ng-package.json +6 -0
  62. package/projects/onemrva/design-system/mat-badge/src/onemrva-mat-badge.component.scss +152 -0
  63. package/projects/onemrva/design-system/mat-badge/src/onemrva-mat-badge.component.ts +291 -0
  64. package/projects/onemrva/design-system/mat-badge/src/onemrva-mat-badge.module.ts +8 -0
  65. package/projects/onemrva/design-system/mat-breadcrumb/index.ts +7 -0
  66. package/projects/onemrva/design-system/mat-breadcrumb/ng-package.json +6 -0
  67. package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.html +37 -0
  68. package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.scss +70 -0
  69. package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.ts +16 -0
  70. package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.model.ts +4 -0
  71. package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.module.ts +12 -0
  72. package/projects/onemrva/design-system/mat-breadcrumb/src/onemrva-mat-breadcrumb.service.ts +65 -0
  73. package/projects/onemrva/design-system/mat-clipboard/index.ts +6 -0
  74. package/projects/onemrva/design-system/mat-clipboard/ng-package.json +6 -0
  75. package/projects/onemrva/design-system/mat-clipboard/src/_onemrva-mat-spinner.component.scss +62 -0
  76. package/projects/onemrva/design-system/mat-clipboard/src/onemrva-mat-clipboard.component.ts +16 -0
  77. package/projects/onemrva/design-system/mat-clipboard/src/onemrva-mat-clipboard.module.ts +14 -0
  78. package/projects/onemrva/design-system/mat-datepicker-header/index.ts +5 -0
  79. package/projects/onemrva/design-system/mat-datepicker-header/ng-package.json +6 -0
  80. package/projects/onemrva/design-system/mat-datepicker-header/src/_onemrva-mat-datepicker-header.component.scss +11 -0
  81. package/projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.html +53 -0
  82. package/projects/onemrva/design-system/mat-datepicker-header/src/onemrva-mat-datepicker-header.component.ts +285 -0
  83. package/projects/onemrva/design-system/mat-file-upload/index.ts +11 -0
  84. package/projects/onemrva/design-system/mat-file-upload/ng-package.json +6 -0
  85. package/projects/onemrva/design-system/mat-file-upload/src/components/index.ts +10 -0
  86. package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.html +59 -0
  87. package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.scss +24 -0
  88. package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.ts +79 -0
  89. package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.html +53 -0
  90. package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.scss +248 -0
  91. package/projects/onemrva/design-system/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.ts +185 -0
  92. package/projects/onemrva/design-system/mat-file-upload/src/directives/dnd.directive.ts +43 -0
  93. package/projects/onemrva/design-system/mat-file-upload/src/models/action-config.model.ts +10 -0
  94. package/projects/onemrva/design-system/mat-file-upload/src/models/progress-file.model.ts +94 -0
  95. package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload-itf.store.ts +79 -0
  96. package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload.module.ts +28 -0
  97. package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload.service.ts +68 -0
  98. package/projects/onemrva/design-system/mat-file-upload/src/onemrva-mat-file-upload.store.ts +473 -0
  99. package/projects/onemrva/design-system/mat-input-bank-account/index.ts +5 -0
  100. package/projects/onemrva/design-system/mat-input-bank-account/ng-package.json +6 -0
  101. package/projects/onemrva/design-system/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.html +32 -0
  102. package/projects/onemrva/design-system/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.scss +9 -0
  103. package/projects/onemrva/design-system/mat-input-bank-account/src/onemrva-mat-input-bank-account.component.ts +125 -0
  104. package/projects/onemrva/design-system/mat-input-country/index.ts +6 -0
  105. package/projects/onemrva/design-system/mat-input-country/ng-package.json +6 -0
  106. package/projects/onemrva/design-system/mat-input-country/src/countries.ts +3182 -0
  107. package/projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.html +29 -0
  108. package/projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.scss +29 -0
  109. package/projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.ts +144 -0
  110. package/projects/onemrva/design-system/mat-input-enterprise-number/index.ts +5 -0
  111. package/projects/onemrva/design-system/mat-input-enterprise-number/ng-package.json +6 -0
  112. package/projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.html +39 -0
  113. package/projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.scss +25 -0
  114. package/projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.ts +190 -0
  115. package/projects/onemrva/design-system/mat-input-phone/index.ts +6 -0
  116. package/projects/onemrva/design-system/mat-input-phone/ng-package.json +6 -0
  117. package/projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.html +43 -0
  118. package/projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.scss +29 -0
  119. package/projects/onemrva/design-system/mat-input-phone/src/onemrva-mat-input-phone.component.ts +261 -0
  120. package/projects/onemrva/design-system/mat-input-phone/src/phone-number.directive.ts +47 -0
  121. package/projects/onemrva/design-system/mat-message-box/index.ts +2 -0
  122. package/projects/onemrva/design-system/mat-message-box/ng-package.json +6 -0
  123. package/projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.component.scss +60 -0
  124. package/projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.component.ts +134 -0
  125. package/projects/onemrva/design-system/mat-message-box/src/onemrva-mat-message-box.module.ts +12 -0
  126. package/projects/onemrva/design-system/mat-multi-select/index.ts +2 -0
  127. package/projects/onemrva/design-system/mat-multi-select/ng-package.json +6 -0
  128. package/projects/onemrva/design-system/mat-multi-select/src/_onemrva-mat-multi-select.component.scss +66 -0
  129. package/projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.html +24 -0
  130. package/projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.ts +152 -0
  131. package/projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.module.ts +31 -0
  132. package/projects/onemrva/design-system/mat-notification/index.ts +1 -0
  133. package/projects/onemrva/design-system/mat-notification/ng-package.json +6 -0
  134. package/projects/onemrva/design-system/mat-notification/src/_onemrva-mat-notification.component.scss +71 -0
  135. package/projects/onemrva/design-system/mat-notification/src/onemrva-mat-notification.component.html +10 -0
  136. package/projects/onemrva/design-system/mat-notification/src/onemrva-mat-notification.component.ts +158 -0
  137. package/projects/onemrva/design-system/mat-paginator/index.ts +6 -0
  138. package/projects/onemrva/design-system/mat-paginator/ng-package.json +7 -0
  139. package/projects/onemrva/design-system/mat-paginator/package.json +7 -0
  140. package/projects/onemrva/design-system/mat-paginator/src/_onemrva-mat-paginator.component.scss +122 -0
  141. package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.component.html +104 -0
  142. package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.component.spec.ts +184 -0
  143. package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.component.ts +214 -0
  144. package/projects/onemrva/design-system/mat-paginator/src/onemrva-mat-paginator.module.ts +15 -0
  145. package/projects/onemrva/design-system/mat-panel/index.ts +6 -0
  146. package/projects/onemrva/design-system/mat-panel/ng-package.json +6 -0
  147. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-content.component.ts +12 -0
  148. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-content.html +5 -0
  149. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-icon.component.ts +12 -0
  150. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-icon.html +5 -0
  151. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title-action.component.ts +12 -0
  152. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title-action.html +5 -0
  153. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title.component.ts +20 -0
  154. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel-title.html +8 -0
  155. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.component.html +10 -0
  156. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.component.scss +100 -0
  157. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.component.ts +122 -0
  158. package/projects/onemrva/design-system/mat-panel/src/onemrva-mat-panel.module.ts +26 -0
  159. package/projects/onemrva/design-system/mat-pop-over/index.ts +4 -0
  160. package/projects/onemrva/design-system/mat-pop-over/ng-package.json +6 -0
  161. package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over-content.component.ts +13 -0
  162. package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over-trigger.component.ts +13 -0
  163. package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.component.html +29 -0
  164. package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.component.scss +141 -0
  165. package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.component.ts +47 -0
  166. package/projects/onemrva/design-system/mat-pop-over/src/onemrva-mat-pop-over.module.ts +19 -0
  167. package/projects/onemrva/design-system/mat-progress-bar/index.ts +1 -0
  168. package/projects/onemrva/design-system/mat-progress-bar/ng-package.json +6 -0
  169. package/projects/onemrva/design-system/mat-progress-bar/src/_onemrva-mat-progress-bar-mixin.component.scss +37 -0
  170. package/projects/onemrva/design-system/mat-progress-bar/src/onemrva-mat-progress-bar.component.html +13 -0
  171. package/projects/onemrva/design-system/mat-progress-bar/src/onemrva-mat-progress-bar.component.ts +27 -0
  172. package/projects/onemrva/design-system/mat-select-search/index.ts +3 -0
  173. package/projects/onemrva/design-system/mat-select-search/ng-package.json +6 -0
  174. package/projects/onemrva/design-system/mat-select-search/src/default-options.ts +42 -0
  175. package/projects/onemrva/design-system/mat-select-search/src/mat-select-no-entries-found.directive.ts +15 -0
  176. package/projects/onemrva/design-system/mat-select-search/src/mat-select-search-clear.directive.ts +13 -0
  177. package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.html +67 -0
  178. package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.scss +126 -0
  179. package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.spec.ts +790 -0
  180. package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.component.ts +612 -0
  181. package/projects/onemrva/design-system/mat-select-search/src/mat-select-search.module.ts +53 -0
  182. package/projects/onemrva/design-system/mat-side-menu/index.ts +6 -0
  183. package/projects/onemrva/design-system/mat-side-menu/ng-package.json +6 -0
  184. package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.html +36 -0
  185. package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.scss +50 -0
  186. package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.spec.ts +66 -0
  187. package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.component.ts +46 -0
  188. package/projects/onemrva/design-system/mat-side-menu/src/onemrva-mat-side-menu.module.ts +14 -0
  189. package/projects/onemrva/design-system/mat-skeleton/index.ts +3 -0
  190. package/projects/onemrva/design-system/mat-skeleton/ng-package.json +6 -0
  191. package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton-enums.ts +32 -0
  192. package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.component.html +17 -0
  193. package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.component.scss +216 -0
  194. package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.component.ts +173 -0
  195. package/projects/onemrva/design-system/mat-skeleton/src/onemrva-mat-skeleton.module.ts +16 -0
  196. package/projects/onemrva/design-system/mat-spinner/index.ts +6 -0
  197. package/projects/onemrva/design-system/mat-spinner/ng-package.json +6 -0
  198. package/projects/onemrva/design-system/mat-spinner/src/_onemrva-mat-spinner.component.scss +62 -0
  199. package/projects/onemrva/design-system/mat-spinner/src/onemrva-mat-spinner.component.ts +11 -0
  200. package/projects/onemrva/design-system/mat-spinner/src/onemrva-mat-spinner.module.ts +8 -0
  201. package/projects/onemrva/design-system/mat-stepper/index.ts +6 -0
  202. package/projects/onemrva/design-system/mat-stepper/ng-package.json +6 -0
  203. package/projects/onemrva/design-system/mat-stepper/src/_stepper-variables.scss +29 -0
  204. package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.component.spec.ts +23 -0
  205. package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.component.ts +60 -0
  206. package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.html +53 -0
  207. package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.module.ts +30 -0
  208. package/projects/onemrva/design-system/mat-stepper/src/onemrva-mat-stepper.scss +106 -0
  209. package/projects/onemrva/design-system/mat-stepper/src/onemrva-stepper-animations.ts +40 -0
  210. package/projects/onemrva/design-system/mat-table-of-content/index.ts +8 -0
  211. package/projects/onemrva/design-system/mat-table-of-content/ng-package.json +6 -0
  212. package/projects/onemrva/design-system/mat-table-of-content/src/_onemrva-mat-table-of-content.component.scss +79 -0
  213. package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.component.html +23 -0
  214. package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.component.ts +128 -0
  215. package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.directive.ts +67 -0
  216. package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-table-of-content.service.ts +51 -0
  217. package/projects/onemrva/design-system/mat-table-of-content/src/onemrva-mat-toc-anchor.model.ts +24 -0
  218. package/projects/onemrva/design-system/mat-task-list/index.ts +5 -0
  219. package/projects/onemrva/design-system/mat-task-list/ng-package.json +6 -0
  220. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-content.component.ts +12 -0
  221. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-content.html +5 -0
  222. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.component.html +1 -0
  223. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.component.scss +150 -0
  224. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.component.ts +50 -0
  225. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-list.module.ts +31 -0
  226. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-title.component.ts +18 -0
  227. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task-title.html +5 -0
  228. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task.component.html +17 -0
  229. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task.component.scss +0 -0
  230. package/projects/onemrva/design-system/mat-task-list/src/onemrva-mat-task.component.ts +117 -0
  231. package/projects/onemrva/design-system/mat-timepicker/index.ts +6 -0
  232. package/projects/onemrva/design-system/mat-timepicker/ng-package.json +6 -0
  233. package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.html +42 -0
  234. package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.scss +129 -0
  235. package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.spec.ts +25 -0
  236. package/projects/onemrva/design-system/mat-timepicker/src/clock/clock.component.ts +273 -0
  237. package/projects/onemrva/design-system/mat-timepicker/src/interfaces-and-types.ts +16 -0
  238. package/projects/onemrva/design-system/mat-timepicker/src/onemrva-mat-timepicker.component.html +0 -0
  239. package/projects/onemrva/design-system/mat-timepicker/src/onemrva-mat-timepicker.component.ts +289 -0
  240. package/projects/onemrva/design-system/mat-timepicker/src/onemrva-mat-timepicker.module.ts +40 -0
  241. package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.html +53 -0
  242. package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.scss +69 -0
  243. package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.spec.ts +25 -0
  244. package/projects/onemrva/design-system/mat-timepicker/src/timepicker-dialog/timepicker-dialog.component.ts +169 -0
  245. package/projects/onemrva/design-system/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.html +15 -0
  246. package/projects/onemrva/design-system/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.scss +32 -0
  247. package/projects/onemrva/design-system/mat-timepicker/src/timepicker-toggle/timepicker-toggle.component.ts +135 -0
  248. package/projects/onemrva/design-system/mat-timepicker/src/timepicker.directive.ts +594 -0
  249. package/projects/onemrva/design-system/mat-timepicker/src/util.ts +97 -0
  250. package/projects/onemrva/design-system/mat-toast/index.ts +6 -0
  251. package/projects/onemrva/design-system/mat-toast/ng-package.json +6 -0
  252. package/projects/onemrva/design-system/mat-toast/src/onemrva-mat-toast.component.scss +54 -0
  253. package/projects/onemrva/design-system/mat-toast/src/onemrva-mat-toast.component.ts +36 -0
  254. package/projects/onemrva/design-system/mat-toast/src/onemrva-mat-toast.module.ts +11 -0
  255. package/projects/onemrva/design-system/mat-tooltip/index.ts +4 -0
  256. package/projects/onemrva/design-system/mat-tooltip/ng-package.json +6 -0
  257. package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.component.scss +9 -0
  258. package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.component.ts +21 -0
  259. package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.directive.ts +119 -0
  260. package/projects/onemrva/design-system/mat-tooltip/src/onemrva-mat-tooltip.module.ts +11 -0
  261. package/projects/onemrva/design-system/ng-package.json +20 -0
  262. package/projects/onemrva/design-system/package.json +27 -0
  263. package/projects/onemrva/design-system/page-not-found/assets/404/Arri/303/250re-plan.svg +22 -0
  264. package/projects/onemrva/design-system/page-not-found/assets/404/Halo.svg +10 -0
  265. package/projects/onemrva/design-system/page-not-found/assets/404/Ombre.svg +3 -0
  266. package/projects/onemrva/design-system/page-not-found/assets/404/Page.svg +21 -0
  267. package/projects/onemrva/design-system/page-not-found/assets/404/Page2.svg +19 -0
  268. package/projects/onemrva/design-system/page-not-found/assets/404/Soucoupe.svg +70 -0
  269. package/projects/onemrva/design-system/page-not-found/assets/404/Yeux.svg +6 -0
  270. package/projects/onemrva/design-system/page-not-found/assets/404/shape.svg +3 -0
  271. package/projects/onemrva/design-system/page-not-found/index.ts +5 -0
  272. package/projects/onemrva/design-system/page-not-found/ng-package.json +9 -0
  273. package/projects/onemrva/design-system/page-not-found/src/page-not-found-action.component.ts +9 -0
  274. package/projects/onemrva/design-system/page-not-found/src/page-not-found-extra.component.ts +9 -0
  275. package/projects/onemrva/design-system/page-not-found/src/page-not-found-invader.component.scss +16 -0
  276. package/projects/onemrva/design-system/page-not-found/src/page-not-found-invader.component.ts +84 -0
  277. package/projects/onemrva/design-system/page-not-found/src/page-not-found-mixin.component.scss +12 -0
  278. package/projects/onemrva/design-system/page-not-found/src/page-not-found.component.html +31 -0
  279. package/projects/onemrva/design-system/page-not-found/src/page-not-found.component.scss +206 -0
  280. package/projects/onemrva/design-system/page-not-found/src/page-not-found.component.ts +59 -0
  281. package/projects/onemrva/design-system/page-not-found/src/page-not-found.module.ts +24 -0
  282. package/projects/onemrva/design-system/src/public-api.ts +5 -0
  283. package/projects/onemrva/design-system/tsconfig.lib.json +12 -0
  284. package/projects/onemrva/design-system/tsconfig.lib.prod.json +10 -0
  285. package/projects/onemrva/design-system/utils/index.ts +2 -0
  286. package/projects/onemrva/design-system/utils/ng-package.json +6 -0
  287. package/projects/onemrva/design-system/utils/src/enum.utils.ts +6 -0
  288. package/projects/onemrva/design-system/utils/src/enums/color.enum.ts +14 -0
  289. package/projects/onemrva/design-system/utils/src/enums/index.ts +2 -0
  290. package/projects/onemrva/design-system/utils/src/enums/size.enum.ts +11 -0
  291. package/projects/schematics/README.md +40 -0
  292. package/projects/schematics/package.json +25 -0
  293. package/projects/schematics/src/cmp-demo/schema.json +15 -0
  294. package/projects/schematics/src/collection.json +17 -0
  295. package/projects/schematics/src/component/files/root/ng-package.json +6 -0
  296. package/projects/schematics/src/component/files/src/onemrva-mat-__name__.component.html +4 -0
  297. package/projects/schematics/src/component/schema.json +11 -0
  298. package/projects/schematics/src/demo/files/demo/demo-__name__.component.html +2 -0
  299. package/projects/schematics/src/demo/files/demo/readme.md +26 -0
  300. package/projects/schematics/src/demo/schema.json +15 -0
  301. package/projects/schematics/tsconfig.json +24 -0
  302. package/projects/test/.nycrc +5 -0
  303. package/projects/test/cypress/coverage.webpack.ts +20 -0
  304. package/projects/test/cypress/cucumber-json/basictest.cucumber.json +402 -0
  305. package/projects/test/cypress/fixtures/example.json +5 -0
  306. package/projects/test/cypress/integration/basictest.feature +53 -0
  307. package/projects/test/cypress/integration/common/basicTestSteps.ts +54 -0
  308. package/projects/test/cypress/plugins/index.ts +13 -0
  309. package/projects/test/cypress/support/commands.ts +44 -0
  310. package/projects/test/cypress/support/e2e.ts +20 -0
  311. package/projects/test/cypress/tsconfig.json +10 -0
  312. package/projects/test/cypress/videos/basictest.feature.mp4 +0 -0
  313. package/projects/test/karma.conf.js +44 -0
  314. package/projects/test/src/app/app-routing.module.ts +14 -0
  315. package/projects/test/src/app/app.component.html +14 -0
  316. package/projects/test/src/app/app.component.scss +0 -0
  317. package/projects/test/src/app/app.component.spec.ts +35 -0
  318. package/projects/test/src/app/app.component.ts +51 -0
  319. package/projects/test/src/app/app.module.ts +103 -0
  320. package/projects/test/src/app/demos/avatar/demo-avatar.component.html +77 -0
  321. package/projects/test/src/app/demos/avatar/demo-avatar.component.scss +4 -0
  322. package/projects/test/src/app/demos/avatar/demo-avatar.component.ts +13 -0
  323. package/projects/test/src/app/demos/badge/demo-badge.component.html +389 -0
  324. package/projects/test/src/app/demos/badge/demo-badge.component.scss +4 -0
  325. package/projects/test/src/app/demos/badge/demo-badge.component.ts +22 -0
  326. package/projects/test/src/app/demos/badge/readme.md +30 -0
  327. package/projects/test/src/app/demos/breadcrumb/demo-breadcrumb.component.html +20 -0
  328. package/projects/test/src/app/demos/breadcrumb/demo-breadcrumb.component.ts +7 -0
  329. package/projects/test/src/app/demos/breadcrumb/demo-breadcrumb.module.ts +89 -0
  330. package/projects/test/src/app/demos/breadcrumb/readme.md +29 -0
  331. package/projects/test/src/app/demos/datepicker/demo-datepicker.component.html +10 -0
  332. package/projects/test/src/app/demos/datepicker/demo-datepicker.component.scss +5 -0
  333. package/projects/test/src/app/demos/datepicker/demo-datepicker.component.ts +12 -0
  334. package/projects/test/src/app/demos/datepicker/demo-datepicker.module.ts +43 -0
  335. package/projects/test/src/app/demos/datepicker/readme.md +36 -0
  336. package/projects/test/src/app/demos/file-upload/demo-file-upload.component.html +30 -0
  337. package/projects/test/src/app/demos/file-upload/demo-file-upload.component.ts +132 -0
  338. package/projects/test/src/app/demos/file-upload/demo-file-upload.service.ts +60 -0
  339. package/projects/test/src/app/demos/file-upload/readme.md +26 -0
  340. package/projects/test/src/app/demos/input-bank-account/demo-input-bank-account.component.ts +19 -0
  341. package/projects/test/src/app/demos/input-bank-account/demo-input-bank-account.module.ts +20 -0
  342. package/projects/test/src/app/demos/input-country/demo-input-country.component.html +9 -0
  343. package/projects/test/src/app/demos/input-country/demo-input-country.component.ts +14 -0
  344. package/projects/test/src/app/demos/input-country/demo-input-country.module.ts +26 -0
  345. package/projects/test/src/app/demos/input-enterprise-number/demo-input-enterprise-number.component.ts +13 -0
  346. package/projects/test/src/app/demos/input-enterprise-number/demo-input-enterprise-number.module.ts +20 -0
  347. package/projects/test/src/app/demos/input-phone/demo-input-phone.component.html +16 -0
  348. package/projects/test/src/app/demos/input-phone/demo-input-phone.component.ts +16 -0
  349. package/projects/test/src/app/demos/input-phone/demo-input-phone.module.ts +21 -0
  350. package/projects/test/src/app/demos/message-box/demo-message-box.component.html +32 -0
  351. package/projects/test/src/app/demos/message-box/demo-message-box.component.ts +12 -0
  352. package/projects/test/src/app/demos/message-box/readme.md +26 -0
  353. package/projects/test/src/app/demos/multiselect/demo-multiselect.component.html +53 -0
  354. package/projects/test/src/app/demos/multiselect/demo-multiselect.component.scss +23 -0
  355. package/projects/test/src/app/demos/multiselect/demo-multiselect.component.ts +53 -0
  356. package/projects/test/src/app/demos/multiselect/demo-multiselect.module.ts +38 -0
  357. package/projects/test/src/app/demos/multiselect/readme.md +34 -0
  358. package/projects/test/src/app/demos/not-found/demo-not-found.component.html +21 -0
  359. package/projects/test/src/app/demos/not-found/demo-not-found.component.scss +6 -0
  360. package/projects/test/src/app/demos/not-found/demo-not-found.component.ts +50 -0
  361. package/projects/test/src/app/demos/not-found/readme.md +44 -0
  362. package/projects/test/src/app/demos/notification/demo-notification.component.html +5 -0
  363. package/projects/test/src/app/demos/notification/demo-notification.component.ts +10 -0
  364. package/projects/test/src/app/demos/paginator/demo-paginator.component.html +35 -0
  365. package/projects/test/src/app/demos/paginator/demo-paginator.component.ts +25 -0
  366. package/projects/test/src/app/demos/paginator/readme.md +89 -0
  367. package/projects/test/src/app/demos/panel/demo-panel.component.html +53 -0
  368. package/projects/test/src/app/demos/panel/demo-panel.component.scss +3 -0
  369. package/projects/test/src/app/demos/panel/demo-panel.component.ts +20 -0
  370. package/projects/test/src/app/demos/panel/readme.md +26 -0
  371. package/projects/test/src/app/demos/pop-over/demo-pop-over.component.html +130 -0
  372. package/projects/test/src/app/demos/pop-over/demo-pop-over.component.scss +9 -0
  373. package/projects/test/src/app/demos/pop-over/demo-pop-over.component.ts +13 -0
  374. package/projects/test/src/app/demos/pop-over/readme.md +26 -0
  375. package/projects/test/src/app/demos/progress-bar/demo-progress-bar.component.html +19 -0
  376. package/projects/test/src/app/demos/progress-bar/demo-progress-bar.component.ts +35 -0
  377. package/projects/test/src/app/demos/side-menu/demo-side-menu.component.html +5 -0
  378. package/projects/test/src/app/demos/side-menu/demo-side-menu.component.ts +34 -0
  379. package/projects/test/src/app/demos/side-menu/readme.md +30 -0
  380. package/projects/test/src/app/demos/skeleton/demo-skeleton.component.html +119 -0
  381. package/projects/test/src/app/demos/skeleton/demo-skeleton.component.scss +0 -0
  382. package/projects/test/src/app/demos/skeleton/demo-skeleton.component.ts +35 -0
  383. package/projects/test/src/app/demos/spinner/demo-spinner.component.html +1 -0
  384. package/projects/test/src/app/demos/spinner/demo-spinner.component.ts +10 -0
  385. package/projects/test/src/app/demos/spinner/readme.md +24 -0
  386. package/projects/test/src/app/demos/summary-stepper/demo-summary-stepper.component.html +108 -0
  387. package/projects/test/src/app/demos/summary-stepper/demo-summary-stepper.component.scss +3 -0
  388. package/projects/test/src/app/demos/summary-stepper/demo-summary-stepper.component.ts +55 -0
  389. package/projects/test/src/app/demos/summary-stepper/readme.md +26 -0
  390. package/projects/test/src/app/demos/table/demo-table-datasource.ts +140 -0
  391. package/projects/test/src/app/demos/table/demo-table.component.html +41 -0
  392. package/projects/test/src/app/demos/table/demo-table.component.scss +17 -0
  393. package/projects/test/src/app/demos/table/demo-table.component.ts +51 -0
  394. package/projects/test/src/app/demos/table/demo-table.module.ts +45 -0
  395. package/projects/test/src/app/demos/table/readme.md +27 -0
  396. package/projects/test/src/app/demos/task-list/demo-task-list.component.html +37 -0
  397. package/projects/test/src/app/demos/task-list/demo-task-list.component.scss +3 -0
  398. package/projects/test/src/app/demos/task-list/demo-task-list.component.ts +14 -0
  399. package/projects/test/src/app/demos/task-list/demo-task-list.module.ts +29 -0
  400. package/projects/test/src/app/demos/task-list/readme.md +26 -0
  401. package/projects/test/src/app/demos/timepicker/demo-timepicker.component.html +9 -0
  402. package/projects/test/src/app/demos/timepicker/demo-timepicker.component.ts +31 -0
  403. package/projects/test/src/app/demos/timepicker/readme.md +26 -0
  404. package/projects/test/src/app/demos/toast/demo-toast.component.html +8 -0
  405. package/projects/test/src/app/demos/toast/demo-toast.component.scss +3 -0
  406. package/projects/test/src/app/demos/toast/demo-toast.component.ts +61 -0
  407. package/projects/test/src/app/demos/toast/readme.md +30 -0
  408. package/projects/test/src/app/demos/toc/demo-toc.component.html +288 -0
  409. package/projects/test/src/app/demos/toc/demo-toc.component.ts +26 -0
  410. package/projects/test/src/app/demos/tooltip/demo-tooltip.component.html +73 -0
  411. package/projects/test/src/app/demos/tooltip/demo-tooltip.component.scss +11 -0
  412. package/projects/test/src/app/demos/tooltip/demo-tooltip.component.ts +14 -0
  413. package/projects/test/src/app/home.component.ts +54 -0
  414. package/projects/test/src/app/material.module.ts +39 -0
  415. package/projects/test/src/app/onemrva-translate-http-loader.ts +35 -0
  416. package/projects/test/src/app/routes.ts +198 -0
  417. package/projects/test/src/assets/.gitkeep +0 -0
  418. package/projects/test/src/assets/i18n/de.json +80 -0
  419. package/projects/test/src/assets/i18n/en.json +80 -0
  420. package/projects/test/src/assets/i18n/fr.json +80 -0
  421. package/projects/test/src/assets/i18n/nl.json +79 -0
  422. package/projects/test/src/environments/environment.e2e.ts +3 -0
  423. package/projects/test/src/environments/environment.prod.ts +3 -0
  424. package/projects/test/src/environments/environment.ts +16 -0
  425. package/projects/test/src/favicon.ico +0 -0
  426. package/projects/test/src/index.html +15 -0
  427. package/projects/test/src/main.ts +12 -0
  428. package/projects/test/src/polyfills.ts +53 -0
  429. package/projects/test/src/styles.scss +22 -0
  430. package/projects/test/src/test.ts +26 -0
  431. package/projects/test/tsconfig.app.json +15 -0
  432. package/projects/test/tsconfig.spec.json +18 -0
  433. package/rva.crt +36 -0
  434. package/tsconfig.json +44 -0
@@ -0,0 +1,612 @@
1
+ /**
2
+ * Copyright (c) 2018 Bithost GmbH All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by an MIT-style license that can be
5
+ * found in the LICENSE file at https://angular.io/license
6
+ */
7
+
8
+ import { A, DOWN_ARROW, END, ENTER, ESCAPE, HOME, NINE, SPACE, UP_ARROW, Z, ZERO } from '@angular/cdk/keycodes';
9
+ import { ViewportRuler } from '@angular/cdk/scrolling';
10
+ import {
11
+ ChangeDetectionStrategy,
12
+ ChangeDetectorRef,
13
+ Component,
14
+ ContentChild,
15
+ ElementRef,
16
+ EventEmitter,
17
+ forwardRef,
18
+ Inject,
19
+ Input,
20
+ OnDestroy,
21
+ OnInit,
22
+ Optional,
23
+ Output,
24
+ QueryList,
25
+ ViewChild
26
+ } from '@angular/core';
27
+ import { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms';
28
+ import { MatOption } from '@angular/material/core';
29
+ import { MatFormField } from '@angular/material/form-field';
30
+ import { MatSelect } from '@angular/material/select';
31
+ import { BehaviorSubject, combineLatest, Observable, of, Subject } from 'rxjs';
32
+ import { delay, filter, map, startWith, switchMap, take, takeUntil, tap } from 'rxjs/operators';
33
+ import { MatSelectSearchClearDirective } from './mat-select-search-clear.directive';
34
+ import { configurableDefaultOptions, MAT_SELECTSEARCH_DEFAULT_OPTIONS, MatSelectSearchOptions } from './default-options';
35
+ import { MatSelectNoEntriesFoundDirective } from './mat-select-no-entries-found.directive';
36
+
37
+ /* tslint:disable:member-ordering component-selector */
38
+ /**
39
+ * Component providing an input field for searching MatSelect options.
40
+ *
41
+ * Example usage:
42
+ *
43
+ * interface Bank {
44
+ * id: string;
45
+ * name: string;
46
+ * }
47
+ *
48
+ * @Component({
49
+ * selector: 'my-app-data-selection',
50
+ * template: `
51
+ * <mat-form-field>
52
+ * <mat-select [formControl]="bankCtrl" placeholder="Bank">
53
+ * <mat-option>
54
+ * <ngx-mat-select-search [formControl]="bankFilterCtrl"></ngx-mat-select-search>
55
+ * </mat-option>
56
+ * <mat-option *ngFor="let bank of filteredBanks | async" [value]="bank.id">
57
+ * {{bank.name}}
58
+ * </mat-option>
59
+ * </mat-select>
60
+ * </mat-form-field>
61
+ * `
62
+ * })
63
+ * export class DataSelectionComponent implements OnInit, OnDestroy {
64
+ *
65
+ * // control for the selected bank
66
+ * public bankCtrl: FormControl = new FormControl();
67
+ * // control for the MatSelect filter keyword
68
+ * public bankFilterCtrl: FormControl = new FormControl();
69
+ *
70
+ * // list of banks
71
+ * private banks: Bank[] = [{name: 'Bank A', id: 'A'}, {name: 'Bank B', id: 'B'}, {name: 'Bank C', id: 'C'}];
72
+ * // list of banks filtered by search keyword
73
+ * public filteredBanks: ReplaySubject<Bank[]> = new ReplaySubject<Bank[]>(1);
74
+ *
75
+ * // Subject that emits when the component has been destroyed.
76
+ * private _onDestroy = new Subject<void>();
77
+ *
78
+ *
79
+ * ngOnInit() {
80
+ * // load the initial bank list
81
+ * this.filteredBanks.next(this.banks.slice());
82
+ * // listen for search field value changes
83
+ * this.bankFilterCtrl.valueChanges
84
+ * .pipe(takeUntil(this._onDestroy))
85
+ * .subscribe(() => {
86
+ * this.filterBanks();
87
+ * });
88
+ * }
89
+ *
90
+ * ngOnDestroy() {
91
+ * this._onDestroy.next();
92
+ * this._onDestroy.complete();
93
+ * }
94
+ *
95
+ * private filterBanks() {
96
+ * if (!this.banks) {
97
+ * return;
98
+ * }
99
+ *
100
+ * // get the search keyword
101
+ * let search = this.bankFilterCtrl.value;
102
+ * if (!search) {
103
+ * this.filteredBanks.next(this.banks.slice());
104
+ * return;
105
+ * } else {
106
+ * search = search.toLowerCase();
107
+ * }
108
+ *
109
+ * // filter the banks
110
+ * this.filteredBanks.next(
111
+ * this.banks.filter(bank => bank.name.toLowerCase().indexOf(search) > -1)
112
+ * );
113
+ * }
114
+ * }
115
+ */
116
+ @Component({
117
+ selector: 'mat-select-search',
118
+ templateUrl: './mat-select-search.component.html',
119
+ styleUrls: ['./mat-select-search.component.scss'],
120
+ providers: [
121
+ {
122
+ provide: NG_VALUE_ACCESSOR,
123
+ useExisting: forwardRef(() => MatSelectSearchComponent),
124
+ multi: true
125
+ }
126
+ ],
127
+ changeDetection: ChangeDetectionStrategy.OnPush
128
+ })
129
+ export class MatSelectSearchComponent implements OnInit, OnDestroy, ControlValueAccessor {
130
+
131
+ /** Label of the search placeholder */
132
+ @Input() placeholderLabel = 'Search';
133
+
134
+ /** Type of the search input field */
135
+ @Input() type = 'text';
136
+
137
+ /** Font-based icon used for displaying Close-Icon */
138
+ @Input() closeIcon = 'close';
139
+
140
+ /** Svg-based icon used for displaying Close-Icon. If set, closeIcon is overridden */
141
+ @Input() closeSvgIcon: string = '';
142
+
143
+ /** Label to be shown when no entries are found. Set to null if no message should be shown. */
144
+ @Input() noEntriesFoundLabel = 'Nothing found';
145
+
146
+ /**
147
+ * Whether or not the search field should be cleared after the dropdown menu is closed.
148
+ * Useful for server-side filtering. See [#3](https://github.com/bithost-gmbh/ngx-mat-select-search/issues/3)
149
+ */
150
+ @Input() clearSearchInput = true;
151
+
152
+ /** Whether to show the search-in-progress indicator */
153
+ @Input() searching = false;
154
+
155
+ /** Disables initial focusing of the input field */
156
+ @Input() disableInitialFocus = false;
157
+
158
+ /** Enable clear input on escape pressed */
159
+ @Input() enableClearOnEscapePressed = false;
160
+
161
+ /**
162
+ * Prevents home / end key being propagated to mat-select,
163
+ * allowing to move the cursor within the search input instead of navigating the options
164
+ */
165
+ @Input() preventHomeEndKeyPropagation = false;
166
+
167
+ /** Disables scrolling to active options when option list changes. Useful for server-side search */
168
+ @Input() disableScrollToActiveOnOptionsChanged = false;
169
+
170
+ /** Adds 508 screen reader support for search box */
171
+ @Input() ariaLabel = 'dropdown search';
172
+
173
+ /** Whether to show Select All Checkbox (for mat-select[multi=true]) */
174
+ @Input() showToggleAllCheckbox = false;
175
+
176
+ /** select all checkbox checked state */
177
+ @Input() toggleAllCheckboxChecked = false;
178
+
179
+ /** select all checkbox indeterminate state */
180
+ @Input() toggleAllCheckboxIndeterminate = false;
181
+
182
+ /** Display a message in a tooltip on the toggle-all checkbox */
183
+ @Input() toggleAllCheckboxTooltipMessage = '';
184
+
185
+ /** Define the position of the tooltip on the toggle-all checkbox. */
186
+ @Input() toggleAllCheckboxTooltipPosition: 'left' | 'right' | 'above' | 'below' | 'before' | 'after' = 'below';
187
+
188
+ /** Show/Hide the search clear button of the search input */
189
+ @Input() hideClearSearchButton = false;
190
+
191
+ /**
192
+ * Always restore selected options on selectionChange for mode multi (e.g. for lazy loading/infinity scrolling).
193
+ * Defaults to false, so selected options are only restored while filtering is active.
194
+ */
195
+ @Input() alwaysRestoreSelectedOptionsMulti = false;
196
+
197
+ /** Output emitter to send to parent component with the toggle all boolean */
198
+ @Output() toggleAll = new EventEmitter<boolean>();
199
+
200
+ /** Reference to the search input field */
201
+ @ViewChild('searchSelectInput', { read: ElementRef, static: true }) searchSelectInput?: ElementRef;
202
+
203
+ /** Reference to the search input field */
204
+ @ViewChild('innerSelectSearch', { read: ElementRef, static: true }) innerSelectSearch?: ElementRef;
205
+
206
+ /** Reference to custom search input clear icon */
207
+ @ContentChild(MatSelectSearchClearDirective) clearIcon?: MatSelectSearchClearDirective;
208
+
209
+ /** Reference to custom no entries found element */
210
+ @ContentChild(MatSelectNoEntriesFoundDirective) noEntriesFound?: MatSelectNoEntriesFoundDirective;
211
+
212
+ /** Current search value */
213
+ get value(): string {
214
+ return (this._formControl as FormControl).value;
215
+ }
216
+ private _lastExternalInputValue?: string;
217
+
218
+ onTouched: Function = (_: any) => { };
219
+
220
+ /** Reference to the MatSelect options */
221
+ public set _options(_options: QueryList<MatOption>) {
222
+ this._options$.next(_options);
223
+ }
224
+ public get _options(): QueryList<MatOption> {
225
+ return this._options$.getValue();
226
+ }
227
+ public _options$: BehaviorSubject<QueryList<MatOption>> = new BehaviorSubject<QueryList<MatOption>>(new QueryList());
228
+
229
+ private optionsList$: Observable<MatOption[]> = this._options$.pipe(
230
+ switchMap(_options => _options ?
231
+ _options.changes.pipe(
232
+ map(options => options.toArray()),
233
+ startWith<MatOption[]>(_options.toArray()),
234
+ ) : of([])
235
+ )
236
+ );
237
+
238
+ private optionsLength$: Observable<number> = this.optionsList$.pipe(
239
+ map(options => options ? options.length : 0)
240
+ );
241
+
242
+ /** Previously selected values when using <mat-select [multiple]="true">*/
243
+ private previousSelectedValues?: any[];
244
+
245
+ public _formControl: FormControl<string | null> = new FormControl<string>('');
246
+
247
+ /** whether to show the no entries found message */
248
+ public _showNoEntriesFound$: Observable<boolean> = combineLatest([
249
+ this._formControl.valueChanges,
250
+ this.optionsLength$
251
+ ]).pipe(
252
+ map(([value, optionsLength]) => {
253
+ //if (value) return true;
254
+ return this.noEntriesFoundLabel !== '' && optionsLength === this.getOptionsLengthOffset()
255
+ })
256
+ );
257
+
258
+ /** Subject that emits when the component has been destroyed. */
259
+ private _onDestroy = new Subject<void>();
260
+
261
+ /** Reference to active descendant for ARIA Support. */
262
+ private activeDescendant?: HTMLElement;
263
+
264
+ constructor(
265
+ @Inject(MatSelect) public matSelect: MatSelect,
266
+ public changeDetectorRef: ChangeDetectorRef,
267
+ private _viewportRuler: ViewportRuler,
268
+ @Optional() @Inject(MatOption) public matOption: MatOption,
269
+ @Optional() @Inject(MatFormField) public matFormField: MatFormField,
270
+ @Optional() @Inject(MAT_SELECTSEARCH_DEFAULT_OPTIONS) defaultOptions: MatSelectSearchOptions
271
+ ) {
272
+ this.applyDefaultOptions(defaultOptions);
273
+ }
274
+
275
+ private applyDefaultOptions(defaultOptions: MatSelectSearchOptions) {
276
+ if (!defaultOptions) {
277
+ return;
278
+ }
279
+ for (const key of configurableDefaultOptions) {
280
+ if (defaultOptions.hasOwnProperty(key)) {
281
+ (this[key] as any) = defaultOptions[key];
282
+ }
283
+ }
284
+ }
285
+
286
+ ngOnInit() {
287
+ // set custom mat-option class if the component was placed inside a mat-option
288
+ if (this.matOption) {
289
+ this.matOption.disabled = true;
290
+ this.matOption._getHostElement().classList.add('contains-mat-select-search');
291
+ this.matOption._getHostElement().setAttribute('aria-hidden', 'true');
292
+ } else {
293
+ console.error('<ngx-mat-select-search> must be placed inside a <mat-option> element');
294
+ }
295
+
296
+ // when the select dropdown panel is opened or closed
297
+ this.matSelect.openedChange
298
+ .pipe(
299
+ delay(1),
300
+ takeUntil(this._onDestroy)
301
+ )
302
+ .subscribe((opened) => {
303
+ if (opened) {
304
+ this.updateInputWidth();
305
+ // focus the search field when opening
306
+ if (!this.disableInitialFocus) {
307
+ this._focus();
308
+ }
309
+ } else {
310
+ // clear it when closing
311
+ if (this.clearSearchInput) {
312
+ this._reset();
313
+ }
314
+ }
315
+ });
316
+
317
+
318
+
319
+ // set the first item active after the options changed
320
+ this.matSelect.openedChange
321
+ .pipe(
322
+ take(1),
323
+ switchMap((_) => {
324
+ this._options = this.matSelect.options;
325
+
326
+ // Closure variable for tracking the most recent first option.
327
+ // In order to avoid avoid causing the list to
328
+ // scroll to the top when options are added to the bottom of
329
+ // the list (eg: infinite scroll), we compare only
330
+ // the changes to the first options to determine if we
331
+ // should set the first item as active.
332
+ // This prevents unnecessary scrolling to the top of the list
333
+ // when options are appended, but allows the first item
334
+ // in the list to be set as active by default when there
335
+ // is no active selection
336
+ let previousFirstOption = this._options.toArray()[this.getOptionsLengthOffset()];
337
+
338
+ return this._options.changes
339
+ .pipe(tap(() => {
340
+ // avoid "expression has been changed" error
341
+ setTimeout(() => {
342
+ // Convert the QueryList to an array
343
+ const options = this._options.toArray();
344
+
345
+ // The true first item is offset by 1
346
+ const currentFirstOption = options[this.getOptionsLengthOffset()];
347
+
348
+ const keyManager = this.matSelect._keyManager;
349
+ if (keyManager && this.matSelect.panelOpen) {
350
+
351
+ // set first item active and input width
352
+
353
+ // Check to see if the first option in these changes is different from the previous.
354
+ const firstOptionIsChanged = !this.matSelect.compareWith(previousFirstOption, currentFirstOption);
355
+
356
+ // CASE: The first option is different now.
357
+ // Indiciates we should set it as active and scroll to the top.
358
+ if (firstOptionIsChanged
359
+ || !keyManager.activeItem
360
+ || !options.find(option => this.matSelect.compareWith(option, keyManager.activeItem))) {
361
+ keyManager.setFirstItemActive();
362
+ }
363
+
364
+ // wait for panel width changes
365
+ setTimeout(() => {
366
+ this.updateInputWidth();
367
+ });
368
+ }
369
+
370
+ // Update our reference
371
+ previousFirstOption = currentFirstOption;
372
+ });
373
+ }));
374
+ })
375
+ )
376
+ .pipe(takeUntil(this._onDestroy))
377
+ .subscribe();
378
+
379
+ // add or remove css class depending on whether to show the no entries found message
380
+ // note: this is hacky
381
+ this._showNoEntriesFound$.pipe(
382
+ takeUntil(this._onDestroy)
383
+ ).subscribe(showNoEntriesFound => {
384
+ // set no entries found class on mat option
385
+ if (this.matOption) {
386
+ if (showNoEntriesFound) {
387
+ this.matOption._getHostElement().classList.add('mat-select-search-no-entries-found');
388
+ } else {
389
+ this.matOption._getHostElement().classList.remove('mat-select-search-no-entries-found');
390
+ }
391
+ }
392
+ });
393
+
394
+ // resize the input width when the viewport is resized, i.e. the trigger width could potentially be resized
395
+ this._viewportRuler.change()
396
+ .pipe(takeUntil(this._onDestroy))
397
+ .subscribe(() => {
398
+ if (this.matSelect.panelOpen) {
399
+ this.updateInputWidth();
400
+ }
401
+ });
402
+
403
+ this.initMultipleHandling();
404
+
405
+ this.optionsList$.pipe(
406
+ takeUntil(this._onDestroy)
407
+ ).subscribe(() => {
408
+ // update view when available options change
409
+ this.changeDetectorRef.markForCheck();
410
+ });
411
+ }
412
+
413
+ _emitSelectAllBooleanToParent(state: boolean) {
414
+ this.toggleAll.emit(state);
415
+ }
416
+
417
+ ngOnDestroy() {
418
+ this._onDestroy.next();
419
+ this._onDestroy.complete();
420
+ }
421
+
422
+ _isToggleAllCheckboxVisible(): boolean {
423
+ return this.matSelect.multiple && this.showToggleAllCheckbox;
424
+ }
425
+
426
+ /**
427
+ * Handles the key down event with MatSelect.
428
+ * Allows e.g. selecting with enter key, navigation with arrow keys, etc.
429
+ * @param event
430
+ */
431
+ _handleKeydown(event: KeyboardEvent) {
432
+ // Prevent propagation for all alphanumeric characters in order to avoid selection issues
433
+ if ((event.key && event.key.length === 1) ||
434
+ (event.keyCode >= A && event.keyCode <= Z) ||
435
+ (event.keyCode >= ZERO && event.keyCode <= NINE) ||
436
+ (event.keyCode === SPACE)
437
+ || (this.preventHomeEndKeyPropagation && (event.keyCode === HOME || event.keyCode === END))
438
+ ) {
439
+ event.stopPropagation();
440
+ }
441
+
442
+ if (this.matSelect.multiple && event.key && event.keyCode === ENTER) {
443
+ // Regain focus after multiselect, so we can further type
444
+ setTimeout(() => this._focus());
445
+ }
446
+
447
+ // Special case if click Escape, if input is empty, close the dropdown, if not, empty out the search field
448
+ if (this.enableClearOnEscapePressed === true && event.keyCode === ESCAPE && this.value) {
449
+ this._reset(true);
450
+ event.stopPropagation();
451
+ }
452
+ }
453
+
454
+ /**
455
+ * Handles the key up event with MatSelect.
456
+ * Allows e.g. the announcing of the currently activeDescendant by screen readers.
457
+ */
458
+ _handleKeyup(event: KeyboardEvent) {
459
+ if (event.keyCode === UP_ARROW || event.keyCode === DOWN_ARROW) {
460
+ const ariaActiveDescendantId = this.matSelect._getAriaActiveDescendant();
461
+ const index = this._options.toArray().findIndex(item => item.id === ariaActiveDescendantId);
462
+ if (index !== -1) {
463
+ this.unselectActiveDescendant();
464
+ this.activeDescendant = this._options.toArray()[index]._getHostElement();
465
+ this.activeDescendant.setAttribute('aria-selected', 'true');
466
+ this.searchSelectInput?.nativeElement.setAttribute('aria-activedescendant', ariaActiveDescendantId);
467
+ }
468
+ }
469
+ }
470
+
471
+ writeValue(value: string) {
472
+ this._lastExternalInputValue = value;
473
+ this._formControl.setValue(value);
474
+ this.changeDetectorRef.markForCheck();
475
+ }
476
+
477
+ onBlur() {
478
+ this.unselectActiveDescendant();
479
+ this.onTouched();
480
+ }
481
+
482
+ registerOnChange(fn: (value: string | null) => void) {
483
+ this._formControl.valueChanges.pipe(
484
+ filter(value => value !== this._lastExternalInputValue),
485
+ tap(() => this._lastExternalInputValue = undefined),
486
+ takeUntil(this._onDestroy)
487
+ ).subscribe(fn);
488
+ }
489
+
490
+ registerOnTouched(fn: Function) {
491
+ this.onTouched = fn;
492
+ }
493
+
494
+ /**
495
+ * Focuses the search input field
496
+ */
497
+ public _focus() {
498
+ if (!this.searchSelectInput || !this.matSelect.panel) {
499
+ return;
500
+ }
501
+ // save and restore scrollTop of panel, since it will be reset by focus()
502
+ // note: this is hacky
503
+ const panel = this.matSelect.panel.nativeElement;
504
+ const scrollTop = panel.scrollTop;
505
+
506
+ // focus
507
+ this.searchSelectInput.nativeElement.focus();
508
+
509
+ panel.scrollTop = scrollTop;
510
+ }
511
+
512
+ /**
513
+ * Resets the current search value
514
+ * @param focus whether to focus after resetting
515
+ */
516
+ public _reset(focus?: boolean) {
517
+ this._formControl.setValue('');
518
+ if (focus) {
519
+ this._focus();
520
+ }
521
+ }
522
+
523
+
524
+ /**
525
+ * Initializes handling <mat-select [multiple]="true">
526
+ * Note: to improve this code, mat-select should be extended to allow disabling resetting the selection while filtering.
527
+ */
528
+ private initMultipleHandling() {
529
+ if (!this.matSelect.ngControl) {
530
+ if (this.matSelect.multiple) {
531
+ // note: the access to matSelect.ngControl (instead of matSelect.value / matSelect.valueChanges)
532
+ // is necessary to properly work in multi-selection mode.
533
+ console.error('the mat-select containing ngx-mat-select-search must have a ngModel or formControl directive when multiple=true');
534
+ }
535
+ return;
536
+ }
537
+ // if <mat-select [multiple]="true">
538
+ // store previously selected values and restore them when they are deselected
539
+ // because the option is not available while we are currently filtering
540
+ this.previousSelectedValues = this.matSelect.ngControl.value;
541
+
542
+ this.matSelect.ngControl.valueChanges
543
+ ?.pipe(takeUntil(this._onDestroy))
544
+ .subscribe((values) => {
545
+ let restoreSelectedValues = false;
546
+ if (this.matSelect.multiple) {
547
+ if ((this.alwaysRestoreSelectedOptionsMulti || (this._formControl.value && this._formControl.value.length))
548
+ && this.previousSelectedValues && Array.isArray(this.previousSelectedValues)) {
549
+ if (!values || !Array.isArray(values)) {
550
+ values = [];
551
+ }
552
+ const optionValues = this.matSelect.options.map(option => option.value);
553
+ this.previousSelectedValues.forEach(previousValue => {
554
+ if (!values.some((v : any) => this.matSelect.compareWith(v, previousValue))
555
+ && !optionValues.some(v => this.matSelect.compareWith(v, previousValue))) {
556
+ // if a value that was selected before is deselected and not found in the options, it was deselected
557
+ // due to the filtering, so we restore it.
558
+ values.push(previousValue);
559
+ restoreSelectedValues = true;
560
+ }
561
+ });
562
+ }
563
+ }
564
+ this.previousSelectedValues = values;
565
+
566
+ if (restoreSelectedValues) {
567
+ this.matSelect._onChange(values);
568
+ }
569
+ });
570
+ }
571
+
572
+ /**
573
+ * Set the width of the innerSelectSearch to fit even custom scrollbars
574
+ * And support all Operation Systems
575
+ */
576
+ public updateInputWidth() {
577
+ if (!this.innerSelectSearch || !this.innerSelectSearch.nativeElement) {
578
+ return;
579
+ }
580
+ let element: HTMLElement = this.innerSelectSearch.nativeElement;
581
+ if (element.parentElement !== null) {
582
+ let panelElement: HTMLElement | null = null;
583
+ while (element = element.parentElement) {
584
+ if (element.classList.contains('mat-select-panel')) {
585
+ panelElement = element;
586
+ break;
587
+ }
588
+ }
589
+ if (panelElement !== null) {
590
+ this.innerSelectSearch.nativeElement.style.width = panelElement.clientWidth + 'px';
591
+ }
592
+ }
593
+
594
+ }
595
+
596
+ /**
597
+ * Determine the offset to length that can be caused by the optional matOption used as a search input.
598
+ */
599
+ private getOptionsLengthOffset(): number {
600
+ if (this.matOption) {
601
+ return 1;
602
+ } else {
603
+ return 0;
604
+ }
605
+ }
606
+
607
+ private unselectActiveDescendant() {
608
+ this.activeDescendant?.removeAttribute('aria-selected');
609
+ this.searchSelectInput?.nativeElement.removeAttribute('aria-activedescendant');
610
+ }
611
+
612
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Copyright (c) 2018 Bithost GmbH All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by an MIT-style license that can be
5
+ * found in the LICENSE file at https://angular.io/license
6
+ */
7
+
8
+ import { NgModule } from '@angular/core';
9
+ import { MatSelectSearchComponent } from './mat-select-search.component';
10
+ import { MatButtonModule } from '@angular/material/button';
11
+ import { MatCheckboxModule } from '@angular/material/checkbox';
12
+ import { MatIconModule } from '@angular/material/icon';
13
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
14
+ import { MatTooltipModule } from '@angular/material/tooltip';
15
+ import { CommonModule } from '@angular/common';
16
+
17
+ import { MatSelectSearchClearDirective } from './mat-select-search-clear.directive';
18
+ import { ReactiveFormsModule } from '@angular/forms';
19
+ import { MatSelectNoEntriesFoundDirective } from './mat-select-no-entries-found.directive';
20
+ import { MatDividerModule } from '@angular/material/divider';
21
+ import {MatSelectModule} from "@angular/material/select";
22
+ import {MatFormFieldModule} from "@angular/material/form-field";
23
+
24
+ export const MatSelectSearchVersion = '7.0.2';
25
+ export { MatSelectSearchClearDirective };
26
+ export { MatSelectNoEntriesFoundDirective };
27
+
28
+ @NgModule({
29
+ imports: [
30
+ CommonModule,
31
+ ReactiveFormsModule,
32
+ MatButtonModule,
33
+ MatSelectModule,
34
+ MatCheckboxModule,
35
+ MatIconModule,
36
+ MatProgressSpinnerModule,
37
+ MatTooltipModule,
38
+ MatDividerModule,
39
+ MatFormFieldModule
40
+ ],
41
+ declarations: [
42
+ MatSelectSearchComponent,
43
+ MatSelectSearchClearDirective,
44
+ MatSelectNoEntriesFoundDirective
45
+ ],
46
+ exports: [
47
+ MatSelectSearchComponent,
48
+ MatSelectSearchClearDirective,
49
+ MatSelectNoEntriesFoundDirective
50
+ ]
51
+ })
52
+ export class MatSelectSearchModule {
53
+ }
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Public API Surface of mat-side-menu
3
+ */
4
+
5
+ export * from './src/onemrva-mat-side-menu.component';
6
+ export * from './src/onemrva-mat-side-menu.module';
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "lib": {
4
+ "entryFile": "index.ts"
5
+ }
6
+ }