@energinet/watt 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/LICENSE +201 -0
  2. package/badge/index.d.ts +17 -0
  3. package/badge/watt-badge.component.d.ts +15 -0
  4. package/breadcrumbs/index.d.ts +17 -0
  5. package/breadcrumbs/watt-breadcrumbs.component.d.ts +23 -0
  6. package/button/index.d.ts +17 -0
  7. package/button/watt-button.component.d.ts +20 -0
  8. package/card/index.d.ts +18 -0
  9. package/card/watt-card-title.component.d.ts +6 -0
  10. package/card/watt-card.component.d.ts +15 -0
  11. package/checkbox/index.d.ts +17 -0
  12. package/checkbox/watt-checkbox.component.d.ts +17 -0
  13. package/chip/index.d.ts +23 -0
  14. package/chip/watt-action-chip.component.d.ts +8 -0
  15. package/chip/watt-chip.component.d.ts +8 -0
  16. package/chip/watt-chip.directive.d.ts +16 -0
  17. package/chip/watt-date-chip.component.d.ts +29 -0
  18. package/chip/watt-date-range-chip.component.d.ts +50 -0
  19. package/chip/watt-filter-chip.component.d.ts +30 -0
  20. package/chip/watt-menu-chip.component.d.ts +30 -0
  21. package/clipboard/index.d.ts +18 -0
  22. package/clipboard/watt-clipboard-intl.service.d.ts +7 -0
  23. package/clipboard/watt-copy-to-clipboard.directive.d.ts +12 -0
  24. package/code/index.d.ts +18 -0
  25. package/code/watt-code.component.d.ts +32 -0
  26. package/code/watt-code.worker.token.d.ts +18 -0
  27. package/core/breakpoints/_breakpoints.import.scss +53 -0
  28. package/core/breakpoints/_include-media.scss +568 -0
  29. package/core/breakpoints/breakpoints-observer.d.ts +39 -0
  30. package/core/breakpoints/breakpoints.d.ts +29 -0
  31. package/core/breakpoints/index.d.ts +18 -0
  32. package/core/color/+storybook/storybook-colors-overview.component.scss +50 -0
  33. package/core/color/color-helper.service.d.ts +12 -0
  34. package/core/color/colors.d.ts +51 -0
  35. package/core/color/index.d.ts +18 -0
  36. package/core/date/dayjs.d.ts +22 -0
  37. package/core/date/index.d.ts +23 -0
  38. package/core/date/watt-danish-datetime.providers.d.ts +1 -0
  39. package/core/date/watt-date-adapter.d.ts +31 -0
  40. package/core/date/watt-date-range.d.ts +25 -0
  41. package/core/date/watt-date.pipe.d.ts +28 -0
  42. package/core/date/watt-format-date.d.ts +11 -0
  43. package/core/date/watt-locale.service.d.ts +13 -0
  44. package/core/styles/@energinet-datahub/watt/_index.scss +52 -0
  45. package/core/styles/@energinet-datahub/watt/_utils.scss +16 -0
  46. package/core/styles/@energinet-datahub/watt/theme/light-theme.scss +71 -0
  47. package/core/styles/@energinet-datahub/watt/theme/material-overwrites/datepicker.scss +69 -0
  48. package/core/styles/@energinet-datahub/watt/theme/material-overwrites/snack-bar.scss +26 -0
  49. package/core/styles/_box-sizing.scss +22 -0
  50. package/core/styles/_chips.scss +22 -0
  51. package/core/styles/_elevation.scss +18 -0
  52. package/core/styles/_hr.scss +20 -0
  53. package/core/styles/_table.scss +89 -0
  54. package/core/styles/_tokens.scss +134 -0
  55. package/core/styles/_tooltip.scss +64 -0
  56. package/core/styles/_variables.scss +106 -0
  57. package/core/styles/_vater.scss +69 -0
  58. package/core/styles/spacing/+storybook/storybook-spacing-overview.component.scss +25 -0
  59. package/core/styles/spacing/_baseline.scss +23 -0
  60. package/core/styles/spacing/_inline.scss +38 -0
  61. package/core/styles/spacing/_inset.scss +61 -0
  62. package/core/styles/spacing/_spacing.import.scss +113 -0
  63. package/core/styles/spacing/_stack.scss +38 -0
  64. package/core/styles/spacing/_variables.scss +14 -0
  65. package/core/styles/spacing/index.scss +18 -0
  66. package/core/styles/typography/+storybook/storybook-typography-overview.component.scss +78 -0
  67. package/core/styles/typography/_rem.scss +24 -0
  68. package/core/styles/typography/_typography.import.scss +195 -0
  69. package/core/styles/typography/index.scss +118 -0
  70. package/data/index.d.ts +20 -0
  71. package/data/watt-data-actions.component.d.ts +5 -0
  72. package/data/watt-data-filters.component.d.ts +5 -0
  73. package/data/watt-data-intl.service.d.ts +15 -0
  74. package/data/watt-data-table.component.d.ts +27 -0
  75. package/datetime-field/index.d.ts +17 -0
  76. package/datetime-field/watt-datetime-field.component.d.ts +39 -0
  77. package/description-list/index.d.ts +17 -0
  78. package/description-list/watt-description-list-item.component.d.ts +27 -0
  79. package/description-list/watt-description-list.component.d.ts +19 -0
  80. package/drawer/index.d.ts +21 -0
  81. package/drawer/watt-drawer-actions.component.d.ts +5 -0
  82. package/drawer/watt-drawer-content.component.d.ts +5 -0
  83. package/drawer/watt-drawer-heading.component.d.ts +5 -0
  84. package/drawer/watt-drawer-topbar.component.d.ts +5 -0
  85. package/drawer/watt-drawer.component.d.ts +61 -0
  86. package/dropdown/index.d.ts +19 -0
  87. package/dropdown/watt-dropdown-option.d.ts +22 -0
  88. package/dropdown/watt-dropdown-value.d.ts +17 -0
  89. package/dropdown/watt-dropdown.component.d.ts +195 -0
  90. package/empty-state/icons/explore.d.ts +5 -0
  91. package/empty-state/icons/no-results.d.ts +5 -0
  92. package/empty-state/icons/power.d.ts +5 -0
  93. package/empty-state/index.d.ts +20 -0
  94. package/empty-state/watt-empty-state.component.d.ts +16 -0
  95. package/expandable-card/index.d.ts +19 -0
  96. package/expandable-card/watt-expandable-card.component.d.ts +34 -0
  97. package/expansion/expansion.component.d.ts +18 -0
  98. package/expansion/index.d.ts +17 -0
  99. package/fesm2022/energinet-watt-badge.mjs +66 -0
  100. package/fesm2022/energinet-watt-badge.mjs.map +1 -0
  101. package/fesm2022/energinet-watt-breadcrumbs.mjs +116 -0
  102. package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -0
  103. package/fesm2022/energinet-watt-button.mjs +120 -0
  104. package/fesm2022/energinet-watt-button.mjs.map +1 -0
  105. package/fesm2022/energinet-watt-card.mjs +117 -0
  106. package/fesm2022/energinet-watt-card.mjs.map +1 -0
  107. package/fesm2022/energinet-watt-checkbox.mjs +118 -0
  108. package/fesm2022/energinet-watt-checkbox.mjs.map +1 -0
  109. package/fesm2022/energinet-watt-chip.mjs +760 -0
  110. package/fesm2022/energinet-watt-chip.mjs.map +1 -0
  111. package/fesm2022/energinet-watt-clipboard.mjs +118 -0
  112. package/fesm2022/energinet-watt-clipboard.mjs.map +1 -0
  113. package/fesm2022/energinet-watt-code.mjs +119 -0
  114. package/fesm2022/energinet-watt-code.mjs.map +1 -0
  115. package/fesm2022/energinet-watt-core-breakpoints.mjs +100 -0
  116. package/fesm2022/energinet-watt-core-breakpoints.mjs.map +1 -0
  117. package/fesm2022/energinet-watt-core-color.mjs +127 -0
  118. package/fesm2022/energinet-watt-core-color.mjs.map +1 -0
  119. package/fesm2022/energinet-watt-core-date.mjs +260 -0
  120. package/fesm2022/energinet-watt-core-date.mjs.map +1 -0
  121. package/fesm2022/energinet-watt-data.mjs +286 -0
  122. package/fesm2022/energinet-watt-data.mjs.map +1 -0
  123. package/fesm2022/energinet-watt-datetime-field.mjs +233 -0
  124. package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -0
  125. package/fesm2022/energinet-watt-description-list.mjs +130 -0
  126. package/fesm2022/energinet-watt-description-list.mjs.map +1 -0
  127. package/fesm2022/energinet-watt-drawer.mjs +271 -0
  128. package/fesm2022/energinet-watt-drawer.mjs.map +1 -0
  129. package/fesm2022/energinet-watt-dropdown.mjs +423 -0
  130. package/fesm2022/energinet-watt-dropdown.mjs.map +1 -0
  131. package/fesm2022/energinet-watt-empty-state.mjs +299 -0
  132. package/fesm2022/energinet-watt-empty-state.mjs.map +1 -0
  133. package/fesm2022/energinet-watt-expandable-card.mjs +151 -0
  134. package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -0
  135. package/fesm2022/energinet-watt-expansion.mjs +78 -0
  136. package/fesm2022/energinet-watt-expansion.mjs.map +1 -0
  137. package/fesm2022/energinet-watt-field.mjs +249 -0
  138. package/fesm2022/energinet-watt-field.mjs.map +1 -0
  139. package/fesm2022/energinet-watt-icon-flags.mjs +376 -0
  140. package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -0
  141. package/fesm2022/energinet-watt-icon.mjs +195 -0
  142. package/fesm2022/energinet-watt-icon.mjs.map +1 -0
  143. package/fesm2022/energinet-watt-modal.mjs +260 -0
  144. package/fesm2022/energinet-watt-modal.mjs.map +1 -0
  145. package/fesm2022/energinet-watt-paginator.mjs +164 -0
  146. package/fesm2022/energinet-watt-paginator.mjs.map +1 -0
  147. package/fesm2022/energinet-watt-phone-field.mjs +322 -0
  148. package/fesm2022/energinet-watt-phone-field.mjs.map +1 -0
  149. package/fesm2022/energinet-watt-picker-__shared.mjs +384 -0
  150. package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -0
  151. package/fesm2022/energinet-watt-picker-datepicker.mjs +430 -0
  152. package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -0
  153. package/fesm2022/energinet-watt-picker-timepicker.mjs +394 -0
  154. package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -0
  155. package/fesm2022/energinet-watt-progress-tracker.mjs +141 -0
  156. package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -0
  157. package/fesm2022/energinet-watt-query-params.mjs +95 -0
  158. package/fesm2022/energinet-watt-query-params.mjs.map +1 -0
  159. package/fesm2022/energinet-watt-radio.mjs +125 -0
  160. package/fesm2022/energinet-watt-radio.mjs.map +1 -0
  161. package/fesm2022/energinet-watt-search.mjs +126 -0
  162. package/fesm2022/energinet-watt-search.mjs.map +1 -0
  163. package/fesm2022/energinet-watt-shell.mjs +315 -0
  164. package/fesm2022/energinet-watt-shell.mjs.map +1 -0
  165. package/fesm2022/energinet-watt-slider.mjs +159 -0
  166. package/fesm2022/energinet-watt-slider.mjs.map +1 -0
  167. package/fesm2022/energinet-watt-spinner.mjs +72 -0
  168. package/fesm2022/energinet-watt-spinner.mjs.map +1 -0
  169. package/fesm2022/energinet-watt-stepper.mjs +185 -0
  170. package/fesm2022/energinet-watt-stepper.mjs.map +1 -0
  171. package/fesm2022/energinet-watt-table.mjs +423 -0
  172. package/fesm2022/energinet-watt-table.mjs.map +1 -0
  173. package/fesm2022/energinet-watt-tabs.mjs +254 -0
  174. package/fesm2022/energinet-watt-tabs.mjs.map +1 -0
  175. package/fesm2022/energinet-watt-text-field.mjs +316 -0
  176. package/fesm2022/energinet-watt-text-field.mjs.map +1 -0
  177. package/fesm2022/energinet-watt-textarea-field.mjs +136 -0
  178. package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -0
  179. package/fesm2022/energinet-watt-toast.mjs +174 -0
  180. package/fesm2022/energinet-watt-toast.mjs.map +1 -0
  181. package/fesm2022/energinet-watt-tooltip.mjs +214 -0
  182. package/fesm2022/energinet-watt-tooltip.mjs.map +1 -0
  183. package/fesm2022/energinet-watt-utils-css.mjs +72 -0
  184. package/fesm2022/energinet-watt-utils-css.mjs.map +1 -0
  185. package/fesm2022/energinet-watt-utils-intersection-observer.mjs +83 -0
  186. package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +1 -0
  187. package/fesm2022/energinet-watt-utils-resize-observer.mjs +144 -0
  188. package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -0
  189. package/fesm2022/energinet-watt-validation-message.mjs +114 -0
  190. package/fesm2022/energinet-watt-validation-message.mjs.map +1 -0
  191. package/fesm2022/energinet-watt-validators.mjs +40 -0
  192. package/fesm2022/energinet-watt-validators.mjs.map +1 -0
  193. package/fesm2022/energinet-watt-vater.mjs +287 -0
  194. package/fesm2022/energinet-watt-vater.mjs.map +1 -0
  195. package/fesm2022/energinet-watt.mjs +47 -0
  196. package/fesm2022/energinet-watt.mjs.map +1 -0
  197. package/field/index.d.ts +20 -0
  198. package/field/watt-field-error.component.d.ts +5 -0
  199. package/field/watt-field-hint.component.d.ts +5 -0
  200. package/field/watt-field-intl.service.d.ts +8 -0
  201. package/field/watt-field.component.d.ts +42 -0
  202. package/icon/flags/index.d.ts +23 -0
  203. package/icon/flags/watt-flag-de.d.ts +5 -0
  204. package/icon/flags/watt-flag-dk.d.ts +5 -0
  205. package/icon/flags/watt-flag-fi.d.ts +5 -0
  206. package/icon/flags/watt-flag-no.d.ts +5 -0
  207. package/icon/flags/watt-flag-pl.d.ts +5 -0
  208. package/icon/flags/watt-flag-se.d.ts +5 -0
  209. package/icon/flags/watt-flag.d.ts +13 -0
  210. package/icon/icon.component.d.ts +20 -0
  211. package/icon/icons.d.ts +82 -0
  212. package/icon/index.d.ts +17 -0
  213. package/index.d.ts +33 -0
  214. package/modal/index.d.ts +18 -0
  215. package/modal/watt-modal.component.d.ts +86 -0
  216. package/modal/watt-modal.service.d.ts +62 -0
  217. package/package.json +237 -0
  218. package/paginator/index.d.ts +18 -0
  219. package/paginator/watt-paginator-intl.service.d.ts +14 -0
  220. package/paginator/watt-paginator.component.d.ts +53 -0
  221. package/phone-field/index.d.ts +18 -0
  222. package/phone-field/watt-phone-field-intl.service.d.ts +14 -0
  223. package/phone-field/watt-phone-field.component.d.ts +75 -0
  224. package/picker/__shared/index.d.ts +19 -0
  225. package/picker/__shared/placeholder-mask/watt-placeholder-mask.component.d.ts +34 -0
  226. package/picker/__shared/watt-picker-base.d.ts +201 -0
  227. package/picker/__shared/watt-picker-value.d.ts +18 -0
  228. package/picker/datepicker/index.d.ts +19 -0
  229. package/picker/datepicker/watt-datepicker-intl.service.d.ts +7 -0
  230. package/picker/datepicker/watt-datepicker.component.d.ts +149 -0
  231. package/picker/timepicker/index.d.ts +17 -0
  232. package/picker/timepicker/maskito-time-range-mask.d.ts +18 -0
  233. package/picker/timepicker/watt-timepicker.component.d.ts +132 -0
  234. package/progress-tracker/index.d.ts +20 -0
  235. package/progress-tracker/watt-progress-tracker-step.component.d.ts +10 -0
  236. package/progress-tracker/watt-progress-tracker.component.d.ts +5 -0
  237. package/query-params/index.d.ts +17 -0
  238. package/query-params/watt-query-params.directive.d.ts +27 -0
  239. package/radio/index.d.ts +17 -0
  240. package/radio/watt-radio.component.d.ts +24 -0
  241. package/search/index.d.ts +17 -0
  242. package/search/watt-search.component.d.ts +31 -0
  243. package/shell/index.d.ts +18 -0
  244. package/shell/nav-list/index.d.ts +18 -0
  245. package/shell/nav-list/watt-expand-on-active-link.directive.d.ts +26 -0
  246. package/shell/nav-list/watt-nav-list-item.component.d.ts +16 -0
  247. package/shell/nav-list/watt-nav-list.component.d.ts +12 -0
  248. package/shell/shell.component.d.ts +28 -0
  249. package/slider/index.d.ts +17 -0
  250. package/slider/watt-slider.component.d.ts +57 -0
  251. package/spinner/index.d.ts +17 -0
  252. package/spinner/watt-spinner.component.d.ts +15 -0
  253. package/stepper/index.d.ts +18 -0
  254. package/stepper/watt-stepper-step.component.d.ts +34 -0
  255. package/stepper/watt-stepper.component.d.ts +40 -0
  256. package/table/index.d.ts +18 -0
  257. package/table/watt-table-data-source.d.ts +37 -0
  258. package/table/watt-table.component.d.ts +239 -0
  259. package/tabs/index.d.ts +26 -0
  260. package/tabs/watt-link-tab.component.d.ts +7 -0
  261. package/tabs/watt-link-tabs.component.d.ts +7 -0
  262. package/tabs/watt-tab.component.d.ts +26 -0
  263. package/tabs/watt-tabs-action.component.d.ts +5 -0
  264. package/tabs/watt-tabs.component.d.ts +36 -0
  265. package/text-field/index.d.ts +17 -0
  266. package/text-field/watt-text-field.component.d.ts +77 -0
  267. package/textarea-field/index.d.ts +17 -0
  268. package/textarea-field/watt-textarea-field.component.d.ts +27 -0
  269. package/toast/index.d.ts +19 -0
  270. package/toast/watt-toast.component.d.ts +47 -0
  271. package/toast/watt-toast.service.d.ts +13 -0
  272. package/tooltip/index.d.ts +17 -0
  273. package/tooltip/watt-tooltip.component.d.ts +47 -0
  274. package/tooltip/watt-tooltip.directive.d.ts +31 -0
  275. package/utils/css/css-custom-properties.service.d.ts +10 -0
  276. package/utils/css/index.d.ts +17 -0
  277. package/utils/intersection-observer/index.d.ts +17 -0
  278. package/utils/intersection-observer/watt-intersection-observer.service.d.ts +21 -0
  279. package/utils/resize-observer/index.d.ts +18 -0
  280. package/utils/resize-observer/watt-resize-observer.directive.d.ts +35 -0
  281. package/utils/resize-observer/watt-resize-observer.service.d.ts +39 -0
  282. package/validation-message/index.d.ts +17 -0
  283. package/validation-message/watt-validation-message.component.d.ts +50 -0
  284. package/validators/index.d.ts +17 -0
  285. package/validators/watt-range.validators.d.ts +23 -0
  286. package/vater/index.d.ts +20 -0
  287. package/vater/types.d.ts +21 -0
  288. package/vater/vater-flex.component.d.ts +19 -0
  289. package/vater/vater-spacer.component.d.ts +5 -0
  290. package/vater/vater-stack.component.d.ts +14 -0
  291. package/vater/vater-utility.directive.d.ts +16 -0
