@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,260 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, EventEmitter, Injectable, NgModule, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
4
+ import { MAT_DIALOG_DATA, MatDialogRef, MatDialog, MatDialogModule } from '@angular/material/dialog';
5
+ import { WattResizeObserverDirective } from '@energinet/watt/utils/resize-observer';
6
+ import { WattButtonComponent } from '@energinet/watt/button';
7
+ import { WattSpinnerComponent } from '@energinet/watt/spinner';
8
+ import { map, take } from 'rxjs';
9
+
10
+ class WattTypedModal {
11
+ modalData = inject(MAT_DIALOG_DATA);
12
+ dialogRef = inject(MatDialogRef);
13
+ }
14
+ class WattModalService {
15
+ dialog = inject(MatDialog);
16
+ matDialogRef;
17
+ /**
18
+ * Opens the modal. Subsequent calls are ignored while the modal is opened.
19
+ * @ignore
20
+ */
21
+ open = (config) => {
22
+ const template = config.templateRef ?? config.component;
23
+ if (!template)
24
+ return;
25
+ this.matDialogRef = this.openModal(template, config);
26
+ this.matDialogRef
27
+ .afterClosed()
28
+ .pipe(map(Boolean), take(1))
29
+ .subscribe((result) => {
30
+ if (config?.onClosed instanceof EventEmitter) {
31
+ config?.onClosed.emit(result);
32
+ }
33
+ else {
34
+ config?.onClosed?.(result);
35
+ }
36
+ });
37
+ if (config.minHeight)
38
+ this.setMinHeight(config.minHeight);
39
+ };
40
+ /**
41
+ * Opens the modal using the provided template and configuration.
42
+ */
43
+ openModal(template, config) {
44
+ return this.dialog.open(template, {
45
+ autoFocus: 'dialog',
46
+ panelClass: [
47
+ 'watt-modal-panel',
48
+ ...(config.component ? ['watt-modal-panel--component'] : []),
49
+ ...(config.panelClass ?? []),
50
+ ],
51
+ disableClose: config.disableClose ?? false,
52
+ data: config.data,
53
+ maxWidth: 'none',
54
+ injector: config.injector,
55
+ restoreFocus: config.restoreFocus === false ? false : true,
56
+ });
57
+ }
58
+ /**
59
+ * Closes the modal with `true` for acceptance or `false` for rejection.
60
+ * @ignore
61
+ */
62
+ close(result) {
63
+ this.matDialogRef?.close(result);
64
+ }
65
+ setMinHeight(minHeight) {
66
+ setTimeout(() => {
67
+ document
68
+ ?.getElementById(this.matDialogRef?.id ?? '')
69
+ ?.querySelector('.watt-modal')
70
+ ?.setAttribute('style', `--watt-modal-min-height: ${minHeight}`);
71
+ });
72
+ }
73
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
74
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalService });
75
+ }
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalService, decorators: [{
77
+ type: Injectable
78
+ }] });
79
+ class WattModalModule {
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
81
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: WattModalModule, imports: [MatDialogModule] });
82
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalModule, providers: [WattModalService], imports: [MatDialogModule] });
83
+ }
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalModule, decorators: [{
85
+ type: NgModule,
86
+ args: [{
87
+ imports: [MatDialogModule],
88
+ providers: [WattModalService],
89
+ }]
90
+ }] });
91
+
92
+ //#region License
93
+ /**
94
+ * @license
95
+ * Copyright 2020 Energinet DataHub A/S
96
+ *
97
+ * Licensed under the Apache License, Version 2.0 (the "License2");
98
+ * you may not use this file except in compliance with the License.
99
+ * You may obtain a copy of the License at
100
+ *
101
+ * http://www.apache.org/licenses/LICENSE-2.0
102
+ *
103
+ * Unless required by applicable law or agreed to in writing, software
104
+ * distributed under the License is distributed on an "AS IS" BASIS,
105
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
+ * See the License for the specific language governing permissions and
107
+ * limitations under the License.
108
+ */
109
+ //#endregion
110
+ /**
111
+ * Component for representing a binary decision in the form of
112
+ * a modal window that appears in front of the entire content.
113
+ *
114
+ * Usage:
115
+ * `import { WATT_MODAL } from '@energinet-datahub/watt/modal';`
116
+ */
117
+ class WattModalComponent {
118
+ modalService = inject(WattModalService);
119
+ dialogRef = inject(MatDialogRef, { optional: true });
120
+ /** Title to stay fixed to top of modal. */
121
+ title = '';
122
+ size = 'medium';
123
+ /** Whether the modal should show a loading state. */
124
+ loading = false;
125
+ /** Whether the modal should show a loading text for the loading state. */
126
+ loadingMessage = '';
127
+ /** Disable ESC, close button and backdrop click as methods of closing. */
128
+ disableClose = false;
129
+ /** Whether to show the close button */
130
+ hideCloseButton = false;
131
+ /** Disable ESC, backdrop click as methods of closing. */
132
+ disableEscAndBackdropClose = false;
133
+ /** The aria-label for the close button. */
134
+ closeLabel = 'Close';
135
+ /** Classes added to the modal panel */
136
+ panelClass = [];
137
+ minHeight = '147px';
138
+ /** Whether the dialog should restore focus to the previously-focused element, after it's closed. */
139
+ restoreFocus = true;
140
+ /**
141
+ * When modal is closed, emits `true` if it was "accepted",
142
+ * otherwise emits `false`.
143
+ * @ignore
144
+ */
145
+ closed = new EventEmitter();
146
+ /** @ignore */
147
+ modal;
148
+ /** @ignore */
149
+ scrollable = false;
150
+ /**
151
+ * Opens the modal. Subsequent calls are ignored while the modal is opened.
152
+ * @ignore
153
+ */
154
+ open() {
155
+ this.modalService.open({
156
+ disableClose: this.disableEscAndBackdropClose || this.disableClose,
157
+ templateRef: this.modal,
158
+ onClosed: this.closed,
159
+ minHeight: this.minHeight,
160
+ panelClass: this.panelClass,
161
+ restoreFocus: this.restoreFocus,
162
+ });
163
+ }
164
+ /**
165
+ * Closes the modal with `true` for acceptance or `false` for rejection.
166
+ * @ignore
167
+ */
168
+ close(result) {
169
+ this.modalService.close(result); // inline modal
170
+ this.dialogRef?.close(result); // injected modal
171
+ }
172
+ /**
173
+ * Called when the modal content element changes size.
174
+ * @ignore
175
+ */
176
+ onResize(event) {
177
+ this.scrollable = event.target.scrollHeight > event.target.clientHeight;
178
+ }
179
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
180
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattModalComponent, isStandalone: true, selector: "watt-modal", inputs: { title: "title", size: "size", loading: "loading", loadingMessage: "loadingMessage", disableClose: "disableClose", hideCloseButton: "hideCloseButton", disableEscAndBackdropClose: "disableEscAndBackdropClose", closeLabel: "closeLabel", panelClass: "panelClass", minHeight: "minHeight", restoreFocus: "restoreFocus" }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<ng-template #modal>\n <div class=\"watt-modal\" [ngClass]=\"'watt-modal--' + size\">\n @if (!disableClose && !hideCloseButton) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel\"\n (click)=\"close(false)\"\n />\n }\n @if (title && loading === false) {\n <h2 class=\"watt-modal-title\">{{ title }}</h2>\n }\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media (min-width: 600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media (min-width: 1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media (min-width: 786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media (min-width: 960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media (min-width: 720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: WattResizeObserverDirective, selector: "[wattResizeObserver]", outputs: ["resize"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "ngmodule", type: WattModalModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
181
+ }
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalComponent, decorators: [{
183
+ type: Component,
184
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'watt-modal', imports: [
185
+ NgClass,
186
+ NgTemplateOutlet,
187
+ WattResizeObserverDirective,
188
+ WattButtonComponent,
189
+ WattSpinnerComponent,
190
+ WattModalModule,
191
+ ], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<ng-template #modal>\n <div class=\"watt-modal\" [ngClass]=\"'watt-modal--' + size\">\n @if (!disableClose && !hideCloseButton) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel\"\n (click)=\"close(false)\"\n />\n }\n @if (title && loading === false) {\n <h2 class=\"watt-modal-title\">{{ title }}</h2>\n }\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media (min-width: 600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media (min-width: 1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media (min-width: 786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media (min-width: 960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media (min-width: 720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"] }]
192
+ }], propDecorators: { title: [{
193
+ type: Input
194
+ }], size: [{
195
+ type: Input
196
+ }], loading: [{
197
+ type: Input
198
+ }], loadingMessage: [{
199
+ type: Input
200
+ }], disableClose: [{
201
+ type: Input
202
+ }], hideCloseButton: [{
203
+ type: Input
204
+ }], disableEscAndBackdropClose: [{
205
+ type: Input
206
+ }], closeLabel: [{
207
+ type: Input
208
+ }], panelClass: [{
209
+ type: Input
210
+ }], minHeight: [{
211
+ type: Input
212
+ }], restoreFocus: [{
213
+ type: Input
214
+ }], closed: [{
215
+ type: Output
216
+ }], modal: [{
217
+ type: ViewChild,
218
+ args: ['modal']
219
+ }] } });
220
+ /**
221
+ * Component for projecting buttons (actions) to the bottom of the modal.
222
+ */
223
+ class WattModalActionsComponent {
224
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
225
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattModalActionsComponent, isStandalone: true, selector: "watt-modal-actions", ngImport: i0, template: '<ng-content />', isInline: true });
226
+ }
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattModalActionsComponent, decorators: [{
228
+ type: Component,
229
+ args: [{
230
+ selector: 'watt-modal-actions',
231
+ template: '<ng-content />',
232
+ }]
233
+ }] });
234
+ const WATT_MODAL = [WattModalComponent, WattModalActionsComponent];
235
+
236
+ //#region License
237
+ /**
238
+ * @license
239
+ * Copyright 2020 Energinet DataHub A/S
240
+ *
241
+ * Licensed under the Apache License, Version 2.0 (the "License2");
242
+ * you may not use this file except in compliance with the License.
243
+ * You may obtain a copy of the License at
244
+ *
245
+ * http://www.apache.org/licenses/LICENSE-2.0
246
+ *
247
+ * Unless required by applicable law or agreed to in writing, software
248
+ * distributed under the License is distributed on an "AS IS" BASIS,
249
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
250
+ * See the License for the specific language governing permissions and
251
+ * limitations under the License.
252
+ */
253
+ //#endregion
254
+
255
+ /**
256
+ * Generated bundle index. Do not edit.
257
+ */
258
+
259
+ export { WATT_MODAL, WattModalActionsComponent, WattModalComponent, WattModalService, WattTypedModal };
260
+ //# sourceMappingURL=energinet-watt-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-modal.mjs","sources":["../../../libs/watt/package/modal/watt-modal.service.ts","../../../libs/watt/package/modal/watt-modal.component.ts","../../../libs/watt/package/modal/watt-modal.component.html","../../../libs/watt/package/modal/index.ts","../../../libs/watt/package/modal/energinet-watt-modal.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 { ComponentType } from '@angular/cdk/portal';\nimport { EventEmitter, Injectable, Injector, NgModule, TemplateRef, inject } from '@angular/core';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogModule,\n MatDialogRef,\n} from '@angular/material/dialog';\nimport { map, take } from 'rxjs';\n\nexport interface WattModalConfig<T> {\n templateRef?: TemplateRef<unknown>;\n component?: ComponentType<WattTypedModal<T>>;\n data?: T;\n disableClose?: boolean;\n onClosed?: EventEmitter<boolean> | ((result: boolean) => void);\n minHeight?: string;\n panelClass?: string[];\n injector?: Injector;\n restoreFocus?: boolean;\n}\n\nexport abstract class WattTypedModal<T = void> {\n protected modalData: T = inject(MAT_DIALOG_DATA);\n protected dialogRef: MatDialogRef<WattTypedModal<T>> = inject(MatDialogRef);\n}\n\n@Injectable()\nexport class WattModalService {\n private readonly dialog = inject(MatDialog);\n private matDialogRef: MatDialogRef<unknown> | undefined;\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open = <T>(config: WattModalConfig<T>) => {\n const template = config.templateRef ?? config.component;\n\n if (!template) return;\n\n this.matDialogRef = this.openModal(template, config);\n\n this.matDialogRef\n .afterClosed()\n .pipe(map(Boolean), take(1))\n .subscribe((result) => {\n if (config?.onClosed instanceof EventEmitter) {\n config?.onClosed.emit(result);\n } else {\n config?.onClosed?.(result);\n }\n });\n\n if (config.minHeight) this.setMinHeight(config.minHeight);\n };\n\n /**\n * Opens the modal using the provided template and configuration.\n */\n private openModal<T>(\n template: TemplateRef<unknown> | ComponentType<WattTypedModal<T>>,\n config: WattModalConfig<T>\n ): MatDialogRef<unknown> {\n return this.dialog.open(template, {\n autoFocus: 'dialog',\n panelClass: [\n 'watt-modal-panel',\n ...(config.component ? ['watt-modal-panel--component'] : []),\n ...(config.panelClass ?? []),\n ],\n disableClose: config.disableClose ?? false,\n data: config.data,\n maxWidth: 'none',\n injector: config.injector,\n restoreFocus: config.restoreFocus === false ? false : true,\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.matDialogRef?.close(result);\n }\n\n private setMinHeight(minHeight: string) {\n setTimeout(() => {\n document\n ?.getElementById(this.matDialogRef?.id ?? '')\n ?.querySelector('.watt-modal')\n ?.setAttribute('style', `--watt-modal-min-height: ${minHeight}`);\n });\n }\n}\n\n@NgModule({\n imports: [MatDialogModule],\n providers: [WattModalService],\n})\nexport class WattModalModule {}\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 ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { WattResizeObserverDirective } from '@energinet/watt/utils/resize-observer';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nimport { WattModalModule, WattModalService } from './watt-modal.service';\n\nexport type WattModalSize = 'small' | 'medium' | 'large';\n\n/**\n * Component for representing a binary decision in the form of\n * a modal window that appears in front of the entire content.\n *\n * Usage:\n * `import { WATT_MODAL } from '@energinet-datahub/watt/modal';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-modal',\n styleUrls: ['./watt-modal.component.scss'],\n templateUrl: './watt-modal.component.html',\n imports: [\n NgClass,\n NgTemplateOutlet,\n WattResizeObserverDirective,\n WattButtonComponent,\n WattSpinnerComponent,\n WattModalModule,\n ],\n})\nexport class WattModalComponent {\n private modalService = inject(WattModalService);\n protected dialogRef = inject<MatDialogRef<unknown>>(MatDialogRef, { optional: true });\n /** Title to stay fixed to top of modal. */\n @Input() title = '';\n\n @Input() size: WattModalSize = 'medium';\n\n /** Whether the modal should show a loading state. */\n @Input() loading = false;\n\n /** Whether the modal should show a loading text for the loading state. */\n @Input() loadingMessage = '';\n\n /** Disable ESC, close button and backdrop click as methods of closing. */\n @Input() disableClose = false;\n\n /** Whether to show the close button */\n @Input() hideCloseButton = false;\n\n /** Disable ESC, backdrop click as methods of closing. */\n @Input() disableEscAndBackdropClose = false;\n\n /** The aria-label for the close button. */\n @Input() closeLabel = 'Close';\n\n /** Classes added to the modal panel */\n @Input() panelClass: string[] = [];\n\n @Input() minHeight = '147px';\n\n /** Whether the dialog should restore focus to the previously-focused element, after it's closed. */\n @Input() restoreFocus = true;\n\n /**\n * When modal is closed, emits `true` if it was \"accepted\",\n * otherwise emits `false`.\n * @ignore\n */\n @Output() closed = new EventEmitter<boolean>();\n\n /** @ignore */\n @ViewChild('modal') modal!: TemplateRef<Element>;\n\n /** @ignore */\n scrollable = false;\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open() {\n this.modalService.open({\n disableClose: this.disableEscAndBackdropClose || this.disableClose,\n templateRef: this.modal,\n onClosed: this.closed,\n minHeight: this.minHeight,\n panelClass: this.panelClass,\n restoreFocus: this.restoreFocus,\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.modalService.close(result); // inline modal\n this.dialogRef?.close(result); // injected modal\n }\n\n /**\n * Called when the modal content element changes size.\n * @ignore\n */\n onResize(event: ResizeObserverEntry) {\n this.scrollable = event.target.scrollHeight > event.target.clientHeight;\n }\n}\n\n/**\n * Component for projecting buttons (actions) to the bottom of the modal.\n */\n@Component({\n selector: 'watt-modal-actions',\n template: '<ng-content />',\n})\nexport class WattModalActionsComponent {}\n\nexport const WATT_MODAL = [WattModalComponent, WattModalActionsComponent];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<ng-template #modal>\n <div class=\"watt-modal\" [ngClass]=\"'watt-modal--' + size\">\n @if (!disableClose && !hideCloseButton) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel\"\n (click)=\"close(false)\"\n />\n }\n @if (title && loading === false) {\n <h2 class=\"watt-modal-title\">{{ title }}</h2>\n }\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\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 { WattModalComponent, WattModalActionsComponent, WATT_MODAL } from './watt-modal.component';\nexport { WattModalService, WattModalConfig, WattTypedModal } from './watt-modal.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAwCsB,cAAc,CAAA;AACxB,IAAA,SAAS,GAAM,MAAM,CAAC,eAAe,CAAC;AACtC,IAAA,SAAS,GAAoC,MAAM,CAAC,YAAY,CAAC;A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,EAAA,CAAA;sBAAlB;gBAGQ,UAAU,EAAA,CAAA;sBAAlB;gBAEQ,SAAS,EAAA,CAAA;sBAAjB;gBAGQ,YAAY,EAAA,CAAA;sBAApB;gBAOS,MAAM,EAAA,CAAA;sBAAf;gBAGmB,KAAK,EAAA,CAAA;sBAAxB,SAAS;uBAAC,OAAO;;AAsCpB;;AAEG;MAKU,yBAAyB,CAAA;uGAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,8EAF1B,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,gBAAgB;AAC3B,iBAAA;;MAGY,UAAU,GAAG,CAAC,kBAAkB,EAAE,yBAAyB;;AEvJxE;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -0,0 +1,164 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, inject, input, output, viewChild, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/material/paginator';
4
+ import { MatPaginatorIntl, MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
5
+ import { Subject, map, startWith } from 'rxjs';
6
+ import { toSignal } from '@angular/core/rxjs-interop';
7
+
8
+ //#region License
9
+ /**
10
+ * @license
11
+ * Copyright 2020 Energinet DataHub A/S
12
+ *
13
+ * Licensed under the Apache License, Version 2.0 (the "License2");
14
+ * you may not use this file except in compliance with the License.
15
+ * You may obtain a copy of the License at
16
+ *
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software
20
+ * distributed under the License is distributed on an "AS IS" BASIS,
21
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ * See the License for the specific language governing permissions and
23
+ * limitations under the License.
24
+ */
25
+ //#endregion
26
+ class WattPaginatorIntlService {
27
+ changes = new Subject();
28
+ description = 'Select page';
29
+ itemsPerPage = 'Results per page';
30
+ nextPage = 'Next page';
31
+ previousPage = 'Previous page';
32
+ firstPage = 'First page';
33
+ lastPage = 'Last page';
34
+ of = 'of';
35
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPaginatorIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
36
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPaginatorIntlService, providedIn: 'root' });
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPaginatorIntlService, 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
+ * Usage:
63
+ * `import { WattPaginatorComponent } from '@energinet-datahub/watt/paginator';`
64
+ */
65
+ class WattPaginatorComponent {
66
+ intl = inject(WattPaginatorIntlService);
67
+ matPaginatorIntl = inject(MatPaginatorIntl);
68
+ length = input(0);
69
+ pageSizeOptions = input([50, 100, 150, 200, 250]);
70
+ pageSize = input(50);
71
+ pageIndex = input(0);
72
+ for = input();
73
+ changed = output();
74
+ instance = viewChild.required(MatPaginator);
75
+ changes = toSignal(this.intl.changes.pipe(
76
+ // Signals use referential equality to determine if a value has changed.
77
+ // Therefore it is not possible to just map to the intl service directly
78
+ // as the intl service relies on mutation for updating values.
79
+ map(() => ({ ...this.intl })), startWith(this.intl)), { requireSync: true });
80
+ description = computed(() => this.changes().description);
81
+ updateDataSource = effect(() => {
82
+ const dataSource = this.for();
83
+ const instance = this.instance();
84
+ if (!dataSource)
85
+ return;
86
+ dataSource.paginator = instance;
87
+ });
88
+ updateLabels = effect(() => {
89
+ const changes = this.changes();
90
+ this.matPaginatorIntl.itemsPerPageLabel = changes.itemsPerPage;
91
+ this.matPaginatorIntl.nextPageLabel = changes.nextPage;
92
+ this.matPaginatorIntl.previousPageLabel = changes.previousPage;
93
+ this.matPaginatorIntl.firstPageLabel = changes.firstPage;
94
+ this.matPaginatorIntl.lastPageLabel = changes.lastPage;
95
+ this.matPaginatorIntl.changes.next();
96
+ });
97
+ ngOnInit() {
98
+ this.matPaginatorIntl.getRangeLabel = this.getRangeLabel;
99
+ }
100
+ getRangeLabel = (page, pageSize, length) => {
101
+ if (length == 0 || pageSize == 0) {
102
+ return `0 ${this.intl.of} ${length}`;
103
+ }
104
+ length = Math.max(length, 0);
105
+ const startIndex = page * pageSize;
106
+ // If the start index exceeds the list length, do not try and fix the end index to the end.
107
+ const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
108
+ return `${startIndex + 1} – ${endIndex} ${this.intl.of} ${length}`;
109
+ };
110
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.1", type: WattPaginatorComponent, isStandalone: true, selector: "watt-paginator", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "instance", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: `
112
+ <mat-paginator
113
+ class="watt-paginator"
114
+ (page)="changed.emit($event)"
115
+ [length]="length()"
116
+ [pageSize]="pageSize()"
117
+ [pageSizeOptions]="pageSizeOptions()"
118
+ [pageIndex]="pageIndex()"
119
+ [showFirstLastButtons]="true"
120
+ [attr.aria-label]="description()"
121
+ />
122
+ `, isInline: true, styles: [".cdk-overlay-pane div.mat-mdc-select-panel{--mat-select-panel-background-color: white;padding:0;font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}.mat-mdc-select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){--mat-option-selected-state-layer-color: var(--watt-color-neutral-grey-300);color:var(--watt-color-primary)}.mat-mdc-select-panel .mat-mdc-option.mdc-list-item:hover{--mat-option-hover-state-layer-color: var(--watt-color-neutral-grey-100)}watt-paginator{box-shadow:0 -1px 0 var(--watt-color-neutral-grey-300);z-index:100}watt-paginator .mat-mdc-paginator,watt-paginator .mat-mdc-paginator-page-size .mat-mdc-select-trigger{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-paginator .mat-mdc-paginator{--mat-option-hover-state-layer-color: var(--watt-color-neutral-grey-100)}watt-paginator .mat-mdc-paginator .mdc-notched-outline{--mdc-outlined-text-field-outline-width: 0;--mdc-outlined-text-field-focus-outline-width: 0}watt-paginator .mat-mdc-paginator .mat-mdc-paginator-page-size-select{width:80px}watt-paginator .mat-mdc-select-arrow-wrapper{color:var(--watt-color-primary)}watt-paginator .mat-mdc-select-arrow-wrapper .mat-mdc-select-arrow{width:18px}watt-paginator .mat-mdc-paginator-container{justify-content:center;padding:var(--watt-space-m) var(--watt-space-ml)}watt-paginator .mat-mdc-paginator-range-actions{display:contents}watt-paginator .mat-mdc-paginator-range-label{margin:0 auto;-webkit-user-select:none;user-select:none}watt-paginator .mdc-icon-button{color:var(--watt-color-primary);--mdc-icon-button-disabled-icon-color: var(--watt-color-neutral-grey-500);--mdc-icon-button-icon-size: 28px;--mdc-icon-button-state-layer-size: 28px;padding:0;margin-right:5px}watt-paginator .mat-mdc-select-value{padding-right:var(--watt-space-xs);text-align:right}watt-paginator .mat-mdc-select-arrow{color:var(--watt-color-primary)}watt-paginator .mat-mdc-form-field-flex{height:var(--watt-space-l);align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
123
+ }
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPaginatorComponent, decorators: [{
125
+ type: Component,
126
+ args: [{ imports: [MatPaginatorModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'watt-paginator', template: `
127
+ <mat-paginator
128
+ class="watt-paginator"
129
+ (page)="changed.emit($event)"
130
+ [length]="length()"
131
+ [pageSize]="pageSize()"
132
+ [pageSizeOptions]="pageSizeOptions()"
133
+ [pageIndex]="pageIndex()"
134
+ [showFirstLastButtons]="true"
135
+ [attr.aria-label]="description()"
136
+ />
137
+ `, styles: [".cdk-overlay-pane div.mat-mdc-select-panel{--mat-select-panel-background-color: white;padding:0;font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}.mat-mdc-select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){--mat-option-selected-state-layer-color: var(--watt-color-neutral-grey-300);color:var(--watt-color-primary)}.mat-mdc-select-panel .mat-mdc-option.mdc-list-item:hover{--mat-option-hover-state-layer-color: var(--watt-color-neutral-grey-100)}watt-paginator{box-shadow:0 -1px 0 var(--watt-color-neutral-grey-300);z-index:100}watt-paginator .mat-mdc-paginator,watt-paginator .mat-mdc-paginator-page-size .mat-mdc-select-trigger{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-paginator .mat-mdc-paginator{--mat-option-hover-state-layer-color: var(--watt-color-neutral-grey-100)}watt-paginator .mat-mdc-paginator .mdc-notched-outline{--mdc-outlined-text-field-outline-width: 0;--mdc-outlined-text-field-focus-outline-width: 0}watt-paginator .mat-mdc-paginator .mat-mdc-paginator-page-size-select{width:80px}watt-paginator .mat-mdc-select-arrow-wrapper{color:var(--watt-color-primary)}watt-paginator .mat-mdc-select-arrow-wrapper .mat-mdc-select-arrow{width:18px}watt-paginator .mat-mdc-paginator-container{justify-content:center;padding:var(--watt-space-m) var(--watt-space-ml)}watt-paginator .mat-mdc-paginator-range-actions{display:contents}watt-paginator .mat-mdc-paginator-range-label{margin:0 auto;-webkit-user-select:none;user-select:none}watt-paginator .mdc-icon-button{color:var(--watt-color-primary);--mdc-icon-button-disabled-icon-color: var(--watt-color-neutral-grey-500);--mdc-icon-button-icon-size: 28px;--mdc-icon-button-state-layer-size: 28px;padding:0;margin-right:5px}watt-paginator .mat-mdc-select-value{padding-right:var(--watt-space-xs);text-align:right}watt-paginator .mat-mdc-select-arrow{color:var(--watt-color-primary)}watt-paginator .mat-mdc-form-field-flex{height:var(--watt-space-l);align-items:center}\n"] }]
138
+ }] });
139
+
140
+ //#region License
141
+ /**
142
+ * @license
143
+ * Copyright 2020 Energinet DataHub A/S
144
+ *
145
+ * Licensed under the Apache License, Version 2.0 (the "License2");
146
+ * you may not use this file except in compliance with the License.
147
+ * You may obtain a copy of the License at
148
+ *
149
+ * http://www.apache.org/licenses/LICENSE-2.0
150
+ *
151
+ * Unless required by applicable law or agreed to in writing, software
152
+ * distributed under the License is distributed on an "AS IS" BASIS,
153
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
154
+ * See the License for the specific language governing permissions and
155
+ * limitations under the License.
156
+ */
157
+ //#endregion
158
+
159
+ /**
160
+ * Generated bundle index. Do not edit.
161
+ */
162
+
163
+ export { WattPaginatorComponent, WattPaginatorIntlService };
164
+ //# sourceMappingURL=energinet-watt-paginator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-paginator.mjs","sources":["../../../libs/watt/package/paginator/watt-paginator-intl.service.ts","../../../libs/watt/package/paginator/watt-paginator.component.ts","../../../libs/watt/package/paginator/index.ts","../../../libs/watt/package/paginator/energinet-watt-paginator.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';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattPaginatorIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n description = 'Select page';\n itemsPerPage = 'Results per page';\n nextPage = 'Next page';\n previousPage = 'Previous page';\n firstPage = 'First page';\n lastPage = 'Last page';\n of = 'of';\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 ChangeDetectionStrategy,\n Component,\n inject,\n OnInit,\n ViewEncapsulation,\n viewChild,\n input,\n effect,\n output,\n computed,\n} from '@angular/core';\nimport {\n MatPaginator,\n MatPaginatorIntl,\n MatPaginatorModule,\n PageEvent,\n} from '@angular/material/paginator';\n\nimport { IWattTableDataSource } from '@energinet/watt/table';\nimport { WattPaginatorIntlService } from './watt-paginator-intl.service';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { map, startWith } from 'rxjs';\n\n/**\n * Usage:\n * `import { WattPaginatorComponent } from '@energinet-datahub/watt/paginator';`\n */\n@Component({\n imports: [MatPaginatorModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-paginator',\n styleUrls: ['./watt-paginator.component.scss'],\n template: `\n <mat-paginator\n class=\"watt-paginator\"\n (page)=\"changed.emit($event)\"\n [length]=\"length()\"\n [pageSize]=\"pageSize()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [pageIndex]=\"pageIndex()\"\n [showFirstLastButtons]=\"true\"\n [attr.aria-label]=\"description()\"\n />\n `,\n})\nexport class WattPaginatorComponent<T> implements OnInit {\n private intl = inject(WattPaginatorIntlService);\n private matPaginatorIntl = inject(MatPaginatorIntl);\n\n length = input(0);\n pageSizeOptions = input([50, 100, 150, 200, 250]);\n pageSize = input(50);\n pageIndex = input(0);\n for = input<IWattTableDataSource<T>>();\n changed = output<PageEvent>();\n instance = viewChild.required(MatPaginator);\n\n changes = toSignal(\n this.intl.changes.pipe(\n // Signals use referential equality to determine if a value has changed.\n // Therefore it is not possible to just map to the intl service directly\n // as the intl service relies on mutation for updating values.\n map(() => ({ ...this.intl })),\n startWith(this.intl)\n ),\n { requireSync: true }\n );\n\n description = computed(() => this.changes().description);\n\n updateDataSource = effect(() => {\n const dataSource = this.for();\n const instance = this.instance();\n if (!dataSource) return;\n dataSource.paginator = instance;\n });\n\n updateLabels = effect(() => {\n const changes = this.changes();\n this.matPaginatorIntl.itemsPerPageLabel = changes.itemsPerPage;\n this.matPaginatorIntl.nextPageLabel = changes.nextPage;\n this.matPaginatorIntl.previousPageLabel = changes.previousPage;\n this.matPaginatorIntl.firstPageLabel = changes.firstPage;\n this.matPaginatorIntl.lastPageLabel = changes.lastPage;\n this.matPaginatorIntl.changes.next();\n });\n\n ngOnInit() {\n this.matPaginatorIntl.getRangeLabel = this.getRangeLabel;\n }\n\n private getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length == 0 || pageSize == 0) {\n return `0 ${this.intl.of} ${length}`;\n }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex =\n startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\n\n return `${startIndex + 1} – ${endIndex} ${this.intl.of} ${length}`;\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 { WattPaginatorComponent } from './watt-paginator.component';\nexport { WattPaginatorIntlService } from './watt-paginator-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,wBAAwB,CAAA;AAC1B,IAAA,OAAO,GAAkB,IAAI,OAAO,EAAQ;IACrD,WAAW,GAAG,aAAa;IAC3B,YAAY,GAAG,kBAAkB;IACjC,QAAQ,GAAG,WAAW;IACtB,YAAY,GAAG,eAAe;IAC9B,SAAS,GAAG,YAAY;IACxB,QAAQ,GAAG,WAAW;IACtB,EAAE,GAAG,IAAI;uGARE,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;;2FACnB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACrBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAyBA;;;AAGG;MAoBU,sBAAsB,CAAA;AACzB,IAAA,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACvC,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAEnD,IAAA,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;AACjB,IAAA,eAAe,GAAG,KAAK,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACjD,IAAA,QAAQ,GAAG,KAAK,CAAC,EA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