@postnord/pn-marketweb-components 2.0.78 → 2.0.80

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 (105) hide show
  1. package/cjs/{MarketWebContextService-5840b8e0.js → FetchHelper-c6cee722.js} +85 -0
  2. package/cjs/loader.cjs.js +1 -1
  3. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +1 -1
  4. package/cjs/pn-bonus-progressbar.cjs.entry.js +1 -1
  5. package/cjs/pn-market-web-components.cjs.js +1 -1
  6. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +2 -3
  7. package/cjs/pn-marketweb-siteheader.cjs.entry.js +2 -3
  8. package/cjs/pn-product-card_4.cjs.entry.js +1 -1
  9. package/cjs/pn-proxio-pricegroup.cjs.entry.js +108 -0
  10. package/cjs/pn-proxio-productcard_4.cjs.entry.js +67 -0
  11. package/collection/collection-manifest.json +4 -1
  12. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.css +3 -3
  13. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +0 -1
  14. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.stories.js +69 -24
  15. package/collection/components/minor/pn-titletag/pn-titletag.css +4 -0
  16. package/collection/components/minor/pn-titletag/title-tag.stories.js +1 -0
  17. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +71 -0
  18. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +204 -0
  19. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.stories.js +27 -0
  20. package/collection/components/widgets/pn-proxio-pricegroup/translations.js +16 -0
  21. package/collection/components/widgets/pn-proxio-pricegroup/types.js +1 -0
  22. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.css +6 -0
  23. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +93 -0
  24. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.css +6 -0
  25. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +67 -0
  26. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.css +13 -0
  27. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.js +69 -0
  28. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.css +60 -0
  29. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +11 -8
  30. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.stories.js +42 -5
  31. package/custom-elements/index.d.ts +22 -4
  32. package/custom-elements/index.js +177 -58
  33. package/esm/{MarketWebContextService-160bf3dd.js → FetchHelper-1dfe8514.js} +85 -1
  34. package/esm/loader.js +1 -1
  35. package/esm/pn-bonus-progressbar-level.entry.js +1 -1
  36. package/esm/pn-bonus-progressbar.entry.js +1 -1
  37. package/esm/pn-market-web-components.js +1 -1
  38. package/esm/pn-marketweb-sitefooter.entry.js +1 -2
  39. package/esm/pn-marketweb-siteheader.entry.js +1 -2
  40. package/esm/pn-product-card_4.entry.js +1 -1
  41. package/esm/pn-proxio-pricegroup.entry.js +104 -0
  42. package/esm/pn-proxio-productcard_4.entry.js +60 -0
  43. package/esm-es5/{MarketWebContextService-160bf3dd.js → FetchHelper-1dfe8514.js} +1 -1
  44. package/esm-es5/loader.js +1 -1
  45. package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
  46. package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
  47. package/esm-es5/pn-market-web-components.js +1 -1
  48. package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
  49. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  50. package/esm-es5/pn-product-card_4.entry.js +1 -1
  51. package/esm-es5/pn-proxio-pricegroup.entry.js +1 -0
  52. package/esm-es5/pn-proxio-productcard_4.entry.js +1 -0
  53. package/package.json +1 -1
  54. package/pn-market-web-components/{p-f1812fbb.entry.js → p-022d9a78.entry.js} +1 -1
  55. package/pn-market-web-components/{p-3ce2b566.system.entry.js → p-1151bf60.system.entry.js} +1 -1
  56. package/pn-market-web-components/{p-5b750c06.system.entry.js → p-198d9c77.system.entry.js} +1 -1
  57. package/pn-market-web-components/p-36a1b8e1.system.entry.js +1 -0
  58. package/pn-market-web-components/p-4bef1bf3.entry.js +1 -0
  59. package/pn-market-web-components/p-5482774f.entry.js +1 -0
  60. package/pn-market-web-components/p-6174a610.system.js +1 -0
  61. package/pn-market-web-components/p-67887512.system.js +1 -1
  62. package/pn-market-web-components/p-6c8d3789.system.entry.js +1 -0
  63. package/pn-market-web-components/p-6d08e5cc.system.entry.js +1 -0
  64. package/pn-market-web-components/{p-e8d97347.entry.js → p-7ce41d14.entry.js} +1 -1
  65. package/pn-market-web-components/p-942ad206.system.entry.js +1 -0
  66. package/pn-market-web-components/p-c3ea7666.entry.js +1 -0
  67. package/pn-market-web-components/p-c5f4d6c1.entry.js +1 -0
  68. package/pn-market-web-components/p-df9708f2.entry.js +1 -0
  69. package/pn-market-web-components/p-e54d477c.system.entry.js +1 -0
  70. package/pn-market-web-components/{p-0a7b7046.js → p-f0f58646.js} +1 -1
  71. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  72. package/types/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.d.ts +23 -0
  73. package/types/components/widgets/pn-proxio-pricegroup/translations.d.ts +16 -0
  74. package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +36 -0
  75. package/types/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.d.ts +7 -0
  76. package/types/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.d.ts +6 -0
  77. package/types/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.d.ts +6 -0
  78. package/types/components.d.ts +77 -11
  79. package/umd/pn-marketweb-salesforce.js +2 -2
  80. package/cjs/FetchHelper-f80943bf.js +0 -87
  81. package/cjs/pn-proxio-pricefinder.cjs.entry.js +0 -43
  82. package/cjs/pn-proxio-productcard.cjs.entry.js +0 -19
  83. package/collection/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.css +0 -0
  84. package/collection/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.js +0 -98
  85. package/collection/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.stories.js +0 -22
  86. package/esm/FetchHelper-a0c8aa54.js +0 -85
  87. package/esm/pn-proxio-pricefinder.entry.js +0 -39
  88. package/esm/pn-proxio-productcard.entry.js +0 -15
  89. package/esm-es5/FetchHelper-a0c8aa54.js +0 -1
  90. package/esm-es5/pn-proxio-pricefinder.entry.js +0 -1
  91. package/esm-es5/pn-proxio-productcard.entry.js +0 -1
  92. package/pn-market-web-components/p-059e4c47.system.entry.js +0 -1
  93. package/pn-market-web-components/p-1a97780a.system.js +0 -1
  94. package/pn-market-web-components/p-2745cc43.entry.js +0 -1
  95. package/pn-market-web-components/p-2b8aa6a9.entry.js +0 -1
  96. package/pn-market-web-components/p-42a56aeb.entry.js +0 -1
  97. package/pn-market-web-components/p-831c0495.system.entry.js +0 -1
  98. package/pn-market-web-components/p-8985b02b.system.entry.js +0 -1
  99. package/pn-market-web-components/p-8b9961c9.system.entry.js +0 -1
  100. package/pn-market-web-components/p-97dc5687.js +0 -1
  101. package/pn-market-web-components/p-a89a2eb3.entry.js +0 -1
  102. package/pn-market-web-components/p-b8e9177e.system.entry.js +0 -1
  103. package/pn-market-web-components/p-c7afc979.entry.js +0 -1
  104. package/pn-market-web-components/p-d6a17042.system.js +0 -1
  105. package/types/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.d.ts +0 -13
