@energinet/watt 1.5.4 → 1.5.6

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.
@@ -258,6 +258,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
258
258
  }]
259
259
  }] });
260
260
 
261
+ //#region License
262
+ /**
263
+ * @license
264
+ * Copyright 2020 Energinet DataHub A/S
265
+ *
266
+ * Licensed under the Apache License, Version 2.0 (the "License2");
267
+ * you may not use this file except in compliance with the License.
268
+ * You may obtain a copy of the License at
269
+ *
270
+ * http://www.apache.org/licenses/LICENSE-2.0
271
+ *
272
+ * Unless required by applicable law or agreed to in writing, software
273
+ * distributed under the License is distributed on an "AS IS" BASIS,
274
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
275
+ * See the License for the specific language governing permissions and
276
+ * limitations under the License.
277
+ */
278
+ //#endregion
279
+ class WattFlagNetherlandsComponent {
280
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFlagNetherlandsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
281
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattFlagNetherlandsComponent, isStandalone: true, selector: "watt-flag-nl", ngImport: i0, template: `
282
+ <svg viewBox="0 0 640 480">
283
+ <path fill="#21468b" d="M0 0h640v480H0z" />
284
+ <path fill="#fff" d="M0 160h640v160H0z" />
285
+ <path fill="#ae1c28" d="M0 320h640v160H0z" />
286
+ </svg>
287
+ `, isInline: true });
288
+ }
289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFlagNetherlandsComponent, decorators: [{
290
+ type: Component,
291
+ args: [{
292
+ selector: 'watt-flag-nl',
293
+ template: `
294
+ <svg viewBox="0 0 640 480">
295
+ <path fill="#21468b" d="M0 0h640v480H0z" />
296
+ <path fill="#fff" d="M0 160h640v160H0z" />
297
+ <path fill="#ae1c28" d="M0 320h640v160H0z" />
298
+ </svg>
299
+ `,
300
+ }]
301
+ }] });
302
+
261
303
  //#region License
