@postnord/pn-marketweb-components 2.0.6-beta9 → 2.0.8-beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/cjs/{MarketWebLoginManager-3c2f4423.js → MarketWebLoginManager-865226ea.js} +13 -1
  2. package/cjs/{data-b9e6d752.js → data-b5ef4f7c.js} +14 -1
  3. package/cjs/loader.cjs.js +1 -1
  4. package/cjs/pn-find-price-result.cjs.entry.js +13 -6
  5. package/cjs/{pn-find-price-store-63671327.js → pn-find-price-store-b0ea47ed.js} +3 -1
  6. package/cjs/pn-find-price.cjs.entry.js +17 -11
  7. package/cjs/pn-language-selector_9.cjs.entry.js +19 -12
  8. package/cjs/pn-market-web-components.cjs.js +1 -1
  9. package/cjs/pn-marketweb-siteheader.cjs.entry.js +8 -4
  10. package/cjs/pn-product-card_3.cjs.entry.js +3 -3
  11. package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
  12. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +54 -12
  13. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +45 -5
  14. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +26 -2
  15. package/collection/components/widgets/pn-find-price/data.js +17 -2
  16. package/collection/components/widgets/pn-find-price/find-price.stories.js +2 -2
  17. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +46 -14
  18. package/collection/components/widgets/pn-find-price/pn-find-price-store.js +3 -1
  19. package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +10 -5
  20. package/collection/components/widgets/pn-find-price/pn-find-price.js +5 -10
  21. package/collection/components/widgets/pn-product-card/pn-product-card-price.css +1 -9
  22. package/collection/components/widgets/pn-product-card/pn-product-card.css +57 -1
  23. package/collection/components/widgets/pn-product-card/pn-product-card.js +3 -1
  24. package/collection/globals/MarketWebLoginManager.js +13 -1
  25. package/custom-elements/index.js +86 -36
  26. package/esm/{MarketWebLoginManager-3bb0a307.js → MarketWebLoginManager-8fef95d2.js} +13 -1
  27. package/esm/{data-8e7bd46e.js → data-f0ac26a9.js} +14 -2
  28. package/esm/loader.js +1 -1
  29. package/esm/pn-find-price-result.entry.js +13 -6
  30. package/esm/{pn-find-price-store-55b65ec0.js → pn-find-price-store-625a6d87.js} +3 -1
  31. package/esm/pn-find-price.entry.js +17 -11
  32. package/esm/pn-language-selector_9.entry.js +19 -12
  33. package/esm/pn-market-web-components.js +1 -1
  34. package/esm/pn-marketweb-siteheader.entry.js +8 -4
  35. package/esm/pn-product-card_3.entry.js +3 -3
  36. package/esm/pn-product-pricelist.entry.js +1 -1
  37. package/esm-es5/MarketWebLoginManager-8fef95d2.js +1 -0
  38. package/esm-es5/{data-8e7bd46e.js → data-f0ac26a9.js} +1 -1
  39. package/esm-es5/loader.js +1 -1
  40. package/esm-es5/pn-find-price-result.entry.js +1 -1
  41. package/esm-es5/{pn-find-price-store-55b65ec0.js → pn-find-price-store-625a6d87.js} +1 -1
  42. package/esm-es5/pn-find-price.entry.js +1 -1
  43. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  44. package/esm-es5/pn-market-web-components.js +1 -1
  45. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  46. package/esm-es5/pn-product-card_3.entry.js +1 -1
  47. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  48. package/package.json +1 -1
  49. package/pn-market-web-components/p-0351965d.system.entry.js +1 -0
  50. package/pn-market-web-components/{p-4d584dca.system.entry.js → p-1c11b615.system.entry.js} +1 -1
  51. package/pn-market-web-components/p-285c6c82.system.entry.js +1 -0
  52. package/pn-market-web-components/p-2a624d21.entry.js +1 -0
  53. package/pn-market-web-components/p-424fac62.js +1 -0
  54. package/pn-market-web-components/{p-e89a9e79.system.entry.js → p-4a71cd20.system.entry.js} +1 -1
  55. package/pn-market-web-components/p-67887512.system.js +1 -1
  56. package/pn-market-web-components/{p-51fc5bc4.entry.js → p-6c75474c.entry.js} +1 -1
  57. package/pn-market-web-components/p-82daf429.entry.js +1 -0
  58. package/pn-market-web-components/p-8a269121.system.js +1 -0
  59. package/pn-market-web-components/{p-a7421a8e.system.js → p-9e0c9f32.system.js} +1 -1
  60. package/pn-market-web-components/p-ae775ba5.system.entry.js +1 -0
  61. package/pn-market-web-components/p-b2840380.entry.js +1 -0
  62. package/pn-market-web-components/{p-28db6d9f.entry.js → p-c1c3777d.entry.js} +1 -1
  63. package/pn-market-web-components/p-c2fada23.entry.js +1 -0
  64. package/pn-market-web-components/{p-f9586bef.js → p-e3ae421f.js} +1 -1
  65. package/pn-market-web-components/p-e7f8da0b.system.entry.js +1 -0
  66. package/pn-market-web-components/{p-f6fa6caa.system.js → p-e9781689.system.js} +1 -1
  67. package/pn-market-web-components/{p-d94d8879.js → p-f04541a1.js} +1 -1
  68. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  69. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +3 -1
  70. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts +5 -1
  71. package/types/components/widgets/pn-find-price/pn-find-price-result.d.ts +4 -0
  72. package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -0
  73. package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +5 -0
  74. package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +5 -0
  75. package/types/components.d.ts +30 -2
  76. package/types/globals/MarketWebLoginManager.d.ts +29 -27
  77. package/umd/pn-marketweb-salesforce.js +1 -1
  78. package/esm-es5/MarketWebLoginManager-3bb0a307.js +0 -1
  79. package/pn-market-web-components/p-01a615ef.system.entry.js +0 -1
  80. package/pn-market-web-components/p-23902611.system.entry.js +0 -1
  81. package/pn-market-web-components/p-29b8041d.entry.js +0 -1
  82. package/pn-market-web-components/p-36380a2b.system.entry.js +0 -1
  83. package/pn-market-web-components/p-55513980.system.js +0 -1
  84. package/pn-market-web-components/p-606ab75d.system.entry.js +0 -1
  85. package/pn-market-web-components/p-6423bacf.js +0 -1
  86. package/pn-market-web-components/p-9a8dba33.entry.js +0 -1
  87. package/pn-market-web-components/p-c9edf78b.entry.js +0 -1
  88. package/pn-market-web-components/p-dc869f2f.entry.js +0 -1
