@energinet/watt 4.3.19 → 4.3.21

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 (171) hide show
  1. package/fesm2022/energinet-watt-badge.mjs +3 -3
  2. package/fesm2022/energinet-watt-badge.mjs.map +1 -1
  3. package/fesm2022/energinet-watt-breadcrumbs.mjs +8 -8
  4. package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -1
  5. package/fesm2022/energinet-watt-button.mjs +3 -3
  6. package/fesm2022/energinet-watt-button.mjs.map +1 -1
  7. package/fesm2022/energinet-watt-card.mjs +6 -6
  8. package/fesm2022/energinet-watt-card.mjs.map +1 -1
  9. package/fesm2022/energinet-watt-checkbox.mjs +3 -3
  10. package/fesm2022/energinet-watt-checkbox.mjs.map +1 -1
  11. package/fesm2022/energinet-watt-chip.mjs +91 -27
  12. package/fesm2022/energinet-watt-chip.mjs.map +1 -1
  13. package/fesm2022/energinet-watt-clipboard.mjs +7 -7
  14. package/fesm2022/energinet-watt-clipboard.mjs.map +1 -1
  15. package/fesm2022/energinet-watt-code.mjs +6 -6
  16. package/fesm2022/energinet-watt-code.mjs.map +1 -1
  17. package/fesm2022/energinet-watt-core-breakpoints.mjs +3 -3
  18. package/fesm2022/energinet-watt-core-breakpoints.mjs.map +1 -1
  19. package/fesm2022/energinet-watt-core-color.mjs +3 -3
  20. package/fesm2022/energinet-watt-core-color.mjs.map +1 -1
  21. package/fesm2022/energinet-watt-core-date.mjs +6 -6
  22. package/fesm2022/energinet-watt-core-date.mjs.map +1 -1
  23. package/fesm2022/energinet-watt-data.mjs +12 -12
  24. package/fesm2022/energinet-watt-data.mjs.map +1 -1
  25. package/fesm2022/energinet-watt-datetime-field.mjs +3 -3
  26. package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -1
  27. package/fesm2022/energinet-watt-description-list.mjs +6 -6
  28. package/fesm2022/energinet-watt-description-list.mjs.map +1 -1
  29. package/fesm2022/energinet-watt-drawer.mjs +19 -19
  30. package/fesm2022/energinet-watt-drawer.mjs.map +1 -1
  31. package/fesm2022/energinet-watt-dropdown.mjs +14 -4
  32. package/fesm2022/energinet-watt-dropdown.mjs.map +1 -1
  33. package/fesm2022/energinet-watt-dropzone.mjs +14 -14
  34. package/fesm2022/energinet-watt-dropzone.mjs.map +1 -1
  35. package/fesm2022/energinet-watt-empty-state.mjs +18 -18
  36. package/fesm2022/energinet-watt-empty-state.mjs.map +1 -1
  37. package/fesm2022/energinet-watt-expandable-card.mjs +9 -9
  38. package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -1
  39. package/fesm2022/energinet-watt-field.mjs +15 -15
  40. package/fesm2022/energinet-watt-field.mjs.map +1 -1
  41. package/fesm2022/energinet-watt-file-field.mjs +3 -3
  42. package/fesm2022/energinet-watt-file-field.mjs.map +1 -1
  43. package/fesm2022/energinet-watt-heading.mjs +3 -3
  44. package/fesm2022/energinet-watt-heading.mjs.map +1 -1
  45. package/fesm2022/energinet-watt-icon-flags.mjs +30 -30
  46. package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -1
  47. package/fesm2022/energinet-watt-icon.mjs +5 -3
  48. package/fesm2022/energinet-watt-icon.mjs.map +1 -1
  49. package/fesm2022/energinet-watt-json-viewer.mjs +12 -15
  50. package/fesm2022/energinet-watt-json-viewer.mjs.map +1 -1
  51. package/fesm2022/energinet-watt-menu.mjs +12 -12
  52. package/fesm2022/energinet-watt-menu.mjs.map +1 -1
  53. package/fesm2022/energinet-watt-modal.mjs +11 -11
  54. package/fesm2022/energinet-watt-modal.mjs.map +1 -1
  55. package/fesm2022/energinet-watt-paginator.mjs +6 -6
  56. package/fesm2022/energinet-watt-paginator.mjs.map +1 -1
  57. package/fesm2022/energinet-watt-phone-field.mjs +6 -6
  58. package/fesm2022/energinet-watt-phone-field.mjs.map +1 -1
  59. package/fesm2022/energinet-watt-picker-__shared.mjs +13 -17
  60. package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -1
  61. package/fesm2022/energinet-watt-picker-datepicker.mjs +7 -7
  62. package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -1
  63. package/fesm2022/energinet-watt-picker-timepicker.mjs +3 -3
  64. package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -1
  65. package/fesm2022/energinet-watt-progress-tracker.mjs +6 -6
  66. package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -1
  67. package/fesm2022/energinet-watt-query-params.mjs +3 -3
  68. package/fesm2022/energinet-watt-query-params.mjs.map +1 -1
  69. package/fesm2022/energinet-watt-radio.mjs +8 -8
  70. package/fesm2022/energinet-watt-radio.mjs.map +1 -1
  71. package/fesm2022/energinet-watt-search.mjs +6 -6
  72. package/fesm2022/energinet-watt-search.mjs.map +1 -1
  73. package/fesm2022/energinet-watt-segmented-buttons.mjs +6 -6
  74. package/fesm2022/energinet-watt-segmented-buttons.mjs.map +1 -1
  75. package/fesm2022/energinet-watt-separator.mjs +3 -3
  76. package/fesm2022/energinet-watt-separator.mjs.map +1 -1
  77. package/fesm2022/energinet-watt-shell.mjs +13 -13
  78. package/fesm2022/energinet-watt-shell.mjs.map +1 -1
  79. package/fesm2022/energinet-watt-slide-toggle.mjs +3 -3
  80. package/fesm2022/energinet-watt-slide-toggle.mjs.map +1 -1
  81. package/fesm2022/energinet-watt-slider.mjs +3 -3
  82. package/fesm2022/energinet-watt-slider.mjs.map +1 -1
  83. package/fesm2022/energinet-watt-spinner.mjs +3 -3
  84. package/fesm2022/energinet-watt-spinner.mjs.map +1 -1
  85. package/fesm2022/energinet-watt-stepper.mjs +9 -9
  86. package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
  87. package/fesm2022/energinet-watt-table.mjs +18 -27
  88. package/fesm2022/energinet-watt-table.mjs.map +1 -1
  89. package/fesm2022/energinet-watt-tabs.mjs +15 -15
  90. package/fesm2022/energinet-watt-tabs.mjs.map +1 -1
  91. package/fesm2022/energinet-watt-text-field.mjs +3 -3
  92. package/fesm2022/energinet-watt-text-field.mjs.map +1 -1
  93. package/fesm2022/energinet-watt-textarea-field.mjs +38 -23
  94. package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -1
  95. package/fesm2022/energinet-watt-toast.mjs +6 -6
  96. package/fesm2022/energinet-watt-toast.mjs.map +1 -1
  97. package/fesm2022/energinet-watt-tooltip.mjs +9 -9
  98. package/fesm2022/energinet-watt-tooltip.mjs.map +1 -1
  99. package/fesm2022/energinet-watt-utils-css.mjs +3 -3
  100. package/fesm2022/energinet-watt-utils-css.mjs.map +1 -1
  101. package/fesm2022/energinet-watt-utils-intersection-observer.mjs +3 -3
  102. package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +1 -1
  103. package/fesm2022/energinet-watt-utils-resize-observer.mjs +6 -6
  104. package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -1
  105. package/fesm2022/energinet-watt-validation-message.mjs +3 -3
  106. package/fesm2022/energinet-watt-validation-message.mjs.map +1 -1
  107. package/fesm2022/energinet-watt-vater.mjs +30 -30
  108. package/fesm2022/energinet-watt-vater.mjs.map +1 -1
  109. package/fesm2022/energinet-watt-year-field.mjs +4 -4
  110. package/fesm2022/energinet-watt-year-field.mjs.map +1 -1
  111. package/fesm2022/energinet-watt-yearmonth-field.mjs +4 -4
  112. package/fesm2022/energinet-watt-yearmonth-field.mjs.map +1 -1
  113. package/package.json +100 -99
  114. package/{button/index.d.ts → types/energinet-watt-button.d.ts} +1 -1
  115. package/{chip/index.d.ts → types/energinet-watt-chip.d.ts} +10 -2
  116. package/{data/index.d.ts → types/energinet-watt-data.d.ts} +1 -1
  117. package/{dropdown/index.d.ts → types/energinet-watt-dropdown.d.ts} +1 -0
  118. package/{empty-state/index.d.ts → types/energinet-watt-empty-state.d.ts} +1 -1
  119. package/{icon/index.d.ts → types/energinet-watt-icon.d.ts} +3 -1
  120. package/{modal/index.d.ts → types/energinet-watt-modal.d.ts} +1 -1
  121. package/{text-field/index.d.ts → types/energinet-watt-text-field.d.ts} +1 -1
  122. package/{textarea-field/index.d.ts → types/energinet-watt-textarea-field.d.ts} +1 -1
  123. package/{validation-message/index.d.ts → types/energinet-watt-validation-message.d.ts} +1 -1
  124. /package/{badge/index.d.ts → types/energinet-watt-badge.d.ts} +0 -0
  125. /package/{breadcrumbs/index.d.ts → types/energinet-watt-breadcrumbs.d.ts} +0 -0
  126. /package/{card/index.d.ts → types/energinet-watt-card.d.ts} +0 -0
  127. /package/{checkbox/index.d.ts → types/energinet-watt-checkbox.d.ts} +0 -0
  128. /package/{clipboard/index.d.ts → types/energinet-watt-clipboard.d.ts} +0 -0
  129. /package/{code/index.d.ts → types/energinet-watt-code.d.ts} +0 -0
  130. /package/{core/breakpoints/index.d.ts → types/energinet-watt-core-breakpoints.d.ts} +0 -0
  131. /package/{core/color/index.d.ts → types/energinet-watt-core-color.d.ts} +0 -0
  132. /package/{core/date/index.d.ts → types/energinet-watt-core-date.d.ts} +0 -0
  133. /package/{datetime-field/index.d.ts → types/energinet-watt-datetime-field.d.ts} +0 -0
  134. /package/{description-list/index.d.ts → types/energinet-watt-description-list.d.ts} +0 -0
  135. /package/{drawer/index.d.ts → types/energinet-watt-drawer.d.ts} +0 -0
  136. /package/{dropzone/index.d.ts → types/energinet-watt-dropzone.d.ts} +0 -0
  137. /package/{expandable-card/index.d.ts → types/energinet-watt-expandable-card.d.ts} +0 -0
  138. /package/{field/index.d.ts → types/energinet-watt-field.d.ts} +0 -0
  139. /package/{file-field/index.d.ts → types/energinet-watt-file-field.d.ts} +0 -0
  140. /package/{heading/index.d.ts → types/energinet-watt-heading.d.ts} +0 -0
  141. /package/{icon/flags/index.d.ts → types/energinet-watt-icon-flags.d.ts} +0 -0
  142. /package/{json-viewer/index.d.ts → types/energinet-watt-json-viewer.d.ts} +0 -0
  143. /package/{menu/index.d.ts → types/energinet-watt-menu.d.ts} +0 -0
  144. /package/{paginator/index.d.ts → types/energinet-watt-paginator.d.ts} +0 -0
  145. /package/{phone-field/index.d.ts → types/energinet-watt-phone-field.d.ts} +0 -0
  146. /package/{picker/__shared/index.d.ts → types/energinet-watt-picker-__shared.d.ts} +0 -0
  147. /package/{picker/datepicker/index.d.ts → types/energinet-watt-picker-datepicker.d.ts} +0 -0
  148. /package/{picker/timepicker/index.d.ts → types/energinet-watt-picker-timepicker.d.ts} +0 -0
  149. /package/{progress-tracker/index.d.ts → types/energinet-watt-progress-tracker.d.ts} +0 -0
  150. /package/{query-params/index.d.ts → types/energinet-watt-query-params.d.ts} +0 -0
  151. /package/{radio/index.d.ts → types/energinet-watt-radio.d.ts} +0 -0
  152. /package/{search/index.d.ts → types/energinet-watt-search.d.ts} +0 -0
  153. /package/{segmented-buttons/index.d.ts → types/energinet-watt-segmented-buttons.d.ts} +0 -0
  154. /package/{separator/index.d.ts → types/energinet-watt-separator.d.ts} +0 -0
  155. /package/{shell/index.d.ts → types/energinet-watt-shell.d.ts} +0 -0
  156. /package/{slide-toggle/index.d.ts → types/energinet-watt-slide-toggle.d.ts} +0 -0
  157. /package/{slider/index.d.ts → types/energinet-watt-slider.d.ts} +0 -0
  158. /package/{spinner/index.d.ts → types/energinet-watt-spinner.d.ts} +0 -0
  159. /package/{stepper/index.d.ts → types/energinet-watt-stepper.d.ts} +0 -0
  160. /package/{table/index.d.ts → types/energinet-watt-table.d.ts} +0 -0
  161. /package/{tabs/index.d.ts → types/energinet-watt-tabs.d.ts} +0 -0
  162. /package/{toast/index.d.ts → types/energinet-watt-toast.d.ts} +0 -0
  163. /package/{tooltip/index.d.ts → types/energinet-watt-tooltip.d.ts} +0 -0
  164. /package/{utils/css/index.d.ts → types/energinet-watt-utils-css.d.ts} +0 -0
  165. /package/{utils/intersection-observer/index.d.ts → types/energinet-watt-utils-intersection-observer.d.ts} +0 -0
  166. /package/{utils/resize-observer/index.d.ts → types/energinet-watt-utils-resize-observer.d.ts} +0 -0
  167. /package/{validators/index.d.ts → types/energinet-watt-validators.d.ts} +0 -0
  168. /package/{vater/index.d.ts → types/energinet-watt-vater.d.ts} +0 -0
  169. /package/{year-field/index.d.ts → types/energinet-watt-year-field.d.ts} +0 -0
  170. /package/{yearmonth-field/index.d.ts → types/energinet-watt-yearmonth-field.d.ts} +0 -0
  171. /package/{index.d.ts → types/energinet-watt.d.ts} +0 -0
