@energycap/components 0.41.1-ECAP-27592-angular-17.20241223-1652 → 0.41.1-ECAP-26841-date-input-features.20250106-0847

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 (353) hide show
  1. package/{esm2022 → esm2020}/energycap-components.mjs +4 -4
  2. package/esm2020/lib/components.module.mjs +423 -0
  3. package/esm2020/lib/controls/banner/banner.component.mjs +109 -0
  4. package/esm2020/lib/controls/button/button.component.mjs +106 -0
  5. package/esm2020/lib/controls/button/copy-button-base.directive.mjs +67 -0
  6. package/{esm2022 → esm2020}/lib/controls/button/copy-button.directive.mjs +28 -28
  7. package/esm2020/lib/controls/button/copy-table-button.directive.mjs +43 -0
  8. package/esm2020/lib/controls/calendar/calendar-item.component.mjs +91 -0
  9. package/esm2020/lib/controls/calendar/calendar.component.mjs +248 -0
  10. package/esm2020/lib/controls/calendar/calendar.types.mjs +2 -0
  11. package/esm2020/lib/controls/checkbox/checkbox.component.mjs +140 -0
  12. package/{esm2022 → esm2020}/lib/controls/collapsible-toggle/collapsible-toggle.component.mjs +38 -38
  13. package/esm2020/lib/controls/combobox/combobox.component.mjs +879 -0
  14. package/esm2020/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.mjs +57 -0
  15. package/esm2020/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.mjs +62 -0
  16. package/esm2020/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.mjs +100 -0
  17. package/esm2020/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.mjs +101 -0
  18. package/esm2020/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.mjs +76 -0
  19. package/esm2020/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.mjs +79 -0
  20. package/esm2020/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.mjs +210 -0
  21. package/esm2020/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.mjs +81 -0
  22. package/esm2020/lib/controls/date-input/date-input.component.mjs +462 -0
  23. package/esm2020/lib/controls/date-input/date-input.types.mjs +44 -0
  24. package/esm2020/lib/controls/dropdown/dropdown.component.mjs +243 -0
  25. package/esm2020/lib/controls/file-upload/file-upload.component.mjs +261 -0
  26. package/esm2020/lib/controls/form-control/form-control.component.mjs +98 -0
  27. package/esm2020/lib/controls/form-control-base.mjs +151 -0
  28. package/esm2020/lib/controls/form-control-label/form-control-label.component.mjs +136 -0
  29. package/esm2020/lib/controls/form-group/form-group.component.mjs +261 -0
  30. package/{esm2022 → esm2020}/lib/controls/help-popover/help-popover.component.mjs +31 -31
  31. package/esm2020/lib/controls/item-picker/item-picker.component.mjs +329 -0
  32. package/{esm2022 → esm2020}/lib/controls/link-button/link-button.component.mjs +11 -11
  33. package/esm2020/lib/controls/menu/menu.component.mjs +485 -0
  34. package/{esm2022 → esm2020}/lib/controls/navigation/link-item.mjs +1 -1
  35. package/esm2020/lib/controls/navigation/nav-group.mjs +39 -0
  36. package/esm2020/lib/controls/navigation/nav-item-active.directive.mjs +92 -0
  37. package/{esm2022 → esm2020}/lib/controls/navigation/nav-item.mjs +1 -1
  38. package/esm2020/lib/controls/numericbox/numericbox.component.mjs +372 -0
  39. package/esm2020/lib/controls/popover/popover.component.mjs +117 -0
  40. package/{esm2022 → esm2020}/lib/controls/radio-button/radio-button-option.mjs +2 -2
  41. package/esm2020/lib/controls/radio-button/radio-button.component.mjs +82 -0
  42. package/esm2020/lib/controls/select/select.component.mjs +88 -0
  43. package/esm2020/lib/controls/tabs/tabs.component.mjs +47 -0
  44. package/esm2020/lib/controls/textbox/textbox.component.mjs +155 -0
  45. package/esm2020/lib/core/cache.service.mjs +105 -0
  46. package/esm2020/lib/core/custom-validators.mjs +29 -0
  47. package/esm2020/lib/core/date-time-helper.mjs +228 -0
  48. package/esm2020/lib/core/error.service.mjs +61 -0
  49. package/esm2020/lib/core/router-helper.service.mjs +111 -0
  50. package/esm2020/lib/core/scroll.service.mjs +89 -0
  51. package/{esm2022 → esm2020}/lib/core/telemetry-tracker.service.mjs +16 -16
  52. package/{esm2022 → esm2020}/lib/core/telemetry.service.mjs +38 -38
  53. package/esm2020/lib/core/validation-message.service.mjs +185 -0
  54. package/{esm2022 → esm2020}/lib/core/validation-patterns.mjs +30 -30
  55. package/esm2020/lib/core/window.service.mjs +186 -0
  56. package/esm2020/lib/display/app-bar/app-bar.component.mjs +46 -0
  57. package/esm2020/lib/display/avatar/avatar.component.mjs +67 -0
  58. package/esm2020/lib/display/avatar/avatar.service.mjs +64 -0
  59. package/esm2020/lib/display/confirm/confirm.component.mjs +168 -0
  60. package/{esm2022 → esm2020}/lib/display/dialog/dialog-content.mjs +1 -1
  61. package/esm2020/lib/display/dialog/dialog-group/dialog-group.component.mjs +63 -0
  62. package/{esm2022 → esm2020}/lib/display/dialog/dialog-types.mjs +76 -76
  63. package/esm2020/lib/display/dialog/dialog.component.mjs +281 -0
  64. package/{esm2022 → esm2020}/lib/display/dialog/dialog.service.mjs +71 -71
  65. package/{esm2022 → esm2020}/lib/display/help/help-types.mjs +1 -1
  66. package/esm2020/lib/display/hierarchy/hierarchy-base.mjs +111 -0
  67. package/{esm2022 → esm2020}/lib/display/hierarchy/hierarchy-mocks.spec.mjs +53 -53
  68. package/esm2020/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.mjs +61 -0
  69. package/esm2020/lib/display/item-display/item-display.component.mjs +81 -0
  70. package/esm2020/lib/display/json-display/json-display.component.mjs +47 -0
  71. package/esm2020/lib/display/resizable/resizable-base.mjs +120 -0
  72. package/{esm2022 → esm2020}/lib/display/resizable/resizable.component.mjs +52 -52
  73. package/{esm2022 → esm2020}/lib/display/spinner/spinner.component.mjs +12 -12
  74. package/esm2020/lib/display/splash/splash.component.mjs +42 -0
  75. package/{esm2022 → esm2020}/lib/display/splash/splash.service.mjs +35 -35
  76. package/{esm2022 → esm2020}/lib/display/table/resizable-column.component.mjs +20 -20
  77. package/esm2020/lib/display/table/resizable-table.directive.mjs +227 -0
  78. package/esm2020/lib/display/table/searchable-table.component.mjs +342 -0
  79. package/{esm2022 → esm2020}/lib/display/table/table-detail-row.component.mjs +19 -19
  80. package/esm2020/lib/display/table/table-locked-column.component.mjs +58 -0
  81. package/{esm2022 → esm2020}/lib/display/table/table-master-header-row.component.mjs +14 -14
  82. package/esm2020/lib/display/table/table-master-row.component.mjs +163 -0
  83. package/esm2020/lib/display/table/table-pagination.component.mjs +155 -0
  84. package/esm2020/lib/display/table/table-selectable-row.component.mjs +235 -0
  85. package/esm2020/lib/display/table/table.component.mjs +249 -0
  86. package/esm2020/lib/display/tags/tag.mjs +18 -0
  87. package/esm2020/lib/display/tags/tags.component.mjs +77 -0
  88. package/esm2020/lib/display/toast/toast/toast.component.mjs +77 -0
  89. package/{esm2022 → esm2020}/lib/display/toast/toast-types.mjs +7 -7
  90. package/{esm2022 → esm2020}/lib/display/toast/toast.service.mjs +35 -35
  91. package/esm2020/lib/display/toast/toaster/toaster.component.mjs +114 -0
  92. package/{esm2022 → esm2020}/lib/display/tooltip/tooltip.component.mjs +28 -28
  93. package/{esm2022 → esm2020}/lib/display/tooltip/tooltip.service.mjs +78 -78
  94. package/esm2020/lib/display/tooltip-directive/tooltip.directive.mjs +173 -0
  95. package/{esm2022 → esm2020}/lib/display/tour/tour-types.mjs +33 -33
  96. package/esm2020/lib/display/tour/tour.component.mjs +398 -0
  97. package/esm2020/lib/display/tour/tour.service.mjs +75 -0
  98. package/esm2020/lib/display/tree/tree.component.mjs +135 -0
  99. package/esm2020/lib/display/view-overlay/view-overlay.component.mjs +58 -0
  100. package/esm2020/lib/shared/directives/click-area-for/click-area-for.directive.mjs +32 -0
  101. package/esm2020/lib/shared/directives/if-viewport-width/if-viewport-width.directive.mjs +111 -0
  102. package/esm2020/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.mjs +100 -0
  103. package/esm2020/lib/shared/directives/popup/popup-container.directive.mjs +163 -0
  104. package/esm2020/lib/shared/display/pipes/date-display.pipe.mjs +50 -0
  105. package/esm2020/lib/shared/display/pipes/highlight-text.pipe.mjs +30 -0
  106. package/esm2020/lib/shared/display/pipes/relative-date.pipe.mjs +62 -0
  107. package/esm2020/lib/shared/display/pipes/row-count.pipe.mjs +48 -0
  108. package/esm2020/lib/shared/display/pipes/time-display.pipe.mjs +41 -0
  109. package/esm2020/lib/shared/display.mjs +6 -0
  110. package/esm2020/lib/shared/form-group.helper.mjs +67 -0
  111. package/esm2020/lib/shared/json-helper.mjs +19 -0
  112. package/esm2020/lib/shared/lodash-helper.mjs +51 -0
  113. package/esm2020/lib/shared/page/page-base/page-base.component.mjs +387 -0
  114. package/{esm2022 → esm2020}/lib/shared/page/page-statuses.mjs +22 -22
  115. package/{esm2022 → esm2020}/lib/shared/page/page-title/page-title.component.mjs +23 -23
  116. package/esm2020/lib/shared/page/page-view/page-view.component.mjs +147 -0
  117. package/{esm2022 → esm2020}/lib/shared/testing/copy-button-base-test-injector-factory.spec.mjs +16 -16
  118. package/{esm2022 → esm2020}/lib/shared/testing/hierarchy-base-test-injector-factory.spec.mjs +16 -16
  119. package/{esm2022 → esm2020}/lib/shared/testing/page-base-component-test-helper.spec.mjs +37 -37
  120. package/esm2020/lib/shared/testing/page-base-component-test-injector-factory.spec.mjs +98 -0
  121. package/{esm2022 → esm2020}/lib/shared/testing/public-mocks.spec.mjs +148 -148
  122. package/{esm2022 → esm2020}/lib/shared/testing/spy-factory.spec.mjs +39 -39
  123. package/{esm2022 → esm2020}/lib/shared/testing/translation-mocks.spec.mjs +56 -56
  124. package/{esm2022 → esm2020}/lib/shared/user-preference.service.mjs +17 -17
  125. package/esm2020/lib/shared/wizard/wizard-base/wizard-base.component.mjs +246 -0
  126. package/{esm2022 → esm2020}/lib/shared/wizard/wizard-buttons/wizard-buttons.component.mjs +68 -68
  127. package/{esm2022 → esm2020}/lib/shared/wizard/wizard-progress/wizard-progress.component.mjs +18 -18
  128. package/esm2020/public-api.mjs +117 -0
  129. package/fesm2015/energycap-components.mjs +13370 -0
  130. package/fesm2015/energycap-components.mjs.map +1 -0
  131. package/{fesm2022 → fesm2020}/energycap-components.mjs +12971 -11819
  132. package/fesm2020/energycap-components.mjs.map +1 -0
  133. package/index.d.ts +5 -5
  134. package/lib/components.module.d.ts +92 -91
  135. package/lib/controls/banner/banner.component.d.ts +50 -50
  136. package/lib/controls/button/button.component.d.ts +78 -78
  137. package/lib/controls/button/copy-button-base.directive.d.ts +20 -20
  138. package/lib/controls/button/copy-button.directive.d.ts +14 -14
  139. package/lib/controls/button/copy-table-button.directive.d.ts +19 -19
  140. package/lib/controls/calendar/calendar-item.component.d.ts +22 -17
  141. package/lib/controls/calendar/calendar.component.d.ts +52 -54
  142. package/lib/controls/calendar/calendar.types.d.ts +11 -7
  143. package/lib/controls/checkbox/checkbox.component.d.ts +65 -65
  144. package/lib/controls/collapsible-toggle/collapsible-toggle.component.d.ts +25 -25
  145. package/lib/controls/combobox/combobox.component.d.ts +418 -418
  146. package/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.d.ts +42 -0
  147. package/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.d.ts +21 -0
  148. package/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.d.ts +21 -0
  149. package/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.d.ts +21 -0
  150. package/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.d.ts +18 -0
  151. package/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.d.ts +18 -0
  152. package/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.d.ts +21 -0
  153. package/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.d.ts +20 -0
  154. package/lib/controls/date-input/date-input.component.d.ts +115 -80
  155. package/lib/controls/date-input/date-input.types.d.ts +62 -0
  156. package/lib/controls/dropdown/dropdown.component.d.ts +161 -161
  157. package/lib/controls/file-upload/file-upload.component.d.ts +124 -124
  158. package/lib/controls/form-control/form-control.component.d.ts +28 -30
  159. package/lib/controls/form-control-base.d.ts +110 -110
  160. package/lib/controls/form-control-label/form-control-label.component.d.ts +73 -73
  161. package/lib/controls/form-group/form-group.component.d.ts +105 -105
  162. package/lib/controls/help-popover/help-popover.component.d.ts +11 -11
  163. package/lib/controls/item-picker/item-picker.component.d.ts +164 -164
  164. package/lib/controls/link-button/link-button.component.d.ts +5 -5
  165. package/lib/controls/menu/menu.component.d.ts +255 -255
  166. package/lib/controls/navigation/link-item.d.ts +32 -32
  167. package/lib/controls/navigation/nav-group.d.ts +18 -18
  168. package/lib/controls/navigation/nav-item-active.directive.d.ts +42 -42
  169. package/lib/controls/navigation/nav-item.d.ts +31 -31
  170. package/lib/controls/numericbox/numericbox.component.d.ts +148 -148
  171. package/lib/controls/popover/popover.component.d.ts +51 -51
  172. package/lib/controls/radio-button/radio-button-option.d.ts +19 -19
  173. package/lib/controls/radio-button/radio-button.component.d.ts +53 -53
  174. package/lib/controls/select/select.component.d.ts +44 -44
  175. package/lib/controls/tabs/tabs.component.d.ts +30 -30
  176. package/lib/controls/textbox/textbox.component.d.ts +107 -107
  177. package/lib/core/cache.service.d.ts +33 -33
  178. package/lib/core/custom-validators.d.ts +20 -20
  179. package/lib/core/date-time-helper.d.ts +101 -101
  180. package/lib/core/error.service.d.ts +20 -20
  181. package/lib/core/router-helper.service.d.ts +48 -48
  182. package/lib/core/scroll.service.d.ts +36 -36
  183. package/lib/core/telemetry-tracker.service.d.ts +13 -13
  184. package/lib/core/telemetry.service.d.ts +31 -31
  185. package/lib/core/validation-message.service.d.ts +26 -26
  186. package/lib/core/validation-patterns.d.ts +22 -22
  187. package/lib/core/window.service.d.ts +116 -116
  188. package/lib/display/app-bar/app-bar.component.d.ts +20 -20
  189. package/lib/display/avatar/avatar.component.d.ts +35 -35
  190. package/lib/display/avatar/avatar.service.d.ts +24 -24
  191. package/lib/display/confirm/confirm.component.d.ts +123 -123
  192. package/lib/display/dialog/dialog-content.d.ts +19 -19
  193. package/lib/display/dialog/dialog-group/dialog-group.component.d.ts +32 -32
  194. package/lib/display/dialog/dialog-types.d.ts +130 -130
  195. package/lib/display/dialog/dialog.component.d.ts +120 -120
  196. package/lib/display/dialog/dialog.service.d.ts +48 -48
  197. package/lib/display/help/help-types.d.ts +33 -33
  198. package/lib/display/hierarchy/hierarchy-base.d.ts +97 -97
  199. package/lib/display/hierarchy/hierarchy-mocks.spec.d.ts +53 -53
  200. package/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.d.ts +34 -34
  201. package/lib/display/item-display/item-display.component.d.ts +43 -43
  202. package/lib/display/json-display/json-display.component.d.ts +16 -16
  203. package/lib/display/resizable/resizable-base.d.ts +67 -67
  204. package/lib/display/resizable/resizable.component.d.ts +31 -31
  205. package/lib/display/spinner/spinner.component.d.ts +5 -5
  206. package/lib/display/splash/splash.component.d.ts +16 -16
  207. package/lib/display/splash/splash.service.d.ts +22 -22
  208. package/lib/display/table/resizable-column.component.d.ts +10 -10
  209. package/lib/display/table/resizable-table.directive.d.ts +93 -93
  210. package/lib/display/table/searchable-table.component.d.ts +206 -206
  211. package/lib/display/table/table-detail-row.component.d.ts +8 -8
  212. package/lib/display/table/table-locked-column.component.d.ts +20 -20
  213. package/lib/display/table/table-master-header-row.component.d.ts +9 -9
  214. package/lib/display/table/table-master-row.component.d.ts +113 -113
  215. package/lib/display/table/table-pagination.component.d.ts +91 -91
  216. package/lib/display/table/table-selectable-row.component.d.ts +102 -102
  217. package/lib/display/table/table.component.d.ts +121 -121
  218. package/lib/display/tags/tag.d.ts +18 -18
  219. package/lib/display/tags/tags.component.d.ts +48 -48
  220. package/lib/display/toast/toast/toast.component.d.ts +23 -23
  221. package/lib/display/toast/toast-types.d.ts +24 -24
  222. package/lib/display/toast/toast.service.d.ts +20 -20
  223. package/lib/display/toast/toaster/toaster.component.d.ts +35 -35
  224. package/lib/display/tooltip/tooltip.component.d.ts +70 -70
  225. package/lib/display/tooltip/tooltip.service.d.ts +16 -16
  226. package/lib/display/tooltip-directive/tooltip.directive.d.ts +44 -44
  227. package/lib/display/tour/tour-types.d.ts +70 -70
  228. package/lib/display/tour/tour.component.d.ts +147 -147
  229. package/lib/display/tour/tour.service.d.ts +38 -38
  230. package/lib/display/tree/tree.component.d.ts +75 -75
  231. package/lib/display/view-overlay/view-overlay.component.d.ts +38 -38
  232. package/lib/shared/directives/click-area-for/click-area-for.directive.d.ts +14 -14
  233. package/lib/shared/directives/if-viewport-width/if-viewport-width.directive.d.ts +60 -60
  234. package/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.d.ts +23 -0
  235. package/lib/shared/directives/popup/popup-container.directive.d.ts +101 -101
  236. package/lib/shared/display/pipes/date-display.pipe.d.ts +21 -21
  237. package/lib/shared/display/pipes/highlight-text.pipe.d.ts +9 -9
  238. package/lib/shared/display/pipes/relative-date.pipe.d.ts +36 -36
  239. package/lib/shared/display/pipes/row-count.pipe.d.ts +23 -23
  240. package/lib/shared/display/pipes/time-display.pipe.d.ts +18 -18
  241. package/lib/shared/display.d.ts +42 -42
  242. package/lib/shared/form-group.helper.d.ts +31 -31
  243. package/lib/shared/json-helper.d.ts +7 -7
  244. package/lib/shared/lodash-helper.d.ts +18 -18
  245. package/lib/shared/page/page-base/page-base.component.d.ts +259 -259
  246. package/lib/shared/page/page-statuses.d.ts +13 -13
  247. package/lib/shared/page/page-title/page-title.component.d.ts +9 -9
  248. package/lib/shared/page/page-view/page-view.component.d.ts +102 -102
  249. package/lib/shared/testing/copy-button-base-test-injector-factory.spec.d.ts +4 -4
  250. package/lib/shared/testing/hierarchy-base-test-injector-factory.spec.d.ts +4 -4
  251. package/lib/shared/testing/page-base-component-test-helper.spec.d.ts +30 -30
  252. package/lib/shared/testing/page-base-component-test-injector-factory.spec.d.ts +28 -28
  253. package/lib/shared/testing/public-mocks.spec.d.ts +90 -90
  254. package/lib/shared/testing/spy-factory.spec.d.ts +27 -27
  255. package/lib/shared/testing/translation-mocks.spec.d.ts +30 -30
  256. package/lib/shared/user-preference.service.d.ts +13 -13
  257. package/lib/shared/wizard/wizard-base/wizard-base.component.d.ts +134 -134
  258. package/lib/shared/wizard/wizard-buttons/wizard-buttons.component.d.ts +27 -27
  259. package/lib/shared/wizard/wizard-progress/wizard-progress.component.d.ts +10 -10
  260. package/package.json +18 -12
  261. package/public-api.d.ts +113 -111
  262. package/schematics/rxjs-7-upgrade/index.d.ts +3 -3
  263. package/schematics/rxjs-7-upgrade/index.js +67 -67
  264. package/schematics/rxjs-7-upgrade/index.js.map +1 -1
  265. package/schematics/rxjs-7-upgrade/schema.d.ts +4 -4
  266. package/schematics/rxjs-7-upgrade/schema.js +2 -2
  267. package/schematics/utilities/typescript.d.ts +7 -7
  268. package/schematics/utilities/typescript.js +41 -41
  269. package/schematics/utilities/workspace.d.ts +8 -8
  270. package/schematics/utilities/workspace.js +71 -71
  271. package/schematics/utilities/workspace.js.map +1 -1
  272. package/src/assets/locales/en_US.json +9 -1
  273. package/esm2022/lib/components.module.mjs +0 -418
  274. package/esm2022/lib/controls/banner/banner.component.mjs +0 -109
  275. package/esm2022/lib/controls/button/button.component.mjs +0 -106
  276. package/esm2022/lib/controls/button/copy-button-base.directive.mjs +0 -67
  277. package/esm2022/lib/controls/button/copy-table-button.directive.mjs +0 -43
  278. package/esm2022/lib/controls/calendar/calendar-item.component.mjs +0 -59
  279. package/esm2022/lib/controls/calendar/calendar.component.mjs +0 -200
  280. package/esm2022/lib/controls/calendar/calendar.types.mjs +0 -4
  281. package/esm2022/lib/controls/checkbox/checkbox.component.mjs +0 -140
  282. package/esm2022/lib/controls/combobox/combobox.component.mjs +0 -879
  283. package/esm2022/lib/controls/date-input/date-input.component.mjs +0 -256
  284. package/esm2022/lib/controls/dropdown/dropdown.component.mjs +0 -243
  285. package/esm2022/lib/controls/file-upload/file-upload.component.mjs +0 -261
  286. package/esm2022/lib/controls/form-control/form-control.component.mjs +0 -104
  287. package/esm2022/lib/controls/form-control-base.mjs +0 -151
  288. package/esm2022/lib/controls/form-control-label/form-control-label.component.mjs +0 -136
  289. package/esm2022/lib/controls/form-group/form-group.component.mjs +0 -261
  290. package/esm2022/lib/controls/item-picker/item-picker.component.mjs +0 -329
  291. package/esm2022/lib/controls/menu/menu.component.mjs +0 -485
  292. package/esm2022/lib/controls/navigation/nav-group.mjs +0 -39
  293. package/esm2022/lib/controls/navigation/nav-item-active.directive.mjs +0 -92
  294. package/esm2022/lib/controls/numericbox/numericbox.component.mjs +0 -372
  295. package/esm2022/lib/controls/popover/popover.component.mjs +0 -117
  296. package/esm2022/lib/controls/radio-button/radio-button.component.mjs +0 -82
  297. package/esm2022/lib/controls/select/select.component.mjs +0 -88
  298. package/esm2022/lib/controls/tabs/tabs.component.mjs +0 -47
  299. package/esm2022/lib/controls/textbox/textbox.component.mjs +0 -155
  300. package/esm2022/lib/core/cache.service.mjs +0 -105
  301. package/esm2022/lib/core/custom-validators.mjs +0 -29
  302. package/esm2022/lib/core/date-time-helper.mjs +0 -220
  303. package/esm2022/lib/core/error.service.mjs +0 -61
  304. package/esm2022/lib/core/router-helper.service.mjs +0 -111
  305. package/esm2022/lib/core/scroll.service.mjs +0 -89
  306. package/esm2022/lib/core/validation-message.service.mjs +0 -185
  307. package/esm2022/lib/core/window.service.mjs +0 -186
  308. package/esm2022/lib/display/app-bar/app-bar.component.mjs +0 -46
  309. package/esm2022/lib/display/avatar/avatar.component.mjs +0 -67
  310. package/esm2022/lib/display/avatar/avatar.service.mjs +0 -64
  311. package/esm2022/lib/display/confirm/confirm.component.mjs +0 -168
  312. package/esm2022/lib/display/dialog/dialog-group/dialog-group.component.mjs +0 -63
  313. package/esm2022/lib/display/dialog/dialog.component.mjs +0 -281
  314. package/esm2022/lib/display/hierarchy/hierarchy-base.mjs +0 -111
  315. package/esm2022/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.mjs +0 -61
  316. package/esm2022/lib/display/item-display/item-display.component.mjs +0 -81
  317. package/esm2022/lib/display/json-display/json-display.component.mjs +0 -47
  318. package/esm2022/lib/display/resizable/resizable-base.mjs +0 -120
  319. package/esm2022/lib/display/splash/splash.component.mjs +0 -42
  320. package/esm2022/lib/display/table/resizable-table.directive.mjs +0 -227
  321. package/esm2022/lib/display/table/searchable-table.component.mjs +0 -342
  322. package/esm2022/lib/display/table/table-locked-column.component.mjs +0 -58
  323. package/esm2022/lib/display/table/table-master-row.component.mjs +0 -163
  324. package/esm2022/lib/display/table/table-pagination.component.mjs +0 -155
  325. package/esm2022/lib/display/table/table-selectable-row.component.mjs +0 -235
  326. package/esm2022/lib/display/table/table.component.mjs +0 -249
  327. package/esm2022/lib/display/tags/tag.mjs +0 -18
  328. package/esm2022/lib/display/tags/tags.component.mjs +0 -77
  329. package/esm2022/lib/display/toast/toast/toast.component.mjs +0 -77
  330. package/esm2022/lib/display/toast/toaster/toaster.component.mjs +0 -114
  331. package/esm2022/lib/display/tooltip-directive/tooltip.directive.mjs +0 -173
  332. package/esm2022/lib/display/tour/tour.component.mjs +0 -398
  333. package/esm2022/lib/display/tour/tour.service.mjs +0 -75
  334. package/esm2022/lib/display/tree/tree.component.mjs +0 -135
  335. package/esm2022/lib/display/view-overlay/view-overlay.component.mjs +0 -58
  336. package/esm2022/lib/shared/directives/click-area-for/click-area-for.directive.mjs +0 -32
  337. package/esm2022/lib/shared/directives/if-viewport-width/if-viewport-width.directive.mjs +0 -111
  338. package/esm2022/lib/shared/directives/popup/popup-container.directive.mjs +0 -166
  339. package/esm2022/lib/shared/display/pipes/date-display.pipe.mjs +0 -50
  340. package/esm2022/lib/shared/display/pipes/highlight-text.pipe.mjs +0 -30
  341. package/esm2022/lib/shared/display/pipes/relative-date.pipe.mjs +0 -62
  342. package/esm2022/lib/shared/display/pipes/row-count.pipe.mjs +0 -48
  343. package/esm2022/lib/shared/display/pipes/time-display.pipe.mjs +0 -41
  344. package/esm2022/lib/shared/display.mjs +0 -6
  345. package/esm2022/lib/shared/form-group.helper.mjs +0 -67
  346. package/esm2022/lib/shared/json-helper.mjs +0 -19
  347. package/esm2022/lib/shared/lodash-helper.mjs +0 -52
  348. package/esm2022/lib/shared/page/page-base/page-base.component.mjs +0 -387
  349. package/esm2022/lib/shared/page/page-view/page-view.component.mjs +0 -147
  350. package/esm2022/lib/shared/testing/page-base-component-test-injector-factory.spec.mjs +0 -98
  351. package/esm2022/lib/shared/wizard/wizard-base/wizard-base.component.mjs +0 -246
  352. package/esm2022/public-api.mjs +0 -115
  353. package/fesm2022/energycap-components.mjs.map +0 -1