@@ -229,7 +229,9 @@ const translations$9 = {
229
229
  'stampshopcta': 'Köp frimärken',
230
230
  'message': '*Vid köp hos valfritt ombud',
231
231
  'servicePointHeader': 'Eller hitta närmaste serviceställe',
232
- 'servicePointLink': 'Sök serviceställe eller brevlåda'
232
+ 'servicePointLink': 'Hitta Serviceställe',
233
+ 'riktigaVykort': 'köp Riktiga Vykort',
234
+ 'riktigaVykortMobile': 'Testa Riktiga Vykorts mobilapp'
233
235
  },
234
236
  'en': {
235
237
  'componentheading': 'Our prices and terms and conditions for domestic shipments for you as a direct paying customer',
@@ -241,8 +243,10 @@ const translations$9 = {
241
243
  'senddirectcta': 'Buy Online',
242
244
  'stampshopcta': 'Buy Stamps',
243
245
  'message': 'When buying from any agent',
244
- 'servicePointHeader': 'Or find nearest service point',
245
- 'servicePointLink': 'Search letter-box or service point'
246
+ 'servicePointHeader': 'Find service point',
247
+ 'servicePointLink': 'Find service point',
248
+ 'riktigaVykort': 'Buy Postcards',
249
+ 'riktigaVykortMobile': 'Try the Real Postcards mobile app'
246
250
  },
247
251
  'da': {
248
252
  'componentheading': 'Vad vill du skicka?',
@@ -254,8 +258,9 @@ const translations$9 = {
254
258
  'senddirectcta': 'Køb Online',
255
259
  'stampshopcta': 'Køb Frimærker',
256
260
  'message': 'When buying from any agent',
257
- 'servicePointHeader': 'Eller find nærmeste servicested',
258
- 'servicePointLink': 'Søg i brevkasse eller servicepunkt'
261
+ 'servicePointHeader': 'Find nærmeste servicested',
262
+ 'servicePointLink': 'Find nærmeste servicested',
263
+ 'riktigaVykort': 'Køb Riktiga Vykort',
259
264
  },
260
265
  'no': {
261
266
  'componentheading': 'Vad vill du skicka?',
@@ -335,7 +340,19 @@ const weights$2 = {
335
340
  };
336
341
 
337
342
 
338
- const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/dk-findprice.xlsx";
343
+
344
+ const RiktigaValues =
345
+ {
346
+ WebUrl: "https://riktigavykort.postnord.se/sv",
347
+ AndroidAppUrl: "https://play.google.com/store/apps/details?id=se.posten.riktigavykort&hl=sv",
348
+ AndroidImg: "https://com-integration.postnord.com/globalassets/icons/logos-and-badges/google-play-badge_se.svg",
349
+ IosAppUrl: "https://apps.apple.com/se/app/riktiga-vykort/id444458799?l=sv",
350
+ IosImg: "https://com-integration.postnord.com/globalassets/icons/logos-and-badges/app_store_badge_se_rgb_blk.svg"
351
+ };
352
+
353
+
354
+
355
+ const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx";
339
356
 
340
357
  const sendDirectUrl$1 = "https://portal.postnord.com/skickadirekt/";
341
358
 
@@ -2374,7 +2391,9 @@ const { state: state$5, onChange: onChange$5 } = createStore({
2374
2391
  stampshopcta: '',
2375
2392
  message: '',
2376
2393
  servicePointHeader: '',
2377
- servicePointLink: ''
2394
+ servicePointLink: '',
2395
+ riktigaVykort: '',
2396
+ riktigaVykortMobile: ''
2378
2397
  },
2379
2398
  market: {
2380
2399
  currency: "",
@@ -2465,10 +2484,11 @@ let PnfindPrice = class extends HTMLElement {
2465
2484
  }
2466
2485
  }
2467
2486
  }
2487
+ //10000 to handle the null values in the rank column, to keep such products at the end of the list
2468
2488
  weightFilteredData.sort((a, b) => {
2469
- var rankA = a.highestrankusp ? a.highestrankusp.toLowerCase() : "z";
2470
- var rankB = b.highestrankusp ? b.highestrankusp.toLowerCase() : "z";
2471
- return (rankA.localeCompare(rankB));
2489
+ var ra = a.rank ? a.rank : 10000;
2490
+ var rb = b.rank ? b.rank : 10000;
2491
+ return (ra - rb);
2472
2492
  });
2473
2493
  this.filteredItems = weightFilteredData;
2474
2494
  }
@@ -2480,7 +2500,7 @@ let PnfindPrice = class extends HTMLElement {
2480
2500
  } })))))))), (this.sizecategory.value && weights$2[this.sizecategory.unit]) ? (h("div", { class: "weightoption" }, h("div", { class: "weightoption-content" }, weights$2[this.sizecategory.unit].map((wght) => (h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : weights$2[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
2481
2501
  this.weight = weights$2[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
2482
2502
  this.weightvalue = this.weight.value;
2483
- } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" }, (state$5.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state$5.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))), h("div", { class: "servicePoint" }, h("pn-illustration", { illustration: "character-box-letters-house" }), h("h3", null, state$5.i18n.servicePointHeader), h("a", { href: state$5.market.servicePoint, target: "_blank" }, h("pn-icon", { symbol: "map-marker", color: "blue700" }), state$5.i18n.servicePointLink)))) : null));
2503
+ } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" }, (state$5.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state$5.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))))) : null));
2484
2504
  }
2485
2505
  static get watchers() { return {
2486
2506
  "market": ["setState"],
@@ -2503,6 +2523,10 @@ let PnfindPriceResult = class extends HTMLElement {
2503
2523
  this.showMeasurement = false;
2504
2524
  this.weightText = "";
2505
2525
  this.linkId = '';
2526
+ this.usp = {
2527
+ Billigast: h("span", { slot: "Billigast" }, this.item.highestrankusp, h("pn-icon", { symbol: "box-label", small: "false", color: "green700" })),
2528
+ Snabbast: h("span", { slot: "Snabbast" }, this.item.highestrankusp, h("pn-icon", { symbol: "bolt", small: "false", color: "blue700" }))
2529
+ };
2506
2530
  }
2507
2531
  componentWillLoad() {
2508
2532
  this.composeItems();
@@ -2521,10 +2545,13 @@ let PnfindPriceResult = class extends HTMLElement {
2521
2545
  this.linkId = `${this.item.id}-${this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g, '')}`;
2522
2546
  }
2523
2547
  render() {
2524
- return (h(Host, null, h("pn-product-card", { "data-productid": this.item.id }, h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), h("div", { slot: "title" }, h("h2", null, this.item.name, " "), (this.item.highestrankusp) ?
2525
- (this.item.highestrankusp === "Billigast") ?
2526
- (h("span", { slot: "Billigast" }, this.item.highestrankusp, h("pn-icon", { symbol: "box-label", small: "false", color: "green700" })))
2527
- : (h("span", { slot: "Snabbast" }, this.item.highestrankusp, h("pn-icon", { symbol: "bolt", small: "false", color: "blue700" }))) : null), h("div", { slot: "content" }, h("div", { class: "content" }, (this.item.description) ? (h("div", { class: "description" }, this.description.map((desc) => (h("li", null, desc))))) : null, (this.item.info) ? (h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (h("small", { slot: "note" }, h("p", null, this.item.note))) : null, this.item.additionalusp ? (h("div", { slot: "additionalUSP" }, this.Usp1 ? (h("span", null, this.Usp1)) : null, this.Usp2 ? (h("span", null, this.Usp2)) : null, this.Usp3 ? (h("span", null, this.Usp3)) : null)) : null, this.showMeasurement ? (h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (h("pn-product-card-price", { slot: "sendDirectPrice", label: state$5.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: state$5.market.currency, url: sendDirectUrl$1, linkid: this.linkId + '-portal' })) : null, this.item.pricestamps ? (h("pn-product-card-price", { slot: "stampPrice", label: state$5.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: state$5.market.currency, url: stampShopUrl$1, linkid: this.linkId + '-stampshop' })) : null))));
2548
+ return (h(Host, null, h("pn-product-card", { "data-productid": this.item.id }, h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), h("div", { slot: "title" }, this.item.infopagelink ?
2549
+ (h("h2", null, h("a", { href: this.item.infopagelink, target: "_blank" }, this.item.name))) :
2550
+ (h("h2", null, this.item.name)), this.usp[this.item.highestrankusp]), h("div", { slot: "content" }, h("div", { class: "content" }, (this.item.description) ? (h("div", { class: "description" }, this.description.map((desc) => (h("li", null, desc))))) : null, (this.item.info) ? (h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (h("small", { slot: "note" }, h("p", null, this.item.note))) : null, this.item.additionalusp ? (h("div", { slot: "additionalUSP" }, this.Usp1 ? (h("span", null, this.Usp1)) : null, this.Usp2 ? (h("span", null, this.Usp2)) : null, this.Usp3 ? (h("span", null, this.Usp3)) : null)) : null, this.showMeasurement ?
2551
+ (h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (h("pn-product-card-price", { slot: "sendDirectPrice", label: state$5.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: state$5.market.currency, url: sendDirectUrl$1, linkid: this.linkId + '-portal' })) : null, this.item.pricestamps ? ((this.item.name.toLocaleLowerCase() !== "riktiga vykort") ?
2552
+ (h("pn-product-card-price", { slot: "stampPrice", label: state$5.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: state$5.market.currency, url: stampShopUrl$1, linkid: this.linkId + '-stampshop' })) :
2553
+ (h("pn-product-card-price", { slot: "riktiga", label: state$5.i18n.riktigaVykort, amount: this.item.pricestamps + '', currency: state$5.market.currency, url: RiktigaValues["WebUrl"], linkid: this.linkId + '-riktiga' }))) : null), h("div", { slot: "servicepoint" }, (this.item.showservicepointlink) ? (h("a", { href: state$5.market.servicePoint, target: "_blank" }, h("pn-icon", { symbol: "map-marker", color: "blue700" }), state$5.i18n.servicePointLink)) : null), h("div", { slot: "mobiledownload" }, (this.item.name.toLocaleLowerCase() === "riktiga vykort") ?
2554
+ (h("div", { id: "riktiga" }, h("h4", null, state$5.i18n.riktigaVykortMobile), h("div", null, h("a", { href: RiktigaValues["AndroidAppUrl"], target: "_blank" }, h("img", { class: "riktigaAndroidImg", src: RiktigaValues["AndroidImg"] })), h("a", { href: RiktigaValues["IosAppUrl"], target: "_blank" }, h("img", { class: "riktigaAppleImg", src: RiktigaValues["IosImg"] }))))) : null))));
2528
2555
  }
2529
2556
  static get watchers() { return {
2530
2557
  "item": ["composeItems"]
@@ -3935,6 +3962,7 @@ class MarketWebLoginManager {
3935
3962
  expire: 'expire',
3936
3963
  expireDate: 'expiredate'
3937
3964
  };
3965
+ this.overridetokenValue = 'overridetokenValue';
3938
3966
  this.store = {
3939
3967
  get: (key) => {
3940
3968
  const value = window.sessionStorage.getItem(`${this.storagePrefix}-${key}`);
@@ -3970,6 +3998,10 @@ class MarketWebLoginManager {
3970
3998
  this.eventTarget = (options.eventTarget) ? options.eventTarget : this.eventTarget;
3971
3999
  this.endpoint = options.endpoint ? options.endpoint : `${window.location.protocol}//${window.location.host}`;
3972
4000
  (_a = this.storagePrefix) !== null && _a !== void 0 ? _a : (this.storagePrefix = options.storagePrefix);
4001
+ if (options.userInfo) {
4002
+ this.store.set(this.keys.user, options.userInfo);
4003
+ this.registerToken(this.overridetokenValue, 'override');
4004
+ }
3973
4005
  }
3974
4006
  init(checkParameters = true) {
3975
4007
  if (checkParameters) {
@@ -3981,7 +4013,10 @@ class MarketWebLoginManager {
3981
4013
  this.loginStateChange();
3982
4014
  }
3983
4015
  }
3984
- isLoggedIn() {
4016
+ isLoggedIn(override = false) {
4017
+ if (override) {
4018
+ return override;
4019
+ }
3985
4020
  const isLoggedIn = (this.store.get(this.keys.token) && this.store.get(this.keys.user)) ? true : false;
3986
4021
  return isLoggedIn;
3987
4022
  }
@@ -4052,6 +4087,10 @@ class MarketWebLoginManager {
4052
4087
  }
4053
4088
  async fetchUserInfo() {
4054
4089
  const token = this.store.get(this.keys.token);
4090
+ if (this.store.get(this.keys.token) === this.overridetokenValue) {
4091
+ console.info('Did not fetch user data since it was set by an override');
4092
+ return;
4093
+ }
4055
4094
  const reqConfig = {
4056
4095
  method: 'GET',
4057
4096
  headers: {
@@ -4140,7 +4179,11 @@ let PnMarketwebSiteheader$1 = class extends HTMLElement {
4140
4179
  /** Specifies which environment we're fetching data from. (production, preproduction, integration, localhost) */
4141
4180
  this.environment = null; //sv
4142
4181
  /** Access token passed from backend */
4143
- this.token = "";
4182
+ this.userToken = "";
4183
+ /** User Fullname */
4184
+ this.userFullname = "";
4185
+ /** User Logged in state from the backend */
4186
+ this.userLoggedin = false;
4144
4187
  /** Specifies which endpoint domain we should load from */
4145
4188
  this.endpoint = null;
4146
4189
  /** Hides the site selector if set to true*/
@@ -4368,7 +4411,7 @@ let PnMarketwebSiteheader$1 = class extends HTMLElement {
4368
4411
  var _a, _b, _c, _d, _e, _f;
4369
4412
  return (h(Host, { language: this.language, market: this.market, environment: this.environment }, h("header", null, h("div", { class: "siteheader-row" }, h("div", { class: "siteheader-topleft" }, h("slot", { name: "topleft" }), (this.gotData && this.siteSelector && !this.hideSiteSelector) &&
4370
4413
  h("pn-site-selector", { language: this.language, buttontext: (_b = (_a = this.siteSelector) === null || _a === void 0 ? void 0 : _a.currentSiteTitle) !== null && _b !== void 0 ? _b : 'postnord' }, (this.gotData && ((_c = this.siteSelector) === null || _c === void 0 ? void 0 : _c.currentSiteTitle)) &&
4371
- h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle + ' ', description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_d = this.siteSelector) === null || _d === void 0 ? void 0 : _d.siteSelections)) && this.siteSelector.siteSelections.map((site) => h("pn-site-selector-item", { heading: site.linkText + ' ', description: site.linkDescription, url: this.adjustSiteSelectorUrl(site.href), newwindow: site.openInNewWindow })))), h("div", { class: "siteheader-logocontainer" }, h("a", { href: this.homePageLink, title: "Home", class: "siteheader-logolink" }, h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65" }, h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "#00A0D6", transform: "translate(0 0)" })))), h("div", { class: "siteheader-topright" }, h("slot", { name: "toprightstart" }), (this.gotData && this.loginDialog && !this.hideLogin) && (h("pn-marketweb-siteheader-login", { token: this.token, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
4414
+ h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle + ' ', description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_d = this.siteSelector) === null || _d === void 0 ? void 0 : _d.siteSelections)) && this.siteSelector.siteSelections.map((site) => h("pn-site-selector-item", { heading: site.linkText + ' ', description: site.linkDescription, url: this.adjustSiteSelectorUrl(site.href), newwindow: site.openInNewWindow })))), h("div", { class: "siteheader-logocontainer" }, h("a", { href: this.homePageLink, title: "Home", class: "siteheader-logolink" }, h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65" }, h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "#00A0D6", transform: "translate(0 0)" })))), h("div", { class: "siteheader-topright" }, h("slot", { name: "toprightstart" }), (this.gotData && this.loginDialog && !this.hideLogin) && (h("pn-marketweb-siteheader-login", { token: this.userToken, fullname: this.userFullname, loggedin: this.userLoggedin, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
4372
4415
  h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), h("slot", { name: "toprightend" }))), h("div", { class: "siteheader-row" }, h("div", { class: "siteheader-menu" }, (this.gotData && this.menuItems) && (h("pn-mainnav", { market: this.market, language: this.language, onMenuOpenChange: (e) => {
4373
4416
  document.body.setAttribute("data-siteheader-menuopen", (e.detail + ''));
4374
4417
  } }, h("pn-mainnav-level", null, h("pn-mainnav-list", null, this.menuItems.map((item) => {
@@ -4380,7 +4423,7 @@ let PnMarketwebSiteheader$1 = class extends HTMLElement {
4380
4423
  return (h("pn-mainnav-link", { name: childitem.name, href: childitem.href, target: (_a = childitem.linkTarget) !== null && _a !== void 0 ? _a : "_self", linkid: childitem.trackingId }));
4381
4424
  })), (item.promotedMenuItems && item.promotedMenuItems.length > 0) &&
4382
4425
  h("pn-mainnav-list", { heading: item.promotedMenuItemsHeader }, item.promotedMenuItems.map((childitem) => (h("pn-mainnav-link", { href: childitem.href, name: childitem.linkText, target: childitem.openInNewWindow ? "_blank" : "_self", linkid: this.promotedItemId(childitem) + item.id })))))));
4383
- })), h("div", { slot: "footer", class: "siteheader-menu-footer" }, (this.gotData && this.loginDialog && !this.hideLogin) && (h("pn-marketweb-siteheader-login", { emitEvents: false, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
4426
+ })), h("div", { slot: "footer", class: "siteheader-menu-footer" }, (this.gotData && this.loginDialog && !this.hideLogin) && (h("pn-marketweb-siteheader-login", { emitEvents: false, loginDialog: this.loginDialog, endpoint: this.endpoint, fullname: this.userFullname, loggedin: this.userLoggedin, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
4384
4427
  h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), !this.hideSiteSelector &&
4385
4428
  h("pn-site-selector", { language: this.language }, (this.gotData && ((_e = this.siteSelector) === null || _e === void 0 ? void 0 : _e.currentSiteTitle)) &&
4386
4429
  h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_f = this.siteSelector) === null || _f === void 0 ? void 0 : _f.siteSelections)) && this.siteSelector.siteSelections.map((site) => h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: site.pageLink, newwindow: site.openInNewWindow })))), h("div", { slot: "top", class: "siteheader-menu-top" }, h("pn-marketweb-siteheader-search", { language: this.language, search: this.search, "hide-search": this.hideSearch, i18n: this.i18n })))))), h("pn-marketweb-siteheader-search", { language: this.language, primary: true, search: this.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n })))));
@@ -4407,13 +4450,16 @@ let PnMarketwebSiteheaderLogin$1 = class extends HTMLElement {
4407
4450
  this.emitEvents = true;
4408
4451
  // Login dialog
4409
4452
  this.loginDialog = null;
4453
+ /** User Fullname */
4454
+ this.fullname = "";
4455
+ this.loggedin = false;
4410
4456
  this.loginManager = null;
4411
- this.loggedIn = false;
4412
4457
  this.toggleButtonText = "";
4413
- this.username = "";
4458
+ this.username = this.fullname;
4414
4459
  }
4415
4460
  componentWillLoad() {
4416
- this.loginManager = new MarketWebLoginManager({ endpoint: this.endpoint, eventTarget: this.hostElement });
4461
+ const userInfo = this.loggedin && this.fullname ? { given_name: this.fullname } : null;
4462
+ this.loginManager = new MarketWebLoginManager({ endpoint: this.endpoint, eventTarget: this.hostElement, userInfo });
4417
4463
  this.hostElement["loginmanager"] = this.loginManager;
4418
4464
  if (this.token) {
4419
4465
  this.loginManager.registerToken(this.token, 'backend');
@@ -4423,6 +4469,7 @@ let PnMarketwebSiteheaderLogin$1 = class extends HTMLElement {
4423
4469
  }
4424
4470
  this.hostElement.addEventListener(this.loginManager.events.loginstatechange, this.onLoginStateChange.bind(this));
4425
4471
  this.init();
4472
+ this.setUserName();
4426
4473
  }
4427
4474
  async init() {
4428
4475
  this.toggleButtonText = this.loginDialog.loginMenuLinkText;
@@ -4432,19 +4479,22 @@ let PnMarketwebSiteheaderLogin$1 = class extends HTMLElement {
4432
4479
  setUserName() {
4433
4480
  const userInfo = this.loginManager.getUserInfo();
4434
4481
  let name = "";
4435
- if (!this.loggedIn || !userInfo) {
4482
+ if (!this.loggedin || !userInfo) {
4436
4483
  this.username = name;
4437
4484
  }
4438
- if (userInfo.given_name) {
4485
+ if (userInfo && userInfo.given_name) {
4439
4486
  name = userInfo.given_name + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name) ? ` ${userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name}` : "");
4440
4487
  }
4441
- if (!name && userInfo.email) {
4488
+ if (!name && userInfo && userInfo.email) {
4442
4489
  name = userInfo.email;
4443
4490
  }
4491
+ if (!name && this.fullname) {
4492
+ name = this.fullname;
4493
+ }
4444
4494
  this.username = name;
4445
4495
  }
4446
4496
  setToggleButtonText() {
4447
- if (this.loggedIn) {
4497
+ if (this.loggedin) {
4448
4498
  this.toggleButtonText = this.username;
4449
4499
  if (!this.toggleButtonText) {
4450
4500
  this.toggleButtonText = this.loginDialog.loggedInButtonText;
@@ -4455,9 +4505,9 @@ let PnMarketwebSiteheaderLogin$1 = class extends HTMLElement {
4455
4505
  }
4456
4506
  }
4457
4507
  onLoginStateChange(e) {
4458
- if (this.loggedIn !== e.detail && this.emitEvents) {
4459
- this.loggedIn = e.detail;
4460
- this.loginStateChange.emit({ loggedIn: this.loggedIn, token: this.loginManager.getToken() });
4508
+ if (this.loggedin !== e.detail && this.emitEvents) {
4509
+ this.loggedin = e.detail;
4510
+ this.loginStateChange.emit({ loggedIn: this.loggedin, token: this.loginManager.getToken() });
4461
4511
  this.setUserName();
4462
4512
  this.setToggleButtonText();
4463
4513
  }
@@ -4511,7 +4561,7 @@ let PnMarketwebSiteheaderLogin$1 = class extends HTMLElement {
4511
4561
  hostElementAttribute.username = this.username;
4512
4562
  }
4513
4563
  return (h(Host, Object.assign({}, hostElementAttribute), h("pn-nav-dropdown", { label: this.toggleButtonText, icon: "user", class: "siteheader-logindialog" }, (!this.loginDialog.overrideLoginMenu) ?
4514
- h("div", { "data-loggedin": this.loggedIn + '' }, (!this.loggedIn) ?
4564
+ h("div", { "data-loggedin": this.loggedin + '' }, (!this.loggedin) ?
4515
4565
  h("div", null, (_a = this.loginDialog.loginTitle) !== null && _a !== void 0 ? _a : h("strong", null, this.loginDialog.loginTitle), ((_b = this.loginDialog.loginMenuLinks) === null || _b === void 0 ? void 0 : _b.length) > 0 ?
4516
4566
  h("ul", null, this.loginDialog.loginMenuLinks.map((link, i) => {
4517
4567
  const href = (i === 0 && !link.href) ? this.loginManager.getLoginUrl() : link.href;
@@ -4759,7 +4809,7 @@ let PnPexPricefinder$1 = class extends HTMLElement {
4759
4809
  static get style() { return pnPexPricefinderCss; }
4760
4810
  };
4761
4811
 
4762
- const pnProductCardCss = "pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title]>[slot]{border-radius:0.4rem;height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem}pn-product-card [slot=title]>[slot] pn-icon{vertical-align:middle;margin-left:0.6em}pn-product-card [slot=title]>[slot=Billigast]{color:#005E41;background:#DCF6E7}pn-product-card [slot=title]>[slot=Snabbast]{background:#E0F8FF;color:#005D92}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 2em 0.5em 0}";
4812
+ const pnProductCardCss = "pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:\"\" !important}pn-product-card [slot=title]>[slot]{border-radius:0.4rem;height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem}pn-product-card [slot=title]>[slot] pn-icon{vertical-align:middle;margin-left:0.6em}pn-product-card [slot=title]>[slot=Billigast]{color:#005E41;background:#DCF6E7}pn-product-card [slot=title]>[slot=Snabbast]{background:#E0F8FF;color:#005D92}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:0.6em;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=mobiledownload]{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card [slot=mobiledownload] #riktiga{-ms-flex-order:4;order:4;margin-top:1em}pn-product-card [slot=mobiledownload] #riktiga>div>a::after{content:\"\" !important}pn-product-card [slot=mobiledownload] .riktigaAndroidImg{width:6em;margin:0.5em}pn-product-card [slot=mobiledownload] .riktigaAppleImg{width:5.6em;margin:0.5em}pn-product-card [slot=mobiledownload] a{text-decoration:none;color:#005D92}pn-product-card [slot=mobiledownload] a h3{text-decoration:underline}pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:2;flex-grow:2;-ms-flex-align:end;align-items:flex-end;text-align:center}@media screen and (min-width: 36em){pn-product-card [slot=servicepoint]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 1em 0.5em 0}";
4763
4813
 
4764
4814
  let PnProductCard$1 = class extends HTMLElement {
4765
4815
  constructor() {
@@ -4767,7 +4817,7 @@ let PnProductCard$1 = class extends HTMLElement {
4767
4817
  this.__registerHost();
4768
4818
  }
4769
4819
  render() {
4770
- return (h(Host, null, h("slot", { name: "illustration" }), h("div", { class: "cardcontent" }, h("div", { class: "details" }, h("slot", { name: "title" }), h("slot", { name: "content" }), h("div", { class: "info" }, h("slot", null)), h("slot", { name: "note" }), h("slot", { name: "additionalUSP" })), h("div", { class: "cardprice" }, h("slot", { name: "cardprice" })))));
4820
+ return (h(Host, null, h("slot", { name: "illustration" }), h("div", { class: "cardcontent" }, h("div", { class: "details" }, h("slot", { name: "title" }), h("slot", { name: "content" }), h("div", { class: "info" }, h("slot", null)), h("slot", { name: "note" }), h("slot", { name: "additionalUSP" })), h("div", { class: "cardprice" }, h("slot", { name: "cardprice" }), h("slot", { name: "mobiledownload" }), h("slot", { name: "servicepoint" })))));
4771
4821
  }
4772
4822
  static get style() { return pnProductCardCss; }
4773
4823
  };
@@ -4791,7 +4841,7 @@ let PnProductCardInfo$1 = class extends HTMLElement {
4791
4841
  };
4792
4842
  h("pn-icon", { symbol: "align-center", small: "false", color: "black" });
4793
4843
 
4794
- const pnProductCardPriceCss = "pn-product-card-price{margin-top:1.6rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-right:0}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price .price{font-size:2.5em;font-weight:bold;-ms-flex-order:1;order:1}pn-product-card-price pn-button{min-width:12.8em;margin-top:0.8rem;font-size:1.25;-ms-flex-order:2;order:2}@media screen and (min-width: 48em){pn-product-card-price pn-button{-ms-flex-order:3;order:3;margin-bottom:1.6rem}}pn-product-card-price p{font-weight:lighter;font-size:0.875em;-ms-flex-item-align:center;align-self:center;margin-top:0.8rem;-ms-flex-order:3;order:3}@media screen and (min-width: 48em){pn-product-card-price p{-ms-flex-order:2;order:2}}pn-product-card-price a{text-decoration:none;color:#005D92}pn-product-card-price a h3{text-decoration:underline}";
4844
+ const pnProductCardPriceCss = "pn-product-card-price{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-right:0}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price .price{font-size:2.5em;font-weight:bold;-ms-flex-order:1;order:1}pn-product-card-price pn-button{min-width:12.8em;font-size:1.25;-ms-flex-order:2;order:2}@media screen and (min-width: 48em){pn-product-card-price pn-button{-ms-flex-order:3;order:3;margin-bottom:1.6rem}}pn-product-card-price p{font-weight:lighter;font-size:0.875em;-ms-flex-item-align:center;align-self:center;margin-top:0.8rem;-ms-flex-order:3;order:3}@media screen and (min-width: 48em){pn-product-card-price p{-ms-flex-order:2;order:2}}";
4795
4845
 
4796
4846
  let PnProductCardPrice$1 = class extends HTMLElement {
4797
4847
  constructor() {
@@ -5522,7 +5572,7 @@ const PnBonusProgressbarLevel = /*@__PURE__*/proxyCustomElement(PnBonusProgressb
5522
5572
  const PnChoiceButton = /*@__PURE__*/proxyCustomElement(PnChoiceButton$1, [4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]);
5523
5573
  const PnFilterCheckbox = /*@__PURE__*/proxyCustomElement(PnFilterCheckbox$1, [1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]);
5524
5574
  const PnFindPrice = /*@__PURE__*/proxyCustomElement(PnfindPrice, [0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]}]);
5525
- const PnFindPriceResult = /*@__PURE__*/proxyCustomElement(PnfindPriceResult, [0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32]}]);
5575
+ const PnFindPriceResult = /*@__PURE__*/proxyCustomElement(PnfindPriceResult, [0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"usp":[16],"weightText":[32],"linkId":[32]}]);
5526
5576
  const PnFindServiceAndPrice = /*@__PURE__*/proxyCustomElement(PnfindServiceAndPrice, [0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]}]);
5527
5577
  const PnFindServiceAndPriceResult = /*@__PURE__*/proxyCustomElement(PnfindServiceAndPriceResult, [0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]);
5528
5578
  const PnLanguageSelector = /*@__PURE__*/proxyCustomElement(PnlanguageSelector, [4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}]);
@@ -5534,8 +5584,8 @@ const PnMainnavList = /*@__PURE__*/proxyCustomElement(PnMainnavList$1, [4,"pn-ma
5534
5584
  const PnMarketwebInput = /*@__PURE__*/proxyCustomElement(PnMarketwebInput$1, [0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]);
5535
5585
  const PnMarketwebSearch = /*@__PURE__*/proxyCustomElement(PnMarketwebSearch$1, [1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]);
5536
5586
  const PnMarketwebSitefooter = /*@__PURE__*/proxyCustomElement(PnMarketwebSiteheader$2, [0,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]}]);
5537
- const PnMarketwebSiteheader = /*@__PURE__*/proxyCustomElement(PnMarketwebSiteheader$1, [4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"token":[1],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]);
5538
- const PnMarketwebSiteheaderLogin = /*@__PURE__*/proxyCustomElement(PnMarketwebSiteheaderLogin$1, [0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[8,"i-1-8n"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"loginManager":[32],"loggedIn":[32],"toggleButtonText":[32],"username":[32]}]);
5587
+ const PnMarketwebSiteheader = /*@__PURE__*/proxyCustomElement(PnMarketwebSiteheader$1, [4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[4,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]);
5588
+ const PnMarketwebSiteheaderLogin = /*@__PURE__*/proxyCustomElement(PnMarketwebSiteheaderLogin$1, [0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[8,"i-1-8n"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"loginManager":[32],"toggleButtonText":[32],"username":[32]}]);
5539
5589
  const PnMarketwebSiteheaderSearch = /*@__PURE__*/proxyCustomElement(PnMarketwebSiteheaderSearch$1, [0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"search":[1040],"primary":[4],"autoCompleteOptions":[32]}]);
5540
5590
  const PnPexPricefinder = /*@__PURE__*/proxyCustomElement(PnPexPricefinder$1, [0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]);
5541
5591
  const PnProductCard = /*@__PURE__*/proxyCustomElement(PnProductCard$1, [4,"pn-product-card"]);
@@ -24,6 +24,7 @@ class MarketWebLoginManager {
24
24
  expire: 'expire',
25
25
  expireDate: 'expiredate'
26
26
  };
27
+ this.overridetokenValue = 'overridetokenValue';
27
28
  this.store = {
28
29
  get: (key) => {
29
30
  const value = window.sessionStorage.getItem(`${this.storagePrefix}-${key}`);
@@ -59,6 +60,10 @@ class MarketWebLoginManager {
59
60
  this.eventTarget = (options.eventTarget) ? options.eventTarget : this.eventTarget;
60
61
  this.endpoint = options.endpoint ? options.endpoint : `${window.location.protocol}//${window.location.host}`;
61
62
  (_a = this.storagePrefix) !== null && _a !== void 0 ? _a : (this.storagePrefix = options.storagePrefix);
63
+ if (options.userInfo) {
64
+ this.store.set(this.keys.user, options.userInfo);
65
+ this.registerToken(this.overridetokenValue, 'override');
66
+ }
62
67
  }
63
68
  init(checkParameters = true) {
64
69
  if (checkParameters) {
@@ -70,7 +75,10 @@ class MarketWebLoginManager {
70
75
  this.loginStateChange();
71
76
  }
72
77
  }
73
- isLoggedIn() {
78
+ isLoggedIn(override = false) {
79
+ if (override) {
80
+ return override;
81
+ }
74
82
  const isLoggedIn = (this.store.get(this.keys.token) && this.store.get(this.keys.user)) ? true : false;
75
83
  return isLoggedIn;
76
84
  }
@@ -141,6 +149,10 @@ class MarketWebLoginManager {
141
149
  }
142
150
  async fetchUserInfo() {
143
151
  const token = this.store.get(this.keys.token);
152
+ if (this.store.get(this.keys.token) === this.overridetokenValue) {
153
+ console.info('Did not fetch user data since it was set by an override');
154
+ return;
155
+ }
144
156
  const reqConfig = {
145
157
  method: 'GET',
146
158
  headers: {
@@ -32,10 +32,22 @@ const weights = {
32
32
  };
33
33
 
34
34
 
35
- const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/dk-findprice.xlsx";
35
+
36
+ const RiktigaValues =
37
+ {
38
+ WebUrl: "https://riktigavykort.postnord.se/sv",
39
+ AndroidAppUrl: "https://play.google.com/store/apps/details?id=se.posten.riktigavykort&hl=sv",
40
+ AndroidImg: "https://com-integration.postnord.com/globalassets/icons/logos-and-badges/google-play-badge_se.svg",
41
+ IosAppUrl: "https://apps.apple.com/se/app/riktiga-vykort/id444458799?l=sv",
42
+ IosImg: "https://com-integration.postnord.com/globalassets/icons/logos-and-badges/app_store_badge_se_rgb_blk.svg"
43
+ };
44
+
45
+
46
+
47
+ const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx";
36
48
 
37
49
  const sendDirectUrl = "https://portal.postnord.com/skickadirekt/";
38
50
 
39
51
  const stampShopUrl = "https://shop.postnord.se/ebutik/default.aspx";
40
52
 
41
- export { sendDirectUrl as a, stampShopUrl as b, fileLocation as f, sizeCategories as s, weights as w };
53
+ export { RiktigaValues as R, sendDirectUrl as a, stampShopUrl as b, fileLocation as f, sizeCategories as s, weights as w };
package/esm/loader.js CHANGED
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"token":[1],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-price",[[0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]}]]],["pn-find-service-and-price",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]}]]],["pn-product-pricelist",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter",[[0,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]}]]],["pn-bonus-progressbar",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]}]]],["pn-pex-pricefinder",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["pn-filter-checkbox",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["pn-sidenav",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-card_3",[[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1],"service":[1],"linkid":[1]}],[4,"pn-product-card"]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input",[[0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-tile-info_2",[[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]],["pn-language-selector_9",[[4,"pn-mainnav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[8,"i-1-8n"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"loginManager":[32],"loggedIn":[32],"toggleButtonText":[32],"username":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"search":[1040],"primary":[4],"autoCompleteOptions":[32]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]]], options);
13
+ return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[4,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-price",[[0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]}]]],["pn-find-service-and-price",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]}]]],["pn-product-pricelist",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter",[[0,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]}]]],["pn-bonus-progressbar",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]}]]],["pn-pex-pricefinder",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["pn-filter-checkbox",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["pn-sidenav",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-card_3",[[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1],"service":[1],"linkid":[1]}],[4,"pn-product-card"]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input",[[0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"usp":[16],"weightText":[32],"linkId":[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-tile-info_2",[[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]],["pn-language-selector_9",[[4,"pn-mainnav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[8,"i-1-8n"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"loginManager":[32],"toggleButtonText":[32],"username":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"search":[1040],"primary":[4],"autoCompleteOptions":[32]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host } from './index-5397620b.js';
2
- import { s as state } from './pn-find-price-store-55b65ec0.js';
3
- import { a as sendDirectUrl, b as stampShopUrl } from './data-8e7bd46e.js';
2
+ import { s as state } from './pn-find-price-store-625a6d87.js';
3
+ import { a as sendDirectUrl, b as stampShopUrl, R as RiktigaValues } from './data-f0ac26a9.js';
4
4
  import './index-7b21ecff.js';
5
5
 
6
6
  const pnFindPriceResultCss = "pn-find-price-result .test{margin:3em 0}.resultcontent{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";
@@ -14,6 +14,10 @@ let PnfindPriceResult = class {
14
14
  this.showMeasurement = false;
15
15
  this.weightText = "";
16
16
  this.linkId = '';
17
+ this.usp = {
18
+ Billigast: h("span", { slot: "Billigast" }, this.item.highestrankusp, h("pn-icon", { symbol: "box-label", small: "false", color: "green700" })),
19
+ Snabbast: h("span", { slot: "Snabbast" }, this.item.highestrankusp, h("pn-icon", { symbol: "bolt", small: "false", color: "blue700" }))
20
+ };
17
21
  }
18
22
  componentWillLoad() {
19
23
  this.composeItems();
@@ -32,10 +36,13 @@ let PnfindPriceResult = class {
32
36
  this.linkId = `${this.item.id}-${this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g, '')}`;
33
37
  }
34
38
  render() {
35
- return (h(Host, null, h("pn-product-card", { "data-productid": this.item.id }, h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), h("div", { slot: "title" }, h("h2", null, this.item.name, " "), (this.item.highestrankusp) ?
36
- (this.item.highestrankusp === "Billigast") ?
37
- (h("span", { slot: "Billigast" }, this.item.highestrankusp, h("pn-icon", { symbol: "box-label", small: "false", color: "green700" })))
38
- : (h("span", { slot: "Snabbast" }, this.item.highestrankusp, h("pn-icon", { symbol: "bolt", small: "false", color: "blue700" }))) : null), h("div", { slot: "content" }, h("div", { class: "content" }, (this.item.description) ? (h("div", { class: "description" }, this.description.map((desc) => (h("li", null, desc))))) : null, (this.item.info) ? (h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (h("small", { slot: "note" }, h("p", null, this.item.note))) : null, this.item.additionalusp ? (h("div", { slot: "additionalUSP" }, this.Usp1 ? (h("span", null, this.Usp1)) : null, this.Usp2 ? (h("span", null, this.Usp2)) : null, this.Usp3 ? (h("span", null, this.Usp3)) : null)) : null, this.showMeasurement ? (h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (h("pn-product-card-price", { slot: "sendDirectPrice", label: state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: state.market.currency, url: sendDirectUrl, linkid: this.linkId + '-portal' })) : null, this.item.pricestamps ? (h("pn-product-card-price", { slot: "stampPrice", label: state.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: state.market.currency, url: stampShopUrl, linkid: this.linkId + '-stampshop' })) : null))));
39
+ return (h(Host, null, h("pn-product-card", { "data-productid": this.item.id }, h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), h("div", { slot: "title" }, this.item.infopagelink ?
40
+ (h("h2", null, h("a", { href: this.item.infopagelink, target: "_blank" }, this.item.name))) :
41
+ (h("h2", null, this.item.name)), this.usp[this.item.highestrankusp]), h("div", { slot: "content" }, h("div", { class: "content" }, (this.item.description) ? (h("div", { class: "description" }, this.description.map((desc) => (h("li", null, desc))))) : null, (this.item.info) ? (h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (h("small", { slot: "note" }, h("p", null, this.item.note))) : null, this.item.additionalusp ? (h("div", { slot: "additionalUSP" }, this.Usp1 ? (h("span", null, this.Usp1)) : null, this.Usp2 ? (h("span", null, this.Usp2)) : null, this.Usp3 ? (h("span", null, this.Usp3)) : null)) : null, this.showMeasurement ?
42
+ (h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (h("pn-product-card-price", { slot: "sendDirectPrice", label: state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: state.market.currency, url: sendDirectUrl, linkid: this.linkId + '-portal' })) : null, this.item.pricestamps ? ((this.item.name.toLocaleLowerCase() !== "riktiga vykort") ?
43
+ (h("pn-product-card-price", { slot: "stampPrice", label: state.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: state.market.currency, url: stampShopUrl, linkid: this.linkId + '-stampshop' })) :
44
+ (h("pn-product-card-price", { slot: "riktiga", label: state.i18n.riktigaVykort, amount: this.item.pricestamps + '', currency: state.market.currency, url: RiktigaValues["WebUrl"], linkid: this.linkId + '-riktiga' }))) : null), h("div", { slot: "servicepoint" }, (this.item.showservicepointlink) ? (h("a", { href: state.market.servicePoint, target: "_blank" }, h("pn-icon", { symbol: "map-marker", color: "blue700" }), state.i18n.servicePointLink)) : null), h("div", { slot: "mobiledownload" }, (this.item.name.toLocaleLowerCase() === "riktiga vykort") ?
45
+ (h("div", { id: "riktiga" }, h("h4", null, state.i18n.riktigaVykortMobile), h("div", null, h("a", { href: RiktigaValues["AndroidAppUrl"], target: "_blank" }, h("img", { class: "riktigaAndroidImg", src: RiktigaValues["AndroidImg"] })), h("a", { href: RiktigaValues["IosAppUrl"], target: "_blank" }, h("img", { class: "riktigaAppleImg", src: RiktigaValues["IosImg"] }))))) : null))));
39
46
  }
40
47
  static get watchers() { return {
41
48
  "item": ["composeItems"]
@@ -13,7 +13,9 @@ const { state, onChange } = createStore({
13
13
  stampshopcta: '',
14
14
  message: '',
15
15
  servicePointHeader: '',
16
- servicePointLink: ''
16
+ servicePointLink: '',
17
+ riktigaVykort: '',
18
+ riktigaVykortMobile: ''
17
19
  },
18
20
  market: {
19
21
  currency: "",