@energycap/components 0.42.4-esbuild.20250131-1219 → 0.42.4-esbuild.20250131-1256

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 (324) hide show
  1. package/esm2022/energycap-components.mjs +5 -0
  2. package/esm2022/lib/components.module.mjs +423 -0
  3. package/esm2022/lib/controls/banner/banner.component.mjs +109 -0
  4. package/esm2022/lib/controls/button/button.component.mjs +106 -0
  5. package/esm2022/lib/controls/button/copy-button-base.directive.mjs +67 -0
  6. package/esm2022/lib/controls/button/copy-button.directive.mjs +28 -0
  7. package/esm2022/lib/controls/button/copy-table-button.directive.mjs +43 -0
  8. package/esm2022/lib/controls/calendar/calendar-item.component.mjs +91 -0
  9. package/esm2022/lib/controls/calendar/calendar.component.mjs +248 -0
  10. package/esm2022/lib/controls/calendar/calendar.types.mjs +2 -0
  11. package/esm2022/lib/controls/checkbox/checkbox.component.mjs +140 -0
  12. package/esm2022/lib/controls/collapsible-toggle/collapsible-toggle.component.mjs +38 -0
  13. package/esm2022/lib/controls/combobox/combobox.component.mjs +879 -0
  14. package/esm2022/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.mjs +57 -0
  15. package/esm2022/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.mjs +62 -0
  16. package/esm2022/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.mjs +100 -0
  17. package/esm2022/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.mjs +101 -0
  18. package/esm2022/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.mjs +76 -0
  19. package/esm2022/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.mjs +79 -0
  20. package/esm2022/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.mjs +210 -0
  21. package/esm2022/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.mjs +81 -0
  22. package/esm2022/lib/controls/date-input/date-input.component.mjs +464 -0
  23. package/esm2022/lib/controls/date-input/date-input.types.mjs +44 -0
  24. package/esm2022/lib/controls/dropdown/dropdown.component.mjs +243 -0
  25. package/esm2022/lib/controls/file-upload/file-upload.component.mjs +261 -0
  26. package/esm2022/lib/controls/form-control/form-control.component.mjs +98 -0
  27. package/esm2022/lib/controls/form-control-base.mjs +151 -0
  28. package/esm2022/lib/controls/form-control-label/form-control-label.component.mjs +136 -0
  29. package/esm2022/lib/controls/form-group/form-group.component.mjs +261 -0
  30. package/esm2022/lib/controls/help-popover/help-popover.component.mjs +31 -0
  31. package/esm2022/lib/controls/item-picker/item-picker.component.mjs +329 -0
  32. package/esm2022/lib/controls/link-button/link-button.component.mjs +11 -0
  33. package/esm2022/lib/controls/menu/menu.component.mjs +485 -0
  34. package/esm2022/lib/controls/navigation/link-item.mjs +2 -0
  35. package/esm2022/lib/controls/navigation/nav-group.mjs +39 -0
  36. package/esm2022/lib/controls/navigation/nav-item-active.directive.mjs +92 -0
  37. package/esm2022/lib/controls/navigation/nav-item.mjs +2 -0
  38. package/esm2022/lib/controls/numericbox/numericbox.component.mjs +372 -0
  39. package/esm2022/lib/controls/popover/popover.component.mjs +117 -0
  40. package/esm2022/lib/controls/radio-button/radio-button-option.mjs +3 -0
  41. package/esm2022/lib/controls/radio-button/radio-button.component.mjs +82 -0
  42. package/esm2022/lib/controls/select/select.component.mjs +88 -0
  43. package/esm2022/lib/controls/tabs/tabs.component.mjs +47 -0
  44. package/esm2022/lib/controls/textbox/textbox.component.mjs +155 -0
  45. package/esm2022/lib/core/cache.service.mjs +105 -0
  46. package/esm2022/lib/core/custom-validators.mjs +29 -0
  47. package/esm2022/lib/core/date-time-helper.mjs +228 -0
  48. package/esm2022/lib/core/error.service.mjs +61 -0
  49. package/esm2022/lib/core/router-helper.service.mjs +111 -0
  50. package/esm2022/lib/core/scroll.service.mjs +89 -0
  51. package/esm2022/lib/core/telemetry-tracker.service.mjs +16 -0
  52. package/esm2022/lib/core/telemetry.service.mjs +38 -0
  53. package/esm2022/lib/core/validation-message.service.mjs +185 -0
  54. package/esm2022/lib/core/validation-patterns.mjs +31 -0
  55. package/esm2022/lib/core/window.service.mjs +186 -0
  56. package/esm2022/lib/display/app-bar/app-bar.component.mjs +46 -0
  57. package/esm2022/lib/display/avatar/avatar.component.mjs +67 -0
  58. package/esm2022/lib/display/avatar/avatar.service.mjs +64 -0
  59. package/esm2022/lib/display/confirm/confirm.component.mjs +168 -0
  60. package/esm2022/lib/display/dialog/dialog-content.mjs +2 -0
  61. package/esm2022/lib/display/dialog/dialog-group/dialog-group.component.mjs +63 -0
  62. package/esm2022/lib/display/dialog/dialog-types.mjs +77 -0
  63. package/esm2022/lib/display/dialog/dialog.component.mjs +281 -0
  64. package/esm2022/lib/display/dialog/dialog.service.mjs +71 -0
  65. package/esm2022/lib/display/help/help-types.mjs +2 -0
  66. package/esm2022/lib/display/hierarchy/hierarchy-base.mjs +111 -0
  67. package/esm2022/lib/display/hierarchy/hierarchy-mocks.spec.mjs +54 -0
  68. package/esm2022/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.mjs +61 -0
  69. package/esm2022/lib/display/item-display/item-display.component.mjs +81 -0
  70. package/esm2022/lib/display/json-display/json-display.component.mjs +47 -0
  71. package/esm2022/lib/display/resizable/resizable-base.mjs +120 -0
  72. package/esm2022/lib/display/resizable/resizable.component.mjs +57 -0
  73. package/esm2022/lib/display/spinner/spinner.component.mjs +12 -0
  74. package/esm2022/lib/display/splash/splash.component.mjs +42 -0
  75. package/esm2022/lib/display/splash/splash.service.mjs +35 -0
  76. package/esm2022/lib/display/table/resizable-column.component.mjs +20 -0
  77. package/esm2022/lib/display/table/resizable-table.directive.mjs +227 -0
  78. package/esm2022/lib/display/table/searchable-table.component.mjs +342 -0
  79. package/esm2022/lib/display/table/table-detail-row.component.mjs +28 -0
  80. package/esm2022/lib/display/table/table-locked-column.component.mjs +58 -0
  81. package/esm2022/lib/display/table/table-master-header-row.component.mjs +14 -0
  82. package/esm2022/lib/display/table/table-master-row.component.mjs +163 -0
  83. package/esm2022/lib/display/table/table-pagination.component.mjs +155 -0
  84. package/esm2022/lib/display/table/table-selectable-row.component.mjs +235 -0
  85. package/esm2022/lib/display/table/table.component.mjs +249 -0
  86. package/esm2022/lib/display/tags/tag.mjs +18 -0
  87. package/esm2022/lib/display/tags/tags.component.mjs +77 -0
  88. package/esm2022/lib/display/toast/toast/toast.component.mjs +77 -0
  89. package/esm2022/lib/display/toast/toast-types.mjs +8 -0
  90. package/esm2022/lib/display/toast/toast.service.mjs +35 -0
  91. package/esm2022/lib/display/toast/toaster/toaster.component.mjs +114 -0
  92. package/esm2022/lib/display/tooltip/tooltip.component.mjs +28 -0
  93. package/esm2022/lib/display/tooltip/tooltip.service.mjs +78 -0
  94. package/esm2022/lib/display/tooltip-directive/tooltip.directive.mjs +173 -0
  95. package/esm2022/lib/display/tour/tour-types.mjs +34 -0
  96. package/esm2022/lib/display/tour/tour.component.mjs +398 -0
  97. package/esm2022/lib/display/tour/tour.service.mjs +75 -0
  98. package/esm2022/lib/display/tree/tree.component.mjs +135 -0
  99. package/esm2022/lib/display/view-overlay/view-overlay.component.mjs +58 -0
  100. package/esm2022/lib/shared/directives/click-area-for/click-area-for.directive.mjs +32 -0
  101. package/esm2022/lib/shared/directives/if-viewport-width/if-viewport-width.directive.mjs +111 -0
  102. package/esm2022/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.mjs +100 -0
  103. package/esm2022/lib/shared/directives/popup/popup-container.directive.mjs +166 -0
  104. package/esm2022/lib/shared/display/pipes/date-display.pipe.mjs +50 -0
  105. package/esm2022/lib/shared/display/pipes/highlight-text.pipe.mjs +30 -0
  106. package/esm2022/lib/shared/display/pipes/relative-date.pipe.mjs +62 -0
  107. package/esm2022/lib/shared/display/pipes/row-count.pipe.mjs +48 -0
  108. package/esm2022/lib/shared/display/pipes/time-display.pipe.mjs +41 -0
  109. package/esm2022/lib/shared/display.mjs +6 -0
  110. package/esm2022/lib/shared/form-group.helper.mjs +67 -0
  111. package/esm2022/lib/shared/json-helper.mjs +19 -0
  112. package/esm2022/lib/shared/lodash-helper.mjs +52 -0
  113. package/esm2022/lib/shared/page/page-base/page-base.component.mjs +387 -0
  114. package/esm2022/lib/shared/page/page-statuses.mjs +23 -0
  115. package/esm2022/lib/shared/page/page-title/page-title.component.mjs +23 -0
  116. package/esm2022/lib/shared/page/page-view/page-view.component.mjs +147 -0
  117. package/esm2022/lib/shared/testing/copy-button-base-test-injector-factory.spec.mjs +17 -0
  118. package/esm2022/lib/shared/testing/hierarchy-base-test-injector-factory.spec.mjs +17 -0
  119. package/esm2022/lib/shared/testing/page-base-component-test-helper.spec.mjs +38 -0
  120. package/esm2022/lib/shared/testing/page-base-component-test-injector-factory.spec.mjs +98 -0
  121. package/esm2022/lib/shared/testing/public-mocks.spec.mjs +148 -0
  122. package/esm2022/lib/shared/testing/spy-factory.spec.mjs +40 -0
  123. package/esm2022/lib/shared/testing/translation-mocks.spec.mjs +57 -0
  124. package/esm2022/lib/shared/user-preference.service.mjs +17 -0
  125. package/esm2022/lib/shared/wizard/wizard-base/wizard-base.component.mjs +246 -0
  126. package/esm2022/lib/shared/wizard/wizard-buttons/wizard-buttons.component.mjs +68 -0
  127. package/esm2022/lib/shared/wizard/wizard-progress/wizard-progress.component.mjs +18 -0
  128. package/esm2022/public-api.mjs +117 -0
  129. package/fesm2022/energycap-components.mjs +13219 -0
  130. package/fesm2022/energycap-components.mjs.map +1 -0
  131. package/index.d.ts +5 -0
  132. package/lib/components.module.d.ts +92 -0
  133. package/lib/controls/banner/banner.component.d.ts +50 -0
  134. package/lib/controls/button/button.component.d.ts +78 -0
  135. package/lib/controls/button/copy-button-base.directive.d.ts +20 -0
  136. package/lib/controls/button/copy-button.directive.d.ts +14 -0
  137. package/lib/controls/button/copy-table-button.directive.d.ts +19 -0
  138. package/lib/controls/calendar/calendar-item.component.d.ts +22 -0
  139. package/lib/controls/calendar/calendar.component.d.ts +52 -0
  140. package/lib/controls/calendar/calendar.types.d.ts +11 -0
  141. package/lib/controls/checkbox/checkbox.component.d.ts +65 -0
  142. package/lib/controls/collapsible-toggle/collapsible-toggle.component.d.ts +25 -0
  143. package/lib/controls/combobox/combobox.component.d.ts +418 -0
  144. package/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.d.ts +42 -0
  145. package/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.d.ts +21 -0
  146. package/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.d.ts +21 -0
  147. package/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.d.ts +21 -0
  148. package/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.d.ts +18 -0
  149. package/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.d.ts +18 -0
  150. package/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.d.ts +21 -0
  151. package/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.d.ts +20 -0
  152. package/lib/controls/date-input/date-input.component.d.ts +115 -0
  153. package/lib/controls/date-input/date-input.types.d.ts +62 -0
  154. package/lib/controls/dropdown/dropdown.component.d.ts +161 -0
  155. package/lib/controls/file-upload/file-upload.component.d.ts +124 -0
  156. package/lib/controls/form-control/form-control.component.d.ts +28 -0
  157. package/lib/controls/form-control-base.d.ts +110 -0
  158. package/lib/controls/form-control-label/form-control-label.component.d.ts +73 -0
  159. package/lib/controls/form-group/form-group.component.d.ts +105 -0
  160. package/lib/controls/help-popover/help-popover.component.d.ts +11 -0
  161. package/lib/controls/item-picker/item-picker.component.d.ts +164 -0
  162. package/lib/controls/link-button/link-button.component.d.ts +5 -0
  163. package/lib/controls/menu/menu.component.d.ts +255 -0
  164. package/lib/controls/navigation/link-item.d.ts +32 -0
  165. package/lib/controls/navigation/nav-group.d.ts +18 -0
  166. package/lib/controls/navigation/nav-item-active.directive.d.ts +42 -0
  167. package/lib/controls/navigation/nav-item.d.ts +31 -0
  168. package/lib/controls/numericbox/numericbox.component.d.ts +148 -0
  169. package/lib/controls/popover/popover.component.d.ts +51 -0
  170. package/lib/controls/radio-button/radio-button-option.d.ts +19 -0
  171. package/lib/controls/radio-button/radio-button.component.d.ts +53 -0
  172. package/lib/controls/select/select.component.d.ts +44 -0
  173. package/lib/controls/tabs/tabs.component.d.ts +30 -0
  174. package/lib/controls/textbox/textbox.component.d.ts +107 -0
  175. package/lib/core/cache.service.d.ts +33 -0
  176. package/lib/core/custom-validators.d.ts +20 -0
  177. package/lib/core/date-time-helper.d.ts +101 -0
  178. package/lib/core/error.service.d.ts +20 -0
  179. package/lib/core/router-helper.service.d.ts +48 -0
  180. package/lib/core/scroll.service.d.ts +36 -0
  181. package/lib/core/telemetry-tracker.service.d.ts +13 -0
  182. package/lib/core/telemetry.service.d.ts +31 -0
  183. package/lib/core/validation-message.service.d.ts +26 -0
  184. package/lib/core/validation-patterns.d.ts +22 -0
  185. package/lib/core/window.service.d.ts +116 -0
  186. package/lib/display/app-bar/app-bar.component.d.ts +20 -0
  187. package/lib/display/avatar/avatar.component.d.ts +35 -0
  188. package/lib/display/avatar/avatar.service.d.ts +24 -0
  189. package/lib/display/confirm/confirm.component.d.ts +123 -0
  190. package/lib/display/dialog/dialog-content.d.ts +19 -0
  191. package/lib/display/dialog/dialog-group/dialog-group.component.d.ts +32 -0
  192. package/lib/display/dialog/dialog-types.d.ts +130 -0
  193. package/lib/display/dialog/dialog.component.d.ts +120 -0
  194. package/lib/display/dialog/dialog.service.d.ts +48 -0
  195. package/lib/display/help/help-types.d.ts +33 -0
  196. package/lib/display/hierarchy/hierarchy-base.d.ts +97 -0
  197. package/lib/display/hierarchy/hierarchy-mocks.spec.d.ts +53 -0
  198. package/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.d.ts +34 -0
  199. package/lib/display/item-display/item-display.component.d.ts +43 -0
  200. package/lib/display/json-display/json-display.component.d.ts +16 -0
  201. package/lib/display/resizable/resizable-base.d.ts +67 -0
  202. package/lib/display/resizable/resizable.component.d.ts +31 -0
  203. package/lib/display/spinner/spinner.component.d.ts +5 -0
  204. package/lib/display/splash/splash.component.d.ts +16 -0
  205. package/lib/display/splash/splash.service.d.ts +22 -0
  206. package/lib/display/table/resizable-column.component.d.ts +10 -0
  207. package/lib/display/table/resizable-table.directive.d.ts +93 -0
  208. package/lib/display/table/searchable-table.component.d.ts +206 -0
  209. package/lib/display/table/table-detail-row.component.d.ts +8 -0
  210. package/lib/display/table/table-locked-column.component.d.ts +20 -0
  211. package/lib/display/table/table-master-header-row.component.d.ts +9 -0
  212. package/lib/display/table/table-master-row.component.d.ts +113 -0
  213. package/lib/display/table/table-pagination.component.d.ts +91 -0
  214. package/lib/display/table/table-selectable-row.component.d.ts +102 -0
  215. package/lib/display/table/table.component.d.ts +121 -0
  216. package/lib/display/tags/tag.d.ts +18 -0
  217. package/lib/display/tags/tags.component.d.ts +48 -0
  218. package/lib/display/toast/toast/toast.component.d.ts +23 -0
  219. package/lib/display/toast/toast-types.d.ts +24 -0
  220. package/lib/display/toast/toast.service.d.ts +20 -0
  221. package/lib/display/toast/toaster/toaster.component.d.ts +35 -0
  222. package/lib/display/tooltip/tooltip.component.d.ts +70 -0
  223. package/lib/display/tooltip/tooltip.service.d.ts +16 -0
  224. package/lib/display/tooltip-directive/tooltip.directive.d.ts +44 -0
  225. package/lib/display/tour/tour-types.d.ts +70 -0
  226. package/lib/display/tour/tour.component.d.ts +147 -0
  227. package/lib/display/tour/tour.service.d.ts +38 -0
  228. package/lib/display/tree/tree.component.d.ts +75 -0
  229. package/lib/display/view-overlay/view-overlay.component.d.ts +38 -0
  230. package/lib/shared/directives/click-area-for/click-area-for.directive.d.ts +14 -0
  231. package/lib/shared/directives/if-viewport-width/if-viewport-width.directive.d.ts +60 -0
  232. package/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.d.ts +23 -0
  233. package/lib/shared/directives/popup/popup-container.directive.d.ts +101 -0
  234. package/lib/shared/display/pipes/date-display.pipe.d.ts +21 -0
  235. package/lib/shared/display/pipes/highlight-text.pipe.d.ts +9 -0
  236. package/lib/shared/display/pipes/relative-date.pipe.d.ts +36 -0
  237. package/lib/shared/display/pipes/row-count.pipe.d.ts +23 -0
  238. package/lib/shared/display/pipes/time-display.pipe.d.ts +18 -0
  239. package/lib/shared/display.d.ts +42 -0
  240. package/lib/shared/form-group.helper.d.ts +31 -0
  241. package/lib/shared/json-helper.d.ts +7 -0
  242. package/lib/shared/lodash-helper.d.ts +18 -0
  243. package/lib/shared/page/page-base/page-base.component.d.ts +259 -0
  244. package/lib/shared/page/page-statuses.d.ts +13 -0
  245. package/lib/shared/page/page-title/page-title.component.d.ts +9 -0
  246. package/lib/shared/page/page-view/page-view.component.d.ts +102 -0
  247. package/lib/shared/testing/copy-button-base-test-injector-factory.spec.d.ts +4 -0
  248. package/lib/shared/testing/hierarchy-base-test-injector-factory.spec.d.ts +4 -0
  249. package/lib/shared/testing/page-base-component-test-helper.spec.d.ts +30 -0
  250. package/lib/shared/testing/page-base-component-test-injector-factory.spec.d.ts +28 -0
  251. package/lib/shared/testing/public-mocks.spec.d.ts +90 -0
  252. package/lib/shared/testing/spy-factory.spec.d.ts +27 -0
  253. package/lib/shared/testing/translation-mocks.spec.d.ts +30 -0
  254. package/lib/shared/user-preference.service.d.ts +13 -0
  255. package/lib/shared/wizard/wizard-base/wizard-base.component.d.ts +134 -0
  256. package/lib/shared/wizard/wizard-buttons/wizard-buttons.component.d.ts +27 -0
  257. package/lib/shared/wizard/wizard-progress/wizard-progress.component.d.ts +10 -0
  258. package/package.json +1 -5
  259. package/public-api.d.ts +113 -0
  260. package/schematics/collection.json +10 -0
  261. package/schematics/rxjs-7-upgrade/index.d.ts +3 -0
  262. package/schematics/rxjs-7-upgrade/index.js +68 -0
  263. package/schematics/rxjs-7-upgrade/index.js.map +1 -0
  264. package/schematics/rxjs-7-upgrade/schema.d.ts +4 -0
  265. package/schematics/rxjs-7-upgrade/schema.js +3 -0
  266. package/schematics/rxjs-7-upgrade/schema.js.map +1 -0
  267. package/schematics/rxjs-7-upgrade/schema.json +14 -0
  268. package/schematics/utilities/typescript.d.ts +7 -0
  269. package/schematics/utilities/typescript.js +42 -0
  270. package/schematics/utilities/typescript.js.map +1 -0
  271. package/schematics/utilities/workspace.d.ts +8 -0
  272. package/schematics/utilities/workspace.js +72 -0
  273. package/schematics/utilities/workspace.js.map +1 -0
  274. package/src/assets/images/email-icon.png +0 -0
  275. package/src/assets/images/email-logo.png +0 -0
  276. package/src/assets/images/favicon-ech.svg +7 -0
  277. package/src/assets/images/favicon-esa.svg +6 -0
  278. package/src/assets/images/favicon-eum.svg +6 -0
  279. package/src/assets/images/favicon.svg +5 -0
  280. package/src/assets/images/icon-carbonhub.svg +10 -0
  281. package/src/assets/images/icon-eum.svg +5 -0
  282. package/src/assets/images/icon-ucp.svg +5 -0
  283. package/src/assets/images/icon-wattics.svg +5 -0
  284. package/src/assets/images/icon.svg +4 -0
  285. package/src/assets/images/logo.svg +3 -0
  286. package/src/assets/images/splash.gif +0 -0
  287. package/src/assets/locales/en_US.json +59 -0
  288. package/src/assets/scripts/unsupported-browser.js +17 -0
  289. package/src/styles/_base.scss +38 -0
  290. package/src/styles/_colors.scss +96 -0
  291. package/src/styles/_core.scss +4 -0
  292. package/src/styles/_functions.scss +114 -0
  293. package/src/styles/_global-variables.scss +232 -0
  294. package/src/styles/_icons.scss +24 -0
  295. package/src/styles/bootstrap/_grid.scss +34 -0
  296. package/src/styles/bootstrap/_reboot.scss +323 -0
  297. package/src/styles/components/_card.scss +21 -0
  298. package/src/styles/components/_link-icons.scss +38 -0
  299. package/src/styles/components/_splash.scss +57 -0
  300. package/src/styles/components/_unsupported-browsers.scss +24 -0
  301. package/src/styles/email/_email-base.scss +228 -0
  302. package/src/styles/email/email.scss +43 -0
  303. package/src/styles/index.scss +27 -0
  304. package/src/styles/mixins/_animations.scss +18 -0
  305. package/src/styles/mixins/_button-base.scss +185 -0
  306. package/src/styles/mixins/_card-base.scss +40 -0
  307. package/src/styles/mixins/_common.scss +52 -0
  308. package/src/styles/mixins/_dialog-base.scss +96 -0
  309. package/src/styles/mixins/_form-control-base.scss +641 -0
  310. package/src/styles/mixins/_login.scss +74 -0
  311. package/src/styles/mixins/_menu-base.scss +153 -0
  312. package/src/styles/mixins/_overlay-base.scss +33 -0
  313. package/src/styles/mixins/_resizable-base.scss +57 -0
  314. package/src/styles/mixins/_spinner-base.scss +34 -0
  315. package/src/styles/mixins/_table-base.scss +298 -0
  316. package/src/styles/mixins/_tabs-base.scss +110 -0
  317. package/src/styles/mixins/_tags-base.scss +116 -0
  318. package/src/styles/mixins/_text.scss +89 -0
  319. package/src/styles/mixins.scss +15 -0
  320. package/src/styles/utilities/_borders.scss +30 -0
  321. package/src/styles/utilities/_common.scss +49 -0
  322. package/src/styles/utilities/_layout.scss +116 -0
  323. package/src/styles/utilities/_spacing.scss +65 -0
  324. package/src/styles/utilities/_text.scss +139 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energycap-components.mjs","sources":["../../../projects/components/src/lib/core/cache.service.ts","../../../projects/components/src/lib/controls/button/button.component.ts","../../../projects/components/src/lib/controls/button/button.component.html","../../../projects/components/src/lib/controls/banner/banner.component.ts","../../../projects/components/src/lib/controls/banner/banner.component.html","../../../projects/components/src/lib/controls/button/copy-button-base.directive.ts","../../../projects/components/src/lib/controls/button/copy-button.directive.ts","../../../projects/components/src/lib/controls/button/copy-table-button.directive.ts","../../../projects/components/src/lib/core/date-time-helper.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.ts","../../../projects/components/src/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.ts","../../../projects/components/src/lib/shared/user-preference.service.ts","../../../projects/components/src/lib/shared/display/pipes/date-display.pipe.ts","../../../projects/components/src/lib/controls/date-input/date-input.types.ts","../../../projects/components/src/lib/controls/calendar/calendar-item.component.ts","../../../projects/components/src/lib/controls/calendar/calendar.component.ts","../../../projects/components/src/lib/controls/calendar/calendar.component.html","../../../projects/components/src/lib/core/validation-message.service.ts","../../../projects/components/src/lib/shared/form-group.helper.ts","../../../projects/components/src/lib/controls/form-control-base.ts","../../../projects/components/src/lib/display/tooltip/tooltip.component.ts","../../../projects/components/src/lib/display/tooltip/tooltip.component.html","../../../projects/components/src/lib/display/tooltip/tooltip.service.ts","../../../projects/components/src/lib/display/tags/tags.component.ts","../../../projects/components/src/lib/display/tags/tags.component.html","../../../projects/components/src/lib/controls/popover/popover.component.ts","../../../projects/components/src/lib/controls/popover/popover.component.html","../../../projects/components/src/lib/controls/help-popover/help-popover.component.ts","../../../projects/components/src/lib/controls/help-popover/help-popover.component.html","../../../projects/components/src/lib/controls/checkbox/checkbox.component.ts","../../../projects/components/src/lib/controls/checkbox/checkbox.component.html","../../../projects/components/src/lib/controls/collapsible-toggle/collapsible-toggle.component.ts","../../../projects/components/src/lib/core/window.service.ts","../../../projects/components/src/lib/core/scroll.service.ts","../../../projects/components/src/lib/controls/navigation/nav-item-active.directive.ts","../../../projects/components/src/lib/controls/menu/menu.component.ts","../../../projects/components/src/lib/controls/menu/menu.component.html","../../../projects/components/src/lib/shared/directives/popup/popup-container.directive.ts","../../../projects/components/src/lib/controls/textbox/textbox.component.ts","../../../projects/components/src/lib/controls/textbox/textbox.component.html","../../../projects/components/src/lib/display/spinner/spinner.component.ts","../../../projects/components/src/lib/display/spinner/spinner.component.html","../../../projects/components/src/lib/display/view-overlay/view-overlay.component.ts","../../../projects/components/src/lib/display/view-overlay/view-overlay.component.html","../../../projects/components/src/lib/controls/combobox/combobox.component.ts","../../../projects/components/src/lib/controls/combobox/combobox.component.html","../../../projects/components/src/lib/controls/form-control/form-control.component.ts","../../../projects/components/src/lib/controls/form-control/form-control.component.html","../../../projects/components/src/lib/controls/link-button/link-button.component.ts","../../../projects/components/src/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.ts","../../../projects/components/src/lib/controls/date-input/date-input.component.ts","../../../projects/components/src/lib/controls/date-input/date-input.component.html","../../../projects/components/src/lib/controls/dropdown/dropdown.component.ts","../../../projects/components/src/lib/controls/dropdown/dropdown.component.html","../../../projects/components/src/lib/controls/form-group/form-group.component.ts","../../../projects/components/src/lib/controls/form-group/form-group.component.html","../../../projects/components/src/lib/controls/file-upload/file-upload.component.ts","../../../projects/components/src/lib/controls/file-upload/file-upload.component.html","../../../projects/components/src/lib/controls/form-control-label/form-control-label.component.ts","../../../projects/components/src/lib/controls/form-control-label/form-control-label.component.html","../../../projects/components/src/lib/display/table/table-locked-column.component.ts","../../../projects/components/src/lib/display/table/table-selectable-row.component.ts","../../../projects/components/src/lib/display/table/table-selectable-row.component.html","../../../projects/components/src/lib/display/table/resizable-column.component.ts","../../../projects/components/src/lib/display/table/resizable-column.component.html","../../../projects/components/src/lib/display/table/table-detail-row.component.ts","../../../projects/components/src/lib/display/table/table-master-row.component.ts","../../../projects/components/src/lib/display/table/table-master-row.component.html","../../../projects/components/src/lib/display/resizable/resizable-base.ts","../../../projects/components/src/lib/display/table/resizable-table.directive.ts","../../../projects/components/src/lib/display/table/table.component.ts","../../../projects/components/src/lib/display/table/table.component.html","../../../projects/components/src/lib/controls/navigation/nav-group.ts","../../../projects/components/src/lib/controls/tabs/tabs.component.ts","../../../projects/components/src/lib/controls/tabs/tabs.component.html","../../../projects/components/src/lib/display/table/table-pagination.component.ts","../../../projects/components/src/lib/display/table/table-pagination.component.html","../../../projects/components/src/lib/core/error.service.ts","../../../projects/components/src/lib/shared/display/pipes/row-count.pipe.ts","../../../projects/components/src/lib/display/table/searchable-table.component.ts","../../../projects/components/src/lib/display/table/searchable-table.component.html","../../../projects/components/src/lib/controls/item-picker/item-picker.component.ts","../../../projects/components/src/lib/controls/item-picker/item-picker.component.html","../../../projects/components/src/lib/core/validation-patterns.ts","../../../projects/components/src/lib/controls/numericbox/numericbox.component.ts","../../../projects/components/src/lib/controls/numericbox/numericbox.component.html","../../../projects/components/src/lib/controls/radio-button/radio-button.component.ts","../../../projects/components/src/lib/controls/radio-button/radio-button.component.html","../../../projects/components/src/lib/controls/select/select.component.ts","../../../projects/components/src/lib/controls/select/select.component.html","../../../projects/components/src/lib/display/avatar/avatar.service.ts","../../../projects/components/src/lib/display/avatar/avatar.component.ts","../../../projects/components/src/lib/display/app-bar/app-bar.component.ts","../../../projects/components/src/lib/display/app-bar/app-bar.component.html","../../../projects/components/src/lib/display/confirm/confirm.component.ts","../../../projects/components/src/lib/display/confirm/confirm.component.html","../../../projects/components/src/lib/display/dialog/dialog-types.ts","../../../projects/components/src/lib/display/dialog/dialog.service.ts","../../../projects/components/src/lib/display/dialog/dialog.component.ts","../../../projects/components/src/lib/display/dialog/dialog-group/dialog-group.component.ts","../../../projects/components/src/lib/display/dialog/dialog-group/dialog-group.component.html","../../../projects/components/src/lib/core/telemetry-tracker.service.ts","../../../projects/components/src/lib/core/telemetry.service.ts","../../../projects/components/src/lib/display/hierarchy/hierarchy-base.ts","../../../projects/components/src/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.ts","../../../projects/components/src/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.html","../../../projects/components/src/lib/display/item-display/item-display.component.ts","../../../projects/components/src/lib/display/item-display/item-display.component.html","../../../projects/components/src/lib/shared/json-helper.ts","../../../projects/components/src/lib/display/json-display/json-display.component.ts","../../../projects/components/src/lib/display/json-display/json-display.component.html","../../../projects/components/src/lib/display/resizable/resizable.component.ts","../../../projects/components/src/lib/display/splash/splash.service.ts","../../../projects/components/src/lib/display/splash/splash.component.ts","../../../projects/components/src/lib/display/splash/splash.component.html","../../../projects/components/src/lib/display/table/table-master-header-row.component.ts","../../../projects/components/src/lib/display/toast/toast-types.ts","../../../projects/components/src/lib/display/toast/toast.service.ts","../../../projects/components/src/lib/display/toast/toast/toast.component.ts","../../../projects/components/src/lib/display/toast/toast/toast.component.html","../../../projects/components/src/lib/display/toast/toaster/toaster.component.ts","../../../projects/components/src/lib/display/toast/toaster/toaster.component.html","../../../projects/components/src/lib/display/tooltip-directive/tooltip.directive.ts","../../../projects/components/src/lib/display/tour/tour-types.ts","../../../projects/components/src/lib/display/tour/tour.service.ts","../../../projects/components/src/lib/display/tour/tour.component.ts","../../../projects/components/src/lib/display/tour/tour.component.html","../../../projects/components/src/lib/display/tree/tree.component.ts","../../../projects/components/src/lib/display/tree/tree.component.html","../../../projects/components/src/lib/shared/directives/click-area-for/click-area-for.directive.ts","../../../projects/components/src/lib/shared/directives/if-viewport-width/if-viewport-width.directive.ts","../../../projects/components/src/lib/shared/display/pipes/highlight-text.pipe.ts","../../../projects/components/src/lib/shared/display/pipes/time-display.pipe.ts","../../../projects/components/src/lib/shared/display/pipes/relative-date.pipe.ts","../../../projects/components/src/lib/shared/page/page-title/page-title.component.ts","../../../projects/components/src/lib/shared/page/page-title/page-title.component.html","../../../projects/components/src/lib/shared/page/page-view/page-view.component.ts","../../../projects/components/src/lib/shared/page/page-view/page-view.component.html","../../../projects/components/src/lib/shared/testing/spy-factory.spec.ts","../../../projects/components/src/lib/core/router-helper.service.ts","../../../projects/components/src/lib/shared/testing/public-mocks.spec.ts","../../../projects/components/src/lib/shared/wizard/wizard-buttons/wizard-buttons.component.ts","../../../projects/components/src/lib/shared/wizard/wizard-buttons/wizard-buttons.component.html","../../../projects/components/src/lib/shared/wizard/wizard-progress/wizard-progress.component.ts","../../../projects/components/src/lib/shared/wizard/wizard-progress/wizard-progress.component.html","../../../projects/components/src/lib/components.module.ts","../../../projects/components/src/lib/controls/radio-button/radio-button-option.ts","../../../projects/components/src/lib/core/custom-validators.ts","../../../projects/components/src/lib/display/hierarchy/hierarchy-mocks.spec.ts","../../../projects/components/src/lib/display/tags/tag.ts","../../../projects/components/src/lib/shared/display.ts","../../../projects/components/src/lib/shared/lodash-helper.ts","../../../projects/components/src/lib/shared/page/page-statuses.ts","../../../projects/components/src/lib/shared/page/page-base/page-base.component.ts","../../../projects/components/src/lib/shared/testing/copy-button-base-test-injector-factory.spec.ts","../../../projects/components/src/lib/shared/testing/hierarchy-base-test-injector-factory.spec.ts","../../../projects/components/src/lib/shared/testing/translation-mocks.spec.ts","../../../projects/components/src/lib/shared/testing/page-base-component-test-helper.spec.ts","../../../projects/components/src/lib/shared/testing/page-base-component-test-injector-factory.spec.ts","../../../projects/components/src/lib/shared/wizard/wizard-base/wizard-base.component.ts","../../../projects/components/src/public-api.ts","../../../projects/components/src/energycap-components.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CacheService {\r\n\r\n private localStorageAvailable: boolean = false;\r\n private sessionStorageAvailable: boolean = false;\r\n\r\n constructor() {\r\n let cacheError = null;\r\n try {\r\n let dateStr = 'roundtrip-test-' + new Date().getTime();\r\n const value = 'val-' + dateStr;\r\n\r\n localStorage.setItem(dateStr, value);\r\n sessionStorage.setItem(dateStr, value);\r\n\r\n this.localStorageAvailable = localStorage.getItem(dateStr) == value;\r\n this.sessionStorageAvailable = sessionStorage.getItem(dateStr) == value;\r\n\r\n localStorage.removeItem(dateStr);\r\n sessionStorage.removeItem(dateStr);\r\n\r\n } catch(error) {\r\n cacheError = error;\r\n } finally {\r\n if(!this.localStorageAvailable || !this.sessionStorageAvailable){\r\n console.warn('storage unavailable for caching purposes. Some features will not be fully supported. ',\r\n {\r\n local: this.localStorageAvailable,\r\n session: this.sessionStorageAvailable,\r\n error: cacheError\r\n }\r\n );\r\n }\r\n }\r\n }\r\n\r\n /**Return true if the requested cache allows the user to round-trip data in the current environment.\r\n * Security settings can prevent it and the app may need to know if \"not found\" means \"never set\" or \"not supported\"\r\n */\r\n public isCacheAvailable(sessionOnly = false): boolean {\r\n return sessionOnly ? this.sessionStorageAvailable : this.localStorageAvailable;\r\n }\r\n\r\n /**\r\n * Retrieve an item from cache\r\n */\r\n public getItem<T>(key: string, sessionOnly = false): T | null {\r\n let storage = this.getStorage(sessionOnly);\r\n if (storage) {\r\n let result = storage.getItem(key);\r\n if (result) {\r\n return <T>JSON.parse(result);\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Retrieves all keys from cache\r\n */\r\n public keys(sessionOnly = false): Array<string> {\r\n let result = new Array<string>();\r\n let storage = this.getStorage(sessionOnly);\r\n\r\n if (storage) {\r\n for (var i = 0, len = storage.length; i < len; ++i) {\r\n result.push(storage.key(i)!);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Removes an item from the cache\r\n */\r\n public removeItem(key: string, sessionOnly = false) {\r\n let storage = this.getStorage(sessionOnly);\r\n\r\n if (storage) {\r\n storage.removeItem(key);\r\n }\r\n }\r\n\r\n /**\r\n * Persists an item to cache\r\n */\r\n public setItem(key: string, value: object, sessionOnly = false) {\r\n let storage = this.getStorage(sessionOnly);\r\n if (storage) {\r\n storage.setItem(key, JSON.stringify(value));\r\n }\r\n }\r\n\r\n /**Returns the local or session storage to use for backing the given cache request.\r\n * If the browser does not support the requested storage the result will be null.\r\n * This can happen if the user is in Firefox for example with the setting dom.storage.enabled = false\r\n */\r\n private getStorage(sessionOnly: boolean) : Storage | null {\r\n if(sessionOnly && this.sessionStorageAvailable){\r\n return window.sessionStorage;\r\n } else if(this.localStorageAvailable){\r\n return window.localStorage;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n //TODO: add user info to isolate cache values from each other\r\n}","import { AfterViewInit, Component, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';\r\n\r\n/**\r\n * \"Submit\" button type is deprecated. Use the isSubmit input instead.\r\n * This allows you to make any button type a submit button.\r\n *\r\n * \"Link\" button type is deprecated. Use the LinkButtonComponent instead.\r\n */\r\nexport type ButtonType = \"primary\" | \"secondary\" | \"common\" | \"icon\" | \"link\" | \"text\" | \"submit\" | \"danger\" | \"danger-text\";\r\n\r\n@Component({\r\n selector: 'ec-button',\r\n templateUrl: 'button.component.html',\r\n styleUrls: ['./button.component.scss']\r\n})\r\n\r\nexport class ButtonComponent implements OnInit, AfterViewInit {\r\n\r\n /**\r\n * Id to set\r\n */\r\n @HostBinding('attr.id')\r\n @Input() public id?: string;\r\n\r\n /**\r\n * Is the button disabled?\r\n */\r\n @Input() public disabled?: boolean = false;\r\n\r\n /**\r\n * The icon class for a button that has an image\r\n */\r\n @Input() public icon?: string;\r\n\r\n /**\r\n * The text on the button\r\n */\r\n @Input() public label?: string;\r\n\r\n /**\r\n * Text to place in a badge to the right of the button\r\n */\r\n @Input() public badge?: string | number;\r\n\r\n /**\r\n * The tabindex of the control\r\n */\r\n @Input() public tabindex?: number = 0;\r\n\r\n /**\r\n * The type of button\r\n */\r\n @Input() public type?: ButtonType = \"common\";\r\n\r\n /**\r\n * The pending status of the control, can be used to provide feedback to the user that something is in process or (in combination with `[pendingIcon]`) some other status, e.g success.\r\n */\r\n @Input() public pending?: boolean = false;\r\n\r\n /** The icon to display when the button is in the pending state. Defaults to 'icon-ui-loading' */\r\n @Input() public pendingIcon = 'icon-loading';\r\n\r\n /**\r\n * Provide a custom template for the button. This will override icon, label and badge\r\n * if specified. Focus, hover and disabled styles still apply.\r\n */\r\n @Input() public customTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * If true, the button element's type will be set to submit so that hitting \"enter\"\r\n * on a form will trigger the button's action.\r\n */\r\n @Input() public isSubmit?: boolean = false;\r\n\r\n /** Focuses the button on init when set to true */\r\n @Input() public autofocus: boolean = false;\r\n\r\n /**\r\n * Emit an event when the button element is clicked (not the icon)\r\n */\r\n @Output() public clicked: EventEmitter<any> = new EventEmitter<any>();\r\n\r\n @ViewChild('element', {static: true}) public buttonElement!: ElementRef;\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Ensure label or icon is set\r\n *\r\n */\r\n public ngOnInit(): void {\r\n if (!this.label && !this.icon && !this.customTemplate) {\r\n throw new Error('ButtonComponent requires an icon, a label, or both');\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.autofocus) {\r\n this.focus();\r\n }\r\n }\r\n\r\n /**\r\n * Event handler for click event on the button element.\r\n * Blur the button so focus style does not persist\r\n *\r\n */\r\n public onClick(event: any) {\r\n if (this.pending || this.disabled) {\r\n event.stopImmediatePropagation();\r\n } else {\r\n this.clicked.emit(event);\r\n }\r\n }\r\n\r\n public focus(): void {\r\n this.buttonElement.nativeElement.focus();\r\n }\r\n}","<button id=\"{{id}}_button\"\r\n class=\"ec-button-{{customTemplate ? 'custom' : type}}\"\r\n [class.has-badge]=\"badge !== undefined\"\r\n [class.icon-only]=\"icon && !label\"\r\n tabindex=\"{{tabindex}}\"\r\n [type]=\"type === 'submit' || isSubmit ? 'submit' : 'button'\"\r\n [disabled]=\"disabled\"\r\n (click)=\"onClick($event)\"\r\n #element\r\n [attr.cdkFocusInitial]=\"autofocus || null\">\r\n <ng-container *ngIf=\"customTemplate; else defaultTemplate\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate\"></ng-container>\r\n </ng-container>\r\n</button>\r\n\r\n<ng-template #defaultTemplate>\r\n <!-- Hidden when the button is not pending -->\r\n <div class=\"pending-container\" *ngIf=\"pending\">\r\n <i class=\"ec-icon {{pendingIcon}}\" id=\"{{id}}_pending\"></i>\r\n </div>\r\n\r\n <i class=\"ec-icon {{icon}}\" id=\"{{id}}_icon\" *ngIf=\"icon\"></i>\r\n\r\n <ng-container *ngIf=\"label\">\r\n <span id=\"{{id}}_label\" class=\"label\">{{label | translate}}</span>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"badge !== undefined\">\r\n <span id=\"{{id}}_badge\" class=\"badge\">{{badge}}</span>\r\n </ng-container>\r\n</ng-template>","import { Component, Input, Output, EventEmitter, HostBinding, OnChanges } from '@angular/core';\r\nimport { CacheService } from '../../core/cache.service';\r\n\r\nexport type BannerType = 'info' | 'warning' | 'error' | 'success' | 'promo';\r\nexport type BannerStyle = 'normal' | 'pinned' | 'toast';\r\nexport type BannerCacheEntry = { hidden: boolean };\r\n\r\n@Component({\r\n selector: 'ec-banner',\r\n templateUrl: './banner.component.html',\r\n styleUrls: ['./banner.component.scss']\r\n})\r\nexport class BannerComponent implements OnChanges {\r\n /** hidden hides the banner */\r\n @HostBinding('hidden')\r\n @Input() public hidden = false;\r\n\r\n /**The ID of the component, rendered into the HTML to make it more accessible to automation */\r\n @Input() public id: string = '';\r\n\r\n /**The type of banner which is used to determine the styling */\r\n @Input() public type: BannerType = 'warning';\r\n @Input() public bannerStyle: BannerStyle = 'pinned';\r\n\r\n /**The title for the banner */\r\n @Input() public title?: string;\r\n\r\n /**The text inside the banner */\r\n @Input() public text?: string;\r\n\r\n /** List of strings to display inside the banner */\r\n @Input() public list?: string[];\r\n\r\n /**Show an x to allow hiding the banner */\r\n @Input() public showCloseBtn = false;\r\n\r\n /** When true, the banner will hide itself when the close button is clicked */\r\n @Input() public autoHideOnClose: boolean = true;\r\n\r\n /**\r\n * The icon will be set to this value if it's provided.\r\n * If it's not provided, the icon will be selected based on the type input. \r\n */\r\n @Input() public customIcon?: string;\r\n\r\n /** When true, the banner will automatically hide itself based on the state found in local storage */\r\n @Input() public rememberClosed: boolean = false;\r\n\r\n /**Event to hide the banner */\r\n @Output() public closed: EventEmitter<void> = new EventEmitter();\r\n\r\n /**\r\n * Icon to show on the banner. \r\n * If no value for overrideIcon is provided, will be automatically selected based on the type input. \r\n */\r\n public icon: string = '';\r\n\r\n private readonly cacheKeyPrefix: string = 'dismissableBanner-';\r\n\r\n constructor(private cacheService: CacheService) { }\r\n\r\n public ngOnChanges() {\r\n if(this.customIcon) {\r\n this.icon = this.customIcon;\r\n } else {\r\n this.getIconByBannerType();\r\n }\r\n\r\n if (this.rememberClosed) {\r\n let cacheValue: BannerCacheEntry = (<BannerCacheEntry>this.cacheService.getItem(`${this.cacheKeyPrefix}${this.id}`));\r\n if (cacheValue) {\r\n this.hidden = cacheValue.hidden;\r\n } else {\r\n this.hidden = false;\r\n }\r\n }\r\n }\r\n\r\n /** On close, explicitly hide the banner one time. If the input changes afterward then it can reappear*/\r\n public close(): void {\r\n if (this.autoHideOnClose) {\r\n this.hidden = true;\r\n }\r\n\r\n if (this.rememberClosed) {\r\n this.cacheService.setItem(`${this.cacheKeyPrefix}${this.id}`, <BannerCacheEntry>{ hidden: true })\r\n }\r\n this.closed.emit();\r\n }\r\n\r\n private getIconByBannerType() {\r\n if(this.type === 'info') {\r\n this.icon = 'icon-info-circle';\r\n } else if(this.type === 'warning') {\r\n this.icon = 'icon-warning';\r\n } else if(this.type === 'error') {\r\n this.icon = 'icon-error';\r\n } else if(this.type === 'success') {\r\n this.icon = 'icon-check-circle';\r\n } else if (this.type === 'promo') {\r\n this.icon = 'icon-sparkles';\r\n }\r\n }\r\n \r\n}\r\n","<div id=\"banner_{{id}}\" class=\"banner {{type}} {{bannerStyle}}\">\r\n <ec-button id=\"banner{{id}}_close\"\r\n *ngIf=\"showCloseBtn\"\r\n type=\"icon\"\r\n icon=\"icon-cancel\"\r\n (clicked)=\"close()\">\r\n </ec-button>\r\n <div class=\"banner-content d-flex text-body-1\">\r\n <i class=\"ec-icon {{icon}}\"></i>\r\n <div class=\"ml-2\">\r\n <p class=\"title mb-0\" *ngIf=\"title\">\r\n {{title}}\r\n </p>\r\n <p class=\"text mb-0\" *ngIf=\"text\">{{text}}</p>\r\n \r\n <ul class=\"list mb-0\" *ngIf=\"list?.length\">\r\n <li *ngFor=\"let item of list\">{{item}}</li>\r\n </ul>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n","import { Directive, OnInit, OnDestroy, HostBinding, Injector } from '@angular/core';\r\nimport { ClipboardService } from 'ngx-clipboard';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { ButtonComponent } from './button.component';\r\n\r\n@Directive()\r\nexport abstract class CopyButtonBaseDirective implements OnInit, OnDestroy {\r\n @HostBinding('class.is-success') public copySuccess = false;\r\n @HostBinding('class.is-error') public copyFailed = false;\r\n\r\n public button: ButtonComponent;\r\n protected clipboardService: ClipboardService;\r\n\r\n /** Used to unsubscribe when the directive is removed from the DOM */\r\n private destroyed: Subject<void> = new Subject();\r\n\r\n constructor(\r\n button: ButtonComponent,\r\n injector: Injector\r\n ) {\r\n this.button = button;\r\n this.clipboardService = injector.get(ClipboardService);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.button.clicked.pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(() => {\r\n this.onClick();\r\n })\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n private onClick() {\r\n let success: boolean;\r\n let defaultPendingIcon: string = this.button.pendingIcon;\r\n\r\n /** Call abstract method to get value for copying to clipboard */\r\n let dataForClipboard = this.getDataForClipboard();\r\n\r\n /** If the copyTableButton returns error, trigger the failed response flow, otherwise, attempt clipboardService */\r\n if (dataForClipboard === null) {\r\n success = false;\r\n } else {\r\n success = this.clipboardService.copyFromContent(dataForClipboard!);\r\n }\r\n\r\n /** Icon handling for success/failure */\r\n if (success) {\r\n this.copySuccess = true;\r\n this.button.pendingIcon = 'icon-check';\r\n } else {\r\n this.copyFailed = true;\r\n this.button.pendingIcon = 'icon-cancel';\r\n }\r\n\r\n this.button.pending = true;\r\n\r\n /** AFter 500ms shut the pending overlay down */\r\n setTimeout(() => {\r\n this.button.pending = false;\r\n this.copySuccess = false;\r\n this.copyFailed = false;\r\n this.button.pendingIcon = defaultPendingIcon;\r\n }, 500);\r\n }\r\n\r\n /** Called to get context-specific value for clipboard copying */\r\n protected abstract getDataForClipboard(): string | null;\r\n\r\n}\r\n","import { Directive, Host, Injector, Input } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\nimport { ButtonComponent } from './button.component';\r\n\r\nimport { CopyButtonBaseDirective } from './copy-button-base.directive';\r\n\r\n@Directive({\r\n selector: '[ecCopyButton]'\r\n})\r\n\r\nexport class CopyButtonDirective extends CopyButtonBaseDirective {\r\n @Input('ecCopyButton') public copyFormModel?: AbstractControl;\r\n\r\n constructor(\r\n @Host() public button: ButtonComponent,\r\n protected injector: Injector\r\n ) {\r\n super(button, injector);\r\n }\r\n\r\n protected getDataForClipboard(): string { \r\n return this.copyFormModel?.value;\r\n } \r\n}","import { Directive, Host, Injector, Input } from '@angular/core';\r\nimport { ButtonComponent } from './button.component';\r\nimport { CopyButtonBaseDirective } from './copy-button-base.directive';\r\n\r\n@Directive({\r\n selector: '[ecCopyTableButton]'\r\n})\r\n\r\nexport class CopyTableButtonDirective extends CopyButtonBaseDirective {\r\n @Input('ecCopyTableButton') public tableId!: string;\r\n \r\n constructor(\r\n @Host() public button: ButtonComponent,\r\n protected injector: Injector\r\n ) {\r\n super(button, injector);\r\n }\r\n\r\n /** Grabs table rows and converts them to an Array we can work with called rows\r\n * If rows is empty it means the tableId provided was not found and so we trigger the unsuccessful\r\n * path in the base directive. If tableId is good, we map over the rows and extract the data in\r\n * each cell as a string value before joining it all as tab & line delimited values so the user may\r\n * paste it in an excel spreadsheet\r\n */ \r\n protected getDataForClipboard(): string | null {\r\n let rows = Array.from(document.querySelectorAll(`#${this.tableId} tr`));\r\n \r\n if (rows.length === 0) {\r\n console.log('No table was found with that ID')\r\n return null;\r\n }\r\n \r\n let rawTableText = rows.map(row => {\r\n let rowText = Array.from(row.querySelectorAll('td, th')).map(tableCell => tableCell.textContent).join('\\t');\r\n return rowText;\r\n }).join('\\n');\r\n\r\n return rawTableText;\r\n }\r\n}\r\n","import moment from 'moment';\r\n\r\ntype DateFormatMap = { [format: string]: string[] };\r\n\r\n/**\r\n * Helper class that provides common date constants and helpful date functions\r\n */\r\nexport class DateTimeHelper {\r\n\r\n ///////////////////////////////////////////////////////\r\n // CONSTANTS\r\n ///////////////////////////////////////////////////////\r\n\r\n public static beginningOfTime: Date = new Date(1899,11,31);\r\n \r\n /** 3000-01-01 */\r\n public static endOfTime: Date = new Date(3000, 0, 1);\r\n\r\n /** 3000-01-01 UTC */\r\n public static endOfTimeUTC: Date = moment.utc('3000-01-01').toDate();\r\n\r\n /** Default effective date for new AccountMeter relationships: 2010-01-01 */\r\n public static defaultAccountMeterEffectiveDate: Date = new Date(2010, 0, 1);\r\n\r\n /** The default date that a newly created account becomes effective: 2010-01-01 */\r\n public static defaultAccountServiceEffectiveDate: Date = new Date(2010, 0, 1);\r\n\r\n /** Minimum date for all datepickers: 1980-01-01 */\r\n public static minDatePickerDate: Date = new Date(1980, 0, 1);\r\n\r\n /** Maximum date for all datepickers: 3000-01-01 11:59:59 PM to allow for local time offset working in for 3000-01-01 dates, which we store in the db to represent \"end of time\" */\r\n public static maxDatePickerDate: Date = new Date(3000,0,1,23,59,59);\r\n\r\n /** Timestamp formats */\r\n public static defaultDateFormat: string = \"yyyy-MM-dd\";\r\n public static defaultTimeFormat: string = \"HH:mm:ss\";\r\n public static defaultTimestampFormat: string = `${DateTimeHelper.defaultDateFormat} ${DateTimeHelper.defaultTimeFormat}`;\r\n\r\n /** List of valid bill import date formats\r\n * Warning! Do not use these for actual formatting of dates\r\n */\r\n public static billImportFormatDateFormats = [\r\n { label: \"mm/dd/yyyy\", value: \"mm/dd/yyyy\" }, { label: \"Month dd yyyy\", value: \"Month dd yyyy\" }, \r\n { label: \"dd/mm/yyyy\", value: \"dd/mm/yyyy\" }, { label: \"dd Month yyyy\", value: \"dd Month yyyy\" }, { label: \"yyyymmdd\", value: \"yyyymmdd\" }];\r\n\r\n /**\r\n * User input formats that we will parse into a date\r\n * when the users date format preference has month before day\r\n */\r\n public static monthFirstParseFormats: string[] = [\r\n \"yyyy/MM/dd\",\r\n \"MM/dd/yyyy\",\r\n \"MMddyyyy\",\r\n \"MM/dd/yy\",\r\n \"MMddyy\",\r\n \"MM/dd\",\r\n \"yyyy.MM.dd\",\r\n \"MM.dd.yyyy\",\r\n \"MM.dd.yy\",\r\n \"MM.dd\",\r\n \"yyyy-MM-dd\",\r\n \"MM-dd-yyyy\",\r\n \"MM-dd-yy\",\r\n \"MM-dd\",\r\n \"yyyyMMdd\"\r\n ];\r\n\r\n /**\r\n * User input formats that we will parse into a date\r\n * when the users date format preference has month before day.\r\n * To be used with moment.js. Moment ignores non-alphanumeric characters\r\n * so dates like 2020/09/10 will be parsed the same as 2020-09-10\r\n */\r\n public static momentMonthFirstParseFormats: string[] = [\r\n 'M-D',\r\n 'MM-DD',\r\n 'M-D-YY',\r\n 'MM-DD-YY',\r\n 'MMDDYYYY',\r\n 'YYYYMMDD',\r\n 'YYYY-MM-DD',\r\n 'MM-DD-YYYY'\r\n ];\r\n\r\n /**\r\n * User input formats that we will parse into a date\r\n * when the users date format preference has day before month\r\n */\r\n public static dateFirstParseFormats: string[] = [\r\n \"yyyy/dd/MM\",\r\n \"dd/MM/yyyy\",\r\n \"ddMMyyyy\",\r\n \"dd/MM/yy\",\r\n \"ddMMyy\",\r\n \"dd/MM\",\r\n \"yyyy.dd.MM\",\r\n \"dd.MM.yyyy\",\r\n \"dd.MM.yy\",\r\n \"dd.MM\",\r\n \"yyyy-dd-MM\",\r\n \"dd-MM-yyyy\",\r\n \"dd-MM-yy\",\r\n \"dd-MM\",\r\n \"yyyyDDmm\"\r\n ];\r\n\r\n /**\r\n * User input formats that we will parse into a date\r\n * when the users date format preference has day before month.\r\n * To be used with moment.js. Moment ignores non-alphanumeric characters\r\n * so dates like 2020/09/10 will be parsed the same as 2020-09-10\r\n */\r\n public static momentDateFirstParseFormats: string[] = [\r\n 'D-M',\r\n 'DD-MM',\r\n 'D-M-YY',\r\n 'DD-MM-YY',\r\n 'DDMMYYYY',\r\n 'YYYYMMDD',\r\n 'YYYY-MM-DD',\r\n 'DD-MM-YYYY'\r\n ];\r\n\r\n /**\r\n * Formats used to parse dates that are in the medium or long format by moment js.\r\n * These are shared by date-first and month-first date formats. The date can't be\r\n * parsed differently based on the date preference since the month is not numeric.\r\n * This is not an exhaustive list of formats, but it should cover most common formats.\r\n */\r\n public static momentMedAndLongDateFormats: string[] = [\r\n 'DD MMM',\r\n 'MMM DD',\r\n 'DD MMM YY',\r\n 'DD MMM YYYY',\r\n 'DD MMMM YYYY',\r\n 'MMM D, YY',\r\n 'MMM D, YYYY',\r\n 'MMM DD, YYYY',\r\n 'MMMM D, YYYY',\r\n 'MMMM DD, YYYY',\r\n 'MMM YY',\r\n 'MMM YYYY',\r\n 'MMMM YYYY',\r\n 'MMM, YY',\r\n 'MMM, YYYY',\r\n 'MMMM, YYYY',\r\n ];\r\n\r\n /**\r\n * Format to display the time portion of a datetime\r\n */\r\n public static timeFormat: string = 'HH:mm:ss';\r\n\r\n ///////////////////////////////////////////////////////\r\n // METHODS\r\n ///////////////////////////////////////////////////////\r\n\r\n /**\r\n * Return true if @see date is equal to the @see endOfTime\r\n */\r\n public static isEndOfTime(date: Date | moment.Moment | string, timeZoneOffset: boolean = false): boolean {\r\n const endOfTime = timeZoneOffset ? this.endOfTimeUTC : this.endOfTime;\r\n return this.isSameDay(date, endOfTime);\r\n }\r\n\r\n\r\n /**\r\n * Compare two dates and return true if they represent the same year, month, and day (time is ignored).\r\n */\r\n public static isSameDay(date1: Date | moment.Moment | string, date2: Date | moment.Moment | string): boolean {\r\n return moment(date1).isSame(moment(date2), 'day');\r\n }\r\n\r\n /**\r\n * Get the parse formats based on the given date format. If no date format is\r\n * given, or we don't recognize the format, return the month first parse formats.\r\n * \r\n */\r\n public static getParseFormats(dateFormat?: string | null): string[] {\r\n let map: DateFormatMap = {\r\n 'MM/DD/YYYY': this.monthFirstParseFormats,\r\n 'MM-DD-YYYY': this.monthFirstParseFormats,\r\n 'DD/MM/YYYY': this.dateFirstParseFormats,\r\n 'DD-MM-YYYY': this.dateFirstParseFormats,\r\n 'YYYY/MM/DD': this.monthFirstParseFormats,\r\n 'YYYY-MM-DD': this.monthFirstParseFormats\r\n };\r\n\r\n return dateFormat ? map[dateFormat] : this.monthFirstParseFormats;\r\n }\r\n\r\n /**\r\n * Get the moment parse formats based on the given date format. If no date format is\r\n * given, or we don't recognize the format, return the month first parse formats.\r\n */\r\n public static getMomentParseFormats(dateFormat?: string | null): string[] {\r\n let map: DateFormatMap = {\r\n 'MM/DD/YYYY': [...this.momentMonthFirstParseFormats, ...this.momentMedAndLongDateFormats],\r\n 'MM-DD-YYYY': [...this.momentMonthFirstParseFormats, ...this.momentMedAndLongDateFormats],\r\n 'DD/MM/YYYY': [...this.momentDateFirstParseFormats, ...this.momentMedAndLongDateFormats],\r\n 'DD-MM-YYYY': [...this.momentDateFirstParseFormats, ...this.momentMedAndLongDateFormats],\r\n 'YYYY/MM/DD': [...this.momentMonthFirstParseFormats, ...this.momentMedAndLongDateFormats],\r\n 'YYYY-MM-DD': [...this.momentMonthFirstParseFormats, ...this.momentMedAndLongDateFormats]\r\n };\r\n\r\n return dateFormat ? map[dateFormat] : this.momentMonthFirstParseFormats;\r\n }\r\n\r\n\r\n\r\n /**\r\n * Get relationship start date (favoring date in partialFormState if exists)\r\n * * return default account-meter effective date if no start date found\r\n * \r\n */\r\n public static getAccountMeterStartDate(partialFormState: any, accountMeter: { startDate: Date | null | undefined }): Date {\r\n let startDate = partialFormState.effectiveFrom || accountMeter.startDate;\r\n return startDate ? new Date(startDate) : DateTimeHelper.defaultAccountMeterEffectiveDate;\r\n }\r\n\r\n \r\n /**\r\n * Get relationship end date (favoring date in partialFormState if exists)\r\n * * return null if no stored date or end date is 1/1/3000\r\n */\r\n public static getAccountMeterEndDate(partialFormState: any, accountMeter: { endDate: Date | null | undefined }): Date | null {\r\n let endDate = partialFormState.effectiveTo || accountMeter.endDate;\r\n if (endDate && !DateTimeHelper.isEndOfTime(endDate)) {\r\n return new Date(endDate);\r\n }\r\n return null;\r\n }\r\n \r\n public static isDateBetween(\r\n date: Date, \r\n startDate?: Date | null, \r\n endDate?: Date | null, \r\n includeStart?: boolean, \r\n includeEnd?: boolean\r\n ):boolean {\r\n let inclusivity: '()' | '[)' | '(]' | '[]' = '()';\r\n if (includeStart && includeEnd ) {\r\n inclusivity = '[]';\r\n } else if (includeStart) {\r\n inclusivity = '[)';\r\n } else if (includeEnd) {\r\n inclusivity = '(]';\r\n }\r\n\r\n // If a start date is not provide, we'll use our beginning of time instead\r\n startDate = startDate || this.beginningOfTime;\r\n\r\n // If an end date is not provided, we'll use our end of time instead\r\n endDate = endDate || this.endOfTime;\r\n\r\n return moment(date).isBetween(startDate, endDate, 'day', inclusivity);\r\n }\r\n\r\n public static stringToDate(dateString: string | null | undefined): Date | null | undefined {\r\n if (dateString === null || dateString === undefined) {\r\n return dateString;\r\n } else {\r\n return moment(dateString).toDate();\r\n } \r\n }\r\n}","import moment from \"moment\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\n\r\n/**\r\n * Contains the logic for selecting, formatting, and parsing date dates for a specific selection mode.\r\n */\r\nexport abstract class DateInputSelectionStrategyBase {\r\n /** The calendar view mode where selections occur for this mode. This is used to zoom the calendar into the selection */\r\n abstract readonly selectionViewMode: Calendar.ViewMode;\r\n /** The list of view modes that are accessible by this selection mode. Used to determine whether the calendar view needs to be changed or not on selection change. */\r\n abstract readonly validViewModes: Calendar.ViewMode[];\r\n /** Whether the secondary textbox should be shown for this selection mode */\r\n abstract readonly showSecondaryTextbox: boolean;\r\n /** Whether the secondary calendar should be shown for this selection mode */\r\n abstract readonly showSecondaryCalendar: boolean;\r\n /** Parses the string into a date using the provided parse formats. */\r\n parseString(value: string | null | undefined, parseFormats: string[], opts?: DateInput.ParsingOptions): Date | null {\r\n if (!value) {\r\n return null;\r\n }\r\n const date = moment(value, parseFormats);\r\n\r\n if (date.isValid()) {\r\n // If we're in a temporary state (when the user is typing in a textbox), we need to set the year to the current year if it's before the min year\r\n // This prevents the calendars from showing unhelpful dates that are in the distant past before the user finishes typing in the date.\r\n // We don't do this modification when the real selection happens on textbox blur.\r\n if (opts?.shiftToCurrentYearIfBelow && date.isBefore(opts.shiftToCurrentYearIfBelow)) {\r\n date.set('year', moment().year());\r\n }\r\n\r\n return date.toDate();\r\n }\r\n\r\n return null;\r\n }\r\n /** Formats a date input selection into values to be displayed in the date input's textboxes. */\r\n abstract formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'];\r\n /** \r\n * Parses the date input's values into a date selection to display in the calendars.\r\n * `parseFromEnd` controls whether the fixed range modes (last7days, last28days) will key off the end date instead of the start date.\r\n * This is used when the user is typing in the end date textbox.\r\n */\r\n abstract parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;\r\n /** Returns a selection given a date and an existing selection (in the case of date ranges). Called when a date is clicked in the calendars. */\r\n abstract getSelectionFromDate(date: Date, existingSelection?: DateInput.Selection | null): DateInput.Selection | null;\r\n /** Returns a new selection that best matches the given previous selection from a different selection mode */\r\n abstract getNewSelectionFromExisting(previousSelection?: DateInput.Selection | null): DateInput.Selection | null;\r\n /** Returns a new selection for the provided date. */\r\n getSelectionForQuickSelectDate(date: Date, existingSelection?: DateInput.Selection | null): DateInput.Selection | null {\r\n return this.getSelectionFromDate(date, existingSelection);\r\n }\r\n /** Returns the next selection. Called by the date input steppers to move the range. */\r\n abstract getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;\r\n /** Returns the previous selection. Called by the date input steppers to move the range. */\r\n abstract getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;\r\n \r\n /** Returns the view for the primary calendar for the selection and selection mode */\r\n getPrimaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View {\r\n let date: Date;\r\n\r\n // If we have a range, use the end date, defaulting to the start date or today\r\n if (DateInput.isSelectionRange(selection)) {\r\n date = selection.end || selection.start || new Date();\r\n // If we have a single date, use it, defaulting to today\r\n } else {\r\n date = selection || new Date();\r\n }\r\n\r\n // Ensure the date is within the min and max dates\r\n date = date < minDate ? minDate : date;\r\n date = date > maxDate ? maxDate : date;\r\n\r\n // If the current calendar view mode is valid for the selection mode, use it, otherwise use the selection view mode\r\n // This prevents the calendar from changing view modes as the user types/blurs the textboxes as long as the view mode is valid\r\n const viewMode = this.validViewModes.includes(currentView.mode) ? currentView.mode : this.selectionViewMode;\r\n\r\n return { mode: viewMode, date };\r\n };\r\n \r\n /**\r\n * Returns the view for the secondary calendar for the selection and selection mode.\r\n * This is is only used by the range selection strategy. All others just return the current date.\r\n */\r\n getSecondaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View {\r\n return { mode: this.selectionViewMode, date: new Date() }\r\n };\r\n}\r\n","import moment from \"moment\";\r\nimport { DateDisplayPipe } from \"../../../shared/display/pipes/date-display.pipe\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategy-base\";\r\n\r\n/**\r\n * Selection strategy for the 'day' selection mode.\r\n */\r\nexport class DaySelectionStrategy extends DateInputSelectionStrategyBase {\r\n public readonly selectionViewMode: Calendar.ViewMode = 'day';\r\n public readonly validViewModes: Calendar.ViewMode[] = ['day', 'month', 'year'];\r\n public readonly showSecondaryTextbox = false;\r\n public readonly showSecondaryCalendar = false;\r\n\r\n constructor(\r\n private dateDisplayPipe: DateDisplayPipe\r\n ) {\r\n super();\r\n }\r\n\r\n formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'] {\r\n // If the selection is a single date, format it into the first textbox.\r\n if (DateInput.isSelectionSingleDate(selection)) {\r\n return { textbox: this.dateDisplayPipe.transform(selection, true), textbox2: null };\r\n // Otherwise, clear both textboxes. This shouldn't happen based on current date input flows,\r\n // and even if it did there's not really a good way to handle it.\r\n } else {\r\n return { textbox: null, textbox2: null };\r\n }\r\n }\r\n\r\n parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null {\r\n return this.parseString(value.textbox, parseFormats, opts);\r\n }\r\n\r\n getSelectionFromDate(date: Date): DateInput.Selection | null {\r\n // Nice and simple\r\n return date;\r\n }\r\n\r\n getNewSelectionFromExisting(previousSelection?: DateInput.Selection | null): DateInput.Selection | null {\r\n // If the previous selection was a range, return the end date and default to the start date if there isn't one.\r\n if (DateInput.isSelectionRange(previousSelection)) {\r\n return previousSelection.end || previousSelection.start;\r\n // If the previous selection was a single date, return it.\r\n } else if (DateInput.isSelectionSingleDate(previousSelection)) {\r\n return previousSelection;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Add a single day to the selection\r\n if (DateInput.isSelectionSingleDate(selection)) {\r\n return moment(selection).add(1, 'day').toDate();\r\n }\r\n\r\n // This shouldn't happen based on current date input flows, but if it does just return the selection as-is.\r\n return selection;\r\n }\r\n\r\n getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Subtract a single day from the selection\r\n if (DateInput.isSelectionSingleDate(selection)) {\r\n return moment(selection).subtract(1, 'day').toDate();\r\n }\r\n\r\n // This shouldn't happen based on current date input flows, but if it does just return the selection as-is.\r\n return selection;\r\n }\r\n}\r\n","import moment from \"moment\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategy-base\";\r\nimport { RangeSelectionStrategy } from \"./range-selection-strategy\";\r\n\r\n/**\r\n * Selection strategy for the 'last 28 days' selection mode.\r\n */\r\nexport class Last28DaysSelectionStrategy extends DateInputSelectionStrategyBase {\r\n public readonly selectionViewMode: Calendar.ViewMode = 'day';\r\n public readonly validViewModes: Calendar.ViewMode[] = ['day', 'month', 'year'];\r\n public readonly showSecondaryTextbox = true;\r\n public readonly showSecondaryCalendar = false;\r\n\r\n constructor(\r\n private rangeStrategy: RangeSelectionStrategy\r\n ) {\r\n super();\r\n }\r\n\r\n formatSelection(value?: DateInput.Selection | null): DateInput.TextboxGroup['value'] {\r\n // Delegate to the range strategy for formatting since the logic is the same\r\n return this.rangeStrategy.formatSelection(value);\r\n }\r\n\r\n parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null {\r\n let start = this.parseString(value.textbox, parseFormats, opts);\r\n let end = this.parseString(value.textbox2, parseFormats, opts);\r\n\r\n if (start && end) {\r\n // Even if both dates are provided, it's possible that they don't match a 28-day range\r\n // Update the start and end dates to match a 28-day range, keying off the end date if parseFromEnd is true\r\n // parseFromEnd is true when a date is being entered from the end date textbox\r\n if (opts?.parseFromEnd) {\r\n start = moment(end).subtract(27, 'days').toDate();\r\n } else {\r\n end = moment(start).add(27, 'days').toDate();\r\n }\r\n }\r\n\r\n // If the start date is not provided, we'll use the end date to calculate the start date\r\n if (!start && end && !opts?.preventAutoComplete) {\r\n start = moment(end).subtract(27, 'days').toDate();\r\n }\r\n\r\n // If the end date is not provided, we'll use the start date to calculate the end date\r\n if (!end && start && !opts?.preventAutoComplete) {\r\n end = moment(start).add(27, 'days').toDate();\r\n }\r\n\r\n if (!start && !end) {\r\n return null;\r\n } else {\r\n return { start, end };\r\n }\r\n }\r\n\r\n getSelectionFromDate(date: Date): DateInput.Selection | null {\r\n return { \r\n start: moment(date).subtract(27, 'days').toDate(),\r\n end: date\r\n };\r\n }\r\n\r\n getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null {\r\n if (DateInput.isSelectionRange(previousSelection)) {\r\n // If the range only has a start date, make the 28-day range start on that date\r\n if (!previousSelection.end && previousSelection.start) {\r\n return {\r\n start: previousSelection.start,\r\n end: moment(previousSelection.start).add(27, 'days').toDate()\r\n };\r\n // If the range only has an end date, make the 28-day range end on that date\r\n } else if (previousSelection.end) {\r\n return this.getSelectionFromDate(previousSelection.end);\r\n }\r\n // If the previous selection was a single date, make the range the 28 days ending on that date\r\n } else if (DateInput.isSelectionSingleDate(previousSelection)) {\r\n return this.getSelectionFromDate(previousSelection);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Move the selection to the next 28 days\r\n if (DateInput.isSelectionRange(selection) && selection.end) {\r\n return {\r\n start: moment(selection.end).add(1, 'day').toDate(),\r\n end: moment(selection.end).add(28, 'days').toDate()\r\n };\r\n }\r\n\r\n // This shouldn't happen since the next stepper is disabled if the selection only has one date.\r\n // Just return the selection as-is in this case.\r\n return selection;\r\n }\r\n\r\n getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Move the selection to the previous 28 days\r\n if (DateInput.isSelectionRange(selection) && selection.start) {\r\n return {\r\n start: moment(selection.start).subtract(28, 'days').toDate(),\r\n end: moment(selection.start).subtract(1, 'day').toDate()\r\n };\r\n }\r\n\r\n // This shouldn't happen since the previous stepper is disabled if the selection only has one date.\r\n // Just return the selection as-is in this case.\r\n return selection;\r\n }\r\n}\r\n","import moment from \"moment\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategy-base\";\r\nimport { RangeSelectionStrategy } from \"./range-selection-strategy\";\r\n\r\n/**\r\n * Selection strategy for the 'last 7 days' selection mode.\r\n */\r\nexport class Last7DaysSelectionStrategy extends DateInputSelectionStrategyBase {\r\n public readonly selectionViewMode: Calendar.ViewMode = 'day';\r\n public readonly validViewModes: Calendar.ViewMode[] = ['day', 'month', 'year'];\r\n public readonly showSecondaryTextbox = true;\r\n public readonly showSecondaryCalendar = false;\r\n\r\n constructor(\r\n private rangeStrategy: RangeSelectionStrategy\r\n ) {\r\n super();\r\n }\r\n\r\n formatSelection(value?: DateInput.Selection | null): DateInput.TextboxGroup['value'] {\r\n // Delegate to the range strategy for formatting since the logic is the same\r\n return this.rangeStrategy.formatSelection(value);\r\n }\r\n\r\n parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null {\r\n let start = this.parseString(value.textbox, parseFormats, opts);\r\n let end = this.parseString(value.textbox2, parseFormats, opts);\r\n\r\n if (start && end) {\r\n // Even if both dates are provided, it's possible that they don't match a 7-day range\r\n // Update the start and end dates to match a 7-day range, keying off the end date if parseFromEnd is true\r\n // parseFromEnd is true when a date is being entered from the end date textbox\r\n if (opts?.parseFromEnd) {\r\n start = moment(end).subtract(6, 'days').toDate();\r\n } else {\r\n end = moment(start).add(6, 'days').toDate();\r\n }\r\n }\r\n\r\n // If the start date is not provided, we'll use the end date to calculate the start date\r\n if (!start && end && !opts?.preventAutoComplete) {\r\n start = moment(end).subtract(6, 'days').toDate();\r\n }\r\n\r\n // If the end date is not provided, we'll use the start date to calculate the end date\r\n if (!end && start && !opts?.preventAutoComplete) {\r\n end = moment(start).add(6, 'days').toDate();\r\n }\r\n\r\n if (!start && !end) {\r\n return null;\r\n } else {\r\n return { start, end };\r\n }\r\n }\r\n\r\n getSelectionFromDate(date: Date): DateInput.Selection | null {\r\n // Base the selection on the given date, moving back 6 days\r\n return {\r\n start: moment(date).subtract(6, 'days').toDate(),\r\n end: date\r\n };\r\n }\r\n\r\n getNewSelectionFromExisting(previousSelection?: DateInput.Selection | null): DateInput.Selection | null {\r\n if (DateInput.isSelectionRange(previousSelection)) {\r\n // If we don't have an end date, create the new selection based on the start date forwards\r\n if (!previousSelection.end && previousSelection.start) {\r\n return {\r\n start: previousSelection.start,\r\n end: moment(previousSelection.start).add(6, 'days').toDate()\r\n };\r\n // Otherwise, create the new selection based on the end date backwards\r\n } else if (previousSelection.end) {\r\n return this.getSelectionFromDate(previousSelection.end);\r\n }\r\n // If we only have a single date, create the new selection based on that date backwards\r\n } else if (DateInput.isSelectionSingleDate(previousSelection)) {\r\n return this.getSelectionFromDate(previousSelection);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Shift the range forward by 7 days\r\n if (DateInput.isSelectionRange(selection) && selection.end) {\r\n return {\r\n start: moment(selection.end).add(1, 'day').toDate(),\r\n end: moment(selection.end).add(7, 'days').toDate()\r\n };\r\n }\r\n\r\n // This shouldn't happen since the next stepper is disabled if the selection only has one date.\r\n // Just return the selection as-is in this case.\r\n return selection;\r\n }\r\n\r\n getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Shift the range back 7 days\r\n if (DateInput.isSelectionRange(selection) && selection.start) {\r\n return {\r\n start: moment(selection.start).subtract(7, 'days').toDate(),\r\n end: moment(selection.start).subtract(1, 'day').toDate()\r\n };\r\n }\r\n\r\n // This shouldn't happen since the previous stepper is disabled if the selection only has one date.\r\n // Just return the selection as-is in this case.\r\n return selection;\r\n }\r\n}\r\n","import moment from \"moment\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategy-base\";\r\n\r\n/**\r\n * Selection strategy for the 'month' selection mode.\r\n */\r\nexport class MonthSelectionStrategy extends DateInputSelectionStrategyBase {\r\n public readonly selectionViewMode: Calendar.ViewMode = 'month';\r\n public readonly validViewModes: Calendar.ViewMode[] = ['month', 'year'];\r\n public readonly showSecondaryTextbox = false;\r\n public readonly showSecondaryCalendar = false;\r\n\r\n formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'] {\r\n if (!selection) {\r\n return { textbox: null, textbox2: null };\r\n }\r\n\r\n // We only need one date in the range to format since it only spans one month\r\n // A single date selection shouldn't happen in this mode but it's simple enough to handle\r\n const date = DateInput.isSelectionRange(selection) ? selection.start : selection;\r\n return {\r\n textbox: moment(date).format('MMM, YYYY'),\r\n textbox2: null\r\n };\r\n }\r\n\r\n parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null {\r\n // Only one textbox is used in this mode\r\n const date = this.parseString(value.textbox, parseFormats, opts);\r\n\r\n if (!date) {\r\n return null;\r\n }\r\n\r\n return this.getSelectionFromDate(date);\r\n }\r\n\r\n getSelectionFromDate(date: Date): DateInput.Selection | null {\r\n return {\r\n start: moment(date).startOf('month').toDate(),\r\n end: moment(date).endOf('month').toDate()\r\n };\r\n }\r\n\r\n getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null {\r\n if (DateInput.isSelectionRange(previousSelection)) {\r\n // We'll use the existing selection's end date and fall back to the start date if it's not available\r\n const date = previousSelection.end || previousSelection.start;\r\n if (date) {\r\n return this.getSelectionFromDate(date);\r\n }\r\n } else if (DateInput.isSelectionSingleDate(previousSelection)) {\r\n // If the previous selection was a single date, make the range that month\r\n return this.getSelectionFromDate(previousSelection);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Move the selection to the next month\r\n if (DateInput.isSelectionRange(selection) && selection.start) { \r\n const date = moment(selection.start).add(1, 'month');\r\n return this.getSelectionFromDate(date.toDate());\r\n }\r\n\r\n // This shouldn't happen since the next stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n\r\n getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Move the selection to the previous month\r\n if (DateInput.isSelectionRange(selection) && selection.start) {\r\n const date = moment(selection.start).subtract(1, 'month');\r\n return this.getSelectionFromDate(date.toDate());\r\n }\r\n\r\n // This shouldn't happen since the previous stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n}\r\n","import moment from \"moment\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategy-base\";\r\n\r\n/**\r\n * Selection strategy for the 'month' selection mode.\r\n */\r\nexport class QuarterSelectionStrategy extends DateInputSelectionStrategyBase {\r\n public readonly selectionViewMode: Calendar.ViewMode = 'quarter';\r\n public readonly validViewModes: Calendar.ViewMode[] = ['quarter', 'year'];\r\n public readonly showSecondaryTextbox = false;\r\n public readonly showSecondaryCalendar = false;\r\n\r\n formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'] {\r\n // Format the the quarter range as \"MMM–MMM, YYYY\"\r\n // We only have one textbox in this mode\r\n if (DateInput.isSelectionRange(selection)) {\r\n const start = moment(selection.start).format('MMM');\r\n const end = moment(selection.end).format('MMM');\r\n const year = moment(selection.end).format('YYYY');\r\n return {\r\n textbox: `${start}–${end}, ${year}`,\r\n textbox2: null\r\n };\r\n }\r\n \r\n // This shouldn't happen since the selection should always be a range in quarter mode\r\n return { textbox: null, textbox2: null };\r\n }\r\n\r\n parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null {\r\n // Only one textbox is used in this mode\r\n const date = this.parseString(value.textbox, parseFormats, opts);\r\n \r\n if (!date) {\r\n return null;\r\n }\r\n\r\n return this.getSelectionFromDate(date);\r\n }\r\n\r\n getSelectionFromDate(date: Date): DateInput.Selection | null {\r\n return {\r\n start: moment(date).startOf('quarter').toDate(),\r\n end: moment(date).endOf('quarter').toDate()\r\n };\r\n }\r\n\r\n getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null {\r\n if (DateInput.isSelectionRange(previousSelection)) {\r\n // Base the quarter range off of the existing selection's end date, falling back to the start date\r\n const date = previousSelection.end || previousSelection.start;\r\n if (date) {\r\n return this.getSelectionFromDate(date);\r\n }\r\n } else if (DateInput.isSelectionSingleDate(previousSelection)) {\r\n // If the previous selection was a single date, make the range that quarter\r\n return this.getSelectionFromDate(previousSelection);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Move the selection to the next quarter\r\n if (DateInput.isSelectionRange(selection) && selection.start) {\r\n const date = moment(selection.start).add(1, 'quarter');\r\n return this.getSelectionFromDate(date.toDate());\r\n }\r\n\r\n // This shouldn't happen since the next stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n\r\n getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // Move the selection to the previous quarter\r\n if (DateInput.isSelectionRange(selection) && selection.start) {\r\n const date = moment(selection.start).subtract(1, 'quarter');\r\n return this.getSelectionFromDate(date.toDate());\r\n }\r\n\r\n // This shouldn't happen since the previous stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n}\r\n","import moment from \"moment\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategy-base\";\r\n\r\n/**\r\n * Selection strategy for the 'range' selection mode.\r\n */\r\nexport class RangeSelectionStrategy extends DateInputSelectionStrategyBase {\r\n public readonly selectionViewMode: Calendar.ViewMode = 'day';\r\n public readonly validViewModes: Calendar.ViewMode[] = ['day', 'month', 'year'];\r\n public readonly showSecondaryTextbox = true;\r\n public readonly showSecondaryCalendar = true;\r\n\r\n formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'] {\r\n if (!selection) {\r\n return { textbox: null, textbox2: null };\r\n }\r\n\r\n // We use the 'll' moment medium format here to make sure the formatted date is formatted according to the user's locale\r\n if (DateInput.isSelectionSingleDate(selection)) {\r\n return { textbox: moment(selection).format('ll'), textbox2: null };\r\n } else {\r\n const start = selection.start ? moment(selection.start).format('ll') : null;\r\n const end = selection.end ? moment(selection.end).format('ll') : null;\r\n\r\n return { textbox: start, textbox2: end };\r\n }\r\n }\r\n\r\n parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null {\r\n let start = this.parseString(value.textbox, parseFormats, opts);\r\n let end = this.parseString(value.textbox2, parseFormats, opts);\r\n\r\n // If the start date is after the end date, we need to clear out the invalid date. This is different from the last 7/28 days strategies\r\n // because we don't have a fixed range to automatically adjust the dates to. If the user is changing the begin date or end date and ends\r\n // up crossing the other date, we should clear out the date that's not being changed so that the user can enter a valid range using the\r\n // begin/end date they just entered.\r\n if (start && end && moment(start).isAfter(end)) {\r\n if (opts?.parseFromEnd) {\r\n start = null;\r\n } else {\r\n end = null;\r\n }\r\n }\r\n\r\n if (!start && !end) {\r\n return null;\r\n } else {\r\n return { start, end };\r\n }\r\n }\r\n\r\n getSelectionFromDate(date: Date, existingSelection: DateInput.Selection | null): DateInput.Selection | null {\r\n if (DateInput.isSelectionRange(existingSelection)) {\r\n const { start, end } = existingSelection;\r\n if (start && !end) {\r\n // If the selected date is before the existing start date, set it as the new start date and use the existing start date as the end date\r\n return moment(date).isBefore(start) ? { start: date, end: start } : { start, end: date };\r\n }\r\n if (end && !start) {\r\n // If the selected date is after the existing end date, set it as the new end date and use the existing end date as the start date\r\n return moment(date).isBefore(end) ? { start: date, end } : { start: end, end: date };\r\n }\r\n } else if (DateInput.isSelectionSingleDate(existingSelection)) {\r\n // If the selected date is before the existing date, set it as the new start date and use the existing date as the end date\r\n return moment(date).isBefore(existingSelection) ? { start: date, end: existingSelection } : { start: existingSelection, end: date };\r\n }\r\n\r\n // If no selection exists or we already have a complete selection, start a new one with the selected date as the start date.\r\n return { start: date, end: null };\r\n }\r\n\r\n getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null {\r\n if (DateInput.isSelectionRange(previousSelection)) {\r\n // If we have a range, just return it as is. We don't have a fixed range to adjust the dates to.\r\n // Even if it's incomplete, the user will still be able to select the remaining date.\r\n return previousSelection;\r\n } else if (DateInput.isSelectionSingleDate(previousSelection)) {\r\n // If we have a single date selection, use it as the start date for the new one.\r\n return { start: previousSelection, end: null };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getSelectionForQuickSelectDate(date: Date, existingSelection?: DateInput.Selection | null): DateInput.Selection | null {\r\n // If we have a valid range, we'll shift the range to the date provided, using it as the end date\r\n // The new selection will have the same length as the previous.\r\n if (DateInput.isSelectionRange(existingSelection) && existingSelection.start && existingSelection.end) {\r\n const length = moment(existingSelection.end).diff(existingSelection.start, 'days');\r\n return {\r\n start: moment(date).subtract(length, 'days').toDate(),\r\n end: date\r\n };\r\n }\r\n\r\n // If we only have a single date, we'll use the date provided as the end date.\r\n // The user will be able to select the start date.\r\n return { start: null, end: date };\r\n }\r\n\r\n getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // We can only determine the next selection if we have a valid range\r\n if (DateInput.isSelectionRange(selection) && selection.start && selection.end) {\r\n // Shift the range forward by the number of days between the start and end dates\r\n const length = moment(selection.end).diff(selection.start, 'days');\r\n return {\r\n start: moment(selection.end).add(1, 'days').toDate(),\r\n end: moment(selection.end).add(1 + length, 'days').toDate()\r\n };\r\n }\r\n\r\n // This shouldn't happen since the next stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n\r\n getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null {\r\n // We can only determine the previous selection if we have a valid range\r\n if (DateInput.isSelectionRange(selection) && selection.start && selection.end) {\r\n // Shift the range back by the number of days between the start and end dates\r\n const length = moment(selection.end).diff(selection.start, 'days');\r\n return {\r\n start: moment(selection.start).subtract(1 + length, 'days').toDate(),\r\n end: moment(selection.start).subtract(1, 'days').toDate()\r\n };\r\n }\r\n\r\n // This shouldn't happen since the previous stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n\r\n getPrimaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View {\r\n let viewDate: Date;\r\n if (DateInput.isSelectionRange(selection)) {\r\n let start = selection.start ? moment(selection.start) : null;\r\n let end = selection.end ? moment(selection.end) : null;\r\n\r\n // Since we're in range mode, the primary calendar is mostly concerned with the start date\r\n if (start) {\r\n // If we have a start date in the selection and it's before the min date, shift the view to the min date.\r\n if (start.isBefore(minDate, 'month')) {\r\n viewDate = minDate;\r\n // If the start is after the max date, shift the view to the max date.\r\n } else if (start.isSameOrAfter(maxDate, 'month')) {\r\n // the secondary calendar will show the max date month.\r\n // The primary calendar will show the month before the max date.\r\n viewDate = moment(maxDate).subtract(1, 'month').toDate();\r\n } else {\r\n viewDate = start.toDate();\r\n }\r\n } else if (end && end.isSameOrBefore(minDate, 'month')) {\r\n // If we don't have a start date, and the end date is the same month or before the min date, shift the view to the min date.\r\n viewDate = minDate;\r\n } else if (end && end.isSameOrBefore(new Date(), 'month')) {\r\n // If we don't have a start date, and the end date is the same month or before the current month, shift the view to the month before the end\r\n viewDate = moment(end).subtract(1, 'month').toDate();\r\n } else {\r\n // Otherwise, show the current month.\r\n viewDate = new Date();\r\n }\r\n } else {\r\n viewDate = selection || new Date();\r\n }\r\n\r\n // If the current calendar view mode is valid for the selection mode, use it, otherwise use the selection view mode\r\n // This prevents the calendar from changing view modes as the user types/blurs the textboxes as long as the view mode is valid\r\n const viewMode = this.validViewModes.includes(currentView.mode) ? currentView.mode : this.selectionViewMode;\r\n\r\n return { mode: viewMode, date: viewDate };\r\n }\r\n\r\n getSecondaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View {\r\n let viewDate: Date;\r\n\r\n if (DateInput.isSelectionRange(selection)) {\r\n let start = selection.start ? moment(selection.start) : null;\r\n let end = selection.end ? moment(selection.end) : null;\r\n\r\n // The secondary calendar is primarily concerned with the end date in the selection.\r\n if (end) {\r\n if (end.isAfter(maxDate, 'month')) {\r\n // If the end date is after the max date, shift the view to the max date.\r\n viewDate = maxDate;\r\n } else if (end.isSameOrBefore(minDate, 'month')) {\r\n // If the end date is the same month or before the min date, shift the view to show\r\n // the month after the min date. The primary calendar will show the min date month.\r\n viewDate = moment(minDate).add(1, 'month').toDate();\r\n } else {\r\n // Otherwise, show the end date month.\r\n viewDate = end.toDate();\r\n }\r\n } else if (start && start.isSameOrAfter(maxDate, 'month')) {\r\n // If we don't have an end date, and the start date is after the max date, show the max date month\r\n viewDate = maxDate;\r\n } else if (start && start.isSameOrAfter(new Date(), 'month')) {\r\n // If we don't have an end date, and the start date is on or after the current month,\r\n // show the month after the start date.\r\n viewDate = moment(start).add(1, 'month').toDate();\r\n } else {\r\n // Otherwise, show the current month.\r\n viewDate = new Date();\r\n }\r\n } else {\r\n viewDate = selection || new Date();\r\n }\r\n\r\n // If the current calendar view mode is valid for the selection mode, use it, otherwise use the selection view mode\r\n // This prevents the calendar from changing view modes as the user types/blurs the textboxes as long as the view mode is valid\r\n const viewMode = this.validViewModes.includes(currentView.mode) ? currentView.mode : this.selectionViewMode;\r\n\r\n return { mode: viewMode, date: viewDate };\r\n }\r\n}\r\n","import moment from \"moment\";\r\nimport { Calendar } from \"../../calendar/calendar.types\";\r\nimport { DateInput } from \"../date-input.types\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategy-base\";\r\n\r\n/**\r\n * Selection strategy for the 'year' selection mode.\r\n */\r\nexport class YearSelectionStrategy extends DateInputSelectionStrategyBase {\r\n public readonly selectionViewMode: Calendar.ViewMode = 'year';\r\n public readonly validViewModes: Calendar.ViewMode[] = ['year'];\r\n public readonly showSecondaryTextbox = false;\r\n public readonly showSecondaryCalendar = false;\r\n\r\n formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'] {\r\n if (!selection) {\r\n return { textbox: null, textbox2: null };\r\n }\r\n\r\n // Only one date is needed for formatting since the ranges span a single year.\r\n // There shouldn't be any case where there's only a single date but it's covered anyway.\r\n const date = DateInput.isSelectionRange(selection) ? selection.start : selection;\r\n return { textbox: moment(date).format('YYYY'), textbox2: null };\r\n }\r\n\r\n parseString(value: string | null | undefined, parseFormats: string[], opts?: DateInput.ParsingOptions): Date | null {\r\n // Including 'YY' and 'YYYY' as valid formats for year input. These aren't included in the default parse\r\n // formats because they cause issues with the default date parsing.\r\n return super.parseString(value, ['YY', 'YYYY', ...parseFormats], opts);\r\n }\r\n\r\n parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null {\r\n // Only a single textbox is used in year mode\r\n const date = this.parseString(value.textbox, parseFormats, opts);\r\n\r\n if (!date) {\r\n return null;\r\n }\r\n\r\n return this.getSelectionFromDate(date);\r\n }\r\n\r\n getSelectionFromDate(date: Date): DateInput.Selection | null {\r\n return {\r\n start: moment(date).startOf('year').toDate(),\r\n end: moment(date).endOf('year').toDate()\r\n };\r\n }\r\n\r\n getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null {\r\n if (DateInput.isSelectionRange(previousSelection)) {\r\n // Base the year range off of the existing selection's end date, falling back to the start date\r\n const date = previousSelection.end || previousSelection.start;\r\n if (date) {\r\n return this.getSelectionFromDate(date);\r\n }\r\n } else if (DateInput.isSelectionSingleDate(previousSelection)) {\r\n // If the previous selection was a single date, make the range that year\r\n return this.getSelectionFromDate(previousSelection);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n getSelectionForQuickSelectDate(date: Date): DateInput.Selection | null {\r\n return this.getSelectionFromDate(date);\r\n }\r\n\r\n getNextSelection(selection: DateInput.Selection): DateInput.Selection | null {\r\n // Move the selection to the next year\r\n if (DateInput.isSelectionRange(selection) && selection.start) {\r\n const date = moment(selection.start).add(1, 'year');\r\n return this.getSelectionFromDate(date.toDate());\r\n }\r\n\r\n // This shouldn't happen since the next stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n\r\n getPreviousSelection(selection: DateInput.Selection): DateInput.Selection | null {\r\n // Move the selection to the previous year\r\n if (DateInput.isSelectionRange(selection) && selection.start) {\r\n const date = moment(selection.start).subtract(1, 'year');\r\n return this.getSelectionFromDate(date.toDate());\r\n }\r\n \r\n // This shouldn't happen since the previous stepper is disabled if the selection only has one date.\r\n // If it does, just return the selection as-is.\r\n return selection;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, of } from 'rxjs';\r\n\r\n\r\nexport interface DatePreferenceContainer {\r\n preference: {dateFormat: string|null|undefined, timeFormat: string|null|undefined} | null | undefined\r\n}\r\n\r\n@Injectable({\r\nprovidedIn: 'root'\r\n})\r\nexport class UserPreferenceService {\r\n\r\n public getPreferences(): Observable<DatePreferenceContainer> { \r\n return of({preference:{dateFormat: 'MM/DD/YYYY', timeFormat: 'h:mm:ss a'}});\r\n }\r\n \r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DateTimeHelper } from '../../../core/date-time-helper';\r\nimport { UserPreferenceService } from '../../user-preference.service';\r\nimport moment from 'moment';\r\n\r\nexport type DateDisplay = Date | moment.Moment | string | null;\r\n\r\n/**\r\n * Format a date to the user's preference for display\r\n */\r\n@Pipe({name: 'dateDisplay'})\r\nexport class DateDisplayPipe implements PipeTransform {\r\n\r\n constructor(private userPreferenceService: UserPreferenceService) { }\r\n\r\n private lastFormatString: string = 'MM/DD/YYYY';\r\n\r\n /**\r\n * Format a date for display, accounting for user's display preferences.\r\n * \r\n * If {@see date} is null or undefined, or the end of time, returns empty string\r\n */\r\n transform(date?: DateDisplay, showEndOfTime?: boolean, showTime?: boolean, showSeconds?: boolean): string {\r\n let display: string = '';\r\n let formatString: string = '';\r\n \r\n if (date && moment(date).isValid() && (showEndOfTime || !DateTimeHelper.isEndOfTime(date))) {\r\n\r\n // use user-preferred formats\r\n this.userPreferenceService.getPreferences().subscribe(result => {\r\n\r\n //if preferences exist then format date to users preference \r\n //otherwise use the last user preference\r\n if (result.preference) {\r\n formatString = result.preference!.dateFormat!;\r\n if (showTime) {\r\n let timeFormat: string = result.preference!.timeFormat!;\r\n if (!showSeconds) {\r\n timeFormat = timeFormat.replace(':ss', '');\r\n }\r\n formatString += ` ${timeFormat}`;\r\n }\r\n this.lastFormatString = formatString;\r\n }\r\n });\r\n display = moment(date).format(this.lastFormatString);\r\n }\r\n return display;\r\n }\r\n\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { FormControl, FormGroup } from \"@angular/forms\";\r\nimport { DateDisplayPipe } from \"../../shared/display/pipes/date-display.pipe\";\r\nimport { DateInputSelectionStrategyBase } from \"./date-input-selection-strategies/date-input-selection-strategy-base\";\r\nimport { DaySelectionStrategy } from \"./date-input-selection-strategies/day-selection-strategy\";\r\nimport { Last28DaysSelectionStrategy } from \"./date-input-selection-strategies/last-28-days-selection-strategy\";\r\nimport { Last7DaysSelectionStrategy } from \"./date-input-selection-strategies/last-7-days-selection-strategy\";\r\nimport { MonthSelectionStrategy } from \"./date-input-selection-strategies/month-selection-strategy\";\r\nimport { QuarterSelectionStrategy } from \"./date-input-selection-strategies/quarter-selection-strategy\";\r\nimport { RangeSelectionStrategy } from \"./date-input-selection-strategies/range-selection-strategy\";\r\nimport { YearSelectionStrategy } from \"./date-input-selection-strategies/year-selection-strategy\";\r\n\r\nexport namespace DateInput {\r\n export type FormModel = FormControl<Selection | null>;\r\n\r\n export type TextboxGroup = FormGroup<{\r\n textbox: FormControl<string | null>;\r\n textbox2: FormControl<string | null>;\r\n }>;\r\n\r\n export type Range = { start: Date | null; end: Date | null };\r\n\r\n export type Selection = Date | Range;\r\n\r\n export type SelectionMode = 'day' | 'last7Days' | 'last28Days' | 'month' | 'quarter' | 'year' | 'range';\r\n\r\n export function isSelectionSingleDate(selection?: Selection | null): selection is Date {\r\n return selection instanceof Date || typeof selection === 'string';\r\n }\r\n\r\n export function isSelectionRange(selection?: Selection | null): selection is Range {\r\n return !!selection && !isSelectionSingleDate(selection);\r\n }\r\n\r\n export type ParsingOptions = {\r\n /**\r\n * When configured, the parser will shift the parsed date to the current year if the date is below this date.\r\n * This is used to prevent the calendars from showing unhelpful dates in the distant past before the user finishes typing in the date.\r\n */\r\n shiftToCurrentYearIfBelow?: Date;\r\n /**\r\n * When true, the range selection modes (range, last7Days, last28Days) will key off of the end date string to determine the selection range.\r\n */\r\n parseFromEnd?: boolean;\r\n /**\r\n * Stops the parser from automatically completing the date range when there is only a start or an end date.\r\n * Only applicable to the fixed length range selection modes (last7Days, last28Days).\r\n */\r\n preventAutoComplete?: boolean;\r\n };\r\n\r\n @Injectable()\r\n export class SelectionStrategies implements Record<SelectionMode, DateInputSelectionStrategyBase> {\r\n constructor(\r\n private dateDisplayPipe: DateDisplayPipe\r\n ) { }\r\n \r\n private _range = new RangeSelectionStrategy();\r\n public get range() { return this._range; }\r\n \r\n private _day = new DaySelectionStrategy(this.dateDisplayPipe);\r\n public get day() { return this._day; }\r\n \r\n private _last7Days = new Last7DaysSelectionStrategy(this._range);\r\n public get last7Days() { return this._last7Days; }\r\n \r\n private _last28Days = new Last28DaysSelectionStrategy(this._range);\r\n public get last28Days() { return this._last28Days; }\r\n \r\n private _month = new MonthSelectionStrategy();\r\n public get month() { return this._month; }\r\n \r\n private _quarter = new QuarterSelectionStrategy();\r\n public get quarter() { return this._quarter; }\r\n \r\n public _year = new YearSelectionStrategy();\r\n public get year() { return this._year; }\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, HostBinding, Input, OnChanges } from '@angular/core';\r\nimport moment from 'moment';\r\nimport { DateTimeHelper } from '../../core/date-time-helper';\r\nimport { DateInput } from '../date-input/date-input.types';\r\nimport { Calendar } from './calendar.types';\r\n\r\n@Component({\r\n selector: 'button[ec-calendar-item]',\r\n template: '<ng-content></ng-content>',\r\n styleUrls: ['./calendar-item.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CalendarItemComponent implements OnChanges {\r\n\r\n @Input() public item?: Calendar.Item;\r\n @Input() public selection?: DateInput.Selection;\r\n @Input() public view: Calendar.View = { mode: 'day', date: new Date() };\r\n @Input() public minDate: Date = DateTimeHelper.minDatePickerDate;\r\n @Input() public maxDate: Date = DateTimeHelper.maxDatePickerDate;\r\n\r\n @HostBinding('class.is-today') public today: boolean = false;\r\n @HostBinding('class.is-selected') public selected: boolean = false;\r\n @HostBinding('class.is-outside-active-month') public outsideActiveMonth: boolean = false;\r\n @HostBinding('class.is-hidden') public hidden: boolean = false;\r\n @HostBinding('attr.disabled') public get disabled() {\r\n return this.hidden || undefined;\r\n }\r\n\r\n constructor() { }\r\n\r\n ngOnChanges(): void {\r\n if (this.view.mode !== 'day') {\r\n this.today = false;\r\n this.outsideActiveMonth = false;\r\n } else {\r\n this.today = moment(this.item?.date).isSame(moment(), 'day');\r\n this.outsideActiveMonth = !moment(this.item?.date).isSame(this.view.date, 'month');\r\n }\r\n\r\n if (this.item?.date) {\r\n this.hidden = this.isHidden(this.item.date, this.minDate, this.maxDate, this.view.mode);\r\n } else {\r\n this.hidden = true;\r\n }\r\n \r\n this.selected = this.isSelected(this.item?.date, this.selection, this.view.mode);\r\n }\r\n\r\n private isSelected(date?: Date, selection?: DateInput.Selection, view?: Calendar.ViewMode): boolean {\r\n if (!date || !selection) {\r\n return false;\r\n }\r\n\r\n if (DateInput.isSelectionSingleDate(selection)) {\r\n return moment(date).isSame(selection, view);\r\n } else {\r\n if (selection.start && !selection.end) {\r\n return moment(date).isSame(selection.start, view);\r\n } else if (!selection.start && selection.end) {\r\n return moment(date).isSame(selection.end, view);\r\n } else if (selection.start && selection.end) {\r\n return moment(date).isBetween(selection.start, selection.end, view, '[]');\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private isHidden(date: Date, minDate: Date, maxDate: Date, view: Calendar.ViewMode): boolean {\r\n return moment(date).isBefore(minDate, view) || moment(date).isAfter(maxDate, view);\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { range } from 'lodash';\r\nimport moment from 'moment';\r\nimport { DateTimeHelper } from '../../core/date-time-helper';\r\nimport { DateInput } from '../date-input/date-input.types';\r\nimport { Calendar } from './calendar.types';\r\n\r\n@Component({\r\n selector: 'ec-calendar',\r\n templateUrl: './calendar.component.html',\r\n styleUrls: ['./calendar.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CalendarComponent implements OnChanges, OnInit {\r\n\r\n @HostBinding('attr.id')\r\n @Input() public id: string = 'calendar';\r\n\r\n @Input() selection: DateInput.Selection | null = null;\r\n @Input() selectionMode: DateInput.SelectionMode = 'day';\r\n\r\n @Input() minDate: Date = DateTimeHelper.minDatePickerDate;\r\n @Input() maxDate: Date = DateTimeHelper.maxDatePickerDate;\r\n\r\n @Output() dateSelected = new EventEmitter<Date>();\r\n\r\n /** Determines the current view of the calendar. */\r\n @Input() public view: Calendar.View = { mode: 'day', date: new Date() };\r\n @Output() public viewChange = new EventEmitter<Calendar.View>();\r\n\r\n /** Month of the active date displayed in the header buttons. */\r\n public month?: string;\r\n\r\n /** Year of the active date displayed in the header buttons. */\r\n public year?: string;\r\n\r\n /** Range of years to display in the year view. */\r\n public yearRange?: string;\r\n\r\n /** Array of calendar item rows to display in the calendar. */\r\n public calendarItems: Calendar.Item[][] = [];\r\n\r\n /** Weekday labels to show at the top of the calendar in day view. */\r\n public weekDays = moment.weekdaysShort().map(d => d.slice(0, 1));\r\n\r\n public disablePreviousButton: boolean = false;\r\n public disableNextButton: boolean = false;\r\n\r\n // Trackby functions for ngFor loops. These reduce the number of DOM elements that need to be updated when the calendar is re-drawn.\r\n // Without these there are some change-detection issues on the first-time rendering of the calendar.\r\n public trackByDateRow = (index: number, row: Calendar.Item[]) => `${row[0].date.toISOString()}-${row[row.length - 1].date.toISOString()}`;\r\n public trackByDate = (index: number, item: Calendar.Item) => item.date.toISOString();\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.view) {\r\n this.drawCalendar(this.view);\r\n }\r\n\r\n if (changes.minDate || changes.maxDate) {\r\n this.updateNextPreviousStates();\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n if (!this.calendarItems.length) {\r\n this.drawCalendar(this.view);\r\n }\r\n }\r\n\r\n public onNextClick(): void {\r\n // If we're in day view, we're incrementing by month\r\n // In month, quarter, and year views we're incrementing by year\\\r\n const unit = this.view.mode === 'day' ? 'month' : 'year';\r\n // In year view, we're moving by 16 years at a time. Otherwise we're just moving by 1 month/year.\r\n const count = this.view.mode === 'year' ? 16 : 1;\r\n const goToDate = moment(this.view.date).add(count, unit).toDate();\r\n this.drawCalendar({ mode: this.view.mode, date: goToDate });\r\n }\r\n\r\n public onPreviousClick(): void {\r\n // If we're in day view, we're incrementing by month\r\n // In month, quarter, and year views we're incrementing by year\r\n const unit = this.view.mode === 'day' ? 'month' : 'year';\r\n // In year view, we're moving by 16 years at a time. Otherwise we're just moving by 1 month/year.\r\n const count = this.view.mode === 'year' ? 16 : 1;\r\n const goToDate = moment(this.view.date).subtract(count, unit).toDate();\r\n this.drawCalendar({ mode: this.view.mode, date: goToDate });\r\n }\r\n\r\n /** Switches the calendar to month view. */\r\n public onMonthClick(): void {\r\n this.drawCalendar({ mode: 'month', date: this.view.date });\r\n }\r\n\r\n /** Switches the calendar to year view. */\r\n public onYearClick(): void {\r\n this.drawCalendar({ mode: 'year', date: this.view.date });\r\n }\r\n\r\n public onItemSelected(item: Calendar.Item): void {\r\n switch(this.view.mode) {\r\n case 'day':\r\n this.onDaySelected(item);\r\n break;\r\n case 'month':\r\n this.onMonthSelected(item);\r\n break;\r\n case 'quarter':\r\n this.onQuarterSelected(item);\r\n break;\r\n case 'year':\r\n this.onYearSelected(item);\r\n break;\r\n }\r\n }\r\n\r\n private onYearSelected(item: Calendar.Item): void {\r\n // If in year selection mode, emit the calendar item so the date picker can update the selection.\r\n if (this.selectionMode === 'year') {\r\n this.dateSelected.emit(item.date);\r\n // If we're in quarter selection mode, draw the quarter view.\r\n } else if (this.selectionMode === 'quarter') {\r\n this.drawCalendar({ mode: 'quarter', date: item.date });\r\n // All other selection modes should zoom in to the month view when a year is selected.\r\n } else {\r\n this.drawCalendar({ mode: 'month', date: item.date });\r\n }\r\n }\r\n\r\n private onQuarterSelected(item: Calendar.Item): void {\r\n // Quarter view is only accessible when in quarter selection mode,\r\n // so there's no other views to draw from here. Just emit the selected item.\r\n this.dateSelected.emit(item.date);\r\n }\r\n\r\n private onMonthSelected(item: Calendar.Item): void {\r\n // When in month selection mode, emit the selected month item and don't change the view.\r\n if (this.selectionMode === 'month') {\r\n this.dateSelected.emit(item.date);\r\n // Month view is only accessible from day, last7days, last28days, month, and range selection modes.\r\n // If we're not in month selection mode, we need to zoom in to the day view.\r\n } else {\r\n this.drawCalendar({ mode: 'day', date: item.date });\r\n }\r\n }\r\n\r\n private onDaySelected(item: Calendar.Item): void {\r\n // No further views other than day mode. Just emit the selected item.\r\n this.dateSelected.emit(item.date);\r\n }\r\n\r\n private drawCalendar(view: Calendar.View): void {\r\n // If the view has changed, emit the new view.\r\n if (view.date !== this.view.date || view.mode !== this.view.mode) {\r\n this.view = view;\r\n this.viewChange.emit(view);\r\n }\r\n \r\n this.month = moment(this.view.date).format('MMM');\r\n this.year = moment(this.view.date).format('YYYY');\r\n this.calendarItems = this.getCalendarItems(this.view);\r\n\r\n const startYear = this.calendarItems[0][0].date < this.minDate ? this.minDate : this.calendarItems[0][0].date;\r\n const lastItem = this.getLastItem();\r\n const endYear = lastItem.date > this.maxDate ? this.maxDate : lastItem.date;\r\n this.yearRange = `${moment(startYear).format('YYYY')}&ndash;${moment(endYear).format('YYYY')}`;\r\n\r\n this.updateNextPreviousStates();\r\n }\r\n\r\n private getCalendarItems(view: Calendar.View): Calendar.Item[][] {\r\n switch (view.mode) {\r\n case 'day': return this.getDayViewItems(view.date);\r\n case 'month': return this.getMonthViewItems(view.date);\r\n case 'quarter': return this.getQuarterViewItems(view.date);\r\n case 'year': return this.getYearViewItems(view.date);\r\n }\r\n }\r\n\r\n private getDayViewItems(activeDate: Date): Calendar.Item[][] {\r\n // 6 rows of 7 days = 42 days\r\n return range(0, 6).map(r => {\r\n return range(0, 7).map(d => {\r\n // Use the start of the week of the first day of the month.\r\n // This pads out the first week with any days from the previous month.\r\n const date = moment(activeDate).startOf('month').startOf('week').add(r * 7 + d, 'day');\r\n return {\r\n date: date.toDate(),\r\n label: date.format('D')\r\n };\r\n });\r\n });\r\n }\r\n\r\n private getMonthViewItems(activeDate: Date): Calendar.Item[][] {\r\n // 4 rows of 3 months = 12 months\r\n return range(0, 4).map(r => {\r\n return range(0, 3).map(m => {\r\n const date = moment(activeDate).startOf('year').add(r * 3 + m, 'month');\r\n return {\r\n date: date.toDate(),\r\n label: date.format('MMM')\r\n };\r\n });\r\n });\r\n }\r\n\r\n private getQuarterViewItems(activeDate: Date): Calendar.Item[][] {\r\n // 2 rows of 2 quarters = 4 quarters\r\n return range(0, 2).map(r => {\r\n return range(0, 2).map(q => {\r\n const date = moment(activeDate).startOf('year').add(r * 2 + q, 'quarter');\r\n const endDate = moment(date).endOf('quarter');\r\n return {\r\n date: date.toDate(),\r\n label: `${date.format('MMM')}&ndash;${endDate.format('MMM')}`\r\n };\r\n });\r\n });\r\n }\r\n\r\n private getYearViewItems(activeDate: Date): Calendar.Item[][] {\r\n // 4 rows of 4 years = 16 years\r\n return range(0, 4).map(r => {\r\n return range(0, 4).map(y => {\r\n // Subtracting 8 years to put the current active year at the beginning of the 3rd row.\r\n const date = moment(activeDate).startOf('year').subtract(8, 'years').add(r * 4 + y, 'year');\r\n return {\r\n date: date.toDate(),\r\n label: date.format('YYYY')\r\n };\r\n });\r\n });\r\n }\r\n\r\n private updateNextPreviousStates(): void {\r\n // We change the granularity of the min and max date checks based on the current view mode.\r\n // We don't want to disable the next/previous buttons if the min or max date is within the\r\n // next or previous view\r\n const unit = this.view.mode === 'day' ? 'month' : 'year';\r\n\r\n // When in year view, we need to subtract 9 years to determine if we're past the min date.\r\n // The year view is 16 years long, and the current date is the 9th year in the view.\r\n const subCount = this.view.mode === 'year' ? 9 : 1;\r\n if (moment(this.view.date).subtract(subCount, unit).isBefore(this.minDate, unit)) {\r\n this.disablePreviousButton = true;\r\n } else {\r\n this.disablePreviousButton = false;\r\n }\r\n\r\n // When in year view, we need to add 8 years to determine if we're past the max date.\r\n // The year view is 16 years long, and the current date is the 9th year in the view.\r\n const addCount = this.view.mode === 'year' ? 8 : 1;\r\n if (moment(this.view.date).add(addCount, unit).isAfter(this.maxDate, unit)) {\r\n this.disableNextButton = true;\r\n } else {\r\n this.disableNextButton = false;\r\n }\r\n }\r\n\r\n private getLastItem(): Calendar.Item {\r\n const lastRow = this.calendarItems[this.calendarItems.length - 1];\r\n return lastRow[lastRow.length - 1];\r\n }\r\n}\r\n","<header class=\"d-flex align-items-center mt-1 mb-2 px-1\">\r\n <button id=\"{{id}}_prev_button\"\r\n class=\"mr-auto\"\r\n (click)=\"onPreviousClick()\"\r\n [disabled]=\"disablePreviousButton\">\r\n <i class=\"ec-icon icon-angle-down rotate-90\"></i>\r\n </button>\r\n\r\n <button *ngIf=\"view.mode === 'day'\"\r\n id=\"{{id}}_month_button\"\r\n class=\"text-body-1 font-weight-bold\"\r\n (click)=\"onMonthClick()\">\r\n {{month}}\r\n </button>\r\n\r\n <button *ngIf=\"view.mode !== 'year'\"\r\n id=\"{{id}}_year_button\"\r\n class=\"text-body-1 font-weight-bold\"\r\n (click)=\"onYearClick()\">\r\n {{year}}\r\n </button>\r\n\r\n <div id=\"{{id}}_year_range\"\r\n *ngIf=\"view.mode === 'year'\"\r\n class=\"text-body-1 font-weight-bold\"\r\n [innerHTML]=\"yearRange\">\r\n </div>\r\n\r\n <button id=\"{{id}}_next_button\"\r\n class=\"ml-auto\"\r\n (click)=\"onNextClick()\"\r\n [disabled]=\"disableNextButton\">\r\n <i class=\"ec-icon icon-angle-down rotate-270\"></i>\r\n </button>\r\n</header>\r\n\r\n<div *ngIf=\"view.mode === 'day'\"\r\n class=\"mb-1 px-2 d-flex\">\r\n <h3 *ngFor=\"let day of weekDays\"\r\n class=\"text-heading-3 d-flex justify-content-center align-items-center\"\r\n style=\"width: 2rem; height: 1.75rem;\">{{day}}</h3>\r\n</div>\r\n\r\n<div *ngFor=\"let row of calendarItems; last as isLast; trackBy: trackByDateRow\"\r\n class=\"px-2 d-flex {{view.mode}}-view\"\r\n [class.mb-1]=\"!isLast\"\r\n [class.mb-2]=\"isLast\">\r\n <button *ngFor=\"let item of row; trackBy: trackByDate\"\r\n id=\"{{id}}_item_{{item.date | date:'MM_dd_yyyy'}}\"\r\n ec-calendar-item\r\n [item]=\"item\"\r\n [selection]=\"selection\"\r\n [view]=\"view\"\r\n (click)=\"onItemSelected(item)\"\r\n [innerHTML]=\"item.label\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"maxDate\">\r\n </button>\r\n</div>\r\n","import { Injectable } from '@angular/core';\r\nimport { ValidationErrors } from '@angular/forms';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { forkJoin, Observable, lastValueFrom } from 'rxjs';\r\n\r\nimport { TextboxValidatorParameters } from '../controls/textbox/textbox.component';\r\nimport { DateDisplayPipe } from '../shared/display/pipes/date-display.pipe';\r\n\r\n/**\r\n * \"Weak Type\" describing interpolation parameters for NumericBox\r\n */\r\nclass NumericBoxInterpolationParameters {\r\n public precision?: number;\r\n public minValue?: number;\r\n public maxValue?: number;\r\n public minMaxRange?: string;\r\n public maxPrecisionDigits?: number;\r\n}\r\n\r\n/**\r\n * Service to take {@link ValidationErrors} and return meaningful error messages\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ValidationMessageService {\r\n\r\n constructor(\r\n private translate: TranslateService,\r\n private dateDisplayPipe: DateDisplayPipe\r\n ) { }\r\n\r\n\r\n /**\r\n * Get meaningful error messages from {@link ValidationErrors}\r\n */\r\n public getErrorMessages(errors: ValidationErrors | null): Promise<Array<any>> {\r\n\r\n /** Array of observables returned from the TranslateService. */\r\n let translationObservables = new Array<Observable<string>>();\r\n\r\n if (errors !== null) {\r\n\r\n for (var errorKey in errors) {\r\n // it would be nice to have typing on the ValidationErrors\r\n let error = errors[errorKey];\r\n\r\n switch (errorKey) {\r\n case 'email':\r\n translationObservables.push(this.translate.get('InvalidEmailValidationMessage_LC'));\r\n break;\r\n\r\n case 'required':\r\n translationObservables.push(this.translate.get('is required'));\r\n break;\r\n case 'requiredPlural':\r\n translationObservables.push(this.translate.get('RequiredPluralValidationMessage_LC'));\r\n break;\r\n\r\n case 'minlength':\r\n translationObservables.push(this.translate\r\n .get('MinLengthValidationMessage_LC', { minLength: error.requiredLength }));\r\n break;\r\n\r\n case 'maxlength':\r\n translationObservables.push(this.translate\r\n .get(`MaxLengthValidationMessage`, { maxLength: error.requiredLength }));\r\n break;\r\n\r\n case 'pattern':\r\n translationObservables.push(this.translate.get('IncorrectFormat_LC'));\r\n break;\r\n\r\n case 'min':\r\n translationObservables.push(this.translate\r\n .get('MinValueValidationMessage_LC', { minValue: error.min }));\r\n break;\r\n\r\n case 'max':\r\n translationObservables.push(this.translate\r\n .get('MaxValueValidationMessage_LC', { maxValue: error.max }));\r\n break;\r\n\r\n case 'zipCodeInvalidFormat':\r\n translationObservables.push(this.translate.get('must be 5–9 numbers'));\r\n break;\r\n\r\n case 'postalCodeInvalidFormat':\r\n translationObservables.push(this.translate\r\n .get('must be 6 characters, alternating letters and numbers'));\r\n break;\r\n\r\n case 'zipCodeNotFound':\r\n translationObservables.push(this.translate\r\n .get('ZipCodeNotFoundValidationMessage_LC'));\r\n break;\r\n\r\n // Custom validator from the NumericboxComponent\r\n case 'numericbox':\r\n translationObservables.push(this.getNumericBoxValidationMessages(error));\r\n break;\r\n\r\n case 'addnew':\r\n translationObservables.push(this.translate.get('CouldNotBeAddedValidationMessage_LC'));\r\n break;\r\n\r\n // Kendo datepicker min error\r\n case 'minError':\r\n case 'minDate':\r\n var value = this.dateDisplayPipe.transform(error.minValue);\r\n translationObservables.push(this.translate\r\n .get('MinValueValidationMessage_LC', { minValue: value }));\r\n break;\r\n\r\n // Kendo datepicker max error\r\n case 'maxError':\r\n case 'maxDate':\r\n var value = this.dateDisplayPipe.transform(error.maxValue, true);\r\n translationObservables.push(this.translate\r\n .get('MaxValueValidationMessage_LC', { maxValue: value }));\r\n break;\r\n\r\n // Custom validator for the DateRangeComponent\r\n case 'dateRange':\r\n translationObservables.push(this.translate.get('DateRangeValidationMessage_LC'));\r\n break;\r\n\r\n case 'password':\r\n translationObservables.push(this.translate.get('PasswordValidationMessage_LC'));\r\n break;\r\n\r\n // Custom validator from the TextboxComponent\r\n case 'textbox':\r\n translationObservables.push(this.getTextBoxValidationMessages(error));\r\n break;\r\n\r\n case 'notUnique':\r\n translationObservables.push(this.translate.get('MustBeUnique_LC'));\r\n break;\r\n\r\n case 'json':\r\n translationObservables.push(this.translate.get('JsonValidationMessage_SC'));\r\n break;\r\n\r\n case 'passwordInvalid':\r\n translationObservables.push(this.translate.get('PasswordInvalidValidationMessage_LC'));\r\n break;\r\n\r\n case 'domain':\r\n translationObservables.push(this.translate.get('DomainValidationMessage_SC'));\r\n break;\r\n case 'invalidFile':\r\n case 'invalidFormula':\r\n translationObservables.push(this.translate.get('is invalid'));\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n if (translationObservables.length > 0) {\r\n\r\n // forkJoin returns an Observable that emits when all its observables complete.\r\n // When forkjoin emits, it emits an array containing the last value returned from\r\n // each of its observables.\r\n // @see https://www.learnrxjs.io/operators/combination/forkjoin.html\r\n // We convert this to a promise so the form controls can display the error messages\r\n // asynchronously.\r\n return lastValueFrom(forkJoin(translationObservables));\r\n }\r\n }\r\n\r\n return Promise.resolve(new Array<string>());\r\n }\r\n\r\n\r\n /**\r\n * Get proper validation message for @see NumericBoxComponent\r\n */\r\n private getNumericBoxValidationMessages(error: any): Observable<any> {\r\n let interpolationParameters: NumericBoxInterpolationParameters = {};\r\n let type: string = 'Integer';\r\n\r\n if (error.decimals) {\r\n interpolationParameters.precision = error.decimals;\r\n type = 'Decimal';\r\n }\r\n\r\n if (error.min !== undefined && error.max !== undefined) {\r\n interpolationParameters.minValue = error.min;\r\n interpolationParameters.maxValue = error.max;\r\n return this.translate.get(`${type}BetweenValidationMessage_LC`, interpolationParameters);\r\n }\r\n\r\n if (error.min !== undefined) {\r\n interpolationParameters.minValue = error.min;\r\n return this.translate.get(`${type}MinValidationMessage_LC`, interpolationParameters);\r\n }\r\n\r\n if (error.max !== undefined) {\r\n interpolationParameters.maxValue = error.max;\r\n return this.translate.get(`${type}MaxValidationMessage_LC`, interpolationParameters);\r\n }\r\n\r\n if (error.maxPrecisionDigits) {\r\n interpolationParameters.maxPrecisionDigits = error.maxPrecisionDigits;\r\n return this.translate.get('MaxPrecisionDigitsValidationMessage_LC', interpolationParameters);\r\n }\r\n\r\n if (error.decimals) {\r\n return this.translate.get('DecimalValidationMessage_LC', interpolationParameters);\r\n }\r\n\r\n return this.translate.get('IncorrectFormat_LC');\r\n }\r\n\r\n /**\r\n * Given the advanced textbox validation params construct the error message\r\n */\r\n private getTextBoxValidationMessages(error: TextboxValidatorParameters): Observable<any> {\r\n if (error.unique) {\r\n return this.translate.get('TextboxRequiredAndUnique_LC', { minLength: error.minLength, maxLength: error.maxLength });\r\n } else {\r\n return this.translate.get('TextboxRequired_LC', { minLength: error.minLength, maxLength: error.maxLength });\r\n }\r\n }\r\n\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { AbstractControl, UntypedFormGroup, ValidatorFn, Validators } from '@angular/forms';\r\n\r\n/**\r\n * Helper for Form Groups\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FormGroupHelper {\r\n\r\n /**\r\n * Call patchValue on the formGroup with only the properties\r\n * that actually have values in updates. This method will ignore\r\n * any value that is either null or undefined\r\n */\r\n public patchValueSafely(formGroup: UntypedFormGroup, updates: any){\r\n let safeUpdates: { [k: string]: any } = {};\r\n Object.keys(updates).forEach(function (propName) {\r\n let rawValue = updates[propName];\r\n\r\n if(rawValue !== null && rawValue !== undefined){\r\n safeUpdates[propName] = rawValue;\r\n }\r\n });\r\n formGroup.patchValue(safeUpdates);\r\n }\r\n\r\n /**\r\n * Get an id for the form controls input\r\n */\r\n public getInputId(id: string):string {\r\n return id + '_input';\r\n }\r\n\r\n /**\r\n * Takes in a control and returns a function that sets the control's required validator based on\r\n * whether the value provided is empty or not. Adds the required validator if the value provided is\r\n * not empty, otherwise removes the required validator. Useful for dynamically setting the requiredness\r\n * of a control based on whether another control has a value or not.\r\n * \r\n * @param control\r\n * @param keepValidators - Array of Validators to leave configured on the control. Any existing\r\n * validators on the control will be lost if this is left empty.\r\n * @param isZeroEmpty - If true, a numeric zero will be considered an empty value. Default is false.\r\n */\r\n public setRequiredFn(control: AbstractControl, keepValidators: ValidatorFn[] = [], isZeroEmpty: boolean = false) {\r\n return (value?: number | string | null) => {\r\n let validators = [...keepValidators];\r\n\r\n // If the value is not empty, add the required validator.\r\n if (value || (!isZeroEmpty ? value === 0 : false)) {\r\n validators.push(Validators.required);\r\n }\r\n\r\n if (validators.length > 0) {\r\n control.setValidators(validators);\r\n } else {\r\n control.clearValidators();\r\n }\r\n // Recalculating the value is required when changing the validators, otherwise\r\n // the validator won't take effect until the value is changed in the control.\r\n control.updateValueAndValidity({emitEvent: false});\r\n }\r\n }\r\n}","import { Directive, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';\r\nimport { AbstractControl } from \"@angular/forms\";\r\nimport { Subject } from \"rxjs\";\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { ValidationMessageService } from \"../core/validation-message.service\";\r\nimport { FormGroupHelper } from '../shared/form-group.helper';\r\nimport { PopoverContentPosition } from './popover/popover.component';\r\n\r\n\r\n\r\nexport type ControlLabelPosition = \"top\" | \"bottom\" | \"left\";\r\n\r\n\r\n/**\r\n * Base class for Reactive Form Controls, containing ECI-specific shared properties\r\n */\r\n@Directive()\r\nexport abstract class FormControlBase implements OnInit, OnDestroy, OnChanges {\r\n \r\n \r\n /**\r\n * If true, will focus the control's input when the view is intialized\r\n */\r\n @Input() public autofocus?: boolean = false;\r\n\r\n\r\n /**\r\n * UI-oriented form model that retains the states and values of the HTML controls on screen.\r\n * Can be a {@link FormControl} or a {@link FormGroup}\r\n */\r\n @Input() public formModel!: AbstractControl;\r\n\r\n\r\n /**\r\n * The form control label\r\n */\r\n @Input() public label?: string;\r\n\r\n\r\n /**\r\n * The position of the form control label (top|bottom)\r\n */\r\n @Input() public labelPosition?: ControlLabelPosition = \"top\";\r\n\r\n\r\n /**\r\n * The id of the component. We use this to identify a control on focus events and help.\r\n */\r\n @Input() public id: string = '';\r\n\r\n\r\n /**\r\n * The pending status of the control, can be used to tell the user the control is\r\n * awaiting data via a spinner or animation\r\n */\r\n @Input() public pending?: boolean = false;\r\n\r\n\r\n /**\r\n * Whether the input is a required field or not\r\n * @todo: Sometime in the future Angular makes it sound like this will be handled via the Reactive form When that happens this property can be removed\r\n */\r\n @Input() public required?: boolean = false;\r\n\r\n\r\n /**\r\n * The tabindex of the control\r\n */\r\n @Input() public tabindex?: number = 0;\r\n\r\n\r\n /**\r\n * Disable the control and display the value\r\n */\r\n @Input() public readonly?: boolean;\r\n\r\n\r\n /**\r\n * Conditionally show a tooltip on the form control's input.\r\n */\r\n @Input() public tooltip?: string;\r\n\r\n \r\n /**\r\n * Conditionally show a help popover next to the controls label.\r\n */\r\n @Input() public helpPopover?: string;\r\n\r\n /**\r\n * When a help popover is present, allows the popover to be positioned in different locations.\r\n */\r\n @Input() public helpPopoverPosition?: PopoverContentPosition = 'top-left';\r\n\r\n /**\r\n * All current validation errors\r\n */\r\n public validationErrors: string = \"\";\r\n\r\n\r\n /**\r\n * The id of the form controls input, getnerated from the components id.\r\n */\r\n public inputId: string = '';\r\n\r\n\r\n /**\r\n * Notifies component subscriptions that component is destroyed.\r\n * Use with `takeUntil()` when subscribing to complete subscriptions\r\n * automatically.\r\n *\r\n * See:\r\n * [RxJs]{@link http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-takeUntil}\r\n * [and this]{@link https://medium.com/@benlesh/rxjs-dont-unsubscribe-6753ed4fda87}\r\n * [and this]{@link https://netbasal.com/when-to-unsubscribe-in-angular-d61c6b21bad3}\r\n * [and this]{@link http://brianflove.com/2016/12/11/anguar-2-unsubscribe-observables/}\r\n */\r\n protected componentDestroyed: Subject<void> = new Subject<void>();\r\n\r\n\r\n /**\r\n * Creates an instance of FormControlBase.\r\n */\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper\r\n ) { }\r\n\r\n /**\r\n * Angular onChange lifecyle hook\r\n */\r\n public ngOnChanges(changes:SimpleChanges):void {\r\n if (changes.readonly && changes.readonly.currentValue !== undefined) {\r\n if (changes.readonly.currentValue === true) {\r\n this.formModel.disable();\r\n } else if (changes.readonly.currentValue === false) {\r\n this.formModel.enable();\r\n }\r\n }\r\n\r\n if (changes.id && changes.id.currentValue !== undefined){\r\n this.inputId = this.formGroupHelper.getInputId(this.id);\r\n }\r\n }\r\n\r\n \r\n /**\r\n * Angular onInit lifecycle hook.\r\n */\r\n public ngOnInit(): void {\r\n this.inputId = this.formGroupHelper.getInputId(this.id);\r\n \r\n // subscribe to valueChanges Observable to take any erros and translate them\r\n this.formModel.statusChanges.pipe(\r\n takeUntil(this.componentDestroyed)\r\n ).subscribe(data => {\r\n this.translateValidationMessages(data)\r\n });\r\n\r\n // (re)set validation messages\r\n this.translateValidationMessages();\r\n\r\n \r\n }\r\n \r\n\r\n /**\r\n * Angular onDestroy lifecyle hook. \r\n * Unsubscribe from any observables\r\n */\r\n public ngOnDestroy(): void {\r\n this.componentDestroyed.next();\r\n this.componentDestroyed.unsubscribe();\r\n }\r\n\r\n\r\n /**\r\n * Function that subscribes to the formModel's valueChanges Observable\r\n * to take any erros and translate them\r\n */\r\n protected async translateValidationMessages(data?: any) {\r\n if (!this.formModel) { return; }\r\n const form = this.formModel;\r\n\r\n this.validationErrors = '';\r\n\r\n if (!form.valid) {\r\n let messages = await this.validationMessageService.getErrorMessages(form.errors);\r\n if (messages) {\r\n this.validationErrors = messages.join('; ');\r\n }\r\n }\r\n }\r\n\r\n}","import { OverlayRef } from '@angular/cdk/overlay';\r\nimport { Component, EventEmitter, HostBinding, TemplateRef } from '@angular/core';\r\n\r\n/**\r\n * The position of the tooltip relative to its anchor. For example, if position is 'top-left' the the tooltip will appear above the anchor and expand to the left of the anchor.\r\n */\r\nexport type TooltipPosition = 'top-left' | 'top-center' | 'top-right' | 'right-top' | 'right-center' | 'right-bottom' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-top' | 'left-center' | 'left-bottom';\r\nexport interface TooltipOptions {\r\n /**\r\n * Unique identifier for the tooltip that is assigned to the <article> element that wraps the tooltip content.\r\n */\r\n id?: string;\r\n /**\r\n * The tooltip title. Hidden if not defined. The tooltip header is hidden if both title and subtile are not defined.\r\n */\r\n title?: string;\r\n /**\r\n * Text to display under the tooltip title. Hidden if not defined. The tooltip header is hidden if both title and subtitle are not defined.\r\n */\r\n subtitle?: string;\r\n /**\r\n * HTML string for the main content of the tooltip. Will be ignored if customContent has a value.\r\n */\r\n text?: string;\r\n /**\r\n * Provide a TemplateRef for custom content. If customContent is defined, any value for text will be ignored.\r\n */\r\n customContent?: TemplateRef<any>;\r\n /**\r\n * When true a close button appears in the top right corner to hide the tooltip. Useful when tooltips are used in a tour. An event will emitted when the tooltip is hidden.\r\n */\r\n dismissible?: boolean;\r\n /**\r\n * Number in pixels of the width of the tooltip. If undefined width will be auto.\r\n */\r\n width?: number;\r\n\r\n /**\r\n * Number in pixels that the max-width of the tooltip can be.\r\n */\r\n maxWidth?: number;\r\n\r\n /**\r\n * Customize the background color. Can be any color value or css variable with var() function. For example: var(--ec-background-color-success);\r\n */\r\n backgroundColor?: string;\r\n\r\n /**\r\n * Customize the color of the title text. Can be any color value or css variable with var() function. For example: var(--ec-color-primary-light);\r\n */\r\n titleColor?: string;\r\n\r\n /**\r\n * Flag to hide the arrow of the tooltip. Showing the arrow is the default.\r\n */\r\n hideArrow?: boolean;\r\n}\r\n@Component({\r\n selector: 'ec-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss']\r\n})\r\nexport class TooltipComponent implements TooltipOptions {\r\n position: TooltipPosition = 'top-center';\r\n\r\n id?: string;\r\n title?: string;\r\n subtitle?: string;\r\n text?: string;\r\n dismissible = false;\r\n customContent?: TemplateRef<any> | undefined;\r\n overlayRef?: OverlayRef;\r\n hideArrow?: boolean;\r\n\r\n @HostBinding('style.--ec-tooltip-background-color')\r\n backgroundColor?: string;\r\n\r\n @HostBinding('style.--ec-tooltip-color-title')\r\n titleColor?: string;\r\n\r\n onHide: EventEmitter<void> = new EventEmitter();\r\n\r\n hide() {\r\n this.onHide.next();\r\n this.overlayRef?.dispose();\r\n }\r\n}\r\n","<article id=\"{{id}}\" class=\"py-3 position-{{position}}\" [class.show-arrow]=\"!hideArrow\">\r\n <header *ngIf=\"title || subtitle\" class=\"mb-3\">\r\n <h1 class=\"text-heading-2 px-3 mb-0\">{{title}}</h1>\r\n <p class=\"text-caption-1 px-3 mb-0\">{{subtitle}}</p>\r\n </header>\r\n\r\n <ng-container *ngIf=\"customContent; else textTemplate\">\r\n <ng-container *ngTemplateOutlet=\"customContent\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #textTemplate>\r\n <div class=\"text-body-1 px-3\" [innerHTML]=\"text\"></div>\r\n </ng-template>\r\n\r\n <ec-button *ngIf=\"dismissible\" id=\"tooltipDismiss\" type=\"icon\" icon=\"icon-cancel\" (clicked)=\"hide()\"></ec-button>\r\n</article>\r\n","import { ConnectedPosition, Overlay, OverlayConfig } from \"@angular/cdk/overlay\";\r\nimport { ComponentPortal } from \"@angular/cdk/portal\";\r\nimport { ElementRef, Injectable } from \"@angular/core\";\r\nimport { TooltipComponent, TooltipOptions, TooltipPosition } from \"./tooltip.component\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TooltipService {\r\n\r\n private positions: {[key: string]: ConnectedPosition} = {\r\n 'top-left': { originX: 'center', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetX: 38 },\r\n 'top-center': { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\r\n 'top-right': { originX: 'center', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetX: -38 },\r\n 'bottom-left': { originX: 'center', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetX: 38 },\r\n 'bottom-center': { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\r\n 'bottom-right': { originX: 'center', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetX: -38 },\r\n 'left-top': { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'top', offsetY: -38 },\r\n 'left-center': { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\r\n 'left-bottom': { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'bottom', offsetY: 38 },\r\n 'right-top': { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'top', offsetY: -38 },\r\n 'right-center': { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\r\n 'right-bottom': { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'bottom', offsetY: 38 }\r\n }\r\n\r\n constructor(\r\n private overlay: Overlay\r\n ){}\r\n\r\n /**\r\n * Show a tooltip attached to a specified element\r\n */\r\n show(anchor: HTMLElement, position: TooltipPosition = 'top-center', options?: TooltipOptions): TooltipComponent {\r\n const overlayConfig = this.getOverlayConfig(anchor, this.positions[position], options?.width, options?.maxWidth);\r\n const overlayRef = this.overlay.create(overlayConfig);\r\n\r\n const contentPortal = new ComponentPortal(TooltipComponent);\r\n const contentViewRef = overlayRef.attach(contentPortal);\r\n contentViewRef.instance.position = position;\r\n\r\n contentViewRef.instance.id = options?.id;\r\n contentViewRef.instance.title = options?.title;\r\n contentViewRef.instance.subtitle = options?.subtitle;\r\n contentViewRef.instance.text = options?.text;\r\n contentViewRef.instance.customContent = options?.customContent;\r\n contentViewRef.instance.dismissible = options?.dismissible || false;\r\n contentViewRef.instance.backgroundColor = options?.backgroundColor;\r\n contentViewRef.instance.titleColor = options?.titleColor;\r\n contentViewRef.instance.hideArrow = options?.hideArrow;\r\n contentViewRef.instance.overlayRef = overlayRef;\r\n\r\n return contentViewRef.instance;\r\n }\r\n\r\n onMove(event:MouseEvent, contentRect:DOMRect):boolean {\r\n let callCallback = false;\r\n if (contentRect) {\r\n if (\r\n event.clientX > contentRect.right\r\n || event.clientX < contentRect.left\r\n || event.clientY > contentRect.bottom\r\n || event.clientY < contentRect.top\r\n ) {\r\n callCallback = true;\r\n }\r\n }\r\n return callCallback;\r\n }\r\n\r\n private getOverlayConfig(element: HTMLElement | ElementRef, position: ConnectedPosition, width?: number, maxWidth?: number): OverlayConfig {\r\n const positionStrategy = this.overlay.position()\r\n .flexibleConnectedTo(element)\r\n .withPositions([position]);\r\n\r\n const config = new OverlayConfig({\r\n positionStrategy: positionStrategy,\r\n width: width,\r\n maxWidth: maxWidth\r\n });\r\n\r\n return config;\r\n }\r\n}\r\n","import { Component, OnChanges, Input, SimpleChanges, Output, EventEmitter } from '@angular/core';\r\nimport { Tag } from './tag';\r\n\r\n@Component({\r\n selector: 'ec-tags',\r\n templateUrl: './tags.component.html',\r\n styleUrls: ['./tags.component.scss']\r\n})\r\nexport class TagsComponent implements OnChanges {\r\n\r\n /**The ID of this set of tags */\r\n @Input() public id: string = '';\r\n\r\n /**\r\n * One or more tags\r\n * \r\n * @type {(Tag | Tag[])}\r\n * @memberof TagsComponent\r\n */\r\n @Input() public tags?: Tag | Tag[];\r\n\r\n /**\r\n * Determines whether the tags will wrap or not\r\n * \r\n * @type {boolean}\r\n * @memberof TagsComponent\r\n */\r\n @Input() public wrap: boolean = true;\r\n\r\n /**\r\n * Displays the tags in condensed mode\r\n */\r\n @Input() public isCondensed: boolean = false;\r\n\r\n /**\r\n * Emits the tag item when the tag's close button is clicked\r\n */\r\n @Output() public tagClosed: EventEmitter<Tag> = new EventEmitter<Tag>();\r\n\r\n /**\r\n * Tags to be displayed\r\n * \r\n * @type {Tag[]}\r\n * @memberof TagsComponent\r\n */\r\n public tagsArray: Tag[] = [];\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Angular onChanges lifecycle hook\r\n * @see {@link https://angular.io/guide/lifecycle-hooks | Life-cycle hooks}\r\n * \r\n * @param {SimpleChanges} changes \r\n * @memberof TagsComponent\r\n */\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.tags) {\r\n if (this.tags) {\r\n // If only given a single item, put it in an array so it works in the template\r\n if (Array.isArray(this.tags)) {\r\n this.tagsArray = this.tags;\r\n } else {\r\n this.tagsArray = [this.tags];\r\n }\r\n } else {\r\n // reset array if tags becomes undefined\r\n this.tagsArray = [];\r\n }\r\n }\r\n }\r\n\r\n public closeTag(tag: Tag) {\r\n this.tagsArray = this.tagsArray.filter(t => t !== tag);\r\n this.tagClosed.emit(tag);\r\n }\r\n}\r\n","<ul class=\"tags\"\r\n [class.is-wrapped]=\"wrap\">\r\n <li *ngFor=\"let tag of tagsArray; index as i\"\r\n id=\"{{id}}_tag_{{i}}\"\r\n class=\"tag is-{{tag.type}} {{tag.classList}} mr-1\"\r\n [ngClass]=\"{'text-caption-1': !isCondensed, 'text-caption-2': isCondensed, 'is-condensed': isCondensed, 'pr-0': tag.isDismissable, 'is-link': tag.url}\"\r\n title=\"{{tag.tooltip | translate}}\">\r\n <i *ngIf=\"tag.icon\"\r\n class=\"ec-icon {{tag.icon}} ec-icon-sm\"></i>\r\n <span *ngIf=\"!tag.url\">{{tag.label | translate}}</span>\r\n\r\n <a *ngIf=\"tag.url\"\r\n id=\"{{id}}_tag_{{i}}_link\"\r\n class=\"font-weight-bold\"\r\n href=\"{{tag.url}}\"\r\n target=\"{{tag.target}}\">{{tag.label | translate}}</a>\r\n\r\n <button id=\"{{id}}_tag_{{i}}_dismissButton\"\r\n *ngIf=\"tag.isDismissable\"\r\n (click)=\"closeTag(tag)\">\r\n <i class=\"ec-icon ec-icon-sm icon-cancel\"></i>\r\n </button>\r\n </li>\r\n</ul>","import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport { Component, ElementRef, EmbeddedViewRef, HostListener, Input, OnDestroy, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { of, Subject } from 'rxjs';\r\nimport { delay, switchMap, takeUntil } from 'rxjs/operators';\r\nimport { Tag, TagType } from '../../display/tags/tag';\r\nimport { TooltipService } from '../../display/tooltip/tooltip.service';\r\n\r\nexport type PopoverContentPosition = 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';\r\n\r\n@Component({\r\n selector: 'ec-popover',\r\n templateUrl: './popover.component.html',\r\n styleUrls: ['./popover.component.scss']\r\n})\r\nexport class PopoverComponent implements OnDestroy {\r\n\r\n /** An optional icon that, if provided, enables the popover to use it as the anchor element */\r\n @Input() icon?: string = '';\r\n \r\n /** An optional tag that, if provided, enables the popover to use it as the anchor element */\r\n @Input() tag?: Tag;\r\n\r\n /** Used to denote the hover tag's type (and thus background-color) */\r\n @Input() tagHoverType?: TagType;\r\n\r\n @Input() contentPosition: PopoverContentPosition = 'top-left';\r\n\r\n @Input() iconHoverClass: string = '';\r\n\r\n @ViewChild('content') public content!: TemplateRef<any>;\r\n\r\n \r\n\r\n /** In the template, we use an ec-tags element for the pre-hover state and an entirely\r\n * separate ec-tags element for our hover state, resulting in two components. To achieve a change \r\n * in the background-color for our anchor tag, on hover, a different tag.tagType must be provided on the\r\n * second ec-tag element\r\n */\r\n public hoverTag?: Tag;\r\n\r\n private overlayRef?: OverlayRef;\r\n private contentViewRef?: EmbeddedViewRef<any>;\r\n private contentRect: DOMRect | undefined;\r\n private isVisible: boolean = false;\r\n\r\n private mouseOver = new Subject<void>();\r\n private interrupt = new Subject<void>();\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private viewContainerRef: ViewContainerRef,\r\n private elementRef: ElementRef,\r\n private tooltipService: TooltipService,\r\n ) { }\r\n\r\n /** When the popover initializes, if a new tagType is provided for the hover state of the popover, \r\n * we use it to update the type of our \"hoverTag\" (which controls background-color of tag) \r\n */\r\n ngOnInit() {\r\n if (this.tag && this.tagHoverType) {\r\n this.hoverTag = {...this.tag, type: this.tagHoverType };\r\n }\r\n this.mouseOver\r\n .pipe(\r\n switchMap(v =>\r\n of(v).pipe(\r\n delay(300),\r\n takeUntil(this.interrupt)\r\n )\r\n )\r\n )\r\n .subscribe(() => this.show());\r\n }\r\n\r\n ngOnDestroy() {\r\n this.hide();\r\n }\r\n\r\n private show() {\r\n\r\n if (!this.isVisible) {\r\n \r\n const overlayConfig = this.getOverlayConfig();\r\n this.overlayRef = this.overlay.create(overlayConfig);\r\n \r\n const contentPortal = new TemplatePortal(this.content, this.viewContainerRef);\r\n this.contentViewRef = this.overlayRef.attach(contentPortal);\r\n \r\n this.isVisible = true;\r\n }\r\n }\r\n\r\n @HostListener('mouseover')\r\n public onMouseOver() {\r\n this.mouseOver.next();\r\n }\r\n\r\n @HostListener('mouseleave')\r\n public onLeave() {\r\n this.interrupt.next();\r\n }\r\n\r\n /**\r\n * Hides the popover if the mouse moves outside of the popover content\r\n */\r\n public onMouseMove(event: MouseEvent) {\r\n let callCallback = false;\r\n \r\n if(!this.contentRect) {\r\n this.contentRect = this.contentViewRef?.rootNodes[0].getBoundingClientRect();\r\n }\r\n\r\n if(this.contentRect) {\r\n callCallback = this.tooltipService.onMove(event, this.contentRect!);\r\n }\r\n if(callCallback) {\r\n this.hide();\r\n }\r\n } \r\n\r\n private hide() {\r\n this.interrupt.next();\r\n this.overlayRef?.dispose();\r\n this.isVisible = false;\r\n this.contentRect = undefined;\r\n }\r\n\r\n private getOverlayConfig(): OverlayConfig {\r\n const position = this.getPosition();\r\n\r\n const positionStrategy = this.overlay.position()\r\n .flexibleConnectedTo(this.elementRef)\r\n .withPositions([position]);\r\n\r\n const config = new OverlayConfig({\r\n positionStrategy: positionStrategy\r\n });\r\n\r\n return config;\r\n }\r\n\r\n private getPosition(): ConnectedPosition {\r\n const position = this.contentPosition.split('-');\r\n const overlayX = <'start' | 'end'>(position[1] == 'left' ? 'start' : 'end');\r\n const overlayY = <'top' | 'bottom'>position[0];\r\n return { originX: overlayX, originY: overlayY, overlayX: overlayX, overlayY: overlayY };\r\n }\r\n}\r\n","<!-- Before hover state -->\r\n<div class=\"p-2\">\r\n <i *ngIf=\"!tag\" class=\"ec-icon {{icon}} ec-icon-sm\"></i>\r\n <ec-tags *ngIf=\"tag\"\r\n [isCondensed] = \"true\"\r\n [tags]=\"tag\">\r\n </ec-tags>\r\n</div>\r\n<!-- ./Before hover state -->\r\n\r\n<!-- Hover state -->\r\n<ng-template #content>\r\n <article class=\"popover-content\"\r\n (document:mousemove)=\"onMouseMove($event)\">\r\n <ng-content></ng-content>\r\n </article>\r\n <div class=\"p-2 {{contentPosition}}\">\r\n <i *ngIf=\"!tag\" class=\"ec-icon {{icon}} ec-icon-sm {{iconHoverClass}}\"></i>\r\n <ec-tags *ngIf=\"tag\"\r\n [isCondensed]=\"true\"\r\n [tags]=\"hoverTag\">\r\n </ec-tags>\r\n </div>\r\n</ng-template>\r\n<!-- ./Hover state -->\r\n","import { Component, HostBinding, Input } from '@angular/core';\r\nimport { PopoverContentPosition } from '../popover/popover.component';\r\n\r\n@Component({\r\n selector: 'ec-help-popover',\r\n templateUrl: './help-popover.component.html'\r\n})\r\nexport class HelpPopoverComponent {\r\n\r\n @Input() @HostBinding('attr.id') id: string = '';\r\n @Input() text: string = '';\r\n @Input() contentPosition: PopoverContentPosition = 'top-left';\r\n @Input() maxWidth: string = '15rem';\r\n\r\n constructor() { }\r\n\r\n}\r\n","<ec-popover id=\"{{id}}_popover\"\r\n icon=\"icon-help-circle\"\r\n [contentPosition]=\"contentPosition\"\r\n iconHoverClass=\"font-color-primary-light\">\r\n <div id=\"{{id}}_popoverContent\"\r\n class=\"popover-content-dark\"\r\n [class.is-right-positioned]=\"contentPosition == 'top-right' || contentPosition == 'bottom-right'\"\r\n [style.max-width]=\"maxWidth\">\r\n <div *ngIf=\"text\"\r\n [innerHTML]=\"text | translate\"></div>\r\n <ng-content></ng-content>\r\n </div>\r\n</ec-popover>","import { AfterViewInit, Component, ElementRef, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\nimport { merge, Subject } from 'rxjs';\r\nimport { distinctUntilChanged, takeUntil } from 'rxjs/operators';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { ClickableElement } from '../../shared/directives/click-area-for/click-area-for.directive';\r\nimport { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { FormControlBase } from \"../form-control-base\";\r\n\r\nexport type CheckboxState = 'unchecked' | 'indeterminate' | 'checked';\r\n\r\n@Component({\r\n selector: 'ec-checkbox',\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss']\r\n})\r\n\r\nexport class CheckboxComponent extends FormControlBase implements AfterViewInit, ClickableElement, OnChanges {\r\n\r\n /**\r\n * The name of the checkbox input element\r\n */\r\n @Input() public name: string = '';\r\n\r\n /**\r\n * An object with a collection of FormControls who can only have a value of true or false.\r\n * A FormGroup or FormArray work fine, or a custom object reference is possible too\r\n * The master checkbox will reattach to dependent controls any time this reference changes\r\n * The controls should be flat (i.e. if using a FormGroup then it cannot have nested FormGroups within it).\r\n * \r\n * For example: \r\n * dependentCheckboxesGroup = new FormGroup({child1: new FormControl(false), child2: new FormControl(false), child3: new FormControl(false)})\r\n */\r\n @Input() public dependentCheckboxesGroup?: {controls: AbstractControl[] | {[key: string]: AbstractControl}};\r\n\r\n /**\r\n * Determines whether to ignore or include disabled dependent checkboxes in the check to determine the checkbox state.\r\n */\r\n @Input() public ignoreDisabledDependents: boolean = true;\r\n\r\n /**\r\n * Reference to the checkbox input control\r\n */\r\n @ViewChild('checkboxInput', { static: true }) protected inputElement!: ElementRef;\r\n\r\n /**\r\n * If the checkbox is a master checkbox (i.e. it has a dependentCheckboxesGroup),\r\n * indeterminate is true if there are some checked dependents and some unchecked dependents.\r\n */\r\n public indeterminate: boolean = false;\r\n\r\n //Used to prevent valueChanges loops in the master checkbox and dependent checkboxes value changes.\r\n private ignoreCall: boolean = false;\r\n\r\n /** Fired whenever the dependent checkboxes are changed to clear out subscriptions to the previous dependents */\r\n private resetDependentSubscriptions = new Subject<void>();\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper\r\n ) {\r\n super(validationMessageService, formGroupHelper);\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.autofocus) {\r\n this.inputElement.nativeElement.focus();\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.dependentCheckboxesGroup) {\r\n this.setupDependents();\r\n }\r\n }\r\n\r\n public dispatchEvent(event: Event) {\r\n if (event.type === 'click' && !this.formModel.disabled) {\r\n this.formModel.patchValue(!this.formModel.value);\r\n }\r\n }\r\n\r\n /**\r\n * Create watchers that allow the master and dependent checkbox states to stay in sync as the user interacts with them. \r\n * Dependents can update the master when their values change and the master updates dependents when the value changes. \r\n */\r\n private setupDependents() {\r\n if(!this.dependentCheckboxesGroup) {return}\r\n\r\n // Remove any subscriptions to previous dependents\r\n this.resetDependentSubscriptions.next();\r\n\r\n //Extract the values (i.e. the checkboxes) from the FormGroup controls key-value map and return them. \r\n let dependentCheckboxes: AbstractControl[] = Object.values(this.dependentCheckboxesGroup.controls);\r\n\r\n this.updateMasterState(dependentCheckboxes);\r\n\r\n //When the master value changes, we set all its dependents to that value.\r\n //We also set indeterminate to false since we know that all dependents will either be checked or unchecked.\r\n this.formModel.valueChanges.pipe(\r\n distinctUntilChanged(),\r\n takeUntil(merge(this.componentDestroyed, this.resetDependentSubscriptions))\r\n ).subscribe((value: boolean) => {\r\n if(!this.ignoreCall) {\r\n this.ignoreCall = true; //Ignore any value changes calls on the dependents to prevent a loop.\r\n dependentCheckboxes.forEach(checkbox => {\r\n if (!checkbox.disabled || !this.ignoreDisabledDependents) {\r\n checkbox.setValue(value);\r\n }\r\n })\r\n this.indeterminate = false;\r\n this.ignoreCall = false;\r\n }\r\n })\r\n\r\n //When a dependent value changes, we need to reevaluate the master state.\r\n //We are subscribing to the form models directly instead of the entire group because we found that adding checkboxes to \r\n // more than one form group causes only the last group to emit valueChanges events. \r\n //That prevented combined row-master and table-master setups from working properly.\r\n dependentCheckboxes.forEach(checkbox => {\r\n checkbox.valueChanges.pipe(\r\n distinctUntilChanged(),\r\n takeUntil(merge(this.componentDestroyed, this.resetDependentSubscriptions))\r\n ).subscribe((value) => {\r\n if(value !== true && value !== false) {\r\n console.error(`The value ${value} is not true or false, which are the only supported values for FormControls in the dependentCheckboxesGroup`);\r\n return;\r\n }\r\n if(!this.ignoreCall) {\r\n this.ignoreCall = true; //Ignore any value changes calls on the master to prevent a loop.\r\n this.updateMasterState(dependentCheckboxes);\r\n this.ignoreCall = false;\r\n }\r\n })\r\n })\r\n }\r\n\r\n /** \r\n * If all dependents are true, the master should be true and determinate.\r\n * If all dependents are false, the master should be false and determinate.\r\n * If some dependents are true and some dependents are false, the master should be false and indeterminate.\r\n * \r\n * If ignoreDisabledDependents is true, does not include the disabled dependents when checking values\r\n */\r\n private updateMasterState(dependentCheckboxes: AbstractControl[]) {\r\n let dependentsToCheck = [];\r\n if (this.ignoreDisabledDependents) {\r\n dependentsToCheck = dependentCheckboxes.filter(checkbox => checkbox.enabled);\r\n } else {\r\n dependentsToCheck = dependentCheckboxes;\r\n }\r\n\r\n let isTrue = (checkbox: AbstractControl) => {return checkbox.value === true};\r\n if(dependentsToCheck.every(isTrue)) {\r\n this.formModel.setValue(true);\r\n this.indeterminate = false;\r\n } else if(dependentsToCheck.some(isTrue)) {\r\n this.formModel.setValue(false);\r\n this.indeterminate = true;\r\n } else {\r\n this.formModel.setValue(false);\r\n this.indeterminate = false;\r\n }\r\n }\r\n\r\n}","<div class=\"control\">\r\n <label class=\"checkbox\"\r\n [ngClass]=\"{'is-disabled': formModel.disabled, 'no-label': !label, 'is-readonly': readonly}\">\r\n <input id=\"{{id}}_input\"\r\n #checkboxInput\r\n class='input'\r\n [class.indeterminate]=\"indeterminate\"\r\n [attr.id]=\"inputId\"\r\n [attr.name]=\"name\"\r\n type=\"checkbox\"\r\n tabindex=\"{{tabindex}}\"\r\n [formControl]=\"formModel\"\r\n [attr.cdkFocusInitial]=\"autofocus || null\">\r\n <i class=\"ec-icon icon-check\"></i>\r\n\r\n <span id=\"{{id}}_label\"\r\n *ngIf=\"label\"\r\n class=\"label\">\r\n <span [innerHtml]=\"label | translate\"></span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n2 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n </span>\r\n </label>\r\n</div>","import { Component, Input, EventEmitter, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ec-collapsible-toggle',\r\n template: `<ec-button id=\"{{id}}_button\" type=\"icon\" icon=\"icon-angle-down {{expanded ? '' : 'rotate-270'}}\" tabindex=\"{{tabindex}}\" (clicked)=\"onToggle()\"></ec-button>`,\r\n styleUrls: ['./collapsible-toggle.component.scss']\r\n})\r\nexport class CollapsibleToggleComponent {\r\n\r\n /** \r\n * Identifier to pass to the button \r\n */\r\n @Input() public id?: string;\r\n\r\n /** \r\n * The expanded state. \r\n * The toggle icon is changed in the template based on the value of expanded. \r\n */\r\n @Input() public expanded: boolean = false;\r\n\r\n /** Button tabindex */\r\n @Input() public tabindex?: number;\r\n\r\n /**\r\n * Emits the value of expanded to the parent component for two-way binding\r\n */\r\n @Output() public expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n \r\n /**\r\n * On click, toggle the value of exanded and emit the current value\r\n */\r\n public onToggle(): void {\r\n this.expanded = !this.expanded;\r\n this.expandedChange.emit(this.expanded);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Router, ActivatedRoute, Params } from '@angular/router';\r\nimport { Observable, fromEvent } from 'rxjs';\r\n\r\n/**\r\n * Service to help with interfacing with the window object\r\n * and navigating around the application (going outside of the Angular 2+ router)\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class WindowService {\r\n\r\n /**\r\n * Tracks if there are any unsaved changes that the user could lose.\r\n *\r\n * It is set up as `get` only because it is set with `addNavigateAwayPrompt`.\r\n *\r\n * This also includes adding a prompt to the window itself (in addition to\r\n * working with the `CanDeactivateUnsavedChanges` guard) to cover page reloads\r\n * which do not trigger router events.\r\n */\r\n public get hasUnsavedChanges(): boolean {\r\n return this._hasUnsavedChanges\r\n }\r\n private _hasUnsavedChanges: boolean = false;\r\n\r\n /** \r\n * Expose the innerWidth on the window global. Protects against errors when code\r\n * is running on a non-browser platform.\r\n */\r\n public get innerWidth(): number|undefined {\r\n return window ? window.innerWidth : undefined;\r\n }\r\n\r\n /**\r\n * Observable of the window resize event\r\n */\r\n public resized?: Observable<Event>;\r\n\r\n constructor(\r\n private router:Router,\r\n private activatedRoute: ActivatedRoute\r\n ) { \r\n if (window) {\r\n this.resized = fromEvent(window, 'resize');\r\n }\r\n }\r\n\r\n /**\r\n * Navigates to the previous page the user had visited\r\n */\r\n public goBack() {\r\n window.history.back();\r\n }\r\n\r\n /**An abstraction around the browsers window history length.\r\n * Returns zero if unable to access or running outside a browser context\r\n */\r\n public getHistoryLength(): number {\r\n return window?.history?.length || 0;\r\n }\r\n\r\n /**\r\n * Navigate to any url you know the path to\r\n * @param url The URL to navigate to\r\n *\r\n * @deprecated For legacy support only; use `router.navigateByUrl` instead\r\n */\r\n public async navigateToUrl(url: string) {\r\n try {\r\n if (url.indexOf('/app/') === 0) {\r\n await this.router.navigateByUrl(url.substring(5));\r\n } else {\r\n await this.router.navigateByUrl(url);\r\n }\r\n } catch (e) {\r\n // If the router throws we will try to navigate to the fully qualified url as a last ditch effort.\r\n // This can happen if we missed a link that needs to be converted to ng5 or our ng1Href directive\r\n // didn't handle a link correctly\r\n window.location.href = url;\r\n }\r\n }\r\n\r\n /**\r\n * Adds a `beforeunload` function to the window to alert the user that there are about to leave\r\n * the current page and ask if they'd like to leave or stay\r\n */\r\n public addNavigateAwayPrompt(): void {\r\n this._hasUnsavedChanges = true;\r\n window.addEventListener(\"beforeunload\", this.beforeUnloadFunction);\r\n }\r\n\r\n /**\r\n * Removes the `beforeunload` function added to the window\r\n */\r\n public removeNavigateAwayPrompt(): void {\r\n this._hasUnsavedChanges = false;\r\n window.removeEventListener(\"beforeunload\", this.beforeUnloadFunction);\r\n }\r\n\r\n\r\n /**\r\n * Send data to another window.\r\n *\r\n * __SECURITY RISK__ - Always use a specific target origin. Failing to provide a specific target origin can allow\r\n * malicious sites to receive the message.\r\n *\r\n * @param targetWindow - Window to send the message to\r\n * @param message - Data to send\r\n * @param targetOrigin - What the URI of the target window must be for the message to be sent.\r\n * If sending data to another EnergyCAP window, this should always be `window.location.origin` to ensure\r\n * that only instances of EnergyCAP app receive the message.\r\n */\r\n public postMessage(targetWindow: Window, message: any, targetOrigin: string) {\r\n targetWindow.postMessage(message, targetOrigin);\r\n }\r\n\r\n /**\r\n * Open a new window\r\n * @param url - The URL of the resource to be loaded\r\n */\r\n public openNew(url: string): void {\r\n window.open(url, '_blank');\r\n }\r\n\r\n /**\r\n * A wrapper around the router for changing the query params for the current url \r\n * without creating a new history entry or removing any existing query parameters.\r\n * The provided params are updated if they already exist or added to the url if they don't\r\n * \r\n * @returns a promise that resolves to true if the navigation succeeds, false if something (like a guard) blocks it.\r\n * In normal use, the navigation should succeed unless we use query params to block access to a route the user is already on\r\n */\r\n public async modifyHistoryQueryParamsSubset(queryParams: Params) : Promise<boolean>{\r\n return this.router.navigate( [], {\r\n relativeTo: this.activatedRoute,\r\n replaceUrl: true,\r\n queryParams: queryParams,\r\n queryParamsHandling: 'merge', \r\n });\r\n }\r\n\r\n /**A wrapper around the default javascript confirm dialog to allow us to unit test dependent code.\r\n * Of course eventually we'd like to have pretty confirmations for everything, but in some cases it wasn't worth the extra time\r\n * so we're using this instead.\r\n */\r\n public confirm(prompt: string): Promise<boolean> {\r\n return Promise.resolve(confirm(prompt));\r\n }\r\n\r\n /**\r\n * Close the current window or a window instance if one is provided\r\n * @param windowInstance - Window to close (optional)\r\n */\r\n public closeWindow(windowInstance?: Window): void {\r\n if (windowInstance) {\r\n windowInstance.close();\r\n } else {\r\n window.close();\r\n }\r\n }\r\n\r\n public getLocation(): string {\r\n return window.location.pathname + window.location.hash;\r\n }\r\n\r\n /** Get the current value of the full url, including protocol, host and path */\r\n public getFullUrl(): string {\r\n return window.location.href;\r\n }\r\n\r\n /** Get the current value of the base url, including protocol, domain and port (if explicitly specified) */\r\n public getBaseUrl(): string {\r\n return window.location.origin;\r\n }\r\n\r\n /**\r\n * Reloads the browser window.\r\n * NOT RECOMMENDED. Seek other options for reloading content within Angular before resorting to this.\r\n */\r\n public reloadWindow() {\r\n window.location.reload();\r\n }\r\n\r\n /**\r\n * Function called when the window `beforeunload` event is fired.\r\n *\r\n * A reference to the function that was passed to `window.addEventListener`\r\n * must be retained for `window.removeEventListener` to function properly.\r\n *\r\n * Some browsers require the event's `returnValue` to be set to show the confirmation\r\n * dialog.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event\r\n */\r\n private beforeUnloadFunction = (event: BeforeUnloadEvent) => {\r\n // Cancel the event as stated by the standard.\r\n event.preventDefault();\r\n // Chrome requires returnValue to be set.\r\n event.returnValue = '';\r\n };\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ScrollService {\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Given a container and the target element to scroll to, we will set the scroll top on\r\n * the container to bring the target into view.\r\n *\r\n * @param scrollContainerSelector A valid CSS selector string for the scroll container.\r\n * @param targetElementSelector A valid CSS selector string for the target element.\r\n * @param topPadding The amount of space to leave above the target\r\n * to keep it from being pinned to the top of the scrollContainer. Defaults\r\n * to 32px, the default height of a menu item.\r\n */\r\n public scrollToItem(scrollContainerSelector: string, targetElementSelector: string, topPadding = 32): void {\r\n let scrollContainer = document.querySelector(scrollContainerSelector);\r\n if (!scrollContainer) {\r\n return;\r\n }\r\n let targetElement = scrollContainer.querySelector(targetElementSelector);\r\n if (!targetElement) {\r\n return;\r\n }\r\n\r\n let targetRect = targetElement.getBoundingClientRect();\r\n let containerRect = scrollContainer.getBoundingClientRect();\r\n\r\n // Only scroll if the target is outside of the view bounds of the container\r\n if (targetRect.bottom > containerRect.bottom || targetRect.top < containerRect.top) {\r\n scrollContainer.scrollTop =\r\n (targetRect.top - containerRect.top) + scrollContainer.scrollTop - topPadding;\r\n }\r\n }\r\n\r\n /**\r\n * Return the value of the scrollTop property for an HTMLElement that matches the selector\r\n * @param scrollContainerSelector A valid CSS selector\r\n */\r\n public getCurrentScrollPosition(scrollContainerSelector: string): number {\r\n let scrollContainer = document.querySelector(scrollContainerSelector);\r\n if (scrollContainer) {\r\n return scrollContainer.scrollTop;\r\n } else {\r\n console.error(`Scroll container '${scrollContainerSelector}' does not exist.`);\r\n return 0;\r\n }\r\n }\r\n\r\n /**\r\n * Set the scrollTop of an HTMLElement that matches the selector to a specific position\r\n * @param scrollContainerSelector A valid CSS selector\r\n * @param position\r\n */\r\n public scrollToPosition(scrollContainerSelector: string, position: number): void {\r\n let scrollContainer = document.querySelector(scrollContainerSelector);\r\n if (scrollContainer) {\r\n scrollContainer.scrollTop = position;\r\n } else {\r\n console.error(`Scroll container '${scrollContainerSelector}' does not exist.`);\r\n }\r\n }\r\n\r\n /**\r\n * Given a container and the target element to scroll to, we will set the scroll top on\r\n * the container to bring the target into view, with the item in the center of the scroll container.\r\n *\r\n * @param scrollContainerSelector A valid CSS selector string for the scroll container.\r\n * @param targetElementSelector A valid CSS selector string for the target element.\r\n */\r\n public scrollItemCentered(scrollContainerSelector: string, targetElementSelector: string) {\r\n try {\r\n let scrollContainer = document.querySelector(scrollContainerSelector);\r\n if (scrollContainer) {\r\n let containerHeight = scrollContainer.getBoundingClientRect().height;\r\n // Pad the top with half of the height of the container to put the target in the middle\r\n this.scrollToItem(scrollContainerSelector, targetElementSelector, containerHeight * .5)\r\n }\r\n } catch (error) {\r\n console.error(`Error scrolling target into view. Container selector: ${scrollContainerSelector}. Target selector: ${targetElementSelector}`, error);\r\n }\r\n }\r\n}\r\n","import { Directive, Input, ElementRef, Renderer2, OnInit, OnDestroy, Output, EventEmitter } from '@angular/core';\r\nimport { Router, NavigationEnd, ActivatedRoute, UrlTree, Params } from '@angular/router';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil, filter } from 'rxjs/operators';\r\n\r\n@Directive({\r\n selector: '[ecNavItemActive]'\r\n})\r\nexport class NavItemActiveDirective implements OnInit, OnDestroy {\r\n\r\n /** The CSS class to apply to the host element when the url is active */\r\n @Input('ecNavItemActive') classValue?: string;\r\n\r\n /**\r\n * Determines whether the directive will try to make an exact match on the url or not\r\n * If false, the directive will add the active class if the first part of the url matches\r\n * the active route.\r\n * see: https://angular.io/api/router/Router#isactive\r\n */\r\n @Input('ecNavItemActiveExactMatch')\r\n set exact(value: boolean | undefined) {\r\n if (value === undefined) {\r\n this._exact = true;\r\n } else {\r\n this._exact = value;\r\n }\r\n this.update();\r\n }\r\n private _exact: boolean = true;\r\n\r\n /** Router link query params */\r\n @Input('ecNavItemActiveQueryParams') queryParams?: Params | null;\r\n\r\n /**\r\n * The url of the NavItem to check for activeness. Convert the item url into a\r\n * UrlTree relative to the ActivatedRoute so router#isActive works even with relative urls.\r\n * See Angular's [routerLink](https://github.com/angular/angular/blob/8282e15c2becbe42a49befa07d6407247e8243d8/packages/router/src/directives/router_link.ts#L249)\r\n * and [routerLinkActive](https://github.com/angular/angular/blob/8282e15c2becbe42a49befa07d6407247e8243d8/packages/router/src/directives/router_link_active.ts#L139)\r\n * for a similiar implementation.\r\n */\r\n @Input('ecNavItemActiveUrl')\r\n set url(value: string | undefined) {\r\n if (value !== null && value !== undefined) {\r\n this._url = this.router.createUrlTree([value], {relativeTo: this.route, queryParams: this.queryParams});\r\n this.update();\r\n }\r\n }\r\n private _url?: UrlTree;\r\n\r\n /** Emits when the url becomes active */\r\n @Output() routerLinkActivated: EventEmitter<Event> = new EventEmitter();\r\n\r\n /** Subject that emits when component is destroyed to unsubscribe from any subscriptions */\r\n private destroyed: Subject<void> = new Subject();\r\n\r\n constructor(private router: Router, private el: ElementRef, private renderer: Renderer2, private route: ActivatedRoute) {}\r\n\r\n /** Check if url is active on NavigationEnd events */\r\n public ngOnInit(): void {\r\n this.router.events.pipe(\r\n takeUntil(this.destroyed),\r\n filter(e => e instanceof NavigationEnd)\r\n ).subscribe(() => {\r\n this.update();\r\n })\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /** If url is active apply the defined class to the element, otherwise remove it */\r\n private update(): void {\r\n if (this._url && this.classValue) {\r\n if (this.router.isActive(this._url, { matrixParams: 'ignored', queryParams: this._exact ? 'exact' : 'subset', paths: this._exact ? 'exact' : 'subset', fragment: 'ignored' })) {\r\n this.renderer.addClass(this.el.nativeElement, this.classValue);\r\n this.routerLinkActivated.emit(new Event('routerLinkActivated'));\r\n } else {\r\n this.renderer.removeClass(this.el.nativeElement, this.classValue);\r\n }\r\n }\r\n }\r\n}\r\n","import { AfterContentInit, Component, ElementRef, EventEmitter, HostBinding, Input, OnChanges, OnDestroy, Output, Renderer2, SimpleChanges, TemplateRef, ViewChild } from '@angular/core';\r\n\r\nimport { ScrollService } from '../../core/scroll.service';\r\nimport { WindowService } from '../../core/window.service';\r\nimport { LinkTarget } from '../../display/tags/tag';\r\nimport { NavItem } from '../navigation/nav-item';\r\nimport { PopoverContentPosition } from '../popover/popover.component';\r\n\r\nexport type MenuTemplateType = \"label\" | \"iconAndLabel\" | \"checkAndLabel\" | \"iconLabelCaption\";\r\n\r\nexport type MenuHostElementClasses = 'bg-transparent';\r\n\r\nexport interface MenuItem<TValue = any, SItems = any> extends NavItem {\r\n // Label is optional in NavItem but was not in MenuItem,\r\n // overriding to be required\r\n label: string,\r\n caption?: string,\r\n items?: MenuItem<SItems>[],\r\n checked?: boolean,\r\n display?: 'default' | 'heading' | 'divider' | 'divided-section',\r\n value?: TValue,\r\n classList?: string,\r\n disabled?: boolean,\r\n hidden?: boolean,\r\n readonly?: boolean,\r\n target?: LinkTarget,\r\n externalLink?: boolean,\r\n /** Optional text to display in-place of the default label when the MenuItem is selected. */\r\n selectedLabel?: string,\r\n hideIfNoItems?: boolean,\r\n\r\n /** Optional help popover content to display next to the header or individual item. Note: This only will\r\n * show when using our built in item templates.\r\n */\r\n helpPopover?: string,\r\n /** Optional help popover position. If not defined a default of 'top-left' will be used. */\r\n helpPopoverPosition?: PopoverContentPosition,\r\n};\r\n\r\nexport const menuAnimationSpeed = 350;\r\n\r\n/**\r\n * Primitive Menu component that encapsulates known templates\r\n *\r\n * @export\r\n */\r\n@Component({\r\n selector: 'ec-menu',\r\n templateUrl: './menu.component.html',\r\n styleUrls: ['./menu.component.scss']\r\n})\r\nexport class MenuComponent implements AfterContentInit, OnDestroy, OnChanges {\r\n\r\n\r\n /**\r\n * Input for the menu's template id\r\n */\r\n @Input() public id?: string;\r\n\r\n\r\n /**\r\n * Id bound to the host element\r\n */\r\n @HostBinding('attr.id') public attrId?: string;\r\n\r\n\r\n /**\r\n * Array of items to display\r\n *\r\n * @memberof MenuComponent\r\n */\r\n @Input() public items: Array<MenuItem> = [];\r\n\r\n\r\n /**\r\n * Selected item; annotates the item\r\n * when displayed with 'selected' class\r\n *\r\n * @memberof MenuComponent\r\n */\r\n @Input() public selected: MenuItem | null = null;\r\n\r\n\r\n /**\r\n * The parent menu item. If defined, a header with the parent's label and a\r\n * back button will be displayed.\r\n */\r\n @Input() public parent?: MenuItem;\r\n\r\n\r\n /**\r\n * Display template\r\n *\r\n * @memberof MenuComponent\r\n */\r\n @Input() public templateType: MenuTemplateType = 'label';\r\n\r\n /**\r\n * Optional custom template for the menu items. Must declare a template\r\n * input variable called \"item\" like so: <ng-template #templateName let-item>,\r\n * where item represents the menuItem.\r\n * Will override the choice for templateType if provided.\r\n *\r\n * @memberof MenuComponent\r\n */\r\n @Input() public customMenuTemplate?: TemplateRef<any>;\r\n\r\n\r\n /**\r\n * The menu's title\r\n */\r\n @Input() public title?: string;\r\n\r\n\r\n /**\r\n * Show message when there are no items\r\n */\r\n @Input() public showNoItems?: boolean = false;\r\n\r\n /**\r\n * Text to show when menu is empty and showNoItems is true\r\n */\r\n @Input() public noDataText: string = 'NoItems_TC';\r\n\r\n\r\n /**\r\n * Controls whether keyboard navigation is enabled\r\n */\r\n @Input() public enableKeyNav?: boolean = false;\r\n\r\n\r\n /**\r\n * Item currently highlighted by keyboard navigation\r\n */\r\n @Input() public highlightedItem: MenuItem | null = null;\r\n\r\n /**\r\n * Tells the menu to maintain the selected/lastSelected item. Turning this off is useful for\r\n * action type menus that are displayed on the screen at all times and you do not\r\n * want the item to be selected when clicked.\r\n */\r\n @Input() public maintainSelectedItem: boolean = true;\r\n\r\n /**\r\n * Will prevent text-wrapping of menu items and truncate instead. Also turns on a tooltip for the menu item. Default: false;\r\n */\r\n @Input() public truncateItems: boolean = false;\r\n\r\n /**\r\n * When true, the space for the icon is preserved for menu items that do not have icons.\r\n * Only applicable for iconAndLabel menus.\r\n */\r\n @Input() public preserveIconSpace: boolean = false;\r\n\r\n /**\r\n * Reference to the toggle button. Set when menu is used as part of a DropdownComponent.\r\n */\r\n @Input() public dropdownToggleButton?: ElementRef;\r\n\r\n /**\r\n * Emitted when `selected` is changed. Emits the referenced object.\r\n *\r\n * @memberof MenuComponent\r\n */\r\n @Output() public selectedChanged: EventEmitter<MenuItem> = new EventEmitter<MenuItem>();\r\n\r\n\r\n /**\r\n * Emitted when the menu has a parent and back is clicked\r\n * @memberof MenuComponent\r\n */\r\n @Output() public menuClosed: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n\r\n /**\r\n * The item template that is loaded into the component template\r\n *\r\n * @memberof MenuComponent\r\n */\r\n public internalizedTemplate!: TemplateRef<any>;\r\n\r\n /**\r\n * Index of the item currently highlighted using keyboard nav\r\n */\r\n public highlightedItemIndex: number = -1;\r\n\r\n\r\n /**\r\n * A reference to the menu label template\r\n */\r\n @ViewChild('label', { static: true }) private labelTemplate!: TemplateRef<any>;\r\n\r\n\r\n /**\r\n * A reference to the menu icon and label template\r\n */\r\n @ViewChild('iconAndLabel', { static: true }) private iconAndLabelTemplate!: TemplateRef<any>;\r\n\r\n\r\n /**\r\n * A reference to the menu check and label template\r\n */\r\n @ViewChild('checkAndLabel', { static: true }) private checkAndLabelTemplate!: TemplateRef<any>;\r\n\r\n /**\r\n * A reference to the menu icon, label and caption template\r\n */\r\n @ViewChild('iconLabelCaption', { static: true }) private iconLabelCaptionTemplate!: TemplateRef<any>;\r\n\r\n /**\r\n * Contains the function used to remove the even listener from the renderer\r\n */\r\n private removeKeydownListener?: () => void;\r\n\r\n /**\r\n * Last item this.selected was set to via selectItem().\r\n * This isn't necessarily the same as this.selected, because this.selected is an input property\r\n * and could have been changed by a consumer through some means other than selectItem().\r\n * This allows us to prevent double-calls to selectItem() with the same input.\r\n */\r\n private lastSelected: MenuItem | null = null;\r\n\r\n /**\r\n * Flattened array of all selectable items in the menu. Makes it easier to keep track of the currently highlighted item for keyboard navigation.\r\n */\r\n private selectableItems: MenuItem[] = [];\r\n\r\n /**\r\n * Helper function to return a flat list of all selectable items in the provided menu items. Filters out headings and divided-sections.\r\n * This makes it much easier to keep track of currently highlighted items for keyboard navigation.\r\n */\r\n public static getSelectableItems(items: MenuItem[]): MenuItem[] {\r\n return items.reduce((selectableItems, item) => {\r\n if (item.display !== 'heading' && item.display !== 'divided-section') {\r\n selectableItems.push(item);\r\n } else if (item.items) {\r\n selectableItems.push(...item.items.filter(childItem => childItem.display !== 'heading' && childItem.display !== 'divided-section'));\r\n }\r\n return selectableItems;\r\n }, <MenuItem[]>[]);\r\n }\r\n\r\n /**\r\n * Returns an ID for the provided item based on its index in the provided items array. This mimics the behavior of the MenuComponent's\r\n * generated IDs for items that don't have provided IDs. This is used in MenuComponent and ComboboxComponent to scroll to specific items.\r\n * NOTE: If the items array does not match what is displayed in the menu, this function will not return the correct ID.\r\n *\r\n * Returns null if the not found\r\n * @param items The MenuItems array to search through.\r\n * @param item The item to generate the ID for.\r\n * @param menuComponentId Used to prefix the generated ID. This should be the ID of the menu component the item is present in.\r\n * @memberof MenuComponent\r\n */\r\n public static getIndexedItemId(items: MenuItem[], item?: MenuItem | null, menuComponentId?: string): string | null {\r\n if (item) {\r\n for (let i = 0; i < items.length; i++) {\r\n const itemInList = items[i];\r\n if (itemInList.label === item.label) {\r\n return `${menuComponentId}_item${i}`;\r\n }\r\n\r\n // If the item is a heading or divided section, check its children\r\n if (itemInList.items && (itemInList.display === 'heading' || itemInList.display === 'divided-section')) {\r\n for (let j = 0; j < itemInList.items.length; j++) {\r\n const childItem = itemInList.items[j];\r\n // Fall back to checking only the label if the item doesn't have an id\r\n if (childItem.label === item.label) {\r\n return `${menuComponentId}_item${i}-${j}`;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n constructor(\r\n private el: ElementRef,\r\n private renderer: Renderer2,\r\n private windowService: WindowService,\r\n private scrollService: ScrollService\r\n ) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges) {\r\n if (changes.items && this.items) {\r\n this.selectableItems = MenuComponent.getSelectableItems(this.items);\r\n }\r\n }\r\n\r\n /**\r\n * Sets & displays the interalized template based on\r\n * the set template.\r\n * @see { @link https://angular.io/guide/lifecycle-hooks|Angular Lifecycle Hooks}\r\n *\r\n * @memberof MenuComponent\r\n */\r\n public ngAfterContentInit(): void {\r\n switch (this.templateType) {\r\n case (\"label\"):\r\n this.internalizedTemplate = this.iconAndLabelTemplate;\r\n break;\r\n case (\"iconAndLabel\"):\r\n this.internalizedTemplate = this.iconAndLabelTemplate;\r\n break;\r\n case (\"checkAndLabel\"):\r\n this.internalizedTemplate = this.checkAndLabelTemplate;\r\n break;\r\n case (\"iconLabelCaption\"):\r\n this.internalizedTemplate = this.iconLabelCaptionTemplate;\r\n break;\r\n default:\r\n throw new Error(`Invalid templateType for MenuComponent. Please use either: 'label', 'iconAndLabel' or 'checkAndLabel'`)\r\n }\r\n\r\n //if the consumer provided a menuItemTemplate, override the internalizedTemplate with that.\r\n if (this.customMenuTemplate) {\r\n this.internalizedTemplate = this.customMenuTemplate;\r\n }\r\n\r\n if (this.id) {\r\n this.attrId = this.id;\r\n }\r\n\r\n this.setItemIds();\r\n\r\n if (this.highlightedItem && this.selectableItems.length) {\r\n this.highlightedItemIndex = this.selectableItems.findIndex(item => { return this.highlightedItem === item});\r\n }\r\n\r\n this.addKeydownListener();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n // Remove the listener when the component is destroyed\r\n if (this.removeKeydownListener) {\r\n this.removeKeydownListener();\r\n }\r\n }\r\n\r\n\r\n /**\r\n * When a menu item is selected, open a child menu if the item has items, call\r\n * the item's click method if defined, or emit the selected item.\r\n *\r\n * @param item The selected item\r\n * @memberof MenuComponent\r\n */\r\n public selectItem(event: Event, item: MenuItem, isKeyEvent?: boolean): void {\r\n event.stopPropagation();\r\n\r\n //In the case that the user clicks an item, selectItem() will be called from the click handler\r\n //and through onRouterLinkActivated. Only one of these will make it through this if statement\r\n //because the first one will set this.lastSelected = item.\r\n if (!item.disabled && !item.readonly && this.lastSelected !== item) {\r\n\r\n if (!item.url) {\r\n if (item.onClick) {\r\n item.onClick(item, false);\r\n }\r\n\r\n if (item.items && item.display !== 'heading' && item.display !== 'divided-section') {\r\n this.toggleChildMenu(true);\r\n } else {\r\n this.onSelection(item);\r\n }\r\n // We need to manually handle the url navigation if the keyboard was used\r\n } else if (isKeyEvent || (<Element>event.target)?.tagName === 'LI') {\r\n if (item.target) {\r\n window.open(item.url, item.target);\r\n } else {\r\n this.windowService.navigateToUrl(item.url);\r\n }\r\n // Emit so upstream components know an item was selected\r\n this.onSelection(item);\r\n } else {\r\n this.onSelection(item);\r\n }\r\n\r\n if (this.maintainSelectedItem) {\r\n this.selected = item;\r\n this.lastSelected = item;\r\n } else {\r\n this.selected = null;\r\n this.lastSelected = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Close the current menu and open the parent menu\r\n * @memberof MenuComponent\r\n */\r\n public back(event: Event): void {\r\n event.stopPropagation();\r\n if (this.parent && this.parent.onClick) {\r\n this.parent.onClick(null, true);\r\n }\r\n this.menuClosed.emit();\r\n }\r\n\r\n\r\n /**\r\n * Emit the selected item\r\n * @param item The selected item\r\n */\r\n public onSelection(item: MenuItem): void {\r\n if (item.display !== 'heading' && item.display !== 'divided-section') {\r\n this.selectedChanged.emit(item);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Open or close the child menu. When the child menu closes, the selected\r\n * item is reset.\r\n * @memberof MenuComponent\r\n */\r\n public toggleChildMenu(open: boolean): void {\r\n let navEl = this.el.nativeElement.querySelector('nav');\r\n\r\n if (open) {\r\n // Remove the listener on the parent menu when a child menu is opened\r\n // This is to avoid interference between the parent and child menus\r\n if (this.removeKeydownListener) {\r\n this.removeKeydownListener();\r\n }\r\n\r\n let height: number = navEl.offsetHeight;\r\n let width: number = navEl.offsetWidth;\r\n\r\n // In order to animate the child menu, we need to set height on the nav element\r\n // so we can absolutely position the two menus and maintain the current menu's height\r\n this.renderer.setStyle(navEl, 'height', `${height}px`);\r\n this.renderer.setStyle(navEl, 'width', `${width}px`);\r\n\r\n this.renderer.addClass(this.el.nativeElement, 'open');\r\n setTimeout(() => {\r\n this.renderer.addClass(this.el.nativeElement, 'open-active');\r\n })\r\n } else {\r\n // Re-add the listener once the child menu closes\r\n this.addKeydownListener();\r\n\r\n this.renderer.removeClass(this.el.nativeElement, 'open-active');\r\n setTimeout(() => {\r\n this.renderer.removeClass(this.el.nativeElement, 'open');\r\n\r\n // Reset the nav element's height to auto\r\n this.renderer.setStyle(navEl, 'height', '100%');\r\n this.selected = null;\r\n }, menuAnimationSpeed)\r\n }\r\n }\r\n\r\n /**\r\n * Handle key presses to navigate the menu\r\n */\r\n public keyNavigate(event: KeyboardEvent) {\r\n if (this.enableKeyNav && event.target === this.dropdownToggleButton?.nativeElement) {\r\n switch (event.key) {\r\n case 'ArrowUp':\r\n case 'Up':\r\n case 'ArrowDown':\r\n case 'Down':\r\n event.stopPropagation();\r\n event.preventDefault();\r\n this.moveHighlightedUpOrDown(event);\r\n break;\r\n\r\n case 'ArrowRight':\r\n case 'Right':\r\n event.stopPropagation();\r\n event.preventDefault();\r\n // Select the item if it has child items\r\n if (this.highlightedItem && this.highlightedItem.items) {\r\n this.selectItem(event, this.highlightedItem, true);\r\n }\r\n break;\r\n\r\n case 'ArrowLeft':\r\n case 'Left':\r\n event.stopPropagation();\r\n event.preventDefault();\r\n // Close the menu if it is a child menu\r\n if (this.parent) {\r\n this.back(event);\r\n }\r\n break;\r\n\r\n case ' ':\r\n case 'Spacebar':\r\n case 'Enter':\r\n // Prevent 'enter' from doing whatever it does on the currently focused element\r\n event.preventDefault();\r\n\r\n if (this.highlightedItemIndex > -1 && this.highlightedItem) {\r\n this.selectItem(event, this.highlightedItem, true);\r\n // If the header is highlighted\r\n } else if (this.highlightedItemIndex === -1) {\r\n\r\n // Close the menu if it's a child\r\n if (this.parent) {\r\n this.back(event);\r\n }\r\n }\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Scroll to the item currently marked as 'is-selected'. Wait a tick for the\r\n * NgClassDirecitve or NavItemActiveDirective to respond to the model changes\r\n * and update the view.\r\n */\r\n public scrollToSelectedItem(): void {\r\n window.setTimeout(() => {\r\n const linkSelector = `li.is-selected`;\r\n this.scrollService.scrollToItem(`#${this.id}_list`, linkSelector);\r\n });\r\n }\r\n\r\n private moveHighlightedUpOrDown(event: KeyboardEvent) {\r\n switch (event.key) {\r\n case 'ArrowUp':\r\n case 'Up':\r\n if (this.highlightedItemIndex > -1) {\r\n this.highlightedItemIndex--;\r\n }\r\n break;\r\n\r\n case 'ArrowDown':\r\n case 'Down':\r\n if (this.highlightedItemIndex < this.selectableItems.length - 1) {\r\n this.highlightedItemIndex++;\r\n }\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n if (this.highlightedItemIndex > -1) {\r\n // Store the item at the current highlight index\r\n this.highlightedItem = this.selectableItems[this.highlightedItemIndex];\r\n } else {\r\n this.highlightedItem = null;\r\n }\r\n this.scrollToHighlightedItem();\r\n }\r\n\r\n /**\r\n * Scroll to the specified menu item.\r\n * If no item is provided, it will scroll to the first item.\r\n *\r\n * @param item The menu item to scroll to.\r\n * @memberof MenuComponent\r\n */\r\n private scrollMenu(item?: MenuItem | null): void {\r\n if (this.items.length > 0 && this.id) {\r\n item = item ? item : this.items[0];\r\n let itemId = item.id ? item.id : MenuComponent.getIndexedItemId(this.items, item, this.id);\r\n this.scrollService.scrollItemCentered(`#${this.id}_list`, `#${itemId}`);\r\n }\r\n }\r\n\r\n private scrollToHighlightedItem(): void {\r\n this.scrollMenu(this.highlightedItem);\r\n }\r\n\r\n private addKeydownListener(): void {\r\n // Only attempt to add the listener if keyboard nav is enabled\r\n if (this.enableKeyNav) {\r\n // renderer.listen adds the listener and returns a function to remove it from the renderer.\r\n // The listener remains active until this function is called.\r\n this.removeKeydownListener = this.renderer.listen('document', 'keydown', (event: KeyboardEvent) => this.keyNavigate(event));\r\n }\r\n }\r\n\r\n /**\r\n * Sets the menu item ids using its index if item doesn't already have one\r\n */\r\n private setItemIds(): void {\r\n if (this.items) {\r\n this.items.forEach((item, index) => {\r\n item.id = item.id ? item.id : this.id + '_item' + index;\r\n if (item.items) {\r\n item.items.forEach((childItem, childIndex) => {\r\n childItem.id = childItem.id ? childItem.id : this.id + '_item' + index + '-' + childIndex;\r\n });\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","<nav>\r\n <div class=\"parent\"\r\n [class.no-data]=\"showNoItems && (!items || items.length === 0)\">\r\n <header id=\"{{id}}_header\"\r\n class=\"text-heading-3 p-1\"\r\n [class.is-selected]=\"highlightedItemIndex === -1\"\r\n *ngIf=\"parent\"\r\n (click)=\"back($event)\">\r\n <div class=\"item-wrapper\">\r\n <i class=\"ec-icon icon-angle-down rotate-90 flex-shrink\"></i>\r\n <span class=\"label text-truncate flex-grow\">{{parent?.label}}</span>\r\n </div>\r\n </header>\r\n\r\n <ul id=\"{{id}}_list\"\r\n class=\"py-1\">\r\n <ng-container *ngFor=\"let item of items; index as i\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: item, index: i}\"></ng-container>\r\n\r\n <!-- Show child items under parent item if the item is a heading or divided-section -->\r\n <ng-container\r\n *ngIf=\"item.items?.length && (item.display === 'heading' || item.display === 'divided-section')\">\r\n <ng-container *ngFor=\"let childItem of item.items; index as j; first as isFirst; last as isLast\"\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{$implicit: childItem, index: i + '-' + j, isDividedSectionChild: item.display === 'divided-section', isFirst: isFirst, isLast: isLast}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n\r\n <p class=\"no-data-message\">{{noDataText | translate}}</p>\r\n </div>\r\n\r\n <!-- Child menu (Rendered to the right) -->\r\n <ec-menu *ngIf=\"selected?.items && selected?.display !== 'heading' && selected?.display !== 'divided-section'\"\r\n id=\"{{id}}_child\"\r\n class=\"child\"\r\n [parent]=\"selected\"\r\n [items]=\"selected?.items\"\r\n [showNoItems]=\"true\"\r\n [templateType]=\"templateType\"\r\n [enableKeyNav]=\"true\"\r\n [truncateItems]=\"truncateItems\"\r\n (selectedChanged)=\"onSelection($event)\"\r\n (menuClosed)=\"toggleChildMenu(false)\">\r\n </ec-menu>\r\n</nav>\r\n\r\n<ng-template #itemTemplate\r\n let-item\r\n let-i=\"index\"\r\n let-isDividedSectionChild=\"isDividedSectionChild\"\r\n let-isFirst=\"isFirst\"\r\n let-isLast=\"isLast\">\r\n <li *ngIf=\"!(item.hideIfNoItems && !item.items?.length) && item.display !== 'divided-section'\"\r\n id=\"{{item.id || id + '_item' + i}}\"\r\n class=\"{{item.display || 'item'}} {{item.classList}}\"\r\n [class.divider-top]=\"item.display === 'divider-top' || (isDividedSectionChild && isFirst)\"\r\n [class.divider]=\"item.display === 'divider' || (isDividedSectionChild && isLast)\"\r\n [attr.disabled]=\"item.disabled\"\r\n [hidden]=\"item.hidden\"\r\n ecNavItemActive=\"is-selected\"\r\n [ecNavItemActiveQueryParams]=\"item.queryParams\"\r\n [ecNavItemActiveUrl]=\"item.url\"\r\n [ecNavItemActiveExactMatch]='item.isActiveExactMatch'\r\n (routerLinkActivated)=\"selectItem($event, item)\"\r\n [ngClass]=\"{'is-highlighted':(selected === item && item?.display !== 'heading') || highlightedItem === item, 'is-link': item.url, 'is-disabled': item.disabled, 'is-readonly': item.readonly, 'is-checked': item.checked, 'text-heading-3': item?.display === 'heading'}\"\r\n (click)=\"selectItem($event, item)\">\r\n\r\n <a *ngIf=\"item.url && !item.externalLink\"\r\n id=\"{{item.id}}_link\"\r\n title=\"{{truncateItems ? item.label : ''}}\"\r\n class=\"item-wrapper\"\r\n [routerLink]=\"item.url\"\r\n [queryParams]=\"item.queryParams || null\"\r\n target=\"{{item.target || '_self'}}\">\r\n <ng-container *ngTemplateOutlet=\"internalizedTemplate; context: {$implicit: item}\"></ng-container>\r\n </a>\r\n\r\n <a *ngIf=\"item.url && item.externalLink\"\r\n id=\"{{item.id}}_link\"\r\n title=\"{{truncateItems ? item.label : ''}}\"\r\n class=\"item-wrapper\"\r\n href=\"{{item.url}}\"\r\n target=\"{{item.target || '_self'}}\">\r\n <ng-container *ngTemplateOutlet=\"internalizedTemplate; context: {$implicit: item}\"></ng-container>\r\n </a>\r\n\r\n <div *ngIf=\"!item.url\"\r\n title=\"{{truncateItems ? item.label : ''}}\"\r\n class=\"item-wrapper\">\r\n <ng-container *ngTemplateOutlet=\"internalizedTemplate; context: {$implicit: item}\"></ng-container>\r\n </div>\r\n </li>\r\n</ng-template>\r\n\r\n<!-- 'label' Item Template -->\r\n<ng-template #label\r\n let-item>\r\n <span id=\"{{item.id}}_label\"\r\n class=\"label\"\r\n [class.text-truncate]=\"truncateItems\">\r\n {{item.label}}\r\n <ng-container *ngIf=\"item.helpPopover\"\r\n [ngTemplateOutlet]=\"helpPopover\"\r\n [ngTemplateOutletContext]=\"{$implicit: item}\">\r\n </ng-container>\r\n </span>\r\n\r\n <i class=\"ec-icon icon-angle-down rotate-270\"\r\n *ngIf=\"item?.items && item.display !== 'heading' && item.display !== 'divided-section'\"></i>\r\n</ng-template>\r\n\r\n<!-- 'checkAndLabel' Item Template -->\r\n<ng-template #checkAndLabel\r\n let-item>\r\n\r\n <i class=\"ec-icon icon-check ec-icon-sm\"\r\n *ngIf=\"item.display !== 'heading'\"></i>\r\n\r\n <i class=\"ec-icon {{item.icon}} ml-2\"\r\n *ngIf=\"item.icon\"></i>\r\n\r\n <span id=\"{{item.id}}_label\"\r\n class=\"label\"\r\n [class.text-truncate]=\"truncateItems\">\r\n {{item.label}}\r\n <ng-container *ngIf=\"item.helpPopover\"\r\n [ngTemplateOutlet]=\"helpPopover\"\r\n [ngTemplateOutletContext]=\"{$implicit: item}\">\r\n </ng-container>\r\n </span>\r\n\r\n <i class=\"ec-icon icon-angle-down rotate-270\"\r\n *ngIf=\"item?.items && item.display !== 'heading' && item.display !== 'divided-section'\"></i>\r\n</ng-template>\r\n\r\n<!-- 'iconAndLabel' Item Template -->\r\n<ng-template #iconAndLabel\r\n let-item>\r\n <!-- If menuItem.icon exists and is not blank, show the icon in the menu -->\r\n <i class=\"ec-icon {{item.icon}}\"\r\n *ngIf=\"(item.icon && item.icon !== '') || preserveIconSpace\"></i>\r\n\r\n <span id=\"{{item.id}}_label\"\r\n class=\"label\"\r\n [class.text-truncate]=\"truncateItems\">\r\n {{item.label}}\r\n <ng-container *ngIf=\"item.helpPopover\"\r\n [ngTemplateOutlet]=\"helpPopover\"\r\n [ngTemplateOutletContext]=\"{$implicit: item}\">\r\n </ng-container>\r\n </span>\r\n\r\n <i class=\"ec-icon icon-angle-down rotate-270\"\r\n *ngIf=\"item?.items && item.display !== 'heading' && item.display !== 'divided-section'\"></i>\r\n</ng-template>\r\n\r\n<ng-template #iconLabelCaption\r\n let-item>\r\n <i class=\"ec-icon {{item.icon}}\"\r\n *ngIf=\"(item.icon && item.icon !== '') || preserveIconSpace\"></i>\r\n <div *ngIf=\"item.display !== 'heading'\"\r\n class=\"label flex-grow\">\r\n <div id=\"{{item.id}}_label\"\r\n class=\"text-body-1\"\r\n [class.text-truncate]=\"truncateItems\">\r\n {{item.label}}\r\n <ng-container *ngIf=\"item.helpPopover\"\r\n [ngTemplateOutlet]=\"helpPopover\"\r\n [ngTemplateOutletContext]=\"{$implicit: item}\">\r\n </ng-container>\r\n </div>\r\n <div id=\"{{item.id}}_caption\"\r\n *ngIf=\"item.caption\"\r\n class=\"text-caption-1\"\r\n [class.text-truncate]=\"truncateItems\"\r\n [innerHTML]=\"item.caption\"></div>\r\n </div>\r\n <h3 *ngIf=\"item.display === 'heading'\"\r\n class=\"flex-grow text-heading-3 align-self-center\"\r\n [class.text-truncate]=\"truncateItems\">\r\n {{item.label}}\r\n <ng-container *ngIf=\"item.helpPopover\"\r\n [ngTemplateOutlet]=\"helpPopover\"\r\n [ngTemplateOutletContext]=\"{$implicit: item}\">\r\n </ng-container>\r\n </h3>\r\n\r\n <i class=\"ec-icon icon-angle-down rotate-270 align-self-center\"\r\n *ngIf=\"item?.items && item.display !== 'heading' && item.display !== 'divided-section'\"></i>\r\n</ng-template>\r\n\r\n<ng-template #helpPopover\r\n let-item>\r\n <ec-help-popover id=\"{{item.id}}_helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{item.helpPopover | translate}}\"\r\n contentPosition=\"{{item.helpPopoverPosition ?? 'top-left'}}\">\r\n </ec-help-popover>\r\n</ng-template>","import { DOCUMENT } from '@angular/common';\r\nimport { Directive, EmbeddedViewRef, EventEmitter, Inject, Input, OnDestroy, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport Popper from 'popper.js';\r\nimport { fromEvent, Subscription } from \"rxjs\";\r\n\r\nexport type PopupPlacement = 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';\r\nexport type PopupStatus = 'visible' | 'hidden';\r\n\r\n/**\r\n * Primitive directive that popups a container using PopperJS\r\n *\r\n * @export\r\n */\r\n@Directive({ selector: '[ecPopup]' })\r\nexport class PopupContainerDirective implements OnInit, OnDestroy, OnInit {\r\n\r\n /**\r\n * Global reference to the currently displayed popup; only\r\n * one popup directive can be in `show` state at a given time.\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n public static GlobalPopupRef?: PopupContainerDirective = undefined;\r\n\r\n /**\r\n * TemplateRef of container to popup\r\n *\r\n */\r\n @Input('ecPopup') public popup!: TemplateRef<any>;\r\n\r\n /**\r\n * Popper options\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n @Input('options') public popperOptions?: Popper.PopperOptions;\r\n\r\n /**\r\n * Template View Reference\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n private templateViewRef!: EmbeddedViewRef<any>;\r\n\r\n /**\r\n * Popup View Reference (container)\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n private popupViewRef?: EmbeddedViewRef<any>;\r\n\r\n /**\r\n * Popper Reference\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n private popperRef?: Popper;\r\n\r\n /**\r\n * Close-to-click Subscription. This allows us to close the menu when you click on the body.\r\n * We attach it when the menu is open and detach it on close, to limit the lifetime of the click handler\r\n * which helps with performance on a page with many popup containers\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n private globalCloseSubscription?: Subscription;\r\n\r\n /**\r\n * Creates an instance of PopupContainerDirective.\r\n * @param templateRef Reference to the popup template\r\n * @param viewContainer Reference to the view container\r\n * @param document Reference to Document\r\n * @memberof PopupContainerDirective\r\n */\r\n constructor(\r\n private templateRef: TemplateRef<any>,\r\n private viewContainer: ViewContainerRef,\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer2\r\n ) {}\r\n\r\n /**\r\n * Angular onInit lifecycle hook\r\n * @see https://angular.io/guide/lifecycle-hooks\r\n */\r\n ngOnInit(): void {\r\n this.templateViewRef = this.viewContainer.createEmbeddedView(this.templateRef);\r\n }\r\n\r\n\r\n /**\r\n * Angular onDestroy lifecycle hook. Close and delete references. Unsubscribe observables\r\n * @see https://angular.io/guide/lifecycle-hooks\r\n */\r\n ngOnDestroy(): void {\r\n this.hide();\r\n }\r\n\r\n\r\n /**\r\n * Emit the {@link PopupStatus} when it changes\r\n */\r\n public popperStatusChange: EventEmitter<PopupStatus> = new EventEmitter<PopupStatus>();\r\n\r\n\r\n /**\r\n * Displays the templateRef as a popup\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n public show(): void {\r\n if (PopupContainerDirective.GlobalPopupRef) {\r\n if (PopupContainerDirective.GlobalPopupRef != this) {\r\n PopupContainerDirective.GlobalPopupRef.hide();\r\n PopupContainerDirective.GlobalPopupRef = undefined;\r\n }\r\n }\r\n\r\n if(!this.globalCloseSubscription) {\r\n this.globalCloseSubscription = fromEvent(this.document.body, \"click\").subscribe((event) => {\r\n this.hide();\r\n });\r\n }\r\n\r\n if (!this.popperRef) {\r\n // Add the popper template as an embedded view since PopperJS\r\n // manipulates DOM elements.\r\n this.popupViewRef = this.viewContainer.createEmbeddedView(this.popup);\r\n\r\n // Since popper needs real DOM elements, grab the first non-comment\r\n // DOM element to use as our anchor.\r\n let anchorElement = (this.popupViewRef.rootNodes as any[]).find(elem => { return elem.nodeName !== \"#text\" });\r\n\r\n\r\n // Use the parents elements as our DOM elements to Popper\r\n this.popperRef = new Popper(\r\n this.templateViewRef.rootNodes[0],\r\n anchorElement,\r\n this.popperOptions);\r\n\r\n\r\n PopupContainerDirective.GlobalPopupRef = this;\r\n\r\n this.popperStatusChange.emit('visible');\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Hides the templateRef\r\n *\r\n * @memberof PopupContainerDirective\r\n */\r\n public hide(): void {\r\n if (this.globalCloseSubscription) {\r\n this.globalCloseSubscription.unsubscribe();\r\n this.globalCloseSubscription = undefined;\r\n }\r\n\r\n if (this.popperRef && this.popupViewRef) {\r\n this.popupViewRef.destroy();\r\n this.popperRef.destroy();\r\n this.popperRef = undefined;\r\n this.popperStatusChange.emit('hidden');\r\n }\r\n }\r\n\r\n /**\r\n * Updates the popup container position\r\n */\r\n public update(): void {\r\n if (this.popperRef) {\r\n this.popperRef.update();\r\n }\r\n }\r\n\r\n public fixPosition(minWidthNone?:boolean, appendToBody=false ):void {\r\n // @ts-ignore\r\n if(this.popperRef && this.popperRef['reference'] && this.popperRef['popper']) {\r\n // @ts-ignore\r\n let popupEl = this.popperRef['popper'];\r\n\r\n // Reset width style previously assigned because the content may have\r\n // changed and the auto width would be different\r\n this.renderer.removeStyle(popupEl, 'width');\r\n\r\n this.renderer.setStyle(popupEl, 'position', 'fixed');\r\n\r\n if (appendToBody) {\r\n const bodyEl = this.document.querySelector('body');\r\n const popupParent = this.renderer.parentNode(popupEl);\r\n if (popupParent !== bodyEl) {\r\n this.renderer.appendChild(bodyEl, popupEl);\r\n }\r\n }\r\n\r\n // @ts-ignore\r\n let toggleEl = this.popperRef['reference'];\r\n let width = popupEl.offsetWidth;\r\n let boundaries = popupEl.getBoundingClientRect();\r\n let left:number = boundaries.left;\r\n let coords = toggleEl.getBoundingClientRect();\r\n\r\n // Set the top of our menu to the bottom of the toggle element\r\n let top:number = coords.bottom;\r\n\r\n if (this.popperOptions && this.popperOptions.placement) {\r\n if (this.popperOptions.placement === 'bottom-start' || this.popperOptions.placement === 'top-start') {\r\n left = coords.left;\r\n } else {\r\n left = coords.right - ((minWidthNone || width > coords.width) ? width : coords.width);\r\n }\r\n }\r\n\r\n // if it won't fit (with 10px space before hitting the window edge), flip it\r\n if (boundaries.height + top + 10 > window.innerHeight) {\r\n top = coords.top - boundaries.height;\r\n }\r\n\r\n this.renderer.setStyle(popupEl, 'transform', 'none');\r\n this.renderer.setStyle(popupEl, 'left', left + 'px');\r\n this.renderer.setStyle(popupEl, 'top', top + 'px');\r\n this.renderer.setStyle(popupEl, 'width', width + 'px');\r\n\r\n if (!minWidthNone) {\r\n this.renderer.setStyle(popupEl, 'min-width', coords.width + 'px');\r\n }\r\n }\r\n }\r\n}\r\n","import { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { Component, Input, ViewChild, ElementRef, AfterViewInit, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\nimport { FormControlBase } from \"../form-control-base\";\r\nimport { ValidationMessageService } from \"../../core/validation-message.service\";\r\nimport { ValidatorFn, AbstractControl, ValidationErrors, Validators } from '@angular/forms';\r\n\r\n/**\r\n * The type of textbox where text is input[type=\"text\"], multi_line is a \r\n * textarea, email is input[type=\"email\"], url is input[type=\"url\"], and password \r\n * is an input[type=\"password\"]\r\n * \r\n * If the type is url or tel a regex pattern is automatically added to the form validators. No other pattern validators\r\n * may be used for this input, having more than one will cause issues.\r\n * \r\n * If the type is email an email validator is automatically added to the form validators.\r\n * */\r\nexport type TextboxType = \"text\" | \"multi_line\" | \"email\" | \"url\" | \"password\" | \"tel\";\r\n\r\n/** Type for advanced validation of textbox form controls, if in the future\r\n * we want more handling we will need to update this type.\r\n */\r\nexport type TextboxValidatorParameters = {\r\n required?: boolean;\r\n minLength?: number;\r\n maxLength?: number;\r\n unique?: boolean;\r\n valid?: boolean;\r\n pattern?: RegExp;\r\n};\r\n\r\n/** Advanced validation for textbox form controls */\r\nexport const textboxValidation = (validatorParams: TextboxValidatorParameters): ValidatorFn => {\r\n return (control: AbstractControl) => {\r\n let validators: ValidatorFn[] = [];\r\n \r\n // Innocent until proven guilty\r\n validatorParams.valid = true;\r\n\r\n if (validatorParams.required) {\r\n validators.push(Validators.required);\r\n }\r\n\r\n if (validatorParams.minLength !== undefined) {\r\n validators.push(Validators.minLength(validatorParams.minLength));\r\n }\r\n\r\n if (validatorParams.maxLength !== undefined) {\r\n validators.push(Validators.maxLength(validatorParams.maxLength));\r\n }\r\n\r\n if (validatorParams.pattern !== undefined) {\r\n validators.push(Validators.pattern(validatorParams.pattern));\r\n }\r\n\r\n validators.forEach(validator => {\r\n let validationResult: ValidationErrors | null = validator(control);\r\n if (validationResult) {\r\n validatorParams.valid = false;\r\n }\r\n });\r\n\r\n if (validatorParams.valid) {\r\n return null;\r\n } else {\r\n return {\r\n textbox: validatorParams\r\n };\r\n }\r\n }\r\n};\r\n\r\nexport const phoneNumberValidationPattern: string = '^\\\\s*(?:\\\\+?(\\\\d{1,3}))?[-. (]*(\\\\d{3})[-. )]*(\\\\d{3})[-. ]*(\\\\d{4})(?: *x(\\\\d+))?\\\\s*$';\r\nexport const urlValidationPattern: string = '([A-Za-z])+(:\\/\\/)+[^\\\\s]*';\r\n\r\n@Component({\r\n selector: 'ec-textbox',\r\n templateUrl: './textbox.component.html',\r\n styleUrls: ['./textbox.component.scss']\r\n})\r\n\r\nexport class TextboxComponent extends FormControlBase implements OnInit, AfterViewInit, OnChanges {\r\n /**\r\n * Set the value of the input's autocomplete attribute\r\n */\r\n @Input() public autocomplete?: string = 'off';\r\n\r\n /**\r\n * The textbox type\r\n */\r\n @Input() public type?: TextboxType = \"text\";\r\n\r\n /**\r\n * The value of the textbox input's placeholder\r\n */\r\n @Input() public placeholder?: string;\r\n\r\n /**\r\n * The maximum number of characters allowed in the input\r\n * \r\n * This is for adding the attribute on the element to get the browser functionality\r\n * from the input. If you need the form to be validated before submission, apply the\r\n * maxLength validator to the form control.\r\n */\r\n @Input() public maxlength?: number;\r\n\r\n /**\r\n * The minimum number of characters allowed in the input\r\n * \r\n * This is for adding the attribute on the element to get the browser functionality\r\n * from the input. If you need the form to be validated before submission, apply the\r\n * minLength validator to the form control.\r\n */\r\n @Input() public minlength?: number;\r\n\r\n /**\r\n * The value of the rows attribute for a textarea. Only applies to multi-line type\r\n */\r\n @Input() public rows?: number = 3;\r\n\r\n /**\r\n * If set to true, we will select all text within the input if\r\n * autofocus is also set to true\r\n */\r\n @Input() public selectOnAutofocus?: boolean = false;\r\n\r\n /**\r\n * If set to true, we will upper case on focus out\r\n */\r\n @Input() public upperCase: boolean = false;\r\n\r\n /**\r\n * Validation pattern for the input. This is determined on the input type specified\r\n */\r\n public validationPattern: string = '';\r\n\r\n @ViewChild('textboxInput') protected inputElement!: ElementRef;\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper,\r\n protected translate: TranslateService\r\n ) {\r\n super(validationMessageService, formGroupHelper);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges) {\r\n super.ngOnChanges(changes);\r\n }\r\n /**\r\n\t * The angular onInit lifecycle hook\r\n\t */\r\n public ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n this.validationPattern = '';\r\n\r\n if (this.type === 'tel') {\r\n this.validationPattern = phoneNumberValidationPattern;\r\n } else if (this.type === 'url') {\r\n this.validationPattern = urlValidationPattern;\r\n }\r\n \r\n if (this.placeholder) {\r\n this.translate.get(this.placeholder)\r\n .subscribe((translated: string) => {\r\n this.placeholder = translated;\r\n })\r\n }\r\n }\r\n\r\n /**\r\n\t * The angular afterViewInit lifecycle hook\r\n\t */\r\n public ngAfterViewInit(): void {\r\n if (this.autofocus) {\r\n this.setFocus(this.selectOnAutofocus);\r\n }\r\n }\r\n\r\n /**\r\n * Function to set focus on an input programmatically after the page\r\n * had been rendered. The highlight text flag will select the text \r\n * within the input if passed in and true\r\n */\r\n public setFocus(highlightText?: boolean): void {\r\n this.inputElement.nativeElement.focus();\r\n\r\n if (highlightText) {\r\n this.inputElement.nativeElement.select();\r\n }\r\n }\r\n\r\n /**\r\n * Focus out event handler\r\n * will upper case and trim value if upperCase is true (this is what we do on the apis)\r\n */\r\n public focusOutEvent(): void {\r\n if (this.upperCase && this.formModel.value) {\r\n this.formModel.setValue(this.formModel.value.toUpperCase().trim());\r\n }\r\n }\r\n}","<div class=\"control control-label-{{labelPosition}}\"\r\n [ngClass]=\"{'is-readonly': readonly}\">\r\n\r\n <label *ngIf=\"label\">\r\n <span>{{label | translate}}</span>\r\n <span *ngIf=\"validationErrors.length > 0 && formModel.touched && formModel.invalid\">&nbsp;{{validationErrors |\r\n translate}}</span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n </label>\r\n\r\n <div class=\"input-wrapper control-input\">\r\n <input *ngIf=\"type !== 'multi_line'\"\r\n #textboxInput\r\n email=\"{{type === 'email' ? true : false}}\"\r\n pattern=\"{{validationPattern}}\"\r\n type=\"{{type}}\"\r\n tabindex=\"{{tabindex}}\"\r\n title=\"{{tooltip}}\"\r\n [attr.id]=\"inputId\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.placeholder]=\"placeholder\"\r\n [attr.maxlength]=\"maxlength\"\r\n [attr.minlength]=\"minlength\"\r\n [attr.required]=\"required ? required : null\"\r\n [formControl]=\"formModel\"\r\n [ngClass]=\"{'is-empty': !formModel?.value, 'is-pending': pending, 'is-uppercase': upperCase}\"\r\n (focusout)=\"focusOutEvent()\"\r\n [attr.cdkFocusInitial]=\"autofocus || null\">\r\n\r\n <textarea *ngIf=\"type === 'multi_line'\"\r\n [attr.rows]=\"rows\"\r\n #textboxInput\r\n tabindex=\"{{tabindex}}\"\r\n [attr.id]=\"inputId\"\r\n [attr.placeholder]=\"placeholder\"\r\n [attr.maxlength]=\"maxlength\"\r\n [attr.minlength]=\"minlength\"\r\n [attr.required]=\"required ? required : null\"\r\n [formControl]=\"formModel\"\r\n [ngClass]=\"{'is-empty': formModel?.value === '', 'is-pending': pending}\"\r\n [attr.cdkFocusInitial]=\"autofocus || null\">\r\n </textarea>\r\n\r\n <i class=\"ec-icon icon-required\"></i>\r\n <i class=\"ec-icon icon-invalid\"></i>\r\n <i class=\"ec-icon icon-loading\"></i>\r\n </div>\r\n</div>","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ec-spinner',\r\n templateUrl: './spinner.component.html',\r\n styleUrls: ['./spinner.component.scss']\r\n})\r\n\r\n/** Exposes the markup and styles that represent the spinner. No inputs or outputs defined because it is just a visual component*/\r\nexport class SpinnerComponent { }\r\n","<div class=\"spinner\">\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n</div>","import { Component, Input, TemplateRef } from '@angular/core';\r\nimport { NavItem } from '../../controls/navigation/nav-item';\r\nimport { DisplayStatus, ViewStatus } from '../../shared/display';\r\n\r\nexport class Overlay implements DisplayStatus {\r\n /** @deprecated Deprecated due to noDataTemplate being prefered */\r\n action?: NavItem;\r\n noDataTemplate?: TemplateRef<any>;\r\n displayAsMask?: boolean;\r\n status: ViewStatus = 'hasData';\r\n message?: string = '';\r\n\r\n /** Addition css classes to apply to the .overlay element */\r\n overlayClassList?: string;\r\n\r\n constructor(status: ViewStatus, message?: string) {\r\n this.setStatus(status, message);\r\n }\r\n setStatus(status: ViewStatus, message?: string, action?: NavItem, noDataTemplate?: TemplateRef<any>, overlayClassList?: string): void {\r\n this.status = status;\r\n this.message = message || '';\r\n this.action = action || undefined;\r\n this.noDataTemplate = noDataTemplate || undefined;\r\n this.overlayClassList = overlayClassList || '';\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Wraps content in order to show pending, error, and no data states with an optional message/noDataTemplate\r\n */\r\n@Component({\r\n selector: '[ecOverlay]',\r\n templateUrl: './view-overlay.component.html',\r\n styleUrls: ['./view-overlay.component.scss']\r\n})\r\nexport class ViewOverlayComponent implements Overlay {\r\n @Input() status: ViewStatus = 'hasData';\r\n @Input() message?: string | undefined;\r\n\r\n /** @deprecated Deprecated due to noDataTemplate being prefered */\r\n @Input() action?: NavItem | undefined;\r\n @Input() noDataTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Mask (not remove) the transcluded content from the dom while not hasData status.\r\n */\r\n @Input() displayAsMask?: boolean;\r\n\r\n /** \r\n * Additional css classes to apply to the .overlay element \r\n */\r\n @Input() overlayClassList?: string;\r\n\r\n setStatus(status: ViewStatus, message?: string, action?: NavItem, noDataTemplate?: TemplateRef<any>): void {\r\n this.status = status;\r\n this.message = message || '';\r\n this.action = action || undefined;\r\n this.noDataTemplate = noDataTemplate || undefined;\r\n }\r\n\r\n actionClicked(event: any): void {\r\n if (this.action && this.action.onClick) {\r\n this.action.onClick(event);\r\n }\r\n }\r\n}\r\n","<!-- Transcluded Content -->\r\n<ng-content *ngIf=\"displayAsMask || (!displayAsMask && status === 'hasData')\"></ng-content>\r\n<!--Used by GI tests to know the overlay status whether we use ngIf or mask version. No visual impact-->\r\n<span [hidden]=\"true\"\r\n\t class=\"overlay-status-{{status}}\"></span>\r\n<!-- Overlay goes last so it is rendered on top of preceding content due to source order -->\r\n<div *ngIf=\"status !== 'hasData'\"\r\n\t class=\"overlay flex-grow {{overlayClassList}}\"\r\n\t [ngClass]=\"{'not-mask': !displayAsMask,\r\n\t\t\t\t'overlay-error': status === 'error',\r\n\t\t\t\t'overlay-nodata': status === 'noData',\r\n\t\t\t\t'overlay-pending': status === 'pending'}\">\r\n\r\n\t<!--Pending Spinner-->\r\n\t<ec-spinner [hidden]=\"status !== 'pending'\"></ec-spinner>\r\n\r\n\t<ng-template [ngIf]=\"status === 'noData' && noDataTemplate\">\r\n\t\t<ng-container *ngTemplateOutlet=\"noDataTemplate\"></ng-container>\r\n\t</ng-template>\r\n\r\n\t<ng-container *ngIf=\"(status === 'noData' && !noDataTemplate) || status !== 'noData'\">\r\n\t\t<!--Status Message-->\r\n\t\t<div id=\"statusMessage\"\r\n\t\t\t class=\"message\"\r\n\t\t\t *ngIf=\"message\"\r\n\t\t\t [ngClass]=\"{'error': status === 'error', 'mt-1': status === 'pending'}\"\r\n\t\t\t [innerHtml]=\"message | translate\">\r\n\t\t</div>\r\n\r\n\t\t<!-- Action -->\r\n\t\t<ec-button type=\"common\"\r\n\t\t\t\t class=\"mt-3\"\r\n\t\t\t\t *ngIf=\"action?.onClick\"\r\n\t\t\t\t [icon]=\"action?.icon\"\r\n\t\t\t\t (clicked)=\"actionClicked($event)\"\r\n\t\t\t\t [label]=\"action?.label\"\r\n\t\t\t\t [hidden]=\"status === 'pending'\">\r\n\t\t</ec-button>\r\n\t</ng-container>\r\n\r\n</div>","import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, AfterViewInit, ViewChild, ElementRef, HostListener, TemplateRef } from '@angular/core';\r\nimport { UntypedFormControl, Validators, ValidatorFn } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { FormControlBase } from '../form-control-base';\r\nimport { Observable } from 'rxjs';\r\nimport { takeUntil, take } from 'rxjs/operators';\r\nimport { TextboxComponent } from '../textbox/textbox.component';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { MenuItem, MenuTemplateType, MenuHostElementClasses, MenuComponent } from '../menu/menu.component';\r\nimport { PopupContainerDirective, PopupStatus } from '../../shared/directives/popup/popup-container.directive';\r\nimport { ScrollService } from '../../core/scroll.service';\r\n\r\n/**\r\n * Position of the menu relative to the input\r\n */\r\nexport type ComboboxMenuPosition = \"top_right\" | \"top_left\" | \"bottom_left\" | \"bottom_right\";\r\n\r\n\r\n/**\r\n * The type of add new implementation. Static displays a simple static button while dynamic updates\r\n * the label of the button with value of the textbox\r\n */\r\ntype AddNewType = \"dynamic\" | \"static\" | boolean;\r\n\r\n/**\r\n * Options for configuring the \"Add new\" button when in static mode\r\n */\r\ntype AddNewOptions = {\r\n\tlabel?: string; \t/** A custom label to display in place of the default \"Add new...\" */\r\n\tclassList?: string; \t/** A string of space-separated utility classes we'll apply to the label */\r\n\ticon?: string; \t/** A custom icon to display in place of the default 'icon-add' */\r\n};\r\n\r\n\r\n/**\r\n * Select box (select, autocomplete, combobox)\r\n *\r\n * NOTE: Min/max length validation is implemented on the internal ec-textbox.\r\n * Values passed in via input properties (@see maxlength , @see minlength )\r\n * are used to create validators on the textbox. When the validation on the\r\n * textbox fails, the validation error(s) get passed up to the {@see formModel }.\r\n * When setting up this component's {@see FormControl }, you do NOT need to set the\r\n * Validators.minLength or Validators.maxLength validators.\r\n *\r\n * Required is also passed via input property, but you SHOULD also set up the\r\n * Validators.required validator on this component's FormControl.\r\n *\r\n * @export\r\n */\r\n@Component({\r\n\tselector: 'ec-combobox',\r\n\ttemplateUrl: 'combobox.component.html',\r\n\tstyleUrls: ['./combobox.component.scss']\r\n})\r\nexport class ComboboxComponent extends FormControlBase implements OnInit, OnChanges, AfterViewInit {\r\n\r\n\t/**\r\n\t * Close the popup menu on resize so the width and positioning can be recalculated\r\n\t * correctly. Cannot be placed on the popupDirective because of a bug where\r\n\t * HostListeners for global events don't fire\r\n\t * @see https://github.com/angular/angular/issues/14191\r\n\t */\r\n\t@HostListener('window:resize') onResize() {\r\n\t\tif (this.popup) this.popup.hide();\r\n\t}\r\n\r\n\t/**\r\n\t * Show the add new button in the popup\r\n\t */\r\n\t@Input() public addNew?: AddNewType;\r\n\r\n\t/** Configure the addNew button label & icon when addNew is true and set to static\r\n\t * Default is set to: { label: 'All new...', icon: 'icon-add'}\r\n\t * @see AddNewOptions\r\n\t * @memberof ComboboxComponent\r\n\t * @example\r\n\t * <ec-combobox [addNew]=\"true\" \r\n\t * \t [addNewOptions]=\"{ \r\n* \t\t\t\t\t\tlabel: 'Help me choose...',\r\n* \t\t\t\t\t\ticon: 'icon-search',\r\n* \t\t\t\t\t\tclassList: 'text-body-2 text-link' }\">\r\n\t * </ec-combobox>\r\n\t */\r\n\t@Input() public addNewOptions?: AddNewOptions = { \r\n\t\tlabel: 'Add new...',\r\n\t\ticon: 'icon-add',\r\n\t};\r\n\r\n\t/**\r\n\t * The maximum number of characters allowed in the input.\r\n\t *\r\n\t * @memberof TextboxComponent\r\n\t */\r\n\t@Input() public maxlength?: number;\r\n\r\n\r\n\t/**\r\n\t * Position of the menu relative to the text box\r\n\t * @default 'bottom_right'\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\t@Input() public menuPosition?: ComboboxMenuPosition = 'bottom_right';\r\n\r\n\r\n\t/**\r\n\t * The minimum number of characters allowed in the input\r\n\t *\r\n\t * @memberof TextboxComponent\r\n\t */\r\n\t@Input() public minlength?: number;\r\n\r\n\r\n\t/**\r\n\t * Items to show in combobox menu\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\t@Input() public options: Array<MenuItem> = [];\r\n\r\n\r\n\t/**\r\n\t * Display template for menu items\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\t@Input() public templateType: MenuTemplateType = 'label';\r\n\r\n\t/**\r\n * Optional custom template for the menu items. Must declare a template\r\n\t * input variable called \"item\" like so: <ng-template #templateName let-item>,\r\n\t * where item represents the menuItem.\r\n * Will override the choice for templateType if provided.\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n */\r\n @Input() public customMenuTemplate?: TemplateRef<any>;\r\n\r\n\t/**\r\n\t * When true, the menu items will preserve the icon space when there is no icon\r\n\t */\r\n\t@Input() public preserveIconSpace: boolean = false;\r\n\r\n\t/**\r\n\t * Position the menu as fixed, ideal when comboboxes are inside dialogs\r\n\t * Defaulting to true so all menus will be at least the width of the\r\n\t * textbox + button, but can grow wider if the inner elements need it\r\n\t */\r\n\t@Input() public popupFixed: boolean = true;\r\n\r\n\r\n\t/**\r\n\t * The total number of records from the datasource\r\n\t */\r\n\t@Input() public totalRecords?: number;\r\n\r\n\t/**\r\n\t * If set to true, we will upperCase the text box and apply the class on the add box\r\n\t */\r\n\t@Input() public upperCase: boolean = false;\r\n\r\n\r\n\t/**The placeholder to show in the combobox. Leave empty to use default behavior determined\r\n\t * by whether Add New is enabled\r\n\t */\r\n\t@Input() public placeholder: string = '';\r\n\r\n\t/** Observable to subscribe to when the combobox menu is opened for the first time */\r\n\t@Input() public loadOnOpenObservable?: Observable<MenuItem[]> | undefined;\r\n\r\n\t/** Do not display the toggle button when true */\r\n\t@Input() public hideToggleButton = false;\r\n\r\n\t/**\r\n\t * Always show the menu when the formModel has a value. Sets\r\n\t * hideToggleButton to true and menuStatus to visible as well.\r\n\t */\r\n\t@Input() public alwaysOpen = false;\r\n\r\n\t/**\r\n\t * Additonal classes to apply to the ec-menu element\r\n\t */\r\n\t@Input() public menuElementClasses: MenuHostElementClasses | string[] = [];\r\n\r\n\t/**\r\n\t * Additional classes to apply to the .textbox-group element\r\n\t */\r\n\t@Input() public textboxElementClasses: string[] = [];\r\n\r\n\t/** Hide 'No matches' message when true */\r\n\t@Input() public hideNoMatches: boolean = false;\r\n\r\n\t/**\r\n * Text to show when the menu is empty. \"No matches\" is the default.\r\n */\r\n @Input() public noMatchesText: string = 'NoMatches_SC';\r\n\r\n\t/**\r\n\t * Truncate menu items when true\r\n\t */\r\n\t@Input() public truncateItems: boolean = false;\r\n\r\n\t/**\r\n\t * Notify the parent that the add new button was clicked\r\n\t * @todo discuss if we need to send along the value or should\r\n\t * the parent get it from the formModel\r\n\t * (lwf 2017.07.13): I think we might as well send the value along and\r\n\t * leave it up to the parent to decide how to handle it.\r\n\t */\r\n\t@Output() public addNewClick: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n\r\n\t/**\r\n\t * Notify parent when text typed into textbox\r\n\t */\r\n\t@Output() public search: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n\r\n\t@ViewChild('textbox') public textbox!: TextboxComponent;\r\n\r\n\t/**\r\n\t * Access to the menu's component via the {@link PopupContainerDirective}\r\n\t */\r\n\t@ViewChild(PopupContainerDirective) private popup?: PopupContainerDirective;\r\n\r\n\r\n\t/**\r\n\t * Reference the add-new button element\r\n\t */\r\n\t@ViewChild('addNewButton') private addNewButton!: ElementRef;\r\n\r\n\r\n\t/**\r\n\t * Filtered Items to show in combobox menu\r\n\t */\r\n\tpublic filteredOptions: Array<MenuItem> = [];\r\n\r\n\r\n\t/**\r\n\t * Tracks if the menu is open or hidden\r\n\t */\r\n\tpublic menuStatus: PopupStatus = 'hidden';\r\n\r\n\r\n\t/**\r\n\t * Placeholder to assign to textbox\r\n\t */\r\n\tpublic effectivePlaceholder: string = '';\r\n\r\n\r\n\t/**\r\n\t * Reference to the currently-selected menu item\r\n\t */\r\n\tpublic selectedItem: MenuItem | null = null;\r\n\r\n\r\n\t/**\r\n\t * FormControl for the textbox\r\n\t */\r\n\tpublic textboxFormModel: UntypedFormControl = new UntypedFormControl('');\r\n\r\n\r\n\t/**\r\n\t * Tracks whether the add new button is selected\r\n\t */\r\n\tpublic addNewSelected: boolean = false;\r\n\r\n\r\n\t/**\r\n\t * Tracks whether the textboxFormModel value matches an item in the filteredOptions\r\n\t */\r\n\tpublic foundMatch: boolean = false;\r\n\r\n\t/**\r\n\t * Number of filtered options to display in the footer. Excludes headings.\r\n\t */\r\n\tpublic filteredOptionCount: number = 0;\r\n\r\n\t/**\r\n\t * Flat list of selectable items in the combobox.\r\n\t * Does not include headings or divider-section items.\r\n\t */\r\n\tprivate selectableItems: MenuItem[] = [];\r\n\r\n\t/**\r\n\t * Index of the currently-selected options\r\n\t */\r\n\tprivate selectedItemIndex: number = -1;\r\n\r\n\t/** Placeholder text for 'Choose or Add...' */\r\n\tprivate chooseOrAddPlaceholder: string = '';\r\n\r\n\t/** Placeholder text for 'Choose' */\r\n\tprivate choosePlaceholder: string = '';\r\n\r\n\tprivate hasDataBeenLoadedOnOpen: boolean = false;\r\n\r\n\tconstructor(\r\n\t\tprotected validationMessageService: ValidationMessageService,\r\n\t\tprotected formGroupHelper: FormGroupHelper,\r\n\t\tprotected translate: TranslateService,\r\n\t\tprotected scrollService: ScrollService\r\n\t) {\r\n\t\tsuper(validationMessageService, formGroupHelper);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * The angular onChanges lifecycle event\r\n\t * @see https://angular.io/guide/lifecycle-hooks\r\n\t */\r\n\tpublic ngOnChanges(changes: SimpleChanges): void {\r\n\t\tsuper.ngOnChanges(changes);\r\n\r\n\t\t// when options changes\r\n\t\tif (changes.options) {\r\n\t\t\tthis.resetOptions();\r\n\r\n\t\t\t// Update the popup position\r\n\t\t\tif (this.popup) {\r\n\t\t\t\tthis.popup.update();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// update validators on the textbox\r\n\t\tif (changes.required || changes.minlength || changes.maxlength) {\r\n\t\t\tthis.setTextboxFormModelValidators();\r\n\t\t}\r\n\r\n\t\t// Update placeholder text when 'Add New' is conditional.\r\n\t\t// ngOnChanges() kicks off before ngOnInit, so in order\r\n\t\t// to not overwrite a user-provided placeholder, do not\r\n\t\t// update placeholder on first change (ngOnInit will take care of it).\r\n\t\tif ((changes.addNew && !changes.addNew.isFirstChange()) || changes.placeholder) {\r\n\t\t\tthis.updatePlaceholderText();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * The angular onInit lifecycle hook\r\n\t * @see https://angular.io/guide/lifecycle-hooks\r\n\t */\r\n\tpublic ngOnInit(): void {\r\n\t\tsuper.ngOnInit();\r\n\r\n\t\tif (this.alwaysOpen) {\r\n\t\t\tthis.hideToggleButton = true;\r\n\t\t\tthis.menuStatus = 'visible';\r\n\t\t}\r\n\r\n\t\t// Get translated placeholder text\r\n\t\tthis.chooseOrAddPlaceholder = `${this.translate.instant('Choose or add')}...`;\r\n\t\tthis.choosePlaceholder = `${this.translate.instant('Choose')}`;\r\n\r\n\t\tthis.formModelChanged(this.formModel.value);\r\n\t\tthis.setTextboxFormModelValidators();\r\n\r\n\t\t// Errors for this component are displayed via the validationErrors property, which is\r\n\t\t// populated when translateValidationMessages is run.\r\n\t\t// When the internal TextboxComponent has validation errors, we set them on the\r\n\t\t// formModel as well. This updates the validity of our ComboboxComponent control,\r\n\t\t// but does not trigger translation. Subscribe to statusChanges here so component\r\n\t\t// validation errors will appear along with the ComboboxComponent's label.\r\n\t\tthis.formModel.valueChanges.pipe(\r\n\t\t\ttakeUntil(this.componentDestroyed)\r\n\t\t).subscribe(data => this.formModelChanged(data));\r\n\r\n\t\tthis.textboxFormModel.statusChanges.pipe(\r\n\t\t\ttakeUntil(this.componentDestroyed)\r\n\t\t).subscribe(data => this.setFormModelValidationErrors(data));\r\n\r\n\t\t// default placeholder\r\n\t\tthis.updatePlaceholderText();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * The angular afterViewInit lifecycle hook\r\n\t * @see https://angular.io/guide/lifecycle-hooks\r\n\t */\r\n\tpublic ngAfterViewInit(): void {\r\n\t\tif (!this.popup) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// allow overflow out of the scrollParent\r\n\t\t// prevents menu from obscuring the combobox\r\n\t\tlet popperOptions: Popper.PopperOptions = {\r\n\t\t\tmodifiers: {\r\n\t\t\t\tpreventOverflow: {\r\n\t\t\t\t\tboundariesElement: 'viewport'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// convert the ComboboxMenuPosition into a PopperPlacement\r\n\t\tswitch (this.menuPosition) {\r\n\t\t\tcase (\"top_left\"):\r\n\t\t\t\tpopperOptions.placement = 'top-start';\r\n\t\t\t\tbreak;\r\n\t\t\tcase (\"top_right\"):\r\n\t\t\t\tpopperOptions.placement = 'top-end';\r\n\t\t\t\tbreak;\r\n\t\t\tcase (\"bottom_left\"):\r\n\t\t\t\tpopperOptions.placement = 'bottom-start';\r\n\t\t\t\tbreak;\r\n\t\t\tcase (\"bottom_right\"):\r\n\t\t\t\tpopperOptions.placement = 'bottom-end';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Error(`Invalid menuPosition for ComboboxComponent.`)\r\n\t\t}\r\n\r\n\t\t// Scroll the menu to the selected item once the popup menu is ready\r\n\t\tpopperOptions.onCreate = () => {\r\n\t\t\tthis.scrollMenu();\r\n\r\n\t\t\tif (this.popupFixed) {\r\n\t\t\t\tthis.popup!.fixPosition();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.popupFixed) {\r\n\t\t\tpopperOptions.onUpdate = () => {\r\n\t\t\t\tthis.popup!.fixPosition();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.popup.popperOptions = popperOptions;\r\n\r\n\t\tthis.popup.popperStatusChange.pipe(\r\n\t\t\ttakeUntil(this.componentDestroyed)\r\n\t\t).subscribe((event: 'visible' | 'hidden') => {\r\n\t\t\t\tthis.menuStatus = event;\r\n\r\n\t\t\t\t// Synchronize the formModel and textFormModel values when the\r\n\t\t\t\t// popup menu closes and un-filter the options and reset the\r\n\t\t\t\t// selectedItem and index\r\n\t\t\t\tif (event === 'hidden') {\r\n\t\t\t\t\tthis.syncModelValues();\r\n\t\t\t\t\tthis.resetOptions();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Set errors on the textboxFormModel, which will then set errors on the\r\n\t * formModel. Also mark the formModel as touched to display any errors.\r\n\t * @param errors key(s) of ValidationMessageService errors to display or remove\r\n\t * @memberof ComoboboxComponent\r\n\t */\r\n\tpublic setErrors(errors: { [key: string]: boolean }): void {\r\n\t\tthis.textboxFormModel.setErrors(errors);\r\n\t\tthis.formModel.markAsTouched();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Unfilter options and update the selectedItem and selectedItemIndex\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tpublic resetOptions(options?: MenuItem[]): void {\r\n\t\tthis.filteredOptions = options || this.options;\r\n\t\tthis.selectableItems = MenuComponent.getSelectableItems(this.filteredOptions);\r\n\t\t// do not count headings\r\n\t\tthis.filteredOptionCount = this.filteredOptions?.filter(o => o.display !== 'heading' && o.display !== 'divided-section').length || 0;\r\n\r\n\t\t//if they have no search term, don't try to select anything so they can clear the box out by hitting enter\r\n\t\t//if they have a search term and the options changed, select an option from the menu so they will get it automatically if they hit enter\r\n\t\tif (this.textboxFormModel.value !== '') {\r\n\t\t\tthis.selectedItemIndex = this.findDefaultSelectionIndex(this.selectableItems, this.textboxFormModel.value);\r\n\t\t\tthis.selectedItem = this.selectableItems[this.selectedItemIndex] || null;\r\n\t\t\tthis.scrollMenu(this.selectedItemIndex);\r\n\t\t} else {\r\n\t\t\t//if they have no search term and the options are reset, don't auto-pick the first one\r\n\t\t\t//so that enter will allow them to wipe out their last selection\r\n\t\t\tthis.clearSelectedItem();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Listen to the selected changed event from {@link MenuComponent} and update the form\r\n\t * model and close menu\r\n\t */\r\n\tpublic selectedChanged(item: MenuItem): void {\r\n\t\tthis.setFormModelValue(item);\r\n\t\tthis.toggleMenu();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Show and hide the popup menu\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tpublic toggleMenu(event?: Event): void {\r\n\t\tif (!this.popup) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (event) {\r\n\t\t\tevent.stopPropagation();\r\n\t\t}\r\n\r\n\t\tif (!this.formModel.disabled) {\r\n\t\t\tif (this.menuStatus === 'visible') {\r\n\t\t\t\t// When the popup is hidden it will emit its changed status and\r\n\t\t\t\t// we will reset values if need be.\r\n\t\t\t\tthis.popup.hide();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (this.loadOnOpenObservable && !this.hasDataBeenLoadedOnOpen) {\r\n\t\t\t\t\tthis.pending = true;\r\n\r\n\t\t\t\t\tthis.loadOnOpenObservable.pipe(take(1)).subscribe((result: MenuItem[]) => {\r\n\t\t\t\t\t\tthis.hasDataBeenLoadedOnOpen = true;\r\n\r\n\t\t\t\t\t\tthis.pending = false;\r\n\t\t\t\t\t\tthis.options = result;\r\n\r\n\t\t\t\t\t\tthis.resetOptions();\r\n\t\t\t\t\t\tthis.popup!.show();\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.popup.show();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic onBlur(): void {\r\n\t\tthis.formModel.markAsTouched();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Control the menu with keyboard navigation\r\n\t *\r\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key#Example | KeyboardEvent.key}\r\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values | Key Values}\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tpublic keyNavigate(event: KeyboardEvent): void {\r\n\t\tswitch (event.key) {\r\n\t\t\tcase \"ArrowDown\":\r\n\t\t\tcase \"Down\":\r\n\t\t\tcase \"ArrowUp\":\r\n\t\t\tcase \"Up\":\r\n\t\t\t\tevent.stopPropagation();\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tthis.onArrowDownUp(event);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"Backspace\":\r\n\t\t\tcase \"Delete\":\r\n\t\t\tcase \"Del\":\r\n\t\t\t\tif (this.menuStatus === 'hidden') {\r\n\t\t\t\t\tthis.toggleMenu();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Tab\":\r\n\t\t\t\t// If tabbing from the textbox to the button, override the textbox as being\r\n\t\t\t\t// marked touched so we don't see the invalid state. Only show the invalid state\r\n\t\t\t\t// when tabbing out of combobox from the button or back tabbing from the textbox\r\n\t\t\t\t// if (event.key === 'Tab' && event.srcElement && event.srcElement.tagName === 'INPUT') {\r\n\t\t\t\t// \tif (event.shiftKey) {\r\n\t\t\t\t// \t\tthis.textboxFormModel.markAsTouched();\r\n\t\t\t\t// \t\tthis.formModel.markAsTouched();\r\n\t\t\t\t// \t} else {\r\n\t\t\t\t// \t\tthis.textboxFormModel.markAsUntouched();\r\n\t\t\t\t// \t}\r\n\t\t\t\t// } else if (event.key === 'Tab' && event.srcElement && event.srcElement.tagName === 'BUTTON') {\r\n\t\t\t\t// \tif (!event.shiftKey) {\r\n\t\t\t\t// \t\tthis.formModel.markAsTouched();\r\n\t\t\t\t// \t}\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif (this.menuStatus === 'visible') {\r\n\t\t\t\t\t//if the selected option is the add new button let it fire but don't allow\r\n\t\t\t\t\t//the tab event to carry them forward from wherever they land - they would skip the first box on the add new form\r\n\t\t\t\t\t//In the normal case we want to allow the default behavior or they won't be able to tab out of the control at all.\r\n\t\t\t\t\tif(this.addNewSelected){\r\n\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.commitSelection(event);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"Enter\":\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\tif (this.menuStatus === 'visible') {\r\n\t\t\t\t\tthis.commitSelection(event);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"Escape\":\r\n\t\t\tcase \"Esc\":\r\n\t\t\t\tif (this.menuStatus === 'visible') {\r\n\t\t\t\t\t// Just close the menu, do not focus the next element on tab\r\n\t\t\t\t\t// unless the menu is hidden\r\n\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t// Close the menu before we reset selectedItem so we don't see the highlight changing\r\n\t\t\t\t\t// when reset the selected item back to the formModel\r\n\t\t\t\t\tthis.toggleMenu();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \" \":\r\n\t\t\tcase \"Spacebar\":\r\n\t\t\t\tif (this.menuStatus === 'hidden') {\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\tthis.toggleMenu();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif (this.menuStatus === 'hidden' && event.key !== 'Shift') {\r\n\t\t\t\t\tthis.toggleMenu();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Facilitates adding items to a combobox\r\n\t *\r\n\t * @param addFn Function from parent that should make an API request to add a new item to the combobox's options\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tpublic async addNewItem(addFn: () => Promise<void>) {\r\n this.pending = true;\r\n try {\r\n await addFn();\r\n }\r\n catch (e) {\r\n // We gave it our best try, something is really whack, so let's just set the error\r\n this.setErrors({ 'addnew': true });\r\n }\r\n this.pending = false;\r\n this.toggleMenu();\r\n }\r\n\r\n\t/**\r\n\t * Figure out whether they are adding new or have an item selected, and commit it to the form model\r\n\t */\r\n private commitSelection(event: KeyboardEvent): void {\r\n\t\tif (this.addNewSelected) {\r\n\t\t\tevent.stopPropagation();\r\n\t\t\tthis.onAddNew(event);\r\n\t\t} else {\r\n\t\t\tthis.setFormModelValue(this.selectedItem);\r\n\t\t\tthis.toggleMenu();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Send the current value of the textbox to the parent when the add new button is\r\n\t * clicked\r\n\t *\r\n\t * @param event Add new button click or enter key event\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tpublic onAddNew(event: Event): void {\r\n\t\tevent.stopPropagation();\r\n\t\tthis.addNewSelected = false;\r\n\t\tthis.addNewClick.emit(this.textboxFormModel.value);\r\n\t\tthis.popup?.hide();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Navigate the dropdown menu using up and down arrow keys\r\n\t *\r\n\t * @param event Up or down arrow keydown event\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate onArrowDownUp(event: KeyboardEvent): void {\r\n\t\tswitch (event.key) {\r\n\t\t\tcase \"ArrowDown\":\r\n\t\t\tcase \"Down\":\r\n\t\t\t\tif (this.selectedItemIndex === -1 && this.addNewButton && !this.addNewButton.nativeElement.hidden && !this.addNewSelected) {\r\n\t\t\t\t\tthis.addNewSelected = true;\r\n\t\t\t\t} else if (this.selectedItemIndex < this.selectableItems.length - 1) {\r\n\t\t\t\t\tthis.selectedItemIndex++;\r\n\r\n\t\t\t\t\tif (this.addNewSelected) {\r\n\t\t\t\t\t\tthis.addNewSelected = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"ArrowUp\":\r\n\t\t\tcase \"Up\":\r\n\t\t\t\tif (this.selectedItemIndex === -1 && this.addNewButton && !this.addNewButton.nativeElement.hidden && this.addNewSelected) {\r\n\t\t\t\t\tthis.addNewSelected = false;\r\n\t\t\t\t} else if (this.selectedItemIndex > -1) {\r\n\t\t\t\t\tthis.selectedItemIndex--;\r\n\r\n\t\t\t\t\tif (this.selectedItemIndex === -1 && this.addNewButton && !this.addNewButton.nativeElement.hidden) {\r\n\t\t\t\t\t\tthis.addNewSelected = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.selectedItem = this.selectableItems[this.selectedItemIndex];\r\n\r\n\t\tif (this.menuStatus === 'hidden') {\r\n\r\n\t\t\tthis.setFormModelValue(this.selectedItem);\r\n\t\t} else {\r\n\t\t\tthis.scrollMenu();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t/**\r\n\r\n\t * Filter array of options by label or caption (contains)\r\n\t *\r\n\t * @param filterText The value of textbox that we will filter our options by\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate filterOptionsArray(filterText: string): Array<MenuItem> {\r\n\t\tlet searchText = filterText.toLowerCase();\r\n\t\tif (filterText && filterText !== '') {\r\n\t\t\tconst matchesSearch = (item: MenuItem) => item.label.toLowerCase().indexOf(searchText) >= 0 || (item.caption && item.caption.toLowerCase().indexOf(searchText) >= 0);\r\n\t\t\treturn this.options.reduce((filteredItems, item) => {\r\n\t\t\t\t// Match the item itself if it doesn't have any children\r\n\t\t\t\tif (!item.items?.length && matchesSearch(item)) {\r\n\t\t\t\t\tfilteredItems.push(item);\r\n\t\t\t\t// If we have children, filter them and add the parent if it has any children that match\r\n\t\t\t\t} else if (item.items?.length && (item.display === 'heading' || item.display === 'divided-section')) {\r\n\t\t\t\t\tconst filteredChildItems = item.items.filter(matchesSearch);\r\n\t\t\t\t\tif (filteredChildItems.length) {\r\n\t\t\t\t\t\t// Need to clone the parent item with the filtered children so we don't modify the original\r\n\t\t\t\t\t\tfilteredItems.push({...item, items: filteredChildItems});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn filteredItems;\r\n\t\t\t}, <MenuItem[]>[]);\r\n\t\t} else {\r\n\t\t\treturn this.options;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Find a given item's index in the filtered items array.\r\n\t *\r\n\t * Returns -1 if not found\r\n\t * @param item The matching item to find in the\r\n\t * filterdOptions array. Will use the selectedItem if nothing is passed.\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate findSelectedItemIndex(item?: MenuItem): number {\r\n\t\tlet itemToFind = item ? item : this.selectedItem;\r\n\r\n\t\tif (itemToFind) {\r\n\t\t\treturn this.selectableItems.findIndex(item => {\r\n\t\t\t\tif(item.id && (<MenuItem>itemToFind).id) {\r\n\t\t\t\t\treturn item.label === (<MenuItem>itemToFind).label && item.id === (<MenuItem>itemToFind).id\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn item.label === (<MenuItem>itemToFind).label;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * React to our formModel changing\r\n\t *\r\n\t * The formModel represents the currently selected ModelItem\r\n\t * When changed, set the value of the TextboxComponent and\r\n\t * find index of item in options list.\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate formModelChanged(data?: MenuItem): void {\r\n\t\tthis.synchronizeDisabledAttributes();\r\n\r\n\t\tif (data) {\r\n\t\t\tthis.textboxFormModel.setValue(data.selectedLabel || data.label);\r\n\r\n\t\t\tthis.selectedItemIndex = this.findSelectedItemIndex(data);\r\n\t\t\tif (this.selectedItemIndex >= 0) {\r\n\t\t\t\tthis.selectedItem = this.selectableItems[this.selectedItemIndex];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//The host wiped out the data externally, clear the textbox and the tracking state\r\n\t\t\tthis.textboxFormModel.reset();\r\n\t\t\tthis.clearSelectedItem();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Scroll the menu if the current selectedItemIndex is out of view\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate scrollMenu(knownIndex?: number): void {\r\n\t\tif (this.filteredOptions.length > 0) {\r\n\t\t\t// Update the selectedItemIndex in case our options changed\r\n\t\t\tthis.selectedItemIndex = knownIndex === undefined ? this.findSelectedItemIndex() : knownIndex;\r\n\r\n\t\t\tif (this.selectedItemIndex > -1 && this.selectedItem) {\r\n\t\t\t\t// The menu component will automatically generate ids for the menu items if they dont have them,\r\n\t\t\t\t// so they need to be accounted for here since the combobox doesn't know about those ids\r\n\t\t\t\tlet itemId = this.selectedItem.id ? this.selectedItem.id : MenuComponent.getIndexedItemId(this.filteredOptions, this.selectedItem, `${this.id}_menu`);\r\n\r\n\t\t\t\t//trigger the scrolling after a tick to allow the menu to be up to date (and pending mask cleared) before measuring\r\n\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\tthis.scrollService.scrollItemCentered(`#${this.id}_menu_list`, `#${itemId}`);\r\n\t\t\t\t}, 0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.selectedItem = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Search/Filter based on textbox input\r\n\t * NOTE: so as not to receive a notification on every key event, we suggest you debounce your\r\n\t * subscription\r\n\t * @see {@link http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-debounceTime | Observable.debounceTime}\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate searchAndFilter(searchText?: string): void {\r\n\r\n\t\t// always emit\r\n\t\tthis.search.emit(searchText);\r\n\r\n\t\t// do internal filtering if no one's subscribed to our search emitter\r\n\t\tif (this.search.observers.length === 0 && searchText !== undefined) {\r\n\t\t\tthis.resetOptions(this.filterOptionsArray(searchText));\r\n\r\n\t\t\tif (this.addNewSelected && !this.addNewButton) {\r\n\t\t\t\tthis.addNewSelected = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Set {@link formModel }'s validation errors equal to the internal textbox's.\r\n\t *\r\n\t * When the internal textbox is invalid, need to set this control's\r\n\t * errors because we are using our own label, not TextboxControl's.\r\n\t * We use our own label so label text will wrap at the end of the button,\r\n\t * not at the end of the textbox.\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate setFormModelValidationErrors(data?: any): void {\r\n\t\tif (this.textboxFormModel.invalid) {\r\n\t\t\tthis.formModel.setErrors(this.textboxFormModel.errors);\r\n\t\t} else {\r\n\t\t\tthis.formModel.setErrors(null);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Update the form model value with the selected item or reset form model value if item is null\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate setFormModelValue(item: MenuItem | null): void {\r\n\t\tthis.textboxFormModel.setValue(item ? (item.selectedLabel || item.label) : '');\r\n\t\tthis.formModel.setValue(item);\r\n\t\tthis.formModel.markAsDirty();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Set validators on the {@see textboxFormModel }\r\n\t *\r\n\t * Validators are currently set based on the {@see maxlength },\r\n\t * {@see minlength }, and {@see required } inputs. This works well\r\n\t * with {@see TextboxComponent }, which needs these inputs to apply\r\n\t * the proper attributes to its inputs.\r\n\t *\r\n\t * A future release of Angular will supposedly add these attributes\r\n\t * for you, which will eliminate the need for TextboxComponent to have\r\n\t * such inputs. This component, however, will still need these inputs\r\n\t * as there is no current way to know which validators are applied to it\r\n\t * from its parent View Component.\r\n\t *\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate setTextboxFormModelValidators(): void {\r\n\t\tlet validators: Array<ValidatorFn> = [];\r\n\r\n\t\tif (this.required) {\r\n\t\t\tvalidators.push(Validators.required);\r\n\t\t}\r\n\r\n\t\tif (this.minlength) {\r\n\t\t\tvalidators.push(Validators.minLength(this.minlength));\r\n\t\t}\r\n\r\n\t\tif (this.maxlength) {\r\n\t\t\tvalidators.push(Validators.maxLength(this.maxlength));\r\n\t\t}\r\n\r\n\t\tthis.textboxFormModel.setValidators(validators);\r\n\r\n\t\tthis.textboxFormModel.updateValueAndValidity();\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Keep textbox's disabled status in-sync with combobox's\r\n\t *\r\n\t * {@link TextboxComponent} gets its disabled status from its {@link FormControl}\r\n\t *\r\n\t * @memberof ComboboxComponent\r\n\t */\r\n\tprivate synchronizeDisabledAttributes(): void {\r\n\t\tif (this.formModel.disabled !== this.textboxFormModel.disabled) {\r\n\t\t\tif (this.formModel.disabled) {\r\n\t\t\t\tthis.textboxFormModel.disable();\r\n\t\t\t} else {\r\n\t\t\t\tthis.textboxFormModel.enable();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * If the formModel value and textbox value do not match, reset the textbox and selectedItem to\r\n\t * the formModle value. If there is no formModel value, make sure we clear the textbox. Reset the\r\n\t * filteredOptions to the full list and update the selectedItemIndex\r\n\t *\r\n\t */\r\n\tprivate syncModelValues(): void {\r\n\t\t// If there is a formModel value, reset the selected item. If there isn't, make\r\n\t\t// sure we clear the textbox\r\n\t\tconst newLabel = this.formModel.value?.selectedLabel || this.formModel.value?.label;\r\n\t\tif (this.formModel.value && (newLabel !== this.textboxFormModel.value)) {\r\n\t\t\tthis.textboxFormModel.setValue(newLabel);\r\n\t\t} else if (!this.formModel.value) {\r\n\t\t\tthis.textboxFormModel.setValue('');\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Search and filter the options list when the value of the textbox input changes. If addNew is\r\n\t * set also check for matches in our filteredOptions to conditionally show and hide the add new\r\n\t * button\r\n\t *\r\n\t * @see https://developer.mozilla.org/en-US/docs/Web/Events/input\r\n\t */\r\n\tpublic textboxValueChanged(event: Event): void {\r\n\t\tthis.searchAndFilter(this.textboxFormModel.value);\r\n\r\n\t\tif (this.textboxFormModel.value === '') {\r\n\t\t\tthis.clearSelectedItem();\r\n\t\t}\r\n\r\n\t\tif (this.addNew) {\r\n\t\t\tlet match = this.filteredOptions.find((option) => {\r\n\t\t\t\treturn option.label.toLowerCase() === this.textboxFormModel.value.toLowerCase();\r\n\t\t\t});\r\n\t\t\tthis.foundMatch = match ? true : false;\r\n\t\t}\r\n\r\n\t\t// Update the popup menu position when input value changes\r\n\t\tif (this.popup) {\r\n\t\t\tthis.popup.update();\r\n\t\t}\r\n\t}\r\n\r\n\tprivate clearSelectedItem(): void {\r\n\t\tthis.selectedItem = null;\r\n\t\tthis.selectedItemIndex = -1;\r\n\t}\r\n\r\n\t/**Recompute what the placeholder should be based on whether the user provided one and the current state of the addNew input */\r\n\tprivate updatePlaceholderText(){\r\n\t\tif (this.placeholder) {\r\n\t\t\tthis.effectivePlaceholder = this.translate.instant(this.placeholder);\r\n\t\t} else if (this.addNew) {\r\n\t\t\tthis.effectivePlaceholder = this.chooseOrAddPlaceholder;\r\n\t\t} else {\r\n\t\t\tthis.effectivePlaceholder = this.choosePlaceholder;\r\n\t\t}\r\n\t}\r\n\r\n\t/**Find the option we want to be the default selection. If there is an exact match, use that\r\n\t * otherwise if there are items, return zero to indicate the first item. Otherwise return -1\r\n\t * to indicate no selection\r\n\t */\r\n\tprivate findDefaultSelectionIndex(options: MenuItem[], searchText: string): number {\r\n\t\tlet index = -1;\r\n\r\n\t\tif(options && options.length){\r\n\t\t\tindex = options.findIndex(option=>option != null);\r\n\r\n\t\t\tif(searchText){\r\n\t\t\t\tsearchText = searchText.toLowerCase().trim();\r\n\t\t\t\tlet exactMatchIndex = options.findIndex(option=>option.label.toLowerCase() == searchText);\r\n\t\t\t\tif(exactMatchIndex >=0){\r\n\t\t\t\t\tindex = exactMatchIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn index;\r\n\t}\r\n\r\n}\r\n","<div class=\"control control-label-{{labelPosition}}\"\r\n [ngClass]=\"{'open': menuStatus === 'visible',\r\n 'invalid': formModel.touched && formModel.invalid,\r\n 'has-icon': ((templateType === 'iconAndLabel' || templateType === 'iconLabelCaption') && formModel.value && formModel.value.icon && formModel.value.label === textboxFormModel.value),\r\n 'is-readonly': readonly,\r\n 'is-disabled': formModel.disabled,\r\n 'is-always-open': alwaysOpen}\">\r\n\r\n <label *ngIf=\"label\">\r\n <span>{{label | translate}}</span>\r\n <span *ngIf=\"validationErrors.length > 0 && formModel.touched && formModel.invalid\">&nbsp;{{validationErrors}}</span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n </label>\r\n\r\n <ng-container *ngIf=\"alwaysOpen; else popupTarget\">\r\n <div class=\"textbox-group control-input\"\r\n [ngClass]=\"textboxElementClasses\">\r\n <ng-container *ngTemplateOutlet=\"textbox\"></ng-container>\r\n </div>\r\n\r\n <ng-container *ngIf=\"filteredOptions.length > 0 || textboxFormModel.value\">\r\n <ng-container *ngTemplateOutlet=\"dropdownmenu\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #popupTarget>\r\n <div class=\"textbox-group control-input\"\r\n [ngClass]=\"textboxElementClasses\"\r\n *ecPopup=\"dropdownmenu\">\r\n <ng-container *ngTemplateOutlet=\"textbox\"></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #textbox>\r\n <i class=\"ec-icon {{formModel.value?.icon}}\"></i>\r\n\r\n <ec-textbox class=\"textbox-group-input mb-0\"\r\n #textbox\r\n [id]=\"id\"\r\n [autofocus]=\"autofocus\"\r\n [formModel]=\"textboxFormModel\"\r\n [maxlength]=\"maxlength\"\r\n [minlength]=\"minlength\"\r\n [placeholder]=\"effectivePlaceholder\"\r\n [required]=\"required\"\r\n [tabindex]=\"tabindex\"\r\n [readonly]=\"readonly\"\r\n (input)=\"textboxValueChanged($event)\"\r\n (keydown)=\"keyNavigate($event)\"\r\n (focusout)=\"onBlur()\"\r\n [upperCase]=\"upperCase\"\r\n [pending]=\"pending && alwaysOpen\"\r\n [autocomplete]=\"'off'\"></ec-textbox>\r\n\r\n <ec-button class=\"textbox-group-btn-right\"\r\n *ngIf=\"!hideToggleButton\"\r\n [id]=\"id + '_button'\"\r\n [disabled]=\"formModel.disabled\"\r\n icon=\"icon-caret-down\"\r\n [tabindex]=\"-1\"\r\n type=\"secondary\"\r\n (click)=\"toggleMenu($event)\"\r\n (keydown)=\"keyNavigate($event)\"\r\n [class.active]=\"menuStatus === 'visible'\"></ec-button>\r\n</ng-template>\r\n\r\n<ng-template #dropdownmenu>\r\n <div class=\"popup\"\r\n ecOverlay\r\n [status]=\"pending && !alwaysOpen ? 'pending' : 'hasData'\">\r\n\r\n <button class=\"add-new {{addNewOptions?.classList}}\"\r\n id=\"{{id}}_addNew\"\r\n #addNewButton\r\n [class.is-selected]=\"addNewSelected\"\r\n *ngIf=\"addNew\"\r\n [hidden]=\"foundMatch || (addNew === 'dynamic' && (!textboxFormModel.value || (formModel.value && textboxFormModel.value === formModel.value.label)))\"\r\n (click)=\"onAddNew($event)\">\r\n <span class=\"add-new-label ec-util-truncate\">\r\n <span *ngIf=\"addNew === 'static' || addNew === true\"\r\n translate>{{addNewOptions?.label}}\r\n </span>\r\n <span *ngIf=\"addNew === 'dynamic'\">{{'Add' | translate}} <strong class=\"ec-util-truncate\"\r\n [ngClass]=\"{'text-uppercase': upperCase}\">{{textboxFormModel.value}}</strong>\r\n </span>\r\n </span>\r\n <i class=\"ec-icon {{addNewOptions?.icon}}\"></i>\r\n </button>\r\n\r\n <ec-menu id=\"{{id}}_menu\"\r\n [class.border-top-0]=\"!filteredOptions.length && hideNoMatches\"\r\n [ngClass]=\"menuElementClasses\"\r\n [templateType]=\"templateType\"\r\n [customMenuTemplate]=\"customMenuTemplate\"\r\n [showNoItems]=\"!hideNoMatches\"\r\n [noDataText]=\"noMatchesText\"\r\n [items]=\"filteredOptions\"\r\n [selected]=\"selectedItem\"\r\n (selectedChanged)=\"selectedChanged($event)\"\r\n [preserveIconSpace]=\"preserveIconSpace\"\r\n [truncateItems]=\"truncateItems\"></ec-menu>\r\n\r\n <footer *ngIf=\"totalRecords && totalRecords > filteredOptions.length && filteredOptions.length > 0\">\r\n <span>{{filteredOptionCount}} {{'of' | translate}} {{totalRecords}}</span>\r\n </footer>\r\n </div>\r\n</ng-template>","import { AfterViewInit, Component, ContentChild, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewEncapsulation } from '@angular/core';\r\nimport { AbstractControl, FormControlDirective } from '@angular/forms';\r\n\r\n@Component({\r\n selector: 'ec-form-control',\r\n templateUrl: './form-control.component.html',\r\n styleUrls: ['./form-control.component.scss'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class FormControlComponent implements AfterViewInit {\r\n @ContentChild(FormControlDirective) formControlDirective?: AbstractControl;\r\n \r\n @Input() public id: string = '';\r\n @Input() icon?: string;\r\n @Input() actionIcon?: string;\r\n @Input() showClear = true;\r\n @Input('formModel') formModelInput?: AbstractControl;\r\n @Input() autofocus = false;\r\n \r\n @Input() @HostBinding('class.is-pending') pending = false;\r\n @Input() @HostBinding('class.is-required') required = false;\r\n @Input() @HostBinding('class.is-readonly') readonly = false;\r\n \r\n @HostBinding('class.is-empty') get empty():boolean { return !this._formModel?.value && this._formModel?.value !== 0};\r\n @HostBinding('class.is-invalid') get invalid(): boolean { return this._formModel?.touched == true && this._formModel.invalid == true};\r\n @HostBinding('class.is-disabled') get disabled(): boolean { return this._formModel?.disabled == true };\r\n \r\n @Output() actionClicked: EventEmitter<Event> = new EventEmitter<Event>();\r\n\r\n private get _formModel() {\r\n return this.formModelInput || this.formControlDirective;\r\n }\r\n\r\n constructor(private el: ElementRef) { }\r\n\r\n ngAfterViewInit() {\r\n if (!this._formModel) {\r\n console.error('Missing [formModel] input or [formControl] directive on ec-form-control content.');\r\n }\r\n\r\n if (this.autofocus) {\r\n this.focus();\r\n }\r\n }\r\n\r\n @HostListener('click')\r\n onClick() {\r\n this.focus();\r\n }\r\n\r\n focus() {\r\n const el = this.el.nativeElement as HTMLElement;\r\n const inputs = el.querySelectorAll<HTMLElement>('input, textarea, select');\r\n if (inputs.length) {\r\n inputs.item(0).focus();\r\n }\r\n }\r\n\r\n clear() {\r\n this._formModel?.reset();\r\n }\r\n}\r\n","<ng-content></ng-content>\r\n<i id=\"{{id + '_icon'}}\" class=\"ec-form-control-icon ec-icon {{icon}}\"></i>\r\n<i id=\"{{id + '_loading'}}\" class=\"ec-form-control-icon ec-icon icon-loading\"></i>\r\n<i id=\"{{id + '_required'}}\" class=\"ec-form-control-icon ec-icon icon-required\"></i>\r\n<i id=\"{{id + '_invalid'}}\" class=\"ec-form-control-icon ec-icon icon-invalid\"></i>\r\n<button *ngIf=\"showClear\"\r\n id=\"{{id + '_clear'}}\"\r\n [attr.disabled]=\"disabled || undefined\"\r\n class=\"ec-form-control-clear\"\r\n (click)=\"clear()\">\r\n <i class=\"ec-icon icon-cancel\"></i>\r\n</button>\r\n<button *ngIf=\"actionIcon\"\r\n id=\"{{id + '_action'}}\"\r\n [attr.disabled]=\"disabled || undefined\"\r\n class=\"ec-form-control-action\"\r\n (click)=\"actionClicked.emit($event)\">\r\n <i class=\"ec-icon {{actionIcon}}\"></i>\r\n</button>\r\n<div class=\"ec-focus-ring\"></div>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'button[ecLinkButton]',\r\n template: `<ng-content></ng-content>`,\r\n styleUrls: ['./link-button.component.scss']\r\n})\r\nexport class LinkButtonComponent { }\r\n","import { InteractivityChecker } from '@angular/cdk/a11y';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { AfterViewInit, Directive, ElementRef, EventEmitter, Inject, Input, OnChanges, OnDestroy, Output } from '@angular/core';\r\nimport { fromEvent, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\n@Directive({\r\n selector: '[ecKeyboardNavContainer]',\r\n exportAs: 'ecKeyboardNavContainer'\r\n})\r\n/**\r\n * A basic helper directive to determine when focus leaves the host element.\r\n * \r\n * NOTE: This directive utilizes hidden anchor elements. These will disrupt tab order for elements\r\n * within a form. It is recommended to only use this directive when you need to redirect focus when\r\n * focus leaves a container. Also make sure this directive is disabled when the focus out events\r\n * are not needed to avoid keyboard nav problems. \r\n */\r\nexport class KeyboardNavContainerDirective implements OnChanges, AfterViewInit, OnDestroy {\r\n\r\n @Input('ecKeyboardNavContainer') enabled: boolean = true;\r\n\r\n @Output() focusOutStart = new EventEmitter();\r\n @Output() focusOutEnd = new EventEmitter();\r\n\r\n private startAnchor: HTMLElement;\r\n private endAnchor: HTMLElement;\r\n\r\n private destroyed = new Subject<void>();\r\n\r\n constructor(\r\n private hostEl: ElementRef<HTMLElement>,\r\n @Inject(DOCUMENT) private _document: Document,\r\n private interactivityChecker: InteractivityChecker,\r\n ) {\r\n // Create the start and end anchors.\r\n this.startAnchor = this._document.createElement('div');\r\n this.endAnchor = this._document.createElement('div');\r\n // Hide the anchors from screen readers.\r\n this.startAnchor.setAttribute('aria-hidden', 'true');\r\n this.endAnchor.setAttribute('aria-hidden', 'true');\r\n }\r\n\r\n ngOnChanges(): void {\r\n this.toggleAnchors(this.enabled);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // Insert the anchors into the DOM before and after the host element.\r\n this.hostEl.nativeElement.parentNode?.insertBefore(this.startAnchor, this.hostEl.nativeElement);\r\n this.hostEl.nativeElement.parentNode?.insertBefore(this.endAnchor, this.hostEl.nativeElement.nextSibling);\r\n\r\n // Listen for focus events on the anchors.\r\n fromEvent(this.startAnchor, 'focus').pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(() => this.focusOutStart.emit());\r\n\r\n fromEvent(this.endAnchor, 'focus').pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(() => this.focusOutEnd.emit());\r\n\r\n this.toggleAnchors(this.enabled);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.complete();\r\n // Cleanup the anchors\r\n this.startAnchor.remove();\r\n this.endAnchor.remove();\r\n }\r\n\r\n public focus() {\r\n const firstFocusableElement = this.getFirstFocusableElement(this.hostEl.nativeElement);\r\n firstFocusableElement?.focus();\r\n }\r\n\r\n private getFirstFocusableElement(element: HTMLElement): HTMLElement | null {\r\n // These are only possibly focusable. Some may be disabled or not visible.\r\n const elements = element.querySelectorAll<HTMLElement>('input, textarea, select, button, a, [tabindex], [contenteditable]');\r\n\r\n // Use the Angular CDK interactivity checker to determine if an element is actually focusable and tabbable.\r\n // This checks for disabledness among other things.\r\n const first = Array.from(elements).find(el => {\r\n return this.interactivityChecker.isFocusable(el) && this.interactivityChecker.isTabbable(el);\r\n });\r\n\r\n return first || null;\r\n }\r\n\r\n private toggleAnchors(enabled: boolean) {\r\n // Make the anchors focusable if the container is enabled and we have subscribers for the events.\r\n // Otherwise, remove the tabindexes so they cannot receive focus and disrupt the tab order.\r\n if (enabled && this.focusOutStart.observers.length > 0) {\r\n this.startAnchor.setAttribute('tabindex', '0');\r\n } else {\r\n this.startAnchor.removeAttribute('tabindex');\r\n }\r\n\r\n if (enabled && this.focusOutEnd.observers.length > 0) {\r\n this.endAnchor.setAttribute('tabindex', '0');\r\n } else {\r\n this.endAnchor.removeAttribute('tabindex');\r\n }\r\n }\r\n}\r\n","import { CdkConnectedOverlay, Overlay } from '@angular/cdk/overlay';\r\nimport { Component, ElementRef, HostBinding, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { FormControl, FormControlStatus, FormGroup, ValidationErrors } from '@angular/forms';\r\nimport moment from 'moment';\r\nimport { lastValueFrom } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';\r\nimport { KeyboardNavContainerDirective } from '../../../public-api';\r\nimport { DateTimeHelper } from '../../core/date-time-helper';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { UserPreferenceService } from '../../shared/user-preference.service';\r\nimport { Calendar } from '../calendar/calendar.types';\r\nimport { FormControlBase } from '../form-control-base';\r\nimport { DateInputSelectionStrategyBase } from './date-input-selection-strategies/date-input-selection-strategy-base';\r\nimport { DateInput } from './date-input.types';\r\n\r\n@Component({\r\n selector: 'ec-date-input',\r\n templateUrl: './date-input.component.html',\r\n styleUrls: ['./date-input.component.scss'],\r\n providers: [DateInput.SelectionStrategies]\r\n})\r\nexport class DateInputComponent extends FormControlBase implements OnInit, OnChanges {\r\n\r\n @HostBinding('attr.id')\r\n @Input() public id: string = '';\r\n\r\n /** The form control provided by the hosting form. */\r\n @Input() public formModel: DateInput.FormModel = new FormControl(null);\r\n\r\n @Input() public minDate: Date = DateTimeHelper.minDatePickerDate;\r\n @Input() public maxDate: Date = DateTimeHelper.maxDatePickerDate;\r\n\r\n /** The initial selection mode for the calendar. Defaults to day if not provided */\r\n @Input() selectionMode: DateInput.SelectionMode = 'day';\r\n\r\n /** The available selection modes for the calendar. Defaults to only the initial selection mode if not provided. */\r\n @Input() selectionModeOptions: DateInput.SelectionMode[] = ['day'];\r\n\r\n /** \r\n * When a date is provided, enables the 'quick select' button.\r\n * Clicking the button will shift the selected date range to the provided date.\r\n */\r\n @Input() quickSelectDate?: Date;\r\n\r\n /** Enables the next/previous selection buttons. */\r\n @Input() enableSteppers: boolean = false;\r\n\r\n /** The form group for the internal textboxes. Textbox2 is only used for ranges. */\r\n public textboxGroup: DateInput.TextboxGroup = new FormGroup({\r\n textbox: new FormControl<string | null>(null),\r\n textbox2: new FormControl<string | null>(null)\r\n });\r\n\r\n /**\r\n * The current calendar selection.\r\n * Updated when the user clicks on a calendar item or when the date entered into the textbox is parsed.\r\n */\r\n public calendarSelection: DateInput.Selection | null = null;\r\n\r\n /** Controls whether the calendar overlay is open or not. */\r\n public isCalendarOpen = false;\r\n\r\n /** Placeholder for the textbox. Updated to reflect the user's date display preference. */\r\n public placeholder: string = 'MM/DD/YYYY';\r\n\r\n /** Overlay scroll strategy for the calendar overlay. Closes the calendar on scroll. */\r\n public overlayScrollStrategy = this.overlayService.scrollStrategies.close();\r\n\r\n public primaryCalendarView: Calendar.View = { mode: 'day', date: new Date() };\r\n public secondaryCalendarView: Calendar.View = { mode: 'day', date: new Date() };\r\n\r\n public primaryCalendarMaxDate: Date = DateTimeHelper.maxDatePickerDate;\r\n public secondaryCalendarMinDate: Date = DateTimeHelper.minDatePickerDate;\r\n\r\n public disableSteppers: boolean = false;\r\n\r\n public selectionStrategy!: DateInputSelectionStrategyBase;\r\n\r\n /** \r\n * Date parsing formats for user-entered dates. Defaults to month-first formats, but is updated in onInit\r\n * to use the user's preferred date format.\r\n */\r\n private parseFormats: string[] = DateTimeHelper.getMomentParseFormats();\r\n\r\n @ViewChild('calendar') calendar?: KeyboardNavContainerDirective;\r\n @ViewChild('controls') controls?: KeyboardNavContainerDirective;\r\n\r\n /** Reference to the overlay directive (see template). Used to update the overlay position on validation changes. */\r\n @ViewChild('overlay') overlay?: CdkConnectedOverlay;\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper,\r\n private userPreferenceService: UserPreferenceService,\r\n private el: ElementRef,\r\n private overlayService: Overlay,\r\n private selectionStrategies: DateInput.SelectionStrategies\r\n ) {\r\n super(validationMessageService, formGroupHelper);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.selectionMode && !changes.selectionMode.isFirstChange()) {\r\n this.onSelectionModeChange(this.selectionMode);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n // Setup\r\n super.ngOnInit();\r\n this.setDateFormats();\r\n this.setSelectionMode(this.selectionMode);\r\n\r\n // Subscriptions\r\n this.onFormModelStatusChanges();\r\n this.onFormModelValueChanges();\r\n this.onTextboxValueChanges();\r\n\r\n // Sync the initial disabled status and value of the textbox\r\n this.syncTextboxControlDisabledStatus(this.formModel.status);\r\n const initialDisplayValue = this.selectionStrategy.formatSelection(this.formModel.value);\r\n this.textboxGroup.patchValue(initialDisplayValue, { emitEvent: false });\r\n\r\n // Update the calendar selection and view based on the initial form model value\r\n this.calendarSelection = this.formModel.value;\r\n this.updateCalendars(this.calendarSelection);\r\n this.updateSteppers(this.calendarSelection);\r\n }\r\n\r\n /** Focuses the input whenever the calendar is shift-tabbed out of. */\r\n public onCalendarFocusOutStart() {\r\n this.focusInput();\r\n }\r\n\r\n /** Closes the calendar and focuses the input whenever the calendar is tabbed out of. */\r\n public onCalendarFocusOutEnd() {\r\n this.isCalendarOpen = false;\r\n this.focusInput();\r\n }\r\n\r\n /** Closes the calendar if the user clicks outside of the calendar and date input. */\r\n public onOverlayOutsideClick(event: MouseEvent) {\r\n // Do not close the calendar if the click was within the date input or action button\r\n const rect = this.el.nativeElement.getBoundingClientRect();\r\n const clickedOutsideControl = event.clientY < rect.top ||\r\n event.clientY > rect.bottom ||\r\n event.clientX < rect.left ||\r\n event.clientX > rect.right;\r\n // It's possible that the user hit enter on the action button instead of clicking with the mouse.\r\n // In this case the \"click\" event will be outside of the component because the clientx and y are 0,\r\n // but we don't want to close in this case because button clicks trigger calendar open/close separately.\r\n const targetId = (<HTMLElement>event.target).id;\r\n const isActionClick = targetId === `${this.id}_action` || targetId === `${this.id}_control2_action`;\r\n\r\n if (!isActionClick && clickedOutsideControl) {\r\n this.isCalendarOpen = false;\r\n }\r\n }\r\n\r\n /** If the user tabs out of the form control's action button and the calendar is open, focus the first item in the calendar overlay */\r\n public onControlsFocusOutEnd() {\r\n if (this.isCalendarOpen) {\r\n this.calendar?.focus();\r\n }\r\n }\r\n\r\n public onTextboxBlur() {\r\n // We want to prevent the fixed date range modes from re-autocompleting the first textbox when it is explicitly cleared.\r\n const previousValue = DateInput.isSelectionRange(this.formModel.value) ? this.formModel.value.start : this.formModel.value;\r\n const currentValue = this.textboxGroup.value.textbox;\r\n const cleared = !!previousValue && !currentValue;\r\n const options: DateInput.ParsingOptions = { preventAutoComplete: cleared };\r\n\r\n // Parse the textbox values into a selection and update the form model\r\n const parsedSelection = this.selectionStrategy.parseTextboxValues(this.textboxGroup.value, this.parseFormats, options);\r\n this.updateFormModel(parsedSelection);\r\n }\r\n\r\n public onTextbox2Blur() {\r\n // We want to prevent the fixed date range modes from re-autocompleting the second textbox when it is explicitly cleared.\r\n const previousValue = DateInput.isSelectionRange(this.formModel.value) ? this.formModel.value.end : null;\r\n const currentValue = this.textboxGroup.value.textbox2;\r\n const cleared = !!previousValue && !currentValue;\r\n const options: DateInput.ParsingOptions = { parseFromEnd: true, preventAutoComplete: cleared };\r\n\r\n // Parse the textbox values into a selection and update the form model,\r\n // For the second box we're keying the parse from the end date in the selection.\r\n const parsedSelection = this.selectionStrategy.parseTextboxValues(this.textboxGroup.value, this.parseFormats, options);\r\n this.updateFormModel(parsedSelection);\r\n }\r\n\r\n public onSelectionModeChange(mode: DateInput.SelectionMode) {\r\n this.setSelectionMode(mode);\r\n const newSelection = this.selectionStrategy.getNewSelectionFromExisting(this.calendarSelection);\r\n this.updateFormModel(newSelection);\r\n\r\n // On selection mode change, we want to force the calendars to show the right view mode for the new selection.\r\n // This prevents the user from seeing a view mode that doesn't make sense for the new selection,\r\n // Like when swiching from year mode to last 7 days mode.\r\n this.primaryCalendarView = { mode: this.selectionStrategy.selectionViewMode, date: this.primaryCalendarView.date };\r\n this.secondaryCalendarView = { mode: this.selectionStrategy.selectionViewMode, date: this.secondaryCalendarView.date };\r\n this.updateCalendarMinMaxDates();\r\n }\r\n\r\n public onCalendarDateSelected(date: Date) {\r\n const newSelection = this.selectionStrategy.getSelectionFromDate(date, this.calendarSelection);\r\n const displayValue = this.selectionStrategy.formatSelection(newSelection);\r\n // Don't emit events when patching values here. We don't want to trigger the calendar updates since the calendar is already\r\n // showing the selected date. We also don't want to trigger the textbox parsing logic since the date was selected from the calendar.\r\n this.textboxGroup.patchValue(displayValue, { emitEvent: false });\r\n this.formModel.patchValue(newSelection, { emitEvent: false });\r\n this.calendarSelection = newSelection;\r\n this.updateSteppers(newSelection);\r\n\r\n // Close the calendar if the selection mode is not a range mode where either the start or the end date can be changed.\r\n if (!this.selectionStrategy.showSecondaryTextbox) {\r\n this.isCalendarOpen = false;\r\n this.focusInput();\r\n }\r\n }\r\n\r\n public onPrimaryCalendarViewChange(view: Calendar.View) {\r\n this.primaryCalendarView = view;\r\n this.updateCalendarMinMaxDates();\r\n }\r\n\r\n public onSecondaryCalendarViewChange(view: Calendar.View) {\r\n this.secondaryCalendarView = view;\r\n this.updateCalendarMinMaxDates();\r\n }\r\n\r\n /** Shifts the calendar views to display today. Does not update the calendar selection. */\r\n public goToToday() {\r\n // If both calendars are visible, show today in the secondary calendar and the month before in the primary calendar.\r\n if (this.selectionStrategy.showSecondaryCalendar) {\r\n this.primaryCalendarView = { mode: 'day', date: moment().subtract(1, 'month').toDate() };\r\n this.secondaryCalendarView = { mode: 'day', date: new Date() };\r\n // If we're in a single date mode, show today in the primary calendar.\r\n } else {\r\n this.primaryCalendarView = { mode: 'day', date: new Date() };\r\n }\r\n this.updateCalendarMinMaxDates();\r\n }\r\n\r\n public goToQuickSelectDate() {\r\n if (this.quickSelectDate) {\r\n const newSelection = this.selectionStrategy.getSelectionForQuickSelectDate(this.quickSelectDate, this.calendarSelection);\r\n this.updateFormModel(newSelection);\r\n }\r\n }\r\n\r\n public nextSelection() {\r\n const newSelection = this.selectionStrategy.getNextSelection(this.calendarSelection);\r\n this.updateFormModel(newSelection);\r\n }\r\n\r\n public previousSelection() {\r\n const newSelection = this.selectionStrategy.getPreviousSelection(this.calendarSelection);\r\n this.updateFormModel(newSelection);\r\n }\r\n\r\n private updateFormModel(value: DateInput.Selection | null) {\r\n this.formModel.patchValue(value);\r\n\r\n // Validate the textboxes and sync the form errors\r\n // We do this after patching the form model because the form model patch will trigger\r\n // the date formatting logic and overwrite any errors on the controls from before.\r\n this.validateTextboxes();\r\n this.syncFormErrors();\r\n }\r\n\r\n private onFormModelStatusChanges() {\r\n // Keep the textboxControl disabled status in sync with the formModel\r\n this.formModel.statusChanges.pipe(\r\n distinctUntilChanged(),\r\n takeUntil(this.componentDestroyed)\r\n ).subscribe(status => {\r\n this.syncTextboxControlDisabledStatus(status);\r\n\r\n if (this.isCalendarOpen) {\r\n // As validation messages appear/disappear, the date input may have shifted up or down on the page.\r\n // Update the overlay position to ensure it's still aligned with the textbox and not blocking it.\r\n // Settimeout is needed to ensure the overlay is being updated after the message is rendered.\r\n setTimeout(() => {\r\n this.overlay?.overlayRef?.updatePosition();\r\n });\r\n }\r\n });\r\n }\r\n\r\n private onFormModelValueChanges() {\r\n // Update the calendar selection textbox value with a formatted date when the form model changes.\r\n // This is triggered by the user selecting a date from the calendar or when the textbox is blurred.\r\n this.formModel.valueChanges.pipe(\r\n takeUntil(this.componentDestroyed)\r\n ).subscribe(value => {\r\n const displayValue = this.selectionStrategy.formatSelection(value);\r\n // Don't emit an event when setting the textbox value to avoid circular updates between the textbox and form model.\r\n this.textboxGroup.patchValue(displayValue, { emitEvent: false });\r\n this.updateCalendars(value);\r\n this.updateSteppers(value);\r\n });\r\n }\r\n\r\n private onTextboxValueChanges() {\r\n // Update the calendar selection when the textbox value changes to update the calendar.\r\n // We don't patch the formModel here because we don't want to trigger the\r\n // date formatting logic and overwrite the user's input.\r\n // We'll do that when the user blurs out of the textbox. See onTextboxBlur()\r\n this.textboxGroup.controls.textbox.valueChanges.pipe(\r\n debounceTime(300),\r\n distinctUntilChanged(),\r\n takeUntil(this.componentDestroyed)\r\n ).subscribe(() => {\r\n const options: DateInput.ParsingOptions = { shiftToCurrentYearIfBelow: this.minDate };\r\n const newSelection = this.selectionStrategy.parseTextboxValues(this.textboxGroup.value, this.parseFormats, options);\r\n\r\n // Calendar selection will be null if the dates are invalid. Don't update the calendars in this case.\r\n if (newSelection) {\r\n this.calendarSelection = newSelection;\r\n this.updatePrimaryCalendar(this.calendarSelection, this.selectionStrategy.showSecondaryCalendar);\r\n this.updateCalendarMinMaxDates();\r\n }\r\n });\r\n\r\n // The second textbox is only used in last7Days, last28Days, and range modes.\r\n this.textboxGroup.controls.textbox2.valueChanges.pipe(\r\n debounceTime(300),\r\n distinctUntilChanged(),\r\n takeUntil(this.componentDestroyed)\r\n ).subscribe(() => {\r\n const options: DateInput.ParsingOptions = { shiftToCurrentYearIfBelow: this.minDate, parseFromEnd: true };\r\n const newSelection = this.selectionStrategy.parseTextboxValues(this.textboxGroup.value, this.parseFormats, options);\r\n\r\n // Calendar selection will be null if the dates are invalid. Don't update the calendars in this case.\r\n if (newSelection) {\r\n this.calendarSelection = newSelection;\r\n // The secondary calendar is only shown in range mode. Update the primary calendar if we're not in range mode.\r\n if (this.selectionStrategy.showSecondaryCalendar) {\r\n this.updateSecondaryCalendar(this.calendarSelection, true);\r\n } else {\r\n this.updatePrimaryCalendar(this.calendarSelection);\r\n }\r\n this.updateCalendarMinMaxDates();\r\n }\r\n });\r\n }\r\n\r\n private syncTextboxControlDisabledStatus(status: FormControlStatus) {\r\n // The textbox should only be disabled if the form model is disabled.\r\n // All other statuses are considered enabled.\r\n if (status === 'DISABLED' && this.textboxGroup.enabled) {\r\n this.textboxGroup.disable();\r\n } else if (status !== 'DISABLED' && this.textboxGroup.disabled) {\r\n this.textboxGroup.enable();\r\n }\r\n };\r\n\r\n private syncFormErrors() {\r\n // Start with the existing form model errors\r\n let errors = this.formModel.errors;\r\n\r\n // Add the errors from the textboxes if they exist\r\n if (this.textboxGroup.controls.textbox.errors) {\r\n errors = { ...errors, ...this.textboxGroup.controls.textbox.errors };\r\n }\r\n if (this.textboxGroup.controls.textbox2.errors) {\r\n errors = { ...errors, ...this.textboxGroup.controls.textbox2.errors };\r\n }\r\n\r\n // Update the form model's errors with the combined errors\r\n this.formModel.setErrors(errors);\r\n\r\n // Update the form model's touched and dirty status based on the textbox's status.\r\n // Since the user interacts with a control that is internal to this component, the\r\n // form model's status won't be updated automatically.\r\n if (this.textboxGroup.touched && !this.formModel.touched) {\r\n this.formModel.markAsTouched();\r\n }\r\n if (this.textboxGroup.dirty && !this.formModel.dirty) {\r\n this.formModel.markAsDirty();\r\n }\r\n }\r\n\r\n /** \r\n * Updates the date parsing formats and placeholder based on the user's display preference.\r\n * NOTE: This is async because we're retrieving the user's preferences. We're not awaiting the result\r\n * because the only logic that depends on this is the text box date parsing logic and placeholder.\r\n * Our forms should always be behind a pending overlay, so the user won't be able to interact with the\r\n * form until the user is loaded anyway.\r\n */\r\n private async setDateFormats() {\r\n const { preference } = await lastValueFrom(this.userPreferenceService.getPreferences());\r\n const dateFormat = preference?.dateFormat;\r\n this.placeholder = dateFormat ?? this.placeholder;\r\n this.parseFormats = DateTimeHelper.getMomentParseFormats(dateFormat);\r\n }\r\n\r\n /** Focuses the date input. */\r\n private focusInput() {\r\n this.controls?.focus();\r\n }\r\n\r\n private setSelectionMode(mode: DateInput.SelectionMode) {\r\n this.selectionMode = mode;\r\n this.selectionStrategy = this.selectionStrategies[mode];\r\n }\r\n\r\n /**\r\n * Sets the max date for the primary calendar and the min date for the secondary calendar based\r\n * on the current views in each. This prevents the user from moving the calendars out of order.\r\n */\r\n private updateCalendarMinMaxDates() {\r\n // Only update the min/max dates when the view mode is 'day'.\r\n // When a calendar is in a month or year view mode, the view dates at the beginning of the year.\r\n // This would cause the dates in the other calendar to be unselectable if we were to\r\n // update the min/max dates in these cases.\r\n if (this.primaryCalendarView?.mode === 'day') {\r\n this.secondaryCalendarMinDate = moment(this.primaryCalendarView?.date).add(1, 'month').startOf('month').toDate();\r\n }\r\n if (this.secondaryCalendarView?.mode === 'day') {\r\n this.primaryCalendarMaxDate = moment(this.secondaryCalendarView?.date).subtract(1, 'month').endOf('month').toDate();\r\n }\r\n }\r\n\r\n private updateCalendars(selection: DateInput.Selection | null) {\r\n this.calendarSelection = selection;\r\n this.updatePrimaryCalendar(selection);\r\n // Only shift the primary calendar if we're showing the secondary calendar\r\n this.updateSecondaryCalendar(selection, this.selectionStrategy.showSecondaryCalendar);\r\n\r\n this.updateCalendarMinMaxDates();\r\n }\r\n\r\n private updatePrimaryCalendar(selection: DateInput.Selection | null, shiftSecondary: boolean = false) {\r\n this.primaryCalendarView = this.selectionStrategy.getPrimaryCalendarView(selection, this.minDate, this.maxDate, this.primaryCalendarView);\r\n\r\n // When entering a date into the first textbox, we really only want to update the primary calendar.\r\n // However, it's possible that the new date is after the secondary calendar's date. In this case,\r\n // We want to shift the secondary calendar so the calendars stay in order.\r\n if (shiftSecondary && this.secondaryCalendarView) {\r\n if (moment(this.primaryCalendarView.date).isSameOrAfter(this.secondaryCalendarView.date, 'month')) {\r\n let newSecondaryDate = moment(this.primaryCalendarView.date).add(1, 'month').toDate();\r\n this.secondaryCalendarView = { mode: this.selectionStrategy.selectionViewMode, date: newSecondaryDate };\r\n }\r\n }\r\n }\r\n\r\n private updateSecondaryCalendar(selection: DateInput.Selection | null, shiftPrimary: boolean = false) {\r\n this.secondaryCalendarView = this.selectionStrategy.getSecondaryCalendarView(selection, this.minDate, this.maxDate, this.secondaryCalendarView);\r\n\r\n // When entering a date into the second textbox, we really only want to update the secondary calendar.\r\n // However, it's possible that the new date is before the primary calendar's date. In this case,\r\n // We want to shift the primary calendar so the calendars stay in order.\r\n if (shiftPrimary && this.primaryCalendarView) {\r\n if (moment(this.primaryCalendarView.date).isSameOrAfter(this.secondaryCalendarView.date, 'month')) {\r\n let newPrimaryDate = moment(this.secondaryCalendarView.date).subtract(1, 'month').toDate();\r\n this.primaryCalendarView = { mode: this.selectionStrategy.selectionViewMode, date: newPrimaryDate };\r\n }\r\n }\r\n }\r\n\r\n private updateSteppers(value: DateInput.Selection | null) {\r\n // Disable the steppers if we either don't have a selection or only have one date in the selection.\r\n if (\r\n !value ||\r\n (DateInput.isSelectionSingleDate(value) && this.selectionMode !== 'day') ||\r\n (DateInput.isSelectionRange(value) && (!value.start || !value.end))\r\n ) {\r\n this.disableSteppers = true;\r\n } else {\r\n this.disableSteppers = false;\r\n }\r\n }\r\n\r\n private validateTextboxes() {\r\n const control = this.textboxGroup.controls.textbox;\r\n const control2 = this.textboxGroup.controls.textbox2;\r\n\r\n // The first textbox should only have the required error if it's empty and the date input is required,\r\n // or if the date input is not required and the second control is visible and has a value (meaning a partial range)\r\n if (\r\n !control.value &&\r\n (this.required || (control2.value && this.selectionStrategy.showSecondaryTextbox))\r\n ) {\r\n control.setErrors({ required: true });\r\n }\r\n // The same idea applies to the second textbox, but only if it's visible\r\n if (\r\n this.selectionStrategy.showSecondaryTextbox &&\r\n !control2.value &&\r\n (this.required || control.value)\r\n ) {\r\n control2.setErrors({ required: true });\r\n }\r\n\r\n if (control.value) {\r\n const errors = this.validateDateString(control.value);\r\n if (errors) {\r\n control.setErrors(errors);\r\n }\r\n }\r\n\r\n if (control2.value && this.selectionStrategy.showSecondaryTextbox) {\r\n const errors = this.validateDateString(control2.value);\r\n if (errors) {\r\n control2.setErrors(errors);\r\n }\r\n }\r\n }\r\n\r\n private validateDateString(date: string): ValidationErrors | null {\r\n const value = this.selectionStrategy.parseString(date, this.parseFormats);\r\n if (value) {\r\n // We're using the view mode as the granularity. We don't want to invalidate\r\n // the date in the case where you have a month/quarter/year selected and the min\r\n // or max date is somewhere within that month/quarter/year.\r\n if (moment(value).isBefore(this.minDate, this.selectionStrategy.selectionViewMode)) {\r\n return { minDate: { minValue: this.minDate } };\r\n } else if (moment(value).isAfter(this.maxDate, this.selectionStrategy.selectionViewMode)) {\r\n return { maxDate: { maxValue: this.maxDate } };\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","<label *ngIf=\"label\">\r\n <span>{{label | translate}}</span>\r\n <span *ngIf=\"validationErrors.length > 0 && formModel.touched && formModel.invalid\">&nbsp;{{validationErrors}}</span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n</label>\r\n\r\n<div class=\"d-flex align-items-center\"\r\n [ecKeyboardNavContainer]=\"isCalendarOpen\"\r\n #controls=\"ecKeyboardNavContainer\"\r\n (focusOutEnd)=\"onControlsFocusOutEnd()\">\r\n <ec-form-control id=\"{{id}}\"\r\n [required]=\"required\"\r\n [autofocus]=\"autofocus\"\r\n [pending]=\"pending\"\r\n [readonly]=\"readonly\"\r\n (actionClicked)=\"isCalendarOpen = !isCalendarOpen\"\r\n [showClear]=\"false\"\r\n actionIcon=\"icon-date\"\r\n cdkOverlayOrigin\r\n #overlayOrigin=\"cdkOverlayOrigin\"\r\n class=\"flex-grow\"\r\n style=\"height: 2rem;\">\r\n <input id=\"{{id}}_input\"\r\n type=\"text\"\r\n placeholder=\"{{placeholder}}\"\r\n [formControl]=\"textboxGroup.get('textbox')\"\r\n (blur)=\"onTextboxBlur()\">\r\n </ec-form-control>\r\n\r\n <ng-container *ngIf=\"selectionStrategy.showSecondaryTextbox\">\r\n <span class=\"flex-shrink mx-1\">&ndash;</span>\r\n <ec-form-control id=\"{{id}}_control2\"\r\n [required]=\"required\"\r\n [autofocus]=\"autofocus\"\r\n [pending]=\"pending\"\r\n [readonly]=\"readonly\"\r\n (actionClicked)=\"isCalendarOpen = !isCalendarOpen\"\r\n [showClear]=\"false\"\r\n actionIcon=\"icon-date\"\r\n class=\"flex-grow\"\r\n style=\"height: 2rem;\">\r\n <input id=\"{{id}}_input2\"\r\n type=\"text\"\r\n placeholder=\"{{placeholder}}\"\r\n [formControl]=\"textboxGroup.get('textbox2')\"\r\n (blur)=\"onTextbox2Blur()\">\r\n </ec-form-control>\r\n </ng-container>\r\n\r\n <div *ngIf=\"enableSteppers\"\r\n class=\"control-group ml-2\">\r\n <ec-button id=\"{{id}}_previousSelection\"\r\n type=\"secondary\"\r\n icon=\"icon-angle-down rotate-90\"\r\n (clicked)=\"previousSelection()\"\r\n [disabled]=\"isCalendarOpen || disableSteppers || formModel?.disabled\">\r\n </ec-button>\r\n <ec-button id=\"{{id}}_nextSelection\"\r\n type=\"secondary\"\r\n icon=\"icon-angle-down rotate-270\"\r\n (clicked)=\"nextSelection()\"\r\n [disabled]=\"isCalendarOpen || disableSteppers || formModel?.disabled\">\r\n </ec-button>\r\n </div>\r\n\r\n <ec-button *ngIf=\"quickSelectDate\"\r\n id=\"{{id}}_quickSelect\"\r\n icon=\"icon-day\"\r\n type=\"secondary\"\r\n title=\"{{'DateInput_LatestDataAvailableTitle' | translate}}\"\r\n (clicked)=\"goToQuickSelectDate()\"\r\n class=\"ml-2\">\r\n </ec-button>\r\n</div>\r\n\r\n<ng-template cdkConnectedOverlay\r\n #overlay=\"cdkConnectedOverlay\"\r\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\r\n [cdkConnectedOverlayOpen]=\"isCalendarOpen\"\r\n [cdkConnectedOverlayScrollStrategy]=\"overlayScrollStrategy\"\r\n cdkConnectedOverlayPanelClass=\"my-1\"\r\n (overlayOutsideClick)=\"onOverlayOutsideClick($event)\"\r\n (detach)=\"isCalendarOpen = false\">\r\n <article id=\"{{id}}_datePicker\"\r\n class=\"card d-flex\"\r\n [ecKeyboardNavContainer]=\"isCalendarOpen\"\r\n #calendar=\"ecKeyboardNavContainer\"\r\n (focusOutStart)=\"onCalendarFocusOutStart()\"\r\n (focusOutEnd)=\"onCalendarFocusOutEnd()\">\r\n <ul *ngIf=\"selectionModeOptions.length > 1\"\r\n class=\"selection-mode-menu border-right p-1\">\r\n <li *ngFor=\"let option of selectionModeOptions\">\r\n <button id=\"{{id}}_selectionMode_{{option}}\"\r\n class=\"text-body-1\"\r\n [class.is-selected]=\"option === selectionMode\"\r\n (click)=\"onSelectionModeChange(option)\">\r\n {{'DateInputSelectionMode_' + option | translate}}\r\n </button>\r\n </li>\r\n </ul>\r\n\r\n <div>\r\n <div class=\"d-flex\">\r\n <ec-calendar id=\"{{id}}_calendar\"\r\n [view]=\"primaryCalendarView\"\r\n (viewChange)=\"onPrimaryCalendarViewChange($event)\"\r\n [selectionMode]=\"selectionMode\"\r\n [selection]=\"calendarSelection\"\r\n (dateSelected)=\"onCalendarDateSelected($event)\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"selectionStrategy.showSecondaryCalendar ? primaryCalendarMaxDate : maxDate\">\r\n </ec-calendar>\r\n\r\n <ec-calendar *ngIf=\"selectionStrategy.showSecondaryCalendar\"\r\n id=\"{{id}}_secondaryCalendar\"\r\n [view]=\"secondaryCalendarView\"\r\n (viewChange)=\"onSecondaryCalendarViewChange($event)\"\r\n [selectionMode]=\"selectionMode\"\r\n [selection]=\"calendarSelection\"\r\n (dateSelected)=\"onCalendarDateSelected($event)\"\r\n [minDate]=\"secondaryCalendarMinDate\"\r\n [maxDate]=\"maxDate\">\r\n </ec-calendar>\r\n </div>\r\n\r\n <footer *ngIf=\"selectionStrategy.selectionViewMode === 'day'\"\r\n class=\"px-2 my-2 d-flex\">\r\n <button id=\"{{id}}_today_button\"\r\n ecLinkButton\r\n class=\"ml-auto d-inline-block\"\r\n (click)=\"goToToday()\"\r\n style=\"height: 1.75rem;\">\r\n {{'Today' | translate}}\r\n </button>\r\n </footer>\r\n </div>\r\n </article>\r\n</ng-template>\r\n","import { AfterViewInit, Component, ElementRef, EventEmitter, HostBinding, Input, OnDestroy, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';\r\nimport Popper from 'popper.js';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\nimport { PopupContainerDirective, PopupStatus } from '../../shared/directives/popup/popup-container.directive';\r\nimport { DisplayStatus } from '../../shared/display';\r\nimport { ButtonComponent, ButtonType } from '../button/button.component';\r\nimport { MenuComponent, MenuItem, MenuTemplateType } from '../menu/menu.component';\r\n\r\n@Component({\r\n selector: 'ec-dropdown',\r\n templateUrl: './dropdown.component.html',\r\n styleUrls: ['./dropdown.component.scss']\r\n})\r\nexport class DropdownComponent implements OnInit, AfterViewInit, OnDestroy {\r\n\r\n /**\r\n * Base id for the component's sub-elements\r\n */\r\n @Input() public id?: string;\r\n\r\n /**\r\n * Automatically focus the dropdown toggle button\r\n */\r\n @Input() public autofocus = false;\r\n\r\n /**\r\n * Controls the display status overlay for the menu\r\n */\r\n @Input() public status?:DisplayStatus = {status: 'hasData', message: ''};\r\n\r\n /**\r\n * Disable the button to prevent the menu from being opened\r\n */\r\n @Input() public disabled:boolean = false;\r\n\r\n /**\r\n * Optional label for the button\r\n */\r\n @Input() public label?: string;\r\n\r\n /**\r\n * Optional icon for the button\r\n */\r\n @Input() public icon?: string;\r\n\r\n /**\r\n * The button type, defaults to icon\r\n */\r\n @Input() public buttonType?: ButtonType = 'icon';\r\n\r\n /**\r\n * Optionally align the label of the button to the left or right. If not set,\r\n * will be centered.\r\n */\r\n @Input() public buttonAlignment?: 'left' | 'right';\r\n\r\n /**\r\n * Adds a tooltip to the dropdown toggle button. Should only be used when\r\n * the toggle buttonType is 'icon'\r\n */\r\n @Input() public buttonTitle: string = '';\r\n\r\n /**\r\n * The tabindex of the button\r\n */\r\n @Input() public tabindex?: number;\r\n\r\n /**\r\n * Display a caret with the button label or icon\r\n */\r\n @Input() public showArrow: boolean = true;\r\n\r\n /**\r\n * Items to display in the menu\r\n */\r\n @Input() public items: MenuItem[] = [];\r\n\r\n /**\r\n * The menu item template\r\n */\r\n @Input() public menuTemplateType: MenuTemplateType = 'label';\r\n\r\n /**\r\n * Display a header on the menu\r\n * @deprecated use first menu item with display set to 'heading' instead\r\n */\r\n @Input() public menuTitle?: string;\r\n\r\n /**\r\n * Set a fixed height for the menu, auto by default\r\n */\r\n @Input() public menuHeight?: number;\r\n\r\n /**\r\n * Set a fixed width in pixels for the menu, auto by default\r\n */\r\n @Input() public menuWidth?: number;\r\n\r\n /**\r\n * Set a min-width in pixels on the menu. It will expand if the content is greater than the min-width\r\n */\r\n @Input() public menuMinWidth?: number;\r\n\r\n /**\r\n * Pin the menu to the left or right of the button. Right by default\r\n */\r\n @Input() public menuPosition?: 'left' | 'right';\r\n\r\n /**\r\n * Sticky footer to display at the bottom of the popup menu\r\n */\r\n @Input() public menuFooter?: string;\r\n\r\n /**\r\n * Fix position the menu instead of absolute. Useful when the dropdown is in a\r\n * dialog\r\n */\r\n @Input() public popupFixed: boolean = false;\r\n\r\n /**\r\n * Pass a custom template to the toggle button\r\n */\r\n @Input() public buttonCustomTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Used to set the menu buttons state to pending\r\n */\r\n @HostBinding('class.is-pending')\r\n @Input() public pending: boolean = false;\r\n\r\n /**\r\n * Emits an event when a menu item is selected\r\n */\r\n @Output() public itemSelected: EventEmitter<MenuItem> = new EventEmitter<MenuItem>();\r\n\r\n /**\r\n * Emits an event when the popup menu opens\r\n */\r\n @Output() public popupOpened: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n /**\r\n * The status of the menu\r\n */\r\n public menuStatus: PopupStatus = 'hidden';\r\n\r\n /** Item to highlight when the menu is opened, used when the user\r\n * opens the menu via the keyboard\r\n */\r\n public highlightedItem: MenuItem | null = null;\r\n\r\n /** Used to know if the menu was toggled via the keyboard */\r\n private isKeyboardEvent: boolean = false;\r\n\r\n /**\r\n * Internal reference to the menu element\r\n */\r\n @ViewChild(MenuComponent, { read: ElementRef }) private menuEl!:ElementRef;\r\n\r\n /**\r\n * Internal reference to the popup directive\r\n */\r\n @ViewChild(PopupContainerDirective, { static: true }) private popup!: PopupContainerDirective;\r\n\r\n /**\r\n * Get a reference to the toggle button\r\n */\r\n @ViewChild('dropdownToggle') public dropdownToggleButton!: ButtonComponent;\r\n\r\n /**\r\n * Unsubscribe any active subscriptions when the component is destroyed\r\n */\r\n private componentDestroyed: Subject<void> = new Subject<void>();\r\n\r\n constructor() {}\r\n\r\n /**\r\n * Subscribe to changes to the menu status\r\n */\r\n public ngOnInit() {\r\n this.popup.popperStatusChange\r\n .pipe(takeUntil(this.componentDestroyed))\r\n .subscribe((event: 'visible' | 'hidden') => {\r\n this.menuStatus = event;\r\n if(this.menuStatus === 'visible') {\r\n this.popupOpened.emit();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Set up the popup\r\n */\r\n public ngAfterViewInit() {\r\n let popperOptions: Popper.PopperOptions = {\r\n\t\t\tmodifiers: {\r\n\t\t\t\tpreventOverflow: {\r\n\t\t\t\t\tboundariesElement: 'viewport'\r\n\t\t\t\t}\r\n },\r\n placement: 'bottom-end'\r\n };\r\n\r\n if (this.menuPosition === 'left') {\r\n popperOptions.placement = 'bottom-start';\r\n }\r\n\r\n\r\n if (this.popupFixed) {\r\n popperOptions.onCreate = () => {\r\n this.popup.fixPosition();\r\n }\r\n\r\n\t\t\tpopperOptions.onUpdate = () => {\r\n // Hide the popup when the dropdown changes position due to window resize\r\n // or container scrolling\r\n this.popup.hide();\r\n\t\t\t}\r\n }\r\n\r\n this.popup.popperOptions = popperOptions;\r\n }\r\n\r\n /**\r\n * Unsubscribe to any active subscriptions\r\n */\r\n public ngOnDestroy() {\r\n this.componentDestroyed.next();\r\n this.componentDestroyed.unsubscribe();\r\n }\r\n\r\n /**\r\n * Open and close the menu\r\n */\r\n public toggleMenu(event?:Event):void {\r\n if (event) {\r\n\t\t\tevent.stopPropagation();\r\n }\r\n\r\n if (!this.disabled) {\r\n if (this.menuStatus === 'hidden') {\r\n if (this.isKeyboardEvent && this.items.length) {\r\n // Setup the first item in the list to highlight when opening the\r\n // menu via the keyboard, ignoring headings\r\n\r\n this.highlightedItem = this.items.find(item => item.display !== 'heading') || null;\r\n }\r\n this.popup.show();\r\n } else {\r\n this.popup.hide();\r\n\r\n // Reset the highlighted item and our keyboard flag\r\n // when we close the popup\r\n this.highlightedItem = null;\r\n this.isKeyboardEvent = false;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Emit the selected item when it changes and close the menu\r\n */\r\n public selectedChanged(item:MenuItem):void {\r\n this.itemSelected.emit(item);\r\n this.toggleMenu();\r\n }\r\n\r\n /**\r\n * Closes the menu if the tab key is pressed\r\n */\r\n public keyNavigate(event: KeyboardEvent) {\r\n switch (event.key) {\r\n case 'Enter':\r\n this.isKeyboardEvent = true;\r\n break;\r\n case 'Escape':\r\n case 'Tab':\r\n if (this.menuStatus === 'visible') {\r\n this.toggleMenu(event);\r\n }\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n }\r\n}\r\n","<div class=\"control\">\r\n <ec-button [disabled]=\"disabled\"\r\n id=\"{{id}}_toggle\"\r\n #dropdownToggle\r\n [ngClass]=\"{'has-arrow':showArrow, 'active': menuStatus === 'visible', 'text-left': buttonAlignment === 'left', 'text-right': buttonAlignment === 'right'}\"\r\n *ecPopup=\"dropdownMenu\"\r\n [label]=\"label\"\r\n [icon]=\"icon\"\r\n [tabindex]=\"tabindex\"\r\n [type]=\"buttonType\"\r\n [customTemplate]=\"buttonCustomTemplate\"\r\n [pending]=\"pending\"\r\n title=\"{{buttonTitle}}\"\r\n (click)=\"toggleMenu($event)\"\r\n (keydown)=\"keyNavigate($event)\"\r\n [autofocus]=\"autofocus\">\r\n </ec-button>\r\n <span class=\"arrow is-{{buttonType}}\"\r\n *ngIf=\"showArrow\"\r\n [class.is-disabled]=\"disabled\">\r\n <i class=\"ec-icon icon-caret-down\" [class.flip-y]=\"menuStatus === 'visible'\"></i>\r\n </span>\r\n</div>\r\n\r\n<ng-template #dropdownMenu>\r\n <div id=\"{{id}}_popup\"\r\n class=\"popup\"\r\n ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [displayAsMask]=\"true\">\r\n <!-- Dropdown Menu Title -->\r\n <header id=\"{{id}}_title\"\r\n class=\"text-heading-2 px-2 my-2\"\r\n *ngIf=\"menuTitle\">{{menuTitle}}\r\n </header>\r\n <!-- Dropdown Menu -->\r\n <ec-menu id=\"{{id}}_menu\"\r\n [class.wrap-items]=\"menuWidth\"\r\n [templateType]=\"menuTemplateType\"\r\n [style.width]=\"menuWidth ? menuWidth + 'px' : 'auto'\"\r\n [style.min-width]=\"menuMinWidth ? menuMinWidth + 'px' : 'auto'\"\r\n [style.height]=\"menuHeight ? menuHeight + 'px' : 'auto'\"\r\n [items]=\"items\"\r\n [showNoItems]=\"true\"\r\n [enableKeyNav]=\"true\"\r\n [highlightedItem]=\"highlightedItem\"\r\n [dropdownToggleButton]=\"dropdownToggleButton.buttonElement\"\r\n (selectedChanged)=\"selectedChanged($event)\">\r\n </ec-menu>\r\n <footer *ngIf=\"menuFooter\">{{menuFooter}}</footer>\r\n </div>\r\n</ng-template>","import { Component, HostBinding, Input, OnInit } from \"@angular/core\";\r\nimport { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup, ValidationErrors } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport { Subject } from \"rxjs\";\r\nimport { takeUntil } from \"rxjs/operators\";\r\nimport { ValidationMessageService } from \"../../core/validation-message.service\";\r\nimport { ControlLabelPosition } from \"../form-control-base\";\r\nimport { PopoverContentPosition } from \"../popover/popover.component\";\r\n\r\n\r\n/** Function to iterate over form controls and\r\n * ensure they contain unique values. If any are duplicated all offending\r\n * form controls will be marked as invalid\r\n *\r\n * @param valueProperty - the sub-property of the object represented by each form control\r\n * it is dereferenced as formGroup.control.value[valueProperty].\r\n * defaults to \"value\", which matches the form controls used to back comboboxes\r\n * if explicitly null, this function assumes value is not a complex object and just extracts\r\n * formGroup.control.value\r\n */\r\nexport const validateFormGroupValuesAreUnique = (fg: UntypedFormGroup | UntypedFormArray, valueProperty: string | null = \"value\", subProperty?: string): void => {\r\n let formControlValues: {[key: string]: number} = {};\r\n\r\n // First get all of the values and if they have been found already,\r\n // increment the number of times found\r\n forEachFormControl(fg, (control: AbstractControl) => {\r\n let controlValue: any = getControlValue(control, valueProperty, subProperty);\r\n\r\n if (controlValue !== null && controlValue !== '') {\r\n if (typeof controlValue === 'string') {\r\n controlValue = controlValue.toLowerCase();\r\n }\r\n if (formControlValues.hasOwnProperty(controlValue)) {\r\n formControlValues[controlValue] = formControlValues[controlValue] + 1;\r\n } else {\r\n formControlValues[controlValue] = 1;\r\n }\r\n }\r\n });\r\n\r\n // Now go back over the controls and if their value was found more than once flag them as invalid\r\n forEachFormControl(fg, (control: AbstractControl) => {\r\n let controlValue: any = getControlValue(control, valueProperty, subProperty);\r\n\r\n // If the control value is null we will let any required validators handle them\r\n if (controlValue !== null && controlValue !== '') {\r\n if (typeof controlValue === 'string') {\r\n controlValue = controlValue.toLowerCase();\r\n }\r\n if (formControlValues[controlValue] > 1) {\r\n control.setErrors(Object.assign({ notUnique: true }, control.errors));\r\n } else {\r\n // Get a copy of the existing form control errors, if any\r\n let errors = cloneDeep(control.errors);\r\n\r\n // If there are errors and previously had the notUnique error we want to remove\r\n // that property\r\n if (errors && errors.hasOwnProperty(\"notUnique\")) {\r\n delete errors.notUnique;\r\n }\r\n\r\n // If that was the only error in the object, set to null so validation passes\r\n if (errors && Object.keys(errors).length === 0) {\r\n errors = null;\r\n }\r\n\r\n control.setErrors(errors);\r\n }\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Function to iterate over for controls and invoke the callback function when they are found.\r\n * Recursively calls itself when it encounters sub form groups and iterates over form arrays.\r\n * @param c\r\n * @param callback\r\n */\r\nexport const forEachFormControl = (c: AbstractControl, callback: (control: AbstractControl) => void): void => {\r\n let controls: AbstractControl[] = [];\r\n\r\n // Normalize to an array for ease of processing\r\n if (c instanceof UntypedFormControl) {\r\n controls.push(c);\r\n } else if (c instanceof UntypedFormGroup) {\r\n for (var key in c.controls) {\r\n controls.push(c.controls[key]);\r\n }\r\n } else if (c instanceof UntypedFormArray) {\r\n controls = c.controls;\r\n }\r\n\r\n controls.forEach(control => {\r\n if (control instanceof UntypedFormArray) {\r\n control.controls.forEach(ctrl => {\r\n if (ctrl instanceof UntypedFormGroup || ctrl instanceof UntypedFormArray) {\r\n forEachFormControl(ctrl, callback);\r\n } else {\r\n callback(ctrl);\r\n }\r\n });\r\n } else if (control instanceof UntypedFormGroup) {\r\n forEachFormControl(control,callback);\r\n } else {\r\n callback(control);\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Function to return the value if it is enabled and set\r\n * @param control\r\n */\r\nexport const getControlValue = (control: AbstractControl, valueProperty: string | null = \"value\", subProperty?: string): any | null => {\r\n if (control.enabled && (control.value !== null && control.value !== undefined)) {\r\n if (valueProperty === null) {\r\n return control.value;\r\n } else if (subProperty) {\r\n return control.value[valueProperty][subProperty];\r\n } else {\r\n return control.value[valueProperty];\r\n }\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'ec-form-group',\r\n templateUrl: './form-group.component.html',\r\n styleUrls: ['./form-group.component.scss']\r\n})\r\nexport class FormGroupComponent implements OnInit {\r\n\r\n /**\r\n * Id\r\n */\r\n @Input() public id?: string;\r\n\r\n /**\r\n * Bind id to host element\r\n */\r\n @HostBinding('attr.id') public attrId?: string;\r\n\r\n /**\r\n * The form control label\r\n */\r\n @Input() public label: string = '';\r\n\r\n /**\r\n * UI-oriented form model that retains the states and values of the HTML controls on screen.\r\n * Can be a {@link FormControl} or a {@link FormGroup}\r\n *\r\n * @type {FormGroup}\r\n * @memberof FormControlBase\r\n */\r\n @Input() public formGroup?: UntypedFormGroup;\r\n\r\n /**\r\n * The position of the form control label (top|bottom|left)\r\n */\r\n @Input() public labelPosition?: ControlLabelPosition = \"top\";\r\n\r\n\r\n /**An optional string to show if any of the underlying controls has an error. If falsy, one of the\r\n * errors from the underlying controls will be used.\r\n */\r\n @Input() public overrideValidationError?: string = \"\";\r\n\r\n /**An optional flag to hide the validation messages.\r\n */\r\n @Input() public hideValidationMessage?:boolean = false;\r\n\r\n /**\r\n * Conditionally show a help popover next to the controls label.\r\n */\r\n @Input() public helpPopover?: string;\r\n\r\n /**\r\n * When a help popover is present, allows the popover to be positioned in different locations.\r\n */\r\n @Input() public helpPopoverPosition?: PopoverContentPosition = 'top-left';\r\n \r\n /**\r\n * All current validation errors\r\n *\r\n * @type {string}\r\n * @memberof FormControlBase\r\n */\r\n public validationErrors: string = \"\";\r\n\r\n public allControlsTouched: boolean = false;\r\n\r\n private componentDestroyed: Subject<void> = new Subject<void>();\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n private translateService: TranslateService\r\n ) { }\r\n\r\n public async ngOnInit() {\r\n // subscribe to statusChanges Observable to take any errors and translate them\r\n if (this.formGroup) {\r\n this.formGroup.statusChanges\r\n .pipe(takeUntil(this.componentDestroyed))\r\n .subscribe(() => {\r\n this.translateValidationMessages(this.getErrors(this.formGroup!))\r\n });\r\n\r\n // (re)set validation messages\r\n this.translateValidationMessages(this.getErrors(this.formGroup));\r\n }\r\n\r\n if (this.id) {\r\n this.attrId = this.id;\r\n }\r\n }\r\n\r\n /**\r\n * Angular onDestroy lifecyle hook.\r\n * Unsubscribe from any observables\r\n *\r\n * @see https://angular.io/guide/lifecycle-hooks\r\n * @memberof FormControlBase\r\n */\r\n public ngOnDestroy(): void {\r\n this.componentDestroyed.next();\r\n this.componentDestroyed.unsubscribe();\r\n }\r\n\r\n private getErrors(formGroup: UntypedFormGroup): ValidationErrors | null {\r\n formGroup.markAsUntouched();\r\n\r\n let errors: ValidationErrors | null = null;\r\n let allTouched: boolean = true;\r\n let controlFound: boolean = false;\r\n\r\n forEachFormControl(formGroup, (control: AbstractControl) => {\r\n errors = this.assignErrors(control, errors);\r\n if (control.untouched) {\r\n allTouched = false;\r\n }\r\n controlFound = true;\r\n });\r\n\r\n if (formGroup.errors) {\r\n errors = Object.assign(errors || {}, formGroup.errors);\r\n }\r\n\r\n if (allTouched && controlFound) {\r\n formGroup.markAsTouched();\r\n }\r\n\r\n return errors;\r\n }\r\n\r\n private assignErrors(control: AbstractControl, errors: ValidationErrors | null): ValidationErrors | null {\r\n if (control.errors) {\r\n errors = Object.assign(errors || {}, control.errors);\r\n }\r\n\r\n return errors\r\n }\r\n\r\n /**\r\n * Function that subscribes to the formGroup's valueChanges Observable\r\n * to take any erros and translate them\r\n *\r\n * @param {*} [data]\r\n * @returns\r\n * @memberof FormControlBase\r\n */\r\n private async translateValidationMessages(errors: ValidationErrors | null) {\r\n if (errors) {\r\n if(this.overrideValidationError){\r\n this.validationErrors = this.translateService.instant(this.overrideValidationError);\r\n } else {\r\n let messages = await this.validationMessageService.getErrorMessages(errors);\r\n if (messages) {\r\n this.validationErrors = messages.join('; ');\r\n }\r\n }\r\n } else {\r\n this.validationErrors = '';\r\n }\r\n }\r\n}\r\n","<div class=\"control control-label-{{labelPosition}}\"\r\n [class.ec-untouched]=\"formGroup?.untouched\">\r\n\r\n <label *ngIf=\"label\">\r\n <span id=\"{{id}}_label\">{{label | translate}}</span>\r\n <span *ngIf=\"!hideValidationMessage && validationErrors && formGroup?.touched && formGroup?.invalid\">&nbsp;{{validationErrors | translate}}</span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n </label>\r\n\r\n <ng-content></ng-content>\r\n</div>","import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { AbstractControl, AsyncValidatorFn, FormControl, FormGroup, ValidatorFn } from '@angular/forms';\r\nimport { filter, take, takeUntil } from 'rxjs/operators';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { FormControlBase } from '../form-control-base';\r\nimport { lastValueFrom } from 'rxjs';\r\n\r\nexport type FileType = 'zip' | 'excel' | 'custom';\r\nexport type FileOutput = 'raw' | 'base64';\r\n\r\nexport const FileTypeExtensions = {\r\n zip: ['.zip'],\r\n excel: ['.xls', '.xlsx']\r\n};\r\n\r\nexport type FileUploadFormGroup = {\r\n file: FormControl<File | null>;\r\n name: FormControl<string | null>;\r\n base64FileString: FormControl<string | null>;\r\n uploadResult: FormControl<any>;\r\n};\r\n\r\nexport type InvalidFileError = {\r\n invalidFile: true;\r\n};\r\n\r\nexport type FileValidatorCallback = (file: File | null | undefined, base64: string | null | undefined) => Promise<InvalidFileError | null>;\r\n\r\n@Component({\r\n selector: \"ec-file-upload\",\r\n templateUrl: \"./file-upload.component.html\",\r\n styleUrls: [\"./file-upload.component.scss\"]\r\n})\r\nexport class FileUploadComponent extends FormControlBase implements OnInit, OnChanges {\r\n\r\n // static class to create the form group from a parent component\r\n public static getFormModel(\r\n validators: ValidatorFn[],\r\n disabled: boolean = false,\r\n /** Any validators required to make sure the selected file is valid. It is recommended that you use `FileUploadComponent.getFileValidator` to help construct the validator(s). NOTE: This currently only works when multiSelect is false. */\r\n fileValidators?: AsyncValidatorFn | AsyncValidatorFn[]\r\n ): FormGroup<FileUploadFormGroup> {\r\n let formGroup = new FormGroup<FileUploadFormGroup>({\r\n file: new FormControl({ value: null, disabled: disabled }, {validators: validators, asyncValidators: fileValidators}),\r\n name: new FormControl({ value: null, disabled: disabled }, validators),\r\n base64FileString: new FormControl(null),\r\n uploadResult: new FormControl(null),\r\n });\r\n if (disabled) {\r\n formGroup.disable();\r\n }\r\n return formGroup;\r\n }\r\n\r\n /**\r\n * Helper function that returns an async validator to be used with the file upload control.\r\n * This is useful for when the file needs to be validated before it can be uploaded.\r\n * \r\n * @param callback The callback function that will be called to validate the file. Parameters for the callback are the file and the base64 string for the file.\r\n * base64 is null if the fileOutput input on the FileUploadComponent is set to raw. Using fileOutput set to base64 is recommended for images.\r\n */\r\n public static getFileValidator(callback: FileValidatorCallback): AsyncValidatorFn {\r\n return async (control: AbstractControl) => {\r\n if (control.value && control.parent) {\r\n let file = control.value as File;\r\n // For images, we need the base64 string to validate image dimensions\r\n let base64 = control.parent.get('base64FileString')?.value as string;\r\n return await callback(file, base64);\r\n }\r\n return null;\r\n }\r\n }\r\n\r\n @Input() public formModel!: FormGroup<FileUploadFormGroup>;\r\n\r\n /**\r\n * The value of the textbox input's placeholder\r\n */\r\n @Input() public placeholder?: string = \"Choose file...\";\r\n\r\n /** Common extensions for a file browsing dialog\r\n * Note: Edge does not support the accept attribute on file inputs, therefor all file types\r\n * will be shown. Firefox and Chrome both support this feature.\r\n */\r\n @Input() public fileType?: FileType | undefined;\r\n\r\n /**\r\n * File output, determines which properties are supplied on the formModel\r\n */\r\n @Input() public fileOutput?: FileOutput = 'base64';\r\n\r\n /** If fileType is set to custom set the acceptable file types based on the custom array */\r\n @Input() public customExtensions?: Array<string> | undefined;\r\n\r\n /**\r\n * Optional callback supported if the hosting page needs to process the file before\r\n * setting the formModel with the file information. If the promise resolves it will continue\r\n * and set the file name and contents to the formModel, otherwise on failure it'll do nothing.\r\n */\r\n @Input() public onFileSelected?: (file: File) => Promise<any>;\r\n\r\n /**\r\n * Optional callback supported for when the hosting page needs to process multiple files\r\n * We simply map the FileList to an array of File objects and pass that array to the \r\n * callback and let the hosting page handle the processing\r\n */\r\n @Input() public onMultipleFilesSelected?: (files: File[]) => Promise<any>;\r\n\r\n /** \r\n * Optional display type that controls whether the file input textbox is displayed or\r\n * simply a button the user clicks to launch the OS file storage dialog.\r\n * Default: file\r\n */\r\n @Input() public displayType?: 'file' | 'button' = 'file';\r\n\r\n /** \r\n * When display type is set to button this property will control the button label\r\n */\r\n @Input() public buttonLabel?: string;\r\n\r\n /** \r\n * When display type is set to button this property will control the button type\r\n */\r\n @Input() public buttonType?: string = 'primary';\r\n\r\n /**\r\n * Optional property to control whether the user can select multiple files\r\n */\r\n @Input() public multiSelect?: boolean = false;\r\n\r\n /**\r\n * When true, the onFileSelected callback will not be called if the form is invalid.\r\n * This is useful when the file needs to be validated before it can be uploaded.\r\n * For server-side validation, leave this as false and use the onFileSelected callback\r\n * to upload the file and handle any errors thrown by the API.\r\n */\r\n @Input() public validateBeforeUpload: boolean = false;\r\n\r\n @ViewChild(\"fileInput\", { read: ElementRef, static: true }) public fileInput?: ElementRef;\r\n\r\n /** Property bound to the file input to filter what file types are shown in the dialog */\r\n public fileTypeAccept: string | undefined;\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper,\r\n ) {\r\n super(validationMessageService, formGroupHelper);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges) {\r\n super.ngOnChanges(changes);\r\n\r\n this.updateFileTypeAccept();\r\n }\r\n\r\n public ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n // Watch for name to change, if the value is cleared we will clear the other\r\n // supporting model properties. The name can be cleared by the user manually or via\r\n // the clear button\r\n this.formModel?.get('name')?.valueChanges.pipe(\r\n takeUntil(this.componentDestroyed)\r\n ).subscribe(value => {\r\n if (!value) {\r\n this.formModel.patchValue({\r\n file: null,\r\n base64FileString: null,\r\n uploadResult: null\r\n });\r\n }\r\n });\r\n\r\n // Sync errors from the file control to the name control whenever the file control status changes.\r\n // The name control is the only one displayed to the user so we need to show the errors there.\r\n this.formModel.get('file')?.statusChanges.pipe(\r\n takeUntil(this.componentDestroyed)\r\n ).subscribe(() => {\r\n const errors = this.formModel.get('file')?.errors ?? null;\r\n this.formModel.get('name')?.setErrors(errors);\r\n });\r\n }\r\n\r\n public async fileChange(files: FileList): Promise<void> {\r\n if (this.multiSelect) {\r\n this.handleMultipleFiles(files);\r\n } else {\r\n const file: File | null = files.item(0);\r\n if (file) {\r\n await this.readFile(file);\r\n }\r\n }\r\n\r\n // Clear the file inputs value, this will allow the user to pick the same filenames again\r\n // and cause fileChange to re-trigger.\r\n if (this.fileInput) {\r\n this.fileInput.nativeElement.value = '';\r\n }\r\n }\r\n\r\n /**\r\n * Checks the file type and updates the file type accept property. This is what determines the file\r\n * type choices that the user will be limited to in the file browse dialog\r\n */\r\n private updateFileTypeAccept(): void {\r\n if (this.fileType) {\r\n if (this.fileType !== \"custom\") {\r\n this.fileTypeAccept = FileTypeExtensions[this.fileType].join(\",\");\r\n } else {\r\n if (this.customExtensions) {\r\n this.fileTypeAccept = this.customExtensions.join(\",\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Take a file that was selected by the user and process/patch our form model\r\n * If the host component requires an action to occur with the file prior to the patch it will call\r\n * and wait for it to return.\r\n * @param file \r\n * @param base64FileString Optional: Will have a value provided if the fileOutput is set to base64\r\n */\r\n private async processFile(file: File, base64FileString: string | null = null): Promise<void> {\r\n // If we are validating before upload we need to patch the file to the form to trigger validation before calling onFileSelected\r\n if (this.validateBeforeUpload) {\r\n await this.validateFile(file, base64FileString);\r\n }\r\n \r\n if (this.onFileSelected) {\r\n // Only call the onFileSelected callback to upload the file if the form group is valid or we are not validating before upload\r\n if (!this.validateBeforeUpload || this.formModel.valid) {\r\n try {\r\n let result = await this.onFileSelected(file);\r\n \r\n // If we did validation, just patch the form result because the file is already in the form\r\n if (this.validateBeforeUpload) {\r\n this.formModel.patchValue({ uploadResult: result ?? null });\r\n } else {\r\n this.formModel.patchValue({ base64FileString, file, name: file.name, uploadResult: result ?? null });\r\n }\r\n } catch (e) {\r\n // Bummer, we're not going to do anything about it though.\r\n // We are not patching any of the result so any existing information remains\r\n }\r\n }\r\n // If we don't have an onFileSelected callback we just patch the form model.\r\n // In the case of pre-upload validation the form already has the file so we don't want to patch again.\r\n } else if (!this.validateBeforeUpload) {\r\n this.formModel.patchValue({ base64FileString, file, name: file.name, uploadResult: null });\r\n }\r\n }\r\n\r\n /** Patches the form with the selected file in order to trigger control validation */\r\n private async validateFile(file: File, base64FileString: string | null = null): Promise<void> {\r\n // Patch the file first to trigger any file validators\r\n this.formModel.patchValue({ base64FileString, file, name: file.name, uploadResult: null });\r\n\r\n // If we have any async validators pending we need to wait for them to complete before we know if the form is valid\r\n if (this.formModel.pending) {\r\n await lastValueFrom(this.formModel.statusChanges.pipe(filter(status => status !== 'PENDING'), take(1), takeUntil(this.componentDestroyed)));\r\n }\r\n\r\n // Mark the name control as touched so that any validation errors will show\r\n this.formModel.controls.name.markAsTouched();\r\n }\r\n\r\n /**\r\n * Based on the fileOutput return whether this component is expected to deliver a base64 output\r\n * @returns \r\n */\r\n private isBase64FileOutput(): boolean {\r\n return this.fileOutput === 'base64';\r\n }\r\n\r\n /** Maps the files to an array of File objects and sends them along\r\n * to the derived onMultipleFileSelected method in the hosting component\r\n */\r\n private async handleMultipleFiles(files: FileList): Promise<void> {\r\n const filesArray = Array.from(files);\r\n\r\n if (this.onMultipleFilesSelected) {\r\n try {\r\n let result = await this.onMultipleFilesSelected(filesArray);\r\n } catch (e) {\r\n console.log('error: ', e);\r\n } \r\n }\r\n };\r\n\r\n private async readFile(file: File): Promise<void> {\r\n const reader: FileReader = new FileReader();\r\n\r\n reader.onloadend = async e => {\r\n let base64FileString: string | undefined = reader?.result?.toString().split(\",\")[1];\r\n await this.processFile(file, base64FileString);\r\n };\r\n\r\n if (this.isBase64FileOutput()) {\r\n reader.readAsDataURL(file);\r\n } else {\r\n await this.processFile(file);\r\n }\r\n }\r\n}\r\n","<ec-form-group [label]=\"label\"\r\n [formGroup]=\"formModel\"\r\n [helpPopover]=\"helpPopover\"\r\n [helpPopoverPosition]=\"helpPopoverPosition\"\r\n class=\"mb-0\">\r\n <div class=\"d-flex control-group\">\r\n <div class=\"d-flex flex-grow position-relative\">\r\n <input #fileInput\r\n id=\"{{inputId}}_input\"\r\n type=\"file\"\r\n tabindex=\"-1\"\r\n [attr.accept]=\"fileTypeAccept\"\r\n (change)=\"fileChange($event.target.files)\"\r\n [class.has-value]=\"displayType === 'file' ? formModel?.get('name').value : undefined\"\r\n [attr.multiple]=\"multiSelect ? 'multiple' : undefined\">\r\n <ec-form-control *ngIf=\"displayType === 'file'\"\r\n id=\"{{inputId}}_formControl\"\r\n class=\"text-truncate\"\r\n [required]=\"required\"\r\n [pending]=\"pending || formModel?.pending\">\r\n <input id=\"{{inputId}}_name\"\r\n [formControl]=\"formModel?.get('name')\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder\"\r\n [tabindex]=\"-1\">\r\n </ec-form-control>\r\n </div>\r\n <ec-button *ngIf=\"displayType === 'file'\"\r\n #browseBtn\r\n id=\"{{inputId}}_browseBtn\"\r\n (clicked)=\"fileInput.click()\"\r\n type=\"secondary\"\r\n [tabindex]=\"tabindex\"\r\n [disabled]=\"formModel?.get('name').disabled\"\r\n label=\"Browse\"\r\n [autofocus]=\"autofocus\">\r\n </ec-button>\r\n </div>\r\n <ec-button *ngIf=\"displayType === 'button'\"\r\n id=\"{{inputId}}_btn\"\r\n [pending]=\"pending\"\r\n [type]=\"buttonType\"\r\n [label]=\"buttonLabel ?? 'Browse_TC' | translate\"\r\n (clicked)=\"fileInput.click()\"\r\n style=\"width: 100%;\">\r\n </ec-button>\r\n</ec-form-group>","import { Component, HostBinding, Input, OnInit } from '@angular/core';\r\nimport { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { ControlLabelPosition } from '../form-control-base';\r\nimport { forEachFormControl } from '../form-group/form-group.component';\r\n\r\n@Component({\r\n selector: 'ec-form-control-label',\r\n templateUrl: './form-control-label.component.html',\r\n styleUrls: ['./form-control-label.component.scss']\r\n})\r\nexport class FormControlLabelComponent implements OnInit {\r\n\r\n /**\r\n * Id\r\n */\r\n @Input() public id?: string;\r\n\r\n /**\r\n * Bind id to host element\r\n */\r\n @HostBinding('attr.id') public attrId?: string;\r\n\r\n /**\r\n * The form control label\r\n */\r\n @Input() public label: string = '';\r\n\r\n /**\r\n * UI-oriented form model that retains the states and values of the HTML controls on screen.\r\n * Can be a {@link FormControl}, a {@link FormGroup} or a {@link FormArray}\r\n *\r\n * @type {AbstractControl}\r\n * @memberof FormControlBase\r\n */\r\n @Input() public control?: AbstractControl;\r\n\r\n /**\r\n * The position of the form control label (top|bottom|left)\r\n */\r\n @Input() public labelPosition?: ControlLabelPosition = \"top\";\r\n\r\n\r\n /**An optional string to show if any of the underlying controls has an error. If falsy, one of the\r\n * errors from the underlying controls will be used.\r\n */\r\n @Input() public overrideValidationError?: string = \"\";\r\n\r\n /**An optional flag to hide the validation messages.\r\n */\r\n @Input() public hideValidationMessage?:boolean = false;\r\n /**\r\n * All current validation errors\r\n *\r\n * @type {string}\r\n * @memberof FormControlBase\r\n */\r\n public validationErrors: string = \"\";\r\n\r\n public allControlsTouched: boolean = false;\r\n\r\n private componentDestroyed: Subject<void> = new Subject<void>();\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n private translateService: TranslateService\r\n ) { }\r\n\r\n public async ngOnInit() {\r\n // subscribe to statusChanges Observable to take any errors and translate them\r\n if (this.control) {\r\n this.control.statusChanges\r\n .pipe(takeUntil(this.componentDestroyed))\r\n .subscribe(() => {\r\n this.translateValidationMessages(this.getErrors(this.control!))\r\n });\r\n\r\n // (re)set validation messages\r\n this.translateValidationMessages(this.getErrors(this.control));\r\n }\r\n\r\n if (this.id) {\r\n this.attrId = this.id;\r\n }\r\n }\r\n\r\n /**\r\n * Angular onDestroy lifecyle hook.\r\n * Unsubscribe from any observables\r\n *\r\n * @see https://angular.io/guide/lifecycle-hooks\r\n * @memberof FormControlBase\r\n */\r\n public ngOnDestroy(): void {\r\n this.componentDestroyed.next();\r\n this.componentDestroyed.unsubscribe();\r\n }\r\n\r\n private getErrors(control: AbstractControl): ValidationErrors | null {\r\n control.markAsUntouched();\r\n\r\n let errors: ValidationErrors | null = null;\r\n let allTouched: boolean = true;\r\n let controlFound: boolean = false;\r\n\r\n forEachFormControl(control, (control: AbstractControl) => {\r\n errors = this.assignErrors(control, errors);\r\n if (control.untouched) {\r\n allTouched = false;\r\n }\r\n controlFound = true;\r\n });\r\n\r\n if (control.errors) {\r\n errors = Object.assign(errors || {}, control.errors);\r\n }\r\n\r\n if (allTouched && controlFound) {\r\n control.markAsTouched();\r\n }\r\n\r\n return errors;\r\n }\r\n\r\n private assignErrors(control: AbstractControl, errors: ValidationErrors | null): ValidationErrors | null {\r\n if (control.errors) {\r\n errors = Object.assign(errors || {}, control.errors);\r\n }\r\n\r\n return errors\r\n }\r\n\r\n /**\r\n * Function that subscribes to the controls valueChanges Observable\r\n * to take any erros and translate them\r\n *\r\n * @param {*} [data]\r\n * @returns\r\n * @memberof FormControlBase\r\n */\r\n private async translateValidationMessages(errors: ValidationErrors | null) {\r\n if (errors) {\r\n if(this.overrideValidationError){\r\n this.validationErrors = this.translateService.instant(this.overrideValidationError);\r\n } else {\r\n let messages = await this.validationMessageService.getErrorMessages(errors);\r\n if (messages) {\r\n this.validationErrors = messages.join('; ');\r\n }\r\n }\r\n } else {\r\n this.validationErrors = '';\r\n }\r\n }\r\n}\r\n","<div class=\"control control-label-{{labelPosition}}\" [class.ec-untouched]=\"control?.untouched\">\r\n <label *ngIf=\"label\" ngPreserveWhitespaces>\r\n\r\n <span id=\"{{id}}_label\">{{label | translate}}</span>\r\n\r\n <span *ngIf=\"!hideValidationMessage && validationErrors && control?.touched && control?.invalid\">{{validationErrors | translate}}</span>\r\n </label>\r\n</div>","import { Component, HostBinding, Input, OnInit, ElementRef, Host, OnChanges, SimpleChanges } from '@angular/core';\r\n\r\n@Component({\r\n selector: '[ecTableLockedColumn]',\r\n template: `<ng-content></ng-content>`,\r\n styleUrls: ['./table-locked-column.component.scss']\r\n})\r\nexport class TableLockedColumnComponent implements OnInit, OnChanges {\r\n\r\n @Input('ecTableLockedColumn') options!: { border: boolean, left?: number, right?: number };\r\n\r\n @HostBinding('style.left.px')\r\n left?: number;\r\n\r\n @HostBinding('style.right.px')\r\n right?: number;\r\n\r\n @HostBinding('class.border-right')\r\n borderRight = false;\r\n\r\n @HostBinding('class.border-left')\r\n borderLeft = false;\r\n\r\n constructor(private el: ElementRef) { }\r\n\r\n ngOnInit() {\r\n if (this.el.nativeElement.classList.contains('is-resizable')) {\r\n throw new Error(`Failed to lock table column because it was also resizable. Resizable table columns cannot currently be locked. Remove the 'is-resizable' class from THs of table columms that have the [ecTableLockedColumn] component.`);\r\n }\r\n\r\n if (this.el.nativeElement.attributes.getNamedItem('colspan')) {\r\n throw new Error(`Failed to lock table column because it had a 'colspan'. Locked columns do not currently support THs or TDs with a 'colspan'. Remove the 'colspan' attribute from table columns that have the [ecTableLockedColumn] component.`);\r\n }\r\n\r\n this.updatePositionAndBorder();\r\n }\r\n\r\n ngOnChanges(): void {\r\n if (this.options) {\r\n this.updatePositionAndBorder();\r\n }\r\n }\r\n\r\n private updatePositionAndBorder(): void {\r\n if (typeof this.options.left === 'number' && typeof this.options.right === 'number') {\r\n throw new Error(`Failed to lock table column because it had a value for both left and right. Only left or right can have a value.`);\r\n }\r\n\r\n if (typeof this.options.left === 'number') {\r\n this.left = this.options.left;\r\n this.borderRight = this.options.border || false;\r\n } else {\r\n this.right = this.options.right;\r\n this.borderLeft = this.options.border || false;\r\n }\r\n }\r\n}\r\n","import { Component, HostBinding, HostListener, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';\r\nimport { AbstractControl, UntypedFormArray, UntypedFormControl } from '@angular/forms';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime, takeUntil } from 'rxjs/operators';\r\n\r\nexport class TableSelectableRowContext {\r\n /**specify the form control to use for the selectAll checkbox or provide your own.\r\n * This can be useful if you want to subscribe to changes to change button states as the selection changes\r\n * or if you want to add it to an already-existing form group\r\n */\r\n public selectAllCheckbox: AbstractControl = new UntypedFormControl(false);\r\n\r\n /**specify the FormArray to use for the dependent checkboxes of the selectAll checkbox\r\n * The dependent checkboxes will add and remove themselves automatically and the selectAll\r\n * box will react accordingly. Do not provide your own controls\r\n * This can be useful if you want to subscribe to changes to change button states as the selection changes\r\n * or if you want to add it to an already-existing form group\r\n */\r\n public rowCheckboxes: UntypedFormArray = new UntypedFormArray([]);\r\n\r\n /**The index of the last row the user clicked. This allows multiple directives on a screen to coordinate\r\n * for reacting to shift+click actions that should automatically select multiple rows between the clicked rows\r\n * defaults to -1 to indicate that no user click has been captured\r\n */\r\n public lastClickedIndex: number = -1;\r\n\r\n /**A subject that is triggered when a row-based directive is added or removed. It allows\r\n * the master checkbox in the header to know that it needs to reset tracking information\r\n * without replacing the actual FormArray that the hosting component may be subscribed to for changes\r\n */\r\n public rowAddedOrRemoved: Subject<void> = new Subject();\r\n\r\n /**\r\n * Set to true to disable Shift-Click/Ctrl-Click functionality\r\n */\r\n public disableAdvancedRowClickBehavior: boolean = false;\r\n\r\n /**\r\n * Set to list of indices of controls that should not toggle when master/header checkbox toggles\r\n */\r\n public nonDependentCheckboxes: number[] = [];\r\n}\r\n\r\n@Component({\r\n selector: '[ecTableSelectableRow]',\r\n templateUrl: './table-selectable-row.component.html',\r\n styleUrls: ['./table-selectable-row.component.scss']\r\n})\r\nexport class TableSelectableRowComponent implements OnInit, OnDestroy, OnChanges {\r\n /**The ID root to use for the checkbox and table cell */\r\n @HostBinding('attr.id')\r\n @Input()\r\n public id: string = '';\r\n\r\n /** Disables the selection functionality when false */\r\n @HostBinding('class.is-enabled')\r\n @Input('ecTableSelectableRow')\r\n public set isSelectionEnabled(value: boolean | null | undefined) { this._selectionEnabled = value !== false; }\r\n public get isSelectionEnabled() { return this._selectionEnabled; }\r\n private _selectionEnabled: boolean = true;\r\n\r\n /**Shared context between master and children. Child directive adds its own FormControl to this\r\n and removes it onDestroy. The same context object must be used for all directives in a single table*/\r\n @Input('selectionContext')\r\n public context!: TableSelectableRowContext;\r\n\r\n /*Required for all rows. The row index this component represents, to allow it to know how to handle shift+clicks.\r\n Defaults to -1 which will cause the directive to behave as a header row*/\r\n @Input()\r\n public rowIndex: number = -1;\r\n\r\n /**The options used to lock the checkbox column to the left of the table, must be modified by host\r\n * if the checkbox is not the first column in the table\r\n */\r\n @Input()\r\n public lockedColOptions: { border: boolean, left?: number, right?: number } = { border: false, left: 0 };\r\n\r\n /** Automatically set to true based on checkbox state, used to highlight the row to match our table selected row styles */\r\n @HostBinding('class.is-selected')\r\n @Input()\r\n public isSelected = false;\r\n\r\n /** Automatically set to true if no rowIndex is provided or the row index is less than zero */\r\n @HostBinding('class.is-header')\r\n public isHeader: boolean = false;\r\n\r\n /**\r\n * Set to true if you want the checkbox to be disabled.\r\n *\r\n * When you use this property, make sure you set `disableAdvancedRowClickBehavior: true`\r\n * in the `TableSelectableRowContext`, or undesired side-effects will occur.\r\n */\r\n @Input()\r\n public isCheckboxDisabled?: boolean = false;\r\n\r\n /* A reference that we can change when a control is replaced to force the master checkbox reference to update\r\n without also replacing the form array that the host component may be watching for selected row changes */\r\n public dependentCheckboxesReference: { controls: AbstractControl[] } = { controls: [] };\r\n\r\n /*Capture the form control this component creates to allow cleanup later on and expose it to the row*/\r\n public formControl!: AbstractControl;\r\n\r\n public checkboxAttributeID: string = '';\r\n\r\n /**Sends an event when the component is destroyed so that it can unsubscribe from any observables */\r\n private destroyed = new Subject<void>();\r\n\r\n /**Validate and populate the context as the table is dynamically built. Because the context is shared between the\r\n * header and each of the rows, changes to it can be used to determine what is happening and hook up the correct\r\n * subscriptions for selectAll. The user can provide an existing formArray for the rows and form control for the header,\r\n * or it can just be the default empty ones created by the context class.\r\n */\r\n public ngOnInit() {\r\n this.isHeader = this.rowIndex < 0;\r\n if (!this.context) {\r\n console.error('ecTableSelectableRow requires a defined SelectableTableRowContext to be shared with all instances in one table.');\r\n } else {\r\n let rowCheckbox = this.context?.rowCheckboxes?.at(this.rowIndex);\r\n\r\n if (!this.isHeader && !rowCheckbox) {\r\n rowCheckbox = new UntypedFormControl(this.isSelected);\r\n this.context?.rowCheckboxes.push(rowCheckbox);\r\n }\r\n\r\n this.formControl = this.isHeader ? this.context.selectAllCheckbox : rowCheckbox;\r\n this.watchForChanges();\r\n }\r\n }\r\n\r\n /**Watch for changes to the row index that can occur if the table is reordered in-place instead of\r\n * recreated from scratch. Re-capture the correct form control to keep everything in sync\r\n */\r\n public ngOnChanges(changes: SimpleChanges) {\r\n if (changes.rowIndex && !this.isHeader) {\r\n this.formControl = this.context.rowCheckboxes.at(this.rowIndex);\r\n this.checkboxAttributeID = `${this.id}_row${this.rowIndex}_ecCheckbox`;\r\n }\r\n\r\n if (changes.isSelectionEnabled && !this.isSelectionEnabled && this.formControl?.value === true) {\r\n this.formControl.setValue(false);\r\n }\r\n\r\n if (changes.isSelected && this.formControl) {\r\n this.formControl.setValue(this.isSelected);\r\n }\r\n }\r\n\r\n /** Tell the header checkbox to refresh the selectAll subscription because a row was removed*/\r\n public ngOnDestroy() {\r\n if (!this.isHeader && this.formControl) {\r\n this.context.rowAddedOrRemoved.next();\r\n\r\n //find the location in the array that matches the checkbox. If many rows are being removed it may not match rowIndex yet\r\n let matchIndex = this.context.rowCheckboxes.controls.findIndex(c => c == this.formControl);\r\n if (matchIndex >= 0) {\r\n this.context.rowCheckboxes.removeAt(matchIndex);\r\n }\r\n }\r\n }\r\n\r\n /**Handle when a user clicks on a table row (or something inside it which bubbles up) to increase the hit area for row selection\r\n * Only work on the table body (not the header) because the header may have other click handlers for sort etc that we don't care about.\r\n * Handle shift and control select as well as checkbox click like windows explorer or the original bill lists do.\r\n */\r\n @HostListener('click', ['$event'])\r\n public rowClicked(event: MouseEvent) {\r\n if (!this.isHeader && this.isSelectionEnabled && !this.isCheckboxDisabled) {\r\n let targetEl = event?.target as HTMLElement;\r\n\r\n //clicking on a row always toggles that row. Sometimes the shift-select will toggle it back\r\n this.formControl.setValue(!this.formControl.value);\r\n\r\n if (!this.context.disableAdvancedRowClickBehavior) {\r\n this.handleShiftSelect(event);\r\n }\r\n }\r\n }\r\n\r\n private watchForChanges() {\r\n //watch for rows being replaced so that the master checkbox and shift-select support can be reset to match\r\n //this keeps the master in sync as the table changes pages etc and stops unexpected rows from being selected after redraw\r\n if (this.isHeader) {\r\n this.context.rowAddedOrRemoved.pipe(debounceTime(10), takeUntil(this.destroyed)).subscribe(() => {\r\n this.context.lastClickedIndex = -1;\r\n\r\n // exclude nonDependentCheckboxes (some may not be allowed to be deselected)\r\n let dependentCheckboxes: AbstractControl[] = [];\r\n this.context.rowCheckboxes.controls.forEach((control, index) => {\r\n if (!this.context.nonDependentCheckboxes.includes(index)) {\r\n dependentCheckboxes.push(control);\r\n }\r\n });\r\n\r\n this.dependentCheckboxesReference = { controls: dependentCheckboxes };\r\n });\r\n } else {\r\n this.context.rowAddedOrRemoved.next();\r\n\r\n //watch for the checkbox state to change on a child row and set the row isSelected class / highlight to match\r\n //this way the rows match even if external code updates the form model\r\n this.formControl?.valueChanges.pipe(takeUntil(this.destroyed)).subscribe((value: boolean) => {\r\n this.isSelected = value;\r\n });\r\n }\r\n\r\n }\r\n\r\n /**\r\n * If they are holding the shift key, try to select all the checkboxes between their last selection\r\n * and most recent selection. The logic is setup to behave the way windows explorer behaves\r\n * We don't allow drag-to-select like the kendo tables, but it means users can highlight text and copy+paste to excel etc\r\n * so I think this is actually preferable\r\n */\r\n private handleShiftSelect(event: MouseEvent) {\r\n let lastIndex = this.context.lastClickedIndex;\r\n let curIndex = this.rowIndex;\r\n if (event.shiftKey && lastIndex >= 0) {\r\n this.clearAllRows();\r\n if (curIndex > lastIndex) {\r\n for (var index = lastIndex; index <= curIndex; index++) {\r\n this.context.rowCheckboxes.at(index).setValue(true);\r\n }\r\n } else if (curIndex < lastIndex) {\r\n for (var index = lastIndex; index >= curIndex; index--) {\r\n this.context.rowCheckboxes.at(index).setValue(true);\r\n }\r\n } else if (curIndex === lastIndex) {\r\n this.formControl.setValue(true);\r\n }\r\n\r\n document.getSelection()?.removeAllRanges();\r\n } else {\r\n //record the current row index for future row clicks to know where they last interacted\r\n //but only if they don't have shift down for this click. If shift is down then the next shift+click\r\n //should be considered an extension (or contraction) of the original multi-row selection\r\n this.context.lastClickedIndex = this.rowIndex;\r\n }\r\n }\r\n\r\n private clearAllRows() {\r\n this.context.rowCheckboxes.controls.forEach(control => control.setValue(false));\r\n }\r\n}\r\n","<!-- any elements of the existing table row that must go before the row selection checkbox can be marked with a class of before-checkbox -->\r\n<ng-content select=\".before-checkbox\"></ng-content>\r\n<ng-container *ngIf=\"isSelectionEnabled\">\r\n <th *ngIf=\"isHeader\"\r\n class=\"checkbox\"\r\n [ecTableLockedColumn]=\"lockedColOptions\">\r\n <ec-checkbox id=\"{{id}}_selectAll\"\r\n class=\"m-0\"\r\n *ngIf=\"context?.selectAllCheckbox\"\r\n [formModel]=\"context?.selectAllCheckbox\"\r\n [dependentCheckboxesGroup]=\"dependentCheckboxesReference\"\r\n [ignoreDisabledDependents]=\"false\">\r\n </ec-checkbox>\r\n </th>\r\n <td *ngIf=\"!isHeader && formControl\"\r\n class=\"checkbox\"\r\n [ecTableLockedColumn]=\"lockedColOptions\">\r\n <!-- Use [readonly] and not [disabled] for isCheckboxDisabled to prevent user interaction\r\n and allow the value to be visible to other components (for example, when they subscribe\r\n to valueChanges on the FormArray that contains all the checkbox FormControls). -->\r\n <ec-checkbox id=\"{{id}}_row{{rowIndex}}_checkbox\"\r\n [readonly]=\"isCheckboxDisabled\"\r\n [attr.id]=\"checkboxAttributeID\"\r\n class=\"m-0 row-checkbox\"\r\n [formModel]=\"formControl\">\r\n </ec-checkbox>\r\n </td>\r\n</ng-container>\r\n<!-- The rest of the table row -->\r\n<ng-content></ng-content>","import { Component, ElementRef, EventEmitter, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'th.is-resizable',\r\n templateUrl: './resizable-column.component.html'\r\n})\r\nexport class ResizableColumnComponent {\r\n\r\n @Output() onResize = new EventEmitter<number>();\r\n\r\n constructor(public el: ElementRef) { }\r\n\r\n public emitWidth(width: number) {\r\n this.onResize.emit(width);\r\n }\r\n}\r\n","<div class=\"content-wrapper\">\r\n <div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n<div class=\"handle\"></div>\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: '[ecTableDetailRow]',\r\n template: `\r\n <td></td>\r\n <td [class.has-max-height]=\"maxHeight\" class=\"table-detail-content {{contentClass}}\" [attr.colspan]=\"contentColSpan\">\r\n <div [style.max-height]=\"maxHeight\" cdkScrollable><ng-content></ng-content></div>\r\n </td>\r\n `,\r\n styleUrls: ['./table-detail-row.component.scss']\r\n})\r\nexport class TableDetailRowComponent {\r\n @Input() contentClass?: string;\r\n @Input() contentColSpan!: number;\r\n @Input() maxHeight?: string;\r\n}\r\n","import { Component, Input, Output, EventEmitter, TemplateRef, ViewChild, ElementRef, Renderer2, EmbeddedViewRef, SimpleChanges, OnChanges, OnDestroy, OnInit, ApplicationRef } from '@angular/core';\r\n\r\n@Component({\r\n selector: '[ecTableMasterRow]',\r\n templateUrl: './table-master-row.component.html',\r\n styleUrls: ['./table-master-row.component.scss']\r\n})\r\nexport class TableMasterRowComponent implements OnChanges, OnInit, OnDestroy {\r\n /**\r\n * Identifier to pass to the collapsible toggle\r\n */\r\n @Input() public id?: string;\r\n\r\n /**\r\n * Controls whether the table row has details and shows the collapsible toggle if it does.\r\n */\r\n @Input() hasDetails?: boolean;\r\n\r\n /**\r\n * Programmatically toggle the visibility of the detail row. Default is false.\r\n */\r\n @Input() showDetails = false;\r\n\r\n /**\r\n * Template for the detail row content. Generates an [EmbeddedViewRef](https://angular.io/api/core/EmbeddedViewRef)\r\n * with the 'detailContext'. Required if hasDetails is true.\r\n */\r\n @Input() detailTemplate!: TemplateRef<any>;\r\n\r\n /**\r\n * Optional context bound to the 'detailTemplate'. Available in the template as the default local template `let` declaration.\r\n * @example\r\n * ```html\r\n * <tr *ngFor=\"let item of items\" ecTableMasterRow [detailTemplate]=\"myDetailTemplate\" [detailContext]=\"item\">\r\n * ...\r\n * </tr>\r\n *\r\n * <ng-template #myDetailTemplate let-item>\r\n * <p>{{item.comment}}</p>\r\n * </ng-template>\r\n */\r\n @Input() detailContext?: any;\r\n\r\n /**\r\n * The number of columns in your table minus the column that is automatically added by the\r\n * TableMasterRowComponent. Required.\r\n */\r\n @Input() detailRowColSpan!: number;\r\n\r\n /**\r\n * Space delimited string added to the class attribute of detail row TR.\r\n */\r\n @Input() detailRowClass?: string;\r\n\r\n /**\r\n * Space delimited string added to the class attribute of the TD that contains the detail row content\r\n */\r\n @Input() detailRowContentClass?: string;\r\n\r\n @Input() detailRowMaxHeight?: string;\r\n\r\n /** Space delimited string added to the class attribute of the TD that contains the collapsible toggle\r\n * element.\r\n */\r\n @Input() collapsibleToggleCellClass?: string;\r\n\r\n /** Used to hide the cell added to the table. Useful if a table is shared between views and not all\r\n * support the table master scenario\r\n */\r\n @Input() hideTableMaster?: boolean;\r\n\r\n /**\r\n * Emits an event when the value of `showDetails` changes.\r\n */\r\n @Output() showDetailsChanged: EventEmitter<boolean> = new EventEmitter();\r\n\r\n /**\r\n * The template for the detail row, inserted in the DOM after the master row.\r\n */\r\n @ViewChild('detailRow', {read: TemplateRef, static: true}) detailRowTemplate!: TemplateRef<any>;\r\n\r\n /**\r\n * The view created from the `detailRow` template.\r\n */\r\n private detailView?: EmbeddedViewRef<any>;\r\n\r\n /**\r\n * The parent node of the host element.\r\n */\r\n private parentNode: any;\r\n\r\n /**\r\n * The sibling node of the host element.\r\n */\r\n private siblingNode: any;\r\n\r\n constructor(private renderer: Renderer2, private el: ElementRef, private appRef: ApplicationRef) { }\r\n\r\n ngOnInit(): void {\r\n if (!this.detailRowColSpan) {\r\n console.error(`A value for [detailRowColSpan] is required to render a detail row correctly. This should be the number of columns TDs placed inside an tr[ecTableMasterRow].`);\r\n }\r\n\r\n this.parentNode = this.renderer.parentNode(this.el.nativeElement);\r\n this.updateDetailRow();\r\n\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.hasDetails && !changes.hasDetails.firstChange && changes.hasDetails.currentValue !== undefined) {\r\n this.updateDetailRow();\r\n }\r\n\r\n if (changes.showDetails && !changes.showDetails.firstChange && changes.showDetails.currentValue !== undefined) {\r\n this.updateVisibility();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.removeDetailView();\r\n }\r\n\r\n /**\r\n * When the master row has details, create the detail row and update it's visibility. If the master\r\n * has no details, remove the detail row\r\n */\r\n updateDetailRow(): void {\r\n if (this.hasDetails) {\r\n if (!this.detailTemplate) {\r\n console.error(`A value for the [detailTemplate] input is required when 'hasDetails' is true.`);\r\n return;\r\n }\r\n\r\n // First check to see if the detailView is already present and if so, remove it so we don't get a \r\n // duplicate detail view\r\n if (this.detailView !== undefined) {\r\n this.removeDetailView();\r\n }\r\n\r\n this.detailView = this.detailRowTemplate.createEmbeddedView({});\r\n\r\n //solution to allowing change detection in embedded view adapted from here:\r\n //https://github.com/angular/angular/issues/42977\r\n this.appRef.attachView(this.detailView);\r\n this.updateVisibility();\r\n } else {\r\n this.removeDetailView();\r\n }\r\n }\r\n\r\n /**\r\n * Show/hide the detail row\r\n */\r\n toggleDetails(show: boolean): void {\r\n this.showDetails = show;\r\n this.showDetailsChanged.emit(show);\r\n this.updateVisibility();\r\n }\r\n\r\n private updateVisibility(): void {\r\n if (this.showDetails) {\r\n this.show();\r\n } else {\r\n this.hide();\r\n }\r\n }\r\n\r\n /**\r\n * Attach the detailView the change detection tree and insert the generated html\r\n * of the detail row to DOM after the host element\r\n */\r\n private show() {\r\n if (this.detailView) {\r\n //The nextSibling may have changed, so update it. (This could happen if the table is embedded in a searchable table\r\n // and a search is performed)\r\n this.siblingNode = this.renderer.nextSibling(this.el.nativeElement);\r\n this.detailView.reattach();\r\n this.detailView.detectChanges();\r\n this.detailView.rootNodes.forEach(node => {\r\n this.renderer.insertBefore(this.parentNode, node, this.siblingNode);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Detach the detailView from the change detection tree and remove the generated\r\n * html of the detail row from the DOM\r\n */\r\n private hide() {\r\n if (this.detailView) {\r\n this.detailView.detach();\r\n this.removeDetailNodes();\r\n }\r\n }\r\n\r\n /**\r\n * Destroy the detailView and remove the generated html of the detail row from the DOM\r\n */\r\n private removeDetailView() {\r\n if (this.detailView) {\r\n this.detailView.destroy();\r\n this.removeDetailNodes();\r\n }\r\n }\r\n\r\n /**\r\n * Remove the generated html of the detail row from the DOM\r\n */\r\n private removeDetailNodes() {\r\n if (this.detailView) {\r\n this.detailView.rootNodes.forEach(n => {\r\n try {\r\n this.renderer.removeChild(this.parentNode, n);\r\n } catch(err) {\r\n // Ignore errors thrown by removing nodes that were never added to the DOM.\r\n }\r\n });\r\n }\r\n }\r\n\r\n}\r\n","<td *ngIf=\"!hideTableMaster\" class=\"{{collapsibleToggleCellClass}}\">\r\n <ec-collapsible-toggle *ngIf=\"hasDetails\"\r\n id=\"{{id}}_toggle\"\r\n [expanded]=\"showDetails\"\r\n (expandedChange)=\"toggleDetails($event)\"></ec-collapsible-toggle>\r\n</td>\r\n<ng-content></ng-content>\r\n\r\n<ng-template #detailRow>\r\n <tr ecTableDetailRow class=\"{{detailRowClass}}\" [contentClass]=\"detailRowContentClass\" [contentColSpan]=\"detailRowColSpan\" [maxHeight]=\"detailRowMaxHeight\">\r\n <ng-container *ngTemplateOutlet=\"detailTemplate; context: {$implicit: detailContext}\"></ng-container>\r\n </tr>\r\n</ng-template>","import { Renderer2, Inject, Input, AfterViewInit, Directive } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { CacheService } from '../../core/cache.service';\r\n\r\nexport type ResizeCacheEntry = { widths: number[] };\r\n\r\n/**\r\n * Base class for handling click and drag resizing of elements with a mouse. \r\n * Derived classes must provide the element to be resized and implement the setWidth function.\r\n */\r\n@Directive()\r\nexport abstract class ResizableBase implements AfterViewInit {\r\n ngAfterViewInit(): void {\r\n if(this.rememberWidth && this.id){\r\n let cached = this.cacheService.getItem<ResizeCacheEntry>('resizable-' + this.id);\r\n if(cached && cached.widths && cached.widths.length > 0){\r\n this.restoreWidths(cached.widths);\r\n }\r\n }\r\n }\r\n\r\n /**Set to true if the resizable should remember its width. Requires the element to have an ID*/\r\n @Input()\r\n public rememberWidth: boolean = false;\r\n\r\n /**The id of the resizable, used for GI and for remembering the width */\r\n @Input() \r\n public id: string = '';\r\n\r\n /** The element that is current being resized */\r\n protected currentEl: HTMLElement | null = null;\r\n\r\n /** The x position of the mouse when dragging starts. Relative to the viewport. */\r\n protected startScreenX: number = 0;\r\n\r\n /** The width of the current element when dragging starts. */\r\n protected startElWidth: number = 0;\r\n\r\n /** \r\n * Stored 'unlisten' functions that remove their respective listeners when called \r\n */\r\n protected mouseupListener?: () => void;\r\n protected mousemoveListener?: () => void;\r\n\r\n constructor(\r\n protected renderer: Renderer2, \r\n private cacheService: CacheService,\r\n @Inject(DOCUMENT) protected document: Document\r\n ){}\r\n\r\n /** \r\n * On a mousedown event\r\n * * store the width of the current element to calculate the new width\r\n * * store the horizontal position of the pointer to calculate the new width. \r\n * * add the 'is-active' class to the current element\r\n * * set up listeners on the document to know when dragging starts and stops. \r\n * Mouse event listeners are added to the document because the cursor may move \r\n * off the current element while dragging.\r\n */\r\n public startDrag(event: MouseEvent): void {\r\n if (this.currentEl) {\r\n this.startElWidth = this.currentEl.offsetWidth;\r\n this.startScreenX = event.screenX;\r\n this.renderer.addClass(this.currentEl, 'is-active');\r\n this.renderer.setStyle(this.document.body, 'cursor', 'col-resize');\r\n\r\n // Remove any listeners that may have not been cleaned up before we register new listeners.\r\n if (this.mouseupListener) {\r\n this.mouseupListener();\r\n this.mouseupListener = undefined;\r\n }\r\n if (this.mousemoveListener) {\r\n this.mousemoveListener();\r\n this.mousemoveListener = undefined;\r\n }\r\n\r\n this.mouseupListener = this.renderer.listen(this.document, 'mouseup', this.stopDrag.bind(this));\r\n this.mousemoveListener = this.renderer.listen(this.document, 'mousemove', this.drag.bind(this));\r\n } else {\r\n throw new Error(`currentEl is ${this.currentEl}. currentEl must be assigned before startDrag() is called.`);\r\n }\r\n }\r\n\r\n /**\r\n * On a mousemove event, calculate the new width of the current element by \r\n * adding the difference of the start pageX position and the current pageX \r\n * position to the width of the element when we started dragging. Pass the \r\n * calculated with to the setWidth method.\r\n */\r\n protected drag(event: MouseEvent): void {\r\n this.setWidth(this.startElWidth + (event.screenX - this.startScreenX));\r\n }\r\n\r\n /**\r\n * Update the current element's width. Called after a mousemove event.\r\n */\r\n protected abstract setWidth(width: number): void;\r\n\r\n /**\r\n * On a mouseup event\r\n * * remove the mouse event listeners on the document.\r\n * * remove the 'is-active' class from the current element\r\n * * reset the cursor style on the body\r\n */\r\n protected stopDrag(event: MouseEvent): void {\r\n if (this.mousemoveListener) {\r\n this.mousemoveListener();\r\n this.mousemoveListener = undefined;\r\n }\r\n \r\n if (this.mouseupListener) {\r\n this.mouseupListener();\r\n this.mouseupListener = undefined;\r\n }\r\n \r\n if (this.currentEl) {\r\n this.renderer.removeClass(this.currentEl, 'is-active');\r\n }\r\n\r\n this.renderer.removeStyle(this.document.body, 'cursor');\r\n }\r\n\r\n /**Called after the view initializes if the component supports restoring widths and there are cached widths to restore. \r\n * To be overridden in a derived class if it supports restoring widths, defaults to a no-op*/\r\n protected restoreWidths(widths: number[]): void { }\r\n\r\n /** Store the provided widths in cache so they can be retrieved later */\r\n protected saveWidths(widths: number[]){\r\n if(this.rememberWidth && this.id){\r\n this.cacheService.setItem('resizable-' + this.id, <ResizeCacheEntry> {\r\n widths: widths\r\n });\r\n } else if(this.rememberWidth){\r\n console.error('rememberWidth is set but will not take effect unless ID is also set');\r\n }\r\n }\r\n}","import { Directive, ElementRef, OnInit, Renderer2, Inject, Input, OnDestroy, QueryList } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { ResizableBase } from '../resizable/resizable-base';\r\nimport { CacheService } from '../../core/cache.service';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { ResizableColumnComponent } from './resizable-column.component';\r\n\r\n/**\r\n * Add the ability to resize columns to a standard HTML table.\r\n * Specify a column as resizable by adding the .is-resizable class to a <th>.\r\n * \r\n * Usage:\r\n ```html\r\n <table [ecResizableTable]>\r\n <colgroup><col><col><col></colgroup>\r\n <thead>\r\n <tr>\r\n <th class=\"is-resizable\">Resizable</th>\r\n <th class=\"is-resizable\">Resizable</th>\r\n <th>Static</th>\r\n </tr>\r\n </thead>\r\n ...\r\n </table>\r\n\r\n ```\r\n * Note: this directive is meant to be used internally with the TableComponent\r\n * and is not exposed in the public-api of the library\r\n */\r\n@Directive({\r\n selector: '[ecResizableTable]'\r\n})\r\nexport class ResizableTableDirective extends ResizableBase implements OnInit, OnDestroy {\r\n @Input('ecResizableTable') isResizable: boolean | undefined;\r\n @Input() containerEl!: ElementRef;\r\n @Input() sortableTable: boolean = false;\r\n\r\n /** \r\n * Used to notify the resizable directive that the columns are ready to be configured.\r\n * Must be used if the number of columns can change over the table's lifecycle.\r\n */\r\n @Input() resizableColumns!: QueryList<ResizableColumnComponent>;\r\n\r\n /** The host <table> element. Will throw if host element is not a <table> */\r\n private tableEl!: HTMLTableElement;\r\n\r\n /** \r\n * Stored reference to the <col> element children. Will throw if none are found. Will\r\n * warn if the number of <col> elements do not match the number of <th> elements\r\n */\r\n private cols: HTMLTableColElement[] = [];\r\n\r\n /**\r\n * The widths of each table column. These are updated as columns are resized and\r\n * are used to calculate the new table width.\r\n */\r\n private colWidths: number[] = [];\r\n\r\n /**\r\n * The current table width\r\n */\r\n private currentTableWidth: number = 0;\r\n\r\n /**\r\n * The width of the table when the component was initialized. The table cannot\r\n * be shrunk below this width. If a column resize would cause the current table\r\n * width to be below this value, the last column is widened instead.\r\n */\r\n private minTableWidth: number = 0;\r\n\r\n /**\r\n * The width the column can not be resized below.\r\n */\r\n private minColWidth: number = 32;\r\n\r\n private lastColIndex!: number;\r\n\r\n private destroyed: Subject<void> = new Subject();\r\n\r\n constructor(\r\n private el: ElementRef,\r\n renderer: Renderer2,\r\n cacheService: CacheService,\r\n @Inject(DOCUMENT) document: Document\r\n ) {\r\n super(renderer, cacheService, document);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.initResizableColumns();\r\n\r\n this.resizableColumns.changes.pipe(takeUntil(this.destroyed)).subscribe(() => this.initResizableColumns());\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroyed.next();\r\n this.destroyed.complete();\r\n }\r\n\r\n /**\r\n * Initialize\r\n * * Check that the host element is a table and that <col> elements are present\r\n * * Save the initial width of table as the minimum table width\r\n * * Store a reference to all <col> elements\r\n * * Add a handle to each resizable column and set up mousedown listeners to start dragging\r\n */\r\n private initResizableColumns() {\r\n if (this.isResizable !== false) {\r\n\r\n this.tableEl = this.el.nativeElement;\r\n if (this.tableEl.tagName !== 'TABLE') {\r\n throw new Error(`The 'ecResizableTable' directive can only be placed on a <table> element.`);\r\n }\r\n\r\n if (this.sortableTable) {\r\n this.minColWidth = 48;\r\n }\r\n \r\n const headers = this.tableEl.querySelectorAll('th');\r\n const cols = this.tableEl.querySelectorAll('col');\r\n this.cols = [];\r\n this.colWidths = [];\r\n \r\n if (cols.length === 0) {\r\n const fragment = this.document.createDocumentFragment();\r\n const colgroup: HTMLElement = this.renderer.createElement('colgroup');\r\n headers.forEach(() => {\r\n const col = this.renderer.createElement('col');\r\n this.cols.push(col);\r\n this.renderer.appendChild(fragment, col);\r\n });\r\n this.renderer.appendChild(colgroup, fragment);\r\n this.renderer.insertBefore(this.tableEl, colgroup, this.tableEl.firstElementChild);\r\n } else {\r\n cols.forEach(colEl => {\r\n this.cols.push(colEl);\r\n });\r\n \r\n if (headers.length !== cols.length) {\r\n console.warn(`There are ${headers.length} <th> elements and ${this.cols.length} <col> elements in this this table. The number of columns and table headers must match. <th> elements with a 'colspan' attribute are currently not supported.`);\r\n }\r\n }\r\n\r\n const lastResizableIndex = Array.from(headers).reverse().findIndex(el => el.classList.contains('is-resizable')) + 1;\r\n this.lastColIndex = this.cols.length - lastResizableIndex;\r\n \r\n headers.forEach(th => {\r\n if (th.classList.contains('is-resizable')) {\r\n const handle = th.querySelector('.handle');\r\n\r\n this.renderer.listen(handle, 'mousedown', (event: MouseEvent) => {\r\n this.currentEl = th;\r\n this.startDrag(event);\r\n });\r\n }\r\n });\r\n \r\n // We need to wait a tick for a view that was previously loaded to be removed\r\n // from the DOM and allow this directive's parent view to fully expand in the \r\n // viewport before getting widths.\r\n window.setTimeout(() => {\r\n this.setInitialWidths(headers);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Update the column with the calculated width while resizing.\r\n * If the column is narrowed so that the table would be narrower than the min-width,\r\n * expand the last column. If the table is then widened, return the last column\r\n * to its initial width.\r\n * @param width \r\n */\r\n protected setWidth(width: number): void {\r\n if (this.currentEl) {\r\n const cellIndex: number = (<HTMLTableHeaderCellElement>this.currentEl).cellIndex;\r\n width = Math.max(width, this.minColWidth);\r\n this.colWidths[cellIndex] = width;\r\n this.renderer.setStyle(this.cols[cellIndex], 'width', width + 'px');\r\n\r\n let totalColWidths = 0;\r\n this.colWidths.forEach(w => {\r\n totalColWidths += w;\r\n });\r\n\r\n const containerWidth = (<HTMLDivElement>this.containerEl.nativeElement).clientWidth;\r\n if (this.minTableWidth !== containerWidth) {\r\n this.minTableWidth = containerWidth;\r\n }\r\n\r\n const diff = totalColWidths - this.minTableWidth; \r\n if (diff < 0) {\r\n const colIndex = cellIndex === this.lastColIndex ? this.lastColIndex - 1 : this.lastColIndex;\r\n const colWidth = Math.max(this.colWidths[colIndex] + Math.abs(diff), this.minColWidth);\r\n this.renderer.setStyle(this.cols[colIndex], 'width', colWidth + 'px');\r\n this.renderer.setStyle(this.tableEl, 'width', this.minTableWidth + 'px');\r\n } else {\r\n this.renderer.setStyle(this.tableEl, 'width', totalColWidths + 'px');\r\n }\r\n }\r\n }\r\n\r\n protected stopDrag(event: MouseEvent) {\r\n super.stopDrag(event);\r\n \r\n if (this.currentEl) {\r\n const cellIndex = (<HTMLTableHeaderCellElement>this.currentEl).cellIndex;\r\n const currentCol = this.resizableColumns.find(col => (<HTMLTableHeaderCellElement>col.el.nativeElement).cellIndex === cellIndex);\r\n if (currentCol) {\r\n currentCol.emitWidth(Math.round(this.colWidths[cellIndex]));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Capture the initial width of the table and the table headers.\r\n * @param headers \r\n */\r\n private setInitialWidths(headers: NodeListOf<HTMLTableHeaderCellElement>): void {\r\n this.currentTableWidth = this.tableEl.offsetWidth;\r\n this.minTableWidth = this.containerEl.nativeElement.clientWidth;\r\n\r\n headers.forEach(th => {\r\n this.colWidths[th.cellIndex] = th.offsetWidth;\r\n const width = th.style.width;\r\n if (width) {\r\n this.renderer.setStyle(this.cols[th.cellIndex], 'width', width);\r\n this.renderer.removeStyle(th, 'width');\r\n }\r\n });\r\n\r\n let totalColWidths = 0;\r\n this.colWidths.forEach(w => {\r\n totalColWidths += w;\r\n });\r\n\r\n // Check to see if our total column widths is greater than our table width\r\n let colWidthDifference = totalColWidths - this.currentTableWidth;\r\n \r\n // If the total column widths is greater than zero then its larger than our table container\r\n // To prevent a horizontal scroll we will bump a columns width down to match the table size\r\n if (colWidthDifference > 0) {\r\n // Ideally we will choose the second to the last column, but if there is only one that'll do\r\n let columnToReduce = headers.length > 1 ? headers.length - 2 : 0;\r\n\r\n // Shrink the column\r\n let th = headers[columnToReduce];\r\n this.colWidths[th.cellIndex] = th.offsetWidth - colWidthDifference;\r\n this.renderer.setStyle(this.cols[th.cellIndex], 'width', this.colWidths[th.cellIndex] + 'px');\r\n \r\n // Reduce our totalColWidths to reflect\r\n totalColWidths = totalColWidths - colWidthDifference;\r\n }\r\n\r\n this.renderer.setStyle(this.tableEl, 'width', Math.max(this.currentTableWidth, totalColWidths) + 'px');\r\n this.renderer.setStyle(this.tableEl, 'minWidth', '100%');\r\n }\r\n}\r\n","import { AfterContentInit, AfterViewInit, Component, ContentChildren, ElementRef, EventEmitter, HostBinding, Input, OnChanges, OnDestroy, Output, QueryList, Renderer2, SimpleChanges, TemplateRef, ViewEncapsulation } from '@angular/core';\r\nimport { cloneDeep, isEqual } from 'lodash';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { ResizableColumnComponent } from './resizable-column.component';\r\nimport { TableMasterRowComponent } from './table-master-row.component';\r\nimport { TableSelectableRowContext } from './table-selectable-row.component';\r\n\r\nexport type TableSortDirection = 'desc' | 'asc';\r\nexport interface TableSort {\r\n field: string;\r\n direction: TableSortDirection;\r\n}\r\n\r\n@Component({\r\n selector: 'ec-table',\r\n templateUrl: './table.component.html',\r\n styleUrls: ['./table.component.scss'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class TableComponent implements AfterViewInit, OnDestroy, OnChanges, AfterContentInit{\r\n @HostBinding('attr.id')\r\n @Input() id = '';\r\n\r\n /**\r\n * Enables table scrolling with a sticky header and footer. Use\r\n * <thead> and <tfoot> elements for styles to be applied correctly. \r\n */\r\n @HostBinding('class.is-scrollable')\r\n @Input() scrollable = false;\r\n \r\n /**\r\n * Enables resizable table columns. Apply the 'is-resizable' class\r\n * to the <th> of a table column than can be resized.\r\n */\r\n @HostBinding('class.is-resizable')\r\n @Input() resizable = false;\r\n \r\n /** \r\n * Turns on condensed table styling. By default a condensed table\r\n * has no row borders. To show borders, apply the 'has-borders' class\r\n * to the <ec-table> element\r\n */\r\n @HostBinding('class.is-condensed')\r\n @Input() condensed = false;\r\n \r\n /** \r\n * Enables sorting by clicking on table columns. To make a column sortable\r\n * apply the `data-sortable` attribute to the columns `<th>` element with \r\n * the value of the field used to sort the column. When a column is clicked\r\n * the fields and current sort direction is emitted from the `sortChange`\r\n * output\r\n * \r\n * @example\r\n * ```html\r\n * <ec-table [sortable]=\"true\" [sort]=\"currentSort\" (sortChange)=\"onSort($event)\">\r\n * <thead>\r\n * <th data-sortable=\"name\">Name</th>\r\n * <th data-sortable=\"qty\">Qty.</th>\r\n * <th data-sortable=\"price\">Price</th>\r\n * </thead>\r\n * ...\r\n * </ec-table>\r\n * ```\r\n */\r\n @HostBinding('class.is-sortable')\r\n @Input() sortable = false;\r\n \r\n /**\r\n * Shared context of TableSelectableRowComponents in the table. Will turn on highlighting on row hover.\r\n * Add the `TableSelectableRowComponent` to the table content to add checkboxes to each row and assign a \r\n * TemplateRef to the `[selectionToolbarTemplate]` input that includes actions to take on selected items \r\n * that will appear over the table header when 1 or more rows are selected.\r\n */\r\n @Input() selectionContext?: TableSelectableRowContext;\r\n\r\n /** Include actions to display in a bar over the table header when 1 or more rows are selected. Requires `[selectionContext]` to be defined */\r\n @Input() selectionToolbarTemplate?: TemplateRef<any>;\r\n \r\n /** Set to true if selectionContext is defined */\r\n @HostBinding('class.is-selectable')\r\n @Input() selectable = false;\r\n\r\n /** Hides/shows the selection toolbar template when 1 or more rows is selected */\r\n hasSelection = false\r\n\r\n /**\r\n * Enables form table styling to allow form controls inside table cells.\r\n */\r\n @HostBinding('class.is-form-table')\r\n @Input() isForm = false;\r\n \r\n /**\r\n * The current sort field and direction ('desc' or 'asc')\r\n */\r\n @Input() sort?: TableSort | TableSort[];\r\n\r\n /**\r\n * Emits the new sort value whenever a sortable column is clicked\r\n */\r\n @Output() sortChange: EventEmitter<TableSort | TableSort[]> = new EventEmitter();\r\n\r\n /**\r\n * True if a TableMasterRowComponent exists in the table content\r\n */\r\n @HostBinding('class.is-master-detail') hasMasterDetailRows = false;\r\n\r\n @ContentChildren(TableMasterRowComponent, {descendants: true}) masterRows!: QueryList<TableMasterRowComponent>;\r\n\r\n public resizableColumns!: QueryList<ResizableColumnComponent>;\r\n @ContentChildren(ResizableColumnComponent, {descendants: true}) _resizableColumns!: QueryList<ResizableColumnComponent>;\r\n\r\n @Input('resizableColumns') searchableTableResizableColumns?: QueryList<ResizableColumnComponent>;\r\n\r\n /**\r\n * Unlisten function returned by `renderer.listen()` that are called\r\n * OnDestroy to clean up all listeners\r\n */\r\n private unlisteners: (() => void)[] = [];\r\n \r\n /** The current sort value */\r\n private currentSort?: TableSort | TableSort[];\r\n \r\n /** A map of sortable `<th>` elements */\r\n private sortableCols: {[field: string]: HTMLTableHeaderCellElement} = {};\r\n\r\n private destroyed: Subject<void> = new Subject();\r\n \r\n constructor(private renderer: Renderer2, public el: ElementRef) {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (this.sortable && changes.sort && changes.sort.currentValue && !changes.sort.firstChange) {\r\n const newValue: TableSort | TableSort[] = changes.sort.currentValue;\r\n if (!this.currentSort || !isEqual(newValue, this.currentSort)){\r\n this.onSort(newValue);\r\n }\r\n }\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this.hasMasterDetailRows = !!this.masterRows.length;\r\n \r\n this.masterRows.changes.pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(() => {\r\n this.hasMasterDetailRows = !!this.masterRows.length;\r\n });\r\n\r\n this.resizableColumns = this.searchableTableResizableColumns || this._resizableColumns;\r\n }\r\n \r\n ngAfterViewInit(): void {\r\n if (this.sortable) {\r\n this.initSortable();\r\n }\r\n\r\n if (this.selectable) {\r\n this.initSelectable();\r\n }\r\n }\r\n \r\n ngOnDestroy(): void {\r\n if (this.unlisteners.length) {\r\n this.unlisteners.forEach(unlisten => unlisten());\r\n }\r\n \r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /**\r\n * Get all elements inside the host element that match a selector \r\n * @param selector - Any valid selector for [querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll)\r\n */\r\n private queryElements<T>(selector: string): T[] {\r\n const table = this.el.nativeElement;\r\n return Array.from(table.querySelectorAll(selector));\r\n }\r\n\r\n /**\r\n * Store a `<th>` for each sortable column and attach a click\r\n * event listener. \r\n */\r\n private initSortable(): void {\r\n this.queryElements<HTMLTableHeaderCellElement>('th').forEach(th => {\r\n if (th.hasAttribute('data-sortfield')) {\r\n \r\n const field = th.getAttribute('data-sortfield');\r\n if (field) {\r\n this.sortableCols[field] = th;\r\n const unlisten = this.renderer.listen(th, 'click', (event: MouseEvent) => {\r\n\r\n // Do not sort if the event target was the resizable handle\r\n if (th.classList.contains('is-resizable') && event.target && (<HTMLElement>event.target).classList.contains('handle')) {\r\n return;\r\n }\r\n\r\n let direction: TableSortDirection;\r\n\r\n if (th.classList.contains('is-sorted-desc')) {\r\n direction = 'asc';\r\n } else {\r\n direction = 'desc';\r\n }\r\n\r\n this.onSort({ field, direction });\r\n });\r\n \r\n // Store unlisten function to remove listener when component is destroyed\r\n this.unlisteners.push(unlisten);\r\n } else {\r\n console.error(`data-sortfield attribute was not assigned a value.`, th);\r\n }\r\n }\r\n });\r\n\r\n // Set the initial sort\r\n if (this.sort) {\r\n this.onSort(this.sort);\r\n }\r\n }\r\n\r\n /**\r\n * Find the sorted column and apply the desc or asc class in order\r\n * to show the correct sort icon. If another field was sorted, reset it.\r\n * Emit the current field and direction of the sorted column\r\n * @param field \r\n */\r\n private onSort(sort: TableSort | TableSort[]): void {\r\n this.clearSort();\r\n\r\n if (Array.isArray(sort)) {\r\n sort.forEach(s => this.applySort(s));\r\n } else {\r\n this.applySort(sort);\r\n }\r\n\r\n this.currentSort = cloneDeep(sort);\r\n this.sortChange.emit(this.currentSort);\r\n }\r\n\r\n private clearSort() {\r\n Object.values(this.sortableCols).forEach(th => {\r\n this.renderer.removeClass(th, `is-sorted-asc`);\r\n this.renderer.removeClass(th, `is-sorted-desc`);\r\n });\r\n }\r\n\r\n private applySort(sort: TableSort) {\r\n const th = this.sortableCols[sort.field];\r\n if (!th) { return; }\r\n\r\n this.renderer.addClass(th, `is-sorted-${sort.direction}`);\r\n }\r\n\r\n private initSelectable(): void {\r\n this.selectionContext!.rowCheckboxes.valueChanges.pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe((value: boolean[]) => {\r\n this.hasSelection = value.some(v => v);\r\n });\r\n }\r\n}\r\n","<div class=\"selectable-table-toolbar\"\r\n *ngIf=\"hasSelection && selectionToolbarTemplate\">\r\n <ng-container *ngTemplateOutlet=\"selectionToolbarTemplate\"></ng-container>\r\n</div>\r\n<div id=\"{{id}}-scroll-container\" \r\n class=\"table-scroll-container\"\r\n cdkScrollable>\r\n <table class=\"main-table\"\r\n id=\"{{id}}\"\r\n [ecResizableTable]=\"resizable\"\r\n [containerEl]=\"el\"\r\n [sortableTable]=\"sortable\"\r\n [resizableColumns]=\"resizableColumns\">\r\n <ng-content></ng-content>\r\n </table>\r\n</div>","import { Subject } from \"rxjs\";\r\nimport { NavItem } from \"./nav-item\";\r\n\r\nexport class NavGroup {\r\n\r\n /** The groups nav items */\r\n public items: NavItem[] = [];\r\n\r\n /** Broadcasts to subscribers when the value of the selected NavItem changed */\r\n public selectedChanges: Subject<NavItem> = new Subject<NavItem>();\r\n\r\n /** Set selected to a NavItem and call selectItem if selected was previously defined */\r\n public set selected(item: NavItem | undefined) {\r\n this._selected = item;\r\n if (item) {\r\n this.selectItem(item);\r\n }\r\n };\r\n\r\n /** Get the value of the selected NavItem */\r\n public get selected(): NavItem | undefined {\r\n return this._selected;\r\n }\r\n\r\n /** The currently selected NavItem */\r\n private _selected?: NavItem;\r\n\r\n /** Assign items to the NavGroup items */\r\n constructor(items?: NavItem[], defaultItem?: NavItem) {\r\n if (items) {\r\n this.items = items;\r\n\r\n if (this.items.length && defaultItem) {\r\n this._selected = defaultItem;\r\n }\r\n }\r\n }\r\n\r\n /** Call a selected NavItem's onClick method and broadcast the value of the selected NavItem to subscribers */\r\n private selectItem(item: NavItem): void {\r\n if (item.url) {\r\n return;\r\n } else if (item.onClick) {\r\n item.onClick(item);\r\n }\r\n this.selectedChanges.next(item);\r\n }\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { NavItem } from '../navigation/nav-item';\r\nimport { NavGroup } from '../navigation/nav-group';\r\n\r\nexport interface Tab extends NavItem {\r\n url: string,\r\n tabs?: Tab[],\r\n hide?: Array<(...args: any[]) => boolean>,\r\n}\r\n\r\n/**\r\n * Component to display navigation tabs\r\n */\r\n@Component({\r\n selector: 'ec-tabs',\r\n templateUrl: './tabs.component.html',\r\n styleUrls: ['./tabs.component.scss']\r\n})\r\nexport class TabsComponent {\r\n\r\n /** The id of the tabs component, will be used as a prefix for each individual tab */\r\n @Input() public id: string = '';\r\n\r\n /** The tabindex of the tabs component, will be applied to each individual tab */\r\n @Input() public tabindex: number = 0;\r\n\r\n /** Display tabs in the default style or as pills */\r\n @Input() public tabStyle: 'tabs' | 'pills' = 'tabs';\r\n\r\n /** The tabs group */\r\n @Input('tabGroup') public tabs: NavGroup = new NavGroup();\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Set the selected tab to the one the user clicked on pressed enter\r\n * when focused. If the event was a keypress.enter and the tab\r\n * has a link, navigate to that link.\r\n */\r\n public selectTab(event: Event, tab: NavItem) {\r\n if (!tab.disabled && (event.type === 'click' || (event.type === 'keypress' && (<KeyboardEvent>event).key === 'Enter'))) {\r\n this.tabs.selected = tab;\r\n }\r\n }\r\n}\r\n","<ul *ngIf=\"tabs?.items?.length\" class=\"{{tabStyle}}\">\r\n\r\n <li class=\"{{tab.classlist}}\" [ngClass]=\"{'icon-only': tab.icon && !tab.label}\" *ngFor=\"let tab of tabs?.items; index as i;\">\r\n\r\n <a *ngIf=\"tab.url && !tab.disabled\"\r\n tabindex=\"{{tabs?.selected === tab ? -1 : tabindex}}\"\r\n class=\"tab\"\r\n id=\"{{tab.id ? tab.id : id + '_item' + i}}\"\r\n routerLinkActive=\"active\"\r\n [routerLink]=\"tab.url\"\r\n [routerLinkActiveOptions]=\"{exact: tab.isActiveExactMatch || false}\"\r\n [queryParams]=\"tab.queryParams || null\"\r\n [queryParamsHandling]=\"tab.queryParamsHandling || ''\"\r\n (keypress)=\"selectTab($event, tab)\"\r\n (click)=\"selectTab($event, tab)\">\r\n <i class=\"ec-icon {{tab.icon}}\" *ngIf=\"tab.icon\" [class.mr-1]=\"tab.label\"></i>\r\n <span class=\"text-truncate\">{{tab.label | translate}}</span>\r\n <span *ngIf=\"tab?.indicator\" class=\"indicator ml-1\" [style.background-color]=\"tab?.indicator === true ? '' : tab?.indicator\"></span>\r\n </a>\r\n\r\n <span *ngIf=\"!tab.url || tab.disabled\"\r\n tabindex=\"{{tabs?.selected === tab || tab.disabled ? -1 : tabindex}}\"\r\n id=\"{{tab.id ? tab.id : id + '_item' + i}}\"\r\n class=\"tab\"\r\n [ngClass]=\"{'active': tabs?.selected === tab, 'is-disabled': tab.disabled}\"\r\n (keypress)=\"selectTab($event, tab)\"\r\n (click)=\"selectTab($event, tab)\">\r\n <i class=\"ec-icon {{tab.icon}}\" *ngIf=\"tab.icon\" [class.mr-1]=\"tab.label\"></i>\r\n <span class=\"text-truncate\">{{tab.label | translate}}</span>\r\n <span *ngIf=\"tab?.indicator\" class=\"indicator ml-1\" [style.background-color]=\"tab?.indicator === true ? '' : tab?.indicator\"></span>\r\n </span>\r\n </li>\r\n</ul> ","import { Component, Input, Output, EventEmitter, ElementRef, OnChanges } from '@angular/core';\r\nimport { MenuItem } from '../../controls/menu/menu.component';\r\nimport { NavItem } from '../../controls/navigation/nav-item';\r\nimport { NavGroup } from '../../controls/navigation/nav-group';\r\n\r\nexport interface PagingInfo {\r\n /**Number of items to skip to get to this page*/\r\n skip: number,\r\n /**Number of items in this page*/\r\n pageSize: number,\r\n /**The number of the page*/\r\n pageNumber: number\r\n}\r\n\r\ninterface PageRange {\r\n firstPage: number,\r\n lastPage: number\r\n}\r\n\r\n@Component({\r\n selector: 'ec-table-pagination',\r\n templateUrl: './table-pagination.component.html',\r\n host: {\r\n class: 'd-flex px-2 align-items-center'\r\n }\r\n})\r\nexport class TablePaginationComponent implements OnChanges {\r\n\r\n @Input() id?: string;\r\n\r\n /**\r\n * Total number of rows that we need to page through.\r\n * i.e. the sum of all rows on all pages.\r\n */\r\n @Input() totalItems!: number;\r\n\r\n /**\r\n * Max size of a page.\r\n */\r\n @Input() pageSize!: number;\r\n\r\n /**\r\n * Number of the current page.\r\n * Initial value is 1, can be overridden to change the starting page number.\r\n */\r\n @Input() pageNumber: number = 1;\r\n\r\n /**\r\n * Maximum number of page tabs to show\r\n */\r\n @Input() maxTabs?: number = 10;\r\n\r\n /** When true the tabs and the more pages dropdown will be disabled */\r\n @Input() disablePaginationControls?: boolean = false;\r\n\r\n /**\r\n * Emits when the page changes.\r\n * \r\n * Bind to the event in a template using a function that uses the \"skip\" and \"pageSize\"\r\n * properties to slice the new page from your data set.\r\n * \r\n * @example\r\n * //.html\r\n * (pageChanged)=\"onPageChanged($event)\"\r\n * //.ts\r\n * public onPageChanged(event: PagingInfo) {\r\n * this.currentPageItems = this.paginatedTableItems.slice(event.skip, event.skip + event.pageSize);\r\n * }\r\n * //Since pageChanged doesn't emit for the initial page, onPageChanged should be manually called during initialization \r\n * //using getPagingInfo:\r\n * this.onPageChanged(TablePaginationComponent.getPagingInfo(this.startingPageNumber, this.pageSize));\r\n */\r\n @Output() pageChanged: EventEmitter<PagingInfo> = new EventEmitter();\r\n\r\n /**\r\n * All possible items in the dropdown menu.\r\n */\r\n public dropdownItems: MenuItem<PageRange>[] = [];\r\n\r\n /**\r\n * Current tabs being displayed.\r\n */\r\n public currentTabs: NavGroup = new NavGroup();\r\n\r\n constructor(private el: ElementRef) { }\r\n\r\n\r\n ngOnChanges(): void {\r\n if(this.totalItems === 0) {\r\n this.dropdownItems = [];\r\n this.currentTabs = new NavGroup();\r\n return;\r\n }\r\n this.setDropdownItems();\r\n\r\n //Find the menu item that the page corresponding to this.pageNumber lies in\r\n let firstMenuItem = this.dropdownItems.find(item => {\r\n return item.value!.firstPage <= this.pageNumber && item.value!.lastPage >= this.pageNumber;\r\n });\r\n if(!firstMenuItem) {\r\n console.error(`Page ${this.pageNumber} does not exist. Setting the starting page number to 1.`);\r\n firstMenuItem = this.dropdownItems[0];\r\n this.pageNumber = 1;\r\n }\r\n //Set the tabs to those corresponding to the first menu item.\r\n //Note that we dont emit a pageChanged event here because the consumer already knows what the first page is.\r\n this.setTabs(firstMenuItem, this.pageNumber);\r\n }\r\n\r\n /**\r\n * Given the number of a page and the pageSize, return the PagingInfo object for that page.\r\n */\r\n public static getPagingInfo(pageNumber: number, pageSize: number) {\r\n return { skip: (pageNumber - 1)*pageSize, pageSize: pageSize, pageNumber: pageNumber };\r\n }\r\n\r\n public onItemSelected(menuItem: MenuItem<PageRange>) { \r\n this.setTabs(menuItem);\r\n this.onPageChange(parseInt(this.currentTabs.selected!.label!));\r\n //focus the currently selected tab to help keyboard navigation\r\n this.el.nativeElement.querySelector('.tab.active').focus();\r\n }\r\n\r\n /**\r\n * Create a tab for each item in the range represented in the MenuItem\r\n */\r\n private setTabs(menuItem: MenuItem<PageRange>, pageNumber?: number) {\r\n let tabItems: NavItem[] = [];\r\n for(let i = menuItem.value!.firstPage; i <= menuItem.value!.lastPage; i++) {\r\n tabItems.push({\r\n label: `${i}`,\r\n disabled: this.disablePaginationControls,\r\n onClick: () => {this.onPageChange(i)}\r\n });\r\n }\r\n //if a pageNumber is provided, select the tab with that page number.\r\n //otherwise, select the first tab.\r\n let selectedTab: NavItem = pageNumber ? tabItems.find(tab => {return parseInt(tab.label!) === pageNumber})!\r\n : tabItems[0];\r\n this.currentTabs = new NavGroup(tabItems, selectedTab);\r\n }\r\n\r\n private onPageChange(pageNumber: number) {\r\n this.pageNumber = pageNumber;\r\n this.pageChanged.emit(TablePaginationComponent.getPagingInfo(pageNumber, this.pageSize))\r\n }\r\n\r\n /**\r\n * Create all the items for the dropdown menu.\r\n * A dropdown item represents a page range (e.g. 1-10, 11-20, or 21-25).\r\n * A single dropdown item can represent a range of up to 10 pages (the last item could have less than 10).\r\n */\r\n private setDropdownItems() {\r\n this.dropdownItems = [];\r\n //find the last page\r\n let dividend = Math.floor(this.totalItems / this.pageSize);\r\n let remainder = this.totalItems % this.pageSize;\r\n const lastPage = (remainder === 0) ? dividend : dividend + 1;\r\n\r\n //keep building menu items of the form 1-10, 11-20, 21-30, etc until \r\n //end >= lastPage, which means we've found the range that contains the last page.\r\n let start = 1;\r\n\r\n let maxTabs = this.maxTabs || 10;\r\n let end = maxTabs;\r\n\r\n while(end < lastPage) {\r\n this.dropdownItems.push({\r\n label: `${start}-${end}`,\r\n value: {firstPage: start, lastPage: end}\r\n });\r\n start = start + maxTabs;\r\n end = end + maxTabs;\r\n }\r\n //add the menu item that contains the last page.\r\n this.dropdownItems.push({\r\n label: (start === lastPage) ? `${start}`: `${start}-${lastPage}`,\r\n value: {firstPage: start, lastPage: lastPage}\r\n });\r\n }\r\n\r\n}","<ec-tabs id=\"{{id}}_pages\"\r\n class=\"my-2 is-condensed\"\r\n [tabGroup]=\"currentTabs\"\r\n tabStyle=\"pills\">\r\n</ec-tabs>\r\n<ec-dropdown id=\"{{id}}_morePages\"\r\n *ngIf=\"dropdownItems.length > 1\"\r\n class=\"my-1 ml-1\"\r\n menuTemplateType=\"label\"\r\n icon=\"icon-more\"\r\n menuPosition=\"left\"\r\n [menuMinWidth]=\"80\"\r\n [showArrow]=\"false\"\r\n [popupFixed]=\"true\"\r\n [items]=\"dropdownItems\"\r\n [disabled]=\"disablePaginationControls\"\r\n (itemSelected)=\"onItemSelected($event)\">\r\n</ec-dropdown>","import { Injectable } from '@angular/core';\r\n\r\n\r\nexport function isApiError(errorResponse: any): boolean {\r\n // errorResponse is typed HttpErrorResponse if the api returns an error\r\n if (errorResponse.error && errorResponse.error.hasOwnProperty('status') && errorResponse.error.status.hasOwnProperty('message')) {\r\n return true;\r\n }\r\n\r\n // BillCAPture APIs return errors in a different format\r\n if (errorResponse.error && errorResponse.error.hasOwnProperty('Message')) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ErrorService {\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Parse an error that comes from the API for use inside the forms\r\n * In most cases this isn't required because the error handler will do it automatically,\r\n * but if you need to analyze the error message you can use this to extract it safely.\r\n * NOTE: Because it can be used for comparison the result is not translated. You must translate\r\n * it before providing it to the user.\r\n * @param error The error object from the API\r\n */\r\n public parseApiError(errorResponse: any, unknownErrorDefault?: string): string {\r\n if (typeof errorResponse === 'string') {\r\n return errorResponse;\r\n }\r\n\r\n // errorResponse is typed HttpErrorResponse if the api returns an error\r\n let apiErrorMessage: string = unknownErrorDefault || 'DefaultUnknownError_SC';\r\n\r\n if (errorResponse && isApiError(errorResponse)) {\r\n try {\r\n apiErrorMessage = errorResponse.error.status?.message || errorResponse.error.Message;\r\n } catch (error) {\r\n //log the real error to the console (for developers) but just return the generic error to the user\r\n this.logConsoleError(error);\r\n }\r\n } else {\r\n this.logConsoleError(errorResponse);\r\n }\r\n\r\n return apiErrorMessage;\r\n }\r\n\r\n /**\r\n * Just a safe wrapper around console.error in case the browser doesn't have one exposed\r\n */\r\n public logConsoleError(error: any): void {\r\n if (console && typeof (console.error) === 'function') {\r\n console.error('unknown error:', error);\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { PagingInfo } from '../../../display/table/table-pagination.component';\r\n\r\nexport type RowCountInfo = { \r\n totalItems: number,\r\n totalItemsBeforePaging?: number,\r\n}\r\n\r\n@Pipe({\r\n name: 'rowCount'\r\n})\r\nexport class RowCountPipe implements PipeTransform {\r\n\r\n constructor(private translateService: TranslateService) {}\r\n\r\n /**\r\n * Get the formatted row count for the results.\r\n * \r\n * Provide maxItemCount if the normal row count is needed.\r\n * Provide pagingInfo if the paged row count is needed.\r\n */\r\n //Note that totalPagedItemCount is not necessarily equal to pagingInfo.pageSize since the last page could have less than pageSize rows.\r\n transform(results: RowCountInfo, objectType: string, maxItemCount?: number, pagingInfo?: PagingInfo): string {\r\n let translated = this.translateService.instant(objectType || 'results');\r\n if(maxItemCount !== undefined) {\r\n return this.getResultsCount(results, translated, maxItemCount);\r\n } else if(pagingInfo) {\r\n return this.getPagedResultsCount(results, translated, pagingInfo);\r\n }\r\n return '';\r\n }\r\n\r\n\r\n private getResultsCount(results: RowCountInfo, objectType: string, maxItemCount: number): string {\r\n // If the filtered results count of rows is greater than the maximum number\r\n // of results we want to show, we have already pared the results down,\r\n // so tell user we are displaying the first `maxItemCount` results out of the total\r\n // count of filtered results.\r\n if (results.totalItems > maxItemCount) {\r\n return `${maxItemCount} ${this.translateService.instant('of')} ${results.totalItems}`;\r\n }\r\n return `${results.totalItems} ${objectType}`;\r\n }\r\n\r\n private getPagedResultsCount(results: RowCountInfo, objectType: string, pagingInfo: PagingInfo): string {\r\n let prefix = `${pagingInfo.skip + 1}` + (results.totalItems > 1 ? `-${pagingInfo.skip + results.totalItems} ` : ' ');\r\n return prefix + `${this.translateService.instant('of')} ${results.totalItemsBeforePaging} ${objectType}`;\r\n }\r\n\r\n}\r\n","import { Component, ContentChildren, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, QueryList, SimpleChanges, TemplateRef } from '@angular/core';\r\nimport { UntypedFormControl, UntypedFormGroup } from '@angular/forms';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { EMPTY, merge, Observable, Subject } from 'rxjs';\r\nimport { catchError, debounceTime, map, pluck, skipUntil, switchMap, takeUntil, tap } from 'rxjs/operators';\r\nimport { ErrorService } from '../../core/error.service';\r\nimport { RowCountPipe } from '../../shared/display/pipes/row-count.pipe';\r\nimport { Overlay } from '../view-overlay/view-overlay.component';\r\nimport { ResizableColumnComponent } from './resizable-column.component';\r\nimport { PagingInfo, TablePaginationComponent } from './table-pagination.component';\r\nimport { TableSelectableRowContext } from './table-selectable-row.component';\r\nimport { TableSort } from './table.component';\r\n\r\nexport type TableSearchResults = { items: unknown[], totalItems: number, totalItemsBeforePaging?: number };\r\nexport type SearchableTableRefreshOptions = { clearSearch?: boolean };\r\n\r\ntype SearchableTableFormModel = { searchModel?: string };\r\n\r\n@Component({\r\n selector: 'ec-searchable-table',\r\n templateUrl: './searchable-table.component.html',\r\n styleUrls: ['./searchable-table.component.scss']\r\n})\r\nexport class SearchableTableComponent implements OnInit, OnDestroy, OnChanges {\r\n\r\n @Input() id = '';\r\n @Input() resizable = false;\r\n @Input() sortable = false;\r\n @Input() sort?: TableSort | TableSort[];\r\n @Input() autofocus: boolean = false;\r\n\r\n /**Set to a space-separated set of strings that should be added to the ec-table class attribute\r\n * this allows finer control over styling.\r\n */\r\n @Input() tableClasses: string = '';\r\n\r\n /** Emits when table sort has changed */\r\n @Output() sortChange: EventEmitter<TableSort | TableSort[]> = new EventEmitter<TableSort | TableSort[]>();\r\n\r\n /** Emits when the table page has changed */\r\n @Output('pageChange') pageChangeEmitter: EventEmitter<PagingInfo> = new EventEmitter<PagingInfo>();\r\n\r\n /** Placeholder text for the searchbox */\r\n @Input() searchboxPlaceholder = '';\r\n\r\n /**\r\n * FormGroup for the searchbox\r\n *\r\n * The referenced FormGroup **must** contain a FormControl called 'searchModel'.\r\n */\r\n @Input() public formModel!: UntypedFormGroup;\r\n\r\n /**\r\n * Displayed in overlay when no data is returned (without searching).\r\n *\r\n * Defaults to \"SearchableTable_Default_NoData_SC\"\r\n */\r\n @Input() noDataMessage: string = 'SearchableTable_Default_NoData_SC';\r\n\r\n /**\r\n * Displayed in overlay when no data is returned (after searching).\r\n * Ensure translation has an interpolation placeholder for \"searchText\".\r\n *\r\n * Defaults to \"SearchableTable_Default_NoMatches_SC\"\r\n *\r\n * @example\r\n * // 7 requires single curly braces\r\n * No items found matching <strong>{{searchText}}</strong>\r\n */\r\n @Input() noSearchResultsMessage: string = 'SearchableTable_Default_NoMatches_SC';\r\n\r\n /**\r\n * Indicates hosting page is ready for the table to load data.\r\n *\r\n * Next and Complete this observable after hosting page has made any preliminary\r\n * API (or other asynchronous) calls to load prerequisite data upon which the code\r\n * in the `getItems` function depends. Use a `ReplaySubject` to ensure every component\r\n * that uses this observable gets the Next and Complete notifications.\r\n */\r\n @Input() ready!: Observable<void>;\r\n\r\n /**\r\n * Function called to get items to display in the table.\r\n * If pageable is true, the TableSearchResults need to include totalItemsBeforePaging, which is the\r\n * count of items before you've applied any pagination (i.e. the total number of items that came back from the search).\r\n *\r\n * Make sure to bind the scope in the template\r\n * @example\r\n * [getItems]=\"yourFunction.bind(this)\"\r\n */\r\n @Input() getItems!: (search?: string, pageChangeInfo?: PagingInfo) => Observable<TableSearchResults>;\r\n\r\n /** Observable that will force the getItems function to get called again */\r\n @Input() refresh?: Observable<SearchableTableRefreshOptions | void>;\r\n\r\n /** Allow the host component to supply an overlay to control the pending state of the table */\r\n @Input() status: Overlay = new Overlay('hasData');\r\n\r\n /**\r\n * Sets the underlying table's layout to fixed.\r\n */\r\n @Input() tableLayoutFixed: boolean = false;\r\n\r\n /** Emits items returned by the getItems function, along with total count */\r\n @Output() itemsChange: EventEmitter<TableSearchResults> = new EventEmitter<TableSearchResults>();\r\n\r\n /** Optional tab index for the searchbox */\r\n @Input() searchboxTabIndex?: number;\r\n\r\n /** Maximum number of items to show in the table (default: 100) */\r\n @Input() maxItemCount: number = 100;\r\n\r\n /** Set to true to hide search box (does not hide the other searchable table controls */\r\n @Input() hideSearchControl: boolean = false;\r\n\r\n /** Set to true to hide the entire header */\r\n @Input() hideHeader: boolean = false;\r\n\r\n /** Type of object in the table. Displayed in footer (default: 'results')*/\r\n @Input() objectType: string = 'results';\r\n\r\n /** Set to true to hide the table footer */\r\n @Input() hideFooter: boolean = false;\r\n\r\n /**\r\n * Set to true to enable paging. If paging is enabled, pageSize must be provided.\r\n * getItems will be passed both a search and a PagingInfo object when called. It must include totalItemsBeforePaging in the TableSearchResults output.\r\n * Here is a simple implementation: \r\n * @example\r\n * getItems(search?: string, pageChangeInfo?: PagingInfo): Observable<TableSearchResults> {\r\n let results: SimpleItem[] = [...this.paginatedTableItems];\r\n //apply search\r\n if(search) {\r\n results = this.paginatedTableItems.filter(i => i.a.toLowerCase().includes(search.toLowerCase()));\r\n }\r\n //get count before applying paging\r\n let countBeforePaging = results.length;\r\n //apply paging\r\n if(pageChangeInfo) {\r\n results = results.slice(pageChangeInfo!.skip, pageChangeInfo!.skip + pageChangeInfo!.pageSize);\r\n }\r\n return of({ items: results, totalItems: results.length, totalItemsBeforePaging: countBeforePaging });\r\n }\r\n */\r\n @Input() pageable: boolean = false;\r\n\r\n /**\r\n * Max size of a page.\r\n */\r\n @Input() pageSize?: number;\r\n\r\n /**\r\n * Maximum number of page tabs to show\r\n */\r\n @Input() maxTabs?: number = 10;\r\n\r\n /**\r\n * Makes the searchbox readonly if true.\r\n */\r\n @Input() searchboxReadonly: boolean = false;\r\n\r\n /** Passed to the inner TableComponent to enable row selection */\r\n @Input() selectionContext?: TableSelectableRowContext;\r\n\r\n /** Passed to the inner TableComponent to display a toolbar when 1 or more rows are selected. Requires `[selectionContext]` to be defined. */\r\n @Input() selectionToolbarTemplate?: TemplateRef<any>;\r\n \r\n @ContentChildren(ResizableColumnComponent, {descendants: true}) resizableColumns!: QueryList<ResizableColumnComponent>;\r\n\r\n /** Optional text to add to the results count in the table footer. This text will be added after the count and objectType. */\r\n @Input() additionalCountText: string = '';\r\n\r\n /** Enables table row selection and row highlighting styles when true */\r\n @Input() selectable: boolean = false;\r\n\r\n /**Defaults to undefined. Specify your own template if an ec-table wrapped around your transcluded content won't meet your needs\r\n */\r\n @Input() customContentTemplate?: TemplateRef<any>;\r\n\r\n /** When true, removes the card styles from the table wrapper */\r\n @Input() removeCard: boolean = false;\r\n\r\n /** Classes to add to the overlay/card element */\r\n @Input() overlayClasses: string = '';\r\n\r\n /** When true the overlay and table will not have flex-shrink-max but instead flex-grow */\r\n @Input() fillParentHeight?: boolean = false;\r\n\r\n /** Passed to the pagination control component. Used to disable the pagination controls */\r\n @Input() disablePaginationControls?: boolean = false;\r\n /**\r\n * PagingInfo for the current page.\r\n */\r\n public pageInfo?: PagingInfo;\r\n\r\n /** Reference to the searchModel */\r\n public get searchModel(): UntypedFormControl {\r\n return this.formModel.controls.searchModel as UntypedFormControl;\r\n }\r\n\r\n /**\r\n * Text displayed in the footer.\r\n * Sometimes `noDataMessage`, sometimes `noSearchResultsMessage`\r\n */\r\n public tableCaption: string = this.translateService.instant(this.noDataMessage || 'SearchableTable_Default_NoData_SC');\r\n\r\n /** count of results displayed in the table */\r\n public resultsCount: string = '';\r\n\r\n /** Items returned by the getItems function, along with total count */\r\n public searchResults: TableSearchResults = { items: [], totalItems: 0 };\r\n\r\n /**\r\n * If passed an input for refresh, triggers reloading items.\r\n * Otherwise, completes immediately (will never trigger reload).\r\n */\r\n private refreshTrigger: Observable<SearchableTableFormModel | undefined> = EMPTY;\r\n private destroyed: Subject<void> = new Subject();\r\n\r\n private pageChanged: Subject<SearchableTableFormModel> = new Subject();\r\n\r\n /** Triggers the initial load of the table */\r\n private initTable = new Subject<any>();\r\n\r\n constructor(\r\n private errorService: ErrorService,\r\n private translateService: TranslateService,\r\n private rowCountPipe: RowCountPipe\r\n ) { }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.pageSize && !changes.pageSize.firstChange && this.pageable) {\r\n // If the pageSize changes, reset to the first page and refresh.\r\n this.pageInfo = TablePaginationComponent.getPagingInfo(1, this.pageSize!);\r\n this.onPageChange(this.pageInfo);\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.status.setStatus('pending', 'Loading');\r\n this.setUpRefreshTrigger();\r\n\r\n // Watch for searchbox/other control changes or refresh requests\r\n const searchOrRefresh = merge(\r\n this.formModel.valueChanges.pipe(\r\n skipUntil(this.ready),\r\n debounceTime(300)\r\n ),\r\n this.refreshTrigger,\r\n this.initTable\r\n ).pipe(tap(()=> {\r\n //a change to any form control or a refresh should reset the pageInfo to the first page if the table is pageable.\r\n //(if we didnt reset the pageInfo, we'd have to call getItems with the previous pageInfo, which may not be valid for the new results)\r\n if(this.pageable) {\r\n this.pageInfo = TablePaginationComponent.getPagingInfo(1, this.pageSize!);\r\n }\r\n }));\r\n\r\n const updateResults = merge(\r\n searchOrRefresh,\r\n this.pageChanged.pipe(\r\n // Prevent a call to getItems when the pageSize is set during page init and before ready is completed\r\n skipUntil(this.ready)\r\n )\r\n )\r\n\r\n // Call getItems and watch for errors\r\n const getData = updateResults.pipe(\r\n // Pluck the searchModel value out of the formModel\r\n pluck('searchModel'),\r\n\r\n // Ensure search string is defined\r\n // Trim and lowercase it to aid case-insensitive searching\r\n map((searchString?: string) => {\r\n let search = searchString || '';\r\n return search.trim().toLowerCase();\r\n }),\r\n\r\n // Show status overlay\r\n tap(() => this.status.setStatus('pending', 'Loading')),\r\n\r\n // Call passed function\r\n switchMap((searchString: string) => \r\n //if the table is pageable, pageInfo will be defined.\r\n this.getItems(searchString, this.pageInfo)\r\n ),\r\n\r\n // If passed function fails, show error status\r\n catchError((err, caught) => {\r\n this.status.setStatus('error', this.errorService.parseApiError(err));\r\n // return the caught observable so the subscription doesn't complete\r\n return caught;\r\n }),\r\n\r\n takeUntil(this.destroyed),\r\n );\r\n\r\n // Handle returned data and notify parent\r\n getData.subscribe((results: TableSearchResults) => {\r\n // Limiting number of results to show if not pageable (if pageable the max number of items in the table\r\n // can be modified by increasing/decreasing the pageSize.)\r\n if(!this.pageable) {\r\n results.items = results.items.slice(0, this.maxItemCount);\r\n }\r\n\r\n // Need to know this (along with if there's a value in the formModel) to determine what to show in the footer\r\n this.searchResults = results;\r\n \r\n this.tableCaption = this.getCaption(results);\r\n this.resultsCount = this.pageable ? this.rowCountPipe.transform(results, this.objectType, undefined, this.pageInfo):\r\n this.rowCountPipe.transform(results, this.objectType, this.maxItemCount);\r\n\r\n // Disable searchbox when in no-data state\r\n if (!results.items.length && !this.searchModel.value) {\r\n this.searchModel.disable({ emitEvent: false });\r\n } else if (this.searchModel.disabled) {\r\n // re-enable if it was disabled, but now has items\r\n this.searchModel.enable({ emitEvent: false });\r\n }\r\n\r\n this.status.setStatus('hasData');\r\n // Send the results to the parent component\r\n this.itemsChange.emit(results);\r\n });\r\n\r\n // When 'ready' is completed by the host, initialize the table with the current form model values\r\n this.ready.subscribe({\r\n complete: () => {\r\n this.initTable.next(this.formModel.value);\r\n this.initTable.complete();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /** Pass along sort to parent component */\r\n onSortChange(sort: TableSort | TableSort[]): void {\r\n this.sortChange.emit(sort);\r\n }\r\n\r\n /**\r\n * When a page changes, store the new pagingInfo and emit the current value of the form to trigger getData.\r\n */\r\n onPageChange(pagingInfo: PagingInfo) {\r\n this.status.setStatus('pending', 'Loading');\r\n this.pageInfo = pagingInfo;\r\n this.pageChangeEmitter.emit(pagingInfo);\r\n this.pageChanged.next(this.formModel.value);\r\n }\r\n\r\n\r\n /**\r\n * Wire up a handler to the `refresh` observable so that when\r\n * the host page context changes it can force the table to update as well.\r\n *\r\n * If the `refresh` observable passes options and the `clearSearch` property\r\n * is set to true, reset the searchModel and pass an empty string.\r\n *\r\n * If `refresh` observable does not pass options or the `clearSearch` property\r\n * is set to false, pass along the current searchModel Value.\r\n */\r\n private setUpRefreshTrigger() {\r\n if (this.refresh) {\r\n this.refreshTrigger = this.refresh.pipe(\r\n map(opts => {\r\n if (opts && opts.clearSearch) {\r\n this.searchModel.reset('', { emitEvent: false });\r\n return { ...this.formModel, searchModel: '' };\r\n }\r\n return this.formModel.value;\r\n }),\r\n takeUntil(this.destroyed)\r\n );\r\n }\r\n }\r\n\r\n /** Get text to display in the footer. */\r\n private getCaption(results: TableSearchResults): string {\r\n if (results.items.length) {\r\n return '';\r\n }\r\n\r\n if (this.searchModel.value) {\r\n return this.translateService.instant(this.noSearchResultsMessage || 'SearchableTable_Default_NoMatches_SC', { searchText: this.searchModel.value });\r\n }\r\n\r\n return this.translateService.instant(this.noDataMessage || 'SearchableTable_Default_NoData_SC');\r\n }\r\n\r\n}","<header *ngIf=\"!hideHeader\"\r\n class=\"d-flex flex-shrink align-items-center mb-3\">\r\n <ec-textbox id=\"{{id}}_searchbox\"\r\n *ngIf=\"!hideSearchControl\"\r\n class=\"mb-0 flex-grow mr-2\"\r\n [autofocus]=\"autofocus\"\r\n [formModel]=\"searchModel\"\r\n [tabindex]=\"searchboxTabIndex\"\r\n [placeholder]=\"searchboxPlaceholder\"\r\n [readonly]=\"searchboxReadonly\"></ec-textbox>\r\n <div class=\"flex-grow\">\r\n <ng-content select=\".searchable-table-controls\"></ng-content>\r\n </div>\r\n</header>\r\n<section id=\"{{id}}_card\"\r\n class=\"d-flex flex-column {{overlayClasses}}\"\r\n [ngClass]=\"{'is-translucent': status.status !== 'error', 'has-mask': status.status !== 'hasData', 'card m-0 bg-content': !customContentTemplate && !removeCard}\"\r\n ecOverlay\r\n [status]=\"status.status\"\r\n [message]=\"status.message\"\r\n [displayAsMask]=\"true\">\r\n <ng-content select=\".card-header\"></ng-content>\r\n <ng-container *ngTemplateOutlet=\"customContentTemplate || defaultContentTemplate\">\r\n </ng-container>\r\n\r\n <!-- the default template is an ec-table with proxied-over searchable table inputs. \r\n If that doesn't work for you then you can specify a customContentTemplate to use instead\r\n and still retain all the event handling, header, footer pagination, etc support -->\r\n <ng-template #defaultContentTemplate>\r\n <ec-table id=\"{{id}}_table\"\r\n class=\"{{tableClasses}}\"\r\n [class.is-fixed]=\"tableLayoutFixed\"\r\n [sortable]=\"sortable\"\r\n [sort]=\"sort\"\r\n (sortChange)=\"onSortChange($event)\"\r\n [resizable]=\"resizable\"\r\n [scrollable]=\"true\"\r\n [selectable]=\"selectable\"\r\n [selectionContext]=\"selectionContext\"\r\n [selectionToolbarTemplate]=\"selectionToolbarTemplate\"\r\n [resizableColumns]=\"resizableColumns\">\r\n <ng-content></ng-content>\r\n </ec-table>\r\n </ng-template>\r\n\r\n <!-- pagination footer visible if table is page-able and there are more than one page of results -->\r\n <footer *ngIf=\"!hideFooter && pageable && searchResults.totalItemsBeforePaging! > pageSize!\"\r\n class=\"pagination-footer\"\r\n [class.border-top]=\"!customContentTemplate\">\r\n <ec-table-pagination id=\"{{id}}_pager\"\r\n class=\"font-color-primary\"\r\n [totalItems]=\"searchResults.totalItemsBeforePaging\"\r\n [pageSize]=\"pageSize\"\r\n [maxTabs]=\"maxTabs\"\r\n [pageNumber]=\"pageInfo?.pageNumber\"\r\n [disablePaginationControls]=\"disablePaginationControls\"\r\n (pageChanged)=\"onPageChange($event)\">\r\n </ec-table-pagination>\r\n <div id=\"resultsCount\"\r\n *ngIf=\"searchResults?.items?.length\"\r\n class=\"ml-auto font-color-hint text-truncate\" \r\n title=\"{{resultsCount}} {{additionalCountText}}\">{{resultsCount}} {{additionalCountText}}</div>\r\n </footer>\r\n\r\n <!-- default footer: visible if hideFooter is false and table is not page-able or there are only one page of results (always shows if there is a caption to indicate no results) -->\r\n <footer *ngIf=\"(!hideFooter && (!pageable || searchResults.totalItemsBeforePaging! <= pageSize!)) || tableCaption\"\r\n class=\"caption-footer\"\r\n [ngClass]=\"{'has-results': searchResults?.items?.length, 'border-top': searchResults?.items?.length && !customContentTemplate}\">\r\n <ng-content *ngIf=\"!tableCaption\"\r\n select=\".searchable-table-footer\"></ng-content>\r\n <div id=\"tableCaption\"\r\n *ngIf=\"tableCaption\"\r\n [innerHTML]=\"tableCaption\"></div>\r\n <div id=\"resultsCount\"\r\n *ngIf=\"searchResults?.items?.length\"\r\n class=\"ml-auto text-truncate\"\r\n title=\"{{resultsCount}} {{additionalCountText}}\">{{resultsCount}} {{additionalCountText}}</div>\r\n </footer>\r\n</section>","import { Component, Input, OnChanges, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';\r\nimport { UntypedFormGroup } from '@angular/forms';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { debounceTime, takeUntil } from 'rxjs/operators';\r\n\r\nimport { TableSearchResults } from '../../display/table/searchable-table.component';\r\nimport { PagingInfo } from '../../display/table/table-pagination.component';\r\nimport { TableSelectableRowContext } from '../../display/table/table-selectable-row.component';\r\nimport { Overlay } from '../../display/view-overlay/view-overlay.component';\r\nimport { MenuItem } from '../menu/menu.component';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\nexport interface PickerItem<TValue = any, SItems = any> extends MenuItem {\r\n id: string;\r\n\r\n /** When set to true the available item will be automatically added to the selected list */\r\n defaultSelected?: boolean;\r\n\r\n /** When set to true, the item will not be allowed to be removed from the selected list */\r\n preventRemove?: boolean;\r\n\r\n /** Redefining to get the typing */\r\n value: TValue;\r\n};\r\n\r\nexport class ItemPickerSelectableContext<T> extends TableSelectableRowContext {\r\n /** id/value map of the selected items. Used for keeping track of what is selected */\r\n public selectedItemsMap: Map<string, PickerItem<T>> = new Map();\r\n\r\n /**\r\n * Gives a way to tell the picker component that the map was modified externally and to update\r\n * the available/selected lists\r\n */\r\n public selectedItemsMapChanged: Subject<void> = new Subject();\r\n\r\n /**\r\n * AdvancedRowClickBehavior is disabled for ItemPicker.\r\n */\r\n public readonly disableAdvancedRowClickBehavior: boolean = true;\r\n\r\n /** When true the user has opted to select all items across all pages. Due to api pagination\r\n * we don't have all of the items locally, so the host will need to tell the API to operate on all\r\n * via api filters or other means.\r\n */\r\n public isSelectingAllItems: boolean = false;\r\n}\r\n\r\n@Component({\r\n selector: 'ec-item-picker',\r\n templateUrl: './item-picker.component.html',\r\n styleUrls: ['./item-picker.component.scss']\r\n})\r\nexport class ItemPickerComponent<T> implements OnInit, OnChanges, OnDestroy {\r\n\r\n /** Identifier for the component. This will be added to the beginning of all internal action elements */\r\n @Input() public id?: string = '';\r\n\r\n /** Title displayed above the available items table */\r\n @Input() public availableTitle: string = '';\r\n\r\n /** Help popover next to the available title. If supplied will show, otherwise is hidden */\r\n @Input() public availableTitleHelpPopover: string = '';\r\n\r\n /** Title displayed above the selected items list */\r\n @Input() public selectedTitle: string = '';\r\n\r\n /** The type of item being selected. Ex. Meters, Addresses */\r\n @Input() public itemName: string = '';\r\n\r\n /** Form group that is given to the internal Searchable Table */\r\n @Input() public formModel?: UntypedFormGroup;\r\n\r\n /** Template for when a custom header is needed for the available items table */\r\n @Input() public customAvailableHeaderTemplate?: TemplateRef<any>;\r\n\r\n /** Template for when a custom available item is needed. Default template is a label only */\r\n @Input() public customAvailableItemTemplate?: TemplateRef<any>;\r\n\r\n /** Template for when a custom selected item is needed. Default template is a label only */\r\n @Input() public customSelectedItemTemplate?: TemplateRef<any>;\r\n\r\n /** Used by the internal Searchable Table to know when the page is ready */\r\n @Input() public ready?: Observable<void>;\r\n\r\n /** Used by Searchable Table to retrieve the available items */\r\n @Input() public getItems?: (search?: string, pageChangeInfo?: PagingInfo) => Observable<TableSearchResults>;\r\n\r\n /** Used to maintain the available items checkbox selection as well as the selected items list */\r\n @Input() public selectionContext!: ItemPickerSelectableContext<T>;\r\n\r\n /** Used by the internal Searchable Table when there is no available items to choose from based on the getItems results. Do not supply\r\n * to inherit the default message.\r\n */\r\n @Input() public noDataMessage: string = '';\r\n\r\n /**\r\n * Used to override the default no selected items message. If provided this will be used, otherwise the default message with the item name\r\n * interpolation will be used.\r\n */\r\n @Input() public noSelectedItemsMessage?: string;\r\n\r\n /** Used to enable select all items across pages. When true the button to select all items will be visible in the available items header when\r\n * the header checkbox is checked and there are multiple pages of results\r\n */\r\n @Input() public enableSelectAllItems: boolean = false;\r\n\r\n /** Used to display a message in the selected items table when the select all items button is clicked */\r\n @Input() public selectAllItemsMessage: string = '';\r\n\r\n /** List of available items to pick from */\r\n public availableItems: PickerItem[] = [];\r\n\r\n /**\r\n * Selected items array. Created from the selected items map. Binding to the\r\n * map iterate values caused angular \"expression changed\" errors so after a map\r\n * update this gets set to the values\r\n */\r\n public selectedItems: PickerItem[] = [];\r\n\r\n /** True if there are selected items and at least one can be removed */\r\n public selectedItemsClearable: boolean = false;\r\n\r\n /** Track by used for the searchable table rows */\r\n public trackByIndex = (index: number) => index;\r\n\r\n public tableStatus: Overlay = new Overlay('pending');\r\n\r\n /** Text to display next to the checkbox in the available items header. Used to dislay how many items are\r\n * selected when select all items is enabled\r\n */\r\n public availableCheckboxText: string = '';\r\n\r\n /** When set to true the select all items button will show in the available items header. This is\r\n * shown when the user has enabled select all for the item picker and the user selects the header checkbox\r\n * with more than one page of results.\r\n */\r\n public showSelectAllItemsButton: boolean = false;\r\n\r\n /** The total number of items returned from the api across all pages */\r\n public totalItemsBeforePaging?: number = 0;\r\n\r\n /** Passed to the searchable table control. Used to disable the pagination controls */\r\n public disablePaginationControls?: boolean = false;\r\n\r\n\r\n /**\r\n * Template used to display the available and selected items as well as the available item header.\r\n * This will be set to the default template if a custom is not provided\r\n */\r\n public internalizedAvailableHeaderTemplate!: TemplateRef<any>;\r\n public internalizedAvailableItemTemplate!: TemplateRef<any>;\r\n public internalizedSelectedItemTemplate!: TemplateRef<any>;\r\n\r\n /** Default templates used if a custom template is not provided */\r\n @ViewChild('defaultAvailableHeaderTemplate', { static: true }) private defaultAvailableHeaderTemplate!: TemplateRef<any>;\r\n @ViewChild('defaultAvailableItemTemplate', { static: true }) private defaultAvailableItemTemplate!: TemplateRef<any>;\r\n @ViewChild('defaultSelectedItemTemplate', { static: true }) private defaultSelectedItemTemplate!: TemplateRef<any>;\r\n\r\n /** Used to shut down our subscriptions when the component is destroyed */\r\n private destroyed: Subject<void> = new Subject();\r\n\r\n constructor(\r\n private translateService: TranslateService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.setupRowCheckboxesWatcher();\r\n this.setupSelectedItemsChangedWatcher();\r\n }\r\n\r\n /**\r\n * Watch for changes and react if the custom item template value changes\r\n */\r\n public ngOnChanges(): void {\r\n this.setInternalizedTemplates();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /**\r\n * Called by the searchable table when a new set of items are returned from the getItems call.\r\n * If any of the items have `preventRemove` set, their indices are added to the context.\r\n */\r\n public onItemsChange(results: TableSearchResults) {\r\n if (this.selectionContext.isSelectingAllItems) {\r\n this.onClearSelectionClick();\r\n }\r\n\r\n let newNonDependentCheckboxes: number[] = [];\r\n\r\n (<PickerItem[]>results.items).forEach((item, index) => {\r\n // Check to see if any of the items are marked to be selected by default and if so\r\n // add them to the map.\r\n if (item.defaultSelected && !this.selectionContext?.selectedItemsMap.has(item.id)) {\r\n this.selectionContext?.selectedItemsMap.set(item.id, item);\r\n }\r\n\r\n // Check to see if any of the items are marked to prevent Removal, and if so\r\n // add them to the non-dependent checkboxes array. This will prevent the master\r\n // checkbox from toggling them.\r\n if (item.preventRemove) {\r\n newNonDependentCheckboxes.push(index);\r\n }\r\n });\r\n\r\n this.selectionContext.nonDependentCheckboxes = newNonDependentCheckboxes;\r\n\r\n // When the user filters the list we should reset the select all items\r\n this.selectionContext.isSelectingAllItems = false;\r\n\r\n this.availableItems = (<PickerItem[]>results.items);\r\n this.totalItemsBeforePaging = results.totalItemsBeforePaging;\r\n\r\n this.updateAvailableCheckboxText();\r\n }\r\n\r\n /**\r\n * Called when the clear selection link button is clicked\r\n */\r\n public onClearSelectionClick() {\r\n this.clearSelectedItemsMap();\r\n\r\n this.selectionContext.rowCheckboxes.controls.forEach((control, index: number) => {\r\n if (!this.availableItems[index].preventRemove) {\r\n control.setValue(false)\r\n }\r\n });\r\n\r\n this.selectedItems = Array.from(this.selectionContext.selectedItemsMap.values());\r\n this.selectionContext.isSelectingAllItems = false;\r\n this.disablePaginationControls = false;\r\n this.updateAvailableCheckboxText();\r\n }\r\n\r\n /**\r\n * Called when the remove item button is clicked for a selected item\r\n * @param removeItem\r\n */\r\n public removeSelectedItem(removeItem: PickerItem): void {\r\n let foundIndex = this.availableItems.findIndex(item => item.id === removeItem.id);\r\n if (foundIndex > -1) {\r\n // Update the row checkbox since the item exists in the page being viewed\r\n // The value change handler for row checkboxes will update the map/selected items\r\n this.selectionContext.rowCheckboxes.at(foundIndex).setValue(false);\r\n } else {\r\n // The item being removed is not on the current page so just update the\r\n // map/selected items\r\n this.selectionContext.selectedItemsMap.delete(removeItem.id);\r\n this.selectedItems = Array.from(this.selectionContext.selectedItemsMap.values());\r\n }\r\n this.updateAvailableCheckboxText();\r\n }\r\n\r\n \r\n /** \r\n * Click handler for the select all items button\r\n */\r\n public selectAllItems(): void {\r\n this.clearSelectedItemsMap();\r\n\r\n this.selectionContext.isSelectingAllItems = true;\r\n this.showSelectAllItemsButton = false;\r\n this.updateAvailableCheckboxText();\r\n this.disablePaginationControls = true;\r\n }\r\n\r\n /**\r\n * Removes all items from the selected items map. This was split from the onClearSelectionClick function to allow\r\n * selectAllItems to call this function but keep the row checkbox values in place. This was needed because when you are\r\n * selecting all items across all pages we want the current page of items to remain checked.\r\n * \r\n */\r\n private clearSelectedItemsMap(): void {\r\n // Remove removable items from map\r\n // This is safe. See https://stackoverflow.com/questions/35940216/es6-is-it-dangerous-to-delete-elements-from-set-map-during-set-map-iteration\r\n for (const [key, val] of this.selectionContext.selectedItemsMap) {\r\n if (!val.preventRemove) {\r\n this.selectionContext.selectedItemsMap.delete(key);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Watch for changes to the row checkboxes form array and update the selected items\r\n * list\r\n */\r\n private setupRowCheckboxesWatcher(): void {\r\n this.selectionContext?.rowCheckboxes.valueChanges.pipe(\r\n // Debounce 10 is simply to not spam the change handler on load/page change\r\n // Otherwise this will get called every time a new row is added to the table\r\n debounceTime(10),\r\n takeUntil(this.destroyed)\r\n ).subscribe((rowValues: boolean[]) => {\r\n rowValues.forEach((selected, index) => {\r\n let availableItem = this.availableItems[index];\r\n\r\n if (!selected && this.selectionContext?.selectedItemsMap.has(availableItem.id)) {\r\n this.selectionContext?.selectedItemsMap.delete(availableItem.id);\r\n } else if (selected && !this.selectionContext?.selectedItemsMap.has(availableItem.id)) {\r\n this.selectionContext?.selectedItemsMap.set(availableItem.id, availableItem);\r\n }\r\n });\r\n\r\n this.selectedItems = Array.from(this.selectionContext?.selectedItemsMap.values());\r\n this.selectedItemsClearable = this.selectedItems.length > 0 && this.selectedItems.some(i => !i.preventRemove);\r\n this.updateAvailableCheckboxText();\r\n });\r\n\r\n this.selectionContext.selectAllCheckbox.valueChanges.pipe(debounceTime(10), takeUntil(this.destroyed)).subscribe((checked: boolean) => {\r\n if (this.enableSelectAllItems) {\r\n const onePageOfData = this.availableItems.length === this.totalItemsBeforePaging;\r\n\r\n if (checked && !onePageOfData) {\r\n this.showSelectAllItemsButton = true;\r\n } else if (!checked) {\r\n if (this.selectionContext.isSelectingAllItems) {\r\n // We were selecting all items, clear the selection to allow the user to start over\r\n this.onClearSelectionClick();\r\n }\r\n \r\n this.showSelectAllItemsButton = false;\r\n this.selectionContext.isSelectingAllItems = false;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private updateAvailableCheckboxText() {\r\n if (this.selectionContext.isSelectingAllItems) {\r\n this.availableCheckboxText = this.translateService.instant('AllItemPickerItemsSelected_SC', { count: this.totalItemsBeforePaging, itemName: this.translateService.instant(this.itemName) });\r\n } else {\r\n const checkedCount = this.selectionContext.rowCheckboxes.controls.map(c => c.value).filter(v => v).length;\r\n if (checkedCount > 0) {\r\n this.availableCheckboxText = this.translateService.instant('CountSelected_TC', { count: checkedCount });\r\n } else {\r\n this.availableCheckboxText = '';\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Watch to be told if changes to the map were made outside of the component and if so update\r\n * the array displayed in the selected list and select checkboxes for visible available items\r\n */\r\n private setupSelectedItemsChangedWatcher(): void {\r\n this.selectionContext.selectedItemsMapChanged.pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(() => {\r\n if (this.selectionContext) {\r\n this.selectedItems = Array.from(this.selectionContext?.selectedItemsMap.values());\r\n\r\n this.availableItems.forEach((item, index) => {\r\n if (this.selectionContext.selectedItemsMap.has(item.id)) {\r\n this.selectionContext.rowCheckboxes.at(index).setValue(true);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n private setInternalizedTemplates(): void {\r\n if (this.customAvailableHeaderTemplate) {\r\n this.internalizedAvailableHeaderTemplate = this.customAvailableHeaderTemplate;\r\n } else {\r\n this.internalizedAvailableHeaderTemplate = this.defaultAvailableHeaderTemplate;\r\n }\r\n\r\n if (this.customAvailableItemTemplate) {\r\n this.internalizedAvailableItemTemplate = this.customAvailableItemTemplate;\r\n } else {\r\n this.internalizedAvailableItemTemplate = this.defaultAvailableItemTemplate;\r\n }\r\n\r\n if (this.customSelectedItemTemplate) {\r\n this.internalizedSelectedItemTemplate = this.customSelectedItemTemplate;\r\n } else {\r\n this.internalizedSelectedItemTemplate = this.defaultSelectedItemTemplate;\r\n }\r\n }\r\n}\r\n","<div ecOverlay\r\n class=\"d-flex flex-grow card\"\r\n [status]=\"tableStatus?.status\"\r\n [message]=\"tableStatus?.message\"\r\n [displayAsMask]=\"true\">\r\n <ec-searchable-table id=\"{{id}}_searchableTable\"\r\n class=\"flex-grow\"\r\n [fillParentHeight]=\"true\"\r\n [hideHeader]=\"true\"\r\n [hideSearchControl]=\"true\"\r\n [removeCard]=\"true\"\r\n [pageable]=\"true\"\r\n [pageSize]=\"50\"\r\n [objectType]=\"itemName\"\r\n [formModel]=\"formModel\"\r\n [ready]=\"ready\"\r\n [getItems]=\"getItems\"\r\n [selectable]=\"true\"\r\n [noDataMessage]=\"noDataMessage\"\r\n [selectionContext]=\"selectionContext\"\r\n [status]=\"tableStatus\"\r\n (itemsChange)=\"onItemsChange($event)\"\r\n [style.--ec-searchable-table-flex-properties]=\"(availableItems.length || tableStatus.status === 'pending' || tableStatus.status === 'error' ) ? '1 1 auto' : '0 1 auto'\"\r\n [style.--ec-searchable-table-height-caption-footer]=\"'calc(2.5rem + 1px)'\"\r\n [tableLayoutFixed]=\"true\"\r\n [disablePaginationControls]=\"disablePaginationControls\">\r\n <header *ngIf=\"customAvailableHeaderTemplate\"\r\n class=\"card-header flex-shrink\"\r\n style=\"height: 3rem;\">\r\n <h3 class=\"card-title\">{{availableTitle | translate}}\r\n <ec-help-popover id=\"availableTitle_helpPopover\"\r\n *ngIf=\"availableTitleHelpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{availableTitleHelpPopover | translate}}\">\r\n </ec-help-popover>\r\n </h3>\r\n </header>\r\n <thead>\r\n <tr ecTableSelectableRow\r\n [selectionContext]=\"selectionContext\"\r\n class=\"border-bottom-0\">\r\n <ng-container *ngTemplateOutlet=\"internalizedAvailableHeaderTemplate;\"></ng-container>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let item of availableItems; index as rowIndex; trackBy: trackByIndex\">\r\n <tr ecTableSelectableRow\r\n [selectionContext]=\"selectionContext\"\r\n [rowIndex]=\"rowIndex\"\r\n [isCheckboxDisabled]=\"item.preventRemove || selectionContext.isSelectingAllItems\"\r\n [isSelected]=\"selectionContext?.selectedItemsMap.has(item.id) || selectionContext.isSelectingAllItems\"\r\n [style.--ec-table-selectable-row-vertical-align-checkbox-td]=\"'middle'\">\r\n <ng-container *ngTemplateOutlet=\"internalizedAvailableItemTemplate; context: {$implicit: item}\">\r\n </ng-container>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </ec-searchable-table>\r\n\r\n <section id=\"{{id}}_selectedItems\"\r\n class=\"selected-items flex-grow d-flex flex-column\">\r\n <div *ngIf=\"selectionContext.isSelectingAllItems\"\r\n class=\"d-flex flex-column flex-grow\">\r\n <header class=\"d-flex align-items-center px-2 text-heading-2\"\r\n style=\"height: 3rem;\">\r\n <span class=\"flex-grow text-truncate\">{{selectedTitle | translate}}</span>\r\n <button *ngIf=\"selectedItemsClearable\"\r\n ecLinkButton\r\n id=\"{{id}}_clearSelection\"\r\n class=\"pl-2 ml-auto\"\r\n (click)=\"onClearSelectionClick()\"\r\n translate>ClearSelection_TC</button>\r\n </header>\r\n <div class=\"text-center border-top flex-grow d-flex align-items-center justify-content-center text-heading-2\"\r\n [style.padding-left.rem]=\"4\"\r\n [style.padding-right.rem]=\"4\"\r\n [innerHtml]=\"selectAllItemsMessage | translate\"></div>\r\n </div>\r\n <ec-table *ngIf=\"!selectionContext.isSelectingAllItems\"\r\n [scrollable]=\"true\"\r\n class=\"d-flex flex-grow is-fixed\">\r\n <colgroup>\r\n <col>\r\n <col style=\"width: 2rem;\">\r\n </colgroup>\r\n <thead>\r\n <tr style=\"height: 3rem;\">\r\n <th colspan=\"2\"\r\n class=\"p-2 border-bottom-0\">\r\n <div class=\"d-flex align-items-center text-heading-2\">\r\n <span class=\"flex-grow text-truncate\">{{selectedTitle | translate}}</span>\r\n <button *ngIf=\"selectedItemsClearable\"\r\n ecLinkButton\r\n id=\"{{id}}_clearSelection\"\r\n class=\"pl-2 ml-auto\"\r\n (click)=\"onClearSelectionClick()\"\r\n translate>ClearSelection_TC</button>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngIf=\"selectedItems.length\">\r\n <tr *ngFor=\"let item of selectedItems; last as isLast\"\r\n id=\"selected_row_{{item.id}}\"\r\n [class.border-bottom]=\"!isLast\">\r\n <td class=\"p-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"internalizedSelectedItemTemplate; context: {$implicit: item}\">\r\n </ng-container>\r\n </td>\r\n\r\n <td class=\"actions-col text-right\"\r\n style=\"vertical-align: middle;\">\r\n <ec-button id=\"{{id}}_removeSelected_{{item.id}}\"\r\n *ngIf=\"!item.preventRemove\"\r\n type=\"icon\"\r\n icon=\"ec-icon icon-cancel\"\r\n (clicked)=\"removeSelectedItem(item)\">\r\n </ec-button>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr *ngIf=\"!selectedItems.length\">\r\n <td *ngIf=\"!noSelectedItemsMessage\"\r\n colspan=\"2\"\r\n class=\"p-2 no-data-message\"\r\n translate\r\n [translateParams]=\"{itemName: itemName | translate}\">ItemPickerNoItemsSelected_SC</td>\r\n <td *ngIf=\"noSelectedItemsMessage\"\r\n colspan=\"2\"\r\n class=\"p-2 no-data-message\"\r\n translate>{{noSelectedItemsMessage}}</td>\r\n </tr>\r\n </tbody>\r\n </ec-table>\r\n\r\n <footer id=\"selectedItemsFooter\"\r\n *ngIf=\"selectedItems.length && !selectionContext.isSelectingAllItems\"\r\n class=\"d-flex flex-shrink px-2 border-top align-items-center\">\r\n <div class=\"ml-auto my-2 d-flex align-items-center\"\r\n style=\"height: 1.75rem;\">\r\n <span class=\"text-caption-1 font-color-hint\">{{selectedItems.length}} {{itemName | translate}}</span>\r\n </div>\r\n </footer>\r\n </section>\r\n</div>\r\n\r\n<ng-template #defaultAvailableHeaderTemplate>\r\n <th class=\"text-heading-2 font-color-primary border-bottom-0\">\r\n <div class=\"d-flex align-items-center \">\r\n <div *ngIf=\"!availableCheckboxText\">\r\n <span class=\"text-truncate\">{{availableTitle | translate}}</span>\r\n <ec-help-popover id=\"availableTitle_helpPopover\"\r\n *ngIf=\"availableTitleHelpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{availableTitleHelpPopover | translate}}\">\r\n </ec-help-popover>\r\n </div>\r\n <span *ngIf=\"availableCheckboxText\"\r\n id=\"selectedCount\">{{availableCheckboxText}}</span>\r\n <button *ngIf=\"showSelectAllItemsButton\"\r\n ecLinkButton\r\n id=\"selectAllItemsButton\"\r\n (click)=\"selectAllItems()\"\r\n class=\"ml-2\">\r\n {{ ('SelectAllItemPickerItems_TC') | translate:{ count: totalItemsBeforePaging, itemName: itemName } }}\r\n </button>\r\n </div>\r\n </th>\r\n</ng-template>\r\n\r\n<ng-template #defaultAvailableItemTemplate\r\n let-item>\r\n <td>{{item.label}}</td>\r\n</ng-template>\r\n\r\n<ng-template #defaultSelectedItemTemplate\r\n let-item>\r\n {{item.label}}\r\n</ng-template>","/** Regex to flag all spaces */\r\nexport const findAllSpacesPattern: RegExp = / /g;\r\n\r\n/** Pattern to validate United States zip codes. Allows numbers and dash only */\r\nexport const unitedStatesZipCodeRegex: RegExp = /^[0-9-]+$/;\r\n\r\n/** Pattern to validate Canadian postal codes,\r\n * must follow the 'letter number letter space number letter number' pattern */\r\nexport const canadianPostalCodeRegex: RegExp = /^[a-zA-Z][0-9][a-zA-Z] [0-9][a-zA-Z][0-9]$/;\r\n\r\n/** Pattern to validate other country zip codes, anything goes */\r\nexport const otherZipCodeRegex: RegExp = /.*/;\r\n\r\n/** Pattern to validate a correct date format */\r\nexport const dateInputFormatRegex: RegExp = /^[0-9./-]+$/;\r\n\r\n/** Pattern to validate integer numbers. Negative sign is optional and will not\r\n * invalidate if just a minus sign is entered in the input, any digit `0-9` is allowed\r\n */\r\nexport const integerPattern: RegExp = new RegExp(\"^(-)?([\\\\d]+)?$\");\r\n\r\n/** Pattern to validate most public domains */\r\nexport const domainPattern: RegExp = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/i;\r\n\r\n/**\r\n * Function to return a decimal RegExp. Takes in the number of decimals to validate\r\n * against\r\n */\r\nexport const getDecimalPattern = (decimals: number) => {\r\n let decimalPattern: RegExp;\r\n\r\n // Decimal portion, allowing zero to the maximum allowed decimals\r\n // This enables us to allow a number like \"1.\" or \".\" and not invalidate\r\n let decimalPortion: string = \"{0,\" + decimals.toString() + \"}\";\r\n // Negative sign is optional as well as the decimal, any digit 0-9 is allowed\r\n decimalPattern = new RegExp(`^((((-)?\\\\d+\\\\.?\\\\d${decimalPortion}?)|((-)?\\\\.?\\\\d${decimalPortion})))?$`);\r\n\r\n return decimalPattern;\r\n}\r\n","import { AfterViewChecked, AfterViewInit, Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { AbstractControl, UntypedFormControl, ValidatorFn, Validators } from \"@angular/forms\";\r\nimport { debounceTime, distinctUntilChanged, filter, takeUntil } from 'rxjs/operators';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { getDecimalPattern, integerPattern } from '../../core/validation-patterns';\r\nimport { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { FormControlBase } from \"../form-control-base\";\r\nimport { TextboxComponent } from '../textbox/textbox.component';\r\n\r\n\r\n/**\r\n * Custom validator to check that min/max and pattern validation is met on the numericbox\r\n * component\r\n */\r\nexport const numericboxValidation = (min: number | undefined, max: number | undefined, decimals: number | undefined, maxPrecisionDigits: number | undefined): ValidatorFn => {\r\n return (control: AbstractControl) => {\r\n let hasError: boolean = false;\r\n\r\n // If the control is empty we won't attempt to validate, if there is a required\r\n // validator we will never get here until there is a value\r\n if (control.value && control.value !== \"\") {\r\n\r\n let numericPattern: RegExp;\r\n if (decimals && decimals > 0) {\r\n numericPattern = getDecimalPattern(decimals);\r\n } else if (maxPrecisionDigits) {\r\n // Still need to check for a valid number formatting when in max precision mode\r\n numericPattern = getDecimalPattern(maxPrecisionDigits);\r\n } else {\r\n // Allow an optional negative sign and any number of digits 0-9\r\n numericPattern = integerPattern;\r\n }\r\n\r\n if (!numericPattern.test(control.value)) {\r\n hasError = true;\r\n } else if (maxPrecisionDigits) {\r\n // Converting to a number then back to string removes trailing zeros, and the regex replace removes\r\n // any negative signs, leading zeros or decimal points from the number.\r\n const val = Number(control.value).toString().replace(/^-?/, '').replace(/(^0\\.)|(\\.)/, '');\r\n hasError = val.length > maxPrecisionDigits;\r\n }\r\n\r\n // We now know we have a valid number, so we can cast these to numbers\r\n // for proper range validation\r\n if (min !== undefined && Number(control.value) < min) {\r\n hasError = true;\r\n }\r\n\r\n if (max !== undefined && Number(control.value) > max) {\r\n hasError = true;\r\n }\r\n }\r\n\r\n if (hasError) {\r\n return {\r\n numericbox: {\r\n valid: false,\r\n min: min,\r\n max: max,\r\n decimals: decimals,\r\n maxPrecisionDigits: maxPrecisionDigits\r\n }\r\n };\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'ec-numericbox',\r\n templateUrl: './numericbox.component.html',\r\n styleUrls: ['./numericbox.component.scss']\r\n})\r\n\r\nexport class NumericboxComponent extends FormControlBase implements OnInit, OnDestroy, OnChanges, AfterViewChecked, AfterViewInit {\r\n\r\n\r\n /**\r\n * The value of the textbox input's placeholder\r\n */\r\n @Input() public placeholder?: string;\r\n\r\n /**\r\n * The number of decimals allowed. If not supplied the input value will be validated as a\r\n * whole number\r\n */\r\n @Input() public decimals?: number;\r\n\r\n\r\n /**\r\n * Show trailing zeros after the decimal point.\r\n * Do not use with maxPrecisionDigits.\r\n */\r\n @Input() public showPrecision?: boolean = false;\r\n\r\n\r\n /**\r\n * The maximum total digits a number can have left or right of the decimal point.\r\n * Due to limitations with how JS handles numbers, the max value for this is 15.\r\n * Numbers longer than 15 digits may cause rounding errors.\r\n * Do not use with showPrecision = true\r\n */\r\n @Input() public maxPrecisionDigits?: number;\r\n\r\n\r\n /**\r\n * The maximum value allowed in the input\r\n *\r\n * This is for adding the attribute on the element to get the browser functionality\r\n * from the input. If you need the form to be validated before submission, apply the\r\n * max validator to the form conrol.\r\n */\r\n @Input() public max?: number;\r\n\r\n\r\n /**\r\n * The minimum value allowed in the input\r\n *\r\n * This is for adding the attribute on the element to get the browser functionality\r\n * from the input. If you need the form to be validated before submission, apply the\r\n * min validator to the form conrol.\r\n */\r\n @Input() public min?: number;\r\n\r\n\r\n /**\r\n * Text to display on the left side of the input\r\n */\r\n @Input() public leftUnits?: string;\r\n\r\n\r\n /**\r\n * Text to display on the right side of the input\r\n */\r\n @Input() public rightUnits?: string;\r\n\r\n /**\r\n * If set to true this will update the form model after a debounce as the user\r\n * interacts with the component\r\n */\r\n @Input() public autoUpdateFormModel: boolean = false;\r\n\r\n /**\r\n * A reference to the textbox element\r\n */\r\n @ViewChild(TextboxComponent, { read: ElementRef, static: true }) private textboxEl!: ElementRef;\r\n\r\n\r\n /**\r\n * The internal form model we use to display the value with formatting\r\n */\r\n public textboxFormModel!: UntypedFormControl;\r\n\r\n /** Flag to tell the page we finally computed a greater than zero\r\n * width for units (if applicable)\r\n */\r\n private unitsWidthCalculated: boolean = false;\r\n\r\n /** Flag used to filter the form models value changes subscription\r\n * to prevent the textbox model from being formatted as the form model is updated\r\n * programmatically when the textbox model updates\r\n */\r\n private autoUpdatingFormModel: boolean = false;\r\n\r\n /**\r\n * Reference to the textbox input control\r\n */\r\n @ViewChild('textbox', { static: true }) private textboxInput!: TextboxComponent;\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper,\r\n protected renderer: Renderer2\r\n ) {\r\n super(validationMessageService, formGroupHelper);\r\n }\r\n\r\n /**\r\n * Angular AfterViewInit life-cycle hook\r\n * Subscribe to textbox model value changes if the hosting\r\n * page has opted in for this component\r\n */\r\n public ngAfterViewInit(): void {\r\n if (this.autoUpdateFormModel) {\r\n this.textboxFormModel.valueChanges\r\n .pipe(\r\n debounceTime(300),\r\n distinctUntilChanged(),\r\n takeUntil(this.componentDestroyed),\r\n ).subscribe(() => {\r\n this.updateFormModelValue();\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Angular onChanges life-cycle hook\r\n * @see {@link https://angular.io/guide/lifecycle-hooks | Life-cycle hooks}\r\n */\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n // If either units change after we've calculated,\r\n // reset the flag so we can react and redraw\r\n if (changes.rightUnits || changes.leftUnits) {\r\n this.unitsWidthCalculated = false;\r\n }\r\n\r\n super.ngOnChanges(changes);\r\n }\r\n\r\n\r\n /**\r\n * Angular onInit lifecycle hook\r\n * If units is defined, set the position and listen for status changes so we\r\n * can update the positioning of the units element\r\n */\r\n public ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n // Initialize the textbox form model with the value of the form model and synchronize\r\n // disabled state\r\n this.textboxFormModel = new UntypedFormControl({ value: this.formModel.value, disabled: this.formModel.disabled });\r\n\r\n // Update the form model's errors when the textbox form model status changes\r\n this.textboxFormModel.statusChanges.pipe(takeUntil(this.componentDestroyed)).subscribe(() => {\r\n if (this.formModel.enabled) {\r\n this.formModel.setErrors(this.textboxFormModel.errors);\r\n }\r\n })\r\n\r\n // Synchronize disabled state between form model and internal textbox form model\r\n this.formModel.statusChanges.pipe(takeUntil(this.componentDestroyed)).subscribe(() => {\r\n if (this.formModel.disabled) {\r\n this.textboxFormModel.disable();\r\n } else {\r\n if (this.textboxFormModel.disabled) {\r\n this.textboxFormModel.enable();\r\n }\r\n }\r\n });\r\n\r\n // Set textbox validators\r\n this.textboxFormModel.setValidators(this.getValidators());\r\n\r\n // Now that the textbox is set up we will set it's value to whatever the\r\n // form model had when we initialized\r\n this.textboxFormModel.setValue(this.formatDisplayNumber(this.formModel.value));\r\n\r\n // If the form model's value changes programmatically we need to update the\r\n // textbox form model\r\n this.formModel.valueChanges.pipe(\r\n // We need to filter out when we are updating it programmatically if the\r\n // hosting page has opted into the auto updating input\r\n filter(() => !this.autoUpdatingFormModel),\r\n takeUntil(this.componentDestroyed)).subscribe(value => {\r\n this.textboxFormModel.setValue(this.formatDisplayNumber(value));\r\n });\r\n\r\n // If the textbox status changes we need to update the left units position because\r\n // we want to make room for the invalid icon\r\n if (this.leftUnits) {\r\n this.textboxFormModel.statusChanges.pipe(takeUntil(this.componentDestroyed)).subscribe(() => {\r\n this.positionLeftUnits();\r\n });\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Angular afterViewChecked lifecycle hook\r\n * Show the units element if units is defined. Runs after every ngOnChanges\r\n */\r\n public ngAfterViewChecked(): void {\r\n if ((this.leftUnits || this.rightUnits) && !this.unitsWidthCalculated) {\r\n this.showUnits();\r\n }\r\n }\r\n\r\n /**\r\n * Function that builds and returns a ValidatorFn array to set on the form control\r\n */\r\n private getValidators(): ValidatorFn[] {\r\n let validators: ValidatorFn[] = [];\r\n\r\n if (this.required) {\r\n validators.push(Validators.required);\r\n }\r\n\r\n validators.push(numericboxValidation(this.min, this.max, this.decimals, this.maxPrecisionDigits));\r\n\r\n return validators;\r\n }\r\n\r\n /**\r\n * Focus out event handler for the Textbox component\r\n */\r\n public onFocusOut(): void {\r\n this.updateFormModelValue(true);\r\n }\r\n\r\n /**\r\n * Function to set focus on an input programatically after the page\r\n * had been rendered. The highlight text flag will select the text\r\n * within the input if passed in and true\r\n */\r\n public setFocus(highlightText?: boolean): void {\r\n this.textboxInput.setFocus(highlightText);\r\n }\r\n\r\n\r\n /**\r\n * When the textbox model updates we need to add some display formatting for\r\n * display in the textbox and cast the textbox model to a number. Avoid updating\r\n * the form model when the value doesn't change because listeners will fire for no reason\r\n */\r\n private updateFormModelValue(isFocusOut?: boolean): void {\r\n if (this.autoUpdateFormModel) {\r\n // Make it so value changes on the form model do not get triggered\r\n // as we change it programmatically. We do not want the textbox\r\n // model to be updated while the user is in the input\r\n this.autoUpdatingFormModel = true;\r\n }\r\n\r\n try {\r\n if (this.textboxFormModel.valid || this.textboxFormModel.value === \"\") {\r\n // Start out with null for the number, if the textbox value is not a number\r\n // we will clear it out on focus out\r\n let number: number | null = null;\r\n\r\n // Make sure the textbox model is a number before trying to update the\r\n // form model value with it\r\n if (this.textboxFormModel.value && !isNaN(this.textboxFormModel.value)) {\r\n // Our value is a legit number, on focus out we will format it if needed\r\n number = Number(this.textboxFormModel.value);\r\n\r\n // Checking if the value has actually changed, if not don't set the\r\n // value to avoid extra listener calls\r\n if (this.formModel.value !== number) {\r\n this.formModel.setValue(number);\r\n }\r\n // The textbox model is not a number, check to see if our form model has a value\r\n // and if so clear it out\r\n } else if (this.formModel.value !== null) {\r\n this.formModel.setValue(null);\r\n }\r\n\r\n // We only will update the textbox form model with formatting if needed\r\n // on Focus out. This works well for the user whether the auto update\r\n // is opted in or not\r\n if (isFocusOut) {\r\n this.textboxFormModel.setValue(this.formatDisplayNumber(number));\r\n }\r\n }\r\n\r\n this.formModel.markAsTouched();\r\n } catch (error) {\r\n // Nothing to display, just ensuring we reset our flag that filters\r\n // the form model value changes\r\n } finally {\r\n this.autoUpdatingFormModel = false;\r\n }\r\n }\r\n\r\n /**\r\n * Convert a number value to the formmated display string. If there is no value\r\n * return null\r\n */\r\n private formatDisplayNumber(value: number | null | undefined): string | null {\r\n if (value || value === 0) {\r\n // Guard against calling toFixed if the value isn't a number. This is possible\r\n // if patching a value from outside of the component as you don't have\r\n // type checking there\r\n if (this.showPrecision && this.decimals && !isNaN(value)) {\r\n return value.toFixed(this.decimals);\r\n } else {\r\n return value.toString();\r\n }\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Position the units element and set the padding in the textbox input based\r\n * on the width of the units element\r\n */\r\n private positionRightUnits(): void {\r\n let unitsEl = this.textboxEl.nativeElement.querySelector('.units-right');\r\n let inputEl = this.textboxEl.nativeElement.querySelector('input');\r\n\r\n if (unitsEl && inputEl) {\r\n let unitsWidth = unitsEl.offsetWidth;\r\n\r\n if (unitsWidth > 0) {\r\n this.unitsWidthCalculated = true;\r\n }\r\n\r\n let padding = unitsWidth;\r\n this.renderer.setStyle(inputEl, 'padding-right', padding + 'px');\r\n }\r\n }\r\n\r\n\r\n private positionLeftUnits() {\r\n let unitsEl = this.textboxEl.nativeElement.querySelector('.units-left');\r\n let inputEl = this.textboxEl.nativeElement.querySelector('input');\r\n\r\n if (unitsEl && inputEl) {\r\n let unitsWidth = unitsEl.offsetWidth;\r\n\r\n if (unitsWidth > 0) {\r\n this.unitsWidthCalculated = true;\r\n }\r\n\r\n let padding = unitsWidth;\r\n let leftPosition = getComputedStyle(unitsEl).left;\r\n if (leftPosition) {\r\n padding += parseInt(leftPosition.replace('px', ''), 0);\r\n }\r\n this.renderer.setStyle(inputEl, 'padding-left', padding + 'px');\r\n }\r\n }\r\n\r\n /**\r\n * Create and append the units element to the textbox element\r\n */\r\n private showUnits(): void {\r\n let inputWrapper = this.textboxEl.nativeElement.querySelector('.input-wrapper');\r\n\r\n if (inputWrapper) {\r\n if (this.leftUnits) {\r\n let unitsEl = this.textboxEl.nativeElement.querySelector('.units-left');\r\n if (unitsEl) {\r\n this.renderer.setProperty(unitsEl, 'innerHTML', this.leftUnits);\r\n } else {\r\n this.renderer.appendChild(inputWrapper, this.makeUnitElement('left', this.leftUnits));\r\n }\r\n this.positionLeftUnits();\r\n }\r\n\r\n if (this.rightUnits) {\r\n let unitsEl = this.textboxEl.nativeElement.querySelector('.units-right');\r\n if (unitsEl) {\r\n this.renderer.setProperty(unitsEl, 'innerHTML', this.rightUnits);\r\n } else {\r\n this.renderer.appendChild(inputWrapper, this.makeUnitElement('right', this.rightUnits));\r\n }\r\n this.positionRightUnits();\r\n }\r\n }\r\n }\r\n\r\n private makeUnitElement(side: 'left' | 'right', text: string): any {\r\n let unitsEl = this.renderer.createElement('span');\r\n this.renderer.setAttribute(unitsEl, 'class', `units units-${side}`);\r\n this.renderer.setAttribute(unitsEl, 'id', `${this.id}_units`);\r\n this.renderer.setAttribute(unitsEl, 'style', 'pointer-events: none');\r\n this.renderer.setProperty(unitsEl, 'innerHTML', text);\r\n\r\n return unitsEl;\r\n }\r\n}","<div class=\"control control-label-{{labelPosition}}\"\r\n [class.invalid]=\"formModel?.invalid && (formModel?.touched)\">\r\n\r\n <label *ngIf=\"label\">\r\n <span>{{label | translate}}</span>\r\n <span *ngIf=\"validationErrors.length && formModel?.touched && formModel?.invalid\">&nbsp;{{validationErrors | translate}}</span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n </label>\r\n\r\n <!-- Setting the maxlength to 13 to combat the user from entering too large of a number\r\n for javascript to support. If the user enters all 13 characters as numbers and we have showPrecision set, adding the\r\n decimal and the empty zero characters will get them in a situation where to edit it they must remove characters\r\n as we would push them past the limit -->\r\n <ec-textbox [id]=\"id\"\r\n #textbox\r\n class=\"control-input mb-0\"\r\n [placeholder]=\"placeholder\"\r\n [maxlength]=\"maxPrecisionDigits ? maxPrecisionDigits + 3 : 13\"\r\n [autofocus]=\"autofocus\"\r\n [formModel]=\"textboxFormModel\"\r\n [required]=\"required\"\r\n [tabindex]=\"tabindex\"\r\n [readonly]=\"readonly\"\r\n [tooltip]=\"tooltip\"\r\n (focusout)=\"onFocusOut()\">\r\n </ec-textbox>\r\n</div>","import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { FormControlBase } from '../form-control-base';\r\nimport { RadioButtonOption } from './radio-button-option';\r\n\r\n\r\n/**\r\n * Row displays options horizontally, column displays options vertically\r\n */\r\nexport type RadioButtonDirection = \"row\" | \"column\";\r\n\r\n/**\r\n * Radio is the default button style, toggle will style as a toggle switch\r\n */\r\nexport type RadioButtonType = \"radio\" | \"toggle\";\r\n\r\n@Component({\r\n selector: 'ec-radiobutton',\r\n templateUrl: './radio-button.component.html',\r\n styleUrls: ['./radio-button.component.scss']\r\n})\r\n\r\n/**\r\n * A single or group of radio button. Only one option can be checked\r\n * at a time\r\n */\r\nexport class RadioButtonComponent extends FormControlBase implements AfterViewInit, OnInit {\r\n /**\r\n * Display the radio button options as a default set of radio button inputs or\r\n * as a toggle switch\r\n * @default 'radio'\r\n */\r\n @Input() public type?: RadioButtonType = \"radio\";\r\n\r\n /**\r\n * One or more options to display\r\n */\r\n @Input() public options: RadioButtonOption[] = [];\r\n\r\n /**\r\n * If there is more than one option, display them in a row or column.\r\n * @default 'row'\r\n */\r\n @Input() public direction?: RadioButtonDirection = \"row\";\r\n\r\n /**\r\n * The name of the radio input element used to group radio elements\r\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio\r\n */\r\n @Input() public name: string = '';\r\n\r\n /**\r\n * An array of classnames that will be passed into ngClass\r\n */\r\n public currentClasses!: string[];\r\n\r\n /**\r\n * Reference to the first input found with the radioInput reference variable. All radio\r\n * inputs for this component will be tagged with this ref variable, but only the first found\r\n * will be selected as the inputElement for autofocus\r\n */\r\n @ViewChild('radioInput') protected inputElement!: ElementRef;\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper\r\n ) {\r\n super(validationMessageService, formGroupHelper);\r\n }\r\n\r\n ngOnInit() {\r\n super.ngOnInit();\r\n this.currentClasses = [];\r\n\r\n if (this.type === 'toggle') {\r\n this.currentClasses.push('radio-group-toggle');\r\n } else if (this.direction === 'column') {\r\n this.currentClasses.push('radio-group-column');\r\n }\r\n\r\n // If the formModel is assigned an undefined or null value, set it to the first option\r\n this.formModel.valueChanges.subscribe(() => {\r\n if (this.formModel.value === undefined || this.formModel.value === null) {\r\n this.formModel.setValue(this.options[0].value);\r\n }\r\n })\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.autofocus) {\r\n this.inputElement.nativeElement.focus();\r\n }\r\n\r\n if (this.options.length > 5 && this.type === \"toggle\") {\r\n console.warn(\"Radio button components with a type of toggle cannot have more than 5 options\");\r\n }\r\n }\r\n}","<div class=\"control\"\r\n [class.control-label-bottom]=\"labelPosition === 'bottom'\">\r\n\r\n <label *ngIf=\"label\">\r\n <span>{{label | translate}}</span>\r\n <span *ngIf=\"validationErrors.length > 0 && formModel.touched && formModel.invalid\">&nbsp;{{validationErrors | translate}}</span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n </label>\r\n \r\n <div class=\"radio-group {{'toggle-options-' + options.length}}\"\r\n [ngClass]=\"currentClasses\"\r\n [class.is-disabled]=\"formModel.disabled\"\r\n [class.is-readonly]=\"readonly\">\r\n\r\n <!-- RadioButton type=\"toggle\"-->\r\n <!-- There are two ng-templates here due to the fact you can't have ngIf and ngFor on the same element -->\r\n <ng-container *ngIf=\"type === 'toggle'\">\r\n <ng-container *ngFor=\"let option of options; index as i; first as isFirst\">\r\n <!-- The input has two name attributes set, one is for the form model and one is for the broswer. With one set\r\n the tabbing did not work, and with the other the controls were all linked together. They both need set\r\n for the best of both worlds -->\r\n <input [attr.id]=\"inputId + i.toString()\"\r\n [formControl]=\"formModel\"\r\n type=\"radio\"\r\n tabindex=\"{{tabindex}}\"\r\n [value]=\"option.value\"\r\n #radioInput\r\n name=\"{{name}}\"\r\n attr.name=\"{{name}}\"\r\n [attr.cdkFocusInitial]=\"(autofocus && isFirst) || null\">\r\n <label [attr.for]=\"inputId + i.toString()\"\r\n title=\"{{ option.tooltip | translate}}\">\r\n <i class=\"ec-icon {{option.icon}}\"\r\n *ngIf=\"option.icon\"></i>\r\n <span id=\"{{inputId}}_label{{i.toString()}}\"\r\n *ngIf=\"option.label\">{{option.label | translate}}</span>\r\n </label>\r\n </ng-container>\r\n <a>\r\n <div class=\"toggle-handle\"></div>\r\n </a>\r\n <div class=\"toggle-focused\"></div>\r\n </ng-container>\r\n\r\n <!-- RadioButton type=\"radio\"-->\r\n <!-- There are two ng-templates here due to the fact you can't have ngIf and ngFor on the same element -->\r\n <ng-container *ngIf=\"type === 'radio'\">\r\n <ng-container *ngFor=\"let option of options; index as i; first as isFirst\">\r\n <label class='radio-button'\r\n title=\"{{ option.tooltip | translate}}\">\r\n <!-- The input has two name attributes set, one is for the form model and one is for the broswer. With one set\r\n the tabbing did not work, and with the other the controls were all linked together. They both need set\r\n for the best of both worlds -->\r\n <input [attr.id]=\"inputId + i.toString()\"\r\n class=\"input\"\r\n [formControl]=\"formModel\"\r\n type=\"radio\"\r\n value=\"{{option.value}}\"\r\n #radioInput\r\n tabindex=\"{{tabindex}}\"\r\n name=\"{{name}}\"\r\n attr.name=\"{{name}}\"\r\n [attr.cdkFocusInitial]=\"(autofocus && isFirst) || null\">\r\n <span class=\"indicator\"></span>\r\n <span id=\"{{inputId}}_label{{i.toString()}}\"\r\n class=\"label\"\r\n *ngIf=\"option.label\"\r\n [innerHtml]=\"option.label | translate\"></span>\r\n </label>\r\n </ng-container>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n</div>","import { AfterViewInit, Component, ElementRef, Input, SimpleChanges } from '@angular/core';\r\nimport { ValidationMessageService } from '../../core/validation-message.service';\r\nimport { FormGroupHelper } from '../../shared/form-group.helper';\r\nimport { FormControlBase } from '../form-control-base';\r\nimport { MenuItem } from '../menu/menu.component';\r\n\r\n@Component({\r\n selector: 'ec-select',\r\n templateUrl: './select.component.html',\r\n styleUrls: ['./select.component.scss']\r\n})\r\nexport class SelectComponent extends FormControlBase implements AfterViewInit {\r\n\r\n /**\r\n * When the component is not required, defines the label for an additional first option that sets the control to null\r\n */\r\n @Input() placeholder = '';\r\n\r\n /**\r\n * When the component is not required, an additional option is added with a value of null.\r\n */\r\n @Input() options: MenuItem[] = [];\r\n\r\n /**\r\n * Select a default option automatically during initialization and when options change. Default: `true`.\r\n * * If formModel has a value\r\n * * Make no change if the current value exists in options\r\n * * Otherwise, set value to the first option if control is required, or null if optional and emit event \r\n * * If formModel has no value\r\n * * Set value to first option if control is required and emit eventSet to false to manually manage form state.\r\n * \r\n * Set to false to opt out of automatic state management\r\n */\r\n @Input() autoDefault: boolean = true;\r\n\r\n constructor(\r\n protected validationMessageService: ValidationMessageService,\r\n protected formGroupHelper: FormGroupHelper,\r\n private el: ElementRef\r\n ) { \r\n super(validationMessageService, formGroupHelper);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.options && this.autoDefault) {\r\n this.onOptionsChange(changes.options.firstChange);\r\n }\r\n super.ngOnChanges(changes);\r\n }\r\n \r\n ngAfterViewInit(): void {\r\n if (this.autofocus) {\r\n this.focus();\r\n }\r\n \r\n if (!this.autoDefault) {\r\n console.warn(`SelectComponent#${this.id} has 'autoDefault' set to false and will not select the default option.`)\r\n }\r\n }\r\n\r\n private focus(): void {\r\n const hostEl: HTMLElement = this.el.nativeElement;\r\n const selectEl = hostEl.querySelector('select');\r\n if (selectEl) {\r\n selectEl.focus();\r\n }\r\n }\r\n\r\n /**\r\n * If formModel has a value\r\n * * Make no change if the current value exists in options\r\n * * Otherwise, set value to the first option if control is required, or null if optional and emit event \r\n * If formModel has no value\r\n * * Set value to first option if control is required and emit event\r\n */\r\n private onOptionsChange(firstChange: boolean): void {\r\n if (this.formModel.value !== null && this.formModel.value !== undefined && this.formModel.value !== '') {\r\n if (this.options.every(opt => opt.value !== this.formModel.value)) {\r\n const value = this.required ? this.options[0]?.value : null;\r\n this.formModel.setValue(value, {emitEvent: !firstChange});\r\n }\r\n } else if(this.required) {\r\n this.formModel.setValue(this.options[0]?.value, {emitEvent: !firstChange});\r\n }\r\n }\r\n}\r\n","<div class=\"control\"\r\n [ngClass]=\"{'is-readonly': readonly, 'is-disabled': formModel.disabled}\">\r\n\r\n <label *ngIf=\"label\"\r\n for=\"{{id}}_select\">\r\n <span>{{label | translate}}</span>\r\n <ec-help-popover id=\"{{id}}_helpPopover\"\r\n *ngIf=\"helpPopover\"\r\n class=\"d-inline-block my-n3 mx-n1\"\r\n text=\"{{helpPopover | translate}}\"\r\n contentPosition=\"{{helpPopoverPosition}}\">\r\n </ec-help-popover>\r\n </label>\r\n\r\n <select [attr.id]=\"inputId\"\r\n tabindex=\"{{tabindex}}\"\r\n [formControl]=\"formModel\"\r\n [attr.required]=\"required\"\r\n [attr.cdkFocusInitial]=\"autofocus || null\">\r\n <option *ngIf=\"!required\"\r\n [ngValue]=\"null\">{{placeholder}}</option>\r\n <option *ngFor=\"let option of options\"\r\n [ngValue]=\"option.value\">{{option.label}}</option>\r\n </select>\r\n <i class=\"ec-icon icon-caret-down\"></i>\r\n</div>","import { Injectable } from '@angular/core';\r\nimport { AvatarUser } from './avatar.component';\r\n\r\nexport type AvatarLabels = {\r\n abbreviation: string;\r\n full: string | undefined;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AvatarService {\r\n\r\n /**\r\n * Return the full and abbreviated labels based on the users first name, email, or username. If the user has a first or last name use \r\n * either a combination of the first and last name, or the first two characters of the name that is defined. If the user does\r\n * not have a first or last name, trying using the first two characters of the email, or the first two characters of the \r\n * username as a last ditch effort.\r\n * @param user \r\n * @returns \r\n */\r\n public getAvatarLabels(user: AvatarUser): AvatarLabels {\r\n let full: string | undefined = undefined;\r\n let abbreviation: string = 'HI';\r\n\r\n let trimmedUser = this.trimUser(user);\r\n if (trimmedUser.firstName || trimmedUser.lastName) {\r\n if (trimmedUser.firstName) {\r\n abbreviation = trimmedUser.firstName.slice(0, 1);\r\n full = trimmedUser.firstName;\r\n\r\n if (trimmedUser.lastName) {\r\n full += ` ${trimmedUser.lastName}`;\r\n }\r\n }\r\n else {\r\n abbreviation = trimmedUser.lastName!.slice(0, 1);\r\n full = trimmedUser.lastName;\r\n }\r\n }\r\n else if (trimmedUser.email) {\r\n abbreviation = trimmedUser.email.slice(0, 1);\r\n full = trimmedUser.email;\r\n }\r\n else if (trimmedUser.username) {\r\n abbreviation = trimmedUser.username.slice(0, 1);\r\n full = trimmedUser.username;\r\n }\r\n\r\n return {\r\n abbreviation: abbreviation,\r\n full: full\r\n }\r\n }\r\n\r\n /** \r\n * Return a new user object that has all of the properties of the existing user\r\n * with any null, undefined, or whitespace values removed\r\n */\r\n private trimUser(user: AvatarUser): AvatarUser {\r\n let trimmedUser: AvatarUser = {\r\n email: (user.email || '').trim(),\r\n firstName: (user.firstName || '').trim(),\r\n lastName: (user.lastName || '').trim(),\r\n username: (user.username || '').trim()\r\n }\r\n return trimmedUser;\r\n }\r\n}\r\n","import { Component, ElementRef, Input, OnChanges, Renderer2, SimpleChanges } from '@angular/core';\r\nimport { AvatarService } from './avatar.service';\r\n\r\nexport interface AvatarUser {\r\n firstName?: string;\r\n lastName?: string;\r\n email?: string;\r\n username?: string;\r\n}\r\n\r\n@Component({\r\n selector: 'ec-avatar',\r\n template: '{{label}}',\r\n styleUrls: ['./avatar.component.scss']\r\n})\r\nexport class AvatarComponent implements OnChanges {\r\n\r\n /** Color map base on the first let of the label */\r\n private colors: { [k: string]: string } = {\r\n abcde01: 'red',\r\n fghij23: 'orange',\r\n klmn15: 'yellow',\r\n opqr67: 'green',\r\n stuv8: 'blue',\r\n wxyz9: 'purple'\r\n }\r\n\r\n @Input() user!: AvatarUser;\r\n\r\n /** Label is defaulted to HI in the rare case the user does not have a first name, last name, email or username */\r\n public label = 'HI';\r\n\r\n /** Track the current CSS class so we can remove it if the user changes before setting the next one */\r\n private currentCSSClass = '';\r\n\r\n constructor(private el: ElementRef, private renderer: Renderer2, private avatarService: AvatarService) {}\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (!changes.user.firstChange && !this.user) {\r\n console.error(`AvatarComponent expected a value for the [user] input but got ${this.user} instead.`);\r\n } \r\n \r\n this.updateLabel();\r\n this.updateColor(); \r\n }\r\n\r\n /** \r\n * Update the Avatar label \r\n * \r\n */\r\n private updateLabel() {\r\n if (this.user) {\r\n this.label = this.avatarService.getAvatarLabels(this.user).abbreviation;\r\n }\r\n }\r\n\r\n /** \r\n * Sets the color of the Avatar based on the first letter of the label. If the label is HI or is not\r\n * a letter, default to gray.\r\n */\r\n private updateColor() {\r\n if (this.currentCSSClass) {\r\n this.renderer.removeClass(this.el.nativeElement, this.currentCSSClass);\r\n }\r\n\r\n let color = 'gray';\r\n if (this.label !== 'HI' && this.label) {\r\n for (let key in this.colors) {\r\n if (key.includes(this.label[0].toLowerCase())) {\r\n color = this.colors[key];\r\n }\r\n }\r\n }\r\n this.currentCSSClass = `avatar-${color}`;\r\n this.renderer.addClass(this.el.nativeElement, this.currentCSSClass);\r\n }\r\n}","import { Component, Input, OnChanges } from '@angular/core';\r\nimport { MenuItem } from '../../controls/menu/menu.component';\r\nimport { AvatarUser } from '../avatar/avatar.component';\r\nimport { AvatarService } from '../avatar/avatar.service';\r\n\r\n@Component({\r\n selector: 'ec-app-bar',\r\n templateUrl: './app-bar.component.html',\r\n styleUrls: ['./app-bar.component.scss']\r\n})\r\nexport class AppBarComponent implements OnChanges {\r\n @Input() user?: AvatarUser;\r\n @Input() userMenuItems: MenuItem[] = [];\r\n @Input() userMenuWidth = 0;\r\n @Input() userMenuMinWidth = 160;\r\n @Input() userMenuTabindex = 0;\r\n @Input() iconPath = '/assets/images/icon.svg';\r\n \r\n menuItems: MenuItem[] = []\r\n\r\n private userItem: MenuItem[] = [];\r\n\r\n constructor(private avatarService: AvatarService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.user) {\r\n this.userItem[0] = {label: this.avatarService.getAvatarLabels(this.user).full || '', display: 'heading'};\r\n } else {\r\n this.userItem = [];\r\n }\r\n\r\n this.menuItems = [...this.userItem, ...this.userMenuItems];\r\n }\r\n}\r\n","<section class=\"logo-container\">\r\n <img src=\"{{iconPath}}\"\r\n alt=\"EnergyCAP Platform\">\r\n</section>\r\n\r\n<section class=\"title-container\">\r\n <ng-content select=\".app-bar-title\"></ng-content>\r\n</section>\r\n\r\n<section class=\"actions-container\">\r\n <ng-content select=\".app-bar-actions\"></ng-content>\r\n <ec-dropdown id=\"AppBarUserMenu\"\r\n *ngIf=\"userMenuItems.length; else avatar\"\r\n [items]=\"menuItems\"\r\n [buttonCustomTemplate]=\"avatar\"\r\n [showArrow]=\"false\"\r\n [menuWidth]=\"userMenuWidth\"\r\n [menuMinWidth]=\"userMenuMinWidth\"\r\n [tabindex]=\"userMenuTabindex\"></ec-dropdown>\r\n</section>\r\n\r\n<ng-template #avatar>\r\n <ec-avatar [user]=\"user\"></ec-avatar>\r\n</ng-template>","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { UntypedFormControl, UntypedFormGroup, ValidatorFn, Validators } from '@angular/forms';\r\n\r\nimport { ButtonType } from '../../controls/button/button.component';\r\nimport { TextboxType } from '../../controls/textbox/textbox.component';\r\nimport { DialogContent } from '../dialog/dialog-content';\r\nimport { Overlay } from '../view-overlay/view-overlay.component';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\n\r\ntype SaveSource = 'primary'|'alternate';\r\n\r\nexport type CustomActionResult = {\r\n message: string;\r\n isSuccess: boolean;\r\n};\r\n\r\nexport class ConfirmDialogContext {\r\n /** Id to distinguish between confirm component contexts emitted by the dialog service */\r\n public id: string = '';\r\n\r\n /** Optional title of the confirm */\r\n public title?: string;\r\n\r\n /** Optional message */\r\n public message?: string;\r\n\r\n /** Optional checkConfirm\r\n * this will determine if ec-checkbox is available or no\r\n * in order to delete or move to no parent the entity\r\n */\r\n public checkConfirm?:boolean;\r\n\r\n /**\r\n * checkboxContent\r\n * Determine the label next to the checkbox\r\n * if checkConfirm is true otherwise is not visible\r\n */\r\n\r\n public checkboxText?:string;\r\n\r\n /**\r\n * Optional textbox type, this will determine whether\r\n * an input is visible or not\r\n */\r\n public textboxType?: TextboxType;\r\n\r\n /** Optional textbox label */\r\n public textboxLabel?: string;\r\n\r\n /**\r\n * Optional required flag for the textbox, will set\r\n * a validator on the input if true\r\n */\r\n public textboxRequired?: boolean = false;\r\n\r\n /** Optional array of validators to add to the textbox form control. */\r\n public textboxValidators?: ValidatorFn[];\r\n\r\n /** Sets the textbox's uppercase parameter */\r\n public textboxUppercase?: boolean = false;\r\n\r\n /**\r\n * Optional textbox height (in rows).\r\n * Only applies to multi-line type.\r\n * Default 3.\r\n */\r\n public textareaRows?: number = 3;\r\n\r\n /** Optional textbox placeholder text */\r\n public textboxPlaceholder?: string;\r\n\r\n /** Optional error message to display when textbox */\r\n public validationErrorMessage?: string;\r\n\r\n /** Value returned from the input if enabled */\r\n public textboxValue?: string;\r\n public checkboxValue?:boolean;\r\n public confirmLabel?:string;\r\n\r\n /** Optional save button label */\r\n public saveLabel?: string = 'Save'; // LOCO\r\n\r\n /** Optional save button type */\r\n public saveButtonType?: ButtonType = 'primary';\r\n\r\n /** Optional cancel button label */\r\n public cancelLabel?: string = 'Cancel'; // LOCO\r\n\r\n /** Optional flag for hiding the cancel (secondary) button */\r\n public hideCancel?: boolean = false;\r\n\r\n /** When true, adds the submit tag to the save button so hitting enter triggers the save */\r\n public saveOnEnter?: boolean = false;\r\n\r\n /** Optional alternate save button label */\r\n public alternateSaveLabel?: string = undefined;\r\n\r\n /** Optional alternate save button type */\r\n public alternateSaveButtonType?: ButtonType = undefined;\r\n\r\n /**\r\n * Used to know which save button was selected in case the calling component\r\n * is utilizing the alternate save button\r\n */\r\n public saveSource?: SaveSource = 'primary';\r\n\r\n /**\r\n * When provided, the confirm will show a pending state and call this, then upon\r\n * completion display the result message and a close button. If the promise is resolved\r\n * successfully, the close button will emit onDialogSave. If the promise is rejected,\r\n * the close button will emit onDialogCancel.\r\n */\r\n public inlineConfirmAction?: () => Promise<CustomActionResult>;\r\n\r\n /** The message to be displayed while inlineConfirmAction is pending. */\r\n public inlineConfirmPendingMessage?: string = '';\r\n}\r\n\r\n@Component({\r\n selector: 'ec-confirm',\r\n templateUrl: './confirm.component.html',\r\n styleUrls: ['./confirm.component.scss']\r\n})\r\nexport class ConfirmComponent implements OnInit, DialogContent<ConfirmDialogContext>, OnDestroy{\r\n\r\n public dialogId: string = 'Confirm';\r\n\r\n /** Form Group to hold any form controls needed */\r\n public formGroup: UntypedFormGroup = new UntypedFormGroup({});\r\n\r\n public status = new Overlay('hasData');\r\n\r\n public showTextBox:boolean = false;\r\n\r\n private destroyed = new Subject<void>();\r\n\r\n /**\r\n * Provided by the calling component to tell the confirm what to show\r\n * and is used on save to send back any entered values from the user\r\n */\r\n @Input() public context!: ConfirmDialogContext;\r\n\r\n @Output() public onDialogSave: EventEmitter<ConfirmDialogContext> = new EventEmitter<ConfirmDialogContext>();\r\n @Output() public onDialogCancel: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public onOpen(openContext?: ConfirmDialogContext): void {\r\n this.context = openContext!;\r\n this.dialogId = openContext!.id;\r\n if (this.context.alternateSaveLabel) {\r\n this.context.saveOnEnter = false;\r\n }\r\n }\r\n\r\n /** Error to be displayed in the error banner */\r\n public error?: string;\r\n\r\n constructor() { }\r\n\r\n public ngOnInit(): void {\r\n this.addFormControls();\r\n this.setValidations();\r\n this.listenCheckBox();\r\n }\r\n\r\n public onSave(source: SaveSource): void {\r\n this.formGroup.markAllAsTouched();\r\n\r\n if (this.formGroup.valid) {\r\n let formValues = this.formGroup.getRawValue();\r\n if (formValues.textbox) {\r\n this.context.textboxValue = formValues.textbox;\r\n }\r\n if(this.context.checkConfirm) {\r\n this.context.checkboxValue = formValues.checkbox ? formValues.checkbox : false;\r\n }\r\n\r\n this.context.saveSource = source;\r\n\r\n if (this.context.inlineConfirmAction) {\r\n this.doInlineConfirmAction();\r\n } else {\r\n this.onDialogSave.emit(this.context);\r\n }\r\n \r\n } else if (this.context.validationErrorMessage) {\r\n this.error = this.context.validationErrorMessage;\r\n }\r\n }\r\n\r\n public onCancel(): void {\r\n this.onDialogCancel.emit();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.complete();\r\n }\r\n\r\n public listenCheckBox():void {\r\n this.formGroup.get('checkbox')?.valueChanges.pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(value => {\r\n this.showTextBox = value;\r\n this.setValidations();\r\n });\r\n }\r\n\r\n private setValidations(): void {\r\n const showCheckBox = this.formGroup.get('checkbox');\r\n const textBoxControl = this.formGroup.controls['textbox'];\r\n\r\n if (showCheckBox) {\r\n this.showTextBox ? textBoxControl?.enable() : textBoxControl?.disable();\r\n } else {\r\n textBoxControl?.enable();\r\n }\r\n }\r\n\r\n /**\r\n * Adds the textbox form control to our form group if its configured to be visible\r\n * Will also add the required validator if requested\r\n */\r\n private addFormControls(): void {\r\n if (this.context.textboxType) {\r\n let validators: ValidatorFn[] = [];\r\n if (this.context.textboxRequired) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.context.textboxValidators) {\r\n validators.push(...this.context.textboxValidators);\r\n }\r\n this.formGroup.addControl('textbox', new UntypedFormControl('', validators));\r\n }\r\n\r\n if(this.context.checkConfirm){\r\n this.showTextBox = false;\r\n const checkboxControl = new UntypedFormControl('');\r\n this.formGroup.addControl('checkbox', checkboxControl); \r\n }\r\n }\r\n\r\n private async doInlineConfirmAction() {\r\n this.status.setStatus('pending', this.context.inlineConfirmPendingMessage);\r\n\r\n let result = await this.context.inlineConfirmAction!();\r\n\r\n this.status.setStatus('noData', result.message, {\r\n id: 'inlineConfirmClose',\r\n label: 'Close',\r\n icon: result.isSuccess ? 'icon-check-circle' : 'icon-error',\r\n classlist: result.isSuccess ? 'font-color-success' : 'font-color-error',\r\n onClick: () => { result.isSuccess ? this.onDialogSave.emit(this.context) : this.onDialogCancel.emit() }\r\n });\r\n }\r\n}\r\n","<section ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [action]=\"status?.action\"\r\n [noDataTemplate]=\"inlineConfirmResult\"\r\n overlayClassList=\"p-0\"\r\n class=\"bg-body flex-grow d-flex\">\r\n <form [formGroup]=\"formGroup\" class=\"flex-grow flex-column confirm-content text-body-1\">\r\n <section class=\"flex-grow\">\r\n <h2 class=\"font-weight-bold mb-3\" *ngIf=\"context?.title\">{{context?.title}}</h2>\r\n <ec-banner *ngIf=\"error\" [text]=\"error | translate\" bannerStyle=\"normal\" class=\"mb-3\"></ec-banner>\r\n <div *ngIf=\"context?.message\" [innerHtml]=\"context?.message | translate\" class=\"mb-3\"></div>\r\n \r\n <ec-checkbox *ngIf=\"context?.checkConfirm\"\r\n [formModel]=\"formGroup.get('checkbox')\"\r\n name=\"confirmCheckbox\"\r\n [label]=\"context?.checkboxText\"\r\n [autofocus]=\"true\"\r\n ></ec-checkbox>\r\n <div *ngIf=\"showTextBox\" [innerHtml]=\"context.confirmLabel\" class=\"mb-3\"></div>\r\n <ec-textbox id=\"confirmTextbox\"\r\n *ngIf=\"(context?.textboxType && !context?.checkConfirm) || showTextBox\"\r\n [autofocus]=\"true\"\r\n [formModel]=\"formGroup.get('textbox')\"\r\n [required]=\"context?.textboxRequired\"\r\n [label]=\"context?.textboxLabel\"\r\n [type]=\"context?.textboxType\"\r\n [rows]=\"context?.textareaRows\"\r\n [placeholder]=\"context?.textboxPlaceholder\"\r\n [upperCase]=\"context?.textboxUppercase\">\r\n </ec-textbox>\r\n </section>\r\n <footer class=\"mt-auto flex-shrink d-flex py-2 flex-row-reverse\">\r\n <ec-button id=\"saveConfirmButton\"\r\n class=\"ml-2\"\r\n [type]=\"context?.saveButtonType ? context?.saveButtonType : 'primary'\"\r\n [label]=\"context?.saveLabel ? context?.saveLabel : 'Save'\"\r\n [autofocus]=\"!context?.textboxType\"\r\n [isSubmit]=\"context?.saveOnEnter\"\r\n (clicked)=\"onSave('primary')\">\r\n </ec-button>\r\n <ec-button id=\"alternateSaveConfirmButton\"\r\n *ngIf=\"context?.alternateSaveLabel\"\r\n class=\"ml-2\"\r\n [type]=\"context?.alternateSaveButtonType ? context?.alternateSaveButtonType : 'primary'\"\r\n [label]=\"context?.alternateSaveLabel\"\r\n (clicked)=\"onSave('alternate')\">\r\n </ec-button>\r\n <ec-button *ngIf=\"!context?.hideCancel\"\r\n id=\"cancelConfirmButton\"\r\n class=\"ml-auto\"\r\n type=\"secondary\"\r\n [label]=\"context?.cancelLabel ? context?.cancelLabel : 'Cancel'\"\r\n (clicked)=\"onCancel()\">\r\n </ec-button>\r\n </footer>\r\n </form>\r\n</section>\r\n\r\n<ng-template #inlineConfirmResult>\r\n <section class=\"flex-grow align-self-stretch confirm-content text-body-1\">\r\n <div class=\"d-flex\">\r\n <i class=\"ec-icon {{status?.action?.icon}} {{status?.action?.classlist}} inline-confirm-result-icon\"></i>\r\n <div [innerHTML]=\"status?.message | translate\"></div>\r\n </div>\r\n <div class=\"d-flex pt-2 mt-auto\">\r\n <ec-button id=\"inlineConfirmClose\"\r\n label=\"Close\"\r\n type=\"secondary\"\r\n class=\"ml-auto\"\r\n (clicked)=\"status?.action?.onClick!()\"\r\n [autofocus]=\"true\">\r\n </ec-button>\r\n </div>\r\n </section>\r\n</ng-template>","import { TemplateRef, Type } from '@angular/core';\r\nimport { uniqueId } from 'lodash';\r\nimport { DialogContent } from './dialog-content';\r\n\r\n/**A base class from which all dialog events extend. This class models the dialog actions very much\r\n * like the Angular RouterEvents.\r\n */\r\n export class DialogEvent {\r\n constructor(\r\n /**A unique value representing this particular instance of the event, used to match open and close events together */\r\n public eventId?: string, \r\n\r\n /**The ID of the dialog itself, typically matching the DialogContent. Something like \"DeleteConfirmation\" or \"EditReading\" etc. \r\n * Useful for telemetry logging to track users opening and closing dialogs\r\n */\r\n public dialogId: string = '',\r\n\r\n /** The action the dialog event represents. Can also be determined by using the class of the event with the\r\n * instanceof operator.\r\n */\r\n public dialogAction: 'openStart' |'open' | 'close' | 'closeLatest' = 'openStart',\r\n ) {}\r\n}\r\n\r\n/**Emitted when the dialog open has been triggered, but the dialog itself hasn't initialized yet.\r\n * This event creates its own unique identifier so that that particular instance of the dialog can be found\r\n * when closed later on. The context is used to fill the dialog itself, and may include state or callbacks.\r\n * Various options are available to change the dialog appearance. These events are generally created\r\n * by the @see DialogService.open() call\r\n */\r\nexport class DialogOpenStartEvent<T> extends DialogEvent {\r\n constructor(public content: Type<DialogContent<T>> | TemplateRef<any>, public context?: T, public options?: DialogOptions) {\r\n super(uniqueId());\r\n }\r\n}\r\n\r\n/**Emitted when the dialog has finished opening and been properly initialized. It includes\r\n * the eventId, which uniquely identifies the particular instance of the dialog open event so that we can \r\n * close that specific dialog later on. The dialogId can be used for telemetry, and may be set to something \r\n * like \"Confirm Delete\" or \"Edit Reading\" etc.\r\n */\r\nexport class DialogOpenEndEvent extends DialogEvent {\r\n constructor(eventId?: string, dialogId?: string) {\r\n super(eventId, dialogId, 'open');\r\n }\r\n}\r\n\r\n/**Emitted when the dialog close has completed and a result is available. Check result.save to know if the dialog change\r\n * was committed (true) or cancelled (false). Cancel can be set if the dialog was automatically closed by clicking in the \r\n * background or resizing the window when using the panel view or closeOnResize.\r\n */\r\nexport class DialogCloseEvent<T> extends DialogEvent {\r\n /**The result of the dialog event, including weather it was saved or cancelled and the context's final state*/\r\n public dialogResult: DialogResult<any>;\r\n constructor(eventId?: string, dialogId?: string, save=false, context?: T) {\r\n super(eventId, dialogId, 'close');\r\n this.dialogResult = new DialogResult(save, context);\r\n }\r\n}\r\n\r\n/**Used to tell the dialog group to close whatever dialog was opened most recently with the given result\r\n * This allows a TemplateRef based panel (that's not coming from DialogComponent) to close itself or \r\n * an external process to close a dialog that is open\r\n */\r\nexport class DialogCloseLatestEvent<T> extends DialogEvent {\r\n /**The result of the dialog event, including weather it was saved or cancelled and the context's final state*/\r\n public dialogResult: DialogResult<any>;\r\n\r\n constructor(result: DialogResult<T>) {\r\n super('latest', 'latest', 'closeLatest');\r\n this.dialogResult = result;\r\n }\r\n}\r\n\r\n/**\r\n * This interface specifies extra options to configure behavior of the Dialog Component\r\n */\r\n export interface DialogOptions {\r\n /**\r\n * Function to execute before dialog opens. Leave `undefined` or return true to allow\r\n * dialog to open.\r\n *\r\n * Can be used to check for unsaved changes on the underlying page before opening.\r\n *\r\n * @example\r\n constructor( private unsavedChangesGuard: CanDeactivateUnsavedChangesGuard ){};\r\n //...\r\n const options: DialogOptions = { canOpenDialog: this.unsavedChangesGuard.canDeactivate };\r\n */\r\n canOpenDialog?: () => Promise<boolean>;\r\n\r\n /** Configures when the dialog emits its result in relation to a closing animation event */\r\n emitResultOn?: DialogAnimationEvent;\r\n\r\n /** Display the dialog as a side panel that slides in */\r\n displayAsPanel?: boolean;\r\n\r\n /** Set the dialog mask color to transparent. Defaults to true when dialog is displayed as a panel */\r\n transparentMask?: boolean;\r\n\r\n /**\r\n * Set the dialog mask to not display at all. Allows the user to click on elements behind the dialog.\r\n * Only applicable when displayAsPanel is true.\r\n * Defaults to false.\r\n */\r\n noMask?: boolean;\r\n\r\n /** Align the dialog window to the top instead of centered. */\r\n alignToTop?: boolean;\r\n\r\n /** Set the top margin of the dialog window. Only takes effect if alignToTop is true.\r\n * Must include units, i.e. \"32rem\" or \"10vh\"\r\n */\r\n alignToTopMargin?: string;\r\n\r\n /**\r\n * Set to true if the dialog should automatically close when the window is resized.\r\n * This is useful if you are conditionally showing/hiding the dialog content as a static part of the page\r\n * when the screen gets wide enough\r\n */\r\n closeOnResize?: boolean;\r\n\r\n size?: DialogSize;\r\n\r\n /**\r\n * Used to specify a custom min-width of the dialog. Only takes effect if size is set to dynamic.\r\n * Must include units, i.e. \"32rem\" or \"640px\"\r\n */\r\n minWidth?: string;\r\n}\r\n\r\n/**\r\n * Returned when a dialog is closed.\r\n * Specifies if the dialog was saved and contains an optional context.\r\n */\r\nexport class DialogResult<T> {\r\n constructor(public save: boolean, public context?: T) { }\r\n};\r\n\r\n\r\n/** Options for size of dialog */\r\nexport type DialogSize = number | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full' | 'dynamic';\r\n\r\n/**\r\n * Dialog Animation Events:\r\n * - BeginClose: When the close animation starts.\r\n * - EndClose: When the close animation finishes\r\n */\r\nexport type DialogAnimationEvent = 'BeginClose' | 'EndClose'\r\n","import { Injectable, TemplateRef, Type } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { map, skipWhile, take } from 'rxjs/operators';\r\nimport { ConfirmComponent, ConfirmDialogContext } from '../confirm/confirm.component';\r\nimport { DialogContent } from './dialog-content';\r\nimport { DialogCloseEvent, DialogCloseLatestEvent, DialogEvent, DialogOpenStartEvent, DialogOptions, DialogResult, DialogSize } from './dialog-types';\r\n\r\n/**\r\n * Service used to communcate with ng5 dialogs from an ng1 view. Any dialogs that\r\n * have been added to ng1 views must be added to the DialogCatalog in order\r\n * to know which component to load inside the dialog. You can also optionally subscribe\r\n * to an onClose event to do some work after the dialog closes\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DialogService {\r\n /**\r\n * Emits DialogEvents when the dialog opens or closes.\r\n */\r\n public events: Observable<DialogEvent> = new Subject();\r\n\r\n /**\r\n * Open the root dialog.\r\n * @param content - The component class to load into the dialog\r\n * @param size - The size of the dialog\r\n * @param context - optional context to pass to the dialog content during initialization.\r\n * @param options - extra options to configure the dialog\r\n * @returns Observable of a typed DialogResult which specifies if the dialog was saved and an optional context.\r\n * @example\r\n // From typescript\r\n try {\r\n const result = await lastValueFrom(this.dialogService.openDialog(MyComponent, 'small', myContext, options));\r\n // do something with result\r\n } catch(error) {\r\n // do something with error\r\n }\r\n */\r\n public openDialog<T>(content: Type<DialogContent<T>> | TemplateRef<any>, size: DialogSize, context?: T, options?: DialogOptions): Observable<DialogResult<T>> {\r\n options = options || {};\r\n options.size = size;\r\n\r\n const event = new DialogOpenStartEvent<T>(content, context, options);\r\n \r\n const complete = this.events.pipe(\r\n skipWhile(e => !(e instanceof DialogCloseEvent) || e.eventId !== event.eventId),\r\n map(e => (e as DialogCloseEvent<T>).dialogResult!),\r\n take(1) //mark the observable as complete as soon as any closeEvent happens for this particular dialogOpen event, allowing lastValueFrom to work\r\n )\r\n \r\n this.triggerEvent(event);\r\n return complete;\r\n }\r\n\r\n /**Close whatever dialog was most recently opened, with the provided result.\r\n * The result must be in a form the caller can expect (must match the dialog) so use this carefully\r\n * if you are returning any result other than cancel. It is most useful if you are opening\r\n * a dialog with a template reference instead of a true dialog child component\r\n */\r\n public closeLatestDialog<T>(result: DialogResult<T>){\r\n this.triggerEvent(new DialogCloseLatestEvent(result));\r\n }\r\n\r\n /**\r\n * Open a Confirmation Dialog with the given context\r\n */\r\n public confirm(context: ConfirmDialogContext): Observable<DialogResult<ConfirmDialogContext>> {\r\n return this.openDialog(ConfirmComponent, 'small', context);\r\n }\r\n\r\n public triggerEvent(event: DialogEvent) {\r\n (this.events as Subject<DialogEvent>).next(event);\r\n }\r\n}\r\n","import { DOCUMENT } from '@angular/common';\r\nimport { Component, ComponentFactoryResolver, ComponentRef, EventEmitter, HostBinding, HostListener, Input, Output, Type, ViewChild, ViewContainerRef, TemplateRef, Inject } from '@angular/core';\r\nimport { timer, lastValueFrom } from 'rxjs';\r\nimport { take, takeUntil, tap } from 'rxjs/operators';\r\nimport { WindowService } from '../../core/window.service';\r\nimport { DialogContent } from './dialog-content';\r\nimport { DialogOpenEndEvent, DialogCloseEvent, DialogSize, DialogOptions, DialogResult } from './dialog-types';\r\nimport { DialogService } from './dialog.service';\r\n\r\n/** These values need to be kept in sync with dialog-base.scss */\r\nexport const DialogOpenDuration: number = 125;\r\nexport const DialogCloseDuration: number = 100;\r\nexport const PanelOpenDuration: number = 250;\r\nexport const PanelCloseDuration: number = 225;\r\n\r\n@Component({\r\n selector: 'ec-dialog',\r\n template: '<article [style.min-width]=\"minWidth\" cdkTrapFocus cdkTrapFocusAutoCapture><ng-template #content></ng-template></article>',\r\n styleUrls: ['./dialog.component.scss'],\r\n host: {\r\n '[class]': 'dialogSizeClass',\r\n '[style.--ec-dialog-width.px]': 'width'\r\n }\r\n})\r\nexport class DialogComponent {\r\n /**\r\n * Add/remove the is-open css class to the host element when the dialog is opened/closed.\r\n * Styles use the is-open class to show/hide the dialog.\r\n */\r\n @HostBinding('class.is-open') public isOpen = false;\r\n\r\n /**\r\n * Add the fade-in css class to the host element when the dialog is opening. Remove when transition is complete.\r\n * Styles use the fade-in class to apply a fade-in transition while the dialog is opening.\r\n */\r\n @HostBinding('class.fade-in') public fadeIn = false;\r\n\r\n /**\r\n * Add the fade-out css class to the host element when the dialog is closing. Remove when transition is complete.\r\n * Styles use the fade-out class to apply a fade-out transition while the dialog is closing.\r\n */\r\n @HostBinding('class.fade-out') public fadeOut = false;\r\n\r\n @HostBinding('class.is-panel') public displayAsPanel = false;\r\n\r\n @HostBinding('class.is-top-aligned') public alignToTop = false;\r\n\r\n @HostBinding('style.--ec-dialog-margin-align-to-top') public alignToTopMargin?: string;\r\n\r\n @HostBinding('class.is-transparent') public transparentMask = false;\r\n\r\n @HostBinding('class.no-mask') public noMask = false;\r\n\r\n @HostListener('click', ['$event']) public onOverlayClick(event: MouseEvent) {\r\n if ((<HTMLElement>event.target).tagName === 'EC-DIALOG' && this.displayAsPanel) {\r\n this.close(new DialogResult(false));\r\n }\r\n }\r\n\r\n /**\r\n * Defines the width of the dialog (height is auto). Can be a number that will be converted to pixels, or xsmall(320px), small(480px), medium(640px), or large(1024px)\r\n */\r\n @Input() public set size(value: DialogSize) {\r\n this._size = value;\r\n // If the size is a string, set the dialog class. Otherwise, clear it.\r\n if (typeof value == 'string') {\r\n this.dialogSizeClass = `dialog-${value}`;\r\n } else {\r\n this.dialogSizeClass = undefined;\r\n }\r\n };\r\n public get size(): DialogSize {\r\n return this._size;\r\n }\r\n /**\r\n * Defines the width of the dialog (height is auto). Can be a number that will be converted to pixels, or xsmall(320px), small(480px), medium(640px), or large(1024px)\r\n */\r\n private _size: DialogSize = 'small';\r\n\r\n /**\r\n * Bound to the host. The classes set the --ec-dialog-width variable to our default 'small', 'medium', etc. sizes.\r\n * Undefined when the size is a number, which is used for custom sizes.\r\n */\r\n dialogSizeClass?: string = `dialog-${this._size}`;\r\n\r\n @Input() content?: Type<DialogContent<any>> | TemplateRef<any>;\r\n @Input() context?: any;\r\n @Input() options?: DialogOptions;\r\n\r\n /**Only set if this particular instance of a dialog should be identified separately from others.\r\n * If provided, this is emitted to the dialog service with OpenEnd and Close events. Direct usage\r\n * of the DialogComponent from outside a DialogGroup does not usually require using this parameter as\r\n * the dialog reference itself functions as the identifier\r\n */\r\n @Input() dialogOpenStartEventId?: string;\r\n\r\n /**\r\n * Emits an event when the dialog is opened\r\n */\r\n @Output() public opened: EventEmitter<string> = new EventEmitter();\r\n\r\n /**\r\n * Emits an event when the dialog is closed\r\n */\r\n @Output() public closed: EventEmitter<DialogResult<any>> = new EventEmitter();\r\n\r\n /**\r\n * The container where the component will be loaded\r\n */\r\n @ViewChild('content', { read: ViewContainerRef, static: true }) public contentContainer!: ViewContainerRef;\r\n\r\n /**\r\n * Custom width of the dialog in pixels. Set by defining the size property\r\n * as a number value.\r\n */\r\n public width?: number;\r\n\r\n /**\r\n * Custom min-width of the dialog. Only takes effect if size is set to dynamic.\r\n * Must include units, i.e. \"32rem\" or \"640px\"\r\n */\r\n public minWidth?: string;\r\n\r\n /**\r\n * A reference of the component once it has been loaded\r\n */\r\n public componentRef?: ComponentRef<any>;\r\n\r\n private previouslyFocusedElement: HTMLElement | null = null;\r\n\r\n constructor(\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private windowService: WindowService,\r\n private dialogService: DialogService,\r\n @Inject(DOCUMENT) private documentRef: Document\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (this.content) {\r\n this.open(this.content, this.context, this.options);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n // Restore focus to the previously focused element when the dialog is destroyed.\r\n // Need to do this here and not in close() because cdkTrapFocusAutoCapture's re-focus happens in ngOnDestroy.\r\n // This doesn't work for dialog implementations outside of the dialog service because ngOnDestroy isn't called when\r\n // the dialog is closed in those cases.\r\n if (this.previouslyFocusedElement) {\r\n this.previouslyFocusedElement.focus();\r\n }\r\n }\r\n\r\n /**\r\n * Clear and previously loaded content\r\n * Load the component\r\n * Save a reference of the loaded component\r\n * Show the dialog and fade in\r\n */\r\n public async open<T>(component: Type<DialogContent<T>> | TemplateRef<any>, context?: T, options?: DialogOptions): Promise<void> {\r\n if (!this.isOpen) {\r\n \r\n // Capture the currently focused element, also looking in the shadow dom. Focus is restored to this element once the dialog is\r\n // destroyed. See ngOnDestroy(). We need to do this here in addition to the cdkTrapFocusAutoCapture because sometimes the dialog's\r\n // content is drawn and grabs focus before the cdkTrapFocusAutoCapture is able to read the previously focused element.\r\n const activeElement = <HTMLElement | null>this.documentRef?.activeElement;\r\n this.previouslyFocusedElement = <HTMLElement>activeElement?.shadowRoot?.activeElement || activeElement;\r\n\r\n if (options) {\r\n if (options.alignToTop) {\r\n this.alignToTop = true;\r\n }\r\n\r\n if (options.alignToTopMargin) {\r\n this.alignToTopMargin = options.alignToTopMargin;\r\n };\r\n\r\n if (options.displayAsPanel) {\r\n this.displayAsPanel = true;\r\n this.transparentMask = true;\r\n }\r\n\r\n if (options.transparentMask !== undefined) {\r\n this.transparentMask = options.transparentMask;\r\n }\r\n\r\n if (options.noMask !== undefined) {\r\n this.noMask = options.noMask;\r\n }\r\n\r\n if (options.canOpenDialog !== undefined) {\r\n const canOpen = await options.canOpenDialog();\r\n if (!canOpen) {\r\n this.close(new DialogResult(false));\r\n return;\r\n }\r\n }\r\n }\r\n\r\n // set the size before opening\r\n if (typeof this.size === 'number') {\r\n this.width = this.size;\r\n } else {\r\n // Reset the width if the size is not a number. This is to prevent the width property conflicting with the size.\r\n this.width = undefined;\r\n }\r\n\r\n this.minWidth = options?.minWidth;\r\n\r\n this.fadeIn = true;\r\n if (component instanceof TemplateRef) {\r\n this.contentContainer.createEmbeddedView(component);\r\n } else {\r\n let componentFactory = this.componentFactoryResolver.resolveComponentFactory(component);\r\n this.componentRef = this.contentContainer.createComponent(componentFactory);\r\n }\r\n\r\n this.isOpen = true;\r\n\r\n this.openDialogComponent<T>(context);\r\n\r\n // Once the animation is complete we can remove the animation class and\r\n // emit the opened event, both to the hosting component and via DialogService\r\n await lastValueFrom(timer(this.displayAsPanel ? PanelOpenDuration : DialogOpenDuration).pipe(take(1), tap(() => {\r\n const dialogId = this.getDialogId();\r\n this.fadeIn = false;\r\n this.opened.emit(dialogId);\r\n this.dialogService.triggerEvent(new DialogOpenEndEvent(this.dialogOpenStartEventId, dialogId));\r\n})));\r\n\r\n this.handleCloseOnResize();\r\n }\r\n }\r\n\r\n /**\r\n * Fade the dialog out and hide\r\n */\r\n public close<T>(result?: DialogResult<T>): void {\r\n this.fadeOut = true;\r\n const dialogId = this.getDialogId(); //call before wiping out the content\r\n\r\n // When the fade out animation is complete we will hide the dialog\r\n // and remove the animation class as well as let the world know that\r\n // we're closed so they can complete any other cleanup\r\n setTimeout(() => {\r\n this.isOpen = false;\r\n this.fadeOut = false;\r\n this.contentContainer?.clear();\r\n this.componentRef = undefined;\r\n this.closed.emit(result);\r\n this.dialogService.triggerEvent(new DialogCloseEvent(this.dialogOpenStartEventId, dialogId, result?.save, result?.context));\r\n this.resetOptions();\r\n }, this.displayAsPanel ? PanelCloseDuration : DialogCloseDuration)\r\n }\r\n\r\n /**Open the dialog and attach handlers to the cancel and save events to close it and notify the hosting page */\r\n private openDialogComponent<T>(context?: T) {\r\n if (this.componentRef && this.componentRef.instance) {\r\n const dialogContent = this.componentRef.instance as DialogContent<T>;\r\n\r\n // OnOpen is optional - create dialogs don't necessarily define it\r\n if (dialogContent.onOpen) {\r\n dialogContent.onOpen(context);\r\n }\r\n\r\n dialogContent.onDialogCancel.pipe(takeUntil(this.closed)).subscribe(() => {\r\n this.close<T>(new DialogResult<T>(false));\r\n });\r\n\r\n dialogContent.onDialogSave.pipe(takeUntil(this.closed)).subscribe(val => {\r\n this.close<T>(new DialogResult<T>(true, val));\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Reset options so they don't persist next time the\r\n * root dialog is opened\r\n * @deprecated\r\n */\r\n private resetOptions() {\r\n this.alignToTop = false;\r\n this.displayAsPanel = false;\r\n }\r\n\r\n /** If they turned on closeOnResize, automatically close the dialog any time somebody resizes the window.\r\n * This is useful for responsive layouts to prevent having the dialogContent on the screen twice */\r\n private handleCloseOnResize() {\r\n if(this.options && this.options.closeOnResize){\r\n this.windowService.resized!.pipe(takeUntil(this.closed), take(1)).subscribe(() => {\r\n this.close(new DialogResult(false));\r\n });\r\n }\r\n }\r\n\r\n /**Extract the dialogId from the dialog content, if it has one. Template-based dialogs generally don't.\r\n * We fall back to empty string to allow anybody listening for dialogEvents to still record the open/close even if\r\n * the dialog itself does not say what the name is. \r\n */\r\n private getDialogId() {\r\n return this.componentRef?.instance.dialogId || '';\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { filter, takeUntil } from 'rxjs/operators';\r\nimport { DialogCloseEvent, DialogCloseLatestEvent, DialogOpenStartEvent } from '../dialog-types';\r\nimport { DialogService } from '../dialog.service';\r\n\r\n@Component({\r\n selector: 'ec-dialog-group',\r\n templateUrl: './dialog-group.component.html',\r\n styleUrls: ['./dialog-group.component.scss']\r\n})\r\nexport class DialogGroupComponent implements OnInit, OnDestroy {\r\n\r\n activeDialogEvents: DialogOpenStartEvent<any>[] = [];\r\n private destroyed = new Subject<void>();\r\n\r\n constructor(private dialogService: DialogService) { }\r\n\r\n /**When the group component is created, start watching for any DialogOpenStart events\r\n * so that the group can react and make the matching dialog. New dialogs get assigned unique\r\n * eventIds so that when they close we know exactly which one is done and we can take it\r\n * out of the list of active dialogs\r\n */\r\n ngOnInit(): void {\r\n this.dialogService.events.pipe(\r\n filter(event => event instanceof DialogOpenStartEvent || event instanceof DialogCloseLatestEvent),\r\n takeUntil(this.destroyed)\r\n ).subscribe(event => {\r\n if(event instanceof DialogOpenStartEvent){\r\n this.activeDialogEvents.push(event as DialogOpenStartEvent<any>);\r\n } else if(event instanceof DialogCloseLatestEvent && this.activeDialogEvents.length > 0) {\r\n let sourceEvent = this.activeDialogEvents[this.activeDialogEvents.length - 1];\r\n this.dialogService.triggerEvent(new DialogCloseEvent(sourceEvent.eventId, sourceEvent.dialogId, event.dialogResult?.save, event.dialogResult?.context));\r\n this.dialogClosed(sourceEvent);\r\n }\r\n });\r\n }\r\n\r\n /** When the dialog group is destroyed we no longer want to listen for any open events. */\r\n ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /**The dialog component completed opening (including animation delay) and\r\n * emits an event that tells us it is ready. The group can then pump out a dialog\r\n * openEnd event (kinda NavigationEnd in the router) to tell anybody who cares that\r\n * the dialog is now ready.\r\n */\r\n dialogOpened(dialogOpenEvent: DialogOpenStartEvent<any>, dialogId: string) {\r\n dialogOpenEvent.dialogId = dialogId;\r\n }\r\n\r\n /** The dialog has closed (after animation delay) and emitted an event to tell the hosting component.\r\n * We handle the event and pump a matching DialogCloseEvent so that anybody who cares can know that the\r\n * dialog instance referenced by dialogOpenEvent.eventId is gone now. We remove it from our list of\r\n * active dialogs which pulls it out of the DOM too\r\n */\r\n dialogClosed(dialogOpenEvent: DialogOpenStartEvent<any>) {\r\n const index = this.activeDialogEvents.findIndex(d => d === dialogOpenEvent);\r\n \r\n if(index >=0){\r\n this.activeDialogEvents.splice(index, 1);\r\n }\r\n }\r\n}\r\n","<ec-dialog *ngFor=\"let dialog of activeDialogEvents\"\r\n [dialogOpenStartEventId]=\"dialog.eventId\"\r\n [size]=\"dialog.options?.size\"\r\n [content]=\"dialog.content\"\r\n [context]=\"dialog.context\"\r\n [options]=\"dialog.options\"\r\n (opened)=\"dialogOpened(dialog, $event)\"\r\n (closed)=\"dialogClosed(dialog)\">\r\n</ec-dialog>","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\n/** Default No-op telemetry implementation */\r\nexport class TelemetryTrackerService {\r\n public trackPageView(pageName: string, url:string, properties?: { [key: string]: string | number }) { }\r\n public trackEvent(name: string, properties?: {[key: string]:string}, measurements?: {[val:string]:number}) { }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { TelemetryTrackerService } from './telemetry-tracker.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TelemetryService {\r\n\r\n constructor(private telemetryTrackerService: TelemetryTrackerService) {}\r\n\r\n /**\r\n * Tracks a Page View / State change \r\n * \r\n * @param {string} pageName \r\n * @param {string} url \r\n * @memberof TelemetryService\r\n */\r\n public trackPageView(pageName: string, url:string, properties?: { [key: string]: string | number }) {\r\n this.telemetryTrackerService.trackPageView(pageName, url, properties);\r\n }\r\n\r\n /**\r\n * Tracks a generic event\r\n * \r\n * @param {string} name \r\n * @param {{[key: string]:string}} [properties] \r\n * @param {{[val:string]:number}} [measurements] \r\n * @memberof TelemetryService\r\n */\r\n public trackEvent(name: string, properties?: {[key: string]:string}, measurements?: {[val:string]:number}) {\r\n this.telemetryTrackerService.trackEvent(name, properties, measurements);\r\n }\r\n}\r\n","import { Directive, EventEmitter, Injector, Input, OnChanges, OnDestroy, Output, SimpleChanges } from '@angular/core';\r\nimport { Params, QueryParamsHandling } from '@angular/router';\r\nimport { Subject } from 'rxjs';\r\nimport { LinkItem } from '../../controls/navigation/link-item';\r\nimport { TelemetryService } from '../../core/telemetry.service';\r\nimport { ViewStatus } from '../../shared/display';\r\n\r\nexport class HierarchyItem implements LinkItem {\r\n id: string = '';\r\n\r\n /** Label to display for the item */\r\n label: string = '';\r\n\r\n /** Text to be displayed in the item's tooltip. When not provided, the label will be displayed. */\r\n tooltip?: string;\r\n\r\n /** Text to be displayed in the item's icon tooltip. */\r\n iconTooltip?: string;\r\n\r\n /** Indicates how many levels deep the item is in the parent structure */\r\n level: number = 0;\r\n\r\n url?: string;\r\n\r\n queryParams?: Params | null;\r\n\r\n queryParamsHandling?: QueryParamsHandling;\r\n\r\n icon?: string;\r\n\r\n /** Display item as a link, a heading, or with a divider line below it */\r\n display?: 'default' | 'heading' | 'divider' = 'default';\r\n\r\n /** Set to hide toggle, even if item has children */\r\n hideToggle?: boolean = false;\r\n\r\n /** Flag to indicate whether the item has children or not, mostly drives\r\n * whether you get the expand/collapse button\r\n */\r\n hasChildren: boolean = false;\r\n\r\n /** Array of children if any for the item */\r\n children: Array<HierarchyItem> = [];\r\n\r\n /** Flag to indicate if the item has been expanded */\r\n expanded?: boolean = false;\r\n\r\n /** Flag to indicate if the item is selected */\r\n selected?: boolean = false;\r\n\r\n /** Flag to indicate if the item can be selected */\r\n selectable?: boolean = false;\r\n\r\n readonly?: boolean = false;\r\n\r\n /** Status of each item to indicate whether children lookup is pending or\r\n * if an error occurred retrieving data\r\n */\r\n status?: ViewStatus = \"hasData\";\r\n\r\n /** Indicates if the item is a top level entity, e.g. Organization or Cost Center */\r\n topLevel?: boolean = false;\r\n\r\n /**\r\n * When checking the url for activeness, the url must match exactly or partially\r\n * @see https://angular.io/guide/router#active-router-links\r\n */\r\n isActiveExactMatch?: boolean = true;\r\n\r\n /**\r\n * Reference to the parent item. Useful if you need to walk the tree in reverse. An example usage\r\n * would be to expand all parent items above a node that is the current selection.\r\n */\r\n parentItem?: HierarchyItem;\r\n\r\n /**\r\n * Set to have no level indentation for the item. Useful for top level items in a tree that is not hierarchical\r\n */\r\n noIndent?: boolean | undefined;\r\n}\r\n\r\n/**\r\n * Represents a HierarchyItem that has been clicked to toggle its expansion state.\r\n */\r\nexport type ToggledHierarchyItem = {\r\n item: HierarchyItem;\r\n expanded: boolean;\r\n};\r\n\r\n@Directive()\r\nexport abstract class HierarchyBase implements OnChanges, OnDestroy {\r\n\r\n /** First item to start the hierarchy structure */\r\n @Input() public rootNode!: HierarchyItem;\r\n\r\n /** Event emitter to request children for a given item */\r\n @Output() public getItemChildren: EventEmitter<HierarchyItem> = new EventEmitter<HierarchyItem>();\r\n\r\n /** Event emitted when an item is toggled. */\r\n @Output() public itemToggled: EventEmitter<ToggledHierarchyItem> = new EventEmitter<ToggledHierarchyItem>();\r\n\r\n /**\r\n * Used to unsubscribe from observables\r\n */\r\n private _destroyed: Subject<void> = new Subject<void>();\r\n public get destroyed(): Subject<void> {\r\n return this._destroyed;\r\n }\r\n\r\n protected telemetryService: TelemetryService;\r\n\r\n constructor(injector: Injector) {\r\n this.telemetryService = injector.get(TelemetryService);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes && changes.rootNode && changes.rootNode.currentValue) {\r\n /** If the rootNode has children and we don't know about them yet we must be loading\r\n * the view without the new hierarchy api\r\n */\r\n if (this.rootNode.hasChildren && this.rootNode.children.length === 0) {\r\n this.getItemChildren.emit(this.rootNode);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function called when the component is destroyed\r\n */\r\n public ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /** Handler for the toggle button */\r\n public toggleItemClicked(item: HierarchyItem, expanded: boolean) {\r\n item.expanded = expanded;\r\n this.telemetryService.trackEvent('toggle-tree-node', {\r\n newExpandState: item.expanded ? 'expanded' : 'collapsed',\r\n itemDepth: `${item.level}`,\r\n });\r\n\r\n this.itemToggled.emit({ item, expanded });\r\n\r\n if (item.expanded && item.hasChildren && item.children.length === 0) {\r\n item.status = \"pending\";\r\n this.getItemChildren.emit(item);\r\n }\r\n }\r\n\r\n /** Method exposed to the parent component to set the items children once they are available\r\n */\r\n public setItemChildren(parentItem: HierarchyItem, items: Array<HierarchyItem>): void {\r\n parentItem.children = items;\r\n parentItem.status = \"hasData\";\r\n }\r\n\r\n /** Method exposed to the parent component to indicate that something happened on the\r\n * item that caused an error, could be retrieving children\r\n */\r\n public setItemError(parentItem: HierarchyItem): void {\r\n parentItem.status = \"error\";\r\n }\r\n}\r\n","import { Component, Injector, Input, OnInit, Output, TemplateRef } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { ScrollService } from '../../../core/scroll.service';\r\nimport { HierarchyBase, HierarchyItem } from '../hierarchy-base';\r\n\r\n@Component({\r\n selector: 'ec-hierarchy-tree',\r\n templateUrl: './hierarchy-tree.component.html',\r\n styleUrls: ['./hierarchy-tree.component.scss']\r\n})\r\nexport class HierarchyTreeComponent extends HierarchyBase implements OnInit {\r\n\r\n /** The value of the id attribute of the tree's root HTMLUListElement, suffixed with '_root' */\r\n @Input() public id: string = 'HierarchyTree';\r\n\r\n /** Hide the root node */\r\n @Input() public hideRootNode?: boolean;\r\n\r\n /** Custom item template to use in place of the default one */\r\n @Input() public customItemTemplate?: TemplateRef<any>;\r\n\r\n /** Emits a HierarchyItem whenever one is selected by clicking */\r\n @Output() public itemSelected: Subject<HierarchyItem> = new Subject();\r\n\r\n /** The width of the spacing before a tree node, multipled by a HierarchyItem's level. Value is in pixels */\r\n public indent = 16;\r\n\r\n /** The value of the id attribute of the tree's scroll container element, used to scroll a selected item into view. */\r\n public scrollContainerId = '';\r\n\r\n constructor(\r\n private scrollService: ScrollService,\r\n injector: Injector,\r\n ) { super(injector); }\r\n\r\n public ngOnInit(): void {\r\n this.scrollContainerId = `${this.id}_root`;\r\n }\r\n\r\n /**\r\n * Scroll to the item currently marked as is-selected. Wait a tick for the\r\n * NavItemActiveDirective to update the selected class.\r\n */\r\n public scrollToSelectedItem(): void {\r\n window.setTimeout(() => {\r\n const linkSelector = `.item-wrapper.is-selected`;\r\n this.scrollService.scrollToItem(`#${this.scrollContainerId}`, linkSelector);\r\n });\r\n }\r\n\r\n /**\r\n * When a HierarchyItem is selected, update the value of the activeUrl property with the value\r\n * of that item's url property and emit the item to any subscribers.\r\n */\r\n public selectItem(item: HierarchyItem): void {\r\n this.itemSelected.next(item);\r\n if (item.display === 'heading' && !item.hideToggle) {\r\n this.toggleItemClicked(item, !item.expanded);\r\n }\r\n }\r\n}\r\n","<ul id=\"{{scrollContainerId}}\"\r\n class=\"flex-grow scroll-y py-1\">\r\n\r\n <li *ngIf=\"!hideRootNode && rootNode\">\r\n <div class=\"item-wrapper\"\r\n title=\"{{rootNode?.tooltip ?? rootNode?.label}}\"\r\n [ngClass]=\"{'is-heading': rootNode?.display === 'heading'}\"\r\n ecNavItemActive=\"is-selected\"\r\n [ecNavItemActiveUrl]=\"rootNode?.url\"\r\n [ecNavItemActiveExactMatch]='rootNode?.isActiveExactMatch'>\r\n <a id=\"rootNode_{{rootNode?.id}}_link\"\r\n class=\"item flex-grow d-flex align-items-center\"\r\n routerLink=\"{{rootNode?.url}}\"\r\n [queryParams]=\"rootNode?.queryParams\">\r\n <ng-container *ngTemplateOutlet=\"customItemTemplate || defaultItemTemplate; context: { $implicit: rootNode }\"></ng-container>\r\n </a>\r\n </div>\r\n </li>\r\n\r\n <ng-template #hierarchyView\r\n let-items>\r\n <li *ngFor=\"let item of items; index as index; first as isFirst\"\r\n [ngClass]=\"{'divider': item.display === 'divider'}\"\r\n id=\"treeItem_{{item.id}}\">\r\n <div class=\"item-wrapper\"\r\n title=\"{{item.tooltip ?? item.label}}\"\r\n [ngClass]=\"{'is-heading': item.display === 'heading'}\"\r\n ecNavItemActive=\"is-selected\"\r\n [ecNavItemActiveUrl]=\"item.url\"\r\n [ecNavItemActiveExactMatch]=\"item.isActiveExactMatch\"\r\n [ecNavItemActiveQueryParams]=\"item.queryParams\">\r\n\r\n <!-- This element provides the indentation for each level -->\r\n <span id=\"indent_{{item.id}}\"\r\n *ngIf=\"!item.noIndent\"\r\n class=\"d-block h-100\"\r\n [style.width.px]=\"(indent) * (item.level - 1) + (item.level * 4) + (item.hasChildren ? 0 : indent)\">\r\n </span>\r\n\r\n <!-- Toggle the button icon to be a spinner when item.status is pending -->\r\n <ec-collapsible-toggle id=\"toggle_{{item.id}}\"\r\n class=\"flex-shrink\"\r\n [style.width.px]=\"indent\"\r\n *ngIf=\"item.hasChildren && !item.hideToggle\"\r\n [hidden]=\"item.status === 'pending'\"\r\n [expanded]=\"item.expanded\"\r\n (expandedChange)=\"toggleItemClicked(item, $event)\">\r\n </ec-collapsible-toggle>\r\n\r\n <i class=\"ec-icon icon-loading my-1\"\r\n [hidden]=\"item.status !== 'pending'\"></i>\r\n\r\n <a id=\"treeItem_{{item.id}}_link\"\r\n class=\"item\"\r\n *ngIf=\"item.url\"\r\n (click)=\"selectItem(item)\"\r\n [routerLink]=\"item.url\"\r\n [queryParams]=\"item.queryParams\"\r\n [queryParamsHandling]=\"item.queryParamsHandling || ''\">\r\n <ng-container *ngTemplateOutlet=\"customItemTemplate || defaultItemTemplate; context: { $implicit: item }\"></ng-container>\r\n </a>\r\n <div id=\"treeItem_{{item.id}}_heading\"\r\n class=\"item\"\r\n *ngIf=\"!item.url\"\r\n (click)=\"selectItem(item)\">\r\n <ng-container *ngTemplateOutlet=\"customItemTemplate || defaultItemTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n </div>\r\n\r\n\r\n <ul *ngIf=\"item.children.length > 0 && item.expanded\">\r\n <ng-container *ngTemplateOutlet=\"hierarchyView; context:{ $implicit: item.children }\"></ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n\r\n <ng-container *ngTemplateOutlet=\"hierarchyView; context:{ $implicit: rootNode?.children }\"></ng-container>\r\n</ul>\r\n\r\n<ng-template #defaultItemTemplate\r\n let-item>\r\n <i class=\"ec-icon {{item.icon}} mx-1 flex-shrink\"\r\n [attr.title]=\"item.iconTooltip\"\r\n *ngIf=\"item.icon\"></i>\r\n <span class=\"mx-1 text-truncate\">{{item.label}}</span>\r\n</ng-template>","import { Component, Input, HostBinding } from '@angular/core';\r\nimport { PopoverContentPosition } from '../../controls/popover/popover.component';\r\nimport { LinkTarget } from '../tags/tag';\r\n\r\nexport type DisplayValue = {\r\n value:string,\r\n classnames?:string,\r\n icon?:string,\r\n noValueText?:string,\r\n tooltip?: string\r\n}\r\n\r\nexport type HelpPopoverConfig = {\r\n text: string;\r\n contentPosition?: PopoverContentPosition;\r\n maxWidth?: string;\r\n}\r\n\r\n@Component({\r\n selector: 'ec-item-display',\r\n templateUrl: './item-display.component.html',\r\n styleUrls: ['./item-display.component.scss']\r\n})\r\nexport class ItemDisplayComponent {\r\n\r\n /** The value of the host element's id attribute */\r\n @HostBinding('attr.id')\r\n @Input() public id: string = '';\r\n\r\n @Input() public label!: string;\r\n\r\n private _labelHelpPopover?: HelpPopoverConfig;\r\n @Input() set labelHelpPopover(labelHelpPopover: string | HelpPopoverConfig | undefined) {\r\n if(typeof labelHelpPopover === 'string') {\r\n this._labelHelpPopover = { text: labelHelpPopover };\r\n } else {\r\n this._labelHelpPopover = labelHelpPopover;\r\n }\r\n }\r\n get labelHelpPopover(): HelpPopoverConfig | undefined {\r\n return this._labelHelpPopover;\r\n }\r\n\r\n\r\n @Input() set value(value: string | DisplayValue | undefined) {\r\n if(typeof value === 'string') {\r\n this.internalValue = {value: value};\r\n } else if (value) {\r\n this.internalValue = value;\r\n } else {\r\n this.internalValue = {value: ''};\r\n }\r\n };\r\n public internalValue: DisplayValue = {value: ''};\r\n\r\n /**\r\n * When provided, displays the value as a link\r\n */\r\n @Input() set url(value: string | undefined) {\r\n this.externalLink = (value?.startsWith('http')) ? true : false;\r\n this._url = value;\r\n };\r\n get url(): string | undefined {\r\n return this._url;\r\n }\r\n private _url?: string;\r\n\r\n /**\r\n * Set link as an href or routerLink\r\n */\r\n public externalLink: boolean = false;\r\n\r\n @Input() public condensed = false;\r\n\r\n /**\r\n * The link target when url is provided. Defaults to _self (same window)\r\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a\r\n */\r\n @Input() public target: LinkTarget = '_self';\r\n}\r\n","<div id=\"{{id}}_label_0\"\r\n class=\"text-caption-1 d-flex align-items-center\">\r\n <span>{{label | translate}}</span>\r\n <ec-help-popover *ngIf=\"labelHelpPopover\"\r\n class=\"mx-n1 my-n2\"\r\n [text]=\"labelHelpPopover.text\"\r\n [contentPosition]=\"labelHelpPopover?.contentPosition ?? 'top-left'\"\r\n [maxWidth]=\"labelHelpPopover?.maxWidth ?? '15rem'\">\r\n </ec-help-popover>\r\n</div>\r\n\r\n<div id=\"{{id}}_value_0\" class=\"{{condensed ? 'text-body-2' : 'text-display-1'}} {{internalValue.classnames}}\"\r\n [class.font-color-hint]=\"!internalValue.value && internalValue.noValueText\"\r\n title=\"{{internalValue.tooltip}}\">\r\n\r\n <ng-container *ngIf=\"url else content\">\r\n <a *ngIf=\"!externalLink\"\r\n id=\"{{id}}_link\"\r\n routerLink=\"{{url}}\"\r\n target=\"{{target}}\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </a>\r\n <a *ngIf=\"externalLink\"\r\n id=\"{{id}}_link\"\r\n href=\"{{url}}\"\r\n target=\"{{target}}\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </a>\r\n </ng-container>\r\n</div>\r\n\r\n\r\n<ng-template #content>\r\n <i *ngIf=\"internalValue?.icon\" class=\"ec-icon {{internalValue?.icon}}\"></i>\r\n <span>{{(internalValue?.value || internalValue?.noValueText) | translate}}</span>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n","export class JsonHelper {\r\n\r\n /**\r\n * Parse given JSON text into an object.\r\n * Returns undefined if text cannot be parsed as JSON.\r\n */\r\n public static tryParseJSON(text: string | null | undefined): unknown | undefined {\r\n if (!text) {\r\n return undefined;\r\n }\r\n\r\n try {\r\n const result = JSON.parse(text);\r\n return result;\r\n } catch (err) {\r\n return undefined;\r\n }\r\n }\r\n}","import { Component, HostBinding, Input, OnChanges } from '@angular/core';\r\nimport { UntypedFormControl } from '@angular/forms';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { JsonHelper } from '../../shared/json-helper';\r\n\r\n@Component({\r\n selector: 'ec-json-display',\r\n templateUrl: './json-display.component.html',\r\n styleUrls: ['./json-display.component.scss']\r\n})\r\nexport class JsonDisplayComponent implements OnChanges {\r\n\r\n @Input() id?: string;\r\n @HostBinding('attr.id') attrId?: string;\r\n @Input() jsonString?: string;\r\n @Input() maxLength: number = 10000;\r\n public jsonDisplay = new UntypedFormControl('');\r\n\r\n constructor(private translate: TranslateService) { }\r\n\r\n ngOnChanges() {\r\n if (this.id) {\r\n this.attrId = this.id;\r\n }\r\n\r\n if (this.jsonString) {\r\n let display = this.jsonString;\r\n\r\n let parsedJson: unknown | undefined = JsonHelper.tryParseJSON(this.jsonString);\r\n if (parsedJson) {\r\n display = JSON.stringify(parsedJson, null, 2);\r\n }\r\n\r\n if (display.length > this.maxLength) {\r\n display = display.substr(0, this.maxLength) + `\\r\\n${this.translate.instant('MessageTooLong_Truncated_SC')}`;\r\n }\r\n\r\n this.jsonDisplay.patchValue(display);\r\n }\r\n }\r\n}\r\n","<ec-button id=\"{{id}}_copy\"\r\n class=\"copy-button\"\r\n *ngIf=\"jsonDisplay.value\"\r\n type=\"icon\"\r\n icon=\"icon-copy\"\r\n [ecCopyButton]=\"jsonDisplay\">\r\n</ec-button>\r\n<pre><code>{{jsonDisplay.value}}</code></pre>","import { DOCUMENT } from '@angular/common';\r\nimport { Component, ElementRef, Inject, OnInit, Renderer2 } from '@angular/core';\r\n\r\nimport { CacheService } from '../../core/cache.service';\r\nimport { ResizableBase } from './resizable-base';\r\n\r\n\r\n/**\r\n * Make an element resizable horizontally by wrapping it in the ResizableComponent.\r\n * Default widths / limits are applied but you can optionally override them\r\n * with min-width and max-width with style attributes\r\n * @example\r\n * <ec-resizable [style.width.px]=\"200\"\r\n * [style.min-width.px]=\"75\"\r\n * [style.max-width.px]=\"300\">\r\n * <div> ... </div>\r\n * </ec-resizable>\r\n */\r\n@Component({\r\n selector: 'ec-resizable',\r\n template: `<div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"handle\" (mousedown)=\"startDrag($event)\"></div>`,\r\n styleUrls: ['./resizable.component.scss']\r\n})\r\nexport class ResizableComponent extends ResizableBase implements OnInit {\r\n constructor(\r\n private el: ElementRef,\r\n renderer: Renderer2,\r\n cacheService: CacheService,\r\n @Inject(DOCUMENT) document: Document)\r\n {\r\n super(renderer, cacheService, document);\r\n\r\n //default rememberWidth to true for standard resizable, resizable tables default to false\r\n this.rememberWidth = true;\r\n }\r\n\r\n /** Store the host element to reference later */\r\n public ngOnInit(): void {\r\n this.currentEl = this.el.nativeElement;\r\n }\r\n\r\n /**\r\n * Set the new width of the element and emit the new width to subscribers\r\n */\r\n protected setWidth(width: number): void {\r\n this.renderer.setStyle(this.currentEl, 'width', width + 'px');\r\n this.saveWidths([width]);\r\n }\r\n\r\n /**Called from the base class when cached widths are available and restoring\r\n * width is enabled. We only care about the first one because we only have one width\r\n */\r\n protected restoreWidths(widths: number[]){\r\n this.setWidth(widths[0]);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject, Observable } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SplashService {\r\n /** Used to interact with the splash component\r\n * The splash component will subscribe to this and any components\r\n * that wish to bring the splash visible can use this to communicate\r\n * with the splash component.\r\n */\r\n private _splashVisibility: Subject<boolean> = new Subject();\r\n public splashVisibility: Observable<boolean> = this._splashVisibility;\r\n \r\n constructor() { }\r\n\r\n /**\r\n * Shows the splash screen\r\n */\r\n public showSplash(): void {\r\n this._splashVisibility.next(true);\r\n }\r\n\r\n /**\r\n * Hides the splash screen\r\n */\r\n public hideSplash(): void {\r\n this._splashVisibility.next(false);\r\n }\r\n}\r\n","import { Component, OnInit, OnDestroy } from '@angular/core';\r\nimport { Subject, timer } from 'rxjs';\r\nimport { SplashService } from './splash.service';\r\nimport { takeUntil, tap } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'ec-splash',\r\n templateUrl: './splash.component.html'\r\n})\r\nexport class SplashComponent implements OnInit, OnDestroy {\r\n /** Sets the visibility of the splash display */\r\n public isVisible: boolean = true;\r\n public stopAnimation: boolean = false;\r\n\r\n /** Emits when the service is destroyed */\r\n private destroyed: Subject<void> = new Subject();\r\n\r\n constructor(private splashService: SplashService) { }\r\n\r\n ngOnInit() {\r\n this.splashService.splashVisibility.pipe(\r\n takeUntil(this.destroyed),\r\n tap(async value => {\r\n if (value) {\r\n this.stopAnimation = false;\r\n } else {\r\n // Prevent animation from continuing after splash screen is hidden\r\n // but if we hide it then show while the timer is running, don't stop the animation after all\r\n timer(1000).pipe(takeUntil(this.splashService.splashVisibility)).subscribe(()=>{\r\n this.stopAnimation = true;\r\n });\r\n }\r\n })\r\n ).subscribe(showSplash => {\r\n this.isVisible = showSplash;\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n}\r\n","<div class=\"app-splash\" [class.app-loaded]=\"!isVisible\">\r\n <img src=\"/assets/images/splash.gif\">\r\n</div>","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: '[ecTableMasterHeaderRow]',\r\n template: `<th *ngIf=\"!hideTableMaster\"></th><ng-content></ng-content>`,\r\n styleUrls: ['./table-master-header-row.component.scss']\r\n})\r\nexport class TableMasterHeaderRowComponent {\r\n /** Used to hide the header added to the table. Useful if a table is shared between views and not all\r\n * support the table master scenario\r\n */\r\n @Input() public hideTableMaster?: boolean;\r\n}\r\n","import { BannerType } from '../../controls/banner/banner.component';\r\n\r\nexport type ToastAction = 'add' | 'remove';\r\nexport type ToastSource = 'user' | 'auto';\r\n\r\nexport type ToastItem = {\r\n /** Id to put on the toast element */\r\n id?: string,\r\n type: BannerType,\r\n message: string,\r\n /** \r\n * When false, the toast will close itself after 4 seconds.\r\n * When true, the toast will persist and show the close button.\r\n */\r\n dismissible: boolean,\r\n /** Overrides the default icon. */\r\n icon?: string,\r\n action?: () => any,\r\n actionLabel?: string\r\n};\r\n\r\nexport class ToastEvent {\r\n constructor(\r\n public action: ToastAction,\r\n public toast: ToastItem,\r\n public source: ToastSource = 'user'\r\n ) { }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { ToastEvent, ToastItem, ToastSource } from './toast-types';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ToastService {\r\n\r\n private _events: Subject<ToastEvent> = new Subject<ToastEvent>();\r\n public events: Observable<ToastEvent> = this._events.asObservable();\r\n\r\n constructor() { }\r\n\r\n /** \r\n * Display a toast.\r\n * If a toast of the same type is already on screen, the toast is queued until the existing one is dismissed.\r\n */\r\n public showToast(toast: ToastItem, source?: ToastSource) {\r\n const event = new ToastEvent('add', toast, source);\r\n this._events.next(event);\r\n }\r\n\r\n /**\r\n * Remove a toast.\r\n * This will also remove the toast from the queue if it has not already been displayed.\r\n */\r\n public dismissToast(toast: ToastItem, source?: ToastSource) {\r\n const event = new ToastEvent('remove', toast, source);\r\n this._events.next(event);\r\n }\r\n}\r\n","import { Component, EventEmitter, HostBinding, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { race, Subject, timer } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { ToastEvent, ToastItem } from '../toast-types';\r\nimport { ToastService } from '../toast.service';\r\n\r\n@Component({\r\n selector: 'ec-toast',\r\n templateUrl: './toast.component.html',\r\n styleUrls: ['./toast.component.scss']\r\n})\r\nexport class ToastComponent implements OnChanges, OnInit, OnDestroy {\r\n \r\n @Input() public toastItem?: ToastItem;\r\n\r\n @HostBinding('attr.id') public id?: string;\r\n @HostBinding('class.is-open') public open: boolean = false;\r\n @HostBinding('style.--toast-animation-duration.ms') public TOAST_ANIMATION_DURATION = 250;\r\n\r\n @Output() public closed = new EventEmitter<ToastEvent>();\r\n\r\n private readonly TIMED_TOAST_DURATION: number = 4000;\r\n private destroyed = new Subject<void>();\r\n\r\n constructor(private toastService: ToastService) { }\r\n\r\n ngOnInit() {\r\n this.toastService.events.pipe(takeUntil(this.destroyed)).subscribe(event => {\r\n if (event.action == 'remove' && event.toast === this.toastItem) {\r\n this.close(event);\r\n }\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.toastItem && this.toastItem) {\r\n this.id = this.toastItem.id;\r\n this.open = true;\r\n\r\n if (!this.toastItem.dismissible) {\r\n this.closeAfterTimer();\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroyed.next();\r\n this.destroyed.complete();\r\n }\r\n\r\n public closeClicked() {\r\n if (this.toastItem) {\r\n this.toastService.dismissToast(this.toastItem, 'user');\r\n }\r\n }\r\n\r\n private close(event: ToastEvent) {\r\n this.open = false;\r\n timer(this.TOAST_ANIMATION_DURATION).subscribe(() => {\r\n this.closed.emit(event);\r\n });\r\n }\r\n\r\n private closeAfterTimer() {\r\n timer(this.TIMED_TOAST_DURATION).pipe(\r\n takeUntil(race(this.closed, this.destroyed))\r\n ).subscribe(() => {\r\n if (this.toastItem) {\r\n this.toastService.dismissToast(this.toastItem, 'auto');\r\n }\r\n });\r\n }\r\n}\r\n","<ec-banner id=\"{{toastItem?.id}}_banner\"\r\n [type]=\"toastItem?.type\"\r\n bannerStyle=\"toast\"\r\n [customIcon]=\"toastItem?.icon\"\r\n [showCloseBtn]=\"toastItem?.dismissible\"\r\n [autoHideOnClose]=\"false\"\r\n (closed)=\"closeClicked()\">\r\n <div class=\"d-flex\">\r\n <div id=\"{{toastItem?.id}}_message\"\r\n [innerHTML]=\"toastItem?.message | translate\"></div>\r\n <button id=\"{{toastItem?.id}}_action\"\r\n ecLinkButton\r\n *ngIf=\"toastItem?.action && toastItem?.actionLabel\"\r\n class=\"font-weight-bold ml-2\"\r\n (click)=\"toastItem!.action!()\">{{toastItem?.actionLabel | translate}}</button>\r\n </div>\r\n</ec-banner>","import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { TelemetryService } from '../../../core/telemetry.service';\r\nimport { ToastEvent, ToastItem } from '../toast-types';\r\nimport { ToastService } from '../toast.service';\r\n\r\n@Component({\r\n selector: 'ec-toaster',\r\n templateUrl: './toaster.component.html'\r\n})\r\nexport class ToasterComponent implements OnInit, OnDestroy {\r\n\r\n public currentTimedToast?: ToastItem;\r\n public currentDismissibleToast?: ToastItem;\r\n public dismissibleToastBottom: number = 0;\r\n @ViewChild('timedToast', { static: false, read: ElementRef }) timedToastEl?: ElementRef<HTMLElement>;\r\n \r\n private pendingToasts: ToastItem[] = [];\r\n private destroyed = new Subject<void>();\r\n\r\n constructor(\r\n private toastService: ToastService,\r\n private telemetryService: TelemetryService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.toastService.events.pipe(takeUntil(this.destroyed)).subscribe(event => {\r\n if (event.action == 'add') {\r\n this.addToast(event.toast);\r\n this.updateDismissibleToastBottom();\r\n this.trackEvent(event);\r\n } else if (event.action == 'remove' && event.toast !== this.currentDismissibleToast && event.toast !== this.currentTimedToast) {\r\n this.removePendingToast(event.toast);\r\n this.trackEvent(event);\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.complete();\r\n }\r\n\r\n public updateVisibleToast(event: ToastEvent) {\r\n if (event.toast.dismissible) {\r\n this.currentDismissibleToast = this.getNextToast(true);\r\n } else {\r\n this.currentTimedToast = this.getNextToast(false);\r\n }\r\n\r\n this.updateDismissibleToastBottom();\r\n this.trackEvent(event);\r\n }\r\n\r\n private addToast(toast: ToastItem) {\r\n if ((toast.dismissible && this.currentDismissibleToast) || (!toast.dismissible && this.currentTimedToast)) {\r\n this.addPendingToast(toast);\r\n } else if (toast.dismissible) {\r\n this.currentDismissibleToast = toast;\r\n } else {\r\n this.currentTimedToast = toast;\r\n }\r\n }\r\n\r\n /** Returns the next pending toast of the specified type and removes it from the list of pending toasts. */\r\n private getNextToast(dismissible: boolean): ToastItem | undefined {\r\n const toast = this.pendingToasts.find(t => t.dismissible === dismissible);\r\n if (toast) {\r\n this.removePendingToast(toast);\r\n }\r\n return toast;\r\n }\r\n\r\n /** Add a toast to the list of pending toasts */\r\n private addPendingToast(toast: ToastItem) {\r\n this.pendingToasts.push(toast);\r\n }\r\n\r\n /** Removes the specified toast from the list of pending toasts */\r\n private removePendingToast(toast: ToastItem) {\r\n const index = this.pendingToasts.indexOf(toast);\r\n if (index > -1) {\r\n this.pendingToasts.splice(index, 1);\r\n }\r\n }\r\n\r\n /** \r\n * If the timed toast is present, sets the bottom height of the dismissible toast to\r\n * the current height of the timed toast plus .5rem for spacing.\r\n * Returns 0 if there isn't a visible timed toast.\r\n */\r\n private updateDismissibleToastBottom() {\r\n if (this.currentTimedToast && this.timedToastEl) {\r\n this.dismissibleToastBottom = (this.timedToastEl.nativeElement.offsetHeight + 8) / 16;\r\n } else {\r\n this.dismissibleToastBottom = 0;\r\n }\r\n }\r\n\r\n private trackEvent(event: ToastEvent) {\r\n const dismissible = this.pendingToasts.filter(t => t.dismissible);\r\n const transient = this.pendingToasts.filter(t => !t.dismissible);\r\n\r\n this.telemetryService.trackEvent(`${event.action} toast`, {\r\n action: event.action,\r\n source: event.source,\r\n hasDismissiblePending: dismissible.length > 0 ? 'yes' : 'no',\r\n dismissiblePendingLength: `${dismissible.length}`,\r\n hasTransientPending: transient.length > 0 ? 'yes' : 'no',\r\n transientPendingLength: `${transient.length}`,\r\n toastId: event.toast.id ?? '',\r\n toastType: event.toast.type,\r\n toastMessage: event.toast.message,\r\n toastDismissible: `${event.toast.dismissible}`,\r\n toastIcon: event.toast.icon ?? '',\r\n toastAction: event.toast.actionLabel ?? '',\r\n });\r\n }\r\n}\r\n","<ec-toast [toastItem]=\"currentDismissibleToast\"\r\n [style.--toast-bottom.rem]=\"dismissibleToastBottom\"\r\n (closed)=\"updateVisibleToast($event)\">\r\n</ec-toast>\r\n\r\n<ec-toast #timedToast\r\n [toastItem]=\"currentTimedToast\"\r\n (closed)=\"updateVisibleToast($event)\">\r\n</ec-toast>","import { Directive, ElementRef, HostListener, Input, OnInit, Renderer2, TemplateRef } from '@angular/core';\r\nimport { of, Subject } from 'rxjs';\r\nimport { delay, switchMap, takeUntil } from 'rxjs/operators';\r\nimport { TooltipComponent, TooltipOptions, TooltipPosition } from './../tooltip/tooltip.component';\r\nimport { TooltipService } from './../tooltip/tooltip.service';\r\n\r\n@Directive({\r\n selector: '[ecTooltip]'\r\n})\r\n\r\nexport class TooltipDirective implements OnInit {\r\n\r\n //TooltipConfig: receives all the tooltip options to overwrite the\r\n //default configuration of the tooltip\r\n @Input() public tooltipConfig?: TooltipOptions = undefined\r\n\r\n //TooltipText: receives plain text to display in the default tooltip\r\n @Input() public tooltipText?: string = undefined; \r\n\r\n //TooltipCustomContent: receives a template reference to display\r\n //into the tooltip content\r\n @Input() public tooltipCustomContent?: TemplateRef<any> = undefined;\r\n \r\n \r\n //This Input will remain as Input because tooltipPosition is not part\r\n //of TooltipOptions type of object\r\n @Input() public tooltipPosition: TooltipPosition = \"top-center\";\r\n\r\n\r\n\r\n //************************************************************//\r\n\r\n //Events related\r\n private mouseOver = new Subject<void>();\r\n private interrupt = new Subject<void>();\r\n private hideCompleted = new Subject<void>();\r\n private contentRect: DOMRect | undefined;\r\n\r\n //************************************************************//\r\n\r\n //Reference to TooltipComponent, will be defined below in this.show()\r\n private tooltip?: TooltipComponent;\r\n\r\n //Object with the tooltip options builded with the Input parameters\r\n //and use it in tooltipService - show()\r\n private tooltipOptions?:TooltipOptions = {}\r\n \r\n\r\n /**Set when we show a tooltip, to allow us to unsubscribe to mouse move when hide fires.\r\n * if we never showed the tooltip this will remain null and we won't have an event to unsubscribe to\r\n */\r\n private mouseMoveUnsubscribe: (()=> void) | null = null;\r\n\r\n constructor(\r\n private tooltipService: TooltipService,\r\n private element: ElementRef, \r\n private renderer2: Renderer2\r\n ) {}\r\n\r\n ngOnInit() {\r\n //checkInputsValue(): if there is an error it will prevent to execute\r\n //any code related with the tooltip setup\r\n if(this.checkInputsValue()) {\r\n //Create the object with the tooltip options provided as @Inputs\r\n this.createTooltipOptions();\r\n\r\n //MouseOver flow: start the process of showing the tooltip\r\n //until the mouse leaves the anchor element with this.interrupt\r\n this.mouseOver\r\n .pipe(\r\n switchMap(v =>\r\n of(v).pipe(\r\n delay(300), //delays the time previous of showing the tooltip\r\n takeUntil(this.interrupt)\r\n )\r\n )\r\n )\r\n .subscribe(() => this.show()); //Calls the function responsable of using the tooltipService\r\n \r\n //Mouse leave flow: start the process of removing the tooltip when the mouse is away of the anchor element\r\n this.interrupt.pipe(\r\n switchMap(v => \r\n of(v).pipe(\r\n delay(50),\r\n takeUntil(this.hideCompleted)\r\n ))\r\n ).subscribe(() => this.hide()); //hide the tooltip and triggers the completed cycle flag this.hideCompleted\r\n } else {\r\n console.error('There are too many parameters or none parameter to config the tooltip options');\r\n }\r\n }\r\n\r\n /**Detects where the mouse is to trigger the leave/hide process\r\n * This is a backstop protection against us missing the mouseleave event and leaving a hanging chad.\r\n * On some browsers, and on some actions (especially scroll) the mouseLeave seems to never fire */\r\n public onMouseMove(event:MouseEvent) {\r\n let callCallback = false;\r\n if(this.contentRect) {\r\n callCallback = this.tooltipService.onMove(event, this.contentRect!);\r\n if(callCallback) {\r\n //trigger on hide process\r\n this.interrupt.next(); \r\n //reset the contentRec for a new tooltip\r\n this.contentRect = undefined;\r\n }\r\n }\r\n }\r\n\r\n //Trigger the process to show the tooltip\r\n @HostListener('mouseover')\r\n public onMouseOver() {\r\n this.mouseOver.next();\r\n }\r\n \r\n //Trigger the process to hide and later the process\r\n //to mark as complete the cycle of show and hide the tooltip\r\n @HostListener('mouseleave')\r\n public onLeave() {\r\n this.interrupt.next();\r\n }\r\n\r\n private checkInputsValue():boolean {\r\n let parametersWithValue = 0;\r\n if(this.tooltipText) {\r\n parametersWithValue = parametersWithValue + 1\r\n } \r\n if(this.tooltipCustomContent) {\r\n parametersWithValue = parametersWithValue + 1\r\n }\r\n if(this.tooltipConfig) {\r\n parametersWithValue = parametersWithValue + 1\r\n }\r\n if(parametersWithValue === 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n /**\r\n * createTooltipOptions\r\n * will only be executed after manageError() verifies \r\n * if the parameters are not overlapping each other\r\n * and it will build the tooltipOptions object\r\n */\r\n private createTooltipOptions(): void {\r\n this.tooltipOptions = {\r\n id: `tooltip_${this.tooltipConfig?.id? this.tooltipConfig?.id: ''}`,\r\n text: this.tooltipConfig?.text || this.tooltipText,\r\n title: this.tooltipConfig?.title,\r\n subtitle: this.tooltipConfig?.subtitle,\r\n customContent: this.tooltipConfig?.customContent || this.tooltipCustomContent,\r\n dismissible: this.tooltipConfig?.dismissible || false,\r\n maxWidth: this.tooltipConfig?.maxWidth,\r\n width: this.tooltipConfig?.width,\r\n backgroundColor: this.tooltipConfig?.backgroundColor,\r\n };\r\n }\r\n\r\n\r\n private show():void {\r\n //Reference to the element where to tooltip is attached\r\n const element = this.element.nativeElement;\r\n //contentRect will be assing only after showing a tooltip/popover and it will be\r\n //reset after hide the same tooltip/popover\r\n this.contentRect = this.element.nativeElement.getBoundingClientRect();\r\n //tooltipPosition is never undefined, default value = \"top-center\"\r\n if(!this.tooltip) {\r\n this.tooltip = this.tooltipService.show(element as HTMLElement, this.tooltipPosition, this.tooltipOptions);\r\n this.mouseMoveUnsubscribe = this.renderer2.listen(document, 'mousemove', this.onMouseMove.bind(this));\r\n }\r\n }\r\n\r\n private hide():void {\r\n //There is a timing issue between the show - hide with \r\n //liner tooltip elements, so the below line\r\n //makes sure the app doesn't break\r\n if(this.tooltip) {\r\n //Call the hide() from the tooltip component\r\n this.tooltip.hide();\r\n this.tooltip = undefined;\r\n \r\n if(this.mouseMoveUnsubscribe){\r\n this.mouseMoveUnsubscribe();\r\n }\r\n }\r\n\r\n //Interrupt the flow of mouseover with a delay and triggers the \r\n //flow to hide the tooltip with a delay \r\n this.interrupt.next();\r\n //Work as a flag to indicate the flow of show and hide has been completed\r\n this.hideCompleted.next();\r\n }\r\n\r\n //When the element where the tooltip is attached disappears\r\n //the tooltip should be destroy as well \r\n ngOnDestroy(): void {\r\n this.interrupt.next();\r\n }\r\n\r\n}\r\n","import { TemplateRef, Type } from \"@angular/core\";\r\nimport { DialogContent } from \"../dialog/dialog-content\";\r\nimport { DialogOptions, DialogSize } from \"../dialog/dialog-types\";\r\nimport { TooltipPosition } from \"../tooltip/tooltip.component\";\r\n\r\nexport type TourCacheEntry = { completed: boolean };\r\n\r\nexport class Tour<T = any> {\r\n /** Unique identifier for the tour */\r\n id: string = '';\r\n /** List of tour steps to present to the user */\r\n steps: TourStep[] = [];\r\n\r\n /** Final step to be presented to the user if defined */\r\n exitStep?: TourStep;\r\n\r\n /** Dialog to present to the user before the tour begins */\r\n introDialog?: TourIntroDialog<T>\r\n}\r\n\r\n\r\nexport interface TourIntroDialog<T> {\r\n content?: Type<DialogContent<T>> | TemplateRef<any>;\r\n context?: T;\r\n options?: DialogOptions;\r\n size?: DialogSize;\r\n}\r\n\r\n\r\nexport class TourStep {\r\n /** Unique identifier for the tour step */\r\n id: string = '';\r\n\r\n /** Optional tour step title displayed at top of tooltip */\r\n title?: string;\r\n\r\n /** Optional media to display below title and above tour text. Can be a jpg, png, or gif */\r\n media?: string;\r\n\r\n /** HTML formatted text that contains the primary content of the tour step */\r\n text: string = '';\r\n\r\n /** The element to attach the tour step to. If undefined, step will appear centered on screen */\r\n anchor?: TourAnchor;\r\n\r\n helpLink?: string;\r\n\r\n /** Allows the step to have a fixed width defined for the tooltip. If not defined the width will be defaulted to 400. If you would like \r\n * auto width define as 'auto'.\r\n */\r\n width?: number | 'auto';\r\n\r\n /** Allows the step to have a max width defined for the tooltip */\r\n maxWidth?: number;\r\n}\r\n\r\nexport class TourAnchor {\r\n /**\r\n * Optional css selector of an element to click in order to open a menu or \r\n * overlay. Should not cause a navigation. If defined but does not exist in \r\n * the DOM, skip this step because it is probably hidden to the user because of permissions \r\n */\r\n clickBefore?: string;\r\n\r\n /** \r\n * CSS selector of element to click in order to close a menu or overlay \r\n * before continuing to the next step. Ignored if clickBefore is undefined. \r\n * Should not cause a navigation \r\n */\r\n clickAfter?: string;\r\n\r\n /** \r\n * Selector to attach the tooltip to. If defined but does not exist in the \r\n * DOM skip this step because it is probably hidden to the user because of \r\n * permissions.\r\n */\r\n selector: string = '';\r\n\r\n /** Position of the tooltip relative to the anchor. https://energycap-components.netlify.app/tooltip#position */\r\n position?: TooltipPosition\r\n}\r\n\r\nexport class TourEvent {\r\n constructor(\r\n public tours: Tour[],\r\n public tourAction: 'start' | 'end' | 'append' = 'start',\r\n public isAutoStart: boolean = false,\r\n ) { }\r\n}","import { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { CacheService } from '../../core/cache.service';\r\nimport { Tour, TourCacheEntry, TourEvent } from './tour-types';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TourService {\r\n\r\n public events: Observable<TourEvent> = new Subject();\r\n\r\n constructor(\r\n private cacheService: CacheService\r\n ) { }\r\n\r\n /**\r\n * Start a tour of the application. Allows one or many tours to be sent in, each will\r\n * follow the next. If multiple tours have exit steps defined only the final tour will\r\n * execute the exit step.\r\n * @param tours \r\n */\r\n public start(tours: Tour[], isAutoStart: boolean = false): void {\r\n let tourEvent: TourEvent = new TourEvent(tours, 'start', isAutoStart);\r\n (this.events as Subject<TourEvent>).next(tourEvent);\r\n }\r\n\r\n public end(): void {\r\n let tourEvent: TourEvent = new TourEvent([], 'end');\r\n (this.events as Subject<TourEvent>).next(tourEvent);\r\n }\r\n\r\n public append(tours: Tour[], isAutoStart: boolean = false): void {\r\n let tourEvent: TourEvent = new TourEvent(tours, 'append', isAutoStart);\r\n (this.events as Subject<TourEvent>).next(tourEvent);\r\n }\r\n\r\n /**\r\n * Returns a formatted cache key for tours\r\n * @param tour \r\n * @returns \r\n */\r\n public getCacheKey(tour: Tour): string {\r\n return `TourCompleted_${tour.id}`;\r\n }\r\n\r\n /**\r\n * Given a tour, check to see if it's been completed\r\n * @param tour \r\n * @returns \r\n */\r\n public hasTourBeenViewed(tour: Tour): boolean {\r\n let cacheValue = this.cacheService.getItem<TourCacheEntry>(this.getCacheKey(tour));\r\n if (cacheValue) {\r\n return cacheValue.completed;\r\n } else {\r\n // If no cache value then we never ran through it and wrote a key\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Given a list of tours, check to see if any will show to the user\r\n * @param tours \r\n * @returns \r\n */\r\n public haveAllToursBeenViewed(tours: Tour[]): boolean {\r\n let viewedCount: number = 0;\r\n\r\n tours.forEach(tour => {\r\n if (this.hasTourBeenViewed(tour)) {\r\n viewedCount++;\r\n }\r\n });\r\n\r\n return viewedCount === tours.length;\r\n }\r\n}\r\n","import { DOCUMENT } from '@angular/common';\r\nimport { Component, Inject, OnInit, TemplateRef, ViewChild } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { Subject, lastValueFrom } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\nimport { CacheService } from '../../core/cache.service';\r\nimport { TelemetryService } from '../../core/telemetry.service';\r\nimport { DialogService } from '../dialog/dialog.service';\r\nimport { TooltipComponent, TooltipOptions } from './../tooltip/tooltip.component';\r\nimport { TooltipService } from './../tooltip/tooltip.service';\r\nimport { Tour, TourAnchor, TourCacheEntry, TourEvent, TourStep } from './tour-types';\r\nimport { TourService } from './tour.service';\r\n\r\n@Component({\r\n selector: 'ec-tour',\r\n templateUrl: './tour.component.html',\r\n styleUrls: ['./tour.component.scss']\r\n})\r\nexport class TourComponent implements OnInit {\r\n /** Current tour step being shown to the user. The custom content in the template is bound to properties on this and therefor needs to be\r\n * its own property. The exitStep is a tour step and this will hold that step at the end of the tour.\r\n */\r\n public currentTourStep?: TourStep;\r\n\r\n /** Used to tell the UI that the step being shown is an exit step. This will change the\r\n * link text and the action when clicked\r\n */\r\n public showDoneButton: boolean = false;\r\n\r\n /** Reference to the tooltip used for the tour steps */\r\n public tooltip?: TooltipComponent;\r\n\r\n /** Array of tours provided when the start tour event was detected */\r\n private tours: Tour[] = [];\r\n\r\n // Couple indexes for the current tour/step stored for easier reference when knowing if we are at the end of the steps/tours\r\n private currentStepIndex: number = -1;\r\n private currentTourIndex: number = -1;\r\n\r\n /** Used to know if the restore step should be triggered when the tour is dismissed */\r\n private isAutoStart: boolean = false;\r\n\r\n private destroyed = new Subject<void>();\r\n\r\n @ViewChild('tourTooltip') public custom!: TemplateRef<any>;\r\n\r\n constructor(\r\n private tourService: TourService,\r\n private tooltipService: TooltipService,\r\n private telemetryService: TelemetryService,\r\n private cacheService: CacheService,\r\n private dialogService: DialogService,\r\n private translateService: TranslateService,\r\n @Inject(DOCUMENT) private document: Document,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.tourService.events.pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(async event => {\r\n if (event.tourAction === 'start') {\r\n await this.setupTourComponent(event);\r\n } else if (event.tourAction === 'end') {\r\n if (this.currentTour) {\r\n this.writeCompletionKeyForAllTours();\r\n await this.endTour();\r\n }\r\n } else if (event.tourAction === 'append') {\r\n let visibleTours: Tour[] = event.tours;\r\n \r\n // If this was triggered via auto start then we need to remove any tours that have been completed\r\n if (event.isAutoStart) {\r\n visibleTours = this.removeCompletedTours(visibleTours);\r\n }\r\n\r\n // If there is already a current tour, then we need to append the new tours to the current tour\r\n if (this.currentTour) {\r\n this.tours = this.tours.concat(visibleTours);\r\n } else {\r\n // There is not a current tour, so treat this as a start event\r\n await this.setupTourComponent(event);\r\n }\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /**\r\n * Called when a restore step has been completed\r\n */\r\n public async done(): Promise<void> {\r\n this.writeCompletionKey(this.currentTour);\r\n await this.endTour();\r\n }\r\n\r\n /**\r\n * Called when a tour begins and when the user clicks next on the current tour step. It will handle any after click actions and then\r\n * find the next step and present it to the user and transition to a restore step or new tour if needed.\r\n */\r\n public async showNextStep(): Promise<void> {\r\n // Before moving to the next step, make sure the current step does not have a click after defined. This could be hiding a menu\r\n // that was opened for the soon to be previous step.\r\n await this.waitForTimeout(this.handleClickAfter.bind(this));\r\n\r\n // Remove any previous tooltips\r\n this.removeTooltip();\r\n\r\n // Get our next step index to display to the user\r\n this.currentStepIndex = this.getNextAvailableStepIndex();\r\n\r\n if (this.currentStepIndex === -1) {\r\n // No more steps found, we either need to check for the exit step if this is the last tour\r\n // in the tours array or advance to the next tour\r\n if (this.currentTourIndex === this.tours.length - 1) {\r\n await this.handleExitStep();\r\n } else {\r\n // Write the completion key for the current tour before we move to the next\r\n this.writeCompletionKey(this.currentTour);\r\n\r\n this.currentTourIndex++;\r\n await this.showNextTour();\r\n }\r\n } else {\r\n this.currentTourStep = this.currentTour?.steps[this.currentStepIndex];\r\n\r\n // Now that we have our current step index, take care of any click before elements before showing the\r\n // tooltip. This could be opening a menu to get the tooltip element visible.\r\n await this.waitForTimeout(this.handleClickBefore.bind(this));\r\n\r\n // Click befores are done, now let's show the tooltip defined in the tour step\r\n await this.waitForTimeout(this.showStepTooltip.bind(this));\r\n }\r\n }\r\n\r\n private async setupTourComponent(event: TourEvent): Promise<void> {\r\n // End any tours that may have been in progress if the user kicks off a new one\r\n if (this.currentTour) {\r\n this.writeCompletionKeyForAllTours();\r\n await this.endTour();\r\n }\r\n\r\n this.isAutoStart = event.isAutoStart;\r\n\r\n if (event.isAutoStart) {\r\n this.tours = this.removeCompletedTours(event.tours);\r\n } else {\r\n this.tours = event.tours;\r\n }\r\n\r\n if (this.tours.length) {\r\n this.showDoneButton = false;\r\n\r\n this.currentTourStep = undefined;\r\n this.currentStepIndex = -1;\r\n\r\n // Prime the index for the first tour\r\n this.currentTourIndex = 0;\r\n\r\n await this.showNextTour();\r\n }\r\n }\r\n\r\n /**\r\n * Shows a tour and emits an event that it was started\r\n * @param tour\r\n */\r\n private async showNextTour(): Promise<void> {\r\n // Track a tour started event if the consumer of the library has telemetry configured\r\n this.telemetryService.trackEvent('TourStarted', { tourId: this.currentTour!.id });\r\n\r\n let continueTour: boolean = true;\r\n\r\n if (this.isAutoStart && this.currentTourIndex === 0 && this.currentTour?.introDialog) {\r\n let result = await lastValueFrom(this.dialogService.openDialog(this.currentTour.introDialog.content!, this.currentTour.introDialog.size ?? 'small', this.currentTour.introDialog.context ?? undefined, this.currentTour.introDialog.options ?? undefined));\r\n if (!result.save) {\r\n continueTour = false;\r\n\r\n this.writeCompletionKeyForAllTours();\r\n // Advance to the last tour if there are multiple for its exit step\r\n this.currentTourIndex = this.tours.length - 1;\r\n await this.handleExitStep();\r\n }\r\n }\r\n\r\n if (continueTour) {\r\n this.showNextStep();\r\n }\r\n }\r\n\r\n private async endTour(): Promise<void> {\r\n // Handle any click afters for the active step shown before shutting it down\r\n await this.waitForTimeout(this.handleClickAfter.bind(this));\r\n\r\n this.currentTourStep = undefined;\r\n this.tours = [];\r\n\r\n this.removeTooltip();\r\n }\r\n\r\n /**\r\n * Displays a tooltip for the current tour step\r\n */\r\n private async showStepTooltip() {\r\n // Track an event if the consumer of the library has telemetry configured\r\n this.telemetryService.trackEvent('TourStepChange', { tourId: this.currentTour!.id, tourStepId: this.currentTourStep!.id });\r\n\r\n const tooltipElement = this.document.querySelector(this.currentTourStep!.anchor!.selector);\r\n\r\n if (tooltipElement) {\r\n // Default width if none provided\r\n let stepWidth: number | undefined = 432;\r\n\r\n // Check the current tour step width and decide if it needs to change from the default value\r\n // based on whether the step defined it or not\r\n if (this.currentTourStep?.width !== undefined) {\r\n if (typeof this.currentTourStep.width === 'number') {\r\n stepWidth = this.currentTourStep.width;\r\n } else if (this.currentTourStep.width === 'auto') {\r\n stepWidth = undefined;\r\n }\r\n }\r\n\r\n const options: TooltipOptions = {\r\n id: `${this.currentTour?.id}_${this.currentTourStep!.id}`,\r\n text: this.translateService.instant(this.currentTourStep!.text),\r\n title: this.currentTourStep!.title ? this.translateService.instant(this.currentTourStep!.title) : undefined,\r\n customContent: this.custom,\r\n dismissible: true,\r\n maxWidth: this.currentTourStep?.maxWidth,\r\n width: stepWidth,\r\n backgroundColor: 'var(--ec-background-color-tour)',\r\n titleColor: 'var(--ec-color-tour-title)'\r\n };\r\n\r\n this.tooltip = this.tooltipService.show(tooltipElement as HTMLElement, this.currentTourStep!.anchor?.position, options);\r\n await this.waitForTimeout(this.focusOnNextOrDoneButton.bind(this));\r\n this.subscribeToTooltipOnHide();\r\n }\r\n }\r\n\r\n /**\r\n * Subscribes to the tooltips onHide event emitter and reacts if the user dismisses the tooltip\r\n */\r\n private async subscribeToTooltipOnHide(): Promise<void> {\r\n let tooltipSubscription = this.tooltip?.onHide.pipe(\r\n takeUntil(this.destroyed)\r\n ).subscribe(async () => {\r\n tooltipSubscription?.unsubscribe();\r\n\r\n this.writeCompletionKeyForAllTours();\r\n // If this is dismissed during an auto start tour then handle the exit step\r\n // Check that the done button is shown as well, if the done is shown then we're in the exit step\r\n // and dismissing should just end the tour\r\n if (this.isAutoStart && !this.showDoneButton) {\r\n // Advance to the last tour if there are multiple for its exit step\r\n this.currentTourIndex = this.tours.length - 1;\r\n\r\n await this.handleExitStep();\r\n } else {\r\n await this.endTour();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Loops through the current tour steps starting after the current step index. It will try to find a visible\r\n * selector and if so return the index.\r\n * @returns\r\n */\r\n private getNextAvailableStepIndex(): number {\r\n let nextStepIndex: number = -1;\r\n\r\n // Look through the steps starting with the current index and find the next that is avaiable\r\n // for the user.\r\n for (let i: number = this.currentStepIndex + 1; i < this.currentTour!.steps.length; i++) {\r\n if (this.currentTour?.steps[i].anchor && this.stepElementFound(this.currentTour!.steps[i].anchor!)) {\r\n return i;\r\n }\r\n }\r\n\r\n return nextStepIndex;\r\n }\r\n\r\n /**\r\n * Try to find the tour step element to know if it is visible for the user. Check for the clickBefore first if defined\r\n * @param anchor\r\n * @returns\r\n */\r\n private stepElementFound(anchor: TourAnchor): boolean {\r\n if (anchor.clickBefore) {\r\n return this.document.querySelector(anchor.clickBefore) !== null;\r\n } else {\r\n return this.document.querySelector(anchor.selector) !== null;\r\n }\r\n }\r\n\r\n /**\r\n * Some tour steps may have a click after defined. If so call the click method on the html element\r\n */\r\n private handleClickAfter(): void {\r\n let selector = this.currentTourStep?.anchor?.clickAfter;\r\n if (selector) {\r\n this.clickElementIfFound(selector);\r\n }\r\n }\r\n\r\n /**\r\n * Some tour steps may have a click before defined. If so call the click method on the html element\r\n */\r\n private handleClickBefore(): void {\r\n if (this.currentTourStep?.anchor?.clickBefore) {\r\n this.clickElementIfFound(this.currentTourStep.anchor?.clickBefore);\r\n }\r\n }\r\n\r\n /**\r\n * Checks for an exit step on the current tour and if found displays the step\r\n */\r\n private async handleExitStep(): Promise<void> {\r\n if (this.currentTour?.exitStep) {\r\n this.removeTooltip();\r\n\r\n this.showDoneButton = true;\r\n this.currentTourStep = this.currentTour?.exitStep;\r\n\r\n await this.waitForTimeout(this.handleClickBefore.bind(this));\r\n await this.waitForTimeout(this.showStepTooltip.bind(this));\r\n }\r\n }\r\n\r\n /**\r\n * Try to find the element with the selector provided and if so click it. This is how tour steps will open/close menus to\r\n * give a tour to the user\r\n * @param selector\r\n */\r\n private clickElementIfFound(selector: string | undefined): void {\r\n if (selector !== undefined) {\r\n const element = this.document.querySelector(selector);\r\n if (element) {\r\n (element as HTMLElement).click();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * When auto starting tours we will want to remove any that have the local storage key written as completed so\r\n * they are not presented to the user again.\r\n * @param tours\r\n * @returns\r\n */\r\n private removeCompletedTours(tours: Tour[]): Tour[] {\r\n return tours.filter(tour => {\r\n let cacheValue = this.cacheService.getItem<TourCacheEntry>(this.makeCacheKey(tour));\r\n if (cacheValue) {\r\n return !cacheValue.completed;\r\n } else {\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Writes a key to local storage so the tour will not be shown again automatically\r\n */\r\n private writeCompletionKey(tour: Tour | undefined): void {\r\n if (tour) {\r\n this.cacheService.setItem(this.makeCacheKey(tour), <TourCacheEntry>{ completed: true });\r\n }\r\n }\r\n\r\n /**\r\n * When dismissing a tour or one being dismissed via a navigation event, etc we will want to mark\r\n * every tour in the array as completed so it doesn't resurface unless the user requests the tour.\r\n * This function will loop over all and write the local storage key\r\n */\r\n private writeCompletionKeyForAllTours(): void {\r\n this.tours.forEach(tour => {\r\n this.writeCompletionKey(tour);\r\n });\r\n }\r\n\r\n /**\r\n * Cache key used to set/get the completion status of a tour\r\n * @param tour\r\n * @returns\r\n */\r\n private makeCacheKey(tour: Tour): string {\r\n return this.tourService.getCacheKey(tour);\r\n }\r\n\r\n /**\r\n * Removes a tooltip from the view, used when switching tour steps and closing a tour\r\n */\r\n private removeTooltip(): void {\r\n this.tooltip?.overlayRef?.dispose();\r\n }\r\n\r\n /**\r\n * Returns the tour based on the current index\r\n */\r\n private get currentTour(): Tour | undefined {\r\n if (this.currentTourIndex > -1 && this.currentTourIndex < this.tours.length) {\r\n return this.tours[this.currentTourIndex];\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n /**\r\n * The click before/after and show tooltip functions need to be wrapped in setTimeout for the UI\r\n * to operate correctly but setTimeout is an action we cannot await so we're wrapping it in a promise to return\r\n * so the function calls can await the action\r\n * @param fn\r\n * @returns\r\n */\r\n private waitForTimeout(fn: () => void) {\r\n return new Promise<void>(resolve => {\r\n setTimeout(() => {\r\n fn();\r\n resolve();\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Find the \"next\" or \"done\" button and focus on it.\r\n *\r\n * They are mutually exclusive, so if we cannot find the next button\r\n * we look for the done button.\r\n */\r\n private focusOnNextOrDoneButton(): void {\r\n if (!this.focusOnElement(`#${this.currentTourStep!.id}_nextButton`)) {\r\n this.focusOnElement(`#${this.currentTourStep!.id}_doneButton`)\r\n }\r\n }\r\n\r\n /**\r\n * Find an element with given selector and focus on it.\r\n * Return false if element not found.\r\n */\r\n private focusOnElement(selector: string): boolean {\r\n const element = this.document.querySelector(selector);\r\n if (element) {\r\n (element as HTMLElement).focus();\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n","<ng-template #tourTooltip>\r\n <div *ngIf=\"currentTourStep?.media\"\r\n class=\"mb-3\">\r\n <img id=\"{{currentTourStep?.id + '_media'}}\"\r\n style=\"max-width: 100%;\"\r\n src=\"{{currentTourStep?.media}}\">\r\n </div>\r\n <div class=\"font-color-primary-light px-3 mb-3\"\r\n [innerHtml]=\"currentTourStep?.text | translate\">\r\n </div>\r\n <a *ngIf=\"currentTourStep?.helpLink\" id=\"{{currentTourStep?.id + '_helpLink'}}\" class=\"d-block mb-3 px-3\" target=\"_blank\" href=\"{{currentTourStep?.helpLink}}\" translate>LearnMore_SC</a>\r\n <footer class=\"px-3 mt-3 d-flex\">\r\n <button id=\"{{currentTourStep?.id + '_nextButton'}}\" *ngIf=\"!showDoneButton\" class=\"ml-auto tourAction\" ecLinkButton (click)=\"showNextStep()\" translate>Next_TC</button>\r\n <button id=\"{{currentTourStep?.id + '_doneButton'}}\" *ngIf=\"showDoneButton\" class=\"ml-auto tourAction\" ecLinkButton (click)=\"done()\" translate>Done_TC</button>\r\n </footer>\r\n</ng-template>","import { Component, Input, HostBinding, Output, EventEmitter, ViewChild, TemplateRef } from '@angular/core';\r\nimport { MenuComponent, MenuItem, MenuTemplateType } from '../../controls/menu/menu.component';\r\nimport { ToggledHierarchyItem, HierarchyItem } from '../hierarchy/hierarchy-base';\r\nimport { HierarchyTreeComponent } from '../hierarchy/hierarchy-tree/hierarchy-tree.component';\r\nimport { Overlay } from '../view-overlay/view-overlay.component';\r\n\r\nexport type TreeType = 'hierarchy' | 'menu';\r\n\r\n@Component({\r\n selector: 'ec-tree',\r\n templateUrl: './tree.component.html',\r\n styleUrls: ['./tree.component.scss']\r\n})\r\nexport class TreeComponent {\r\n\r\n /** The value of the host elements id attribute */\r\n @HostBinding('attr.id') public attrId: string = '';\r\n\r\n /**\r\n * The ID of the component, bound to the host element's id attribute and passed\r\n * to child components\r\n */\r\n @Input()\r\n public set id(value: string) {\r\n this._id = value;\r\n this.attrId = value;\r\n };\r\n public get id(): string {\r\n return this._id;\r\n }\r\n private _id: string = '';\r\n\r\n /** The tree's title displayed in the header */\r\n @Input() public treeTitle: string = '';\r\n\r\n /** Hides the tree header when set to true */\r\n @Input() public hideTreeHeader?: boolean = false;\r\n\r\n /** Items to display in the tree when type is 'menu' */\r\n @Input() public treeItems?: MenuItem[];\r\n\r\n /** Hide the root tree item when type is 'hierarchy' */\r\n @Input() public treeHierarchyHideRootNode?: boolean;\r\n\r\n /** Items to display in the tree when type is 'hierarchy' */\r\n @Input() public treeHierarchy?: HierarchyItem;\r\n\r\n /** Used when the tree is in menu mode to tell the menu if it should maintain the selected item\r\n * Useful in side nav components where this tree component may exist alongside other trees or menus\r\n * used for navigation. If this tree is in menu mode you would want this set to false so when you select an item\r\n * from a sibling navigation element the selection will not be maintained.\r\n */\r\n @Input() public treeMenuMaintainSelectedItem: boolean = true;\r\n\r\n /** Used when a custom template is needed for the menu items when the tree is in menu mode */\r\n @Input() public customTreeMenuTemplate?: TemplateRef<any>;\r\n\r\n /** Used when a custom template is needed for the hierarchy items when the tree is in hierarchy mode */\r\n @Input() public customHierarchyItemTemplate?: TemplateRef<any>;\r\n\r\n /** Tree overlay */\r\n @Input() public status?: Overlay = new Overlay('hasData');\r\n\r\n /** Display the tree items with a MenuComponent or a HierarchyTreeComponent */\r\n @Input() public type?: TreeType = 'hierarchy';\r\n\r\n /** Items to display in the dropdown menu */\r\n @Input() public menuItems?: MenuItem[];\r\n\r\n /** Tree dropdown menu overlay */\r\n @Input() public menuStatus?: Overlay = new Overlay('hasData');\r\n\r\n /** The menu item template */\r\n @Input() public menuTemplateType?: MenuTemplateType = \"checkAndLabel\";\r\n\r\n /**\r\n * When true, the space for the icon is preserved for menu items that do not have icons.\r\n * Only applicable for iconAndLabel menus. Not applicable to hierarchy trees.\r\n */\r\n @Input() public preserveIconSpace: boolean = false;\r\n\r\n /** Emits the item currently selected item in the tree */\r\n @Output() public treeSelection: EventEmitter<MenuItem | HierarchyItem> = new EventEmitter();\r\n\r\n /** Emits when a hierarchy tree item is expanded as a hook to load the item's children */\r\n @Output() public getTreeItemChildren: EventEmitter<HierarchyItem> = new EventEmitter();\r\n\r\n /** Emits when a hierarchy tree item is expanded or collapsed */\r\n @Output() public treeItemToggled: EventEmitter<ToggledHierarchyItem> = new EventEmitter<ToggledHierarchyItem>();\r\n\r\n /** Reference to the MenuComponent instance in the template */\r\n @ViewChild(MenuComponent) public menuComponent?: MenuComponent;\r\n\r\n /** Reference to the HierarchyTreeComponent instance in the template */\r\n @ViewChild(HierarchyTreeComponent) public hierarchyTreeComponent?: HierarchyTreeComponent;\r\n\r\n @Input() public templateType: MenuTemplateType = 'label';\r\n\r\n constructor() { }\r\n\r\n /** Emits when a tree item is selected */\r\n public onItemSelected(item: MenuItem | HierarchyItem) {\r\n this.treeSelection.emit(item);\r\n }\r\n\r\n /** Emits when a hierarchy tree item is expanded to load the item's children */\r\n public onHierarchyGetItemChildren(item: HierarchyItem) {\r\n this.getTreeItemChildren.emit(item);\r\n }\r\n\r\n /** Emits when a hierarchy tree item is expanded or collapsed */\r\n public onHierarchyItemToggled(item: ToggledHierarchyItem) {\r\n this.treeItemToggled.emit(item);\r\n }\r\n\r\n /** Scroll to the tree item that is currently selected. */\r\n public scrollToSelectedItem() {\r\n if (this.menuComponent) {\r\n this.menuComponent.scrollToSelectedItem();\r\n }\r\n\r\n if (this.hierarchyTreeComponent) {\r\n this.hierarchyTreeComponent.scrollToSelectedItem();\r\n }\r\n }\r\n}\r\n","<header *ngIf=\"!hideTreeHeader\"\r\n class=\"flex-shrink d-flex align-items-center\">\r\n <h2 id=\"{{id}}_title\"\r\n class=\"flex-grow mr-2 text-heading-1\">{{treeTitle | translate}}</h2>\r\n <ec-dropdown *ngIf=\"menuItems?.length\"\r\n id=\"{{id}}_dropdown\"\r\n class=\"flex-shrink\"\r\n icon=\"icon-menu\"\r\n [menuTemplateType]=\"menuTemplateType\"\r\n menuPosition=\"left\"\r\n [status]=\"menuStatus\"\r\n [popupFixed]=\"true\"\r\n [showArrow]=\"false\"\r\n [menuMinWidth]=\"240\"\r\n [items]=\"menuItems\">\r\n </ec-dropdown>\r\n</header>\r\n\r\n<div class=\"flex-grow d-flex\"\r\n ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [displayAsMask]=\"true\">\r\n <ng-container *ngIf=\"type === 'menu'\">\r\n <ec-menu [id]=\"id\"\r\n [items]=\"treeItems\"\r\n [templateType]=\"templateType\"\r\n [maintainSelectedItem]=\"treeMenuMaintainSelectedItem\"\r\n [truncateItems]=\"true\"\r\n (selectedChanged)=\"onItemSelected($event)\"\r\n [customMenuTemplate]=\"customTreeMenuTemplate ? customTreeMenuTemplate : undefined\"\r\n [preserveIconSpace]=\"preserveIconSpace\"\r\n class=\"flex-grow\">\r\n </ec-menu>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"type === 'hierarchy'\">\r\n <ec-hierarchy-tree [id]=\"id\"\r\n [rootNode]=\"treeHierarchy\"\r\n [hideRootNode]=\"treeHierarchyHideRootNode\"\r\n (getItemChildren)=\"onHierarchyGetItemChildren($event)\"\r\n (itemToggled)=\"onHierarchyItemToggled($event)\"\r\n (itemSelected)=\"onItemSelected($event)\"\r\n [customItemTemplate]=\"customHierarchyItemTemplate\"\r\n class=\"flex-grow d-flex\">\r\n </ec-hierarchy-tree>\r\n </ng-container>\r\n</div>","import { Directive, Input, HostListener, HostBinding, OnInit } from '@angular/core';\r\n\r\nexport interface ClickableElement {\r\n dispatchEvent(event: Event): void;\r\n}\r\n\r\n@Directive({\r\n selector: '[ecClickAreaFor]'\r\n})\r\nexport class ClickAreaForDirective implements OnInit {\r\n\r\n @HostBinding('class.cursor-pointer')\r\n @Input('ecClickAreaFor') \r\n public targetEl?: any;\r\n\r\n private isTargetClickable!: boolean;\r\n \r\n constructor() {}\r\n\r\n ngOnInit() {\r\n this.isTargetClickable = typeof this.targetEl?.dispatchEvent === 'function';\r\n }\r\n\r\n @HostListener('click', ['$event']) onClick(event: Event) {\r\n if (this.isTargetClickable) {\r\n event.preventDefault();\r\n this.targetEl.dispatchEvent(new Event('click'));\r\n }\r\n }\r\n}\r\n","import { Directive, Input, OnInit, ViewContainerRef, TemplateRef } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime, takeUntil } from 'rxjs/operators';\r\nimport { WindowService } from '../../../core/window.service';\r\n\r\n/**\r\n * Conditionally include content in the DOM based on the width of the viewport. Use to programmatically implement reponsive layouts and prevent duplicate markup and listeners.\r\n * In most scenarios CSS media queries is sufficient to hide/show elements responsively. However, in some cases media queries would result in duplicate markup and listeners\r\n * that could cause undesired side effects and it is preferred to us programmatic elements to achieve the layout.\r\n */\r\n@Directive({\r\n selector: '[ecIfViewportWidth]'\r\n})\r\nexport class IfViewportWidthDirective implements OnInit{\r\n\r\n /**\r\n * The min and, optionally, max width in pixels that the viewport must be in order to include the directive and its content in the DOM.\r\n * A single number can be used to set the min width, but an object with min and max must be used to set a min and max width or just a max width.\r\n * \r\n * ```html\r\n * <div *ecIfViewportWidth=\"500\">Content to render if viewport width is >= 500px</div>\r\n * <div *ecIfViewportWidth=\"{max: 800}\">Content to render if the viewport width is <= 800px</div>\r\n * <div *ecIfViewportWidth=\"{min: 500, max: 800}\">Content to render if the viewport width is between 500px and 800px</div>\r\n * ```\r\n */\r\n @Input('ecIfViewportWidth') public width!: number | {min?: number; max?: number};\r\n\r\n /** \r\n * If defined, the width in pixels that the viewport must be to include the directive and its content in the DOM\r\n */\r\n private minWidth?: number;\r\n\r\n /**\r\n * If defined, the width in pixels that the viewport cannot be greater than to include the directive and its conten in the DOM\r\n */\r\n private maxWidth?: number;\r\n\r\n /** \r\n * Used to unsubscribe when the directive is removed from the DOM\r\n */\r\n private destroyed: Subject<void> = new Subject();\r\n\r\n /**\r\n * Internally tracks whether the directive and its content is included in the DOM\r\n */\r\n private isVisible: boolean = false;\r\n\r\n constructor(\r\n private viewContainer: ViewContainerRef, \r\n private templateRef: TemplateRef<any>, \r\n private windowService: WindowService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n // Window may not available if this code is not being run on a browser platform. \r\n // If there is no window or innerWidth abort initialization\r\n if (this.windowService.innerWidth === undefined) {\r\n return;\r\n }\r\n\r\n // Check for required values. If none are set, log error and abort initialization\r\n if (!this.width) {\r\n console.error(`A min or max width was not provided. Provide a value for 'min' or 'max' by assigning a single value or object to the directive. E.g. *ecIfViewportWidth=\"800\" (assigned to min) or *ecIfViewportWidth=\"{min: 800, max: 1280}\"`);\r\n return;\r\n } else if (typeof this.width === 'number') {\r\n this.minWidth = this.width;\r\n } else if (this.width !== undefined) {\r\n this.minWidth = this.width.min;\r\n this.maxWidth = this.width.max;\r\n }\r\n\r\n if (this.windowService.resized) {\r\n this.windowService.resized.pipe(debounceTime(100), takeUntil(this.destroyed)).subscribe( () => {\r\n this.updateVisibility();\r\n })\r\n }\r\n this.updateVisibility();\r\n }\r\n\r\n /**\r\n * Get the current viewport width and determin if the directive's content should be\r\n * included in the DOM based on the min and max width settings\r\n */\r\n private updateVisibility(): void {\r\n const viewportWidth = this.windowService.innerWidth!;\r\n \r\n if (this.minWidth !== undefined && this.maxWidth !== undefined) {\r\n if (viewportWidth >= this.minWidth && viewportWidth <= this.maxWidth) {\r\n this.show();\r\n } else {\r\n this.hide();\r\n }\r\n } else if (this.minWidth !== undefined) {\r\n if (viewportWidth >= this.minWidth) {\r\n this.show();\r\n } else {\r\n this.hide();\r\n }\r\n } else if (this.maxWidth !== undefined) {\r\n if (viewportWidth <= this.maxWidth) {\r\n this.show();\r\n } else {\r\n this.hide();\r\n }\r\n }\r\n \r\n }\r\n\r\n /**\r\n * Add the directive's content to the DOM\r\n */\r\n private show(): void {\r\n if (!this.isVisible) {\r\n this.viewContainer.createEmbeddedView(this.templateRef);\r\n this.isVisible = true;\r\n }\r\n }\r\n\r\n /**\r\n * Remove the directive's content from the DOM\r\n */\r\n private hide(): void {\r\n if (this.isVisible) {\r\n this.viewContainer.clear();\r\n this.isVisible = false;\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'highlightText'\r\n})\r\nexport class HighlightTextPipe implements PipeTransform {\r\n\r\n transform(value: string, searchText: string): string {\r\n let transformedValue = '';\r\n if (value && searchText) {\r\n const regex = new RegExp(this.escapeRegex(searchText), 'gi');\r\n transformedValue = value.replace(regex, this.strongWrap);\r\n } else {\r\n transformedValue = value;\r\n }\r\n\r\n return transformedValue;\r\n }\r\n\r\n private strongWrap(match: string) {\r\n return `<strong class=\"text-highlight\">${match}</strong>`;\r\n }\r\n\r\n private escapeRegex(value: string) {\r\n return value.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { UserPreferenceService } from '../../user-preference.service';\r\nimport moment from 'moment';\r\nimport { DateDisplay } from './date-display.pipe';\r\n\r\n/**\r\n * Format a time to the user's preference for display\r\n */\r\n@Pipe({name: 'timeDisplay'})\r\nexport class TimeDisplayPipe implements PipeTransform {\r\n\r\n constructor(private userPreferenceService: UserPreferenceService) { }\r\n\r\n private lastFormatString: string = 'HH:mm:ss';\r\n\r\n /**\r\n * Format a time for display, accounting for user's display preferences.\r\n */\r\n transform(time?: DateDisplay, showSeconds?: boolean): string {\r\n let display: string = '';\r\n let formatString: string = '';\r\n \r\n // use user-preferred formats\r\n this.userPreferenceService.getPreferences().subscribe(result => {\r\n //if preferences exist then format time to users preference \r\n //otherwise use the last user preference\r\n if (result.preference) {\r\n formatString = result.preference!.timeFormat!;\r\n if (!showSeconds) {\r\n formatString = formatString.replace(':ss', '');\r\n }\r\n this.lastFormatString = formatString;\r\n }\r\n });\r\n display = moment(time).format(this.lastFormatString);\r\n return display;\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport moment from 'moment';\r\nimport { DateDisplayPipe } from './date-display.pipe';\r\nimport { TimeDisplayPipe } from './time-display.pipe';\r\n\r\nexport type RelativeDateOptions = {\r\n dateOnly?: boolean, \r\n showTimeForToday? : boolean,\r\n todayLabel?: string, \r\n yesterdayLabel?: string, \r\n\r\n /** Prefix for when showing today as time for the value */\r\n todayTimePrefix?: string,\r\n\r\n /** Prefix for when displaying \"today\" as the value */\r\n todayPrefix?: string,\r\n\r\n /** Prefix for when displaying \"yesterday\" as the value */\r\n yesterdayPrefix?: string,\r\n\r\n /** Default prefix. Will be applied to all display options if defined and others are not */\r\n defaultPrefix?: string\r\n}\r\n\r\n@Pipe({\r\n name: 'relativeDate'\r\n})\r\nexport class RelativeDatePipe implements PipeTransform {\r\n\r\n constructor(\r\n private dateDisplayPipe: DateDisplayPipe, \r\n private timeDisplayPipe: TimeDisplayPipe,\r\n private translateService: TranslateService\r\n ) { }\r\n\r\n /**\r\n * If dateOnly is true, returns timeSelected formatted according to the user's date preference.\r\n * If dateOnly is true and showTimeForToday is false and timeSelected is today, returns 'today' or todayLabel\r\n * If dateOnly and showTimeForToday is true and timeSelected is today, returns timeSelected formatted according to the user's time preference.\r\n * If dateOnly is false, returns timeSelected formatted according to the user's time preference.\r\n * If dateOnly is false and timeSelected is not today/yesterday, returns timeSelected formatted according to the user's date plus time preference.\r\n * If any of todayLabel, yesterdayLabel is supplied, use the supplied label.\r\n */\r\n transform(\r\n timeSelected: string, \r\n options?: RelativeDateOptions\r\n ): string {\r\n const selected = moment(timeSelected);\r\n const today = moment();\r\n const yesterday = moment().subtract(1, 'day');\r\n const timeDisplay = options?.dateOnly ? `` : ` ${this.timeDisplayPipe.transform(timeSelected)}`;\r\n\r\n let displayValue = null;\r\n let prefixValue = '';\r\n\r\n if (selected.isSame(today, 'day') && !options?.showTimeForToday) {\r\n displayValue = this.translateService.instant(options?.todayLabel ? options?.todayLabel : 'today');\r\n prefixValue = options?.todayPrefix ?? '';\r\n } else if (selected.isSame(today, 'day') && options?.showTimeForToday && !timeDisplay) {\r\n displayValue = this.timeDisplayPipe.transform(timeSelected);\r\n prefixValue = options?.todayTimePrefix ?? ''\r\n } else if (selected.isSame(yesterday, 'day')) {\r\n displayValue = this.translateService.instant(options?.yesterdayLabel ? options?.yesterdayLabel : 'yesterday');\r\n prefixValue = options?.yesterdayPrefix ?? '';\r\n } else {\r\n displayValue = this.dateDisplayPipe.transform(timeSelected);\r\n }\r\n\r\n // If we have a default prefix and no specific ones were set earlier apply the default prefix\r\n if (options?.defaultPrefix && prefixValue === '') {\r\n prefixValue = options.defaultPrefix;\r\n }\r\n\r\n // Add a space after our prefix if defined\r\n if (prefixValue !== '') {\r\n prefixValue = `${prefixValue} `;\r\n }\r\n \r\n return `${prefixValue}${displayValue}${timeDisplay}`;\r\n }\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-page-title',\r\n templateUrl: './page-title.component.html',\r\n host: {\r\n class: 'd-flex'\r\n }\r\n})\r\nexport class PageTitleComponent {\r\n @Input() public title?: string;\r\n @Input() public titleIcon?: string;\r\n @Input() public subTitle?: string; \r\n @Input() public subTitleUrl?: string; \r\n}\r\n","<i *ngIf=\"titleIcon\"\r\n class=\"flex-shrink mr-1 my-1 ec-icon ec-icon-md {{titleIcon}}\"></i>\r\n<div class=\"text-truncate\">\r\n <h1 *ngIf=\"title\"\r\n class=\"text-title-1 mb-0 py-1 text-truncate\"\r\n title=\"{{title}}\">{{title}}</h1>\r\n <p *ngIf=\"subTitle && !subTitleUrl\"\r\n class=\"text-caption-1 mb-0 mt-n1 text-truncate\">{{subTitle}}</p>\r\n <a *ngIf=\"subTitle && subTitleUrl\"\r\n id=\"subTitle_link\"\r\n class=\"d-block text-truncate mb-0 mt-n1 font-size-small\"\r\n routerLink=\"{{subTitleUrl}}\"\r\n target=\"_self\">\r\n {{subTitle}}\r\n </a>\r\n</div>","import { Component, EventEmitter, HostBinding, Input, Output, TemplateRef } from '@angular/core';\r\nimport { DialogService } from '../../../display/dialog/dialog.service';\r\nimport { MenuItem } from '../../../controls/menu/menu.component';\r\nimport { NavItem } from '../../../controls/navigation/nav-item';\r\nimport { Overlay } from '../../../display/view-overlay/view-overlay.component';\r\nimport { DialogResult } from '../../../display/dialog/dialog-types';\r\n\r\n@Component({\r\n selector: 'ec-page-view',\r\n templateUrl: './page-view.component.html',\r\n styleUrls: ['./page-view.component.scss'],\r\n host: {\r\n class: \"flex-grow\"\r\n }\r\n})\r\nexport class PageViewComponent {\r\n /**\r\n * Set to true when page-view is inside a dialog to adjust styles and hide breadcrumbs.\r\n */\r\n @Input() public isDialog: boolean = false;\r\n\r\n /**\r\n * Set to true to enable read only mode. Only a single secondary action will be available\r\n */\r\n @Input() public readonly: boolean = false;\r\n\r\n /**\r\n * Controls Overlay that masks the page view content. Only the header is not masked when the overlay is visible. Default is pending Overlay with no message\r\n */\r\n @Input() public status?: Overlay = new Overlay('pending');\r\n\r\n /**\r\n * Set to false to hide the entire header, including breadcrumbs and error banner. Default is true.\r\n */\r\n @Input() public showHeader: boolean = true;\r\n\r\n /**\r\n * Displays an error banner under the titlebar when provided a value.\r\n */\r\n @Input() public errors?: string;\r\n\r\n /**\r\n * Breadcrumbs to be displayed in the header.\r\n */\r\n @Input() public breadcrumbs?: NavItem[];\r\n\r\n /**\r\n * Title settings. Passed to the PageTitleComponent.\r\n */\r\n @Input() public title?: string;\r\n @Input() public titleIcon?: string;\r\n @Input() public subTitle?: string;\r\n @Input() public subTitleUrl?: string;\r\n\r\n /**\r\n * Label for the actions dropdown in the header. Default is 'Actions'\r\n */\r\n @Input() public moreActionsLabel?: string = 'Actions';\r\n /**\r\n * Options for the actions dropdown in the header. The dropdown is hidden if not options are provided.\r\n */\r\n @Input() public moreActions?: MenuItem[];\r\n\r\n /**\r\n * Label for the secondary button in the header. Default is 'Cancel'\r\n */\r\n @Input() public secondaryActionLabel?: string = 'Cancel';\r\n @Input() public hideSecondaryAction = false;\r\n\r\n /** Flag for hiding the tiny close button in the top-right corner of dialog while in pending state only */\r\n @Input() public hideCloseOnPending: boolean = false;\r\n\r\n /**\r\n * Label for the primary button in the header. Default is 'Save'\r\n */\r\n @Input() public primaryActionLabel?: string = 'Save';\r\n @Input() public hidePrimaryAction = false;\r\n\r\n /**\r\n * Replaces the title, subtitle and title icon\r\n */\r\n @Input() public customTitleTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Inserted to the left of the default actions\r\n */\r\n @Input() public customActionsTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Replaces the titlebar and actions of the default header. Breadcrumbs and error banner are not replaced. Cannot contain a <header> element.\r\n */\r\n @Input() public customHeaderTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Content to include in the footer\r\n */\r\n @Input() public footerTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Replaces the Error Banner default template. Useful when we need to show more than text in the banner.\r\n */\r\n @Input() public customErrorBannerTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Pins the footer to the bottom of the view and overlays any overflowing content\r\n */\r\n @Input() public stickyFooter = true;\r\n\r\n /**\r\n * Prevents content from overflowing the view. Content must manage overflow instead.\r\n */\r\n @Input() public fitContent = false;\r\n\r\n /**\r\n * Disables the primary action button\r\n */\r\n @Input() public disablePrimaryAction = false;\r\n\r\n /** Changes the background color for the content and overlay to white */\r\n @HostBinding('class.bg-content')\r\n @Input() public bgContent = false;\r\n\r\n @Output() public onPrimaryAction: EventEmitter<any> = new EventEmitter();\r\n @Output() public onSecondaryAction: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor(\r\n private dialogService: DialogService\r\n ) { }\r\n\r\n public primaryAction(event: any) {\r\n if (this.onPrimaryAction) {\r\n this.onPrimaryAction.emit(event);\r\n }\r\n }\r\n\r\n public secondaryAction(event: any) {\r\n if (this.onSecondaryAction) {\r\n this.onSecondaryAction.emit(event);\r\n }\r\n }\r\n\r\n public closeDialog() {\r\n this.dialogService.closeLatestDialog(new DialogResult(false));\r\n }\r\n}\r\n","<div ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [displayAsMask]=\"true\"\r\n class=\"flex-grow d-flex\"\r\n [ngClass]=\"{'bg-body': !bgContent, 'bg-content': bgContent}\">\r\n <div id=\"PageViewScrollContainer\"\r\n class=\"d-flex flex-column flex-grow scroll-y\"\r\n [class.is-dialog]=\"isDialog\"\r\n [class.fit-content]=\"fitContent\"\r\n [class.sticky-footer]=\"stickyFooter && !!footerTemplate\"\r\n [class.overlay-visible]=\"status?.status !== 'hasData'\"\r\n [class.footer-visible]=\"!!footerTemplate\"\r\n cdkScrollable>\r\n <section>\r\n <ng-content></ng-content>\r\n </section>\r\n\r\n <footer *ngIf=\"footerTemplate\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </footer>\r\n\r\n <header *ngIf=\"showHeader\">\r\n <ol id=\"breadcrumbs\"\r\n *ngIf=\"breadcrumbs?.length && !isDialog\">\r\n <li *ngFor=\"let crumb of breadcrumbs; last as isLast\">\r\n <a *ngIf=\"crumb.url; else label\"\r\n [routerLink]=\"crumb.url\">\r\n <ng-container *ngTemplateOutlet=\"label\"></ng-container>\r\n </a>\r\n <ng-template #label>{{crumb.label}}</ng-template>\r\n </li>\r\n </ol>\r\n\r\n <div class=\"titlebar\">\r\n <app-page-title *ngIf=\"!customTitleTemplate; else customTitle\"\r\n [title]=\"title\"\r\n [subTitle]=\"subTitle\"\r\n [subTitleUrl]=\"subTitleUrl\"\r\n [titleIcon]=\"titleIcon\"\r\n class=\"title text-truncate\">\r\n </app-page-title>\r\n\r\n <ng-template #customTitle>\r\n <div class=\"title\">\r\n <ng-container *ngTemplateOutlet=\"customTitleTemplate\"></ng-container>\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"actions\">\r\n <ec-button id=\"primaryAction\"\r\n class=\"ml-2\"\r\n *ngIf=\"!hidePrimaryAction && onPrimaryAction.observers?.length && !readonly\"\r\n [disabled]=\"status?.status === 'pending' || disablePrimaryAction\"\r\n type=\"primary\"\r\n [label]=\"primaryActionLabel\"\r\n (clicked)=\"primaryAction($event)\">\r\n </ec-button>\r\n <ec-button id=\"secondaryAction\"\r\n class=\"ml-2\"\r\n *ngIf=\"!hideSecondaryAction && onSecondaryAction.observers?.length\"\r\n type=\"secondary\"\r\n [label]=\"readonly ? 'Close' : secondaryActionLabel\"\r\n (clicked)=\"secondaryAction($event)\">\r\n </ec-button>\r\n <ec-dropdown id=\"moreActions\"\r\n *ngIf=\"moreActions?.length && !readonly\"\r\n [disabled]=\"status?.status === 'pending'\"\r\n class=\"ml-2\"\r\n buttonType=\"text\"\r\n [label]=\"moreActionsLabel\"\r\n [items]=\"moreActions\">\r\n </ec-dropdown>\r\n <ng-container *ngTemplateOutlet=\"customActionsTemplate\"></ng-container>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"customHeaderTemplate\"\r\n class=\"page-header\">\r\n <ng-container *ngTemplateOutlet=\"customHeaderTemplate\"></ng-container>\r\n </div>\r\n\r\n <ec-banner *ngIf=\"!customErrorBannerTemplate && errors; else customErrorBannerOutlet\"\r\n id=\"pageViewErrors\"\r\n [class.border-bottom-0]=\"!isDialog\">\r\n <div [innerHtml]=\"errors\"></div>\r\n </ec-banner>\r\n\r\n <ng-template #customErrorBannerOutlet>\r\n <ec-banner *ngIf=\"errors\"\r\n id=\"pageViewErrors\"\r\n [class.border-bottom-0]=\"!isDialog\">\r\n <ng-container *ngTemplateOutlet=\"customErrorBannerTemplate\"></ng-container>\r\n </ec-banner>\r\n </ng-template>\r\n </header>\r\n </div>\r\n\r\n <ec-button *ngIf=\"isDialog && ( (status?.status === 'pending' && !hideCloseOnPending) || status?.status === 'error')\"\r\n id=\"pageViewDialogClose\"\r\n type=\"icon\"\r\n icon=\"icon-cancel\"\r\n (clicked)=\"closeDialog()\">\r\n </ec-button>\r\n</div>","import { Type } from '@angular/core';\r\n\r\nexport class SpyFactory {\r\n /**\r\n * Create a jasmine Spy Object with spies for the methods of the given type.\r\n *\r\n * @param {Type<T>} type Type you want as a mock object, full of spies\r\n * @returns {jasmine.SpyObj<T>} Spy object, full of spies, with type definitions\r\n */\r\n public static createSpy<T>(type: Type<T>): jasmine.SpyObj<T> {\r\n const methodNames = Object.getOwnPropertyNames(type.prototype);\r\n const spyObj = jasmine.createSpyObj(methodNames) as jasmine.SpyObj<T>;\r\n return spyObj;\r\n }\r\n\r\n /**\r\n * Create a jasmine Spy Object with spies for the type's properties and methods.\r\n * \r\n * @param {Type<T>} type Type you want as a mock object\r\n * @returns {jasmine.SpyObj<T>} Spy object with method and property spies\r\n */\r\n public static createSpyWithProperties<T extends object>(type: Type<T>): jasmine.SpyObj<T> {\r\n const methodNames = Object.getOwnPropertyNames(type.prototype);\r\n // Passing in \"new type()\" as the second param here creates spies for the properties\r\n // on the provided type that return the default values for each property. To access the spies\r\n // to modify return values for these properties, use getPropertySpy()\r\n const spyObj = jasmine.createSpyObj(methodNames, new type()) as jasmine.SpyObj<T>;\r\n return spyObj;\r\n }\r\n\r\n /**\r\n * Returns the jasmine spy for the given property on the spy object.\r\n * NOTE: This will only work for properties on spy objects created using createSpyWithProperties() as\r\n * createSpy() only creates spies for the type's methods\r\n * \r\n * @param {jasmine.SpyObj<T>} spyObj\r\n * @param {K extends keyof T} property \r\n * @returns \r\n */\r\n public static getPropertySpy<T, K extends keyof T>(spyObj: jasmine.SpyObj<T>, property: K): jasmine.Spy<() => T[K]> {\r\n return Object.getOwnPropertyDescriptor(spyObj, property)?.get as jasmine.Spy<() => T[K]>;\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { ActivatedRoute, ActivatedRouteSnapshot, convertToParamMap, NavigationEnd, NavigationStart, ParamMap, Params, Router, UrlSegment } from \"@angular/router\";\r\nimport { filter } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RouterHelper {\r\n /**\r\n * Traverses the pathFromRoot and combines all of the route parameters into\r\n * one Params object and returns it\r\n * @param route - ActivatedRouteSnapshot\r\n * @see https://angular.io/api/router/ActivatedRouteSnapshot#pathFromRoot\r\n */\r\n public getFullRouteParams(route: ActivatedRouteSnapshot): Params {\r\n const params: Params = {};\r\n route.pathFromRoot.forEach(snapshot => {\r\n snapshot.paramMap.keys.forEach(key => {\r\n params[key] = snapshot.paramMap.get(key);\r\n });\r\n });\r\n return params;\r\n }\r\n\r\n /**\r\n * Traverses the pathFromRoot and combines all of the route paramters into\r\n * one ParamMap and returns it\r\n * @param route - ActivatedRouteSnapshot\r\n * @see https://angular.io/api/router/ActivatedRouteSnapshot#pathFromRoot\r\n */\r\n public getFullRouteParamMap(route: ActivatedRouteSnapshot): ParamMap {\r\n const params = this.getFullRouteParams(route);\r\n return convertToParamMap(params);\r\n }\r\n \r\n /**\r\n * Traverses the pathFromRoot and combines all of the route paths into\r\n * a url from root to the provided activated route.\r\n * @param route - ActivatedRouteSnapshot\r\n * @see https://angular.io/api/router/ActivatedRouteSnapshot#pathFromRoot\r\n */\r\n public serializeUrlFromRoot(route: ActivatedRouteSnapshot): string {\r\n let url:string = '';\r\n const paths: string[] = [];\r\n route.pathFromRoot.forEach(r => {\r\n r.url.forEach(s => {\r\n paths.push(s.path);\r\n });\r\n });\r\n url = paths.join('/');\r\n return url;\r\n }\r\n\r\n /**\r\n * Look at the first two child activated routes of a page route and combine the \r\n * url segments of each. These will contain the paths for the current view that\r\n * correspond to a primary and secondary tab. Assumes the URL structure is \r\n * /{page}/{primary}/{secondary}\r\n * @param pageRoute - The ActivatedRoute for the 'page' portion of the url. E.g. meter/:meterId\r\n */\r\n public getViewUrlSegments(pageRoute: ActivatedRoute): UrlSegment[] {\r\n let segments: UrlSegment[] = [];\r\n\r\n const primaryViewRoute: ActivatedRoute | null = pageRoute.firstChild;\r\n if (primaryViewRoute) {\r\n segments = segments.concat(primaryViewRoute.snapshot.url);\r\n const secondaryViewRoute: ActivatedRoute | null = primaryViewRoute.firstChild;\r\n if (secondaryViewRoute) {\r\n segments = segments.concat(secondaryViewRoute.snapshot.url);\r\n }\r\n }\r\n\r\n return segments;\r\n }\r\n\r\n /**\r\n * Returns the 'last firstChild' of the provided route tree\r\n * @param route - ActivatedRoute\r\n */\r\n public getLastRouteDescendant(route: ActivatedRoute): ActivatedRoute {\r\n while (route.firstChild) {\r\n route = route.firstChild;\r\n }\r\n return route;\r\n }\r\n\r\n /**\r\n * Wrap code that will force the user to navigate based on some network call in a piece of logic that will cancel the action if there is another\r\n * navigation event while we wait for the call to complete. This is a common problem with trying to pick a default child when a user switches between modules.\r\n * @param asyncCall The async code to execute while watching for router navigation events. This code always executed and the result is returned\r\n * @param doIfNoNavigation The code to execute only if no navigation events happen while asyncCall is executing. It is passed the result of the async call\r\n * @param router The router instance to listen for navigation events.\r\n */\r\n public async executeWithNavigationWatcher<T>(asyncCall: () => Promise<T>, doIfNoNavigation: (result: T) => Promise<void>, router: Router): Promise<T> {\r\n let eventOccurred: boolean = false;\r\n let subscription = router.events.pipe(\r\n filter(e => e instanceof NavigationStart || e instanceof NavigationEnd)\r\n ).subscribe(() => {\r\n eventOccurred = true;\r\n });\r\n\r\n try {\r\n let result = await asyncCall();\r\n if (!eventOccurred) {\r\n await doIfNoNavigation(result);\r\n }\r\n subscription.unsubscribe();\r\n return result;\r\n \r\n } catch (error) {\r\n subscription.unsubscribe();\r\n throw error;\r\n }\r\n }\r\n}\r\n","/**\r\n * @fileoverview\r\n * Test mocks that can be used by consumers of this library.\r\n * If you do not want to export a mock, add it to `common-mocks.spec.ts` instead.\r\n */\r\n\r\nimport { ComponentRef, EventEmitter, Input, Output, Pipe, PipeTransform, Type, Directive, Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { DialogResult, DialogOptions } from '../../display/dialog/dialog-types';\r\nimport { DialogContent } from '../../display/dialog/dialog-content';\r\nimport { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';\r\nimport { SpyFactory } from './spy-factory.spec';\r\nimport {} from 'jasmine';\r\nimport { RouterHelper } from '../../core/router-helper.service';\r\n/**\r\n * Mock dialog based on the content type, used to test open and close functionality\r\n * @deprecated Most components that need a dialog should use `dialogService.openDialog()`, which is much easier to test\r\n * and does not require the use of this class. It is included for legacy test support only.\r\n */\r\n@Directive()\r\nexport class MockDialog<T> {\r\n @Input() public size?: number | 'xsmall' | 'small' | 'medium' | 'large';\r\n @Output() public opened: EventEmitter<any> = new EventEmitter<any>();\r\n @Output() public closed: EventEmitter<any> = new EventEmitter<any>();\r\n public displayAsPanel: boolean = false;\r\n\r\n public componentRef!: ComponentRef<any>;\r\n public lastContext?: T;\r\n public async open(component: Type<DialogContent<T>>, context?: T, options?: DialogOptions): Promise<void> {\r\n this.lastContext = context;\r\n this.componentRef = <ComponentRef<any>>{\r\n instance: new MockDialogContent<T>()\r\n };\r\n\r\n this.opened.emit();\r\n }\r\n\r\n public close(result?: DialogResult<T>): void {\r\n this.closed.emit(result);\r\n }\r\n};\r\n\r\n/**\r\n * Mocked dialog content to test save and cancel\r\n */\r\nexport class MockDialogContent<T> implements DialogContent<T> {\r\n public dialogId: string = 'MockID';\r\n public openArg: T | undefined;\r\n public onOpen: (openContext?: T | undefined) => void = (openContext) => { this.openArg = openContext; }\r\n public onDialogSave: EventEmitter<T> = new EventEmitter<T>();\r\n public onDialogCancel: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public destroyed: Subject<any> = new Subject<any>();\r\n};\r\n\r\n/**\r\n * Mocked DateDisplayPipe\r\n */\r\n@Pipe({ name: 'dateDisplay' })\r\nexport class MockDateDisplayPipe implements PipeTransform {\r\n transform(value?: Date | string | null): string {\r\n return '01/01/2017';\r\n }\r\n}\r\n\r\n/** Return a Router spy object that can be used as a mock in tests.*/\r\nexport function mockRouterFactory(): jasmine.SpyObj<Router> {\r\n const mockRouter = SpyFactory.createSpy(Router);\r\n mockRouter.isActive.and.returnValue(false);\r\n mockRouter.navigate.and.returnValue(Promise.resolve(true));\r\n Object.defineProperty(mockRouter, 'events', { value: new Subject<Event>(), configurable: true });\r\n Object.defineProperty(mockRouter, 'url', { value: '/current/route/url', writable: true });\r\n\r\n return mockRouter;\r\n}\r\n\r\n/**\r\n * Mock {@link ActivatedRoute} for spying on route and query parameters\r\n *\r\n * @example <caption>Declare!</caption>\r\n * let mockActivatedRoute: MockActivatedRoute = new MockActivatedRoute();\r\n * let paramMapSpy: jasmine.Spy;\r\n * let queryParamMapSpy: jasmine.Spy;\r\n * @example <caption>Provide!</caption>\r\n * providers: [\r\n * ...\r\n * { provide: ActivatedRoute, useValue: mockActivatedRoute },\r\n * ...\r\n * ]\r\n * @example <caption>Spy!</caption>\r\n * paramMapSpy = spyOn(mockActivatedRoute.snapshot.paramMap, 'get');\r\n * queryParamMapSpy = spyOn(mockActivatedRoute.snapshot.queryParamMap, 'get');\r\n * @example <caption>Manipulate!</caption>\r\n * paramMapSpy.and.returnValue(\"1234\");\r\n * queryParamMapSpy.and.returnValue(\"4321\");\r\n */\r\n@Injectable()\r\nexport class MockActivatedRoute {\r\n snapshot = {\r\n paramMap: {\r\n get: function (name: string): string | null {\r\n return null;\r\n }\r\n },\r\n queryParamMap: {\r\n get: function (name: string): string | null {\r\n return null;\r\n },\r\n\r\n getAll: function (name: string): string[] {\r\n return [];\r\n },\r\n\r\n has: function (name: string): boolean {\r\n return false;\r\n }\r\n },\r\n routeConfig: {},\r\n };\r\n paramMap = new Subject();\r\n queryParamMap = new Subject();\r\n routeConfig = {}\r\n}\r\n\r\n/** Return a @see RouterHelper spy object that can be used as a mock in tests */\r\nexport function mockRouterHelperFactory(): jasmine.SpyObj<RouterHelper> {\r\n const mockRouterHelper = SpyFactory.createSpy(RouterHelper);\r\n mockRouterHelper.getFullRouteParamMap.and.callFake((route: ActivatedRouteSnapshot) => route.paramMap);\r\n mockRouterHelper.getFullRouteParams.and.callFake((route: ActivatedRouteSnapshot) => route.params);\r\n mockRouterHelper.serializeUrlFromRoot.and.returnValue('serialized/url/from/root');\r\n mockRouterHelper.getLastRouteDescendant.and.callFake((route: ActivatedRoute) => route);\r\n mockRouterHelper.executeWithNavigationWatcher.and.callFake(async (asyncFunc: () => Promise<any>, doFunc: (result: any) => Promise<void>, router: any) => {\r\n const result = await asyncFunc();\r\n await doFunc(result);\r\n return result;\r\n });\r\n mockRouterHelper.getViewUrlSegments.and.returnValue([]);\r\n return mockRouterHelper;\r\n }\r\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { DisplayStatus } from '../../display';\r\n\r\n@Component({\r\n selector: 'ec-wizard-buttons',\r\n templateUrl: './wizard-buttons.component.html',\r\n styleUrls: ['./wizard-buttons.component.scss']\r\n})\r\nexport class WizardButtonsComponent {\r\n\r\n @Input() public nextLabel?: string = 'Next_TC';\r\n @Input() public backLabel?: string = 'Back_TC';\r\n @Input() public cancelLabel?: string = 'Cancel';\r\n @Input() public saveLabel?: string = 'Save';\r\n\r\n @Input() public cancelId?: string = 'cancelWizardDialog';\r\n @Input() public saveId?: string = 'saveWizardDialog';\r\n\r\n @Input() public tabindex: number = 0;\r\n\r\n @Input() public status?: DisplayStatus;\r\n\r\n @Input() public showBack?: boolean;\r\n @Input() public showSave?: boolean;\r\n @Input() public hideNextSaveButton?: boolean;\r\n\r\n @Output() public cancel: EventEmitter<any> = new EventEmitter();\r\n @Output() public save: EventEmitter<any> = new EventEmitter();\r\n @Output() public nextTab: EventEmitter<any> = new EventEmitter();\r\n @Output() public previousTab: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n public onCancel() {\r\n this.cancel.emit();\r\n }\r\n\r\n public onSave(event: any) {\r\n this.save.emit(event);\r\n }\r\n\r\n public onPreviousTab() {\r\n this.previousTab.emit();\r\n }\r\n\r\n public onNextTab() {\r\n this.nextTab.emit();\r\n }\r\n}\r\n","<ec-button id=\"{{saveId}}\"\r\n class=\"ml-2\"\r\n *ngIf=\"!hideNextSaveButton\"\r\n type=\"primary\"\r\n [label]=\"(!showSave ? nextLabel : saveLabel)\"\r\n [tabindex]=\"!tabindex ? 0 : tabindex\"\r\n (clicked)=\"!showSave ? onNextTab() : onSave($event)\"\r\n [disabled]=\"status?.status === 'pending' || status?.status === 'error'\">\r\n</ec-button>\r\n<ec-button id=\"previousTab\"\r\n class=\"ml-2\"\r\n *ngIf=\"showBack\"\r\n type=\"secondary\"\r\n [label]=\"backLabel\"\r\n [tabindex]=\"!tabindex ? 0 : tabindex+1\"\r\n (clicked)=\"onPreviousTab()\">\r\n</ec-button>\r\n<ec-button id=\"{{cancelId}}\"\r\n type=\"secondary\"\r\n [label]=\"cancelLabel\"\r\n [tabindex]=\"!tabindex ? 0 : tabindex+2\"\r\n (clicked)=\"onCancel()\">\r\n</ec-button>\r\n","import { Component, Input } from '@angular/core';\r\nimport { NavGroup } from '../../../controls/navigation/nav-group';\r\nimport { WizardTab } from '../wizard-base/wizard-base.component';\r\n\r\n@Component({\r\n selector: 'ec-wizard-progress',\r\n templateUrl: './wizard-progress.component.html',\r\n styleUrls: ['./wizard-progress.component.scss']\r\n})\r\nexport class WizardProgressComponent {\r\n\r\n @Input() public tabGroup?: NavGroup;\r\n @Input() public currentTab?: WizardTab;\r\n\r\n constructor() { }\r\n}\r\n","<div *ngFor=\"let tab of tabGroup?.items; index as index; first as isFirst; last as isLast\"\r\n class=\"progress-tab\"\r\n [class.ml-2]=\"!isFirst\"\r\n [class.is-active]=\"currentTab?.id === tab.id\">\r\n\r\n <i *ngIf=\"tab.completed\"\r\n class=\"ec-icon icon-check-circle mr-1 font-color-success\"></i>\r\n <span *ngIf=\"!tab.completed\">{{index+1}}.&nbsp;</span>\r\n <span>{{tab.label | translate}}</span>\r\n <i *ngIf=\"!isLast\"\r\n class=\"ec-icon icon-angle-down rotate-270 ml-2\"></i>\r\n</div>","import { A11yModule } from '@angular/cdk/a11y';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { ScrollingModule } from '@angular/cdk/scrolling';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { BannerComponent } from './controls/banner/banner.component';\r\nimport { ButtonComponent } from './controls/button/button.component';\r\nimport { CopyButtonDirective } from './controls/button/copy-button.directive';\r\nimport { CopyTableButtonDirective } from './controls/button/copy-table-button.directive';\r\nimport { CalendarItemComponent } from './controls/calendar/calendar-item.component';\r\nimport { CalendarComponent } from './controls/calendar/calendar.component';\r\nimport { CheckboxComponent } from './controls/checkbox/checkbox.component';\r\nimport { CollapsibleToggleComponent } from './controls/collapsible-toggle/collapsible-toggle.component';\r\nimport { ComboboxComponent } from './controls/combobox/combobox.component';\r\nimport { DateInputComponent } from './controls/date-input/date-input.component';\r\nimport { DropdownComponent } from './controls/dropdown/dropdown.component';\r\nimport { FileUploadComponent } from './controls/file-upload/file-upload.component';\r\nimport { FormControlLabelComponent } from './controls/form-control-label/form-control-label.component';\r\nimport { FormControlComponent } from './controls/form-control/form-control.component';\r\nimport { FormGroupComponent } from './controls/form-group/form-group.component';\r\nimport { HelpPopoverComponent } from './controls/help-popover/help-popover.component';\r\nimport { ItemPickerComponent } from './controls/item-picker/item-picker.component';\r\nimport { LinkButtonComponent } from './controls/link-button/link-button.component';\r\nimport { MenuComponent } from './controls/menu/menu.component';\r\nimport { NavItemActiveDirective } from './controls/navigation/nav-item-active.directive';\r\nimport { NumericboxComponent } from './controls/numericbox/numericbox.component';\r\nimport { PopoverComponent } from './controls/popover/popover.component';\r\nimport { RadioButtonComponent } from './controls/radio-button/radio-button.component';\r\nimport { SelectComponent } from './controls/select/select.component';\r\nimport { TabsComponent } from './controls/tabs/tabs.component';\r\nimport { TextboxComponent } from './controls/textbox/textbox.component';\r\nimport { AppBarComponent } from './display/app-bar/app-bar.component';\r\nimport { AvatarComponent } from './display/avatar/avatar.component';\r\nimport { ConfirmComponent } from './display/confirm/confirm.component';\r\nimport { DialogGroupComponent } from './display/dialog/dialog-group/dialog-group.component';\r\nimport { DialogComponent } from './display/dialog/dialog.component';\r\nimport { DialogService } from './display/dialog/dialog.service';\r\nimport { HierarchyTreeComponent } from './display/hierarchy/hierarchy-tree/hierarchy-tree.component';\r\nimport { ItemDisplayComponent } from './display/item-display/item-display.component';\r\nimport { JsonDisplayComponent } from './display/json-display/json-display.component';\r\nimport { ResizableComponent } from './display/resizable/resizable.component';\r\nimport { SpinnerComponent } from './display/spinner/spinner.component';\r\nimport { SplashComponent } from './display/splash/splash.component';\r\nimport { ResizableColumnComponent } from './display/table/resizable-column.component';\r\nimport { ResizableTableDirective } from './display/table/resizable-table.directive';\r\nimport { SearchableTableComponent } from './display/table/searchable-table.component';\r\nimport { TableDetailRowComponent } from './display/table/table-detail-row.component';\r\nimport { TableLockedColumnComponent } from './display/table/table-locked-column.component';\r\nimport { TableMasterHeaderRowComponent } from './display/table/table-master-header-row.component';\r\nimport { TableMasterRowComponent } from './display/table/table-master-row.component';\r\nimport { TablePaginationComponent } from './display/table/table-pagination.component';\r\nimport { TableSelectableRowComponent } from './display/table/table-selectable-row.component';\r\nimport { TableComponent } from './display/table/table.component';\r\nimport { TagsComponent } from './display/tags/tags.component';\r\nimport { ToastComponent } from './display/toast/toast/toast.component';\r\nimport { ToasterComponent } from './display/toast/toaster/toaster.component';\r\nimport { TooltipDirective } from './display/tooltip-directive/tooltip.directive';\r\nimport { TooltipComponent } from './display/tooltip/tooltip.component';\r\nimport { TourComponent } from './display/tour/tour.component';\r\nimport { TreeComponent } from './display/tree/tree.component';\r\nimport { ViewOverlayComponent } from './display/view-overlay/view-overlay.component';\r\nimport { ClickAreaForDirective } from './shared/directives/click-area-for/click-area-for.directive';\r\nimport { IfViewportWidthDirective } from './shared/directives/if-viewport-width/if-viewport-width.directive';\r\nimport { KeyboardNavContainerDirective } from './shared/directives/keyboard-nav-container/keyboard-nav-container.directive';\r\nimport { PopupContainerDirective } from './shared/directives/popup/popup-container.directive';\r\nimport { DateDisplayPipe } from './shared/display/pipes/date-display.pipe';\r\nimport { HighlightTextPipe } from './shared/display/pipes/highlight-text.pipe';\r\nimport { RelativeDatePipe } from './shared/display/pipes/relative-date.pipe';\r\nimport { RowCountPipe } from './shared/display/pipes/row-count.pipe';\r\nimport { TimeDisplayPipe } from './shared/display/pipes/time-display.pipe';\r\nimport { FormGroupHelper } from './shared/form-group.helper';\r\nimport { PageTitleComponent } from './shared/page/page-title/page-title.component';\r\nimport { PageViewComponent } from './shared/page/page-view/page-view.component';\r\nimport { MockDateDisplayPipe } from './shared/testing/public-mocks.spec';\r\nimport { WizardButtonsComponent } from './shared/wizard/wizard-buttons/wizard-buttons.component';\r\nimport { WizardProgressComponent } from './shared/wizard/wizard-progress/wizard-progress.component';\r\n\r\nexport type ComponentsModuleConfig = {\r\n tracker: Provider\r\n};\r\n\r\n@NgModule({\r\n declarations: [\r\n ButtonComponent,\r\n TabsComponent,\r\n TextboxComponent,\r\n NavItemActiveDirective,\r\n SpinnerComponent,\r\n ViewOverlayComponent,\r\n BannerComponent,\r\n ResizableTableDirective,\r\n TabsComponent,\r\n TableComponent,\r\n SearchableTableComponent,\r\n ComboboxComponent,\r\n MenuComponent,\r\n PopupContainerDirective,\r\n DropdownComponent,\r\n ConfirmComponent,\r\n DialogComponent,\r\n DateDisplayPipe,\r\n TimeDisplayPipe,\r\n MockDateDisplayPipe,\r\n RadioButtonComponent,\r\n CheckboxComponent,\r\n NumericboxComponent,\r\n AvatarComponent,\r\n AppBarComponent,\r\n SplashComponent,\r\n IfViewportWidthDirective,\r\n ClickAreaForDirective,\r\n CollapsibleToggleComponent,\r\n TableMasterRowComponent,\r\n TableMasterHeaderRowComponent,\r\n TableDetailRowComponent,\r\n TableLockedColumnComponent,\r\n TableSelectableRowComponent,\r\n PopoverComponent,\r\n TablePaginationComponent,\r\n RowCountPipe,\r\n CopyButtonDirective,\r\n TablePaginationComponent,\r\n TagsComponent,\r\n FormControlComponent,\r\n SelectComponent,\r\n ItemDisplayComponent,\r\n TableSelectableRowComponent,\r\n ResizableColumnComponent,\r\n DialogGroupComponent,\r\n FileUploadComponent,\r\n FormGroupComponent,\r\n JsonDisplayComponent,\r\n ToastComponent,\r\n ToasterComponent,\r\n PageViewComponent,\r\n PageTitleComponent,\r\n WizardProgressComponent,\r\n WizardButtonsComponent,\r\n HierarchyTreeComponent,\r\n TreeComponent,\r\n RelativeDatePipe,\r\n ResizableComponent,\r\n HighlightTextPipe,\r\n FormControlLabelComponent,\r\n ItemPickerComponent,\r\n HelpPopoverComponent,\r\n LinkButtonComponent,\r\n TooltipComponent,\r\n TourComponent,\r\n CopyTableButtonDirective,\r\n TooltipDirective,\r\n CalendarComponent,\r\n CalendarItemComponent,\r\n DateInputComponent,\r\n KeyboardNavContainerDirective\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n\t\tReactiveFormsModule,\r\n RouterModule,\r\n TranslateModule,\r\n A11yModule,\r\n OverlayModule,\r\n ScrollingModule\r\n ],\r\n providers: [\r\n FormGroupHelper,\r\n DialogService,\r\n DateDisplayPipe,\r\n TimeDisplayPipe,\r\n MockDateDisplayPipe,\r\n RowCountPipe,\r\n RelativeDatePipe,\r\n HighlightTextPipe\r\n ],\r\n exports: [\r\n ButtonComponent,\r\n TabsComponent,\r\n TextboxComponent,\r\n NavItemActiveDirective,\r\n SpinnerComponent,\r\n ViewOverlayComponent,\r\n BannerComponent,\r\n TabsComponent,\r\n TableComponent,\r\n SearchableTableComponent,\r\n ComboboxComponent,\r\n MenuComponent,\r\n PopupContainerDirective,\r\n DropdownComponent,\r\n ConfirmComponent,\r\n DialogComponent,\r\n DateDisplayPipe,\r\n TimeDisplayPipe,\r\n RadioButtonComponent,\r\n CheckboxComponent,\r\n NumericboxComponent,\r\n AvatarComponent,\r\n AppBarComponent,\r\n SplashComponent,\r\n IfViewportWidthDirective,\r\n ClickAreaForDirective,\r\n CollapsibleToggleComponent,\r\n TableMasterRowComponent,\r\n TableMasterHeaderRowComponent,\r\n TableLockedColumnComponent,\r\n TableSelectableRowComponent,\r\n PopoverComponent,\r\n CopyButtonDirective,\r\n TablePaginationComponent,\r\n TagsComponent,\r\n FormControlComponent,\r\n SelectComponent,\r\n ItemDisplayComponent,\r\n ResizableColumnComponent,\r\n DialogGroupComponent,\r\n FileUploadComponent,\r\n FormGroupComponent,\r\n JsonDisplayComponent,\r\n ToastComponent,\r\n ToasterComponent,\r\n PageViewComponent,\r\n PageTitleComponent,\r\n WizardProgressComponent,\r\n WizardButtonsComponent,\r\n HierarchyTreeComponent,\r\n TreeComponent,\r\n RelativeDatePipe,\r\n ResizableComponent,\r\n HighlightTextPipe,\r\n FormControlLabelComponent,\r\n ItemPickerComponent,\r\n HelpPopoverComponent,\r\n LinkButtonComponent,\r\n TooltipComponent,\r\n TourComponent,\r\n CopyTableButtonDirective,\r\n TooltipDirective,\r\n CalendarComponent,\r\n DateInputComponent,\r\n KeyboardNavContainerDirective\r\n ]\r\n})\r\nexport class ComponentsModule {\r\n /**\r\n * Providing services through the forRoot pattern here ensures that the components module and the importing\r\n * module use the same singleton service instance.\r\n * For more info: https://angular.io/guide/singleton-services#the-forroot-pattern\r\n */\r\n public static forRoot(config: ComponentsModuleConfig): ModuleWithProviders<ComponentsModule>{\r\n return {\r\n ngModule: ComponentsModule,\r\n providers: [\r\n config.tracker\r\n ]\r\n }\r\n }\r\n}\r\n","export class RadioButtonOption<T = any> {\r\n /**\r\n * The text to display as the radio button label, this can also include html formatting such\r\n * as bold and italics to emphasize words in the string\r\n */\r\n label?: string;\r\n /**\r\n * The value of the a selected radio button model\r\n */\r\n value?: T;\r\n /**\r\n * The icon to display with the radio button option\r\n */\r\n icon?: string;\r\n /**\r\n * The tooltip text to show when hovering over an option\r\n */\r\n tooltip?: string;\r\n}","import { AbstractControl, ValidatorFn, Validators } from '@angular/forms';\r\n\r\nimport { JsonHelper } from '../shared/json-helper';\r\nimport { domainPattern } from './validation-patterns';\r\n\r\nexport class CustomValidators {\r\n /**\r\n * Tests the control using Angular's required validator, except returns\r\n * an error map that triggers the plural 'are required' validation message\r\n * instead of 'is required'\r\n *\r\n * @returns An error map with the `requiredPlural` property\r\n * if the validation check fails, otherwise `null`.\r\n */\r\n public static requiredPlural: ValidatorFn = (control: AbstractControl) => {\r\n return Validators.required(control) !== null ? { requiredPlural: true } : null;\r\n }\r\n\r\n /**\r\n * Returns a validation error if the control's value is not valid JSON.\r\n */\r\n public static json: ValidatorFn = (control: AbstractControl) => {\r\n return (control.value && JsonHelper.tryParseJSON(control.value) === undefined) ? { json: true } : null;\r\n }\r\n\r\n /**\r\n * Returns a validation error if the control's value is not a valid domain.\r\n */\r\n public static domain: ValidatorFn = (control: AbstractControl) => {\r\n return (control.value && domainPattern.test(control.value) === false) ? { domain: true } : null;\r\n }\r\n}","import { HierarchyItem } from './hierarchy-base';\r\n\r\nexport namespace HierarchyMocks {\r\n export const mockRoot = () => <HierarchyItem>{\r\n id: \"1\",\r\n level: 0,\r\n hasChildren: true,\r\n children: [],\r\n label: ''\r\n };\r\n\r\n export const bldgWithChildren = () => { return {\r\n placeId: 3, parentId: 0, placeTypeId: 2, placeCode: 'HASCHILDREN_BLDG', placeInfo: 'A Cool Bldg Has Children',\r\n hasChildren: true, placeChildren: [], meterChildren: [], hasActiveChildren: true\r\n }};\r\n\r\n export const bldgWithChildrenHierarchyItem = () => <HierarchyItem>{\r\n id: bldgWithChildren().placeId!.toString(), icon: 'icon-building', label: `${bldgWithChildren().placeInfo} [${bldgWithChildren().placeCode}]`,\r\n children: [], hasChildren: true, level: 1, selectable: true, topLevel: false\r\n };\r\n\r\n export const orgWithChildren = () => { return {\r\n placeId: 1, parentId: 0, placeTypeId: 1, placeCode: 'HASCHILDREN_ORG', placeInfo: 'A Org Has Children',\r\n hasChildren: true, placeChildren: [], meterChildren: [], hasActiveChildren: true\r\n }};\r\n\r\n export const orgWithChildrenHierarchyItem = () => <HierarchyItem>{\r\n id: orgWithChildren().placeId!.toString(), icon: 'icon-organization', label: `${orgWithChildren().placeInfo} [${orgWithChildren().placeCode}]`,\r\n children: [], hasChildren: true, level: 1, selectable: true, topLevel: true\r\n };\r\n\r\n export const orgWithoutChildren = () => { return {\r\n placeId: 2, parentId: 0, placeTypeId: 1, placeCode: 'NOCHILDREN_ORG', placeInfo: 'No Children Org',\r\n hasChildren: false, placeChildren: [], meterChildren: [], hasActiveChildren: false\r\n }};\r\n\r\n export const orgWithoutChildrenHierarchyItem = () => <HierarchyItem>{\r\n id: orgWithoutChildren().placeId!.toString(), icon: 'icon-organization', label: `${orgWithoutChildren().placeInfo} [${orgWithoutChildren().placeCode}]`,\r\n children: [], hasChildren: false, level: 1, selectable: true, topLevel: true\r\n };\r\n\r\n export const bldgWithoutChildren = () => { return {\r\n placeId: 4, parentId: 0, placeTypeId: 2, placeCode: 'NOCHILDREN_BLDG', placeInfo: 'Zzz No Children Bldg',\r\n hasChildren: false, placeChildren: [], meterChildren: [], hasActiveChildren: false\r\n }};\r\n\r\n export const bldgWithoutChildrenHierarchyItem = () => <HierarchyItem>{\r\n id: bldgWithoutChildren().placeId!.toString(), icon: 'icon-building', label: `${bldgWithoutChildren().placeInfo} [${bldgWithoutChildren().placeCode}]`,\r\n children: [], hasChildren: false, level: 1, selectable: true, topLevel: false\r\n };\r\n\r\n export const sortedHierarchyPlaces = () => <Array<HierarchyItem>>[\r\n bldgWithChildrenHierarchyItem(), orgWithChildrenHierarchyItem(), orgWithoutChildrenHierarchyItem(), bldgWithoutChildrenHierarchyItem()\r\n ];\r\n}\r\n","/** Tag type used to style the tag */\r\nexport type TagType = \"info\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"chargeback\" | \"accrual\" | \"inverted\" | \"system\";\r\n\r\n/** Link target options, shared amongst tag, menu and item display */\r\nexport type LinkTarget = '_self' | '_blank' | '_parent' | '_top';\r\n\r\n/** Tag contains a label and type. Type is default by default */\r\nexport class Tag {\r\n public label: string;\r\n\r\n public type: TagType;\r\n\r\n public icon?: string;\r\n\r\n public isDismissable?: boolean;\r\n\r\n /** CSS classes to apply to tag for custom styling */\r\n public classList?: string;\r\n\r\n public tooltip?: string;\r\n\r\n /** When set a hyperlink will be shown linking to the value set */\r\n public url?: string;\r\n\r\n public target?: LinkTarget = '_self';\r\n\r\n constructor(label: string, type?: TagType, classList?: string, icon?: string, isDismissable?: boolean, tooltip?: string, url?: string, target?: LinkTarget ) {\r\n this.label = label;\r\n this.type = type || 'info';\r\n this.icon = icon;\r\n this.isDismissable = isDismissable ?? false;\r\n this.tooltip = tooltip;\r\n this.url = url;\r\n this.target = target || '_self';\r\n\r\n if (classList) {\r\n this.classList = classList;\r\n }\r\n }\r\n};","import { TemplateRef } from '@angular/core';\r\nimport { NavItem } from '../controls/navigation/nav-item';\r\n\r\n\r\n/**\r\n * The status of any component that displays content\r\n */\r\nexport type ViewStatus = 'pending' | 'hasData' | 'noData' | 'error';\r\n\r\n/** Common unicode strings */\r\nexport class UnicodeStrings {\r\n\r\n /** Equivalent of &ndash; */\r\n public static ndash: string = '\\u2013';\r\n}\r\n\r\n\r\n/**\r\n * The Display interface defines common properties for any component that would\r\n * display content\r\n */\r\nexport interface DisplayStatus {\r\n\r\n /**\r\n * The status of the display\r\n */\r\n status: ViewStatus;\r\n\r\n\r\n /**\r\n * An optional message to display when status is not 'hasData'\r\n */\r\n message?: string;\r\n\r\n\r\n /**\r\n * The properties of an action button that can be shown when status is not 'hasData'\r\n * @deprecated Deprecated due to noDataTemplate being prefered\r\n */\r\n action?: NavItem;\r\n\r\n /**\r\n * Template to show when the status is noData\r\n */\r\n noDataTemplate?: TemplateRef<any>;\r\n\r\n /**\r\n * Mask (not remove) the transcluded content from the dom while not hasData status.\r\n */\r\n displayAsMask?: boolean;\r\n\r\n /** \r\n * Additional css classes to apply to the .overlay element \r\n */\r\n overlayClassList?: string;\r\n}\r\n","import { get, orderBy, sortBy } from \"lodash\";\r\n\r\n/** A wrapper around the lodash sortBy that supports treating upper case and lower case text as the same. \r\n * If the underlying property value is not a string (or is null or undefined) this function will behave just like lodash's original\r\n * The original array is not modified, and the result is a newly created array to avoid any side effects (just like the lodash implementation)\r\n * String properties are normalized by case for comparisons to prevent sorting AbC as ACb\r\n * @param items - the set of items to sort. Expected to be a set of complex objects to sort by the given properties\r\n * @param properties - a list of values, each of which can be number, date, string, etc property types. \r\n * Can be the name or path to the property to look at, passed to the lodash get function so \"address.line1\" works if item is\r\n * a meter object like {meterName: 'name', addres: { line1: '100 Factory Street' } }\r\n * @see https://lodash.com/docs/4.17.10#get\r\n*/\r\nexport function sortByIgnoreCase<T>(items: T[], properties: string[]) : T[] {\r\n let iteratees: ((value: T, index: number, collection: ArrayLike<T>)=> T)[] = [];\r\n\r\n iteratees = properties.map(prop=>{\r\n return (item: T) => safeToLower(item, prop);\r\n });\r\n\r\n return sortBy(items, iteratees);\r\n \r\n}\r\n\r\n/**\r\n * A wrapper around the lodash orderBy that supports treating upper case and lower case text as the same.\r\n * @param items - the set of items to sort. Expected to be a set of complex objects to sort by the given properties\r\n * @param properties - a list of values, each of which can be number, date, string, etc property types. \r\n * @param direction - the direction in which to sort, the pass in an array of directions to match an array of properties\r\n */\r\nexport function orderByIgnoreCase<T>(items: T[], properties: string[], direction?: Array<\"asc\"|\"desc\">): T[] {\r\n let iteratees: ((value: T, index: number, collection: ArrayLike<T>)=> T)[] = [];\r\n\r\n iteratees = properties.map(prop => {\r\n // Treat nulls as empty string to sort them at the bottom when decending, helpful when looking at dates\r\n return (item: T) => safeToLower(item, prop) || '';\r\n });\r\n\r\n return orderBy(items, iteratees, direction);\r\n}\r\n\r\n/**\r\n * Convert the provided item's property to the lowercase version of it if that property\r\n * has a value and the value is a string. Non-string or null/undefined values are kept exactly as they were\r\n * @param item - the object on which the value will be read and interpreted\r\n * @param prop - the name or path to the property to look at, passed to the lodash get function so \"address.line1\" works if item is\r\n * a meter object like {meterName: 'name', address: { line1: '100 Factory Street' } }\r\n * @see https://lodash.com/docs/4.17.10#get\r\n */\r\nfunction safeToLower<T>(item: T, prop: string){\r\n let value = get(item, prop);\r\n if(item && typeof value === 'string'){\r\n return (<string>value).toLowerCase();\r\n } else {\r\n // @ts-ignore\r\n return item[prop];\r\n }\r\n};","import { DisplayStatus } from '../display'\r\n\r\nexport enum PageStatus {\r\n Loading = 'loading',\r\n Loaded = 'loaded',\r\n Saving = 'saving',\r\n NoData = 'noData'\r\n};\r\n\r\nexport class PageStatuses {\r\n public static get loading(): DisplayStatus {\r\n return { status: \"pending\", message: \"Loading\" };\r\n }\r\n\r\n public static get loaded(): DisplayStatus {\r\n return { status: \"hasData\", message: \"\" };\r\n }\r\n\r\n public static get saving(): DisplayStatus {\r\n return { status: \"pending\", message: \"Saving\" };\r\n }\r\n\r\n public static get noData(): DisplayStatus {\r\n return { status: \"noData\", message: \"No data is available\" };\r\n }\r\n}\r\n","import { AfterViewInit, Directive, HostBinding, Injector, OnDestroy, OnInit } from '@angular/core';\r\nimport { UntypedFormGroup } from '@angular/forms';\r\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { lastValueFrom, Observable, ReplaySubject, Subject, Subscription } from 'rxjs';\r\nimport { filter, take, takeUntil } from 'rxjs/operators';\r\nimport { NavItem } from '../../../controls/navigation/nav-item';\r\nimport { ErrorService } from '../../../core/error.service';\r\nimport { RouterHelper } from '../../../core/router-helper.service';\r\nimport { ScrollService } from '../../../core/scroll.service';\r\nimport { DialogService } from '../../../display/dialog/dialog.service';\r\nimport { Help } from '../../../display/help/help-types';\r\nimport { SplashService } from '../../../display/splash/splash.service';\r\nimport { Overlay } from '../../../display/view-overlay/view-overlay.component';\r\nimport { PageStatus, PageStatuses } from '../page-statuses';\r\n\r\nexport class PageInitResult {\r\n title?: string = '';\r\n subTitle?: string = '';\r\n subTitleUrl?: string = '';\r\n breadcrumbs?: NavItem[];\r\n help?: Help;\r\n}\r\n\r\n@Directive()\r\nexport abstract class PageBaseComponent implements OnInit, AfterViewInit, OnDestroy {\r\n /** Default css classes applied to host element */\r\n @HostBinding('class') protected classList = 'd-flex flex-grow';\r\n\r\n /**\r\n * Title for the page displayed in the header\r\n */\r\n public title?: string = '';\r\n\r\n /**\r\n * Sub title for the page displayed in the header\r\n */\r\n public subTitle?: string = '';\r\n\r\n /**\r\n * Sub title url for the page displayed in the header\r\n */\r\n public subTitleUrl?: string = '';\r\n\r\n /**\r\n * Status overlay for the page\r\n */\r\n public status: Overlay = new Overlay('pending', 'Loading');\r\n\r\n /**\r\n * Breadcrumbs displayed in the header\r\n */\r\n public breadcrumbs?: NavItem[];\r\n\r\n /**\r\n * Result returned from the onInit function\r\n */\r\n public initResult!: PageInitResult;\r\n\r\n /**\r\n * Help information for the component, which can only be set through onInit\r\n */\r\n public help: Help | undefined;\r\n\r\n /**\r\n * Form group to be used if needed by the page\r\n */\r\n public formGroup: UntypedFormGroup = new UntypedFormGroup({});\r\n\r\n /**\r\n * Default invalid form message, override if a more specific message is needed\r\n */\r\n public defaultInvalidFormMessage: string = 'PleaseCorrectForm_SC';\r\n\r\n /**\r\n * Default unknown save error message, override if a more specific message is needed\r\n */\r\n public defaultUnknownSaveError: string = 'PageBaseUnknownSaveError_SC';\r\n\r\n /**\r\n * Used to opt out of hiding the splash screen when the page is loaded\r\n */\r\n public skipHideSplashOnComplete: boolean = false;\r\n\r\n /**\r\n * When set to true any navigation end events that are strictly query param changes will\r\n * not call the onNavigationEnd function. This allows pages to change the view with query\r\n * params and not trigger a full refresh.\r\n */\r\n public ignoreQueryParamsOnNavigationChange: boolean = false;\r\n\r\n private previousUrl: string = \"\";\r\n\r\n /**\r\n * Used to unsubscribe from observables\r\n */\r\n public destroyed: Subject<void> = new Subject<void>();\r\n\r\n /**\r\n * Used to know when the page has been loaded, this will be completed\r\n * after onAfterViewInit\r\n */\r\n private _afterViewInitComplete: ReplaySubject<void> = new ReplaySubject();\r\n public afterViewInitComplete: Observable<void> = this._afterViewInitComplete;\r\n\r\n /**\r\n * If defined the form will automatically scroll to the first invalid form control\r\n * if it's outside of the view\r\n */\r\n protected scrollContainerSelector: string | undefined;\r\n\r\n /**\r\n * Subscription to the router events NavigationEnd\r\n * Used to know if already subscribed to\r\n */\r\n private navigationEndSubscription?: Subscription;\r\n\r\n /**\r\n * Common services used by page-base\r\n */\r\n protected errorService: ErrorService;\r\n protected translateService: TranslateService;\r\n protected scrollService: ScrollService;\r\n protected router: Router;\r\n protected activatedRoute: ActivatedRoute;\r\n protected dialogService: DialogService;\r\n protected splashService: SplashService;\r\n protected routerHelper: RouterHelper;\r\n\r\n constructor(injector: Injector) {\r\n this.errorService = injector.get(ErrorService);\r\n this.translateService = injector.get(TranslateService);\r\n this.scrollService = injector.get(ScrollService);\r\n this.router = injector.get(Router);\r\n this.activatedRoute = injector.get(ActivatedRoute);\r\n this.dialogService = injector.get(DialogService);\r\n this.splashService = injector.get(SplashService);\r\n this.routerHelper = injector.get(RouterHelper);\r\n }\r\n\r\n /**\r\n * Errors to be shown for the component.\r\n * Automatically populated on promise rejection from save and shared with the UI.\r\n */\r\n private _errors: string = '';\r\n public get errors(): string {\r\n return this._errors;\r\n }\r\n\r\n /**\r\n * Optional lifecycle hook that is called as part of the Angular ngOnInit lifecycle hook.\r\n * Called before onInit is called for the first time. Add setup logic here that does\r\n * not need to be run on every reload.\r\n */\r\n protected onFirstInit(): void { }\r\n\r\n /**\r\n * This method is called in the derived class as part of the Angular ngOnInit\r\n * lifecycle hook. It must provide a PageInitResult back to the base class to properly\r\n * set up the page.\r\n */\r\n protected abstract onInit(): Promise<PageInitResult>;\r\n protected initPromise!: Promise<PageInitResult>;\r\n\r\n public async ngOnInit() {\r\n try {\r\n this.showStatus(PageStatus.Loading);\r\n this.setUpRouterSubscriptions();\r\n this.onFirstInit();\r\n this.initPromise = this.onInit();\r\n\r\n await this.initPromise;\r\n } catch (error) {\r\n this.splashService.hideSplash();\r\n this.onError(error);\r\n };\r\n }\r\n\r\n /**\r\n * This method is called just after the Angular Lifecycle event ngOnAfterViewInit.\r\n * It fires after all sub-components have gone through their initialization phase.\r\n * It is in this phase that the view components should already exist, so a derived class should\r\n * load data from the API to populate any view components. The promise that\r\n * is returned must not resolve until all required data has completely loaded\r\n */\r\n protected async onAfterViewInit(): Promise<void> { };\r\n public async ngAfterViewInit(): Promise<void> {\r\n try {\r\n const initResult = await this.initPromise;\r\n this.parseInitResult(initResult);\r\n\r\n await this.onAfterViewInit();\r\n\r\n this._afterViewInitComplete.next();\r\n this._afterViewInitComplete.complete();\r\n\r\n await this.onFormLoadComplete();\r\n\r\n if (this.status.status === 'pending') {\r\n this.showStatus(PageStatus.Loaded);\r\n }\r\n\r\n if (!this.skipHideSplashOnComplete) {\r\n this.splashService.hideSplash();\r\n }\r\n\r\n } catch (error) {\r\n this.splashService.hideSplash();\r\n this.onError(error);\r\n }\r\n }\r\n\r\n /**\r\n * A lifecycle method that executes once all data has been loaded\r\n * through ngAfterViewInit and from local storage if required.\r\n * It is at this point that you can subscribe to changes on the form\r\n * reliably\r\n *\r\n * @protected\r\n * @memberof PageBaseComponent\r\n */\r\n protected async onFormLoadComplete(): Promise<any> { }\r\n\r\n /**\r\n * A lifecycle hook that is called after every NavigationEnd event.\r\n */\r\n protected onNavigationEnd(): void { }\r\n\r\n /**\r\n * Reload the component kicking off the ngOnInit and ngAfterViewInit lifecycle hooks.\r\n * Any state that needs to be reset should be done so before calling this method.\r\n */\r\n public reload(): void {\r\n this._afterViewInitComplete = new ReplaySubject();\r\n\r\n this.showStatus(PageStatus.Loading);\r\n this.initPromise = this.onInit();\r\n this.ngAfterViewInit();\r\n }\r\n\r\n /**\r\n * When overridden in a derived class this method will sync the form state\r\n * into the object that will be persisted to the API. The value should not\r\n * actually be sent to the API yet.\r\n */\r\n protected async applyModelUpdates(): Promise<void> { };\r\n\r\n /**\r\n * Save the model state to the API and return a promise that\r\n * contains the updated entityID. The promise should be rejected\r\n * if the save fails and errors and the overlay status will be updated\r\n * accordingly\r\n */\r\n protected async saveToApi(): Promise<number | void> { };\r\n\r\n /**\r\n * Called after the save has completed successfully.\r\n * It is the responsibility of the derived class to navigate\r\n * to a properties/status page or emit appropriately if within a dialog\r\n * @param entityId\r\n */\r\n protected onSaveComplete(entityId?: number): void { };\r\n\r\n /**\r\n * Function called when the user clicks save. We will first touch all controls to show validation messages\r\n * if the form is invalid. If the form is valid we will attempt to save and any errors will be reported\r\n * back to the user\r\n * @param event\r\n */\r\n public async onSave(event: Event): Promise<void> {\r\n this.formGroup.markAllAsTouched();\r\n\r\n // If the form has pending async validators, wait for it them to complete before proceeding\r\n if (this.formGroup.pending) {\r\n // Show the saving overlay when the form has pending async validators\r\n this.showStatus(PageStatus.Saving);\r\n await lastValueFrom(this.formGroup.statusChanges.pipe(filter(status => status !== 'PENDING'), take(1), takeUntil(this.destroyed)));\r\n }\r\n\r\n if (this.formGroup.valid) {\r\n await this.save();\r\n } else {\r\n // Remove the saving overlay to display any errors\r\n this.showStatus(PageStatus.Loaded);\r\n \r\n // Only show the banner with the generic message if the parent component hasn't already set one\r\n // by implementing onSave for additional validation\r\n if (this.errors === '') {\r\n this.showErrorBanner(this.defaultInvalidFormMessage);\r\n }\r\n\r\n if (this.scrollContainerSelector) {\r\n setTimeout(() => {\r\n this.scrollService.scrollToItem(this.scrollContainerSelector!, \".ng-invalid\");\r\n });\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function available to trigger a save and bypass the form validation checks.\r\n * This is useful if the user chooses a remove action from within an edit dialog. If the dialog form is invalid\r\n * that is no concern to the user if they wish to remove the item they are editing.\r\n * @param event\r\n */\r\n public async onSaveWithoutValidate(event: Event): Promise<void> {\r\n await this.save();\r\n }\r\n\r\n /**\r\n * Function called when the component is destroyed\r\n */\r\n public ngOnDestroy(): void {\r\n this.destroyed.next();\r\n this.destroyed.unsubscribe();\r\n }\r\n\r\n /**\r\n * Function that will log an error that is passed in to the console\r\n * @param e\r\n */\r\n protected onError(error: Error): void {\r\n this.errorService.logConsoleError(error);\r\n this.showErrorOverlay(error);\r\n }\r\n\r\n /**\r\n * Show an error message in a whole-page overlay. This will prevent any more\r\n * interactions with the page. It can take a string error message or a raw API\r\n * error that needs to be parsed. If the API error isn't something we can handle\r\n * a generic message is shown instead\r\n * @param {(Error | string)} error\r\n */\r\n protected showErrorOverlay(error: Error | string) {\r\n this.getErrorMessage(error).subscribe((translatedMessage: string) => {\r\n this.status.setStatus('error', translatedMessage);\r\n });\r\n }\r\n\r\n /**\r\n * Show an error in the banner at the top of the screen. This will not produce a\r\n * whole-page overlay like the function showError will. It can take a string error message\r\n * or raw API error that needs to be parsed. If the API error isn't something we can handle,\r\n * a generic message (customizable via unknownErrorDefault) is shown instead.\r\n * @param error\r\n * @param unknownErrorDefault\r\n */\r\n protected showErrorBanner(error: Error | string, unknownErrorDefault?: string): void {\r\n this.getErrorMessage(error, unknownErrorDefault).subscribe((translatedMessage: string) => {\r\n this._errors = translatedMessage;\r\n this.showStatus(PageStatus.Loaded);\r\n });\r\n }\r\n\r\n /**\r\n * Parses and translates an API error or error string.\r\n * @param e\r\n * @param unknownErrorDefault\r\n */\r\n protected getErrorMessage(e: Error | string, unknownErrorDefault?: string): Observable<string> {\r\n let extractedMessage = this.errorService.parseApiError(e, unknownErrorDefault);\r\n return this.translateService.get(extractedMessage);\r\n }\r\n\r\n /**\r\n * Clear the errors to hide the errors banner.\r\n */\r\n protected hideErrorBanner(): void {\r\n this._errors = '';\r\n }\r\n\r\n /**\r\n * Change the display status to overlay the whole page while loading or saving\r\n * and clear it when the form is ready\r\n * @protected\r\n * @param {PageStatus} status\r\n * @memberof FormBaseComponent\r\n */\r\n protected showStatus(status: PageStatus) {\r\n let knownStatus = PageStatuses[status];\r\n if (knownStatus) {\r\n this.status.setStatus(knownStatus.status, knownStatus.message, undefined, knownStatus.noDataTemplate, knownStatus.overlayClassList);\r\n }\r\n }\r\n\r\n /**\r\n * Allows the component to enter a pending status and execute a function that on completion will return the status\r\n * to hasData. If an error occurs within the callback an error banner can be shown.\r\n * @param callback\r\n * @param pendingMessage - optional custom pending message\r\n * @returns\r\n */\r\n protected async runBlockingAction(callback: () => Promise<any>, pendingMessage?: string): Promise<any> {\r\n this.hideErrorBanner();\r\n this.status.setStatus('pending', pendingMessage);\r\n\r\n return callback().catch(error => {\r\n this.showErrorBanner(error);\r\n // Throw the error for any downstream components that may be listening and need to react\r\n // to any errors happening within this callback\r\n throw (error);\r\n }).finally(() => {\r\n this.showStatus(PageStatus.Loaded);\r\n });\r\n };\r\n\r\n /**\r\n * Parses the page init result and sets the necessary properties on the page\r\n * @param result\r\n */\r\n private parseInitResult(result: PageInitResult): void {\r\n this.initResult = result;\r\n this.title = result.title;\r\n this.subTitle = result.subTitle;\r\n this.subTitleUrl = result.subTitleUrl;\r\n this.breadcrumbs = result.breadcrumbs;\r\n this.help = result.help;\r\n }\r\n\r\n /**\r\n * Controls the page status, triggers the save action and handles errors thrown.\r\n */\r\n private async save(): Promise<void> {\r\n this.showStatus(PageStatus.Saving);\r\n\r\n try {\r\n await this.applyModelUpdates();\r\n let entityId = await this.saveToApi() || -1;\r\n\r\n this._errors = '';\r\n\r\n this.onSaveComplete(entityId);\r\n } catch (error) {\r\n //clear the \"saving\" overlay and show the message at the top of the view through the errors property\r\n this.showErrorBanner(error, this.defaultUnknownSaveError);\r\n this.splashService.hideSplash();\r\n }\r\n }\r\n\r\n /**\r\n * Sets up the router event subscriptions\r\n */\r\n private setUpRouterSubscriptions(): void {\r\n if (!this.navigationEndSubscription && !this.destroyed.closed) {\r\n this.previousUrl = this.router.url;\r\n\r\n // React to navigation events\r\n this.navigationEndSubscription = this.router.events.pipe(\r\n takeUntil(this.destroyed),\r\n filter(e => e instanceof NavigationEnd),\r\n ).subscribe(e => {\r\n try {\r\n let currentUrl: string = (<NavigationEnd>e).url;\r\n\r\n if (this.ignoreQueryParamsOnNavigationChange) {\r\n if (this.previousUrl.split('?')[0] !== currentUrl.split('?')[0]) {\r\n this.navigationEndHandler((<NavigationEnd>e).url);\r\n }\r\n } else {\r\n if (this.previousUrl !== currentUrl) {\r\n this.navigationEndHandler((<NavigationEnd>e).url);\r\n }\r\n }\r\n } catch (error) {\r\n this.onError(error);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private navigationEndHandler(url: string): void {\r\n this.previousUrl = url;\r\n this.onNavigationEnd();\r\n }\r\n}\r\n","import { Injector } from '@angular/core';\r\nimport { ClipboardService } from 'ngx-clipboard';\r\nimport { SpyFactory } from './spy-factory.spec';\r\n\r\nexport class CopyButtonBaseTestInjectorFactory {\r\n\r\n public static getComponentInjector() {\r\n return Injector.create({\r\n providers: [\r\n {\r\n provide: ClipboardService,\r\n useFactory: () => SpyFactory.createSpy(ClipboardService),\r\n deps: []\r\n }\r\n ]\r\n });\r\n }\r\n}","import { Injector } from '@angular/core';\r\nimport { TelemetryService } from '../../core/telemetry.service';\r\nimport { SpyFactory } from './spy-factory.spec';\r\n\r\nexport class HierarchyBaseTestInjectorFactory {\r\n \r\n public static getComponentInjector() {\r\n return Injector.create({\r\n providers: [\r\n {\r\n provide: TelemetryService,\r\n useFactory: () => SpyFactory.createSpy(TelemetryService),\r\n deps: []\r\n }\r\n ]\r\n });\r\n }\r\n}\r\n","import { Observable, of } from \"rxjs\";\r\nimport { PipeTransform, Pipe } from \"@angular/core\";\r\nimport { HttpErrorResponse } from \"@angular/common/http\";\r\n\r\nexport const clickEvent: MouseEvent = new MouseEvent('click');\r\n\r\nexport interface ApiError { error: HttpErrorResponse };\r\n/**\r\n * returns an object that is formatted the same way as an API error would be\r\n * if the provided message was the message coming from the API\r\n * @param message\r\n */\r\n export function getApiError(message: string): ApiError {\r\n return <HttpErrorResponse>{\r\n error: {\r\n status: {\r\n message: message\r\n }\r\n }\r\n };\r\n }\r\n\r\nexport class MockTranslateService {\r\n public currentLang:string = 'en_US';\r\n constructor(public suffix?: string) { }\r\n public get(key: string | string[], interpolateParams?: Object | undefined): Observable<string | any> {\r\n return of(key + (this.suffix || ''));\r\n }\r\n\r\n public stream(key: string | string[], interpolateParams?: Object | undefined): Observable<string | any> {\r\n return of(key + (this.suffix || ''));\r\n }\r\n\r\n public instant(key:string | string[], interpolateParams?: Object | undefined): any {\r\n return key + (this.suffix || '');\r\n }\r\n\r\n public setTranslation(langKey: string, languagePack: any, shouldMerge: boolean){\r\n //do nothing\r\n }\r\n\r\n public setDefaultLang(lang: string){\r\n //do nothing\r\n }\r\n\r\n public use(lang: string) {\r\n //do nothing\r\n }\r\n}\r\n\r\nexport class MockTranslationHelperService {\r\n public translateObjectArray<T>(items: Array<T>, prop: string): Promise<Array<T>> {\r\n return Promise.resolve(items);\r\n }\r\n \r\n public translateObjectProperty<T>(item: T, prop: string, interpolateParams?: any): Observable<T> {\r\n return of(item);\r\n }\r\n\r\n public getKendoLocaleId(): string {\r\n return 'en';\r\n }\r\n\r\n public translateCorePopValue(key:string, defaultValue: string): string {\r\n return defaultValue;\r\n }\r\n\r\n public setLanguage(): void {}\r\n}","import { AbstractControl } from \"@angular/forms\";\r\nimport { PageBaseComponent } from \"../page/page-base/page-base.component\";\r\nimport { clickEvent } from \"./translation-mocks.spec\";\r\n\r\nexport class PageBaseComponentTestHelper<T extends PageBaseComponent> {\r\n private _component: T;\r\n\r\n /**\r\n * Shortcut to access the component's controls\r\n */\r\n public get controls(): { [key: string]: AbstractControl } {\r\n return this._component.formGroup.controls;\r\n }\r\n\r\n constructor(component: T) {\r\n this._component = component;\r\n }\r\n\r\n /**\r\n * Call and await ngOnInit and ngAfterViewInit\r\n *\r\n * @returns {Promise<void>}\r\n */\r\n public async initialize(): Promise<void> {\r\n await this._component.ngOnInit();\r\n await this._component.ngAfterViewInit();\r\n }\r\n\r\n /**\r\n * Simulate clicking of \"Save\" button\r\n *\r\n * @returns {Promise<void>}\r\n */\r\n public async clickSave(): Promise<void> {\r\n await this._component.onSave(clickEvent);\r\n }\r\n\r\n /**\r\n * Simulate saving without validate\r\n *\r\n * @returns {Promise<void>}\r\n */\r\n public async clickSaveWithoutValidate(): Promise<void> {\r\n await this._component.onSaveWithoutValidate(clickEvent);\r\n }\r\n}\r\n","import { Injector, StaticProvider } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ErrorService } from \"../../core/error.service\";\r\nimport { RouterHelper } from \"../../core/router-helper.service\";\r\nimport { ScrollService } from \"../../core/scroll.service\";\r\nimport { TelemetryService } from '../../core/telemetry.service';\r\nimport { DialogService } from \"../../display/dialog/dialog.service\";\r\nimport { SplashService } from \"../../display/splash/splash.service\";\r\nimport { MockActivatedRoute, mockRouterFactory, mockRouterHelperFactory } from \"./public-mocks.spec\";\r\nimport { SpyFactory } from \"./spy-factory.spec\";\r\nimport { MockTranslateService } from \"./translation-mocks.spec\";\r\n\r\n/**\r\n * Contains static methods to create common injectors for unit testing\r\n */\r\nexport class PageBaseComponentTestInjectorFactory {\r\n\r\n /**\r\n * Core services retrieved via the @see Injector in our base classes.\r\n */\r\n private static CoreProviders: StaticProvider[] = [\r\n {\r\n provide: Router,\r\n useFactory: mockRouterFactory,\r\n deps: [],\r\n },\r\n {\r\n provide: ScrollService,\r\n useFactory: () => {\r\n return SpyFactory.createSpy(ScrollService)\r\n },\r\n deps: []\r\n },\r\n {\r\n provide: ActivatedRoute,\r\n useFactory: () => {\r\n return new MockActivatedRoute();\r\n },\r\n deps: [],\r\n },\r\n {\r\n provide: SplashService,\r\n useFactory: () => {\r\n return SpyFactory.createSpy(SplashService)\r\n },\r\n deps: []\r\n }\r\n ];\r\n\r\n /**\r\n * Services and such retrieved by @see PageBaseComponent via the @see Injector\r\n * in addition to our core services\r\n */\r\n private static ComponentProviders: StaticProvider[] = [\r\n {\r\n provide: TranslateService,\r\n useFactory: () => new MockTranslateService('-T'),\r\n deps: []\r\n },\r\n { provide: ErrorService, deps: [] },\r\n { \r\n provide: DialogService,\r\n useFactory: () => {\r\n return SpyFactory.createSpy(DialogService)\r\n },\r\n deps: []\r\n },\r\n {\r\n provide: RouterHelper,\r\n useFactory: () => mockRouterHelperFactory(),\r\n deps: []\r\n }\r\n ];\r\n\r\n /**\r\n * Services and such retrieved by @see WizardBaseComponent via the @see Injector\r\n * in addition to our core and @see PageBaseComponent services\r\n */\r\n private static WizardProviders: StaticProvider[] = [\r\n {\r\n provide: TelemetryService,\r\n useFactory: () => {\r\n return SpyFactory.createSpy(TelemetryService);\r\n },\r\n deps: []\r\n }\r\n ];\r\n\r\n /**\r\n * Get an injector which provides spy and mock objects needed by the @see PageBaseComponent\r\n */\r\n public static getComponentInjector(): Injector {\r\n return Injector.create({ providers: [...this.CoreProviders, ...this.ComponentProviders] });\r\n }\r\n\r\n /**\r\n * Get an injector which provides spy and mock objects needed by the @see WizardBaseComponent\r\n */\r\n public static getWizardBaseComponentInjector(): Injector {\r\n return Injector.create({ providers: [...this.CoreProviders, ...this.ComponentProviders, ...this.WizardProviders] });\r\n }\r\n}\r\n","import { Directive, Injector } from '@angular/core';\r\nimport { upperFirst } from 'lodash';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { NavGroup } from '../../../controls/navigation/nav-group';\r\nimport { NavItem } from '../../../controls/navigation/nav-item';\r\nimport { TelemetryService } from '../../../core/telemetry.service';\r\nimport { Help } from '../../../display/help/help-types';\r\nimport { PageBaseComponent, PageInitResult } from '../../page/page-base/page-base.component';\r\n\r\nexport interface WizardTab extends NavItem {\r\n /**\r\n * Path to a form group/array/control contained in the form's main form group.\r\n * Used to map a tab to it's form model for form validation in WizardBaseComponent.\r\n * See https://angular.io/api/forms/AbstractControl#get-usage-notes for details on paths.\r\n */\r\n formModelPath?: string | (string | number)[];\r\n help?: Help;\r\n title?: string;\r\n completed?: boolean;\r\n}\r\n\r\n@Directive()\r\nexport abstract class WizardBaseComponent extends PageBaseComponent {\r\n\r\n public isWizardMode: boolean = true;\r\n public showWizardSaveSuccess: boolean = false;\r\n\r\n /** True when there are no custom fields or when in wizard mode on the custom fields tab */\r\n public showSave: boolean = true;\r\n\r\n /** True when in wizard mode you do not want to show the next or save button*/\r\n public hideNextSaveButton: boolean = false;\r\n\r\n /** True when in wizard mode and on the custom fields tab */\r\n public showBack: boolean = false;\r\n\r\n /** Labels for the cancel, next and back buttons */\r\n public nextLabel?: string;\r\n public backLabel?: string;\r\n public cancelLabel: string = 'Cancel';\r\n\r\n public dialogId: string = '';\r\n\r\n /**\r\n * Contains the available wizard tabs. Passed to TabsComponent.\r\n * @memberof WizardBaseComponent\r\n */\r\n private _tabGroup!: NavGroup;\r\n public get tabGroup(): NavGroup {\r\n return this._tabGroup;\r\n }\r\n public set tabGroup(value: NavGroup) {\r\n this._tabGroup = value;\r\n }\r\n\r\n /**\r\n * Contains the tab that is currently selected.\r\n * @memberof WizardBaseComponent\r\n */\r\n private _currentTab?: WizardTab;\r\n public get currentTab(): WizardTab | undefined {\r\n return this._currentTab;\r\n }\r\n\r\n protected initPromise!: Promise<WizardBaseComponent>;\r\n\r\n protected telemetryService: TelemetryService;\r\n\r\n constructor(injector: Injector) {\r\n super(injector);\r\n\r\n this.telemetryService = injector.get(TelemetryService);\r\n }\r\n\r\n protected onFirstInit() {\r\n this._tabGroup = this.configureTabs();\r\n this.setCurrentTab(this._tabGroup.selected);\r\n this.subscribeToTabChanges();\r\n }\r\n\r\n protected abstract onInit(): Promise<PageInitResult>;\r\n\r\n protected onWizardSaveSuccess(): void { }\r\n\r\n protected async onAfterViewInit(): Promise<void> {\r\n this.updateButtons();\r\n }\r\n\r\n //\r\n // PageBase lifecycle hooks. Override in derived class if needed.\r\n //\r\n protected async applyModelUpdates() {}\r\n protected async saveToApi(): Promise<number|void> {}\r\n protected onSaveComplete(entityId: number) {}\r\n\r\n public async onSave(event: Event) {\r\n // Mark the current tab as completed if the tab is valid before attempting to save.\r\n if (this._currentTab && this.isCurrentTabValid()) {\r\n this._currentTab.completed = true;\r\n }\r\n\r\n await super.onSave(event);\r\n\r\n if (this.showWizardSaveSuccess) {\r\n this.onWizardSaveSuccess();\r\n this.telemetryService.trackEvent(`${this.dialogId}_WizardSuccess`);\r\n }\r\n }\r\n\r\n /**\r\n * Navigates to the next tab in the tab group. Calls canGoToNextTab() to determine if navigating to the next tab\r\n * is allowed or not. If tab validation succeeds, enables the next tab (if it is disabled) and selects it.\r\n * @memberof WizardBaseComponent\r\n */\r\n public nextTab() {\r\n const currentTabIndex = this._tabGroup.items.findIndex(t => t === this._currentTab);\r\n // If there is a current tab selected and the current tab is not the last tab,\r\n // update the selected tab in the tabGroup to the next tab\r\n if (currentTabIndex > -1 && currentTabIndex < this._tabGroup.items.length - 1) {\r\n const nextTab = this._tabGroup.items[currentTabIndex + 1];\r\n if (this.canGoToNextTab(nextTab)) {\r\n // Enable the next tab if it is disabled\r\n if (nextTab.disabled) {\r\n nextTab.disabled = false;\r\n }\r\n this._tabGroup.selected = nextTab;\r\n this.telemetryService.trackEvent(`${this.dialogId}_${upperFirst(nextTab.id?.toString())}`);\r\n } else {\r\n this.onTabChangeFailed();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Navigates to the previous tab in the tab group. Calls canGoToPreviousTab() to determine if navigating to the previous tab\r\n * is allowed or not. Navigates to the tab if validation succeeds\r\n * @memberof WizardBaseComponent\r\n */\r\n public previousTab() {\r\n const currentTabIndex = this._tabGroup.items.findIndex(t => t === this._currentTab);\r\n // If there is a current tab selected and the current tab is not the first tab,\r\n // update the selected tab in the tabGroup to the previous tab\r\n if (currentTabIndex > 0 && currentTabIndex < this._tabGroup.items.length) {\r\n const prevTab = this._tabGroup.items[currentTabIndex - 1];\r\n if (this.canGoToPreviousTab(prevTab)) {\r\n this._tabGroup.selected = prevTab;\r\n this.telemetryService.trackEvent(`${this.dialogId}_${upperFirst(prevTab.id?.toString())}`);\r\n } else {\r\n this.onTabChangeFailed();\r\n }\r\n }\r\n }\r\n\r\n protected updateButtons() {\r\n if (this.isWizardMode) {\r\n if (this.currentTab) {\r\n const tabIndex = this._tabGroup.items.findIndex(t => t === this.currentTab);\r\n if (tabIndex > 0) {\r\n // Show the back button and set the label to the previous tab when not on the first tab\r\n this.showBack = true;\r\n const prevTabKey = this._tabGroup.items[tabIndex - 1].label!;\r\n this.backLabel = `${this.translateService.instant('Back_TC')}: ${this.translateService.instant(prevTabKey)}`;\r\n } else {\r\n // Hide the back button when on the first tab\r\n this.showBack = false;\r\n }\r\n\r\n if (tabIndex < this._tabGroup.items.length - 1) {\r\n // Show the next button and set the label to the next tab when not on the last tab\r\n this.showSave = false;\r\n const nextTabKey = this._tabGroup.items[tabIndex + 1].label!;\r\n this.nextLabel = `${this.translateService.instant('Next_TC')}: ${this.translateService.instant(nextTabKey)}`;\r\n } else {\r\n this.nextLabel = undefined;\r\n // Show the save button instead of next when on the last tab\r\n this.showSave = true;\r\n }\r\n }\r\n } else {\r\n this.showBack = false;\r\n this.showSave = true;\r\n }\r\n }\r\n\r\n /**\r\n * Required to configure the tabs and default tab for the wizard. Runs in onFirstInit, before onInit.\r\n * @memberof WizardBaseComponent\r\n */\r\n protected abstract configureTabs(): NavGroup;\r\n\r\n /**\r\n * Used to determine whether navigation to the next tab is prevented or not. Fired in nextTab(), but not when a tab is\r\n * clicked or selected programmatically. By default, this checks the validity of the current tab's form model and\r\n * prevents navigation if it is invalid. Can be overridden if different logic is needed.\r\n * @param nextTab - The tab being navigated to\r\n * @memberof WizardBaseComponent\r\n */\r\n protected canGoToNextTab(nextTab: WizardTab): boolean {\r\n return this.isCurrentTabValid();\r\n }\r\n\r\n /**\r\n * Used to determine whether navigation to the previous tab is prevented or not. Fired in previousTab(), but not when a tab is\r\n * clicked or selected programmatically. By default, this checks the validity of the current tab's form model and\r\n * prevents navigation if it is invalid. Can be overridden if different logic is needed.\r\n * @param prevTab - The tab being navigated to\r\n * @memberof WizardBaseComponent\r\n */\r\n protected canGoToPreviousTab(prevTab: WizardTab): boolean {\r\n return this.isCurrentTabValid();\r\n }\r\n\r\n /**\r\n * Used to determine whether navigating away from the current tab is prevented or not. Fired any time the selected tab\r\n * changes in the tabGroup. By default, this checks the validity of the current tab's form model and prevents navigation\r\n * if it is invalid. Can be overridden if different logic is needed.\r\n * @memberof WizardBaseComponent\r\n */\r\n protected canLeaveCurrentTab(): boolean {\r\n return this.isCurrentTabValid();\r\n }\r\n\r\n /**\r\n * Triggers validation on the current wizard tab's form control. Returns true if the form control is valid, false if not.\r\n * Returns true if the formModelPath for the tab is not defined or no form control is found. Can be overridden if different\r\n * logic is needed to validate the form control for the current tab.\r\n * @memberof WizardBaseComponent\r\n */\r\n protected isCurrentTabValid(): boolean {\r\n if (this._currentTab && this._currentTab.formModelPath) {\r\n let formModel = this.formGroup.get(this._currentTab.formModelPath);\r\n if (formModel) {\r\n formModel.markAllAsTouched();\r\n return formModel.valid || formModel.disabled;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Fired if navigation to a tab succeeds. Hides the error banner by default, but can be overridden if logic is needed.\r\n * @memberof WizardBaseComponent\r\n */\r\n protected onTabChangeSuccess(): void {\r\n this.updateButtons();\r\n this.hideErrorBanner();\r\n }\r\n\r\n /**\r\n * Fired if navigation to a tab fails. By default, shows the error banner with the default invalid form message, but\r\n * can be overridden if different logic is needed.\r\n * @memberof WizardBaseComponent\r\n */\r\n protected onTabChangeFailed(): void {\r\n this.showErrorBanner(this.defaultInvalidFormMessage);\r\n }\r\n\r\n /**\r\n * Listen for when the tabGroup's selected item is changed (I.E. when a tab is clicked or selected programmatically)\r\n * and navigate to that tab.\r\n */\r\n private subscribeToTabChanges() {\r\n // Whenever the tabGroup's selected tab changes, go to the selected tab\r\n this._tabGroup.selectedChanges.pipe(takeUntil(this.destroyed)).subscribe(tab => {\r\n this.goToTab(tab);\r\n });\r\n }\r\n\r\n /**\r\n * Triggered when the tabGroup's selected item changes. If the current tab passes validation, updates\r\n * the current tab to the selected tab.\r\n * @param tab - the tab that was selected\r\n */\r\n private goToTab(tab: WizardTab) {\r\n // Only continue if the current tab is not the tab that was selected. They are the same\r\n // when we are resetting the tab group's selected tab back to the current tab when validation fails.\r\n // Without this check, we could end up in an infinite loop.\r\n if (tab !== this._currentTab) {\r\n if (this.canLeaveCurrentTab()) {\r\n // Mark the current tab as complete before switching\r\n if (this._currentTab) {\r\n this._currentTab.completed = true;\r\n }\r\n this.setCurrentTab(tab);\r\n this.onTabChangeSuccess();\r\n } else {\r\n // Because the tabGroup's selected tab is updated when a tab is clicked before we can run any form validation,\r\n // we need to reset the selected tab back to the current tab if validation fails.\r\n // Without this we would have no way to prevent the user from leaving the current tab if the form is invalid.\r\n this._tabGroup.selected = this._currentTab;\r\n this.onTabChangeFailed();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Updates the current tab, title, and help.\r\n * @param tab Tab to set\r\n */\r\n private setCurrentTab(tab?: WizardTab) {\r\n this._currentTab = tab;\r\n this.help = tab ? tab.help : undefined;\r\n this.title = tab ? tab.title : undefined;\r\n }\r\n}\r\n","/*\r\n * Public API Surface of @energycap/components\r\n */\r\n\r\nexport * from './lib/components.module';\r\nexport * from './lib/controls/banner/banner.component';\r\nexport * from './lib/controls/button/button.component';\r\nexport * from './lib/controls/button/copy-button.directive';\r\nexport * from './lib/controls/button/copy-table-button.directive';\r\nexport * from './lib/controls/calendar/calendar.component';\r\nexport * from './lib/controls/calendar/calendar.types';\r\nexport * from './lib/controls/checkbox/checkbox.component';\r\nexport * from './lib/controls/collapsible-toggle/collapsible-toggle.component';\r\nexport * from './lib/controls/combobox/combobox.component';\r\nexport * from './lib/controls/date-input/date-input.component';\r\nexport * from './lib/controls/date-input/date-input.types';\r\nexport * from './lib/controls/dropdown/dropdown.component';\r\nexport * from './lib/controls/file-upload/file-upload.component';\r\nexport * from './lib/controls/form-control-base';\r\nexport * from './lib/controls/form-control-label/form-control-label.component';\r\nexport * from './lib/controls/form-control/form-control.component';\r\nexport * from './lib/controls/form-group/form-group.component';\r\nexport * from './lib/controls/help-popover/help-popover.component';\r\nexport * from './lib/controls/item-picker/item-picker.component';\r\nexport * from './lib/controls/link-button/link-button.component';\r\nexport * from './lib/controls/menu/menu.component';\r\nexport * from './lib/controls/navigation/link-item';\r\nexport * from './lib/controls/navigation/nav-group';\r\nexport * from './lib/controls/navigation/nav-item';\r\nexport * from './lib/controls/navigation/nav-item-active.directive';\r\nexport * from './lib/controls/numericbox/numericbox.component';\r\nexport * from './lib/controls/popover/popover.component';\r\nexport * from './lib/controls/radio-button/radio-button-option';\r\nexport * from './lib/controls/radio-button/radio-button.component';\r\nexport * from './lib/controls/select/select.component';\r\nexport * from './lib/controls/tabs/tabs.component';\r\nexport * from './lib/controls/textbox/textbox.component';\r\nexport * from './lib/core/cache.service';\r\nexport * from './lib/core/custom-validators';\r\nexport * from './lib/core/date-time-helper';\r\nexport * from './lib/core/error.service';\r\nexport * from './lib/core/router-helper.service';\r\nexport * from './lib/core/scroll.service';\r\nexport * from './lib/core/telemetry-tracker.service';\r\nexport * from './lib/core/telemetry.service';\r\nexport * from './lib/core/validation-message.service';\r\nexport * from './lib/core/validation-patterns';\r\nexport * from './lib/core/window.service';\r\nexport * from './lib/display/app-bar/app-bar.component';\r\nexport * from './lib/display/avatar/avatar.component';\r\nexport * from './lib/display/confirm/confirm.component';\r\nexport * from './lib/display/dialog/dialog-content';\r\nexport * from './lib/display/dialog/dialog-group/dialog-group.component';\r\nexport * from './lib/display/dialog/dialog-types';\r\nexport * from './lib/display/dialog/dialog.component';\r\nexport * from './lib/display/dialog/dialog.service';\r\nexport * from './lib/display/help/help-types';\r\nexport * from './lib/display/hierarchy/hierarchy-base';\r\nexport * from './lib/display/hierarchy/hierarchy-mocks.spec';\r\nexport * from './lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component';\r\nexport * from './lib/display/item-display/item-display.component';\r\nexport * from './lib/display/json-display/json-display.component';\r\nexport * from './lib/display/resizable/resizable-base';\r\nexport * from './lib/display/resizable/resizable.component';\r\nexport * from './lib/display/spinner/spinner.component';\r\nexport * from './lib/display/splash/splash.component';\r\nexport * from './lib/display/splash/splash.service';\r\nexport * from './lib/display/table/resizable-column.component';\r\nexport * from './lib/display/table/searchable-table.component';\r\nexport * from './lib/display/table/table-locked-column.component';\r\nexport * from './lib/display/table/table-master-header-row.component';\r\nexport * from './lib/display/table/table-master-row.component';\r\nexport * from './lib/display/table/table-pagination.component';\r\nexport * from './lib/display/table/table-selectable-row.component';\r\nexport * from './lib/display/table/table.component';\r\nexport * from './lib/display/tags/tag';\r\nexport * from './lib/display/tags/tags.component';\r\nexport * from './lib/display/toast/toast-types';\r\nexport * from './lib/display/toast/toast.service';\r\nexport * from './lib/display/toast/toast/toast.component';\r\nexport * from './lib/display/toast/toaster/toaster.component';\r\nexport * from './lib/display/tooltip-directive/tooltip.directive';\r\nexport * from './lib/display/tooltip/tooltip.component';\r\nexport * from './lib/display/tooltip/tooltip.service';\r\nexport * from './lib/display/tour/tour-types';\r\nexport * from './lib/display/tour/tour.component';\r\nexport * from './lib/display/tour/tour.service';\r\nexport * from './lib/display/tree/tree.component';\r\nexport * from './lib/display/view-overlay/view-overlay.component';\r\nexport * from './lib/shared/directives/click-area-for/click-area-for.directive';\r\nexport * from './lib/shared/directives/if-viewport-width/if-viewport-width.directive';\r\nexport * from './lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive';\r\nexport * from './lib/shared/directives/popup/popup-container.directive';\r\nexport * from './lib/shared/display';\r\nexport * from './lib/shared/display/pipes/date-display.pipe';\r\nexport * from './lib/shared/display/pipes/highlight-text.pipe';\r\nexport * from './lib/shared/display/pipes/relative-date.pipe';\r\nexport * from './lib/shared/display/pipes/row-count.pipe';\r\nexport * from './lib/shared/display/pipes/time-display.pipe';\r\nexport * from './lib/shared/form-group.helper';\r\nexport * from './lib/shared/json-helper';\r\nexport * from './lib/shared/lodash-helper';\r\nexport * from './lib/shared/page/page-base/page-base.component';\r\nexport * from './lib/shared/page/page-statuses';\r\nexport * from './lib/shared/page/page-title/page-title.component';\r\nexport * from './lib/shared/page/page-view/page-view.component';\r\nexport * from './lib/shared/testing/copy-button-base-test-injector-factory.spec';\r\nexport * from './lib/shared/testing/hierarchy-base-test-injector-factory.spec';\r\nexport * from './lib/shared/testing/page-base-component-test-helper.spec';\r\nexport * from './lib/shared/testing/page-base-component-test-injector-factory.spec';\r\nexport * from './lib/shared/testing/public-mocks.spec';\r\nexport * from './lib/shared/testing/spy-factory.spec';\r\nexport * from './lib/shared/testing/translation-mocks.spec';\r\nexport * from './lib/shared/user-preference.service';\r\nexport * from './lib/shared/wizard/wizard-base/wizard-base.component';\r\nexport * from './lib/shared/wizard/wizard-buttons/wizard-buttons.component';\r\nexport * from './lib/shared/wizard/wizard-progress/wizard-progress.component';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1.CacheService","i3.ButtonComponent","i1.ButtonComponent","i1.UserPreferenceService","i1.DateDisplayPipe","i2.CalendarItemComponent","i1","i2.DateDisplayPipe","i1.ValidationMessageService","i2.FormGroupHelper","i2.ButtonComponent","i2.TooltipService","i3","i4.TagsComponent","i2.PopoverComponent","i5.HelpPopoverComponent","i6","i1.WindowService","i2.ScrollService","i4","i5.NavItemActiveDirective","i6.HelpPopoverComponent","i7","i5","i3.SpinnerComponent","i4.ScrollService","i6.ButtonComponent","i7.TextboxComponent","i8.ViewOverlayComponent","i9.MenuComponent","i10.PopupContainerDirective","i11.HelpPopoverComponent","i3.UserPreferenceService","i5.DateInput","i8.ButtonComponent","i9.FormControlComponent","i10.HelpPopoverComponent","i11.LinkButtonComponent","i12.CalendarComponent","i13.KeyboardNavContainerDirective","i14","i3.ViewOverlayComponent","i4.MenuComponent","i5.PopupContainerDirective","i4.HelpPopoverComponent","i5.ButtonComponent","i6.FormControlComponent","i7.FormGroupComponent","i8","i2.CheckboxComponent","i3.TableLockedColumnComponent","i2.CollapsibleToggleComponent","i3.TableDetailRowComponent","i3.ResizableTableDirective","i2.TabsComponent","i3.DropdownComponent","i1.ErrorService","i3.RowCountPipe","i5.TextboxComponent","i6.ViewOverlayComponent","i7.TableComponent","i8.TablePaginationComponent","i4.ViewOverlayComponent","i5.TableComponent","i6.SearchableTableComponent","i7.TableSelectableRowComponent","i8.HelpPopoverComponent","i9.LinkButtonComponent","i4.TextboxComponent","i1.AvatarService","i4.AvatarComponent","i5.ViewOverlayComponent","i6.BannerComponent","i7.CheckboxComponent","i1.DialogService","i3.DialogComponent","i1.TelemetryTrackerService","i1.ScrollService","i4.NavItemActiveDirective","i5.CollapsibleToggleComponent","i3.HelpPopoverComponent","i4.CopyButtonDirective","i1.SplashService","i1.ToastService","i3.BannerComponent","i4.LinkButtonComponent","i2.TelemetryService","i3.ToastComponent","i1.TooltipService","i8.LinkButtonComponent","i2.ViewOverlayComponent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