@@ -1,161 +1,161 @@
1
- import { AfterViewInit, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
2
- import { PopupStatus } from '../../shared/directives/popup/popup-container.directive';
3
- import { DisplayStatus } from '../../shared/display';
4
- import { ButtonComponent, ButtonType } from '../button/button.component';
5
- import { MenuItem, MenuTemplateType } from '../menu/menu.component';
6
- import * as i0 from "@angular/core";
7
- export declare class DropdownComponent implements OnInit, AfterViewInit, OnDestroy {
8
- /**
9
- * Base id for the component's sub-elements
10
- */
11
- id?: string;
12
- /**
13
- * Automatically focus the dropdown toggle button
14
- */
15
- autofocus: boolean;
16
- /**
17
- * Controls the display status overlay for the menu
18
- */
19
- status?: DisplayStatus;
20
- /**
21
- * Disable the button to prevent the menu from being opened
22
- */
23
- disabled: boolean;
24
- /**
25
- * Optional label for the button
26
- */
27
- label?: string;
28
- /**
29
- * Optional icon for the button
30
- */
31
- icon?: string;
32
- /**
33
- * The button type, defaults to icon
34
- */
35
- buttonType?: ButtonType;
36
- /**
37
- * Optionally align the label of the button to the left or right. If not set,
38
- * will be centered.
39
- */
40
- buttonAlignment?: 'left' | 'right';
41
- /**
42
- * Adds a tooltip to the dropdown toggle button. Should only be used when
43
- * the toggle buttonType is 'icon'
44
- */
45
- buttonTitle: string;
46
- /**
47
- * The tabindex of the button
48
- */
49
- tabindex?: number;
50
- /**
51
- * Display a caret with the button label or icon
52
- */
53
- showArrow: boolean;
54
- /**
55
- * Items to display in the menu
56
- */
57
- items: MenuItem[];
58
- /**
59
- * The menu item template
60
- */
61
- menuTemplateType: MenuTemplateType;
62
- /**
63
- * Display a header on the menu
64
- * @deprecated use first menu item with display set to 'heading' instead
65
- */
66
- menuTitle?: string;
67
- /**
68
- * Set a fixed height for the menu, auto by default
69
- */
70
- menuHeight?: number;
71
- /**
72
- * Set a fixed width in pixels for the menu, auto by default
73
- */
74
- menuWidth?: number;
75
- /**
76
- * Set a min-width in pixels on the menu. It will expand if the content is greater than the min-width
77
- */
78
- menuMinWidth?: number;
79
- /**
80
- * Pin the menu to the left or right of the button. Right by default
81
- */
82
- menuPosition?: 'left' | 'right';
83
- /**
84
- * Sticky footer to display at the bottom of the popup menu
85
- */
86
- menuFooter?: string;
87
- /**
88
- * Fix position the menu instead of absolute. Useful when the dropdown is in a
89
- * dialog
90
- */
91
- popupFixed: boolean;
92
- /**
93
- * Pass a custom template to the toggle button
94
- */
95
- buttonCustomTemplate?: TemplateRef<any>;
96
- /**
97
- * Used to set the menu buttons state to pending
98
- */
99
- pending: boolean;
100
- /**
101
- * Emits an event when a menu item is selected
102
- */
103
- itemSelected: EventEmitter<MenuItem>;
104
- /**
105
- * Emits an event when the popup menu opens
106
- */
107
- popupOpened: EventEmitter<void>;
108
- /**
109
- * The status of the menu
110
- */
111
- menuStatus: PopupStatus;
112
- /** Item to highlight when the menu is opened, used when the user
113
- * opens the menu via the keyboard
114
- */
115
- highlightedItem: MenuItem | null;
116
- /** Used to know if the menu was toggled via the keyboard */
117
- private isKeyboardEvent;
118
- /**
119
- * Internal reference to the menu element
120
- */
121
- private menuEl;
122
- /**
123
- * Internal reference to the popup directive
124
- */
125
- private popup;
126
- /**
127
- * Get a reference to the toggle button
128
- */
129
- dropdownToggleButton: ButtonComponent;
130
- /**
131
- * Unsubscribe any active subscriptions when the component is destroyed
132
- */
133
- private componentDestroyed;
134
- constructor();
135
- /**
136
- * Subscribe to changes to the menu status
137
- */
138
- ngOnInit(): void;
139
- /**
140
- * Set up the popup
141
- */
142
- ngAfterViewInit(): void;
143
- /**
144
- * Unsubscribe to any active subscriptions
145
- */
146
- ngOnDestroy(): void;
147
- /**
148
- * Open and close the menu
149
- */
150
- toggleMenu(event?: Event): void;
151
- /**
152
- * Emit the selected item when it changes and close the menu
153
- */
154
- selectedChanged(item: MenuItem): void;
155
- /**
156
- * Closes the menu if the tab key is pressed
157
- */
158
- keyNavigate(event: KeyboardEvent): void;
159
- static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
160
- static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "ec-dropdown", never, { "id": { "alias": "id"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "status": { "alias": "status"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "buttonType": { "alias": "buttonType"; "required": false; }; "buttonAlignment": { "alias": "buttonAlignment"; "required": false; }; "buttonTitle": { "alias": "buttonTitle"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "showArrow": { "alias": "showArrow"; "required": false; }; "items": { "alias": "items"; "required": false; }; "menuTemplateType": { "alias": "menuTemplateType"; "required": false; }; "menuTitle": { "alias": "menuTitle"; "required": false; }; "menuHeight": { "alias": "menuHeight"; "required": false; }; "menuWidth": { "alias": "menuWidth"; "required": false; }; "menuMinWidth": { "alias": "menuMinWidth"; "required": false; }; "menuPosition": { "alias": "menuPosition"; "required": false; }; "menuFooter": { "alias": "menuFooter"; "required": false; }; "popupFixed": { "alias": "popupFixed"; "required": false; }; "buttonCustomTemplate": { "alias": "buttonCustomTemplate"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; }, { "itemSelected": "itemSelected"; "popupOpened": "popupOpened"; }, never, never, false, never>;
161
- }
1
+ import { AfterViewInit, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
2
+ import { PopupStatus } from '../../shared/directives/popup/popup-container.directive';
3
+ import { DisplayStatus } from '../../shared/display';
4
+ import { ButtonComponent, ButtonType } from '../button/button.component';
5
+ import { MenuItem, MenuTemplateType } from '../menu/menu.component';
6
+ import * as i0 from "@angular/core";
7
+ export declare class DropdownComponent implements OnInit, AfterViewInit, OnDestroy {
8
+ /**
9
+ * Base id for the component's sub-elements
10
+ */
11
+ id?: string;
12
+ /**
13
+ * Automatically focus the dropdown toggle button
14
+ */
15
+ autofocus: boolean;
16
+ /**
17
+ * Controls the display status overlay for the menu
18
+ */
19
+ status?: DisplayStatus;
20
+ /**
21
+ * Disable the button to prevent the menu from being opened
22
+ */
23
+ disabled: boolean;
24
+ /**
25
+ * Optional label for the button
26
+ */
27
+ label?: string;
28
+ /**
29
+ * Optional icon for the button
30
+ */
31
+ icon?: string;
32
+ /**
33
+ * The button type, defaults to icon
34
+ */
35
+ buttonType?: ButtonType;
36
+ /**
37
+ * Optionally align the label of the button to the left or right. If not set,
38
+ * will be centered.
39
+ */
40
+ buttonAlignment?: 'left' | 'right';
41
+ /**
42
+ * Adds a tooltip to the dropdown toggle button. Should only be used when
43
+ * the toggle buttonType is 'icon'
44
+ */
45
+ buttonTitle: string;
46
+ /**
47
+ * The tabindex of the button
48
+ */
49
+ tabindex?: number;
50
+ /**
51
+ * Display a caret with the button label or icon
52
+ */
53
+ showArrow: boolean;
54
+ /**
55
+ * Items to display in the menu
56
+ */
57
+ items: MenuItem[];
58
+ /**
59
+ * The menu item template
60
+ */
61
+ menuTemplateType: MenuTemplateType;
62
+ /**
63
+ * Display a header on the menu
64
+ * @deprecated use first menu item with display set to 'heading' instead
65
+ */
66
+ menuTitle?: string;
67
+ /**
68
+ * Set a fixed height for the menu, auto by default
69
+ */
70
+ menuHeight?: number;
71
+ /**
72
+ * Set a fixed width in pixels for the menu, auto by default
73
+ */
74
+ menuWidth?: number;
75
+ /**
76
+ * Set a min-width in pixels on the menu. It will expand if the content is greater than the min-width
77
+ */
78
+ menuMinWidth?: number;
79
+ /**
80
+ * Pin the menu to the left or right of the button. Right by default
81
+ */
82
+ menuPosition?: 'left' | 'right';
83
+ /**
84
+ * Sticky footer to display at the bottom of the popup menu
85
+ */
86
+ menuFooter?: string;
87
+ /**
88
+ * Fix position the menu instead of absolute. Useful when the dropdown is in a
89
+ * dialog
90
+ */
91
+ popupFixed: boolean;
92
+ /**
93
+ * Pass a custom template to the toggle button
94
+ */
95
+ buttonCustomTemplate?: TemplateRef<any>;
96
+ /**
97
+ * Used to set the menu buttons state to pending
98
+ */
99
+ pending: boolean;
100
+ /**
101
+ * Emits an event when a menu item is selected
102
+ */
103
+ itemSelected: EventEmitter<MenuItem>;
104
+ /**
105
+ * Emits an event when the popup menu opens
106
+ */
107
+ popupOpened: EventEmitter<void>;
108
+ /**
109
+ * The status of the menu
110
+ */
111
+ menuStatus: PopupStatus;
112
+ /** Item to highlight when the menu is opened, used when the user
113
+ * opens the menu via the keyboard
114
+ */
115
+ highlightedItem: MenuItem | null;
116
+ /** Used to know if the menu was toggled via the keyboard */
117
+ private isKeyboardEvent;
118
+ /**
119
+ * Internal reference to the menu element
120
+ */
121
+ private menuEl;
122
+ /**
123
+ * Internal reference to the popup directive
124
+ */
125
+ private popup;
126
+ /**
127
+ * Get a reference to the toggle button
128
+ */
129
+ dropdownToggleButton: ButtonComponent;
130
+ /**
131
+ * Unsubscribe any active subscriptions when the component is destroyed
132
+ */
133
+ private componentDestroyed;
134
+ constructor();
135
+ /**
136
+ * Subscribe to changes to the menu status
137
+ */
138
+ ngOnInit(): void;
139
+ /**
140
+ * Set up the popup
141
+ */
142
+ ngAfterViewInit(): void;
143
+ /**
144
+ * Unsubscribe to any active subscriptions
145
+ */
146
+ ngOnDestroy(): void;
147
+ /**
148
+ * Open and close the menu
149
+ */
150
+ toggleMenu(event?: Event): void;
151
+ /**
152
+ * Emit the selected item when it changes and close the menu
153
+ */
154
+ selectedChanged(item: MenuItem): void;
155
+ /**
156
+ * Closes the menu if the tab key is pressed
157
+ */
158
+ keyNavigate(event: KeyboardEvent): void;
159
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
160
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "ec-dropdown", never, { "id": "id"; "autofocus": "autofocus"; "status": "status"; "disabled": "disabled"; "label": "label"; "icon": "icon"; "buttonType": "buttonType"; "buttonAlignment": "buttonAlignment"; "buttonTitle": "buttonTitle"; "tabindex": "tabindex"; "showArrow": "showArrow"; "items": "items"; "menuTemplateType": "menuTemplateType"; "menuTitle": "menuTitle"; "menuHeight": "menuHeight"; "menuWidth": "menuWidth"; "menuMinWidth": "menuMinWidth"; "menuPosition": "menuPosition"; "menuFooter": "menuFooter"; "popupFixed": "popupFixed"; "buttonCustomTemplate": "buttonCustomTemplate"; "pending": "pending"; }, { "itemSelected": "itemSelected"; "popupOpened": "popupOpened"; }, never, never, false, never>;
161
+ }
@@ -1,124 +1,124 @@
1
- import { ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { AsyncValidatorFn, FormControl, FormGroup, ValidatorFn } from '@angular/forms';
3
- import { ValidationMessageService } from '../../core/validation-message.service';
4
- import { FormGroupHelper } from '../../shared/form-group.helper';
5
- import { FormControlBase } from '../form-control-base';
6
- import * as i0 from "@angular/core";
7
- export type FileType = 'zip' | 'excel' | 'custom';
8
- export type FileOutput = 'raw' | 'base64';
9
- export declare const FileTypeExtensions: {
10
- zip: string[];
11
- excel: string[];
12
- };
13
- export type FileUploadFormGroup = {
14
- file: FormControl<File | null>;
15
- name: FormControl<string | null>;
16
- base64FileString: FormControl<string | null>;
17
- uploadResult: FormControl<any>;
18
- };
19
- export type InvalidFileError = {
20
- invalidFile: true;
21
- };
22
- export type FileValidatorCallback = (file: File | null | undefined, base64: string | null | undefined) => Promise<InvalidFileError | null>;
23
- export declare class FileUploadComponent extends FormControlBase implements OnInit, OnChanges {
24
- protected validationMessageService: ValidationMessageService;
25
- protected formGroupHelper: FormGroupHelper;
26
- static getFormModel(validators: ValidatorFn[], disabled?: boolean,
27
- /** 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. */
28
- fileValidators?: AsyncValidatorFn | AsyncValidatorFn[]): FormGroup<FileUploadFormGroup>;
29
- /**
30
- * Helper function that returns an async validator to be used with the file upload control.
31
- * This is useful for when the file needs to be validated before it can be uploaded.
32
- *
33
- * @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.
34
- * base64 is null if the fileOutput input on the FileUploadComponent is set to raw. Using fileOutput set to base64 is recommended for images.
35
- */
36
- static getFileValidator(callback: FileValidatorCallback): AsyncValidatorFn;
37
- formModel: FormGroup<FileUploadFormGroup>;
38
- /**
39
- * The value of the textbox input's placeholder
40
- */
41
- placeholder?: string;
42
- /** Common extensions for a file browsing dialog
43
- * Note: Edge does not support the accept attribute on file inputs, therefor all file types
44
- * will be shown. Firefox and Chrome both support this feature.
45
- */
46
- fileType?: FileType | undefined;
47
- /**
48
- * File output, determines which properties are supplied on the formModel
49
- */
50
- fileOutput?: FileOutput;
51
- /** If fileType is set to custom set the acceptable file types based on the custom array */
52
- customExtensions?: Array<string> | undefined;
53
- /**
54
- * Optional callback supported if the hosting page needs to process the file before
55
- * setting the formModel with the file information. If the promise resolves it will continue
56
- * and set the file name and contents to the formModel, otherwise on failure it'll do nothing.
57
- */
58
- onFileSelected?: (file: File) => Promise<any>;
59
- /**
60
- * Optional callback supported for when the hosting page needs to process multiple files
61
- * We simply map the FileList to an array of File objects and pass that array to the
62
- * callback and let the hosting page handle the processing
63
- */
64
- onMultipleFilesSelected?: (files: File[]) => Promise<any>;
65
- /**
66
- * Optional display type that controls whether the file input textbox is displayed or
67
- * simply a button the user clicks to launch the OS file storage dialog.
68
- * Default: file
69
- */
70
- displayType?: 'file' | 'button';
71
- /**
72
- * When display type is set to button this property will control the button label
73
- */
74
- buttonLabel?: string;
75
- /**
76
- * When display type is set to button this property will control the button type
77
- */
78
- buttonType?: string;
79
- /**
80
- * Optional property to control whether the user can select multiple files
81
- */
82
- multiSelect?: boolean;
83
- /**
84
- * When true, the onFileSelected callback will not be called if the form is invalid.
85
- * This is useful when the file needs to be validated before it can be uploaded.
86
- * For server-side validation, leave this as false and use the onFileSelected callback
87
- * to upload the file and handle any errors thrown by the API.
88
- */
89
- validateBeforeUpload: boolean;
90
- fileInput?: ElementRef;
91
- /** Property bound to the file input to filter what file types are shown in the dialog */
92
- fileTypeAccept: string | undefined;
93
- constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper);
94
- ngOnChanges(changes: SimpleChanges): void;
95
- ngOnInit(): void;
96
- fileChange(files: FileList): Promise<void>;
97
- /**
98
- * Checks the file type and updates the file type accept property. This is what determines the file
99
- * type choices that the user will be limited to in the file browse dialog
100
- */
101
- private updateFileTypeAccept;
102
- /**
103
- * Take a file that was selected by the user and process/patch our form model
104
- * If the host component requires an action to occur with the file prior to the patch it will call
105
- * and wait for it to return.
106
- * @param file
107
- * @param base64FileString Optional: Will have a value provided if the fileOutput is set to base64
108
- */
109
- private processFile;
110
- /** Patches the form with the selected file in order to trigger control validation */
111
- private validateFile;
112
- /**
113
- * Based on the fileOutput return whether this component is expected to deliver a base64 output
114
- * @returns
115
- */
116
- private isBase64FileOutput;
117
- /** Maps the files to an array of File objects and sends them along
118
- * to the derived onMultipleFileSelected method in the hosting component
119
- */
120
- private handleMultipleFiles;
121
- private readFile;
122
- static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
123
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "formModel": { "alias": "formModel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "fileType": { "alias": "fileType"; "required": false; }; "fileOutput": { "alias": "fileOutput"; "required": false; }; "customExtensions": { "alias": "customExtensions"; "required": false; }; "onFileSelected": { "alias": "onFileSelected"; "required": false; }; "onMultipleFilesSelected": { "alias": "onMultipleFilesSelected"; "required": false; }; "displayType": { "alias": "displayType"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "buttonType": { "alias": "buttonType"; "required": false; }; "multiSelect": { "alias": "multiSelect"; "required": false; }; "validateBeforeUpload": { "alias": "validateBeforeUpload"; "required": false; }; }, {}, never, never, false, never>;
124
- }
1
+ import { ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { AsyncValidatorFn, FormControl, FormGroup, ValidatorFn } from '@angular/forms';
3
+ import { ValidationMessageService } from '../../core/validation-message.service';
4
+ import { FormGroupHelper } from '../../shared/form-group.helper';
5
+ import { FormControlBase } from '../form-control-base';
6
+ import * as i0 from "@angular/core";
7
+ export type FileType = 'zip' | 'excel' | 'custom';
8
+ export type FileOutput = 'raw' | 'base64';
9
+ export declare const FileTypeExtensions: {
10
+ zip: string[];
11
+ excel: string[];
12
+ };
13
+ export type FileUploadFormGroup = {
14
+ file: FormControl<File | null>;
15
+ name: FormControl<string | null>;
16
+ base64FileString: FormControl<string | null>;
17
+ uploadResult: FormControl<any>;
18
+ };
19
+ export type InvalidFileError = {
20
+ invalidFile: true;
21
+ };
22
+ export type FileValidatorCallback = (file: File | null | undefined, base64: string | null | undefined) => Promise<InvalidFileError | null>;
23
+ export declare class FileUploadComponent extends FormControlBase implements OnInit, OnChanges {
24
+ protected validationMessageService: ValidationMessageService;
25
+ protected formGroupHelper: FormGroupHelper;
26
+ static getFormModel(validators: ValidatorFn[], disabled?: boolean,
27
+ /** 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. */
28
+ fileValidators?: AsyncValidatorFn | AsyncValidatorFn[]): FormGroup<FileUploadFormGroup>;
29
+ /**
30
+ * Helper function that returns an async validator to be used with the file upload control.
31
+ * This is useful for when the file needs to be validated before it can be uploaded.
32
+ *
33
+ * @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.
34
+ * base64 is null if the fileOutput input on the FileUploadComponent is set to raw. Using fileOutput set to base64 is recommended for images.
35
+ */
36
+ static getFileValidator(callback: FileValidatorCallback): AsyncValidatorFn;
37
+ formModel: FormGroup<FileUploadFormGroup>;
38
+ /**
39
+ * The value of the textbox input's placeholder
40
+ */
41
+ placeholder?: string;
42
+ /** Common extensions for a file browsing dialog
43
+ * Note: Edge does not support the accept attribute on file inputs, therefor all file types
44
+ * will be shown. Firefox and Chrome both support this feature.
45
+ */
46
+ fileType?: FileType | undefined;
47
+ /**
48
+ * File output, determines which properties are supplied on the formModel
49
+ */
50
+ fileOutput?: FileOutput;
51
+ /** If fileType is set to custom set the acceptable file types based on the custom array */
52
+ customExtensions?: Array<string> | undefined;
53
+ /**
54
+ * Optional callback supported if the hosting page needs to process the file before
55
+ * setting the formModel with the file information. If the promise resolves it will continue
56
+ * and set the file name and contents to the formModel, otherwise on failure it'll do nothing.
57
+ */
58
+ onFileSelected?: (file: File) => Promise<any>;
59
+ /**
60
+ * Optional callback supported for when the hosting page needs to process multiple files
61
+ * We simply map the FileList to an array of File objects and pass that array to the
62
+ * callback and let the hosting page handle the processing
63
+ */
64
+ onMultipleFilesSelected?: (files: File[]) => Promise<any>;
65
+ /**
66
+ * Optional display type that controls whether the file input textbox is displayed or
67
+ * simply a button the user clicks to launch the OS file storage dialog.
68
+ * Default: file
69
+ */
70
+ displayType?: 'file' | 'button';
71
+ /**
72
+ * When display type is set to button this property will control the button label
73
+ */
74
+ buttonLabel?: string;
75
+ /**
76
+ * When display type is set to button this property will control the button type
77
+ */
78
+ buttonType?: string;
79
+ /**
80
+ * Optional property to control whether the user can select multiple files
81
+ */
82
+ multiSelect?: boolean;
83
+ /**
84
+ * When true, the onFileSelected callback will not be called if the form is invalid.
85
+ * This is useful when the file needs to be validated before it can be uploaded.
86
+ * For server-side validation, leave this as false and use the onFileSelected callback
87
+ * to upload the file and handle any errors thrown by the API.
88
+ */
89
+ validateBeforeUpload: boolean;
90
+ fileInput?: ElementRef;
91
+ /** Property bound to the file input to filter what file types are shown in the dialog */
92
+ fileTypeAccept: string | undefined;
93
+ constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper);
94
+ ngOnChanges(changes: SimpleChanges): void;
95
+ ngOnInit(): void;
96
+ fileChange(files: FileList): Promise<void>;
97
+ /**
98
+ * Checks the file type and updates the file type accept property. This is what determines the file
99
+ * type choices that the user will be limited to in the file browse dialog
100
+ */
101
+ private updateFileTypeAccept;
102
+ /**
103
+ * Take a file that was selected by the user and process/patch our form model
104
+ * If the host component requires an action to occur with the file prior to the patch it will call
105
+ * and wait for it to return.
106
+ * @param file
107
+ * @param base64FileString Optional: Will have a value provided if the fileOutput is set to base64
108
+ */
109
+ private processFile;
110
+ /** Patches the form with the selected file in order to trigger control validation */
111
+ private validateFile;
112
+ /**
113
+ * Based on the fileOutput return whether this component is expected to deliver a base64 output
114
+ * @returns
115
+ */
116
+ private isBase64FileOutput;
117
+ /** Maps the files to an array of File objects and sends them along
118
+ * to the derived onMultipleFileSelected method in the hosting component
119
+ */
120
+ private handleMultipleFiles;
121
+ private readFile;
122
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
123
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "formModel": "formModel"; "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "onMultipleFilesSelected": "onMultipleFilesSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "buttonType": "buttonType"; "multiSelect": "multiSelect"; "validateBeforeUpload": "validateBeforeUpload"; }, {}, never, never, false, never>;
124
+ }
@@ -1,30 +1,28 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
- import { AbstractControl } from '@angular/forms';
3
- import * as i0 from "@angular/core";
4
- export declare class FormControlComponent implements OnChanges, AfterViewInit {
5
- private el;
6
- formControlDirective?: AbstractControl;
7
- id: string;
8
- icon?: string;
9
- actionIcon?: string;
10
- showClear: boolean;
11
- formModelInput?: AbstractControl;
12
- autofocus: boolean;
13
- pending: boolean;
14
- required: boolean;
15
- readonly: boolean;
16
- get empty(): boolean;
17
- get invalid(): boolean;
18
- get disabled(): boolean;
19
- actionClicked: EventEmitter<Event>;
20
- actionKeydown: EventEmitter<KeyboardEvent>;
21
- private _formModel?;
22
- constructor(el: ElementRef);
23
- ngOnChanges(changes: SimpleChanges): void;
24
- ngAfterViewInit(): void;
25
- onClick(): void;
26
- focus(): void;
27
- clear(): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<FormControlComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<FormControlComponent, "ec-form-control", never, { "id": { "alias": "id"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actionIcon": { "alias": "actionIcon"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "formModelInput": { "alias": "formModel"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "actionClicked": "actionClicked"; "actionKeydown": "actionKeydown"; }, ["formControlDirective"], ["*"], false, never>;
30
- }
1
+ import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FormControlComponent implements AfterViewInit {
5
+ private el;
6
+ formControlDirective?: AbstractControl;
7
+ id: string;
8
+ icon?: string;
9
+ actionIcon?: string;
10
+ showClear: boolean;
11
+ formModelInput?: AbstractControl;
12
+ autofocus: boolean;
13
+ pending: boolean;
14
+ required: boolean;
15
+ readonly: boolean;
16
+ get empty(): boolean;
17
+ get invalid(): boolean;
18
+ get disabled(): boolean;
19
+ actionClicked: EventEmitter<Event>;
20
+ private get _formModel();
21
+ constructor(el: ElementRef);
22
+ ngAfterViewInit(): void;
23
+ onClick(): void;
24
+ focus(): void;
25
+ clear(): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormControlComponent, "ec-form-control", never, { "id": "id"; "icon": "icon"; "actionIcon": "actionIcon"; "showClear": "showClear"; "formModelInput": "formModel"; "autofocus": "autofocus"; "pending": "pending"; "required": "required"; "readonly": "readonly"; }, { "actionClicked": "actionClicked"; }, ["formControlDirective"], ["*"], false, never>;
28
+ }