@energinet/watt 4.3.63 → 4.3.64

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 (108) hide show
  1. package/fesm2022/energinet-watt-badge.mjs +9 -9
  2. package/fesm2022/energinet-watt-badge.mjs.map +1 -1
  3. package/fesm2022/energinet-watt-breadcrumbs.mjs +7 -7
  4. package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -1
  5. package/fesm2022/energinet-watt-button.mjs +13 -13
  6. package/fesm2022/energinet-watt-button.mjs.map +1 -1
  7. package/fesm2022/energinet-watt-card.mjs +9 -9
  8. package/fesm2022/energinet-watt-card.mjs.map +1 -1
  9. package/fesm2022/energinet-watt-checkbox.mjs +6 -6
  10. package/fesm2022/energinet-watt-checkbox.mjs.map +1 -1
  11. package/fesm2022/energinet-watt-chip.mjs +58 -58
  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 +14 -14
  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-color.mjs +3 -3
  19. package/fesm2022/energinet-watt-core-date.mjs +12 -12
  20. package/fesm2022/energinet-watt-core-date.mjs.map +1 -1
  21. package/fesm2022/energinet-watt-data.mjs +29 -29
  22. package/fesm2022/energinet-watt-data.mjs.map +1 -1
  23. package/fesm2022/energinet-watt-datetime-field.mjs +10 -10
  24. package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -1
  25. package/fesm2022/energinet-watt-description-list.mjs +14 -14
  26. package/fesm2022/energinet-watt-description-list.mjs.map +1 -1
  27. package/fesm2022/energinet-watt-drawer.mjs +24 -24
  28. package/fesm2022/energinet-watt-drawer.mjs.map +1 -1
  29. package/fesm2022/energinet-watt-dropdown.mjs +21 -21
  30. package/fesm2022/energinet-watt-dropdown.mjs.map +1 -1
  31. package/fesm2022/energinet-watt-dropzone.mjs +19 -19
  32. package/fesm2022/energinet-watt-dropzone.mjs.map +1 -1
  33. package/fesm2022/energinet-watt-empty-state.mjs +24 -24
  34. package/fesm2022/energinet-watt-empty-state.mjs.map +1 -1
  35. package/fesm2022/energinet-watt-expandable-card.mjs +14 -14
  36. package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -1
  37. package/fesm2022/energinet-watt-field.mjs +35 -35
  38. package/fesm2022/energinet-watt-field.mjs.map +1 -1
  39. package/fesm2022/energinet-watt-file-field.mjs +6 -6
  40. package/fesm2022/energinet-watt-file-field.mjs.map +1 -1
  41. package/fesm2022/energinet-watt-heading.mjs +5 -5
  42. package/fesm2022/energinet-watt-heading.mjs.map +1 -1
  43. package/fesm2022/energinet-watt-icon-flags.mjs +33 -33
  44. package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -1
  45. package/fesm2022/energinet-watt-icon.mjs +10 -10
  46. package/fesm2022/energinet-watt-icon.mjs.map +1 -1
  47. package/fesm2022/energinet-watt-json-viewer.mjs +37 -37
  48. package/fesm2022/energinet-watt-json-viewer.mjs.map +1 -1
  49. package/fesm2022/energinet-watt-menu.mjs +15 -15
  50. package/fesm2022/energinet-watt-menu.mjs.map +1 -1
  51. package/fesm2022/energinet-watt-modal.mjs +24 -24
  52. package/fesm2022/energinet-watt-modal.mjs.map +1 -1
  53. package/fesm2022/energinet-watt-paginator.mjs +14 -14
  54. package/fesm2022/energinet-watt-paginator.mjs.map +1 -1
  55. package/fesm2022/energinet-watt-phone-field.mjs +10 -10
  56. package/fesm2022/energinet-watt-phone-field.mjs.map +1 -1
  57. package/fesm2022/energinet-watt-picker-__shared.mjs +24 -24
  58. package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -1
  59. package/fesm2022/energinet-watt-picker-datepicker.mjs +28 -28
  60. package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -1
  61. package/fesm2022/energinet-watt-picker-timepicker.mjs +10 -10
  62. package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -1
  63. package/fesm2022/energinet-watt-progress-tracker.mjs +11 -11
  64. package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -1
  65. package/fesm2022/energinet-watt-query-params.mjs +3 -3
  66. package/fesm2022/energinet-watt-radio.mjs +20 -20
  67. package/fesm2022/energinet-watt-radio.mjs.map +1 -1
  68. package/fesm2022/energinet-watt-search.mjs +14 -14
  69. package/fesm2022/energinet-watt-search.mjs.map +1 -1
  70. package/fesm2022/energinet-watt-segmented-buttons.mjs +11 -11
  71. package/fesm2022/energinet-watt-segmented-buttons.mjs.map +1 -1
  72. package/fesm2022/energinet-watt-separator.mjs +5 -5
  73. package/fesm2022/energinet-watt-separator.mjs.map +1 -1
  74. package/fesm2022/energinet-watt-shell.mjs +20 -20
  75. package/fesm2022/energinet-watt-shell.mjs.map +1 -1
  76. package/fesm2022/energinet-watt-skeleton.mjs +6 -6
  77. package/fesm2022/energinet-watt-skeleton.mjs.map +1 -1
  78. package/fesm2022/energinet-watt-slide-toggle.mjs +6 -6
  79. package/fesm2022/energinet-watt-slide-toggle.mjs.map +1 -1
  80. package/fesm2022/energinet-watt-slider.mjs +8 -8
  81. package/fesm2022/energinet-watt-slider.mjs.map +1 -1
  82. package/fesm2022/energinet-watt-spinner.mjs +6 -6
  83. package/fesm2022/energinet-watt-spinner.mjs.map +1 -1
  84. package/fesm2022/energinet-watt-stepper.mjs +17 -17
  85. package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
  86. package/fesm2022/energinet-watt-table.mjs +45 -45
  87. package/fesm2022/energinet-watt-table.mjs.map +1 -1
  88. package/fesm2022/energinet-watt-tabs.mjs +22 -22
  89. package/fesm2022/energinet-watt-tabs.mjs.map +1 -1
  90. package/fesm2022/energinet-watt-text-field.mjs +18 -18
  91. package/fesm2022/energinet-watt-text-field.mjs.map +1 -1
  92. package/fesm2022/energinet-watt-textarea-field.mjs +16 -16
  93. package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -1
  94. package/fesm2022/energinet-watt-toast.mjs +6 -6
  95. package/fesm2022/energinet-watt-tooltip.mjs +18 -18
  96. package/fesm2022/energinet-watt-tooltip.mjs.map +1 -1
  97. package/fesm2022/energinet-watt-utils-css.mjs +3 -3
  98. package/fesm2022/energinet-watt-utils-intersection-observer.mjs +3 -3
  99. package/fesm2022/energinet-watt-utils-resize-observer.mjs +6 -6
  100. package/fesm2022/energinet-watt-validation-message.mjs +11 -11
  101. package/fesm2022/energinet-watt-validation-message.mjs.map +1 -1
  102. package/fesm2022/energinet-watt-vater.mjs +60 -60
  103. package/fesm2022/energinet-watt-vater.mjs.map +1 -1
  104. package/fesm2022/energinet-watt-year-field.mjs +11 -11
  105. package/fesm2022/energinet-watt-year-field.mjs.map +1 -1
  106. package/fesm2022/energinet-watt-yearmonth-field.mjs +12 -12
  107. package/fesm2022/energinet-watt-yearmonth-field.mjs.map +1 -1
  108. package/package.json +9 -9
@@ -60,14 +60,14 @@ class WattMenuComponent {
60
60
  * @ignore
61
61
  */
62
62
  menu = viewChild.required('menu');
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
64
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: WattMenuComponent, isStandalone: true, selector: "watt-menu", viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], exportAs: ["wattMenu"], ngImport: i0, template: `
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
64
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.5", type: WattMenuComponent, isStandalone: true, selector: "watt-menu", viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], exportAs: ["wattMenu"], ngImport: i0, template: `
65
65
  <mat-menu #menu="matMenu" class="watt-menu-panel">
66
66
  <ng-content />
67
67
  </mat-menu>
