@postnord/pn-marketweb-components 2.0.5 → 2.0.6-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 (40) hide show
  1. package/cjs/{data-42342802.js → data-b9e6d752.js} +1 -4
  2. package/cjs/pn-find-price-result.cjs.entry.js +2 -2
  3. package/cjs/{pn-find-price-store-6aab7fd0.js → pn-find-price-store-63671327.js} +3 -1
  4. package/cjs/pn-find-price.cjs.entry.js +19 -7
  5. package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
  6. package/collection/components/widgets/pn-find-price/data.js +2 -4
  7. package/collection/components/widgets/pn-find-price/find-price.stories.js +2 -2
  8. package/collection/components/widgets/pn-find-price/pn-find-price-store.js +3 -1
  9. package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +14 -3
  10. package/collection/components/widgets/pn-find-price/pn-find-price.js +4 -3
  11. package/custom-elements/index.js +21 -9
  12. package/esm/{data-2fa1e9cb.js → data-8e7bd46e.js} +2 -4
  13. package/esm/pn-find-price-result.entry.js +2 -2
  14. package/esm/{pn-find-price-store-3301df0a.js → pn-find-price-store-55b65ec0.js} +3 -1
  15. package/esm/pn-find-price.entry.js +19 -7
  16. package/esm/pn-product-pricelist.entry.js +1 -1
  17. package/esm-es5/{data-2fa1e9cb.js → data-8e7bd46e.js} +1 -1
  18. package/esm-es5/pn-find-price-result.entry.js +1 -1
  19. package/esm-es5/{pn-find-price-store-3301df0a.js → pn-find-price-store-55b65ec0.js} +1 -1
  20. package/esm-es5/pn-find-price.entry.js +1 -1
  21. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  22. package/package.json +1 -1
  23. package/pn-market-web-components/{p-4d19b923.system.entry.js → p-23902611.system.entry.js} +1 -1
  24. package/pn-market-web-components/{p-a597a036.entry.js → p-28db6d9f.entry.js} +1 -1
  25. package/pn-market-web-components/{p-f7bacc0c.entry.js → p-29b8041d.entry.js} +1 -1
  26. package/pn-market-web-components/{p-0a49c688.system.entry.js → p-4d584dca.system.entry.js} +1 -1
  27. package/pn-market-web-components/p-606ab75d.system.entry.js +1 -0
  28. package/pn-market-web-components/p-67887512.system.js +1 -1
  29. package/pn-market-web-components/p-9a8dba33.entry.js +1 -0
  30. package/pn-market-web-components/{p-bdd0fc97.system.js → p-a7421a8e.system.js} +1 -1
  31. package/pn-market-web-components/{p-72c39bf1.js → p-d94d8879.js} +1 -1
  32. package/pn-market-web-components/{p-3971ddb9.system.js → p-f6fa6caa.system.js} +1 -1
  33. package/pn-market-web-components/{p-5d587499.js → p-f9586bef.js} +1 -1
  34. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  35. package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -0
  36. package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +11 -0
  37. package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +2 -0
  38. package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-types.d.ts +2 -0
  39. package/pn-market-web-components/p-218200c0.system.entry.js +0 -1
  40. package/pn-market-web-components/p-eb600482.entry.js +0 -1
@@ -34,9 +34,7 @@ const weights = {
34
34
  };
35
35
 
36
36
 
37
- const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx";
38
-
39
- const servicePointUrl = "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle";
37
+ const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/dk-findprice.xlsx";
40
38
 
41
39
  const sendDirectUrl = "https://portal.postnord.com/skickadirekt/";
42
40
 
@@ -44,7 +42,6 @@ const stampShopUrl = "https://shop.postnord.se/ebutik/default.aspx";
44
42
 
45
43
  exports.fileLocation = fileLocation;
46
44
  exports.sendDirectUrl = sendDirectUrl;
47
- exports.servicePointUrl = servicePointUrl;
48
45
  exports.sizeCategories = sizeCategories;
