@energinet/watt 4.3.19 → 4.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/fesm2022/energinet-watt-badge.mjs +3 -3
  2. package/fesm2022/energinet-watt-badge.mjs.map +1 -1
  3. package/fesm2022/energinet-watt-breadcrumbs.mjs +8 -8
  4. package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -1
  5. package/fesm2022/energinet-watt-button.mjs +3 -3
  6. package/fesm2022/energinet-watt-button.mjs.map +1 -1
  7. package/fesm2022/energinet-watt-card.mjs +6 -6
  8. package/fesm2022/energinet-watt-card.mjs.map +1 -1
  9. package/fesm2022/energinet-watt-checkbox.mjs +3 -3
  10. package/fesm2022/energinet-watt-checkbox.mjs.map +1 -1
  11. package/fesm2022/energinet-watt-chip.mjs +91 -27
  12. package/fesm2022/energinet-watt-chip.mjs.map +1 -1
  13. package/fesm2022/energinet-watt-clipboard.mjs +7 -7
  14. package/fesm2022/energinet-watt-clipboard.mjs.map +1 -1
  15. package/fesm2022/energinet-watt-code.mjs +6 -6
  16. package/fesm2022/energinet-watt-code.mjs.map +1 -1
  17. package/fesm2022/energinet-watt-core-breakpoints.mjs +3 -3
  18. package/fesm2022/energinet-watt-core-breakpoints.mjs.map +1 -1
  19. package/fesm2022/energinet-watt-core-color.mjs +3 -3
  20. package/fesm2022/energinet-watt-core-color.mjs.map +1 -1
  21. package/fesm2022/energinet-watt-core-date.mjs +6 -6
  22. package/fesm2022/energinet-watt-core-date.mjs.map +1 -1
  23. package/fesm2022/energinet-watt-data.mjs +12 -12
  24. package/fesm2022/energinet-watt-data.mjs.map +1 -1
  25. package/fesm2022/energinet-watt-datetime-field.mjs +3 -3
  26. package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -1
  27. package/fesm2022/energinet-watt-description-list.mjs +6 -6
  28. package/fesm2022/energinet-watt-description-list.mjs.map +1 -1
  29. package/fesm2022/energinet-watt-drawer.mjs +19 -19
  30. package/fesm2022/energinet-watt-drawer.mjs.map +1 -1
  31. package/fesm2022/energinet-watt-dropdown.mjs +14 -4
  32. package/fesm2022/energinet-watt-dropdown.mjs.map +1 -1
  33. package/fesm2022/energinet-watt-dropzone.mjs +14 -14
  34. package/fesm2022/energinet-watt-dropzone.mjs.map +1 -1
  35. package/fesm2022/energinet-watt-empty-state.mjs +18 -18
  36. package/fesm2022/energinet-watt-empty-state.mjs.map +1 -1
  37. package/fesm2022/energinet-watt-expandable-card.mjs +9 -9
  38. package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -1
  39. package/fesm2022/energinet-watt-field.mjs +15 -15
  40. package/fesm2022/energinet-watt-field.mjs.map +1 -1
  41. package/fesm2022/energinet-watt-file-field.mjs +3 -3
  42. package/fesm2022/energinet-watt-file-field.mjs.map +1 -1
  43. package/fesm2022/energinet-watt-heading.mjs +3 -3
  44. package/fesm2022/energinet-watt-heading.mjs.map +1 -1
  45. package/fesm2022/energinet-watt-icon-flags.mjs +30 -30
  46. package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -1
  47. package/fesm2022/energinet-watt-icon.mjs +5 -3
  48. package/fesm2022/energinet-watt-icon.mjs.map +1 -1
  49. package/fesm2022/energinet-watt-json-viewer.mjs +12 -15
  50. package/fesm2022/energinet-watt-json-viewer.mjs.map +1 -1
  51. package/fesm2022/energinet-watt-menu.mjs +12 -12
  52. package/fesm2022/energinet-watt-menu.mjs.map +1 -1
  53. package/fesm2022/energinet-watt-modal.mjs +11 -11
  54. package/fesm2022/energinet-watt-modal.mjs.map +1 -1
  55. package/fesm2022/energinet-watt-paginator.mjs +6 -6
  56. package/fesm2022/energinet-watt-paginator.mjs.map +1 -1
  57. package/fesm2022/energinet-watt-phone-field.mjs +6 -6
  58. package/fesm2022/energinet-watt-phone-field.mjs.map +1 -1
  59. package/fesm2022/energinet-watt-picker-__shared.mjs +13 -17
  60. package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -1
  61. package/fesm2022/energinet-watt-picker-datepicker.mjs +7 -7
  62. package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -1
  63. package/fesm2022/energinet-watt-picker-timepicker.mjs +3 -3
  64. package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -1
  65. package/fesm2022/energinet-watt-progress-tracker.mjs +6 -6
  66. package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -1
  67. package/fesm2022/energinet-watt-query-params.mjs +3 -3
  68. package/fesm2022/energinet-watt-query-params.mjs.map +1 -1
  69. package/fesm2022/energinet-watt-radio.mjs +8 -8
  70. package/fesm2022/energinet-watt-radio.mjs.map +1 -1
  71. package/fesm2022/energinet-watt-search.mjs +6 -6
  72. package/fesm2022/energinet-watt-search.mjs.map +1 -1
  73. package/fesm2022/energinet-watt-segmented-buttons.mjs +6 -6
  74. package/fesm2022/energinet-watt-segmented-buttons.mjs.map +1 -1
  75. package/fesm2022/energinet-watt-separator.mjs +3 -3
  76. package/fesm2022/energinet-watt-separator.mjs.map +1 -1
  77. package/fesm2022/energinet-watt-shell.mjs +13 -13
  78. package/fesm2022/energinet-watt-shell.mjs.map +1 -1
  79. package/fesm2022/energinet-watt-slide-toggle.mjs +3 -3
  80. package/fesm2022/energinet-watt-slide-toggle.mjs.map +1 -1
  81. package/fesm2022/energinet-watt-slider.mjs +3 -3
  82. package/fesm2022/energinet-watt-slider.mjs.map +1 -1
  83. package/fesm2022/energinet-watt-spinner.mjs +3 -3
  84. package/fesm2022/energinet-watt-spinner.mjs.map +1 -1
  85. package/fesm2022/energinet-watt-stepper.mjs +9 -9
  86. package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
  87. package/fesm2022/energinet-watt-table.mjs +18 -27
  88. package/fesm2022/energinet-watt-table.mjs.map +1 -1
  89. package/fesm2022/energinet-watt-tabs.mjs +15 -15
  90. package/fesm2022/energinet-watt-tabs.mjs.map +1 -1
  91. package/fesm2022/energinet-watt-text-field.mjs +3 -3
  92. package/fesm2022/energinet-watt-text-field.mjs.map +1 -1
  93. package/fesm2022/energinet-watt-textarea-field.mjs +38 -23
  94. package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -1
  95. package/fesm2022/energinet-watt-toast.mjs +6 -6
  96. package/fesm2022/energinet-watt-toast.mjs.map +1 -1
  97. package/fesm2022/energinet-watt-tooltip.mjs +9 -9
  98. package/fesm2022/energinet-watt-tooltip.mjs.map +1 -1
  99. package/fesm2022/energinet-watt-utils-css.mjs +3 -3
  100. package/fesm2022/energinet-watt-utils-css.mjs.map +1 -1
  101. package/fesm2022/energinet-watt-utils-intersection-observer.mjs +3 -3
  102. package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +1 -1
  103. package/fesm2022/energinet-watt-utils-resize-observer.mjs +6 -6
  104. package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -1
  105. package/fesm2022/energinet-watt-validation-message.mjs +3 -3
  106. package/fesm2022/energinet-watt-validation-message.mjs.map +1 -1
  107. package/fesm2022/energinet-watt-vater.mjs +30 -30
  108. package/fesm2022/energinet-watt-vater.mjs.map +1 -1
  109. package/fesm2022/energinet-watt-year-field.mjs +4 -4
  110. package/fesm2022/energinet-watt-year-field.mjs.map +1 -1
  111. package/fesm2022/energinet-watt-yearmonth-field.mjs +4 -4
  112. package/fesm2022/energinet-watt-yearmonth-field.mjs.map +1 -1
  113. package/package.json +100 -99
  114. package/{button/index.d.ts → types/energinet-watt-button.d.ts} +1 -1
  115. package/{chip/index.d.ts → types/energinet-watt-chip.d.ts} +10 -2
  116. package/{data/index.d.ts → types/energinet-watt-data.d.ts} +1 -1
  117. package/{dropdown/index.d.ts → types/energinet-watt-dropdown.d.ts} +1 -0
  118. package/{empty-state/index.d.ts → types/energinet-watt-empty-state.d.ts} +1 -1
  119. package/{icon/index.d.ts → types/energinet-watt-icon.d.ts} +3 -1
  120. package/{modal/index.d.ts → types/energinet-watt-modal.d.ts} +1 -1
  121. package/{text-field/index.d.ts → types/energinet-watt-text-field.d.ts} +1 -1
  122. package/{textarea-field/index.d.ts → types/energinet-watt-textarea-field.d.ts} +1 -1
  123. package/{validation-message/index.d.ts → types/energinet-watt-validation-message.d.ts} +1 -1
  124. /package/{badge/index.d.ts → types/energinet-watt-badge.d.ts} +0 -0
  125. /package/{breadcrumbs/index.d.ts → types/energinet-watt-breadcrumbs.d.ts} +0 -0
  126. /package/{card/index.d.ts → types/energinet-watt-card.d.ts} +0 -0
  127. /package/{checkbox/index.d.ts → types/energinet-watt-checkbox.d.ts} +0 -0
  128. /package/{clipboard/index.d.ts → types/energinet-watt-clipboard.d.ts} +0 -0
  129. /package/{code/index.d.ts → types/energinet-watt-code.d.ts} +0 -0
  130. /package/{core/breakpoints/index.d.ts → types/energinet-watt-core-breakpoints.d.ts} +0 -0
  131. /package/{core/color/index.d.ts → types/energinet-watt-core-color.d.ts} +0 -0
  132. /package/{core/date/index.d.ts → types/energinet-watt-core-date.d.ts} +0 -0
  133. /package/{datetime-field/index.d.ts → types/energinet-watt-datetime-field.d.ts} +0 -0
  134. /package/{description-list/index.d.ts → types/energinet-watt-description-list.d.ts} +0 -0
  135. /package/{drawer/index.d.ts → types/energinet-watt-drawer.d.ts} +0 -0
  136. /package/{dropzone/index.d.ts → types/energinet-watt-dropzone.d.ts} +0 -0
  137. /package/{expandable-card/index.d.ts → types/energinet-watt-expandable-card.d.ts} +0 -0
  138. /package/{field/index.d.ts → types/energinet-watt-field.d.ts} +0 -0
  139. /package/{file-field/index.d.ts → types/energinet-watt-file-field.d.ts} +0 -0
  140. /package/{heading/index.d.ts → types/energinet-watt-heading.d.ts} +0 -0
  141. /package/{icon/flags/index.d.ts → types/energinet-watt-icon-flags.d.ts} +0 -0
  142. /package/{json-viewer/index.d.ts → types/energinet-watt-json-viewer.d.ts} +0 -0
  143. /package/{menu/index.d.ts → types/energinet-watt-menu.d.ts} +0 -0
  144. /package/{paginator/index.d.ts → types/energinet-watt-paginator.d.ts} +0 -0
  145. /package/{phone-field/index.d.ts → types/energinet-watt-phone-field.d.ts} +0 -0
  146. /package/{picker/__shared/index.d.ts → types/energinet-watt-picker-__shared.d.ts} +0 -0
  147. /package/{picker/datepicker/index.d.ts → types/energinet-watt-picker-datepicker.d.ts} +0 -0
  148. /package/{picker/timepicker/index.d.ts → types/energinet-watt-picker-timepicker.d.ts} +0 -0
  149. /package/{progress-tracker/index.d.ts → types/energinet-watt-progress-tracker.d.ts} +0 -0
  150. /package/{query-params/index.d.ts → types/energinet-watt-query-params.d.ts} +0 -0
  151. /package/{radio/index.d.ts → types/energinet-watt-radio.d.ts} +0 -0
  152. /package/{search/index.d.ts → types/energinet-watt-search.d.ts} +0 -0
  153. /package/{segmented-buttons/index.d.ts → types/energinet-watt-segmented-buttons.d.ts} +0 -0
  154. /package/{separator/index.d.ts → types/energinet-watt-separator.d.ts} +0 -0
  155. /package/{shell/index.d.ts → types/energinet-watt-shell.d.ts} +0 -0
  156. /package/{slide-toggle/index.d.ts → types/energinet-watt-slide-toggle.d.ts} +0 -0
  157. /package/{slider/index.d.ts → types/energinet-watt-slider.d.ts} +0 -0
  158. /package/{spinner/index.d.ts → types/energinet-watt-spinner.d.ts} +0 -0
  159. /package/{stepper/index.d.ts → types/energinet-watt-stepper.d.ts} +0 -0
  160. /package/{table/index.d.ts → types/energinet-watt-table.d.ts} +0 -0
  161. /package/{tabs/index.d.ts → types/energinet-watt-tabs.d.ts} +0 -0
  162. /package/{toast/index.d.ts → types/energinet-watt-toast.d.ts} +0 -0
  163. /package/{tooltip/index.d.ts → types/energinet-watt-tooltip.d.ts} +0 -0
  164. /package/{utils/css/index.d.ts → types/energinet-watt-utils-css.d.ts} +0 -0
  165. /package/{utils/intersection-observer/index.d.ts → types/energinet-watt-utils-intersection-observer.d.ts} +0 -0
  166. /package/{utils/resize-observer/index.d.ts → types/energinet-watt-utils-resize-observer.d.ts} +0 -0
  167. /package/{validators/index.d.ts → types/energinet-watt-validators.d.ts} +0 -0
  168. /package/{vater/index.d.ts → types/energinet-watt-vater.d.ts} +0 -0
  169. /package/{year-field/index.d.ts → types/energinet-watt-year-field.d.ts} +0 -0
  170. /package/{yearmonth-field/index.d.ts → types/energinet-watt-yearmonth-field.d.ts} +0 -0
  171. /package/{index.d.ts → types/energinet-watt.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-toast.mjs","sources":["../../../libs/watt/package/toast/watt-toast.component.ts","../../../libs/watt/package/toast/watt-toast.component.html","../../../libs/watt/package/toast/watt-toast.service.ts","../../../libs/watt/package/toast/index.ts","../../../libs/watt/package/toast/energinet-watt-toast.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 {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { MatSnackBarModule, MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\nimport { fromEvent, repeat, Subscription, takeUntil, tap, timer } from 'rxjs';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nexport type WattToastType = 'success' | 'info' | 'warning' | 'danger' | 'loading';\n\nexport interface WattToastConfig {\n duration?: number;\n type?: WattToastType;\n message: string;\n action?: (wattToastRef: WattToastRef) => void;\n actionLabel?: string;\n}\n\nexport type WattToastRef = MatSnackBarRef<WattToastComponent>;\n\n/**\n * Usage:\n * `import { WattToastService } from '@energinet/watt/toast';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-toast',\n styleUrls: ['./watt-toast.component.scss'],\n templateUrl: './watt-toast.component.html',\n imports: [MatSnackBarModule, WattButtonComponent, WattIconComponent, WattSpinnerComponent],\n})\nexport class WattToastComponent {\n private _config = inject(MAT_SNACK_BAR_DATA);\n private cd = inject(ChangeDetectorRef);\n private _matSnackBarRef = inject<MatSnackBarRef<WattToastComponent>>(MatSnackBarRef);\n private elementRef = inject(ElementRef);\n\n @HostBinding('class')\n get class() {\n this.cd.detectChanges(); // Make sure changes to the config will be detected\n return this.config.type ? `watt-toast watt-toast--${this.config.type}` : 'watt-toast';\n }\n\n /**\n * @ignore\n */\n config: WattToastConfig;\n\n /**\n * @ignore\n */\n matSnackBarRef: WattToastRef;\n\n /**\n * @ignore\n */\n private dissmissToastSubscription?: Subscription;\n\n constructor() {\n this.config = this._config;\n this.matSnackBarRef = this._matSnackBarRef;\n this.initDuration(this.config.duration);\n }\n\n /**\n * @ignore\n */\n onClose(): void {\n if (!this.matSnackBarRef) return;\n this.matSnackBarRef.dismiss();\n this.dissmissToastSubscription?.unsubscribe();\n }\n\n update(config: Partial<WattToastConfig>) {\n this.config = { ...this.config, ...config };\n if (this.dissmissToastSubscription) {\n this.dissmissToastSubscription.unsubscribe();\n }\n this.initDuration();\n this.cd.detectChanges();\n }\n\n /**\n * @ignore\n * Ensure the toast won't get dismissed when the user hovers over it.\n */\n private initDuration(duration = 5000): void {\n // When the type is loading, the developer is responsible for dismissing the toast manually.\n if (this.config.type === 'loading') return;\n\n const mouseEnter$ = fromEvent(this.elementRef.nativeElement, 'mouseenter');\n const mouseLeave$ = fromEvent(this.elementRef.nativeElement, 'mouseleave');\n\n this.dissmissToastSubscription = timer(duration)\n .pipe(\n tap(() => this.onClose()),\n takeUntil(mouseEnter$),\n repeat({ delay: () => mouseLeave$ })\n )\n .subscribe();\n }\n}\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<span>\n @if (config.type === \"loading\") {\n <watt-spinner [diameter]=\"24\" />\n }\n\n @if (config.type && config.type !== \"loading\") {\n <watt-icon [name]=\"config.type\" />\n }\n <p>{{ config.message }}</p>\n</span>\n<span class=\"toast__actions\">\n @if (config.action && config.actionLabel) {\n <watt-button variant=\"text\" (click)=\"config.action(matSnackBarRef)\">{{\n config.actionLabel\n }}</watt-button>\n }\n\n @if (config.type !== \"loading\") {\n <watt-button data-testid=\"dismiss\" variant=\"icon\" icon=\"close\" (click)=\"onClose()\" />\n }\n</span>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable, inject } from '@angular/core';\nimport { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';\n\nimport { WattToastComponent, WattToastConfig } from './watt-toast.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattToastService {\n private readonly _snackBar = inject(MatSnackBar);\n private ref?: MatSnackBarRef<WattToastComponent>;\n\n open(config: WattToastConfig): MatSnackBarRef<WattToastComponent> {\n this.ref = this._snackBar.openFromComponent(WattToastComponent, {\n data: config,\n });\n return this.ref;\n }\n\n update(config: Partial<WattToastConfig>): void {\n if (!this.ref) return;\n this.ref.instance.update(config);\n }\n\n dismiss() {\n if (!this.ref) return;\n this.ref.dismiss();\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 { WattToastComponent, WattToastType } from './watt-toast.component';\nexport { WattToastService } from './watt-toast.service';\nexport type { WattToastRef } from './watt-toast.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AA6BA;;;AAGG;MASU,kBAAkB,CAAA;AACrB,IAAA,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACpC,IAAA,EAAE,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9B,IAAA,eAAe,GAAG,MAAM,CAAqC,cAAc,CAAC;AAC5E,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC,IAAA,IACI,KAAK,GAAA;AACP,QAAA,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;AACxB,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CAAA,uBAAA,EAA0B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA,CAAE,GAAG,YAAY;IACvF;AAEA;;AAEG;AACH,IAAA,MAAM;AAEN;;AAEG;AACH,IAAA,cAAc;AAEd;;AAEG;AACK,IAAA,yBAAyB;AAEjC,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO;AAC1B,QAAA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AA,CAAA,EAAA;;sBAQzF,WAAW;uBAAC,OAAO;;;AEhEtB;AACA;;;;;;;;;;;;;;;AAeG;AACH;MASa,gBAAgB,CAAA;AACV,IAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;AACxC,IAAA,GAAG;AAEX,IAAA,IAAI,CAAC,MAAuB,EAAA;QAC1B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,kBAAkB,EAAE;AAC9D,YAAA,IAAI,EAAE,MAAM;AACb,SAAA,CAAC;QACF,OAAO,IAAI,CAAC,GAAG;IACjB;AAEA,IAAA,MAAM,CAAC,MAAgC,EAAA;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE;QACf,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAClC;IAEA,OAAO,GAAA;QACL,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE;AACf,QAAA,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;IACpB;wGAnBW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-toast.mjs","sources":["../../../libs/watt/package/toast/watt-toast.component.ts","../../../libs/watt/package/toast/watt-toast.component.html","../../../libs/watt/package/toast/watt-toast.service.ts","../../../libs/watt/package/toast/index.ts","../../../libs/watt/package/toast/energinet-watt-toast.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 {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { MatSnackBarModule, MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\nimport { fromEvent, repeat, Subscription, takeUntil, tap, timer } from 'rxjs';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nexport type WattToastType = 'success' | 'info' | 'warning' | 'danger' | 'loading';\n\nexport interface WattToastConfig {\n duration?: number;\n type?: WattToastType;\n message: string;\n action?: (wattToastRef: WattToastRef) => void;\n actionLabel?: string;\n}\n\nexport type WattToastRef = MatSnackBarRef<WattToastComponent>;\n\n/**\n * Usage:\n * `import { WattToastService } from '@energinet/watt/toast';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-toast',\n styleUrls: ['./watt-toast.component.scss'],\n templateUrl: './watt-toast.component.html',\n imports: [MatSnackBarModule, WattButtonComponent, WattIconComponent, WattSpinnerComponent],\n})\nexport class WattToastComponent {\n private _config = inject(MAT_SNACK_BAR_DATA);\n private cd = inject(ChangeDetectorRef);\n private _matSnackBarRef = inject<MatSnackBarRef<WattToastComponent>>(MatSnackBarRef);\n private elementRef = inject(ElementRef);\n\n @HostBinding('class')\n get class() {\n this.cd.detectChanges(); // Make sure changes to the config will be detected\n return this.config.type ? `watt-toast watt-toast--${this.config.type}` : 'watt-toast';\n }\n\n /**\n * @ignore\n */\n config: WattToastConfig;\n\n /**\n * @ignore\n */\n matSnackBarRef: WattToastRef;\n\n /**\n * @ignore\n */\n private dissmissToastSubscription?: Subscription;\n\n constructor() {\n this.config = this._config;\n this.matSnackBarRef = this._matSnackBarRef;\n this.initDuration(this.config.duration);\n }\n\n /**\n * @ignore\n */\n onClose(): void {\n if (!this.matSnackBarRef) return;\n this.matSnackBarRef.dismiss();\n this.dissmissToastSubscription?.unsubscribe();\n }\n\n update(config: Partial<WattToastConfig>) {\n this.config = { ...this.config, ...config };\n if (this.dissmissToastSubscription) {\n this.dissmissToastSubscription.unsubscribe();\n }\n this.initDuration();\n this.cd.detectChanges();\n }\n\n /**\n * @ignore\n * Ensure the toast won't get dismissed when the user hovers over it.\n */\n private initDuration(duration = 5000): void {\n // When the type is loading, the developer is responsible for dismissing the toast manually.\n if (this.config.type === 'loading') return;\n\n const mouseEnter$ = fromEvent(this.elementRef.nativeElement, 'mouseenter');\n const mouseLeave$ = fromEvent(this.elementRef.nativeElement, 'mouseleave');\n\n this.dissmissToastSubscription = timer(duration)\n .pipe(\n tap(() => this.onClose()),\n takeUntil(mouseEnter$),\n repeat({ delay: () => mouseLeave$ })\n )\n .subscribe();\n }\n}\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<span>\n @if (config.type === \"loading\") {\n <watt-spinner [diameter]=\"24\" />\n }\n\n @if (config.type && config.type !== \"loading\") {\n <watt-icon [name]=\"config.type\" />\n }\n <p>{{ config.message }}</p>\n</span>\n<span class=\"toast__actions\">\n @if (config.action && config.actionLabel) {\n <watt-button variant=\"text\" (click)=\"config.action(matSnackBarRef)\">{{\n config.actionLabel\n }}</watt-button>\n }\n\n @if (config.type !== \"loading\") {\n <watt-button data-testid=\"dismiss\" variant=\"icon\" icon=\"close\" (click)=\"onClose()\" />\n }\n</span>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable, inject } from '@angular/core';\nimport { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';\n\nimport { WattToastComponent, WattToastConfig } from './watt-toast.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattToastService {\n private readonly _snackBar = inject(MatSnackBar);\n private ref?: MatSnackBarRef<WattToastComponent>;\n\n open(config: WattToastConfig): MatSnackBarRef<WattToastComponent> {\n this.ref = this._snackBar.openFromComponent(WattToastComponent, {\n data: config,\n });\n return this.ref;\n }\n\n update(config: Partial<WattToastConfig>): void {\n if (!this.ref) return;\n this.ref.instance.update(config);\n }\n\n dismiss() {\n if (!this.ref) return;\n this.ref.dismiss();\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 { WattToastComponent, WattToastType } from './watt-toast.component';\nexport { WattToastService } from './watt-toast.service';\nexport type { WattToastRef } from './watt-toast.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AA6BA;;;AAGG;MASU,kBAAkB,CAAA;AACrB,IAAA,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACpC,IAAA,EAAE,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9B,IAAA,eAAe,GAAG,MAAM,CAAqC,cAAc,CAAC;AAC5E,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC,IAAA,IACI,KAAK,GAAA;AACP,QAAA,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;AACxB,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CAAA,uBAAA,EAA0B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA,CAAE,GAAG,YAAY;IACvF;AAEA;;AAEG;AACH,IAAA,MAAM;AAEN;;AAEG;AACH,IAAA,cAAc;AAEd;;AAEG;AACK,IAAA,yBAAyB;AAEjC,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO;AAC1B,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,eAAe;QAC1C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IACzC;AAEA;;AAEG;IACH,OAAO,GAAA;QACL,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE;AAC1B,QAAA,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;AAC7B,QAAA,IAAI,CAAC,yBAAyB,EAA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AC,kBAAkB,EAAE;AAC9D,YAAA,IAAI,EAAE,MAAM;AACb,SAAA,CAAC;QACF,OAAO,IAAI,CAAC,GAAG;IACjB;AAEA,IAAA,MAAM,CAAC,MAAgC,EAAA;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE;QACf,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAClC;IAEA,OAAO,GAAA;QACL,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE;AACf,QAAA,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;IACpB;uGAnBW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -92,13 +92,13 @@ class WattTooltipComponent {
92
92
  platformSupportsMouseEvents() {
93
93
  return !this.platform.IOS && !this.platform.ANDROID;
94
94
  }
95
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
96
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: WattTooltipComponent, isStandalone: true, selector: "watt-tooltip", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "id": "id", "attr.role": "\"tooltip\"", "class": "hostClass()" } }, ngImport: i0, template: `
95
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
96
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: WattTooltipComponent, isStandalone: true, selector: "watt-tooltip", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "id": "id", "attr.role": "\"tooltip\"", "class": "hostClass()" } }, ngImport: i0, template: `
97
97
  {{ text() }}
98
98
  <div #arrow class="arrow"></div>
99
99
  `, isInline: true, styles: [":host{position:absolute;left:0;pointer-events:none;z-index:1000;display:inline-block;line-height:18px;border-radius:6px;padding:var(--watt-space-xs) var(--watt-space-s);font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;white-space:pre-wrap;opacity:0;transition:opacity .3s ease-in-out}:host.tooltip-dark{background:var(--watt-color-primary-dark);color:var(--watt-color-primary-dark-contrast)}:host.tooltip-light{background:var(--watt-color-neutral-white);color:var(--watt-color-primary-light-contrast)}:host.show{opacity:1}:host[data-popper-placement^=top]{inset-block-end:6px!important}:host[data-popper-placement^=bottom]{inset-block-start:6px!important}:host[data-popper-placement^=bottom]>.arrow{top:-4px}:host[data-popper-placement^=left]{inset-inline-end:6px!important}:host[data-popper-placement^=left]>.arrow{right:-4px}:host[data-popper-placement^=right]{inset-inline-start:6px!important}:host[data-popper-placement^=right]>.arrow{left:-4px}:host[data-popper-placement=left]>.arrow,:host[data-popper-placement=right]>.arrow{top:calc(50% - 4px)}:host[data-popper-placement=top]>.arrow,:host[data-popper-placement=bottom]>.arrow{left:calc(50% - 4px)!important}:host[data-popper-placement=top-end]>.arrow,:host[data-popper-placement=bottom-end]>.arrow{left:10px!important}:host[data-popper-placement=top-start]>.arrow,:host[data-popper-placement=bottom-start]>.arrow{left:calc(100% - 18px)}.arrow,.arrow:before{position:absolute;width:8px;height:8px;background:inherit}.arrow{visibility:hidden}.arrow:before{visibility:visible;content:\"\";transform:rotate(45deg)}\n"] });
100
100
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipComponent, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattTooltipComponent, decorators: [{
102
102
  type: Component,
103
103
  args: [{ template: `
104
104
  {{ text() }}
@@ -129,9 +129,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
129
129
  */
130
130
  //#endregion
131
131
  class WattTooltipDirective {
132
- text = input('', ...(ngDevMode ? [{ debugName: "text", alias: 'wattTooltip' }] : [{ alias: 'wattTooltip' }]));
133
- position = input('top', ...(ngDevMode ? [{ debugName: "position", alias: 'wattTooltipPosition' }] : [{ alias: 'wattTooltipPosition' }]));
134
- variant = input('dark', ...(ngDevMode ? [{ debugName: "variant", alias: 'wattTooltipVariant' }] : [{ alias: 'wattTooltipVariant' }]));
132
+ text = input('', { ...(ngDevMode ? { debugName: "text" } : {}), alias: 'wattTooltip' });
133
+ position = input('top', { ...(ngDevMode ? { debugName: "position" } : {}), alias: 'wattTooltipPosition' });
134
+ variant = input('dark', { ...(ngDevMode ? { debugName: "variant" } : {}), alias: 'wattTooltipVariant' });
135
135
  element = inject(ElementRef).nativeElement;
136
136
  viewContainerRef = inject(ViewContainerRef);
137
137
  destroyRef = inject(DestroyRef);
@@ -163,10 +163,10 @@ class WattTooltipDirective {
163
163
  this.element.setAttribute('aria-describedby', instance.id);
164
164
  return tooltipComponent;
165
165
  }
166
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
167
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: WattTooltipDirective, isStandalone: true, selector: "[wattTooltip]", inputs: { text: { classPropertyName: "text", publicName: "wattTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "wattTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "wattTooltipVariant", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["wattTooltip"], ngImport: i0 });
166
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
167
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: WattTooltipDirective, isStandalone: true, selector: "[wattTooltip]", inputs: { text: { classPropertyName: "text", publicName: "wattTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "wattTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "wattTooltipVariant", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["wattTooltip"], ngImport: i0 });
168
168
  }
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipDirective, decorators: [{
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattTooltipDirective, decorators: [{
170
170
  type: Directive,
171
171
  args: [{
172
172
  selector: '[wattTooltip]',
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-tooltip.mjs","sources":["../../../libs/watt/package/tooltip/watt-tooltip.component.ts","../../../libs/watt/package/tooltip/watt-tooltip.directive.ts","../../../libs/watt/package/tooltip/index.ts","../../../libs/watt/package/tooltip/energinet-watt-tooltip.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 {\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n Renderer2,\n} from '@angular/core';\nimport { createPopper, Instance } from '@popperjs/core';\nimport { Platform } from '@angular/cdk/platform';\n\nimport { wattTooltipPosition, wattTooltipVariant } from './watt-tooltip.directive';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\ntype unlistenerFunction = () => void;\n\n@Component({\n template: `\n {{ text() }}\n <div #arrow class=\"arrow\"></div>\n `,\n selector: 'watt-tooltip',\n styleUrls: ['./watt-tooltip.component.scss'],\n host: {\n '[id]': 'id',\n '[attr.role]': '\"tooltip\"',\n '[class]': 'hostClass()',\n },\n})\nexport class WattTooltipComponent {\n static nextId = 0;\n\n text = input.required<string>();\n target = input.required<HTMLElement>();\n position = input.required<wattTooltipPosition>();\n variant = input.required<wattTooltipVariant>();\n\n readonly id = `watt-tooltip-${WattTooltipComponent.nextId++}`; // used by aria-describedby\n hostClass = computed(() => `tooltip-${this.variant()}`);\n\n private element: HTMLElement = inject(ElementRef).nativeElement;\n private platform = inject(Platform);\n private renderer: Renderer2 = inject(Renderer2);\n private focusMonitor: FocusMonitor = inject(FocusMonitor);\n private destroyRef = inject(DestroyRef);\n\n private listeners: unlistenerFunction[] = [];\n private showClass = 'show';\n private popper: Instance | null = null;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.popper?.destroy();\n this.listeners.forEach((listener) => listener());\n });\n\n effect(() => {\n this.setupEventListeners();\n\n this.focusMonitor\n .monitor(this.target(), true)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((origin) => {\n if (!origin) {\n this.hide();\n } else if (origin === 'keyboard') {\n this.show();\n }\n });\n });\n }\n\n private setupEventListeners(): void {\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (this.platformSupportsMouseEvents()) {\n const mouseEnter = this.renderer.listen(this.target(), 'mouseenter', this.show.bind(this));\n const mouseLeave = this.renderer.listen(this.target(), 'mouseleave', this.hide.bind(this));\n const wheel = this.renderer.listen(this.target(), 'wheel', this.hide.bind(this));\n this.listeners.push(mouseEnter, mouseLeave, wheel);\n } else {\n const touchStart = this.renderer.listen(this.target(), 'touchstart', this.show.bind(this));\n const touchEnd = this.renderer.listen(this.target(), 'touchend', this.hide.bind(this));\n const touchCancel = this.renderer.listen(this.target(), 'touchcancel', this.hide.bind(this));\n this.listeners.push(touchStart, touchEnd, touchCancel);\n }\n }\n\n private show(): void {\n if (!this.popper) {\n this.popper = createPopper(this.target(), this.element, {\n placement: this.position(),\n });\n } else {\n this.popper.forceUpdate();\n }\n this.renderer.addClass(this.element, this.showClass);\n }\n\n private hide(): void {\n this.renderer.removeClass(this.element, this.showClass);\n }\n\n private platformSupportsMouseEvents() {\n return !this.platform.IOS && !this.platform.ANDROID;\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 computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { WattTooltipComponent } from './watt-tooltip.component';\n\nexport type wattTooltipPosition =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left';\n\nexport type wattTooltipVariant = 'dark' | 'light';\n\n@Directive({\n selector: '[wattTooltip]',\n exportAs: 'wattTooltip',\n})\nexport class WattTooltipDirective {\n readonly text = input<string>('', { alias: 'wattTooltip' });\n readonly position = input<wattTooltipPosition>('top', { alias: 'wattTooltipPosition' });\n readonly variant = input<wattTooltipVariant>('dark', { alias: 'wattTooltipVariant' });\n\n private readonly element = inject(ElementRef).nativeElement;\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n private tooltip = computed(() => this.createTooltipComponent());\n\n constructor() {\n // Setup effect to manage tooltip component lifecycle\n effect(() => {\n // Access the tooltip computed to create/update it when inputs change\n const tooltipComponent = this.tooltip();\n\n // Cleanup on destroy\n this.destroyRef.onDestroy(() => {\n tooltipComponent?.destroy();\n this.element.removeAttribute('aria-describedby');\n });\n });\n }\n\n private createTooltipComponent() {\n if (!this.text()) return null;\n\n // Create the component\n const tooltipComponent = this.viewContainerRef.createComponent(WattTooltipComponent);\n\n // Get the component instance\n const instance = tooltipComponent.instance;\n\n // Set up bindings\n tooltipComponent.setInput('text', this.text());\n tooltipComponent.setInput('target', this.element);\n tooltipComponent.setInput('position', this.position());\n tooltipComponent.setInput('variant', this.variant());\n\n this.element.setAttribute('aria-describedby', instance.id);\n\n return tooltipComponent;\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 {\n WattTooltipDirective,\n wattTooltipPosition,\n wattTooltipVariant,\n} from './watt-tooltip.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAiCa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,MAAM,GAAG,CAAC;AAEjB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU;AAC/B,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAe;AACtC,IAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,mDAAuB;AAChD,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAsB;IAErC,EAAE,GAAG,gBAAgB,oBAAoB,CAAC,MAAM,EAAE,CAAA,CAAE,CAAC;AAC9D,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAA,QAAA,EAAW,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,qDAAC;AAE/C,IAAA,OAAO,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;AACvD,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,QAAQ,GAAc,MAAM,CAAC,SAAS,CAAC;AACvC,IAAA,YAAY,GAAiB,MAAM,CAAC,YAAY,CAAC;AACjD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAE/B,SAAS,GAAyB,EAAE;IACpC,SAAS,GAAG,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EAAA,UAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,aAAa;AACxB,iBAAA;;;AC9CD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-tooltip.mjs","sources":["../../../libs/watt/package/tooltip/watt-tooltip.component.ts","../../../libs/watt/package/tooltip/watt-tooltip.directive.ts","../../../libs/watt/package/tooltip/index.ts","../../../libs/watt/package/tooltip/energinet-watt-tooltip.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 {\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n Renderer2,\n} from '@angular/core';\nimport { createPopper, Instance } from '@popperjs/core';\nimport { Platform } from '@angular/cdk/platform';\n\nimport { wattTooltipPosition, wattTooltipVariant } from './watt-tooltip.directive';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\ntype unlistenerFunction = () => void;\n\n@Component({\n template: `\n {{ text() }}\n <div #arrow class=\"arrow\"></div>\n `,\n selector: 'watt-tooltip',\n styleUrls: ['./watt-tooltip.component.scss'],\n host: {\n '[id]': 'id',\n '[attr.role]': '\"tooltip\"',\n '[class]': 'hostClass()',\n },\n})\nexport class WattTooltipComponent {\n static nextId = 0;\n\n text = input.required<string>();\n target = input.required<HTMLElement>();\n position = input.required<wattTooltipPosition>();\n variant = input.required<wattTooltipVariant>();\n\n readonly id = `watt-tooltip-${WattTooltipComponent.nextId++}`; // used by aria-describedby\n hostClass = computed(() => `tooltip-${this.variant()}`);\n\n private element: HTMLElement = inject(ElementRef).nativeElement;\n private platform = inject(Platform);\n private renderer: Renderer2 = inject(Renderer2);\n private focusMonitor: FocusMonitor = inject(FocusMonitor);\n private destroyRef = inject(DestroyRef);\n\n private listeners: unlistenerFunction[] = [];\n private showClass = 'show';\n private popper: Instance | null = null;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.popper?.destroy();\n this.listeners.forEach((listener) => listener());\n });\n\n effect(() => {\n this.setupEventListeners();\n\n this.focusMonitor\n .monitor(this.target(), true)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((origin) => {\n if (!origin) {\n this.hide();\n } else if (origin === 'keyboard') {\n this.show();\n }\n });\n });\n }\n\n private setupEventListeners(): void {\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (this.platformSupportsMouseEvents()) {\n const mouseEnter = this.renderer.listen(this.target(), 'mouseenter', this.show.bind(this));\n const mouseLeave = this.renderer.listen(this.target(), 'mouseleave', this.hide.bind(this));\n const wheel = this.renderer.listen(this.target(), 'wheel', this.hide.bind(this));\n this.listeners.push(mouseEnter, mouseLeave, wheel);\n } else {\n const touchStart = this.renderer.listen(this.target(), 'touchstart', this.show.bind(this));\n const touchEnd = this.renderer.listen(this.target(), 'touchend', this.hide.bind(this));\n const touchCancel = this.renderer.listen(this.target(), 'touchcancel', this.hide.bind(this));\n this.listeners.push(touchStart, touchEnd, touchCancel);\n }\n }\n\n private show(): void {\n if (!this.popper) {\n this.popper = createPopper(this.target(), this.element, {\n placement: this.position(),\n });\n } else {\n this.popper.forceUpdate();\n }\n this.renderer.addClass(this.element, this.showClass);\n }\n\n private hide(): void {\n this.renderer.removeClass(this.element, this.showClass);\n }\n\n private platformSupportsMouseEvents() {\n return !this.platform.IOS && !this.platform.ANDROID;\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 computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { WattTooltipComponent } from './watt-tooltip.component';\n\nexport type wattTooltipPosition =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left';\n\nexport type wattTooltipVariant = 'dark' | 'light';\n\n@Directive({\n selector: '[wattTooltip]',\n exportAs: 'wattTooltip',\n})\nexport class WattTooltipDirective {\n readonly text = input<string>('', { alias: 'wattTooltip' });\n readonly position = input<wattTooltipPosition>('top', { alias: 'wattTooltipPosition' });\n readonly variant = input<wattTooltipVariant>('dark', { alias: 'wattTooltipVariant' });\n\n private readonly element = inject(ElementRef).nativeElement;\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n private tooltip = computed(() => this.createTooltipComponent());\n\n constructor() {\n // Setup effect to manage tooltip component lifecycle\n effect(() => {\n // Access the tooltip computed to create/update it when inputs change\n const tooltipComponent = this.tooltip();\n\n // Cleanup on destroy\n this.destroyRef.onDestroy(() => {\n tooltipComponent?.destroy();\n this.element.removeAttribute('aria-describedby');\n });\n });\n }\n\n private createTooltipComponent() {\n if (!this.text()) return null;\n\n // Create the component\n const tooltipComponent = this.viewContainerRef.createComponent(WattTooltipComponent);\n\n // Get the component instance\n const instance = tooltipComponent.instance;\n\n // Set up bindings\n tooltipComponent.setInput('text', this.text());\n tooltipComponent.setInput('target', this.element);\n tooltipComponent.setInput('position', this.position());\n tooltipComponent.setInput('variant', this.variant());\n\n this.element.setAttribute('aria-describedby', instance.id);\n\n return tooltipComponent;\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 {\n WattTooltipDirective,\n wattTooltipPosition,\n wattTooltipVariant,\n} from './watt-tooltip.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAiCa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,MAAM,GAAG,CAAC;AAEjB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU;AAC/B,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAe;AACtC,IAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,mDAAuB;AAChD,IAA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,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,aAAa;AACxB,iBAAA;;;AC9CD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -30,10 +30,10 @@ class WattCssCustomPropertiesService {
30
30
  setPropertyValue(name, value) {
31
31
  this.rootElement.style.setProperty(name, value);
32
32
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCssCustomPropertiesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCssCustomPropertiesService, providedIn: 'root' });
33
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCssCustomPropertiesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCssCustomPropertiesService, providedIn: 'root' });
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCssCustomPropertiesService, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattCssCustomPropertiesService, decorators: [{
37
37
  type: Injectable,
38
38
  args: [{ providedIn: 'root' }]
39
39
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-utils-css.mjs","sources":["../../../libs/watt/package/utils/css/css-custom-properties.service.ts","../../../libs/watt/package/utils/css/index.ts","../../../libs/watt/package/utils/css/energinet-watt-utils-css.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\n\nimport { Injectable, DOCUMENT, inject } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattCssCustomPropertiesService {\n private readonly document = inject<Document>(DOCUMENT);\n\n private get rootElement() {\n return this.document.documentElement;\n }\n\n public getPropertyValue(name: string): string {\n return getComputedStyle(this.rootElement).getPropertyValue(name);\n }\n\n public setPropertyValue(name: string, value: string): void {\n this.rootElement.style.setProperty(name, value);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport * from './css-custom-properties.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,8BAA8B,CAAA;AACxB,IAAA,QAAQ,GAAG,MAAM,CAAW,QAAQ,CAAC;AAEtD,IAAA,IAAY,WAAW,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe;IACtC;AAEO,IAAA,gBAAgB,CAAC,IAAY,EAAA;QAClC,OAAO,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC;IAClE;IAEO,gBAAgB,CAAC,IAAY,EAAE,KAAa,EAAA;QACjD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;IACjD;wGAbW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA9B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cADjB,MAAM,EAAA,CAAA;;4FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACrBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-utils-css.mjs","sources":["../../../libs/watt/package/utils/css/css-custom-properties.service.ts","../../../libs/watt/package/utils/css/index.ts","../../../libs/watt/package/utils/css/energinet-watt-utils-css.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\n\nimport { Injectable, DOCUMENT, inject } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattCssCustomPropertiesService {\n private readonly document = inject<Document>(DOCUMENT);\n\n private get rootElement() {\n return this.document.documentElement;\n }\n\n public getPropertyValue(name: string): string {\n return getComputedStyle(this.rootElement).getPropertyValue(name);\n }\n\n public setPropertyValue(name: string, value: string): void {\n this.rootElement.style.setProperty(name, value);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport * from './css-custom-properties.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,8BAA8B,CAAA;AACxB,IAAA,QAAQ,GAAG,MAAM,CAAW,QAAQ,CAAC;AAEtD,IAAA,IAAY,WAAW,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe;IACtC;AAEO,IAAA,gBAAgB,CAAC,IAAY,EAAA;QAClC,OAAO,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC;IAClE;IAEO,gBAAgB,CAAC,IAAY,EAAE,KAAa,EAAA;QACjD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;IACjD;uGAbW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA9B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cADjB,MAAM,EAAA,CAAA;;2FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACrBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -48,10 +48,10 @@ class WattIntersectionObserverService {
48
48
  this.intersectionObserver?.observe(element);
49
49
  return this.entrySubject.asObservable().pipe(filter((entry) => entry.target === element), finalize(() => this.intersectionObserver?.unobserve(element)));
50
50
  }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattIntersectionObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
52
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattIntersectionObserverService, providedIn: 'root' });
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattIntersectionObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
52
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattIntersectionObserverService, providedIn: 'root' });
53
53
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattIntersectionObserverService, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattIntersectionObserverService, decorators: [{
55
55
  type: Injectable,
56
56
  args: [{ providedIn: 'root' }]
57
57
  }], ctorParameters: () => [] });
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-utils-intersection-observer.mjs","sources":["../../../libs/watt/package/utils/intersection-observer/watt-intersection-observer.service.ts","../../../libs/watt/package/utils/intersection-observer/index.ts","../../../libs/watt/package/utils/intersection-observer/energinet-watt-utils-intersection-observer.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 { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes in the intersection of a target element with\n * the viewport.\n *\n * Usage:\n * `import { WattIntersectionObserverService } from '@energinet/watt/intersection-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattIntersectionObserverService {\n private intersectionObserver?: IntersectionObserver;\n private entrySubject = new Subject<IntersectionObserverEntry>();\n\n constructor() {\n if (window.IntersectionObserver) {\n this.intersectionObserver = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that emits\n * whenever that element enters or leaves the viewport. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.intersectionObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.intersectionObserver?.unobserve(element))\n );\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattIntersectionObserverService } from './watt-intersection-observer.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;;;;;;AAMG;MAEU,+BAA+B,CAAA;AAClC,IAAA,oBAAoB;AACpB,IAAA,YAAY,GAAG,IAAI,OAAO,EAA6B;AAE/D,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,MAAM,CAAC,oBAAoB,EAAE;YAC/B,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,CAAC,OAAO,KAAI;AAC/D,gBAAA,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;AAC3B,oBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC/B;AACF,YAAA,CAAC,CAAC;QACJ;IACF;AAEA;;;;AAIG;AACH,IAAA,OAAO,CAAC,OAAgB,EAAA;AACtB,QAAA,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,OAAO,CAAC;AAC3C,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,MAAM,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAC9D;IACH;wGAzBW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA/B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA;;4FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC5BlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-utils-intersection-observer.mjs","sources":["../../../libs/watt/package/utils/intersection-observer/watt-intersection-observer.service.ts","../../../libs/watt/package/utils/intersection-observer/index.ts","../../../libs/watt/package/utils/intersection-observer/energinet-watt-utils-intersection-observer.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 { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes in the intersection of a target element with\n * the viewport.\n *\n * Usage:\n * `import { WattIntersectionObserverService } from '@energinet/watt/intersection-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattIntersectionObserverService {\n private intersectionObserver?: IntersectionObserver;\n private entrySubject = new Subject<IntersectionObserverEntry>();\n\n constructor() {\n if (window.IntersectionObserver) {\n this.intersectionObserver = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that emits\n * whenever that element enters or leaves the viewport. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.intersectionObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.intersectionObserver?.unobserve(element))\n );\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattIntersectionObserverService } from './watt-intersection-observer.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;;;;;;AAMG;MAEU,+BAA+B,CAAA;AAClC,IAAA,oBAAoB;AACpB,IAAA,YAAY,GAAG,IAAI,OAAO,EAA6B;AAE/D,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,MAAM,CAAC,oBAAoB,EAAE;YAC/B,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,CAAC,OAAO,KAAI;AAC/D,gBAAA,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;AAC3B,oBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC/B;AACF,YAAA,CAAC,CAAC;QACJ;IACF;AAEA;;;;AAIG;AACH,IAAA,OAAO,CAAC,OAAgB,EAAA;AACtB,QAAA,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,OAAO,CAAC;AAC3C,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,MAAM,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAC9D;IACH;uGAzBW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA/B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC5BlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -58,10 +58,10 @@ class WattResizeObserverService {
58
58
  this.resizeObserver?.observe(element);
59
59
  return this.entrySubject.asObservable().pipe(filter((entry) => entry.target === element), finalize(() => this.resizeObserver?.unobserve(element)));
60
60
  }
61
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
62
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverService, providedIn: 'root' });
61
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattResizeObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
62
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattResizeObserverService, providedIn: 'root' });
63
63
  }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverService, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattResizeObserverService, decorators: [{
65
65
  type: Injectable,
66
66
  args: [{ providedIn: 'root' }]
67
67
  }], ctorParameters: () => [] });
