@postnord/pn-marketweb-components 2.0.78 → 2.0.80
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/{MarketWebContextService-5840b8e0.js → FetchHelper-c6cee722.js} +85 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-bonus-progressbar-level.cjs.entry.js +1 -1
- package/cjs/pn-bonus-progressbar.cjs.entry.js +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +2 -3
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +2 -3
- package/cjs/pn-product-card_4.cjs.entry.js +1 -1
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +108 -0
- package/cjs/pn-proxio-productcard_4.cjs.entry.js +67 -0
- package/collection/collection-manifest.json +4 -1
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.css +3 -3
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +0 -1
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.stories.js +69 -24
- package/collection/components/minor/pn-titletag/pn-titletag.css +4 -0
- package/collection/components/minor/pn-titletag/title-tag.stories.js +1 -0
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +71 -0
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +204 -0
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.stories.js +27 -0
- package/collection/components/widgets/pn-proxio-pricegroup/translations.js +16 -0
- package/collection/components/widgets/pn-proxio-pricegroup/types.js +1 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.css +6 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +93 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.css +6 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +67 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.css +13 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.js +69 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.css +60 -0
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +11 -8
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.stories.js +42 -5
- package/custom-elements/index.d.ts +22 -4
- package/custom-elements/index.js +177 -58
- package/esm/{MarketWebContextService-160bf3dd.js → FetchHelper-1dfe8514.js} +85 -1
- package/esm/loader.js +1 -1
- package/esm/pn-bonus-progressbar-level.entry.js +1 -1
- package/esm/pn-bonus-progressbar.entry.js +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-sitefooter.entry.js +1 -2
- package/esm/pn-marketweb-siteheader.entry.js +1 -2
- package/esm/pn-product-card_4.entry.js +1 -1
- package/esm/pn-proxio-pricegroup.entry.js +104 -0
- package/esm/pn-proxio-productcard_4.entry.js +60 -0
- package/esm-es5/{MarketWebContextService-160bf3dd.js → FetchHelper-1dfe8514.js} +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
- package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_4.entry.js +1 -1
- package/esm-es5/pn-proxio-pricegroup.entry.js +1 -0
- package/esm-es5/pn-proxio-productcard_4.entry.js +1 -0
- package/package.json +1 -1
- package/pn-market-web-components/{p-f1812fbb.entry.js → p-022d9a78.entry.js} +1 -1
- package/pn-market-web-components/{p-3ce2b566.system.entry.js → p-1151bf60.system.entry.js} +1 -1
- package/pn-market-web-components/{p-5b750c06.system.entry.js → p-198d9c77.system.entry.js} +1 -1
- package/pn-market-web-components/p-36a1b8e1.system.entry.js +1 -0
- package/pn-market-web-components/p-4bef1bf3.entry.js +1 -0
- package/pn-market-web-components/p-5482774f.entry.js +1 -0
- package/pn-market-web-components/p-6174a610.system.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-6c8d3789.system.entry.js +1 -0
- package/pn-market-web-components/p-6d08e5cc.system.entry.js +1 -0
- package/pn-market-web-components/{p-e8d97347.entry.js → p-7ce41d14.entry.js} +1 -1
- package/pn-market-web-components/p-942ad206.system.entry.js +1 -0
- package/pn-market-web-components/p-c3ea7666.entry.js +1 -0
- package/pn-market-web-components/p-c5f4d6c1.entry.js +1 -0
- package/pn-market-web-components/p-df9708f2.entry.js +1 -0
- package/pn-market-web-components/p-e54d477c.system.entry.js +1 -0
- package/pn-market-web-components/{p-0a7b7046.js → p-f0f58646.js} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.d.ts +23 -0
- package/types/components/widgets/pn-proxio-pricegroup/translations.d.ts +16 -0
- package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +36 -0
- package/types/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.d.ts +7 -0
- package/types/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.d.ts +6 -0
- package/types/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.d.ts +6 -0
- package/types/components.d.ts +77 -11
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/cjs/FetchHelper-f80943bf.js +0 -87
- package/cjs/pn-proxio-pricefinder.cjs.entry.js +0 -43
- package/cjs/pn-proxio-productcard.cjs.entry.js +0 -19
- package/collection/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.css +0 -0
- package/collection/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.js +0 -98
- package/collection/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.stories.js +0 -22
- package/esm/FetchHelper-a0c8aa54.js +0 -85
- package/esm/pn-proxio-pricefinder.entry.js +0 -39
- package/esm/pn-proxio-productcard.entry.js +0 -15
- package/esm-es5/FetchHelper-a0c8aa54.js +0 -1
- package/esm-es5/pn-proxio-pricefinder.entry.js +0 -1
- package/esm-es5/pn-proxio-productcard.entry.js +0 -1
- package/pn-market-web-components/p-059e4c47.system.entry.js +0 -1
- package/pn-market-web-components/p-1a97780a.system.js +0 -1
- package/pn-market-web-components/p-2745cc43.entry.js +0 -1
- package/pn-market-web-components/p-2b8aa6a9.entry.js +0 -1
- package/pn-market-web-components/p-42a56aeb.entry.js +0 -1
- package/pn-market-web-components/p-831c0495.system.entry.js +0 -1
- package/pn-market-web-components/p-8985b02b.system.entry.js +0 -1
- package/pn-market-web-components/p-8b9961c9.system.entry.js +0 -1
- package/pn-market-web-components/p-97dc5687.js +0 -1
- package/pn-market-web-components/p-a89a2eb3.entry.js +0 -1
- package/pn-market-web-components/p-b8e9177e.system.entry.js +0 -1
- package/pn-market-web-components/p-c7afc979.entry.js +0 -1
- package/pn-market-web-components/p-d6a17042.system.js +0 -1
- package/types/components/widgets/pn-proxio-pricefinder/pn-proxio-pricefinder.d.ts +0 -13
|
@@ -1 +1 @@
|
|
|
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}}};import{r as registerInstance,e as createEvent,h,a as Host,g as getElement}from"./index-5397620b.js";import{M as MarketWebContextService}from"./MarketWebContextService-160bf3dd.js";import{M as MarketWebLoginManager}from"./MarketWebLoginManager-0dd17ff6.js";import{F as FetchHelper}from"./FetchHelper-a0c8aa54.js";var translations={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start",profileSelectionFlyoutHeading:"Inloggad som"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logged in as"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logget ind som"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logget på som"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa",profileSelectionFlyoutHeading:"Kirjautunut sisään nimellä"},de:{searchlabel:"Suche",searchplaceholder:"Wonach suchen Sie?",searchbuttontext:"Suche",menuHomeButton:"Start",menuGoBackButton:"Geh zurück",mainMenuButton:"Menü",menuStartButton:"Start",profileSelectionFlyoutHeading:"Eingeloggt als"}};var pnMarketwebSiteheaderCss="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;max-width:30rem;min-width:23.3rem;width:100%}}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 PnMarketwebSiteheader=function(){function e(e){registerInstance(this,e);this.changeLanguage=createEvent(this,"changeLanguage",7);this.changeMarket=createEvent(this,"changeMarket",7);this.endpointPath="/api/navigation/header";this.market=null;this.language=null;this.siteid=null;this.environment=null;this.userToken="";this.userFullname="";this.userLoggedin=false;this.endpoint=null;this.hideSiteSelector=false;this.hideLanguageSelector=false;this.hideSearch=false;this.hideLogin=false;this.showProfileSelection=false;this.siteDomainInUrls=false;this.AutocompleteEndpoint="";this.sessionForward=false;this.cache=false;this.spaMode=false;this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""};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 FetchHelper("siteheader");this.loginManager=null}e.prototype.componentWillLoad=function(){var e=this;this.loginManager=new MarketWebLoginManager({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 MarketWebContextService(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&&translations[this.language]){this.i18n=translations[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,a;var r=this;return __generator(this,(function(o){switch(o.label){case 0:if(typeof e!=="object"){console.warn("Data was not valid",e)}this.siteDefinition=e.sitedefinition;if(this.siteDomainInUrls){this.menuItems=e.mainMenu.menuItems.map((function(e){return r.adjustMenuItemUrls(e)}))}else{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();a=e.loginViewModel;if(a&&this.siteDomainInUrls){a.loggedInLinks=a.loggedInLinks.map((function(e){e.href=r.adjustHref(e.href);return e}));a.loginMenuLinks=a.loginMenuLinks.map((function(e){e.href=r.adjustHref(e.href);return e}))}this.loginDialog=a;return[4,this.spaModeAdjustments()];case 1:o.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(){r.checkMenuOverflow()}),100);return[2]}}))}))};e.prototype.adjustMenuItemUrls=function(e){var t=this;e.href=this.adjustHref(e.href);if(e.children&&e.children.length>0){var n=e.children.map((function(e){return t.adjustMenuItemUrls(e)}));e.children=n}return e};e.prototype.adjustHref=function(e){if(e.indexOf("http")===0){return e}var t=this.siteDefinition.url.lastIndexOf("/")===this.siteDefinition.url.length-1?this.siteDefinition.url.substring(0,this.siteDefinition.url.length-1):this.siteDefinition.url;e=t+e;return e};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){var t=e.getAttribute("hreflang");if(t.indexOf("en-")!==-1||t.indexOf("en_")!==-1){t=t.substring(0,2)}return t}));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,i,a,r,o;return h(Host,{language:this.language,market:this.market,environment:this.environment},h("header",null,h("div",{class:"siteheader-row"},h("div",{class:"siteheader-topleft"},h("slot",{name:"topleft"}),this.gotData&&this.siteSelector&&!this.hideSiteSelector&&h("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&&((i=this.siteSelector)===null||i===void 0?void 0:i.currentSiteTitle)&&h("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle+" ",description:this.siteSelector.currentSiteDescription}),this.gotData&&((a=this.siteSelector)===null||a===void 0?void 0:a.siteSelections)&&this.siteSelector.siteSelections.map((function(t){return h("pn-site-selector-item",{heading:t.linkText+" ",description:t.linkDescription,url:e.adjustSiteSelectorUrl(t.href),newwindow:t.openInNewWindow})})))),h("div",{class:"siteheader-logocontainer"},h("a",{href:this.homePageLink,title:"Home",class:"siteheader-logolink"},h("slot",{name:"logo"},h("svg",{class:"siteheader-logo",xmlns:"http://www.w3.org/2000/svg",width:"12.7rem",height:"2.4rem",viewBox:"0 0 141.73 26.65"},h("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)"}))))),h("div",{class:"siteheader-topright"},h("slot",{name:"toprightstart"}),this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{token:this.userToken,fullname:this.userFullname,loggedin:this.userLoggedin,loginDialog:this.loginDialog,endpoint:this.endpoint,i18n:this.i18n,showProfileSelection:this.showProfileSelection}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),h("slot",{name:"toprightend"}))),h("div",{class:"siteheader-row"},h("div",{class:"siteheader-menu"},this.gotData&&this.menuItems&&h("pn-mainnav",{market:this.market,language:this.language,onMenuOpenChange:function(e){document.body.setAttribute("data-siteheader-menuopen",e.detail+"")}},h("pn-mainnav-level",null,h("pn-mainnav-list",null,this.menuItems.map((function(t){var n,i;return h("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)&&h("pn-mainnav-level",null,t.children.length>0&&h("pn-mainnav-list",{heading:(i=t.navigationHeading)!==null&&i!==void 0?i:""},t.children.map((function(e){var t;return h("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&&h("pn-mainnav-list",{heading:t.promotedMenuItemsHeader},t.promotedMenuItems.map((function(n){return h("pn-mainnav-link",{href:n.href,name:n.linkText,target:n.openInNewWindow?"_blank":"_self",linkid:e.promotedItemId(n)+t.id})})))))}))),h("div",{slot:"footer",class:"siteheader-menu-footer"},this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{emitEvents:false,loginDialog:this.loginDialog,endpoint:this.endpoint,fullname:this.userFullname,loggedin:this.userLoggedin,i18n:this.i18n,showProfileSelection:this.showProfileSelection}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),!this.hideSiteSelector&&h("pn-site-selector",{language:this.language},this.gotData&&((r=this.siteSelector)===null||r===void 0?void 0:r.currentSiteTitle)&&h("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(e){return h("pn-site-selector-item",{heading:e.linkText,description:e.linkDescription,url:e.pageLink,newwindow:e.openInNewWindow})})))),h("div",{slot:"top",class:"siteheader-menu-top"},h("pn-marketweb-siteheader-search",{language:this.language,siteid:this.siteid,search:this.search,"hide-search":this.hideSearch,i18n:this.i18n}))))),h("pn-marketweb-siteheader-search",{language:this.language,siteid:this.siteid,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 getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["onLanguageChange"],market:["onMarketChange"]}},enumerable:false,configurable:true});return e}();PnMarketwebSiteheader.style=pnMarketwebSiteheaderCss;export{PnMarketwebSiteheader as pn_marketweb_siteheader};
|
|
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}}};import{r as registerInstance,e as createEvent,h,a as Host,g as getElement}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-1dfe8514.js";import{M as MarketWebLoginManager}from"./MarketWebLoginManager-0dd17ff6.js";var translations={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start",profileSelectionFlyoutHeading:"Inloggad som"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logged in as"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logget ind som"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logget på som"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa",profileSelectionFlyoutHeading:"Kirjautunut sisään nimellä"},de:{searchlabel:"Suche",searchplaceholder:"Wonach suchen Sie?",searchbuttontext:"Suche",menuHomeButton:"Start",menuGoBackButton:"Geh zurück",mainMenuButton:"Menü",menuStartButton:"Start",profileSelectionFlyoutHeading:"Eingeloggt als"}};var pnMarketwebSiteheaderCss="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;max-width:30rem;min-width:23.3rem;width:100%}}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 PnMarketwebSiteheader=function(){function e(e){registerInstance(this,e);this.changeLanguage=createEvent(this,"changeLanguage",7);this.changeMarket=createEvent(this,"changeMarket",7);this.endpointPath="/api/navigation/header";this.market=null;this.language=null;this.siteid=null;this.environment=null;this.userToken="";this.userFullname="";this.userLoggedin=false;this.endpoint=null;this.hideSiteSelector=false;this.hideLanguageSelector=false;this.hideSearch=false;this.hideLogin=false;this.showProfileSelection=false;this.siteDomainInUrls=false;this.AutocompleteEndpoint="";this.sessionForward=false;this.cache=false;this.spaMode=false;this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""};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 FetchHelper("siteheader");this.loginManager=null}e.prototype.componentWillLoad=function(){var e=this;this.loginManager=new MarketWebLoginManager({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 MarketWebContextService(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&&translations[this.language]){this.i18n=translations[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,a;var r=this;return __generator(this,(function(o){switch(o.label){case 0:if(typeof e!=="object"){console.warn("Data was not valid",e)}this.siteDefinition=e.sitedefinition;if(this.siteDomainInUrls){this.menuItems=e.mainMenu.menuItems.map((function(e){return r.adjustMenuItemUrls(e)}))}else{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();a=e.loginViewModel;if(a&&this.siteDomainInUrls){a.loggedInLinks=a.loggedInLinks.map((function(e){e.href=r.adjustHref(e.href);return e}));a.loginMenuLinks=a.loginMenuLinks.map((function(e){e.href=r.adjustHref(e.href);return e}))}this.loginDialog=a;return[4,this.spaModeAdjustments()];case 1:o.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(){r.checkMenuOverflow()}),100);return[2]}}))}))};e.prototype.adjustMenuItemUrls=function(e){var t=this;e.href=this.adjustHref(e.href);if(e.children&&e.children.length>0){var n=e.children.map((function(e){return t.adjustMenuItemUrls(e)}));e.children=n}return e};e.prototype.adjustHref=function(e){if(e.indexOf("http")===0){return e}var t=this.siteDefinition.url.lastIndexOf("/")===this.siteDefinition.url.length-1?this.siteDefinition.url.substring(0,this.siteDefinition.url.length-1):this.siteDefinition.url;e=t+e;return e};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){var t=e.getAttribute("hreflang");if(t.indexOf("en-")!==-1||t.indexOf("en_")!==-1){t=t.substring(0,2)}return t}));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,i,a,r,o;return h(Host,{language:this.language,market:this.market,environment:this.environment},h("header",null,h("div",{class:"siteheader-row"},h("div",{class:"siteheader-topleft"},h("slot",{name:"topleft"}),this.gotData&&this.siteSelector&&!this.hideSiteSelector&&h("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&&((i=this.siteSelector)===null||i===void 0?void 0:i.currentSiteTitle)&&h("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle+" ",description:this.siteSelector.currentSiteDescription}),this.gotData&&((a=this.siteSelector)===null||a===void 0?void 0:a.siteSelections)&&this.siteSelector.siteSelections.map((function(t){return h("pn-site-selector-item",{heading:t.linkText+" ",description:t.linkDescription,url:e.adjustSiteSelectorUrl(t.href),newwindow:t.openInNewWindow})})))),h("div",{class:"siteheader-logocontainer"},h("a",{href:this.homePageLink,title:"Home",class:"siteheader-logolink"},h("slot",{name:"logo"},h("svg",{class:"siteheader-logo",xmlns:"http://www.w3.org/2000/svg",width:"12.7rem",height:"2.4rem",viewBox:"0 0 141.73 26.65"},h("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)"}))))),h("div",{class:"siteheader-topright"},h("slot",{name:"toprightstart"}),this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{token:this.userToken,fullname:this.userFullname,loggedin:this.userLoggedin,loginDialog:this.loginDialog,endpoint:this.endpoint,i18n:this.i18n,showProfileSelection:this.showProfileSelection}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),h("slot",{name:"toprightend"}))),h("div",{class:"siteheader-row"},h("div",{class:"siteheader-menu"},this.gotData&&this.menuItems&&h("pn-mainnav",{market:this.market,language:this.language,onMenuOpenChange:function(e){document.body.setAttribute("data-siteheader-menuopen",e.detail+"")}},h("pn-mainnav-level",null,h("pn-mainnav-list",null,this.menuItems.map((function(t){var n,i;return h("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)&&h("pn-mainnav-level",null,t.children.length>0&&h("pn-mainnav-list",{heading:(i=t.navigationHeading)!==null&&i!==void 0?i:""},t.children.map((function(e){var t;return h("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&&h("pn-mainnav-list",{heading:t.promotedMenuItemsHeader},t.promotedMenuItems.map((function(n){return h("pn-mainnav-link",{href:n.href,name:n.linkText,target:n.openInNewWindow?"_blank":"_self",linkid:e.promotedItemId(n)+t.id})})))))}))),h("div",{slot:"footer",class:"siteheader-menu-footer"},this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{emitEvents:false,loginDialog:this.loginDialog,endpoint:this.endpoint,fullname:this.userFullname,loggedin:this.userLoggedin,i18n:this.i18n,showProfileSelection:this.showProfileSelection}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),!this.hideSiteSelector&&h("pn-site-selector",{language:this.language},this.gotData&&((r=this.siteSelector)===null||r===void 0?void 0:r.currentSiteTitle)&&h("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(e){return h("pn-site-selector-item",{heading:e.linkText,description:e.linkDescription,url:e.pageLink,newwindow:e.openInNewWindow})})))),h("div",{slot:"top",class:"siteheader-menu-top"},h("pn-marketweb-siteheader-search",{language:this.language,siteid:this.siteid,search:this.search,"hide-search":this.hideSearch,i18n:this.i18n}))))),h("pn-marketweb-siteheader-search",{language:this.language,siteid:this.siteid,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 getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["onLanguageChange"],market:["onMarketChange"]}},enumerable:false,configurable:true});return e}();PnMarketwebSiteheader.style=pnMarketwebSiteheaderCss;export{PnMarketwebSiteheader as pn_marketweb_siteheader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";var pnProductCardCss='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=note]{margin-top:1em;margin-bottom:1em;font-size:0.8em}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 PnProductCard=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return h(Host,null,h("slot",{name:"illustration"}),h("div",{class:"cardcontent"},h("div",{class:"details"},h("slot",{name:"title"}),h("slot",{name:"content"}),h("div",{class:"info"},h("slot",null)),h("slot",{name:"note"}),h("slot",{name:"additionalUSP"})),h("div",{class:"cardprice"},h("slot",{name:"cardprice"}),h("slot",{name:"mobiledownload"}),h("slot",{name:"servicepoint"}))))};return e}();PnProductCard.style=pnProductCardCss;var pnProductCardInfoCss='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 PnProductCardInfo=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return this.label?h(Host,null,h("div",{class:"cardinfocontent"},this.text?h("pre",{slot:"formatPre"},this.text):null)):h(Host,null,h("div",{class:"cardinfocontent"},this.paket?h("div",{class:"cardinfocontent-item"},h("strong",null,"Maxmått"),this.paket.split("/").map((function(e){return e.split(":").length>1?h("p",null,h("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):h("p",null,e)}))):null,this.rulle?h("div",{class:"cardinfocontent-item"},h("strong",null,"Rulle"),this.rulle.split("/").map((function(e){return e.split(":").length>0?h("p",null,h("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):h("p",null,e)}))):null))};return e}();h("pn-icon",{symbol:"align-center",small:"false",color:"black"});PnProductCardInfo.style=pnProductCardInfoCss;var pnProductCardPriceCss="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 PnProductCardPrice=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?h(Host,{id:this.linkid},h("div",{class:"price"},this.amount?h("span",null,this.amount):null,this.currency?h("span",null," "+this.currency):null),this.note?h("p",null,this.note):null,this.label?h("pn-button",{id:"pricecta-"+this.linkid,small:"true",icon:"open-in-new",appearance:"light",href:this.url,target:"_blank"},this.label):null):h(Host,null,h("div",{class:"price"},this.amount?h("span",null,this.amount):null,this.currency?h("span",null,this.currency):null))};return e}();PnProductCardPrice.style=pnProductCardPriceCss;var pnTitletagCss="pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;min-height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700],pn-titletag[color=green]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700],pn-titletag[color=blue]{background:#E0F8FF;color:#005D92}pn-titletag[color=coral700],pn-titletag[color=coral]{background:#FDEFEE;color:#9B1C2E}pn-titletag[color=gray900],pn-titletag[color=gray],pn-titletag[color=grey]{background:#D3CECB;color:#2D2013}";var PnTiletag=function(){function e(e){registerInstance(this,e);this.icon=null;this.color="green700"}e.prototype.render=function(){return h(Host,null,h("slot",null),this.icon?h("pn-icon",{symbol:this.icon,small:"false",color:this.color}):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PnTiletag.style=pnTitletagCss;export{PnProductCard as pn_product_card,PnProductCardInfo as pn_product_card_info,PnProductCardPrice as pn_product_card_price,PnTiletag as pn_titletag};
|
|
1
|
+
import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";var pnProductCardCss='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=note]{margin-top:1em;margin-bottom:1em;font-size:0.8em}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 PnProductCard=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return h(Host,null,h("slot",{name:"illustration"}),h("div",{class:"cardcontent"},h("div",{class:"details"},h("slot",{name:"title"}),h("slot",{name:"content"}),h("div",{class:"info"},h("slot",null)),h("slot",{name:"note"}),h("slot",{name:"additionalUSP"})),h("div",{class:"cardprice"},h("slot",{name:"cardprice"}),h("slot",{name:"mobiledownload"}),h("slot",{name:"servicepoint"}))))};return e}();PnProductCard.style=pnProductCardCss;var pnProductCardInfoCss='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 PnProductCardInfo=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return this.label?h(Host,null,h("div",{class:"cardinfocontent"},this.text?h("pre",{slot:"formatPre"},this.text):null)):h(Host,null,h("div",{class:"cardinfocontent"},this.paket?h("div",{class:"cardinfocontent-item"},h("strong",null,"Maxmått"),this.paket.split("/").map((function(e){return e.split(":").length>1?h("p",null,h("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):h("p",null,e)}))):null,this.rulle?h("div",{class:"cardinfocontent-item"},h("strong",null,"Rulle"),this.rulle.split("/").map((function(e){return e.split(":").length>0?h("p",null,h("strong",null,e.split(":")[0]+": ")," ",e.split(":")[1]):h("p",null,e)}))):null))};return e}();h("pn-icon",{symbol:"align-center",small:"false",color:"black"});PnProductCardInfo.style=pnProductCardInfoCss;var pnProductCardPriceCss="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 PnProductCardPrice=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?h(Host,{id:this.linkid},h("div",{class:"price"},this.amount?h("span",null,this.amount):null,this.currency?h("span",null," "+this.currency):null),this.note?h("p",null,this.note):null,this.label?h("pn-button",{id:"pricecta-"+this.linkid,small:"true",icon:"open-in-new",appearance:"light",href:this.url,target:"_blank"},this.label):null):h(Host,null,h("div",{class:"price"},this.amount?h("span",null,this.amount):null,this.currency?h("span",null,this.currency):null))};return e}();PnProductCardPrice.style=pnProductCardPriceCss;var pnTitletagCss="pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;min-height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700],pn-titletag[color=green]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700],pn-titletag[color=blue]{background:#E0F8FF;color:#005D92}pn-titletag[color=coral700],pn-titletag[color=coral]{background:#FDEFEE;color:#9B1C2E}pn-titletag[color=gray900],pn-titletag[color=gray],pn-titletag[color=grey]{background:#D3CECB;color:#2D2013}pn-titletag[color=gray50],pn-titletag[color=lightgray],pn-titletag[color=lightgrey]{background:#F3F2F2;color:#2D2013}";var PnTiletag=function(){function e(e){registerInstance(this,e);this.icon=null;this.color="green700"}e.prototype.render=function(){return h(Host,null,h("slot",null),this.icon?h("pn-icon",{symbol:this.icon,small:"false",color:this.color}):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PnTiletag.style=pnTitletagCss;export{PnProductCard as pn_product_card,PnProductCardInfo as pn_product_card_info,PnProductCardPrice as pn_product_card_price,PnTiletag as pn_titletag};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,e,r){function o(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function a(t){try{s(r.next(t))}catch(i){n(i)}}function l(t){try{s(r["throw"](t))}catch(i){n(i)}}function s(t){t.done?e(t.value):o(t.value).then(a,l)}s((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(i){return s([t,i])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(n=a[0]&2?o["return"]:a[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;if(o=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){e.label=a[1];break}if(a[0]===6&&e.label<n[1]){e.label=n[1];n=a;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(a);break}if(n[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(l){a=[6,l];o=0}finally{r=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-1dfe8514.js";var translations={"sv-se":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",notTraceable:"Inte spårbart",Creapest:"Billigast"},"en-gb":{from:"From ",labelRoll:"Roll",labelPackage:"Package",notTraceable:"Not traceable",Creapest:"Cheapest"}};var pnProxioPricegroupCss="pn-proxio-pricegroup div.weightcontainer{margin:3rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:5rem;-ms-flex-pack:justify;justify-content:space-between}pn-proxio-pricegroup input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.3rem;height:1.3rem;background-color:#005D92;border-radius:50%}pn-proxio-pricegroup input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.5rem;width:1.5rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button button div.button-tooltip{visibility:hidden;display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin-left:auto;margin-right:auto;position:relative}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.7rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1.32rem);border-radius:3rem;margin-right:3.5rem}pn-proxio-pricegroup .activeweight{font-size:large;font-weight:bold}";var PnProxioPricegroup=function(){function t(t){registerInstance(this,t);this.endpoint=null;this.culture="sv-se";this.tariffid="";this.cache=true;this.activeWeightIndex=0;this.data=null;this.i18n=translations["sv-se"];this.fetchHelper=new FetchHelper("proxiopricegroup")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var i,e,r,o;return __generator(this,(function(n){switch(n.label){case 0:i=new MarketWebContextService(t);return[4,i.getEnvironmentName()];case 1:e=n.sent();if(!(!this.endpoint&&(e===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,4];return[4,i.getMarket()];case 2:r=n.sent();o=this;return[4,i.getEndpoint(e,r)];case 3:o.endpoint=n.sent();n.label=4;case 4:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){this.setCulture();this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;return __generator(this,(function(r){switch(r.label){case 0:if(!this.culture||!this.tariffid){return[2]}t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;i="".concat(t,"/api/proxio/price-list-group?tariffId=").concat(this.tariffid,"&culture=").concat(this.culture,"&cached=").concat(this.cache);return[4,this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this))];case 1:e=r.sent();if(e===null||e===void 0?void 0:e.proxioProduct){this.data=e}return[2]}}))}))};t.prototype.onFetchData=function(t){this.data=t};t.prototype.setActiveWeightIndex=function(t){var i,e,r;var o=0;var n=(r=((e=(i=this.data.proxioProduct)===null||i===void 0?void 0:i.weightAndPriceList)===null||e===void 0?void 0:e.length)-1)!==null&&r!==void 0?r:o;t=t>n?n:t;t=t<o?o:t;this.activeWeightIndex=t};t.prototype.setCulture=function(){if(translations[this.culture]){this.i18n=translations[this.culture]}};t.prototype.getPrice=function(t){var i;return(i=t===null||t===void 0?void 0:t.weightAndPriceList[this.activeWeightIndex])===null||i===void 0?void 0:i.item2};t.prototype.isActive=function(t){return t===this.activeWeightIndex};t.prototype.render=function(){var t=this;var i,e,r;return h(Host,null,((i=this.data)===null||i===void 0?void 0:i.proxioProduct)?h("div",null,h("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?h("div",{class:"weightvaluecontainer"},h("pn-button",{disabled:this.activeWeightIndex===0?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex-1)}}),h("div",{class:"weightradios"},h("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map((function(i,e){return h("div",{class:"weightdata"+(t.isActive(e)?" activeweight":"")},h("input",{type:"radio",id:"weightradio"+e,name:"weightradio",value:e,checked:t.isActive(e),onClick:function(){return t.setActiveWeightIndex(e)}}),h("label",{htmlFor:"weightradio"+e},i.item1))}))),h("pn-button",{disabled:this.activeWeightIndex===((r=(e=this.data.proxioProduct)===null||e===void 0?void 0:e.weightAndPriceList)===null||r===void 0?void 0:r.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex+1)}})):null),h("pn-proxio-productcard",null,h("h2",{slot:"title"},this.data.proxioProduct.productTitle),h("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),h("div",{slot:"information"},h("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),h("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),h("div",{slot:"bottomtags"},this.data.proxioProduct.tracable?h("pn-titletag",{color:"gray50"},this.i18n.notTraceable):null,this.data.proxioProduct.usp1?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?h("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),h("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),h("div",{slot:"pricelink"},h("pn-proxio-productcard-pricelink",{price:this.i18n.from+this.getPrice(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((function(i){return h("pn-proxio-productcard-pricelink",{price:t.i18n.from+t.getPrice(i),link:i.productLink,linktext:i.productLinkText})})):null))):null)};return t}();PnProxioPricegroup.style=pnProxioPricegroupCss;export{PnProxioPricegroup as pn_proxio_pricegroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-5397620b.js";var pnProxioProductcardCss="pn-proxio-productcard .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;border:solid 0.1rem #F9F8F8;border-radius:0.8rem;overflow:hidden;margin-left:auto;margin-right:auto;margin-bottom:1.6rem}pn-proxio-productcard .carddetails{min-width:70%;padding:2rem;display:-ms-flexbox;display:flex;gap:1rem;-ms-flex-direction:column;flex-direction:column}pn-proxio-productcard .cardcalltoactions{min-width:30%;background-color:#EFFBFF;padding:1rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center}pn-proxio-productcard .cardcalltoactions pn-illustration[slot=illustration] .pn-illustration{max-width:10rem;margin-left:auto;margin-right:auto}pn-proxio-productcard [slot=information]{display:-ms-flexbox;display:flex;gap:1rem}pn-proxio-productcard [slot=uppertags]{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;gap:2rem}pn-proxio-productcard [slot=bottomtags]{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;gap:2rem;margin:1rem 0}pn-proxio-productcard .heading{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row}pn-proxio-productcard [slot=title]{text-decoration:underline}";var PnProxioProductcard=function(){function r(r){registerInstance(this,r)}r.prototype.render=function(){return h(Host,null,h("div",{class:"cardcontent"},h("div",{class:"carddetails"},h("div",{class:"heading"},h("slot",{name:"title"}),h("slot",{name:"uppertags"})),h("slot",{name:"description"}),h("slot",{name:"information"}),h("slot",{name:"bottomtags"})),h("div",{class:"cardcalltoactions"},h("slot",{name:"illustration"}),h("slot",{name:"pricelink"}))))};return r}();PnProxioProductcard.style=pnProxioProductcardCss;var pnProxioProductcardDescriptionCss="pn-proxio-productcard-description h3{font-size:2rem}pn-proxio-productcard-description .highlight{color:#0fa85c}";var PnProxioProductcardDescription=function(){function r(r){registerInstance(this,r);this.list=[]}r.prototype.render=function(){return h(Host,null,this.heading?h("h3",null,this.heading):null,this.highlight?h("h3",{class:"highlight"},this.highlight):null,this.description?h("span",null,this.description):null,this.list?h("ul",null,this.list.map((function(r){return h("li",null,r)}))):null)};return r}();PnProxioProductcardDescription.style=pnProxioProductcardDescriptionCss;var pnProxioProductcardInformationCss="pn-proxio-productcard-information{-ms-flex-item-align:center;align-self:center}pn-proxio-productcard-information p strong.label{font-weight:500}";var PnProxioProductcardInformation=function(){function r(r){registerInstance(this,r);this.information=[]}r.prototype.render=function(){return h(Host,null,h("div",{class:"cardinfocontent"},this.information&&this.label?h("div",{class:"cardinfocontent-item"},h("p",null,h("strong",null,this.label)),this.information.map((function(r){return r?h("p",null,h("strong",{class:"label"},r.item1,":")," ",r.item2):null}))):null))};return r}();PnProxioProductcardInformation.style=pnProxioProductcardInformationCss;var pnProxioProductcardPricelinkCss="pn-proxio-productcard-pricelink{-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;margin:2rem 1rem;gap:1rem;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap}pn-proxio-productcard-pricelink pn-button{min-width:17rem}";var PnProxioProductcardPricelink=function(){function r(r){registerInstance(this,r)}r.prototype.render=function(){return this.link&&this.linktext?h(Host,null,this.price?h("h2",null,this.price):null,h("pn-button",{small:"true",icon:"arrow-right",appearance:"light",href:this.link,target:"_blank",rel:"noopener nofollower noreferrer"},this.linktext)):null};return r}();PnProxioProductcardPricelink.style=pnProxioProductcardPricelinkCss;export{PnProxioProductcard as pn_proxio_productcard,PnProxioProductcardDescription as pn_proxio_productcard_description,PnProxioProductcardInformation as pn_proxio_productcard_information,PnProxioProductcardPricelink as pn_proxio_productcard_pricelink};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,a as n,g as i}from"./p-58e8d7d5.js";let r=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"}))))}};r.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=note]{margin-top:1em;margin-bottom:1em;font-size:0.8em}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 o=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>1?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"}),o.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 l=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",{id:"pricecta-"+this.linkid,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))}};l.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}}";let a=class{constructor(t){e(this,t),this.icon=null,this.color="green700"}render(){return t(n,null,t("slot",null),this.icon?t("pn-icon",{symbol:this.icon,small:"false",color:this.color}):null)}get hostElement(){return i(this)}};a.style="pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;min-height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700],pn-titletag[color=green]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700],pn-titletag[color=blue]{background:#E0F8FF;color:#005D92}pn-titletag[color=coral700],pn-titletag[color=coral]{background:#FDEFEE;color:#9B1C2E}pn-titletag[color=gray900],pn-titletag[color=gray],pn-titletag[color=grey]{background:#D3CECB;color:#2D2013}";export{r as pn_product_card,o as pn_product_card_info,l as pn_product_card_price,a as pn_titletag}
|
|
1
|
+
import{r as e,h as t,a as n,g as i}from"./p-58e8d7d5.js";let r=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"}))))}};r.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=note]{margin-top:1em;margin-bottom:1em;font-size:0.8em}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 o=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>1?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"}),o.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 l=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",{id:"pricecta-"+this.linkid,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))}};l.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}}";let a=class{constructor(t){e(this,t),this.icon=null,this.color="green700"}render(){return t(n,null,t("slot",null),this.icon?t("pn-icon",{symbol:this.icon,small:"false",color:this.color}):null)}get hostElement(){return i(this)}};a.style="pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;min-height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700],pn-titletag[color=green]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700],pn-titletag[color=blue]{background:#E0F8FF;color:#005D92}pn-titletag[color=coral700],pn-titletag[color=coral]{background:#FDEFEE;color:#9B1C2E}pn-titletag[color=gray900],pn-titletag[color=gray],pn-titletag[color=grey]{background:#D3CECB;color:#2D2013}pn-titletag[color=gray50],pn-titletag[color=lightgray],pn-titletag[color=lightgrey]{background:#F3F2F2;color:#2D2013}";export{r as pn_product_card,o as pn_product_card_info,l as pn_product_card_price,a as pn_titletag}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var r,s,t,a;return{setters:[function(e){r=e.r;s=e.h;t=e.a;a=e.g}],execute:function(){var o="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:0.8rem;padding:0}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";var n=e("pn_bonus_progressbar",function(){function e(e){r(this,e);this.icon=null;this.heading="";this.sumtext=null;this.theme="blue";this.bonuspercentage="0%";this.currency="kr";this.value=0;this.min=0;this.max=0;this.valuepercentage=0;this.progresspercentage=0;this.levelValues=[];this.currentLevelAdjustedValue=0}e.prototype.componentWillLoad=function(){this.setInitialValues();this.setValuePercentage()};e.prototype.setInitialValues=function(){var e=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));this.currentLevelAdjustedValue=this.value;this.levelValues=e.map((function(e){return parseInt(e.getAttribute("value"),10)}));if(!this.max){if(this.levelValues&&this.levelValues.length>0){var r=this.levelValues.slice(-1)[0];var s=1.05;if(this.value>r){s=1.2}this.max=Math.floor(r*s)}}if(this.value>this.max){this.currentLevelAdjustedValue=100}};e.prototype.setValuePercentage=function(){this.valuepercentage=this.value/this.max*100;this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100;if(this.progresspercentage<0){if(this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value){this.min=Math.floor(this.levelValues[0]*.95)}else{this.min=Math.floor(this.value*.95)}}if(this.progresspercentage>100){this.progresspercentage=100;var e=this.levelValues.slice(-1)[0];var r=1.05;if(this.value>e){r=1.2}this.max=Math.floor(e*r)}};e.prototype.iconColor=function(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}};e.prototype.render=function(){return s(t,null,s("div",{class:"bonusprogressbar-top"},this.icon?s("div",{class:"bonusprogressbar-top-icon"},s("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},s("div",{class:"bonusprogressbar-top-heading"},s("h4",{class:"bonusprogressbar-top-headline"},this.heading," ",s("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),this.sumtext?s("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null)),s("div",{class:"bonusprogressbar-wrapper"},s("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),s("
|
|
1
|
+
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var r,s,t,a;return{setters:[function(e){r=e.r;s=e.h;t=e.a;a=e.g}],execute:function(){var o="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:0.8rem;padding:0}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";var n=e("pn_bonus_progressbar",function(){function e(e){r(this,e);this.icon=null;this.heading="";this.sumtext=null;this.theme="blue";this.bonuspercentage="0%";this.currency="kr";this.value=0;this.min=0;this.max=0;this.valuepercentage=0;this.progresspercentage=0;this.levelValues=[];this.currentLevelAdjustedValue=0}e.prototype.componentWillLoad=function(){this.setInitialValues();this.setValuePercentage()};e.prototype.setInitialValues=function(){var e=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));this.currentLevelAdjustedValue=this.value;this.levelValues=e.map((function(e){return parseInt(e.getAttribute("value"),10)}));if(!this.max){if(this.levelValues&&this.levelValues.length>0){var r=this.levelValues.slice(-1)[0];var s=1.05;if(this.value>r){s=1.2}this.max=Math.floor(r*s)}}if(this.value>this.max){this.currentLevelAdjustedValue=100}};e.prototype.setValuePercentage=function(){this.valuepercentage=this.value/this.max*100;this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100;if(this.progresspercentage<0){if(this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value){this.min=Math.floor(this.levelValues[0]*.95)}else{this.min=Math.floor(this.value*.95)}}if(this.progresspercentage>100){this.progresspercentage=100;var e=this.levelValues.slice(-1)[0];var r=1.05;if(this.value>e){r=1.2}this.max=Math.floor(e*r)}};e.prototype.iconColor=function(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}};e.prototype.render=function(){return s(t,null,s("div",{class:"bonusprogressbar-top"},this.icon?s("div",{class:"bonusprogressbar-top-icon"},s("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},s("div",{class:"bonusprogressbar-top-heading"},s("h4",{class:"bonusprogressbar-top-headline"},this.heading," ",s("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),this.sumtext?s("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null)),s("div",{class:"bonusprogressbar-wrapper"},s("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),s("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}},enumerable:false,configurable:true});return e}());n.style=o}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var t,n,i,r;return{setters:[function(e){t=e.r;n=e.h;i=e.a;r=e.g}],execute:function(){var o='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=note]{margin-top:1em;margin-bottom:1em;font-size:0.8em}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 l=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}());l.style=o;var
|
|
1
|
+
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var t,n,i,r;return{setters:[function(e){t=e.r;n=e.h;i=e.a;r=e.g}],execute:function(){var o='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=note]{margin-top:1em;margin-bottom:1em;font-size:0.8em}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 l=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}());l.style=o;var a='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 c=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>1?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"});c.style=a;var d="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 s=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",{id:"pricecta-"+this.linkid,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}());s.style=d;var p="pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;min-height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700],pn-titletag[color=green]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700],pn-titletag[color=blue]{background:#E0F8FF;color:#005D92}pn-titletag[color=coral700],pn-titletag[color=coral]{background:#FDEFEE;color:#9B1C2E}pn-titletag[color=gray900],pn-titletag[color=gray],pn-titletag[color=grey]{background:#D3CECB;color:#2D2013}pn-titletag[color=gray50],pn-titletag[color=lightgray],pn-titletag[color=lightgrey]{background:#F3F2F2;color:#2D2013}";var m=e("pn_titletag",function(){function e(e){t(this,e);this.icon=null;this.color="green700"}e.prototype.render=function(){return n(i,null,n("slot",null),this.icon?n("pn-icon",{symbol:this.icon,small:"false",color:this.color}):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());m.style=p}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var t,r,n,s;return{setters:[function(e){t=e.r;r=e.h;n=e.a;s=e.g}],execute:function(){var a='pn-bonus-progressbar-level{position:absolute;width:0.1rem;left:50%}pn-bonus-progressbar-level::after{content:"";width:0.1rem;position:absolute;left:0;border-left:1px dashed #9B1C2E;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:3rem}pn-bonus-progressbar-level:not([current]):nth-child(odd)::after{height:7rem;margin-top:0.6rem}.progressbar-level-percentage{font-size:0.75em;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:-3.2rem}[current]>.progressbar-level-percentage{display:none}pn-bonus-progressbar-level:not([current]):nth-child(odd) .progressbar-level-percentage{top:-4.8rem}.progressbar-level-value{font-size:0.75em;white-space:nowrap;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:2.3rem}[current]>.progressbar-level-value{top:-3.2rem}pn-bonus-progressbar-level:not([current]):nth-child(odd) .progressbar-level-value{top:4.2rem}';var o=e("pn_bonus_progressbar_level",function(){function e(e){t(this,e);this.current=false;this.value=0;this.bonuspercentage="";this.visualpercentage=0;this.percentage=0;this.max=0;this.min=0;this.currency=""}e.prototype.componentWillLoad=function(){this.max=parseInt(this.hostElement.parentElement.parentElement.getAttribute("max"),10);this.min=parseInt(this.hostElement.parentElement.parentElement.getAttribute("min"),10);this.currency=this.hostElement.parentElement.parentElement.getAttribute("currency");this.percentage=this.value/this.max*100;if(this.visualpercentage>0){return}this.visualpercentage=this.value===0?0:(this.value-this.min)/(this.max-this.min)*100};e.prototype.formatValue=function(){return"".concat(this.value.toLocaleString("sv-SE",{maximumFractionDigits:0})," ").concat(this.currency)};e.prototype.render=function(){return r(n,{style:{left:"".concat(this.visualpercentage,"%")}},r("div",{class:"progressbar-level-percentage"},this.bonuspercentage),r("div",{class:"progressbar-level-value"},this.formatValue()))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as r,a as e,g as t}from"./p-58e8d7d5.js";let o=class{constructor(r){s(this,r),this.icon=null,this.heading="",this.sumtext=null,this.theme="blue",this.bonuspercentage="0%",this.currency="kr",this.value=0,this.min=0,this.max=0,this.valuepercentage=0,this.progresspercentage=0,this.levelValues=[],this.currentLevelAdjustedValue=0}componentWillLoad(){this.setInitialValues(),this.setValuePercentage()}setInitialValues(){const s=Array.from(this.hostElement.querySelectorAll("pn-bonus-progressbar-level:not([current])"));if(this.currentLevelAdjustedValue=this.value,this.levelValues=s.map((s=>parseInt(s.getAttribute("value"),10))),!this.max&&this.levelValues&&this.levelValues.length>0){const s=this.levelValues.slice(-1)[0];let r=1.05;this.value>s&&(r=1.2),this.max=Math.floor(s*r)}this.value>this.max&&(this.currentLevelAdjustedValue=100)}setValuePercentage(){if(this.valuepercentage=this.value/this.max*100,this.progresspercentage=(this.value-this.min)/(this.max-this.min)*100,this.progresspercentage<0&&(this.min=this.levelValues&&this.levelValues.length&&this.levelValues[0]<this.value?Math.floor(.95*this.levelValues[0]):Math.floor(.95*this.value)),this.progresspercentage>100){this.progresspercentage=100;const s=this.levelValues.slice(-1)[0];let r=1.05;this.value>s&&(r=1.2),this.max=Math.floor(s*r)}}iconColor(){switch(this.theme){case"red":return"coral700";case"blue":default:return"blue700"}}render(){return r(e,null,r("div",{class:"bonusprogressbar-top"},this.icon?r("div",{class:"bonusprogressbar-top-icon"},r("pn-icon",{symbol:this.icon,small:"false",color:this.iconColor()})):{},r("div",{class:"bonusprogressbar-top-heading"},r("h4",{class:"bonusprogressbar-top-headline"},this.heading," ",r("strong",{class:"bonusprogressbar-top-percentage"},this.bonuspercentage)),this.sumtext?r("div",{class:"bonusprogressbar-sumtext"},this.sumtext):null)),r("div",{class:"bonusprogressbar-wrapper"},r("progress",{class:"bonusprogressbar-progress",value:this.progresspercentage,max:"100"}),r("slot",null)))}get hostElement(){return t(this)}static get watchers(){return{currentLevelAdjustedValue:["setValuePercentage"],value:["setValuePercentage"],min:["setValuePercentage"],max:["setValuePercentage"]}}};o.style="pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:1.6rem}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-sumtext{margin-top:0.4rem;font-size:1.3rem;color:#5E554A}.bonusprogressbar-top-percentage{margin-left:0.8rem;padding:0}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";export{o as pn_bonus_progressbar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,e as t,h as i,a as n,g as a}from"./p-58e8d7d5.js";import{F as s,M as r}from"./p-f0f58646.js";import{M as o}from"./p-e492139d.js";const h={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start",profileSelectionFlyoutHeading:"Inloggad som"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logged in as"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logget ind som"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start",profileSelectionFlyoutHeading:"Logget på som"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa",profileSelectionFlyoutHeading:"Kirjautunut sisään nimellä"},de:{searchlabel:"Suche",searchplaceholder:"Wonach suchen Sie?",searchbuttontext:"Suche",menuHomeButton:"Start",menuGoBackButton:"Geh zurück",mainMenuButton:"Menü",menuStartButton:"Start",profileSelectionFlyoutHeading:"Eingeloggt als"}};let l=class{constructor(i){e(this,i),this.changeLanguage=t(this,"changeLanguage",7),this.changeMarket=t(this,"changeMarket",7),this.endpointPath="/api/navigation/header",this.market=null,this.language=null,this.siteid=null,this.environment=null,this.userToken="",this.userFullname="",this.userLoggedin=!1,this.endpoint=null,this.hideSiteSelector=!1,this.hideLanguageSelector=!1,this.hideSearch=!1,this.hideLogin=!1,this.showProfileSelection=!1,this.siteDomainInUrls=!1,this.AutocompleteEndpoint="",this.sessionForward=!1,this.cache=!1,this.spaMode=!1,this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""},this.gotData=!1,this.fetchingData=!1,this.homePageLink="/",this.menuItems=[],this.search={AutocompleteEndpoint:this.AutocompleteEndpoint},this.siteSelector=null,this.languageSelector=null,this.languageOptions=[],this.loginDialog=null,this.minimizeSearch=!1,this.loggedIn=!1,this.fetchHelper=new s("siteheader"),this.loginManager=null}componentWillLoad(){this.loginManager=new o({eventTarget:this.hostElement}),this.setInitialValues().then((()=>{this.init()}))}async setInitialValues(e=window.location.href){var t;const i=new r(e);if(!this.market){const e=await i.getMarket();this.market=e}if(!this.language){const e=await i.getLanguage();this.language=e}this.environment||(this.environment=await i.getEnvironmentName()),this.endpoint||-1!==(null===(t=this.environment)||void 0===t?void 0:t.indexOf("local"))||(this.endpoint=await i.getEndpoint(this.environment,this.market)),this.endpoint||(this.endpoint="")}async init(){this.setTranslations(),await this.fetchData(),window.setTimeout((()=>{this.checkMenuOverflow()}),50)}setTranslations(){this.language&&h[this.language]&&(this.i18n=h[this.language])}onLanguageSelectorChange(e){this.language=e.detail,window.dispatchEvent(new CustomEvent("marketweb-languagechange",{detail:this.language}))}onLanguageChange(){this.setTranslations(),this.changeLanguage.emit(this.language),this.fetchData()}onMarketChange(){this.changeMarket.emit(this.market),this.fetchData()}async fetchData(){if(null===this.endpoint||!this.market||!this.language)return;this.fetchingData=!0;const e=`${this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint}${this.endpointPath}?market=${this.market}&language=${this.language}`,t=await this.fetchHelper.fetchJson(e,{mode:"cors"},this.cache,this.onFetchRefreshed.bind(this));await this.setStateFromData(t)}onFetchRefreshed(e){this.setStateFromData(e)}getLanguageVersionUrl(e){if(this.spaMode)return null;const t=document.querySelector(`link[rel="alternate"][hreflang="${e.twoLetterISOLanguageName}"]`);if(t)return t.getAttribute("href");const i=this.siteDefinition.url;return i+(i.lastIndexOf("/")!==i.length-1?"/":"")+e.twoLetterISOLanguageName}async setStateFromData(e){var t,i,n;"object"!=typeof e&&console.warn("Data was not valid",e),this.siteDefinition=e.sitedefinition,this.menuItems=this.siteDomainInUrls?e.mainMenu.menuItems.map((e=>this.adjustMenuItemUrls(e))):e.mainMenu.menuItems,this.menuItems[0]&&(null===(t=this.menuItems[0])||void 0===t?void 0:t.name)===this.i18n.menuHomeButton||this.menuItems.unshift({href:this.siteDefinition.url,name:this.i18n.menuHomeButton,id:"homelink",open:!1,selected:!1,children:[]}),this.search=Object.assign(Object.assign({},e.search),{AutocompleteEndpoint:this.AutocompleteEndpoint}),this.siteSelector=e.siteSelectorViewModel,this.languageSelector=e.languageSelectorViewModel,this.setLanguageOptions();let a=e.loginViewModel;a&&this.siteDomainInUrls&&(a.loggedInLinks=a.loggedInLinks.map((e=>(e.href=this.adjustHref(e.href),e))),a.loginMenuLinks=a.loginMenuLinks.map((e=>(e.href=this.adjustHref(e.href),e)))),this.loginDialog=a,await this.spaModeAdjustments(),this.gotData=!0,this.fetchingData=!0,this.homePageLink=null!==(n=null===(i=this.siteDefinition)||void 0===i?void 0:i.url)&&void 0!==n?n:document.location.hostname,window.setTimeout((()=>{this.checkMenuOverflow()}),100)}adjustMenuItemUrls(e){if(e.href=this.adjustHref(e.href),e.children&&e.children.length>0){let t=e.children.map((e=>this.adjustMenuItemUrls(e)));e.children=t}return e}adjustHref(e){return 0===e.indexOf("http")?e:(this.siteDefinition.url.lastIndexOf("/")===this.siteDefinition.url.length-1?this.siteDefinition.url.substring(0,this.siteDefinition.url.length-1):this.siteDefinition.url)+e}setLanguageOptions(){var e;if(!this.languageSelector||!this.languageSelector.languages)return;const t=(null!==(e=Array.prototype.slice.call(document.querySelectorAll('link[rel="alternate"][hreflang]')))&&void 0!==e?e:[]).map((e=>{let t=e.getAttribute("hreflang");return-1===t.indexOf("en-")&&-1===t.indexOf("en_")||(t=t.substring(0,2)),t}));let i=[];this.languageSelector.languages.map((e=>{t&&t.length>0?t.includes(e.twoLetterISOLanguageName)&&i.push(e):i.push(e)})),this.languageOptions=i}async spaModeAdjustments(){}onLoginStateChange(e){var t,i,n;(null===(t=e.detail)||void 0===t?void 0:t.loggedIn)&&(null===(i=e.detail)||void 0===i?void 0:i.token)&&(this.loggedIn=!0===(null===(n=e.detail)||void 0===n?void 0:n.loggedIn))}promotedItemId(e){return"promo-"+e.linkText.replace(/[^A-Za-z0-9.\\\/]/gim,"")}handleResize(){requestAnimationFrame((()=>{this.checkMenuOverflow()}))}checkMenuOverflow(){const e=this.hostElement.querySelectorAll(".siteheader-row")[1];if(!e)return;const t=e.querySelector("pn-mainnav-level");if(!t)return;const i=t.parentElement;"nav"===i.tagName.toLocaleLowerCase()&&i.scrollWidth<t.clientWidth&&!1===this.minimizeSearch&&(this.minimizeSearch=!0)}adjustSiteSelectorUrl(e){return this.loggedIn?0===["portal.postnord.com"].filter((t=>-1!==e.indexOf(t))).length?e:this.loginManager.getLoginUrl(e):e}render(){var e,t,a,s,r,o;return i(n,{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:null!==(t=null===(e=this.siteSelector)||void 0===e?void 0:e.currentSiteTitle)&&void 0!==t?t:"postnord"},this.gotData&&(null===(a=this.siteSelector)||void 0===a?void 0:a.currentSiteTitle)&&i("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle+" ",description:this.siteSelector.currentSiteDescription}),this.gotData&&(null===(s=this.siteSelector)||void 0===s?void 0:s.siteSelections)&&this.siteSelector.siteSelections.map((e=>i("pn-site-selector-item",{heading:e.linkText+" ",description:e.linkDescription,url:this.adjustSiteSelectorUrl(e.href),newwindow:e.openInNewWindow}))))),i("div",{class:"siteheader-logocontainer"},i("a",{href:this.homePageLink,title:"Home",class:"siteheader-logolink"},i("slot",{name:"logo"},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.userToken,fullname:this.userFullname,loggedin:this.userLoggedin,loginDialog:this.loginDialog,endpoint:this.endpoint,i18n:this.i18n,showProfileSelection:this.showProfileSelection}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&i("pn-language-selector",{value:this.language},this.languageOptions.map((e=>i("pn-language-selector-option",{name:e.nativeName,code:e.twoLetterISOLanguageName,selected:e.isCurrent,url:this.getLanguageVersionUrl(e)})))),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:e=>{document.body.setAttribute("data-siteheader-menuopen",e.detail+"")}},i("pn-mainnav-level",null,i("pn-mainnav-list",null,this.menuItems.map((e=>{var t,n;return i("pn-mainnav-link",{name:e.name,href:e.href,itemid:e.id,target:null!==(t=e.linkTarget)&&void 0!==t?t:"_self",linkid:e.trackingId},(e.promotedMenuItems&&e.promotedMenuItems.length>0||e.children&&e.children.length>0)&&i("pn-mainnav-level",null,e.children.length>0&&i("pn-mainnav-list",{heading:null!==(n=e.navigationHeading)&&void 0!==n?n:""},e.children.map((e=>{var t;return i("pn-mainnav-link",{name:e.name,href:e.href,target:null!==(t=e.linkTarget)&&void 0!==t?t:"_self",linkid:e.trackingId})}))),e.promotedMenuItems&&e.promotedMenuItems.length>0&&i("pn-mainnav-list",{heading:e.promotedMenuItemsHeader},e.promotedMenuItems.map((t=>i("pn-mainnav-link",{href:t.href,name:t.linkText,target:t.openInNewWindow?"_blank":"_self",linkid:this.promotedItemId(t)+e.id}))))))}))),i("div",{slot:"footer",class:"siteheader-menu-footer"},this.gotData&&this.loginDialog&&!this.hideLogin&&i("pn-marketweb-siteheader-login",{emitEvents:!1,loginDialog:this.loginDialog,endpoint:this.endpoint,fullname:this.userFullname,loggedin:this.userLoggedin,i18n:this.i18n,showProfileSelection:this.showProfileSelection}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&i("pn-language-selector",{value:this.language},this.languageOptions.map((e=>i("pn-language-selector-option",{name:e.nativeName,code:e.twoLetterISOLanguageName,selected:e.isCurrent,url:this.getLanguageVersionUrl(e)})))),!this.hideSiteSelector&&i("pn-site-selector",{language:this.language},this.gotData&&(null===(r=this.siteSelector)||void 0===r?void 0:r.currentSiteTitle)&&i("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle,description:this.siteSelector.currentSiteDescription}),this.gotData&&(null===(o=this.siteSelector)||void 0===o?void 0:o.siteSelections)&&this.siteSelector.siteSelections.map((e=>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,siteid:this.siteid,search:this.search,"hide-search":this.hideSearch,i18n:this.i18n}))))),i("pn-marketweb-siteheader-search",{language:this.language,siteid:this.siteid,primary:!0,search:this.search,"hide-search":this.hideSearch,"show-only-link":this.minimizeSearch,i18n:this.i18n}))))}get hostElement(){return a(this)}static get watchers(){return{language:["onLanguageChange"],market:["onMarketChange"]}}};l.style="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;max-width:30rem;min-width:23.3rem;width:100%}}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}";export{l as pn_marketweb_siteheader}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{u(r.next(t))}catch(e){i(e)}}function s(t){try{u(r["throw"](t))}catch(e){i(e)}}function u(t){t.done?n(t.value):o(t.value).then(a,s)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register([],(function(t){"use strict";return{execute:function(){var e=function(){function t(t){if(t===void 0){t=window.location.href}this.href="";this.market="";this.language="";this.environment="";this.url=null;this.allowedLanguages=["sv","da","fi","no","en","de"];this.allowedMarkets=["se","dk","fi","no","com","de","tpl"];this.wwwMarkets=["se","dk","fi","no","de","com"];this.developmentDomains=["localhost",".local","local.",".dev","dev."];this.markets={se:{fallbackLanguage:"sv",integration:"se-integration.postnord.com",preproduction:"se-preproduction.postnord.com",production:"se-production.postnord.com",live:"www.postnord.se"},dk:{fallbackLanguage:"da",integration:"dk-integration.postnord.com",preproduction:"dk-preproduction.postnord.com",production:"dk-production.postnord.com",live:"www.postnord.dk"},fi:{fallbackLanguage:"fi",integration:"fi-integration.postnord.com",preproduction:"fi-preproduction.postnord.com",production:"fi-production.postnord.com",live:"www.postnord.fi"},no:{fallbackLanguage:"no",integration:"no-integration.postnord.com",preproduction:"no-preproduction.postnord.com",production:"no-production.postnord.com",live:"www.postnord.no"},com:{fallbackLanguage:"en",integration:"com-integration.postnord.com",preproduction:"com-preproduction.postnord.com",production:"com-production.postnord.com",live:"www.postnord.com"},de:{fallbackLanguage:"en",integration:"de-integration.postnord.com",preproduction:"de-preproduction.postnord.com",production:"de-production.postnord.com",live:"www.postnord.de"},tpl:{fallbackLanguage:"sv",integration:"tpl-integration.postnord.com",preproduction:"tpl-preproduction.postnord.com",production:"tpl-production.postnord.com",live:"tpl.postnord.com"}};this.environmentTypes=["integration","preproduction","production"];this.environments={production:{name:"production",url:"https://www.postnord.xx/"},preproduction:{name:"preproduction",url:"https://com-preproduction.postnord.com/"},integration:{name:"integration",url:"https://com-integration.postnord.com/"}};this.href=t;this.url=new URL(this.href)}t.prototype.getLanguage=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.language){return[2,this.language]}return[4,this.resolveLanguage()];case 1:t.sent();return[2,this.language]}}))}))};t.prototype.getMarket=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.market){return[2,this.market]}return[4,this.resolveMarket()];case 1:t.sent();return[2,this.market]}}))}))};t.prototype.getEndpoint=function(t,e){if(e===void 0){e=""}return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=this.environments.production.url;if(this.markets[e]&&this.markets[e][t]){if(t==="production"&&window.location.hostname.indexOf(this.markets[e]["live"])===0){return[2,"https://"+this.markets[e]["live"]]}if(window.location.hostname.indexOf(this.markets[e][t])===0){return[2,"https://"+this.markets[e][t]]}}if(this.environments[t]){n=this.environments[t].url;if(t===this.environments.production.name){if(this.wwwMarkets.indexOf(e)!==-1){n=n.replace(".xx","."+e)}else{n=n.replace(".xx",".com");n=n.replace("www.",e+".")}}}return[2,n]}))}))};t.prototype.getEnvironmentName=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(n){t=this.environmentTypes.filter((function(t){return e.url.hostname.indexOf("-"+t)!==-1}))[0];if(t){this.environment=t;return[2,this.environment]}if(this.url.hostname.indexOf("www.")!==-1){this.environment=this.environments.production.name;return[2,this.environment]}this.environment=this.environments.integration.name;return[2,this.environment]}))}))};t.prototype.isDevEnvironment=function(){var t=this;var e=this.developmentDomains.filter((function(e){return t.url.hostname.indexOf(e)!==-1}))[0];return e.length>0};t.prototype.resolveMarket=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o,i,a,s,u,c;var l=this;return __generator(this,(function(f){if(this.href.indexOf("//www.")!==-1){t=this.url.hostname.substring(this.url.hostname.lastIndexOf(".")+1,this.url.hostname.length);if(t&&this.markets[t]){this.market=t}else{console.warn("Unable to define market from www. domain",this.href)}}e=this.environmentTypes.filter((function(t){return l.url.hostname.indexOf("-"+t)!==-1}));if(!this.market&&e&&e.length>0){n=e[0];r=this.url.hostname.substring(0,this.url.hostname.indexOf("-"+n));if(r&&this.markets[r]){this.market=r}else{console.warn("Unable to define market from preset environment names",this.href)}}if(!this.market){if(this.url.hostname.indexOf("www")===-1&&this.url.hostname.indexOf(".postnord.")>0){o=this.url.hostname.indexOf(".")!==this.url.hostname.indexOf(".postnord")?this.url.hostname.indexOf("."):0;i=this.url.hostname.substring(o,this.url.hostname.indexOf(".postnord."));if(this.allowedMarkets.indexOf(i)!==-1){this.market=i;return[2]}}}if(!this.market){a=this.developmentDomains.filter((function(t){return l.url.hostname.indexOf(t)!==-1}))[0];if(!a){this.market=this.allowedMarkets[0];return[2]}s=this.href.replace(a,"");u=this.allowedMarkets.filter((function(t){var e=["."+t,t+".","/"+t+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(u){this.market=u}else{c=Object.entries(this.markets).filter((function(t){var e=["."+t[1].fallbackLanguage,t[1].fallbackLanguage+".","/"+t[1].fallbackLanguage+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(c&&c[0]){this.market=c[0]}}}if(!this.market){console.info("Was unable to detect market, used fallback");this.market=this.allowedMarkets[0]}return[2]}))}))};t.prototype.resolveLanguage=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o;var i=this;return __generator(this,(function(a){if(this.language){return[2]}o=[(t=document.querySelector("html[lang]"))===null||t===void 0?void 0:t.getAttribute("lang"),(e=document.querySelector('[http-equiv="content-language"][content]'))===null||e===void 0?void 0:e.getAttribute("content"),(n=document.querySelector('[property="og:locale"][content]'))===null||n===void 0?void 0:n.getAttribute("content"),(r=document.querySelector("[lang]"))===null||r===void 0?void 0:r.getAttribute("lang")];o.filter((function(t){return t})).forEach((function(t){if(i.allowedLanguages.indexOf(t)){i.language=t;return}}));if(!this.language&&this.market){this.language=this.markets[this.market].fallbackLanguage}return[2]}))}))};return t}();t("M",e);var n=function(){function t(t){var e=this;if(t===void 0){t=""}this.storagePrefix="";this.store={get:function(t,n){if(n===void 0){n=false}var r=n?window.localStorage:window.sessionStorage;var o=n?window.sessionStorage:window.localStorage;var i=r.getItem("".concat(e.storagePrefix,"-").concat(t));if(!i){i=o.getItem("".concat(e.storagePrefix,"-").concat(t))}if(!i){return i}if(i.indexOf("{")===0){try{return JSON.parse(i)}catch(a){}}if(i.indexOf(",")!==-1){return i.split(",")}return i},set:function(t,n,r){if(r===void 0){r=false}var o=r?window.localStorage:window.sessionStorage;if(typeof n==="object"&&typeof n.length==="undefined"){o.setItem("".concat(e.storagePrefix,"-").concat(t),JSON.stringify(n));return}o.setItem("".concat(e.storagePrefix,"-").concat(t),n)},remove:function(t){window.sessionStorage.removeItem("".concat(e.storagePrefix,"-").concat(t))}};this.storagePrefix=t}t.prototype.fetchJson=function(t,e,n,r){if(e===void 0){e={}}if(n===void 0){n=false}if(r===void 0){r=null}return __awaiter(this,void 0,void 0,(function(){var o;var i=this;return __generator(this,(function(a){o=new Promise((function(o){return __awaiter(i,void 0,void 0,(function(){var i,a,s,u,c,l;return __generator(this,(function(f){switch(f.label){case 0:i=true;a=typeof t==="string"?t:t.url;s=a;u=null;c=null;if(n){c=this.store.get(s);if(c&&!c.permanent){i=false}if(c&&c.data){u=c.data;o(u)}}if(!i)return[3,3];return[4,window.fetch(t,e)];case 1:l=f.sent();return[4,l.json()];case 2:u=f.sent();o(u);if(n){if(typeof r==="function"&&c!=null){r(u)}this.store.set(s,this.wrapJson(u,true),true);this.store.set(s,this.wrapJson(u,false),false)}f.label=3;case 3:return[2]}}))}))}));return[2,o]}))}))};t.prototype.wrapJson=function(t,e){if(e===void 0){e=false}var n=new Date;return{timestamp:n.getTime(),time:n.toISOString(),data:t,permanent:e}};return t}();t("F",n)}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,a,
|
|
1
|
+
System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,i,a,r;return{setters:[function(s){e=s.d;n=s.N;t=s.w;i=s.p;a=s.H;r=s.b}],execute:function(){var s=function(){{o(a.prototype)}var r=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(n,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var s={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return i(s)};var o=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var i=this.childNodes;if(e){for(var a=0;a<i.length;a++){if(i[a].nodeType!==2){t.appendChild(i[a].cloneNode(true))}}}return t}};s().then((function(e){return r([["p-6d08e5cc.system",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],siteid:[1],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[516,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],showProfileSelection:[1540,"show-profile-selection"],siteDomainInUrls:[4,"site-domain-in-urls"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-bc22baf1.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-8144bcbc.system",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-fecc53bb.system",[[4,"pn-product-pricelist",{source:[1],language:[1025],market:[1025],productid:[1],filteredItems:[32],sourceData:[32],gotData:[32],loading:[32],postagetype:[32],weight:[32],weightvalue:[32]}]]],["p-6c8d3789.system",[[0,"pn-proxio-pricegroup",{endpoint:[1025],culture:[1],tariffid:[1],cache:[4],activeWeightIndex:[32],data:[32],i18n:[32]},[[0,"activeWeightIndex","setActiveWeightIndex"],[0,"culture","setCulture"]]]]],["p-723b9901.system",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-e54d477c.system",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],siteDomainInUrls:[4,"site-domain-in-urls"],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-2da8e5e8.system",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-1151bf60.system",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],sumtext:[513],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-36a1b8e1.system",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-4f67721e.system",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e6fa11ad.system",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-2718b89a.system",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-80dce81e.system",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["p-290d5824.system",[[4,"pn-product-tile"]]],["p-74d35edf.system",[[4,"pn-profile-modal",{heading:[1],continueCtaText:[1,"continue-cta-text"],choosenCompanyText:[1,"choosen-company-text"],toText:[1,"to-text"],chooseCustomerNumberText:[1,"choose-customer-number-text"],isLoading:[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-aa271997.system",[[4,"pn-profile-modal-customernumber",{url:[513],customernumber:[513],selected:[516]}]]],["p-7b9fb94f.system",[[4,"pn-profile-modal-profile",{heading:[513],description:[513],url:[513],selected:[1028],showCustomerNumbers:[516,"show-customer-numbers"],pleaseSelectText:[513,"please-select-text"],visible:[1540],identifier:[32]}]]],["p-58a57436.system",[[4,"pn-profile-modal-type",{typeid:[513],name:[1025],selected:[1028],selectedprofile:[1025]}]]],["p-450cbe76.system",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-93cecc43.system",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-a247058b.system",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-885bc8d7.system",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-625fb7fb.system",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-b88337dd.system",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-198d9c77.system",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["p-8117b79e.system",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-9edaf6b6.system",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["p-e4a4e68f.system",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],weightText:[32],linkId:[32],shopLabel:[32],shopUrl:[32],shopId:[32]}]]],["p-c2a4803f.system",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-1ce871c5.system",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-fc1083d2.system",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-e66a8bb8.system",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-da7f1b66.system",[[0,"pn-marketweb-siteheader-login-links",{loginDialog:[1040],loginManager:[16],idNamespace:[1,"id-namespace"],loggedin:[516],username:[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{loginDialog:[1040],loginManager:[16],endpoint:[1],loggedin:[4],idNamespace:[1,"id-namespace"],heading:[1],i18n:[16],currentProfile:[1040],profileoptions:[1040],user:[32],logoutLink:[32],userName:[32],userEmail:[32]}]]],["p-942ad206.system",[[4,"pn-proxio-productcard"],[0,"pn-proxio-productcard-description",{heading:[1],highlight:[1],description:[1],list:[1040]}],[0,"pn-proxio-productcard-information",{label:[1],information:[16]}],[0,"pn-proxio-productcard-pricelink",{price:[1],link:[1],linktext:[1]}]]],["p-a921d3fd.system",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-34d74e18.system",[[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[16],emitEvents:[4,"emit-events"],loginDialog:[1040],fullname:[1],loggedin:[4],showProfileSelection:[1028,"show-profile-selection"],loginManager:[32],loginLinks:[32],toggleButtonText:[32],username:[32]}],[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],siteid:[1],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,e,r){function o(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function a(t){try{c(r.next(t))}catch(i){n(i)}}function l(t){try{c(r["throw"](t))}catch(i){n(i)}}function c(t){t.done?e(t.value):o(t.value).then(a,l)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(i){return c([t,i])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(n=a[0]&2?o["return"]:a[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;if(o=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){e.label=a[1];break}if(a[0]===6&&e.label<n[1]){e.label=n[1];n=a;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(a);break}if(n[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(l){a=[6,l];o=0}finally{r=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js","./p-6174a610.system.js"],(function(t){"use strict";var i,e,r,o,n;return{setters:[function(t){i=t.r;e=t.h;r=t.a},function(t){o=t.F;n=t.M}],execute:function(){var a={"sv-se":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",notTraceable:"Inte spårbart",Creapest:"Billigast"},"en-gb":{from:"From ",labelRoll:"Roll",labelPackage:"Package",notTraceable:"Not traceable",Creapest:"Cheapest"}};var l="pn-proxio-pricegroup div.weightcontainer{margin:3rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;height:5rem;-ms-flex-pack:justify;justify-content:space-between}pn-proxio-pricegroup input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.3rem;height:1.3rem;background-color:#005D92;border-radius:50%}pn-proxio-pricegroup input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.5rem;width:1.5rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button button div.button-tooltip{visibility:hidden;display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin-left:auto;margin-right:auto;position:relative}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.7rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1.32rem);border-radius:3rem;margin-right:3.5rem}pn-proxio-pricegroup .activeweight{font-size:large;font-weight:bold}";var c=t("pn_proxio_pricegroup",function(){function t(t){i(this,t);this.endpoint=null;this.culture="sv-se";this.tariffid="";this.cache=true;this.activeWeightIndex=0;this.data=null;this.i18n=a["sv-se"];this.fetchHelper=new o("proxiopricegroup")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var i,e,r,o;return __generator(this,(function(a){switch(a.label){case 0:i=new n(t);return[4,i.getEnvironmentName()];case 1:e=a.sent();if(!(!this.endpoint&&(e===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,4];return[4,i.getMarket()];case 2:r=a.sent();o=this;return[4,i.getEndpoint(e,r)];case 3:o.endpoint=a.sent();a.label=4;case 4:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){this.setCulture();this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;return __generator(this,(function(r){switch(r.label){case 0:if(!this.culture||!this.tariffid){return[2]}t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;i="".concat(t,"/api/proxio/price-list-group?tariffId=").concat(this.tariffid,"&culture=").concat(this.culture,"&cached=").concat(this.cache);return[4,this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this))];case 1:e=r.sent();if(e===null||e===void 0?void 0:e.proxioProduct){this.data=e}return[2]}}))}))};t.prototype.onFetchData=function(t){this.data=t};t.prototype.setActiveWeightIndex=function(t){var i,e,r;var o=0;var n=(r=((e=(i=this.data.proxioProduct)===null||i===void 0?void 0:i.weightAndPriceList)===null||e===void 0?void 0:e.length)-1)!==null&&r!==void 0?r:o;t=t>n?n:t;t=t<o?o:t;this.activeWeightIndex=t};t.prototype.setCulture=function(){if(a[this.culture]){this.i18n=a[this.culture]}};t.prototype.getPrice=function(t){var i;return(i=t===null||t===void 0?void 0:t.weightAndPriceList[this.activeWeightIndex])===null||i===void 0?void 0:i.item2};t.prototype.isActive=function(t){return t===this.activeWeightIndex};t.prototype.render=function(){var t=this;var i,o,n;return e(r,null,((i=this.data)===null||i===void 0?void 0:i.proxioProduct)?e("div",null,e("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?e("div",{class:"weightvaluecontainer"},e("pn-button",{disabled:this.activeWeightIndex===0?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex-1)}}),e("div",{class:"weightradios"},e("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map((function(i,r){return e("div",{class:"weightdata"+(t.isActive(r)?" activeweight":"")},e("input",{type:"radio",id:"weightradio"+r,name:"weightradio",value:r,checked:t.isActive(r),onClick:function(){return t.setActiveWeightIndex(r)}}),e("label",{htmlFor:"weightradio"+r},i.item1))}))),e("pn-button",{disabled:this.activeWeightIndex===((n=(o=this.data.proxioProduct)===null||o===void 0?void 0:o.weightAndPriceList)===null||n===void 0?void 0:n.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex+1)}})):null),e("pn-proxio-productcard",null,e("h2",{slot:"title"},this.data.proxioProduct.productTitle),e("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),e("div",{slot:"information"},e("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),e("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),e("div",{slot:"bottomtags"},this.data.proxioProduct.tracable?e("pn-titletag",{color:"gray50"},this.i18n.notTraceable):null,this.data.proxioProduct.usp1?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),e("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),e("div",{slot:"pricelink"},e("pn-proxio-productcard-pricelink",{price:this.i18n.from+this.getPrice(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((function(i){return e("pn-proxio-productcard-pricelink",{price:t.i18n.from+t.getPrice(i),link:i.productLink,linktext:i.productLinkText})})):null))):null)};return t}());c.style=l}}}));
|