49
46
  exports.stampShopUrl = stampShopUrl;
50
47
  exports.weights = weights;
@@ -3,8 +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-6aab7fd0.js');
7
- const data = require('./data-42342802.js');
6
+ const pnFindPriceStore = require('./pn-find-price-store-63671327.js');
7
+ const data = require('./data-b9e6d752.js');
8
8
  require('./index-28bbc937.js');
9
9
 
10
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}";
@@ -18,7 +18,9 @@ const { state, onChange } = index.createStore({
18
18
  servicePointLink: ''
19
19
  },
20
20
  market: {
21
- currency: ""
21
+ currency: "",
22
+ country: "",
23
+ servicePoint: "",
22
24
  }
23
25
  });
24
26
 
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3e27c79.js');
6
- const data = require('./data-42342802.js');
6
+ const data = require('./data-b9e6d752.js');
7
7
  const convert = require('./convert-362ef5e6.js');
8
- const pnFindPriceStore = require('./pn-find-price-store-6aab7fd0.js');
8
+ const pnFindPriceStore = require('./pn-find-price-store-63671327.js');
9
9
  require('./index-28bbc937.js');
10
10
 
11
11
  const translations = {
@@ -38,12 +38,15 @@ const translations = {
38
38
  'da': {
39
39
  'componentheading': 'Vad vill du skicka?',
40
40
  'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
41
- 'resultlistheading': 'Some suitable options for you',
41
+ 'resultlistheading': 'Nogle passende muligheder for dig',
42
42
  'weightlabel': 'Vægt',
43
43
  'maxweightlabel': 'Max vægt',
44
44
  'maxmeasurementlabel': 'Maks. Volumen',
45
- 'senddirectcta': 'Buy shipping in Send Direct',
46
- 'stampshopcta': 'Order home stamps from the webshop',
45
+ 'senddirectcta': 'Køb Online',
46
+ 'stampshopcta': 'Køb Frimærker',
47
+ 'message': 'When buying from any agent',
48
+ 'servicePointHeader': 'Eller find nærmeste servicested',
49
+ 'servicePointLink': 'Søg i brevkasse eller servicepunkt'
47
50
  },
48
51
  'no': {
49
52
  'componentheading': 'Vad vill du skicka?',
@@ -69,15 +72,23 @@ const translations = {
69
72
  const markets = {
70
73
  'se': {
71
74
  "currency": "kr",
75
+ "country": "Sweden",
76
+ "servicePoint": "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle",
72
77
  },
73
78
  'dk': {
74
79
  "currency": "dk",
80
+ "country": "Denmark",
81
+ "servicePoint": "https://www.postnord.dk/varktojer/find-os",
75
82
  },
76
83
  'fi': {
77
84
  "currency": " €",
85
+ "country": "Finland",
86
+ "servicePoint": "",
78
87
  },
79
88
  'no': {
80
89
  "currency": "kr",
90
+ "country": "Norway",
91
+ "servicePoint": "",
81
92
  }
82
93
  };
83
94
 
@@ -138,7 +149,8 @@ let PnfindPrice = class {
138
149
  console.log('Data has not yet been loaded');
139
150
  return;
140
151
  }
141
- const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === "sweden");
152
+ //to handle withing country search
153
+ const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === pnFindPriceStore.state.market.country.toLocaleLowerCase());
142
154
  if (!this.sizecategory) {
143
155
  return;
144
156
  }
@@ -176,7 +188,7 @@ let PnfindPrice = class {
176
188
  } })))))))), (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
189
  this.weight = data.weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
178
190
  this.weightvalue = this.weight.value;
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));
191
+ } }, 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.state.market.servicePoint, target: "_blank" }, index.h("pn-icon", { symbol: "map-marker", color: "blue700" }), pnFindPriceStore.state.i18n.servicePointLink)))) : null));
180
192
  }
