@postnord/pn-marketweb-components 2.1.0 → 2.1.1
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-b5ef4f7c.js → data-4fa6b08d.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-0b8c195c.js → pn-find-price-store-a91ce3f6.js} +2 -2
- package/cjs/pn-find-price.cjs.entry.js +7 -7
- package/cjs/pn-language-selector_9.cjs.entry.js +29 -19
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/{pn-marketweb-siteheader-login-links_2.cjs.entry.js → pn-marketweb-siteheader-login-button_4.cjs.entry.js} +67 -18
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +7 -42
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +2 -2
- package/cjs/{pn-product-card_4.cjs.entry.js → pn-product-card_3.cjs.entry.js} +0 -18
- package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
- package/cjs/pn-proxio-findprice-result.cjs.entry.js +63 -0
- package/cjs/pn-proxio-findprice.cjs.entry.js +311 -0
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +6 -22
- package/cjs/pn-titletag.cjs.entry.js +24 -0
- package/cjs/translations-585711ff.js +21 -0
- package/collection/collection-manifest.json +4 -0
- 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 +77 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +25 -13
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +14 -45
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +13 -23
- 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 +55 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +56 -25
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css +26 -0
- 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 +4 -5
- 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-findprice/data.js +52 -0
- package/collection/components/widgets/pn-proxio-findprice/find-price.stories.js +27 -0
- package/collection/components/widgets/pn-proxio-findprice/img/clouds.svg +5 -0
- package/collection/components/widgets/pn-proxio-findprice/img/large-package.svg +9 -0
- package/collection/components/widgets/pn-proxio-findprice/img/medium-package.svg +9 -0
- package/collection/components/widgets/pn-proxio-findprice/img/postnord-person1.svg +52 -0
- package/collection/components/widgets/pn-proxio-findprice/img/postnord-person2.svg +56 -0
- package/collection/components/widgets/pn-proxio-findprice/img/small-package.svg +23 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.css +9 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +234 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.js +29 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.js +106 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.js +1 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.css +119 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +250 -0
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +3 -0
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +1 -0
- package/collection/globals/MarketWebLoginManager.js +1 -1
- package/custom-elements/index.d.ts +24 -0
- package/custom-elements/index.js +634 -242
- package/esm/{data-9c9c5f41.js → data-059c2a58.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-b4556c9b.js → pn-find-price-store-bde5071d.js} +2 -2
- package/esm/pn-find-price.entry.js +7 -7
- package/esm/pn-language-selector_9.entry.js +29 -19
- package/esm/pn-market-web-components.js +1 -1
- package/esm/{pn-marketweb-siteheader-login-links_2.entry.js → pn-marketweb-siteheader-login-button_4.entry.js} +66 -19
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js +7 -42
- package/esm/pn-marketweb-siteheader.entry.js +2 -2
- package/esm/{pn-product-card_4.entry.js → pn-product-card_3.entry.js} +2 -19
- package/esm/pn-product-pricelist.entry.js +1 -1
- package/esm/pn-proxio-findprice-result.entry.js +59 -0
- package/esm/pn-proxio-findprice.entry.js +307 -0
- package/esm/pn-proxio-pricegroup.entry.js +3 -19
- package/esm/pn-titletag.entry.js +20 -0
- package/esm/translations-022fefa0.js +19 -0
- package/esm-es5/{data-9c9c5f41.js → data-059c2a58.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-b4556c9b.js → pn-find-price-store-bde5071d.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-button_4.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_3.entry.js +1 -0
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-proxio-findprice-result.entry.js +1 -0
- package/esm-es5/pn-proxio-findprice.entry.js +1 -0
- package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
- package/esm-es5/pn-titletag.entry.js +1 -0
- package/esm-es5/translations-022fefa0.js +1 -0
- package/package.json +1 -1
- package/pn-market-web-components/p-10eafcd7.entry.js +1 -0
- package/pn-market-web-components/p-20be85a1.system.entry.js +1 -0
- package/pn-market-web-components/p-2b4c41aa.system.entry.js +1 -0
- package/pn-market-web-components/{p-37017f68.system.js → p-3738a2df.system.js} +1 -1
- package/pn-market-web-components/p-3969ec4d.entry.js +1 -0
- package/pn-market-web-components/p-499bb3ac.entry.js +1 -0
- package/pn-market-web-components/p-4a03854b.system.entry.js +1 -0
- package/pn-market-web-components/p-557328e3.system.entry.js +1 -0
- package/pn-market-web-components/{p-ac0e3c22.system.entry.js → p-59be826b.system.entry.js} +1 -1
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/{p-0b0727dc.entry.js → p-70b360dd.entry.js} +1 -1
- package/pn-market-web-components/{p-d0653c80.system.entry.js → p-7f9c643c.system.entry.js} +1 -1
- package/pn-market-web-components/p-8afa354b.system.entry.js +1 -0
- package/pn-market-web-components/{p-aab2e28f.entry.js → p-8b684578.entry.js} +1 -1
- package/pn-market-web-components/p-951861fa.entry.js +1 -0
- package/pn-market-web-components/{p-736e5b84.system.entry.js → p-98a7ddd1.system.entry.js} +1 -1
- package/pn-market-web-components/p-a120063f.js +1 -0
- package/pn-market-web-components/p-b501b216.system.js +1 -0
- package/pn-market-web-components/{p-3ae38e63.entry.js → p-b9a84e67.entry.js} +1 -1
- package/pn-market-web-components/p-dd01024a.system.entry.js +1 -0
- package/pn-market-web-components/p-de823255.entry.js +1 -0
- package/pn-market-web-components/p-e397e11b.entry.js +1 -0
- package/pn-market-web-components/p-e4ebf17d.system.entry.js +1 -0
- package/pn-market-web-components/p-e7a1cda9.entry.js +1 -0
- package/pn-market-web-components/{p-e4a4e68f.system.entry.js → p-ecdf2b69.system.entry.js} +1 -1
- package/pn-market-web-components/p-f58bde56.js +1 -0
- package/pn-market-web-components/p-f782ce94.system.entry.js +1 -0
- package/pn-market-web-components/p-fe95397b.entry.js +1 -0
- package/pn-market-web-components/p-ff83e974.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-button.d.ts +10 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.d.ts +1 -2
- 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-mypage-button.d.ts +6 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +3 -2
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +10 -8
- 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-findprice/pn-proxio-findprice-result.d.ts +22 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.d.ts +51 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.d.ts +106 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.d.ts +39 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice.d.ts +24 -0
- package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +1 -1
- package/types/components.d.ts +85 -1
- package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +0 -1
- package/esm-es5/pn-product-card_4.entry.js +0 -1
- package/pn-market-web-components/p-022d9a78.entry.js +0 -1
- package/pn-market-web-components/p-198d9c77.system.entry.js +0 -1
- package/pn-market-web-components/p-332e9005.entry.js +0 -1
- package/pn-market-web-components/p-3c0d63fb.system.entry.js +0 -1
- package/pn-market-web-components/p-63c30175.entry.js +0 -1
- package/pn-market-web-components/p-6b33db5b.system.entry.js +0 -1
- package/pn-market-web-components/p-77557da8.entry.js +0 -1
- package/pn-market-web-components/p-92fd28e6.entry.js +0 -1
- package/pn-market-web-components/p-a119cb8e.entry.js +0 -1
- package/pn-market-web-components/p-c4254e9e.js +0 -1
- package/pn-market-web-components/p-d542a52b.system.entry.js +0 -1
- package/pn-market-web-components/p-eb662559.system.entry.js +0 -1
- /package/pn-market-web-components/{p-bfa7c83f.system.js → p-1534926e.system.js} +0 -0
- /package/pn-market-web-components/{p-86b52823.js → p-a07906d5.js} +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export const translations = {
|
|
2
|
+
'sv': {
|
|
3
|
+
'componentheading': 'Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?',
|
|
4
|
+
'deliveryscopeheading': 'Endast leveranser inom Sverige',
|
|
5
|
+
'resultlistheading': 'Några bra alternativ för dig',
|
|
6
|
+
'sizeheading': 'Uppskatta storleken på din försändelse',
|
|
7
|
+
'weightheading': 'Uppskatta vikten på din försändelse',
|
|
8
|
+
'weightlabel': 'Vikt',
|
|
9
|
+
'maxweightlabel': 'Maxvikt',
|
|
10
|
+
'maxmeasurementlabel': 'Maxvolym',
|
|
11
|
+
'senddirectcta': 'Köp online',
|
|
12
|
+
'stampshopcta': 'Till butiken',
|
|
13
|
+
'message': '*Vid köp hos valfritt ombud',
|
|
14
|
+
'servicePointHeader': 'Eller hitta närmaste serviceställe',
|
|
15
|
+
'servicePointLink': 'Hitta Serviceställe',
|
|
16
|
+
'realPostcard': 'Köp Riktiga Vykort',
|
|
17
|
+
'realPostcardMobile': 'Ladda ner appen',
|
|
18
|
+
'ombudHeader': 'Köp via ombud',
|
|
19
|
+
"from": "Från ",
|
|
20
|
+
"labelMaxDimensionsRoll": "Rulle",
|
|
21
|
+
"labelMaxDimensions": "Maxmått"
|
|
22
|
+
},
|
|
23
|
+
'en': {
|
|
24
|
+
'componentheading': 'Our prices and terms and conditions for domestic shipments for you as a direct paying customer',
|
|
25
|
+
'deliveryscopeheading': 'Deliveries within Sweden only',
|
|
26
|
+
'resultlistheading': 'Some suitable options for you',
|
|
27
|
+
'sizeheading': 'Estimate the size of your shipment',
|
|
28
|
+
'weightheading': 'Estimate the weight of your shipment',
|
|
29
|
+
'weightlabel': 'Weight',
|
|
30
|
+
'maxweightlabel': 'Max weight',
|
|
31
|
+
'maxmeasurementlabel': 'Maximum measurement',
|
|
32
|
+
'senddirectcta': 'Buy Online',
|
|
33
|
+
'stampshopcta': 'To the Store',
|
|
34
|
+
'message': 'When buying from any agent',
|
|
35
|
+
'servicePointHeader': 'Find service point',
|
|
36
|
+
'servicePointLink': 'Find service point',
|
|
37
|
+
'realPostcard': 'Buy Postcards',
|
|
38
|
+
'realPostcardMobile': 'Download the app',
|
|
39
|
+
'ombudHeader': 'Purchase by agent',
|
|
40
|
+
"from": "From ",
|
|
41
|
+
"labelMaxDimensionsRoll": "Roll",
|
|
42
|
+
"labelMaxDimensions": "Maximum dimensions"
|
|
43
|
+
},
|
|
44
|
+
'da': {
|
|
45
|
+
'componentheading': 'Vad vill du skicka?',
|
|
46
|
+
'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
|
|
47
|
+
'resultlistheading': 'Nogle passende muligheder for dig',
|
|
48
|
+
'sizeheading': 'Anslå størrelsen på din forsendelse',
|
|
49
|
+
'weightheading': 'Anslå vægten af din forsendelse',
|
|
50
|
+
'weightlabel': 'Vægt',
|
|
51
|
+
'maxweightlabel': 'Max vægt',
|
|
52
|
+
'maxmeasurementlabel': 'Maks. Volumen',
|
|
53
|
+
'senddirectcta': 'Køb Online',
|
|
54
|
+
'stampshopcta': 'Til butikken',
|
|
55
|
+
'message': 'When buying from any agent',
|
|
56
|
+
'servicePointHeader': 'Find nærmeste servicested',
|
|
57
|
+
'servicePointLink': 'Find nærmeste servicested',
|
|
58
|
+
'realPostcard': 'Køb Riktiga Vykort',
|
|
59
|
+
'ombudHeader': 'Køb af agent',
|
|
60
|
+
"from": "Från ",
|
|
61
|
+
"labelMaxDimensionsRoll": "Rulle",
|
|
62
|
+
"labelMaxDimensions": "Maks måle"
|
|
63
|
+
},
|
|
64
|
+
'no': {
|
|
65
|
+
'componentheading': 'Vad vill du skicka?',
|
|
66
|
+
'deliveryscopeheading': 'Kun leveranser innen Sverige',
|
|
67
|
+
'resultlistheading': 'Some suitable options for you',
|
|
68
|
+
'weightlabel': 'Vekt',
|
|
69
|
+
'maxweightlabel': 'Maks vekt',
|
|
70
|
+
'maxmeasurementlabel': 'Maks volum',
|
|
71
|
+
'senddirectcta': 'Buy shipping in Send Direct',
|
|
72
|
+
'stampshopcta': 'Order home stamps from the webshop',
|
|
73
|
+
},
|
|
74
|
+
'fi': {
|
|
75
|
+
'componentheading': 'Vad vill du skicka?',
|
|
76
|
+
'deliveryscopeheading': 'Toimitukset vain Ruotsin sisällä',
|
|
77
|
+
'resultlistheading': 'Some suitable options for you',
|
|
78
|
+
'weightlabel': 'Paino',
|
|
79
|
+
'maxweightlabel': 'Max paino',
|
|
80
|
+
'maxmeasurementlabel': 'Max äänenvoimakkuus',
|
|
81
|
+
'senddirectcta': 'Buy shipping in Send Direct',
|
|
82
|
+
'stampshopcta': 'Order home stamps from the webshop',
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
export const markets = {
|
|
86
|
+
'se': {
|
|
87
|
+
"currency": "kr",
|
|
88
|
+
"country": "Sweden",
|
|
89
|
+
"servicePoint": "https://www.postnord.se/vara-verktyg/sok-brevlada-eller-servicestalle",
|
|
90
|
+
},
|
|
91
|
+
'dk': {
|
|
92
|
+
"currency": "dk",
|
|
93
|
+
"country": "Denmark",
|
|
94
|
+
"servicePoint": "https://www.postnord.dk/varktojer/find-os",
|
|
95
|
+
},
|
|
96
|
+
'fi': {
|
|
97
|
+
"currency": " €",
|
|
98
|
+
"country": "Finland",
|
|
99
|
+
"servicePoint": "",
|
|
100
|
+
},
|
|
101
|
+
'no': {
|
|
102
|
+
"currency": "kr",
|
|
103
|
+
"country": "Norway",
|
|
104
|
+
"servicePoint": "",
|
|
105
|
+
}
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
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
|
+
}
|
|
@@ -14,6 +14,9 @@ pn-proxio-pricegroup div.weightvaluecontainer {
|
|
|
14
14
|
pn-proxio-pricegroup div.weightvaluecontainer pn-button {
|
|
15
15
|
transform: translateY(-0.4rem);
|
|
16
16
|
}
|
|
17
|
+
pn-proxio-pricegroup div.weightvaluecontainer pn-button button::before {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
17
20
|
pn-proxio-pricegroup div.weightradios {
|
|
18
21
|
display: flex;
|
|
19
22
|
flex-direction: row;
|
|
@@ -42,6 +42,7 @@ export class PnProxioPricegroup {
|
|
|
42
42
|
}
|
|
43
43
|
const endpoint = (this.endpoint.lastIndexOf("/") === this.endpoint.length - 1) ? this.endpoint.substring(0, this.endpoint.length - 1) : this.endpoint;
|
|
44
44
|
const fetchUrl = `${endpoint}/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
45
|
+
//const fetchUrl = `http://localhost:51444/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
45
46
|
const data = await this.fetchHelper.fetchJson(fetchUrl, {
|
|
46
47
|
'mode': 'cors',
|
|
47
48
|
}, this.cache, this.onFetchData.bind(this));
|
|
@@ -332,7 +332,7 @@ class MarketWebLoginManager {
|
|
|
332
332
|
getBaseUrl() {
|
|
333
333
|
const atEnvironments = ["localhost", "integration.", 'local.'];
|
|
334
334
|
let useATEnv = atEnvironments.filter(x => this.endpoint.indexOf(x) !== -1).length > 0;
|
|
335
|
-
if (
|
|
335
|
+
if (['devportal.postnord.com', 'atportal.postnord.com'].indexOf(window.location.hostname) !== -1) {
|
|
336
336
|
useATEnv = true;
|
|
337
337
|
}
|
|
338
338
|
if (useATEnv) {
|
|
@@ -152,6 +152,12 @@ export const PnMarketwebSiteheaderLogin: {
|
|
|
152
152
|
new (): PnMarketwebSiteheaderLogin;
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
+
interface PnMarketwebSiteheaderLoginButton extends Components.PnMarketwebSiteheaderLoginButton, HTMLElement {}
|
|
156
|
+
export const PnMarketwebSiteheaderLoginButton: {
|
|
157
|
+
prototype: PnMarketwebSiteheaderLoginButton;
|
|
158
|
+
new (): PnMarketwebSiteheaderLoginButton;
|
|
159
|
+
};
|
|
160
|
+
|
|
155
161
|
interface PnMarketwebSiteheaderLoginLinklist extends Components.PnMarketwebSiteheaderLoginLinklist, HTMLElement {}
|
|
156
162
|
export const PnMarketwebSiteheaderLoginLinklist: {
|
|
157
163
|
prototype: PnMarketwebSiteheaderLoginLinklist;
|
|
@@ -164,6 +170,12 @@ export const PnMarketwebSiteheaderLoginLinks: {
|
|
|
164
170
|
new (): PnMarketwebSiteheaderLoginLinks;
|
|
165
171
|
};
|
|
166
172
|
|
|
173
|
+
interface PnMarketwebSiteheaderLoginMypageButton extends Components.PnMarketwebSiteheaderLoginMypageButton, HTMLElement {}
|
|
174
|
+
export const PnMarketwebSiteheaderLoginMypageButton: {
|
|
175
|
+
prototype: PnMarketwebSiteheaderLoginMypageButton;
|
|
176
|
+
new (): PnMarketwebSiteheaderLoginMypageButton;
|
|
177
|
+
};
|
|
178
|
+
|
|
167
179
|
interface PnMarketwebSiteheaderLoginProfileselection extends Components.PnMarketwebSiteheaderLoginProfileselection, HTMLElement {}
|
|
168
180
|
export const PnMarketwebSiteheaderLoginProfileselection: {
|
|
169
181
|
prototype: PnMarketwebSiteheaderLoginProfileselection;
|
|
@@ -272,6 +284,18 @@ export const PnProfileSelectorOption: {
|
|
|
272
284
|
new (): PnProfileSelectorOption;
|
|
273
285
|
};
|
|
274
286
|
|
|
287
|
+
interface PnProxioFindprice extends Components.PnProxioFindprice, HTMLElement {}
|
|
288
|
+
export const PnProxioFindprice: {
|
|
289
|
+
prototype: PnProxioFindprice;
|
|
290
|
+
new (): PnProxioFindprice;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
interface PnProxioFindpriceResult extends Components.PnProxioFindpriceResult, HTMLElement {}
|
|
294
|
+
export const PnProxioFindpriceResult: {
|
|
295
|
+
prototype: PnProxioFindpriceResult;
|
|
296
|
+
new (): PnProxioFindpriceResult;
|
|
297
|
+
};
|
|
298
|
+
|
|
275
299
|
interface PnProxioPricegroup extends Components.PnProxioPricegroup, HTMLElement {}
|
|
276
300
|
export const PnProxioPricegroup: {
|
|
277
301
|
prototype: PnProxioPricegroup;
|