@postnord/pn-marketweb-components 2.0.150-test → 2.0.150-test2
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 +5 -2
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/{pn-marketweb-siteheader-login-button_3.cjs.entry.js → pn-marketweb-siteheader-login-button_4.cjs.entry.js} +49 -32
- 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 +3 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.css +0 -3
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +42 -34
- 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 +25 -4
- 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 +105 -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 +18 -0
- package/custom-elements/index.js +592 -241
- 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 +5 -2
- package/esm/pn-market-web-components.js +1 -1
- package/esm/{pn-marketweb-siteheader-login-button_3.entry.js → pn-marketweb-siteheader-login-button_4.entry.js} +49 -33
- 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-27bcc4a1.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-5882d613.entry.js → p-70b360dd.entry.js} +1 -1
- package/pn-market-web-components/{p-d11a5fbb.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-e0b034c2.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-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 +5 -4
- 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 +1 -0
- 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 +72 -5
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/esm-es5/pn-marketweb-siteheader-login-button_3.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-4a026c9d.system.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-8a05dbb6.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-bfa7c83f.system.js → p-1534926e.system.js} +0 -0
- /package/pn-market-web-components/{p-86b52823.js → p-a07906d5.js} +0 -0
|
@@ -4,26 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e3e27c79.js');
|
|
6
6
|
const MarketWebContextService = require('./MarketWebContextService-392b4585.js');
|
|
7
|
+
const translations = require('./translations-585711ff.js');
|
|
7
8
|
|
|
8
|
-
const
|
|
9
|
-
'sv': {
|
|
10
|
-
"from": "Från ",
|
|
11
|
-
"labelMaxDimensionsRoll": "Rulle",
|
|
12
|
-
"labelMaxDimensions": "Maxmått"
|
|
13
|
-
},
|
|
14
|
-
'da': {
|
|
15
|
-
"from": "Från ",
|
|
16
|
-
"labelMaxDimensionsRoll": "Rulle",
|
|
17
|
-
"labelMaxDimensions": "Maks måle"
|
|
18
|
-
},
|
|
19
|
-
'en': {
|
|
20
|
-
"from": "From ",
|
|
21
|
-
"labelMaxDimensionsRoll": "Roll",
|
|
22
|
-
"labelMaxDimensions": "Maximum dimensions"
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const 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}";
|
|
9
|
+
const 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.weightvaluecontainer pn-button button::before{display:none}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}";
|
|
27
10
|
|
|
28
11
|
let PnProxioPricegroup = class {
|
|
29
12
|
constructor(hostRef) {
|
|
@@ -37,7 +20,7 @@ let PnProxioPricegroup = class {
|
|
|
37
20
|
this.cache = true;
|
|
38
21
|
this.activeWeightIndex = 0;
|
|
39
22
|
this.data = null;
|
|
40
|
-
this.i18n = translations["sv"];
|
|
23
|
+
this.i18n = translations.translations["sv"];
|
|
41
24
|
this.fetchHelper = new MarketWebContextService.FetchHelper("proxiopricegroup");
|
|
42
25
|
}
|
|
43
26
|
componentWillLoad() {
|
|
@@ -66,6 +49,7 @@ let PnProxioPricegroup = class {
|
|
|
66
49
|
}
|
|
67
50
|
const endpoint = (this.endpoint.lastIndexOf("/") === this.endpoint.length - 1) ? this.endpoint.substring(0, this.endpoint.length - 1) : this.endpoint;
|
|
68
51
|
const fetchUrl = `${endpoint}/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
52
|
+
//const fetchUrl = `http://localhost:51444/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
69
53
|
const data = await this.fetchHelper.fetchJson(fetchUrl, {
|
|
70
54
|
'mode': 'cors',
|
|
71
55
|
}, this.cache, this.onFetchData.bind(this));
|
|
@@ -85,8 +69,8 @@ let PnProxioPricegroup = class {
|
|
|
85
69
|
this.activeWeightIndex = weightIndex;
|
|
86
70
|
}
|
|
87
71
|
setLanguage() {
|
|
88
|
-
if (translations[this.language]) {
|
|
89
|
-
this.i18n = translations[this.language];
|
|
72
|
+
if (translations.translations[this.language]) {
|
|
73
|
+
this.i18n = translations.translations[this.language];
|
|
90
74
|
}
|
|
91
75
|
}
|
|
92
76
|
getPriceString(product) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3e27c79.js');
|
|
6
|
+
|
|
7
|
+
const pnTitletagCss = "pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;min-height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700],pn-titletag[color=green]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700],pn-titletag[color=blue]{background:#E0F8FF;color:#005D92}pn-titletag[color=coral700],pn-titletag[color=coral]{background:#FDEFEE;color:#9B1C2E}pn-titletag[color=gray900],pn-titletag[color=gray],pn-titletag[color=grey]{background:#D3CECB;color:#2D2013}pn-titletag[color=gray50],pn-titletag[color=lightgray],pn-titletag[color=lightgrey]{background:#F3F2F2;color:#2D2013}";
|
|
8
|
+
|
|
9
|
+
let PnTiletag = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/** Icon of the tag */
|
|
13
|
+
this.icon = null;
|
|
14
|
+
/** Icon of the tag */
|
|
15
|
+
this.color = "green700";
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (index.h(index.Host, null, index.h("slot", null), this.icon ? (index.h("pn-icon", { symbol: this.icon, small: "false", color: this.color })) : null));
|
|
19
|
+
}
|
|
20
|
+
get hostElement() { return index.getElement(this); }
|
|
21
|
+
};
|
|
22
|
+
PnTiletag.style = pnTitletagCss;
|
|
23
|
+
|
|
24
|
+
exports.pn_titletag = PnTiletag;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const translations = {
|
|
4
|
+
'sv': {
|
|
5
|
+
"from": "Från ",
|
|
6
|
+
"labelMaxDimensionsRoll": "Rulle",
|
|
7
|
+
"labelMaxDimensions": "Maxmått"
|
|
8
|
+
},
|
|
9
|
+
'da': {
|
|
10
|
+
"from": "Från ",
|
|
11
|
+
"labelMaxDimensionsRoll": "Rulle",
|
|
12
|
+
"labelMaxDimensions": "Maks måle"
|
|
13
|
+
},
|
|
14
|
+
'en': {
|
|
15
|
+
"from": "From ",
|
|
16
|
+
"labelMaxDimensionsRoll": "Roll",
|
|
17
|
+
"labelMaxDimensions": "Maximum dimensions"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.translations = translations;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js",
|
|
21
21
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js",
|
|
22
22
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js",
|
|
23
|
+
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js",
|
|
23
24
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js",
|
|
24
25
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js",
|
|
25
26
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js",
|
|
@@ -61,6 +62,8 @@
|
|
|
61
62
|
"./components/widgets/pn-product-tile/pn-product-tile-info.js",
|
|
62
63
|
"./components/widgets/pn-product-tile/pn-product-tile-price.js",
|
|
63
64
|
"./components/widgets/pn-product-tile/pn-product-tile.js",
|
|
65
|
+
"./components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js",
|
|
66
|
+
"./components/widgets/pn-proxio-findprice/pn-proxio-findprice.js",
|
|
64
67
|
"./components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js",
|
|
65
68
|
"./components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js",
|
|
66
69
|
"./components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js",
|
|
@@ -1,23 +1,47 @@
|
|
|
1
1
|
import { Component, Element, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
const LoginURL = {
|
|
3
|
+
at: 'https://atportal.postnord.com/api/unified-login/backend/authorization?redirectionUrl=',
|
|
4
|
+
prod: 'https://portal.postnord.com/api/unified-login/backend/authorization?redirectionUrl=',
|
|
5
|
+
};
|
|
6
|
+
const staging = ['localhost', 'integration.postnord.com', 'atportal.postnord.com', 'devportal.postnord.com'];
|
|
7
|
+
//om staging "atportal.postnord.com" annars "portal.postnord.com" för login
|
|
8
|
+
/*
|
|
9
|
+
|
|
10
|
+
1. Check if we are on a market website domain. If so, use a relative /login link
|
|
11
|
+
|
|
12
|
+
2. Check if the site is a “AT”/dev/test site. If so, use the atportal.postnord.com domain for the unified login endpoint
|
|
13
|
+
|
|
14
|
+
3. Else use the portal.postnord.com for the unified login endpoint
|
|
15
|
+
|
|
16
|
+
*/
|
|
2
17
|
export class PnMarketwebSiteheaderLoginButton {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
console.log('base: ', window.location.origin);
|
|
6
|
-
if (base.includes('portal')) {
|
|
7
|
-
return base.concat(`/api/unified-login/backend/authorization?redirectionUrl=${window.location.href}`);
|
|
8
|
-
}
|
|
9
|
-
return base.concat(`/login?returnUrl=${window.location.href}`);
|
|
18
|
+
constructor() {
|
|
19
|
+
this.label = 'Log in';
|
|
10
20
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
isStaging() {
|
|
22
|
+
return staging.some(el => window.location.href.includes(el));
|
|
23
|
+
}
|
|
24
|
+
determineLoginUrl() {
|
|
25
|
+
if (this.isStaging()) {
|
|
26
|
+
//staging 'https://atportal.postnord.com/api/unified-login/backend/authorization?redirectionUrl='
|
|
27
|
+
return LoginURL.at.concat(window.location.href);
|
|
16
28
|
}
|
|
17
29
|
else {
|
|
18
|
-
|
|
30
|
+
//portal but not staging portal... 'https://portal.postnord.com/api/unified-login/backend/authorization?redirectionUrl='
|
|
31
|
+
if (window.location.href.includes('portal')) {
|
|
32
|
+
return LoginURL.prod.concat(window.location.href);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
//not staging, not portal -> marketweb (?) /login?returnUrl=
|
|
36
|
+
return window.location.hostname.concat(`/login?returnUrl=${window.location.href}`);
|
|
37
|
+
}
|
|
19
38
|
}
|
|
20
39
|
}
|
|
40
|
+
navigateToLogin() {
|
|
41
|
+
const url = this.determineLoginUrl();
|
|
42
|
+
console.log('url: ', url);
|
|
43
|
+
//location.href = url;
|
|
44
|
+
}
|
|
21
45
|
render() {
|
|
22
46
|
return (h(Host, null,
|
|
23
47
|
h("pn-button", { onClick: () => this.navigateToLogin() }, this.label)));
|
|
@@ -31,11 +55,11 @@ export class PnMarketwebSiteheaderLoginButton {
|
|
|
31
55
|
}; }
|
|
32
56
|
static get properties() { return {
|
|
33
57
|
"label": {
|
|
34
|
-
"type": "
|
|
58
|
+
"type": "string",
|
|
35
59
|
"mutable": false,
|
|
36
60
|
"complexType": {
|
|
37
|
-
"original": "
|
|
38
|
-
"resolved": "
|
|
61
|
+
"original": "string",
|
|
62
|
+
"resolved": "string",
|
|
39
63
|
"references": {}
|
|
40
64
|
},
|
|
41
65
|
"required": false,
|
|
@@ -45,24 +69,8 @@ export class PnMarketwebSiteheaderLoginButton {
|
|
|
45
69
|
"text": ""
|
|
46
70
|
},
|
|
47
71
|
"attribute": "label",
|
|
48
|
-
"reflect": false
|
|
49
|
-
|
|
50
|
-
"active": {
|
|
51
|
-
"type": "boolean",
|
|
52
|
-
"mutable": false,
|
|
53
|
-
"complexType": {
|
|
54
|
-
"original": "boolean",
|
|
55
|
-
"resolved": "boolean",
|
|
56
|
-
"references": {}
|
|
57
|
-
},
|
|
58
|
-
"required": false,
|
|
59
|
-
"optional": true,
|
|
60
|
-
"docs": {
|
|
61
|
-
"tags": [],
|
|
62
|
-
"text": ""
|
|
63
|
-
},
|
|
64
|
-
"attribute": "active",
|
|
65
|
-
"reflect": false
|
|
72
|
+
"reflect": false,
|
|
73
|
+
"defaultValue": "'Log in'"
|
|
66
74
|
}
|
|
67
75
|
}; }
|
|
68
76
|
static get elementRef() { return "hostElement"; }
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
pn-marketweb-siteheader-login-linklist {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
position: relative;
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
5
4
|
}
|
|
6
5
|
pn-marketweb-siteheader-login-linklist strong {
|
|
7
|
-
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
6
|
+
margin-bottom: 2.4rem;
|
|
10
7
|
}
|
|
11
|
-
pn-marketweb-siteheader-login-linklist ul
|
|
12
|
-
list-style: none;
|
|
13
|
-
margin: 0;
|
|
8
|
+
pn-marketweb-siteheader-login-linklist ul {
|
|
9
|
+
list-style-type: none;
|
|
14
10
|
padding: 0;
|
|
11
|
+
margin: 0;
|
|
15
12
|
}
|
|
16
13
|
pn-marketweb-siteheader-login-linklist li {
|
|
17
|
-
|
|
14
|
+
margin-bottom: 2.4rem;
|
|
15
|
+
}
|
|
16
|
+
pn-marketweb-siteheader-login-linklist li a {
|
|
17
|
+
color: #005D92;
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
font-size: 1.6rem;
|
|
20
|
+
line-height: 1.5;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
}
|
|
23
|
+
pn-marketweb-siteheader-login-linklist li pn-icon {
|
|
24
|
+
padding-left: 0.8rem;
|
|
25
|
+
}
|
|
26
|
+
pn-marketweb-siteheader-login-linklist li pn-icon svg > path {
|
|
27
|
+
fill: #005D92 !important;
|
|
28
|
+
}
|
|
29
|
+
pn-marketweb-siteheader-login-linklist li:hover a {
|
|
30
|
+
text-decoration: underline;
|
|
18
31
|
}
|
|
19
|
-
pn-marketweb-siteheader-login-linklist li
|
|
20
|
-
|
|
21
|
-
width: 100%;
|
|
32
|
+
pn-marketweb-siteheader-login-linklist li:last-of-type {
|
|
33
|
+
margin-bottom: 0;
|
|
22
34
|
}
|
|
@@ -1,49 +1,14 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { state as headerState } from
|
|
1
|
+
import { Component, Element, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
import { state as headerState } from './pn-marketweb-siteheader-store';
|
|
3
3
|
export class PnMarketwebSiteheaderLoginLinklist {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.heading = null;
|
|
6
6
|
this.links = [];
|
|
7
|
-
this.idNamespace =
|
|
8
|
-
}
|
|
9
|
-
componentWillLoad() {
|
|
7
|
+
this.idNamespace = '';
|
|
10
8
|
}
|
|
9
|
+
componentWillLoad() { }
|
|
11
10
|
uniqueId(text) {
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
linkAppearanceAttributes(link) {
|
|
15
|
-
let attributes = {};
|
|
16
|
-
if (link.linkType) {
|
|
17
|
-
switch (link.linkType) {
|
|
18
|
-
case 'primary':
|
|
19
|
-
attributes = {
|
|
20
|
-
appearance: '',
|
|
21
|
-
variant: ''
|
|
22
|
-
};
|
|
23
|
-
break;
|
|
24
|
-
case 'secondary':
|
|
25
|
-
attributes = {
|
|
26
|
-
appearance: 'light',
|
|
27
|
-
variant: 'outlined'
|
|
28
|
-
};
|
|
29
|
-
break;
|
|
30
|
-
case 'regularlink':
|
|
31
|
-
default:
|
|
32
|
-
attributes = {
|
|
33
|
-
appearance: 'light',
|
|
34
|
-
variant: 'borderless',
|
|
35
|
-
icon: 'arrow-right'
|
|
36
|
-
};
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
return attributes;
|
|
40
|
-
}
|
|
41
|
-
if (!link.linkType) {
|
|
42
|
-
attributes = {
|
|
43
|
-
appearance: link.primaryLinkApperance ? "dark" : "light"
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
return attributes;
|
|
11
|
+
return 'loginlink-' + text.replace(/[^A-Za-z0-9.\\\/]/gim, '') + '-' + this.idNamespace;
|
|
47
12
|
}
|
|
48
13
|
render() {
|
|
49
14
|
if (!this.links || this.links.length === 0) {
|
|
@@ -51,11 +16,15 @@ export class PnMarketwebSiteheaderLoginLinklist {
|
|
|
51
16
|
}
|
|
52
17
|
return (h(Host, null,
|
|
53
18
|
this.heading ? h("strong", null, this.heading) : null,
|
|
54
|
-
h("ul", null, this.links.map(
|
|
19
|
+
h("ul", null, this.links.map(link => {
|
|
55
20
|
return (h("li", null,
|
|
56
|
-
h("
|
|
57
|
-
|
|
58
|
-
|
|
21
|
+
h("a", Object.assign({ href: link.href, id: this.uniqueId(link.linkText) }, (link.openInNewWindow && { target: '_blank' }), { onClick: () => {
|
|
22
|
+
if (link.isLogoutLink) {
|
|
23
|
+
headerState.loginManager.clearUserData();
|
|
24
|
+
}
|
|
25
|
+
} }),
|
|
26
|
+
link.linkText,
|
|
27
|
+
link.isLogoutLink ? h("pn-icon", { symbol: "transfer" }) : h("pn-icon", { symbol: "arrow-right" }))));
|
|
59
28
|
}))));
|
|
60
29
|
}
|
|
61
30
|
static get is() { return "pn-marketweb-siteheader-login-linklist"; }
|
|
@@ -121,7 +90,7 @@ export class PnMarketwebSiteheaderLoginLinklist {
|
|
|
121
90
|
},
|
|
122
91
|
"attribute": "id-namespace",
|
|
123
92
|
"reflect": false,
|
|
124
|
-
"defaultValue": "
|
|
93
|
+
"defaultValue": "''"
|
|
125
94
|
}
|
|
126
95
|
}; }
|
|
127
96
|
static get elementRef() { return "hostElement"; }
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { state as headerState } from
|
|
1
|
+
import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';
|
|
2
|
+
import { state as headerState } from './pn-marketweb-siteheader-store';
|
|
3
3
|
export class PnMarketwebSiteheaderLoginLinks {
|
|
4
4
|
constructor() {
|
|
5
5
|
// Login dialog
|
|
6
6
|
this.loginDialog = null;
|
|
7
|
-
this.idNamespace =
|
|
7
|
+
this.idNamespace = '';
|
|
8
8
|
this.loggedin = false;
|
|
9
|
-
this.username =
|
|
9
|
+
this.username = '';
|
|
10
10
|
}
|
|
11
11
|
componentWillLoad() {
|
|
12
12
|
this.init();
|
|
@@ -21,12 +21,12 @@ export class PnMarketwebSiteheaderLoginLinks {
|
|
|
21
21
|
}
|
|
22
22
|
const adjustLink = (link, i) => {
|
|
23
23
|
if (!link.isLogoutLink) {
|
|
24
|
-
link.isLogoutLink =
|
|
24
|
+
link.isLogoutLink = link.pageLink.indexOf('location.href') !== -1 && link.pageLink.indexOf('logout') !== -1;
|
|
25
25
|
}
|
|
26
26
|
if (link.isLogoutLink) {
|
|
27
27
|
link.href = headerState.loginManager.getLogoutUrl(link.href);
|
|
28
28
|
}
|
|
29
|
-
link.href = link.href.replace(
|
|
29
|
+
link.href = link.href.replace('window.location.href', window.location.href);
|
|
30
30
|
if (i === 0 && !link.href) {
|
|
31
31
|
link.href = headerState.loginManager.getLoginUrl();
|
|
32
32
|
link.linkType = 'primary';
|
|
@@ -49,7 +49,7 @@ export class PnMarketwebSiteheaderLoginLinks {
|
|
|
49
49
|
isLogoutLink: false,
|
|
50
50
|
pageLink: null,
|
|
51
51
|
linkType: 'primary',
|
|
52
|
-
primaryLinkApperance: true
|
|
52
|
+
primaryLinkApperance: true,
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
href: headerState.loginManager.getLoginUrl(this.loginDialog.registerUrl),
|
|
@@ -57,8 +57,8 @@ export class PnMarketwebSiteheaderLoginLinks {
|
|
|
57
57
|
openInNewWindow: false,
|
|
58
58
|
isLogoutLink: false,
|
|
59
59
|
pageLink: null,
|
|
60
|
-
primaryLinkApperance: false
|
|
61
|
-
}
|
|
60
|
+
primaryLinkApperance: false,
|
|
61
|
+
},
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
@@ -75,18 +75,8 @@ export class PnMarketwebSiteheaderLoginLinks {
|
|
|
75
75
|
hostElementAttribute.loggedin = this.loggedin;
|
|
76
76
|
}
|
|
77
77
|
return (h(Host, Object.assign({}, hostElementAttribute),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks, idNamespace: this.idNamespace })
|
|
81
|
-
:
|
|
82
|
-
h("div", null, ((_a = this.loginDialog.loginMenuLinks) === null || _a === void 0 ? void 0 : _a.length) > 0 ?
|
|
83
|
-
h("pn-marketweb-siteheader-login-linklist", { heading: this.loginDialog.loginTitle, links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })
|
|
84
|
-
:
|
|
85
|
-
h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.legacyLoginLinks, idNamespace: this.idNamespace })))
|
|
86
|
-
: null,
|
|
87
|
-
(this.loginDialog.overrideLoginMenu) ?
|
|
88
|
-
h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })
|
|
89
|
-
: null));
|
|
78
|
+
!this.loginDialog.overrideLoginMenu ? (h("div", { "data-loggedin": this.loggedin + '' }, this.loggedin ? (h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks, idNamespace: this.idNamespace })) : (h("div", null, ((_a = this.loginDialog.loginMenuLinks) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (h("pn-marketweb-siteheader-login-linklist", { heading: this.loginDialog.loginTitle, links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })) : (h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.legacyLoginLinks, idNamespace: this.idNamespace })))))) : null,
|
|
79
|
+
this.loginDialog.overrideLoginMenu ? (h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })) : null));
|
|
90
80
|
}
|
|
91
81
|
static get is() { return "pn-marketweb-siteheader-login-links"; }
|
|
92
82
|
static get originalStyleUrls() { return {
|
|
@@ -133,7 +123,7 @@ export class PnMarketwebSiteheaderLoginLinks {
|
|
|
133
123
|
},
|
|
134
124
|
"attribute": "id-namespace",
|
|
135
125
|
"reflect": false,
|
|
136
|
-
"defaultValue": "
|
|
126
|
+
"defaultValue": "''"
|
|
137
127
|
},
|
|
138
128
|
"loggedin": {
|
|
139
129
|
"type": "boolean",
|
|
@@ -169,7 +159,7 @@ export class PnMarketwebSiteheaderLoginLinks {
|
|
|
169
159
|
},
|
|
170
160
|
"attribute": "username",
|
|
171
161
|
"reflect": false,
|
|
172
|
-
"defaultValue": "
|
|
162
|
+
"defaultValue": "''"
|
|
173
163
|
}
|
|
174
164
|
}; }
|
|
175
165
|
static get elementRef() { return "hostElement"; }
|
|
File without changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Component, Element, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
export class PnMarketwebSiteheaderLoginMypageButton {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = 'Mina sidor!';
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
return (h(Host, null,
|
|
8
|
+
h("pn-button", { href: this.myPageUrl }, this.label)));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "pn-marketweb-siteheader-login-mypage-button"; }
|
|
11
|
+
static get originalStyleUrls() { return {
|
|
12
|
+
"$": ["pn-marketweb-siteheader-login-mypage-button.scss"]
|
|
13
|
+
}; }
|
|
14
|
+
static get styleUrls() { return {
|
|
15
|
+
"$": ["pn-marketweb-siteheader-login-mypage-button.css"]
|
|
16
|
+
}; }
|
|
17
|
+
static get properties() { return {
|
|
18
|
+
"label": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"mutable": false,
|
|
21
|
+
"complexType": {
|
|
22
|
+
"original": "string",
|
|
23
|
+
"resolved": "string",
|
|
24
|
+
"references": {}
|
|
25
|
+
},
|
|
26
|
+
"required": false,
|
|
27
|
+
"optional": false,
|
|
28
|
+
"docs": {
|
|
29
|
+
"tags": [],
|
|
30
|
+
"text": ""
|
|
31
|
+
},
|
|
32
|
+
"attribute": "label",
|
|
33
|
+
"reflect": false,
|
|
34
|
+
"defaultValue": "'Mina sidor!'"
|
|
35
|
+
},
|
|
36
|
+
"myPageUrl": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"mutable": false,
|
|
39
|
+
"complexType": {
|
|
40
|
+
"original": "string",
|
|
41
|
+
"resolved": "string",
|
|
42
|
+
"references": {}
|
|
43
|
+
},
|
|
44
|
+
"required": false,
|
|
45
|
+
"optional": false,
|
|
46
|
+
"docs": {
|
|
47
|
+
"tags": [],
|
|
48
|
+
"text": ""
|
|
49
|
+
},
|
|
50
|
+
"attribute": "my-page-url",
|
|
51
|
+
"reflect": false
|
|
52
|
+
}
|
|
53
|
+
}; }
|
|
54
|
+
static get elementRef() { return "hostElement"; }
|
|
55
|
+
}
|
|
@@ -17,6 +17,8 @@ export class PnMarketwebSiteheaderLogin {
|
|
|
17
17
|
mainMenuButton: '',
|
|
18
18
|
menuStartButton: '',
|
|
19
19
|
profileSelectionFlyoutHeading: '',
|
|
20
|
+
loginButtonText: '',
|
|
21
|
+
loginPreamble: '',
|
|
20
22
|
};
|
|
21
23
|
this.siteUrl = '';
|
|
22
24
|
this.emitEvents = true;
|
|
@@ -33,6 +35,7 @@ export class PnMarketwebSiteheaderLogin {
|
|
|
33
35
|
this.username = this.fullname;
|
|
34
36
|
}
|
|
35
37
|
componentWillLoad() {
|
|
38
|
+
console.log('env: ', this.environment);
|
|
36
39
|
const userInfo = this.loggedin && this.fullname ? { given_name: this.fullname } : null;
|
|
37
40
|
headerState.loginManager = new MarketWebLoginManager({
|
|
38
41
|
endpoint: this.endpoint,
|
|
@@ -154,9 +157,10 @@ export class PnMarketwebSiteheaderLogin {
|
|
|
154
157
|
}
|
|
155
158
|
return (h(Host, Object.assign({}, hostElementAttribute),
|
|
156
159
|
h("pn-nav-dropdown", { label: this.toggleButtonText, icon: "user", class: "siteheader-logindialog" },
|
|
157
|
-
!this.loggedin && h("pn-marketweb-siteheader-login-button", { label: '
|
|
158
|
-
|
|
159
|
-
this.loggedin && this.showProfileSelection ? (h("pn-marketweb-siteheader-login-profileselection", { loginDialog: this.loginDialog, loggedin: this.loggedin, i18n: this.i18n, idNamespace: this.emitEvents ? '1' : '2', endpoint: this.endpoint })) : (h("pn-marketweb-siteheader-login-links", { loginDialog: this.loginDialog, loggedin: this.loggedin, idNamespace: this.emitEvents ? '1' : '2', username: this.username }))
|
|
160
|
+
this.environment !== 'production' && !this.loggedin && h("pn-marketweb-siteheader-login-button", { label: /* this.i18n?.loginButtonText */ 'login check' }),
|
|
161
|
+
this.environment !== 'production' && this.loggedin && h("pn-marketweb-siteheader-login-mypage-button", { myPageUrl: "https://account.postnord.com/secure/profile" }),
|
|
162
|
+
this.loggedin && this.showProfileSelection ? (h("pn-marketweb-siteheader-login-profileselection", { loginDialog: this.loginDialog, loggedin: this.loggedin, i18n: this.i18n, idNamespace: this.emitEvents ? '1' : '2', endpoint: this.endpoint })) : (h("pn-marketweb-siteheader-login-links", { loginDialog: this.loginDialog, loggedin: this.loggedin, idNamespace: this.emitEvents ? '1' : '2', username: this.username })),
|
|
163
|
+
this.environment !== 'production' && h("p", null, "L\u00E4s mer om v\u00E5ra inloggade tj\u00E4nster och hur du anv\u00E4nder dem"))));
|
|
160
164
|
}
|
|
161
165
|
static get is() { return "pn-marketweb-siteheader-login"; }
|
|
162
166
|
static get originalStyleUrls() { return {
|
|
@@ -221,7 +225,7 @@ export class PnMarketwebSiteheaderLogin {
|
|
|
221
225
|
"tags": [],
|
|
222
226
|
"text": ""
|
|
223
227
|
},
|
|
224
|
-
"defaultValue": "{\n searchlabel: '',\n searchplaceholder: '',\n searchbuttontext: '',\n menuHomeButton: '',\n menuGoBackButton: '',\n mainMenuButton: '',\n menuStartButton: '',\n profileSelectionFlyoutHeading: '',\n } as SiteHeaderI18N"
|
|
228
|
+
"defaultValue": "{\n searchlabel: '',\n searchplaceholder: '',\n searchbuttontext: '',\n menuHomeButton: '',\n menuGoBackButton: '',\n mainMenuButton: '',\n menuStartButton: '',\n profileSelectionFlyoutHeading: '',\n loginButtonText: '',\n loginPreamble: '',\n } as SiteHeaderI18N"
|
|
225
229
|
},
|
|
226
230
|
"siteUrl": {
|
|
227
231
|
"type": "string",
|
|
@@ -351,6 +355,23 @@ export class PnMarketwebSiteheaderLogin {
|
|
|
351
355
|
"attribute": "check-user-logged-in-state-interval",
|
|
352
356
|
"reflect": false,
|
|
353
357
|
"defaultValue": "0"
|
|
358
|
+
},
|
|
359
|
+
"environment": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"mutable": false,
|
|
362
|
+
"complexType": {
|
|
363
|
+
"original": "string",
|
|
364
|
+
"resolved": "string",
|
|
365
|
+
"references": {}
|
|
366
|
+
},
|
|
367
|
+
"required": false,
|
|
368
|
+
"optional": true,
|
|
369
|
+
"docs": {
|
|
370
|
+
"tags": [],
|
|
371
|
+
"text": ""
|
|
372
|
+
},
|
|
373
|
+
"attribute": "environment",
|
|
374
|
+
"reflect": false
|
|
354
375
|
}
|
|
355
376
|
}; }
|
|
356
377
|
static get states() { return {
|
package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css
CHANGED
|
@@ -87,6 +87,29 @@ pn-marketweb-siteheader .siteheader-row > pn-marketweb-siteheader-search {
|
|
|
87
87
|
pn-marketweb-siteheader pn-spinner {
|
|
88
88
|
display: none;
|
|
89
89
|
}
|
|
90
|
+
pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content {
|
|
91
|
+
max-width: 350px;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
gap: 2.4rem;
|
|
95
|
+
padding: 4rem;
|
|
96
|
+
}
|
|
97
|
+
pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content pn-button {
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content pn-marketweb-siteheader-login-links::before,
|
|
101
|
+
pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content p::before {
|
|
102
|
+
display: block;
|
|
103
|
+
content: "";
|
|
104
|
+
height: 2px;
|
|
105
|
+
background: #F9F8F8;
|
|
106
|
+
width: 100%;
|
|
107
|
+
margin-bottom: 2.4rem;
|
|
108
|
+
}
|
|
109
|
+
pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content p {
|
|
110
|
+
font-size: 1.4rem;
|
|
111
|
+
color: #005D92;
|
|
112
|
+
}
|
|
90
113
|
pn-marketweb-siteheader pn-nav-dropdown:not(.hydrated) .nav-dropdown-content-container {
|
|
91
114
|
display: none;
|
|
92
115
|
}
|
|
@@ -360,6 +383,9 @@ header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav
|
|
|
360
383
|
background-color: #00A0D6;
|
|
361
384
|
text-decoration: none;
|
|
362
385
|
}
|
|
386
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-marketweb-siteheader-login-linklist ul li a {
|
|
387
|
+
color: #005D92;
|
|
388
|
+
}
|
|
363
389
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header [data-level="1"] pn-mainnav-link pn-icon.first-level_arrow svg > path {
|
|
364
390
|
fill: #FFFFFF;
|
|
365
391
|
}
|
package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Component, Element, Event, h, Host, Listen, Prop, State, Watch
|
|
1
|
+
import { Component, Element, Event, h, Host, Listen, Prop, State, Watch } from '@stencil/core';
|
|
2
2
|
import { FetchHelper } from '../../../globals/FetchHelper';
|
|
3
3
|
import { MarketWebContextService } from '../../../globals/MarketWebContextService';
|
|
4
|
-
import { state as headerState } from
|
|
4
|
+
import { state as headerState } from './pn-marketweb-siteheader-store';
|
|
5
5
|
import { translations } from './translations';
|
|
6
6
|
export class PnMarketwebSiteheader {
|
|
7
7
|
constructor() {
|
|
@@ -367,7 +367,7 @@ export class PnMarketwebSiteheader {
|
|
|
367
367
|
})),
|
|
368
368
|
h("div", { slot: "footer", class: "siteheader-menu-footer" },
|
|
369
369
|
h("slot", { name: "menu-footer-cta" }),
|
|
370
|
-
this.gotData && this.loginDialog && !this.hideLogin && (h("pn-marketweb-siteheader-login", { emitEvents: false, siteUrl: this.siteDefinition.url, loginDialog: this.loginDialog, endpoint: this.endpoint, fullname: this.userFullname, loggedin: this.userLoggedin, i18n: this.i18n, showProfileSelection: this.showProfileSelection })),
|
|
370
|
+
this.gotData && this.loginDialog && !this.hideLogin && (h("pn-marketweb-siteheader-login", { emitEvents: false, siteUrl: this.siteDefinition.url, loginDialog: this.loginDialog, endpoint: this.endpoint, fullname: this.userFullname, loggedin: this.userLoggedin, i18n: this.i18n, showProfileSelection: this.showProfileSelection, environment: this.environment })),
|
|
371
371
|
this.gotData && this.languageOptions && this.languageOptions.length && !this.hideLanguageSelector && (h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => (h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))))),
|
|
372
372
|
!this.hideSiteSelector && (h("pn-site-selector", { language: this.language },
|
|
373
373
|
this.gotData && ((_e = this.siteSelector) === null || _e === void 0 ? void 0 : _e.currentSiteTitle) && (h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription })),
|