181
193
  static get watchers() { return {
182
194
  "market": ["setState"],
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-e3e27c79.js');
6
6
  const data = require('./data-e77c1ada.js');
7
7
  const convert = require('./convert-362ef5e6.js');
8
- const pnFindPriceStore = require('./pn-find-price-store-6aab7fd0.js');
8
+ const pnFindPriceStore = require('./pn-find-price-store-63671327.js');
9
9
  require('./index-28bbc937.js');
10
10
 
11
11
  const translations = {
@@ -33,12 +33,10 @@ const weights = {
33
33
  };
34
34
 
35
35
 
36
- const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx";
37
-
38
- const servicePointUrl = "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle";
36
+ const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/dk-findprice.xlsx";
39
37
 
40
38
  const sendDirectUrl = "https://portal.postnord.com/skickadirekt/";
41
39
 
42
40
  const stampShopUrl = "https://shop.postnord.se/ebutik/default.aspx";
43
41
 
44
- export { weights, sizeCategories, fileLocation, servicePointUrl, sendDirectUrl, stampShopUrl };
42
+ export { weights, sizeCategories, fileLocation, sendDirectUrl, stampShopUrl };
@@ -23,6 +23,6 @@ const Template = ({ ...args }) => {
23
23
  export const Primary = Template.bind({});
24
24
  Primary.args = {
25
25
  source: fileLocation,
26
- language: 'sv',
27
- market: 'se',
26
+ language: 'da',
27
+ market: 'dk',
28
28
  };
@@ -15,7 +15,9 @@ const { state, onChange } = createStore({
15
15
  servicePointLink: ''
16
16
  },
17
17
  market: {
18
- currency: ""
18
+ currency: "",
19
+ country: "",
20
+ servicePoint: "",
19
21
  }
20
22
  });
21
23
  export { state, onChange };
@@ -28,12 +28,15 @@ export const translations = {
28
28
  'da': {
29
29
  'componentheading': 'Vad vill du skicka?',
30
30
  'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
31
- 'resultlistheading': 'Some suitable options for you',
31
+ 'resultlistheading': 'Nogle passende muligheder for dig',
32
32
  'weightlabel': 'Vægt',
33
33
  'maxweightlabel': 'Max vægt',
34
34
  'maxmeasurementlabel': 'Maks. Volumen',
35
- 'senddirectcta': 'Buy shipping in Send Direct',
36
- 'stampshopcta': 'Order home stamps from the webshop',
35
+ 'senddirectcta': 'Køb Online',
36
+ 'stampshopcta': 'Køb Frimærker',
37
+ 'message': 'When buying from any agent',
38
+ 'servicePointHeader': 'Eller find nærmeste servicested',
39
+ 'servicePointLink': 'Søg i brevkasse eller servicepunkt'
37
40
  },
38
41
  'no': {
39
42
  'componentheading': 'Vad vill du skicka?',
@@ -59,14 +62,22 @@ export const translations = {
59
62
  export const markets = {
60
63
  'se': {
61
64
  "currency": "kr",
65
+ "country": "Sweden",
66
+ "servicePoint": "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle",
62
67
  },
63
68
  'dk': {
64
69
  "currency": "dk",
70
+ "country": "Denmark",
71
+ "servicePoint": "https://www.postnord.dk/varktojer/find-os",
65
72
  },
66
73
  'fi': {
67
74
  "currency": " €",
75
+ "country": "Finland",
76
+ "servicePoint": "",
68
77
  },
69
78
  'no': {
70
79
  "currency": "kr",
80
+ "country": "Norway",
81
+ "servicePoint": "",
71
82
  }
72
83
  };
@@ -1,6 +1,6 @@
1
1
  import { Component, h, Prop, State, Watch } from "@stencil/core";
2
2
  import { translations, markets } from "./pn-find-price-translations";
3
- import { weights, sizeCategories, fileLocation, servicePointUrl } from "./data.js";
3
+ import { weights, sizeCategories, fileLocation } from "./data.js";
4
4
  import { convertFileForSizeCategogy } from "../../../globals/shared/productprice/convert.js";
5
5
  import { state } from "./pn-find-price-store";
6
6
  import small from "./img/small-package.svg";
@@ -52,7 +52,8 @@ export class PnfindPrice {
52
52
  console.log('Data has not yet been loaded');
53
53
  return;
54
54
  }
55
- const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === "sweden");
55
+ //to handle withing country search
56
+ const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === state.market.country.toLocaleLowerCase());
56
57
  if (!this.sizecategory) {
57
58
  return;
58
59
  }
@@ -116,7 +117,7 @@ export class PnfindPrice {
116
117
  h("div", { class: "servicePoint" },
117
118
  h("pn-illustration", { illustration: "character-box-letters-house" }),
118
119
  h("h3", null, state.i18n.servicePointHeader),
119
- h("a", { href: servicePointUrl, target: "_blank" },
120
+ h("a", { href: state.market.servicePoint, target: "_blank" },
120
121
  h("pn-icon", { symbol: "map-marker", color: "blue700" }),
121
122
  state.i18n.servicePointLink)))) : null));
122
123
  }
@@ -247,12 +247,15 @@ const translations$9 = {
247
247
  'da': {
248
248
  'componentheading': 'Vad vill du skicka?',
249
249
  'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
250
- 'resultlistheading': 'Some suitable options for you',
250
+ 'resultlistheading': 'Nogle passende muligheder for dig',
251
251
  'weightlabel': 'Vægt',
252
252
  'maxweightlabel': 'Max vægt',
253
253
  'maxmeasurementlabel': 'Maks. Volumen',
254
- 'senddirectcta': 'Buy shipping in Send Direct',
255
- 'stampshopcta': 'Order home stamps from the webshop',
254
+ 'senddirectcta': 'Køb Online',
255
+ 'stampshopcta': 'Køb Frimærker',
256
+ 'message': 'When buying from any agent',
257
+ 'servicePointHeader': 'Eller find nærmeste servicested',
258
+ 'servicePointLink': 'Søg i brevkasse eller servicepunkt'
256
259
  },
257
260
  'no': {
258
261
  'componentheading': 'Vad vill du skicka?',
@@ -278,15 +281,23 @@ const translations$9 = {
278
281
  const markets$2 = {
279
282
  'se': {
280
283
  "currency": "kr",
284
+ "country": "Sweden",
285
+ "servicePoint": "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle",
281
286
  },
282
287
  'dk': {
283
288
  "currency": "dk",
289
+ "country": "Denmark",
290
+ "servicePoint": "https://www.postnord.dk/varktojer/find-os",
284
291
  },
285
292
  'fi': {
286
293
  "currency": " €",
294
+ "country": "Finland",
295
+ "servicePoint": "",
287
296
  },
288
297
  'no': {
289
298
  "currency": "kr",
299
+ "country": "Norway",
300
+ "servicePoint": "",
290
301
  }
291
302
  };
292
303
 
@@ -324,9 +335,7 @@ const weights$2 = {
324
335
  };
325
336
 
326
337
 
327
- const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx";
328
-
329
- const servicePointUrl = "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle";
338
+ const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/dk-findprice.xlsx";
330
339
 
331
340
  const sendDirectUrl$1 = "https://portal.postnord.com/skickadirekt/";
332
341
 
@@ -2368,7 +2377,9 @@ const { state: state$5, onChange: onChange$5 } = createStore({
2368
2377
  servicePointLink: ''
2369
2378
  },
2370
2379
  market: {
2371
- currency: ""
2380
+ currency: "",
2381
+ country: "",
2382
+ servicePoint: "",
2372
2383
  }
2373
2384
  });
2374
2385
 
@@ -2430,7 +2441,8 @@ let PnfindPrice = class extends HTMLElement {
2430
2441
  console.log('Data has not yet been loaded');
2431
2442
  return;
2432
2443
  }
2433
- const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === "sweden");
2444
+ //to handle withing country search
2445
+ const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === state$5.market.country.toLocaleLowerCase());
2434
2446
  if (!this.sizecategory) {
2435
2447
  return;
2436
2448
  }
@@ -2468,7 +2480,7 @@ let PnfindPrice = class extends HTMLElement {
2468
2480
  } })))))))), (this.sizecategory.value && weights$2[this.sizecategory.unit]) ? (h("div", { class: "weightoption" }, h("div", { class: "weightoption-content" }, weights$2[this.sizecategory.unit].map((wght) => (h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : weights$2[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
2469
2481
  this.weight = weights$2[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
2470
2482
  this.weightvalue = this.weight.value;
2471
- } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" }, (state$5.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state$5.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))), h("div", { class: "servicePoint" }, h("pn-illustration", { illustration: "character-box-letters-house" }), h("h3", null, state$5.i18n.servicePointHeader), h("a", { href: servicePointUrl, target: "_blank" }, h("pn-icon", { symbol: "map-marker", color: "blue700" }), state$5.i18n.servicePointLink)))) : null));
2483
+ } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" }, (state$5.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state$5.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))), h("div", { class: "servicePoint" }, h("pn-illustration", { illustration: "character-box-letters-house" }), h("h3", null, state$5.i18n.servicePointHeader), h("a", { href: state$5.market.servicePoint, target: "_blank" }, h("pn-icon", { symbol: "map-marker", color: "blue700" }), state$5.i18n.servicePointLink)))) : null));
2472
2484
  }
2473
2485
  static get watchers() { return {
2474
2486
  "market": ["setState"],
@@ -32,12 +32,10 @@ const weights = {
32
32
  };
33
33
 
34
34
 
35
- const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx";
36
-
37
- const servicePointUrl = "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle";
35
+ const fileLocation = "https://com-integration.postnord.com/globalassets/global/prices/dk-findprice.xlsx";
38
36
 
39
37
  const sendDirectUrl = "https://portal.postnord.com/skickadirekt/";
40
38
 
41
39
  const stampShopUrl = "https://shop.postnord.se/ebutik/default.aspx";
42
40
 
43
- export { servicePointUrl as a, sendDirectUrl as b, stampShopUrl as c, fileLocation as f, sizeCategories as s, weights as w };
41
+ export { sendDirectUrl as a, stampShopUrl as b, fileLocation as f, sizeCategories as s, weights as w };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host } from './index-5397620b.js';
2
- import { s as state } from './pn-find-price-store-3301df0a.js';
3
- import { b as sendDirectUrl, c as stampShopUrl } from './data-2fa1e9cb.js';
2
+ import { s as state } from './pn-find-price-store-55b65ec0.js';
3
+ import { a as sendDirectUrl, b as stampShopUrl } from './data-8e7bd46e.js';
4
4
  import './index-7b21ecff.js';
5
5
 
6
6
  const pnFindPriceResultCss = "pn-find-price-result .test{margin:3em 0}.resultcontent{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";
@@ -16,7 +16,9 @@ const { state, onChange } = createStore({
16
16
  servicePointLink: ''
17
17
  },
18
18
  market: {
19
- currency: ""
19
+ currency: "",
20
+ country: "",
21
+ servicePoint: "",
20
22
  }
21
23
  });
22
24
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-5397620b.js';
2
- import { f as fileLocation, s as sizeCategories, a as servicePointUrl, w as weights } from './data-2fa1e9cb.js';
2
+ import { f as fileLocation, s as sizeCategories, w as weights } from './data-8e7bd46e.js';
3
3
  import { c as convertFileForSizeCategogy } from './convert-ae809f9c.js';
4
- import { s as state } from './pn-find-price-store-3301df0a.js';
4
+ import { s as state } from './pn-find-price-store-55b65ec0.js';
5
5
  import './index-7b21ecff.js';
6
6
 
7
7
  const translations = {
@@ -34,12 +34,15 @@ const translations = {
34
34
  'da': {
35
35
  'componentheading': 'Vad vill du skicka?',
36
36
  'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
37
- 'resultlistheading': 'Some suitable options for you',
37
+ 'resultlistheading': 'Nogle passende muligheder for dig',
38
38
  'weightlabel': 'Vægt',
39
39
  'maxweightlabel': 'Max vægt',
40
40
  'maxmeasurementlabel': 'Maks. Volumen',
41
- 'senddirectcta': 'Buy shipping in Send Direct',
42
- 'stampshopcta': 'Order home stamps from the webshop',
41
+ 'senddirectcta': 'Køb Online',
42
+ 'stampshopcta': 'Køb Frimærker',
43
+ 'message': 'When buying from any agent',
44
+ 'servicePointHeader': 'Eller find nærmeste servicested',
45
+ 'servicePointLink': 'Søg i brevkasse eller servicepunkt'
43
46
  },
44
47
  'no': {
45
48
  'componentheading': 'Vad vill du skicka?',
@@ -65,15 +68,23 @@ const translations = {
65
68
  const markets = {
66
69
  'se': {
67
70
  "currency": "kr",
71
+ "country": "Sweden",
72
+ "servicePoint": "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle",
68
73
  },
69
74
  'dk': {
70
75
  "currency": "dk",
76
+ "country": "Denmark",
77
+ "servicePoint": "https://www.postnord.dk/varktojer/find-os",
71
78
  },
72
79
  'fi': {
73
80
  "currency": " €",
81
+ "country": "Finland",
82
+ "servicePoint": "",
74
83
  },
75
84
  'no': {
76
85
  "currency": "kr",
86
+ "country": "Norway",
87
+ "servicePoint": "",
77
88
  }
78
89
  };
79
90
 
@@ -134,7 +145,8 @@ let PnfindPrice = class {
134
145
  console.log('Data has not yet been loaded');
135
146
  return;
136
147
  }
137
- const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === "sweden");
148
+ //to handle withing country search
149
+ const deliveryScopeData = this.sourceData.data.filter((x) => x.deliveryscope.toLocaleLowerCase() === state.market.country.toLocaleLowerCase());
138
150
  if (!this.sizecategory) {
139
151
  return;
140
152
  }
@@ -172,7 +184,7 @@ let PnfindPrice = class {
172
184
  } })))))))), (this.sizecategory.value && weights[this.sizecategory.unit]) ? (h("div", { class: "weightoption" }, h("div", { class: "weightoption-content" }, weights[this.sizecategory.unit].map((wght) => (h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
173
185
  this.weight = weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
174
186
  this.weightvalue = this.weight.value;
175
- } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" }, (state.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))), h("div", { class: "servicePoint" }, h("pn-illustration", { illustration: "character-box-letters-house" }), h("h3", null, state.i18n.servicePointHeader), h("a", { href: servicePointUrl, target: "_blank" }, h("pn-icon", { symbol: "map-marker", color: "blue700" }), state.i18n.servicePointLink)))) : null));
187
+ } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" }, (state.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))), h("div", { class: "servicePoint" }, h("pn-illustration", { illustration: "character-box-letters-house" }), h("h3", null, state.i18n.servicePointHeader), h("a", { href: state.market.servicePoint, target: "_blank" }, h("pn-icon", { symbol: "map-marker", color: "blue700" }), state.i18n.servicePointLink)))) : null));
176
188
  }
177
189
  static get watchers() { return {
178
190
  "market": ["setState"],
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, a as Host } from './index-5397620b.js';
2
2
  import { w as weights } from './data-108a2820.js';
3
3
  import { a as convertFileFromStream } from './convert-ae809f9c.js';
4
- import { s as state } from './pn-find-price-store-3301df0a.js';
4
+ import { s as state } from './pn-find-price-store-55b65ec0.js';
5
5
  import './index-7b21ecff.js';
6
6
 
7
7
  const translations = {
@@ -1 +1 @@
1
- var sizeCategories=[{name:"Small",value:"Small",illustration:"eli1n",unit:"small"},{name:"Medium",value:"Medium",illustration:"medium-package",unit:"medium"},{name:"Large",value:"Large",illustration:"large-package",unit:"large"}];var weights={small:[{name:"50 g",abbreviation:"g",value:50},{name:"100 g",abbreviation:"g",value:100},{name:"250 g",abbreviation:"g",value:250},{name:"500 g",abbreviation:"g",value:500},{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2}],medium:[{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2},{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}],large:[{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}]};var fileLocation="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx";var servicePointUrl="https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle";var sendDirectUrl="https://portal.postnord.com/skickadirekt/";var stampShopUrl="https://shop.postnord.se/ebutik/default.aspx";export{servicePointUrl as a,sendDirectUrl as b,stampShopUrl as c,fileLocation as f,sizeCategories as s,weights as w};
1
+ var sizeCategories=[{name:"Small",value:"Small",illustration:"eli1n",unit:"small"},{name:"Medium",value:"Medium",illustration:"medium-package",unit:"medium"},{name:"Large",value:"Large",illustration:"large-package",unit:"large"}];var weights={small:[{name:"50 g",abbreviation:"g",value:50},{name:"100 g",abbreviation:"g",value:100},{name:"250 g",abbreviation:"g",value:250},{name:"500 g",abbreviation:"g",value:500},{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2}],medium:[{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2},{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}],large:[{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}]};var fileLocation="https://com-integration.postnord.com/globalassets/global/prices/dk-findprice.xlsx";var sendDirectUrl="https://portal.postnord.com/skickadirekt/";var stampShopUrl="https://shop.postnord.se/ebutik/default.aspx";export{sendDirectUrl as a,stampShopUrl as b,fileLocation as f,sizeCategories as s,weights as w};
@@ -1 +1 @@
1
- import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{s as state}from"./pn-find-price-store-3301df0a.js";import{b as sendDirectUrl,c as stampShopUrl}from"./data-2fa1e9cb.js";import"./index-7b21ecff.js";var 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}";var PnfindPriceResult=function(){function t(t){registerInstance(this,t);this.item=null;this.shownitems=[];this.description=[];this.showMeasurement=false;this.weightText="";this.linkId=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){if(this.item.additionalusp){var t=this.item.additionalusp.split("/");this.Usp1=t.length>0?t[0]:null;this.Usp2=t.length>1?t[1]:null;this.Usp3=t.length>2?t[2]:null}if(this.item.description){this.description=this.item.description.split("#bullet").filter((function(t){return t!==""}))}this.showMeasurement=this.item.maxmått!==null||this.item.rulle!==null;this.linkId="".concat(this.item.id,"-").concat(this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g,""))};t.prototype.render=function(){return h(Host,null,h("pn-product-card",{"data-productid":this.item.id},h("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),h("div",{slot:"title"},h("h2",null,this.item.name," "),this.item.highestrankusp?this.item.highestrankusp==="Billigast"?h("span",{slot:"Billigast"},this.item.highestrankusp,h("pn-icon",{symbol:"box-label",small:"false",color:"green700"})):h("span",{slot:"Snabbast"},this.item.highestrankusp,h("pn-icon",{symbol:"bolt",small:"false",color:"blue700"})):null),h("div",{slot:"content"},h("div",{class:"content"},this.item.description?h("div",{class:"description"},this.description.map((function(t){return h("li",null,t)}))):null,this.item.info?h("div",{class:"description"},this.item.info):null)),this.item.note?h("small",{slot:"note"},h("p",null,this.item.note)):null,this.item.additionalusp?h("div",{slot:"additionalUSP"},this.Usp1?h("span",null,this.Usp1):null,this.Usp2?h("span",null,this.Usp2):null,this.Usp3?h("span",null,this.Usp3):null):null,this.showMeasurement?h("pn-product-card-info",{paket:this.item.maxmått,rulle:this.item.rulle}):null,h("div",{slot:"cardprice"},this.item.pricesenddirect?h("pn-product-card-price",{slot:"sendDirectPrice",label:state.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:state.market.currency,url:sendDirectUrl,linkid:this.linkId+"-portal"}):null,this.item.pricestamps?h("pn-product-card-price",{slot:"stampPrice",label:state.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:state.market.currency,url:stampShopUrl,linkid:this.linkId+"-stampshop"}):null)))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}();PnfindPriceResult.style=pnFindPriceResultCss;export{PnfindPriceResult as pn_find_price_result};
1
+ import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{s as state}from"./pn-find-price-store-55b65ec0.js";import{a as sendDirectUrl,b as stampShopUrl}from"./data-8e7bd46e.js";import"./index-7b21ecff.js";var 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}";var PnfindPriceResult=function(){function t(t){registerInstance(this,t);this.item=null;this.shownitems=[];this.description=[];this.showMeasurement=false;this.weightText="";this.linkId=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){if(this.item.additionalusp){var t=this.item.additionalusp.split("/");this.Usp1=t.length>0?t[0]:null;this.Usp2=t.length>1?t[1]:null;this.Usp3=t.length>2?t[2]:null}if(this.item.description){this.description=this.item.description.split("#bullet").filter((function(t){return t!==""}))}this.showMeasurement=this.item.maxmått!==null||this.item.rulle!==null;this.linkId="".concat(this.item.id,"-").concat(this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g,""))};t.prototype.render=function(){return h(Host,null,h("pn-product-card",{"data-productid":this.item.id},h("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),h("div",{slot:"title"},h("h2",null,this.item.name," "),this.item.highestrankusp?this.item.highestrankusp==="Billigast"?h("span",{slot:"Billigast"},this.item.highestrankusp,h("pn-icon",{symbol:"box-label",small:"false",color:"green700"})):h("span",{slot:"Snabbast"},this.item.highestrankusp,h("pn-icon",{symbol:"bolt",small:"false",color:"blue700"})):null),h("div",{slot:"content"},h("div",{class:"content"},this.item.description?h("div",{class:"description"},this.description.map((function(t){return h("li",null,t)}))):null,this.item.info?h("div",{class:"description"},this.item.info):null)),this.item.note?h("small",{slot:"note"},h("p",null,this.item.note)):null,this.item.additionalusp?h("div",{slot:"additionalUSP"},this.Usp1?h("span",null,this.Usp1):null,this.Usp2?h("span",null,this.Usp2):null,this.Usp3?h("span",null,this.Usp3):null):null,this.showMeasurement?h("pn-product-card-info",{paket:this.item.maxmått,rulle:this.item.rulle}):null,h("div",{slot:"cardprice"},this.item.pricesenddirect?h("pn-product-card-price",{slot:"sendDirectPrice",label:state.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:state.market.currency,url:sendDirectUrl,linkid:this.linkId+"-portal"}):null,this.item.pricestamps?h("pn-product-card-price",{slot:"stampPrice",label:state.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:state.market.currency,url:stampShopUrl,linkid:this.linkId+"-stampshop"}):null)))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}();PnfindPriceResult.style=pnFindPriceResultCss;export{PnfindPriceResult as pn_find_price_result};
@@ -1 +1 @@
1
- import{c as createStore}from"./index-7b21ecff.js";var _a=createStore({i18n:{componentheading:"",deliveryscopeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:"",servicePointHeader:"",servicePointLink:""},market:{currency:""}}),state=_a.state,onChange=_a.onChange;export{state as s};
1
+ import{c as createStore}from"./index-7b21ecff.js";var _a=createStore({i18n:{componentheading:"",deliveryscopeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:"",servicePointHeader:"",servicePointLink:""},market:{currency:"",country:"",servicePoint:""}}),state=_a.state,onChange=_a.onChange;export{state as s};