@@ -0,0 +1,322 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, input, signal, inject, untracked, forwardRef, ViewChild, HostBinding, ViewEncapsulation, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { MaskitoDirective } from '@maskito/angular';
6
+ import * as i2 from '@angular/material/select';
7
+ import { MatSelectModule } from '@angular/material/select';
8
+ import { MASKITO_DEFAULT_OPTIONS, maskitoTransform } from '@maskito/core';
9
+ import { maskitoPhoneOptionsGenerator } from '@maskito/phone';
10
+ import { isValidPhoneNumber } from 'libphonenumber-js';
11
+ import phoneMetadata from 'libphonenumber-js/min/metadata';
12
+ import { WattFlagComponent } from '@energinet/watt/icon/flags';
13
+ import { WattFieldComponent, WattFieldErrorComponent } from '@energinet/watt/field';
14
+ import { Subject } from 'rxjs';
15
+ import * as i3 from '@angular/material/core';
16
+
17
+ //#region License
18
+ /**
19
+ * @license
20
+ * Copyright 2020 Energinet DataHub A/S
21
+ *
22
+ * Licensed under the Apache License, Version 2.0 (the "License2");
23
+ * you may not use this file except in compliance with the License.
24
+ * You may obtain a copy of the License at
25
+ *
26
+ * http://www.apache.org/licenses/LICENSE-2.0
27
+ *
28
+ * Unless required by applicable law or agreed to in writing, software
29
+ * distributed under the License is distributed on an "AS IS" BASIS,
30
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ * See the License for the specific language governing permissions and
32
+ * limitations under the License.
33
+ */
34
+ //#endregion
35
+ class WattPhoneFieldIntlService {
36
+ changes = new Subject();
37
+ invalidPhoneNumber = 'Invalid phone number';
38
+ DK = 'Denmark';
39
+ DE = 'Germany';
40
+ FI = 'Finland';
41
+ NO = 'Norway';
42
+ SE = 'Sweden';
43
+ PL = 'Poland';
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
45
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldIntlService, providedIn: 'root' });
46
+ }
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldIntlService, decorators: [{
48
+ type: Injectable,
49
+ args: [{ providedIn: 'root' }]
50
+ }] });
51
+
52
+ //#region License
53
+ /**
54
+ * @license
55
+ * Copyright 2020 Energinet DataHub A/S
56
+ *
57
+ * Licensed under the Apache License, Version 2.0 (the "License2");
58
+ * you may not use this file except in compliance with the License.
59
+ * You may obtain a copy of the License at
60
+ *
61
+ * http://www.apache.org/licenses/LICENSE-2.0
62
+ *
63
+ * Unless required by applicable law or agreed to in writing, software
64
+ * distributed under the License is distributed on an "AS IS" BASIS,
65
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
66
+ * See the License for the specific language governing permissions and
67
+ * limitations under the License.
68
+ */
69
+ //#endregion
70
+ function phoneValidator(countryCode) {
71
+ return (control) => {
72
+ if (!control.value)
73
+ return null;
74
+ const valid = isValidPhoneNumber(control.value, countryCode);
75
+ return valid ? null : { invalidPhone: true };
76
+ };
77
+ }
78
+ class WattPhoneFieldComponent {
79
+ /** @ignore */
80
+ countries = [
81
+ { countryIsoCode: 'DK', phoneExtension: '+45' },
82
+ { countryIsoCode: 'SE', phoneExtension: '+46' },
83
+ { countryIsoCode: 'NO', phoneExtension: '+47' },
84
+ { countryIsoCode: 'DE', phoneExtension: '+49' },
85
+ { countryIsoCode: 'FI', phoneExtension: '+358' },
86
+ { countryIsoCode: 'PL', phoneExtension: '+48' },
87
+ ];
88
+ formControl = input.required();
89
+ label = input();
90
+ /** @ignore */
91
+ chosenCountry = signal(this.countries[0]);
92
+ /** @ignore */
93
+ mask = MASKITO_DEFAULT_OPTIONS;
94
+ /** @ignore */
95
+ intl = inject(WattPhoneFieldIntlService);
96
+ /** @ignore */
97
+ isDisabled = false;
98
+ /** @ignore */
99
+ value = null;
100
+ /** @ignore */
101
+ phoneNumberInput;
102
+ /** @ignore */
103
+ ngOnInit() {
104
+ this.setup();
105
+ }
106
+ /** @ignore */
107
+ writeValue(value) {
108
+ if (value) {
109
+ const country = this.countries.find((country) => value.startsWith(country.phoneExtension));
110
+ if (country) {
111
+ // Exclude Signal from being tracked
112
+ // in case the parent component sets the value inside an `effect`.
113
+ // Without this, updating the Signal internaly triggers the parrent `effect` to re-run.
114
+ // Note: Revisit once v19 is released because the `effect` API has changed
115
+ // significantly and this might not be necessary anymore
116
+ untracked(() => {
117
+ this.setCountry(country);
118
+ });
119
+ value = maskitoTransform(value, this.mask);
120
+ }
121
+ }
122
+ this.value = value;
123
+ }
124
+ /** @ignore */
125
+ onChange = () => {
126
+ /* noop function */
127
+ };
128
+ /** @ignore */
129
+ onTouched = () => {
130
+ /* noop function */
131
+ };
132
+ /** @ignore */
133
+ registerOnChange(fn) {
134
+ this.onChange = fn;
135
+ }
136
+ /** @ignore */
137
+ registerOnTouched(fn) {
138
+ this.onTouched = fn;
139
+ }
140
+ /** @ignore */
141
+ setDisabledState(isDisabled) {
142
+ this.isDisabled = isDisabled;
143
+ }
144
+ /** @ignore */
145
+ selectedContry({ value }) {
146
+ const country = this.countries.find((contry) => contry.countryIsoCode === value);
147
+ if (!country) {
148
+ throw new Error('Prefix not found');
149
+ }
150
+ this.setCountry(country);
151
+ this.formControl().reset();
152
+ setTimeout(() => {
153
+ this.phoneNumberInput.nativeElement.focus();
154
+ }, 100);
155
+ }
156
+ /** @ignore */
157
+ setCountry(country) {
158
+ this.chosenCountry.set(country);
159
+ this.setup();
160
+ }
161
+ /** @ignore */
162
+ onChanged(event) {
163
+ const value = event.target?.value;
164
+ this.onChange(value);
165
+ }
166
+ /** @ignore */
167
+ generatePhoneOptions() {
168
+ const phoneOptions = maskitoPhoneOptionsGenerator({
169
+ countryIsoCode: this.chosenCountry().countryIsoCode,
170
+ metadata: phoneMetadata,
171
+ separator: ' ',
172
+ });
173
+ this.mask = phoneOptions;
174
+ }
175
+ /** @ignore */
176
+ setup() {
177
+ this.generatePhoneOptions();
178
+ this.setValidator();
179
+ }
180
+ /** @ignore */
181
+ setValidator() {
182
+ const countryCode = this.chosenCountry().countryIsoCode;
183
+ this.formControl().addValidators(phoneValidator(countryCode));
184
+ }
185
+ /** @ignore */
186
+ getCountryName(countryIsoCode) {
187
+ return this.intl[countryIsoCode];
188
+ }
189
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
190
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattPhoneFieldComponent, isStandalone: true, selector: "watt-phone-field", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.watt-field-disabled": "this.isDisabled" } }, providers: [
191
+ {
192
+ provide: NG_VALUE_ACCESSOR,
193
+ useExisting: forwardRef(() => WattPhoneFieldComponent),
194
+ multi: true,
195
+ },
196
+ ], viewQueries: [{ propertyName: "phoneNumberInput", first: true, predicate: ["phoneNumberInput"], descendants: true }], ngImport: i0, template: `
197
+ <watt-field [label]="label()" [control]="formControl()">
198
+ <div class="watt-phone-field__prefix-container">
199
+ <mat-select
200
+ panelWidth=""
201
+ panelClass="watt-phone-field__select"
202
+ [hideSingleSelectionIndicator]="true"
203
+ [value]="chosenCountry().countryIsoCode"
204
+ (selectionChange)="selectedContry($event)"
205
+ >
206
+ <mat-select-trigger>
207
+ <watt-flag [country]="chosenCountry().countryIsoCode" />
208
+ </mat-select-trigger>
209
+ @for (contry of countries; track contry; let index = $index) {
210
+ <mat-option value="{{ contry.countryIsoCode }}">
211
+ <watt-flag [country]="contry.countryIsoCode" />
212
+ <div>{{ getCountryName(contry.countryIsoCode) }}</div>
213
+ </mat-option>
214
+ }
215
+ </mat-select>
216
+ <input
217
+ [attr.aria-label]="label()"
218
+ autocomplete="tel"
219
+ inputmode="tel"
220
+ [value]="value"
221
+ [formControl]="formControl()"
222
+ (blur)="onTouched()"
223
+ (input)="onChanged($event)"
224
+ [maskito]="mask"
225
+ #phoneNumberInput
226
+ />
227
+ </div>
228
+ <ng-content ngProjectAs="watt-field-hint" select="watt-field-hint" />
229
+ <ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
230
+ @if (formControl().hasError('invalidPhone')) {
231
+ <watt-field-error> {{ intl.invalidPhoneNumber }} </watt-field-error>
232
+ }
233
+ </watt-field>
234
+ `, isInline: true, styles: [".watt-phone-field__select.mat-mdc-select-panel{--mat-option-label-text-size: 14px;overflow-y:scroll}.watt-phone-field__select.mat-mdc-select-panel watt-icon{margin-right:var(--watt-space-s)}.watt-phone-field__select.mat-mdc-select-panel watt-icon .mat-icon{margin-right:0}.watt-phone-field__select.mat-mdc-select-panel .mat-mdc-option.mdc-list-item .mdc-list-item__primary-text{display:flex;width:100%;align-items:center;gap:var(--watt-space-xs)}watt-phone-field{display:block}watt-phone-field .watt-phone-field__prefix-container{width:100%;display:flex;align-items:center;gap:var(--watt-space-xs)}watt-phone-field input{width:100%;border:none}watt-phone-field input:focus-visible,watt-phone-field input:focus-within{border:none;outline:none}watt-phone-field .mat-mdc-select{width:auto;height:24px}watt-phone-field .mat-mdc-select .mat-mdc-select-arrow-wrapper{width:24px;justify-content:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "component", type: WattFieldErrorComponent, selector: "watt-field-error" }, { kind: "component", type: WattFlagComponent, selector: "watt-flag", inputs: ["country", "label", "size"] }], encapsulation: i0.ViewEncapsulation.None });
235
+ }
236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldComponent, decorators: [{
237
+ type: Component,
238
+ args: [{ selector: 'watt-phone-field', encapsulation: ViewEncapsulation.None, imports: [
239
+ ReactiveFormsModule,
240
+ MatSelectModule,
241
+ MaskitoDirective,
242
+ WattFieldComponent,
243
+ WattFieldErrorComponent,
244
+ WattFlagComponent,
245
+ ], providers: [
246
+ {
247
+ provide: NG_VALUE_ACCESSOR,
248
+ useExisting: forwardRef(() => WattPhoneFieldComponent),
249
+ multi: true,
250
+ },
251
+ ], template: `
252
+ <watt-field [label]="label()" [control]="formControl()">
253
+ <div class="watt-phone-field__prefix-container">
254
+ <mat-select
255
+ panelWidth=""
256
+ panelClass="watt-phone-field__select"
257
+ [hideSingleSelectionIndicator]="true"
258
+ [value]="chosenCountry().countryIsoCode"
259
+ (selectionChange)="selectedContry($event)"
260
+ >
261
+ <mat-select-trigger>
262
+ <watt-flag [country]="chosenCountry().countryIsoCode" />
263
+ </mat-select-trigger>
264
+ @for (contry of countries; track contry; let index = $index) {
265
+ <mat-option value="{{ contry.countryIsoCode }}">
266
+ <watt-flag [country]="contry.countryIsoCode" />
267
+ <div>{{ getCountryName(contry.countryIsoCode) }}</div>
268
+ </mat-option>
269
+ }
270
+ </mat-select>
271
+ <input
272
+ [attr.aria-label]="label()"
273
+ autocomplete="tel"
274
+ inputmode="tel"
275
+ [value]="value"
276
+ [formControl]="formControl()"
277
+ (blur)="onTouched()"
278
+ (input)="onChanged($event)"
279
+ [maskito]="mask"
280
+ #phoneNumberInput
281
+ />
282
+ </div>
283
+ <ng-content ngProjectAs="watt-field-hint" select="watt-field-hint" />
284
+ <ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
285
+ @if (formControl().hasError('invalidPhone')) {
286
+ <watt-field-error> {{ intl.invalidPhoneNumber }} </watt-field-error>
287
+ }
288
+ </watt-field>
289
+ `, styles: [".watt-phone-field__select.mat-mdc-select-panel{--mat-option-label-text-size: 14px;overflow-y:scroll}.watt-phone-field__select.mat-mdc-select-panel watt-icon{margin-right:var(--watt-space-s)}.watt-phone-field__select.mat-mdc-select-panel watt-icon .mat-icon{margin-right:0}.watt-phone-field__select.mat-mdc-select-panel .mat-mdc-option.mdc-list-item .mdc-list-item__primary-text{display:flex;width:100%;align-items:center;gap:var(--watt-space-xs)}watt-phone-field{display:block}watt-phone-field .watt-phone-field__prefix-container{width:100%;display:flex;align-items:center;gap:var(--watt-space-xs)}watt-phone-field input{width:100%;border:none}watt-phone-field input:focus-visible,watt-phone-field input:focus-within{border:none;outline:none}watt-phone-field .mat-mdc-select{width:auto;height:24px}watt-phone-field .mat-mdc-select .mat-mdc-select-arrow-wrapper{width:24px;justify-content:center}\n"] }]
290
+ }], propDecorators: { isDisabled: [{
291
+ type: HostBinding,
292
+ args: ['attr.watt-field-disabled']
293
+ }], phoneNumberInput: [{
294
+ type: ViewChild,
295
+ args: ['phoneNumberInput']
296
+ }] } });
297
+
298
+ //#region License
299
+ /**
300
+ * @license
301
+ * Copyright 2020 Energinet DataHub A/S
302
+ *
303
+ * Licensed under the Apache License, Version 2.0 (the "License2");
304
+ * you may not use this file except in compliance with the License.
305
+ * You may obtain a copy of the License at
306
+ *
307
+ * http://www.apache.org/licenses/LICENSE-2.0
308
+ *
309
+ * Unless required by applicable law or agreed to in writing, software
310
+ * distributed under the License is distributed on an "AS IS" BASIS,
311
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
312
+ * See the License for the specific language governing permissions and
313
+ * limitations under the License.
314
+ */
315
+ //#endregion
316
+
317
+ /**
318
+ * Generated bundle index. Do not edit.
319
+ */
320
+
321
+ export { WattPhoneFieldComponent, WattPhoneFieldIntlService };
322
+ //# sourceMappingURL=energinet-watt-phone-field.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energinet-watt-phone-field.mjs","sources":["../../../libs/watt/package/phone-field/watt-phone-field-intl.service.ts","../../../libs/watt/package/phone-field/watt-phone-field.component.ts","../../../libs/watt/package/phone-field/index.ts","../../../libs/watt/package/phone-field/energinet-watt-phone-field.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattPhoneFieldIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n invalidPhoneNumber = 'Invalid phone number';\n DK = 'Denmark';\n DE = 'Germany';\n FI = 'Finland';\n NO = 'Norway';\n SE = 'Sweden';\n PL = 'Poland';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ElementRef,\n HostBinding,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n} from '@angular/forms';\nimport { MaskitoDirective } from '@maskito/angular';\nimport { MatSelectChange, MatSelectModule } from '@angular/material/select';\nimport { MASKITO_DEFAULT_OPTIONS, maskitoTransform } from '@maskito/core';\nimport { maskitoPhoneOptionsGenerator } from '@maskito/phone';\nimport { isValidPhoneNumber, type CountryCode } from 'libphonenumber-js';\nimport phoneMetadata from 'libphonenumber-js/min/metadata';\n\nimport { WattFlagComponent } from '@energinet/watt/icon/flags';\nimport { WattFieldComponent, WattFieldErrorComponent } from '@energinet/watt/field';\n\nimport { WattPhoneFieldIntlService } from './watt-phone-field-intl.service';\n\ntype Contry = {\n countryIsoCode: CountryCode;\n phoneExtension: string;\n};\n\nfunction phoneValidator(countryCode: CountryCode): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (!control.value) return null;\n const valid = isValidPhoneNumber(control.value, countryCode);\n\n return valid ? null : { invalidPhone: true };\n };\n}\n\n@Component({\n selector: 'watt-phone-field',\n encapsulation: ViewEncapsulation.None,\n imports: [\n ReactiveFormsModule,\n MatSelectModule,\n MaskitoDirective,\n WattFieldComponent,\n WattFieldErrorComponent,\n WattFlagComponent,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattPhoneFieldComponent),\n multi: true,\n },\n ],\n template: `\n <watt-field [label]=\"label()\" [control]=\"formControl()\">\n <div class=\"watt-phone-field__prefix-container\">\n <mat-select\n panelWidth=\"\"\n panelClass=\"watt-phone-field__select\"\n [hideSingleSelectionIndicator]=\"true\"\n [value]=\"chosenCountry().countryIsoCode\"\n (selectionChange)=\"selectedContry($event)\"\n >\n <mat-select-trigger>\n <watt-flag [country]=\"chosenCountry().countryIsoCode\" />\n </mat-select-trigger>\n @for (contry of countries; track contry; let index = $index) {\n <mat-option value=\"{{ contry.countryIsoCode }}\">\n <watt-flag [country]=\"contry.countryIsoCode\" />\n <div>{{ getCountryName(contry.countryIsoCode) }}</div>\n </mat-option>\n }\n </mat-select>\n <input\n [attr.aria-label]=\"label()\"\n autocomplete=\"tel\"\n inputmode=\"tel\"\n [value]=\"value\"\n [formControl]=\"formControl()\"\n (blur)=\"onTouched()\"\n (input)=\"onChanged($event)\"\n [maskito]=\"mask\"\n #phoneNumberInput\n />\n </div>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n @if (formControl().hasError('invalidPhone')) {\n <watt-field-error> {{ intl.invalidPhoneNumber }} </watt-field-error>\n }\n </watt-field>\n `,\n styleUrl: './watt-phone-field.component.scss',\n})\nexport class WattPhoneFieldComponent implements ControlValueAccessor, OnInit {\n /** @ignore */\n readonly countries: Contry[] = [\n { countryIsoCode: 'DK', phoneExtension: '+45' },\n { countryIsoCode: 'SE', phoneExtension: '+46' },\n { countryIsoCode: 'NO', phoneExtension: '+47' },\n { countryIsoCode: 'DE', phoneExtension: '+49' },\n { countryIsoCode: 'FI', phoneExtension: '+358' },\n { countryIsoCode: 'PL', phoneExtension: '+48' },\n ];\n\n formControl = input.required<FormControl>();\n label = input<string>();\n\n /** @ignore */\n chosenCountry = signal<Contry>(this.countries[0]);\n\n /** @ignore */\n mask = MASKITO_DEFAULT_OPTIONS;\n\n /** @ignore */\n intl = inject(WattPhoneFieldIntlService);\n\n /** @ignore */\n @HostBinding('attr.watt-field-disabled')\n isDisabled = false;\n\n /** @ignore */\n value: string | null = null;\n\n /** @ignore */\n @ViewChild('phoneNumberInput') phoneNumberInput!: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n ngOnInit(): void {\n this.setup();\n }\n\n /** @ignore */\n writeValue(value: string): void {\n if (value) {\n const country = this.countries.find((country) => value.startsWith(country.phoneExtension));\n\n if (country) {\n // Exclude Signal from being tracked\n // in case the parent component sets the value inside an `effect`.\n // Without this, updating the Signal internaly triggers the parrent `effect` to re-run.\n // Note: Revisit once v19 is released because the `effect` API has changed\n // significantly and this might not be necessary anymore\n untracked(() => {\n this.setCountry(country);\n });\n\n value = maskitoTransform(value, this.mask);\n }\n }\n\n this.value = value;\n }\n\n /** @ignore */\n onChange: (value: string) => void = () => {\n /* noop function */\n };\n\n /** @ignore */\n onTouched: () => void = () => {\n /* noop function */\n };\n\n /** @ignore */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled = isDisabled;\n }\n\n /** @ignore */\n selectedContry({ value }: MatSelectChange) {\n const country = this.countries.find((contry) => contry.countryIsoCode === value);\n\n if (!country) {\n throw new Error('Prefix not found');\n }\n\n this.setCountry(country);\n this.formControl().reset();\n\n setTimeout(() => {\n this.phoneNumberInput.nativeElement.focus();\n }, 100);\n }\n\n /** @ignore */\n setCountry(country: Contry) {\n this.chosenCountry.set(country);\n this.setup();\n }\n\n /** @ignore */\n onChanged(event: Event): void {\n const value = (event.target as HTMLSelectElement)?.value;\n this.onChange(value);\n }\n\n /** @ignore */\n private generatePhoneOptions(): void {\n const phoneOptions = maskitoPhoneOptionsGenerator({\n countryIsoCode: this.chosenCountry().countryIsoCode,\n metadata: phoneMetadata,\n separator: ' ',\n });\n\n this.mask = phoneOptions;\n }\n\n /** @ignore */\n private setup(): void {\n this.generatePhoneOptions();\n this.setValidator();\n }\n\n /** @ignore */\n private setValidator() {\n const countryCode = this.chosenCountry().countryIsoCode;\n this.formControl().addValidators(phoneValidator(countryCode));\n }\n\n /** @ignore */\n getCountryName(countryIsoCode: CountryCode) {\n return this.intl[countryIsoCode as keyof WattPhoneFieldIntlService];\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 { WattPhoneFieldComponent } from './watt-phone-field.component';\nexport { WattPhoneFieldIntlService } from './watt-phone-field-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],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