@@ -106,10 +106,10 @@ class WattResizeObserverDirective {
106
106
  ngOnDestroy() {
107
107
  this.subscription.unsubscribe();
108
108
  }
109
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
110
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: WattResizeObserverDirective, isStandalone: true, selector: "[wattResizeObserver]", outputs: { resize: "resize" }, ngImport: i0 });
109
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattResizeObserverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
110
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.5", type: WattResizeObserverDirective, isStandalone: true, selector: "[wattResizeObserver]", outputs: { resize: "resize" }, ngImport: i0 });
111
111
  }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverDirective, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattResizeObserverDirective, decorators: [{
113
113
  type: Directive,
114
114
  args: [{ selector: '[wattResizeObserver]' }]
115
115
  }], ctorParameters: () => [], propDecorators: { resize: [{ type: i0.Output, args: ["resize"] }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-utils-resize-observer.mjs","sources":["../../../libs/watt/package/utils/resize-observer/watt-resize-observer.service.ts","../../../libs/watt/package/utils/resize-observer/watt-resize-observer.directive.ts","../../../libs/watt/package/utils/resize-observer/index.ts","../../../libs/watt/package/utils/resize-observer/energinet-watt-utils-resize-observer.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, NgZone, inject } from '@angular/core';\nimport { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes to an elements size. Typically used by\n * the `WattResizeObserverDirective`, but can also be imported directly.\n *\n * Usage:\n * `import { WattResizeObserverService } from '@energinet/watt/resize-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattResizeObserverService {\n private readonly ngZone = inject(NgZone);\n\n private resizeObserver?: ResizeObserver;\n private entrySubject = new Subject<ResizeObserverEntry>();\n\n constructor() {\n if (window.ResizeObserver) {\n this.resizeObserver = new ResizeObserver((entries) => {\n // Resize callback is running outside of Angular zone\n this.ngZone.run(() => {\n /**\n * Ensure that the function is executed only once per frame, and avoid:\n * \"Error: ResizeObserver loop limit exceeded\"\n */\n requestAnimationFrame(() => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n });\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that\n * emits whenever that element changes size. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.resizeObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.resizeObserver?.unobserve(element))\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 { Directive, ElementRef, OnDestroy, inject, output } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { WattResizeObserverService } from './watt-resize-observer.service';\n\n/**\n * A directive for subscribing to changes to the size of an element.\n * The `resize` event emits initially and then everytime the element is resized.\n *\n * Usage:\n * `import { WattResizeObserverDirective } from '@energinet/watt/resize-observer';`\n */\n@Directive({ selector: '[wattResizeObserver]' })\nexport class WattResizeObserverDirective implements OnDestroy {\n private elementRef = inject(ElementRef);\n private resizeObserverService = inject(WattResizeObserverService);\n\n // The `resize` event only natively exists on `window`.\n // eslint-disable-next-line @angular-eslint/no-output-native\n resize = output<ResizeObserverEntry>();\n\n private subscription: Subscription;\n\n constructor() {\n this.subscription = this.resizeObserverService\n .observe(this.elementRef.nativeElement)\n .subscribe((entry) => this.resize.emit(entry));\n }\n\n public ngOnDestroy(): void {\n this.subscription.unsubscribe();\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 { WattResizeObserverDirective } from './watt-resize-observer.directive';\nexport { WattResizeObserverService } from './watt-resize-observer.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;;;;;;AAMG;MAEU,yBAAyB,CAAA;AACnB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAEhC,IAAA,cAAc;AACd,IAAA,YAAY,GAAG,IAAI,OAAO,EAAuB;AAEzD,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,MAAM,CAAC,cAAc,EAAE;YACzB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,KAAI;;AAEnD,gBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAK;AACnB;;;AAGG;oBACH,qBAAqB,CAAC,MAAK;AACzB,wBAAA,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;AAC3B,4BAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;wBAC/B;AACF,oBAAA,CAAC,CAAC;AACJ,gBAAA,CAAC,CAAC;AACJ,YAAA,CAAC,CAAC;QACJ;IACF;AAEA;;;;AAIG;AACH,IAAA,OAAO,CAAC,OAAgB,EAAA;AACtB,QAAA,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC;AACrC,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,MAAM,IAAI,C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AA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,SAAS;mBAAC,EAAE,QAAQ,EAAE,sBAAsB,EAAE;;;AC9B/C;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-utils-resize-observer.mjs","sources":["../../../libs/watt/package/utils/resize-observer/watt-resize-observer.service.ts","../../../libs/watt/package/utils/resize-observer/watt-resize-observer.directive.ts","../../../libs/watt/package/utils/resize-observer/index.ts","../../../libs/watt/package/utils/resize-observer/energinet-watt-utils-resize-observer.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, NgZone, inject } from '@angular/core';\nimport { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes to an elements size. Typically used by\n * the `WattResizeObserverDirective`, but can also be imported directly.\n *\n * Usage:\n * `import { WattResizeObserverService } from '@energinet/watt/resize-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattResizeObserverService {\n private readonly ngZone = inject(NgZone);\n\n private resizeObserver?: ResizeObserver;\n private entrySubject = new Subject<ResizeObserverEntry>();\n\n constructor() {\n if (window.ResizeObserver) {\n this.resizeObserver = new ResizeObserver((entries) => {\n // Resize callback is running outside of Angular zone\n this.ngZone.run(() => {\n /**\n * Ensure that the function is executed only once per frame, and avoid:\n * \"Error: ResizeObserver loop limit exceeded\"\n */\n requestAnimationFrame(() => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n });\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that\n * emits whenever that element changes size. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.resizeObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.resizeObserver?.unobserve(element))\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 { Directive, ElementRef, OnDestroy, inject, output } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { WattResizeObserverService } from './watt-resize-observer.service';\n\n/**\n * A directive for subscribing to changes to the size of an element.\n * The `resize` event emits initially and then everytime the element is resized.\n *\n * Usage:\n * `import { WattResizeObserverDirective } from '@energinet/watt/resize-observer';`\n */\n@Directive({ selector: '[wattResizeObserver]' })\nexport class WattResizeObserverDirective implements OnDestroy {\n private elementRef = inject(ElementRef);\n private resizeObserverService = inject(WattResizeObserverService);\n\n // The `resize` event only natively exists on `window`.\n // eslint-disable-next-line @angular-eslint/no-output-native\n resize = output<ResizeObserverEntry>();\n\n private subscription: Subscription;\n\n constructor() {\n this.subscription = this.resizeObserverService\n .observe(this.elementRef.nativeElement)\n .subscribe((entry) => this.resize.emit(entry));\n }\n\n public ngOnDestroy(): void {\n this.subscription.unsubscribe();\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 { WattResizeObserverDirective } from './watt-resize-observer.directive';\nexport { WattResizeObserverService } from './watt-resize-observer.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;;;;;;AAMG;MAEU,yBAAyB,CAAA;AACnB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAEhC,IAAA,cAAc;AACd,IAAA,YAAY,GAAG,IAAI,OAAO,EAAuB;AAEzD,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,MAAM,CAAC,cAAc,EAAE;YACzB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,KAAI;;AAEnD,gBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAK;AACnB;;;AAGG;oBACH,qBAAqB,CAAC,MAAK;AACzB,wBAAA,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;AAC3B,4BAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;wBAC/B;AACF,oBAAA,CAAC,CAAC;AACJ,gBAAA,CAAC,CAAC;AACJ,YAAA,CAAC,CAAC;QACJ;IACF;AAEA;;;;AAIG;AACH,IAAA,OAAO,CAAC,OAAgB,EAAA;AACtB,QAAA,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC;AACrC,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CACxD;IAC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,QAAQ,EAAE,sBAAsB,EAAE;;;AC9B/C;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -54,8 +54,8 @@ class WattValidationMessageComponent {
54
54
  }, 100);
55
55
  }
