@postnord/pn-marketweb-components 2.0.150-test3 → 2.1.0
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/{data-4fa6b08d.js → data-b5ef4f7c.js} +2 -2
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +4 -4
- package/cjs/{pn-find-price-store-a91ce3f6.js → pn-find-price-store-0b8c195c.js} +2 -2
- package/cjs/pn-find-price.cjs.entry.js +7 -7
- package/cjs/pn-language-selector_9.cjs.entry.js +19 -29
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +42 -7
- package/cjs/{pn-marketweb-siteheader-login-button_4.cjs.entry.js → pn-marketweb-siteheader-login-links_2.cjs.entry.js} +18 -67
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +2 -2
- package/cjs/{pn-product-card_3.cjs.entry.js → pn-product-card_4.cjs.entry.js} +18 -0
- package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +22 -6
- package/collection/collection-manifest.json +0 -4
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +13 -25
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +45 -14
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +23 -13
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +25 -56
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css +0 -26
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +3 -3
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +5 -4
- package/collection/components/widgets/pn-find-price/data.js +2 -2
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +7 -7
- package/collection/components/widgets/pn-find-price/pn-find-price-store.js +2 -2
- package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +5 -5
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +0 -3
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +0 -1
- package/collection/globals/MarketWebLoginManager.js +1 -1
- package/custom-elements/index.d.ts +0 -24
- package/custom-elements/index.js +242 -634
- package/esm/{data-059c2a58.js → data-9c9c5f41.js} +2 -2
- package/esm/loader.js +1 -1
- package/esm/pn-find-price-result.entry.js +4 -4
- package/esm/{pn-find-price-store-bde5071d.js → pn-find-price-store-b4556c9b.js} +2 -2
- package/esm/pn-find-price.entry.js +7 -7
- package/esm/pn-language-selector_9.entry.js +19 -29
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js +42 -7
- package/esm/{pn-marketweb-siteheader-login-button_4.entry.js → pn-marketweb-siteheader-login-links_2.entry.js} +19 -66
- package/esm/pn-marketweb-siteheader.entry.js +2 -2
- package/esm/{pn-product-card_3.entry.js → pn-product-card_4.entry.js} +19 -2
- package/esm/pn-product-pricelist.entry.js +1 -1
- package/esm/pn-proxio-pricegroup.entry.js +19 -3
- package/esm-es5/{data-059c2a58.js → data-9c9c5f41.js} +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/{pn-find-price-store-bde5071d.js → pn-find-price-store-b4556c9b.js} +1 -1
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_4.entry.js +1 -0
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-022d9a78.entry.js +1 -0
- package/pn-market-web-components/{p-70b360dd.entry.js → p-0b0727dc.entry.js} +1 -1
- package/pn-market-web-components/p-198d9c77.system.entry.js +1 -0
- package/pn-market-web-components/p-332e9005.entry.js +1 -0
- package/pn-market-web-components/{p-3738a2df.system.js → p-37017f68.system.js} +1 -1
- package/pn-market-web-components/{p-b9a84e67.entry.js → p-3ae38e63.entry.js} +1 -1
- package/pn-market-web-components/p-3c0d63fb.system.entry.js +1 -0
- package/pn-market-web-components/p-63c30175.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-6b33db5b.system.entry.js +1 -0
- package/pn-market-web-components/{p-98a7ddd1.system.entry.js → p-736e5b84.system.entry.js} +1 -1
- package/pn-market-web-components/p-77557da8.entry.js +1 -0
- package/pn-market-web-components/p-92fd28e6.entry.js +1 -0
- package/pn-market-web-components/p-a119cb8e.entry.js +1 -0
- package/pn-market-web-components/{p-8b684578.entry.js → p-aab2e28f.entry.js} +1 -1
- package/pn-market-web-components/{p-59be826b.system.entry.js → p-ac0e3c22.system.entry.js} +1 -1
- package/pn-market-web-components/p-c4254e9e.js +1 -0
- package/pn-market-web-components/{p-7f9c643c.system.entry.js → p-d0653c80.system.entry.js} +1 -1
- package/pn-market-web-components/p-d542a52b.system.entry.js +1 -0
- package/pn-market-web-components/{p-ecdf2b69.system.entry.js → p-e4a4e68f.system.entry.js} +1 -1
- package/pn-market-web-components/p-eb662559.system.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.d.ts +2 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.d.ts +1 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +2 -3
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +8 -10
- package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -4
- package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +5 -5
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +2 -2
- package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +1 -1
- package/types/components.d.ts +1 -85
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/cjs/pn-proxio-findprice-result.cjs.entry.js +0 -63
- package/cjs/pn-proxio-findprice.cjs.entry.js +0 -311
- package/cjs/pn-titletag.cjs.entry.js +0 -24
- package/cjs/translations-585711ff.js +0 -21
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.css +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +0 -77
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.css +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js +0 -55
- package/collection/components/widgets/pn-proxio-findprice/data.js +0 -52
- package/collection/components/widgets/pn-proxio-findprice/find-price.stories.js +0 -27
- package/collection/components/widgets/pn-proxio-findprice/img/clouds.svg +0 -5
- package/collection/components/widgets/pn-proxio-findprice/img/large-package.svg +0 -9
- package/collection/components/widgets/pn-proxio-findprice/img/medium-package.svg +0 -9
- package/collection/components/widgets/pn-proxio-findprice/img/postnord-person1.svg +0 -52
- package/collection/components/widgets/pn-proxio-findprice/img/postnord-person2.svg +0 -56
- package/collection/components/widgets/pn-proxio-findprice/img/small-package.svg +0 -23
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.css +0 -9
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +0 -234
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.js +0 -29
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.js +0 -106
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.js +0 -1
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.css +0 -119
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +0 -250
- package/esm/pn-proxio-findprice-result.entry.js +0 -59
- package/esm/pn-proxio-findprice.entry.js +0 -307
- package/esm/pn-titletag.entry.js +0 -20
- package/esm/translations-022fefa0.js +0 -19
- package/esm-es5/pn-marketweb-siteheader-login-button_4.entry.js +0 -1
- package/esm-es5/pn-product-card_3.entry.js +0 -1
- package/esm-es5/pn-proxio-findprice-result.entry.js +0 -1
- package/esm-es5/pn-proxio-findprice.entry.js +0 -1
- package/esm-es5/pn-titletag.entry.js +0 -1
- package/esm-es5/translations-022fefa0.js +0 -1
- package/pn-market-web-components/p-10eafcd7.entry.js +0 -1
- package/pn-market-web-components/p-20be85a1.system.entry.js +0 -1
- package/pn-market-web-components/p-2b4c41aa.system.entry.js +0 -1
- package/pn-market-web-components/p-3969ec4d.entry.js +0 -1
- package/pn-market-web-components/p-499bb3ac.entry.js +0 -1
- package/pn-market-web-components/p-4a03854b.system.entry.js +0 -1
- package/pn-market-web-components/p-557328e3.system.entry.js +0 -1
- package/pn-market-web-components/p-8afa354b.system.entry.js +0 -1
- package/pn-market-web-components/p-951861fa.entry.js +0 -1
- package/pn-market-web-components/p-a120063f.js +0 -1
- package/pn-market-web-components/p-b501b216.system.js +0 -1
- package/pn-market-web-components/p-dd01024a.system.entry.js +0 -1
- package/pn-market-web-components/p-de823255.entry.js +0 -1
- package/pn-market-web-components/p-e397e11b.entry.js +0 -1
- package/pn-market-web-components/p-e4ebf17d.system.entry.js +0 -1
- package/pn-market-web-components/p-e7a1cda9.entry.js +0 -1
- package/pn-market-web-components/p-f58bde56.js +0 -1
- package/pn-market-web-components/p-f782ce94.system.entry.js +0 -1
- package/pn-market-web-components/p-fe95397b.entry.js +0 -1
- package/pn-market-web-components/p-ff83e974.entry.js +0 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.d.ts +0 -10
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.d.ts +0 -6
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.d.ts +0 -22
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.d.ts +0 -51
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.d.ts +0 -106
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.d.ts +0 -39
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice.d.ts +0 -24
- /package/pn-market-web-components/{p-a07906d5.js → p-86b52823.js} +0 -0
- /package/pn-market-web-components/{p-1534926e.system.js → p-bfa7c83f.system.js} +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
pn-proxio-findprice .findprice-form {
|
|
3
|
-
margin: 0em auto 3em auto;
|
|
4
|
-
}
|
|
5
|
-
pn-proxio-findprice .findprice-form-wrapper {
|
|
6
|
-
background-color: #EFFBFF;
|
|
7
|
-
padding: 3.2rem;
|
|
8
|
-
}
|
|
9
|
-
pn-proxio-findprice .sizeTable {
|
|
10
|
-
border-style: none !important;
|
|
11
|
-
border: 0 !important;
|
|
12
|
-
position: relative;
|
|
13
|
-
}
|
|
14
|
-
pn-proxio-findprice .sizeTable > tr td {
|
|
15
|
-
margin-bottom: 1em;
|
|
16
|
-
text-align: center;
|
|
17
|
-
vertical-align: bottom;
|
|
18
|
-
padding-right: 1em;
|
|
19
|
-
padding-top: 1em;
|
|
20
|
-
position: relative;
|
|
21
|
-
z-index: 1;
|
|
22
|
-
}
|
|
23
|
-
pn-proxio-findprice .sizeTable #clouds {
|
|
24
|
-
position: absolute;
|
|
25
|
-
top: 3rem;
|
|
26
|
-
width: 100%;
|
|
27
|
-
}
|
|
28
|
-
pn-proxio-findprice .firstCell {
|
|
29
|
-
margin-right: 0;
|
|
30
|
-
margin-left: auto;
|
|
31
|
-
}
|
|
32
|
-
pn-proxio-findprice [slot=title] {
|
|
33
|
-
margin-bottom: 1rem;
|
|
34
|
-
}
|
|
35
|
-
pn-proxio-findprice h2 {
|
|
36
|
-
text-align: center;
|
|
37
|
-
}
|
|
38
|
-
pn-proxio-findprice .findprice__heading {
|
|
39
|
-
text-align: center;
|
|
40
|
-
line-height: 1.1;
|
|
41
|
-
font-weight: bold;
|
|
42
|
-
color: #000000;
|
|
43
|
-
font-size: 3.2rem;
|
|
44
|
-
font-weight: 700;
|
|
45
|
-
}
|
|
46
|
-
pn-proxio-findprice .findprice__subheading {
|
|
47
|
-
font-size: 2.4rem;
|
|
48
|
-
margin-bottom: 2.4rem;
|
|
49
|
-
}
|
|
50
|
-
pn-proxio-findprice .resultHeading {
|
|
51
|
-
text-align: center;
|
|
52
|
-
font-size: 1.5em;
|
|
53
|
-
line-height: 1.1;
|
|
54
|
-
font-weight: bold;
|
|
55
|
-
margin-bottom: 2em;
|
|
56
|
-
}
|
|
57
|
-
pn-proxio-findprice .sizecategory {
|
|
58
|
-
margin-top: 1em;
|
|
59
|
-
margin-bottom: 3rem;
|
|
60
|
-
font-size: 0.9em;
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: center;
|
|
64
|
-
}
|
|
65
|
-
pn-proxio-findprice .weightoption {
|
|
66
|
-
font-size: 0.9em;
|
|
67
|
-
margin: 0 auto;
|
|
68
|
-
}
|
|
69
|
-
pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content {
|
|
70
|
-
text-align: center;
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-wrap: wrap;
|
|
73
|
-
justify-content: center;
|
|
74
|
-
flex-direction: row;
|
|
75
|
-
}
|
|
76
|
-
pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button {
|
|
77
|
-
width: 7em;
|
|
78
|
-
line-height: 3.3em;
|
|
79
|
-
font-size: 0.9em;
|
|
80
|
-
vertical-align: bottom;
|
|
81
|
-
background: #FFFFFF;
|
|
82
|
-
border-radius: 1rem;
|
|
83
|
-
}
|
|
84
|
-
pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button > label {
|
|
85
|
-
align-content: center;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
color: #000000;
|
|
88
|
-
margin-bottom: 0;
|
|
89
|
-
}
|
|
90
|
-
pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button ::before {
|
|
91
|
-
content: "Max ";
|
|
92
|
-
font-weight: lighter;
|
|
93
|
-
color: #5E554A;
|
|
94
|
-
}
|
|
95
|
-
pn-proxio-findprice .resultlist {
|
|
96
|
-
max-width: 60em;
|
|
97
|
-
margin: 3.2rem auto 3.2rem auto;
|
|
98
|
-
}
|
|
99
|
-
pn-proxio-findprice .servicePoint {
|
|
100
|
-
text-align: center;
|
|
101
|
-
}
|
|
102
|
-
pn-proxio-findprice .servicePoint pn-illustration {
|
|
103
|
-
display: block;
|
|
104
|
-
max-width: 5em;
|
|
105
|
-
max-height: 5em;
|
|
106
|
-
margin: 1.5em auto 0 auto;
|
|
107
|
-
}
|
|
108
|
-
pn-proxio-findprice .servicePoint h3 {
|
|
109
|
-
margin-top: 0.8em;
|
|
110
|
-
margin-bottom: 0.9em;
|
|
111
|
-
}
|
|
112
|
-
pn-proxio-findprice .servicePoint a {
|
|
113
|
-
color: #005D92;
|
|
114
|
-
text-decoration: none;
|
|
115
|
-
}
|
|
116
|
-
pn-proxio-findprice .servicePoint a:hover {
|
|
117
|
-
color: #0D234B;
|
|
118
|
-
text-decoration: underline;
|
|
119
|
-
}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { Component, h, Prop, State, Watch } from "@stencil/core";
|
|
2
|
-
import { translations, markets } from "./pn-proxio-findprice-translations";
|
|
3
|
-
import { MarketWebContextService } from "../../../globals/MarketWebContextService";
|
|
4
|
-
import { weights, sizeCategories } from "./data.js";
|
|
5
|
-
import { FetchHelper } from "../../../globals/FetchHelper";
|
|
6
|
-
import { state } from "./pn-proxio-findprice-store";
|
|
7
|
-
import S from "./img/small-package.svg";
|
|
8
|
-
import M from "./img/medium-package.svg";
|
|
9
|
-
import L from "./img/large-package.svg";
|
|
10
|
-
import person from "./img/postnord-person2.svg";
|
|
11
|
-
import clouds from "./img/clouds.svg";
|
|
12
|
-
export class PnProxioFindPrice {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.endpoint = null;
|
|
15
|
-
this.language = "da";
|
|
16
|
-
this.market = "dk";
|
|
17
|
-
this.cache = false;
|
|
18
|
-
this.filteredItems = [];
|
|
19
|
-
this.weight = { value: 0, name: "" };
|
|
20
|
-
this.weightvalue = 0;
|
|
21
|
-
this.sizecategory = { value: "", name: "", icon: "", unit: "" };
|
|
22
|
-
this.data = { proxioProducts: [] };
|
|
23
|
-
this.fetchHelper = new FetchHelper("proxiopricegroups");
|
|
24
|
-
}
|
|
25
|
-
componentWillLoad() {
|
|
26
|
-
this.setInitialValues().then(() => {
|
|
27
|
-
this.init();
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
async setInitialValues(href = window.location.href) {
|
|
31
|
-
const marketWebContextService = new MarketWebContextService(href);
|
|
32
|
-
const environment = await marketWebContextService.getEnvironmentName();
|
|
33
|
-
if ((!this.endpoint && (environment === null || environment === void 0 ? void 0 : environment.indexOf('local')) === -1)) {
|
|
34
|
-
const market = await marketWebContextService.getMarket();
|
|
35
|
-
this.endpoint = await marketWebContextService.getEndpoint(environment, market);
|
|
36
|
-
}
|
|
37
|
-
if (!this.endpoint) {
|
|
38
|
-
this.endpoint = "";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
init() {
|
|
42
|
-
this.setState();
|
|
43
|
-
this.getDataSource();
|
|
44
|
-
this.fetchData();
|
|
45
|
-
}
|
|
46
|
-
async getDataSource() {
|
|
47
|
-
try {
|
|
48
|
-
//for keeping small value preselected
|
|
49
|
-
this.sizecategory = sizeCategories.filter(x => x.value === "S")[0];
|
|
50
|
-
console.log(this.sizecategory);
|
|
51
|
-
this.filterItems();
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
console.log('Unable to parse data');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
async fetchData() {
|
|
58
|
-
if (!this.market || !this.language) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const endpoint = (this.endpoint.lastIndexOf("/") === this.endpoint.length - 1) ? this.endpoint.substring(0, this.endpoint.length - 1) : this.endpoint;
|
|
62
|
-
const fetchUrl = `${endpoint}/api/proxio/price-list-groups?market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
63
|
-
//const fetchUrl = `http://localhost:51444/api/proxio/price-list-groups?market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
64
|
-
const data = await this.fetchHelper.fetchJson(fetchUrl, {
|
|
65
|
-
'mode': 'cors',
|
|
66
|
-
}, this.cache, this.onFetchData.bind(this));
|
|
67
|
-
if (data) {
|
|
68
|
-
this.data.proxioProducts = data;
|
|
69
|
-
}
|
|
70
|
-
this.filterItems();
|
|
71
|
-
}
|
|
72
|
-
onFetchData(data) {
|
|
73
|
-
this.data = data;
|
|
74
|
-
}
|
|
75
|
-
setState() {
|
|
76
|
-
this.market = "dk";
|
|
77
|
-
if (this.market) {
|
|
78
|
-
state.market = markets[this.market];
|
|
79
|
-
}
|
|
80
|
-
if (this.language && translations[this.language]) {
|
|
81
|
-
state.i18n = translations[this.language];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
filterItems() {
|
|
85
|
-
if (!this.data) {
|
|
86
|
-
console.log('Data has not yet been loaded');
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
console.log("data ", this.data);
|
|
90
|
-
const sizeItemData = this.data.proxioProducts.filter(item => {
|
|
91
|
-
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
92
|
-
return weightGroup.item3.includes(this.sizecategory.value);
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
console.log("sizeItemData ", sizeItemData);
|
|
96
|
-
if (!this.weight) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const comparisonWeight = this.weight.value;
|
|
100
|
-
let weightFilteredData = sizeItemData.filter(item => {
|
|
101
|
-
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
102
|
-
return weightGroup.item1 === comparisonWeight;
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
console.log("weightFilteredData ", weightFilteredData);
|
|
106
|
-
if (weightFilteredData.length === 0 && this.weightvalue !== 0) {
|
|
107
|
-
weightFilteredData = sizeItemData.filter(item => {
|
|
108
|
-
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
109
|
-
return weightGroup.item1 === comparisonWeight;
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
this.filteredItems = weightFilteredData;
|
|
114
|
-
}
|
|
115
|
-
render() {
|
|
116
|
-
return (h("div", { class: "findprice-form" },
|
|
117
|
-
h("div", { class: "findprice-form-wrapper" },
|
|
118
|
-
h("h4", { class: "findprice__heading" }, state.i18n.sizeheading),
|
|
119
|
-
h("div", { class: "sizecategory" },
|
|
120
|
-
h("table", { class: "sizeTable" },
|
|
121
|
-
h("img", { id: "clouds", src: clouds }),
|
|
122
|
-
h("tr", null,
|
|
123
|
-
h("td", null,
|
|
124
|
-
h("img", { class: "firstCell", src: person })),
|
|
125
|
-
h("td", null,
|
|
126
|
-
h("img", { src: S })),
|
|
127
|
-
h("td", null,
|
|
128
|
-
h("img", { src: M })),
|
|
129
|
-
h("td", null,
|
|
130
|
-
h("img", { src: L }))),
|
|
131
|
-
h("tr", null,
|
|
132
|
-
h("td", null),
|
|
133
|
-
sizeCategories.map((sizeCategory) => (h("td", null,
|
|
134
|
-
h("pn-radio-button", { id: 'findpricecategory-' + sizeCategory.value, radioid: sizeCategory.value, value: sizeCategory.value, name: "sizecategory", checked: sizeCategory.value === this.sizecategory.value, onChange: () => {
|
|
135
|
-
this.sizecategory = sizeCategories.filter(x => x.value === sizeCategory.value)[0];
|
|
136
|
-
this.weight = { value: 0, name: "" };
|
|
137
|
-
this.weightvalue = this.weight.value;
|
|
138
|
-
} }))))))),
|
|
139
|
-
h("h4", { class: "findprice__heading findprice__subheading" }, state.i18n.weightheading),
|
|
140
|
-
(this.sizecategory.value && weights[this.sizecategory.unit]) ? (h("div", { class: "weightoption" }, h("div", { class: "weightoption-content" }, weights[this.sizecategory.unit].map((wght) => (h("pn-choice-button", { id: 'findpriceweight-' + wght.value, choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
|
|
141
|
-
this.weight = weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
|
|
142
|
-
this.weightvalue = this.weight.value;
|
|
143
|
-
} }, wght.name)))))) : null),
|
|
144
|
-
(this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" },
|
|
145
|
-
(state.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state.i18n.resultlistheading)) : null,
|
|
146
|
-
this.filteredItems.map((item) => (h("div", null,
|
|
147
|
-
h("pn-proxio-findprice-result", { activeweight: this.weight.value, item: item })))))) : null));
|
|
148
|
-
}
|
|
149
|
-
static get is() { return "pn-proxio-findprice"; }
|
|
150
|
-
static get originalStyleUrls() { return {
|
|
151
|
-
"$": ["pn-proxio-findprice.scss"]
|
|
152
|
-
}; }
|
|
153
|
-
static get styleUrls() { return {
|
|
154
|
-
"$": ["pn-proxio-findprice.css"]
|
|
155
|
-
}; }
|
|
156
|
-
static get properties() { return {
|
|
157
|
-
"endpoint": {
|
|
158
|
-
"type": "string",
|
|
159
|
-
"mutable": true,
|
|
160
|
-
"complexType": {
|
|
161
|
-
"original": "string",
|
|
162
|
-
"resolved": "string",
|
|
163
|
-
"references": {}
|
|
164
|
-
},
|
|
165
|
-
"required": false,
|
|
166
|
-
"optional": false,
|
|
167
|
-
"docs": {
|
|
168
|
-
"tags": [],
|
|
169
|
-
"text": ""
|
|
170
|
-
},
|
|
171
|
-
"attribute": "endpoint",
|
|
172
|
-
"reflect": false,
|
|
173
|
-
"defaultValue": "null"
|
|
174
|
-
},
|
|
175
|
-
"language": {
|
|
176
|
-
"type": "string",
|
|
177
|
-
"mutable": true,
|
|
178
|
-
"complexType": {
|
|
179
|
-
"original": "string",
|
|
180
|
-
"resolved": "string",
|
|
181
|
-
"references": {}
|
|
182
|
-
},
|
|
183
|
-
"required": false,
|
|
184
|
-
"optional": false,
|
|
185
|
-
"docs": {
|
|
186
|
-
"tags": [],
|
|
187
|
-
"text": ""
|
|
188
|
-
},
|
|
189
|
-
"attribute": "language",
|
|
190
|
-
"reflect": false,
|
|
191
|
-
"defaultValue": "\"da\""
|
|
192
|
-
},
|
|
193
|
-
"market": {
|
|
194
|
-
"type": "string",
|
|
195
|
-
"mutable": true,
|
|
196
|
-
"complexType": {
|
|
197
|
-
"original": "string",
|
|
198
|
-
"resolved": "string",
|
|
199
|
-
"references": {}
|
|
200
|
-
},
|
|
201
|
-
"required": false,
|
|
202
|
-
"optional": false,
|
|
203
|
-
"docs": {
|
|
204
|
-
"tags": [],
|
|
205
|
-
"text": ""
|
|
206
|
-
},
|
|
207
|
-
"attribute": "market",
|
|
208
|
-
"reflect": false,
|
|
209
|
-
"defaultValue": "\"dk\""
|
|
210
|
-
},
|
|
211
|
-
"cache": {
|
|
212
|
-
"type": "boolean",
|
|
213
|
-
"mutable": false,
|
|
214
|
-
"complexType": {
|
|
215
|
-
"original": "boolean",
|
|
216
|
-
"resolved": "boolean",
|
|
217
|
-
"references": {}
|
|
218
|
-
},
|
|
219
|
-
"required": false,
|
|
220
|
-
"optional": false,
|
|
221
|
-
"docs": {
|
|
222
|
-
"tags": [],
|
|
223
|
-
"text": ""
|
|
224
|
-
},
|
|
225
|
-
"attribute": "cache",
|
|
226
|
-
"reflect": false,
|
|
227
|
-
"defaultValue": "false"
|
|
228
|
-
}
|
|
229
|
-
}; }
|
|
230
|
-
static get states() { return {
|
|
231
|
-
"filteredItems": {},
|
|
232
|
-
"weight": {},
|
|
233
|
-
"weightvalue": {},
|
|
234
|
-
"sizecategory": {},
|
|
235
|
-
"data": {}
|
|
236
|
-
}; }
|
|
237
|
-
static get watchers() { return [{
|
|
238
|
-
"propName": "market",
|
|
239
|
-
"methodName": "setState"
|
|
240
|
-
}, {
|
|
241
|
-
"propName": "language",
|
|
242
|
-
"methodName": "setState"
|
|
243
|
-
}, {
|
|
244
|
-
"propName": "sizecategory",
|
|
245
|
-
"methodName": "filterItems"
|
|
246
|
-
}, {
|
|
247
|
-
"propName": "weightvalue",
|
|
248
|
-
"methodName": "filterItems"
|
|
249
|
-
}]; }
|
|
250
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host } from './index-5397620b.js';
|
|
2
|
-
import { t as translations } from './translations-022fefa0.js';
|
|
3
|
-
|
|
4
|
-
const pnProxioFindpriceResultCss = "pn-proxio-find-price-result .test{margin:3em 0}.resultcontent{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";
|
|
5
|
-
|
|
6
|
-
let PnProxioFindPriceResult = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.item = null;
|
|
10
|
-
this.activeweight = null;
|
|
11
|
-
this.shownitems = [];
|
|
12
|
-
this.description = [];
|
|
13
|
-
this.showMeasurement = false;
|
|
14
|
-
this.weightText = "";
|
|
15
|
-
this.linkId = '';
|
|
16
|
-
this.shopLabel = '';
|
|
17
|
-
this.shopUrl = '';
|
|
18
|
-
this.shopId = '';
|
|
19
|
-
this.i18n = translations["sv"];
|
|
20
|
-
}
|
|
21
|
-
componentWillLoad() {
|
|
22
|
-
this.composeItems();
|
|
23
|
-
}
|
|
24
|
-
composeItems() {
|
|
25
|
-
this.shownitems = [this.item];
|
|
26
|
-
}
|
|
27
|
-
getPriceString(product) {
|
|
28
|
-
var _a;
|
|
29
|
-
if (product.productWeightGroupList) {
|
|
30
|
-
const activeIndex = product.productWeightGroupList.findIndex((item) => item.item1 === this.activeweight);
|
|
31
|
-
let price = product.weightAndPriceList ? (_a = product === null || product === void 0 ? void 0 : product.weightAndPriceList[activeIndex]) === null || _a === void 0 ? void 0 : _a.item2 : '';
|
|
32
|
-
return price ? this.i18n.from + price : '';
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
getProductLink(product, productWeightGroupList) {
|
|
37
|
-
var _a;
|
|
38
|
-
if (product.productWeightGroupList) {
|
|
39
|
-
const activeIndex = product.productWeightGroupList.findIndex((item) => item.item1 === this.activeweight);
|
|
40
|
-
let productId = (_a = productWeightGroupList[activeIndex]) === null || _a === void 0 ? void 0 : _a.item2;
|
|
41
|
-
let productLink = product.productLink ? product === null || product === void 0 ? void 0 : product.productLink : '';
|
|
42
|
-
return productLink ? productLink + (productId ? "?productId=" + productId : '') : '';
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return (h(Host, null, h("pn-proxio-productcard", null, h("pn-illustration", { slot: "illustrationmobile", illustration: this.item.proxioProduct.productIcon }), h("h2", { slot: "title" }, this.item.proxioProduct.productTitle), h("pn-proxio-productcard-description", { slot: "description", heading: this.item.proxioProduct.productPreamble, highlight: this.item.proxioProduct.deliveryDateInformation, list: this.item.proxioProduct.productDescriptionBulletListItems }), h("div", { slot: "information" }, h("pn-proxio-productcard-information", { label: this.i18n.labelMaxDimensions, information: this.item.proxioProduct.productPackageDimensionsList }), h("pn-proxio-productcard-information", { label: this.i18n.labelMaxDimensionsRoll, information: this.item.proxioProduct.productRollDimensionsList })), h("div", { slot: "bottomtags" }, this.item.proxioProduct.usp1 ?
|
|
48
|
-
(h("pn-titletag", { color: "gray50" }, this.item.proxioProduct.usp1)) : (null), this.item.proxioProduct.usp2 ?
|
|
49
|
-
(h("pn-titletag", { color: "gray50" }, this.item.proxioProduct.usp2)) : (null), this.item.proxioProduct.usp3 ?
|
|
50
|
-
(h("pn-titletag", { color: "gray50" }, this.item.proxioProduct.usp3)) : (null)), h("pn-illustration", { slot: "illustration", illustration: this.item.proxioProduct.productIcon }), h("div", { slot: "pricelink" }, h("pn-proxio-productcard-pricelink", { price: this.getPriceString(this.item.proxioProduct), link: this.getProductLink(this.item.proxioProduct, this.item.proxioProduct.productWeightGroupList), linktext: this.item.proxioProduct.productLinkText }), this.item.relatedProxioProducts ? (this.item.relatedProxioProducts.map((product) => (h("pn-proxio-productcard-pricelink", { price: this.getPriceString(product), link: product.productLink, linktext: product.productLinkText })))) : (null)))));
|
|
51
|
-
}
|
|
52
|
-
static get watchers() { return {
|
|
53
|
-
"item": ["composeItems"],
|
|
54
|
-
"activeweight": ["getPriceString", "getProductLink"]
|
|
55
|
-
}; }
|
|
56
|
-
};
|
|
57
|
-
PnProxioFindPriceResult.style = pnProxioFindpriceResultCss;
|
|
58
|
-
|
|
59
|
-
export { PnProxioFindPriceResult as pn_proxio_findprice_result };
|