@@ -0,0 +1,69 @@
1
+ import { Component, h, Prop, Host } from "@stencil/core";
2
+ export class PnProxioProductcardPricelink {
3
+ render() {
4
+ return this.link && this.linktext ?
5
+ (h(Host, null,
6
+ this.price ? (h("h2", null, this.price)) : (null),
7
+ h("pn-button", { small: "true", icon: "arrow-right", appearance: "light", href: this.link, target: "_blank", rel: "noopener nofollower noreferrer" }, this.linktext))) : (null);
8
+ }
9
+ static get is() { return "pn-proxio-productcard-pricelink"; }
10
+ static get originalStyleUrls() { return {
11
+ "$": ["pn-proxio-productcard-pricelink.scss"]
12
+ }; }
13
+ static get styleUrls() { return {
14
+ "$": ["pn-proxio-productcard-pricelink.css"]
15
+ }; }
16
+ static get properties() { return {
17
+ "price": {
18
+ "type": "string",
19
+ "mutable": false,
20
+ "complexType": {
21
+ "original": "string",
22
+ "resolved": "string",
23
+ "references": {}
24
+ },
25
+ "required": false,
26
+ "optional": false,
27
+ "docs": {
28
+ "tags": [],
29
+ "text": ""
30
+ },
31
+ "attribute": "price",
32
+ "reflect": false
33
+ },
34
+ "link": {
35
+ "type": "string",
36
+ "mutable": false,
37
+ "complexType": {
38
+ "original": "string",
39
+ "resolved": "string",
40
+ "references": {}
41
+ },
42
+ "required": false,
43
+ "optional": false,
44
+ "docs": {
45
+ "tags": [],
46
+ "text": ""
47
+ },
48
+ "attribute": "link",
49
+ "reflect": false
50
+ },
51
+ "linktext": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "string",
56
+ "resolved": "string",
57
+ "references": {}
58
+ },
59
+ "required": false,
60
+ "optional": false,
61
+ "docs": {
62
+ "tags": [],
63
+ "text": ""
64
+ },
65
+ "attribute": "linktext",
66
+ "reflect": false
67
+ }
68
+ }; }
69
+ }
@@ -0,0 +1,60 @@
1
+ pn-proxio-productcard .cardcontent {
2
+ display: flex;
3
+ flex-direction: row;
4
+ border: solid 0.1rem #F9F8F8;
5
+ border-radius: 0.8rem;
6
+ overflow: hidden;
7
+ margin-left: auto;
8
+ margin-right: auto;
9
+ margin-bottom: 1.6rem;
10
+ }
11
+ pn-proxio-productcard .carddetails {
12
+ min-width: 70%;
13
+ padding: 2rem;
14
+ display: flex;
15
+ gap: 1rem;
16
+ flex-direction: column;
17
+ }
18
+ pn-proxio-productcard .cardcalltoactions {
19
+ min-width: 30%;
20
+ background-color: #EFFBFF;
21
+ padding: 1rem;
22
+ display: flex;
23
+ flex-direction: column;
24
+ justify-content: center;
25
+ align-content: center;
26
+ }
27
+ pn-proxio-productcard .cardcalltoactions pn-illustration[slot=illustration] .pn-illustration {
28
+ max-width: 10rem;
29
+ margin-left: auto;
30
+ margin-right: auto;
31
+ }
32
+ pn-proxio-productcard [slot=information] {
33
+ display: flex;
34
+ gap: 1rem;
35
+ }
36
+ pn-proxio-productcard [slot=uppertags] {
37
+ display: flex;
38
+ flex-direction: row;
39
+ flex-wrap: nowrap;
40
+ justify-content: flex-start;
41
+ align-items: center;
42
+ gap: 2rem;
43
+ }
44
+ pn-proxio-productcard [slot=bottomtags] {
45
+ display: flex;
46
+ flex-direction: row;
47
+ flex-wrap: nowrap;
48
+ justify-content: flex-start;
49
+ align-items: center;
50
+ gap: 2rem;
51
+ margin: 1rem 0;
52
+ }
53
+ pn-proxio-productcard .heading {
54
+ display: flex;
55
+ justify-content: space-between;
56
+ flex-direction: row;
57
+ }
58
+ pn-proxio-productcard [slot=title] {
59
+ text-decoration: underline;
60
+ }
@@ -2,14 +2,17 @@ import { Component, h, Host } from "@stencil/core";
2
2
  export class PnProxioProductcard {
3
3
  render() {
4
4
  return (h(Host, null,
5
- h("slot", { name: "illustration" }),
6
- h("div", { class: "tilecontent" },
7
- h("div", { class: "details" },
8
- h("slot", { name: "content" }),
9
- h("div", { class: "info" },
10
- h("slot", null)),
11
- h("slot", { name: "note" })),
12
- h("slot", { name: "price" }))));
5
+ h("div", { class: "cardcontent" },
6
+ h("div", { class: "carddetails" },
7
+ h("div", { class: "heading" },
8
+ h("slot", { name: "title" }),
9
+ h("slot", { name: "uppertags" })),
10
+ h("slot", { name: "description" }),
11
+ h("slot", { name: "information" }),
12
+ h("slot", { name: "bottomtags" })),
13
+ h("div", { class: "cardcalltoactions" },
14
+ h("slot", { name: "illustration" }),
15
+ h("slot", { name: "pricelink" })))));
13
16
  }
