@energinet/watt 0.0.1

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 (291) hide show
  1. package/LICENSE +201 -0
  2. package/badge/index.d.ts +17 -0
  3. package/badge/watt-badge.component.d.ts +15 -0
  4. package/breadcrumbs/index.d.ts +17 -0
  5. package/breadcrumbs/watt-breadcrumbs.component.d.ts +23 -0
  6. package/button/index.d.ts +17 -0
  7. package/button/watt-button.component.d.ts +20 -0
  8. package/card/index.d.ts +18 -0
  9. package/card/watt-card-title.component.d.ts +6 -0
  10. package/card/watt-card.component.d.ts +15 -0
  11. package/checkbox/index.d.ts +17 -0
  12. package/checkbox/watt-checkbox.component.d.ts +17 -0
  13. package/chip/index.d.ts +23 -0
  14. package/chip/watt-action-chip.component.d.ts +8 -0
  15. package/chip/watt-chip.component.d.ts +8 -0
  16. package/chip/watt-chip.directive.d.ts +16 -0
  17. package/chip/watt-date-chip.component.d.ts +29 -0
  18. package/chip/watt-date-range-chip.component.d.ts +50 -0
  19. package/chip/watt-filter-chip.component.d.ts +30 -0
  20. package/chip/watt-menu-chip.component.d.ts +30 -0
  21. package/clipboard/index.d.ts +18 -0
  22. package/clipboard/watt-clipboard-intl.service.d.ts +7 -0
  23. package/clipboard/watt-copy-to-clipboard.directive.d.ts +12 -0
  24. package/code/index.d.ts +18 -0
  25. package/code/watt-code.component.d.ts +32 -0
  26. package/code/watt-code.worker.token.d.ts +18 -0
  27. package/core/breakpoints/_breakpoints.import.scss +53 -0
  28. package/core/breakpoints/_include-media.scss +568 -0
  29. package/core/breakpoints/breakpoints-observer.d.ts +39 -0
  30. package/core/breakpoints/breakpoints.d.ts +29 -0
  31. package/core/breakpoints/index.d.ts +18 -0
  32. package/core/color/+storybook/storybook-colors-overview.component.scss +50 -0
  33. package/core/color/color-helper.service.d.ts +12 -0
  34. package/core/color/colors.d.ts +51 -0
  35. package/core/color/index.d.ts +18 -0
  36. package/core/date/dayjs.d.ts +22 -0
  37. package/core/date/index.d.ts +23 -0
  38. package/core/date/watt-danish-datetime.providers.d.ts +1 -0
  39. package/core/date/watt-date-adapter.d.ts +31 -0
  40. package/core/date/watt-date-range.d.ts +25 -0
  41. package/core/date/watt-date.pipe.d.ts +28 -0
  42. package/core/date/watt-format-date.d.ts +11 -0
  43. package/core/date/watt-locale.service.d.ts +13 -0
  44. package/core/styles/@energinet-datahub/watt/_index.scss +52 -0
  45. package/core/styles/@energinet-datahub/watt/_utils.scss +16 -0
  46. package/core/styles/@energinet-datahub/watt/theme/light-theme.scss +71 -0
  47. package/core/styles/@energinet-datahub/watt/theme/material-overwrites/datepicker.scss +69 -0
  48. package/core/styles/@energinet-datahub/watt/theme/material-overwrites/snack-bar.scss +26 -0
  49. package/core/styles/_box-sizing.scss +22 -0
  50. package/core/styles/_chips.scss +22 -0
  51. package/core/styles/_elevation.scss +18 -0
  52. package/core/styles/_hr.scss +20 -0
  53. package/core/styles/_table.scss +89 -0
  54. package/core/styles/_tokens.scss +134 -0
  55. package/core/styles/_tooltip.scss +64 -0
  56. package/core/styles/_variables.scss +106 -0
  57. package/core/styles/_vater.scss +69 -0
  58. package/core/styles/spacing/+storybook/storybook-spacing-overview.component.scss +25 -0
  59. package/core/styles/spacing/_baseline.scss +23 -0
  60. package/core/styles/spacing/_inline.scss +38 -0
  61. package/core/styles/spacing/_inset.scss +61 -0
  62. package/core/styles/spacing/_spacing.import.scss +113 -0
  63. package/core/styles/spacing/_stack.scss +38 -0
  64. package/core/styles/spacing/_variables.scss +14 -0
  65. package/core/styles/spacing/index.scss +18 -0
  66. package/core/styles/typography/+storybook/storybook-typography-overview.component.scss +78 -0
  67. package/core/styles/typography/_rem.scss +24 -0
  68. package/core/styles/typography/_typography.import.scss +195 -0
  69. package/core/styles/typography/index.scss +118 -0
  70. package/data/index.d.ts +20 -0
  71. package/data/watt-data-actions.component.d.ts +5 -0
  72. package/data/watt-data-filters.component.d.ts +5 -0
  73. package/data/watt-data-intl.service.d.ts +15 -0
  74. package/data/watt-data-table.component.d.ts +27 -0
  75. package/datetime-field/index.d.ts +17 -0
  76. package/datetime-field/watt-datetime-field.component.d.ts +39 -0
  77. package/description-list/index.d.ts +17 -0
  78. package/description-list/watt-description-list-item.component.d.ts +27 -0
  79. package/description-list/watt-description-list.component.d.ts +19 -0
  80. package/drawer/index.d.ts +21 -0
  81. package/drawer/watt-drawer-actions.component.d.ts +5 -0
  82. package/drawer/watt-drawer-content.component.d.ts +5 -0
  83. package/drawer/watt-drawer-heading.component.d.ts +5 -0
  84. package/drawer/watt-drawer-topbar.component.d.ts +5 -0
  85. package/drawer/watt-drawer.component.d.ts +61 -0
  86. package/dropdown/index.d.ts +19 -0
  87. package/dropdown/watt-dropdown-option.d.ts +22 -0
  88. package/dropdown/watt-dropdown-value.d.ts +17 -0
  89. package/dropdown/watt-dropdown.component.d.ts +195 -0
  90. package/empty-state/icons/explore.d.ts +5 -0
  91. package/empty-state/icons/no-results.d.ts +5 -0
  92. package/empty-state/icons/power.d.ts +5 -0
  93. package/empty-state/index.d.ts +20 -0
  94. package/empty-state/watt-empty-state.component.d.ts +16 -0
  95. package/expandable-card/index.d.ts +19 -0
  96. package/expandable-card/watt-expandable-card.component.d.ts +34 -0
  97. package/expansion/expansion.component.d.ts +18 -0
  98. package/expansion/index.d.ts +17 -0
  99. package/fesm2022/energinet-watt-badge.mjs +66 -0
  100. package/fesm2022/energinet-watt-badge.mjs.map +1 -0
  101. package/fesm2022/energinet-watt-breadcrumbs.mjs +116 -0
  102. package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -0
  103. package/fesm2022/energinet-watt-button.mjs +120 -0
  104. package/fesm2022/energinet-watt-button.mjs.map +1 -0
  105. package/fesm2022/energinet-watt-card.mjs +117 -0
  106. package/fesm2022/energinet-watt-card.mjs.map +1 -0
  107. package/fesm2022/energinet-watt-checkbox.mjs +118 -0
  108. package/fesm2022/energinet-watt-checkbox.mjs.map +1 -0
  109. package/fesm2022/energinet-watt-chip.mjs +760 -0
  110. package/fesm2022/energinet-watt-chip.mjs.map +1 -0
  111. package/fesm2022/energinet-watt-clipboard.mjs +118 -0
  112. package/fesm2022/energinet-watt-clipboard.mjs.map +1 -0
  113. package/fesm2022/energinet-watt-code.mjs +119 -0
  114. package/fesm2022/energinet-watt-code.mjs.map +1 -0
  115. package/fesm2022/energinet-watt-core-breakpoints.mjs +100 -0
  116. package/fesm2022/energinet-watt-core-breakpoints.mjs.map +1 -0
  117. package/fesm2022/energinet-watt-core-color.mjs +127 -0
  118. package/fesm2022/energinet-watt-core-color.mjs.map +1 -0
  119. package/fesm2022/energinet-watt-core-date.mjs +260 -0
  120. package/fesm2022/energinet-watt-core-date.mjs.map +1 -0
  121. package/fesm2022/energinet-watt-data.mjs +286 -0
  122. package/fesm2022/energinet-watt-data.mjs.map +1 -0
  123. package/fesm2022/energinet-watt-datetime-field.mjs +233 -0
  124. package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -0
  125. package/fesm2022/energinet-watt-description-list.mjs +130 -0
  126. package/fesm2022/energinet-watt-description-list.mjs.map +1 -0
  127. package/fesm2022/energinet-watt-drawer.mjs +271 -0
  128. package/fesm2022/energinet-watt-drawer.mjs.map +1 -0
  129. package/fesm2022/energinet-watt-dropdown.mjs +423 -0
  130. package/fesm2022/energinet-watt-dropdown.mjs.map +1 -0
  131. package/fesm2022/energinet-watt-empty-state.mjs +299 -0
  132. package/fesm2022/energinet-watt-empty-state.mjs.map +1 -0
  133. package/fesm2022/energinet-watt-expandable-card.mjs +151 -0
  134. package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -0
  135. package/fesm2022/energinet-watt-expansion.mjs +78 -0
  136. package/fesm2022/energinet-watt-expansion.mjs.map +1 -0
  137. package/fesm2022/energinet-watt-field.mjs +249 -0
  138. package/fesm2022/energinet-watt-field.mjs.map +1 -0
  139. package/fesm2022/energinet-watt-icon-flags.mjs +376 -0
  140. package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -0
  141. package/fesm2022/energinet-watt-icon.mjs +195 -0
  142. package/fesm2022/energinet-watt-icon.mjs.map +1 -0
  143. package/fesm2022/energinet-watt-modal.mjs +260 -0
  144. package/fesm2022/energinet-watt-modal.mjs.map +1 -0
  145. package/fesm2022/energinet-watt-paginator.mjs +164 -0
  146. package/fesm2022/energinet-watt-paginator.mjs.map +1 -0
  147. package/fesm2022/energinet-watt-phone-field.mjs +322 -0
  148. package/fesm2022/energinet-watt-phone-field.mjs.map +1 -0
  149. package/fesm2022/energinet-watt-picker-__shared.mjs +384 -0
  150. package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -0
  151. package/fesm2022/energinet-watt-picker-datepicker.mjs +430 -0
  152. package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -0
  153. package/fesm2022/energinet-watt-picker-timepicker.mjs +394 -0
  154. package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -0
  155. package/fesm2022/energinet-watt-progress-tracker.mjs +141 -0
  156. package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -0
  157. package/fesm2022/energinet-watt-query-params.mjs +95 -0
  158. package/fesm2022/energinet-watt-query-params.mjs.map +1 -0
  159. package/fesm2022/energinet-watt-radio.mjs +125 -0
  160. package/fesm2022/energinet-watt-radio.mjs.map +1 -0
  161. package/fesm2022/energinet-watt-search.mjs +126 -0
  162. package/fesm2022/energinet-watt-search.mjs.map +1 -0
  163. package/fesm2022/energinet-watt-shell.mjs +315 -0
  164. package/fesm2022/energinet-watt-shell.mjs.map +1 -0
  165. package/fesm2022/energinet-watt-slider.mjs +159 -0
  166. package/fesm2022/energinet-watt-slider.mjs.map +1 -0
  167. package/fesm2022/energinet-watt-spinner.mjs +72 -0
  168. package/fesm2022/energinet-watt-spinner.mjs.map +1 -0
  169. package/fesm2022/energinet-watt-stepper.mjs +185 -0
  170. package/fesm2022/energinet-watt-stepper.mjs.map +1 -0
  171. package/fesm2022/energinet-watt-table.mjs +423 -0
  172. package/fesm2022/energinet-watt-table.mjs.map +1 -0
  173. package/fesm2022/energinet-watt-tabs.mjs +254 -0
  174. package/fesm2022/energinet-watt-tabs.mjs.map +1 -0
  175. package/fesm2022/energinet-watt-text-field.mjs +316 -0
  176. package/fesm2022/energinet-watt-text-field.mjs.map +1 -0
  177. package/fesm2022/energinet-watt-textarea-field.mjs +136 -0
  178. package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -0
  179. package/fesm2022/energinet-watt-toast.mjs +174 -0
  180. package/fesm2022/energinet-watt-toast.mjs.map +1 -0
  181. package/fesm2022/energinet-watt-tooltip.mjs +214 -0
  182. package/fesm2022/energinet-watt-tooltip.mjs.map +1 -0
  183. package/fesm2022/energinet-watt-utils-css.mjs +72 -0
  184. package/fesm2022/energinet-watt-utils-css.mjs.map +1 -0
  185. package/fesm2022/energinet-watt-utils-intersection-observer.mjs +83 -0
  186. package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +1 -0
  187. package/fesm2022/energinet-watt-utils-resize-observer.mjs +144 -0
  188. package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -0
  189. package/fesm2022/energinet-watt-validation-message.mjs +114 -0
  190. package/fesm2022/energinet-watt-validation-message.mjs.map +1 -0
  191. package/fesm2022/energinet-watt-validators.mjs +40 -0
  192. package/fesm2022/energinet-watt-validators.mjs.map +1 -0
  193. package/fesm2022/energinet-watt-vater.mjs +287 -0
  194. package/fesm2022/energinet-watt-vater.mjs.map +1 -0
  195. package/fesm2022/energinet-watt.mjs +47 -0
  196. package/fesm2022/energinet-watt.mjs.map +1 -0
  197. package/field/index.d.ts +20 -0
  198. package/field/watt-field-error.component.d.ts +5 -0
  199. package/field/watt-field-hint.component.d.ts +5 -0
  200. package/field/watt-field-intl.service.d.ts +8 -0
  201. package/field/watt-field.component.d.ts +42 -0
  202. package/icon/flags/index.d.ts +23 -0
  203. package/icon/flags/watt-flag-de.d.ts +5 -0
  204. package/icon/flags/watt-flag-dk.d.ts +5 -0
  205. package/icon/flags/watt-flag-fi.d.ts +5 -0
  206. package/icon/flags/watt-flag-no.d.ts +5 -0
  207. package/icon/flags/watt-flag-pl.d.ts +5 -0
  208. package/icon/flags/watt-flag-se.d.ts +5 -0
  209. package/icon/flags/watt-flag.d.ts +13 -0
  210. package/icon/icon.component.d.ts +20 -0
  211. package/icon/icons.d.ts +82 -0
  212. package/icon/index.d.ts +17 -0
  213. package/index.d.ts +33 -0
  214. package/modal/index.d.ts +18 -0
  215. package/modal/watt-modal.component.d.ts +86 -0
  216. package/modal/watt-modal.service.d.ts +62 -0
  217. package/package.json +237 -0
  218. package/paginator/index.d.ts +18 -0
  219. package/paginator/watt-paginator-intl.service.d.ts +14 -0
  220. package/paginator/watt-paginator.component.d.ts +53 -0
  221. package/phone-field/index.d.ts +18 -0
  222. package/phone-field/watt-phone-field-intl.service.d.ts +14 -0
  223. package/phone-field/watt-phone-field.component.d.ts +75 -0
  224. package/picker/__shared/index.d.ts +19 -0
  225. package/picker/__shared/placeholder-mask/watt-placeholder-mask.component.d.ts +34 -0
  226. package/picker/__shared/watt-picker-base.d.ts +201 -0
  227. package/picker/__shared/watt-picker-value.d.ts +18 -0
  228. package/picker/datepicker/index.d.ts +19 -0
  229. package/picker/datepicker/watt-datepicker-intl.service.d.ts +7 -0
  230. package/picker/datepicker/watt-datepicker.component.d.ts +149 -0
  231. package/picker/timepicker/index.d.ts +17 -0
  232. package/picker/timepicker/maskito-time-range-mask.d.ts +18 -0
  233. package/picker/timepicker/watt-timepicker.component.d.ts +132 -0
  234. package/progress-tracker/index.d.ts +20 -0
  235. package/progress-tracker/watt-progress-tracker-step.component.d.ts +10 -0
  236. package/progress-tracker/watt-progress-tracker.component.d.ts +5 -0
  237. package/query-params/index.d.ts +17 -0
  238. package/query-params/watt-query-params.directive.d.ts +27 -0
  239. package/radio/index.d.ts +17 -0
  240. package/radio/watt-radio.component.d.ts +24 -0
  241. package/search/index.d.ts +17 -0
  242. package/search/watt-search.component.d.ts +31 -0
  243. package/shell/index.d.ts +18 -0
  244. package/shell/nav-list/index.d.ts +18 -0
  245. package/shell/nav-list/watt-expand-on-active-link.directive.d.ts +26 -0
  246. package/shell/nav-list/watt-nav-list-item.component.d.ts +16 -0
  247. package/shell/nav-list/watt-nav-list.component.d.ts +12 -0
  248. package/shell/shell.component.d.ts +28 -0
  249. package/slider/index.d.ts +17 -0
  250. package/slider/watt-slider.component.d.ts +57 -0
  251. package/spinner/index.d.ts +17 -0
  252. package/spinner/watt-spinner.component.d.ts +15 -0
  253. package/stepper/index.d.ts +18 -0
  254. package/stepper/watt-stepper-step.component.d.ts +34 -0
  255. package/stepper/watt-stepper.component.d.ts +40 -0
  256. package/table/index.d.ts +18 -0
  257. package/table/watt-table-data-source.d.ts +37 -0
  258. package/table/watt-table.component.d.ts +239 -0
  259. package/tabs/index.d.ts +26 -0
  260. package/tabs/watt-link-tab.component.d.ts +7 -0
  261. package/tabs/watt-link-tabs.component.d.ts +7 -0
  262. package/tabs/watt-tab.component.d.ts +26 -0
  263. package/tabs/watt-tabs-action.component.d.ts +5 -0
  264. package/tabs/watt-tabs.component.d.ts +36 -0
  265. package/text-field/index.d.ts +17 -0
  266. package/text-field/watt-text-field.component.d.ts +77 -0
  267. package/textarea-field/index.d.ts +17 -0
  268. package/textarea-field/watt-textarea-field.component.d.ts +27 -0
  269. package/toast/index.d.ts +19 -0
  270. package/toast/watt-toast.component.d.ts +47 -0
  271. package/toast/watt-toast.service.d.ts +13 -0
  272. package/tooltip/index.d.ts +17 -0
  273. package/tooltip/watt-tooltip.component.d.ts +47 -0
  274. package/tooltip/watt-tooltip.directive.d.ts +31 -0
  275. package/utils/css/css-custom-properties.service.d.ts +10 -0
  276. package/utils/css/index.d.ts +17 -0
  277. package/utils/intersection-observer/index.d.ts +17 -0
  278. package/utils/intersection-observer/watt-intersection-observer.service.d.ts +21 -0
  279. package/utils/resize-observer/index.d.ts +18 -0
  280. package/utils/resize-observer/watt-resize-observer.directive.d.ts +35 -0
  281. package/utils/resize-observer/watt-resize-observer.service.d.ts +39 -0
  282. package/validation-message/index.d.ts +17 -0
  283. package/validation-message/watt-validation-message.component.d.ts +50 -0
  284. package/validators/index.d.ts +17 -0
  285. package/validators/watt-range.validators.d.ts +23 -0
  286. package/vater/index.d.ts +20 -0
  287. package/vater/types.d.ts +21 -0
  288. package/vater/vater-flex.component.d.ts +19 -0
  289. package/vater/vater-spacer.component.d.ts +5 -0
  290. package/vater/vater-stack.component.d.ts +14 -0
  291. package/vater/vater-utility.directive.d.ts +16 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-chip.mjs","sources":["../../../libs/watt/package/chip/watt-chip.component.ts","../../../libs/watt/package/chip/watt-action-chip.component.ts","../../../libs/watt/package/chip/watt-menu-chip.component.ts","../../../libs/watt/package/chip/watt-date-chip.component.ts","../../../libs/watt/package/chip/watt-date-range-chip.component.ts","../../../libs/watt/package/chip/watt-filter-chip.component.ts","../../../libs/watt/package/chip/watt-chip.directive.ts","../../../libs/watt/package/chip/index.ts","../../../libs/watt/package/chip/energinet-watt-chip.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 { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\n\n@Component({\n imports: [WattIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-chip',\n styleUrls: ['./watt-chip.component.scss'],\n template: `\n <label\n [class.selected]=\"selected()\"\n [class.disabled]=\"disabled()\"\n [class.read-only]=\"readonly()\"\n >\n @if (selected()) {\n <watt-icon class=\"selected-icon\" name=\"checkmark\" size=\"s\" [attr.aria-hidden]=\"true\" />\n }\n <ng-content />\n </label>\n `,\n})\nexport class WattChipComponent {\n selected = input(false);\n disabled = input(false);\n readonly = input(false);\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 { Component, input, output } from '@angular/core';\n\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-action-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled()\">\n <button\n type=\"button\"\n class=\"cdk-visually-hidden\"\n (click)=\"$event.stopImmediatePropagation(); action.emit()\"\n [disabled]=\"disabled()\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n [name]=\"icon()\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.disabled]=\"disabled()\"\n />\n </watt-chip>\n `,\n})\nexport class WattActionChipComponent {\n disabled = input(false);\n icon = input.required<WattIcon>();\n action = output<void>();\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 { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\nexport type WattMenuChipHasPopup = 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-menu-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .menu-icon {\n margin-left: var(--watt-space-xs);\n transition: linear 0.2s all;\n color: var(--watt-color-primary);\n\n &.disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n }\n\n .opened {\n transform: rotate(180deg);\n }\n\n .selected {\n color: var(--watt-color-neutral-white);\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"selected\">\n <button\n class=\"cdk-visually-hidden\"\n [attr.aria-haspopup]=\"hasPopup\"\n [attr.aria-expanded]=\"opened\"\n [attr.aria-pressed]=\"selected\"\n (click)=\"toggle.emit()\"\n [disabled]=\"disabled\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n name=\"arrowDropDown\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.opened]=\"opened\"\n [class.selected]=\"selected\"\n [class.disabled]=\"disabled\"\n />\n </watt-chip>\n `,\n})\nexport class WattMenuChipComponent {\n @Input() opened = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: string;\n @Input() selected = false;\n @Input() hasPopup: WattMenuChipHasPopup = 'menu';\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() toggle = new EventEmitter<void>();\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 { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { WattDatePipe } from '@energinet/watt/core/date';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { FormControl } from '@angular/forms';\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\n@Component({\n imports: [MatDatepickerModule, WattMenuChipComponent, WattFieldComponent, WattDatePipe],\n selector: 'watt-date-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-chip {\n input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-datepicker #picker />\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"!!value\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <input\n tabindex=\"-1\"\n class=\"cdk-visually-hidden\"\n type=\"text\"\n [value]=\"value\"\n [matDatepicker]=\"picker\"\n (dateChange)=\"value = $event.value\"\n (dateChange)=\"selectionChange.emit($event.value)\"\n />\n {{ placeholder }}\n <span>\n @if (value) {\n @if (placeholder) {\n :\n }\n {{ value | wattDate }}\n }\n </span>\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() placeholder?: string;\n @Input() value?: string;\n @Input({ required: true }) formControl!: FormControl;\n @Output() selectionChange = new EventEmitter<Date>();\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 { FormControl } from '@angular/forms';\nimport {\n Component,\n EventEmitter,\n HostBinding,\n Injectable,\n Input,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport {\n DateRange,\n DefaultMatCalendarRangeStrategy,\n MAT_DATE_RANGE_SELECTION_STRATEGY,\n MatDatepickerModule,\n} from '@angular/material/datepicker';\nimport { dayjs, WattDatePipe, WattRange } from '@energinet/watt/core/date';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattDatepickerIntlService } from '@energinet/watt/picker/datepicker';\n\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\ntype customSelectionStrategy = (date: Date | null) => DateRange<Date>;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattDateRangeSelectionStrategy extends DefaultMatCalendarRangeStrategy<Date> {\n private customSelectionStrategy!: customSelectionStrategy;\n\n setCustomSelectionStrategy(strategy: customSelectionStrategy) {\n this.customSelectionStrategy = strategy;\n }\n\n override selectionFinished(date: Date, currentRange: DateRange<Date>): DateRange<Date> {\n let range: DateRange<Date> = super.selectionFinished(date, currentRange);\n\n if (this.customSelectionStrategy) {\n range = this.customSelectionStrategy(date);\n }\n\n return range.end ? new DateRange(range.start, dayjs(range.end).endOf('day').toDate()) : range;\n }\n\n override createPreview(activeDate: Date | null, currentRange: DateRange<Date>): DateRange<Date> {\n if (!this.customSelectionStrategy) {\n return super.createPreview(activeDate, currentRange);\n } else {\n return this.customSelectionStrategy(activeDate);\n }\n }\n}\n\n@Component({\n imports: [\n MatDatepickerModule,\n WattMenuChipComponent,\n WattDatePipe,\n WattFieldComponent,\n WattButtonComponent,\n ],\n providers: [\n {\n provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n useFactory: (comp: WattDateRangeChipComponent) => comp.selectionStrategy(),\n deps: [WattDateRangeChipComponent],\n },\n ],\n selector: 'watt-date-range-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-range-chip {\n mat-date-range-input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n &.has-placeholder .value::before {\n content: ':';\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-date-range-picker #picker>\n @if (showActions) {\n <mat-date-range-picker-actions>\n <watt-button variant=\"text\" (click)=\"clearInput()\" icon=\"remove\">{{\n intl.clear\n }}</watt-button>\n <watt-button variant=\"primary\" matDateRangePickerApply>{{ intl.select }}</watt-button>\n </mat-date-range-picker-actions>\n }\n </mat-date-range-picker>\n\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"value?.start && value?.end ? true : false\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <mat-date-range-input\n #input\n class=\"cdk-visually-hidden\"\n separator=\"\"\n [rangePicker]=\"picker\"\n >\n <input\n type=\"text\"\n matStartDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.start\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"showActions && onSelectionChange($event.value ? input.value! : null)\"\n />\n <input\n type=\"text\"\n matEndDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.end\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"onSelectionChange($event.value ? input.value! : null)\"\n />\n </mat-date-range-input>\n <ng-content />\n @if (value?.start && value?.end) {\n <span class=\"value\">\n {{ value | wattDate }}\n </span>\n }\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateRangeChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() value?: WattRange<Date>;\n @Input({ required: true }) formControl!: FormControl;\n @Input() placeholder = true;\n @Input() showActions = false;\n @Input() customSelectionStrategy!: (date: Date | null) => DateRange<Date>;\n\n @HostBinding('class.has-placeholder')\n get hasPlaceholderClass(): boolean {\n return this.placeholder;\n }\n\n @Output() selectionChange = new EventEmitter<WattRange<Date> | null>();\n\n private _dateAdapter = inject(DateAdapter);\n protected intl = inject(WattDatepickerIntlService);\n\n selectionStrategy() {\n const strategy = new WattDateRangeSelectionStrategy(this._dateAdapter);\n strategy.setCustomSelectionStrategy(this.customSelectionStrategy);\n return strategy;\n }\n\n clearInput(): void {\n this.value = undefined;\n this.selectionChange.emit(null);\n }\n\n onSelectionChange(value: WattRange<Date> | null): void {\n this.selectionChange.emit(value);\n }\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 { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattChipComponent } from './watt-chip.component';\n\nfunction isFirstRender() {\n let isFirstRender = true;\n return () => {\n if (!isFirstRender) return false;\n isFirstRender = false;\n return true;\n };\n}\n\n@Component({\n imports: [WattChipComponent],\n selector: 'watt-filter-chip',\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"isFirstRender() ? selected : input.checked\">\n <input\n #input\n class=\"cdk-visually-hidden\"\n [type]=\"choice === undefined ? 'checkbox' : 'radio'\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n (change)=\"onChange(input)\"\n />\n <ng-content />\n </watt-chip>\n `,\n})\nexport class WattFilterChipComponent<T = string> {\n @Input() selected = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: T;\n @Input() choice?: string;\n @Output() selectionChange = new EventEmitter<T>();\n isFirstRender = isFirstRender();\n\n onChange(input: HTMLInputElement): void {\n const value = this.choice !== undefined ? input.value : input.checked;\n this.selectionChange.emit(value as T);\n }\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, ElementRef, EventEmitter, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { WattFilterChipComponent } from './watt-filter-chip.component';\nimport { WattDateChipComponent } from './watt-date-chip.component';\nimport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface WattChip {\n value?: any;\n disabled: boolean;\n selectionChange: EventEmitter<any>;\n}\n\n@Directive({\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattFormChipDirective),\n multi: true,\n },\n ],\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `\n watt-filter-chip[formControl],\n watt-date-chip[formControl],\n watt-date-range-chip[formControl],\n watt-filter-chip[formControlName],\n watt-date-chip[formControlName],\n watt-date-range-chip[formControlName],\n `,\n})\nexport class WattFormChipDirective implements ControlValueAccessor {\n private filterChip = inject(WattFilterChipComponent, { host: true, optional: true, self: true });\n private dateChip = inject(WattDateChipComponent, { host: true, optional: true, self: true });\n private dateRangeChip = inject(WattDateRangeChipComponent, {\n host: true,\n optional: true,\n self: true,\n });\n\n private element = inject(ElementRef);\n private component?: WattChip;\n\n constructor() {\n if (this.filterChip) {\n this.component = this.filterChip;\n } else if (this.dateChip) {\n this.component = this.dateChip;\n } else if (this.dateRangeChip) {\n this.component = this.dateRangeChip;\n }\n }\n\n writeValue(value?: any): void {\n if (this.component) {\n this.component.value = value;\n }\n }\n\n registerOnChange(fn: () => void) {\n this.component?.selectionChange.subscribe(fn);\n }\n\n registerOnTouched(fn: () => void) {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState(disabled: boolean) {\n if (this.component) {\n this.component.disabled = disabled;\n }\n }\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 { WattActionChipComponent } from './watt-action-chip.component';\nexport { WattChipComponent } from './watt-chip.component';\nexport { WattDateChipComponent } from './watt-date-chip.component';\nexport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\nexport { WattFilterChipComponent } from './watt-filter-chip.component';\nexport { WattFormChipDirective } from './watt-chip.directive';\nexport { WattMenuChipComponent } from './watt-menu-chip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\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,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,EAjBrB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8OAAA,EAAA,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,qBAAqB,CAAC;AACpD,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAWU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAlBjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;;AAED,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACF,iBAAA;;;ACjDD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -0,0 +1,118 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, inject, ElementRef, input, output, Directive } from '@angular/core';
3
+ import { Clipboard } from '@angular/cdk/clipboard';
4
+ import { WattToastService } from '@energinet/watt/toast';
5
+
6
+ //#region License
7
+ /**
8
+ * @license
9
+ * Copyright 2020 Energinet DataHub A/S
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License2");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License.
22
+ */
23
+ //#endregion
24
+ class WattClipboardIntlService {
25
+ success = 'Copied to clipboard';
26
+ error = 'Failed to copy';
27
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattClipboardIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
28
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattClipboardIntlService, providedIn: 'root' });
29
+ }
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattClipboardIntlService, decorators: [{
31
+ type: Injectable,
32
+ args: [{ providedIn: 'root' }]
33
+ }] });
34
+
35
+ //#region License
36
+ /**
37
+ * @license
38
+ * Copyright 2020 Energinet DataHub A/S
39
+ *
40
+ * Licensed under the Apache License, Version 2.0 (the "License2");
41
+ * you may not use this file except in compliance with the License.
42
+ * You may obtain a copy of the License at
43
+ *
44
+ * http://www.apache.org/licenses/LICENSE-2.0
45
+ *
46
+ * Unless required by applicable law or agreed to in writing, software
47
+ * distributed under the License is distributed on an "AS IS" BASIS,
48
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49
+ * See the License for the specific language governing permissions and
50
+ * limitations under the License.
51
+ */
52
+ //#endregion
53
+ class WattCopyToClipboardDirective {
54
+ element = inject(ElementRef);
55
+ clipboard = inject(Clipboard);
56
+ toast = inject(WattToastService);
57
+ intl = inject(WattClipboardIntlService);
58
+ text = input(undefined, { alias: 'wattCopyToClipboard' });
59
+ copySuccess = output();
60
+ handleHostClick() {
61
+ const text = this.text();
62
+ const success = text
63
+ ? this.clipboard.copy(text)
64
+ : this.clipboard.copy(this.element.nativeElement.innerText);
65
+ if (success) {
66
+ this.toast.open({
67
+ type: 'success',
68
+ message: this.intl.success,
69
+ });
70
+ this.copySuccess.emit(true);
71
+ }
72
+ else {
73
+ this.toast.open({
74
+ type: 'danger',
75
+ message: this.intl.error,
76
+ });
77
+ this.copySuccess.emit(false);
78
+ }
79
+ }
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCopyToClipboardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
81
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: WattCopyToClipboardDirective, isStandalone: true, selector: "[wattCopyToClipboard]", inputs: { text: { classPropertyName: "text", publicName: "wattCopyToClipboard", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copySuccess: "copySuccess" }, host: { listeners: { "click": "handleHostClick()" }, properties: { "style.cursor": "'pointer'" } }, ngImport: i0 });
82
+ }
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCopyToClipboardDirective, decorators: [{
84
+ type: Directive,
85
+ args: [{
86
+ selector: '[wattCopyToClipboard]',
87
+ host: {
88
+ '[style.cursor]': "'pointer'",
89
+ '(click)': 'handleHostClick()',
90
+ },
91
+ }]
92
+ }] });
93
+
94
+ //#region License
95
+ /**
96
+ * @license
97
+ * Copyright 2020 Energinet DataHub A/S
98
+ *
99
+ * Licensed under the Apache License, Version 2.0 (the "License2");
100
+ * you may not use this file except in compliance with the License.
101
+ * You may obtain a copy of the License at
102
+ *
103
+ * http://www.apache.org/licenses/LICENSE-2.0
104
+ *
105
+ * Unless required by applicable law or agreed to in writing, software
106
+ * distributed under the License is distributed on an "AS IS" BASIS,
107
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108
+ * See the License for the specific language governing permissions and
109
+ * limitations under the License.
110
+ */
111
+ //#endregion
112
+
113
+ /**
114
+ * Generated bundle index. Do not edit.
115
+ */
116
+
117
+ export { WattClipboardIntlService, WattCopyToClipboardDirective };
118
+ //# sourceMappingURL=energinet-watt-clipboard.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-clipboard.mjs","sources":["../../../libs/watt/package/clipboard/watt-clipboard-intl.service.ts","../../../libs/watt/package/clipboard/watt-copy-to-clipboard.directive.ts","../../../libs/watt/package/clipboard/index.ts","../../../libs/watt/package/clipboard/energinet-watt-clipboard.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 WattClipboardIntlService {\n success = 'Copied to clipboard';\n error = 'Failed to copy';\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 { input, output, inject, Directive, ElementRef } from '@angular/core';\nimport { Clipboard } from '@angular/cdk/clipboard';\n\nimport { WattToastService } from '@energinet/watt/toast';\nimport { WattClipboardIntlService } from './watt-clipboard-intl.service';\n\n@Directive({\n selector: '[wattCopyToClipboard]',\n host: {\n '[style.cursor]': \"'pointer'\",\n '(click)': 'handleHostClick()',\n },\n})\nexport class WattCopyToClipboardDirective {\n private element = inject(ElementRef);\n private clipboard = inject(Clipboard);\n private toast = inject(WattToastService);\n private intl = inject(WattClipboardIntlService);\n\n text = input<string>(undefined, { alias: 'wattCopyToClipboard' });\n\n copySuccess = output<boolean>();\n\n handleHostClick() {\n const text = this.text();\n const success = text\n ? this.clipboard.copy(text)\n : this.clipboard.copy(this.element.nativeElement.innerText);\n\n if (success) {\n this.toast.open({\n type: 'success',\n message: this.intl.success,\n });\n\n this.copySuccess.emit(true);\n } else {\n this.toast.open({\n type: 'danger',\n message: this.intl.error,\n });\n\n this.copySuccess.emit(false);\n }\n }\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 { WattCopyToClipboardDirective } from './watt-copy-to-clipboard.directive';\nexport { WattClipboardIntlService } from './watt-clipboard-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAIa,wBAAwB,CAAA;IACnC,OAAO,GAAG,qBAAqB;IAC/B,KAAK,GAAG,gBAAgB;uGAFb,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cADX,MAAM,EAAA,CAAA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,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAPxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,gBAAgB,EAAE,WAAW;AAC7B,wBAAA,SAAS,EAAE,mBAAmB;AAC/B,qBAAA;AACF,iBAAA;;;AC9BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -0,0 +1,119 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, input, linkedSignal, signal, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { WattSpinnerComponent } from '@energinet/watt/spinner';
4
+ import { VaterStackComponent } from '@energinet/watt/vater';
5
+
6
+ //#region License
7
+ /**
8
+ * @license
9
+ * Copyright 2020 Energinet DataHub A/S
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License2");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License.
22
+ */
23
+ //#endregion
24
+ const WATT_CODE_HIGHLIGHT_WORKER_FACTORY = new InjectionToken('WattCodeHighlightWorkerFactory', { factory: () => null });
25
+
26
+ //#region License
27
+ /**
28
+ * @license
29
+ * Copyright 2020 Energinet DataHub A/S
30
+ *
31
+ * Licensed under the Apache License, Version 2.0 (the "License2");
32
+ * you may not use this file except in compliance with the License.
33
+ * You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing, software
38
+ * distributed under the License is distributed on an "AS IS" BASIS,
39
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40
+ * See the License for the specific language governing permissions and
41
+ * limitations under the License.
42
+ */
43
+ //#endregion
44
+ class WattCodeComponent {
45
+ highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);
46
+ worker = this.highlightWorkerFactory?.();
47
+ code = input.required();
48
+ /** @ignore */
49
+ formattedCode = linkedSignal(() => this.code() ?? '');
50
+ /** @ignore */
51
+ loading = signal(false);
52
+ /** @ignore */
53
+ ngOnDestroy() {
54
+ this.worker?.terminate();
55
+ }
56
+ constructor() {
57
+ effect(() => {
58
+ const code = this.code();
59
+ if (!code)
60
+ return;
61
+ if (!this.worker)
62
+ return;
63
+ this.loading.set(true);
64
+ this.worker.onmessage = (event) => {
65
+ this.formattedCode.set(event.data);
66
+ this.loading.set(false);
67
+ };
68
+ this.worker.postMessage(code);
69
+ });
70
+ }
71
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
72
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattCodeComponent, isStandalone: true, selector: "watt-code", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
73
+ @if (loading()) {
74
+ <vater-stack [fill]="'horizontal'" [align]="'center'"><watt-spinner /></vater-stack>
75
+ } @else {
76
+ <pre>
77
+ <code class="watt-code-content" [innerHTML]="formattedCode()"></code>
78
+ </pre>
79
+ }
80
+ `, isInline: true, styles: ["watt-tabs watt-code pre code.watt-code-content{padding:0}watt-code{display:block;overflow:auto}watt-code pre{display:flex;margin-top:0;margin-bottom:0;word-wrap:break-word}watt-code pre code{flex:1;line-height:1.8em;font-size:14px;min-height:100%;padding:1em 1.2em;text-wrap:balance}\n"], dependencies: [{ kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]", inputs: ["align", "direction", "gap", "justify", "offset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
81
+ }
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCodeComponent, decorators: [{
83
+ type: Component,
84
+ args: [{ selector: 'watt-code', template: `
85
+ @if (loading()) {
86
+ <vater-stack [fill]="'horizontal'" [align]="'center'"><watt-spinner /></vater-stack>
87
+ } @else {
88
+ <pre>
89
+ <code class="watt-code-content" [innerHTML]="formattedCode()"></code>
90
+ </pre>
91
+ }
92
+ `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [WattSpinnerComponent, VaterStackComponent], styles: ["watt-tabs watt-code pre code.watt-code-content{padding:0}watt-code{display:block;overflow:auto}watt-code pre{display:flex;margin-top:0;margin-bottom:0;word-wrap:break-word}watt-code pre code{flex:1;line-height:1.8em;font-size:14px;min-height:100%;padding:1em 1.2em;text-wrap:balance}\n"] }]
93
+ }], ctorParameters: () => [] });
94
+
95
+ //#region License
96
+ /**
97
+ * @license
98
+ * Copyright 2020 Energinet DataHub A/S
99
+ *
100
+ * Licensed under the Apache License, Version 2.0 (the "License2");
101
+ * you may not use this file except in compliance with the License.
102
+ * You may obtain a copy of the License at
103
+ *
104
+ * http://www.apache.org/licenses/LICENSE-2.0
105
+ *
106
+ * Unless required by applicable law or agreed to in writing, software
107
+ * distributed under the License is distributed on an "AS IS" BASIS,
108
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109
+ * See the License for the specific language governing permissions and
110
+ * limitations under the License.
111
+ */
112
+ //#endregion
113
+
114
+ /**
115
+ * Generated bundle index. Do not edit.
116
+ */
117
+
118
+ export { WATT_CODE_HIGHLIGHT_WORKER_FACTORY, WattCodeComponent };
119
+ //# sourceMappingURL=energinet-watt-code.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-code.mjs","sources":["../../../libs/watt/package/code/watt-code.worker.token.ts","../../../libs/watt/package/code/watt-code.component.ts","../../../libs/watt/package/code/index.ts","../../../libs/watt/package/code/energinet-watt-code.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 { InjectionToken } from '@angular/core';\n\nexport const WATT_CODE_HIGHLIGHT_WORKER_FACTORY = new InjectionToken<(() => Worker) | null>(\n 'WattCodeHighlightWorkerFactory',\n { factory: () => null }\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 {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n input,\n OnDestroy,\n inject,\n effect,\n linkedSignal,\n} from '@angular/core';\n\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\nimport { VaterStackComponent } from '@energinet/watt/vater';\n\nimport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY } from './watt-code.worker.token';\n\n@Component({\n selector: 'watt-code',\n template: `\n @if (loading()) {\n <vater-stack [fill]=\"'horizontal'\" [align]=\"'center'\"><watt-spinner /></vater-stack>\n } @else {\n <pre>\n <code class=\"watt-code-content\" [innerHTML]=\"formattedCode()\"></code>\n </pre>\n }\n `,\n styleUrls: ['./watt-code.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WattSpinnerComponent, VaterStackComponent],\n})\nexport class WattCodeComponent implements OnDestroy {\n private highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);\n private worker = this.highlightWorkerFactory?.();\n\n code = input.required<string | null | undefined>();\n\n /** @ignore */\n formattedCode = linkedSignal(() => this.code() ?? '');\n\n /** @ignore */\n loading = signal(false);\n\n /** @ignore */\n ngOnDestroy(): void {\n this.worker?.terminate();\n }\n\n constructor() {\n effect(() => {\n const code = this.code();\n if (!code) return;\n if (!this.worker) return;\n this.loading.set(true);\n this.worker.onmessage = (event) => {\n this.formattedCode.set(event.data);\n this.loading.set(false);\n };\n this.worker.postMessage(code);\n });\n }\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 { WattCodeComponent } from './watt-code.component';\nexport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY } from './watt-code.worker.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAGa,MAAA,kCAAkC,GAAG,IAAI,cAAc,CAClE,gCAAgC,EAChC,EAAE,OAAO,EAAE,MAAM,IAAI,EAAE;;ACtBzB;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkCa,iBAAiB,CAAA;AACpB,IAAA,sBAAsB,GAAG,MAAM,CAAC,kCAAkC,CAAC;AACnE,IAAA,MAAM,GAAG,IAAI,CAAC,sBAAsB,IAAI;AAEhD,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAA6B;;AAGlD,IAAA,aAAa,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;;AAGrD,IAAA,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;;IAGvB,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE;;AAG1B,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;AACxB,YAAA,IAAI,CAAC,IAAI;gBAAE;YACX,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAE;AAClB,YAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,KAAK,KAAI;gBAChC,IAAI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;;;AAQT,EAAA,CAAA,EAAA,eAAA,EAEgB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,EAAA,MAAA,EAAA,CAAA,+RAAA,CAAA,EAAA;;;ACjDtD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -0,0 +1,100 @@
1
+ import * as i1 from '@angular/cdk/layout';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable } from '@angular/core';
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
+ /**
24
+ * NOTE: Keep in sync with ./_breakpoints.scss
25
+ * NOTE: We don't use CSS Custom Properties for our breakpoints,
26
+ * because they can't be used in media queries and we don't want those changed on the fly
27
+ */
28
+ const WattBreakpoint = {
29
+ XSmall: '(max-width: 599.98px)',
30
+ Small: '(min-width: 600px) and (max-width: 959.98px)',
31
+ Medium: '(min-width: 960px) and (max-width: 1279.98px)',
32
+ Large: '(min-width: 1280px) and (max-width: 1919.98px)',
33
+ XLarge: '(min-width: 1920px)',
34
+ };
35
+
36
+ //#region License
37
+ /**
38
+ * @license
39
+ * Copyright 2020 Energinet DataHub A/S
40
+ *
41
+ * Licensed under the Apache License, Version 2.0 (the "License2");
42
+ * you may not use this file except in compliance with the License.
43
+ * You may obtain a copy of the License at
44
+ *
45
+ * http://www.apache.org/licenses/LICENSE-2.0
46
+ *
47
+ * Unless required by applicable law or agreed to in writing, software
48
+ * distributed under the License is distributed on an "AS IS" BASIS,
49
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50
+ * See the License for the specific language governing permissions and
51
+ * limitations under the License.
52
+ */
53
+ //#endregion
54
+ class WattBreakpointsObserver {
55
+ breakpointObserver;
56
+ constructor(breakpointObserver) {
57
+ this.breakpointObserver = breakpointObserver;
58
+ }
59
+ observe(breakpoints) {
60
+ if (Array.isArray(breakpoints)) {
61
+ return this.breakpointObserver.observe(breakpoints.map((bp) => WattBreakpoint[bp]));
62
+ }
63
+ return this.breakpointObserver.observe(WattBreakpoint[breakpoints]);
64
+ }
65
+ isMatched(breakpoint) {
66
+ return this.breakpointObserver.isMatched(WattBreakpoint[breakpoint]);
67
+ }
68
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattBreakpointsObserver, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
69
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattBreakpointsObserver, providedIn: 'root' });
70
+ }
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattBreakpointsObserver, decorators: [{
72
+ type: Injectable,
73
+ args: [{ providedIn: 'root' }]
74
+ }], ctorParameters: () => [{ type: i1.BreakpointObserver }] });
75
+
76
+ //#region License
77
+ /**
78
+ * @license
79
+ * Copyright 2020 Energinet DataHub A/S
80
+ *
81
+ * Licensed under the Apache License, Version 2.0 (the "License2");
82
+ * you may not use this file except in compliance with the License.
83
+ * You may obtain a copy of the License at
84
+ *
85
+ * http://www.apache.org/licenses/LICENSE-2.0
86
+ *
87
+ * Unless required by applicable law or agreed to in writing, software
88
+ * distributed under the License is distributed on an "AS IS" BASIS,
89
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90
+ * See the License for the specific language governing permissions and
91
+ * limitations under the License.
92
+ */
93
+ //#endregion
94
+
95
+ /**
96
+ * Generated bundle index. Do not edit.
97
+ */
98
+
99
+ export { WattBreakpoint, WattBreakpointsObserver };
100
+ //# sourceMappingURL=energinet-watt-core-breakpoints.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-core-breakpoints.mjs","sources":["../../../libs/watt/package/core/breakpoints/breakpoints.ts","../../../libs/watt/package/core/breakpoints/breakpoints-observer.ts","../../../libs/watt/package/core/breakpoints/index.ts","../../../libs/watt/package/core/breakpoints/energinet-watt-core-breakpoints.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\n/**\n * NOTE: Keep in sync with ./_breakpoints.scss\n * NOTE: We don't use CSS Custom Properties for our breakpoints,\n * because they can't be used in media queries and we don't want those changed on the fly\n */\nexport const WattBreakpoint = {\n XSmall: '(max-width: 599.98px)' as const,\n Small: '(min-width: 600px) and (max-width: 959.98px)' as const,\n Medium: '(min-width: 960px) and (max-width: 1279.98px)' as const,\n Large: '(min-width: 1280px) and (max-width: 1919.98px)' as const,\n XLarge: '(min-width: 1920px)' as const,\n};\n\nexport type WattBreakpointType = keyof typeof WattBreakpoint;\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 { BreakpointObserver } from '@angular/cdk/layout';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { WattBreakpoint, WattBreakpointType } from './breakpoints';\n\nexport interface WattBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WattBreakpointsObserver {\n constructor(private breakpointObserver: BreakpointObserver) {}\n\n observe(breakpoints: WattBreakpointType | WattBreakpointType[]): Observable<WattBreakpointState> {\n if (Array.isArray(breakpoints)) {\n return this.breakpointObserver.observe(breakpoints.map((bp) => WattBreakpoint[bp]));\n }\n return this.breakpointObserver.observe(WattBreakpoint[breakpoints]);\n }\n\n isMatched(breakpoint: WattBreakpointType): boolean {\n return this.breakpointObserver.isMatched(WattBreakpoint[breakpoint]);\n }\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 { WattBreakpointsObserver, WattBreakpointState } from './breakpoints-observer';\nexport { WattBreakpoint } from './breakpoints';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAC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A;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -0,0 +1,127 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import * as i1 from '@energinet/watt/utils/css';
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
+ const WattColor = {
24
+ // Primary
25
+ primary: '--watt-color-primary',
26
+ primaryLight: '--watt-color-primary-light',
27
+ primaryDark: '--watt-color-primary-dark',
28
+ primaryDarker: '--watt-color-primary-darker',
29
+ primaryUltralight: '--watt-color-primary-ultralight',
30
+ // Secondary
31
+ secondary: '--watt-color-secondary',
32
+ secondaryLight: '--watt-color-secondary-light',
33
+ secondaryDark: '--watt-color-secondary-dark',
34
+ secondaryUltralight: '--watt-color-secondary-ultralight',
35
+ // Data Visualization
36
+ data1: '--watt-color-data-1',
37
+ data2: '--watt-color-data-2',
38
+ data3: '--watt-color-data-3',
39
+ // Neutrals
40
+ black: '--watt-color-neutral-black',
41
+ white: '--watt-color-neutral-white',
42
+ grey50: '--watt-color-neutral-grey-50',
43
+ grey100: '--watt-color-neutral-grey-100',
44
+ grey200: '--watt-color-neutral-grey-200',
45
+ grey300: '--watt-color-neutral-grey-300',
46
+ grey400: '--watt-color-neutral-grey-400',
47
+ grey500: '--watt-color-neutral-grey-500',
48
+ grey600: '--watt-color-neutral-grey-600',
49
+ grey700: '--watt-color-neutral-grey-700',
50
+ grey800: '--watt-color-neutral-grey-800',
51
+ grey900: '--watt-color-neutral-grey-900',
52
+ // States
53
+ danger: '--watt-color-state-danger',
54
+ dangerLight: '--watt-color-state-danger-light',
55
+ warning: '--watt-color-state-warning',
56
+ warningLight: '--watt-color-state-warning-light',
57
+ success: '--watt-color-state-success',
58
+ successLight: '--watt-color-state-success-light',
59
+ info: '--watt-color-state-info',
60
+ infoLight: '--watt-color-state-info-light',
61
+ };
62
+
63
+ //#region License
64
+ /**
65
+ * @license
66
+ * Copyright 2020 Energinet DataHub A/S
67
+ *
68
+ * Licensed under the Apache License, Version 2.0 (the "License2");
69
+ * you may not use this file except in compliance with the License.
70
+ * You may obtain a copy of the License at
71
+ *
72
+ * http://www.apache.org/licenses/LICENSE-2.0
73
+ *
74
+ * Unless required by applicable law or agreed to in writing, software
75
+ * distributed under the License is distributed on an "AS IS" BASIS,
76
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
77
+ * See the License for the specific language governing permissions and
78
+ * limitations under the License.
79
+ */
80
+ //#endregion
81
+ class WattColorHelperService {
82
+ cssCustomPropertiesService;
83
+ colorContrastSuffix = 'contrast';
84
+ constructor(cssCustomPropertiesService) {
85
+ this.cssCustomPropertiesService = cssCustomPropertiesService;
86
+ }
87
+ getColor(color) {
88
+ return this.cssCustomPropertiesService.getPropertyValue(WattColor[color]);
89
+ }
90
+ getColorContrast(color) {
91
+ return this.cssCustomPropertiesService.getPropertyValue(`${WattColor[color]}-${this.colorContrastSuffix}`);
92
+ }
93
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattColorHelperService, deps: [{ token: i1.WattCssCustomPropertiesService }], target: i0.ɵɵFactoryTarget.Injectable });
94
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattColorHelperService, providedIn: 'root' });
95
+ }
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattColorHelperService, decorators: [{
97
+ type: Injectable,
98
+ args: [{
99
+ providedIn: 'root',
100
+ }]
101
+ }], ctorParameters: () => [{ type: i1.WattCssCustomPropertiesService }] });
102
+
103
+ //#region License
104
+ /**
105
+ * @license
106
+ * Copyright 2020 Energinet DataHub A/S
107
+ *
108
+ * Licensed under the Apache License, Version 2.0 (the "License2");
109
+ * you may not use this file except in compliance with the License.
110
+ * You may obtain a copy of the License at
111
+ *
112
+ * http://www.apache.org/licenses/LICENSE-2.0
113
+ *
114
+ * Unless required by applicable law or agreed to in writing, software
115
+ * distributed under the License is distributed on an "AS IS" BASIS,
116
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
117
+ * See the License for the specific language governing permissions and
118
+ * limitations under the License.
119
+ */
120
+ //#endregion
121
+
122
+ /**
123
+ * Generated bundle index. Do not edit.
124
+ */
125
+
126
+ export { WattColor, WattColorHelperService };
127
+ //# sourceMappingURL=energinet-watt-core-color.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-core-color.mjs","sources":["../../../libs/watt/package/core/color/colors.ts","../../../libs/watt/package/core/color/color-helper.service.ts","../../../libs/watt/package/core/color/index.ts","../../../libs/watt/package/core/color/energinet-watt-core-color.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\nexport const WattColor = {\n // Primary\n primary: '--watt-color-primary' as const,\n primaryLight: '--watt-color-primary-light' as const,\n primaryDark: '--watt-color-primary-dark' as const,\n primaryDarker: '--watt-color-primary-darker' as const,\n primaryUltralight: '--watt-color-primary-ultralight' as const,\n // Secondary\n secondary: '--watt-color-secondary' as const,\n secondaryLight: '--watt-color-secondary-light' as const,\n secondaryDark: '--watt-color-secondary-dark' as const,\n secondaryUltralight: '--watt-color-secondary-ultralight' as const,\n // Data Visualization\n data1: '--watt-color-data-1' as const,\n data2: '--watt-color-data-2' as const,\n data3: '--watt-color-data-3' as const,\n // Neutrals\n black: '--watt-color-neutral-black' as const,\n white: '--watt-color-neutral-white' as const,\n grey50: '--watt-color-neutral-grey-50' as const,\n grey100: '--watt-color-neutral-grey-100' as const,\n grey200: '--watt-color-neutral-grey-200' as const,\n grey300: '--watt-color-neutral-grey-300' as const,\n grey400: '--watt-color-neutral-grey-400' as const,\n grey500: '--watt-color-neutral-grey-500' as const,\n grey600: '--watt-color-neutral-grey-600' as const,\n grey700: '--watt-color-neutral-grey-700' as const,\n grey800: '--watt-color-neutral-grey-800' as const,\n grey900: '--watt-color-neutral-grey-900' as const,\n // States\n danger: '--watt-color-state-danger' as const,\n dangerLight: '--watt-color-state-danger-light' as const,\n warning: '--watt-color-state-warning' as const,\n warningLight: '--watt-color-state-warning-light' as const,\n success: '--watt-color-state-success' as const,\n successLight: '--watt-color-state-success-light' as const,\n info: '--watt-color-state-info' as const,\n infoLight: '--watt-color-state-info-light' as const,\n};\n\nexport type WattColorType = keyof typeof WattColor;\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 { Injectable } from '@angular/core';\n\nimport { WattCssCustomPropertiesService } from '@energinet/watt/utils/css';\nimport { WattColor, WattColorType } from './colors';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattColorHelperService {\n private colorContrastSuffix = 'contrast';\n\n constructor(private cssCustomPropertiesService: WattCssCustomPropertiesService) {}\n\n public getColor(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(WattColor[color]);\n }\n\n public getColorContrast(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(\n `${WattColor[color]}-${this.colorContrastSuffix}`\n );\n }\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 { WattColor } from './colors';\nexport { WattColorHelperService } from './color-helper.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACa,MAAA,SAAS,GAAG;;AAEvB,IAAA,OAAO,EAAE,sBAA+B;AACxC,IAAA,YAAY,EAAE,4BAAqC;AACnD,IAAA,WAAW,EAAE,2BAAoC;AACjD,IAAA,aAAa,EAAE,6BAAsC;AACrD,IAAA,iBAAiB,EAAE,iCAA0C;;AAE7D,IAAA,SAAS,EAAE,wBAAiC;AAC5C,IAAA,cAAc,EAAE,8BAAuC;AACvD,IAAA,aAAa,EAAE,6BAAsC;AACrD,IAAA,mBAAmB,EAAE,mCAA4C;;AAEjE,IAAA,KAAK,EAAE,qBAA8B;AACrC,IAAA,KAAK,EAAE,qBAA8B;AACrC,IAAA,KAAK,EAAE,qBAA8B;;AAErC,IAAA,KAAK,EAAE,4BAAqC;AA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