@postnord/pn-marketweb-components 2.0.6-beta9 → 2.0.8-beta2
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/{MarketWebLoginManager-3c2f4423.js → MarketWebLoginManager-865226ea.js} +13 -1
- package/cjs/{data-b9e6d752.js → data-b5ef4f7c.js} +14 -1
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +13 -6
- package/cjs/{pn-find-price-store-63671327.js → pn-find-price-store-b0ea47ed.js} +3 -1
- package/cjs/pn-find-price.cjs.entry.js +17 -11
- package/cjs/pn-language-selector_9.cjs.entry.js +19 -12
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +8 -4
- package/cjs/pn-product-card_3.cjs.entry.js +3 -3
- package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +54 -12
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +45 -5
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +26 -2
- package/collection/components/widgets/pn-find-price/data.js +17 -2
- package/collection/components/widgets/pn-find-price/find-price.stories.js +2 -2
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +46 -14
- package/collection/components/widgets/pn-find-price/pn-find-price-store.js +3 -1
- package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +10 -5
- package/collection/components/widgets/pn-find-price/pn-find-price.js +5 -10
- package/collection/components/widgets/pn-product-card/pn-product-card-price.css +1 -9
- package/collection/components/widgets/pn-product-card/pn-product-card.css +57 -1
- package/collection/components/widgets/pn-product-card/pn-product-card.js +3 -1
- package/collection/globals/MarketWebLoginManager.js +13 -1
- package/custom-elements/index.js +86 -36
- package/esm/{MarketWebLoginManager-3bb0a307.js → MarketWebLoginManager-8fef95d2.js} +13 -1
- package/esm/{data-8e7bd46e.js → data-f0ac26a9.js} +14 -2
- package/esm/loader.js +1 -1
- package/esm/pn-find-price-result.entry.js +13 -6
- package/esm/{pn-find-price-store-55b65ec0.js → pn-find-price-store-625a6d87.js} +3 -1
- package/esm/pn-find-price.entry.js +17 -11
- package/esm/pn-language-selector_9.entry.js +19 -12
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-siteheader.entry.js +8 -4
- package/esm/pn-product-card_3.entry.js +3 -3
- package/esm/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/MarketWebLoginManager-8fef95d2.js +1 -0
- package/esm-es5/{data-8e7bd46e.js → data-f0ac26a9.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-55b65ec0.js → pn-find-price-store-625a6d87.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.entry.js +1 -1
- package/esm-es5/pn-product-card_3.entry.js +1 -1
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-0351965d.system.entry.js +1 -0
- package/pn-market-web-components/{p-4d584dca.system.entry.js → p-1c11b615.system.entry.js} +1 -1
- package/pn-market-web-components/p-285c6c82.system.entry.js +1 -0
- package/pn-market-web-components/p-2a624d21.entry.js +1 -0
- package/pn-market-web-components/p-424fac62.js +1 -0
- package/pn-market-web-components/{p-e89a9e79.system.entry.js → p-4a71cd20.system.entry.js} +1 -1
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/{p-51fc5bc4.entry.js → p-6c75474c.entry.js} +1 -1
- package/pn-market-web-components/p-82daf429.entry.js +1 -0
- package/pn-market-web-components/p-8a269121.system.js +1 -0
- package/pn-market-web-components/{p-a7421a8e.system.js → p-9e0c9f32.system.js} +1 -1
- package/pn-market-web-components/p-ae775ba5.system.entry.js +1 -0
- package/pn-market-web-components/p-b2840380.entry.js +1 -0
- package/pn-market-web-components/{p-28db6d9f.entry.js → p-c1c3777d.entry.js} +1 -1
- package/pn-market-web-components/p-c2fada23.entry.js +1 -0
- package/pn-market-web-components/{p-f9586bef.js → p-e3ae421f.js} +1 -1
- package/pn-market-web-components/p-e7f8da0b.system.entry.js +1 -0
- package/pn-market-web-components/{p-f6fa6caa.system.js → p-e9781689.system.js} +1 -1
- package/pn-market-web-components/{p-d94d8879.js → p-f04541a1.js} +1 -1
- 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.d.ts +3 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts +5 -1
- package/types/components/widgets/pn-find-price/pn-find-price-result.d.ts +4 -0
- package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -0
- package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +5 -0
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +5 -0
- package/types/components.d.ts +30 -2
- package/types/globals/MarketWebLoginManager.d.ts +29 -27
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/esm-es5/MarketWebLoginManager-3bb0a307.js +0 -1
- package/pn-market-web-components/p-01a615ef.system.entry.js +0 -1
- package/pn-market-web-components/p-23902611.system.entry.js +0 -1
- package/pn-market-web-components/p-29b8041d.entry.js +0 -1
- package/pn-market-web-components/p-36380a2b.system.entry.js +0 -1
- package/pn-market-web-components/p-55513980.system.js +0 -1
- package/pn-market-web-components/p-606ab75d.system.entry.js +0 -1
- package/pn-market-web-components/p-6423bacf.js +0 -1
- package/pn-market-web-components/p-9a8dba33.entry.js +0 -1
- package/pn-market-web-components/p-c9edf78b.entry.js +0 -1
- package/pn-market-web-components/p-dc869f2f.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{c(o.next(e))}catch(t){r(t)}}function a(e){try{c(o["throw"](e))}catch(t){r(t)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(a){s=[6,a];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register([],(function(e){"use strict";return{execute:function(){var t=function(){function e(e){var t=this;if(e===void 0){e=null}var n;this.eventTarget=window!==null&&window!==void 0?window:document===null||document===void 0?void 0:document.body;this.endpoint="";this.storagePrefix="pn-user";this.baseUrls={at:"https://atportal.postnord.com/api/unified-login/backend",prod:"https://portal.postnord.com/api/unified-login/backend"};this.events={loginstatechange:"loginstatechange"};this.endpoints={authorizationEndpoint:"/authorization",tokenExchangeEndpoint:"/token",userInfoEndpoint:"/user",logoutEndpoint:"/logout"};this.keys={tokensource:"tokensource",token:"token",user:"user",expire:"expire",expireDate:"expiredate"};this.overridetokenValue="overridetokenValue";this.store={get:function(e){var n=window.sessionStorage.getItem("".concat(t.storagePrefix,"-").concat(e));if(!n){return n}if(n.indexOf("{")===0){try{return JSON.parse(n)}catch(o){}}if(n.indexOf(",")!==-1){return n.split(",")}return n},set:function(e,n){if(typeof n==="object"&&typeof n.length==="undefined"){window.sessionStorage.setItem("".concat(t.storagePrefix,"-").concat(e),JSON.stringify(n));return}window.sessionStorage.setItem("".concat(t.storagePrefix,"-").concat(e),n)},remove:function(e){window.sessionStorage.removeItem("".concat(t.storagePrefix,"-").concat(e))}};if(!e){return}this.eventTarget=e.eventTarget?e.eventTarget:this.eventTarget;this.endpoint=e.endpoint?e.endpoint:"".concat(window.location.protocol,"//").concat(window.location.host);(n=this.storagePrefix)!==null&&n!==void 0?n:this.storagePrefix=e.storagePrefix;if(e.userInfo){this.store.set(this.keys.user,e.userInfo);this.registerToken(this.overridetokenValue,"override")}}e.prototype.init=function(e){if(e===void 0){e=true}if(e){this.checkParameters();this.checkExpireTime();if(this.store.get(this.keys.token)&&!this.store.get(this.keys.user)){this.fetchUserInfo()}this.loginStateChange()}};e.prototype.isLoggedIn=function(e){if(e===void 0){e=false}if(e){return e}var t=this.store.get(this.keys.token)&&this.store.get(this.keys.user)?true:false;return t};e.prototype.registerToken=function(e,t){if(e===void 0){e=""}if(t===void 0){t="frontend"}if(!e||e===this.getToken()){return}this.clearUserData();this.store.set(this.keys.tokensource,t);this.store.set(this.keys.token,e);this.fetchUserInfo()};e.prototype.invalidateTokenOfType=function(e){if(e===void 0){e="frontend"}var t=this.store.get(this.keys.token);if(!t){return}var n=this.store.get(this.keys.tokensource);if(n!==e){return}this.clearUserData()};e.prototype.getLoginUrl=function(e){if(e===void 0){e=""}var t=window.location.href;e=e?e:t;return"".concat(this.getBaseUrl()).concat(this.endpoints.authorizationEndpoint,"?redirectionUrl=").concat(e)};e.prototype.getLogoutUrl=function(e){if(e===void 0){e=""}e=window.location.origin+"/logout";return"".concat(this.getBaseUrl()).concat(this.endpoints.logoutEndpoint,"?redirectionUrl=").concat(e,"&authorization=").concat(this.store.get(this.keys.token))};e.prototype.getUserInfo=function(){if(this.isLoggedIn()){return this.store.get(this.keys.user)}};e.prototype.getEventTarget=function(){return this.eventTarget};e.prototype.checkExpireTime=function(){var e=this.store.get(this.keys.expire);if(!e){return}var t=new Date;var n=new Date(Math.floor(parseInt(e,10)*1e3));if(t>n){console.info("Login time has expired");this.clearUserData();this.loginStateChange()}};e.prototype.checkParameters=function(){if(!(window===null||window===void 0?void 0:window.location)){return}var e=new URLSearchParams(window.location.search);if(e.get("oneTimeCode")){var t=e.get("oneTimeCode");this.exchangeToken(t).then((function(){var e=window.location.href;var n=e.indexOf("?oneTimeCode")!==-1?"?":"&";history.replaceState({},document.querySelector("title").innerText,e.replace("".concat(n,"oneTimeCode=").concat(t),""))}))}};e.prototype.fetchUserInfo=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o,i,r,s;return __generator(this,(function(a){switch(a.label){case 0:e=this.store.get(this.keys.token);if(this.store.get(this.keys.token)===this.overridetokenValue){console.info("Did not fetch user data since it was set by an override");return[2]}t={method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:e}};return[4,fetch("".concat(this.getBaseUrl()).concat(this.endpoints.userInfoEndpoint),t)];case 1:n=a.sent();return[4,n.json()];case 2:o=a.sent();if(o){try{i=o.idToken,r=o.expiryTime;s=this.parseUserInfo(i);this.store.set(this.keys.user,s);this.store.set(this.keys.expire,r);this.store.set(this.keys.expireDate,new Date(Math.floor(parseInt(r,10)*1e3)));this.loginStateChange()}catch(c){console.error("Unable to get user information",c)}}return[2]}}))}))};e.prototype.clearUserData=function(){this.store.remove(this.keys.user);this.store.remove(this.keys.tokensource);this.store.remove(this.keys.token);this.store.remove(this.keys.expire);this.store.remove(this.keys.expireDate)};e.prototype.getToken=function(){return this.store.get(this.keys.token)};e.prototype.exchangeToken=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(o){switch(o.label){case 0:this.clearUserData();return[4,fetch("".concat(this.getBaseUrl()).concat(this.endpoints.tokenExchangeEndpoint,"?oneTimeCode=").concat(e))];case 1:t=o.sent();return[4,t.json()];case 2:n=o.sent().token;if(typeof n==="string"&&n){this.store.set(this.keys.token,n)}this.fetchUserInfo();return[2]}}))}))};e.prototype.loginStateChange=function(){if(!this.eventTarget){return}this.eventTarget.dispatchEvent(new CustomEvent(this.events.loginstatechange,{detail:this.isLoggedIn()}))};e.prototype.getBaseUrl=function(){var e=this;var t=["localhost","integration.","local."];var n=t.filter((function(t){return e.endpoint.indexOf(t)!==-1})).length>0;if(n){return this.baseUrls.at}return this.baseUrls.prod};e.prototype.parseUserInfo=function(e){var t=e.split(".")[1];var n=t.replace(/-/g,"+").replace(/_/g,"/");var o=decodeURIComponent(atob(n).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(o)};return e}();e("M",t)}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register([],(function(a){"use strict";return{execute:function(){var e=a("s",[{name:"Small",value:"Small",illustration:"eli1n",unit:"small"},{name:"Medium",value:"Medium",illustration:"medium-package",unit:"medium"},{name:"Large",value:"Large",illustration:"large-package",unit:"large"}]);var i=a("w",{small:[{name:"50 g",abbreviation:"g",value:50},{name:"100 g",abbreviation:"g",value:100},{name:"250 g",abbreviation:"g",value:250},{name:"500 g",abbreviation:"g",value:500},{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2}],medium:[{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2},{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}],large:[{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}]});var
|
|
1
|
+
System.register([],(function(a){"use strict";return{execute:function(){var e=a("s",[{name:"Small",value:"Small",illustration:"eli1n",unit:"small"},{name:"Medium",value:"Medium",illustration:"medium-package",unit:"medium"},{name:"Large",value:"Large",illustration:"large-package",unit:"large"}]);var i=a("w",{small:[{name:"50 g",abbreviation:"g",value:50},{name:"100 g",abbreviation:"g",value:100},{name:"250 g",abbreviation:"g",value:250},{name:"500 g",abbreviation:"g",value:500},{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2}],medium:[{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2},{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}],large:[{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}]});var t=a("R",{WebUrl:"https://riktigavykort.postnord.se/sv",AndroidAppUrl:"https://play.google.com/store/apps/details?id=se.posten.riktigavykort&hl=sv",AndroidImg:"https://com-integration.postnord.com/globalassets/icons/logos-and-badges/google-play-badge_se.svg",IosAppUrl:"https://apps.apple.com/se/app/riktiga-vykort/id444458799?l=sv",IosImg:"https://com-integration.postnord.com/globalassets/icons/logos-and-badges/app_store_badge_se_rgb_blk.svg"});var o=a("f","https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx");var n=a("a","https://portal.postnord.com/skickadirekt/");var g=a("b","https://shop.postnord.se/ebutik/default.aspx")}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-36654f2a.system.js","./p-e9781689.system.js","./p-9e0c9f32.system.js","./p-825b8fb8.system.js"],(function(t){"use strict";var i,e,s,n,l,r,o;return{setters:[function(t){i=t.r;e=t.h;s=t.a},function(t){n=t.s},function(t){l=t.a;r=t.b;o=t.R},function(){}],execute:function(){var a="pn-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}";var c=t("pn_find_price_result",function(){function t(t){i(this,t);this.item=null;this.shownitems=[];this.description=[];this.showMeasurement=false;this.weightText="";this.linkId="";this.usp={Billigast:e("span",{slot:"Billigast"},this.item.highestrankusp,e("pn-icon",{symbol:"box-label",small:"false",color:"green700"})),Snabbast:e("span",{slot:"Snabbast"},this.item.highestrankusp,e("pn-icon",{symbol:"bolt",small:"false",color:"blue700"}))}}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){if(this.item.additionalusp){var t=this.item.additionalusp.split("/");this.Usp1=t.length>0?t[0]:null;this.Usp2=t.length>1?t[1]:null;this.Usp3=t.length>2?t[2]:null}if(this.item.description){this.description=this.item.description.split("#bullet").filter((function(t){return t!==""}))}this.showMeasurement=this.item.maxmått!==null||this.item.rulle!==null;this.linkId="".concat(this.item.id,"-").concat(this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g,""))};t.prototype.render=function(){return e(s,null,e("pn-product-card",{"data-productid":this.item.id},e("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),e("div",{slot:"title"},this.item.infopagelink?e("h2",null,e("a",{href:this.item.infopagelink,target:"_blank"},this.item.name)):e("h2",null,this.item.name),this.usp[this.item.highestrankusp]),e("div",{slot:"content"},e("div",{class:"content"},this.item.description?e("div",{class:"description"},this.description.map((function(t){return e("li",null,t)}))):null,this.item.info?e("div",{class:"description"},this.item.info):null)),this.item.note?e("small",{slot:"note"},e("p",null,this.item.note)):null,this.item.additionalusp?e("div",{slot:"additionalUSP"},this.Usp1?e("span",null,this.Usp1):null,this.Usp2?e("span",null,this.Usp2):null,this.Usp3?e("span",null,this.Usp3):null):null,this.showMeasurement?e("pn-product-card-info",{paket:this.item.maxmått,rulle:this.item.rulle}):null,e("div",{slot:"cardprice"},this.item.pricesenddirect?e("pn-product-card-price",{slot:"sendDirectPrice",label:n.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:n.market.currency,url:l,linkid:this.linkId+"-portal"}):null,this.item.pricestamps?this.item.name.toLocaleLowerCase()!=="riktiga vykort"?e("pn-product-card-price",{slot:"stampPrice",label:n.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:n.market.currency,url:r,linkid:this.linkId+"-stampshop"}):e("pn-product-card-price",{slot:"riktiga",label:n.i18n.riktigaVykort,amount:this.item.pricestamps+"",currency:n.market.currency,url:o["WebUrl"],linkid:this.linkId+"-riktiga"}):null),e("div",{slot:"servicepoint"},this.item.showservicepointlink?e("a",{href:n.market.servicePoint,target:"_blank"},e("pn-icon",{symbol:"map-marker",color:"blue700"}),n.i18n.servicePointLink):null),e("div",{slot:"mobiledownload"},this.item.name.toLocaleLowerCase()==="riktiga vykort"?e("div",{id:"riktiga"},e("h4",null,n.i18n.riktigaVykortMobile),e("div",null,e("a",{href:o["AndroidAppUrl"],target:"_blank"},e("img",{class:"riktigaAndroidImg",src:o["AndroidImg"]})),e("a",{href:o["IosAppUrl"],target:"_blank"},e("img",{class:"riktigaAppleImg",src:o["IosImg"]})))):null)))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}());c.style=a}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,a as n}from"./p-58e8d7d5.js";let i=class{constructor(t){e(this,t)}render(){return t(n,null,t("slot",{name:"illustration"}),t("div",{class:"cardcontent"},t("div",{class:"details"},t("slot",{name:"title"}),t("slot",{name:"content"}),t("div",{class:"info"},t("slot",null)),t("slot",{name:"note"}),t("slot",{name:"additionalUSP"})),t("div",{class:"cardprice"},t("slot",{name:"cardprice"}),t("slot",{name:"mobiledownload"}),t("slot",{name:"servicepoint"}))))}};i.style='pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:"" !important}pn-product-card [slot=title]>[slot]{border-radius:0.4rem;height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem}pn-product-card [slot=title]>[slot] pn-icon{vertical-align:middle;margin-left:0.6em}pn-product-card [slot=title]>[slot=Billigast]{color:#005E41;background:#DCF6E7}pn-product-card [slot=title]>[slot=Snabbast]{background:#E0F8FF;color:#005D92}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:0.6em;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=mobiledownload]{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card [slot=mobiledownload] #riktiga{-ms-flex-order:4;order:4;margin-top:1em}pn-product-card [slot=mobiledownload] #riktiga>div>a::after{content:"" !important}pn-product-card [slot=mobiledownload] .riktigaAndroidImg{width:6em;margin:0.5em}pn-product-card [slot=mobiledownload] .riktigaAppleImg{width:5.6em;margin:0.5em}pn-product-card [slot=mobiledownload] a{text-decoration:none;color:#005D92}pn-product-card [slot=mobiledownload] a h3{text-decoration:underline}pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:2;flex-grow:2;-ms-flex-align:end;align-items:flex-end;text-align:center}@media screen and (min-width: 36em){pn-product-card [slot=servicepoint]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 1em 0.5em 0}';let r=class{constructor(t){e(this,t)}render(){return t(n,null,this.label?t("div",{class:"cardinfocontent"},this.text?t("pre",{slot:"formatPre"},this.text):null):t("div",{class:"cardinfocontent"},this.paket?t("div",{class:"cardinfocontent-item"},t("strong",null,"Maxmått:"),this.paket.split("/").map((e=>e.split(":").length>0?t("p",null,t("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):t("p",null,e)))):null,this.rulle?t("div",{class:"cardinfocontent-item"},t("strong",null,"Rulle:"),this.rulle.split("/").map((e=>e.split(":").length>0?t("p",null,t("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):t("p",null,e)))):null))}};t("pn-icon",{symbol:"align-center",small:"false",color:"black"}),r.style='pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em;gap:1.6rem}@media screen and (min-width: 36em){.cardinfocontent{-ms-flex-direction:row;flex-direction:row}}.cardinfocontent>div p{margin:0.25em 0.25em 0 0}.cardinfocontent-item{margin-top:0.5em}[slot=formatPre]{font-family:"PostNordSans", "Verdana";margin:0.5em 3em 0 0}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}';let o=class{constructor(t){e(this,t)}render(){if(this.amount)return this.url?t(n,{id:this.linkid},t("div",{class:"price"},this.amount?t("span",null,this.amount):null,this.currency?t("span",null," "+this.currency):null),this.note?t("p",null,this.note):null,this.label?t("pn-button",{small:"true",icon:"open-in-new",appearance:"light",href:this.url,target:"_blank"},this.label):null):t(n,null,t("div",{class:"price"},this.amount?t("span",null,this.amount):null,this.currency?t("span",null,this.currency):null))}};o.style="pn-product-card-price{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-right:0}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price .price{font-size:2.5em;font-weight:bold;-ms-flex-order:1;order:1}pn-product-card-price pn-button{min-width:12.8em;font-size:1.25;-ms-flex-order:2;order:2}@media screen and (min-width: 48em){pn-product-card-price pn-button{-ms-flex-order:3;order:3;margin-bottom:1.6rem}}pn-product-card-price p{font-weight:lighter;font-size:0.875em;-ms-flex-item-align:center;align-self:center;margin-top:0.8rem;-ms-flex-order:3;order:3}@media screen and (min-width: 48em){pn-product-card-price p{-ms-flex-order:2;order:2}}";export{i as pn_product_card,r as pn_product_card_info,o as pn_product_card_price}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,a as i}from"./p-58e8d7d5.js";import{w as s}from"./p-4e9a272d.js";import{a as n}from"./p-9adc3940.js";import{s as a}from"./p-
|
|
1
|
+
import{r as t,h as e,a as i}from"./p-58e8d7d5.js";import{w as s}from"./p-4e9a272d.js";import{a as n}from"./p-9adc3940.js";import{s as a}from"./p-e3ae421f.js";import"./p-86f06e26.js";const r={sv:{componentheading:"Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?",deliveryscopeheading:"Endast leveranser inom Sverige",resultlistheading:"Några bra alternativ för dig",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp online",stampshopcta:"Köp frimärken",message:"*Vid köp hos valfritt ombud",servicePointHeader:"Eller hitta närmaste serviceställe",servicePointLink:"Sök serviceställe eller brevlåda"},en:{componentheading:"Our prices and terms and conditions for domestic shipments for you as a direct paying customer",deliveryscopeheading:"Deliveries within Sweden only",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy Online",stampshopcta:"Buy Stamps",message:"When buying from any agent",servicePointHeader:"Or find nearest service point",servicePointLink:"Search letter-box or service point"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Kun leveringer indenfor Sverige",resultlistheading:"Some suitable options for you",weightlabel:"Vægt",maxweightlabel:"Max vægt",maxmeasurementlabel:"Maks. Volumen",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Kun leveranser innen Sverige",resultlistheading:"Some suitable options for you",weightlabel:"Vekt",maxweightlabel:"Maks vekt",maxmeasurementlabel:"Maks volum",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Toimitukset vain Ruotsin sisällä",resultlistheading:"Some suitable options for you",weightlabel:"Paino",maxweightlabel:"Max paino",maxmeasurementlabel:"Max äänenvoimakkuus",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}},o={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}};let l=class{constructor(e){t(this,e),this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx",this.language="sv",this.market="se",this.productid="",this.filteredItems=[],this.sourceData={types:[],data:[]},this.gotData=!1,this.loading=!1,this.postagetype={value:""},this.weight={value:0,name:""},this.weightvalue=0}componentWillLoad(){this.setState(),this.getDataSource().then((()=>{}))}setState(){this.market&&(a.market=o[this.market]),this.language&&r[this.language]&&(a.i18n=r[this.language])}async getDataSource(){if(!this.productid)return;this.loading=!0;const t=`?cache=${Math.floor(9999*Math.random()+1)}`,e=await fetch(this.source+t),i=await e.blob();try{const t=await n(i);this.sourceData=t,this.filterItems()}catch(s){this.loading=!1,console.warn("Unable to parse data")}}filterItems(){var t;if(!(null===(t=this.sourceData)||void 0===t?void 0:t.data))return void console.info("Data has not yet been loaded");this.loading=!1;const e=this.sourceData.data.filter((t=>t.id===this.productid));if(0===e.length)return;if(this.postagetype.value=e[0].what,!s[this.postagetype.value]||0===s[this.postagetype.value].length)return;0===this.weightvalue&&(this.weight=s[this.postagetype.value][0],this.weightvalue=this.weight.value);const i="kg"===this.weight.abbreviation.toLocaleLowerCase()&&"letter"===this.postagetype.value?1e3*this.weight.value:this.weight.value;let n=e.filter((t=>t.maxweight===i));if(0===n.length&&(n=e.filter((t=>t.maxweight>=i)),n.length>0)){const t=[...new Map(n.reverse().map((t=>[t.id,t]))).values()];t.length>0&&(n=t)}this.filteredItems=n,this.gotData=this.filteredItems.length>0}render(){return e(i,null,e("div",{class:"content"},e("slot",null)),this.loading?e("pn-spinner",null):null,this.postagetype.value&&s[this.postagetype.value]?e("div",{class:"weightselection"},e("div",{class:"weightoption"},e("div",{class:"weightoption-input"},e("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:a.i18n.weightlabel,value:this.weightvalue,onChange:t=>{if(t&&t.target&&t.target.value){const e=parseInt(t.target.value,10);if(!isNaN(e)){let t=s[this.postagetype.value].filter((t=>("kg"===t.abbreviation?1e3*t.value:t.value)>=e));t&&t.length>0&&(this.weight=t[0],this.weightvalue=this.weight.value)}}}}),e("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),e("div",{class:"weightoption-range"},e("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:this.weight.value?s[this.postagetype.value].findIndex((t=>t.value===this.weightvalue)):0,onChange:t=>{this.weight=s[this.postagetype.value][t.target.value],this.weightvalue=this.weight.value},min:"0",max:s[this.postagetype.value].length-1}),e("datalist",{id:"weightlist"},s[this.postagetype.value].map(((t,i)=>{let n=t.name;return s[this.postagetype.value].length>6&&(n=i%5==0||0===i||i===s[this.postagetype.value].length-1?t.name:""),e("option",Object.assign({value:i},n?{label:n}:{}))})))))):null,e("div",{class:"resultlist","data-list-count":this.filteredItems.length},this.filteredItems.map((t=>e("div",null,e("pn-find-price-result",{item:t}))))))}static get watchers(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],weightvalue:["filterItems"]}}};l.style='pn-product-pricelist pn-spinner{margin:1em auto}pn-product-pricelist h2,pn-product-pricelist .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-product-pricelist .content,pn-product-pricelist .weightselection,pn-product-pricelist .resultlist{max-width:50em;margin:0 auto 1.6rem}pn-product-pricelist .weightoption{display:-ms-flexbox;display:flex;gap:1.6rem}pn-product-pricelist .weightoption-input{width:5em;position:relative;display:none}pn-product-pricelist .weightoption-input input::-webkit-outer-spin-button,pn-product-pricelist .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-product-pricelist .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-product-pricelist .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-product-pricelist .weightoption-range input{width:calc(100% - 1.5em)}pn-product-pricelist .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-product-pricelist .resultlist:not([data-list-count="0"]){margin-top:2em}';export{l as pn_product_pricelist}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,a as s}from"./p-58e8d7d5.js";import{s as l}from"./p-e3ae421f.js";import{a as n,b as r,R as a}from"./p-f04541a1.js";import"./p-86f06e26.js";let e=class{constructor(s){t(this,s),this.item=null,this.shownitems=[],this.description=[],this.showMeasurement=!1,this.weightText="",this.linkId="",this.usp={Billigast:i("span",{slot:"Billigast"},this.item.highestrankusp,i("pn-icon",{symbol:"box-label",small:"false",color:"green700"})),Snabbast:i("span",{slot:"Snabbast"},this.item.highestrankusp,i("pn-icon",{symbol:"bolt",small:"false",color:"blue700"}))}}componentWillLoad(){this.composeItems()}composeItems(){if(this.item.additionalusp){var t=this.item.additionalusp.split("/");this.Usp1=t.length>0?t[0]:null,this.Usp2=t.length>1?t[1]:null,this.Usp3=t.length>2?t[2]:null}this.item.description&&(this.description=this.item.description.split("#bullet").filter((t=>""!==t))),this.showMeasurement=null!==this.item.maxmått||null!==this.item.rulle,this.linkId=`${this.item.id}-${this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g,"")}`}render(){return i(s,null,i("pn-product-card",{"data-productid":this.item.id},i("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),i("div",{slot:"title"},i("h2",null,this.item.infopagelink?i("a",{href:this.item.infopagelink,target:"_blank"},this.item.name):this.item.name),this.usp[this.item.highestrankusp]),i("div",{slot:"content"},i("div",{class:"content"},this.item.description?i("div",{class:"description"},this.description.map((t=>i("li",null,t)))):null,this.item.info?i("div",{class:"description"},this.item.info):null)),this.item.note?i("small",{slot:"note"},i("p",null,this.item.note)):null,this.item.additionalusp?i("div",{slot:"additionalUSP"},this.Usp1?i("span",null,this.Usp1):null,this.Usp2?i("span",null,this.Usp2):null,this.Usp3?i("span",null,this.Usp3):null):null,this.showMeasurement?i("pn-product-card-info",{paket:this.item.maxmått,rulle:this.item.rulle}):null,i("div",{slot:"cardprice"},this.item.pricesenddirect?i("pn-product-card-price",{slot:"sendDirectPrice",label:l.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:l.market.currency,url:n,linkid:this.linkId+"-portal"}):null,this.item.pricestamps?"riktiga vykort"!==this.item.name.toLocaleLowerCase()?i("pn-product-card-price",{slot:"stampPrice",label:l.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:l.market.currency,url:r,linkid:this.linkId+"-stampshop"}):i("pn-product-card-price",{slot:"riktiga",label:l.i18n.riktigaVykort,amount:this.item.pricestamps+"",currency:l.market.currency,url:a.WebUrl,linkid:this.linkId+"-riktiga"}):null),i("div",{slot:"servicepoint"},this.item.showservicepointlink?i("a",{href:l.market.servicePoint,target:"_blank"},i("pn-icon",{symbol:"map-marker",color:"blue700"}),l.i18n.servicePointLink):null),i("div",{slot:"mobiledownload"},"riktiga vykort"===this.item.name.toLocaleLowerCase()?i("div",{id:"riktiga"},i("h4",null,l.i18n.riktigaVykortMobile),i("div",null,i("a",{href:a.AndroidAppUrl,target:"_blank"},i("img",{class:"riktigaAndroidImg",src:a.AndroidImg})),i("a",{href:a.IosAppUrl,target:"_blank"},i("img",{class:"riktigaAppleImg",src:a.IosImg})))):null)))}static get watchers(){return{item:["composeItems"]}}};e.style="pn-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}";export{e as pn_find_price_result}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./p-86f06e26.js";const{state:t}=e({i18n:{componentheading:"",deliveryscopeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:"",servicePointHeader:"",servicePointLink:""},market:{currency:"",country:"",servicePoint:""}});export{t as s}
|
|
1
|
+
import{c as e}from"./p-86f06e26.js";const{state:t}=e({i18n:{componentheading:"",deliveryscopeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:"",servicePointHeader:"",servicePointLink:"",riktigaVykort:"",riktigaVykortMobile:""},market:{currency:"",country:"",servicePoint:""}});export{t as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var t,n,i;return{setters:[function(e){t=e.r;n=e.h;i=e.a}],execute:function(){var r='pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:"" !important}pn-product-card [slot=title]>[slot]{border-radius:0.4rem;height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem}pn-product-card [slot=title]>[slot] pn-icon{vertical-align:middle;margin-left:0.6em}pn-product-card [slot=title]>[slot=Billigast]{color:#005E41;background:#DCF6E7}pn-product-card [slot=title]>[slot=Snabbast]{background:#E0F8FF;color:#005D92}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:0.6em;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=mobiledownload]{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card [slot=mobiledownload] #riktiga{-ms-flex-order:4;order:4;margin-top:1em}pn-product-card [slot=mobiledownload] #riktiga>div>a::after{content:"" !important}pn-product-card [slot=mobiledownload] .riktigaAndroidImg{width:6em;margin:0.5em}pn-product-card [slot=mobiledownload] .riktigaAppleImg{width:5.6em;margin:0.5em}pn-product-card [slot=mobiledownload] a{text-decoration:none;color:#005D92}pn-product-card [slot=mobiledownload] a h3{text-decoration:underline}pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:2;flex-grow:2;-ms-flex-align:end;align-items:flex-end;text-align:center}@media screen and (min-width: 36em){pn-product-card [slot=servicepoint]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 1em 0.5em 0}';var o=e("pn_product_card",function(){function e(e){t(this,e)}e.prototype.render=function(){return n(i,null,n("slot",{name:"illustration"}),n("div",{class:"cardcontent"},n("div",{class:"details"},n("slot",{name:"title"}),n("slot",{name:"content"}),n("div",{class:"info"},n("slot",null)),n("slot",{name:"note"}),n("slot",{name:"additionalUSP"})),n("div",{class:"cardprice"},n("slot",{name:"cardprice"}),n("slot",{name:"mobiledownload"}),n("slot",{name:"servicepoint"}))))};return e}());o.style=r;var l='pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em;gap:1.6rem}@media screen and (min-width: 36em){.cardinfocontent{-ms-flex-direction:row;flex-direction:row}}.cardinfocontent>div p{margin:0.25em 0.25em 0 0}.cardinfocontent-item{margin-top:0.5em}[slot=formatPre]{font-family:"PostNordSans", "Verdana";margin:0.5em 3em 0 0}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}';var a=e("pn_product_card_info",function(){function e(e){t(this,e)}e.prototype.render=function(){return this.label?n(i,null,n("div",{class:"cardinfocontent"},this.text?n("pre",{slot:"formatPre"},this.text):null)):n(i,null,n("div",{class:"cardinfocontent"},this.paket?n("div",{class:"cardinfocontent-item"},n("strong",null,"Maxmått:"),this.paket.split("/").map((function(e){return e.split(":").length>0?n("p",null,n("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):n("p",null,e)}))):null,this.rulle?n("div",{class:"cardinfocontent-item"},n("strong",null,"Rulle:"),this.rulle.split("/").map((function(e){return e.split(":").length>0?n("p",null,n("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):n("p",null,e)}))):null))};return e}());n("pn-icon",{symbol:"align-center",small:"false",color:"black"});a.style=l;var c="pn-product-card-price{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-right:0}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price .price{font-size:2.5em;font-weight:bold;-ms-flex-order:1;order:1}pn-product-card-price pn-button{min-width:12.8em;font-size:1.25;-ms-flex-order:2;order:2}@media screen and (min-width: 48em){pn-product-card-price pn-button{-ms-flex-order:3;order:3;margin-bottom:1.6rem}}pn-product-card-price p{font-weight:lighter;font-size:0.875em;-ms-flex-item-align:center;align-self:center;margin-top:0.8rem;-ms-flex-order:3;order:3}@media screen and (min-width: 48em){pn-product-card-price p{-ms-flex-order:2;order:2}}";var d=e("pn_product_card_price",function(){function e(e){t(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?n(i,{id:this.linkid},n("div",{class:"price"},this.amount?n("span",null,this.amount):null,this.currency?n("span",null," "+this.currency):null),this.note?n("p",null,this.note):null,this.label?n("pn-button",{small:"true",icon:"open-in-new",appearance:"light",href:this.url,target:"_blank"},this.label):null):n(i,null,n("div",{class:"price"},this.amount?n("span",null,this.amount):null,this.currency?n("span",null,this.currency):null))};return e}());d.style=c}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-825b8fb8.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.c}],execute:function(){var
|
|
1
|
+
System.register(["./p-825b8fb8.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.c}],execute:function(){var i=t({i18n:{componentheading:"",deliveryscopeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:"",servicePointHeader:"",servicePointLink:"",riktigaVykort:"",riktigaVykortMobile:""},market:{currency:"",country:"",servicePoint:""}}),r=i.state,n=i.onChange;e("s",r)}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=[{name:"Small",value:"Small",illustration:"eli1n",unit:"small"},{name:"Medium",value:"Medium",illustration:"medium-package",unit:"medium"},{name:"Large",value:"Large",illustration:"large-package",unit:"large"}],e={small:[{name:"50 g",abbreviation:"g",value:50},{name:"100 g",abbreviation:"g",value:100},{name:"250 g",abbreviation:"g",value:250},{name:"500 g",abbreviation:"g",value:500},{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2}],medium:[{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2},{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}],large:[{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}]},i="https://com-integration.postnord.com/globalassets/global/prices/
|
|
1
|
+
const a=[{name:"Small",value:"Small",illustration:"eli1n",unit:"small"},{name:"Medium",value:"Medium",illustration:"medium-package",unit:"medium"},{name:"Large",value:"Large",illustration:"large-package",unit:"large"}],e={small:[{name:"50 g",abbreviation:"g",value:50},{name:"100 g",abbreviation:"g",value:100},{name:"250 g",abbreviation:"g",value:250},{name:"500 g",abbreviation:"g",value:500},{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2}],medium:[{name:"1 kg",abbreviation:"kg",value:1},{name:"2 kg",abbreviation:"kg",value:2},{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}],large:[{name:"3 kg",abbreviation:"kg",value:3},{name:"5 kg",abbreviation:"kg",value:5},{name:"10 kg",abbreviation:"kg",value:10},{name:"15 kg",abbreviation:"kg",value:15},{name:"20 kg",abbreviation:"kg",value:20}]},i={WebUrl:"https://riktigavykort.postnord.se/sv",AndroidAppUrl:"https://play.google.com/store/apps/details?id=se.posten.riktigavykort&hl=sv",AndroidImg:"https://com-integration.postnord.com/globalassets/icons/logos-and-badges/google-play-badge_se.svg",IosAppUrl:"https://apps.apple.com/se/app/riktiga-vykort/id444458799?l=sv",IosImg:"https://com-integration.postnord.com/globalassets/icons/logos-and-badges/app_store_badge_se_rgb_blk.svg"},t="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx",o="https://portal.postnord.com/skickadirekt/",g="https://shop.postnord.se/ebutik/default.aspx";export{i as R,o as a,g as b,t as f,a as s,e as w}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,N as n,w as a,p as t,H as i,b as r}from"./p-58e8d7d5.js";const l=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{l(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),o={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,a.location.href)).href,t(o))})().then((e=>r([["p-
|
|
1
|
+
import{d as e,N as n,w as a,p as t,H as i,b as r}from"./p-58e8d7d5.js";const l=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{l(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),o={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,a.location.href)).href,t(o))})().then((e=>r([["p-2a624d21",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[4,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-82daf429",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-774b7a9f",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-c1c3777d",[[4,"pn-product-pricelist",{source:[1],language:[1025],market:[1025],productid:[1],filteredItems:[32],sourceData:[32],gotData:[32],loading:[32],postagetype:[32],weight:[32],weightvalue:[32]}]]],["p-1ecf47ed",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-40264b65",[[0,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-51df9292",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-7665f7ee",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-81d764a0",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-e9fe5c54",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-d0155ddf",[[4,"pn-product-tile"]]],["p-b4f0228c",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-5c41acb2",[[0,"pn-profile-selector-option",{name:[1],identifier:[1],url:[1]}]]],["p-7d75ea68",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-227e1d46",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-f774e2cc",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-b2840380",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-product-card"]]],["p-61dbe832",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-c240b614",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-996d8a6a",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-c2fada23",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],usp:[16],weightText:[32],linkId:[32]}]]],["p-adc639c8",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-15112837",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-715d1ef7",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-8e146205",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-6c75474c",[[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[8,"i-1-8n"],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],loginManager:[32],toggleButtonText:[32],username:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)));
|
|
@@ -10,8 +10,10 @@ export declare class PnMarketwebSiteheaderLogin {
|
|
|
10
10
|
i18n: any;
|
|
11
11
|
emitEvents: boolean;
|
|
12
12
|
loginDialog: LoginDialog;
|
|
13
|
+
/** User Fullname */
|
|
14
|
+
fullname: string;
|
|
15
|
+
loggedin: boolean;
|
|
13
16
|
loginManager: MarketWebLoginManager;
|
|
14
|
-
loggedIn: boolean;
|
|
15
17
|
toggleButtonText: string;
|
|
16
18
|
username: string;
|
|
17
19
|
loginStateChange: EventEmitter;
|
package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts
CHANGED
|
@@ -12,7 +12,11 @@ export declare class PnMarketwebSiteheader {
|
|
|
12
12
|
/** Specifies which environment we're fetching data from. (production, preproduction, integration, localhost) */
|
|
13
13
|
environment: string;
|
|
14
14
|
/** Access token passed from backend */
|
|
15
|
-
|
|
15
|
+
userToken: string;
|
|
16
|
+
/** User Fullname */
|
|
17
|
+
userFullname: string;
|
|
18
|
+
/** User Logged in state from the backend */
|
|
19
|
+
userLoggedin: boolean;
|
|
16
20
|
/** Specifies which endpoint domain we should load from */
|
|
17
21
|
endpoint: string;
|
|
18
22
|
/** Hides the site selector if set to true*/
|
|
@@ -11,6 +11,8 @@ declare const state: {
|
|
|
11
11
|
message: string;
|
|
12
12
|
servicePointHeader: string;
|
|
13
13
|
servicePointLink: string;
|
|
14
|
+
riktigaVykort: string;
|
|
15
|
+
riktigaVykortMobile: string;
|
|
14
16
|
};
|
|
15
17
|
market: {
|
|
16
18
|
currency: string;
|
|
@@ -30,6 +32,8 @@ declare const state: {
|
|
|
30
32
|
message: string;
|
|
31
33
|
servicePointHeader: string;
|
|
32
34
|
servicePointLink: string;
|
|
35
|
+
riktigaVykort: string;
|
|
36
|
+
riktigaVykortMobile: string;
|
|
33
37
|
};
|
|
34
38
|
market: {
|
|
35
39
|
currency: string;
|
|
@@ -11,6 +11,8 @@ export declare const translations: {
|
|
|
11
11
|
message: string;
|
|
12
12
|
servicePointHeader: string;
|
|
13
13
|
servicePointLink: string;
|
|
14
|
+
riktigaVykort: string;
|
|
15
|
+
riktigaVykortMobile: string;
|
|
14
16
|
};
|
|
15
17
|
en: {
|
|
16
18
|
componentheading: string;
|
|
@@ -24,6 +26,8 @@ export declare const translations: {
|
|
|
24
26
|
message: string;
|
|
25
27
|
servicePointHeader: string;
|
|
26
28
|
servicePointLink: string;
|
|
29
|
+
riktigaVykort: string;
|
|
30
|
+
riktigaVykortMobile: string;
|
|
27
31
|
};
|
|
28
32
|
da: {
|
|
29
33
|
componentheading: string;
|
|
@@ -37,6 +41,7 @@ export declare const translations: {
|
|
|
37
41
|
message: string;
|
|
38
42
|
servicePointHeader: string;
|
|
39
43
|
servicePointLink: string;
|
|
44
|
+
riktigaVykort: string;
|
|
40
45
|
};
|
|
41
46
|
no: {
|
|
42
47
|
componentheading: string;
|
|
@@ -22,6 +22,8 @@ export interface PnfindPricei18n {
|
|
|
22
22
|
message: string;
|
|
23
23
|
servicePointHeader: string;
|
|
24
24
|
servicePointLink: string;
|
|
25
|
+
riktigaVykort: string;
|
|
26
|
+
riktigaVykortMobile: string;
|
|
25
27
|
}
|
|
26
28
|
export interface PnfindPriceMarket {
|
|
27
29
|
country: string;
|
|
@@ -35,6 +37,7 @@ export interface ProductPriceSourceData {
|
|
|
35
37
|
export interface ProductPriceItem {
|
|
36
38
|
sizecategory: string;
|
|
37
39
|
id: string;
|
|
40
|
+
rank?: number;
|
|
38
41
|
what: string;
|
|
39
42
|
deliveryscope: string;
|
|
40
43
|
name: string;
|
|
@@ -49,4 +52,6 @@ export interface ProductPriceItem {
|
|
|
49
52
|
note?: string;
|
|
50
53
|
description?: string;
|
|
51
54
|
illustration?: string;
|
|
55
|
+
showservicepointlink?: string;
|
|
56
|
+
infopagelink?: string;
|
|
52
57
|
}
|
package/types/components.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export namespace Components {
|
|
|
73
73
|
"item": ProductPriceItem;
|
|
74
74
|
"showMeasurement"?: boolean;
|
|
75
75
|
"shownitems": ProductPriceItem[];
|
|
76
|
+
"usp": { Billigast: any; Snabbast: any; };
|
|
76
77
|
}
|
|
77
78
|
interface PnFindServiceAndPrice {
|
|
78
79
|
"language": string;
|
|
@@ -272,10 +273,18 @@ export namespace Components {
|
|
|
272
273
|
* Event based only language switch
|
|
273
274
|
*/
|
|
274
275
|
"spaMode": boolean;
|
|
276
|
+
/**
|
|
277
|
+
* User Fullname
|
|
278
|
+
*/
|
|
279
|
+
"userFullname": string;
|
|
280
|
+
/**
|
|
281
|
+
* User Logged in state from the backend
|
|
282
|
+
*/
|
|
283
|
+
"userLoggedin": boolean;
|
|
275
284
|
/**
|
|
276
285
|
* Access token passed from backend
|
|
277
286
|
*/
|
|
278
|
-
"
|
|
287
|
+
"userToken": string;
|
|
279
288
|
}
|
|
280
289
|
interface PnMarketwebSiteheaderLogin {
|
|
281
290
|
"emitEvents": boolean;
|
|
@@ -283,7 +292,12 @@ export namespace Components {
|
|
|
283
292
|
* Specifies which endpoint domain we should load from
|
|
284
293
|
*/
|
|
285
294
|
"endpoint": string;
|
|
295
|
+
/**
|
|
296
|
+
* User Fullname
|
|
297
|
+
*/
|
|
298
|
+
"fullname": string;
|
|
286
299
|
"i18n": any;
|
|
300
|
+
"loggedin": boolean;
|
|
287
301
|
"loginDialog": LoginDialog;
|
|
288
302
|
/**
|
|
289
303
|
* Access token passed from backend
|
|
@@ -763,6 +777,7 @@ declare namespace LocalJSX {
|
|
|
763
777
|
"item"?: ProductPriceItem;
|
|
764
778
|
"showMeasurement"?: boolean;
|
|
765
779
|
"shownitems"?: ProductPriceItem[];
|
|
780
|
+
"usp"?: { Billigast: any; Snabbast: any; };
|
|
766
781
|
}
|
|
767
782
|
interface PnFindServiceAndPrice {
|
|
768
783
|
"language"?: string;
|
|
@@ -977,10 +992,18 @@ declare namespace LocalJSX {
|
|
|
977
992
|
* Event based only language switch
|
|
978
993
|
*/
|
|
979
994
|
"spaMode"?: boolean;
|
|
995
|
+
/**
|
|
996
|
+
* User Fullname
|
|
997
|
+
*/
|
|
998
|
+
"userFullname"?: string;
|
|
999
|
+
/**
|
|
1000
|
+
* User Logged in state from the backend
|
|
1001
|
+
*/
|
|
1002
|
+
"userLoggedin"?: boolean;
|
|
980
1003
|
/**
|
|
981
1004
|
* Access token passed from backend
|
|
982
1005
|
*/
|
|
983
|
-
"
|
|
1006
|
+
"userToken"?: string;
|
|
984
1007
|
}
|
|
985
1008
|
interface PnMarketwebSiteheaderLogin {
|
|
986
1009
|
"emitEvents"?: boolean;
|
|
@@ -988,7 +1011,12 @@ declare namespace LocalJSX {
|
|
|
988
1011
|
* Specifies which endpoint domain we should load from
|
|
989
1012
|
*/
|
|
990
1013
|
"endpoint"?: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* User Fullname
|
|
1016
|
+
*/
|
|
1017
|
+
"fullname"?: string;
|
|
991
1018
|
"i18n"?: any;
|
|
1019
|
+
"loggedin"?: boolean;
|
|
992
1020
|
"loginDialog"?: LoginDialog;
|
|
993
1021
|
"onLoginStateChange"?: (event: CustomEvent<any>) => void;
|
|
994
1022
|
/**
|
|
@@ -22,9 +22,10 @@ declare class MarketWebLoginManager {
|
|
|
22
22
|
expire: string;
|
|
23
23
|
expireDate: string;
|
|
24
24
|
};
|
|
25
|
+
overridetokenValue: string;
|
|
25
26
|
constructor(options?: IMarketWebLoginManagerOptions);
|
|
26
27
|
init(checkParameters?: boolean): void;
|
|
27
|
-
isLoggedIn(): boolean;
|
|
28
|
+
isLoggedIn(override?: boolean): boolean;
|
|
28
29
|
registerToken(token?: string, tokenSource?: string): void;
|
|
29
30
|
invalidateTokenOfType(tokenSource?: string): void;
|
|
30
31
|
getLoginUrl(redirectPage?: string): string;
|
|
@@ -50,34 +51,35 @@ interface IMarketWebLoginManagerOptions {
|
|
|
50
51
|
eventTarget?: EventTarget;
|
|
51
52
|
endpoint?: String;
|
|
52
53
|
storagePrefix?: String;
|
|
54
|
+
userInfo?: IUserInfo;
|
|
53
55
|
}
|
|
54
56
|
interface IUserInfo {
|
|
55
|
-
acr
|
|
56
|
-
ams
|
|
57
|
-
at_hash
|
|
58
|
-
aud
|
|
59
|
-
auth_time
|
|
60
|
-
created_at
|
|
61
|
-
email
|
|
62
|
-
email_verifier
|
|
63
|
-
emails
|
|
64
|
-
exp
|
|
65
|
-
family_name
|
|
66
|
-
given_name
|
|
67
|
-
iat
|
|
68
|
-
iss
|
|
69
|
-
jti
|
|
70
|
-
nonce
|
|
71
|
-
phone_number
|
|
72
|
-
phone_number_verified
|
|
73
|
-
phone_number_verified_at
|
|
74
|
-
phone_numbers
|
|
75
|
-
rat
|
|
76
|
-
sid
|
|
77
|
-
sub
|
|
78
|
-
uas_status
|
|
79
|
-
userId
|
|
80
|
-
username
|
|
57
|
+
acr?: string;
|
|
58
|
+
ams?: string[];
|
|
59
|
+
at_hash?: string;
|
|
60
|
+
aud?: string;
|
|
61
|
+
auth_time?: number;
|
|
62
|
+
created_at?: number;
|
|
63
|
+
email?: string;
|
|
64
|
+
email_verifier?: true;
|
|
65
|
+
emails?: IUserInfoEmail[];
|
|
66
|
+
exp?: number;
|
|
67
|
+
family_name?: string;
|
|
68
|
+
given_name?: string;
|
|
69
|
+
iat?: number;
|
|
70
|
+
iss?: string;
|
|
71
|
+
jti?: string;
|
|
72
|
+
nonce?: string;
|
|
73
|
+
phone_number?: string;
|
|
74
|
+
phone_number_verified?: boolean;
|
|
75
|
+
phone_number_verified_at?: string;
|
|
76
|
+
phone_numbers?: IUserInfoPhonenumber[];
|
|
77
|
+
rat?: number;
|
|
78
|
+
sid?: string;
|
|
79
|
+
sub?: string;
|
|
80
|
+
uas_status?: number;
|
|
81
|
+
userId?: string;
|
|
82
|
+
username?: string;
|
|
81
83
|
}
|
|
82
84
|
interface IUserInfoEmail {
|
|
83
85
|
email: string;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
const s = document.createElement('script');
|
|
20
20
|
s.setAttribute("type", "module");
|
|
21
|
-
s.setAttribute("src", "https://unpkg.com/@postnord/pn-marketweb-components@2.0.
|
|
21
|
+
s.setAttribute("src", "https://unpkg.com/@postnord/pn-marketweb-components@2.0.8-beta2/umd/standalone-loader-salesforce.js");
|
|
22
22
|
document.querySelector("head").appendChild(s);
|
|
23
23
|
|
|
24
24
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,o){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function s(t){try{c(o.next(t))}catch(e){r(e)}}function a(t){try{c(o["throw"](t))}catch(e){r(e)}}function c(t){t.done?n(t.value):i(t.value).then(s,a)}c((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return c([t,e])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(a){s=[6,a];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var MarketWebLoginManager=function(){function t(t){var e=this;if(t===void 0){t=null}var n;this.eventTarget=window!==null&&window!==void 0?window:document===null||document===void 0?void 0:document.body;this.endpoint="";this.storagePrefix="pn-user";this.baseUrls={at:"https://atportal.postnord.com/api/unified-login/backend",prod:"https://portal.postnord.com/api/unified-login/backend"};this.events={loginstatechange:"loginstatechange"};this.endpoints={authorizationEndpoint:"/authorization",tokenExchangeEndpoint:"/token",userInfoEndpoint:"/user",logoutEndpoint:"/logout"};this.keys={tokensource:"tokensource",token:"token",user:"user",expire:"expire",expireDate:"expiredate"};this.store={get:function(t){var n=window.sessionStorage.getItem("".concat(e.storagePrefix,"-").concat(t));if(!n){return n}if(n.indexOf("{")===0){try{return JSON.parse(n)}catch(o){}}if(n.indexOf(",")!==-1){return n.split(",")}return n},set:function(t,n){if(typeof n==="object"&&typeof n.length==="undefined"){window.sessionStorage.setItem("".concat(e.storagePrefix,"-").concat(t),JSON.stringify(n));return}window.sessionStorage.setItem("".concat(e.storagePrefix,"-").concat(t),n)},remove:function(t){window.sessionStorage.removeItem("".concat(e.storagePrefix,"-").concat(t))}};if(!t){return}this.eventTarget=t.eventTarget?t.eventTarget:this.eventTarget;this.endpoint=t.endpoint?t.endpoint:"".concat(window.location.protocol,"//").concat(window.location.host);(n=this.storagePrefix)!==null&&n!==void 0?n:this.storagePrefix=t.storagePrefix}t.prototype.init=function(t){if(t===void 0){t=true}if(t){this.checkParameters();this.checkExpireTime();if(this.store.get(this.keys.token)&&!this.store.get(this.keys.user)){this.fetchUserInfo()}this.loginStateChange()}};t.prototype.isLoggedIn=function(){var t=this.store.get(this.keys.token)&&this.store.get(this.keys.user)?true:false;return t};t.prototype.registerToken=function(t,e){if(t===void 0){t=""}if(e===void 0){e="frontend"}if(!t||t===this.getToken()){return}this.clearUserData();this.store.set(this.keys.tokensource,e);this.store.set(this.keys.token,t);this.fetchUserInfo()};t.prototype.invalidateTokenOfType=function(t){if(t===void 0){t="frontend"}var e=this.store.get(this.keys.token);if(!e){return}var n=this.store.get(this.keys.tokensource);if(n!==t){return}this.clearUserData()};t.prototype.getLoginUrl=function(t){if(t===void 0){t=""}var e=window.location.href;t=t?t:e;return"".concat(this.getBaseUrl()).concat(this.endpoints.authorizationEndpoint,"?redirectionUrl=").concat(t)};t.prototype.getLogoutUrl=function(t){if(t===void 0){t=""}t=window.location.origin+"/logout";return"".concat(this.getBaseUrl()).concat(this.endpoints.logoutEndpoint,"?redirectionUrl=").concat(t,"&authorization=").concat(this.store.get(this.keys.token))};t.prototype.getUserInfo=function(){if(this.isLoggedIn()){return this.store.get(this.keys.user)}};t.prototype.getEventTarget=function(){return this.eventTarget};t.prototype.checkExpireTime=function(){var t=this.store.get(this.keys.expire);if(!t){return}var e=new Date;var n=new Date(Math.floor(parseInt(t,10)*1e3));if(e>n){console.info("Login time has expired");this.clearUserData();this.loginStateChange()}};t.prototype.checkParameters=function(){if(!(window===null||window===void 0?void 0:window.location)){return}var t=new URLSearchParams(window.location.search);if(t.get("oneTimeCode")){var e=t.get("oneTimeCode");this.exchangeToken(e).then((function(){var t=window.location.href;var n=t.indexOf("?oneTimeCode")!==-1?"?":"&";history.replaceState({},document.querySelector("title").innerText,t.replace("".concat(n,"oneTimeCode=").concat(e),""))}))}};t.prototype.fetchUserInfo=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,o,i,r,s;return __generator(this,(function(a){switch(a.label){case 0:t=this.store.get(this.keys.token);e={method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:t}};return[4,fetch("".concat(this.getBaseUrl()).concat(this.endpoints.userInfoEndpoint),e)];case 1:n=a.sent();return[4,n.json()];case 2:o=a.sent();if(o){try{i=o.idToken,r=o.expiryTime;s=this.parseUserInfo(i);this.store.set(this.keys.user,s);this.store.set(this.keys.expire,r);this.store.set(this.keys.expireDate,new Date(Math.floor(parseInt(r,10)*1e3)));this.loginStateChange()}catch(c){console.error("Unable to get user information",c)}}return[2]}}))}))};t.prototype.clearUserData=function(){this.store.remove(this.keys.user);this.store.remove(this.keys.tokensource);this.store.remove(this.keys.token);this.store.remove(this.keys.expire);this.store.remove(this.keys.expireDate)};t.prototype.getToken=function(){return this.store.get(this.keys.token)};t.prototype.exchangeToken=function(t){return __awaiter(this,void 0,void 0,(function(){var e,n;return __generator(this,(function(o){switch(o.label){case 0:this.clearUserData();return[4,fetch("".concat(this.getBaseUrl()).concat(this.endpoints.tokenExchangeEndpoint,"?oneTimeCode=").concat(t))];case 1:e=o.sent();return[4,e.json()];case 2:n=o.sent().token;if(typeof n==="string"&&n){this.store.set(this.keys.token,n)}this.fetchUserInfo();return[2]}}))}))};t.prototype.loginStateChange=function(){if(!this.eventTarget){return}this.eventTarget.dispatchEvent(new CustomEvent(this.events.loginstatechange,{detail:this.isLoggedIn()}))};t.prototype.getBaseUrl=function(){var t=this;var e=["localhost","integration.","local."];var n=e.filter((function(e){return t.endpoint.indexOf(e)!==-1})).length>0;if(n){return this.baseUrls.at}return this.baseUrls.prod};t.prototype.parseUserInfo=function(t){var e=t.split(".")[1];var n=e.replace(/-/g,"+").replace(/_/g,"/");var o=decodeURIComponent(atob(n).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(o)};return t}();export{MarketWebLoginManager as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.r;n=e.h;r=e.a}],execute:function(){var i="pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title]>[slot]{border-radius:0.4rem;height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem}pn-product-card [slot=title]>[slot] pn-icon{vertical-align:middle;margin-left:0.6em}pn-product-card [slot=title]>[slot=Billigast]{color:#005E41;background:#DCF6E7}pn-product-card [slot=title]>[slot=Snabbast]{background:#E0F8FF;color:#005D92}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 2em 0.5em 0}";var o=e("pn_product_card",function(){function e(e){t(this,e)}e.prototype.render=function(){return n(r,null,n("slot",{name:"illustration"}),n("div",{class:"cardcontent"},n("div",{class:"details"},n("slot",{name:"title"}),n("slot",{name:"content"}),n("div",{class:"info"},n("slot",null)),n("slot",{name:"note"}),n("slot",{name:"additionalUSP"})),n("div",{class:"cardprice"},n("slot",{name:"cardprice"}))))};return e}());o.style=i;var l='pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em;gap:1.6rem}@media screen and (min-width: 36em){.cardinfocontent{-ms-flex-direction:row;flex-direction:row}}.cardinfocontent>div p{margin:0.25em 0.25em 0 0}.cardinfocontent-item{margin-top:0.5em}[slot=formatPre]{font-family:"PostNordSans", "Verdana";margin:0.5em 3em 0 0}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}';var a=e("pn_product_card_info",function(){function e(e){t(this,e)}e.prototype.render=function(){return this.label?n(r,null,n("div",{class:"cardinfocontent"},this.text?n("pre",{slot:"formatPre"},this.text):null)):n(r,null,n("div",{class:"cardinfocontent"},this.paket?n("div",{class:"cardinfocontent-item"},n("strong",null,"Maxmått:"),this.paket.split("/").map((function(e){return e.split(":").length>0?n("p",null,n("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):n("p",null,e)}))):null,this.rulle?n("div",{class:"cardinfocontent-item"},n("strong",null,"Rulle:"),this.rulle.split("/").map((function(e){return e.split(":").length>0?n("p",null,n("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):n("p",null,e)}))):null))};return e}());n("pn-icon",{symbol:"align-center",small:"false",color:"black"});a.style=l;var c="pn-product-card-price{margin-top:1.6rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-right:0}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price .price{font-size:2.5em;font-weight:bold;-ms-flex-order:1;order:1}pn-product-card-price pn-button{min-width:12.8em;margin-top:0.8rem;font-size:1.25;-ms-flex-order:2;order:2}@media screen and (min-width: 48em){pn-product-card-price pn-button{-ms-flex-order:3;order:3;margin-bottom:1.6rem}}pn-product-card-price p{font-weight:lighter;font-size:0.875em;-ms-flex-item-align:center;align-self:center;margin-top:0.8rem;-ms-flex-order:3;order:3}@media screen and (min-width: 48em){pn-product-card-price p{-ms-flex-order:2;order:2}}pn-product-card-price a{text-decoration:none;color:#005D92}pn-product-card-price a h3{text-decoration:underline}";var d=e("pn_product_card_price",function(){function e(e){t(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?n(r,{id:this.linkid},n("div",{class:"price"},this.amount?n("span",null,this.amount):null,this.currency?n("span",null," "+this.currency):null),this.note?n("p",null,this.note):null,this.label?n("pn-button",{small:"true",icon:"open-in-new",appearance:"light",href:this.url,target:"_blank"},this.label):null):n(r,null,n("div",{class:"price"},this.amount?n("span",null,this.amount):null,this.currency?n("span",null,this.currency):null))};return e}());d.style=c}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js","./p-f6fa6caa.system.js","./p-a7421a8e.system.js","./p-825b8fb8.system.js"],(function(t){"use strict";var i,s,e,n,l,r;return{setters:[function(t){i=t.r;s=t.h;e=t.a},function(t){n=t.s},function(t){l=t.a;r=t.b},function(){}],execute:function(){var o="pn-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}";var a=t("pn_find_price_result",function(){function t(t){i(this,t);this.item=null;this.shownitems=[];this.description=[];this.showMeasurement=false;this.weightText="";this.linkId=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){if(this.item.additionalusp){var t=this.item.additionalusp.split("/");this.Usp1=t.length>0?t[0]:null;this.Usp2=t.length>1?t[1]:null;this.Usp3=t.length>2?t[2]:null}if(this.item.description){this.description=this.item.description.split("#bullet").filter((function(t){return t!==""}))}this.showMeasurement=this.item.maxmått!==null||this.item.rulle!==null;this.linkId="".concat(this.item.id,"-").concat(this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g,""))};t.prototype.render=function(){return s(e,null,s("pn-product-card",{"data-productid":this.item.id},s("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),s("div",{slot:"title"},s("h2",null,this.item.name," "),this.item.highestrankusp?this.item.highestrankusp==="Billigast"?s("span",{slot:"Billigast"},this.item.highestrankusp,s("pn-icon",{symbol:"box-label",small:"false",color:"green700"})):s("span",{slot:"Snabbast"},this.item.highestrankusp,s("pn-icon",{symbol:"bolt",small:"false",color:"blue700"})):null),s("div",{slot:"content"},s("div",{class:"content"},this.item.description?s("div",{class:"description"},this.description.map((function(t){return s("li",null,t)}))):null,this.item.info?s("div",{class:"description"},this.item.info):null)),this.item.note?s("small",{slot:"note"},s("p",null,this.item.note)):null,this.item.additionalusp?s("div",{slot:"additionalUSP"},this.Usp1?s("span",null,this.Usp1):null,this.Usp2?s("span",null,this.Usp2):null,this.Usp3?s("span",null,this.Usp3):null):null,this.showMeasurement?s("pn-product-card-info",{paket:this.item.maxmått,rulle:this.item.rulle}):null,s("div",{slot:"cardprice"},this.item.pricesenddirect?s("pn-product-card-price",{slot:"sendDirectPrice",label:n.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:n.market.currency,url:l,linkid:this.linkId+"-portal"}):null,this.item.pricestamps?s("pn-product-card-price",{slot:"stampPrice",label:n.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:n.market.currency,url:r,linkid:this.linkId+"-stampshop"}):null)))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}());a.style=o}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,a as l}from"./p-58e8d7d5.js";import{s as i}from"./p-f9586bef.js";import{a as n,b as e}from"./p-d94d8879.js";import"./p-86f06e26.js";let o=class{constructor(s){t(this,s),this.item=null,this.shownitems=[],this.description=[],this.showMeasurement=!1,this.weightText="",this.linkId=""}componentWillLoad(){this.composeItems()}composeItems(){if(this.item.additionalusp){var t=this.item.additionalusp.split("/");this.Usp1=t.length>0?t[0]:null,this.Usp2=t.length>1?t[1]:null,this.Usp3=t.length>2?t[2]:null}this.item.description&&(this.description=this.item.description.split("#bullet").filter((t=>""!==t))),this.showMeasurement=null!==this.item.maxmått||null!==this.item.rulle,this.linkId=`${this.item.id}-${this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g,"")}`}render(){return s(l,null,s("pn-product-card",{"data-productid":this.item.id},s("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),s("div",{slot:"title"},s("h2",null,this.item.name," "),this.item.highestrankusp?"Billigast"===this.item.highestrankusp?s("span",{slot:"Billigast"},this.item.highestrankusp,s("pn-icon",{symbol:"box-label",small:"false",color:"green700"})):s("span",{slot:"Snabbast"},this.item.highestrankusp,s("pn-icon",{symbol:"bolt",small:"false",color:"blue700"})):null),s("div",{slot:"content"},s("div",{class:"content"},this.item.description?s("div",{class:"description"},this.description.map((t=>s("li",null,t)))):null,this.item.info?s("div",{class:"description"},this.item.info):null)),this.item.note?s("small",{slot:"note"},s("p",null,this.item.note)):null,this.item.additionalusp?s("div",{slot:"additionalUSP"},this.Usp1?s("span",null,this.Usp1):null,this.Usp2?s("span",null,this.Usp2):null,this.Usp3?s("span",null,this.Usp3):null):null,this.showMeasurement?s("pn-product-card-info",{paket:this.item.maxmått,rulle:this.item.rulle}):null,s("div",{slot:"cardprice"},this.item.pricesenddirect?s("pn-product-card-price",{slot:"sendDirectPrice",label:i.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:i.market.currency,url:n,linkid:this.linkId+"-portal"}):null,this.item.pricestamps?s("pn-product-card-price",{slot:"stampPrice",label:i.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:i.market.currency,url:e,linkid:this.linkId+"-stampshop"}):null)))}static get watchers(){return{item:["composeItems"]}}};o.style="pn-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}";export{o as pn_find_price_result}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(t){r(t)}}function s(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):a(e.value).then(o,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;a=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1];r=o;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(o);break}if(r[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(s){o=[6,s];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js","./p-d437da74.system.js","./p-55513980.system.js"],(function(e){"use strict";var t,n,i,a,r,o,s,l;return{setters:[function(e){t=e.r;n=e.e;i=e.h;a=e.a;r=e.g},function(e){o=e.F;s=e.M},function(e){l=e.M}],execute:function(){var h={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa"}};var d="body[data-siteheader-menuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-menuopen=true]{max-height:initial;overflow:initial}}pn-marketweb-siteheader{display:block;background:#FFFFFF}pn-marketweb-siteheader header{position:relative;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-webkit-box-shadow:0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);box-shadow:0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}@media screen and (min-width: 48em){pn-marketweb-siteheader header{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:initial;justify-content:initial}}pn-marketweb-siteheader .siteheader-row{display:-ms-flexbox;display:flex;-ms-flex-flow:row;flex-flow:row;-ms-flex-align:center;align-items:center;width:100%;padding:0 1.6rem;min-height:2em}pn-marketweb-siteheader .siteheader-row:not(:last-child){border-bottom:0.1rem solid #F3F2F2}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-row{-ms-flex-pack:justify;justify-content:space-between;min-height:3.2em}}pn-marketweb-siteheader .siteheader-topright{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}pn-marketweb-siteheader .siteheader-logocontainer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:relative;min-height:3em;background:#FFFFFF;z-index:1}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-logocontainer{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}}pn-marketweb-siteheader .siteheader-logolink{height:100%;max-height:6.4rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}pn-marketweb-siteheader .siteheader-logolink:hover,pn-marketweb-siteheader .siteheader-logolink:focus,pn-marketweb-siteheader .siteheader-logolink:active{-webkit-box-shadow:none;box-shadow:none}pn-marketweb-siteheader .siteheader-row>pn-marketweb-siteheader-search{display:none}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-row>pn-marketweb-siteheader-search{display:block}}pn-marketweb-siteheader pn-spinner{display:none}pn-marketweb-siteheader pn-nav-dropdown:not(.hydrated) .nav-dropdown-content-container{display:none}.siteheader-topleft pn-site-selector{padding:1rem 0;display:none}@media screen and (min-width: 48em){.siteheader-topleft pn-site-selector{display:block}}@media screen and (min-width: 60em){.siteheader-topleft pn-site-selector{margin-left:1.3rem}}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label,.siteheader-topleft pn-site-selector:is(a){font-size:0}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label pn-icon,.siteheader-topleft pn-site-selector:is(a) pn-icon{font-size:initial;margin-left:0}@media screen and (min-width: 60em){.siteheader-topleft pn-site-selector .pn-nav-dropdown-label,.siteheader-topleft pn-site-selector:is(a){font-size:initial}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label pn-icon,.siteheader-topleft pn-site-selector:is(a) pn-icon{margin-left:0.4em}}@media screen and (min-width: 60em){.siteheader-topright{margin-right:1.6rem}}.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{padding:1rem 0;display:none;-ms-flex-item-align:center;align-self:center}@media screen and (min-width: 48em){.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{display:block;margin-left:1rem}}@media screen and (min-width: 60em){.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{margin-left:1.6rem}}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label,.siteheader-topright>pn-language-selector:is(a),.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label,.siteheader-topright>pn-marketweb-siteheader-login:is(a),.siteheader-topright>a .pn-nav-dropdown-label,.siteheader-topright>a:is(a){font-size:0}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-language-selector:is(a) pn-icon,.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-marketweb-siteheader-login:is(a) pn-icon,.siteheader-topright>a .pn-nav-dropdown-label pn-icon,.siteheader-topright>a:is(a) pn-icon{font-size:initial;margin-left:0}@media screen and (min-width: 60em){.siteheader-topright>pn-language-selector .pn-nav-dropdown-label,.siteheader-topright>pn-language-selector:is(a),.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label,.siteheader-topright>pn-marketweb-siteheader-login:is(a),.siteheader-topright>a .pn-nav-dropdown-label,.siteheader-topright>a:is(a){font-size:initial}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-language-selector:is(a) pn-icon,.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-marketweb-siteheader-login:is(a) pn-icon,.siteheader-topright>a .pn-nav-dropdown-label pn-icon,.siteheader-topright>a:is(a) pn-icon{margin-left:0.4em}}.siteheader-menu{max-width:100%;width:100%;overflow:visible;overflow-x:clip}@media screen and (min-width: 60em){.siteheader-menu{margin-top:auto;overflow:visible}}.siteheader-menu pn-mainnav-link a[target]::after{content:none}.siteheader-menu pn-marketweb-siteheader-search{padding:0.3rem 1.6rem;width:100%}.siteheader-menu [slot=top] pn-search-field{width:100%}.siteheader-menu-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.siteheader-menu-footer>*{margin:1.6rem}";var c=e("pn_marketweb_siteheader",function(){function e(e){t(this,e);this.changeLanguage=n(this,"changeLanguage",7);this.changeMarket=n(this,"changeMarket",7);this.endpointPath="/api/navigation/header";this.market=null;this.language=null;this.environment=null;this.token="";this.endpoint=null;this.hideSiteSelector=false;this.hideLanguageSelector=false;this.hideSearch=false;this.hideLogin=false;this.AutocompleteEndpoint="";this.sessionForward=false;this.cache=false;this.spaMode=false;this.gotData=false;this.fetchingData=false;this.homePageLink="/";this.menuItems=[];this.search={AutocompleteEndpoint:this.AutocompleteEndpoint};this.siteSelector=null;this.languageSelector=null;this.languageOptions=[];this.loginDialog=null;this.minimizeSearch=false;this.loggedIn=false;this.fetchHelper=new o("siteheader");this.loginManager=null}e.prototype.componentWillLoad=function(){var e=this;this.loginManager=new l({eventTarget:this.hostElement});this.setInitialValues().then((function(){e.init()}))};e.prototype.setInitialValues=function(e){if(e===void 0){e=window.location.href}return __awaiter(this,void 0,void 0,(function(){var t,n,i,i,a,r;return __generator(this,(function(o){switch(o.label){case 0:n=new s(e);if(!!this.market)return[3,2];return[4,n.getMarket()];case 1:i=o.sent();this.market=i;o.label=2;case 2:if(!!this.language)return[3,4];return[4,n.getLanguage()];case 3:i=o.sent();this.language=i;o.label=4;case 4:if(!!this.environment)return[3,6];a=this;return[4,n.getEnvironmentName()];case 5:a.environment=o.sent();o.label=6;case 6:if(!(!this.endpoint&&((t=this.environment)===null||t===void 0?void 0:t.indexOf("local"))===-1))return[3,8];r=this;return[4,n.getEndpoint(this.environment,this.market)];case 7:r.endpoint=o.sent();o.label=8;case 8:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.setTranslations();return[4,this.fetchData()];case 1:t.sent();window.setTimeout((function(){e.checkMenuOverflow()}),50);return[2]}}))}))};e.prototype.setTranslations=function(){if(this.language&&h[this.language]){this.i18n=h[this.language]}};e.prototype.onLanguageSelectorChange=function(e){this.language=e.detail;window.dispatchEvent(new CustomEvent("marketweb-languagechange",{detail:this.language}))};e.prototype.onLanguageChange=function(){this.setTranslations();this.changeLanguage.emit(this.language);this.fetchData()};e.prototype.onMarketChange=function(){this.changeMarket.emit(this.market);this.fetchData()};e.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:if(this.endpoint===null||!this.market||!this.language){return[2]}this.fetchingData=true;e=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;t="".concat(e).concat(this.endpointPath,"?market=").concat(this.market,"&language=").concat(this.language);return[4,this.fetchHelper.fetchJson(t,{mode:"cors"},this.cache,this.onFetchRefreshed.bind(this))];case 1:n=i.sent();return[4,this.setStateFromData(n)];case 2:i.sent();return[2]}}))}))};e.prototype.onFetchRefreshed=function(e){this.setStateFromData(e)};e.prototype.getLanguageVersionUrl=function(e){if(this.spaMode){return null}var t=document.querySelector('link[rel="alternate"][hreflang="'.concat(e.twoLetterISOLanguageName,'"]'));if(t){return t.getAttribute("href")}var n=this.siteDefinition.url;return n+(n.lastIndexOf("/")!==n.length-1?"/":"")+e.twoLetterISOLanguageName};e.prototype.setStateFromData=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,i;var a=this;return __generator(this,(function(r){switch(r.label){case 0:if(typeof e!=="object"){console.warn("Data was not valid",e)}this.siteDefinition=e.sitedefinition;this.menuItems=e.mainMenu.menuItems;if(!this.menuItems[0]||((t=this.menuItems[0])===null||t===void 0?void 0:t.name)!==this.i18n.menuHomeButton){this.menuItems.unshift({href:this.siteDefinition.url,name:this.i18n.menuHomeButton,id:"homelink",open:false,selected:false,children:[]})}this.search=Object.assign(Object.assign({},e.search),{AutocompleteEndpoint:this.AutocompleteEndpoint});this.siteSelector=e.siteSelectorViewModel;this.languageSelector=e.languageSelectorViewModel;this.setLanguageOptions();this.loginDialog=e.loginViewModel;return[4,this.spaModeAdjustments()];case 1:r.sent();this.gotData=true;this.fetchingData=true;this.homePageLink=(i=(n=this.siteDefinition)===null||n===void 0?void 0:n.url)!==null&&i!==void 0?i:document.location.hostname;window.setTimeout((function(){a.checkMenuOverflow()}),100);return[2]}}))}))};e.prototype.setLanguageOptions=function(){var e;if(!this.languageSelector||!this.languageSelector.languages){return}var t=(e=Array.prototype.slice.call(document.querySelectorAll('link[rel="alternate"][hreflang]')))!==null&&e!==void 0?e:[];var n=t.map((function(e){return e.getAttribute("hreflang")}));var i=[];this.languageSelector.languages.map((function(e){if(n&&n.length>0){if(n.includes(e.twoLetterISOLanguageName)){i.push(e)}}else{i.push(e)}}));this.languageOptions=i};e.prototype.spaModeAdjustments=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.spaMode){return[2]}return[2]}))}))};e.prototype.onLoginStateChange=function(e){var t,n,i;if(((t=e.detail)===null||t===void 0?void 0:t.loggedIn)&&((n=e.detail)===null||n===void 0?void 0:n.token)){this.loggedIn=((i=e.detail)===null||i===void 0?void 0:i.loggedIn)===true}};e.prototype.promotedItemId=function(e){return"promo-"+e.linkText.replace(/[^A-Za-z0-9.\\\/]/gim,"")};e.prototype.handleResize=function(){var e=this;requestAnimationFrame((function(){e.checkMenuOverflow()}))};e.prototype.checkMenuOverflow=function(){var e=this.hostElement.querySelectorAll(".siteheader-row")[1];if(!e){return}var t=e.querySelector("pn-mainnav-level");if(!t){return}var n=t.parentElement;if(n.tagName.toLocaleLowerCase()!=="nav"){return}var i=n.scrollWidth;var a=t.clientWidth;var r=i<a;if(r&&this.minimizeSearch===false){this.minimizeSearch=true}};e.prototype.adjustSiteSelectorUrl=function(e){if(!this.loggedIn){return e}var t=["portal.postnord.com"];var n=t.filter((function(t){return e.indexOf(t)!==-1}));if(n.length===0){return e}return this.loginManager.getLoginUrl(e)};e.prototype.render=function(){var e=this;var t,n,r,o,s,l;return i(a,{language:this.language,market:this.market,environment:this.environment},i("header",null,i("div",{class:"siteheader-row"},i("div",{class:"siteheader-topleft"},i("slot",{name:"topleft"}),this.gotData&&this.siteSelector&&!this.hideSiteSelector&&i("pn-site-selector",{language:this.language,buttontext:(n=(t=this.siteSelector)===null||t===void 0?void 0:t.currentSiteTitle)!==null&&n!==void 0?n:"postnord"},this.gotData&&((r=this.siteSelector)===null||r===void 0?void 0:r.currentSiteTitle)&&i("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle+" ",description:this.siteSelector.currentSiteDescription}),this.gotData&&((o=this.siteSelector)===null||o===void 0?void 0:o.siteSelections)&&this.siteSelector.siteSelections.map((function(t){return i("pn-site-selector-item",{heading:t.linkText+" ",description:t.linkDescription,url:e.adjustSiteSelectorUrl(t.href),newwindow:t.openInNewWindow})})))),i("div",{class:"siteheader-logocontainer"},i("a",{href:this.homePageLink,title:"Home",class:"siteheader-logolink"},i("svg",{class:"siteheader-logo",xmlns:"http://www.w3.org/2000/svg",width:"12.7rem",height:"2.4rem",viewBox:"0 0 141.73 26.65"},i("path",{d:"M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z",fill:"#00A0D6",transform:"translate(0 0)"})))),i("div",{class:"siteheader-topright"},i("slot",{name:"toprightstart"}),this.gotData&&this.loginDialog&&!this.hideLogin&&i("pn-marketweb-siteheader-login",{token:this.token,loginDialog:this.loginDialog,endpoint:this.endpoint,i18n:this.i18n}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&i("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return i("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),i("slot",{name:"toprightend"}))),i("div",{class:"siteheader-row"},i("div",{class:"siteheader-menu"},this.gotData&&this.menuItems&&i("pn-mainnav",{market:this.market,language:this.language,onMenuOpenChange:function(e){document.body.setAttribute("data-siteheader-menuopen",e.detail+"")}},i("pn-mainnav-level",null,i("pn-mainnav-list",null,this.menuItems.map((function(t){var n,a;return i("pn-mainnav-link",{name:t.name,href:t.href,itemid:t.id,target:(n=t.linkTarget)!==null&&n!==void 0?n:"_self",linkid:t.trackingId},(t.promotedMenuItems&&t.promotedMenuItems.length>0||t.children&&t.children.length>0)&&i("pn-mainnav-level",null,t.children.length>0&&i("pn-mainnav-list",{heading:(a=t.navigationHeading)!==null&&a!==void 0?a:""},t.children.map((function(e){var t;return i("pn-mainnav-link",{name:e.name,href:e.href,target:(t=e.linkTarget)!==null&&t!==void 0?t:"_self",linkid:e.trackingId})}))),t.promotedMenuItems&&t.promotedMenuItems.length>0&&i("pn-mainnav-list",{heading:t.promotedMenuItemsHeader},t.promotedMenuItems.map((function(n){return i("pn-mainnav-link",{href:n.href,name:n.linkText,target:n.openInNewWindow?"_blank":"_self",linkid:e.promotedItemId(n)+t.id})})))))}))),i("div",{slot:"footer",class:"siteheader-menu-footer"},this.gotData&&this.loginDialog&&!this.hideLogin&&i("pn-marketweb-siteheader-login",{emitEvents:false,loginDialog:this.loginDialog,endpoint:this.endpoint,i18n:this.i18n}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&i("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return i("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),!this.hideSiteSelector&&i("pn-site-selector",{language:this.language},this.gotData&&((s=this.siteSelector)===null||s===void 0?void 0:s.currentSiteTitle)&&i("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle,description:this.siteSelector.currentSiteDescription}),this.gotData&&((l=this.siteSelector)===null||l===void 0?void 0:l.siteSelections)&&this.siteSelector.siteSelections.map((function(e){return i("pn-site-selector-item",{heading:e.linkText,description:e.linkDescription,url:e.pageLink,newwindow:e.openInNewWindow})})))),i("div",{slot:"top",class:"siteheader-menu-top"},i("pn-marketweb-siteheader-search",{language:this.language,search:this.search,"hide-search":this.hideSearch,i18n:this.i18n}))))),i("pn-marketweb-siteheader-search",{language:this.language,primary:true,search:this.search,"hide-search":this.hideSearch,"show-only-link":this.minimizeSearch,i18n:this.i18n}))))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["onLanguageChange"],market:["onMarketChange"]}},enumerable:false,configurable:true});return e}());c.style=d}}}));
|