56
56
  }
57
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattValidationMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
58
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattValidationMessageComponent, isStandalone: true, selector: "watt-validation-message", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, autoScrollIntoView: { classPropertyName: "autoScrollIntoView", publicName: "autoScrollIntoView", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClass()", "attr.role": "ariaRole()" } }, ngImport: i0, template: `
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattValidationMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
58
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: WattValidationMessageComponent, isStandalone: true, selector: "watt-validation-message", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, autoScrollIntoView: { classPropertyName: "autoScrollIntoView", publicName: "autoScrollIntoView", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClass()", "attr.role": "ariaRole()" } }, ngImport: i0, template: `
59
59
  @if (icon()) {
60
60
  <watt-icon [name]="icon()" />
61
61
  }
@@ -68,7 +68,7 @@ class WattValidationMessageComponent {
68
68
  </div>
69
69
  `, isInline: true, styles: [":host{align-items:center;border-radius:4px;display:flex}:host.watt-validation-message-size--compact{padding:var(--watt-space-xs) var(--watt-space-s)}:host.watt-validation-message-size--compact watt-icon{margin-right:var(--watt-space-s)}:host.watt-validation-message-size--compact strong{color:var(--watt-typography-label-color);font-size:.875rem;line-height:1.25rem;font-weight:600}:host.watt-validation-message-size--compact strong:not(:empty):after{content:\":\"}:host.watt-validation-message-size--compact .watt-validation-message-text{font-size:.875rem;line-height:1.25rem}:host.watt-validation-message-size--normal{padding:1.5rem var(--watt-space-m)}:host.watt-validation-message-size--normal strong{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0;display:inline-block;width:100%;margin-bottom:var(--watt-space-s)}:host.watt-validation-message-size--normal watt-icon{margin-right:var(--watt-space-m)}:host watt-icon{align-self:flex-start}:host.watt-validation-message-type--info{background-color:var(--watt-color-state-info-light)}:host.watt-validation-message-type--warning{background-color:var(--watt-color-state-warning-light)}:host.watt-validation-message-type--success{background-color:var(--watt-color-state-success-light)}:host.watt-validation-message-type--danger{background-color:var(--watt-color-state-danger-light)}\n"], dependencies: [{ kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
70
70
  }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattValidationMessageComponent, decorators: [{
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: WattValidationMessageComponent, decorators: [{
72
72
  type: Component,
73
73
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'watt-validation-message', imports: [WattIconComponent], host: {
74
74
  '[class]': `cssClass()`,
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-validation-message.mjs","sources":["../../../libs/watt/package/validation-message/watt-validation-message.component.ts","../../../libs/watt/package/validation-message/index.ts","../../../libs/watt/package/validation-message/energinet-watt-validation-message.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 {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n} from '@angular/core';\n\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport type WattValidationMessageType = 'info' | 'warning' | 'success' | 'danger';\nexport type WattValidationMessageSize = 'compact' | 'normal';\n\n/**\n * Usage:\n * `import { WattValidationMessageComponent } from '@energinet/watt/validation-message';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-validation-message',\n styleUrl: './watt-validation-message.component.scss',\n imports: [WattIconComponent],\n host: {\n '[class]': `cssClass()`,\n '[attr.role]': 'ariaRole()',\n },\n template: `\n @if (icon()) {\n <watt-icon [name]=\"icon()\" />\n }\n <div>\n @if (label()) {\n <strong>{{ label() }}</strong>\n }\n {{ message() }}\n <ng-content />\n </div>\n `,\n})\nexport class WattValidationMessageComponent implements AfterViewInit {\n /**\n * @ignore\n */\n private elementRef = inject(ElementRef);\n\n label = input('');\n message = input('');\n icon = input<WattIcon | undefined>(undefined);\n type = input<WattValidationMessageType>('info');\n size = input<WattValidationMessageSize>('compact');\n autoScrollIntoView = input(true);\n\n /**\n * @ignore\n */\n cssClass = computed(\n () =>\n `watt-validation-message-type--${this.type()} watt-validation-message-size--${this.size()}`\n );\n\n /**\n * @ignore\n */\n ariaRole = computed(() =>\n this.type() === 'warning' || this.type() === 'danger' ? 'alert' : 'status'\n );\n\n /**\n * @ignore\n */\n ngAfterViewInit() {\n if (this.autoScrollIntoView()) {\n // Try to win over other auto scrolling behavior such as auto focus\n setTimeout(() => {\n this.elementRef.nativeElement.scrollIntoView();\n }, 100);\n }\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport {\n WattValidationMessageComponent,\n WattValidationMessageType,\n} from './watt-validation-message.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAgBA;;;AAGG;MAuBU,8BAA8B,CAAA;AACzC;;AAEG;AACK,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC;AACjB,IAAA,OAAO,GAAG,KAAK,CAAC,EAAE,mDAAC;AACnB,IAAA,IAAI,GAAG,KAAK,CAAuB,SAAS,gDAAC;AAC7C,IAAA,IAAI,GAAG,KAAK,CAA4B,MAAM,gDAAC;AAC/C,IAAA,IAAI,GAAG,KAAK,CAA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B,CAAC,EAAA,IAAA,EACtB;AACJ,wBAAA,SAAS,EAAE,CAAA,UAAA,CAAY;AACvB,wBAAA,aAAa,EAAE,YAAY;qBAC5B,EAAA,QAAA,EACS;;;;;;;;;;;AAWT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,04CAAA,CAAA,EAAA;;;ACzDH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-validation-message.mjs","sources":["../../../libs/watt/package/validation-message/watt-validation-message.component.ts","../../../libs/watt/package/validation-message/index.ts","../../../libs/watt/package/validation-message/energinet-watt-validation-message.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 {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n} from '@angular/core';\n\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport type WattValidationMessageType = 'info' | 'warning' | 'success' | 'danger';\nexport type WattValidationMessageSize = 'compact' | 'normal';\n\n/**\n * Usage:\n * `import { WattValidationMessageComponent } from '@energinet/watt/validation-message';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-validation-message',\n styleUrl: './watt-validation-message.component.scss',\n imports: [WattIconComponent],\n host: {\n '[class]': `cssClass()`,\n '[attr.role]': 'ariaRole()',\n },\n template: `\n @if (icon()) {\n <watt-icon [name]=\"icon()\" />\n }\n <div>\n @if (label()) {\n <strong>{{ label() }}</strong>\n }\n {{ message() }}\n <ng-content />\n </div>\n `,\n})\nexport class WattValidationMessageComponent implements AfterViewInit {\n /**\n * @ignore\n */\n private elementRef = inject(ElementRef);\n\n label = input('');\n message = input('');\n icon = input<WattIcon | undefined>(undefined);\n type = input<WattValidationMessageType>('info');\n size = input<WattValidationMessageSize>('compact');\n autoScrollIntoView = input(true);\n\n /**\n * @ignore\n */\n cssClass = computed(\n () =>\n `watt-validation-message-type--${this.type()} watt-validation-message-size--${this.size()}`\n );\n\n /**\n * @ignore\n */\n ariaRole = computed(() =>\n this.type() === 'warning' || this.type() === 'danger' ? 'alert' : 'status'\n );\n\n /**\n * @ignore\n */\n ngAfterViewInit() {\n if (this.autoScrollIntoView()) {\n // Try to win over other auto scrolling behavior such as auto focus\n setTimeout(() => {\n this.elementRef.nativeElement.scrollIntoView();\n }, 100);\n }\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport {\n WattValidationMessageComponent,\n WattValidationMessageType,\n} from './watt-validation-message.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAgBA;;;AAGG;MAuBU,8BAA8B,CAAA;AACzC;;AAEG;AACK,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC;AACjB,IAAA,OAAO,GAAG,KAAK,CAAC,EAAE,mDAAC;AACnB,IAAA,IAAI,GAAG,KAAK,CAAuB,SAAS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