@postnord/pn-marketweb-components 1.0.43 → 1.0.44-beta1

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 (72) hide show
  1. package/cjs/{convert-57b3dd5e.js → convert-b8a6d658.js} +55 -0
  2. package/cjs/loader.cjs.js +1 -1
  3. package/cjs/pn-choice-button.cjs.entry.js +39 -0
  4. package/cjs/pn-find-price-result.cjs.entry.js +44 -0
  5. package/cjs/pn-find-price-store-85b100ba.js +23 -0
  6. package/cjs/pn-find-price.cjs.entry.js +260 -0
  7. package/cjs/{pn-choice-button_2.cjs.entry.js → pn-find-service-and-price-result.cjs.entry.js} +0 -33
  8. package/cjs/pn-find-service-and-price.cjs.entry.js +1 -1
  9. package/cjs/pn-market-web-components.cjs.js +1 -1
  10. package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
  11. package/collection/collection-manifest.json +2 -0
  12. package/collection/components/widgets/pn-find-price/data.js +68 -0
  13. package/collection/components/widgets/pn-find-price/find-price.stories.js +27 -0
  14. package/collection/components/widgets/pn-find-price/pn-find-price-result.css +3 -0
  15. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +100 -0
  16. package/collection/components/widgets/pn-find-price/pn-find-price-store.js +20 -0
  17. package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +71 -0
  18. package/collection/components/widgets/pn-find-price/pn-find-price-types.js +1 -0
  19. package/collection/components/widgets/pn-find-price/pn-find-price.css +55 -0
  20. package/collection/components/widgets/pn-find-price/pn-find-price.js +212 -0
  21. package/collection/globals/shared/productprice/convert.js +55 -1
  22. package/custom-elements/index.d.ts +12 -0
  23. package/custom-elements/index.js +391 -28
  24. package/esm/{convert-b49a0857.js → convert-8cce67c4.js} +55 -1
  25. package/esm/loader.js +1 -1
  26. package/esm/{pn-choice-button_2.entry.js → pn-choice-button.entry.js} +1 -39
  27. package/esm/pn-find-price-result.entry.js +40 -0
  28. package/esm/pn-find-price-store-d2053b72.js +21 -0
  29. package/esm/pn-find-price.entry.js +256 -0
  30. package/esm/pn-find-service-and-price-result.entry.js +41 -0
  31. package/esm/pn-find-service-and-price.entry.js +1 -1
  32. package/esm/pn-market-web-components.js +1 -1
  33. package/esm/pn-product-pricelist.entry.js +1 -1
  34. package/esm-es5/{convert-b49a0857.js → convert-8cce67c4.js} +1 -1
  35. package/esm-es5/loader.js +1 -1
  36. package/esm-es5/pn-choice-button.entry.js +1 -0
  37. package/esm-es5/pn-find-price-result.entry.js +1 -0
  38. package/esm-es5/pn-find-price-store-d2053b72.js +1 -0
  39. package/esm-es5/pn-find-price.entry.js +1 -0
  40. package/esm-es5/pn-find-service-and-price-result.entry.js +1 -0
  41. package/esm-es5/pn-find-service-and-price.entry.js +1 -1
  42. package/esm-es5/pn-market-web-components.js +1 -1
  43. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  44. package/package.json +1 -1
  45. package/pn-market-web-components/{p-e6a209c6.system.entry.js → p-0d0ea574.system.entry.js} +1 -1
  46. package/pn-market-web-components/{p-b8af690a.entry.js → p-22738646.entry.js} +1 -1
  47. package/pn-market-web-components/p-233ca151.system.js +1 -0
  48. package/pn-market-web-components/p-325a7cae.entry.js +1 -0
  49. package/pn-market-web-components/p-4fcabdb8.entry.js +1 -0
  50. package/pn-market-web-components/p-50454694.system.entry.js +1 -0
  51. package/pn-market-web-components/{p-91624bd5.system.js → p-5ce5be4f.system.js} +2 -2
  52. package/pn-market-web-components/p-6ee881ea.system.entry.js +1 -0
  53. package/pn-market-web-components/p-725e4377.entry.js +1 -0
  54. package/pn-market-web-components/{p-21e0e386.js → p-7dd91709.js} +1 -1
  55. package/pn-market-web-components/p-a22df959.system.js +1 -1
  56. package/pn-market-web-components/p-b30e348c.system.entry.js +1 -0
  57. package/pn-market-web-components/p-bea2dcc6.entry.js +1 -0
  58. package/pn-market-web-components/p-c30207e6.js +1 -0
  59. package/pn-market-web-components/p-d8882f68.system.entry.js +1 -0
  60. package/pn-market-web-components/p-dd4de1a9.entry.js +1 -0
  61. package/pn-market-web-components/{p-e04f8d34.system.entry.js → p-eb75d0cf.system.entry.js} +1 -1
  62. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  63. package/types/components/widgets/pn-find-price/pn-find-price-result.d.ts +9 -0
  64. package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +33 -0
  65. package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +71 -0
  66. package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +46 -0
  67. package/types/components/widgets/pn-find-price/pn-find-price.d.ts +16 -0
  68. package/types/components.d.ts +37 -0
  69. package/esm-es5/pn-choice-button_2.entry.js +0 -1
  70. package/pn-market-web-components/p-37801e32.entry.js +0 -1
  71. package/pn-market-web-components/p-861210ae.entry.js +0 -1
  72. package/pn-market-web-components/p-ec1127de.system.entry.js +0 -1