262
304
  /**
263
305
  * @license
@@ -305,9 +347,12 @@ class WattFlagComponent {
305
347
  @case ('SE') {
306
348
  <watt-flag-se />
307
349
  }
350
+ @case ('NL') {
351
+ <watt-flag-nl />
352
+ }
308
353
  }
309
354
  </watt-icon>
310
- `, isInline: true, dependencies: [{ kind: "component", type: WattFlagDenmarkComponent, selector: "watt-flag-dk" }, { kind: "component", type: WattFlagFinlandComponent, selector: "watt-flag-fi" }, { kind: "component", type: WattFlagGermanyComponent, selector: "watt-flag-de" }, { kind: "component", type: WattFlagNorwayComponent, selector: "watt-flag-no" }, { kind: "component", type: WattFlagPolandComponent, selector: "watt-flag-pl" }, { kind: "component", type: WattFlagSwedenComponent, selector: "watt-flag-se" }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }] });
355
+ `, isInline: true, dependencies: [{ kind: "component", type: WattFlagDenmarkComponent, selector: "watt-flag-dk" }, { kind: "component", type: WattFlagFinlandComponent, selector: "watt-flag-fi" }, { kind: "component", type: WattFlagGermanyComponent, selector: "watt-flag-de" }, { kind: "component", type: WattFlagNorwayComponent, selector: "watt-flag-no" }, { kind: "component", type: WattFlagPolandComponent, selector: "watt-flag-pl" }, { kind: "component", type: WattFlagSwedenComponent, selector: "watt-flag-se" }, { kind: "component", type: WattFlagNetherlandsComponent, selector: "watt-flag-nl" }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }] });
311
356
  }
312
357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFlagComponent, decorators: [{
313
358
  type: Component,
@@ -320,6 +365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
320
365
  WattFlagNorwayComponent,
321
366
  WattFlagPolandComponent,
322
367
  WattFlagSwedenComponent,
368
+ WattFlagNetherlandsComponent,
323
369
  WattIconComponent,
324
370
  ],
325
371
  template: `
@@ -343,6 +389,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
343
389
  @case ('SE') {
344
390
  <watt-flag-se />
345
391
  }
392
+ @case ('NL') {
393
+ <watt-flag-nl />
394
+ }
346
395
  }
347
396
  </watt-icon>
348
397
  `,
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-icon-flags.mjs","sources":["../../../libs/watt/package/icon/flags/watt-flag-dk.ts","../../../libs/watt/package/icon/flags/watt-flag-fi.ts","../../../libs/watt/package/icon/flags/watt-flag-de.ts","../../../libs/watt/package/icon/flags/watt-flag-no.ts","../../../libs/watt/package/icon/flags/watt-flag-pl.ts","../../../libs/watt/package/icon/flags/watt-flag-se.ts","../../../libs/watt/package/icon/flags/watt-flag.ts","../../../libs/watt/package/icon/flags/index.ts","../../../libs/watt/package/icon/flags/energinet-watt-icon-flags.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-dk',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#c8102e\" d=\"M0 0h640.1v480H0z\" />\n <path fill=\"#fff\" d=\"M205.7 0h68.6v480h-68.6z\" />\n <path fill=\"#fff\" d=\"M0 205.7h640.1v68.6H0z\" />\n </svg>\n `,\n})\nexport class WattFlagDenmarkComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-fi',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#fff\" d=\"M0 0h640v480H0z\" />\n <path fill=\"#002f6c\" d=\"M0 174.5h640v131H0z\" />\n <path fill=\"#002f6c\" d=\"M175.5 0h130.9v480h-131z\" />\n </svg>\n `,\n})\nexport class WattFlagFinlandComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-de',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#ffce00\" d=\"M0 320h640v160H0z\" />\n <path fill=\"#000001\" d=\"M0 0h640v160H0z\" />\n <path fill=\"red\" d=\"M0 160h640v160H0z\" />\n </svg>\n `,\n})\nexport class WattFlagGermanyComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-no',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#ed2939\" d=\"M0 0h640v480H0z\" />\n <path fill=\"#fff\" d=\"M180 0h120v480H180z\" />\n <path fill=\"#fff\" d=\"M0 180h640v120H0z\" />\n <path fill=\"#002664\" d=\"M210 0h60v480h-60z\" />\n <path fill=\"#002664\" d=\"M0 210h640v60H0z\" />\n </svg>\n `,\n})\nexport class WattFlagNorwayComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-pl',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <g fill-rule=\"evenodd\">\n <path fill=\"#fff\" d=\"M640 480H0V0h640z\" />\n <path fill=\"#dc143c\" d=\"M640 480H0V240h640z\" />\n </g>\n </svg>\n `,\n})\nexport class WattFlagPolandComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-se',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#005293\" d=\"M0 0h640v480H0z\" />\n <path fill=\"#fecb00\" d=\"M176 0v192H0v96h176v192h96V288h368v-96H272V0z\" />\n </svg>\n `,\n})\nexport class WattFlagSwedenComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, input } from '@angular/core';\nimport { CountryCode } from 'libphonenumber-js';\nimport { WattIconComponent, WattIconSize } from '@energinet/watt/icon';\nimport { WattFlagDenmarkComponent } from './watt-flag-dk';\nimport { WattFlagFinlandComponent } from './watt-flag-fi';\nimport { WattFlagGermanyComponent } from './watt-flag-de';\nimport { WattFlagNorwayComponent } from './watt-flag-no';\nimport { WattFlagPolandComponent } from './watt-flag-pl';\nimport { WattFlagSwedenComponent } from './watt-flag-se';\n\n@Component({\n selector: 'watt-flag',\n imports: [\n WattFlagDenmarkComponent,\n WattFlagFinlandComponent,\n WattFlagGermanyComponent,\n WattFlagNorwayComponent,\n WattFlagPolandComponent,\n WattFlagSwedenComponent,\n WattIconComponent,\n ],\n template: `\n <watt-icon [size]=\"size()\" [label]=\"label()\">\n @switch (country()) {\n @case ('DK') {\n <watt-flag-dk />\n }\n @case ('DE') {\n <watt-flag-de />\n }\n @case ('FI') {\n <watt-flag-fi />\n }\n @case ('NO') {\n <watt-flag-no />\n }\n @case ('PL') {\n <watt-flag-pl />\n }\n @case ('SE') {\n <watt-flag-se />\n }\n }\n </watt-icon>\n `,\n})\nexport class WattFlagComponent {\n /** Country code of the flag. */\n country = input.required<CountryCode>();\n\n /** Accessible label for the icon. */\n label = input<string>();\n\n /** Size of the icon. */\n size = input<WattIconSize>('m');\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 { WattFlagComponent } from './watt-flag';\nexport { WattFlagDenmarkComponent } from './watt-flag-dk';\nexport { WattFlagFinlandComponent } from './watt-flag-fi';\nexport { WattFlagGermanyComponent } from './watt-flag-de';\nexport { WattFlagNorwayComponent } from './watt-flag-no';\nexport { WattFlagPolandComponent } from './watt-flag-pl';\nexport { WattFlagSwedenComponent } from './watt-flag-se';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAaa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EARzB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,E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IAAA,EACvB,uBAAuB,EAAA,QAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACvB,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FA2BR,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApC7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,wBAAwB;wBACxB,wBAAwB;wBACxB,uBAAuB;wBACvB,uBAAuB;wBACvB,uBAAuB;wBACvB,iBAAiB;AAClB,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;AAuBT,EAAA,CAAA;AACF,iBAAA;;;AC/DD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-icon-flags.mjs","sources":["../../../libs/watt/package/icon/flags/watt-flag-dk.ts","../../../libs/watt/package/icon/flags/watt-flag-fi.ts","../../../libs/watt/package/icon/flags/watt-flag-de.ts","../../../libs/watt/package/icon/flags/watt-flag-no.ts","../../../libs/watt/package/icon/flags/watt-flag-pl.ts","../../../libs/watt/package/icon/flags/watt-flag-se.ts","../../../libs/watt/package/icon/flags/watt-flag-nl.ts","../../../libs/watt/package/icon/flags/watt-flag.ts","../../../libs/watt/package/icon/flags/index.ts","../../../libs/watt/package/icon/flags/energinet-watt-icon-flags.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-dk',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#c8102e\" d=\"M0 0h640.1v480H0z\" />\n <path fill=\"#fff\" d=\"M205.7 0h68.6v480h-68.6z\" />\n <path fill=\"#fff\" d=\"M0 205.7h640.1v68.6H0z\" />\n </svg>\n `,\n})\nexport class WattFlagDenmarkComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-fi',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#fff\" d=\"M0 0h640v480H0z\" />\n <path fill=\"#002f6c\" d=\"M0 174.5h640v131H0z\" />\n <path fill=\"#002f6c\" d=\"M175.5 0h130.9v480h-131z\" />\n </svg>\n `,\n})\nexport class WattFlagFinlandComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-de',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#ffce00\" d=\"M0 320h640v160H0z\" />\n <path fill=\"#000001\" d=\"M0 0h640v160H0z\" />\n <path fill=\"red\" d=\"M0 160h640v160H0z\" />\n </svg>\n `,\n})\nexport class WattFlagGermanyComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-no',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#ed2939\" d=\"M0 0h640v480H0z\" />\n <path fill=\"#fff\" d=\"M180 0h120v480H180z\" />\n <path fill=\"#fff\" d=\"M0 180h640v120H0z\" />\n <path fill=\"#002664\" d=\"M210 0h60v480h-60z\" />\n <path fill=\"#002664\" d=\"M0 210h640v60H0z\" />\n </svg>\n `,\n})\nexport class WattFlagNorwayComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-pl',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <g fill-rule=\"evenodd\">\n <path fill=\"#fff\" d=\"M640 480H0V0h640z\" />\n <path fill=\"#dc143c\" d=\"M640 480H0V240h640z\" />\n </g>\n </svg>\n `,\n})\nexport class WattFlagPolandComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-se',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#005293\" d=\"M0 0h640v480H0z\" />\n <path fill=\"#fecb00\" d=\"M176 0v192H0v96h176v192h96V288h368v-96H272V0z\" />\n </svg>\n `,\n})\nexport class WattFlagSwedenComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-nl',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <path fill=\"#21468b\" d=\"M0 0h640v480H0z\" />\n <path fill=\"#fff\" d=\"M0 160h640v160H0z\" />\n <path fill=\"#ae1c28\" d=\"M0 320h640v160H0z\" />\n </svg>\n `,\n})\nexport class WattFlagNetherlandsComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, input } from '@angular/core';\nimport { CountryCode } from 'libphonenumber-js';\n\nimport { WattIconComponent, WattIconSize } from '@energinet/watt/icon';\n\nimport { WattFlagDenmarkComponent } from './watt-flag-dk';\nimport { WattFlagFinlandComponent } from './watt-flag-fi';\nimport { WattFlagGermanyComponent } from './watt-flag-de';\nimport { WattFlagNorwayComponent } from './watt-flag-no';\nimport { WattFlagPolandComponent } from './watt-flag-pl';\nimport { WattFlagSwedenComponent } from './watt-flag-se';\nimport { WattFlagNetherlandsComponent } from './watt-flag-nl';\n\n@Component({\n selector: 'watt-flag',\n imports: [\n WattFlagDenmarkComponent,\n WattFlagFinlandComponent,\n WattFlagGermanyComponent,\n WattFlagNorwayComponent,\n WattFlagPolandComponent,\n WattFlagSwedenComponent,\n WattFlagNetherlandsComponent,\n WattIconComponent,\n ],\n template: `\n <watt-icon [size]=\"size()\" [label]=\"label()\">\n @switch (country()) {\n @case ('DK') {\n <watt-flag-dk />\n }\n @case ('DE') {\n <watt-flag-de />\n }\n @case ('FI') {\n <watt-flag-fi />\n }\n @case ('NO') {\n <watt-flag-no />\n }\n @case ('PL') {\n <watt-flag-pl />\n }\n @case ('SE') {\n <watt-flag-se />\n }\n @case ('NL') {\n <watt-flag-nl />\n }\n }\n </watt-icon>\n `,\n})\nexport class WattFlagComponent {\n /** Country code of the flag. */\n country = input.required<CountryCode>();\n\n /** Accessible label for the icon. */\n label = input<string>();\n\n /** Size of the icon. */\n size = input<WattIconSize>('m');\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 { WattFlagComponent } from './watt-flag';\nexport { WattFlagDenmarkComponent } from './watt-flag-dk';\nexport { WattFlagFinlandComponent } from './watt-flag-fi';\nexport { WattFlagGermanyComponent } from './watt-flag-de';\nexport { WattFlagNorwayComponent } from './watt-flag-no';\nexport { WattFlagPolandComponent } from './watt-flag-pl';\nexport { WattFlagSwedenComponent } from './watt-flag-se';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAaa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EARzB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;AAMT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEU,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAVpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE;;;;;;AAM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12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
45
46
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldIntlService, providedIn: 'root' });
46
47
  }
