@energinet/watt 1.5.14 → 1.5.16

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.
@@ -300,6 +300,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
300
300
  }]
301
301
  }] });
302
302
 
303
+ //#region License
304
+ /**
305
+ * @license
306
+ * Copyright 2020 Energinet DataHub A/S
307
+ *
308
+ * Licensed under the Apache License, Version 2.0 (the "License2");
309
+ * you may not use this file except in compliance with the License.
310
+ * You may obtain a copy of the License at
311
+ *
312
+ * http://www.apache.org/licenses/LICENSE-2.0
313
+ *
314
+ * Unless required by applicable law or agreed to in writing, software
315
+ * distributed under the License is distributed on an "AS IS" BASIS,
316
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
317
+ * See the License for the specific language governing permissions and
318
+ * limitations under the License.
319
+ */
320
+ //#endregion
321
+ class WattFlagSwitzerlandComponent {
322
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFlagSwitzerlandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
323
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattFlagSwitzerlandComponent, isStandalone: true, selector: "watt-flag-ch", ngImport: i0, template: `
324
+ <svg viewBox="0 0 640 480">
325
+ <g fill="#ff0000">
326
+ <path d="M0 0h640v480H0z" />
327
+ </g>
328
+ <g fill="#ffffff">
329
+ <path d="M170 195h300v90H170z" />
330
+ <path d="M275 90h90v300h-90z" />
331
+ </g>
332
+ </svg>
333
+ `, isInline: true });
334
+ }
335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFlagSwitzerlandComponent, decorators: [{
336
+ type: Component,
337
+ args: [{
338
+ selector: 'watt-flag-ch',
339
+ template: `
340
+ <svg viewBox="0 0 640 480">
341
+ <g fill="#ff0000">
342
+ <path d="M0 0h640v480H0z" />
343
+ </g>
344
+ <g fill="#ffffff">
345
+ <path d="M170 195h300v90H170z" />
346
+ <path d="M275 90h90v300h-90z" />
347
+ </g>
348
+ </svg>
349
+ `,
350
+ }]
351
+ }] });
352
+
303
353
  //#region License
304
354
  /**
305
355
  * @license
@@ -350,9 +400,12 @@ class WattFlagComponent {
350
400
  @case ('NL') {
351
401
  <watt-flag-nl />
352
402
  }
403
+ @case ('CH') {
404
+ <watt-flag-ch />
405
+ }
353
406
  }
354
407
  </watt-icon>
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"] }] });
408
+ `, 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: WattFlagSwitzerlandComponent, selector: "watt-flag-ch" }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }] });
356
409
  }
357
410
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFlagComponent, decorators: [{
358
411
  type: Component,
@@ -366,6 +419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
366
419
  WattFlagPolandComponent,
367
420
  WattFlagSwedenComponent,
368
421
  WattFlagNetherlandsComponent,
422
+ WattFlagSwitzerlandComponent,
369
423
  WattIconComponent,
370
424
  ],
371
425
  template: `
@@ -392,6 +446,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
392
446
  @case ('NL') {
393
447
  <watt-flag-nl />
394
448
  }
449
+ @case ('CH') {
450
+ <watt-flag-ch />
451
+ }
395
452
  }
396
453
  </watt-icon>
397
454
  `,
@@ -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-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;;;;;;AAMT,EAAA,CAAA;AACF,iBAAA;;;AC7BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAaa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CA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B,EACxB,QAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,EACvB,QAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,EACvB,QAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,EACvB,QAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,4BAA4B,yDAC5B,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FA8BR,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAxC7B,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,4BAA4B;wBAC5B,iBAAiB;AAClB,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA;AACF,iBAAA;;;ACtED;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-ch.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 } from '@angular/core';\n\n@Component({\n selector: 'watt-flag-ch',\n template: `\n <svg viewBox=\"0 0 640 480\">\n <g fill=\"#ff0000\">\n <path d=\"M0 0h640v480H0z\" />\n </g>\n <g fill=\"#ffffff\">\n <path d=\"M170 195h300v90H170z\" />\n <path d=\"M275 90h90v300h-90z\" />\n </g>\n </svg>\n `,\n})\nexport class WattFlagSwitzerlandComponent {}\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';\nimport { WattFlagSwitzerlandComponent } from './watt-flag-ch';\n\n@Component({\n selector: 'watt-flag',\n imports: [\n WattFlagDenmarkComponent,\n WattFlagFinlandComponent,\n WattFlagGermanyComponent,\n WattFlagNorwayComponent,\n WattFlagPolandComponent,\n WattFlagSwedenComponent,\n WattFlagNetherlandsComponent,\n WattFlagSwitzerlandComponent,\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 @case ('CH') {\n <watt-flag-ch />\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;;;;;;AAMT,EAAA,CAAA;AACF,iBAAA;;;AC7BD;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,EA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ACxB,uBAAuB;wBACvB,uBAAuB;wBACvB,uBAAuB;wBACvB,4BAA4B;wBAC5B,4BAA4B;wBAC5B,iBAAiB;AAClB,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BT,EAAA,CAAA;AACF,iBAAA;;;AC3ED;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -42,6 +42,7 @@ class WattPhoneFieldIntlService {
42
42
  SE = 'Sweden';
43
43
  PL = 'Poland';
44
44
  NL = 'Netherlands';
45
+ CH = 'Switzerland';
45
46
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
46
47
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattPhoneFieldIntlService, providedIn: 'root' });
47
48
  }
@@ -86,6 +87,7 @@ class WattPhoneFieldComponent {
86
87
  { countryIsoCode: 'FI', phoneExtension: '+358' },
87
88
  { countryIsoCode: 'PL', phoneExtension: '+48' },
88
89
  { countryIsoCode: 'NL', phoneExtension: '+31' },
90
+ { countryIsoCode: 'CH', phoneExtension: '+41' },
89
91
  ];
90
92
  formControl = input.required();
91
93
  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 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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D,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;;;;"}
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 CH = 'Switzerland';\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 { countryIsoCode: 'CH', phoneExtension: '+41' },\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;IAClB,EAAE,GAAG,aAAa;uGAVP,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,EAA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@@
1
+ import * as i0 from "@angular/core";
2
+ export declare class WattFlagSwitzerlandComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattFlagSwitzerlandComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattFlagSwitzerlandComponent, "watt-flag-ch", 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.14",
4
+ "version": "1.5.16",
5
5
  "license": "Apache-2.0",
6
6
  "exports": {
7
7
  ".": {
@@ -10,6 +10,7 @@ export declare class WattPhoneFieldIntlService {
10
10
  SE: string;
11
11
  PL: string;
12
12
  NL: string;
13
+ CH: string;
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<WattPhoneFieldIntlService, never>;
14
15
  static ɵprov: i0.ɵɵInjectableDeclaration<WattPhoneFieldIntlService>;
15
16
  }