@@ -281,10 +281,10 @@ let PnFilterSearch$1 = class extends HTMLElement {
281
281
  static get style() { return pnFilterSearchCss; }
282
282
  };
283
283
 
284
- const translations$8 = {
284
+ const translations$9 = {
285
285
  'sv': {
286
286
  'componentheading': 'Vad vill du skicka?',
287
- 'deliveryscopeheading': 'Hit eller dit?',
287
+ 'deliveryscopeheading': 'Endast leveranser inom Sverige',
288
288
  'sizeheading': 'Hur mycket väger det?',
289
289
  'resultlistheading': 'Några utvalda val',
290
290
  'weightlabel': 'Vikt',
@@ -295,7 +295,7 @@ const translations$8 = {
295
295
  },
296
296
  'en': {
297
297
  'componentheading': 'What do you want to send?',
298
- 'deliveryscopeheading': 'Here or there?',
298
+ 'deliveryscopeheading': 'Deliveries within Sweden only',
299
299
  'sizeheading': 'How much does it weigh?',
300
300
  'resultlistheading': 'Some suitable options for you',
301
301
  'weightlabel': 'Weight',
@@ -306,7 +306,7 @@ const translations$8 = {
306
306
  },
307
307
  'da': {
308
308
  'componentheading': 'Vad vill du skicka?',
309
- 'deliveryscopeheading': 'Here or there?',
309
+ 'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
310
310
  'sizeheading': 'How much does it weigh?',
311
311
  'resultlistheading': 'Some suitable options for you',
312
312
  'weightlabel': 'Vægt',
@@ -317,7 +317,7 @@ const translations$8 = {
317
317
  },
318
318
  'no': {
319
319
  'componentheading': 'Vad vill du skicka?',
320
- 'deliveryscopeheading': 'Here or there?',
320
+ 'deliveryscopeheading': 'Kun leveranser innen Sverige',
321
321
  'sizeheading': 'How much does it weigh?',
322
322
  'resultlistheading': 'Some suitable options for you',
323
323
  'weightlabel': 'Vekt',
@@ -328,7 +328,7 @@ const translations$8 = {
328
328
  },
329
329
  'fi': {
330
330
  'componentheading': 'Vad vill du skicka?',
331
- 'deliveryscopeheading': 'Here or there?',
331
+ 'deliveryscopeheading': 'Toimitukset vain Ruotsin sisällä',
332
332
  'sizeheading': 'How much does it weigh?',
333
333
  'resultlistheading': 'Some suitable options for you',
334
334
  'weightlabel': 'Paino',
@@ -338,7 +338,7 @@ const translations$8 = {
338
338
  'stampshopcta': 'Order home stamps from the webshop',
339
339
  }
340
340
  };
341
- const markets$1 = {
341
+ const markets$2 = {
342
342
  'se': {
343
343
  "currency": "kr",
344
344
  },
@@ -353,26 +353,15 @@ const markets$1 = {
353
353
  }
354
354
  };
355
355
 
356
- const postagetypes = [
357
- { name: "Brev", value: "letter", illustration: "letterbox-reply-letter-plants" },
358
- { name: "Paket", value: "parcel", illustration: "tracking" }
359
- ];
356
+ const sizeCategories = [
357
+ { name: "Document", value: "document", illustration: "claims", unit: "gram" },
358
+ { name: "Box Of Chocolate", value: "boxofchocolate", illustration: "outgoing", unit: "gram" },
359
+ { name: "Rubber Boots", value: "rubberboots", illustration: "christmas", unit: "combo" },
360
+ { name: "Moving Box", value:"movingbox", illustration: "outgoing", unit: "kgram" },
361
+ ];
360
362
 
361
- const deliveryscopes = {
362
- "letter": [
363
- { name: "Sweden", value: "sweden", illustration: "letterboxes" },
364
- { name: "Abroad", value: "abroad", illustration: "character-box-letters-globe" },
365
-
366
- ],
367
- "parcel": [
368
- { name: "Sweden", value: "sweden", illustration: "letterboxes" },
369
- { name: "Within Europe", value:"withineurope", illustration: "character-box-letters-globe" },
370
- { name: "Outside Europe", value:"outsideeurope", illustration: "discover" },
371
- ]
372
- };
373
-
374
- const weights$1 = {
375
- "letter": [
363
+ const weights$2 = {
364
+ "gram": [
376
365
  { name: "50g", abbreviation: 'g', value: 50 },
377
366
  { name: "100g", abbreviation: 'g', value: 100 },
378
367
  { name: "250g", abbreviation: 'g', value: 250 },
@@ -380,7 +369,7 @@ const weights$1 = {
380
369
  { name: "1kg", abbreviation: 'kg', value: 1 },
381
370
  { name: "2kg", abbreviation: 'kg', value: 2 },
382
371
  ],
383
- "parcel": [
372
+ "kgram": [
384
373
  { name: "1kg", abbreviation: 'kg', value: 1 },
385
374
  { name: "2kg", abbreviation: 'kg', value: 2 },
386
375
  { name: "3kg", abbreviation: 'kg', value: 3 },
@@ -400,6 +389,31 @@ const weights$1 = {
400
389
  { name: "17kg", abbreviation: 'kg', value: 17 },
401
390
  { name: "18kg", abbreviation: 'kg', value: 18 },
402
391
  { name: "20kg", abbreviation: 'kg', value: 20 },
392
+ ],
393
+ "combo": [
394
+ { name: "50g", abbreviation: 'g', value: 50 },
395
+ { name: "100g", abbreviation: 'g', value: 100 },
396
+ { name: "250g", abbreviation: 'g', value: 250 },
397
+ { name: "500g", abbreviation: 'g', value: 500 },
398
+ { name: "1kg", abbreviation: 'kg', value: 1 },
399
+ { name: "2kg", abbreviation: 'kg', value: 2 },
400
+ { name: "3kg", abbreviation: 'kg', value: 3 },
401
+ { name: "4kg", abbreviation: 'kg', value: 4 },
402
+ { name: "5kg", abbreviation: 'kg', value: 5 },
403
+ { name: "6kg", abbreviation: 'kg', value: 6 },
404
+ { name: "7Kg", abbreviation: 'kg', value: 7 },
405
+ { name: "8kg", abbreviation: 'kg', value: 8 },
406
+ { name: "9kg", abbreviation: 'kg', value: 9 },
407
+ { name: "10kg", abbreviation: 'kg', value: 10 },
408
+ { name: "11kg", abbreviation: 'kg', value: 11 },
409
+ { name: "12kg", abbreviation: 'kg', value: 12 },
410
+ { name: "13kg", abbreviation: 'kg', value: 13 },
411
+ { name: "14kg", abbreviation: 'kg', value: 14 },
412
+ { name: "15kg", abbreviation: 'kg', value: 15 },
413
+ { name: "16kg", abbreviation: 'kg', value: 16 },
414
+ { name: "17kg", abbreviation: 'kg', value: 17 },
415
+ { name: "18kg", abbreviation: 'kg', value: 18 },
416
+ { name: "20kg", abbreviation: 'kg', value: 20 },
403
417
  ]
404
418
  };
405
419
 
@@ -2130,6 +2144,60 @@ async function convertFileFromStream(stream, filterColumnNames = ["what", "deliv
2130
2144
  return fileData;
2131
2145
  }
2132
2146
 
2147
+ async function convertFileForSizeCategogy(stream, filterColumnNames = ["sizecategory"]) {
2148
+ const toFilterValue = (x) => x.toLowerCase().replace(/\s+/g, '');
2149
+ const sheets = await readXlsxFile(stream, { getSheets: true });
2150
+ let dataRows = [];
2151
+ let sizecategoryColumn;
2152
+ let sheetsData = await Promise.all(sheets.map(async (sheet) => { return await readXlsxFile(stream, { sheet: sheet.name }) }));
2153
+
2154
+ let types = {};
2155
+ sheetsData.forEach(sheetData => {
2156
+ const firstRow = sheetData.shift().map(x => toFilterValue(x));
2157
+ // Set up column for adding options
2158
+ firstRow.forEach((col, i) => {
2159
+ if (typeof types[col] === "undefined" && filterColumnNames.includes(col)) {
2160
+ types[col] = [];
2161
+ }
2162
+ if(col === "sizecategory")
2163
+ sizecategoryColumn = i;
2164
+ });
2165
+
2166
+ sheetData.forEach((row, rowindex) => {
2167
+ // read sizeCategory column of each row and split it to save data for each item
2168
+ const firstColRow = row[sizecategoryColumn];
2169
+ const sizeCatColumnValue = firstColRow.split('/');
2170
+
2171
+ sizeCatColumnValue.forEach((value, j) => {
2172
+ const dataRow = {};
2173
+
2174
+ firstRow.forEach(async (col, i) => {
2175
+ const rowVal = (i === sizecategoryColumn) ? value : row[i];
2176
+ dataRow[col] = rowVal;
2177
+
2178
+ // Add to types options
2179
+ if (filterColumnNames.includes(col)) {
2180
+ const filterVal = toFilterValue(rowVal);
2181
+ dataRow[col] = filterVal;
2182
+
2183
+ if (!types[col].includes(filterVal)) {
2184
+ types[col].push(filterVal);
2185
+ }
2186
+ }
2187
+ });
2188
+ dataRows.push(dataRow);
2189
+ });
2190
+ });
2191
+ });
2192
+
2193
+
2194
+ const fileData = {
2195
+ "types": types,
2196
+ "data": dataRows
2197
+ };
2198
+ return fileData;
2199
+ }
2200
+
2133
2201
  const appendToMap = (map, propName, value) => {
2134
2202
  const items = map.get(propName);
2135
2203
  if (!items) {
@@ -2314,6 +2382,297 @@ const createStore = (defaultState, shouldUpdate) => {
2314
2382
  return map;
2315
2383
  };
2316
2384
 
2385
+ // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
2386
+ const { state: state$4, onChange: onChange$4 } = createStore({
2387
+ i18n: {
2388
+ componentheading: '',
2389
+ deliveryscopeheading: '',
2390
+ sizeheading: '',
2391
+ resultlistheading: '',
2392
+ weightlabel: '',
2393
+ maxweightlabel: '',
2394
+ maxmeasurementlabel: '',
2395
+ senddirectcta: '',
2396
+ stampshopcta: '',
2397
+ },
2398
+ market: {
2399
+ currency: ""
2400
+ }
2401
+ });
2402
+
2403
+ const pnFindPriceCss = "pn-find-price .findprice-form{max-width:50em;margin:0 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 .sizecategory{text-align:center;margin-bottom:3rem}pn-find-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-price .weightoption-input{width:5em;position:relative}pn-find-price .weightoption-input input::-webkit-outer-spin-button,pn-find-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-price .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-find-price .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-find-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-price .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-find-price .resultlist{margin:3em 0}";
2404
+
2405
+ let PnfindPrice = class extends HTMLElement {
2406
+ constructor() {
2407
+ super();
2408
+ this.__registerHost();
2409
+ this.source = "https://com-integration.postnord.com/globalassets/global/prices/sv-findprice.xlsx";
2410
+ this.language = "sv";
2411
+ this.market = "se";
2412
+ this.filteredItems = [];
2413
+ this.weight = { value: 0, name: "" };
2414
+ this.weightvalue = 0;
2415
+ this.sourceData = { types: [], data: [] };
2416
+ this.sizecategory = { value: "", name: "", icon: "", unit: "" };
2417
+ }
2418
+ componentWillLoad() {
2419
+ this.setState();
2420
+ this.getDataSource();
2421
+ }
2422
+ async getDataSource() {
2423
+ const cacheBusting = `?cache=${Math.floor(Math.random() * (10000 - 1) + 1)}`;
2424
+ const req = await fetch(this.source + cacheBusting);
2425
+ const reqbody = await req.blob();
2426
+ try {
2427
+ const convertedData = await convertFileForSizeCategogy(reqbody);
2428
+ this.sourceData = convertedData;
2429
+ this.filterItems();
2430
+ }
2431
+ catch (e) {
2432
+ console.log('Unable to parse data');
2433
+ }
2434
+ }
2435
+ setState() {
2436
+ if (this.market) {
2437
+ state$4.market = markets$2[this.market];
2438
+ }
2439
+ if (this.language && translations$9[this.language]) {
2440
+ state$4.i18n = translations$9[this.language];
2441
+ }
2442
+ }
2443
+ filterItems() {
2444
+ var _a;
2445
+ if (!((_a = this.sourceData) === null || _a === void 0 ? void 0 : _a.data)) {
2446
+ console.log('Data has not yet been loaded');
2447
+ return;
2448
+ }
2449
+ const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope === "Sweden");
2450
+ if (!this.sizecategory) {
2451
+ return;
2452
+ }
2453
+ const sizeItemData = deliveryScopeData.filter((x) => x.sizecategory === this.sizecategory.value);
2454
+ if (!this.weight || !this.weight.value) {
2455
+ return;
2456
+ }
2457
+ const comparisonWeight = this.weight.value <= 20 ? this.weight.value * 1000 : this.weight.value;
2458
+ let weightFilteredData = sizeItemData.filter(x => (x.maxweight <= 20 ? x.maxweight * 1000 : x.maxweight) === comparisonWeight);
2459
+ // if no value found select the next available value
2460
+ if (weightFilteredData.length === 0) {
2461
+ weightFilteredData = sizeItemData.filter(x => (x.maxweight <= 20 ? x.maxweight * 1000 : x.maxweight) >= comparisonWeight);
2462
+ if (weightFilteredData.length > 0) {
2463
+ //sort based on the maxvalue
2464
+ weightFilteredData.sort((a, b) => { return (a.maxweight - b.maxweight); });
2465
+ // map to get the next unique item
2466
+ const uniqueWeightOptions = [...new Map(weightFilteredData.reverse().map(item => [item["id"], item])).values()];
2467
+ if (uniqueWeightOptions.length > 0) {
2468
+ weightFilteredData = uniqueWeightOptions;
2469
+ }
2470
+ }
2471
+ }
2472
+ this.filteredItems = weightFilteredData;
2473
+ }
2474
+ render() {
2475
+ return (h("div", null, h("div", { class: "findprice-form" }, h("div", null, (h("div", { class: "heading" }, state$4.i18n.deliveryscopeheading))), h("div", null, (h("div", { class: "heading" }, state$4.i18n.componentheading)), h("div", { class: "sizecategory" }, sizeCategories.map((sizeCategory) => (h("pn-choice-button", { choiceid: sizeCategory.value, value: sizeCategory.value, name: "sizecategory", type: "radio", checked: sizeCategory.value === this.sizecategory.value, onChange: () => {
2476
+ this.sizecategory = sizeCategories.filter(x => x.value === sizeCategory.value)[0];
2477
+ if (this.weight.value === 0) {
2478
+ this.weight = weights$2[this.sizecategory.unit][0];
2479
+ this.weightvalue = this.weight.value;
2480
+ }
2481
+ } }, h("pn-illustration", { illustration: sizeCategory.illustration }), " ", sizeCategory.name))))), (this.sizecategory.value && weights$2[this.sizecategory.unit]) ? (h("div", null, (state$4.i18n.sizeheading) ? (h("div", { class: "heading" }, state$4.i18n.sizeheading)) : null, h("div", { class: "weightoption" }, h("div", { class: "weightoption-input" }, h("pn-input", { inputid: "weightvalue", name: "weightvalue", type: "number", label: state$4.i18n.weightlabel, value: this.weightvalue, onChange: (e) => {
2482
+ if (e && e.target && e.target.value) {
2483
+ const weightNum = parseInt(e.target.value, 10);
2484
+ if (!isNaN(weightNum)) {
2485
+ let matchingWeights = weights$2[this.sizecategory.unit].filter((x) => {
2486
+ let weightInGrams = (x.abbreviation === "kg") ? x.value * 1000 : x.value;
2487
+ return weightInGrams >= weightNum;
2488
+ });
2489
+ if (matchingWeights && matchingWeights.length > 0) {
2490
+ this.weight = matchingWeights[0];
2491
+ this.weightvalue = this.weight.value;
2492
+ }
2493
+ }
2494
+ }
2495
+ } }), h("span", { class: "weightoption-input-abbreviation" }, this.weight.abbreviation)), h("div", { class: "weightoption-range" }, h("input", { type: "range", id: "weightrange", name: "weightrange", list: "weightlist", value: (!this.weight.value) ? 0 : weights$2[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), onChange: (e) => {
2496
+ const value = e.target.value;
2497
+ this.weight = weights$2[this.sizecategory.unit][value];
2498
+ this.weightvalue = this.weight.value;
2499
+ }, min: "0",
2500
+ // max={ weights[this.postagetype.value][weights[this.postagetype.value].length - 1].value }
2501
+ max: weights$2[this.sizecategory.unit].length - 1 }), h("datalist", { id: "weightlist" }, weights$2[this.sizecategory.unit].map((weight, weightindex) => {
2502
+ let labelText = weight.name;
2503
+ if (weights$2[this.sizecategory.unit].length > 6) {
2504
+ labelText = (weightindex % 5 === 0 || weightindex === 0 || weightindex === weights$2[this.sizecategory.unit].length - 1) ? weight.name : '';
2505
+ }
2506
+ return (h("option", Object.assign({ value: weightindex }, (labelText ? { label: labelText } : {}))));
2507
+ })))))) : null), (this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" }, (state$4.i18n.resultlistheading) ? (h("div", { class: "heading" }, state$4.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))))) : null));
2508
+ }
2509
+ static get watchers() { return {
2510
+ "market": ["setState"],
2511
+ "language": ["setState"],
2512
+ "weightvalue": ["filterItems"],
2513
+ "sizecategory": ["filterItems"]
2514
+ }; }
2515
+ static get style() { return pnFindPriceCss; }
2516
+ };
2517
+
2518
+ const pnFindPriceResultCss = "pn-find-price-result .test{margin:3em 0}";
2519
+
2520
+ let PnfindPriceResult = class extends HTMLElement {
2521
+ constructor() {
2522
+ super();
2523
+ this.__registerHost();
2524
+ this.item = null;
2525
+ this.shownitems = [];
2526
+ this.weightText = "";
2527
+ }
2528
+ componentWillLoad() {
2529
+ this.composeItems();
2530
+ }
2531
+ composeItems() {
2532
+ this.shownitems = [];
2533
+ if (this.item.pricestamps) {
2534
+ this.shownitems.push(Object.assign(Object.assign({}, this.item), { priceagent: null, pricesenddirect: null }));
2535
+ }
2536
+ if (this.item.priceagent) {
2537
+ this.shownitems.push(Object.assign(Object.assign({}, this.item), { pricestamps: null, pricesenddirect: null }));
2538
+ }
2539
+ if (this.item.pricesenddirect) {
2540
+ this.shownitems.push(Object.assign(Object.assign({}, this.item), { pricestamps: null, priceagent: null }));
2541
+ }
2542
+ this.weightText = (this.item.maxweight <= 20) ? this.item.maxweight + 'kg' :
2543
+ (this.item.maxweight > 999) ? Math.round(this.item.maxweight / 1000) + " kg" : this.item.maxweight + " g";
2544
+ }
2545
+ render() {
2546
+ return (h(Host, null, this.shownitems.map((item) => (h("pn-product-tile", null, h("pn-illustration", { slot: "illustration", illustration: item.illustration }), h("div", { slot: "content" }, h("div", { class: "content" }, h("h3", null, item.name), (item.description) ? (h("div", { class: "description" }, item.description)) : null, (item.info) ? (h("div", { class: "description" }, item.info)) : null)), item.note ? (h("small", { slot: "note" }, h("p", null, item.note))) : null, item.maxweight ? (h("pn-product-tile-info", { label: state$4.i18n.maxweightlabel, text: this.weightText })) : null, item.maximummeasurements ? (h("pn-product-tile-info", { label: state$4.i18n.maxmeasurementlabel, text: item.maximummeasurements })) : null, item.priceagent ? (h("pn-product-tile-price", { slot: "price", label: "", amount: item.priceagent + '', currency: state$4.market.currency, url: "https://shop.postnord.se/ebutik/default.aspx" })) : null, item.pricestamps ? (h("pn-product-tile-price", { slot: "price", label: state$4.i18n.stampshopcta, amount: item.pricestamps + '', currency: state$4.market.currency })) : null, item.pricesenddirect ? (h("pn-product-tile-price", { slot: "price", label: state$4.i18n.senddirectcta, amount: item.pricesenddirect + '', currency: state$4.market.currency, url: "https://portal.postnord.com/skickadirekt/" })) : null)))));
2547
+ }
2548
+ static get watchers() { return {
2549
+ "item": ["composeItems"]
2550
+ }; }
2551
+ static get style() { return pnFindPriceResultCss; }
2552
+ };
2553
+
2554
+ const translations$8 = {
2555
+ 'sv': {
2556
+ 'componentheading': 'Vad vill du skicka?',
2557
+ 'deliveryscopeheading': 'Hit eller dit?',
2558
+ 'sizeheading': 'Hur mycket väger det?',
2559
+ 'resultlistheading': 'Några utvalda val',
2560
+ 'weightlabel': 'Vikt',
2561
+ 'maxweightlabel': 'Maxvikt',
2562
+ 'maxmeasurementlabel': 'Maxvolym',
2563
+ 'senddirectcta': 'Köp frakt via Skicka Direkt',
2564
+ 'stampshopcta': 'Köp frimärken via vår webshop',
2565
+ },
2566
+ 'en': {
2567
+ 'componentheading': 'What do you want to send?',
2568
+ 'deliveryscopeheading': 'Here or there?',
2569
+ 'sizeheading': 'How much does it weigh?',
2570
+ 'resultlistheading': 'Some suitable options for you',
2571
+ 'weightlabel': 'Weight',
2572
+ 'maxweightlabel': 'Max weight',
2573
+ 'maxmeasurementlabel': 'Maximum measurement',
2574
+ 'senddirectcta': 'Buy shipping in Send Direct',
2575
+ 'stampshopcta': 'Order home stamps from the webshop',
2576
+ },
2577
+ 'da': {
2578
+ 'componentheading': 'Vad vill du skicka?',
2579
+ 'deliveryscopeheading': 'Here or there?',
2580
+ 'sizeheading': 'How much does it weigh?',
2581
+ 'resultlistheading': 'Some suitable options for you',
2582
+ 'weightlabel': 'Vægt',
2583
+ 'maxweightlabel': 'Max vægt',
2584
+ 'maxmeasurementlabel': 'Maks. Volumen',
2585
+ 'senddirectcta': 'Buy shipping in Send Direct',
2586
+ 'stampshopcta': 'Order home stamps from the webshop',
2587
+ },
2588
+ 'no': {
2589
+ 'componentheading': 'Vad vill du skicka?',
2590
+ 'deliveryscopeheading': 'Here or there?',
2591
+ 'sizeheading': 'How much does it weigh?',
2592
+ 'resultlistheading': 'Some suitable options for you',
2593
+ 'weightlabel': 'Vekt',
2594
+ 'maxweightlabel': 'Maks vekt',
2595
+ 'maxmeasurementlabel': 'Maks volum',
2596
+ 'senddirectcta': 'Buy shipping in Send Direct',
2597
+ 'stampshopcta': 'Order home stamps from the webshop',
2598
+ },
2599
+ 'fi': {
2600
+ 'componentheading': 'Vad vill du skicka?',
2601
+ 'deliveryscopeheading': 'Here or there?',
2602
+ 'sizeheading': 'How much does it weigh?',
2603
+ 'resultlistheading': 'Some suitable options for you',
2604
+ 'weightlabel': 'Paino',
2605
+ 'maxweightlabel': 'Max paino',
2606
+ 'maxmeasurementlabel': 'Max äänenvoimakkuus',
2607
+ 'senddirectcta': 'Buy shipping in Send Direct',
2608
+ 'stampshopcta': 'Order home stamps from the webshop',
2609
+ }
2610
+ };
2611
+ const markets$1 = {
2612
+ 'se': {
2613
+ "currency": "kr",
2614
+ },
2615
+ 'dk': {
2616
+ "currency": "dk",
2617
+ },
2618
+ 'fi': {
2619
+ "currency": " €",
2620
+ },
2621
+ 'no': {
2622
+ "currency": "kr",
2623
+ }
2624
+ };
2625
+
2626
+ const postagetypes = [
2627
+ { name: "Brev", value: "letter", illustration: "letterbox-reply-letter-plants" },
2628
+ { name: "Paket", value: "parcel", illustration: "tracking" }
2629
+ ];
2630
+
2631
+ const deliveryscopes = {
2632
+ "letter": [
2633
+ { name: "Sweden", value: "sweden", illustration: "letterboxes" },
2634
+ { name: "Abroad", value: "abroad", illustration: "character-box-letters-globe" },
2635
+
2636
+ ],
2637
+ "parcel": [
2638
+ { name: "Sweden", value: "sweden", illustration: "letterboxes" },
2639
+ { name: "Within Europe", value:"withineurope", illustration: "character-box-letters-globe" },
2640
+ { name: "Outside Europe", value:"outsideeurope", illustration: "discover" },
2641
+ ]
2642
+ };
2643
+
2644
+ const weights$1 = {
2645
+ "letter": [
2646
+ { name: "50g", abbreviation: 'g', value: 50 },
2647
+ { name: "100g", abbreviation: 'g', value: 100 },
2648
+ { name: "250g", abbreviation: 'g', value: 250 },
2649
+ { name: "500g", abbreviation: 'g', value: 500 },
2650
+ { name: "1kg", abbreviation: 'kg', value: 1 },
2651
+ { name: "2kg", abbreviation: 'kg', value: 2 },
2652
+ ],
2653
+ "parcel": [
2654
+ { name: "1kg", abbreviation: 'kg', value: 1 },
2655
+ { name: "2kg", abbreviation: 'kg', value: 2 },
2656
+ { name: "3kg", abbreviation: 'kg', value: 3 },
2657
+ { name: "4kg", abbreviation: 'kg', value: 4 },
2658
+ { name: "5kg", abbreviation: 'kg', value: 5 },
2659
+ { name: "6kg", abbreviation: 'kg', value: 6 },
2660
+ { name: "7Kg", abbreviation: 'kg', value: 7 },
2661
+ { name: "8kg", abbreviation: 'kg', value: 8 },
2662
+ { name: "9kg", abbreviation: 'kg', value: 9 },
2663
+ { name: "10kg", abbreviation: 'kg', value: 10 },
2664
+ { name: "11kg", abbreviation: 'kg', value: 11 },
2665
+ { name: "12kg", abbreviation: 'kg', value: 12 },
2666
+ { name: "13kg", abbreviation: 'kg', value: 13 },
2667
+ { name: "14kg", abbreviation: 'kg', value: 14 },
2668
+ { name: "15kg", abbreviation: 'kg', value: 15 },
2669
+ { name: "16kg", abbreviation: 'kg', value: 16 },
2670
+ { name: "17kg", abbreviation: 'kg', value: 17 },
2671
+ { name: "18kg", abbreviation: 'kg', value: 18 },
2672
+ { name: "20kg", abbreviation: 'kg', value: 20 },
2673
+ ]
2674
+ };
2675
+
2317
2676
  // Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
2318
2677
  const { state: state$3, onChange: onChange$3 } = createStore({
2319
2678
  i18n: {
@@ -4835,6 +5194,8 @@ const PnBonusProgressbarLevel = /*@__PURE__*/proxyCustomElement(PnBonusProgressb
4835
5194
  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"]]]);
4836
5195
  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"]]]);
4837
5196
  const PnFilterSearch = /*@__PURE__*/proxyCustomElement(PnFilterSearch$1, [1,"pn-filter-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4]},[[0,"input","inputHandler"]]]);
5197
+ 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]}]);
5198
+ const PnFindPriceResult = /*@__PURE__*/proxyCustomElement(PnfindPriceResult, [0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]);
4838
5199
  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]}]);
4839
5200
  const PnFindServiceAndPriceResult = /*@__PURE__*/proxyCustomElement(PnfindServiceAndPriceResult, [0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]);
4840
5201
  const PnLanguageSelector = /*@__PURE__*/proxyCustomElement(PnlanguageSelector, [4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}]);
@@ -4869,6 +5230,8 @@ const defineCustomElements = (opts) => {
4869
5230
  PnChoiceButton,
4870
5231
  PnFilterCheckbox,
4871
5232
  PnFilterSearch,
5233
+ PnFindPrice,
5234
+ PnFindPriceResult,
4872
5235
  PnFindServiceAndPrice,
4873
5236
  PnFindServiceAndPriceResult,
4874
5237
  PnLanguageSelector,
@@ -4903,4 +5266,4 @@ const defineCustomElements = (opts) => {
4903
5266
  }
4904
5267
  };
4905
5268
 
4906
- export { PnBonusProgressbar, PnBonusProgressbarLevel, PnChoiceButton, PnFilterCheckbox, PnFilterSearch, PnFindServiceAndPrice, PnFindServiceAndPriceResult, PnLanguageSelector, PnLanguageSelectorOption, PnMainnav, PnMainnavLevel, PnMainnavLink, PnMainnavList, PnMarketwebSitefooter, PnMarketwebSiteheader, PnMarketwebSiteheaderLogin, PnMarketwebSiteheaderSearch, PnPexPricefinder, PnProductPricelist, PnProductPricelistResult, PnProductTile, PnProductTileInfo, PnProductTilePrice, PnProfileSelector, PnSidenav, PnSidenavLevel, PnSidenavLink, PnSiteFooter, PnSiteFooterCol, PnSiteSelector, PnSiteSelectorItem, defineCustomElements };
5269
+ export { PnBonusProgressbar, PnBonusProgressbarLevel, PnChoiceButton, PnFilterCheckbox, PnFilterSearch, PnFindPrice, PnFindPriceResult, PnFindServiceAndPrice, PnFindServiceAndPriceResult, PnLanguageSelector, PnLanguageSelectorOption, PnMainnav, PnMainnavLevel, PnMainnavLink, PnMainnavList, PnMarketwebSitefooter, PnMarketwebSiteheader, PnMarketwebSiteheaderLogin, PnMarketwebSiteheaderSearch, PnPexPricefinder, PnProductPricelist, PnProductPricelistResult, PnProductTile, PnProductTileInfo, PnProductTilePrice, PnProfileSelector, PnSidenav, PnSidenavLevel, PnSidenavLink, PnSiteFooter, PnSiteFooterCol, PnSiteSelector, PnSiteSelectorItem, defineCustomElements };
@@ -1725,4 +1725,58 @@ async function convertFileFromStream(stream, filterColumnNames = ["what", "deliv
1725
1725
  return fileData;
1726
1726
  }
1727
1727
 
1728
- export { convertFileFromStream as c };
1728
+ async function convertFileForSizeCategogy(stream, filterColumnNames = ["sizecategory"]) {
1729
+ const toFilterValue = (x) => x.toLowerCase().replace(/\s+/g, '');
1730
+ const sheets = await readXlsxFile(stream, { getSheets: true });
1731
+ let dataRows = [];
1732
+ let sizecategoryColumn;
1733
+ let sheetsData = await Promise.all(sheets.map(async (sheet) => { return await readXlsxFile(stream, { sheet: sheet.name }) }));
1734
+
1735
+ let types = {};
1736
+ sheetsData.forEach(sheetData => {
1737
+ const firstRow = sheetData.shift().map(x => toFilterValue(x));
1738
+ // Set up column for adding options
1739
+ firstRow.forEach((col, i) => {
1740
+ if (typeof types[col] === "undefined" && filterColumnNames.includes(col)) {
1741
+ types[col] = [];
1742
+ }
1743
+ if(col === "sizecategory")
1744
+ sizecategoryColumn = i;
1745
+ });
1746
+
1747
+ sheetData.forEach((row, rowindex) => {
1748
+ // read sizeCategory column of each row and split it to save data for each item
1749
+ const firstColRow = row[sizecategoryColumn];
1750
+ const sizeCatColumnValue = firstColRow.split('/');
1751
+
1752
+ sizeCatColumnValue.forEach((value, j) => {
1753
+ const dataRow = {};
1754
+
1755
+ firstRow.forEach(async (col, i) => {
1756
+ const rowVal = (i === sizecategoryColumn) ? value : row[i];
1757
+ dataRow[col] = rowVal;
1758
+
1759
+ // Add to types options
1760
+ if (filterColumnNames.includes(col)) {
1761
+ const filterVal = toFilterValue(rowVal);
1762
+ dataRow[col] = filterVal;
1763
+
1764
+ if (!types[col].includes(filterVal)) {
1765
+ types[col].push(filterVal);
1766
+ }
1767
+ }
1768
+ });
1769
+ dataRows.push(dataRow);
1770
+ });
1771
+ });
1772
+ });
1773
+
1774
+
1775
+ const fileData = {
1776
+ "types": types,
1777
+ "data": dataRows
1778
+ };
1779
+ return fileData;
1780
+ }
1781
+
1782
+ export { convertFileFromStream as a, convertFileForSizeCategogy as c };
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"],"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-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-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-filter-checkbox",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search",[[1,"pn-filter-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4]},[[0,"input","inputHandler"]]]]],["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-profile-selector",[[0,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"spamode":[4],"loginManager":[32],"loggedIn":[32],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["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-tile_3",[[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]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-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-choice-button_2",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}],[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-site-footer_2",[[4,"pn-site-footer",{"url":[1]}],[4,"pn-site-footer-col"]]],["pn-mainnav-link",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["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"],"search":[1040]}],[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],"token":[1],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"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-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-filter-checkbox",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search",[[1,"pn-filter-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4]},[[0,"input","inputHandler"]]]]],["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-profile-selector",[[0,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"spamode":[4],"loginManager":[32],"loggedIn":[32],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["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-find-price-result",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-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-site-footer_2",[[4,"pn-site-footer",{"url":[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-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"],"search":[1040]}],[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",[[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);
14
14
  });
15
15
  };
16
16