@@ -84,6 +85,7 @@ class WattPhoneFieldComponent {
84
85
  { countryIsoCode: 'DE', phoneExtension: '+49' },
85
86
  { countryIsoCode: 'FI', phoneExtension: '+358' },
86
87
  { countryIsoCode: 'PL', phoneExtension: '+48' },
88
+ { countryIsoCode: 'NL', phoneExtension: '+31' },
87
89
  ];
88
90
  formControl = input.required();
89
91
  label = input();
@@ -1 +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"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,yBAAyB,CAAA;AAC3B,IAAA,OAAO,GAAkB,IAAI,OAAO,EAAQ;IACrD,kBAAkB,GAAG,sBAAsB;IAC3C,EAAE,GAAG,SAAS;IACd,EAAE,GAAG,SAAS;IACd,EAAE,GAAG,SAAS;IACd,EAAE,GAAG,QAAQ;IACb,EAAE,GAAG,QAAQ;IACb,EAAE,GAAG,QAAQ;uGARF,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAA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AA,EAAA,WAAA,EAAA,IAAA,EAClB,uBAAuB,EAAA,QAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACvB,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAkDR,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBA3DnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EACb,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA;wBACP,mBAAmB;wBACnB,eAAe;wBACf,gBAAgB;wBAChB,kBAAkB;wBAClB,uBAAuB;wBACvB,iBAAiB;qBAClB,EACU,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,6BAA6B,CAAC;AACtD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EACS,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,m4BAAA,CAAA,EAAA;8BA4BD,UAAU,EAAA,CAAA;sBADT,WAAW;uBAAC,0BAA0B;gBAOR,gBAAgB,EAAA,CAAA;sBAA9C,SAAS;uBAAC,kBAAkB;;;AC5J/B;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
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 NL = 'Netherlands';\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 { countryIsoCode: 'NL', phoneExtension: '+31' },\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"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,yBAAyB,CAAA;AAC3B,IAAA,OAAO,GAAkB,IAAI,OAAO,EAAQ;IACrD,kBAAkB,GAAG,sBAAsB;IAC3C,EAAE,GAAG,SAAS;IACd,EAAE,GAAG,SAAS;IACd,EAAE,GAAG,SAAS;IACd,EAAE,GAAG,QAAQ;IACb,EAAE,GAAG,QAAQ;IACb,EAAE,GAAG,QAAQ;IACb,EAAE,GAAG,aAAa;uGATP,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACrBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAwCA,SAAS,cAAc,CAAC,WAAwB,EAAA;IAC9C,OAAO,CAAC,OAAwB,KAA6B;QAC3D,IAAI,CAAC,OAAO,CAAC,KAAK;AAAE,YAAA,OAAO,IAAI;QAC/B,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;AAE5D,QAAA,OAAO,KAAK,GAAG,IAAI,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE;AAC9C,KAAC;AACH;MA6Da,uBAAuB,CAAA;;AAEzB,IAAA,SAAS,GAAa;AAC7B,QAAA,EAAE,cAAc,EAAE,IAAI,EAAE,c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BAAkB;wBAClB,uBAAuB;wBACvB,iBAAiB;qBAClB,EACU,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,6BAA6B,CAAC;AACtD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EACS,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,m4BAAA,CAAA,EAAA;8BA6BD,UAAU,EAAA,CAAA;sBADT,WAAW;uBAAC,0BAA0B;gBAOR,gBAAgB,EAAA,CAAA;sBAA9C,SAAS;uBAAC,kBAAkB;;;AC7J/B;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -54,8 +54,13 @@ class WattQueryParamsDirective {
54
54
  // after which arrays are parsed as objects