@@ -26,10 +26,10 @@ import { WattSpinnerComponent } from '@energinet/watt/spinner';
26
26
  //#endregion
27
27
  class WattCodeIntlService {
28
28
  searchPlaceholder = 'Search in code';
29
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCodeIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
30
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCodeIntlService, providedIn: 'root' });
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCodeIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
30
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCodeIntlService, providedIn: 'root' });
31
31
  }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCodeIntlService, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCodeIntlService, decorators: [{
33
33
  type: Injectable,
34
34
  args: [{ providedIn: 'root' }]
35
35
  }] });
@@ -156,8 +156,8 @@ class WattCodeComponent {
156
156
  ngOnDestroy() {
157
157
  this.worker?.terminate();
158
158
  }
159
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
160
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattCodeComponent, isStandalone: true, selector: "watt-code", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { discoveredLanguage: "discoveredLanguage" }, viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: `
159
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
160
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: WattCodeComponent, isStandalone: true, selector: "watt-code", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { discoveredLanguage: "discoveredLanguage" }, viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: `
161
161
  @if (loading()) {
162
162
  <vater-stack fill="horizontal" align="center">
163
163
  <watt-spinner />
@@ -185,7 +185,7 @@ class WattCodeComponent {
185
185
  }
186
186
  `, isInline: true, styles: ["watt-tabs watt-code pre code.watt-code-content{padding:0}watt-code{display:block;height:100%;width:100%}watt-code pre{display:flex;margin:0;padding:0;height:calc(100% - 60px);width:100%;word-wrap:break-word}watt-code pre .cdk-virtual-scroll-content-wrapper{width:100%}watt-code pre .cdk-virtual-scroll-content-wrapper code{padding:2px 8px;line-height:20px;font-family:monospace;white-space:pre;width:100%;display:block;font-size:14px}watt-code pre .cdk-virtual-scroll-content-wrapper code.highlight{background-color:#ffeb3b4d;font-weight:700}\n"], dependencies: [{ kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]" }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: WattSearchComponent, selector: "watt-search", inputs: ["label", "debounceTime", "trim", "size"], outputs: ["search"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
187
187
  }
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCodeComponent, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCodeComponent, decorators: [{
189
189
  type: Component,
190
190
  args: [{ selector: 'watt-code', template: `
191
191
  @if (loading()) {
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-code.mjs","sources":["../../../libs/watt/package/code/watt-code-intl.service.ts","../../../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 { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattCodeIntlService {\n searchPlaceholder = 'Search in code';\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 { 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 input,\n output,\n signal,\n inject,\n effect,\n computed,\n viewChild,\n Component,\n OnDestroy,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\n\nimport { VaterStackComponent } from '@energinet/watt/vater';\nimport { WattSearchComponent } from '@energinet/watt/search';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nimport { WattCodeIntlService } from './watt-code-intl.service';\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\">\n <watt-spinner />\n </vater-stack>\n } @else {\n <watt-search\n size=\"m\"\n [label]=\"intl.searchPlaceholder\"\n (search)=\"searchTerm.set($event)\"\n (keyup.enter)=\"searchNext()\"\n />\n <pre>\n <cdk-virtual-scroll-viewport \n [itemSize]=\"20\" \n minBufferPx=\"500\"\n maxBufferPx=\"1000\"\n class=\"viewport\" \n style=\"height: 100%; width: 100%;\">\n <code *cdkVirtualFor=\"let item of chunks(); let i = index; trackBy: trackByFn\" \n [attr.data-index]=\"i\"\n [innerHTML]=\"item\" \n [class.highlight]=\"isLineHighlighted(i)\"></code>\n </cdk-virtual-scroll-viewport>\n </pre>\n }\n `,\n styleUrls: ['./watt-code.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WattSpinnerComponent, VaterStackComponent, ScrollingModule, WattSearchComponent],\n})\nexport class WattCodeComponent implements OnDestroy {\n private highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);\n private worker = this.highlightWorkerFactory?.();\n intl = inject(WattCodeIntlService);\n\n viewport = viewChild.required(CdkVirtualScrollViewport);\n\n code = input.required<string | null | undefined>();\n language = input<'xml' | 'json' | 'auto'>('auto');\n\n /** @ignore */\n formattedCode = signal<string>('');\n /** @ignore */\n loading = signal(false);\n\n discoveredLanguage = output<'json' | 'xml'>();\n\n // Search functionality\n searchTerm = signal('');\n matchIndices = signal<number[]>([]);\n currentMatchIndex = signal<number>(-1);\n\n chunks = computed(() => {\n const code = this.formattedCode();\n if (!code) return [''];\n const lines = code.split('\\n');\n return lines.length === 0 ? [''] : lines;\n });\n\n constructor() {\n effect(() => {\n const code = this.code();\n this.formattedCode.set('');\n\n if (!code) return;\n if (!this.worker) return;\n this.loading.set(true);\n this.worker.onmessage = (event) => {\n const { formattedData, discoveredLanguage } = event.data;\n this.formattedCode.set(formattedData);\n this.discoveredLanguage.emit(discoveredLanguage);\n this.loading.set(false);\n };\n this.worker.postMessage({ data: code, language: this.language() } as const);\n });\n\n effect(() => {\n const term = this.searchTerm();\n\n if (!term) return;\n\n const newMatchIndices = this.chunks()\n .map((chunk, index) => (chunk.toLowerCase().includes(term.toLowerCase()) ? index : -1))\n .filter((index) => index !== -1);\n\n this.matchIndices.set(newMatchIndices);\n if (newMatchIndices.length > 0 && this.currentMatchIndex() === -1) {\n this.currentMatchIndex.set(0);\n } else if (newMatchIndices.length === 0) {\n this.currentMatchIndex.set(-1);\n }\n });\n }\n\n isLineHighlighted(index: number): boolean {\n const matchIndex = this.currentMatchIndex();\n if (matchIndex === -1) return false;\n return this.matchIndices()[matchIndex] === index;\n }\n\n searchNext(): void {\n const viewport = this.viewport();\n const matches = this.matchIndices();\n if (matches.length === 0) return;\n\n let nextIndex = this.currentMatchIndex() + 1;\n if (nextIndex >= matches.length) {\n nextIndex = 0;\n }\n\n this.currentMatchIndex.set(nextIndex);\n\n const lineIndex = matches[nextIndex];\n if (lineIndex !== undefined) {\n viewport.scrollToIndex(lineIndex);\n }\n }\n\n trackByFn(index: number): number {\n return index;\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n this.worker?.terminate();\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';\nexport { WattCodeIntlService } from './watt-code-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;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AAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AChFxD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-code.mjs","sources":["../../../libs/watt/package/code/watt-code-intl.service.ts","../../../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 { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattCodeIntlService {\n searchPlaceholder = 'Search in code';\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 { 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 input,\n output,\n signal,\n inject,\n effect,\n computed,\n viewChild,\n Component,\n OnDestroy,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\n\nimport { VaterStackComponent } from '@energinet/watt/vater';\nimport { WattSearchComponent } from '@energinet/watt/search';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nimport { WattCodeIntlService } from './watt-code-intl.service';\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\">\n <watt-spinner />\n </vater-stack>\n } @else {\n <watt-search\n size=\"m\"\n [label]=\"intl.searchPlaceholder\"\n (search)=\"searchTerm.set($event)\"\n (keyup.enter)=\"searchNext()\"\n />\n <pre>\n <cdk-virtual-scroll-viewport \n [itemSize]=\"20\" \n minBufferPx=\"500\"\n maxBufferPx=\"1000\"\n class=\"viewport\" \n style=\"height: 100%; width: 100%;\">\n <code *cdkVirtualFor=\"let item of chunks(); let i = index; trackBy: trackByFn\" \n [attr.data-index]=\"i\"\n [innerHTML]=\"item\" \n [class.highlight]=\"isLineHighlighted(i)\"></code>\n </cdk-virtual-scroll-viewport>\n </pre>\n }\n `,\n styleUrls: ['./watt-code.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WattSpinnerComponent, VaterStackComponent, ScrollingModule, WattSearchComponent],\n})\nexport class WattCodeComponent implements OnDestroy {\n private highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);\n private worker = this.highlightWorkerFactory?.();\n intl = inject(WattCodeIntlService);\n\n viewport = viewChild.required(CdkVirtualScrollViewport);\n\n code = input.required<string | null | undefined>();\n language = input<'xml' | 'json' | 'auto'>('auto');\n\n /** @ignore */\n formattedCode = signal<string>('');\n /** @ignore */\n loading = signal(false);\n\n discoveredLanguage = output<'json' | 'xml'>();\n\n // Search functionality\n searchTerm = signal('');\n matchIndices = signal<number[]>([]);\n currentMatchIndex = signal<number>(-1);\n\n chunks = computed(() => {\n const code = this.formattedCode();\n if (!code) return [''];\n const lines = code.split('\\n');\n return lines.length === 0 ? [''] : lines;\n });\n\n constructor() {\n effect(() => {\n const code = this.code();\n this.formattedCode.set('');\n\n if (!code) return;\n if (!this.worker) return;\n this.loading.set(true);\n this.worker.onmessage = (event) => {\n const { formattedData, discoveredLanguage } = event.data;\n this.formattedCode.set(formattedData);\n this.discoveredLanguage.emit(discoveredLanguage);\n this.loading.set(false);\n };\n this.worker.postMessage({ data: code, language: this.language() } as const);\n });\n\n effect(() => {\n const term = this.searchTerm();\n\n if (!term) return;\n\n const newMatchIndices = this.chunks()\n .map((chunk, index) => (chunk.toLowerCase().includes(term.toLowerCase()) ? index : -1))\n .filter((index) => index !== -1);\n\n this.matchIndices.set(newMatchIndices);\n if (newMatchIndices.length > 0 && this.currentMatchIndex() === -1) {\n this.currentMatchIndex.set(0);\n } else if (newMatchIndices.length === 0) {\n this.currentMatchIndex.set(-1);\n }\n });\n }\n\n isLineHighlighted(index: number): boolean {\n const matchIndex = this.currentMatchIndex();\n if (matchIndex === -1) return false;\n return this.matchIndices()[matchIndex] === index;\n }\n\n searchNext(): void {\n const viewport = this.viewport();\n const matches = this.matchIndices();\n if (matches.length === 0) return;\n\n let nextIndex = this.currentMatchIndex() + 1;\n if (nextIndex >= matches.length) {\n nextIndex = 0;\n }\n\n this.currentMatchIndex.set(nextIndex);\n\n const lineIndex = matches[nextIndex];\n if (lineIndex !== undefined) {\n viewport.scrollToIndex(lineIndex);\n }\n }\n\n trackByFn(index: number): number {\n return index;\n }\n\n /** @ignore */\n ngOnDestroy(): void {\n this.worker?.terminate();\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';\nexport { WattCodeIntlService } from './watt-code-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAIa,mBAAmB,CAAA;IAC9B,iBAAiB,GAAG,gBAAgB;uGADzB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,E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;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -62,10 +62,10 @@ class WattBreakpointsObserver {
62
62
  isMatched(breakpoint) {
63
63
  return this.breakpointObserver.isMatched(WattBreakpoint[breakpoint]);
64
64
  }
65
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattBreakpointsObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
66
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattBreakpointsObserver, providedIn: 'root' });
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattBreakpointsObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
66
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattBreakpointsObserver, providedIn: 'root' });
67
67
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattBreakpointsObserver, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattBreakpointsObserver, decorators: [{
69
69
  type: Injectable,
70
70
  args: [{ providedIn: 'root' }]
71
71
  }] });
@@ -1 +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, inject } 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 private readonly breakpointObserver = inject(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;AACA;;;;AAIG;AACI,MAAM,cAAc,GAAG;AAC5B,IAAA,MAAM,EAAE,uBAAgC;AACxC,IAAA,KAAK,EAAE,8CAAuD;AAC9D,IAAA,MAAM,EAAE,+CAAwD;AAChE,IAAA,KAAK,EAAE,gDAAyD;AAChE,IAAA,MAAM,EAAE,qBAA8B;;;AC5BxC;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAoBa,uBAAuB,CAAA;AACjB,IAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAEhE,IAAA,OAAO,CAAC,WAAsD,EAAA;AAC5D,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;QACrF;QACA,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACrE;AAEA,IAAA,SAAS,CAAC,UAA8B,EAAA;QACtC,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACtE;wGAZW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA;;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpClC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
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, inject } 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 private readonly breakpointObserver = inject(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;AACA;;;;AAIG;AACI,MAAM,cAAc,GAAG;AAC5B,IAAA,MAAM,EAAE,uBAAgC;AACxC,IAAA,KAAK,EAAE,8CAAuD;AAC9D,IAAA,MAAM,EAAE,+CAAwD;AAChE,IAAA,KAAK,EAAE,gDAAyD;AAChE,IAAA,MAAM,EAAE,qBAA8B;;;AC5BxC;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAoBa,uBAAuB,CAAA;AACjB,IAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAEhE,IAAA,OAAO,CAAC,WAAsD,EAAA;AAC5D,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;QACrF;QACA,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACrE;AAEA,IAAA,SAAS,CAAC,UAA8B,EAAA;QACtC,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACtE;uGAZW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpClC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -87,10 +87,10 @@ class WattColorHelperService {
87
87
  getColorContrast(color) {
88
88
  return this.cssCustomPropertiesService.getPropertyValue(`${WattColor[color]}-${this.colorContrastSuffix}`);
89
89
  }
90
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattColorHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattColorHelperService, providedIn: 'root' });
90
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattColorHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattColorHelperService, providedIn: 'root' });
92
92
  }
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattColorHelperService, decorators: [{
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattColorHelperService, decorators: [{
94
94
  type: Injectable,
95
95
  args: [{
96
96
  providedIn: 'root',
@@ -1 +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, inject } 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 readonly cssCustomPropertiesService = inject(WattCssCustomPropertiesService);\n private readonly colorContrastSuffix = 'contrast';\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;;;;;;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AAmB,GAAG,UAAU;AAE1C,IAAA,QAAQ,CAAC,KAAoB,EAAA;QAClC,OAAO,IAAI,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3E;AAEO,IAAA,gBAAgB,CAAC,KAAoB,EAAA;AAC1C,QAAA,OAAO,IAAI,CAAC,0BAA0B,CAAC,gBAAgB,CACrD,CAAA,EAAG,SAAS,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,mBAAmB,CAAA,CAAE,CAClD;IACH;wGAZW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA;;4FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
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, inject } 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 readonly cssCustomPropertiesService = inject(WattCssCustomPropertiesService);\n private readonly colorContrastSuffix = 'contrast';\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;AACO,MAAM,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,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AI,IAAI,CAAC,mBAAmB,CAAA,CAAE,CAClD;IACH;uGAZW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA;;2FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -175,10 +175,10 @@ class WattDatePipe {
175
175
  transform(input, format = 'short', timeZone = 'Europe/Copenhagen') {
176
176
  return wattFormatDate(input, format, timeZone);
177
177
  }
178
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
179
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: WattDatePipe, isStandalone: true, name: "wattDate" });
178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
179
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.5", ngImport: i0, type: WattDatePipe, isStandalone: true, name: "wattDate" });
180
180
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatePipe, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDatePipe, decorators: [{
182
182
  type: Pipe,
183
183
  args: [{
184
184
  name: 'wattDate',
@@ -219,10 +219,10 @@ class WattLocaleService {
219
219
  this.dateAdapter.setActiveLocale(locale);
220
220
  this.locale.set(locale);
221
221
  }
222
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
223
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattLocaleService, providedIn: 'root' });
222
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
223
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattLocaleService, providedIn: 'root' });
224
224
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattLocaleService, decorators: [{
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattLocaleService, decorators: [{
226
226
  type: Injectable,
227
227
  args: [{
228
228
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-core-date.mjs","sources":["../../../libs/watt/package/core/date/dayjs.ts","../../../libs/watt/package/core/date/watt-date-adapter.ts","../../../libs/watt/package/core/date/watt-danish-datetime.providers.ts","../../../libs/watt/package/core/date/watt-format-date.ts","../../../libs/watt/package/core/date/watt-date.pipe.ts","../../../libs/watt/package/core/date/watt-locale.service.ts","../../../libs/watt/package/core/date/index.ts","../../../libs/watt/package/core/date/energinet-watt-core-date.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 dayjs from 'dayjs'; // eslint-disable-line no-restricted-imports\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\nimport duration from 'dayjs/plugin/duration';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\n\n// Force import of plugins in generated .d.ts file by exporting their types\ntype __ngPackagrDayjsTypeScriptWorkaround =\n | typeof utc\n | typeof timezone\n | typeof duration\n | typeof customParseFormat;\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(duration);\ndayjs.extend(customParseFormat);\n\nexport { dayjs, __ngPackagrDayjsTypeScriptWorkaround };\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 { NativeDateAdapter } from '@angular/material/core';\n\nexport type WattSupportedLocales = 'da' | 'en';\nconst danishLocale = 'da';\n\nexport class WattDateAdapter extends NativeDateAdapter {\n setActiveLocale(language: WattSupportedLocales): void {\n this.setLocale(language === danishLocale ? danishLocale : 'en-GB');\n }\n\n /**\n * This is necessary to remove the dots from the date (ordinals) for danish locale in the calendar view.\n * due to `Intl.DateTimeFormat`\n */\n override getDateNames(): string[] {\n const dateNames = super.getDateNames();\n\n return this.locale === danishLocale\n ? dateNames.map((dateName) => dateName.replace(/\\./g, ''))\n : dateNames;\n }\n\n /**\n * Our week starts on Monday\n * @returns 0 for Sunday, 1 for Monday, etc.\n */\n override getFirstDayOfWeek(): number {\n return 1;\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 {\n DateAdapter,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MAT_NATIVE_DATE_FORMATS,\n} from '@angular/material/core';\nimport { makeEnvironmentProviders } from '@angular/core';\n\nimport { WattDateAdapter } from './watt-date-adapter';\n\nexport const danishDatetimeProviders = makeEnvironmentProviders([\n { provide: MAT_DATE_LOCALE, useValue: 'da' },\n {\n provide: DateAdapter,\n useClass: WattDateAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n { provide: MAT_DATE_FORMATS, useValue: MAT_NATIVE_DATE_FORMATS },\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 { dayjs } from './dayjs';\nimport { WattRange } from './watt-date-range';\n\nexport const formatStrings = {\n monthYear: 'MMMM YYYY',\n short: 'DD-MM-YYYY',\n shortAbbr: 'DD. MMM YYYY',\n long: 'DD-MM-YYYY HH:mm',\n longAbbr: 'DD. MMM YYYY HH:mm',\n time: 'HH:mm',\n longAbbrWithSeconds: 'DD-MMM YYYY HH:mm:ss',\n};\n\nexport function wattFormatDate(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n): string | null {\n if (!input) return null;\n\n if (input instanceof Date || typeof input === 'string') {\n return dayjs(input).tz(timeZone).format(formatStrings[format]);\n } else if (typeof input === 'number') {\n return dayjs(new Date(input)).tz(timeZone).format(formatStrings[format]);\n } else {\n return transformRange(input, format);\n }\n}\n\nfunction transformRange(\n input: WattRange<Date | string>,\n format: keyof typeof formatStrings\n): string | null {\n if (dayjs(input.start).isSame(dayjs(input.end), 'day') || input.end === null) {\n return wattFormatDate(input.start, format);\n } else {\n return `${wattFormatDate(input.start, format)} ― ${wattFormatDate(input.end, format)}`;\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 { Pipe, PipeTransform } from '@angular/core';\n\nimport { WattRange } from './watt-date-range';\nimport { formatStrings, wattFormatDate } from './watt-format-date';\n\n@Pipe({\n name: 'wattDate',\n})\nexport class WattDatePipe implements PipeTransform {\n /**\n * @param input WattDateRange or string in ISO 8601 format or unix timestamp number\n */\n transform(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n ): string | null {\n return wattFormatDate(input, format, timeZone);\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 { computed, inject, Injectable, LOCALE_ID, signal } from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nimport { dayjs } from './dayjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattLocaleService {\n private readonly dateAdapter = inject<DateAdapter<unknown>>(DateAdapter);\n\n locale = signal(inject<WattSupportedLocales>(LOCALE_ID));\n isDanish = computed(() => this.locale() == 'da');\n isEnglish = computed(() => this.locale() == 'en');\n\n async setActiveLocale(locale: WattSupportedLocales): Promise<void> {\n if (locale === 'da') {\n await import('dayjs/locale/da');\n }\n\n if (locale === 'en') {\n await import('dayjs/locale/en');\n }\n\n dayjs.locale(locale);\n (this.dateAdapter as WattDateAdapter).setActiveLocale(locale);\n this.locale.set(locale);\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 { dayjs, __ngPackagrDayjsTypeScriptWorkaround } from './dayjs';\nexport { danishDatetimeProviders } from './watt-danish-datetime.providers';\nexport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nexport { type WattRange, type WattDateRange } from './watt-date-range';\nexport { WattDatePipe } from './watt-date.pipe';\nexport { wattFormatDate } from './watt-format-date';\nexport { WattLocaleService } from './watt-locale.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAcA,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;AACjB,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;AACtB,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;AACtB,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC;;AClC/B;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA,MAAM,YAAY,GAAG,IAAI;AAEnB,MAAO,eAAgB,SAAQ,iBAAiB,CAAA;AACpD,IAAA,eAAe,CAAC,QAA8B,EAAA;AAC5C,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,KAAK,YAAY,GAAG,YAAY,GAAG,OAAO,CAAC;IACpE;AAEA;;;AAGG;IACM,YAAY,GAAA;AACnB,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,EAAE;AAEtC,QAAA,OAAO,IAAI,CAAC,MAAM,KAAK;AACrB,cAAE,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;cACvD,SAAS;IACf;AAEA;;;AAGG;IACM,iBAAiB,GAAA;AACxB,QAAA,OAAO,CAAC;IACV;AACD;;AC/CD;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAWO,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAC9D,IAAA,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE;AAC5C,IAAA;AACE,QAAA,OAAO,EAAE,WAAW;AACpB,QAAA,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,CAAC,eAAe,CAAC;AACxB,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,YAAA,MAAM,OAAO,iBAAiB,CAAC;QACjC;AAEA,QAAA,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;AACnB,QAAA,IAAI,CAAC,WAA+B,CAAC,eAAe,CAAC,MAAM,CAAC;AAC7D,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;IACzB;wGAnBW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA;;4FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC1BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-core-date.mjs","sources":["../../../libs/watt/package/core/date/dayjs.ts","../../../libs/watt/package/core/date/watt-date-adapter.ts","../../../libs/watt/package/core/date/watt-danish-datetime.providers.ts","../../../libs/watt/package/core/date/watt-format-date.ts","../../../libs/watt/package/core/date/watt-date.pipe.ts","../../../libs/watt/package/core/date/watt-locale.service.ts","../../../libs/watt/package/core/date/index.ts","../../../libs/watt/package/core/date/energinet-watt-core-date.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 dayjs from 'dayjs'; // eslint-disable-line no-restricted-imports\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\nimport duration from 'dayjs/plugin/duration';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\n\n// Force import of plugins in generated .d.ts file by exporting their types\ntype __ngPackagrDayjsTypeScriptWorkaround =\n | typeof utc\n | typeof timezone\n | typeof duration\n | typeof customParseFormat;\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(duration);\ndayjs.extend(customParseFormat);\n\nexport { dayjs, __ngPackagrDayjsTypeScriptWorkaround };\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 { NativeDateAdapter } from '@angular/material/core';\n\nexport type WattSupportedLocales = 'da' | 'en';\nconst danishLocale = 'da';\n\nexport class WattDateAdapter extends NativeDateAdapter {\n setActiveLocale(language: WattSupportedLocales): void {\n this.setLocale(language === danishLocale ? danishLocale : 'en-GB');\n }\n\n /**\n * This is necessary to remove the dots from the date (ordinals) for danish locale in the calendar view.\n * due to `Intl.DateTimeFormat`\n */\n override getDateNames(): string[] {\n const dateNames = super.getDateNames();\n\n return this.locale === danishLocale\n ? dateNames.map((dateName) => dateName.replace(/\\./g, ''))\n : dateNames;\n }\n\n /**\n * Our week starts on Monday\n * @returns 0 for Sunday, 1 for Monday, etc.\n */\n override getFirstDayOfWeek(): number {\n return 1;\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 {\n DateAdapter,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MAT_NATIVE_DATE_FORMATS,\n} from '@angular/material/core';\nimport { makeEnvironmentProviders } from '@angular/core';\n\nimport { WattDateAdapter } from './watt-date-adapter';\n\nexport const danishDatetimeProviders = makeEnvironmentProviders([\n { provide: MAT_DATE_LOCALE, useValue: 'da' },\n {\n provide: DateAdapter,\n useClass: WattDateAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n { provide: MAT_DATE_FORMATS, useValue: MAT_NATIVE_DATE_FORMATS },\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 { dayjs } from './dayjs';\nimport { WattRange } from './watt-date-range';\n\nexport const formatStrings = {\n monthYear: 'MMMM YYYY',\n short: 'DD-MM-YYYY',\n shortAbbr: 'DD. MMM YYYY',\n long: 'DD-MM-YYYY HH:mm',\n longAbbr: 'DD. MMM YYYY HH:mm',\n time: 'HH:mm',\n longAbbrWithSeconds: 'DD-MMM YYYY HH:mm:ss',\n};\n\nexport function wattFormatDate(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n): string | null {\n if (!input) return null;\n\n if (input instanceof Date || typeof input === 'string') {\n return dayjs(input).tz(timeZone).format(formatStrings[format]);\n } else if (typeof input === 'number') {\n return dayjs(new Date(input)).tz(timeZone).format(formatStrings[format]);\n } else {\n return transformRange(input, format);\n }\n}\n\nfunction transformRange(\n input: WattRange<Date | string>,\n format: keyof typeof formatStrings\n): string | null {\n if (dayjs(input.start).isSame(dayjs(input.end), 'day') || input.end === null) {\n return wattFormatDate(input.start, format);\n } else {\n return `${wattFormatDate(input.start, format)} ― ${wattFormatDate(input.end, format)}`;\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 { Pipe, PipeTransform } from '@angular/core';\n\nimport { WattRange } from './watt-date-range';\nimport { formatStrings, wattFormatDate } from './watt-format-date';\n\n@Pipe({\n name: 'wattDate',\n})\nexport class WattDatePipe implements PipeTransform {\n /**\n * @param input WattDateRange or string in ISO 8601 format or unix timestamp number\n */\n transform(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n ): string | null {\n return wattFormatDate(input, format, timeZone);\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 { computed, inject, Injectable, LOCALE_ID, signal } from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nimport { dayjs } from './dayjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattLocaleService {\n private readonly dateAdapter = inject<DateAdapter<unknown>>(DateAdapter);\n\n locale = signal(inject<WattSupportedLocales>(LOCALE_ID));\n isDanish = computed(() => this.locale() == 'da');\n isEnglish = computed(() => this.locale() == 'en');\n\n async setActiveLocale(locale: WattSupportedLocales): Promise<void> {\n if (locale === 'da') {\n await import('dayjs/locale/da');\n }\n\n if (locale === 'en') {\n await import('dayjs/locale/en');\n }\n\n dayjs.locale(locale);\n (this.dateAdapter as WattDateAdapter).setActiveLocale(locale);\n this.locale.set(locale);\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 { dayjs, __ngPackagrDayjsTypeScriptWorkaround } from './dayjs';\nexport { danishDatetimeProviders } from './watt-danish-datetime.providers';\nexport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nexport { type WattRange, type WattDateRange } from './watt-date-range';\nexport { WattDatePipe } from './watt-date.pipe';\nexport { wattFormatDate } from './watt-format-date';\nexport { WattLocaleService } from './watt-locale.service';\n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,eAAe,CAAC,MAAM,CAAC;AAC7D,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;IACzB;uGAnBW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA;;2FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC1BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -28,10 +28,10 @@ import { WattTableComponent } from '@energinet/watt/table';
28
28
  */
29
29
  //#endregion
30
30
  class WattDataFiltersComponent {
31
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WattDataFiltersComponent, isStandalone: true, selector: "watt-data-filters", ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{width:100%}\n"] });
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.5", type: WattDataFiltersComponent, isStandalone: true, selector: "watt-data-filters", ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{width:100%}\n"] });
33
33
  }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataFiltersComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataFiltersComponent, decorators: [{
35
35
  type: Component,
36
36
  args: [{ selector: 'watt-data-filters', template: `<ng-content />`, styles: [":host{width:100%}\n"] }]
37
37
  }] });
@@ -55,10 +55,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
55
55
  */
56
56
  //#endregion
57
57
  class WattDataActionsComponent {
58
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WattDataActionsComponent, isStandalone: true, selector: "watt-data-actions", ngImport: i0, template: `<ng-content />`, isInline: true });
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.5", type: WattDataActionsComponent, isStandalone: true, selector: "watt-data-actions", ngImport: i0, template: `<ng-content />`, isInline: true });
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataActionsComponent, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataActionsComponent, decorators: [{
62
62
  type: Component,
63
63
  args: [{
64
64
  selector: 'watt-data-actions',
@@ -94,10 +94,10 @@ class WattDataIntlService {
94
94
  errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';
95
95
  defaultTitle = 'An unexpected error occured';
96
96
  defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';
97
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
98
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataIntlService, providedIn: 'root' });
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
98
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataIntlService, providedIn: 'root' });
99
99
  }
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataIntlService, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataIntlService, decorators: [{
101
101
  type: Injectable,
102
102
  args: [{ providedIn: 'root' }]
103
103
  }] });
@@ -149,8 +149,8 @@ class WattDataTableComponent {
149
149
  if (!value)
150
150
  this.clear.emit();
151
151
  }
152
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
153
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattDataTableComponent, isStandalone: true, selector: "watt-data-table", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, ready: { classPropertyName: "ready", publicName: "ready", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, trimSearch: { classPropertyName: "trimSearch", publicName: "trimSearch", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, enableRetry: { classPropertyName: "enableRetry", publicName: "enableRetry", isSignal: true, isRequired: false, transformFunction: null }, enableCount: { classPropertyName: "enableCount", publicName: "enableCount", isSignal: true, isRequired: false, transformFunction: null }, enableEmptyState: { classPropertyName: "enableEmptyState", publicName: "enableEmptyState", isSignal: true, isRequired: false, transformFunction: null }, queryTime: { classPropertyName: "queryTime", publicName: "queryTime", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, enablePaginator: { classPropertyName: "enablePaginator", publicName: "enablePaginator", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, autoSize: { classPropertyName: "autoSize", publicName: "autoSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, emptyStateIcon: { classPropertyName: "emptyStateIcon", publicName: "emptyStateIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear", pageChanged: "pageChanged", retry: "retry" }, queries: [{ propertyName: "table", first: true, predicate: (WattTableComponent), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "search", first: true, predicate: WattSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
152
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
153
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: WattDataTableComponent, isStandalone: true, selector: "watt-data-table", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, ready: { classPropertyName: "ready", publicName: "ready", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, trimSearch: { classPropertyName: "trimSearch", publicName: "trimSearch", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, enableRetry: { classPropertyName: "enableRetry", publicName: "enableRetry", isSignal: true, isRequired: false, transformFunction: null }, enableCount: { classPropertyName: "enableCount", publicName: "enableCount", isSignal: true, isRequired: false, transformFunction: null }, enableEmptyState: { classPropertyName: "enableEmptyState", publicName: "enableEmptyState", isSignal: true, isRequired: false, transformFunction: null }, queryTime: { classPropertyName: "queryTime", publicName: "queryTime", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, enablePaginator: { classPropertyName: "enablePaginator", publicName: "enablePaginator", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, autoSize: { classPropertyName: "autoSize", publicName: "autoSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, emptyStateIcon: { classPropertyName: "emptyStateIcon", publicName: "emptyStateIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear", pageChanged: "pageChanged", retry: "retry" }, queries: [{ propertyName: "table", first: true, predicate: (WattTableComponent), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "search", first: true, predicate: WattSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
154
154
  <watt-card vater fill="vertical" [variant]="variant()">
155
155
  <vater-flex autoSize fill="vertical" gap="m">
156
156
  @if (header()) {
@@ -232,7 +232,7 @@ class WattDataTableComponent {
232
232
  </watt-card>
233
233
  `, isInline: true, styles: ["watt-data-table h3,watt-data-table h4{line-height:44px;min-height:44px;margin:0}watt-data-table watt-paginator{display:block;margin:calc(-1 * var(--watt-space-m))}watt-data-table watt-empty-state{margin:var(--watt-space-xl) 0}watt-simple-search{width:400px}\n"], dependencies: [{ kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["autoSize"] }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]" }, { kind: "directive", type: VaterUtilityDirective, selector: "[vater]", inputs: ["center", "fill", "inset", "scrollable", "sticky", "fragment", "contain"] }, { kind: "component", type: WattCardComponent, selector: "watt-card", inputs: ["variant", "loading"] }, { kind: "component", type: WattEmptyStateComponent, selector: "watt-empty-state", inputs: ["icon", "size", "title", "message", "useHTML"] }, { kind: "component", type: WattPaginatorComponent, selector: "watt-paginator", inputs: ["length", "pageSizeOptions", "pageSize", "pageIndex", "for"], outputs: ["changed"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattSimpleSearchComponent, selector: "watt-simple-search", inputs: ["label", "debounceTime", "trim", "size"], outputs: ["search"] }], encapsulation: i0.ViewEncapsulation.None });
234
234
  }
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataTableComponent, decorators: [{
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDataTableComponent, decorators: [{
236
236
  type: Component,
237
237
  args: [{ selector: 'watt-data-table', imports: [
238
238
  VaterFlexComponent,
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.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 { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n styles: `\n :host {\n width: 100%;\n }\n `,\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\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 } from '@angular/core';\n\n@Component({\n selector: 'watt-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\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';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\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 ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent, WattSimpleSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\nimport { WattIcon } from '@energinet/watt/icon';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattButtonComponent,\n WattSimpleSearchComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m));\n }\n\n watt-data-table watt-empty-state {\n margin: var(--watt-space-xl) 0;\n }\n\n watt-simple-search {\n width: 400px; /* Magix UX number (replace with variable) */\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex autoSize fill=\"vertical\" gap=\"m\">\n @if (header()) {\n <vater-stack direction=\"column\" fill=\"horizontal\" align=\"start\">\n <!-- Header, count, queryTime and custom area -->\n <vater-stack\n direction=\"row\"\n gap=\"m\"\n justify=\"space-between\"\n fill=\"horizontal\"\n align=\"start\"\n wrap\n >\n <vater-stack align=\"start\">\n <vater-stack direction=\"row\" gap=\"m\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n @if (enableCount()) {\n <span class=\"watt-chip-label\">\n {{ count() ?? table().dataSource().totalCount }}\n </span>\n }\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n <ng-content />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n <!-- Searchbar -->\n @if (enableSearch()) {\n <watt-simple-search\n [label]=\"searchLabel() ?? intl.search\"\n [trim]=\"trimSearch()\"\n (search)=\"onSearch($event)\"\n />\n }\n </vater-stack>\n <ng-content select=\"watt-data-actions\" />\n </vater-stack>\n </vater-stack>\n }\n <!-- Filters -->\n <ng-content select=\"watt-data-filters\" />\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (\n enableEmptyState() &&\n !table().loading() &&\n table().dataSource().filteredData.length === 0\n ) {\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <vater-stack scrollable justify=\"center\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? emptyStateIcon() : 'custom-explore'\"\n [title]=\"\n error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\n \"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\"\n >{{ intl.emptyRetry }}\n </watt-button>\n }\n </watt-empty-state>\n </vater-stack>\n </vater-flex>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource()\"\n [length]=\"count() ?? 0\"\n [pageSize]=\"pageSize()\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n trimSearch = input(true);\n header = input(true);\n enableRetry = input(false);\n enableCount = input(true);\n enableEmptyState = input(true);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n pageSize = input<number>(50);\n count = input<number>();\n autoSize = input(false);\n variant = input<WATT_CARD_VARIANT>('solid');\n emptyStateIcon = input<WattIcon | 'custom-power' | 'custom-explore' | 'custom-no-results'>(\n 'cancel'\n );\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource().filter = value;\n if (!value) this.clear.emit();\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 { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAYa,wBAAwB,CAAA;wGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,CAAA;;4FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,YAMnB,CAAA,cAAA,CAAgB,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA;;;AC3B5B;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;wGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;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EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,kBAA2B,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,kFAE7D,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC9LxC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.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 { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n styles: `\n :host {\n width: 100%;\n }\n `,\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\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 } from '@angular/core';\n\n@Component({\n selector: 'watt-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\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';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\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 ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent, WattSimpleSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\nimport { WattIcon } from '@energinet/watt/icon';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattButtonComponent,\n WattSimpleSearchComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m));\n }\n\n watt-data-table watt-empty-state {\n margin: var(--watt-space-xl) 0;\n }\n\n watt-simple-search {\n width: 400px; /* Magix UX number (replace with variable) */\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex autoSize fill=\"vertical\" gap=\"m\">\n @if (header()) {\n <vater-stack direction=\"column\" fill=\"horizontal\" align=\"start\">\n <!-- Header, count, queryTime and custom area -->\n <vater-stack\n direction=\"row\"\n gap=\"m\"\n justify=\"space-between\"\n fill=\"horizontal\"\n align=\"start\"\n wrap\n >\n <vater-stack align=\"start\">\n <vater-stack direction=\"row\" gap=\"m\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n @if (enableCount()) {\n <span class=\"watt-chip-label\">\n {{ count() ?? table().dataSource().totalCount }}\n </span>\n }\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n <ng-content />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n <!-- Searchbar -->\n @if (enableSearch()) {\n <watt-simple-search\n [label]=\"searchLabel() ?? intl.search\"\n [trim]=\"trimSearch()\"\n (search)=\"onSearch($event)\"\n />\n }\n </vater-stack>\n <ng-content select=\"watt-data-actions\" />\n </vater-stack>\n </vater-stack>\n }\n <!-- Filters -->\n <ng-content select=\"watt-data-filters\" />\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (\n enableEmptyState() &&\n !table().loading() &&\n table().dataSource().filteredData.length === 0\n ) {\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <vater-stack scrollable justify=\"center\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? emptyStateIcon() : 'custom-explore'\"\n [title]=\"\n error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\n \"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\"\n >{{ intl.emptyRetry }}\n </watt-button>\n }\n </watt-empty-state>\n </vater-stack>\n </vater-flex>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource()\"\n [length]=\"count() ?? 0\"\n [pageSize]=\"pageSize()\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n trimSearch = input(true);\n header = input(true);\n enableRetry = input(false);\n enableCount = input(true);\n enableEmptyState = input(true);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n pageSize = input<number>(50);\n count = input<number>();\n autoSize = input(false);\n variant = input<WATT_CARD_VARIANT>('solid');\n emptyStateIcon = input<WattIcon | 'custom-power' | 'custom-explore' | 'custom-no-results'>(\n 'cancel'\n );\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource().filter = value;\n if (!value) this.clear.emit();\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 { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAYa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,CAAA;;2FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,YAMnB,CAAA,cAAA,CAAgB,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA;;;AC3B5B;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AA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EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,kBAA2B,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,kFAE7D,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC9LxC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -112,8 +112,8 @@ class WattDateTimeField {
112
112
  setDisabledState = (x) => (x ? this.control.disable() : this.control.enable());
113
113
  registerOnTouched = (fn) => this.blur.subscribe(fn);
114
114
  registerOnChange = (fn) => this.valueChanges.subscribe(fn);
115
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDateTimeField, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: WattDateTimeField, isStandalone: true, selector: "watt-datetime-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, inclusive: { classPropertyName: "inclusive", publicName: "inclusive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", blur: "blur" }, providers: [
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDateTimeField, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.5", type: WattDateTimeField, isStandalone: true, selector: "watt-datetime-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, inclusive: { classPropertyName: "inclusive", publicName: "inclusive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", blur: "blur" }, providers: [
117
117
  {
118
118
  provide: NG_VALUE_ACCESSOR,
119
119
  useExisting: forwardRef(() => WattDateTimeField),
@@ -156,7 +156,7 @@ class WattDateTimeField {
156
156
  </watt-field>
157
157
  `, isInline: true, styles: ["watt-datetime-field{display:block;width:100%}.watt-datetime-field-picker{position:fixed;position-area:bottom span-right;position-try-fallbacks:flip-block;width:296px;height:354px;inset:unset;margin:unset;border:0}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName", "displayMode", "autoFocus", "showErrors"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
158
158
  }
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDateTimeField, decorators: [{
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattDateTimeField, decorators: [{
160
160
  type: Component,
161
161
  args: [{ selector: 'watt-datetime-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
162
162
  {