@postnord/pn-marketweb-components 2.0.88 → 2.0.89
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.
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +11 -8
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +3 -5
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.stories.js +1 -1
- package/collection/components/widgets/pn-proxio-pricegroup/translations.js +8 -4
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.stories.js +0 -2
- package/custom-elements/index.js +11 -8
- package/esm/pn-proxio-pricegroup.entry.js +11 -8
- package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-79473404.system.entry.js +1 -0
- package/pn-market-web-components/p-f63483d9.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/widgets/pn-proxio-pricegroup/translations.d.ts +8 -4
- package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +0 -1
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/pn-market-web-components/p-40f0bb03.entry.js +0 -1
- package/pn-market-web-components/p-e217affa.system.entry.js +0 -1
|
@@ -6,18 +6,22 @@ const index = require('./index-e3e27c79.js');
|
|
|
6
6
|
const FetchHelper = require('./FetchHelper-c6cee722.js');
|
|
7
7
|
|
|
8
8
|
const translations = {
|
|
9
|
-
'sv-
|
|
9
|
+
'sv-SE': {
|
|
10
10
|
"from": "Från ",
|
|
11
11
|
"labelRoll": "Rulle",
|
|
12
12
|
"labelPackage": "Paket",
|
|
13
|
-
"notTraceable": "Inte spårbart",
|
|
14
13
|
"Creapest": "Billigast"
|
|
15
14
|
},
|
|
16
|
-
'en-
|
|
15
|
+
'en-GB': {
|
|
16
|
+
"from": "From ",
|
|
17
|
+
"labelRoll": "Roll",
|
|
18
|
+
"labelPackage": "Package",
|
|
19
|
+
"Creapest": "Cheapest"
|
|
20
|
+
},
|
|
21
|
+
'en-US': {
|
|
17
22
|
"from": "From ",
|
|
18
23
|
"labelRoll": "Roll",
|
|
19
24
|
"labelPackage": "Package",
|
|
20
|
-
"notTraceable": "Not traceable",
|
|
21
25
|
"Creapest": "Cheapest"
|
|
22
26
|
}
|
|
23
27
|
};
|
|
@@ -29,12 +33,12 @@ let PnProxioPricegroup = class {
|
|
|
29
33
|
index.registerInstance(this, hostRef);
|
|
30
34
|
/** Specifies which endpoint domain we should load from */
|
|
31
35
|
this.endpoint = null;
|
|
32
|
-
this.culture = "sv-
|
|
36
|
+
this.culture = "sv-SE";
|
|
33
37
|
this.tariffid = "";
|
|
34
38
|
this.cache = true;
|
|
35
39
|
this.activeWeightIndex = 0;
|
|
36
40
|
this.data = null;
|
|
37
|
-
this.i18n = translations["sv-
|
|
41
|
+
this.i18n = translations["sv-SE"];
|
|
38
42
|
this.fetchHelper = new FetchHelper.FetchHelper("proxiopricegroup");
|
|
39
43
|
}
|
|
40
44
|
componentWillLoad() {
|
|
@@ -139,8 +143,7 @@ let PnProxioPricegroup = class {
|
|
|
139
143
|
var _a, _b, _c;
|
|
140
144
|
return (index.h(index.Host, null, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.proxioProduct) ? (index.h("div", { class: "proxio-pricegroup-container" }, index.h("div", { class: "weightcontainer" }, this.data.proxioProduct.weightAndPriceList ?
|
|
141
145
|
(index.h("div", { class: "weightvaluecontainer" }, index.h("pn-button", { disabled: this.activeWeightIndex === 0 ? ("disabled") : (null), "icon-only": "true", icon: "arrow-left", appearance: "light", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex - 1) }), index.h("div", { class: "weightradios ", "data-carousel-container-position": this.getContainerPosition() }, index.h("div", { class: "weightline" }), this.data.proxioProduct.weightAndPriceList.map((weightItem, index$1) => this.getCarouselPosition(index$1) !== null ?
|
|
142
|
-
index.h("div", { class: "weightdata", "data-carousel-position": this.getCarouselPosition(index$1), onClick: () => this.setActiveWeightIndex(index$1) }, index.h("input", { type: "radio", id: "weightradio" + index$1, name: "weightradio", value: index$1, checked: this.isActive(index$1) }), index.h("label", { htmlFor: "weightradio" + index$1 }, weightItem.item1)) : null)), index.h("pn-button", { disabled: this.activeWeightIndex === ((_c = (_b = this.data.proxioProduct) === null || _b === void 0 ? void 0 : _b.weightAndPriceList) === null || _c === void 0 ? void 0 : _c.length) - 1 ? ("disabled") : (null), icon: "arrow-right", appearance: "light", "icon-only": "true", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex + 1) }))) : (null)), index.h("pn-proxio-productcard", null, index.h("pn-illustration", { slot: "illustrationmobile", illustration: this.data.proxioProduct.productIcon }), index.h("h2", { slot: "title" }, this.data.proxioProduct.productTitle), index.h("pn-proxio-productcard-description", { slot: "description", heading: this.data.proxioProduct.productPreamble, highlight: this.data.proxioProduct.deliveryDateInformation, list: this.data.proxioProduct.productDescriptionBulletListItems }), index.h("div", { slot: "information" }, index.h("pn-proxio-productcard-information", { label: this.i18n.labelPackage, information: this.data.proxioProduct.productPackageDimensionsList }), index.h("pn-proxio-productcard-information", { label: this.i18n.labelRoll, information: this.data.proxioProduct.productRollDimensionsList })), index.h("div", { slot: "bottomtags" }, this.data.proxioProduct.
|
|
143
|
-
(index.h("pn-titletag", { color: "gray50" }, this.i18n.notTraceable)) : (null), this.data.proxioProduct.usp1 ?
|
|
146
|
+
index.h("div", { class: "weightdata", "data-carousel-position": this.getCarouselPosition(index$1), onClick: () => this.setActiveWeightIndex(index$1) }, index.h("input", { type: "radio", id: "weightradio" + index$1, name: "weightradio", value: index$1, checked: this.isActive(index$1) }), index.h("label", { htmlFor: "weightradio" + index$1 }, weightItem.item1)) : null)), index.h("pn-button", { disabled: this.activeWeightIndex === ((_c = (_b = this.data.proxioProduct) === null || _b === void 0 ? void 0 : _b.weightAndPriceList) === null || _c === void 0 ? void 0 : _c.length) - 1 ? ("disabled") : (null), icon: "arrow-right", appearance: "light", "icon-only": "true", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex + 1) }))) : (null)), index.h("pn-proxio-productcard", null, index.h("pn-illustration", { slot: "illustrationmobile", illustration: this.data.proxioProduct.productIcon }), index.h("h2", { slot: "title" }, this.data.proxioProduct.productTitle), index.h("pn-proxio-productcard-description", { slot: "description", heading: this.data.proxioProduct.productPreamble, highlight: this.data.proxioProduct.deliveryDateInformation, list: this.data.proxioProduct.productDescriptionBulletListItems }), index.h("div", { slot: "information" }, index.h("pn-proxio-productcard-information", { label: this.i18n.labelPackage, information: this.data.proxioProduct.productPackageDimensionsList }), index.h("pn-proxio-productcard-information", { label: this.i18n.labelRoll, information: this.data.proxioProduct.productRollDimensionsList })), index.h("div", { slot: "bottomtags" }, this.data.proxioProduct.usp1 ?
|
|
144
147
|
(index.h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp1)) : (null), this.data.proxioProduct.usp2 ?
|
|
145
148
|
(index.h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp2)) : (null), this.data.proxioProduct.usp3 ?
|
|
146
149
|
(index.h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp3)) : (null)), index.h("pn-illustration", { slot: "illustration", illustration: this.data.proxioProduct.productIcon }), index.h("div", { slot: "pricelink" }, index.h("pn-proxio-productcard-pricelink", { price: this.getPriceString(this.data.proxioProduct), link: this.data.proxioProduct.productLink, linktext: this.data.proxioProduct.productLinkText }), this.data.relatedProxioProducts ? (this.data.relatedProxioProducts.map((product) => (index.h("pn-proxio-productcard-pricelink", { price: this.getPriceString(product), link: product.productLink, linktext: product.productLinkText })))) : (null))))) : (null)));
|
|
@@ -6,12 +6,12 @@ export class PnProxioPricegroup {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
/** Specifies which endpoint domain we should load from */
|
|
8
8
|
this.endpoint = null;
|
|
9
|
-
this.culture = "sv-
|
|
9
|
+
this.culture = "sv-SE";
|
|
10
10
|
this.tariffid = "";
|
|
11
11
|
this.cache = true;
|
|
12
12
|
this.activeWeightIndex = 0;
|
|
13
13
|
this.data = null;
|
|
14
|
-
this.i18n = translations["sv-
|
|
14
|
+
this.i18n = translations["sv-SE"];
|
|
15
15
|
this.fetchHelper = new FetchHelper("proxiopricegroup");
|
|
16
16
|
}
|
|
17
17
|
componentWillLoad() {
|
|
@@ -133,8 +133,6 @@ export class PnProxioPricegroup {
|
|
|
133
133
|
h("pn-proxio-productcard-information", { label: this.i18n.labelPackage, information: this.data.proxioProduct.productPackageDimensionsList }),
|
|
134
134
|
h("pn-proxio-productcard-information", { label: this.i18n.labelRoll, information: this.data.proxioProduct.productRollDimensionsList })),
|
|
135
135
|
h("div", { slot: "bottomtags" },
|
|
136
|
-
this.data.proxioProduct.tracable ?
|
|
137
|
-
(h("pn-titletag", { color: "gray50" }, this.i18n.notTraceable)) : (null),
|
|
138
136
|
this.data.proxioProduct.usp1 ?
|
|
139
137
|
(h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp1)) : (null),
|
|
140
138
|
this.data.proxioProduct.usp2 ?
|
|
@@ -188,7 +186,7 @@ export class PnProxioPricegroup {
|
|
|
188
186
|
},
|
|
189
187
|
"attribute": "culture",
|
|
190
188
|
"reflect": false,
|
|
191
|
-
"defaultValue": "\"sv-
|
|
189
|
+
"defaultValue": "\"sv-SE\""
|
|
192
190
|
},
|
|
193
191
|
"tariffid": {
|
|
194
192
|
"type": "string",
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
export const translations = {
|
|
2
|
-
'sv-
|
|
2
|
+
'sv-SE': {
|
|
3
3
|
"from": "Från ",
|
|
4
4
|
"labelRoll": "Rulle",
|
|
5
5
|
"labelPackage": "Paket",
|
|
6
|
-
"notTraceable": "Inte spårbart",
|
|
7
6
|
"Creapest": "Billigast"
|
|
8
7
|
},
|
|
9
|
-
'en-
|
|
8
|
+
'en-GB': {
|
|
9
|
+
"from": "From ",
|
|
10
|
+
"labelRoll": "Roll",
|
|
11
|
+
"labelPackage": "Package",
|
|
12
|
+
"Creapest": "Cheapest"
|
|
13
|
+
},
|
|
14
|
+
'en-US': {
|
|
10
15
|
"from": "From ",
|
|
11
16
|
"labelRoll": "Roll",
|
|
12
17
|
"labelPackage": "Package",
|
|
13
|
-
"notTraceable": "Not traceable",
|
|
14
18
|
"Creapest": "Cheapest"
|
|
15
19
|
}
|
|
16
20
|
};
|
package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.stories.js
CHANGED
|
@@ -22,7 +22,6 @@ const Template = ({ ...args }) => {
|
|
|
22
22
|
<pn-proxio-productcard-information label="${args.rullelabel}" information="${args.rulle}" ></pn-proxio-productcard-information>
|
|
23
23
|
</div>
|
|
24
24
|
<div slot="bottomtags">
|
|
25
|
-
<pn-titletag color="gray50">${args.traceable}</pn-titletag>
|
|
26
25
|
<pn-titletag color="gray50">${args.usp1}</pn-titletag>
|
|
27
26
|
<pn-titletag color="gray50">${args.usp2}</pn-titletag>
|
|
28
27
|
<pn-titletag color="gray50">${args.usp3}</pn-titletag>
|
|
@@ -53,7 +52,6 @@ Primary.args = {
|
|
|
53
52
|
linktext1: "Köp portkod",
|
|
54
53
|
linktext2: "Till butiken",
|
|
55
54
|
uppertag: "Billigast",
|
|
56
|
-
traceable: "Inte spårbart",
|
|
57
55
|
usp1: "usp1",
|
|
58
56
|
usp2: "usp2",
|
|
59
57
|
usp3: "usp3",
|
package/custom-elements/index.js
CHANGED
|
@@ -6068,18 +6068,22 @@ let PnProfileSelectorOption$1 = class extends HTMLElement {
|
|
|
6068
6068
|
};
|
|
6069
6069
|
|
|
6070
6070
|
const translations$1 = {
|
|
6071
|
-
'sv-
|
|
6071
|
+
'sv-SE': {
|
|
6072
6072
|
"from": "Från ",
|
|
6073
6073
|
"labelRoll": "Rulle",
|
|
6074
6074
|
"labelPackage": "Paket",
|
|
6075
|
-
"notTraceable": "Inte spårbart",
|
|
6076
6075
|
"Creapest": "Billigast"
|
|
6077
6076
|
},
|
|
6078
|
-
'en-
|
|
6077
|
+
'en-GB': {
|
|
6078
|
+
"from": "From ",
|
|
6079
|
+
"labelRoll": "Roll",
|
|
6080
|
+
"labelPackage": "Package",
|
|
6081
|
+
"Creapest": "Cheapest"
|
|
6082
|
+
},
|
|
6083
|
+
'en-US': {
|
|
6079
6084
|
"from": "From ",
|
|
6080
6085
|
"labelRoll": "Roll",
|
|
6081
6086
|
"labelPackage": "Package",
|
|
6082
|
-
"notTraceable": "Not traceable",
|
|
6083
6087
|
"Creapest": "Cheapest"
|
|
6084
6088
|
}
|
|
6085
6089
|
};
|
|
@@ -6092,12 +6096,12 @@ let PnProxioPricegroup$1 = class extends HTMLElement {
|
|
|
6092
6096
|
this.__registerHost();
|
|
6093
6097
|
/** Specifies which endpoint domain we should load from */
|
|
6094
6098
|
this.endpoint = null;
|
|
6095
|
-
this.culture = "sv-
|
|
6099
|
+
this.culture = "sv-SE";
|
|
6096
6100
|
this.tariffid = "";
|
|
6097
6101
|
this.cache = true;
|
|
6098
6102
|
this.activeWeightIndex = 0;
|
|
6099
6103
|
this.data = null;
|
|
6100
|
-
this.i18n = translations$1["sv-
|
|
6104
|
+
this.i18n = translations$1["sv-SE"];
|
|
6101
6105
|
this.fetchHelper = new FetchHelper("proxiopricegroup");
|
|
6102
6106
|
}
|
|
6103
6107
|
componentWillLoad() {
|
|
@@ -6202,8 +6206,7 @@ let PnProxioPricegroup$1 = class extends HTMLElement {
|
|
|
6202
6206
|
var _a, _b, _c;
|
|
6203
6207
|
return (h(Host, null, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.proxioProduct) ? (h("div", { class: "proxio-pricegroup-container" }, h("div", { class: "weightcontainer" }, this.data.proxioProduct.weightAndPriceList ?
|
|
6204
6208
|
(h("div", { class: "weightvaluecontainer" }, h("pn-button", { disabled: this.activeWeightIndex === 0 ? ("disabled") : (null), "icon-only": "true", icon: "arrow-left", appearance: "light", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex - 1) }), h("div", { class: "weightradios ", "data-carousel-container-position": this.getContainerPosition() }, h("div", { class: "weightline" }), this.data.proxioProduct.weightAndPriceList.map((weightItem, index) => this.getCarouselPosition(index) !== null ?
|
|
6205
|
-
h("div", { class: "weightdata", "data-carousel-position": this.getCarouselPosition(index), onClick: () => this.setActiveWeightIndex(index) }, h("input", { type: "radio", id: "weightradio" + index, name: "weightradio", value: index, checked: this.isActive(index) }), h("label", { htmlFor: "weightradio" + index }, weightItem.item1)) : null)), h("pn-button", { disabled: this.activeWeightIndex === ((_c = (_b = this.data.proxioProduct) === null || _b === void 0 ? void 0 : _b.weightAndPriceList) === null || _c === void 0 ? void 0 : _c.length) - 1 ? ("disabled") : (null), icon: "arrow-right", appearance: "light", "icon-only": "true", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex + 1) }))) : (null)), h("pn-proxio-productcard", null, h("pn-illustration", { slot: "illustrationmobile", illustration: this.data.proxioProduct.productIcon }), h("h2", { slot: "title" }, this.data.proxioProduct.productTitle), h("pn-proxio-productcard-description", { slot: "description", heading: this.data.proxioProduct.productPreamble, highlight: this.data.proxioProduct.deliveryDateInformation, list: this.data.proxioProduct.productDescriptionBulletListItems }), h("div", { slot: "information" }, h("pn-proxio-productcard-information", { label: this.i18n.labelPackage, information: this.data.proxioProduct.productPackageDimensionsList }), h("pn-proxio-productcard-information", { label: this.i18n.labelRoll, information: this.data.proxioProduct.productRollDimensionsList })), h("div", { slot: "bottomtags" }, this.data.proxioProduct.
|
|
6206
|
-
(h("pn-titletag", { color: "gray50" }, this.i18n.notTraceable)) : (null), this.data.proxioProduct.usp1 ?
|
|
6209
|
+
h("div", { class: "weightdata", "data-carousel-position": this.getCarouselPosition(index), onClick: () => this.setActiveWeightIndex(index) }, h("input", { type: "radio", id: "weightradio" + index, name: "weightradio", value: index, checked: this.isActive(index) }), h("label", { htmlFor: "weightradio" + index }, weightItem.item1)) : null)), h("pn-button", { disabled: this.activeWeightIndex === ((_c = (_b = this.data.proxioProduct) === null || _b === void 0 ? void 0 : _b.weightAndPriceList) === null || _c === void 0 ? void 0 : _c.length) - 1 ? ("disabled") : (null), icon: "arrow-right", appearance: "light", "icon-only": "true", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex + 1) }))) : (null)), h("pn-proxio-productcard", null, h("pn-illustration", { slot: "illustrationmobile", illustration: this.data.proxioProduct.productIcon }), h("h2", { slot: "title" }, this.data.proxioProduct.productTitle), h("pn-proxio-productcard-description", { slot: "description", heading: this.data.proxioProduct.productPreamble, highlight: this.data.proxioProduct.deliveryDateInformation, list: this.data.proxioProduct.productDescriptionBulletListItems }), h("div", { slot: "information" }, h("pn-proxio-productcard-information", { label: this.i18n.labelPackage, information: this.data.proxioProduct.productPackageDimensionsList }), h("pn-proxio-productcard-information", { label: this.i18n.labelRoll, information: this.data.proxioProduct.productRollDimensionsList })), h("div", { slot: "bottomtags" }, this.data.proxioProduct.usp1 ?
|
|
6207
6210
|
(h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp1)) : (null), this.data.proxioProduct.usp2 ?
|
|
6208
6211
|
(h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp2)) : (null), this.data.proxioProduct.usp3 ?
|
|
6209
6212
|
(h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp3)) : (null)), h("pn-illustration", { slot: "illustration", illustration: this.data.proxioProduct.productIcon }), h("div", { slot: "pricelink" }, h("pn-proxio-productcard-pricelink", { price: this.getPriceString(this.data.proxioProduct), link: this.data.proxioProduct.productLink, linktext: this.data.proxioProduct.productLinkText }), this.data.relatedProxioProducts ? (this.data.relatedProxioProducts.map((product) => (h("pn-proxio-productcard-pricelink", { price: this.getPriceString(product), link: product.productLink, linktext: product.productLinkText })))) : (null))))) : (null)));
|
|
@@ -2,18 +2,22 @@ import { r as registerInstance, h, a as Host } from './index-5397620b.js';
|
|
|
2
2
|
import { F as FetchHelper, M as MarketWebContextService } from './FetchHelper-1dfe8514.js';
|
|
3
3
|
|
|
4
4
|
const translations = {
|
|
5
|
-
'sv-
|
|
5
|
+
'sv-SE': {
|
|
6
6
|
"from": "Från ",
|
|
7
7
|
"labelRoll": "Rulle",
|
|
8
8
|
"labelPackage": "Paket",
|
|
9
|
-
"notTraceable": "Inte spårbart",
|
|
10
9
|
"Creapest": "Billigast"
|
|
11
10
|
},
|
|
12
|
-
'en-
|
|
11
|
+
'en-GB': {
|
|
12
|
+
"from": "From ",
|
|
13
|
+
"labelRoll": "Roll",
|
|
14
|
+
"labelPackage": "Package",
|
|
15
|
+
"Creapest": "Cheapest"
|
|
16
|
+
},
|
|
17
|
+
'en-US': {
|
|
13
18
|
"from": "From ",
|
|
14
19
|
"labelRoll": "Roll",
|
|
15
20
|
"labelPackage": "Package",
|
|
16
|
-
"notTraceable": "Not traceable",
|
|
17
21
|
"Creapest": "Cheapest"
|
|
18
22
|
}
|
|
19
23
|
};
|
|
@@ -25,12 +29,12 @@ let PnProxioPricegroup = class {
|
|
|
25
29
|
registerInstance(this, hostRef);
|
|
26
30
|
/** Specifies which endpoint domain we should load from */
|
|
27
31
|
this.endpoint = null;
|
|
28
|
-
this.culture = "sv-
|
|
32
|
+
this.culture = "sv-SE";
|
|
29
33
|
this.tariffid = "";
|
|
30
34
|
this.cache = true;
|
|
31
35
|
this.activeWeightIndex = 0;
|
|
32
36
|
this.data = null;
|
|
33
|
-
this.i18n = translations["sv-
|
|
37
|
+
this.i18n = translations["sv-SE"];
|
|
34
38
|
this.fetchHelper = new FetchHelper("proxiopricegroup");
|
|
35
39
|
}
|
|
36
40
|
componentWillLoad() {
|
|
@@ -135,8 +139,7 @@ let PnProxioPricegroup = class {
|
|
|
135
139
|
var _a, _b, _c;
|
|
136
140
|
return (h(Host, null, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.proxioProduct) ? (h("div", { class: "proxio-pricegroup-container" }, h("div", { class: "weightcontainer" }, this.data.proxioProduct.weightAndPriceList ?
|
|
137
141
|
(h("div", { class: "weightvaluecontainer" }, h("pn-button", { disabled: this.activeWeightIndex === 0 ? ("disabled") : (null), "icon-only": "true", icon: "arrow-left", appearance: "light", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex - 1) }), h("div", { class: "weightradios ", "data-carousel-container-position": this.getContainerPosition() }, h("div", { class: "weightline" }), this.data.proxioProduct.weightAndPriceList.map((weightItem, index) => this.getCarouselPosition(index) !== null ?
|
|
138
|
-
h("div", { class: "weightdata", "data-carousel-position": this.getCarouselPosition(index), onClick: () => this.setActiveWeightIndex(index) }, h("input", { type: "radio", id: "weightradio" + index, name: "weightradio", value: index, checked: this.isActive(index) }), h("label", { htmlFor: "weightradio" + index }, weightItem.item1)) : null)), h("pn-button", { disabled: this.activeWeightIndex === ((_c = (_b = this.data.proxioProduct) === null || _b === void 0 ? void 0 : _b.weightAndPriceList) === null || _c === void 0 ? void 0 : _c.length) - 1 ? ("disabled") : (null), icon: "arrow-right", appearance: "light", "icon-only": "true", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex + 1) }))) : (null)), h("pn-proxio-productcard", null, h("pn-illustration", { slot: "illustrationmobile", illustration: this.data.proxioProduct.productIcon }), h("h2", { slot: "title" }, this.data.proxioProduct.productTitle), h("pn-proxio-productcard-description", { slot: "description", heading: this.data.proxioProduct.productPreamble, highlight: this.data.proxioProduct.deliveryDateInformation, list: this.data.proxioProduct.productDescriptionBulletListItems }), h("div", { slot: "information" }, h("pn-proxio-productcard-information", { label: this.i18n.labelPackage, information: this.data.proxioProduct.productPackageDimensionsList }), h("pn-proxio-productcard-information", { label: this.i18n.labelRoll, information: this.data.proxioProduct.productRollDimensionsList })), h("div", { slot: "bottomtags" }, this.data.proxioProduct.
|
|
139
|
-
(h("pn-titletag", { color: "gray50" }, this.i18n.notTraceable)) : (null), this.data.proxioProduct.usp1 ?
|
|
142
|
+
h("div", { class: "weightdata", "data-carousel-position": this.getCarouselPosition(index), onClick: () => this.setActiveWeightIndex(index) }, h("input", { type: "radio", id: "weightradio" + index, name: "weightradio", value: index, checked: this.isActive(index) }), h("label", { htmlFor: "weightradio" + index }, weightItem.item1)) : null)), h("pn-button", { disabled: this.activeWeightIndex === ((_c = (_b = this.data.proxioProduct) === null || _b === void 0 ? void 0 : _b.weightAndPriceList) === null || _c === void 0 ? void 0 : _c.length) - 1 ? ("disabled") : (null), icon: "arrow-right", appearance: "light", "icon-only": "true", small: "true", onClick: () => this.setActiveWeightIndex(this.activeWeightIndex + 1) }))) : (null)), h("pn-proxio-productcard", null, h("pn-illustration", { slot: "illustrationmobile", illustration: this.data.proxioProduct.productIcon }), h("h2", { slot: "title" }, this.data.proxioProduct.productTitle), h("pn-proxio-productcard-description", { slot: "description", heading: this.data.proxioProduct.productPreamble, highlight: this.data.proxioProduct.deliveryDateInformation, list: this.data.proxioProduct.productDescriptionBulletListItems }), h("div", { slot: "information" }, h("pn-proxio-productcard-information", { label: this.i18n.labelPackage, information: this.data.proxioProduct.productPackageDimensionsList }), h("pn-proxio-productcard-information", { label: this.i18n.labelRoll, information: this.data.proxioProduct.productRollDimensionsList })), h("div", { slot: "bottomtags" }, this.data.proxioProduct.usp1 ?
|
|
140
143
|
(h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp1)) : (null), this.data.proxioProduct.usp2 ?
|
|
141
144
|
(h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp2)) : (null), this.data.proxioProduct.usp3 ?
|
|
142
145
|
(h("pn-titletag", { color: "gray50" }, this.data.proxioProduct.usp3)) : (null)), h("pn-illustration", { slot: "illustration", illustration: this.data.proxioProduct.productIcon }), h("div", { slot: "pricelink" }, h("pn-proxio-productcard-pricelink", { price: this.getPriceString(this.data.proxioProduct), link: this.data.proxioProduct.productLink, linktext: this.data.proxioProduct.productLinkText }), this.data.relatedProxioProducts ? (this.data.relatedProxioProducts.map((product) => (h("pn-proxio-productcard-pricelink", { price: this.getPriceString(product), link: product.productLink, linktext: product.productLinkText })))) : (null))))) : (null)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,i,e,r){function o(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function a(t){try{c(r.next(t))}catch(i){n(i)}}function s(t){try{c(r["throw"](t))}catch(i){n(i)}}function c(t){t.done?e(t.value):o(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(n=a[0]&2?o["return"]:a[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;if(o=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){e.label=a[1];break}if(a[0]===6&&e.label<n[1]){e.label=n[1];n=a;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(a);break}if(n[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(s){a=[6,s];o=0}finally{r=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-1dfe8514.js";var translations={"sv-se":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",notTraceable:"Inte spårbart",Creapest:"Billigast"},"en-gb":{from:"From ",labelRoll:"Roll",labelPackage:"Package",notTraceable:"Not traceable",Creapest:"Cheapest"}};var pnProxioPricegroupCss='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';var PnProxioPricegroup=function(){function t(t){registerInstance(this,t);this.endpoint=null;this.culture="sv-se";this.tariffid="";this.cache=true;this.activeWeightIndex=0;this.data=null;this.i18n=translations["sv-se"];this.fetchHelper=new FetchHelper("proxiopricegroup")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var i,e,r,o;return __generator(this,(function(n){switch(n.label){case 0:i=new MarketWebContextService(t);return[4,i.getEnvironmentName()];case 1:e=n.sent();if(!(!this.endpoint&&(e===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,4];return[4,i.getMarket()];case 2:r=n.sent();o=this;return[4,i.getEndpoint(e,r)];case 3:o.endpoint=n.sent();n.label=4;case 4:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){this.setCulture();this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;return __generator(this,(function(r){switch(r.label){case 0:if(!this.culture||!this.tariffid){return[2]}t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;i="".concat(t,"/api/proxio/price-list-group?tariffId=").concat(this.tariffid,"&culture=").concat(this.culture,"&cached=").concat(this.cache);return[4,this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this))];case 1:e=r.sent();if(e===null||e===void 0?void 0:e.proxioProduct){this.data=e}return[2]}}))}))};t.prototype.onFetchData=function(t){this.data=t};t.prototype.setActiveWeightIndex=function(t){var i,e,r;var o=0;var n=(r=((e=(i=this.data.proxioProduct)===null||i===void 0?void 0:i.weightAndPriceList)===null||e===void 0?void 0:e.length)-1)!==null&&r!==void 0?r:o;t=t>n?n:t;t=t<o?o:t;this.activeWeightIndex=t};t.prototype.setCulture=function(){if(translations[this.culture]){this.i18n=translations[this.culture]}};t.prototype.getPriceString=function(t){var i;var e=t.weightAndPriceList?(i=t===null||t===void 0?void 0:t.weightAndPriceList[this.activeWeightIndex])===null||i===void 0?void 0:i.item2:"";return e?this.i18n.from+e:""};t.prototype.isActive=function(t){return t===this.activeWeightIndex};t.prototype.getCarouselPosition=function(t){switch(t){case this.activeWeightIndex-2:{return-2}case this.activeWeightIndex-1:{return-1}case this.activeWeightIndex:{return 0}case this.activeWeightIndex+1:{return 1}case this.activeWeightIndex+2:{return 2}default:return"outside"}};t.prototype.getContainerPosition=function(){var t=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:{return"end50"}case 1:{return"end75"}case t-1:{return"start75"}case t:{return"start50"}default:{return"default"}}};t.prototype.render=function(){var t=this;var i,e,r;return h(Host,null,((i=this.data)===null||i===void 0?void 0:i.proxioProduct)?h("div",{class:"proxio-pricegroup-container"},h("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?h("div",{class:"weightvaluecontainer"},h("pn-button",{disabled:this.activeWeightIndex===0?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex-1)}}),h("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},h("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map((function(i,e){return t.getCarouselPosition(e)!==null?h("div",{class:"weightdata","data-carousel-position":t.getCarouselPosition(e),onClick:function(){return t.setActiveWeightIndex(e)}},h("input",{type:"radio",id:"weightradio"+e,name:"weightradio",value:e,checked:t.isActive(e)}),h("label",{htmlFor:"weightradio"+e},i.item1)):null}))),h("pn-button",{disabled:this.activeWeightIndex===((r=(e=this.data.proxioProduct)===null||e===void 0?void 0:e.weightAndPriceList)===null||r===void 0?void 0:r.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex+1)}})):null),h("pn-proxio-productcard",null,h("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),h("h2",{slot:"title"},this.data.proxioProduct.productTitle),h("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),h("div",{slot:"information"},h("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),h("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),h("div",{slot:"bottomtags"},this.data.proxioProduct.tracable?h("pn-titletag",{color:"gray50"},this.i18n.notTraceable):null,this.data.proxioProduct.usp1?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),h("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),h("div",{slot:"pricelink"},h("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((function(i){return h("pn-proxio-productcard-pricelink",{price:t.getPriceString(i),link:i.productLink,linktext:i.productLinkText})})):null))):null)};return t}();PnProxioPricegroup.style=pnProxioPricegroupCss;export{PnProxioPricegroup as pn_proxio_pricegroup};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,e,r){function o(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function a(t){try{c(r.next(t))}catch(i){n(i)}}function s(t){try{c(r["throw"](t))}catch(i){n(i)}}function c(t){t.done?e(t.value):o(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(n=a[0]&2?o["return"]:a[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;if(o=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){e.label=a[1];break}if(a[0]===6&&e.label<n[1]){e.label=n[1];n=a;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(a);break}if(n[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(s){a=[6,s];o=0}finally{r=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-1dfe8514.js";var translations={"sv-SE":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",Creapest:"Billigast"},"en-GB":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"},"en-US":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"}};var pnProxioPricegroupCss='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';var PnProxioPricegroup=function(){function t(t){registerInstance(this,t);this.endpoint=null;this.culture="sv-SE";this.tariffid="";this.cache=true;this.activeWeightIndex=0;this.data=null;this.i18n=translations["sv-SE"];this.fetchHelper=new FetchHelper("proxiopricegroup")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var i,e,r,o;return __generator(this,(function(n){switch(n.label){case 0:i=new MarketWebContextService(t);return[4,i.getEnvironmentName()];case 1:e=n.sent();if(!(!this.endpoint&&(e===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,4];return[4,i.getMarket()];case 2:r=n.sent();o=this;return[4,i.getEndpoint(e,r)];case 3:o.endpoint=n.sent();n.label=4;case 4:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){this.setCulture();this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;return __generator(this,(function(r){switch(r.label){case 0:if(!this.culture||!this.tariffid){return[2]}t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;i="".concat(t,"/api/proxio/price-list-group?tariffId=").concat(this.tariffid,"&culture=").concat(this.culture,"&cached=").concat(this.cache);return[4,this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this))];case 1:e=r.sent();if(e===null||e===void 0?void 0:e.proxioProduct){this.data=e}return[2]}}))}))};t.prototype.onFetchData=function(t){this.data=t};t.prototype.setActiveWeightIndex=function(t){var i,e,r;var o=0;var n=(r=((e=(i=this.data.proxioProduct)===null||i===void 0?void 0:i.weightAndPriceList)===null||e===void 0?void 0:e.length)-1)!==null&&r!==void 0?r:o;t=t>n?n:t;t=t<o?o:t;this.activeWeightIndex=t};t.prototype.setCulture=function(){if(translations[this.culture]){this.i18n=translations[this.culture]}};t.prototype.getPriceString=function(t){var i;var e=t.weightAndPriceList?(i=t===null||t===void 0?void 0:t.weightAndPriceList[this.activeWeightIndex])===null||i===void 0?void 0:i.item2:"";return e?this.i18n.from+e:""};t.prototype.isActive=function(t){return t===this.activeWeightIndex};t.prototype.getCarouselPosition=function(t){switch(t){case this.activeWeightIndex-2:{return-2}case this.activeWeightIndex-1:{return-1}case this.activeWeightIndex:{return 0}case this.activeWeightIndex+1:{return 1}case this.activeWeightIndex+2:{return 2}default:return"outside"}};t.prototype.getContainerPosition=function(){var t=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:{return"end50"}case 1:{return"end75"}case t-1:{return"start75"}case t:{return"start50"}default:{return"default"}}};t.prototype.render=function(){var t=this;var i,e,r;return h(Host,null,((i=this.data)===null||i===void 0?void 0:i.proxioProduct)?h("div",{class:"proxio-pricegroup-container"},h("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?h("div",{class:"weightvaluecontainer"},h("pn-button",{disabled:this.activeWeightIndex===0?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex-1)}}),h("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},h("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map((function(i,e){return t.getCarouselPosition(e)!==null?h("div",{class:"weightdata","data-carousel-position":t.getCarouselPosition(e),onClick:function(){return t.setActiveWeightIndex(e)}},h("input",{type:"radio",id:"weightradio"+e,name:"weightradio",value:e,checked:t.isActive(e)}),h("label",{htmlFor:"weightradio"+e},i.item1)):null}))),h("pn-button",{disabled:this.activeWeightIndex===((r=(e=this.data.proxioProduct)===null||e===void 0?void 0:e.weightAndPriceList)===null||r===void 0?void 0:r.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex+1)}})):null),h("pn-proxio-productcard",null,h("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),h("h2",{slot:"title"},this.data.proxioProduct.productTitle),h("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),h("div",{slot:"information"},h("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),h("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),h("div",{slot:"bottomtags"},this.data.proxioProduct.usp1?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),h("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),h("div",{slot:"pricelink"},h("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((function(i){return h("pn-proxio-productcard-pricelink",{price:t.getPriceString(i),link:i.productLink,linktext:i.productLinkText})})):null))):null)};return t}();PnProxioPricegroup.style=pnProxioPricegroupCss;export{PnProxioPricegroup as pn_proxio_pricegroup};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,i,a,r;return{setters:[function(s){e=s.d;n=s.N;t=s.w;i=s.p;a=s.H;r=s.b}],execute:function(){var s=function(){{o(a.prototype)}var r=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(n,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var s={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return i(s)};var o=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var i=this.childNodes;if(e){for(var a=0;a<i.length;a++){if(i[a].nodeType!==2){t.appendChild(i[a].cloneNode(true))}}}return t}};s().then((function(e){return r([["p-6d08e5cc.system",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],siteid:[1],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-bc22baf1.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-8144bcbc.system",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-fecc53bb.system",[[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]}]]],["p-
|
|
1
|
+
System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,i,a,r;return{setters:[function(s){e=s.d;n=s.N;t=s.w;i=s.p;a=s.H;r=s.b}],execute:function(){var s=function(){{o(a.prototype)}var r=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(n,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var s={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return i(s)};var o=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var i=this.childNodes;if(e){for(var a=0;a<i.length;a++){if(i[a].nodeType!==2){t.appendChild(i[a].cloneNode(true))}}}return t}};s().then((function(e){return r([["p-6d08e5cc.system",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],siteid:[1],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-bc22baf1.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-8144bcbc.system",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-fecc53bb.system",[[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]}]]],["p-79473404.system",[[0,"pn-proxio-pricegroup",{endpoint:[1025],culture:[1],tariffid:[1],cache:[4],activeWeightIndex:[32],data:[32],i18n:[32]},[[0,"activeWeightIndex","setActiveWeightIndex"],[0,"culture","setCulture"]]]]],["p-723b9901.system",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-69a5376a.system",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],siteDomainInUrls:[4,"site-domain-in-urls"],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-2da8e5e8.system",[[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"]]]]],["p-1151bf60.system",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],sumtext:[513],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-36a1b8e1.system",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-4f67721e.system",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e6fa11ad.system",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-2718b89a.system",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-80dce81e.system",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-290d5824.system",[[4,"pn-product-tile"]]],["p-74d35edf.system",[[4,"pn-profile-modal",{heading:[1],continueCtaText:[1,"continue-cta-text"],choosenCompanyText:[1,"choosen-company-text"],toText:[1,"to-text"],chooseCustomerNumberText:[1,"choose-customer-number-text"],isLoading:[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-aa271997.system",[[4,"pn-profile-modal-customernumber",{url:[513],customernumber:[513],selected:[516]}]]],["p-7b9fb94f.system",[[4,"pn-profile-modal-profile",{heading:[513],description:[513],url:[513],selected:[1028],showCustomerNumbers:[516,"show-customer-numbers"],pleaseSelectText:[513,"please-select-text"],visible:[1540],identifier:[32]}]]],["p-58a57436.system",[[4,"pn-profile-modal-type",{typeid:[513],name:[1025],selected:[1028],selectedprofile:[1025]}]]],["p-450cbe76.system",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-93cecc43.system",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-a247058b.system",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-885bc8d7.system",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-625fb7fb.system",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-b88337dd.system",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-198d9c77.system",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["p-8117b79e.system",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-9edaf6b6.system",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-e4a4e68f.system",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],weightText:[32],linkId:[32],shopLabel:[32],shopUrl:[32],shopId:[32]}]]],["p-6983565e.system",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-1ce871c5.system",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-fc1083d2.system",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-e66a8bb8.system",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-da7f1b66.system",[[0,"pn-marketweb-siteheader-login-links",{loginDialog:[1040],loginManager:[16],idNamespace:[1,"id-namespace"],loggedin:[516],username:[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{loginDialog:[1040],loginManager:[16],endpoint:[1],loggedin:[4],idNamespace:[1,"id-namespace"],heading:[1],i18n:[16],currentProfile:[1040],profileoptions:[1040],user:[32],logoutLink:[32],userName:[32],userEmail:[32]}]]],["p-5ab6f876.system",[[4,"pn-proxio-productcard"],[0,"pn-proxio-productcard-description",{heading:[1],highlight:[1],description:[1],list:[1040]}],[0,"pn-proxio-productcard-information",{label:[1],information:[16]}],[0,"pn-proxio-productcard-pricelink",{price:[1],link:[1],linktext:[1]}]]],["p-a921d3fd.system",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-34d74e18.system",[[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[16],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],showProfileSelection:[1028,"show-profile-selection"],loginManager:[32],loginLinks:[32],toggleButtonText:[32],username:[32]}],[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-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],siteid:[1],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,e,r){function o(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function a(t){try{c(r.next(t))}catch(i){n(i)}}function s(t){try{c(r["throw"](t))}catch(i){n(i)}}function c(t){t.done?e(t.value):o(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(n=a[0]&2?o["return"]:a[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;if(o=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){e.label=a[1];break}if(a[0]===6&&e.label<n[1]){e.label=n[1];n=a;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(a);break}if(n[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(s){a=[6,s];o=0}finally{r=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js","./p-6174a610.system.js"],(function(t){"use strict";var i,e,r,o,n;return{setters:[function(t){i=t.r;e=t.h;r=t.a},function(t){o=t.F;n=t.M}],execute:function(){var a={"sv-SE":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",Creapest:"Billigast"},"en-GB":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"},"en-US":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"}};var s='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';var c=t("pn_proxio_pricegroup",function(){function t(t){i(this,t);this.endpoint=null;this.culture="sv-SE";this.tariffid="";this.cache=true;this.activeWeightIndex=0;this.data=null;this.i18n=a["sv-SE"];this.fetchHelper=new o("proxiopricegroup")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var i,e,r,o;return __generator(this,(function(a){switch(a.label){case 0:i=new n(t);return[4,i.getEnvironmentName()];case 1:e=a.sent();if(!(!this.endpoint&&(e===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,4];return[4,i.getMarket()];case 2:r=a.sent();o=this;return[4,i.getEndpoint(e,r)];case 3:o.endpoint=a.sent();a.label=4;case 4:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){this.setCulture();this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;return __generator(this,(function(r){switch(r.label){case 0:if(!this.culture||!this.tariffid){return[2]}t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;i="".concat(t,"/api/proxio/price-list-group?tariffId=").concat(this.tariffid,"&culture=").concat(this.culture,"&cached=").concat(this.cache);return[4,this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this))];case 1:e=r.sent();if(e===null||e===void 0?void 0:e.proxioProduct){this.data=e}return[2]}}))}))};t.prototype.onFetchData=function(t){this.data=t};t.prototype.setActiveWeightIndex=function(t){var i,e,r;var o=0;var n=(r=((e=(i=this.data.proxioProduct)===null||i===void 0?void 0:i.weightAndPriceList)===null||e===void 0?void 0:e.length)-1)!==null&&r!==void 0?r:o;t=t>n?n:t;t=t<o?o:t;this.activeWeightIndex=t};t.prototype.setCulture=function(){if(a[this.culture]){this.i18n=a[this.culture]}};t.prototype.getPriceString=function(t){var i;var e=t.weightAndPriceList?(i=t===null||t===void 0?void 0:t.weightAndPriceList[this.activeWeightIndex])===null||i===void 0?void 0:i.item2:"";return e?this.i18n.from+e:""};t.prototype.isActive=function(t){return t===this.activeWeightIndex};t.prototype.getCarouselPosition=function(t){switch(t){case this.activeWeightIndex-2:{return-2}case this.activeWeightIndex-1:{return-1}case this.activeWeightIndex:{return 0}case this.activeWeightIndex+1:{return 1}case this.activeWeightIndex+2:{return 2}default:return"outside"}};t.prototype.getContainerPosition=function(){var t=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:{return"end50"}case 1:{return"end75"}case t-1:{return"start75"}case t:{return"start50"}default:{return"default"}}};t.prototype.render=function(){var t=this;var i,o,n;return e(r,null,((i=this.data)===null||i===void 0?void 0:i.proxioProduct)?e("div",{class:"proxio-pricegroup-container"},e("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?e("div",{class:"weightvaluecontainer"},e("pn-button",{disabled:this.activeWeightIndex===0?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex-1)}}),e("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},e("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map((function(i,r){return t.getCarouselPosition(r)!==null?e("div",{class:"weightdata","data-carousel-position":t.getCarouselPosition(r),onClick:function(){return t.setActiveWeightIndex(r)}},e("input",{type:"radio",id:"weightradio"+r,name:"weightradio",value:r,checked:t.isActive(r)}),e("label",{htmlFor:"weightradio"+r},i.item1)):null}))),e("pn-button",{disabled:this.activeWeightIndex===((n=(o=this.data.proxioProduct)===null||o===void 0?void 0:o.weightAndPriceList)===null||n===void 0?void 0:n.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex+1)}})):null),e("pn-proxio-productcard",null,e("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),e("h2",{slot:"title"},this.data.proxioProduct.productTitle),e("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),e("div",{slot:"information"},e("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),e("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),e("div",{slot:"bottomtags"},this.data.proxioProduct.usp1?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),e("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),e("div",{slot:"pricelink"},e("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((function(i){return e("pn-proxio-productcard-pricelink",{price:t.getPriceString(i),link:i.productLink,linktext:i.productLinkText})})):null))):null)};return t}());c.style=s}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as t,a as e}from"./p-58e8d7d5.js";import{F as r,M as o}from"./p-f0f58646.js";const a={"sv-SE":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",Creapest:"Billigast"},"en-GB":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"},"en-US":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"}};let n=class{constructor(t){i(this,t),this.endpoint=null,this.culture="sv-SE",this.tariffid="",this.cache=!0,this.activeWeightIndex=0,this.data=null,this.i18n=a["sv-SE"],this.fetchHelper=new r("proxiopricegroup")}componentWillLoad(){this.setInitialValues().then((()=>{this.init()}))}async setInitialValues(i=window.location.href){const t=new o(i),e=await t.getEnvironmentName();if(!this.endpoint&&-1===(null==e?void 0:e.indexOf("local"))){const i=await t.getMarket();this.endpoint=await t.getEndpoint(e,i)}this.endpoint||(this.endpoint="")}init(){this.setCulture(),this.fetchData()}async fetchData(){if(!this.culture||!this.tariffid)return;const i=`${this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint}/api/proxio/price-list-group?tariffId=${this.tariffid}&culture=${this.culture}&cached=${this.cache}`,t=await this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this));(null==t?void 0:t.proxioProduct)&&(this.data=t)}onFetchData(i){this.data=i}setActiveWeightIndex(i){var t,e,r;let o=null!==(r=(null===(e=null===(t=this.data.proxioProduct)||void 0===t?void 0:t.weightAndPriceList)||void 0===e?void 0:e.length)-1)&&void 0!==r?r:0;this.activeWeightIndex=i=(i=i>o?o:i)<0?0:i}setCulture(){a[this.culture]&&(this.i18n=a[this.culture])}getPriceString(i){var t;let e=i.weightAndPriceList?null===(t=null==i?void 0:i.weightAndPriceList[this.activeWeightIndex])||void 0===t?void 0:t.item2:"";return e?this.i18n.from+e:""}isActive(i){return i===this.activeWeightIndex}getCarouselPosition(i){switch(i){case this.activeWeightIndex-2:return-2;case this.activeWeightIndex-1:return-1;case this.activeWeightIndex:return 0;case this.activeWeightIndex+1:return 1;case this.activeWeightIndex+2:return 2;default:return"outside"}}getContainerPosition(){let i=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:return"end50";case 1:return"end75";case i-1:return"start75";case i:return"start50";default:return"default"}}render(){var i,r,o;return t(e,null,(null===(i=this.data)||void 0===i?void 0:i.proxioProduct)?t("div",{class:"proxio-pricegroup-container"},t("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?t("div",{class:"weightvaluecontainer"},t("pn-button",{disabled:0===this.activeWeightIndex?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:()=>this.setActiveWeightIndex(this.activeWeightIndex-1)}),t("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},t("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map(((i,e)=>null!==this.getCarouselPosition(e)?t("div",{class:"weightdata","data-carousel-position":this.getCarouselPosition(e),onClick:()=>this.setActiveWeightIndex(e)},t("input",{type:"radio",id:"weightradio"+e,name:"weightradio",value:e,checked:this.isActive(e)}),t("label",{htmlFor:"weightradio"+e},i.item1)):null))),t("pn-button",{disabled:this.activeWeightIndex===(null===(o=null===(r=this.data.proxioProduct)||void 0===r?void 0:r.weightAndPriceList)||void 0===o?void 0:o.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:()=>this.setActiveWeightIndex(this.activeWeightIndex+1)})):null),t("pn-proxio-productcard",null,t("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),t("h2",{slot:"title"},this.data.proxioProduct.productTitle),t("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),t("div",{slot:"information"},t("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),t("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),t("div",{slot:"bottomtags"},this.data.proxioProduct.usp1?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),t("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),t("div",{slot:"pricelink"},t("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((i=>t("pn-proxio-productcard-pricelink",{price:this.getPriceString(i),link:i.productLink,linktext:i.productLinkText}))):null))):null)}};n.style='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';export{n as pn_proxio_pricegroup}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,N as n,w as t,p as a,H as i,b as r}from"./p-58e8d7d5.js";const o=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const t=n.call(this,!1),a=this.childNodes;if(e)for(let n=0;n<a.length;n++)2!==a[n].nodeType&&t.appendChild(a[n].cloneNode(!0));return t}};(()=>{o(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),l={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,a(l))})().then((e=>r([["p-5482774f",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],siteid:[1],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-513e3c62",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-774b7a9f",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-b32a8507",[[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]}]]],["p-
|
|
1
|
+
import{d as e,N as n,w as t,p as a,H as i,b as r}from"./p-58e8d7d5.js";const o=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const t=n.call(this,!1),a=this.childNodes;if(e)for(let n=0;n<a.length;n++)2!==a[n].nodeType&&t.appendChild(a[n].cloneNode(!0));return t}};(()=>{o(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),l={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,a(l))})().then((e=>r([["p-5482774f",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],siteid:[1],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-513e3c62",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-774b7a9f",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-b32a8507",[[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]}]]],["p-f63483d9",[[0,"pn-proxio-pricegroup",{endpoint:[1025],culture:[1],tariffid:[1],cache:[4],activeWeightIndex:[32],data:[32],i18n:[32]},[[0,"activeWeightIndex","setActiveWeightIndex"],[0,"culture","setCulture"]]]]],["p-17c4004f",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-63d561fe",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],siteDomainInUrls:[4,"site-domain-in-urls"],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-381b3ec0",[[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"]]]]],["p-4bef1bf3",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],sumtext:[513],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-7ce41d14",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-0796f9b2",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e32dc098",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-81d764a0",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-e9fe5c54",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-d0155ddf",[[4,"pn-product-tile"]]],["p-fc974bca",[[4,"pn-profile-modal",{heading:[1],continueCtaText:[1,"continue-cta-text"],choosenCompanyText:[1,"choosen-company-text"],toText:[1,"to-text"],chooseCustomerNumberText:[1,"choose-customer-number-text"],isLoading:[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-e9576f26",[[4,"pn-profile-modal-customernumber",{url:[513],customernumber:[513],selected:[516]}]]],["p-16c4bc50",[[4,"pn-profile-modal-profile",{heading:[513],description:[513],url:[513],selected:[1028],showCustomerNumbers:[516,"show-customer-numbers"],pleaseSelectText:[513,"please-select-text"],visible:[1540],identifier:[32]}]]],["p-fea72975",[[4,"pn-profile-modal-type",{typeid:[513],name:[1025],selected:[1028],selectedprofile:[1025]}]]],["p-bd22aaac",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-a7bb94a0",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-88185835",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-227e1d46",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-f774e2cc",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-67380aa4",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-022d9a78",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["p-61dbe832",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-996d8a6a",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-3ae38e63",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],weightText:[32],linkId:[32],shopLabel:[32],shopUrl:[32],shopId:[32]}]]],["p-3446e50a",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-15112837",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-715d1ef7",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-08411f5e",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-a6a2a32d",[[0,"pn-marketweb-siteheader-login-links",{loginDialog:[1040],loginManager:[16],idNamespace:[1,"id-namespace"],loggedin:[516],username:[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{loginDialog:[1040],loginManager:[16],endpoint:[1],loggedin:[4],idNamespace:[1,"id-namespace"],heading:[1],i18n:[16],currentProfile:[1040],profileoptions:[1040],user:[32],logoutLink:[32],userName:[32],userEmail:[32]}]]],["p-375354d3",[[4,"pn-proxio-productcard"],[0,"pn-proxio-productcard-description",{heading:[1],highlight:[1],description:[1],list:[1040]}],[0,"pn-proxio-productcard-information",{label:[1],information:[16]}],[0,"pn-proxio-productcard-pricelink",{price:[1],link:[1],linktext:[1]}]]],["p-8e146205",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-c459338f",[[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[16],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],showProfileSelection:[1028,"show-profile-selection"],loginManager:[32],loginLinks:[32],toggleButtonText:[32],username:[32]}],[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-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],siteid:[1],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)));
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
export declare const translations: {
|
|
2
|
-
'sv-
|
|
2
|
+
'sv-SE': {
|
|
3
3
|
from: string;
|
|
4
4
|
labelRoll: string;
|
|
5
5
|
labelPackage: string;
|
|
6
|
-
notTraceable: string;
|
|
7
6
|
Creapest: string;
|
|
8
7
|
};
|
|
9
|
-
'en-
|
|
8
|
+
'en-GB': {
|
|
9
|
+
from: string;
|
|
10
|
+
labelRoll: string;
|
|
11
|
+
labelPackage: string;
|
|
12
|
+
Creapest: string;
|
|
13
|
+
};
|
|
14
|
+
'en-US': {
|
|
10
15
|
from: string;
|
|
11
16
|
labelRoll: string;
|
|
12
17
|
labelPackage: string;
|
|
13
|
-
notTraceable: string;
|
|
14
18
|
Creapest: string;
|
|
15
19
|
};
|
|
16
20
|
};
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
|
|
28
28
|
const s = document.createElement('script');
|
|
29
29
|
s.setAttribute("type", "module");
|
|
30
|
-
s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.
|
|
30
|
+
s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.89/umd/standalone-loader-salesforce.js");
|
|
31
31
|
document.querySelector("head").appendChild(s);
|
|
32
32
|
|
|
33
33
|
const style = document.createElement('link');
|
|
34
34
|
style.setAttribute("rel", "stylesheet");
|
|
35
|
-
style.setAttribute("href", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.
|
|
35
|
+
style.setAttribute("href", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.89/umd/pn-marketweb-wrongrembase.css");
|
|
36
36
|
document.querySelector("head").appendChild(style);
|
|
37
37
|
|
|
38
38
|
window["bindLanguageSelector"] = function() {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,a as e}from"./p-58e8d7d5.js";import{F as r,M as o}from"./p-f0f58646.js";const a={"sv-se":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",notTraceable:"Inte spårbart",Creapest:"Billigast"},"en-gb":{from:"From ",labelRoll:"Roll",labelPackage:"Package",notTraceable:"Not traceable",Creapest:"Cheapest"}};let n=class{constructor(t){i(this,t),this.endpoint=null,this.culture="sv-se",this.tariffid="",this.cache=!0,this.activeWeightIndex=0,this.data=null,this.i18n=a["sv-se"],this.fetchHelper=new r("proxiopricegroup")}componentWillLoad(){this.setInitialValues().then((()=>{this.init()}))}async setInitialValues(i=window.location.href){const t=new o(i),e=await t.getEnvironmentName();if(!this.endpoint&&-1===(null==e?void 0:e.indexOf("local"))){const i=await t.getMarket();this.endpoint=await t.getEndpoint(e,i)}this.endpoint||(this.endpoint="")}init(){this.setCulture(),this.fetchData()}async fetchData(){if(!this.culture||!this.tariffid)return;const i=`${this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint}/api/proxio/price-list-group?tariffId=${this.tariffid}&culture=${this.culture}&cached=${this.cache}`,t=await this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this));(null==t?void 0:t.proxioProduct)&&(this.data=t)}onFetchData(i){this.data=i}setActiveWeightIndex(i){var t,e,r;let o=null!==(r=(null===(e=null===(t=this.data.proxioProduct)||void 0===t?void 0:t.weightAndPriceList)||void 0===e?void 0:e.length)-1)&&void 0!==r?r:0;this.activeWeightIndex=i=(i=i>o?o:i)<0?0:i}setCulture(){a[this.culture]&&(this.i18n=a[this.culture])}getPriceString(i){var t;let e=i.weightAndPriceList?null===(t=null==i?void 0:i.weightAndPriceList[this.activeWeightIndex])||void 0===t?void 0:t.item2:"";return e?this.i18n.from+e:""}isActive(i){return i===this.activeWeightIndex}getCarouselPosition(i){switch(i){case this.activeWeightIndex-2:return-2;case this.activeWeightIndex-1:return-1;case this.activeWeightIndex:return 0;case this.activeWeightIndex+1:return 1;case this.activeWeightIndex+2:return 2;default:return"outside"}}getContainerPosition(){let i=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:return"end50";case 1:return"end75";case i-1:return"start75";case i:return"start50";default:return"default"}}render(){var i,r,o;return t(e,null,(null===(i=this.data)||void 0===i?void 0:i.proxioProduct)?t("div",{class:"proxio-pricegroup-container"},t("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?t("div",{class:"weightvaluecontainer"},t("pn-button",{disabled:0===this.activeWeightIndex?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:()=>this.setActiveWeightIndex(this.activeWeightIndex-1)}),t("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},t("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map(((i,e)=>null!==this.getCarouselPosition(e)?t("div",{class:"weightdata","data-carousel-position":this.getCarouselPosition(e),onClick:()=>this.setActiveWeightIndex(e)},t("input",{type:"radio",id:"weightradio"+e,name:"weightradio",value:e,checked:this.isActive(e)}),t("label",{htmlFor:"weightradio"+e},i.item1)):null))),t("pn-button",{disabled:this.activeWeightIndex===(null===(o=null===(r=this.data.proxioProduct)||void 0===r?void 0:r.weightAndPriceList)||void 0===o?void 0:o.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:()=>this.setActiveWeightIndex(this.activeWeightIndex+1)})):null),t("pn-proxio-productcard",null,t("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),t("h2",{slot:"title"},this.data.proxioProduct.productTitle),t("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),t("div",{slot:"information"},t("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),t("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),t("div",{slot:"bottomtags"},this.data.proxioProduct.tracable?t("pn-titletag",{color:"gray50"},this.i18n.notTraceable):null,this.data.proxioProduct.usp1?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),t("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),t("div",{slot:"pricelink"},t("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((i=>t("pn-proxio-productcard-pricelink",{price:this.getPriceString(i),link:i.productLink,linktext:i.productLinkText}))):null))):null)}};n.style='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';export{n as pn_proxio_pricegroup}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,i,e,r){function o(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function a(t){try{c(r.next(t))}catch(i){n(i)}}function s(t){try{c(r["throw"](t))}catch(i){n(i)}}function c(t){t.done?e(t.value):o(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(n=a[0]&2?o["return"]:a[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;if(o=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){e.label=a[1];break}if(a[0]===6&&e.label<n[1]){e.label=n[1];n=a;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(a);break}if(n[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(s){a=[6,s];o=0}finally{r=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js","./p-6174a610.system.js"],(function(t){"use strict";var i,e,r,o,n;return{setters:[function(t){i=t.r;e=t.h;r=t.a},function(t){o=t.F;n=t.M}],execute:function(){var a={"sv-se":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",notTraceable:"Inte spårbart",Creapest:"Billigast"},"en-gb":{from:"From ",labelRoll:"Roll",labelPackage:"Package",notTraceable:"Not traceable",Creapest:"Cheapest"}};var s='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';var c=t("pn_proxio_pricegroup",function(){function t(t){i(this,t);this.endpoint=null;this.culture="sv-se";this.tariffid="";this.cache=true;this.activeWeightIndex=0;this.data=null;this.i18n=a["sv-se"];this.fetchHelper=new o("proxiopricegroup")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var i,e,r,o;return __generator(this,(function(a){switch(a.label){case 0:i=new n(t);return[4,i.getEnvironmentName()];case 1:e=a.sent();if(!(!this.endpoint&&(e===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,4];return[4,i.getMarket()];case 2:r=a.sent();o=this;return[4,i.getEndpoint(e,r)];case 3:o.endpoint=a.sent();a.label=4;case 4:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){this.setCulture();this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;return __generator(this,(function(r){switch(r.label){case 0:if(!this.culture||!this.tariffid){return[2]}t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;i="".concat(t,"/api/proxio/price-list-group?tariffId=").concat(this.tariffid,"&culture=").concat(this.culture,"&cached=").concat(this.cache);return[4,this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this))];case 1:e=r.sent();if(e===null||e===void 0?void 0:e.proxioProduct){this.data=e}return[2]}}))}))};t.prototype.onFetchData=function(t){this.data=t};t.prototype.setActiveWeightIndex=function(t){var i,e,r;var o=0;var n=(r=((e=(i=this.data.proxioProduct)===null||i===void 0?void 0:i.weightAndPriceList)===null||e===void 0?void 0:e.length)-1)!==null&&r!==void 0?r:o;t=t>n?n:t;t=t<o?o:t;this.activeWeightIndex=t};t.prototype.setCulture=function(){if(a[this.culture]){this.i18n=a[this.culture]}};t.prototype.getPriceString=function(t){var i;var e=t.weightAndPriceList?(i=t===null||t===void 0?void 0:t.weightAndPriceList[this.activeWeightIndex])===null||i===void 0?void 0:i.item2:"";return e?this.i18n.from+e:""};t.prototype.isActive=function(t){return t===this.activeWeightIndex};t.prototype.getCarouselPosition=function(t){switch(t){case this.activeWeightIndex-2:{return-2}case this.activeWeightIndex-1:{return-1}case this.activeWeightIndex:{return 0}case this.activeWeightIndex+1:{return 1}case this.activeWeightIndex+2:{return 2}default:return"outside"}};t.prototype.getContainerPosition=function(){var t=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:{return"end50"}case 1:{return"end75"}case t-1:{return"start75"}case t:{return"start50"}default:{return"default"}}};t.prototype.render=function(){var t=this;var i,o,n;return e(r,null,((i=this.data)===null||i===void 0?void 0:i.proxioProduct)?e("div",{class:"proxio-pricegroup-container"},e("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?e("div",{class:"weightvaluecontainer"},e("pn-button",{disabled:this.activeWeightIndex===0?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex-1)}}),e("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},e("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map((function(i,r){return t.getCarouselPosition(r)!==null?e("div",{class:"weightdata","data-carousel-position":t.getCarouselPosition(r),onClick:function(){return t.setActiveWeightIndex(r)}},e("input",{type:"radio",id:"weightradio"+r,name:"weightradio",value:r,checked:t.isActive(r)}),e("label",{htmlFor:"weightradio"+r},i.item1)):null}))),e("pn-button",{disabled:this.activeWeightIndex===((n=(o=this.data.proxioProduct)===null||o===void 0?void 0:o.weightAndPriceList)===null||n===void 0?void 0:n.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex+1)}})):null),e("pn-proxio-productcard",null,e("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),e("h2",{slot:"title"},this.data.proxioProduct.productTitle),e("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),e("div",{slot:"information"},e("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),e("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),e("div",{slot:"bottomtags"},this.data.proxioProduct.tracable?e("pn-titletag",{color:"gray50"},this.i18n.notTraceable):null,this.data.proxioProduct.usp1?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),e("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),e("div",{slot:"pricelink"},e("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((function(i){return e("pn-proxio-productcard-pricelink",{price:t.getPriceString(i),link:i.productLink,linktext:i.productLinkText})})):null))):null)};return t}());c.style=s}}}));
|