@postnord/pn-marketweb-components 2.0.3-beta6 → 2.0.4

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 (108) hide show
  1. package/cjs/{pn-find-price-store-345037e9.js → data-42342802.js} +0 -23
  2. package/cjs/data-e77c1ada.js +41 -0
  3. package/cjs/loader.cjs.js +1 -1
  4. package/cjs/pn-find-price-result.cjs.entry.js +7 -3
  5. package/cjs/{pn-product-pricelist-store-86310b5a.js → pn-find-price-store-6aab7fd0.js} +7 -2
  6. package/cjs/pn-find-price.cjs.entry.js +10 -9
  7. package/cjs/pn-find-service-and-price-result.cjs.entry.js +14 -13
  8. package/cjs/pn-language-selector_9.cjs.entry.js +1 -1
  9. package/cjs/pn-market-web-components.cjs.js +1 -1
  10. package/cjs/pn-product-card_3.cjs.entry.js +1 -1
  11. package/cjs/pn-product-pricelist-result.cjs.entry.js +58 -17
  12. package/cjs/pn-product-pricelist.cjs.entry.js +46 -61
  13. package/cjs/{pn-product-tile_3.cjs.entry.js → pn-product-tile-info_2.cjs.entry.js} +0 -13
  14. package/cjs/pn-product-tile.cjs.entry.js +19 -0
  15. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.css +3 -0
  16. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +14 -10
  17. package/collection/components/widgets/pn-find-price/pn-find-price.css +1 -1
  18. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +14 -15
  19. package/collection/components/widgets/pn-product-card/pn-product-card-price.js +19 -2
  20. package/collection/components/widgets/pn-product-pricelist/data.js +8 -1
  21. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +93 -24
  22. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-translations.js +30 -14
  23. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.css +4 -3
  24. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +5 -5
  25. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.stories.js +4 -4
  26. package/custom-elements/index.js +120 -70
  27. package/esm/data-108a2820.js +37 -0
  28. package/esm/{pn-find-price-store-cb8e4714.js → data-2fa1e9cb.js} +1 -23
  29. package/esm/loader.js +1 -1
  30. package/esm/pn-find-price-result.entry.js +7 -3
  31. package/esm/{pn-product-pricelist-store-2c336043.js → pn-find-price-store-3301df0a.js} +7 -2
  32. package/esm/pn-find-price.entry.js +3 -2
  33. package/esm/pn-find-service-and-price-result.entry.js +14 -13
  34. package/esm/pn-language-selector_9.entry.js +1 -1
  35. package/esm/pn-market-web-components.js +1 -1
  36. package/esm/pn-product-card_3.entry.js +1 -1
  37. package/esm/pn-product-pricelist-result.entry.js +56 -15
  38. package/esm/pn-product-pricelist.entry.js +36 -51
  39. package/esm/pn-product-tile-info_2.entry.js +31 -0
  40. package/esm/{pn-product-tile_3.entry.js → pn-product-tile.entry.js} +1 -29
  41. package/esm-es5/data-108a2820.js +1 -0
  42. package/esm-es5/data-2fa1e9cb.js +1 -0
  43. package/esm-es5/loader.js +1 -1
  44. package/esm-es5/pn-find-price-result.entry.js +1 -1
  45. package/esm-es5/pn-find-price-store-3301df0a.js +1 -0
  46. package/esm-es5/pn-find-price.entry.js +1 -1
  47. package/esm-es5/pn-find-service-and-price-result.entry.js +1 -1
  48. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  49. package/esm-es5/pn-market-web-components.js +1 -1
  50. package/esm-es5/pn-product-card_3.entry.js +1 -1
  51. package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
  52. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  53. package/esm-es5/pn-product-tile-info_2.entry.js +1 -0
  54. package/esm-es5/{pn-product-tile_3.entry.js → pn-product-tile.entry.js} +1 -1
  55. package/package.json +1 -1
  56. package/pn-market-web-components/{p-d55dbea8.system.entry.js → p-01a615ef.system.entry.js} +1 -1
  57. package/pn-market-web-components/p-0a49c688.system.entry.js +1 -0
  58. package/pn-market-web-components/p-1ecf47ed.entry.js +1 -0
  59. package/pn-market-web-components/p-218200c0.system.entry.js +1 -0
  60. package/pn-market-web-components/p-290d5824.system.entry.js +1 -0
  61. package/pn-market-web-components/p-3971ddb9.system.js +1 -0
  62. package/pn-market-web-components/p-4e9a272d.js +1 -0
  63. package/pn-market-web-components/{p-d58e3078.entry.js → p-51fc5bc4.entry.js} +1 -1
  64. package/pn-market-web-components/p-5d587499.js +1 -0
  65. package/pn-market-web-components/p-61dbe832.entry.js +1 -0
  66. package/pn-market-web-components/p-67887512.system.js +1 -1
  67. package/pn-market-web-components/p-6f556e76.system.entry.js +1 -0
  68. package/pn-market-web-components/p-72c39bf1.js +1 -0
  69. package/pn-market-web-components/p-8117b79e.system.entry.js +1 -0
  70. package/pn-market-web-components/p-893a20df.system.entry.js +1 -0
  71. package/pn-market-web-components/p-8e146205.entry.js +1 -0
  72. package/pn-market-web-components/p-a597a036.entry.js +1 -0
  73. package/pn-market-web-components/p-a921d3fd.system.entry.js +1 -0
  74. package/pn-market-web-components/p-bdd0fc97.system.js +1 -0
  75. package/pn-market-web-components/p-bf7cc19d.system.js +1 -0
  76. package/pn-market-web-components/p-d0155ddf.entry.js +1 -0
  77. package/pn-market-web-components/p-d428dc82.entry.js +1 -0
  78. package/pn-market-web-components/{p-3120f5c4.entry.js → p-dc869f2f.entry.js} +1 -1
  79. package/pn-market-web-components/{p-83baf538.system.entry.js → p-e89a9e79.system.entry.js} +1 -1
  80. package/pn-market-web-components/p-eb600482.entry.js +1 -0
  81. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  82. package/types/components/widgets/pn-find-price/pn-find-price-result.d.ts +4 -3
  83. package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +2 -2
  84. package/types/components/widgets/pn-find-price/pn-find-price.d.ts +2 -2
  85. package/types/components/widgets/pn-product-card/pn-product-card-price.d.ts +1 -0
  86. package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-result.d.ts +2 -0
  87. package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-translations.d.ts +26 -10
  88. package/types/components.d.ts +12 -6
  89. package/types/globals/shared/productprice/product-price-types.d.ts +5 -2
  90. package/umd/pn-marketweb-inject.js +0 -2
  91. package/esm-es5/pn-find-price-store-cb8e4714.js +0 -1
  92. package/esm-es5/pn-product-pricelist-store-2c336043.js +0 -1
  93. package/pn-market-web-components/p-045a349a.entry.js +0 -1
  94. package/pn-market-web-components/p-10b95894.entry.js +0 -1
  95. package/pn-market-web-components/p-20c72142.entry.js +0 -1
  96. package/pn-market-web-components/p-43dd4b37.system.js +0 -1
  97. package/pn-market-web-components/p-7b93d570.system.entry.js +0 -1
  98. package/pn-market-web-components/p-86b271f4.entry.js +0 -1
  99. package/pn-market-web-components/p-9e8c5793.system.entry.js +0 -1
  100. package/pn-market-web-components/p-a5bc1695.system.js +0 -1
  101. package/pn-market-web-components/p-adc8d9ab.js +0 -1
  102. package/pn-market-web-components/p-ae2bd55f.js +0 -1
  103. package/pn-market-web-components/p-aeb26d10.system.entry.js +0 -1
  104. package/pn-market-web-components/p-af800e0e.system.entry.js +0 -1
  105. package/pn-market-web-components/p-c90b8645.system.entry.js +0 -1
  106. package/pn-market-web-components/p-d46d9b6e.system.entry.js +0 -1
  107. package/pn-market-web-components/p-e056d2c6.entry.js +0 -1
  108. package/pn-market-web-components/p-f1c06bc8.entry.js +0 -1
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-28bbc937.js');
4
-
5
3
  const sizeCategories = [
6
4
  { name: "Small", value: "Small", illustration: "eli1n", unit: "small" },
7
5
  { name: "Medium", value: "Medium", illustration: "medium-package", unit: "medium"},
@@ -44,30 +42,9 @@ const sendDirectUrl = "https://portal.postnord.com/skickadirekt/";
44
42
 
45
43
  const stampShopUrl = "https://shop.postnord.se/ebutik/default.aspx";
46
44
 
47
- // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
48
- const { state, onChange } = index.createStore({
49
- i18n: {
50
- componentheading: '',
51
- deliveryscopeheading: '',
52
- resultlistheading: '',
53
- weightlabel: '',
54
- maxweightlabel: '',
55
- maxmeasurementlabel: '',
56
- senddirectcta: '',
57
- stampshopcta: '',
58
- message: '',
59
- servicePointHeader: '',
60
- servicePointLink: ''
61
- },
62
- market: {
63
- currency: ""
64
- }
65
- });
66
-
67
45
  exports.fileLocation = fileLocation;
68
46
  exports.sendDirectUrl = sendDirectUrl;
69
47
  exports.servicePointUrl = servicePointUrl;
70
48
  exports.sizeCategories = sizeCategories;
71
49
  exports.stampShopUrl = stampShopUrl;
72
- exports.state = state;
73
50
  exports.weights = weights;
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ const weights = {
4
+ "letter": [
5
+ { name: "50g", abbreviation: 'g', value: 50 },
6
+ { name: "100g", abbreviation: 'g', value: 100 },
7
+ { name: "250g", abbreviation: 'g', value: 250 },
8
+ { name: "500g", abbreviation: 'g', value: 500 },
9
+ { name: "1kg", abbreviation: 'kg', value: 1 },
10
+ { name: "2kg", abbreviation: 'kg', value: 2 },
11
+ ],
12
+ "parcel": [
13
+ { name: "1kg", abbreviation: 'kg', value: 1 },
14
+ { name: "2kg", abbreviation: 'kg', value: 2 },
15
+ { name: "3kg", abbreviation: 'kg', value: 3 },
16
+ { name: "4kg", abbreviation: 'kg', value: 4 },
17
+ { name: "5kg", abbreviation: 'kg', value: 5 },
18
+ { name: "6kg", abbreviation: 'kg', value: 6 },
19
+ { name: "7Kg", abbreviation: 'kg', value: 7 },
20
+ { name: "8kg", abbreviation: 'kg', value: 8 },
21
+ { name: "9kg", abbreviation: 'kg', value: 9 },
22
+ { name: "10kg", abbreviation: 'kg', value: 10 },
23
+ { name: "11kg", abbreviation: 'kg', value: 11 },
24
+ { name: "12kg", abbreviation: 'kg', value: 12 },
25
+ { name: "13kg", abbreviation: 'kg', value: 13 },
26
+ { name: "14kg", abbreviation: 'kg', value: 14 },
27
+ { name: "15kg", abbreviation: 'kg', value: 15 },
28
+ { name: "16kg", abbreviation: 'kg', value: 16 },
29
+ { name: "17kg", abbreviation: 'kg', value: 17 },
30
+ { name: "18kg", abbreviation: 'kg', value: 18 },
31
+ { name: "20kg", abbreviation: 'kg', value: 20 },
32
+ ]
33
+ };
34
+
35
+ const sendDirectUrl = "https://portal.postnord.com/skickadirekt/";
36
+
37
+ const stampShopUrl = "https://shop.postnord.se/ebutik/default.aspx";
38
+
39
+ exports.sendDirectUrl = sendDirectUrl;
40
+ exports.stampShopUrl = stampShopUrl;
41
+ exports.weights = weights;
package/cjs/loader.cjs.js CHANGED
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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-marketweb-sitefooter.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search.cjs",[[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-profile-selector.cjs",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option.cjs",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["pn-sidenav.cjs",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level.cjs",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link.cjs",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-find-price-result.cjs",[[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]}]]],["pn-find-service-and-price-result.cjs",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-product-pricelist-result.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level.cjs",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input.cjs",[[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-site-footer_2.cjs",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button.cjs",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link.cjs",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-card_3.cjs",[[4,"pn-product-card"],[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]}]]],["pn-language-selector_9.cjs",[[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]}]]],["pn-product-tile_3.cjs",[[4,"pn-product-tile"],[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]]], options);
17
+ return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search.cjs",[[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.cjs",[[4,"pn-product-tile"]]],["pn-profile-selector.cjs",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option.cjs",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["pn-sidenav.cjs",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level.cjs",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link.cjs",[[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.cjs",[[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.cjs",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level.cjs",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input.cjs",[[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.cjs",[[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.cjs",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button.cjs",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link.cjs",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-tile-info_2.cjs",[[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.cjs",[[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);
18
18
  });
19
19
  };
20
20
 
@@ -3,7 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3e27c79.js');
6
- const pnFindPriceStore = require('./pn-find-price-store-345037e9.js');
6
+ const pnFindPriceStore = require('./pn-find-price-store-6aab7fd0.js');
7
+ const data = require('./data-42342802.js');
7
8
  require('./index-28bbc937.js');
8
9
 
9
10
  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}";
@@ -16,8 +17,10 @@ let PnfindPriceResult = class {
16
17
  this.description = [];
17
18
  this.showMeasurement = false;
18
19
  this.weightText = "";
20
+ this.linkId = '';
19
21
  }
20
22
  componentWillLoad() {
23
+ console.log(this.item);
21
24
  this.composeItems();
22
25
  }
23
26
  composeItems() {
@@ -31,12 +34,13 @@ let PnfindPriceResult = class {
31
34
  this.description = this.item.description.split("#bullet").filter(x => x !== "");
32
35
  }
33
36
  this.showMeasurement = (this.item.maxmått !== null) || (this.item.rulle !== null);
37
+ this.linkId = `${this.item.id}-${this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g, '')}`;
34
38
  }
35
39
  render() {
36
- return (index.h(index.Host, null, index.h("pn-product-card", null, index.h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), index.h("div", { slot: "title" }, index.h("h2", null, this.item.name, " "), (this.item.highestrankusp) ?
40
+ return (index.h(index.Host, null, index.h("pn-product-card", { "data-productid": this.item.id }, index.h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), index.h("div", { slot: "title" }, index.h("h2", null, this.item.name, " "), (this.item.highestrankusp) ?
37
41
  (this.item.highestrankusp === "Billigast") ?
38
42
  (index.h("span", { slot: "Billigast" }, this.item.highestrankusp, index.h("pn-icon", { symbol: "box-label", small: "false", color: "green700" })))
39
- : (index.h("span", { slot: "Snabbast" }, this.item.highestrankusp, index.h("pn-icon", { symbol: "bolt", small: "false", color: "blue700" }))) : null), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, (this.item.description) ? (index.h("div", { class: "description" }, this.description.map((desc) => (index.h("li", null, desc))))) : null, (this.item.info) ? (index.h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (index.h("small", { slot: "note" }, index.h("p", null, this.item.note))) : null, this.item.additionalusp ? (index.h("div", { slot: "additionalUSP" }, this.Usp1 ? (index.h("span", null, this.Usp1)) : null, this.Usp2 ? (index.h("span", null, this.Usp2)) : null, this.Usp3 ? (index.h("span", null, this.Usp3)) : null)) : null, this.showMeasurement ? (index.h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, index.h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (index.h("pn-product-card-price", { slot: "sendDirectPrice", label: pnFindPriceStore.state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: pnFindPriceStore.state.market.currency, url: pnFindPriceStore.sendDirectUrl, service: this.item.name + "-portal" })) : null, this.item.pricestamps ? (index.h("pn-product-card-price", { slot: "stampPrice", label: pnFindPriceStore.state.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: pnFindPriceStore.state.market.currency, url: pnFindPriceStore.stampShopUrl, service: this.item.name + "-eshop" })) : null))));
43
+ : (index.h("span", { slot: "Snabbast" }, this.item.highestrankusp, index.h("pn-icon", { symbol: "bolt", small: "false", color: "blue700" }))) : null), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, (this.item.description) ? (index.h("div", { class: "description" }, this.description.map((desc) => (index.h("li", null, desc))))) : null, (this.item.info) ? (index.h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (index.h("small", { slot: "note" }, index.h("p", null, this.item.note))) : null, this.item.additionalusp ? (index.h("div", { slot: "additionalUSP" }, this.Usp1 ? (index.h("span", null, this.Usp1)) : null, this.Usp2 ? (index.h("span", null, this.Usp2)) : null, this.Usp3 ? (index.h("span", null, this.Usp3)) : null)) : null, this.showMeasurement ? (index.h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, index.h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (index.h("pn-product-card-price", { slot: "sendDirectPrice", label: pnFindPriceStore.state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: pnFindPriceStore.state.market.currency, url: data.sendDirectUrl, linkid: this.linkId + '-portal' })) : null, this.item.pricestamps ? (index.h("pn-product-card-price", { slot: "stampPrice", label: pnFindPriceStore.state.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: pnFindPriceStore.state.market.currency, url: data.stampShopUrl, linkid: this.linkId + '-stampshop' })) : null))));
40
44
  }
41
45
  static get watchers() { return {
42
46
  "item": ["composeItems"]
@@ -5,12 +5,17 @@ const index = require('./index-28bbc937.js');
5
5
  // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
6
6
  const { state, onChange } = index.createStore({
7
7
  i18n: {
8
- maxweightlabel: '',
8
+ componentheading: '',
9
+ deliveryscopeheading: '',
10
+ resultlistheading: '',
9
11
  weightlabel: '',
12
+ maxweightlabel: '',
10
13
  maxmeasurementlabel: '',
11
- sizeheading: '',
12
14
  senddirectcta: '',
13
15
  stampshopcta: '',
16
+ message: '',
17
+ servicePointHeader: '',
18
+ servicePointLink: ''
14
19
  },
15
20
  market: {
16
21
  currency: ""
@@ -3,8 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3e27c79.js');
6
- const pnFindPriceStore = require('./pn-find-price-store-345037e9.js');
6
+ const data = require('./data-42342802.js');
7
7
  const convert = require('./convert-362ef5e6.js');
8
+ const pnFindPriceStore = require('./pn-find-price-store-6aab7fd0.js');
8
9
  require('./index-28bbc937.js');
9
10
 
10
11
  const translations = {
@@ -90,12 +91,12 @@ const postnordPerson1Svg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA0IiBoZW
90
91
 
91
92
  const cloudsSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjc4IiBoZWlnaHQ9IjU1IiB2aWV3Qm94PSIwIDAgMjc4IDU1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjQ3LjM1NSA0OS42ODE1QzI0Ny42OTQgNTIuNDc5IDI0OS43MjIgNTQuNjI2MSAyNTIuMTgxIDU0LjYyNjFIMjcyLjkyNkMyNzUuNjIgNTQuNjI2MSAyNzcuNzk4IDUyLjA1MjIgMjc3Ljc5OCA0OC44Njg2VjQ4LjgwMDhDMjc3Ljc5OCA0NS42MTczIDI3NS42MiA0My4wNDMzIDI3Mi45MjYgNDMuMDQzM0gyNzAuNTM3QzI2OS42MDggMzkuMjQzOSAyNjYuODQ2IDM2LjQ3MyAyNjMuNTg1IDM2LjQ3M0gyNTkuNzE3QzI1OS4zNzMgMzEuODQxIDI1Ni4xMDEgMjguMjA5MiAyNTIuMTI0IDI4LjIwOTJDMjQ4LjE0NiAyOC4yMDkyIDI0NC44OCAzMS44NDEgMjQ0LjUzIDM2LjQ3M0gyNDIuMDk1QzIzOC4wODMgMzYuNDczIDIzNC44MTYgNDAuNjcyNiAyMzQuODE2IDQ1LjgyMDVWNDkuNjgxNUgyNDcuMzU1WiIgZmlsbD0iI0UwRjhGRiIvPgo8cGF0aCBkPSJNMTIuMDM5MSA0Ni4xMDIyQzEyLjMxNzYgNDguNTU2OSAxNC4wODY3IDUwLjQzNzMgMTYuMjQyMSA1MC40MzczSDM0LjU4MDdDMzYuOTMwNCA1MC40MzczIDM4LjgyMTYgNDguMjAyIDM4LjgyMTYgNDUuNDI0OFY0NS4zNTcxQzM4LjgyMTYgNDIuNTc5OSAzNi45MzA0IDQwLjM0NDYgMzQuNTgwNyA0MC4zNDQ2SDMyLjQ2ODRDMzEuNjY3OCAzNy4wMjA5IDI5LjIyNyAzNC41ODcyIDI2LjMyODMgMzQuNTg3MkgyMi45MTc5QzIyLjYwMDQgMzAuNTU5NyAxOS43MzI3IDI3LjQwNzEgMTYuMjQyMSAyNy40MDcxQzEyLjc1MTQgMjcuNDA3MSA5Ljg4MzcxIDMwLjU1OTcgOS41NjYyMiAzNC41ODcySDcuNDE2NThDMy44NjM0NiAzNC41ODcyIDAuOTk4MDQ3IDM4LjI0NDggMC45OTgwNDcgNDIuNzE1NFY0Ni4xMDIySDEyLjAzOTFaIiBmaWxsPSIjRTBGOEZGIi8+CjxwYXRoIGQ9Ik0xMzEuMDU2IDI2LjU4NjRDMTMxLjQ0OSAzMC4wNDIzIDEzMy45NDggMzIuNjg5NSAxMzYuOTkxIDMyLjY4OTVIMTYyLjg5MUMxNjYuMjA5IDMyLjY4OTUgMTY4Ljg4IDI5LjU0MjYgMTY4Ljg4IDI1LjYzMjhWMjUuNTM3NUMxNjguODggMjEuNjI3NyAxNjYuMjA5IDE4LjQ4MDggMTYyLjg5MSAxOC40ODA4SDE1OS45MDdDMTU4Ljc3NyAxMy44MDE1IDE1NS4zMyAxMC4zNzUzIDE1MS4yMzYgMTAuMzc1M0gxNDYuNDJDMTQ1Ljk3MSA0LjcwNTMzIDE0MS45MjEgMC4yNjcwOSAxMzYuOTkxIDAuMjY3MDlDMTMyLjA2MiAwLjI2NzA5IDEyOC4wMTIgNC43MDUzMyAxMjcuNTYzIDEwLjM3NTNIMTI0LjUyOEMxMTkuNTEgMTAuMzc1MyAxMTUuNDYzIDE1LjUyNDcgMTE1LjQ2MyAyMS44MTg0VjI2LjU4NjRIMTMxLjA1NloiIGZpbGw9IiNFMEY4RkYiLz4KPC9zdmc+Cg==';
92
93
 
93
- const pnFindPriceCss = "@charset \"UTF-8\";pn-find-price .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-find-price .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em}pn-find-price .sizeTable #clouds{position:absolute;top:0em;left:4em;z-index:-1}pn-find-price .firstCell{margin-right:0;margin-left:auto}pn-find-price .findprice-form{max-width:60em;margin:0 auto 3em auto}pn-find-price h2,pn-find-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-price .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-find-price .sizecategory{margin-top:5em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption{font-size:0.9em;max-width:41rem;margin:0 auto}pn-find-price .weightoption-content{text-align:center}pn-find-price .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom}pn-find-price .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption-content pn-choice-button ::before{content:\"Max  \";font-weight:lighter}pn-find-price .resultlist{margin:3em 0}pn-find-price .servicePoint{text-align:center}pn-find-price .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-find-price .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-find-price .servicePoint a{color:#005D92;text-decoration:none}pn-find-price .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
94
+ const pnFindPriceCss = "@charset \"UTF-8\";pn-find-price .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-find-price .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em}pn-find-price .sizeTable #clouds{position:absolute;top:0em;left:4em;z-index:-1}pn-find-price .firstCell{margin-right:0;margin-left:auto}pn-find-price .findprice-form{max-width:60em;margin:0 auto 3em auto}pn-find-price h2,pn-find-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-price .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-find-price .sizecategory{margin-top:5em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption{font-size:0.9em;max-width:41rem;margin:0 auto}pn-find-price .weightoption-content{text-align:center}pn-find-price .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom}pn-find-price .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption-content pn-choice-button ::before{content:\"Max  \";font-weight:lighter}pn-find-price .resultlist{margin:3.2rem 0}pn-find-price .servicePoint{text-align:center}pn-find-price .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-find-price .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-find-price .servicePoint a{color:#005D92;text-decoration:none}pn-find-price .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
94
95
 
95
96
  let PnfindPrice = class {
96
97
  constructor(hostRef) {
97
98
  index.registerInstance(this, hostRef);
98
- this.source = pnFindPriceStore.fileLocation;
99
+ this.source = data.fileLocation;
99
100
  this.language = "sv";
100
101
  this.market = "se";
101
102
  this.filteredItems = [];
@@ -116,7 +117,7 @@ let PnfindPrice = class {
116
117
  const convertedData = await convert.convertFileForSizeCategogy(reqbody);
117
118
  this.sourceData = convertedData;
118
119
  //for keeping small value preselected
119
- this.sizecategory = pnFindPriceStore.sizeCategories.filter(x => x.value === "Small")[0];
120
+ this.sizecategory = data.sizeCategories.filter(x => x.value === "Small")[0];
120
121
  this.filterItems();
121
122
  }
122
123
  catch (e) {
@@ -168,14 +169,14 @@ let PnfindPrice = class {
168
169
  this.filteredItems = weightFilteredData;
169
170
  }
170
171
  render() {
171
- return (index.h("div", { class: "findprice-form" }, index.h("div", null, index.h("div", { class: "sizecategory" }, index.h("table", { class: "sizeTable" }, index.h("img", { id: "clouds", src: cloudsSvg }), index.h("tr", null, index.h("td", null, index.h("img", { class: "firstCell", src: postnordPerson1Svg })), index.h("td", null, index.h("img", { src: smallPackageSvg })), index.h("td", null, index.h("img", { src: mediumPackageSvg })), index.h("td", null, index.h("img", { src: largePackageSvg }))), index.h("tr", null, index.h("td", null), pnFindPriceStore.sizeCategories.map((sizeCategory) => (index.h("td", null, index.h("pn-radio-button", { radioid: sizeCategory.value, value: sizeCategory.value, name: "sizecategory", checked: sizeCategory.value === this.sizecategory.value, onChange: () => {
172
- this.sizecategory = pnFindPriceStore.sizeCategories.filter(x => x.value === sizeCategory.value)[0];
172
+ return (index.h("div", { class: "findprice-form" }, index.h("div", null, index.h("div", { class: "sizecategory" }, index.h("table", { class: "sizeTable" }, index.h("img", { id: "clouds", src: cloudsSvg }), index.h("tr", null, index.h("td", null, index.h("img", { class: "firstCell", src: postnordPerson1Svg })), index.h("td", null, index.h("img", { src: smallPackageSvg })), index.h("td", null, index.h("img", { src: mediumPackageSvg })), index.h("td", null, index.h("img", { src: largePackageSvg }))), index.h("tr", null, index.h("td", null), data.sizeCategories.map((sizeCategory) => (index.h("td", null, index.h("pn-radio-button", { radioid: sizeCategory.value, value: sizeCategory.value, name: "sizecategory", checked: sizeCategory.value === this.sizecategory.value, onChange: () => {
173
+ this.sizecategory = data.sizeCategories.filter(x => x.value === sizeCategory.value)[0];
173
174
  this.weight = { value: 0, name: "" };
174
175
  this.weightvalue = this.weight.value;
175
- } })))))))), (this.sizecategory.value && pnFindPriceStore.weights[this.sizecategory.unit]) ? (index.h("div", { class: "weightoption" }, index.h("div", { class: "weightoption-content" }, pnFindPriceStore.weights[this.sizecategory.unit].map((wght) => (index.h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : pnFindPriceStore.weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
176
- this.weight = pnFindPriceStore.weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
176
+ } })))))))), (this.sizecategory.value && data.weights[this.sizecategory.unit]) ? (index.h("div", { class: "weightoption" }, index.h("div", { class: "weightoption-content" }, data.weights[this.sizecategory.unit].map((wght) => (index.h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : data.weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
177
+ this.weight = data.weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
177
178
  this.weightvalue = this.weight.value;
178
- } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (index.h("div", { class: "resultlist" }, (pnFindPriceStore.state.i18n.resultlistheading) ? (index.h("div", { class: "resultHeading" }, pnFindPriceStore.state.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (index.h("div", null, index.h("pn-find-price-result", { item: item })))), index.h("div", { class: "servicePoint" }, index.h("pn-illustration", { illustration: "character-box-letters-house" }), index.h("h3", null, pnFindPriceStore.state.i18n.servicePointHeader), index.h("a", { href: pnFindPriceStore.servicePointUrl, target: "_blank" }, index.h("pn-icon", { symbol: "map-marker", color: "blue700" }), pnFindPriceStore.state.i18n.servicePointLink)))) : null));
179
+ } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (index.h("div", { class: "resultlist" }, (pnFindPriceStore.state.i18n.resultlistheading) ? (index.h("div", { class: "resultHeading" }, pnFindPriceStore.state.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (index.h("div", null, index.h("pn-find-price-result", { item: item })))), index.h("div", { class: "servicePoint" }, index.h("pn-illustration", { illustration: "character-box-letters-house" }), index.h("h3", null, pnFindPriceStore.state.i18n.servicePointHeader), index.h("a", { href: data.servicePointUrl, target: "_blank" }, index.h("pn-icon", { symbol: "map-marker", color: "blue700" }), pnFindPriceStore.state.i18n.servicePointLink)))) : null));
179
180
  }
180
181
  static get watchers() { return {
181
182
  "market": ["setState"],
@@ -19,22 +19,23 @@ let PnfindServiceAndPriceResult = class {
19
19
  this.composeItems();
20
20
  }
21
21
  composeItems() {
22
- this.shownitems = [];
23
- if (this.item.pricestamps) {
24
- this.shownitems.push(Object.assign(Object.assign({}, this.item), { priceagent: null, pricesenddirect: null }));
25
- }
26
- if (this.item.priceagent) {
27
- this.shownitems.push(Object.assign(Object.assign({}, this.item), { pricestamps: null, pricesenddirect: null }));
28
- }
29
- if (this.item.pricesenddirect) {
30
- this.shownitems.push(Object.assign(Object.assign({}, this.item), { pricestamps: null, priceagent: null }));
31
- }
22
+ this.shownitems = [this.item];
23
+ // this.shownitems = [];
24
+ // if (this.item.pricestamps) {
25
+ // this.shownitems.push({...this.item, priceagent: null, pricesenddirect: null});
26
+ // }
27
+ // if (this.item.priceagent) {
28
+ // this.shownitems.push({...this.item, pricestamps: null, pricesenddirect: null});
29
+ // }
30
+ // if (this.item.pricesenddirect) {
31
+ // this.shownitems.push({...this.item, pricestamps: null, priceagent: null});
32
+ // }
32
33
  // Parcels are always in KG. Letter KG must be converted from grams
33
- this.weightText = (this.item.what === "parcel") ? this.item.maxweight + 'kg' :
34
- (this.item.what === "letter" && this.item.maxweight > 999) ? Math.round(this.item.maxweight / 1000) + " kg" : this.item.maxweight + " g";
34
+ // this.weightText = (this.item.what === "parcel") ? this.item.maxweight + 'kg' :
35
+ // (this.item.what === "letter" && this.item.maxweight > 999) ? Math.round(this.item.maxweight/1000) + " kg" : this.item.maxweight + " g";
35
36
  }
36
37
  render() {
37
- return (index.h(index.Host, null, this.shownitems.map((item) => (index.h("pn-product-tile", null, index.h("pn-illustration", { slot: "illustration", illustration: item.illustration }), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, index.h("h3", null, item.name), (item.description) ? (index.h("div", { class: "description" }, item.description)) : null, (item.info) ? (index.h("div", { class: "description" }, item.info)) : null)), item.maxweight ? (index.h("pn-product-tile-info", { label: pnFindServiceAndPriceStore.state.i18n.maxweightlabel, text: this.weightText })) : null, item.maximummeasurements ? (index.h("pn-product-tile-info", { label: pnFindServiceAndPriceStore.state.i18n.maxmeasurementlabel, text: item.maximummeasurements })) : null, item.pricestamps ? (index.h("pn-product-tile-price", { slot: "price", label: pnFindServiceAndPriceStore.state.i18n.stampshopcta, amount: item.pricestamps + '', currency: pnFindServiceAndPriceStore.state.market.currency })) : null, item.priceagent ? (index.h("pn-product-tile-price", { slot: "price", label: "", amount: item.priceagent + '', currency: pnFindServiceAndPriceStore.state.market.currency, url: "https://shop.postnord.se/ebutik/default.aspx" })) : null, item.pricesenddirect ? (index.h("pn-product-tile-price", { slot: "price", label: pnFindServiceAndPriceStore.state.i18n.senddirectcta, amount: item.pricesenddirect + '', currency: pnFindServiceAndPriceStore.state.market.currency, url: "https://portal.postnord.com/skickadirekt/" })) : null, item.note ? (index.h("small", { slot: "note" }, index.h("p", null, item.note))) : null)))));
38
+ return (index.h(index.Host, null, this.shownitems.map((item) => (index.h("pn-product-card", null, index.h("pn-illustration", { slot: "illustration", illustration: item.illustration }), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, index.h("h3", null, item.name), (item.description) ? (index.h("div", { class: "description" }, item.description)) : null, (item.info) ? (index.h("div", { class: "description" }, item.info)) : null)), item.maxweight ? (index.h("pn-product-tile-info", { label: pnFindServiceAndPriceStore.state.i18n.maxweightlabel, text: this.weightText })) : null, item.pricestamps ? (index.h("pn-product-tile-price", { slot: "price", label: pnFindServiceAndPriceStore.state.i18n.stampshopcta, amount: item.pricestamps + '', currency: pnFindServiceAndPriceStore.state.market.currency })) : null, item.pricesenddirect ? (index.h("pn-product-tile-price", { slot: "price", label: pnFindServiceAndPriceStore.state.i18n.senddirectcta, amount: item.pricesenddirect + '', currency: pnFindServiceAndPriceStore.state.market.currency, url: "https://portal.postnord.com/skickadirekt/" })) : null, item.note ? (index.h("small", { slot: "note" }, index.h("p", null, item.note))) : null)))));
38
39
  }
39
40
  static get watchers() { return {
40
41
  "item": ["composeItems"]
@@ -485,7 +485,7 @@ const { state, onChange } = index$1.createStore({
485
485
  requestAbortController: new AbortController()
486
486
  });
487
487
 
488
- const pnMarketwebSiteheaderSearchCss = ".siteheader-search a{display:none}@media screen and (min-width: 48em){.siteheader-search a{display:block}}.siteheader-search pn-search-field.button-icon pn-button,.siteheader-search pn-button{display:-ms-inline-flexbox;display:inline-flex}.siteheader-search pn-search-field.button-icon pn-button button,.siteheader-search pn-button button{-ms-flex-item-align:center;align-self:center;padding:0;height:2.3em;width:2.3em;line-height:0;min-height:unset;min-width:unset}.siteheader-search pn-search-field.button-icon pn-button pn-icon,.siteheader-search pn-button pn-icon{margin-left:0}.siteheader-search form{-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:auto;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;padding:0;margin:0 0 0 0.4rem;position:relative}@media screen and (min-width: 60em){.siteheader-search form{margin-right:1.6rem}}.siteheader-search form pn-search-field{min-width:13.5em}.siteheader-search form pn-search-field .input-container{-ms-flex-item-align:center;align-self:center}.siteheader-search form pn-search-field input{height:auto;min-height:1em;padding:0.6em 0.75em}";
488
+ const pnMarketwebSiteheaderSearchCss = ".siteheader-search a{display:none}@media screen and (min-width: 48em){.siteheader-search a{display:block}}.siteheader-search pn-search-field>.input-container button{background:#FFFFFF}.siteheader-search pn-search-field.button-icon pn-button,.siteheader-search pn-button{display:-ms-inline-flexbox;display:inline-flex}.siteheader-search pn-search-field.button-icon pn-button button,.siteheader-search pn-button button{-ms-flex-item-align:center;align-self:center;padding:0;height:2.3em;width:2.3em;line-height:0;min-height:unset;min-width:unset}.siteheader-search pn-search-field.button-icon pn-button pn-icon,.siteheader-search pn-button pn-icon{margin-left:0}.siteheader-search form{-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:auto;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;padding:0;margin:0 0 0 0.4rem;position:relative}@media screen and (min-width: 60em){.siteheader-search form{margin-right:1.6rem}}.siteheader-search form pn-search-field{min-width:13.5em}.siteheader-search form pn-search-field .input-container{-ms-flex-item-align:center;align-self:center}.siteheader-search form pn-search-field input{height:auto;min-height:1em;padding:0.6em 0.75em}";
489
489
 
490
490
  let PnMarketwebSiteheaderSearch = class {
491
491
  constructor(hostRef) {
@@ -55,5 +55,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
55
55
  };
56
56
 
57
57
  patchBrowser().then(options => {
58
- return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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-marketweb-sitefooter.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search.cjs",[[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-profile-selector.cjs",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option.cjs",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["pn-sidenav.cjs",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level.cjs",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link.cjs",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-find-price-result.cjs",[[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]}]]],["pn-find-service-and-price-result.cjs",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-product-pricelist-result.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level.cjs",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input.cjs",[[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-site-footer_2.cjs",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button.cjs",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link.cjs",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-card_3.cjs",[[4,"pn-product-card"],[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]}]]],["pn-language-selector_9.cjs",[[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]}]]],["pn-product-tile_3.cjs",[[4,"pn-product-tile"],[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]]], options);
58
+ return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search.cjs",[[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.cjs",[[4,"pn-product-tile"]]],["pn-profile-selector.cjs",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option.cjs",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["pn-sidenav.cjs",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level.cjs",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link.cjs",[[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.cjs",[[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.cjs",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level.cjs",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input.cjs",[[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.cjs",[[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.cjs",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button.cjs",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link.cjs",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-tile-info_2.cjs",[[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.cjs",[[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);
59
59
  });
@@ -44,7 +44,7 @@ let PnProductCardPrice = class {
44
44
  if (!this.amount) {
45
45
  return;
46
46
  }
47
- return (this.url) ? (index.h(index.Host, null, index.h("div", { class: "price" }, (this.amount) ? (index.h("span", null, this.amount)) : null, (this.currency) ? (index.h("span", null, " " + this.currency)) : null), (this.note) ? (index.h("p", null, this.note)) : null, (this.label) ? (index.h("pn-button", { small: "true", icon: "open-in-new", appearance: "light", href: this.url, target: "_blank", id: this.service.split(" ").join("-").toLocaleLowerCase() }, this.label)) : null)) : (index.h(index.Host, null, index.h("div", { class: "price" }, (this.amount) ? (index.h("span", null, this.amount)) : null, (this.currency) ? (index.h("span", null, this.currency)) : null)));
47
+ return (this.url) ? (index.h(index.Host, { id: this.linkid }, index.h("div", { class: "price" }, (this.amount) ? (index.h("span", null, this.amount)) : null, (this.currency) ? (index.h("span", null, " " + this.currency)) : null), (this.note) ? (index.h("p", null, this.note)) : null, (this.label) ? (index.h("pn-button", { small: "true", icon: "open-in-new", appearance: "light", href: this.url, target: "_blank" }, this.label)) : null)) : (index.h(index.Host, null, index.h("div", { class: "price" }, (this.amount) ? (index.h("span", null, this.amount)) : null, (this.currency) ? (index.h("span", null, this.currency)) : null)));
48
48
  }
49
49
  };
50
50
  PnProductCardPrice.style = pnProductCardPriceCss;
@@ -2,39 +2,80 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e3e27c79.js');
6
- const pnProductPricelistStore = require('./pn-product-pricelist-store-86310b5a.js');
7
- require('./index-28bbc937.js');
5
+ const index$1 = require('./index-e3e27c79.js');
6
+ const index = require('./index-28bbc937.js');
7
+ const data = require('./data-e77c1ada.js');
8
+
9
+ // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
10
+ const { state, onChange } = index.createStore({
11
+ i18n: {
12
+ maxweightlabel: '',
13
+ weightlabel: '',
14
+ maxmeasurementlabel: '',
15
+ sizeheading: '',
16
+ senddirectcta: '',
17
+ stampshopcta: '',
18
+ },
19
+ market: {
20
+ currency: ""
21
+ }
22
+ });
8
23
 
9
24
  const pnProductPricelistResultCss = "";
10
25
 
11
26
  let PnFindProductPricelistResult = class {
12
27
  constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
28
+ index$1.registerInstance(this, hostRef);
14
29
  this.item = null;
30
+ this.description = [];
15
31
  this.shownitems = [];
32
+ this.showMeasurement = false;
16
33
  this.weightText = "";
17
34
  }
18
35
  componentWillLoad() {
19
36
  this.composeItems();
20
37
  }
21
38
  composeItems() {
22
- this.shownitems = [];
23
- if (this.item.pricestamps) {
24
- this.shownitems.push(Object.assign(Object.assign({}, this.item), { priceagent: null, pricesenddirect: null }));
25
- }
26
- if (this.item.priceagent) {
27
- this.shownitems.push(Object.assign(Object.assign({}, this.item), { pricestamps: null, pricesenddirect: null }));
28
- }
29
- if (this.item.pricesenddirect) {
30
- this.shownitems.push(Object.assign(Object.assign({}, this.item), { pricestamps: null, priceagent: null }));
39
+ if (this.item.description) {
40
+ this.description = this.item.description.split("#bullet").filter(x => x !== "");
31
41
  }
32
- // Parcels are always in KG. Letter KG must be converted from grams
33
- this.weightText = (this.item.what === "parcel") ? this.item.maxweight + 'kg' :
34
- (this.item.what === "letter" && this.item.maxweight > 999) ? Math.round(this.item.maxweight / 1000) + " kg" : this.item.maxweight + " g";
42
+ this.showMeasurement = (this.item.maxmått !== null) || (this.item.rulle !== null);
43
+ this.shownitems = [this.item];
44
+ // if (this.item.pricestamps) {
45
+ // this.shownitems.push({...this.item, priceagent: null, pricesenddirect: null});
46
+ // }
47
+ // if (this.item.priceagent) {
48
+ // this.shownitems.push({...this.item, pricestamps: null, pricesenddirect: null});
49
+ // }
50
+ // if (this.item.pricesenddirect) {
51
+ // this.shownitems.push({...this.item, pricestamps: null, priceagent: null});
52
+ // }
53
+ // // Parcels are always in KG. Letter KG must be converted from grams
54
+ // this.weightText = (this.item.what === "parcel") ? this.item.maxweight + 'kg' :
55
+ // (this.item.what === "letter" && this.item.maxweight > 999) ? Math.round(this.item.maxweight/1000) + " kg" : this.item.maxweight + " g";
35
56
  }
36
57
  render() {
37
- return (index.h(index.Host, null, this.shownitems.map((item) => (index.h("pn-product-tile", null, index.h("pn-illustration", { slot: "illustration", illustration: item.illustration }), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, index.h("h3", null, item.name), (item.description) ? (index.h("div", { class: "description" }, item.description)) : null, (item.info) ? (index.h("div", { class: "description" }, item.info)) : null)), item.maxweight ? (index.h("pn-product-tile-info", { label: pnProductPricelistStore.state.i18n.maxweightlabel, text: this.weightText })) : null, item.maximummeasurements ? (index.h("pn-product-tile-info", { label: pnProductPricelistStore.state.i18n.maxmeasurementlabel, text: item.maximummeasurements })) : null, item.pricestamps ? (index.h("pn-product-tile-price", { slot: "price", label: pnProductPricelistStore.state.i18n.stampshopcta, amount: item.pricestamps + '', currency: pnProductPricelistStore.state.market.currency })) : null, item.priceagent ? (index.h("pn-product-tile-price", { slot: "price", label: "", amount: item.priceagent + '', currency: pnProductPricelistStore.state.market.currency, url: "https://shop.postnord.se/ebutik/default.aspx" })) : null, item.pricesenddirect ? (index.h("pn-product-tile-price", { slot: "price", label: pnProductPricelistStore.state.i18n.senddirectcta, amount: item.pricesenddirect + '', currency: pnProductPricelistStore.state.market.currency, url: "https://portal.postnord.com/skickadirekt/" })) : null, item.note ? (index.h("small", { slot: "note" }, index.h("p", null, item.note))) : null)))));
58
+ return (index$1.h(index$1.Host, null, this.shownitems.map((item) => (index$1.h("pn-product-card", { "data-productid": item.id }, index$1.h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), index$1.h("div", { slot: "title" }, index$1.h("h2", null, item.name, " "), (this.item.highestrankusp) ?
59
+ (this.item.highestrankusp === "Billigast") ?
60
+ (index$1.h("span", { slot: "Billigast" }, this.item.highestrankusp, index$1.h("pn-icon", { symbol: "box-label", small: "false", color: "green700" })))
61
+ : (index$1.h("span", { slot: "Snabbast" }, this.item.highestrankusp, index$1.h("pn-icon", { symbol: "bolt", small: "false", color: "blue700" }))) : null), index$1.h("div", { slot: "content" }, index$1.h("div", { class: "content" }, (this.item.description) ? (index$1.h("div", { class: "description" }, this.description.map((desc) => (index$1.h("li", null, desc))))) : null, (this.item.info) ? (index$1.h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (index$1.h("small", { slot: "note" }, index$1.h("p", null, this.item.note))) : null, this.item.additionalusp ? (index$1.h("div", { slot: "additionalUSP" })) : null, this.showMeasurement ? (index$1.h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, index$1.h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (index$1.h("pn-product-card-price", { slot: "sendDirectPrice", label: state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: state.market.currency, url: data.sendDirectUrl, service: this.item.name + "-portal" })) : null, this.item.pricestamps ? (index$1.h("pn-product-card-price", { slot: "stampPrice", label: state.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: state.market.currency, url: data.stampShopUrl, service: this.item.name + "-eshop" })) : null))
62
+ // <pn-product-tile>
63
+ // <pn-illustration slot="illustration" illustration={ item.illustration }></pn-illustration>
64
+ // <div slot="content">
65
+ // <div class="content">
66
+ // <h3>{item.name}</h3>
67
+ // {(item.description) ? (<div class="description">{item.description}</div>) : null}
68
+ // {(item.info) ? (<div class="description">{item.info}</div>) : null}
69
+ // </div>
70
+ // </div>
71
+ // { item.maxweight ? (<pn-product-tile-info label={state.i18n.maxweightlabel} text={this.weightText}></pn-product-tile-info>) : null }
72
+ // {/* { item.maximummeasurements ? (<pn-product-tile-info label={state.i18n.maxmeasurementlabel} text={item.maximummeasurements}></pn-product-tile-info>) : null } */}
73
+ // { item.pricestamps ? (<pn-product-tile-price slot="price" label={state.i18n.stampshopcta} amount={item.pricestamps+''} currency={ state.market.currency }></pn-product-tile-price>) : null }
74
+ // {/* { item.priceagent ? (<pn-product-tile-price slot="price" label="" amount={item.priceagent+''} currency={ state.market.currency } url="https://shop.postnord.se/ebutik/default.aspx"></pn-product-tile-price>) : null } */}
75
+ // { item.pricesenddirect ? (<pn-product-tile-price slot="price" label={state.i18n.senddirectcta} amount={item.pricesenddirect+''} currency={ state.market.currency } url="https://portal.postnord.com/skickadirekt/"></pn-product-tile-price>) : null }
76
+ // { item.note ? (<small slot="note"><p>{item.note}</p></small>) : null }
77
+ // </pn-product-tile>
78
+ ))));
38
79
  }
39
80
  static get watchers() { return {
40
81
  "item": ["composeItems"]