68
68
  `, isInline: true, styles: ["watt-menu{display:contents}:root{--watt-menu-padding-block: var(--watt-space-s);--watt-menu-padding-inline: var(--watt-space-m);--watt-menu-item-gap: var(--watt-space-s);--watt-menu-icon-space: calc(var(--watt-menu-icon-size) + var(--watt-menu-item-gap));--watt-menu-icon-size: var(--watt-icon-size-s)}.watt-menu-panel .mat-mdc-menu-content{padding-block:var(--watt-menu-padding-block)}.watt-menu-panel .mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{letter-spacing:0}.watt-menu-panel:not(:has(watt-icon)) .watt-menu-item-icon{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
69
69
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuComponent, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuComponent, decorators: [{
71
71
  type: Component,
72
72
  args: [{ selector: 'watt-menu', template: `
73
73
  <mat-menu #menu="matMenu" class="watt-menu-panel">
@@ -98,9 +98,9 @@ class WattMenuItemComponent {
98
98
  /**
99
99
  * Whether the menu item is disabled.
100
100
  */
101
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
102
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
103
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: WattMenuItemComponent, isStandalone: true, selector: "watt-menu-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "disabled() || null" } }, ngImport: i0, template: `<button mat-menu-item [disabled]="disabled()">
101
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
103
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", type: WattMenuItemComponent, isStandalone: true, selector: "watt-menu-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "disabled() || null" } }, ngImport: i0, template: `<button mat-menu-item [disabled]="disabled()">
104
104
  <span class="watt-menu-item-content">
105
105
  <span class="watt-menu-item-icon">
106
106
  <ng-content select="watt-icon" />
@@ -109,7 +109,7 @@ class WattMenuItemComponent {
109
109
  </span>
110
110
  </button>`, isInline: true, styles: ["watt-menu-item .mat-mdc-menu-item{padding-inline:var(--watt-menu-padding-inline)}watt-menu-item .watt-menu-item-content{display:flex;align-items:center;gap:var(--watt-menu-item-gap);width:100%}watt-menu-item .watt-menu-item-icon{display:flex;align-items:center;justify-content:center;width:var(--watt-menu-icon-size);height:var(--watt-menu-icon-size);flex-shrink:0}watt-menu-item .watt-menu-item-icon watt-icon{display:flex}watt-menu-item .watt-menu-item-icon--show:empty{visibility:hidden}\n"], dependencies: [{ kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
111
111
  }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuItemComponent, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuItemComponent, decorators: [{
113
113
  type: Component,
114
114
  args: [{ selector: 'watt-menu-item', imports: [MatMenuItem], template: `<button mat-menu-item [disabled]="disabled()">
115
115
  <span class="watt-menu-item-content">
@@ -145,16 +145,16 @@ class WattMenuGroupComponent {
145
145
  /**
146
146
  * The label for the menu group.
147
147
  */
148
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
149
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
150
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: WattMenuGroupComponent, isStandalone: true, selector: "watt-menu-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "watt-menu-group" }, ngImport: i0, template: `
148
+ label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
149
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
150
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: WattMenuGroupComponent, isStandalone: true, selector: "watt-menu-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "watt-menu-group" }, ngImport: i0, template: `
151
151
  @if (label()) {
152
152
  <div class="watt-menu-group-heading watt-text-s-highlighted">{{ label() }}</div>
153
153
  }
154
154
  <ng-content />
155
155
  `, isInline: true, styles: [".watt-menu-group-heading{padding-block:var(--watt-menu-padding-block);padding-inline:var(--watt-menu-padding-inline)}.watt-menu-panel--has-icons .watt-menu-group-heading{padding-inline-start:calc(var(--watt-menu-padding-inline) + var(--watt-menu-icon-space))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
156
156
  }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuGroupComponent, decorators: [{
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuGroupComponent, decorators: [{
158
158
  type: Component,
159
159
  args: [{ selector: 'watt-menu-group', template: `
160
160
  @if (label()) {
@@ -204,7 +204,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
204
204
  */
205
205
  class WattMenuTriggerDirective {
206
206
  matMenuTrigger = inject(MatMenuTrigger);
207
- wattMenuTriggerFor = input.required(...(ngDevMode ? [{ debugName: "wattMenuTriggerFor" }] : []));
207
+ wattMenuTriggerFor = input.required(...(ngDevMode ? [{ debugName: "wattMenuTriggerFor" }] : /* istanbul ignore next */ []));
208
208
  constructor() {
209
209
  // Set the MatMenu instance from the WattMenuComponent when it changes
210
210
  effect(() => {
@@ -230,10 +230,10 @@ class WattMenuTriggerDirective {
230
230
  get menuOpen() {
231
231
  return this.matMenuTrigger.menuOpen;
232
232
  }
233
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
234
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: WattMenuTriggerDirective, isStandalone: true, selector: "[wattMenuTriggerFor]", inputs: { wattMenuTriggerFor: { classPropertyName: "wattMenuTriggerFor", publicName: "wattMenuTriggerFor", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["wattMenuTrigger"], hostDirectives: [{ directive: i1.MatMenuTrigger, outputs: ["menuOpened", "menuOpened", "menuClosed", "menuClosed"] }], ngImport: i0 });
233
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
234
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: WattMenuTriggerDirective, isStandalone: true, selector: "[wattMenuTriggerFor]", inputs: { wattMenuTriggerFor: { classPropertyName: "wattMenuTriggerFor", publicName: "wattMenuTriggerFor", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["wattMenuTrigger"], hostDirectives: [{ directive: i1.MatMenuTrigger, outputs: ["menuOpened", "menuOpened", "menuClosed", "menuClosed"] }], ngImport: i0 });
235
235
  }
236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattMenuTriggerDirective, decorators: [{
236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattMenuTriggerDirective, decorators: [{
237
237
  type: Directive,
238
238
  args: [{
239
239
  selector: '[wattMenuTriggerFor]',
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-menu.mjs","sources":["../../../libs/watt/package/menu/watt-menu.component.ts","../../../libs/watt/package/menu/watt-menu-item.component.ts","../../../libs/watt/package/menu/watt-menu-group.component.ts","../../../libs/watt/package/menu/watt-menu-trigger.directive.ts","../../../libs/watt/package/menu/index.ts","../../../libs/watt/package/menu/energinet-watt-menu.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, ViewEncapsulation, ChangeDetectionStrategy, viewChild } from '@angular/core';\nimport { MatMenu, MatMenuModule } from '@angular/material/menu';\n\n/**\n * Watt Menu Component\n *\n * A wrapper around Angular Material's menu component that provides consistent styling\n * and integration with the Watt design system.\n *\n * @example Basic usage\n * ```html\n * <watt-button [wattMenuTriggerFor]=\"menu\">\n * Open Menu\n * </watt-button>\n *\n * <watt-menu #menu>\n * <watt-menu-item>Option 1</watt-menu-item>\n * <watt-menu-item>Option 2</watt-menu-item>\n * </watt-menu>\n * ```\n *\n * @example With groups\n * ```html\n * <watt-menu #menu>\n * <watt-menu-group label=\"File\">\n * <watt-menu-item>New</watt-menu-item>\n * <watt-menu-item>Open</watt-menu-item>\n * </watt-menu-group>\n *\n * <watt-menu-group label=\"Edit\">\n * <watt-menu-item>Cut</watt-menu-item>\n * <watt-menu-item>Copy</watt-menu-item>\n * </watt-menu-group>\n * </watt-menu>\n * ```\n */\n@Component({\n selector: 'watt-menu',\n template: `\n <mat-menu #menu=\"matMenu\" class=\"watt-menu-panel\">\n <ng-content />\n </mat-menu>\n `,\n styles: [\n `\n watt-menu {\n display: contents;\n }\n\n :root {\n --watt-menu-padding-block: var(--watt-space-s);\n --watt-menu-padding-inline: var(--watt-space-m);\n --watt-menu-item-gap: var(--watt-space-s);\n --watt-menu-icon-space: calc(var(--watt-menu-icon-size) + var(--watt-menu-item-gap));\n --watt-menu-icon-size: var(--watt-icon-size-s);\n }\n\n /* Menu panel styles */\n .watt-menu-panel {\n /* Override Material menu padding to have consistent spacing */\n .mat-mdc-menu-content {\n padding-block: var(--watt-menu-padding-block);\n }\n\n /* Remove default letter-spacing */\n .mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text {\n letter-spacing: 0;\n }\n\n /* Hide icon space when no menu items have icons */\n &:not(:has(watt-icon)) .watt-menu-item-icon {\n display: none;\n }\n }\n `,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatMenuModule],\n exportAs: 'wattMenu',\n})\nexport class WattMenuComponent {\n /**\n * Reference to the underlying MatMenu instance.\n * @ignore\n */\n menu = viewChild.required<MatMenu>('menu');\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, input } from '@angular/core';\nimport { MatMenuItem } from '@angular/material/menu';\n\n@Component({\n selector: 'watt-menu-item',\n imports: [MatMenuItem],\n template: `<button mat-menu-item [disabled]=\"disabled()\">\n <span class=\"watt-menu-item-content\">\n <span class=\"watt-menu-item-icon\">\n <ng-content select=\"watt-icon\" />\n </span>\n <ng-content />\n </span>\n </button>`,\n styles: [\n `\n watt-menu-item {\n .mat-mdc-menu-item {\n padding-inline: var(--watt-menu-padding-inline);\n }\n\n .watt-menu-item-content {\n display: flex;\n align-items: center;\n gap: var(--watt-menu-item-gap);\n width: 100%;\n }\n\n .watt-menu-item-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--watt-menu-icon-size);\n height: var(--watt-menu-icon-size);\n flex-shrink: 0;\n\n /* Icon space visibility is controlled by parent menu CSS */\n\n watt-icon {\n display: flex;\n }\n }\n\n .watt-menu-item-icon--show:empty {\n visibility: hidden;\n }\n }\n `,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.disabled]': 'disabled() || null',\n },\n})\nexport class WattMenuItemComponent {\n /**\n * Whether the menu item is disabled.\n */\n disabled = input(false);\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, input } from '@angular/core';\n\n@Component({\n selector: 'watt-menu-group',\n template: `\n @if (label()) {\n <div class=\"watt-menu-group-heading watt-text-s-highlighted\">{{ label() }}</div>\n }\n <ng-content />\n `,\n styles: [\n `\n .watt-menu-group-heading {\n padding-block: var(--watt-menu-padding-block);\n padding-inline: var(--watt-menu-padding-inline);\n\n /* Align with menu items when icons are present */\n .watt-menu-panel--has-icons & {\n padding-inline-start: calc(var(--watt-menu-padding-inline) + var(--watt-menu-icon-space));\n }\n }\n `,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'watt-menu-group',\n },\n})\nexport class WattMenuGroupComponent {\n /**\n * The label for the menu group.\n */\n label = input<string>('');\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, inject, input, effect } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { WattMenuComponent } from './watt-menu.component';\n\n/**\n * Watt Menu Trigger Directive\n *\n * A wrapper around Angular Material's MatMenuTrigger directive that maintains\n * the same API while keeping the Watt design system abstraction.\n *\n * @example\n * ```html\n * <watt-button [wattMenuTriggerFor]=\"menu\">\n * Open Menu\n * </watt-button>\n *\n * <watt-menu #menu>\n * <watt-menu-item>Option 1</watt-menu-item>\n * <watt-menu-item>Option 2</watt-menu-item>\n * </watt-menu>\n * ```\n */\n@Directive({\n selector: '[wattMenuTriggerFor]',\n exportAs: 'wattMenuTrigger',\n hostDirectives: [\n {\n directive: MatMenuTrigger,\n outputs: ['menuOpened', 'menuClosed'],\n },\n ],\n})\nexport class WattMenuTriggerDirective {\n private readonly matMenuTrigger = inject(MatMenuTrigger);\n\n wattMenuTriggerFor = input.required<WattMenuComponent>();\n\n constructor() {\n // Set the MatMenu instance from the WattMenuComponent when it changes\n effect(() => {\n const menu = this.wattMenuTriggerFor();\n if (menu) {\n this.matMenuTrigger.menu = menu.menu();\n }\n });\n }\n\n /** Opens the menu */\n openMenu(): void {\n this.matMenuTrigger.openMenu();\n }\n\n /** Closes the menu */\n closeMenu(): void {\n this.matMenuTrigger.closeMenu();\n }\n\n /** Toggles the menu between the open and closed states */\n toggleMenu(): void {\n this.matMenuTrigger.toggleMenu();\n }\n\n /** Whether the menu is open */\n get menuOpen(): boolean {\n return this.matMenuTrigger.menuOpen;\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\n// Individual exports\nexport { WattMenuComponent } from './watt-menu.component';\nexport { WattMenuItemComponent } from './watt-menu-item.component';\nexport { WattMenuGroupComponent } from './watt-menu-group.component';\nexport { WattMenuTriggerDirective } from './watt-menu-trigger.directive';\n\n// Import the components for the combined export\nimport { WattMenuComponent } from './watt-menu.component';\nimport { WattMenuItemComponent } from './watt-menu-item.component';\nimport { WattMenuGroupComponent } from './watt-menu-group.component';\nimport { WattMenuTriggerDirective } from './watt-menu-trigger.directive';\n\n// Combined export for convenience - all menu-related components\nexport const WATT_MENU = [\n WattMenuComponent,\n WattMenuItemComponent,\n WattMenuGroupComponent,\n WattMenuTriggerDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;MA8CU,iBAAiB,CAAA;AAC5B;;;AAGG;AACH,IAAA,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAU,MAAM,CAAC;uGAL/B,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,MAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA3ClB;;;;AAIT,EAAA,CAAA,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AAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAVpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,cAAc;AACzB,4BAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACtC,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACjDD;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACA;AAYA;AACO,MAAM,SAAS,GAAG;IACvB,iBAAiB;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,wBAAwB;;;ACnC1B;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-menu.mjs","sources":["../../../libs/watt/package/menu/watt-menu.component.ts","../../../libs/watt/package/menu/watt-menu-item.component.ts","../../../libs/watt/package/menu/watt-menu-group.component.ts","../../../libs/watt/package/menu/watt-menu-trigger.directive.ts","../../../libs/watt/package/menu/index.ts","../../../libs/watt/package/menu/energinet-watt-menu.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, ViewEncapsulation, ChangeDetectionStrategy, viewChild } from '@angular/core';\nimport { MatMenu, MatMenuModule } from '@angular/material/menu';\n\n/**\n * Watt Menu Component\n *\n * A wrapper around Angular Material's menu component that provides consistent styling\n * and integration with the Watt design system.\n *\n * @example Basic usage\n * ```html\n * <watt-button [wattMenuTriggerFor]=\"menu\">\n * Open Menu\n * </watt-button>\n *\n * <watt-menu #menu>\n * <watt-menu-item>Option 1</watt-menu-item>\n * <watt-menu-item>Option 2</watt-menu-item>\n * </watt-menu>\n * ```\n *\n * @example With groups\n * ```html\n * <watt-menu #menu>\n * <watt-menu-group label=\"File\">\n * <watt-menu-item>New</watt-menu-item>\n * <watt-menu-item>Open</watt-menu-item>\n * </watt-menu-group>\n *\n * <watt-menu-group label=\"Edit\">\n * <watt-menu-item>Cut</watt-menu-item>\n * <watt-menu-item>Copy</watt-menu-item>\n * </watt-menu-group>\n * </watt-menu>\n * ```\n */\n@Component({\n selector: 'watt-menu',\n template: `\n <mat-menu #menu=\"matMenu\" class=\"watt-menu-panel\">\n <ng-content />\n </mat-menu>\n `,\n styles: [\n `\n watt-menu {\n display: contents;\n }\n\n :root {\n --watt-menu-padding-block: var(--watt-space-s);\n --watt-menu-padding-inline: var(--watt-space-m);\n --watt-menu-item-gap: var(--watt-space-s);\n --watt-menu-icon-space: calc(var(--watt-menu-icon-size) + var(--watt-menu-item-gap));\n --watt-menu-icon-size: var(--watt-icon-size-s);\n }\n\n /* Menu panel styles */\n .watt-menu-panel {\n /* Override Material menu padding to have consistent spacing */\n .mat-mdc-menu-content {\n padding-block: var(--watt-menu-padding-block);\n }\n\n /* Remove default letter-spacing */\n .mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text {\n letter-spacing: 0;\n }\n\n /* Hide icon space when no menu items have icons */\n &:not(:has(watt-icon)) .watt-menu-item-icon {\n display: none;\n }\n }\n `,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatMenuModule],\n exportAs: 'wattMenu',\n})\nexport class WattMenuComponent {\n /**\n * Reference to the underlying MatMenu instance.\n * @ignore\n */\n menu = viewChild.required<MatMenu>('menu');\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, input } from '@angular/core';\nimport { MatMenuItem } from '@angular/material/menu';\n\n@Component({\n selector: 'watt-menu-item',\n imports: [MatMenuItem],\n template: `<button mat-menu-item [disabled]=\"disabled()\">\n <span class=\"watt-menu-item-content\">\n <span class=\"watt-menu-item-icon\">\n <ng-content select=\"watt-icon\" />\n </span>\n <ng-content />\n </span>\n </button>`,\n styles: [\n `\n watt-menu-item {\n .mat-mdc-menu-item {\n padding-inline: var(--watt-menu-padding-inline);\n }\n\n .watt-menu-item-content {\n display: flex;\n align-items: center;\n gap: var(--watt-menu-item-gap);\n width: 100%;\n }\n\n .watt-menu-item-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--watt-menu-icon-size);\n height: var(--watt-menu-icon-size);\n flex-shrink: 0;\n\n /* Icon space visibility is controlled by parent menu CSS */\n\n watt-icon {\n display: flex;\n }\n }\n\n .watt-menu-item-icon--show:empty {\n visibility: hidden;\n }\n }\n `,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.disabled]': 'disabled() || null',\n },\n})\nexport class WattMenuItemComponent {\n /**\n * Whether the menu item is disabled.\n */\n disabled = input(false);\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, input } from '@angular/core';\n\n@Component({\n selector: 'watt-menu-group',\n template: `\n @if (label()) {\n <div class=\"watt-menu-group-heading watt-text-s-highlighted\">{{ label() }}</div>\n }\n <ng-content />\n `,\n styles: [\n `\n .watt-menu-group-heading {\n padding-block: var(--watt-menu-padding-block);\n padding-inline: var(--watt-menu-padding-inline);\n\n /* Align with menu items when icons are present */\n .watt-menu-panel--has-icons & {\n padding-inline-start: calc(var(--watt-menu-padding-inline) + var(--watt-menu-icon-space));\n }\n }\n `,\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'watt-menu-group',\n },\n})\nexport class WattMenuGroupComponent {\n /**\n * The label for the menu group.\n */\n label = input<string>('');\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, inject, input, effect } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { WattMenuComponent } from './watt-menu.component';\n\n/**\n * Watt Menu Trigger Directive\n *\n * A wrapper around Angular Material's MatMenuTrigger directive that maintains\n * the same API while keeping the Watt design system abstraction.\n *\n * @example\n * ```html\n * <watt-button [wattMenuTriggerFor]=\"menu\">\n * Open Menu\n * </watt-button>\n *\n * <watt-menu #menu>\n * <watt-menu-item>Option 1</watt-menu-item>\n * <watt-menu-item>Option 2</watt-menu-item>\n * </watt-menu>\n * ```\n */\n@Directive({\n selector: '[wattMenuTriggerFor]',\n exportAs: 'wattMenuTrigger',\n hostDirectives: [\n {\n directive: MatMenuTrigger,\n outputs: ['menuOpened', 'menuClosed'],\n },\n ],\n})\nexport class WattMenuTriggerDirective {\n private readonly matMenuTrigger = inject(MatMenuTrigger);\n\n wattMenuTriggerFor = input.required<WattMenuComponent>();\n\n constructor() {\n // Set the MatMenu instance from the WattMenuComponent when it changes\n effect(() => {\n const menu = this.wattMenuTriggerFor();\n if (menu) {\n this.matMenuTrigger.menu = menu.menu();\n }\n });\n }\n\n /** Opens the menu */\n openMenu(): void {\n this.matMenuTrigger.openMenu();\n }\n\n /** Closes the menu */\n closeMenu(): void {\n this.matMenuTrigger.closeMenu();\n }\n\n /** Toggles the menu between the open and closed states */\n toggleMenu(): void {\n this.matMenuTrigger.toggleMenu();\n }\n\n /** Whether the menu is open */\n get menuOpen(): boolean {\n return this.matMenuTrigger.menuOpen;\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\n// Individual exports\nexport { WattMenuComponent } from './watt-menu.component';\nexport { WattMenuItemComponent } from './watt-menu-item.component';\nexport { WattMenuGroupComponent } from './watt-menu-group.component';\nexport { WattMenuTriggerDirective } from './watt-menu-trigger.directive';\n\n// Import the components for the combined export\nimport { WattMenuComponent } from './watt-menu.component';\nimport { WattMenuItemComponent } from './watt-menu-item.component';\nimport { WattMenuGroupComponent } from './watt-menu-group.component';\nimport { WattMenuTriggerDirective } from './watt-menu-trigger.directive';\n\n// Combined export for convenience - all menu-related components\nexport const WATT_MENU = [\n WattMenuComponent,\n WattMenuItemComponent,\n WattMenuGroupComponent,\n WattMenuTriggerDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;MA8CU,iBAAiB,CAAA;AAC5B;;;AAGG;AACH,IAAA,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAU,MAAM,CAAC;uGAL/B,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,MAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA3ClB;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ijBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAoCS,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,YAAA,EAAA,iBAAA,EAA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AAC,YAAY,EAAE,YAAY,CAAC;AACtC,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACjDD;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACA;AAYA;AACO,MAAM,SAAS,GAAG;IACvB,iBAAiB;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,wBAAwB;;;ACnC1B;;AAEG;;;;"}
@@ -71,10 +71,10 @@ class WattModalService {
71
71
  ?.setAttribute('style', `--watt-modal-min-height: ${minHeight}`);
72
72
  });
73
73
  }
74
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
75
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattModalService });
74
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
75
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattModalService });
76
76
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattModalService, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattModalService, decorators: [{
78
78
  type: Injectable
79
79
  }] });
80
80
 
@@ -107,32 +107,32 @@ class WattModalComponent {
107
107
  modalService = inject(WattModalService);
108
108
  dialogRef = inject(MatDialogRef, { optional: true });
109
109
  /** Title to stay fixed to top of modal. */
110
- title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
111
- size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
110
+ title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
111
+ size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
112
112
  /** Whether the modal should show a loading state. */
113
- loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
113
+ loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
114
114
  /** Whether the modal should show a loading text for the loading state. */
115
- loadingMessage = input('', ...(ngDevMode ? [{ debugName: "loadingMessage" }] : []));
115
+ loadingMessage = input('', ...(ngDevMode ? [{ debugName: "loadingMessage" }] : /* istanbul ignore next */ []));
116
116
  /** Disable ESC, close button and backdrop click as methods of closing. */
117
- disableClose = input(false, ...(ngDevMode ? [{ debugName: "disableClose" }] : []));
117
+ disableClose = input(false, ...(ngDevMode ? [{ debugName: "disableClose" }] : /* istanbul ignore next */ []));
118
118
  /** Whether to show the close button */
119
- hideCloseButton = input(false, ...(ngDevMode ? [{ debugName: "hideCloseButton" }] : []));
119
+ hideCloseButton = input(false, ...(ngDevMode ? [{ debugName: "hideCloseButton" }] : /* istanbul ignore next */ []));
120
120
  /** Disable ESC, backdrop click as methods of closing. */
121
- disableEscAndBackdropClose = input(false, ...(ngDevMode ? [{ debugName: "disableEscAndBackdropClose" }] : []));
121
+ disableEscAndBackdropClose = input(false, ...(ngDevMode ? [{ debugName: "disableEscAndBackdropClose" }] : /* istanbul ignore next */ []));
122
122
  /** The aria-label for the close button. */
123
- closeLabel = input('Close', ...(ngDevMode ? [{ debugName: "closeLabel" }] : []));
123
+ closeLabel = input('Close', ...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
124
124
  /** Classes added to the modal panel */
125
- panelClass = input([], ...(ngDevMode ? [{ debugName: "panelClass" }] : []));
126
- minHeight = input('147px', ...(ngDevMode ? [{ debugName: "minHeight" }] : []));
125
+ panelClass = input([], ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
126
+ minHeight = input('147px', ...(ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []));
127
127
  /** Whether the dialog should restore focus to the previously-focused element, after it's closed. */
128
- restoreFocus = input(true, ...(ngDevMode ? [{ debugName: "restoreFocus" }] : []));
128
+ restoreFocus = input(true, ...(ngDevMode ? [{ debugName: "restoreFocus" }] : /* istanbul ignore next */ []));
129
129
  /** Icon displayed next to the modal title. */
130
- titleIcon = input(undefined, ...(ngDevMode ? [{ debugName: "titleIcon" }] : []));
130
+ titleIcon = input(undefined, ...(ngDevMode ? [{ debugName: "titleIcon" }] : /* istanbul ignore next */ []));
131
131
  /** Whether the modal should open automatically when rendered. */
132
- autoOpen = input(false, { ...(ngDevMode ? { debugName: "autoOpen" } : {}), transform: booleanAttribute });
132
+ autoOpen = input(false, { ...(ngDevMode ? { debugName: "autoOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
133
133
  closed = output();
134
- modal = viewChild('modal', ...(ngDevMode ? [{ debugName: "modal" }] : []));
135
- scrollable = signal(false, ...(ngDevMode ? [{ debugName: "scrollable" }] : []));
134
+ modal = viewChild('modal', ...(ngDevMode ? [{ debugName: "modal" }] : /* istanbul ignore next */ []));
135
+ scrollable = signal(false, ...(ngDevMode ? [{ debugName: "scrollable" }] : /* istanbul ignore next */ []));
136
136
  constructor() {
137
137
  afterRenderEffect(() => {
138
138
  if (this.autoOpen()) {
@@ -169,10 +169,10 @@ class WattModalComponent {
169
169
  onResize(event) {
170
170
  this.scrollable.set(event.target.scrollHeight > event.target.clientHeight);
171
171
  }
172
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
173
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: WattModalComponent, isStandalone: true, selector: "watt-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingMessage: { classPropertyName: "loadingMessage", publicName: "loadingMessage", isSignal: true, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: true, isRequired: false, transformFunction: null }, hideCloseButton: { classPropertyName: "hideCloseButton", publicName: "hideCloseButton", isSignal: true, isRequired: false, transformFunction: null }, disableEscAndBackdropClose: { classPropertyName: "disableEscAndBackdropClose", publicName: "disableEscAndBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, titleIcon: { classPropertyName: "titleIcon", publicName: "titleIcon", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media(min-width:600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media(min-width:1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media(min-width:720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media(min-width:786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media(min-width:960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-title.watt-modal-title-icon{display:flex;align-items:center;gap:var(--watt-space-s)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media(min-width:720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: WattResizeObserverDirective, selector: "[wattResizeObserver]", outputs: ["resize"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: WattModalComponent, isStandalone: true, selector: "watt-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingMessage: { classPropertyName: "loadingMessage", publicName: "loadingMessage", isSignal: true, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: true, isRequired: false, transformFunction: null }, hideCloseButton: { classPropertyName: "hideCloseButton", publicName: "hideCloseButton", isSignal: true, isRequired: false, transformFunction: null }, disableEscAndBackdropClose: { classPropertyName: "disableEscAndBackdropClose", publicName: "disableEscAndBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, titleIcon: { classPropertyName: "titleIcon", publicName: "titleIcon", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media(min-width:600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media(min-width:1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media(min-width:720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media(min-width:786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media(min-width:960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-title.watt-modal-title-icon{display:flex;align-items:center;gap:var(--watt-space-s)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media(min-width:720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: WattResizeObserverDirective, selector: "[wattResizeObserver]", outputs: ["resize"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
174
174
  }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattModalComponent, decorators: [{
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattModalComponent, decorators: [{
176
176
  type: Component,
177
177
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'watt-modal', imports: [
178
178
  NgTemplateOutlet,
@@ -186,10 +186,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
186
186
  * Component for projecting buttons (actions) to the bottom of the modal.
187
187
  */
188
188
  class WattModalActionsComponent {
189
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattModalActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
190
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.6", type: WattModalActionsComponent, isStandalone: true, selector: "watt-modal-actions", ngImport: i0, template: '<ng-content />', isInline: true });
189
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattModalActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
190
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattModalActionsComponent, isStandalone: true, selector: "watt-modal-actions", ngImport: i0, template: '<ng-content />', isInline: true });
191
191
  }
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattModalActionsComponent, decorators: [{
192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattModalActionsComponent, decorators: [{
193
193
  type: Component,
194
194
  args: [{
195
195
  selector: 'watt-modal-actions',
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-modal.mjs","sources":["../../../libs/watt/package/modal/watt-modal.service.ts","../../../libs/watt/package/modal/watt-modal.component.ts","../../../libs/watt/package/modal/watt-modal.component.html","../../../libs/watt/package/modal/index.ts","../../../libs/watt/package/modal/energinet-watt-modal.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ComponentType } from '@angular/cdk/portal';\nimport { EventEmitter, Injectable, Injector, TemplateRef, inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { map, take } from 'rxjs';\n\nexport interface WattModalConfig<T> {\n templateRef?: TemplateRef<unknown>;\n component?: ComponentType<WattTypedModal<T>>;\n data?: T;\n disableClose?: boolean;\n onClosed?: EventEmitter<boolean> | ((result: boolean) => void);\n minHeight?: string;\n panelClass?: string[];\n injector?: Injector;\n restoreFocus?: boolean;\n}\n\nexport abstract class WattTypedModal<T = void> {\n protected modalData: T = inject(MAT_DIALOG_DATA);\n protected dialogRef: MatDialogRef<WattTypedModal<T>> = inject(MatDialogRef);\n}\n\n@Injectable()\nexport class WattModalService {\n private readonly dialog = inject(MatDialog);\n private matDialogRef: MatDialogRef<unknown> | undefined;\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open = <T>(config: WattModalConfig<T>) => {\n const template = config.templateRef ?? config.component;\n\n if (!template) return;\n\n this.matDialogRef = this.openModal(template, config);\n\n this.matDialogRef\n .afterClosed()\n .pipe(map(Boolean), take(1))\n .subscribe((result) => {\n if (config?.onClosed instanceof EventEmitter) {\n config?.onClosed.emit(result);\n } else {\n config?.onClosed?.(result);\n }\n });\n\n if (config.minHeight) this.setMinHeight(config.minHeight);\n };\n\n /**\n * Opens the modal using the provided template and configuration.\n */\n private openModal<T>(\n template: TemplateRef<unknown> | ComponentType<WattTypedModal<T>>,\n config: WattModalConfig<T>\n ): MatDialogRef<unknown> {\n return this.dialog.open(template, {\n autoFocus: 'dialog',\n panelClass: [\n 'watt-modal-panel',\n ...(config.component ? ['watt-modal-panel--component'] : []),\n ...(config.panelClass ?? []),\n ],\n disableClose: config.disableClose ?? false,\n data: config.data,\n maxWidth: 'none',\n injector: config.injector,\n restoreFocus: config.restoreFocus === false ? false : true,\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.matDialogRef?.close(result);\n }\n\n private setMinHeight(minHeight: string) {\n setTimeout(() => {\n document\n ?.getElementById(this.matDialogRef?.id ?? '')\n ?.querySelector('.watt-modal')\n ?.setAttribute('style', `--watt-modal-min-height: ${minHeight}`);\n });\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n inject,\n input,\n output,\n viewChild,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { WattResizeObserverDirective } from '@energinet/watt/utils/resize-observer';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nimport { WattModalService } from './watt-modal.service';\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport type WattModalSize = 'small' | 'medium' | 'large';\n\n/**\n * Component for representing a binary decision in the form of\n * a modal window that appears in front of the entire content.\n *\n * Usage:\n * `import { WATT_MODAL } from '@energinet/watt/modal';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-modal',\n styleUrls: ['./watt-modal.component.scss'],\n templateUrl: './watt-modal.component.html',\n imports: [\n NgTemplateOutlet,\n WattResizeObserverDirective,\n WattButtonComponent,\n WattSpinnerComponent,\n WattIconComponent,\n ],\n})\nexport class WattModalComponent {\n private modalService = inject(WattModalService);\n protected dialogRef = inject<MatDialogRef<unknown>>(MatDialogRef, { optional: true });\n\n /** Title to stay fixed to top of modal. */\n title = input('');\n\n size = input<WattModalSize>('medium');\n\n /** Whether the modal should show a loading state. */\n loading = input(false);\n\n /** Whether the modal should show a loading text for the loading state. */\n loadingMessage = input('');\n\n /** Disable ESC, close button and backdrop click as methods of closing. */\n disableClose = input(false);\n\n /** Whether to show the close button */\n hideCloseButton = input(false);\n\n /** Disable ESC, backdrop click as methods of closing. */\n disableEscAndBackdropClose = input(false);\n\n /** The aria-label for the close button. */\n closeLabel = input('Close');\n\n /** Classes added to the modal panel */\n panelClass = input<string[]>([]);\n\n minHeight = input('147px');\n\n /** Whether the dialog should restore focus to the previously-focused element, after it's closed. */\n restoreFocus = input(true);\n\n /** Icon displayed next to the modal title. */\n titleIcon = input<WattIcon | undefined>(undefined);\n\n /** Whether the modal should open automatically when rendered. */\n autoOpen = input(false, { transform: booleanAttribute });\n\n closed = output<boolean>();\n\n modal = viewChild<TemplateRef<Element>>('modal');\n\n scrollable = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (this.autoOpen()) {\n this.open();\n }\n });\n }\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open() {\n this.modalService.open({\n disableClose: this.disableEscAndBackdropClose() || this.disableClose(),\n templateRef: this.modal(),\n onClosed: (result: boolean) => this.closed.emit(result),\n minHeight: this.minHeight(),\n panelClass: this.panelClass(),\n restoreFocus: this.restoreFocus(),\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.modalService.close(result); // inline modal\n this.dialogRef?.close(result); // injected modal\n }\n\n /**\n * Called when the modal content element changes size.\n * @ignore\n */\n onResize(event: ResizeObserverEntry) {\n this.scrollable.set(event.target.scrollHeight > event.target.clientHeight);\n }\n}\n\n/**\n * Component for projecting buttons (actions) to the bottom of the modal.\n */\n@Component({\n selector: 'watt-modal-actions',\n template: '<ng-content />',\n})\nexport class WattModalActionsComponent {}\n\nexport const WATT_MODAL = [WattModalComponent, WattModalActionsComponent];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattModalComponent, WattModalActionsComponent, WATT_MODAL } from './watt-modal.component';\nexport { WattModalService, WattModalConfig, WattTypedModal } from './watt-modal.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAmCsB,cAAc,CAAA;AACxB,IAAA,SAAS,GAAM,MAAM,CAAC,eAAe,CAAC;AACtC,IAAA,SAA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d9B,SAAS;sCACS,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAC3B,YAAY,EAAA,OAAA,EAGb;wBACP,gBAAgB;wBAChB,2BAA2B;wBAC3B,mBAAmB;wBACnB,oBAAoB;wBACpB,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,8zDAAA,EAAA,MAAA,EAAA,CAAA,6sFAAA,CAAA,EAAA;w7CA6CuC,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;AA6CjD;;AAEG;MAKU,yBAAyB,CAAA;uGAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,8EAF1B,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,gBAAgB;AAC3B,iBAAA;;MAGY,UAAU,GAAG,CAAC,kBAAkB,EAAE,yBAAyB;;AEjKxE;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-modal.mjs","sources":["../../../libs/watt/package/modal/watt-modal.service.ts","../../../libs/watt/package/modal/watt-modal.component.ts","../../../libs/watt/package/modal/watt-modal.component.html","../../../libs/watt/package/modal/index.ts","../../../libs/watt/package/modal/energinet-watt-modal.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ComponentType } from '@angular/cdk/portal';\nimport { EventEmitter, Injectable, Injector, TemplateRef, inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { map, take } from 'rxjs';\n\nexport interface WattModalConfig<T> {\n templateRef?: TemplateRef<unknown>;\n component?: ComponentType<WattTypedModal<T>>;\n data?: T;\n disableClose?: boolean;\n onClosed?: EventEmitter<boolean> | ((result: boolean) => void);\n minHeight?: string;\n panelClass?: string[];\n injector?: Injector;\n restoreFocus?: boolean;\n}\n\nexport abstract class WattTypedModal<T = void> {\n protected modalData: T = inject(MAT_DIALOG_DATA);\n protected dialogRef: MatDialogRef<WattTypedModal<T>> = inject(MatDialogRef);\n}\n\n@Injectable()\nexport class WattModalService {\n private readonly dialog = inject(MatDialog);\n private matDialogRef: MatDialogRef<unknown> | undefined;\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open = <T>(config: WattModalConfig<T>) => {\n const template = config.templateRef ?? config.component;\n\n if (!template) return;\n\n this.matDialogRef = this.openModal(template, config);\n\n this.matDialogRef\n .afterClosed()\n .pipe(map(Boolean), take(1))\n .subscribe((result) => {\n if (config?.onClosed instanceof EventEmitter) {\n config?.onClosed.emit(result);\n } else {\n config?.onClosed?.(result);\n }\n });\n\n if (config.minHeight) this.setMinHeight(config.minHeight);\n };\n\n /**\n * Opens the modal using the provided template and configuration.\n */\n private openModal<T>(\n template: TemplateRef<unknown> | ComponentType<WattTypedModal<T>>,\n config: WattModalConfig<T>\n ): MatDialogRef<unknown> {\n return this.dialog.open(template, {\n autoFocus: 'dialog',\n panelClass: [\n 'watt-modal-panel',\n ...(config.component ? ['watt-modal-panel--component'] : []),\n ...(config.panelClass ?? []),\n ],\n disableClose: config.disableClose ?? false,\n data: config.data,\n maxWidth: 'none',\n injector: config.injector,\n restoreFocus: config.restoreFocus === false ? false : true,\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.matDialogRef?.close(result);\n }\n\n private setMinHeight(minHeight: string) {\n setTimeout(() => {\n document\n ?.getElementById(this.matDialogRef?.id ?? '')\n ?.querySelector('.watt-modal')\n ?.setAttribute('style', `--watt-modal-min-height: ${minHeight}`);\n });\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n inject,\n input,\n output,\n viewChild,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { WattResizeObserverDirective } from '@energinet/watt/utils/resize-observer';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nimport { WattModalService } from './watt-modal.service';\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport type WattModalSize = 'small' | 'medium' | 'large';\n\n/**\n * Component for representing a binary decision in the form of\n * a modal window that appears in front of the entire content.\n *\n * Usage:\n * `import { WATT_MODAL } from '@energinet/watt/modal';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-modal',\n styleUrls: ['./watt-modal.component.scss'],\n templateUrl: './watt-modal.component.html',\n imports: [\n NgTemplateOutlet,\n WattResizeObserverDirective,\n WattButtonComponent,\n WattSpinnerComponent,\n WattIconComponent,\n ],\n})\nexport class WattModalComponent {\n private modalService = inject(WattModalService);\n protected dialogRef = inject<MatDialogRef<unknown>>(MatDialogRef, { optional: true });\n\n /** Title to stay fixed to top of modal. */\n title = input('');\n\n size = input<WattModalSize>('medium');\n\n /** Whether the modal should show a loading state. */\n loading = input(false);\n\n /** Whether the modal should show a loading text for the loading state. */\n loadingMessage = input('');\n\n /** Disable ESC, close button and backdrop click as methods of closing. */\n disableClose = input(false);\n\n /** Whether to show the close button */\n hideCloseButton = input(false);\n\n /** Disable ESC, backdrop click as methods of closing. */\n disableEscAndBackdropClose = input(false);\n\n /** The aria-label for the close button. */\n closeLabel = input('Close');\n\n /** Classes added to the modal panel */\n panelClass = input<string[]>([]);\n\n minHeight = input('147px');\n\n /** Whether the dialog should restore focus to the previously-focused element, after it's closed. */\n restoreFocus = input(true);\n\n /** Icon displayed next to the modal title. */\n titleIcon = input<WattIcon | undefined>(undefined);\n\n /** Whether the modal should open automatically when rendered. */\n autoOpen = input(false, { transform: booleanAttribute });\n\n closed = output<boolean>();\n\n modal = viewChild<TemplateRef<Element>>('modal');\n\n scrollable = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (this.autoOpen()) {\n this.open();\n }\n });\n }\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open() {\n this.modalService.open({\n disableClose: this.disableEscAndBackdropClose() || this.disableClose(),\n templateRef: this.modal(),\n onClosed: (result: boolean) => this.closed.emit(result),\n minHeight: this.minHeight(),\n panelClass: this.panelClass(),\n restoreFocus: this.restoreFocus(),\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.modalService.close(result); // inline modal\n this.dialogRef?.close(result); // injected modal\n }\n\n /**\n * Called when the modal content element changes size.\n * @ignore\n */\n onResize(event: ResizeObserverEntry) {\n this.scrollable.set(event.target.scrollHeight > event.target.clientHeight);\n }\n}\n\n/**\n * Component for projecting buttons (actions) to the bottom of the modal.\n */\n@Component({\n selector: 'watt-modal-actions',\n template: '<ng-content />',\n})\nexport class WattModalActionsComponent {}\n\nexport const WATT_MODAL = [WattModalComponent, WattModalActionsComponent];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattModalComponent, WattModalActionsComponent, WATT_MODAL } from './watt-modal.component';\nexport { WattModalService, WattModalConfig, WattTypedModal } from './watt-modal.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAmCsB,cAAc,CAAA;AACxB,IAAA,SAAS,GAAM,MAAM,CAAC,eAAe,CAAC;AACtC,IAAA,SAAS,GAAoC,MAAM,CAAC,YAAY,CAAC;AAC5E;MAGY,gBAAgB,CAAA;AACV,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;AACnC,IAAA,YAAY;AAEpB;;;AAGG;AACH,IAAA,IAAI,GAAG,CAAI,MAA0B,KAAI;QACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,SAAS;AAEvD,QAAA,IAAI,CAAC,QAAQ;YAAE;QAEf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;AAEpD,QAAA,IAAI,CAAC;AACF,aAAA,WAAW;aACX,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1B,aAAA,SAAS,CAAC,CAAC,MAAM,KAAI;AACpB,YAAA,IAAI,MAAM,EAAE,QAAQ,YAAY,YAAY,EAAE;AAC5C,gBAAA,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AAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,8EAF1B,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,gBAAgB;AAC3B,iBAAA;;MAGY,UAAU,GAAG,CAAC,kBAAkB,EAAE,yBAAyB;;AEjKxE;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -32,10 +32,10 @@ class WattPaginatorIntlService {
32
32
  firstPage = 'First page';
33
33
  lastPage = 'Last page';
34
34
  of = 'of';
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattPaginatorIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
36
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattPaginatorIntlService, providedIn: 'root' });
35
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattPaginatorIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
36
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattPaginatorIntlService, providedIn: 'root' });
37
37
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattPaginatorIntlService, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattPaginatorIntlService, decorators: [{
39
39
  type: Injectable,
40
40
  args: [{ providedIn: 'root' }]
41
41
  }] });
@@ -65,11 +65,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
65
65
  class WattPaginatorComponent {
66
66
  intl = inject(WattPaginatorIntlService);
67
67
  matPaginatorIntl = inject(MatPaginatorIntl);
68
- length = input(0, ...(ngDevMode ? [{ debugName: "length" }] : []));
69
- pageSizeOptions = input([50, 100, 150, 200, 250], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : []));
70
- pageSize = input(50, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
71
- pageIndex = input(0, ...(ngDevMode ? [{ debugName: "pageIndex" }] : []));
72
- for = input(...(ngDevMode ? [undefined, { debugName: "for" }] : []));
68
+ length = input(0, ...(ngDevMode ? [{ debugName: "length" }] : /* istanbul ignore next */ []));
69
+ pageSizeOptions = input([50, 100, 150, 200, 250], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
70
+ pageSize = input(50, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
71
+ pageIndex = input(0, ...(ngDevMode ? [{ debugName: "pageIndex" }] : /* istanbul ignore next */ []));
72
+ for = input(...(ngDevMode ? [undefined, { debugName: "for" }] : /* istanbul ignore next */ []));
73
73
  changed = output();
74
74
  instance = viewChild.required(MatPaginator);
75
75
  changes = toSignal(this.intl.changes.pipe(
@@ -77,14 +77,14 @@ class WattPaginatorComponent {
77
77
  // Therefore it is not possible to just map to the intl service directly
78
78
  // as the intl service relies on mutation for updating values.
79
79
  map(() => ({ ...this.intl })), startWith(this.intl)), { requireSync: true });
80
- description = computed(() => this.changes().description, ...(ngDevMode ? [{ debugName: "description" }] : []));
80
+ description = computed(() => this.changes().description, ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
81
81
  updateDataSource = effect(() => {
82
82
  const dataSource = this.for();
83
83
  const instance = this.instance();
84
84
  if (!dataSource)
85
85
  return;
86
86
  dataSource.paginator = instance;
87
- }, ...(ngDevMode ? [{ debugName: "updateDataSource" }] : []));
87
+ }, ...(ngDevMode ? [{ debugName: "updateDataSource" }] : /* istanbul ignore next */ []));
88
88
  updateLabels = effect(() => {
89
89
  const changes = this.changes();
90
90
  this.matPaginatorIntl.itemsPerPageLabel = changes.itemsPerPage;
@@ -93,7 +93,7 @@ class WattPaginatorComponent {
93
93
  this.matPaginatorIntl.firstPageLabel = changes.firstPage;
94
94
  this.matPaginatorIntl.lastPageLabel = changes.lastPage;
95
95
  this.matPaginatorIntl.changes.next();
96
- }, ...(ngDevMode ? [{ debugName: "updateLabels" }] : []));
96
+ }, ...(ngDevMode ? [{ debugName: "updateLabels" }] : /* istanbul ignore next */ []));
97
97
  ngOnInit() {
98
98
  this.matPaginatorIntl.getRangeLabel = this.getRangeLabel;
99
99
  }
@@ -107,8 +107,8 @@ class WattPaginatorComponent {
107
107
  const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
108
108
  return `${startIndex + 1} – ${endIndex} ${this.intl.of} ${length}`;
109
109
  };
110
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: WattPaginatorComponent, isStandalone: true, selector: "watt-paginator", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "instance", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: `
110
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.5", type: WattPaginatorComponent, isStandalone: true, selector: "watt-paginator", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "instance", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: `
112
112
  <mat-paginator
113
113
  class="watt-paginator"
114
114
  (page)="changed.emit($event)"
@@ -121,7 +121,7 @@ class WattPaginatorComponent {
121
121
  />
122
122
  `, isInline: true, styles: [".cdk-overlay-pane div.mat-mdc-select-panel{--mat-select-panel-background-color: var(--watt-color-neutral-white);padding:0;font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}.mat-mdc-select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){--mat-option-selected-state-layer-color: var(--watt-color-neutral-grey-300);color:var(--watt-color-primary)}.mat-mdc-select-panel .mat-mdc-option.mdc-list-item:hover{--mat-option-hover-state-layer-color: var(--watt-color-neutral-grey-100)}watt-paginator{box-shadow:0 -1px 0 var(--watt-color-neutral-grey-300);z-index:100}watt-paginator .mat-mdc-paginator,watt-paginator .mat-mdc-paginator-page-size .mat-mdc-select-trigger{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-paginator .mat-mdc-paginator{--mat-option-hover-state-layer-color: var(--watt-color-neutral-grey-100)}watt-paginator .mat-mdc-paginator .mdc-notched-outline{--mat-form-field-outlined-outline-width: 0;--mat-form-field-outlined-focus-outline-width: 0}watt-paginator .mat-mdc-paginator .mat-mdc-paginator-page-size-select{width:80px}watt-paginator .mat-mdc-select-arrow-wrapper{color:var(--watt-color-primary)}watt-paginator .mat-mdc-select-arrow-wrapper .mat-mdc-select-arrow{width:18px}watt-paginator .mat-mdc-paginator-container{justify-content:center;padding:var(--watt-space-s) var(--watt-space-m)}watt-paginator .mat-mdc-paginator-range-actions{display:contents}watt-paginator .mat-mdc-paginator-range-label{margin:0 auto;-webkit-user-select:none;user-select:none}watt-paginator .mdc-icon-button{color:var(--watt-color-primary);--mat-icon-button-disabled-icon-color: var(--watt-color-neutral-grey-500);--mat-icon-button-icon-size: 28px;--mat-icon-button-state-layer-size: 28px;padding:0;margin-right:5px}watt-paginator .mat-mdc-select-value{padding-right:var(--watt-space-xs);text-align:right}watt-paginator .mat-mdc-select-arrow{color:var(--watt-color-primary)}watt-paginator .mat-mdc-form-field-flex{height:var(--watt-space-l);align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
123
123
  }
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: WattPaginatorComponent, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattPaginatorComponent, decorators: [{
125
125
  type: Component,
126
126
  args: [{ imports: [MatPaginatorModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'watt-paginator', template: `
127
127
  <mat-paginator
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-paginator.mjs","sources":["../../../libs/watt/package/paginator/watt-paginator-intl.service.ts","../../../libs/watt/package/paginator/watt-paginator.component.ts","../../../libs/watt/package/paginator/index.ts","../../../libs/watt/package/paginator/energinet-watt-paginator.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattPaginatorIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n description = 'Select page';\n itemsPerPage = 'Results per page';\n nextPage = 'Next page';\n previousPage = 'Previous page';\n firstPage = 'First page';\n lastPage = 'Last page';\n of = 'of';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n OnInit,\n ViewEncapsulation,\n viewChild,\n input,\n effect,\n output,\n computed,\n} from '@angular/core';\nimport {\n MatPaginator,\n MatPaginatorIntl,\n MatPaginatorModule,\n PageEvent,\n} from '@angular/material/paginator';\n\nimport { IWattTableDataSource } from '@energinet/watt/table';\nimport { WattPaginatorIntlService } from './watt-paginator-intl.service';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { map, startWith } from 'rxjs';\n\n/**\n * Usage:\n * `import { WattPaginatorComponent } from '@energinet/watt/paginator';`\n */\n@Component({\n imports: [MatPaginatorModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-paginator',\n styleUrls: ['./watt-paginator.component.scss'],\n template: `\n <mat-paginator\n class=\"watt-paginator\"\n (page)=\"changed.emit($event)\"\n [length]=\"length()\"\n [pageSize]=\"pageSize()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [pageIndex]=\"pageIndex()\"\n [showFirstLastButtons]=\"true\"\n [attr.aria-label]=\"description()\"\n />\n `,\n})\nexport class WattPaginatorComponent<T> implements OnInit {\n private intl = inject(WattPaginatorIntlService);\n private matPaginatorIntl = inject(MatPaginatorIntl);\n\n length = input(0);\n pageSizeOptions = input([50, 100, 150, 200, 250]);\n pageSize = input(50);\n pageIndex = input(0);\n for = input<IWattTableDataSource<T>>();\n changed = output<PageEvent>();\n instance = viewChild.required(MatPaginator);\n\n changes = toSignal(\n this.intl.changes.pipe(\n // Signals use referential equality to determine if a value has changed.\n // Therefore it is not possible to just map to the intl service directly\n // as the intl service relies on mutation for updating values.\n map(() => ({ ...this.intl })),\n startWith(this.intl)\n ),\n { requireSync: true }\n );\n\n description = computed(() => this.changes().description);\n\n updateDataSource = effect(() => {\n const dataSource = this.for();\n const instance = this.instance();\n if (!dataSource) return;\n dataSource.paginator = instance;\n });\n\n updateLabels = effect(() => {\n const changes = this.changes();\n this.matPaginatorIntl.itemsPerPageLabel = changes.itemsPerPage;\n this.matPaginatorIntl.nextPageLabel = changes.nextPage;\n this.matPaginatorIntl.previousPageLabel = changes.previousPage;\n this.matPaginatorIntl.firstPageLabel = changes.firstPage;\n this.matPaginatorIntl.lastPageLabel = changes.lastPage;\n this.matPaginatorIntl.changes.next();\n });\n\n ngOnInit() {\n this.matPaginatorIntl.getRangeLabel = this.getRangeLabel;\n }\n\n private getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length == 0 || pageSize == 0) {\n return `0 ${this.intl.of} ${length}`;\n }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex =\n startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\n\n return `${startIndex + 1} – ${endIndex} ${this.intl.of} ${length}`;\n };\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattPaginatorComponent } from './watt-paginator.component';\nexport { WattPaginatorIntlService } from './watt-paginator-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,wBAAwB,CAAA;AAC1B,IAAA,OAAO,GAAkB,IAAI,OAAO,EAAQ;IACrD,WAAW,GAAG,aAAa;IAC3B,YAAY,GAAG,kBAAkB;IACjC,QAAQ,GAAG,WAAW;IACtB,YAAY,GAAG,eAAe;IAC9B,SAAS,GAAG,YAAY;IACxB,QAAQ,GAAG,WAAW;IACtB,EAAE,GAAG,IAAI;uGARE,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAA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AeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-paginator.mjs","sources":["../../../libs/watt/package/paginator/watt-paginator-intl.service.ts","../../../libs/watt/package/paginator/watt-paginator.component.ts","../../../libs/watt/package/paginator/index.ts","../../../libs/watt/package/paginator/energinet-watt-paginator.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattPaginatorIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n description = 'Select page';\n itemsPerPage = 'Results per page';\n nextPage = 'Next page';\n previousPage = 'Previous page';\n firstPage = 'First page';\n lastPage = 'Last page';\n of = 'of';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n OnInit,\n ViewEncapsulation,\n viewChild,\n input,\n effect,\n output,\n computed,\n} from '@angular/core';\nimport {\n MatPaginator,\n MatPaginatorIntl,\n MatPaginatorModule,\n PageEvent,\n} from '@angular/material/paginator';\n\nimport { IWattTableDataSource } from '@energinet/watt/table';\nimport { WattPaginatorIntlService } from './watt-paginator-intl.service';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { map, startWith } from 'rxjs';\n\n/**\n * Usage:\n * `import { WattPaginatorComponent } from '@energinet/watt/paginator';`\n */\n@Component({\n imports: [MatPaginatorModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-paginator',\n styleUrls: ['./watt-paginator.component.scss'],\n template: `\n <mat-paginator\n class=\"watt-paginator\"\n (page)=\"changed.emit($event)\"\n [length]=\"length()\"\n [pageSize]=\"pageSize()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [pageIndex]=\"pageIndex()\"\n [showFirstLastButtons]=\"true\"\n [attr.aria-label]=\"description()\"\n />\n `,\n})\nexport class WattPaginatorComponent<T> implements OnInit {\n private intl = inject(WattPaginatorIntlService);\n private matPaginatorIntl = inject(MatPaginatorIntl);\n\n length = input(0);\n pageSizeOptions = input([50, 100, 150, 200, 250]);\n pageSize = input(50);\n pageIndex = input(0);\n for = input<IWattTableDataSource<T>>();\n changed = output<PageEvent>();\n instance = viewChild.required(MatPaginator);\n\n changes = toSignal(\n this.intl.changes.pipe(\n // Signals use referential equality to determine if a value has changed.\n // Therefore it is not possible to just map to the intl service directly\n // as the intl service relies on mutation for updating values.\n map(() => ({ ...this.intl })),\n startWith(this.intl)\n ),\n { requireSync: true }\n );\n\n description = computed(() => this.changes().description);\n\n updateDataSource = effect(() => {\n const dataSource = this.for();\n const instance = this.instance();\n if (!dataSource) return;\n dataSource.paginator = instance;\n });\n\n updateLabels = effect(() => {\n const changes = this.changes();\n this.matPaginatorIntl.itemsPerPageLabel = changes.itemsPerPage;\n this.matPaginatorIntl.nextPageLabel = changes.nextPage;\n this.matPaginatorIntl.previousPageLabel = changes.previousPage;\n this.matPaginatorIntl.firstPageLabel = changes.firstPage;\n this.matPaginatorIntl.lastPageLabel = changes.lastPage;\n this.matPaginatorIntl.changes.next();\n });\n\n ngOnInit() {\n this.matPaginatorIntl.getRangeLabel = this.getRangeLabel;\n }\n\n private getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length == 0 || pageSize == 0) {\n return `0 ${this.intl.of} ${length}`;\n }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex =\n startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\n\n return `${startIndex + 1} – ${endIndex} ${this.intl.of} ${length}`;\n };\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattPaginatorComponent } from './watt-paginator.component';\nexport { WattPaginatorIntlService } from './watt-paginator-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,wBAAwB,CAAA;AAC1B,IAAA,OAAO,GAAkB,IAAI,OAAO,EAAQ;IACrD,WAAW,GAAG,aAAa;IAC3B,YAAY,GAAG,kBAAkB;IACjC,QAAQ,GAAG,WAAW;IACtB,YAAY,GAAG,eAAe;IAC9B,SAAS,GAAG,YAAY;IACxB,QAAQ,GAAG,WAAW;IACtB,EAAE,GAAG,IAAI;uGARE,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBA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