@energinet/watt 2.0.13 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/badge/energinet-watt-badge.d.ts +5 -0
  2. package/breadcrumbs/energinet-watt-breadcrumbs.d.ts +5 -0
  3. package/button/energinet-watt-button.d.ts +5 -0
  4. package/card/energinet-watt-card.d.ts +5 -0
  5. package/checkbox/energinet-watt-checkbox.d.ts +5 -0
  6. package/chip/energinet-watt-chip.d.ts +5 -0
  7. package/clipboard/energinet-watt-clipboard.d.ts +5 -0
  8. package/code/energinet-watt-code.d.ts +5 -0
  9. package/core/breakpoints/breakpoints-observer.d.ts +1 -19
  10. package/core/breakpoints/energinet-watt-core-breakpoints.d.ts +5 -0
  11. package/core/color/color-helper.service.d.ts +2 -4
  12. package/core/color/energinet-watt-core-color.d.ts +5 -0
  13. package/core/date/energinet-watt-core-date.d.ts +5 -0
  14. package/core/date/watt-locale.service.d.ts +1 -3
  15. package/data/energinet-watt-data.d.ts +5 -0
  16. package/datetime-field/energinet-watt-datetime-field.d.ts +5 -0
  17. package/description-list/energinet-watt-description-list.d.ts +5 -0
  18. package/drawer/energinet-watt-drawer.d.ts +5 -0
  19. package/dropdown/energinet-watt-dropdown.d.ts +5 -0
  20. package/dropzone/energinet-watt-dropzone.d.ts +5 -0
  21. package/empty-state/energinet-watt-empty-state.d.ts +5 -0
  22. package/energinet-watt.d.ts +5 -0
  23. package/esm2022/badge/energinet-watt-badge.js +5 -0
  24. package/esm2022/badge/index.js +20 -0
  25. package/{fesm2022/energinet-watt-badge.mjs → esm2022/badge/watt-badge.component.js} +7 -33
  26. package/esm2022/breadcrumbs/energinet-watt-breadcrumbs.js +5 -0
  27. package/esm2022/breadcrumbs/index.js +20 -0
  28. package/esm2022/breadcrumbs/watt-breadcrumbs.component.js +90 -0
  29. package/esm2022/button/energinet-watt-button.js +5 -0
  30. package/esm2022/button/index.js +20 -0
  31. package/{fesm2022/energinet-watt-button.mjs → esm2022/button/watt-button.component.js} +14 -40
  32. package/esm2022/card/energinet-watt-card.js +5 -0
  33. package/esm2022/card/index.js +21 -0
  34. package/esm2022/card/watt-card-title.component.js +33 -0
  35. package/esm2022/card/watt-card.component.js +61 -0
  36. package/esm2022/checkbox/energinet-watt-checkbox.js +5 -0
  37. package/esm2022/checkbox/index.js +20 -0
  38. package/{fesm2022/energinet-watt-checkbox.mjs → esm2022/checkbox/watt-checkbox.component.js} +9 -35
  39. package/esm2022/chip/energinet-watt-chip.js +5 -0
  40. package/esm2022/chip/index.js +26 -0
  41. package/esm2022/chip/watt-action-chip.component.js +68 -0
  42. package/esm2022/chip/watt-chip.component.js +55 -0
  43. package/esm2022/chip/watt-chip.directive.js +92 -0
  44. package/esm2022/chip/watt-date-chip.component.js +118 -0
  45. package/esm2022/chip/watt-date-range-chip.component.js +240 -0
  46. package/esm2022/chip/watt-filter-chip.component.js +94 -0
  47. package/esm2022/chip/watt-menu-chip.component.js +95 -0
  48. package/esm2022/clipboard/energinet-watt-clipboard.js +5 -0
  49. package/esm2022/clipboard/index.js +21 -0
  50. package/esm2022/clipboard/watt-clipboard-intl.service.js +31 -0
  51. package/esm2022/clipboard/watt-copy-to-clipboard.directive.js +64 -0
  52. package/esm2022/code/energinet-watt-code.js +5 -0
  53. package/esm2022/code/index.js +21 -0
  54. package/esm2022/code/watt-code.component.js +74 -0
  55. package/esm2022/code/watt-code.worker.token.js +21 -0
  56. package/esm2022/core/breakpoints/breakpoints-observer.js +41 -0
  57. package/esm2022/core/breakpoints/breakpoints.js +31 -0
  58. package/esm2022/core/breakpoints/energinet-watt-core-breakpoints.js +5 -0
  59. package/esm2022/core/breakpoints/index.js +21 -0
  60. package/esm2022/core/color/color-helper.service.js +41 -0
  61. package/esm2022/core/color/colors.js +58 -0
  62. package/esm2022/core/color/energinet-watt-core-color.js +5 -0
  63. package/esm2022/core/color/index.js +21 -0
  64. package/esm2022/core/date/dayjs.js +34 -0
  65. package/esm2022/core/date/energinet-watt-core-date.js +5 -0
  66. package/esm2022/core/date/index.js +25 -0
  67. package/esm2022/core/date/watt-danish-datetime.providers.js +31 -0
  68. package/esm2022/core/date/watt-date-adapter.js +43 -0
  69. package/esm2022/core/date/watt-date-range.js +2 -0
  70. package/esm2022/core/date/watt-date.pipe.js +38 -0
  71. package/esm2022/core/date/watt-format-date.js +50 -0
  72. package/esm2022/core/date/watt-locale.service.js +48 -0
  73. package/esm2022/data/energinet-watt-data.js +5 -0
  74. package/esm2022/data/index.js +23 -0
  75. package/esm2022/data/watt-data-actions.component.js +32 -0
  76. package/esm2022/data/watt-data-filters.component.js +32 -0
  77. package/esm2022/data/watt-data-intl.service.js +39 -0
  78. package/{fesm2022/energinet-watt-data.mjs → esm2022/data/watt-data-table.component.js} +15 -137
  79. package/esm2022/datetime-field/energinet-watt-datetime-field.js +5 -0
  80. package/esm2022/datetime-field/index.js +20 -0
  81. package/esm2022/datetime-field/watt-datetime-field.component.js +207 -0
  82. package/esm2022/description-list/energinet-watt-description-list.js +5 -0
  83. package/esm2022/description-list/index.js +20 -0
  84. package/esm2022/description-list/watt-description-list-item.component.js +49 -0
  85. package/{fesm2022/energinet-watt-description-list.mjs → esm2022/description-list/watt-description-list.component.js} +10 -79
  86. package/esm2022/drawer/energinet-watt-drawer.js +5 -0
  87. package/esm2022/drawer/index.js +24 -0
  88. package/esm2022/drawer/watt-drawer-actions.component.js +29 -0
  89. package/esm2022/drawer/watt-drawer-content.component.js +29 -0
  90. package/esm2022/drawer/watt-drawer-heading.component.js +29 -0
  91. package/esm2022/drawer/watt-drawer-topbar.component.js +29 -0
  92. package/esm2022/drawer/watt-drawer.component.js +177 -0
  93. package/esm2022/dropdown/energinet-watt-dropdown.js +5 -0
  94. package/esm2022/dropdown/index.js +20 -0
  95. package/esm2022/dropdown/watt-dropdown-option.js +2 -0
  96. package/esm2022/dropdown/watt-dropdown-value.js +2 -0
  97. package/esm2022/dropdown/watt-dropdown.component.js +396 -0
  98. package/esm2022/dropzone/energinet-watt-dropzone.js +5 -0
  99. package/esm2022/dropzone/index.js +22 -0
  100. package/esm2022/dropzone/watt-dropzone-intl.js +35 -0
  101. package/esm2022/dropzone/watt-dropzone-validators.js +67 -0
  102. package/esm2022/dropzone/watt-dropzone.js +179 -0
  103. package/esm2022/empty-state/energinet-watt-empty-state.js +5 -0
  104. package/esm2022/empty-state/icons/explore.js +54 -0
  105. package/esm2022/empty-state/icons/no-results.js +62 -0
  106. package/esm2022/empty-state/icons/power.js +46 -0
  107. package/esm2022/empty-state/index.js +23 -0
  108. package/esm2022/empty-state/watt-empty-state.component.js +120 -0
  109. package/esm2022/energinet-watt.js +5 -0
  110. package/esm2022/expandable-card/energinet-watt-expandable-card.js +5 -0
  111. package/esm2022/expandable-card/index.js +26 -0
  112. package/{fesm2022/energinet-watt-expandable-card.mjs → esm2022/expandable-card/watt-expandable-card.component.js} +18 -49
  113. package/esm2022/expansion/energinet-watt-expansion.js +5 -0
  114. package/{fesm2022/energinet-watt-expansion.mjs → esm2022/expansion/expansion.component.js} +10 -36
  115. package/esm2022/expansion/index.js +20 -0
  116. package/esm2022/field/energinet-watt-field.js +5 -0
  117. package/esm2022/field/index.js +23 -0
  118. package/esm2022/field/watt-field-error.component.js +29 -0
  119. package/esm2022/field/watt-field-hint.component.js +29 -0
  120. package/esm2022/field/watt-field-intl.service.js +32 -0
  121. package/{fesm2022/energinet-watt-field.mjs → esm2022/field/watt-field.component.js} +17 -125
  122. package/esm2022/icon/energinet-watt-icon.js +5 -0
  123. package/esm2022/icon/flags/energinet-watt-icon-flags.js +5 -0
  124. package/esm2022/icon/flags/index.js +26 -0
  125. package/esm2022/icon/flags/watt-flag-ch.js +52 -0
  126. package/esm2022/icon/flags/watt-flag-de.js +44 -0
  127. package/esm2022/icon/flags/watt-flag-dk.js +44 -0
  128. package/esm2022/icon/flags/watt-flag-fi.js +44 -0
  129. package/esm2022/icon/flags/watt-flag-nl.js +44 -0
  130. package/esm2022/icon/flags/watt-flag-no.js +48 -0
  131. package/esm2022/icon/flags/watt-flag-pl.js +46 -0
  132. package/esm2022/icon/flags/watt-flag-se.js +42 -0
  133. package/esm2022/icon/flags/watt-flag.js +116 -0
  134. package/{fesm2022/energinet-watt-icon.mjs → esm2022/icon/icon.component.js} +9 -131
  135. package/esm2022/icon/icons.js +97 -0
  136. package/esm2022/icon/index.js +20 -0
  137. package/esm2022/index.js +25 -0
  138. package/esm2022/modal/energinet-watt-modal.js +5 -0
  139. package/esm2022/modal/index.js +21 -0
  140. package/{fesm2022/energinet-watt-modal.mjs → esm2022/modal/watt-modal.component.js} +19 -127
  141. package/esm2022/modal/watt-modal.service.js +86 -0
  142. package/esm2022/paginator/energinet-watt-paginator.js +5 -0
  143. package/esm2022/paginator/index.js +21 -0
  144. package/esm2022/paginator/watt-paginator-intl.service.js +38 -0
  145. package/esm2022/paginator/watt-paginator.component.js +104 -0
  146. package/esm2022/phone-field/energinet-watt-phone-field.js +5 -0
  147. package/esm2022/phone-field/index.js +21 -0
  148. package/esm2022/phone-field/watt-phone-field-intl.service.js +40 -0
  149. package/esm2022/phone-field/watt-phone-field.component.js +262 -0
  150. package/esm2022/picker/__shared/energinet-watt-picker-__shared.js +5 -0
  151. package/esm2022/picker/__shared/index.js +21 -0
  152. package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js +71 -0
  153. package/esm2022/picker/__shared/watt-picker-base.js +292 -0
  154. package/esm2022/picker/__shared/watt-picker-value.js +2 -0
  155. package/esm2022/picker/datepicker/energinet-watt-picker-datepicker.js +5 -0
  156. package/esm2022/picker/datepicker/index.js +22 -0
  157. package/esm2022/picker/datepicker/watt-datepicker-intl.service.js +31 -0
  158. package/esm2022/picker/datepicker/watt-datepicker.component.js +422 -0
  159. package/esm2022/picker/timepicker/energinet-watt-picker-timepicker.js +5 -0
  160. package/esm2022/picker/timepicker/index.js +20 -0
  161. package/esm2022/picker/timepicker/maskito-time-range-mask.js +81 -0
  162. package/esm2022/picker/timepicker/watt-timepicker.component.js +288 -0
  163. package/esm2022/progress-tracker/energinet-watt-progress-tracker.js +5 -0
  164. package/esm2022/progress-tracker/index.js +27 -0
  165. package/{fesm2022/energinet-watt-progress-tracker.mjs → esm2022/progress-tracker/watt-progress-tracker-step.component.js} +9 -67
  166. package/esm2022/progress-tracker/watt-progress-tracker.component.js +30 -0
  167. package/esm2022/query-params/energinet-watt-query-params.js +5 -0
  168. package/esm2022/query-params/index.js +20 -0
  169. package/esm2022/query-params/watt-query-params.directive.js +91 -0
  170. package/esm2022/radio/energinet-watt-radio.js +5 -0
  171. package/esm2022/radio/index.js +20 -0
  172. package/{fesm2022/energinet-watt-radio.mjs → esm2022/radio/watt-radio.component.js} +9 -35
  173. package/esm2022/search/energinet-watt-search.js +5 -0
  174. package/esm2022/search/index.js +20 -0
  175. package/{fesm2022/energinet-watt-search.mjs → esm2022/search/watt-search.component.js} +10 -36
  176. package/esm2022/segmented-buttons/energinet-watt-segmented-buttons.js +5 -0
  177. package/esm2022/segmented-buttons/index.js +21 -0
  178. package/esm2022/segmented-buttons/watt-segmented-button.component.js +38 -0
  179. package/esm2022/segmented-buttons/watt-segmented-buttons.component.js +88 -0
  180. package/esm2022/shell/energinet-watt-shell.js +5 -0
  181. package/esm2022/shell/index.js +21 -0
  182. package/esm2022/shell/nav-list/index.js +21 -0
  183. package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js +45 -0
  184. package/esm2022/shell/nav-list/watt-nav-list-item.component.js +84 -0
  185. package/esm2022/shell/nav-list/watt-nav-list.component.js +81 -0
  186. package/esm2022/shell/shell.component.js +75 -0
  187. package/esm2022/slide-toggle/energinet-watt-slide-toggle.js +5 -0
  188. package/esm2022/slide-toggle/index.js +20 -0
  189. package/esm2022/slide-toggle/watt-slide-toggle.component.js +78 -0
  190. package/esm2022/slider/energinet-watt-slider.js +5 -0
  191. package/esm2022/slider/index.js +20 -0
  192. package/esm2022/slider/watt-slider.component.js +133 -0
  193. package/esm2022/spinner/energinet-watt-spinner.js +5 -0
  194. package/esm2022/spinner/index.js +20 -0
  195. package/esm2022/spinner/watt-spinner.component.js +46 -0
  196. package/esm2022/stepper/energinet-watt-stepper.js +5 -0
  197. package/esm2022/stepper/index.js +21 -0
  198. package/esm2022/stepper/watt-stepper-step.component.js +52 -0
  199. package/{fesm2022/energinet-watt-stepper.mjs → esm2022/stepper/watt-stepper.component.js} +18 -91
  200. package/esm2022/table/energinet-watt-table.js +5 -0
  201. package/esm2022/table/index.js +21 -0
  202. package/esm2022/table/watt-table-data-source.js +17 -0
  203. package/esm2022/table/watt-table.component.js +400 -0
  204. package/esm2022/tabs/energinet-watt-tabs.js +5 -0
  205. package/esm2022/tabs/index.js +31 -0
  206. package/esm2022/tabs/watt-link-tab.component.js +34 -0
  207. package/esm2022/tabs/watt-link-tabs.component.js +71 -0
  208. package/esm2022/tabs/watt-tab.component.js +42 -0
  209. package/esm2022/tabs/watt-tabs-action.component.js +32 -0
  210. package/esm2022/tabs/watt-tabs.component.js +60 -0
  211. package/esm2022/text-field/energinet-watt-text-field.js +5 -0
  212. package/esm2022/text-field/index.js +20 -0
  213. package/esm2022/text-field/watt-text-field.component.js +289 -0
  214. package/esm2022/textarea-field/energinet-watt-textarea-field.js +5 -0
  215. package/esm2022/textarea-field/index.js +20 -0
  216. package/esm2022/textarea-field/watt-textarea-field.component.js +110 -0
  217. package/esm2022/toast/energinet-watt-toast.js +5 -0
  218. package/esm2022/toast/index.js +21 -0
  219. package/esm2022/toast/watt-toast.component.js +97 -0
  220. package/esm2022/toast/watt-toast.service.js +51 -0
  221. package/esm2022/tooltip/energinet-watt-tooltip.js +5 -0
  222. package/esm2022/tooltip/index.js +20 -0
  223. package/esm2022/tooltip/watt-tooltip.component.js +131 -0
  224. package/esm2022/tooltip/watt-tooltip.directive.js +60 -0
  225. package/esm2022/utils/css/css-custom-properties.service.js +39 -0
  226. package/esm2022/utils/css/energinet-watt-utils-css.js +5 -0
  227. package/esm2022/utils/css/index.js +20 -0
  228. package/esm2022/utils/intersection-observer/energinet-watt-utils-intersection-observer.js +5 -0
  229. package/esm2022/utils/intersection-observer/index.js +20 -0
  230. package/esm2022/utils/intersection-observer/watt-intersection-observer.service.js +57 -0
  231. package/esm2022/utils/resize-observer/energinet-watt-utils-resize-observer.js +5 -0
  232. package/esm2022/utils/resize-observer/index.js +21 -0
  233. package/esm2022/utils/resize-observer/watt-resize-observer.directive.js +53 -0
  234. package/esm2022/utils/resize-observer/watt-resize-observer.service.js +67 -0
  235. package/esm2022/validation-message/energinet-watt-validation-message.js +5 -0
  236. package/esm2022/validation-message/index.js +20 -0
  237. package/{fesm2022/energinet-watt-validation-message.mjs → esm2022/validation-message/watt-validation-message.component.js} +8 -34
  238. package/esm2022/validators/energinet-watt-validators.js +5 -0
  239. package/esm2022/validators/index.js +20 -0
  240. package/esm2022/validators/watt-range.validators.js +23 -0
  241. package/esm2022/vater/energinet-watt-vater.js +5 -0
  242. package/esm2022/vater/index.js +24 -0
  243. package/esm2022/vater/types.js +20 -0
  244. package/esm2022/vater/vater-flex.component.js +49 -0
  245. package/esm2022/vater/vater-layout.directive.js +65 -0
  246. package/esm2022/vater/vater-spacer.component.js +29 -0
  247. package/esm2022/vater/vater-stack.component.js +42 -0
  248. package/esm2022/vater/vater-utility.directive.js +53 -0
  249. package/esm2022/year-field/energinet-watt-year-field.js +5 -0
  250. package/esm2022/year-field/index.js +20 -0
  251. package/esm2022/year-field/watt-year-field.component.js +256 -0
  252. package/esm2022/yearmonth-field/energinet-watt-yearmonth-field.js +5 -0
  253. package/esm2022/yearmonth-field/index.js +21 -0
  254. package/esm2022/yearmonth-field/watt-yearmonth-field.component.js +258 -0
  255. package/esm2022/yearmonth-field/year-month.js +42 -0
  256. package/expandable-card/energinet-watt-expandable-card.d.ts +5 -0
  257. package/expansion/energinet-watt-expansion.d.ts +5 -0
  258. package/field/energinet-watt-field.d.ts +5 -0
  259. package/icon/energinet-watt-icon.d.ts +5 -0
  260. package/icon/flags/energinet-watt-icon-flags.d.ts +5 -0
  261. package/modal/energinet-watt-modal.d.ts +5 -0
  262. package/package.json +117 -117
  263. package/paginator/energinet-watt-paginator.d.ts +5 -0
  264. package/phone-field/energinet-watt-phone-field.d.ts +5 -0
  265. package/picker/__shared/energinet-watt-picker-__shared.d.ts +5 -0
  266. package/picker/__shared/watt-picker-base.d.ts +4 -1
  267. package/picker/datepicker/energinet-watt-picker-datepicker.d.ts +5 -0
  268. package/picker/timepicker/energinet-watt-picker-timepicker.d.ts +5 -0
  269. package/progress-tracker/energinet-watt-progress-tracker.d.ts +5 -0
  270. package/query-params/energinet-watt-query-params.d.ts +5 -0
  271. package/radio/energinet-watt-radio.d.ts +5 -0
  272. package/search/energinet-watt-search.d.ts +5 -0
  273. package/segmented-buttons/energinet-watt-segmented-buttons.d.ts +5 -0
  274. package/shell/energinet-watt-shell.d.ts +5 -0
  275. package/slide-toggle/energinet-watt-slide-toggle.d.ts +5 -0
  276. package/slider/energinet-watt-slider.d.ts +5 -0
  277. package/spinner/energinet-watt-spinner.d.ts +5 -0
  278. package/stepper/energinet-watt-stepper.d.ts +5 -0
  279. package/table/energinet-watt-table.d.ts +5 -0
  280. package/tabs/energinet-watt-tabs.d.ts +5 -0
  281. package/text-field/energinet-watt-text-field.d.ts +5 -0
  282. package/textarea-field/energinet-watt-textarea-field.d.ts +5 -0
  283. package/toast/energinet-watt-toast.d.ts +5 -0
  284. package/toast/watt-toast.service.d.ts +2 -3
  285. package/tooltip/energinet-watt-tooltip.d.ts +5 -0
  286. package/utils/css/css-custom-properties.service.d.ts +1 -2
  287. package/utils/css/energinet-watt-utils-css.d.ts +5 -0
  288. package/utils/intersection-observer/energinet-watt-utils-intersection-observer.d.ts +5 -0
  289. package/utils/resize-observer/energinet-watt-utils-resize-observer.d.ts +5 -0
  290. package/utils/resize-observer/watt-resize-observer.service.d.ts +2 -19
  291. package/validation-message/energinet-watt-validation-message.d.ts +5 -0
  292. package/validators/energinet-watt-validators.d.ts +5 -0
  293. package/vater/energinet-watt-vater.d.ts +5 -0
  294. package/year-field/energinet-watt-year-field.d.ts +5 -0
  295. package/yearmonth-field/energinet-watt-yearmonth-field.d.ts +5 -0
  296. package/fesm2022/energinet-watt-badge.mjs.map +0 -1
  297. package/fesm2022/energinet-watt-breadcrumbs.mjs +0 -116
  298. package/fesm2022/energinet-watt-breadcrumbs.mjs.map +0 -1
  299. package/fesm2022/energinet-watt-button.mjs.map +0 -1
  300. package/fesm2022/energinet-watt-card.mjs +0 -117
  301. package/fesm2022/energinet-watt-card.mjs.map +0 -1
  302. package/fesm2022/energinet-watt-checkbox.mjs.map +0 -1
  303. package/fesm2022/energinet-watt-chip.mjs +0 -760
  304. package/fesm2022/energinet-watt-chip.mjs.map +0 -1
  305. package/fesm2022/energinet-watt-clipboard.mjs +0 -118
  306. package/fesm2022/energinet-watt-clipboard.mjs.map +0 -1
  307. package/fesm2022/energinet-watt-code.mjs +0 -119
  308. package/fesm2022/energinet-watt-code.mjs.map +0 -1
  309. package/fesm2022/energinet-watt-core-breakpoints.mjs +0 -100
  310. package/fesm2022/energinet-watt-core-breakpoints.mjs.map +0 -1
  311. package/fesm2022/energinet-watt-core-color.mjs +0 -127
  312. package/fesm2022/energinet-watt-core-color.mjs.map +0 -1
  313. package/fesm2022/energinet-watt-core-date.mjs +0 -260
  314. package/fesm2022/energinet-watt-core-date.mjs.map +0 -1
  315. package/fesm2022/energinet-watt-data.mjs.map +0 -1
  316. package/fesm2022/energinet-watt-datetime-field.mjs +0 -233
  317. package/fesm2022/energinet-watt-datetime-field.mjs.map +0 -1
  318. package/fesm2022/energinet-watt-description-list.mjs.map +0 -1
  319. package/fesm2022/energinet-watt-drawer.mjs +0 -307
  320. package/fesm2022/energinet-watt-drawer.mjs.map +0 -1
  321. package/fesm2022/energinet-watt-dropdown.mjs +0 -423
  322. package/fesm2022/energinet-watt-dropdown.mjs.map +0 -1
  323. package/fesm2022/energinet-watt-dropzone.mjs +0 -298
  324. package/fesm2022/energinet-watt-dropzone.mjs.map +0 -1
  325. package/fesm2022/energinet-watt-empty-state.mjs +0 -299
  326. package/fesm2022/energinet-watt-empty-state.mjs.map +0 -1
  327. package/fesm2022/energinet-watt-expandable-card.mjs.map +0 -1
  328. package/fesm2022/energinet-watt-expansion.mjs.map +0 -1
  329. package/fesm2022/energinet-watt-field.mjs.map +0 -1
  330. package/fesm2022/energinet-watt-icon-flags.mjs +0 -482
  331. package/fesm2022/energinet-watt-icon-flags.mjs.map +0 -1
  332. package/fesm2022/energinet-watt-icon.mjs.map +0 -1
  333. package/fesm2022/energinet-watt-modal.mjs.map +0 -1
  334. package/fesm2022/energinet-watt-paginator.mjs +0 -164
  335. package/fesm2022/energinet-watt-paginator.mjs.map +0 -1
  336. package/fesm2022/energinet-watt-phone-field.mjs +0 -326
  337. package/fesm2022/energinet-watt-phone-field.mjs.map +0 -1
  338. package/fesm2022/energinet-watt-picker-__shared.mjs +0 -384
  339. package/fesm2022/energinet-watt-picker-__shared.mjs.map +0 -1
  340. package/fesm2022/energinet-watt-picker-datepicker.mjs +0 -477
  341. package/fesm2022/energinet-watt-picker-datepicker.mjs.map +0 -1
  342. package/fesm2022/energinet-watt-picker-timepicker.mjs +0 -394
  343. package/fesm2022/energinet-watt-picker-timepicker.mjs.map +0 -1
  344. package/fesm2022/energinet-watt-progress-tracker.mjs.map +0 -1
  345. package/fesm2022/energinet-watt-query-params.mjs +0 -117
  346. package/fesm2022/energinet-watt-query-params.mjs.map +0 -1
  347. package/fesm2022/energinet-watt-radio.mjs.map +0 -1
  348. package/fesm2022/energinet-watt-search.mjs.map +0 -1
  349. package/fesm2022/energinet-watt-segmented-buttons.mjs +0 -149
  350. package/fesm2022/energinet-watt-segmented-buttons.mjs.map +0 -1
  351. package/fesm2022/energinet-watt-shell.mjs +0 -315
  352. package/fesm2022/energinet-watt-shell.mjs.map +0 -1
  353. package/fesm2022/energinet-watt-slide-toggle.mjs +0 -104
  354. package/fesm2022/energinet-watt-slide-toggle.mjs.map +0 -1
  355. package/fesm2022/energinet-watt-slider.mjs +0 -159
  356. package/fesm2022/energinet-watt-slider.mjs.map +0 -1
  357. package/fesm2022/energinet-watt-spinner.mjs +0 -72
  358. package/fesm2022/energinet-watt-spinner.mjs.map +0 -1
  359. package/fesm2022/energinet-watt-stepper.mjs.map +0 -1
  360. package/fesm2022/energinet-watt-table.mjs +0 -441
  361. package/fesm2022/energinet-watt-table.mjs.map +0 -1
  362. package/fesm2022/energinet-watt-tabs.mjs +0 -254
  363. package/fesm2022/energinet-watt-tabs.mjs.map +0 -1
  364. package/fesm2022/energinet-watt-text-field.mjs +0 -316
  365. package/fesm2022/energinet-watt-text-field.mjs.map +0 -1
  366. package/fesm2022/energinet-watt-textarea-field.mjs +0 -136
  367. package/fesm2022/energinet-watt-textarea-field.mjs.map +0 -1
  368. package/fesm2022/energinet-watt-toast.mjs +0 -174
  369. package/fesm2022/energinet-watt-toast.mjs.map +0 -1
  370. package/fesm2022/energinet-watt-tooltip.mjs +0 -214
  371. package/fesm2022/energinet-watt-tooltip.mjs.map +0 -1
  372. package/fesm2022/energinet-watt-utils-css.mjs +0 -72
  373. package/fesm2022/energinet-watt-utils-css.mjs.map +0 -1
  374. package/fesm2022/energinet-watt-utils-intersection-observer.mjs +0 -83
  375. package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +0 -1
  376. package/fesm2022/energinet-watt-utils-resize-observer.mjs +0 -144
  377. package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +0 -1
  378. package/fesm2022/energinet-watt-validation-message.mjs.map +0 -1
  379. package/fesm2022/energinet-watt-validators.mjs +0 -49
  380. package/fesm2022/energinet-watt-validators.mjs.map +0 -1
  381. package/fesm2022/energinet-watt-vater.mjs +0 -248
  382. package/fesm2022/energinet-watt-vater.mjs.map +0 -1
  383. package/fesm2022/energinet-watt-year-field.mjs +0 -282
  384. package/fesm2022/energinet-watt-year-field.mjs.map +0 -1
  385. package/fesm2022/energinet-watt-yearmonth-field.mjs +0 -324
  386. package/fesm2022/energinet-watt-yearmonth-field.mjs.map +0 -1
  387. package/fesm2022/energinet-watt.mjs +0 -31
  388. package/fesm2022/energinet-watt.mjs.map +0 -1