14
17
  static get is() { return "pn-proxio-productcard"; }
15
18
  static get originalStyleUrls() { return {
@@ -3,15 +3,34 @@ import readme from "./readme.md";
3
3
  export default {
4
4
  title: "Proxio/Product card",
5
5
  parameters: {
6
-
6
+ notes: readme
7
7
  }
8
8
  };
9
9
 
10
10
  const Template = ({ ...args }) => {
11
11
  return `
12
- <div style="max-width: 30em; margin:1em auto 0;">
13
- <pn-proxio-productcard language="en" endpoint="https://se-integration.postnord.com/api/proxio">
14
-
12
+ <div style="max-width: 67em; margin:1em auto 0;">
13
+ <pn-proxio-productcard>
14
+ <h2 slot="title">${args.heading}</h2>
15
+ <div slot="uppertags">
16
+ <pn-titletag icon="box-label" color="green700">${args.uppertag}</pn-titletag>
17
+ </div>
18
+ <pn-proxio-productcard-description slot="description" heading="${args.description}" highlight="${args.highlight}" list="${args.list}" ></pn-proxio-productcard-description>
19
+ <div slot="information">
20
+ <pn-proxio-productcard-information label="${args.paketlabel}" information="${args.paket}" ></pn-proxio-productcard-information>
21
+ <pn-proxio-productcard-information label="${args.rullelabel}" information="${args.rulle}" ></pn-proxio-productcard-information>
22
+ </div>
23
+ <div slot="bottomtags">
24
+ <pn-titletag color="gray50">${args.traceable}</pn-titletag>
25
+ <pn-titletag color="gray50">${args.usp1}</pn-titletag>
26
+ <pn-titletag color="gray50">${args.usp2}</pn-titletag>
27
+ <pn-titletag color="gray50">${args.usp3}</pn-titletag>
28
+ </div>
29
+ <pn-illustration slot="illustration" illustration="${args.illustration}" ></pn-illustration>
30
+ <div slot="pricelink">
31
+ <pn-proxio-productcard-pricelink price="${args.price1}" link="${args.link}" linktext="${args.linktext1}" ></pn-proxio-productcard-pricelink>
32
+ <pn-proxio-productcard-pricelink price="${args.price2}" link="${args.link}" linktext="${args.linktext2}" ></pn-proxio-productcard-pricelink>
33
+ </div>
15
34
  </pn-proxio-productcard>
16
35
  </div>
17
36
  `;
@@ -19,5 +38,23 @@ const Template = ({ ...args }) => {
19
38
 
20
39
  export const Primary = Template.bind({});
21
40
  Primary.args = {
22
-
41
+ heading: "Brev",
42
+ description: "Skicka brev som väger upp till 2 kilo",
43
+ highlight: "Leverans senast 2 juni 2022",
44
+ list: ["Portot betalas med frimärken eller med portkod (digitalt frimärke)", "Levereras till postlåda om det får plats, annars till serviceställe", "Postas i någon av våra brevlådor eller lämnas in hos ett postombud."],
45
+ paketlabel: "Paket:",
46
+ paket: [{ item1: "Längd:", item2: "Max XX cm" }, { item1: "Längd + bredd + höjd:", item2: "Max XX cm" }],
47
+ rullelabel: "Rulle:",
48
+ rulle: [{ item1:"Längd:", item2:"Max XX cm" }, { item1:"Längd + bredd + höjd:", item2:"Max XX cm" }],
49
+ price1: "från 14 kronor",
50
+ price2: "från 13 kronor",
51
+ link: "www.google.com",
52
+ linktext1: "Köp portkod",
53
+ linktext2: "Till butiken",
54
+ uppertag: "Billigast",
55
+ traceable: "Inte spårbart",
56
+ usp1: "usp1",
57
+ usp2: "usp2",
58
+ usp3: "usp3",
59
+ illustration: "hand-letter-stamp"
23
60
  };
@@ -242,10 +242,10 @@ export const PnProfileSelectorOption: {
242
242
  new (): PnProfileSelectorOption;
243
243
  };
244
244
 
245
- interface PnProxioPricefinder extends Components.PnProxioPricefinder, HTMLElement {}
246
- export const PnProxioPricefinder: {
247
- prototype: PnProxioPricefinder;
248
- new (): PnProxioPricefinder;
245
+ interface PnProxioPricegroup extends Components.PnProxioPricegroup, HTMLElement {}
246
+ export const PnProxioPricegroup: {
247
+ prototype: PnProxioPricegroup;
248
+ new (): PnProxioPricegroup;
249
249
  };
250
250
 
251
251
  interface PnProxioProductcard extends Components.PnProxioProductcard, HTMLElement {}
@@ -254,6 +254,24 @@ export const PnProxioProductcard: {
254
254
  new (): PnProxioProductcard;
255
255
  };
256
256
 
257
+ interface PnProxioProductcardDescription extends Components.PnProxioProductcardDescription, HTMLElement {}
258
+ export const PnProxioProductcardDescription: {
259
+ prototype: PnProxioProductcardDescription;
260
+ new (): PnProxioProductcardDescription;
261
+ };
262
+
263
+ interface PnProxioProductcardInformation extends Components.PnProxioProductcardInformation, HTMLElement {}
264
+ export const PnProxioProductcardInformation: {
265
+ prototype: PnProxioProductcardInformation;
266
+ new (): PnProxioProductcardInformation;
267
+ };
268
+
269
+ interface PnProxioProductcardPricelink extends Components.PnProxioProductcardPricelink, HTMLElement {}
270
+ export const PnProxioProductcardPricelink: {
271
+ prototype: PnProxioProductcardPricelink;
272
+ new (): PnProxioProductcardPricelink;
273
+ };
274
+
257
275
  interface PnSidenav extends Components.PnSidenav, HTMLElement {}
258
276
  export const PnSidenav: {
259
277
  prototype: PnSidenav;