55
55
  // See https://github.com/ljharb/qs?tab=readme-ov-file#parsing-arrays
56
56
  arrayLimit: 200,
57
- // https://github.com/ljharb/qs/issues/91#issuecomment-1833694874
57
+ // See https://github.com/ljharb/qs/issues/91#issuecomment-1833694874
58
58
  decoder(str, defaultDecoder, charset, type) {
59
+ // Custom logic not part of the GitHub comment above
60
+ // Handles "YYYY-MM" dates
61
+ if (type === 'value' && /\d{4}-\d{2}$/.test(str)) {
62
+ return defaultDecoder(str, defaultDecoder, charset);
63
+ }
59
64
  if (type === 'value' &&
60
65
  /^(?:-(?:[1-9](?:\d{0,2}(?:,\d{3})+|\d*))|(?:0|(?:[1-9](?:\d{0,2}(?:,\d{3})+|\d*))))(?:.\d+|)$/.test(str)) {
61
66
  return parseFloat(str);
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-query-params.mjs","sources":["../../../libs/watt/package/query-params/watt-query-params.directive.ts","../../../libs/watt/package/query-params/index.ts","../../../libs/watt/package/query-params/energinet-watt-query-params.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 { DestroyRef, Directive, OnInit, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormGroupDirective } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport qs from 'qs';\n\nconst filtersKey = 'filters';\n\n@Directive({\n selector: '[formGroup][wattQueryParams]',\n})\nexport class WattQueryParamsDirective implements OnInit {\n private formGroup = inject(FormGroupDirective);\n private destoryRef = inject(DestroyRef);\n private router = inject(Router);\n private route = inject(ActivatedRoute);\n\n // eslint-disable-next-line sonarjs/cognitive-complexity\n ngOnInit(): void {\n this.formGroup.valueChanges\n ?.pipe(takeUntilDestroyed(this.destoryRef))\n .subscribe((formValues) => {\n const formValuesClone = structuredClone(formValues);\n\n for (const key in formValuesClone) {\n if (formValuesClone[key] === null || formValuesClone[key] === undefined) {\n delete formValuesClone[key];\n }\n }\n\n const hasSetProperties = Object.keys(formValuesClone).length > 0;\n\n this.router.navigate([], {\n replaceUrl: true,\n relativeTo: this.route,\n queryParams: { [filtersKey]: hasSetProperties ? qs.stringify(formValuesClone) : null },\n queryParamsHandling: 'merge',\n });\n });\n\n if (Object.keys(this.route.snapshot.queryParams).length > 0) {\n const value = qs.parse(this.route.snapshot.queryParams[filtersKey] ?? '', {\n // Needed because `qs` library has a default value of 20 elements\n // after which arrays are parsed as objects\n // See https://github.com/ljharb/qs?tab=readme-ov-file#parsing-arrays\n arrayLimit: 200,\n // https://github.com/ljharb/qs/issues/91#issuecomment-1833694874\n decoder(\n str: string,\n defaultDecoder: qs.defaultDecoder,\n charset: string,\n type: 'key' | 'value'\n ) {\n if (\n type === 'value' &&\n /^(?:-(?:[1-9](?:\\d{0,2}(?:,\\d{3})+|\\d*))|(?:0|(?:[1-9](?:\\d{0,2}(?:,\\d{3})+|\\d*))))(?:.\\d+|)$/.test(\n str\n )\n ) {\n return parseFloat(str);\n }\n\n const keywords: Record<string, boolean | null | undefined> = {\n true: true,\n false: false,\n null: null,\n undefined: undefined,\n };\n if (type === 'value' && str in keywords) {\n return keywords[str];\n }\n\n return defaultDecoder(str, defaultDecoder, charset);\n },\n });\n\n this.formGroup.control.patchValue(value);\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 { WattQueryParamsDirective } from './watt-query-params.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAOA,MAAM,UAAU,GAAG,SAAS;MAKf,wBAAwB,CAAA;AAC3B,IAAA,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACtC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;;IAGtC,QAAQ,GAAA;QACN,IAAI,CAAC,SAAS,CAAC;cACX,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC;AACzC,aAAA,SAAS,CAAC,CAAC,UAAU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AACV,wBAAA,KAAK,EAAE,KAAK;AACZ,wBAAA,IAAI,EAAE,IAAI;AACV,wBAAA,SAAS,EAAE,SAAS;qBACrB;oBACD,IAAI,IAAI,KAAK,OAAO,IAAI,GAAG,IAAI,QAAQ,EAAE;AACvC,wBAAA,OAAO,QAAQ,CAAC,GAAG,CAAC;;oBAGtB,OAAO,cAAc,CAAC,GAAG,EAAE,cAAc,EAAE,OAAO,CAAC;iBACpD;AACF,aAAA,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;;;uGAjEjC,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACzC,iBAAA;;;AC5BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-query-params.mjs","sources":["../../../libs/watt/package/query-params/watt-query-params.directive.ts","../../../libs/watt/package/query-params/index.ts","../../../libs/watt/package/query-params/energinet-watt-query-params.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 { DestroyRef, Directive, OnInit, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormGroupDirective } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport qs from 'qs';\n\nconst filtersKey = 'filters';\n\n@Directive({\n selector: '[formGroup][wattQueryParams]',\n})\nexport class WattQueryParamsDirective implements OnInit {\n private formGroup = inject(FormGroupDirective);\n private destoryRef = inject(DestroyRef);\n private router = inject(Router);\n private route = inject(ActivatedRoute);\n\n // eslint-disable-next-line sonarjs/cognitive-complexity\n ngOnInit(): void {\n this.formGroup.valueChanges\n ?.pipe(takeUntilDestroyed(this.destoryRef))\n .subscribe((formValues) => {\n const formValuesClone = structuredClone(formValues);\n\n for (const key in formValuesClone) {\n if (formValuesClone[key] === null || formValuesClone[key] === undefined) {\n delete formValuesClone[key];\n }\n }\n\n const hasSetProperties = Object.keys(formValuesClone).length > 0;\n\n this.router.navigate([], {\n replaceUrl: true,\n relativeTo: this.route,\n queryParams: { [filtersKey]: hasSetProperties ? qs.stringify(formValuesClone) : null },\n queryParamsHandling: 'merge',\n });\n });\n\n if (Object.keys(this.route.snapshot.queryParams).length > 0) {\n const value = qs.parse(this.route.snapshot.queryParams[filtersKey] ?? '', {\n // Needed because `qs` library has a default value of 20 elements\n // after which arrays are parsed as objects\n // See https://github.com/ljharb/qs?tab=readme-ov-file#parsing-arrays\n arrayLimit: 200,\n // See https://github.com/ljharb/qs/issues/91#issuecomment-1833694874\n decoder(\n str: string,\n defaultDecoder: qs.defaultDecoder,\n charset: string,\n type: 'key' | 'value'\n ) {\n // Custom logic not part of the GitHub comment above\n // Handles \"YYYY-MM\" dates\n if (type === 'value' && /\\d{4}-\\d{2}$/.test(str)) {\n return defaultDecoder(str, defaultDecoder, charset);\n }\n\n if (\n type === 'value' &&\n /^(?:-(?:[1-9](?:\\d{0,2}(?:,\\d{3})+|\\d*))|(?:0|(?:[1-9](?:\\d{0,2}(?:,\\d{3})+|\\d*))))(?:.\\d+|)$/.test(\n str\n )\n ) {\n return parseFloat(str);\n }\n\n const keywords: Record<string, boolean | null | undefined> = {\n true: true,\n false: false,\n null: null,\n undefined: undefined,\n };\n if (type === 'value' && str in keywords) {\n return keywords[str];\n }\n\n return defaultDecoder(str, defaultDecoder, charset);\n },\n });\n\n this.formGroup.control.patchValue(value);\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 { WattQueryParamsDirective } from './watt-query-params.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAOA,MAAM,UAAU,GAAG,SAAS;MAKf,wBAAwB,CAAA;AAC3B,IAAA,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACtC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;;IAGtC,QAAQ,GAAA;QACN,IAAI,CAAC,SAAS,CAAC;cACX,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC;AACzC,aAAA,SAAS,CAAC,CAAC,UAAU,KAAI;AACxB,YAAA,MAAM,eAAe,GAAG,eAAe,CAAC,UAAU,CAAC;AAEnD,YAAA,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE;AACjC,gBAAA,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,e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AK;AACZ,wBAAA,IAAI,EAAE,IAAI;AACV,wBAAA,SAAS,EAAE,SAAS;qBACrB;oBACD,IAAI,IAAI,KAAK,OAAO,IAAI,GAAG,IAAI,QAAQ,EAAE;AACvC,wBAAA,OAAO,QAAQ,CAAC,GAAG,CAAC;;oBAGtB,OAAO,cAAc,CAAC,GAAG,EAAE,cAAc,EAAE,OAAO,CAAC;iBACpD;AACF,aAAA,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;;;uGAvEjC,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACzC,iBAAA;;;AC5BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class WattFlagNetherlandsComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattFlagNetherlandsComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattFlagNetherlandsComponent, "watt-flag-nl", never, {}, {}, never, never, true, never>;
5
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@energinet/watt",
4
- "version": "1.5.4",
4
+ "version": "1.5.6",
5
5
  "license": "Apache-2.0",
6
6
  "exports": {
7
7
  ".": {
@@ -9,6 +9,7 @@ export declare class WattPhoneFieldIntlService {
9
9
  NO: string;
10
10
  SE: string;
11
11
  PL: string;
12
+ NL: string;
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<WattPhoneFieldIntlService, never>;
13
14
  static ɵprov: i0.ɵɵInjectableDeclaration<WattPhoneFieldIntlService>;
14
15
  }