@@ -1,298 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, inject, Directive, input, booleanAttribute, output, signal, forwardRef, Component } from '@angular/core';
3
- import { NG_VALIDATORS, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
4
- import * as i2 from '@angular/material/progress-bar';
5
- import { MatProgressBarModule } from '@angular/material/progress-bar';
6
- import { WattButtonComponent } from '@energinet/watt/button';
7
- import { WattFieldComponent } from '@energinet/watt/field';
8
- import { VaterStackComponent, VaterUtilityDirective } from '@energinet/watt/vater';
9
-
10
- //#region License
11
- /**
12
- * @license
13
- * Copyright 2020 Energinet DataHub A/S
14
- *
15
- * Licensed under the Apache License, Version 2.0 (the "License2");
16
- * you may not use this file except in compliance with the License.
17
- * You may obtain a copy of the License at
18
- *
19
- * http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software
22
- * distributed under the License is distributed on an "AS IS" BASIS,
23
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
- * See the License for the specific language governing permissions and
25
- * limitations under the License.
26
- */
27
- //#endregion
28
- class WattDropZoneIntlService {
29
- prompt = 'Drop file here';
30
- promptMultiple = 'Drop files here';
31
- separator = 'or';
32
- button = 'Choose file';
33
- buttonMultiple = 'Choose files';
34
- loadingMessage = 'Loading';
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDropZoneIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
36
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDropZoneIntlService, providedIn: 'root' });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDropZoneIntlService, decorators: [{
39
- type: Injectable,
40
- args: [{ providedIn: 'root' }]
41
- }] });
42
-
43
- //#region License
44
- /**
45
- * @license
46
- * Copyright 2020 Energinet DataHub A/S
47
- *
48
- * Licensed under the Apache License, Version 2.0 (the "License2");
49
- * you may not use this file except in compliance with the License.
50
- * You may obtain a copy of the License at
51
- *
52
- * http://www.apache.org/licenses/LICENSE-2.0
53
- *
54
- * Unless required by applicable law or agreed to in writing, software
55
- * distributed under the License is distributed on an "AS IS" BASIS,
56
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
57
- * See the License for the specific language governing permissions and
58
- * limitations under the License.
59
- */
60
- //#endregion
61
- /**
62
- * Directive that validates the file type of provided files. This is automatically
63
- * applied to the `WattDropZone` component via `hostDirectives`.
64
- */
65
- class FileTypeValidator {
66
- component = inject(WattDropZone, { host: true, self: true });
67
- validate(control) {
68
- const accept = this.component.accept();
69
- return accept.length > 0 && control.value?.some((i) => !accept.includes(i.type))
70
- ? { type: true }
71
- : null;
72
- }
73
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FileTypeValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
74
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: FileTypeValidator, isStandalone: true, providers: [{ provide: NG_VALIDATORS, useExisting: FileTypeValidator, multi: true }], ngImport: i0 });
75
- }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FileTypeValidator, decorators: [{
77
- type: Directive,
78
- args: [{
79
- providers: [{ provide: NG_VALIDATORS, useExisting: FileTypeValidator, multi: true }],
80
- }]
81
- }] });
82
- /**
83
- * Directive validating that a single file is selected when `multiple` is false.
84
- * This is automatically applied to the `WattDropZone` component via `hostDirectives`.
85
- */
86
- class MultipleFilesValidator {
87
- component = inject(WattDropZone, { host: true, self: true });
88
- validate(control) {
89
- const multiple = this.component.multiple();
90
- return !multiple && control.value?.length !== 1 ? { multiple: true } : null;
91
- }
92
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MultipleFilesValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
93
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: MultipleFilesValidator, isStandalone: true, providers: [{ provide: NG_VALIDATORS, useExisting: MultipleFilesValidator, multi: true }], ngImport: i0 });
94
- }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MultipleFilesValidator, decorators: [{
96
- type: Directive,
97
- args: [{
98
- providers: [{ provide: NG_VALIDATORS, useExisting: MultipleFilesValidator, multi: true }],
99
- }]
100
- }] });
101
- /** Validates that the file size is less than or equal to the specified maximum size. */
102
- const limitFiles = (limit) => (control) => control.value?.length && control.value.length > limit ? { limit } : null;
103
- /** Validates that the file size is less than or equal to the specified maximum size. */
104
- const maxFileSize = (size) => (control) => control.value?.some((file) => file.size > size) ? { size } : null;
105
-
106
- //#region License
107
- /**
108
- * @license
109
- * Copyright 2020 Energinet DataHub A/S
110
- *
111
- * Licensed under the Apache License, Version 2.0 (the "License2");
112
- * you may not use this file except in compliance with the License.
113
- * You may obtain a copy of the License at
114
- *
115
- * http://www.apache.org/licenses/LICENSE-2.0
116
- *
117
- * Unless required by applicable law or agreed to in writing, software
118
- * distributed under the License is distributed on an "AS IS" BASIS,
119
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
120
- * See the License for the specific language governing permissions and
121
- * limitations under the License.
122
- */
123
- //#endregion
124
- // eslint-disable-next-line @angular-eslint/component-class-suffix
125
- class WattDropZone {
126
- intl = inject(WattDropZoneIntlService);
127
- /** Whether the dropzone should accept multiple files. */
128
- multiple = input(false, { transform: booleanAttribute });
129
- /** Label for the dropzone. */
130
- label = input();
131
- /** Comma-separated list of MIME types that the dropzone accepts. */
132
- accept = input([], { transform: (value) => value.split(',') });
133
- /** Emits when one or more files are selected. */
134
- selected = output();
135
- // Tracks (valid) drag over state
136
- dragOver = signal(false);
137
- // Progress
138
- progress = input(100);
139
- handleFiles(files) {
140
- if (!files)
141
- return;
142
- this.selected.emit(Array.from(files));
143
- }
144
- handleDrop(event) {
145
- if (!event.dataTransfer)
146
- return;
147
- if (!this.dragOver())
148
- return;
149
- // Prevent opening the file in the browser
150
- event.preventDefault();
151
- this.handleFiles(event.dataTransfer.files);
152
- }
153
- handleDragOver(event) {
154
- if (!event.dataTransfer)
155
- return;
156
- // Ignore non-file items such as strings
157
- if (Array.from(event.dataTransfer.items).some((i) => i.kind !== 'file'))
158
- return;
159
- // Prevent opening the file in the browser
160
- event.preventDefault();
161
- this.dragOver.set(true);
162
- }
163
- // Implementation for ControlValueAccessor
164
- writeValue = () => { }; // eslint-disable-line @typescript-eslint/no-empty-function
165
- registerOnTouched = (fn) => this.selected.subscribe(fn);
166
- registerOnChange = (fn) => this.selected.subscribe(fn);
167
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDropZone, deps: [], target: i0.ɵɵFactoryTarget.Component });
168
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDropZone, isStandalone: true, selector: "watt-dropzone", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, providers: [
169
- {
170
- provide: NG_VALUE_ACCESSOR,
171
- useExisting: forwardRef(() => WattDropZone),
172
- multi: true,
173
- },
174
- ], hostDirectives: [{ directive: FileTypeValidator }, { directive: MultipleFilesValidator }], ngImport: i0, template: `
175
- <watt-field [label]="label()">
176
- <ng-content />
177
- <ng-content select="watt-field-error" ngProjectAs="watt-field-error" />
178
- <ng-content select="watt-field-hint" ngProjectAs="watt-field-hint" />
179
- <span class="wrapper">
180
- <vater-stack
181
- inset="0"
182
- class="dropzone"
183
- [class.dragOver]="dragOver()"
184
- (dragover)="handleDragOver($event)"
185
- (drop)="handleDrop($event)"
186
- (drop)="dragOver.set(false)"
187
- (dragleave)="dragOver.set(false)"
188
- >
189
- @if (progress() < 100) {
190
- <vater-stack center gap="s" fill="horizontal" align="start">
191
- <span>{{ intl.loadingMessage }} ( {{ progress() + '%' }} )</span>
192
- <mat-progress-bar mode="determinate" [value]="progress()" />
193
- </vater-stack>
194
- } @else {
195
- <vater-stack center gap="xs">
196
- <input
197
- #input
198
- hidden
199
- type="file"
200
- [multiple]="multiple()"
201
- [accept]="accept().join(',')"
202
- (change)="handleFiles(input.files)"
203
- />
204
- <span>{{ multiple() ? intl.promptMultiple : intl.prompt }}</span>
205
- <span class="watt-on-light--medium-emphasis">{{ intl.separator }}</span>
206
- <watt-button size="small" variant="secondary" (click)="input.click()">
207
- {{ multiple() ? intl.buttonMultiple : intl.button }}
208
- </watt-button>
209
- </vater-stack>
210
- }
211
- </vater-stack>
212
- </span>
213
- </watt-field>
214
- `, isInline: true, styles: [".wrapper{display:block;min-height:184px}.dropzone{padding:var(--watt-space-l);background:var(--watt-color-neutral-grey-200)}.dragOver{background:var(--watt-color-state-info-light)}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color: var(--watt-color-primary);--mdc-linear-progress-track-color: var(--watt-color-primary-light)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]" }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] });
215
- }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDropZone, decorators: [{
217
- type: Component,
218
- args: [{ imports: [
219
- ReactiveFormsModule,
220
- VaterStackComponent,
221
- VaterUtilityDirective,
222
- WattButtonComponent,
223
- WattFieldComponent,
224
- MatProgressBarModule,
225
- ], selector: 'watt-dropzone', hostDirectives: [FileTypeValidator, MultipleFilesValidator], providers: [
226
- {
227
- provide: NG_VALUE_ACCESSOR,
228
- useExisting: forwardRef(() => WattDropZone),
229
- multi: true,
230
- },
231
- ], template: `
232
- <watt-field [label]="label()">
233
- <ng-content />
234
- <ng-content select="watt-field-error" ngProjectAs="watt-field-error" />
235
- <ng-content select="watt-field-hint" ngProjectAs="watt-field-hint" />
236
- <span class="wrapper">
237
- <vater-stack
238
- inset="0"
239
- class="dropzone"
240
- [class.dragOver]="dragOver()"
241
- (dragover)="handleDragOver($event)"
242
- (drop)="handleDrop($event)"
243
- (drop)="dragOver.set(false)"
244
- (dragleave)="dragOver.set(false)"
245
- >
246
- @if (progress() < 100) {
247
- <vater-stack center gap="s" fill="horizontal" align="start">
248
- <span>{{ intl.loadingMessage }} ( {{ progress() + '%' }} )</span>
249
- <mat-progress-bar mode="determinate" [value]="progress()" />
250
- </vater-stack>
251
- } @else {
252
- <vater-stack center gap="xs">
253
- <input
254
- #input
255
- hidden
256
- type="file"
257
- [multiple]="multiple()"
258
- [accept]="accept().join(',')"
259
- (change)="handleFiles(input.files)"
260
- />
261
- <span>{{ multiple() ? intl.promptMultiple : intl.prompt }}</span>
262
- <span class="watt-on-light--medium-emphasis">{{ intl.separator }}</span>
263
- <watt-button size="small" variant="secondary" (click)="input.click()">
264
- {{ multiple() ? intl.buttonMultiple : intl.button }}
265
- </watt-button>
266
- </vater-stack>
267
- }
268
- </vater-stack>
269
- </span>
270
- </watt-field>
271
- `, styles: [".wrapper{display:block;min-height:184px}.dropzone{padding:var(--watt-space-l);background:var(--watt-color-neutral-grey-200)}.dragOver{background:var(--watt-color-state-info-light)}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color: var(--watt-color-primary);--mdc-linear-progress-track-color: var(--watt-color-primary-light)}\n"] }]
272
- }] });
273
-
274
- //#region License
275
- /**
276
- * @license
277
- * Copyright 2020 Energinet DataHub A/S
278
- *
279
- * Licensed under the Apache License, Version 2.0 (the "License2");
280
- * you may not use this file except in compliance with the License.
281
- * You may obtain a copy of the License at
282
- *
283
- * http://www.apache.org/licenses/LICENSE-2.0
284
- *
285
- * Unless required by applicable law or agreed to in writing, software
286
- * distributed under the License is distributed on an "AS IS" BASIS,
287
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
288
- * See the License for the specific language governing permissions and
289
- * limitations under the License.
290
- */
291
- //#endregion
292
-
293
- /**
294
- * Generated bundle index. Do not edit.
295
- */
296
-
297
- export { FileTypeValidator, MultipleFilesValidator, WattDropZone, WattDropZoneIntlService, limitFiles, maxFileSize };
298
- //# sourceMappingURL=energinet-watt-dropzone.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"energinet-watt-dropzone.mjs","sources":["../../../libs/watt/package/dropzone/watt-dropzone-intl.ts","../../../libs/watt/package/dropzone/watt-dropzone-validators.ts","../../../libs/watt/package/dropzone/watt-dropzone.ts","../../../libs/watt/package/dropzone/index.ts","../../../libs/watt/package/dropzone/energinet-watt-dropzone.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDropZoneIntlService {\n prompt = 'Drop file here';\n promptMultiple = 'Drop files here';\n separator = 'or';\n button = 'Choose file';\n buttonMultiple = 'Choose files';\n loadingMessage = 'Loading';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, inject } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { WattDropZone, MimeType } from './watt-dropzone';\n\n/**\n * Directive that validates the file type of provided files. This is automatically\n * applied to the `WattDropZone` component via `hostDirectives`.\n */\n@Directive({\n providers: [{ provide: NG_VALIDATORS, useExisting: FileTypeValidator, multi: true }],\n})\nexport class FileTypeValidator implements Validator {\n component = inject(WattDropZone, { host: true, self: true });\n validate(control: AbstractControl<File[] | null>): ValidationErrors | null {\n const accept = this.component.accept();\n return accept.length > 0 && control.value?.some((i) => !accept.includes(i.type as MimeType))\n ? { type: true }\n : null;\n }\n}\n\n/**\n * Directive validating that a single file is selected when `multiple` is false.\n * This is automatically applied to the `WattDropZone` component via `hostDirectives`.\n */\n@Directive({\n providers: [{ provide: NG_VALIDATORS, useExisting: MultipleFilesValidator, multi: true }],\n})\nexport class MultipleFilesValidator implements Validator {\n component = inject(WattDropZone, { host: true, self: true });\n validate(control: AbstractControl<File[] | null>): ValidationErrors | null {\n const multiple = this.component.multiple();\n return !multiple && control.value?.length !== 1 ? { multiple: true } : null;\n }\n}\n\n/** Validates that the file size is less than or equal to the specified maximum size. */\nexport const limitFiles =\n (limit: number) =>\n (control: AbstractControl<File[] | null>): ValidationErrors | null =>\n control.value?.length && control.value.length > limit ? { limit } : null;\n\n/** Validates that the file size is less than or equal to the specified maximum size. */\nexport const maxFileSize =\n (size: number) =>\n (control: AbstractControl<File[] | null>): ValidationErrors | null =>\n control.value?.some((file) => file.size > size) ? { size } : null;\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { VaterStackComponent, VaterUtilityDirective } from '@energinet/watt/vater';\nimport { WattDropZoneIntlService } from './watt-dropzone-intl';\nimport { FileTypeValidator, MultipleFilesValidator } from './watt-dropzone-validators';\n\n// Slightly better typing than just raw string\nexport type MimeType = `${string}/${string}`;\n\n@Component({\n imports: [\n ReactiveFormsModule,\n VaterStackComponent,\n VaterUtilityDirective,\n WattButtonComponent,\n WattFieldComponent,\n MatProgressBarModule,\n ],\n selector: 'watt-dropzone',\n hostDirectives: [FileTypeValidator, MultipleFilesValidator],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattDropZone),\n multi: true,\n },\n ],\n styles: `\n .wrapper {\n display: block;\n min-height: 184px; /* Magic UX number */\n }\n\n .dropzone {\n padding: var(--watt-space-l);\n background: var(--watt-color-neutral-grey-200);\n }\n\n .dragOver {\n background: var(--watt-color-state-info-light);\n }\n\n .mat-mdc-progress-bar {\n --mdc-linear-progress-active-indicator-color: var(--watt-color-primary);\n --mdc-linear-progress-track-color: var(--watt-color-primary-light);\n }\n `,\n template: `\n <watt-field [label]=\"label()\">\n <ng-content />\n <ng-content select=\"watt-field-error\" ngProjectAs=\"watt-field-error\" />\n <ng-content select=\"watt-field-hint\" ngProjectAs=\"watt-field-hint\" />\n <span class=\"wrapper\">\n <vater-stack\n inset=\"0\"\n class=\"dropzone\"\n [class.dragOver]=\"dragOver()\"\n (dragover)=\"handleDragOver($event)\"\n (drop)=\"handleDrop($event)\"\n (drop)=\"dragOver.set(false)\"\n (dragleave)=\"dragOver.set(false)\"\n >\n @if (progress() < 100) {\n <vater-stack center gap=\"s\" fill=\"horizontal\" align=\"start\">\n <span>{{ intl.loadingMessage }} ( {{ progress() + '%' }} )</span>\n <mat-progress-bar mode=\"determinate\" [value]=\"progress()\" />\n </vater-stack>\n } @else {\n <vater-stack center gap=\"xs\">\n <input\n #input\n hidden\n type=\"file\"\n [multiple]=\"multiple()\"\n [accept]=\"accept().join(',')\"\n (change)=\"handleFiles(input.files)\"\n />\n <span>{{ multiple() ? intl.promptMultiple : intl.prompt }}</span>\n <span class=\"watt-on-light--medium-emphasis\">{{ intl.separator }}</span>\n <watt-button size=\"small\" variant=\"secondary\" (click)=\"input.click()\">\n {{ multiple() ? intl.buttonMultiple : intl.button }}\n </watt-button>\n </vater-stack>\n }\n </vater-stack>\n </span>\n </watt-field>\n `,\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class WattDropZone implements ControlValueAccessor {\n intl = inject(WattDropZoneIntlService);\n\n /** Whether the dropzone should accept multiple files. */\n multiple = input(false, { transform: booleanAttribute });\n\n /** Label for the dropzone. */\n label = input<string>();\n\n /** Comma-separated list of MIME types that the dropzone accepts. */\n accept = input([], { transform: (value: MimeType) => value.split(',') as MimeType[] });\n\n /** Emits when one or more files are selected. */\n selected = output<File[]>();\n\n // Tracks (valid) drag over state\n dragOver = signal(false);\n\n // Progress\n progress = input<number>(100);\n\n handleFiles(files: FileList | null) {\n if (!files) return;\n this.selected.emit(Array.from(files));\n }\n\n handleDrop(event: DragEvent) {\n if (!event.dataTransfer) return;\n if (!this.dragOver()) return;\n\n // Prevent opening the file in the browser\n event.preventDefault();\n\n this.handleFiles(event.dataTransfer.files);\n }\n\n handleDragOver(event: DragEvent) {\n if (!event.dataTransfer) return;\n\n // Ignore non-file items such as strings\n if (Array.from(event.dataTransfer.items).some((i) => i.kind !== 'file')) return;\n\n // Prevent opening the file in the browser\n event.preventDefault();\n\n this.dragOver.set(true);\n }\n\n // Implementation for ControlValueAccessor\n writeValue = () => {}; // eslint-disable-line @typescript-eslint/no-empty-function\n registerOnTouched = (fn: () => void) => this.selected.subscribe(fn);\n registerOnChange = (fn: (value: File[]) => void) => this.selected.subscribe(fn);\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDropZone } from './watt-dropzone';\nexport { WattDropZoneIntlService } from './watt-dropzone-intl';\nexport {\n FileTypeValidator,\n MultipleFilesValidator,\n maxFileSize,\n limitFiles,\n} from './watt-dropzone-validators';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.FileTypeValidator","i1.Mult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,EAAA,MAAA,EAAA,QAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,kBAAkB,8IAClB,oBAAoB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FA0EX,YAAY,EAAA,UAAA,EAAA,CAAA;kBAjFxB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,mBAAmB;wBACnB,mBAAmB;wBACnB,qBAAqB;wBACrB,mBAAmB;wBACnB,kBAAkB;wBAClB,oBAAoB;AACrB,qBAAA,EAAA,QAAA,EACS,eAAe,EAAA,cAAA,EACT,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,EAAA,SAAA,EAChD;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC;AAC3C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,QAAA,EAqBS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,yVAAA,CAAA,EAAA;;;ACrHH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -1,299 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, input, computed, ViewEncapsulation } from '@angular/core';
3
- import { WattIconComponent } from '@energinet/watt/icon';
4
-
5
- //#region License
6
- /**
7
- * @license
8
- * Copyright 2020 Energinet DataHub A/S
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License2");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- //#endregion
23
- class WattEmptyStateExploreComponent {
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStateExploreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattEmptyStateExploreComponent, isStandalone: true, selector: "watt-empty-state-explore", ngImport: i0, template: `
26
- <svg viewBox="0 0 96 98" fill="none">
27
- <path
28
- fill="currentColor"
29
- d="M59.4473 60.5798c-.2445.1864-.503.3517-.7317.5628a34.937 34.937 0 0 1-17.0602 8.5072 34.4744 34.4744 0 0 1-7.8055.591A35.139 35.139 0 0 1 1.4442 45.2255 33.1081 33.1081 0 0 1 .081 37.7788c-.663-10.7585 2.7613-20.015 10.3769-27.6464C15.4248 5.141 21.4574 2.0226 28.3747.656a33.4635 33.4635 0 0 1 7.6807-.6366c8.9962.3324 16.8105 3.5474 23.3356 9.7612 5.25 4.9932 8.5899 11.098 10.1007 18.1842a33.6296 33.6296 0 0 1 .6719 9.1457c-.5417 8.6262-3.7896 16.0818-9.7437 22.3665a6.0972 6.0972 0 0 0-.4045.5276l-.5681.5752Zm9.2494-25.4269c0-18.5657-15.0358-33.5928-33.5928-33.607C16.7263 1.5303 1.511 16.4255 1.511 35.1548c.0158 18.7803 15.2593 33.417 33.2921 33.57 18.3794.1583 33.8514-14.6806 33.8866-33.5718h.007Z"
30
- />
31
- <path
32
- fill="currentColor"
33
- d="m59.4473 60.5797.5751-.5751c.2515-.1882.2586-.1935.4714.0211.5822.5909 1.159 1.1871 1.7377 1.7816l15.7447 16.1809 16.4183 16.8703c.4414.4537.8794.9058 1.3243 1.3595.1073.1108.2094.2251.2885.3096l-1.043 1.1203-35.7861-36.7587.2691-.3095ZM60.4444 35.8792h-1.4897c-.1196-6.3316-2.3199-11.8331-6.8083-16.3286-4.4884-4.4954-9.9864-6.7045-16.3427-6.8364v-1.4475c12.563-.3887 24.755 10.4508 24.6407 24.6125Z"
34
- />
35
- </svg>
36
- `, isInline: true });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStateExploreComponent, decorators: [{
39
- type: Component,
40
- args: [{
41
- selector: 'watt-empty-state-explore',
42
- template: `
43
- <svg viewBox="0 0 96 98" fill="none">
44
- <path
45
- fill="currentColor"
46
- d="M59.4473 60.5798c-.2445.1864-.503.3517-.7317.5628a34.937 34.937 0 0 1-17.0602 8.5072 34.4744 34.4744 0 0 1-7.8055.591A35.139 35.139 0 0 1 1.4442 45.2255 33.1081 33.1081 0 0 1 .081 37.7788c-.663-10.7585 2.7613-20.015 10.3769-27.6464C15.4248 5.141 21.4574 2.0226 28.3747.656a33.4635 33.4635 0 0 1 7.6807-.6366c8.9962.3324 16.8105 3.5474 23.3356 9.7612 5.25 4.9932 8.5899 11.098 10.1007 18.1842a33.6296 33.6296 0 0 1 .6719 9.1457c-.5417 8.6262-3.7896 16.0818-9.7437 22.3665a6.0972 6.0972 0 0 0-.4045.5276l-.5681.5752Zm9.2494-25.4269c0-18.5657-15.0358-33.5928-33.5928-33.607C16.7263 1.5303 1.511 16.4255 1.511 35.1548c.0158 18.7803 15.2593 33.417 33.2921 33.57 18.3794.1583 33.8514-14.6806 33.8866-33.5718h.007Z"
47
- />
48
- <path
49
- fill="currentColor"
50
- d="m59.4473 60.5797.5751-.5751c.2515-.1882.2586-.1935.4714.0211.5822.5909 1.159 1.1871 1.7377 1.7816l15.7447 16.1809 16.4183 16.8703c.4414.4537.8794.9058 1.3243 1.3595.1073.1108.2094.2251.2885.3096l-1.043 1.1203-35.7861-36.7587.2691-.3095ZM60.4444 35.8792h-1.4897c-.1196-6.3316-2.3199-11.8331-6.8083-16.3286-4.4884-4.4954-9.9864-6.7045-16.3427-6.8364v-1.4475c12.563-.3887 24.755 10.4508 24.6407 24.6125Z"
51
- />
52
- </svg>
53
- `,
54
- }]
55
- }] });
56
-
57
- //#region License
58
- /**
59
- * @license
60
- * Copyright 2020 Energinet DataHub A/S
61
- *
62
- * Licensed under the Apache License, Version 2.0 (the "License2");
63
- * you may not use this file except in compliance with the License.
64
- * You may obtain a copy of the License at
65
- *
66
- * http://www.apache.org/licenses/LICENSE-2.0
67
- *
68
- * Unless required by applicable law or agreed to in writing, software
69
- * distributed under the License is distributed on an "AS IS" BASIS,
70
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
- * See the License for the specific language governing permissions and
72
- * limitations under the License.
73
- */
74
- //#endregion
75
- class WattEmptyStateNoResultsComponent {
76
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStateNoResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
77
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattEmptyStateNoResultsComponent, isStandalone: true, selector: "watt-empty-state-no-results", ngImport: i0, template: `
78
- <svg viewBox="0 0 128 128" fill="none">
79
- <path
80
- fill="currentColor"
81
- fill-rule="evenodd"
82
- d="M64 116c28.719 0 52-23.281 52-52S92.719 12 64 12 12 35.281 12 64s23.281 52 52 52Zm0 2c29.823 0 54-24.177 54-54S93.823 10 64 10 10 34.177 10 64s24.177 54 54 54Z"
83
- clip-rule="evenodd"
84
- />
85
- <path
86
- fill="currentColor"
87
- fill-rule="evenodd"
88
- d="M63.91 65.91 42 87.82l-1.414-1.414 21.91-21.91L40 42l1.414-1.414L63.91 63.082l22.496-22.497L87.82 42 65.325 64.496l21.91 21.91-1.413 1.414-21.91-21.91Z"
89
- clip-rule="evenodd"
90
- />
91
- </svg>
92
- `, isInline: true });
93
- }
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStateNoResultsComponent, decorators: [{
95
- type: Component,
96
- args: [{
97
- selector: 'watt-empty-state-no-results',
98
- template: `
99
- <svg viewBox="0 0 128 128" fill="none">
100
- <path
101
- fill="currentColor"
102
- fill-rule="evenodd"
103
- d="M64 116c28.719 0 52-23.281 52-52S92.719 12 64 12 12 35.281 12 64s23.281 52 52 52Zm0 2c29.823 0 54-24.177 54-54S93.823 10 64 10 10 34.177 10 64s24.177 54 54 54Z"
104
- clip-rule="evenodd"
105
- />
106
- <path
107
- fill="currentColor"
108
- fill-rule="evenodd"
109
- d="M63.91 65.91 42 87.82l-1.414-1.414 21.91-21.91L40 42l1.414-1.414L63.91 63.082l22.496-22.497L87.82 42 65.325 64.496l21.91 21.91-1.413 1.414-21.91-21.91Z"
110
- clip-rule="evenodd"
111
- />
112
- </svg>
113
- `,
114
- }]
115
- }] });
116
-
117
- //#region License
118
- /**
119
- * @license
120
- * Copyright 2020 Energinet DataHub A/S
121
- *
122
- * Licensed under the Apache License, Version 2.0 (the "License2");
123
- * you may not use this file except in compliance with the License.
124
- * You may obtain a copy of the License at
125
- *
126
- * http://www.apache.org/licenses/LICENSE-2.0
127
- *
128
- * Unless required by applicable law or agreed to in writing, software
129
- * distributed under the License is distributed on an "AS IS" BASIS,
130
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131
- * See the License for the specific language governing permissions and
132
- * limitations under the License.
133
- */
134
- //#endregion
135
- class WattEmptyStatePowerComponent {
136
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStatePowerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
137
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattEmptyStatePowerComponent, isStandalone: true, selector: "watt-empty-state-power", ngImport: i0, template: `
138
- <svg viewBox="0 0 96 116" fill="none">
139
- <path
140
- fill="currentColor"
141
- d="M48.9 89.88v25.914c-.606.042-1.213.042-1.818 0v-25.91c-.507-.042-.963-.083-1.422-.117-5.211-.394-9.989-2.067-14.383-4.875-4.834-3.091-8.642-7.183-11.614-12.07a42.881 42.881 0 0 1-5.505-14.54 46.448 46.448 0 0 1-.788-8.755V38.27c-.24 0-.446-.027-.655-.027H0v-1.8h24.536c.01-.268.027-.479.027-.69v-30.8a4.936 4.936 0 0 1 9.87-.145v31.527c.403.125 26.458.152 27.06.032 0-.23.03-.476.03-.72V5.198c-.02-.717.1-1.432.352-2.105a4.944 4.944 0 0 1 9.437.922c.07.427.104.86.098 1.294V36.424c1.204.033 2.363 0 3.522.014 1.16.015 2.335 0 3.5 0h17.51c.058.595.062 1.194.01 1.789h-13.32c-.018.252-.05.459-.05.667 0 3.335-.01 6.67 0 10.005a49.34 49.34 0 0 1-.36 6.683c-1.251 9.34-4.857 17.585-11.488 24.388-4.212 4.32-9.242 7.369-15.123 8.916a30.233 30.233 0 0 1-6.253.95c-.137.004-.267.025-.459.044ZM15.216 47.344c-.018.105-.03.211-.036.317-.044 3.204.08 6.393.626 9.56a42.105 42.105 0 0 0 4.123 12.363c2.538 4.873 5.911 9.058 10.316 12.373 5.013 3.773 10.63 5.876 16.932 6.082a27.722 27.722 0 0 0 9.688-1.421c5.11-1.69 9.443-4.586 13.118-8.494 4.552-4.832 7.55-10.527 9.286-16.905a43.867 43.867 0 0 0 1.334-7.567c.181-2.012.173-4.025.169-6.045a2.075 2.075 0 0 0-.03-.24c-.374-.104-64.866-.133-65.526-.023Zm.035-9.071c-.12.585-.098 6.787.023 7.166.063.014.126.023.19.027H80.46c.07-.002.14-.01.209-.025a.122.122 0 0 0 .04-.027l.039-.04v-7.101H15.252Zm17.37-1.876V5.317a6.539 6.539 0 0 0-.031-.698A2.989 2.989 0 0 0 30.7 2.084a2.956 2.956 0 0 0-3.15.446c-.833.653-1.181 1.543-1.181 2.585v30.592c0 .227.02.454.033.71l6.22-.02Zm36.96.027V4.73a3.127 3.127 0 0 0-6.235.273v31.433c2.105.005 4.148.009 6.24-.002l-.005-.01Z"
142
- />
143
- </svg>
144
- `, isInline: true });
145
- }
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStatePowerComponent, decorators: [{
147
- type: Component,
148
- args: [{
149
- selector: 'watt-empty-state-power',
150
- template: `
151
- <svg viewBox="0 0 96 116" fill="none">
152
- <path
153
- fill="currentColor"
154
- d="M48.9 89.88v25.914c-.606.042-1.213.042-1.818 0v-25.91c-.507-.042-.963-.083-1.422-.117-5.211-.394-9.989-2.067-14.383-4.875-4.834-3.091-8.642-7.183-11.614-12.07a42.881 42.881 0 0 1-5.505-14.54 46.448 46.448 0 0 1-.788-8.755V38.27c-.24 0-.446-.027-.655-.027H0v-1.8h24.536c.01-.268.027-.479.027-.69v-30.8a4.936 4.936 0 0 1 9.87-.145v31.527c.403.125 26.458.152 27.06.032 0-.23.03-.476.03-.72V5.198c-.02-.717.1-1.432.352-2.105a4.944 4.944 0 0 1 9.437.922c.07.427.104.86.098 1.294V36.424c1.204.033 2.363 0 3.522.014 1.16.015 2.335 0 3.5 0h17.51c.058.595.062 1.194.01 1.789h-13.32c-.018.252-.05.459-.05.667 0 3.335-.01 6.67 0 10.005a49.34 49.34 0 0 1-.36 6.683c-1.251 9.34-4.857 17.585-11.488 24.388-4.212 4.32-9.242 7.369-15.123 8.916a30.233 30.233 0 0 1-6.253.95c-.137.004-.267.025-.459.044ZM15.216 47.344c-.018.105-.03.211-.036.317-.044 3.204.08 6.393.626 9.56a42.105 42.105 0 0 0 4.123 12.363c2.538 4.873 5.911 9.058 10.316 12.373 5.013 3.773 10.63 5.876 16.932 6.082a27.722 27.722 0 0 0 9.688-1.421c5.11-1.69 9.443-4.586 13.118-8.494 4.552-4.832 7.55-10.527 9.286-16.905a43.867 43.867 0 0 0 1.334-7.567c.181-2.012.173-4.025.169-6.045a2.075 2.075 0 0 0-.03-.24c-.374-.104-64.866-.133-65.526-.023Zm.035-9.071c-.12.585-.098 6.787.023 7.166.063.014.126.023.19.027H80.46c.07-.002.14-.01.209-.025a.122.122 0 0 0 .04-.027l.039-.04v-7.101H15.252Zm17.37-1.876V5.317a6.539 6.539 0 0 0-.031-.698A2.989 2.989 0 0 0 30.7 2.084a2.956 2.956 0 0 0-3.15.446c-.833.653-1.181 1.543-1.181 2.585v30.592c0 .227.02.454.033.71l6.22-.02Zm36.96.027V4.73a3.127 3.127 0 0 0-6.235.273v31.433c2.105.005 4.148.009 6.24-.002l-.005-.01Z"
155
- />
156
- </svg>
157
- `,
158
- }]
159
- }] });
160
-
161
- //#region License
162
- /**
163
- * @license
164
- * Copyright 2020 Energinet DataHub A/S
165
- *
166
- * Licensed under the Apache License, Version 2.0 (the "License2");
167
- * you may not use this file except in compliance with the License.
168
- * You may obtain a copy of the License at
169
- *
170
- * http://www.apache.org/licenses/LICENSE-2.0
171
- *
172
- * Unless required by applicable law or agreed to in writing, software
173
- * distributed under the License is distributed on an "AS IS" BASIS,
174
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
175
- * See the License for the specific language governing permissions and
176
- * limitations under the License.
177
- */
178
- //#endregion
179
- /**
180
- * Usage:
181
- * `import { WattEmptyStateComponent } from '@energinet-datahub/watt/empty-state';`
182
- */
183
- class WattEmptyStateComponent {
184
- icon = input();
185
- size = input('large');
186
- title = input('');
187
- message = input('');
188
- useHTML = input(false);
189
- iconSize = computed(() => (this.size() === 'small' ? 'xl' : 'xxl'));
190
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
191
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattEmptyStateComponent, isStandalone: true, selector: "watt-empty-state", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, useHTML: { classPropertyName: "useHTML", publicName: "useHTML", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
192
- @let name = icon();
193
- @switch (name) {
194
- @case ('custom-explore') {
195
- <watt-icon [size]="iconSize()" class="watt-space-stack-l">
196
- <watt-empty-state-explore />
197
- </watt-icon>
198
- }
199
- @case ('custom-no-results') {
200
- <watt-icon [size]="iconSize()" class="watt-space-stack-l">
201
- <watt-empty-state-no-results />
202
- </watt-icon>
203
- }
204
- @case ('custom-power') {
205
- <watt-icon [size]="iconSize()" class="watt-space-stack-l">
206
- <watt-empty-state-power />
207
- </watt-icon>
208
- }
209
- @default {
210
- <watt-icon [name]="name" [size]="iconSize()" class="watt-space-stack-l" />
211
- }
212
- }
213
-
214
- @if (size() === 'large') {
215
- <h3>{{ title() }}</h3>
216
- } @else {
217
- <h5>{{ title() }}</h5>
218
- }
219
-
220
- @if (useHTML()) {
221
- <div [class.watt-text-s]="size() === 'small'" [innerHTML]="message()"></div>
222
- } @else {
223
- <p [class.watt-text-s]="size() === 'small'">{{ message() }}</p>
224
- }
225
-
226
- <ng-content />
227
- `, isInline: true, styles: ["@use \"@energinet-datahub/watt/utils\" as watt;watt-empty-state{display:block;text-align:center;color:var(--watt-color-primary-dark)}watt-empty-state h3,watt-empty-state h5,watt-empty-state p{margin:0;white-space:pre-wrap}watt-empty-state watt-button{display:block;margin-top:var(--watt-space-m)}watt-empty-state watt-button:first-of-type{margin-top:var(--watt-space-l)}\n"], dependencies: [{ kind: "component", type: WattEmptyStateExploreComponent, selector: "watt-empty-state-explore" }, { kind: "component", type: WattEmptyStateNoResultsComponent, selector: "watt-empty-state-no-results" }, { kind: "component", type: WattEmptyStatePowerComponent, selector: "watt-empty-state-power" }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], encapsulation: i0.ViewEncapsulation.None });
228
- }
229
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattEmptyStateComponent, decorators: [{
230
- type: Component,
231
- args: [{ selector: 'watt-empty-state', encapsulation: ViewEncapsulation.None, imports: [
232
- WattEmptyStateExploreComponent,
233
- WattEmptyStateNoResultsComponent,
234
- WattEmptyStatePowerComponent,
235
- WattIconComponent,
236
- ], template: `
237
- @let name = icon();
238
- @switch (name) {
239
- @case ('custom-explore') {
240
- <watt-icon [size]="iconSize()" class="watt-space-stack-l">
241
- <watt-empty-state-explore />
242
- </watt-icon>
243
- }
244
- @case ('custom-no-results') {
245
- <watt-icon [size]="iconSize()" class="watt-space-stack-l">
246
- <watt-empty-state-no-results />
247
- </watt-icon>
248
- }
249
- @case ('custom-power') {
250
- <watt-icon [size]="iconSize()" class="watt-space-stack-l">
251
- <watt-empty-state-power />
252
- </watt-icon>
253
- }
254
- @default {
255
- <watt-icon [name]="name" [size]="iconSize()" class="watt-space-stack-l" />
256
- }
257
- }
258
-
259
- @if (size() === 'large') {
260
- <h3>{{ title() }}</h3>
261
- } @else {
262
- <h5>{{ title() }}</h5>
263
- }
264
-
265
- @if (useHTML()) {
266
- <div [class.watt-text-s]="size() === 'small'" [innerHTML]="message()"></div>
267
- } @else {
268
- <p [class.watt-text-s]="size() === 'small'">{{ message() }}</p>
269
- }
270
-
271
- <ng-content />
272
- `, styles: ["@use \"@energinet-datahub/watt/utils\" as watt;watt-empty-state{display:block;text-align:center;color:var(--watt-color-primary-dark)}watt-empty-state h3,watt-empty-state h5,watt-empty-state p{margin:0;white-space:pre-wrap}watt-empty-state watt-button{display:block;margin-top:var(--watt-space-m)}watt-empty-state watt-button:first-of-type{margin-top:var(--watt-space-l)}\n"] }]
273
- }] });
274
-
275
- //#region License
276
- /**
277
- * @license
278
- * Copyright 2020 Energinet DataHub A/S
279
- *
280
- * Licensed under the Apache License, Version 2.0 (the "License2");
281
- * you may not use this file except in compliance with the License.
282
- * You may obtain a copy of the License at
283
- *
284
- * http://www.apache.org/licenses/LICENSE-2.0
285
- *
286
- * Unless required by applicable law or agreed to in writing, software
287
- * distributed under the License is distributed on an "AS IS" BASIS,
288
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
289
- * See the License for the specific language governing permissions and
290
- * limitations under the License.
291
- */
292
- //#endregion
293
-
294
- /**
295
- * Generated bundle index. Do not edit.
296
- */
297
-
298
- export { WattEmptyStateComponent, WattEmptyStateExploreComponent, WattEmptyStateNoResultsComponent, WattEmptyStatePowerComponent };
299
- //# sourceMappingURL=energinet-watt-empty-state.mjs.map