@postnord/pn-marketweb-components 1.0.7 → 1.0.8
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/loader.cjs.js +1 -1
- package/cjs/pn-choice-button_2.cjs.entry.js +2 -2
- package/cjs/{pn-find-service-and-price-store-7ced0e29.js → pn-find-service-and-price-store-56d8b760.js} +3 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +37 -20
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-product-pricelist-result.cjs.entry.js +13 -2
- package/cjs/{pn-product-pricelist-store-ffd73312.js → pn-product-pricelist-store-e4f8503b.js} +5 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +114 -5
- package/cjs/pn-product-tile_3.cjs.entry.js +4 -4
- package/collection/components/widgets/pn-find-service-and-price/find-service-and-price.stories.js +1 -1
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +4 -4
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-store.js +3 -1
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-translations.js +10 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.css +5 -1
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +25 -18
- package/collection/components/widgets/pn-product-pricelist/data.js +17 -15
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +22 -7
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-store.js +5 -1
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-translations.js +20 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.css +50 -1
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +76 -2
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.stories.js +1 -1
- package/collection/components/widgets/pn-product-tile/pn-product-tile-price.css +5 -3
- package/collection/components/widgets/pn-product-tile/pn-product-tile-price.js +6 -11
- package/collection/components/widgets/pn-product-tile/pn-product-tile.css +4 -4
- package/collection/components/widgets/pn-product-tile/pn-product-tile.js +3 -3
- package/custom-elements/index.js +184 -41
- package/esm/loader.js +1 -1
- package/esm/pn-choice-button_2.entry.js +2 -2
- package/esm/{pn-find-service-and-price-store-0c7083bd.js → pn-find-service-and-price-store-d02cbfe1.js} +3 -1
- package/esm/pn-find-service-and-price.entry.js +37 -20
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-product-pricelist-result.entry.js +13 -2
- package/esm/{pn-product-pricelist-store-82211c4a.js → pn-product-pricelist-store-6259b354.js} +5 -1
- package/esm/pn-product-pricelist.entry.js +114 -5
- package/esm/pn-product-tile_3.entry.js +4 -4
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-choice-button_2.entry.js +1 -1
- package/esm-es5/{pn-find-service-and-price-store-0c7083bd.js → pn-find-service-and-price-store-d02cbfe1.js} +1 -1
- package/esm-es5/pn-find-service-and-price.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
- package/esm-es5/pn-product-pricelist-store-6259b354.js +1 -0
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-product-tile_3.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-3ae134bf.system.entry.js +1 -0
- package/pn-market-web-components/{p-d0e7e65c.system.js → p-43bb8707.system.js} +1 -1
- package/pn-market-web-components/p-4b4ee8d5.system.entry.js +1 -0
- package/pn-market-web-components/p-57a1db89.system.entry.js +1 -0
- package/pn-market-web-components/p-62700d6e.system.js +1 -1
- package/pn-market-web-components/{p-f37be6ee.system.entry.js → p-80fd4dd9.system.entry.js} +1 -1
- package/pn-market-web-components/p-926fc962.js +1 -0
- package/pn-market-web-components/p-a04d0ba4.entry.js +1 -0
- package/pn-market-web-components/{p-64a6c2fb.js → p-af861bb5.js} +1 -1
- package/pn-market-web-components/p-b129cc27.system.js +1 -0
- package/pn-market-web-components/p-b4904bdb.system.entry.js +1 -0
- package/pn-market-web-components/p-ba704cbf.entry.js +1 -0
- package/pn-market-web-components/p-ba8e9dfe.entry.js +1 -0
- package/pn-market-web-components/{p-dc5ff15f.entry.js → p-d3590589.entry.js} +1 -1
- package/pn-market-web-components/p-e377410f.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-store.d.ts +4 -0
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-translations.d.ts +10 -0
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-types.d.ts +2 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-result.d.ts +2 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-store.d.ts +8 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-translations.d.ts +20 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-types.d.ts +9 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist.d.ts +4 -0
- package/esm-es5/pn-product-pricelist-store-82211c4a.js +0 -1
- package/pn-market-web-components/p-1905c548.entry.js +0 -1
- package/pn-market-web-components/p-1fe6de09.entry.js +0 -1
- package/pn-market-web-components/p-23743bec.system.entry.js +0 -1
- package/pn-market-web-components/p-23d34c82.system.entry.js +0 -1
- package/pn-market-web-components/p-2fa246f1.system.js +0 -1
- package/pn-market-web-components/p-44f74289.system.entry.js +0 -1
- package/pn-market-web-components/p-4f283190.js +0 -1
- package/pn-market-web-components/p-c06b37c7.entry.js +0 -1
- package/pn-market-web-components/p-c9af6ced.entry.js +0 -1
- package/pn-market-web-components/p-ea9afb95.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host}from"./index-52dc19ca.js";import{s as state}from"./pn-product-pricelist-store-
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-52dc19ca.js";import{s as state}from"./pn-product-pricelist-store-6259b354.js";import"./index-7c277874.js";var pnProductPricelistResultCss="";var PnFindProductPricelistResult=function(){function t(t){registerInstance(this,t);this.item=null;this.shownitems=[];this.weightText=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){this.shownitems=[];if(this.item.pricestamps){this.shownitems.push(Object.assign(Object.assign({},this.item),{priceagent:null,pricesenddirect:null}))}if(this.item.priceagent){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,pricesenddirect:null}))}if(this.item.pricesenddirect){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,priceagent:null}))}this.weightText=this.item.what==="parcel"?this.item.maxweight+"kg":this.item.what==="letter"&&this.item.maxweight>999?Math.round(this.item.maxweight/1e3)+" kg":this.item.maxweight+" g"};t.prototype.render=function(){var t=this;return h(Host,null,this.shownitems.map((function(e){return h("pn-product-tile",null,h("pn-illustration",{slot:"illustration",illustration:e.illustration}),h("div",{slot:"content"},h("div",{class:"content"},h("h3",null,e.name),e.description?h("div",{class:"description"},e.description):null,e.info?h("div",{class:"description"},e.info):null)),e.maxweight?h("pn-product-tile-info",{label:state.i18n.maxweightlabel,text:t.weightText}):null,e.maximummeasurements?h("pn-product-tile-info",{label:state.i18n.maxmeasurementlabel,text:e.maximummeasurements}):null,e.pricestamps?h("pn-product-tile-price",{slot:"price",label:state.i18n.stampshopcta,amount:e.pricestamps+"",currency:state.market.currency}):null,e.priceagent?h("pn-product-tile-price",{slot:"price",label:"",amount:e.priceagent+"",currency:state.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,e.pricesenddirect?h("pn-product-tile-price",{slot:"price",label:state.i18n.senddirectcta,amount:e.pricesenddirect+"",currency:state.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,e.note?h("small",{slot:"note"},h("p",null,e.note)):null)})))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}();PnFindProductPricelistResult.style=pnProductPricelistResultCss;export{PnFindProductPricelistResult as pn_product_pricelist_result};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as createStore}from"./index-7c277874.js";var _a=createStore({i18n:{maxweightlabel:"",weightlabel:"",maxmeasurementlabel:"",sizeheading:"",senddirectcta:"",stampshopcta:""},market:{currency:""}}),state=_a.state,onChange=_a.onChange;export{state as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,a){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(a.next(e))}catch(t){r(t)}}function o(e){try{l(a["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):n(e.value).then(s,o)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(o){s=[6,o];n=0}finally{a=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var i=0,a=t.length,n=e.length;i<a;i++,n++)e[n]=t[i];return e};import{r as registerInstance,h,a as Host}from"./index-52dc19ca.js";import{c as convertFileFromStream}from"./convert-b49a0857.js";import{s as state}from"./pn-product-pricelist-store-6259b354.js";import"./index-7c277874.js";var translations={sv:{maxweightlabel:"Maxvikt",weightlabel:"Vikt",maxmeasurementlabel:"Maxvolym",sizeheading:"Hur mycket väger det?",senddirectcta:"Köp frakt via Skicka Direkt",stampshopcta:"Köp frimärken via vår webshop"},en:{maxweightlabel:"Max weight",weightlabel:"Weight",maxmeasurementlabel:"Maximum measurement",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},da:{maxweightlabel:"Max vægt",weightlabel:"Vægt",maxmeasurementlabel:"Maks. Volumen",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{maxweightlabel:"Maks vekt",weightlabel:"Vekt",maxmeasurementlabel:"Maks volum",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{maxweightlabel:"Max paino",weightlabel:"Piano",maxmeasurementlabel:"Max äänenvoimakkuus",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}};var markets={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}};var weights={letter:[{name:"50g",abbreviation:"g",value:50},{name:"100g",abbreviation:"g",value:100},{name:"250g",abbreviation:"g",value:250},{name:"500g",abbreviation:"g",value:500},{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2}],parcel:[{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5},{name:"6kg",abbreviation:"kg",value:6},{name:"7Kg",abbreviation:"kg",value:7},{name:"8kg",abbreviation:"kg",value:8},{name:"9kg",abbreviation:"kg",value:9},{name:"10kg",abbreviation:"kg",value:10},{name:"11kg",abbreviation:"kg",value:11},{name:"12kg",abbreviation:"kg",value:12},{name:"13kg",abbreviation:"kg",value:13},{name:"14kg",abbreviation:"kg",value:14},{name:"15kg",abbreviation:"kg",value:15},{name:"16kg",abbreviation:"kg",value:16},{name:"17kg",abbreviation:"kg",value:17},{name:"18kg",abbreviation:"kg",value:18},{name:"20kg",abbreviation:"kg",value:20}]};var pnProductPricelistCss='pn-product-pricelist pn-spinner{margin:1em auto}pn-product-pricelist h2,pn-product-pricelist .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-product-pricelist .content,pn-product-pricelist .weightselection{max-width:50em;margin:0 auto 1em}pn-product-pricelist .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-product-pricelist .weightoption-input{width:5em;position:relative}pn-product-pricelist .weightoption-input input::-webkit-outer-spin-button,pn-product-pricelist .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-product-pricelist .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-product-pricelist .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-product-pricelist .weightoption-range input{width:calc(100% - 1.5em)}pn-product-pricelist .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-product-pricelist .resultlist:not([data-list-count="0"]){margin-top:2em}';var PnFindProductPricelist=function(){function e(e){registerInstance(this,e);this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-se-findprice.xlsx";this.language="sv";this.market="se";this.productid="";this.filteredItems=[];this.sourceData={types:[],data:[]};this.gotData=false;this.loading=false;this.postagetype={value:""};this.weight={value:0,name:""};this.weightvalue=0}e.prototype.componentWillLoad=function(){this.setState();this.getDataSource().then((function(){}))};e.prototype.setState=function(){if(this.market){state.market=markets[this.market]}if(this.language&&translations[this.language]){state.i18n=translations[this.language]}};e.prototype.getDataSource=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,a;return __generator(this,(function(n){switch(n.label){case 0:if(!this.productid){return[2]}this.loading=true;return[4,fetch(this.source)];case 1:e=n.sent();return[4,e.blob()];case 2:t=n.sent();n.label=3;case 3:n.trys.push([3,5,,6]);return[4,convertFileFromStream(t)];case 4:i=n.sent();this.sourceData=i;this.filterItems();return[3,6];case 5:a=n.sent();this.loading=false;console.warn("Unable to parse data");return[3,6];case 6:return[2]}}))}))};e.prototype.filterItems=function(){var e=this;var t;if(!((t=this.sourceData)===null||t===void 0?void 0:t.data)){console.info("Data has not yet been loaded");return}this.loading=false;var i=this.sourceData.data.filter((function(t){return t.id===e.productid}));if(i.length===0){return}this.postagetype.value=i[0].what;if(!weights[this.postagetype.value]||weights[this.postagetype.value].length===0){return}if(this.weightvalue===0){this.weight=weights[this.postagetype.value][0];this.weightvalue=this.weight.value}var a=this.weight.abbreviation.toLocaleLowerCase()==="kg"&&this.postagetype.value==="letter"?this.weight.value*1e3:this.weight.value;var n=i.filter((function(e){return e.maxweight===a}));if(n.length===0){n=i.filter((function(e){return e.maxweight>=a}));if(n.length>0){var r=__spreadArray([],new Map(n.reverse().map((function(e){return[e["id"],e]}))).values());if(r.length>0){n=r}}}this.filteredItems=n;this.gotData=this.filteredItems.length>0};e.prototype.render=function(){var e=this;return h(Host,null,h("div",{class:"content"},h("slot",null)),this.loading?h("pn-spinner",null):null,this.postagetype.value&&weights[this.postagetype.value]?h("div",{class:"weightselection"},state.i18n.sizeheading?h("div",{class:"heading"},state.i18n.sizeheading):null,h("div",{class:"weightoption"},h("div",{class:"weightoption-input"},h("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:state.i18n.weightlabel,value:this.weightvalue,onChange:function(t){if(t&&t.target&&t.target.value){var i=parseInt(t.target.value,10);if(!isNaN(i)){var a=weights[e.postagetype.value].filter((function(e){var t=e.abbreviation==="kg"?e.value*1e3:e.value;return t>=i}));if(a&&a.length>0){e.weight=a[0];e.weightvalue=e.weight.value}}}}}),h("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),h("div",{class:"weightoption-range"},h("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:!this.weight.value?0:weights[this.postagetype.value].findIndex((function(t){return t.value===e.weightvalue})),onChange:function(t){var i=t.target.value;e.weight=weights[e.postagetype.value][i];e.weightvalue=e.weight.value},min:"0",max:weights[this.postagetype.value].length-1}),h("datalist",{id:"weightlist"},weights[this.postagetype.value].map((function(t,i){var a=t.name;if(weights[e.postagetype.value].length>6){a=i%5===0||i===0||i===weights[e.postagetype.value].length-1?t.name:""}return h("option",Object.assign({value:i},a?{label:a}:{}))})))))):null,h("div",{class:"resultlist","data-list-count":this.filteredItems.length},this.filteredItems.map((function(e){return h("div",null,h("pn-product-pricelist-result",{item:e}))}))))};Object.defineProperty(e,"watchers",{get:function(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],weightvalue:["filterItems"]}},enumerable:false,configurable:true});return e}();PnFindProductPricelist.style=pnProductPricelistCss;export{PnFindProductPricelist as pn_product_pricelist};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host}from"./index-52dc19ca.js";var pnProductTileCss="pn-product-tile{margin-bottom:1em;border:0.1rem solid #D3CECB;outline:none;background:white;-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;padding:1.5em;word-break:break-word;text-decoration:none;border-radius:0.8rem}pn-product-tile [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:0.5em}pn-product-tile>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-tile .tilecontent{
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-52dc19ca.js";var pnProductTileCss="pn-product-tile{margin-bottom:1em;border:0.1rem solid #D3CECB;outline:none;background:white;-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;padding:1.5em;word-break:break-word;text-decoration:none;border-radius:0.8rem}pn-product-tile [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:0.5em}pn-product-tile>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-tile .tilecontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-tile .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-tile .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:calc((100% / 3) * 2);-ms-flex-flow:wrap;flex-flow:wrap}pn-product-tile .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";var PnProductTile=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return h(Host,null,h("slot",{name:"illustration"}),h("div",{class:"tilecontent"},h("div",{class:"details"},h("slot",{name:"content"}),h("div",{class:"info"},h("slot",null)),h("slot",{name:"note"})),h("slot",{name:"price"})))};return e}();PnProductTile.style=pnProductTileCss;var pnProductTileInfoCss="pn-product-tile-info{-ms-flex-item-align:center;align-self:center}";var PnProductTileInfo=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return h(Host,null,this.label?h("p",null,h("small",null,this.label)):null,this.text?h("h3",null,this.text):null)};return e}();h("pn-icon",{symbol:"align-center",small:"false",color:"black"});PnProductTileInfo.style=pnProductTileInfoCss;var pnProductTilePriceCss="pn-product-tile-price{margin-top:1em;white-space:nowrap;text-align:right}pn-product-tile-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-tile-price+pn-product-tile-price{margin-left:1.5em}pn-product-tile-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-tile-price a{text-decoration:none;color:#005D92}pn-product-tile-price a h3{text-decoration:underline}";var PnProductTilePrice=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?h(Host,null,h("h3",null,this.amount?h("span",{class:"pn-2xl"},this.amount):null,this.currency?h("span",{class:"pn-2xl"},this.currency):null),this.label?h("a",{href:this.url},h("pn-button",{small:"true",icon:"arrow-right"},this.label)):null):h(Host,null,h("h3",null,this.amount?h("span",{class:"pn-2xl"},this.amount):null,this.currency?h("span",{class:"pn-2xl"},this.currency):null))};return e}();PnProductTilePrice.style=pnProductTilePriceCss;export{PnProductTile as pn_product_tile,PnProductTileInfo as pn_product_tile_info,PnProductTilePrice as pn_product_tile_price};
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-7331d3bb.system.js","./p-b129cc27.system.js","./p-46018354.system.js"],(function(t){"use strict";var e,i,s,n;return{setters:[function(t){e=t.r;i=t.h;s=t.a},function(t){n=t.s},function(){}],execute:function(){var r="";var l=t("pn_product_pricelist_result",function(){function t(t){e(this,t);this.item=null;this.shownitems=[];this.weightText=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){this.shownitems=[];if(this.item.pricestamps){this.shownitems.push(Object.assign(Object.assign({},this.item),{priceagent:null,pricesenddirect:null}))}if(this.item.priceagent){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,pricesenddirect:null}))}if(this.item.pricesenddirect){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,priceagent:null}))}this.weightText=this.item.what==="parcel"?this.item.maxweight+"kg":this.item.what==="letter"&&this.item.maxweight>999?Math.round(this.item.maxweight/1e3)+" kg":this.item.maxweight+" g"};t.prototype.render=function(){var t=this;return i(s,null,this.shownitems.map((function(e){return i("pn-product-tile",null,i("pn-illustration",{slot:"illustration",illustration:e.illustration}),i("div",{slot:"content"},i("div",{class:"content"},i("h3",null,e.name),e.description?i("div",{class:"description"},e.description):null,e.info?i("div",{class:"description"},e.info):null)),e.maxweight?i("pn-product-tile-info",{label:n.i18n.maxweightlabel,text:t.weightText}):null,e.maximummeasurements?i("pn-product-tile-info",{label:n.i18n.maxmeasurementlabel,text:e.maximummeasurements}):null,e.pricestamps?i("pn-product-tile-price",{slot:"price",label:n.i18n.stampshopcta,amount:e.pricestamps+"",currency:n.market.currency}):null,e.priceagent?i("pn-product-tile-price",{slot:"price",label:"",amount:e.priceagent+"",currency:n.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,e.pricesenddirect?i("pn-product-tile-price",{slot:"price",label:n.i18n.senddirectcta,amount:e.pricesenddirect+"",currency:n.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,e.note?i("small",{slot:"note"},i("p",null,e.note)):null)})))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}());l.style=r}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-46018354.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.c}],execute:function(){var n=t({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:""},market:{currency:""}}),s=n.state,a=n.onChange;e("s",s)}}}));
|
|
1
|
+
System.register(["./p-46018354.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.c}],execute:function(){var n=t({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:""},market:{currency:""}}),s=n.state,a=n.onChange;e("s",s)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,a){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(a.next(e))}catch(t){r(t)}}function o(e){try{l(a["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):n(e.value).then(s,o)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(o){s=[6,o];n=0}finally{a=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var i=0,a=t.length,n=e.length;i<a;i++,n++)e[n]=t[i];return e};System.register(["./p-7331d3bb.system.js","./p-91624bd5.system.js","./p-b129cc27.system.js","./p-46018354.system.js"],(function(e){"use strict";var t,i,a,n,r;return{setters:[function(e){t=e.r;i=e.h;a=e.a},function(e){n=e.c},function(e){r=e.s},function(){}],execute:function(){var s={sv:{maxweightlabel:"Maxvikt",weightlabel:"Vikt",maxmeasurementlabel:"Maxvolym",sizeheading:"Hur mycket väger det?",senddirectcta:"Köp frakt via Skicka Direkt",stampshopcta:"Köp frimärken via vår webshop"},en:{maxweightlabel:"Max weight",weightlabel:"Weight",maxmeasurementlabel:"Maximum measurement",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},da:{maxweightlabel:"Max vægt",weightlabel:"Vægt",maxmeasurementlabel:"Maks. Volumen",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{maxweightlabel:"Maks vekt",weightlabel:"Vekt",maxmeasurementlabel:"Maks volum",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{maxweightlabel:"Max paino",weightlabel:"Piano",maxmeasurementlabel:"Max äänenvoimakkuus",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}};var o={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}};var l={letter:[{name:"50g",abbreviation:"g",value:50},{name:"100g",abbreviation:"g",value:100},{name:"250g",abbreviation:"g",value:250},{name:"500g",abbreviation:"g",value:500},{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2}],parcel:[{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5},{name:"6kg",abbreviation:"kg",value:6},{name:"7Kg",abbreviation:"kg",value:7},{name:"8kg",abbreviation:"kg",value:8},{name:"9kg",abbreviation:"kg",value:9},{name:"10kg",abbreviation:"kg",value:10},{name:"11kg",abbreviation:"kg",value:11},{name:"12kg",abbreviation:"kg",value:12},{name:"13kg",abbreviation:"kg",value:13},{name:"14kg",abbreviation:"kg",value:14},{name:"15kg",abbreviation:"kg",value:15},{name:"16kg",abbreviation:"kg",value:16},{name:"17kg",abbreviation:"kg",value:17},{name:"18kg",abbreviation:"kg",value:18},{name:"20kg",abbreviation:"kg",value:20}]};var u='pn-product-pricelist pn-spinner{margin:1em auto}pn-product-pricelist h2,pn-product-pricelist .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-product-pricelist .content,pn-product-pricelist .weightselection{max-width:50em;margin:0 auto 1em}pn-product-pricelist .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-product-pricelist .weightoption-input{width:5em;position:relative}pn-product-pricelist .weightoption-input input::-webkit-outer-spin-button,pn-product-pricelist .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-product-pricelist .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-product-pricelist .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-product-pricelist .weightoption-range input{width:calc(100% - 1.5em)}pn-product-pricelist .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-product-pricelist .resultlist:not([data-list-count="0"]){margin-top:2em}';var g=e("pn_product_pricelist",function(){function e(e){t(this,e);this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-se-findprice.xlsx";this.language="sv";this.market="se";this.productid="";this.filteredItems=[];this.sourceData={types:[],data:[]};this.gotData=false;this.loading=false;this.postagetype={value:""};this.weight={value:0,name:""};this.weightvalue=0}e.prototype.componentWillLoad=function(){this.setState();this.getDataSource().then((function(){}))};e.prototype.setState=function(){if(this.market){r.market=o[this.market]}if(this.language&&s[this.language]){r.i18n=s[this.language]}};e.prototype.getDataSource=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,a;return __generator(this,(function(r){switch(r.label){case 0:if(!this.productid){return[2]}this.loading=true;return[4,fetch(this.source)];case 1:e=r.sent();return[4,e.blob()];case 2:t=r.sent();r.label=3;case 3:r.trys.push([3,5,,6]);return[4,n(t)];case 4:i=r.sent();this.sourceData=i;this.filterItems();return[3,6];case 5:a=r.sent();this.loading=false;console.warn("Unable to parse data");return[3,6];case 6:return[2]}}))}))};e.prototype.filterItems=function(){var e=this;var t;if(!((t=this.sourceData)===null||t===void 0?void 0:t.data)){console.info("Data has not yet been loaded");return}this.loading=false;var i=this.sourceData.data.filter((function(t){return t.id===e.productid}));if(i.length===0){return}this.postagetype.value=i[0].what;if(!l[this.postagetype.value]||l[this.postagetype.value].length===0){return}if(this.weightvalue===0){this.weight=l[this.postagetype.value][0];this.weightvalue=this.weight.value}var a=this.weight.abbreviation.toLocaleLowerCase()==="kg"&&this.postagetype.value==="letter"?this.weight.value*1e3:this.weight.value;var n=i.filter((function(e){return e.maxweight===a}));if(n.length===0){n=i.filter((function(e){return e.maxweight>=a}));if(n.length>0){var r=__spreadArray([],new Map(n.reverse().map((function(e){return[e["id"],e]}))).values());if(r.length>0){n=r}}}this.filteredItems=n;this.gotData=this.filteredItems.length>0};e.prototype.render=function(){var e=this;return i(a,null,i("div",{class:"content"},i("slot",null)),this.loading?i("pn-spinner",null):null,this.postagetype.value&&l[this.postagetype.value]?i("div",{class:"weightselection"},r.i18n.sizeheading?i("div",{class:"heading"},r.i18n.sizeheading):null,i("div",{class:"weightoption"},i("div",{class:"weightoption-input"},i("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:r.i18n.weightlabel,value:this.weightvalue,onChange:function(t){if(t&&t.target&&t.target.value){var i=parseInt(t.target.value,10);if(!isNaN(i)){var a=l[e.postagetype.value].filter((function(e){var t=e.abbreviation==="kg"?e.value*1e3:e.value;return t>=i}));if(a&&a.length>0){e.weight=a[0];e.weightvalue=e.weight.value}}}}}),i("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),i("div",{class:"weightoption-range"},i("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:!this.weight.value?0:l[this.postagetype.value].findIndex((function(t){return t.value===e.weightvalue})),onChange:function(t){var i=t.target.value;e.weight=l[e.postagetype.value][i];e.weightvalue=e.weight.value},min:"0",max:l[this.postagetype.value].length-1}),i("datalist",{id:"weightlist"},l[this.postagetype.value].map((function(t,a){var n=t.name;if(l[e.postagetype.value].length>6){n=a%5===0||a===0||a===l[e.postagetype.value].length-1?t.name:""}return i("option",Object.assign({value:a},n?{label:n}:{}))})))))):null,i("div",{class:"resultlist","data-list-count":this.filteredItems.length},this.filteredItems.map((function(e){return i("div",null,i("pn-product-pricelist-result",{item:e}))}))))};Object.defineProperty(e,"watchers",{get:function(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],weightvalue:["filterItems"]}},enumerable:false,configurable:true});return e}());g.style=u}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,a){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function l(e){try{s(a.next(e))}catch(t){r(t)}}function o(e){try{s(a["throw"](e))}catch(t){r(t)}}function s(e){e.done?i(e.value):n(e.value).then(l,o)}s((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,n,r,l;return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(t){return s([e,t])}}function s(l){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,n&&(r=l[0]&2?n["return"]:l[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;if(n=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;n=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=t.call(e,i)}catch(o){l=[6,o];n=0}finally{a=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var i=0,a=t.length,n=e.length;i<a;i++,n++)e[n]=t[i];return e};System.register(["./p-7331d3bb.system.js","./p-91624bd5.system.js","./p-43bb8707.system.js","./p-46018354.system.js"],(function(e){"use strict";var t,i,a,n;return{setters:[function(e){t=e.r;i=e.h},function(e){a=e.c},function(e){n=e.s},function(){}],execute:function(){var r={sv:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Hit eller dit?",sizeheading:"Hur mycket väger det?",resultlistheading:"Några utvalda val",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp frakt via Skicka Direkt",stampshopcta:"Köp frimärken via vår webshop"},en:{componentheading:"What do you want to send?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Vægt",maxweightlabel:"Max vægt",maxmeasurementlabel:"Maks. Volumen",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Vekt",maxweightlabel:"Maks vekt",maxmeasurementlabel:"Maks volum",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Paino",maxweightlabel:"Max paino",maxmeasurementlabel:"Max äänenvoimakkuus",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}};var l={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}};var o=[{name:"Brev",value:"letter",illustration:"letterbox-reply-letter-plants"},{name:"Paket",value:"parcel",illustration:"tracking"}];var s={letter:[{name:"Sweden",value:"sweden",illustration:"letterboxes"},{name:"Abroad",value:"abroad",illustration:"character-box-letters-globe"}],parcel:[{name:"Sweden",value:"sweden",illustration:"letterboxes"},{name:"Within Europe",value:"withineurope",illustration:"character-box-letters-globe"},{name:"Outside Europe",value:"outsideeurope",illustration:"discover"}]};var u={letter:[{name:"50g",abbreviation:"g",value:50},{name:"100g",abbreviation:"g",value:100},{name:"250g",abbreviation:"g",value:250},{name:"500g",abbreviation:"g",value:500},{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2}],parcel:[{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5},{name:"6kg",abbreviation:"kg",value:6},{name:"7Kg",abbreviation:"kg",value:7},{name:"8kg",abbreviation:"kg",value:8},{name:"9kg",abbreviation:"kg",value:9},{name:"10kg",abbreviation:"kg",value:10},{name:"11kg",abbreviation:"kg",value:11},{name:"12kg",abbreviation:"kg",value:12},{name:"13kg",abbreviation:"kg",value:13},{name:"14kg",abbreviation:"kg",value:14},{name:"15kg",abbreviation:"kg",value:15},{name:"16kg",abbreviation:"kg",value:16},{name:"17kg",abbreviation:"kg",value:17},{name:"18kg",abbreviation:"kg",value:18},{name:"20kg",abbreviation:"kg",value:20}]};var p="pn-find-service-and-price .findprice-form{max-width:50em;margin:0 auto}pn-find-service-and-price h2,pn-find-service-and-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-service-and-price .postagetypes,pn-find-service-and-price .deliveryscope{text-align:center;margin-bottom:3rem}pn-find-service-and-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-service-and-price .weightoption-input{width:5em;position:relative}pn-find-service-and-price .weightoption-input input::-webkit-outer-spin-button,pn-find-service-and-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-service-and-price .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-find-service-and-price .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-find-service-and-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-service-and-price .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-find-service-and-price .resultlist{margin:3em 0}";var g=e("pn_find_service_and_price",function(){function e(e){t(this,e);this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-se-findprice.xlsx";this.language="sv";this.market="se";this.filteredItems=[];this.postagetype={value:"",name:"",icon:""};this.weight={value:0,name:""};this.weightvalue=0;this.deliveryscope={value:"",name:"",icon:""};this.sourceData={types:[],data:[]}}e.prototype.componentWillLoad=function(){this.setState();this.getDataSource()};e.prototype.getDataSource=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,r;return __generator(this,(function(l){switch(l.label){case 0:e="?cache="+Math.floor(Math.random()*(1e4-1)+1);return[4,fetch(this.source+e)];case 1:t=l.sent();return[4,t.blob()];case 2:i=l.sent();l.label=3;case 3:l.trys.push([3,5,,6]);return[4,a(i)];case 4:n=l.sent();this.sourceData=n;this.filterItems();return[3,6];case 5:r=l.sent();console.log("Unable to parse data");return[3,6];case 6:return[2]}}))}))};e.prototype.setState=function(){if(this.market){n.market=l[this.market]}if(this.language&&r[this.language]){n.i18n=r[this.language]}};e.prototype.filterItems=function(){var e=this;var t;if(!((t=this.sourceData)===null||t===void 0?void 0:t.data)){console.log("Data has not yet been loaded");return}if(!this.postagetype){return}var i=this.sourceData.data.filter((function(t){return t.what===e.postagetype.value}));if(!this.deliveryscope){return}var a=i.filter((function(t){return t.deliveryscope===e.deliveryscope.value}));if(!this.weight||!this.weight.value){return}var n=this.weight.abbreviation.toLocaleLowerCase()==="kg"&&this.postagetype.value==="letter"?this.weight.value*1e3:this.weight.value;var r=a.filter((function(e){return e.maxweight===n}));if(r.length===0){r=a.filter((function(e){return e.maxweight>=n}));if(r.length>0){var l=__spreadArray([],new Map(r.reverse().map((function(e){return[e["id"],e]}))).values());if(l.length>0){r=l}}}console.log("weightFilteredData",r);this.filteredItems=r};e.prototype.render=function(){var e=this;return i("div",null,i("div",{class:"findprice-form"},n.i18n.componentheading?i("h2",null,n.i18n.componentheading):null,i("div",{class:"postagetypes"},o.map((function(t){return i("pn-choice-button",{choiceid:t.value,value:t.value,name:"postagetype",type:"radio",checked:t.value===e.postagetype.value,onChange:function(){e.postagetype=o.filter((function(e){return e.value===t.value}))[0];e.deliveryscope={value:"",name:"",icon:""};e.weight={value:0,name:""};e.weightvalue=e.weight.value}},i("pn-illustration",{illustration:t.illustration})," ",t.name)}))),this.postagetype.value&&s[this.postagetype.value]?i("div",null,n.i18n.deliveryscopeheading?i("div",{class:"heading"},n.i18n.deliveryscopeheading):null,i("div",{class:"deliveryscope"},s[this.postagetype.value].map((function(t){return i("pn-choice-button",{choiceid:e.postagetype.value+t.value,value:t.value,name:"deliveryscope",type:"radio",checked:t.value===e.deliveryscope.value,onChange:function(){e.deliveryscope=s[e.postagetype.value].filter((function(e){return e.value===t.value}))[0];if(e.weight.value===0){e.weight=u[e.postagetype.value][0];e.weightvalue=e.weight.value}}},i("pn-illustration",{illustration:t.illustration})," ",t.name)})))):null,this.postagetype.value&&u[this.postagetype.value]&&this.deliveryscope.value?i("div",null,n.i18n.sizeheading?i("div",{class:"heading"},n.i18n.sizeheading):null,i("div",{class:"weightoption"},i("div",{class:"weightoption-input"},i("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:n.i18n.weightlabel,value:this.weightvalue,onChange:function(t){if(t&&t.target&&t.target.value){var i=parseInt(t.target.value,10);if(!isNaN(i)){var a=u[e.postagetype.value].filter((function(e){var t=e.abbreviation==="kg"?e.value*1e3:e.value;return t>=i}));if(a&&a.length>0){e.weight=a[0];e.weightvalue=e.weight.value}}}}}),i("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),i("div",{class:"weightoption-range"},i("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:!this.weight.value?0:u[this.postagetype.value].findIndex((function(t){return t.value===e.weightvalue})),onChange:function(t){var i=t.target.value;e.weight=u[e.postagetype.value][i];e.weightvalue=e.weight.value},min:"0",max:u[this.postagetype.value].length-1}),i("datalist",{id:"weightlist"},u[this.postagetype.value].map((function(t,a){var n=t.name;if(u[e.postagetype.value].length>6){n=a%5===0||a===0||a===u[e.postagetype.value].length-1?t.name:""}return i("option",Object.assign({value:a},n?{label:n}:{}))})))))):null),this.filteredItems&&this.filteredItems.length>0?i("div",{class:"resultlist"},n.i18n.resultlistheading?i("div",{class:"heading"},n.i18n.resultlistheading):null,this.filteredItems.map((function(e){return i("div",null,i("pn-find-service-and-price-result",{item:e}))}))):null)};Object.defineProperty(e,"watchers",{get:function(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],deliveryscope:["filterItems"],weightvalue:["filterItems"]}},enumerable:false,configurable:true});return e}());g.style=p}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7331d3bb.system.js"],(function(){"use strict";var e,n,t,a,i,r;return{setters:[function(o){e=o.d;n=o.N;t=o.w;a=o.p;i=o.H;r=o.b}],execute:function(){var o=function(){{s(i.prototype)}var r=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/"+n+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var o={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return a(o)};var s=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 a=this.childNodes;if(e){for(var i=0;i<a.length;i++){if(a[i].nodeType!==2){t.appendChild(a[i].cloneNode(true))}}}return t}};o().then((function(e){return r([["p-3ae74105.system",[[4,"pn-marketweb-siteheader",{market:[1],language:[1],endpoint:[1],hideSiteSelector:[1028,"hide-site-selector"],hideLanguageSelector:[1028,"hide-language-selector"],hideSearch:[1028,"hide-search"],hideLogin:[1028,"hide-login"],i18n:[32],gotData:[32],fetchingData:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],loginDialog:[32],minimizeSearch:[32]},[[9,"resize","handleResize"]]]]],["p-
|
|
1
|
+
System.register(["./p-7331d3bb.system.js"],(function(){"use strict";var e,n,t,a,i,r;return{setters:[function(o){e=o.d;n=o.N;t=o.w;a=o.p;i=o.H;r=o.b}],execute:function(){var o=function(){{s(i.prototype)}var r=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/"+n+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var o={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return a(o)};var s=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 a=this.childNodes;if(e){for(var i=0;i<a.length;i++){if(a[i].nodeType!==2){t.appendChild(a[i].cloneNode(true))}}}return t}};o().then((function(e){return r([["p-3ae74105.system",[[4,"pn-marketweb-siteheader",{market:[1],language:[1],endpoint:[1],hideSiteSelector:[1028,"hide-site-selector"],hideLanguageSelector:[1028,"hide-language-selector"],hideSearch:[1028,"hide-search"],hideLogin:[1028,"hide-login"],i18n:[32],gotData:[32],fetchingData:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],loginDialog:[32],minimizeSearch:[32]},[[9,"resize","handleResize"]]]]],["p-57a1db89.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-4b4ee8d5.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-0a756d7d.system",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["p-e367b055.system",[[0,"pn-marketweb-sitefooter",{market:[1],language:[1],endpoint:[1],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-3ae134bf.system",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-80fd4dd9.system",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}],[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-a5179982.system",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-27502f43.system",[[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"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopen","setOpenMenu"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],i18n:[8,"i-1-8n"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],search:[1040]}],[4,"pn-site-selector",{buttontext:[1],heading:[1],language:[1],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["p-b4904bdb.system",[[4,"pn-product-tile"],[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]]],e)}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7331d3bb.system.js","./p-
|
|
1
|
+
System.register(["./p-7331d3bb.system.js","./p-43bb8707.system.js","./p-46018354.system.js"],(function(e){"use strict";var t,i,n,o,s;return{setters:[function(e){t=e.r;i=e.h;n=e.a;o=e.c},function(e){s=e.s},function(){}],execute:function(){var c="pn-choice-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;display:inline-block;background:#fff;position:relative;margin:0.2em 0.4em}pn-choice-button input{opacity:0;position:absolute;top:0;left:0;pointer-events:none;margin:0;width:100%;height:100%}pn-choice-button label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0.4rem 0.8rem;border:0.1rem solid #D3CECB;color:#005D92;font-weight:500;border-radius:0.8rem;text-align:center;cursor:pointer;-webkit-transition:background 0.2s, -webkit-box-shadow 0.1s;transition:background 0.2s, -webkit-box-shadow 0.1s;transition:box-shadow 0.1s, background 0.2s;transition:box-shadow 0.1s, background 0.2s, -webkit-box-shadow 0.1s}pn-choice-button label pn-illustration{display:inline-block;width:3rem;height:3rem;margin-right:0.9rem}pn-choice-button>input:checked+label.pn-choice-button{background:#E0F8FF;color:#005D92;border-color:#005D92;-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)}pn-choice-button>input:indeterminate+label.pn-choice-button{background:#FFFFFF;color:#005D92}pn-choice-button>input:hover+label.pn-choice-button{background:#E0F8FF}pn-choice-button>input:focus+label.pn-choice-button,pn-choice-button>input:active+label.pn-choice-button{-webkit-box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92}pn-choice-button>input:active+label.pn-choice-button{background:#8EDDF9}pn-choice-button>input:disabled+label.pn-choice-button{background-color:#D3CECB}pn-choice-button>input:checked+label.pn-choice-button:hover{background:#8EDDF9}pn-choice-button>input:checked+label.pn-choice-button:active{background:#8EDDF9;border:0.1rem solid #00A0D6}";var r=e("pn_choice_button",function(){function e(e){t(this,e);this.type="checkbox";this.disabled=false;this.checked=false;this.indeterminate=false}e.prototype.handlechange=function(){this.indeterminate=false};e.prototype.componentDidLoad=function(){this.checkAndSetIndeterminateState()};e.prototype.componentDidUpdate=function(){this.checkAndSetIndeterminateState()};e.prototype.checkAndSetIndeterminateState=function(){var e=this.hostElement.querySelector("#"+this.choiceid);if(e){e.indeterminate=this.indeterminate}};e.prototype.render=function(){return i(n,null,i("input",{type:this.type,id:this.choiceid,value:this.value,name:this.name||this.choiceid,disabled:this.disabled,checked:this.checked}),i("label",{htmlFor:this.choiceid,class:"pn-choice-button"},i("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());r.style=c;var l="";var a=e("pn_find_service_and_price_result",function(){function e(e){t(this,e);this.item=null;this.shownitems=[];this.weightText=""}e.prototype.componentWillLoad=function(){this.composeItems()};e.prototype.composeItems=function(){this.shownitems=[];if(this.item.pricestamps){this.shownitems.push(Object.assign(Object.assign({},this.item),{priceagent:null,pricesenddirect:null}))}if(this.item.priceagent){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,pricesenddirect:null}))}if(this.item.pricesenddirect){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,priceagent:null}))}this.weightText=this.item.what==="parcel"?this.item.maxweight+"kg":this.item.what==="letter"&&this.item.maxweight>999?Math.round(this.item.maxweight/1e3)+" kg":this.item.maxweight+" g"};e.prototype.render=function(){var e=this;return i(n,null,this.shownitems.map((function(t){return i("pn-product-tile",null,i("pn-illustration",{slot:"illustration",illustration:t.illustration}),i("div",{slot:"content"},i("div",{class:"content"},i("h3",null,t.name),t.description?i("div",{class:"description"},t.description):null,t.info?i("div",{class:"description"},t.info):null)),t.maxweight?i("pn-product-tile-info",{label:s.i18n.maxweightlabel,text:e.weightText}):null,t.maximummeasurements?i("pn-product-tile-info",{label:s.i18n.maxmeasurementlabel,text:t.maximummeasurements}):null,t.pricestamps?i("pn-product-tile-price",{slot:"price",label:s.i18n.stampshopcta,amount:t.pricestamps+"",currency:s.market.currency}):null,t.priceagent?i("pn-product-tile-price",{slot:"price",label:"",amount:t.priceagent+"",currency:s.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,t.pricesenddirect?i("pn-product-tile-price",{slot:"price",label:s.i18n.senddirectcta,amount:t.pricesenddirect+"",currency:s.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,t.note?i("small",{slot:"note"},i("p",null,t.note)):null)})))};Object.defineProperty(e,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return e}());a.style=l}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"./p-ce136600.js";const{state:a}=e({i18n:{maxweightlabel:"",weightlabel:"",maxmeasurementlabel:"",sizeheading:"",senddirectcta:"",stampshopcta:""},market:{currency:""}});export{a as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,a as i}from"./p-bfc523fc.js";import{c as a}from"./p-21e0e386.js";import{s as n}from"./p-926fc962.js";import"./p-ce136600.js";const s={sv:{maxweightlabel:"Maxvikt",weightlabel:"Vikt",maxmeasurementlabel:"Maxvolym",sizeheading:"Hur mycket väger det?",senddirectcta:"Köp frakt via Skicka Direkt",stampshopcta:"Köp frimärken via vår webshop"},en:{maxweightlabel:"Max weight",weightlabel:"Weight",maxmeasurementlabel:"Maximum measurement",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},da:{maxweightlabel:"Max vægt",weightlabel:"Vægt",maxmeasurementlabel:"Maks. Volumen",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{maxweightlabel:"Maks vekt",weightlabel:"Vekt",maxmeasurementlabel:"Maks volum",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{maxweightlabel:"Max paino",weightlabel:"Piano",maxmeasurementlabel:"Max äänenvoimakkuus",sizeheading:"How much does it weigh?",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}},o={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}},r={letter:[{name:"50g",abbreviation:"g",value:50},{name:"100g",abbreviation:"g",value:100},{name:"250g",abbreviation:"g",value:250},{name:"500g",abbreviation:"g",value:500},{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2}],parcel:[{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5},{name:"6kg",abbreviation:"kg",value:6},{name:"7Kg",abbreviation:"kg",value:7},{name:"8kg",abbreviation:"kg",value:8},{name:"9kg",abbreviation:"kg",value:9},{name:"10kg",abbreviation:"kg",value:10},{name:"11kg",abbreviation:"kg",value:11},{name:"12kg",abbreviation:"kg",value:12},{name:"13kg",abbreviation:"kg",value:13},{name:"14kg",abbreviation:"kg",value:14},{name:"15kg",abbreviation:"kg",value:15},{name:"16kg",abbreviation:"kg",value:16},{name:"17kg",abbreviation:"kg",value:17},{name:"18kg",abbreviation:"kg",value:18},{name:"20kg",abbreviation:"kg",value:20}]},l=class{constructor(e){t(this,e),this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-se-findprice.xlsx",this.language="sv",this.market="se",this.productid="",this.filteredItems=[],this.sourceData={types:[],data:[]},this.gotData=!1,this.loading=!1,this.postagetype={value:""},this.weight={value:0,name:""},this.weightvalue=0}componentWillLoad(){this.setState(),this.getDataSource().then((()=>{}))}setState(){this.market&&(n.market=o[this.market]),this.language&&s[this.language]&&(n.i18n=s[this.language])}async getDataSource(){if(!this.productid)return;this.loading=!0;const t=await fetch(this.source),e=await t.blob();try{const t=await a(e);this.sourceData=t,this.filterItems()}catch(i){this.loading=!1,console.warn("Unable to parse data")}}filterItems(){var t;if(!(null===(t=this.sourceData)||void 0===t?void 0:t.data))return void console.info("Data has not yet been loaded");this.loading=!1;const e=this.sourceData.data.filter((t=>t.id===this.productid));if(0===e.length)return;if(this.postagetype.value=e[0].what,!r[this.postagetype.value]||0===r[this.postagetype.value].length)return;0===this.weightvalue&&(this.weight=r[this.postagetype.value][0],this.weightvalue=this.weight.value);const i="kg"===this.weight.abbreviation.toLocaleLowerCase()&&"letter"===this.postagetype.value?1e3*this.weight.value:this.weight.value;let a=e.filter((t=>t.maxweight===i));if(0===a.length&&(a=e.filter((t=>t.maxweight>=i)),a.length>0)){const t=[...new Map(a.reverse().map((t=>[t.id,t]))).values()];t.length>0&&(a=t)}this.filteredItems=a,this.gotData=this.filteredItems.length>0}render(){return e(i,null,e("div",{class:"content"},e("slot",null)),this.loading?e("pn-spinner",null):null,this.postagetype.value&&r[this.postagetype.value]?e("div",{class:"weightselection"},n.i18n.sizeheading?e("div",{class:"heading"},n.i18n.sizeheading):null,e("div",{class:"weightoption"},e("div",{class:"weightoption-input"},e("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:n.i18n.weightlabel,value:this.weightvalue,onChange:t=>{if(t&&t.target&&t.target.value){const e=parseInt(t.target.value,10);if(!isNaN(e)){let t=r[this.postagetype.value].filter((t=>("kg"===t.abbreviation?1e3*t.value:t.value)>=e));t&&t.length>0&&(this.weight=t[0],this.weightvalue=this.weight.value)}}}}),e("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),e("div",{class:"weightoption-range"},e("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:this.weight.value?r[this.postagetype.value].findIndex((t=>t.value===this.weightvalue)):0,onChange:t=>{this.weight=r[this.postagetype.value][t.target.value],this.weightvalue=this.weight.value},min:"0",max:r[this.postagetype.value].length-1}),e("datalist",{id:"weightlist"},r[this.postagetype.value].map(((t,i)=>{let a=t.name;return r[this.postagetype.value].length>6&&(a=i%5==0||0===i||i===r[this.postagetype.value].length-1?t.name:""),e("option",Object.assign({value:i},a?{label:a}:{}))})))))):null,e("div",{class:"resultlist","data-list-count":this.filteredItems.length},this.filteredItems.map((t=>e("div",null,e("pn-product-pricelist-result",{item:t}))))))}static get watchers(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],weightvalue:["filterItems"]}}};l.style='pn-product-pricelist pn-spinner{margin:1em auto}pn-product-pricelist h2,pn-product-pricelist .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-product-pricelist .content,pn-product-pricelist .weightselection{max-width:50em;margin:0 auto 1em}pn-product-pricelist .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-product-pricelist .weightoption-input{width:5em;position:relative}pn-product-pricelist .weightoption-input input::-webkit-outer-spin-button,pn-product-pricelist .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-product-pricelist .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-product-pricelist .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-product-pricelist .weightoption-range input{width:calc(100% - 1.5em)}pn-product-pricelist .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-product-pricelist .resultlist:not([data-list-count="0"]){margin-top:2em}';export{l as pn_product_pricelist}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./p-ce136600.js";const{state:a}=e({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:""},market:{currency:""}});export{a as s}
|
|
1
|
+
import{c as e}from"./p-ce136600.js";const{state:a}=e({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:""},market:{currency:""}});export{a as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-46018354.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.c}],execute:function(){var s=t({i18n:{maxweightlabel:"",weightlabel:"",maxmeasurementlabel:"",sizeheading:"",senddirectcta:"",stampshopcta:""},market:{currency:""}}),a=s.state,n=s.onChange;e("s",a)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-7331d3bb.system.js"],(function(e){"use strict";var t,n,l;return{setters:[function(e){t=e.r;n=e.h;l=e.a}],execute:function(){var i="pn-product-tile{margin-bottom:1em;border:0.1rem solid #D3CECB;outline:none;background:white;-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;padding:1.5em;word-break:break-word;text-decoration:none;border-radius:0.8rem}pn-product-tile [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:0.5em}pn-product-tile>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-tile .tilecontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-tile .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-tile .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:calc((100% / 3) * 2);-ms-flex-flow:wrap;flex-flow:wrap}pn-product-tile .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";var r=e("pn_product_tile",function(){function e(e){t(this,e)}e.prototype.render=function(){return n(l,null,n("slot",{name:"illustration"}),n("div",{class:"tilecontent"},n("div",{class:"details"},n("slot",{name:"content"}),n("div",{class:"info"},n("slot",null)),n("slot",{name:"note"})),n("slot",{name:"price"})))};return e}());r.style=i;var o="pn-product-tile-info{-ms-flex-item-align:center;align-self:center}";var s=e("pn_product_tile_info",function(){function e(e){t(this,e)}e.prototype.render=function(){return n(l,null,this.label?n("p",null,n("small",null,this.label)):null,this.text?n("h3",null,this.text):null)};return e}());n("pn-icon",{symbol:"align-center",small:"false",color:"black"});s.style=o;var p="pn-product-tile-price{margin-top:1em;white-space:nowrap;text-align:right}pn-product-tile-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-tile-price+pn-product-tile-price{margin-left:1.5em}pn-product-tile-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-tile-price a{text-decoration:none;color:#005D92}pn-product-tile-price a h3{text-decoration:underline}";var c=e("pn_product_tile_price",function(){function e(e){t(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?n(l,null,n("h3",null,this.amount?n("span",{class:"pn-2xl"},this.amount):null,this.currency?n("span",{class:"pn-2xl"},this.currency):null),this.label?n("a",{href:this.url},n("pn-button",{small:"true",icon:"arrow-right"},this.label)):null):n(l,null,n("h3",null,this.amount?n("span",{class:"pn-2xl"},this.amount):null,this.currency?n("span",{class:"pn-2xl"},this.currency):null))};return e}());c.style=p}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,a as l}from"./p-bfc523fc.js";const n=class{constructor(t){e(this,t)}render(){return t(l,null,t("slot",{name:"illustration"}),t("div",{class:"tilecontent"},t("div",{class:"details"},t("slot",{name:"content"}),t("div",{class:"info"},t("slot",null)),t("slot",{name:"note"})),t("slot",{name:"price"})))}};n.style="pn-product-tile{margin-bottom:1em;border:0.1rem solid #D3CECB;outline:none;background:white;-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;padding:1.5em;word-break:break-word;text-decoration:none;border-radius:0.8rem}pn-product-tile [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:0.5em}pn-product-tile>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-tile .tilecontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-tile .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-tile .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:calc((100% / 3) * 2);-ms-flex-flow:wrap;flex-flow:wrap}pn-product-tile .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";const i=class{constructor(t){e(this,t)}render(){return t(l,null,this.label?t("p",null,t("small",null,this.label)):null,this.text?t("h3",null,this.text):null)}};t("pn-icon",{symbol:"align-center",small:"false",color:"black"}),i.style="pn-product-tile-info{-ms-flex-item-align:center;align-self:center}";const s=class{constructor(t){e(this,t)}render(){if(this.amount)return this.url?t(l,null,t("h3",null,this.amount?t("span",{class:"pn-2xl"},this.amount):null,this.currency?t("span",{class:"pn-2xl"},this.currency):null),this.label?t("a",{href:this.url},t("pn-button",{small:"true",icon:"arrow-right"},this.label)):null):t(l,null,t("h3",null,this.amount?t("span",{class:"pn-2xl"},this.amount):null,this.currency?t("span",{class:"pn-2xl"},this.currency):null))}};s.style="pn-product-tile-price{margin-top:1em;white-space:nowrap;text-align:right}pn-product-tile-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-tile-price+pn-product-tile-price{margin-left:1.5em}pn-product-tile-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-tile-price a{text-decoration:none;color:#005D92}pn-product-tile-price a h3{text-decoration:underline}";export{n as pn_product_tile,i as pn_product_tile_info,s as pn_product_tile_price}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as l,a as s}from"./p-bfc523fc.js";import{s as i}from"./p-926fc962.js";import"./p-ce136600.js";const e=class{constructor(l){t(this,l),this.item=null,this.shownitems=[],this.weightText=""}componentWillLoad(){this.composeItems()}composeItems(){this.shownitems=[],this.item.pricestamps&&this.shownitems.push(Object.assign(Object.assign({},this.item),{priceagent:null,pricesenddirect:null})),this.item.priceagent&&this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,pricesenddirect:null})),this.item.pricesenddirect&&this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,priceagent:null})),this.weightText="parcel"===this.item.what?this.item.maxweight+"kg":"letter"===this.item.what&&this.item.maxweight>999?Math.round(this.item.maxweight/1e3)+" kg":this.item.maxweight+" g"}render(){return l(s,null,this.shownitems.map((t=>l("pn-product-tile",null,l("pn-illustration",{slot:"illustration",illustration:t.illustration}),l("div",{slot:"content"},l("div",{class:"content"},l("h3",null,t.name),t.description?l("div",{class:"description"},t.description):null,t.info?l("div",{class:"description"},t.info):null)),t.maxweight?l("pn-product-tile-info",{label:i.i18n.maxweightlabel,text:this.weightText}):null,t.maximummeasurements?l("pn-product-tile-info",{label:i.i18n.maxmeasurementlabel,text:t.maximummeasurements}):null,t.pricestamps?l("pn-product-tile-price",{slot:"price",label:i.i18n.stampshopcta,amount:t.pricestamps+"",currency:i.market.currency}):null,t.priceagent?l("pn-product-tile-price",{slot:"price",label:"",amount:t.priceagent+"",currency:i.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,t.pricesenddirect?l("pn-product-tile-price",{slot:"price",label:i.i18n.senddirectcta,amount:t.pricesenddirect+"",currency:i.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,t.note?l("small",{slot:"note"},l("p",null,t.note)):null))))}static get watchers(){return{item:["composeItems"]}}};e.style="";export{e as pn_product_pricelist_result}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,a as n,c as i}from"./p-bfc523fc.js";import{s as o}from"./p-
|
|
1
|
+
import{r as t,h as e,a as n,c as i}from"./p-bfc523fc.js";import{s as o}from"./p-af861bb5.js";import"./p-ce136600.js";const c=class{constructor(e){t(this,e),this.type="checkbox",this.disabled=!1,this.checked=!1,this.indeterminate=!1}handlechange(){this.indeterminate=!1}componentDidLoad(){this.checkAndSetIndeterminateState()}componentDidUpdate(){this.checkAndSetIndeterminateState()}checkAndSetIndeterminateState(){let t=this.hostElement.querySelector(`#${this.choiceid}`);t&&(t.indeterminate=this.indeterminate)}render(){return e(n,null,e("input",{type:this.type,id:this.choiceid,value:this.value,name:this.name||this.choiceid,disabled:this.disabled,checked:this.checked}),e("label",{htmlFor:this.choiceid,class:"pn-choice-button"},e("slot",null)))}get hostElement(){return i(this)}};c.style="pn-choice-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;display:inline-block;background:#fff;position:relative;margin:0.2em 0.4em}pn-choice-button input{opacity:0;position:absolute;top:0;left:0;pointer-events:none;margin:0;width:100%;height:100%}pn-choice-button label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0.4rem 0.8rem;border:0.1rem solid #D3CECB;color:#005D92;font-weight:500;border-radius:0.8rem;text-align:center;cursor:pointer;-webkit-transition:background 0.2s, -webkit-box-shadow 0.1s;transition:background 0.2s, -webkit-box-shadow 0.1s;transition:box-shadow 0.1s, background 0.2s;transition:box-shadow 0.1s, background 0.2s, -webkit-box-shadow 0.1s}pn-choice-button label pn-illustration{display:inline-block;width:3rem;height:3rem;margin-right:0.9rem}pn-choice-button>input:checked+label.pn-choice-button{background:#E0F8FF;color:#005D92;border-color:#005D92;-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)}pn-choice-button>input:indeterminate+label.pn-choice-button{background:#FFFFFF;color:#005D92}pn-choice-button>input:hover+label.pn-choice-button{background:#E0F8FF}pn-choice-button>input:focus+label.pn-choice-button,pn-choice-button>input:active+label.pn-choice-button{-webkit-box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92}pn-choice-button>input:active+label.pn-choice-button{background:#8EDDF9}pn-choice-button>input:disabled+label.pn-choice-button{background-color:#D3CECB}pn-choice-button>input:checked+label.pn-choice-button:hover{background:#8EDDF9}pn-choice-button>input:checked+label.pn-choice-button:active{background:#8EDDF9;border:0.1rem solid #00A0D6}";const s=class{constructor(e){t(this,e),this.item=null,this.shownitems=[],this.weightText=""}componentWillLoad(){this.composeItems()}composeItems(){this.shownitems=[],this.item.pricestamps&&this.shownitems.push(Object.assign(Object.assign({},this.item),{priceagent:null,pricesenddirect:null})),this.item.priceagent&&this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,pricesenddirect:null})),this.item.pricesenddirect&&this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,priceagent:null})),this.weightText="parcel"===this.item.what?this.item.maxweight+"kg":"letter"===this.item.what&&this.item.maxweight>999?Math.round(this.item.maxweight/1e3)+" kg":this.item.maxweight+" g"}render(){return e(n,null,this.shownitems.map((t=>e("pn-product-tile",null,e("pn-illustration",{slot:"illustration",illustration:t.illustration}),e("div",{slot:"content"},e("div",{class:"content"},e("h3",null,t.name),t.description?e("div",{class:"description"},t.description):null,t.info?e("div",{class:"description"},t.info):null)),t.maxweight?e("pn-product-tile-info",{label:o.i18n.maxweightlabel,text:this.weightText}):null,t.maximummeasurements?e("pn-product-tile-info",{label:o.i18n.maxmeasurementlabel,text:t.maximummeasurements}):null,t.pricestamps?e("pn-product-tile-price",{slot:"price",label:o.i18n.stampshopcta,amount:t.pricestamps+"",currency:o.market.currency}):null,t.priceagent?e("pn-product-tile-price",{slot:"price",label:"",amount:t.priceagent+"",currency:o.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,t.pricesenddirect?e("pn-product-tile-price",{slot:"price",label:o.i18n.senddirectcta,amount:t.pricesenddirect+"",currency:o.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,t.note?e("small",{slot:"note"},e("p",null,t.note)):null))))}static get watchers(){return{item:["composeItems"]}}};s.style="";export{c as pn_choice_button,s as pn_find_service_and_price_result}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i}from"./p-bfc523fc.js";import{c as t}from"./p-21e0e386.js";import{s as a}from"./p-af861bb5.js";import"./p-ce136600.js";const n={sv:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Hit eller dit?",sizeheading:"Hur mycket väger det?",resultlistheading:"Några utvalda val",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp frakt via Skicka Direkt",stampshopcta:"Köp frimärken via vår webshop"},en:{componentheading:"What do you want to send?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Vægt",maxweightlabel:"Max vægt",maxmeasurementlabel:"Maks. Volumen",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Vekt",maxweightlabel:"Maks vekt",maxmeasurementlabel:"Maks volum",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Paino",maxweightlabel:"Max paino",maxmeasurementlabel:"Max äänenvoimakkuus",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}},s={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}},r=[{name:"Brev",value:"letter",illustration:"letterbox-reply-letter-plants"},{name:"Paket",value:"parcel",illustration:"tracking"}],o={letter:[{name:"Sweden",value:"sweden",illustration:"letterboxes"},{name:"Abroad",value:"abroad",illustration:"character-box-letters-globe"}],parcel:[{name:"Sweden",value:"sweden",illustration:"letterboxes"},{name:"Within Europe",value:"withineurope",illustration:"character-box-letters-globe"},{name:"Outside Europe",value:"outsideeurope",illustration:"discover"}]},l={letter:[{name:"50g",abbreviation:"g",value:50},{name:"100g",abbreviation:"g",value:100},{name:"250g",abbreviation:"g",value:250},{name:"500g",abbreviation:"g",value:500},{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2}],parcel:[{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5},{name:"6kg",abbreviation:"kg",value:6},{name:"7Kg",abbreviation:"kg",value:7},{name:"8kg",abbreviation:"kg",value:8},{name:"9kg",abbreviation:"kg",value:9},{name:"10kg",abbreviation:"kg",value:10},{name:"11kg",abbreviation:"kg",value:11},{name:"12kg",abbreviation:"kg",value:12},{name:"13kg",abbreviation:"kg",value:13},{name:"14kg",abbreviation:"kg",value:14},{name:"15kg",abbreviation:"kg",value:15},{name:"16kg",abbreviation:"kg",value:16},{name:"17kg",abbreviation:"kg",value:17},{name:"18kg",abbreviation:"kg",value:18},{name:"20kg",abbreviation:"kg",value:20}]},h=class{constructor(i){e(this,i),this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-se-findprice.xlsx",this.language="sv",this.market="se",this.filteredItems=[],this.postagetype={value:"",name:"",icon:""},this.weight={value:0,name:""},this.weightvalue=0,this.deliveryscope={value:"",name:"",icon:""},this.sourceData={types:[],data:[]}}componentWillLoad(){this.setState(),this.getDataSource()}async getDataSource(){const e=`?cache=${Math.floor(9999*Math.random()+1)}`,i=await fetch(this.source+e),a=await i.blob();try{const e=await t(a);this.sourceData=e,this.filterItems()}catch(n){console.log("Unable to parse data")}}setState(){this.market&&(a.market=s[this.market]),this.language&&n[this.language]&&(a.i18n=n[this.language])}filterItems(){var e;if(!(null===(e=this.sourceData)||void 0===e?void 0:e.data))return void console.log("Data has not yet been loaded");if(!this.postagetype)return;const i=this.sourceData.data.filter((e=>e.what===this.postagetype.value));if(!this.deliveryscope)return;const t=i.filter((e=>e.deliveryscope===this.deliveryscope.value));if(!this.weight||!this.weight.value)return;const a="kg"===this.weight.abbreviation.toLocaleLowerCase()&&"letter"===this.postagetype.value?1e3*this.weight.value:this.weight.value;let n=t.filter((e=>e.maxweight===a));if(0===n.length&&(n=t.filter((e=>e.maxweight>=a)),n.length>0)){const e=[...new Map(n.reverse().map((e=>[e.id,e]))).values()];e.length>0&&(n=e)}console.log("weightFilteredData",n),this.filteredItems=n}render(){return i("div",null,i("div",{class:"findprice-form"},a.i18n.componentheading?i("h2",null,a.i18n.componentheading):null,i("div",{class:"postagetypes"},r.map((e=>i("pn-choice-button",{choiceid:e.value,value:e.value,name:"postagetype",type:"radio",checked:e.value===this.postagetype.value,onChange:()=>{this.postagetype=r.filter((i=>i.value===e.value))[0],this.deliveryscope={value:"",name:"",icon:""},this.weight={value:0,name:""},this.weightvalue=this.weight.value}},i("pn-illustration",{illustration:e.illustration})," ",e.name)))),this.postagetype.value&&o[this.postagetype.value]?i("div",null,a.i18n.deliveryscopeheading?i("div",{class:"heading"},a.i18n.deliveryscopeheading):null,i("div",{class:"deliveryscope"},o[this.postagetype.value].map((e=>i("pn-choice-button",{choiceid:this.postagetype.value+e.value,value:e.value,name:"deliveryscope",type:"radio",checked:e.value===this.deliveryscope.value,onChange:()=>{this.deliveryscope=o[this.postagetype.value].filter((i=>i.value===e.value))[0],0===this.weight.value&&(this.weight=l[this.postagetype.value][0],this.weightvalue=this.weight.value)}},i("pn-illustration",{illustration:e.illustration})," ",e.name))))):null,this.postagetype.value&&l[this.postagetype.value]&&this.deliveryscope.value?i("div",null,a.i18n.sizeheading?i("div",{class:"heading"},a.i18n.sizeheading):null,i("div",{class:"weightoption"},i("div",{class:"weightoption-input"},i("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:a.i18n.weightlabel,value:this.weightvalue,onChange:e=>{if(e&&e.target&&e.target.value){const i=parseInt(e.target.value,10);if(!isNaN(i)){let e=l[this.postagetype.value].filter((e=>("kg"===e.abbreviation?1e3*e.value:e.value)>=i));e&&e.length>0&&(this.weight=e[0],this.weightvalue=this.weight.value)}}}}),i("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),i("div",{class:"weightoption-range"},i("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:this.weight.value?l[this.postagetype.value].findIndex((e=>e.value===this.weightvalue)):0,onChange:e=>{this.weight=l[this.postagetype.value][e.target.value],this.weightvalue=this.weight.value},min:"0",max:l[this.postagetype.value].length-1}),i("datalist",{id:"weightlist"},l[this.postagetype.value].map(((e,t)=>{let a=e.name;return l[this.postagetype.value].length>6&&(a=t%5==0||0===t||t===l[this.postagetype.value].length-1?e.name:""),i("option",Object.assign({value:t},a?{label:a}:{}))})))))):null),this.filteredItems&&this.filteredItems.length>0?i("div",{class:"resultlist"},a.i18n.resultlistheading?i("div",{class:"heading"},a.i18n.resultlistheading):null,this.filteredItems.map((e=>i("div",null,i("pn-find-service-and-price-result",{item:e}))))):null)}static get watchers(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],deliveryscope:["filterItems"],weightvalue:["filterItems"]}}};h.style="pn-find-service-and-price .findprice-form{max-width:50em;margin:0 auto}pn-find-service-and-price h2,pn-find-service-and-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-service-and-price .postagetypes,pn-find-service-and-price .deliveryscope{text-align:center;margin-bottom:3rem}pn-find-service-and-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-service-and-price .weightoption-input{width:5em;position:relative}pn-find-service-and-price .weightoption-input input::-webkit-outer-spin-button,pn-find-service-and-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-service-and-price .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-find-service-and-price .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-find-service-and-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-service-and-price .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-find-service-and-price .resultlist{margin:3em 0}";export{h as pn_find_service_and_price}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,N as n,w as t,p as a,H as i,b as
|
|
1
|
+
import{d as e,N as n,w as t,p as a,H as i,b as o}from"./p-bfc523fc.js";const r=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const t=n.call(this,!1),a=this.childNodes;if(e)for(let n=0;n<a.length;n++)2!==a[n].nodeType&&t.appendChild(a[n].cloneNode(!0));return t}};(()=>{r(i.prototype);const o=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),l={};return"onbeforeload"in o&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,t.location.href)).href,a(l))})().then((e=>o([["p-986d3894",[[4,"pn-marketweb-siteheader",{market:[1],language:[1],endpoint:[1],hideSiteSelector:[1028,"hide-site-selector"],hideLanguageSelector:[1028,"hide-language-selector"],hideSearch:[1028,"hide-search"],hideLogin:[1028,"hide-login"],i18n:[32],gotData:[32],fetchingData:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],loginDialog:[32],minimizeSearch:[32]},[[9,"resize","handleResize"]]]]],["p-e377410f",[[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-a04d0ba4",[[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-be245b29",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["p-5f1ad0b7",[[0,"pn-marketweb-sitefooter",{market:[1],language:[1],endpoint:[1],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-ba8e9dfe",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-d3590589",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}],[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-ec95bda3",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-fee1d1c9",[[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"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopen","setOpenMenu"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],i18n:[8,"i-1-8n"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],search:[1040]}],[4,"pn-site-selector",{buttontext:[1],heading:[1],language:[1],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["p-ba704cbf",[[4,"pn-product-tile"],[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]]],e)));
|
package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-store.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ declare const state: {
|
|
|
7
7
|
weightlabel: string;
|
|
8
8
|
maxweightlabel: string;
|
|
9
9
|
maxmeasurementlabel: string;
|
|
10
|
+
senddirectcta: string;
|
|
11
|
+
stampshopcta: string;
|
|
10
12
|
};
|
|
11
13
|
market: {
|
|
12
14
|
currency: string;
|
|
@@ -20,6 +22,8 @@ declare const state: {
|
|
|
20
22
|
weightlabel: string;
|
|
21
23
|
maxweightlabel: string;
|
|
22
24
|
maxmeasurementlabel: string;
|
|
25
|
+
senddirectcta: string;
|
|
26
|
+
stampshopcta: string;
|
|
23
27
|
};
|
|
24
28
|
market: {
|
|
25
29
|
currency: string;
|
|
@@ -7,6 +7,8 @@ export declare const translations: {
|
|
|
7
7
|
weightlabel: string;
|
|
8
8
|
maxweightlabel: string;
|
|
9
9
|
maxmeasurementlabel: string;
|
|
10
|
+
senddirectcta: string;
|
|
11
|
+
stampshopcta: string;
|
|
10
12
|
};
|
|
11
13
|
en: {
|
|
12
14
|
componentheading: string;
|
|
@@ -16,6 +18,8 @@ export declare const translations: {
|
|
|
16
18
|
weightlabel: string;
|
|
17
19
|
maxweightlabel: string;
|
|
18
20
|
maxmeasurementlabel: string;
|
|
21
|
+
senddirectcta: string;
|
|
22
|
+
stampshopcta: string;
|
|
19
23
|
};
|
|
20
24
|
da: {
|
|
21
25
|
componentheading: string;
|
|
@@ -25,6 +29,8 @@ export declare const translations: {
|
|
|
25
29
|
weightlabel: string;
|
|
26
30
|
maxweightlabel: string;
|
|
27
31
|
maxmeasurementlabel: string;
|
|
32
|
+
senddirectcta: string;
|
|
33
|
+
stampshopcta: string;
|
|
28
34
|
};
|
|
29
35
|
no: {
|
|
30
36
|
componentheading: string;
|
|
@@ -34,6 +40,8 @@ export declare const translations: {
|
|
|
34
40
|
weightlabel: string;
|
|
35
41
|
maxweightlabel: string;
|
|
36
42
|
maxmeasurementlabel: string;
|
|
43
|
+
senddirectcta: string;
|
|
44
|
+
stampshopcta: string;
|
|
37
45
|
};
|
|
38
46
|
fi: {
|
|
39
47
|
componentheading: string;
|
|
@@ -43,6 +51,8 @@ export declare const translations: {
|
|
|
43
51
|
weightlabel: string;
|
|
44
52
|
maxweightlabel: string;
|
|
45
53
|
maxmeasurementlabel: string;
|
|
54
|
+
senddirectcta: string;
|
|
55
|
+
stampshopcta: string;
|
|
46
56
|
};
|
|
47
57
|
};
|
|
48
58
|
export declare const markets: {
|
|
@@ -2,6 +2,8 @@ import { ProductPriceItem } from "../../../globals/shared/productprice/product-p
|
|
|
2
2
|
export declare class PnFindProductPricelistResult {
|
|
3
3
|
item: ProductPriceItem;
|
|
4
4
|
shownitems: ProductPriceItem[];
|
|
5
|
+
weightText: string;
|
|
5
6
|
componentWillLoad(): void;
|
|
7
|
+
composeItems(): void;
|
|
6
8
|
render(): any;
|
|
7
9
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
declare const state: {
|
|
2
2
|
i18n: {
|
|
3
3
|
maxweightlabel: string;
|
|
4
|
+
weightlabel: string;
|
|
4
5
|
maxmeasurementlabel: string;
|
|
6
|
+
sizeheading: string;
|
|
7
|
+
senddirectcta: string;
|
|
8
|
+
stampshopcta: string;
|
|
5
9
|
};
|
|
6
10
|
market: {
|
|
7
11
|
currency: string;
|
|
@@ -9,7 +13,11 @@ declare const state: {
|
|
|
9
13
|
}, onChange: import("@stencil/store/dist/types").OnChangeHandler<{
|
|
10
14
|
i18n: {
|
|
11
15
|
maxweightlabel: string;
|
|
16
|
+
weightlabel: string;
|
|
12
17
|
maxmeasurementlabel: string;
|
|
18
|
+
sizeheading: string;
|
|
19
|
+
senddirectcta: string;
|
|
20
|
+
stampshopcta: string;
|
|
13
21
|
};
|
|
14
22
|
market: {
|
|
15
23
|
currency: string;
|
package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-translations.d.ts
CHANGED
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
export declare const translations: {
|
|
2
2
|
sv: {
|
|
3
3
|
maxweightlabel: string;
|
|
4
|
+
weightlabel: string;
|
|
4
5
|
maxmeasurementlabel: string;
|
|
6
|
+
sizeheading: string;
|
|
7
|
+
senddirectcta: string;
|
|
8
|
+
stampshopcta: string;
|
|
5
9
|
};
|
|
6
10
|
en: {
|
|
7
11
|
maxweightlabel: string;
|
|
12
|
+
weightlabel: string;
|
|
8
13
|
maxmeasurementlabel: string;
|
|
14
|
+
sizeheading: string;
|
|
15
|
+
senddirectcta: string;
|
|
16
|
+
stampshopcta: string;
|
|
9
17
|
};
|
|
10
18
|
da: {
|
|
11
19
|
maxweightlabel: string;
|
|
20
|
+
weightlabel: string;
|
|
12
21
|
maxmeasurementlabel: string;
|
|
22
|
+
sizeheading: string;
|
|
23
|
+
senddirectcta: string;
|
|
24
|
+
stampshopcta: string;
|
|
13
25
|
};
|
|
14
26
|
no: {
|
|
15
27
|
maxweightlabel: string;
|
|
28
|
+
weightlabel: string;
|
|
16
29
|
maxmeasurementlabel: string;
|
|
30
|
+
sizeheading: string;
|
|
31
|
+
senddirectcta: string;
|
|
32
|
+
stampshopcta: string;
|
|
17
33
|
};
|
|
18
34
|
fi: {
|
|
19
35
|
maxweightlabel: string;
|
|
36
|
+
weightlabel: string;
|
|
20
37
|
maxmeasurementlabel: string;
|
|
38
|
+
sizeheading: string;
|
|
39
|
+
senddirectcta: string;
|
|
40
|
+
stampshopcta: string;
|
|
21
41
|
};
|
|
22
42
|
};
|
|
23
43
|
export declare const markets: {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
export interface ProductPriceListi18n {
|
|
2
2
|
maxweightlabel: string;
|
|
3
|
+
weightlabel: string;
|
|
3
4
|
maxmeasurementlabel: string;
|
|
5
|
+
sizeheading: string;
|
|
6
|
+
senddirectcta: string;
|
|
7
|
+
stampshopcta: string;
|
|
4
8
|
}
|
|
5
9
|
export interface ProductPriceListMarket {
|
|
6
10
|
currency: string;
|
|
7
11
|
}
|
|
12
|
+
export interface ProductPriceListWeight {
|
|
13
|
+
name: string;
|
|
14
|
+
abbreviation: string;
|
|
15
|
+
value: number;
|
|
16
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ProductPriceSourceData, ProductPriceItem } from "../../../globals/shared/productprice/product-price-types";
|
|
2
|
+
import { ProductPriceListWeight } from "./pn-product-pricelist-types";
|
|
2
3
|
export declare class PnFindProductPricelist {
|
|
3
4
|
source: string;
|
|
4
5
|
language: string;
|
|
@@ -8,6 +9,9 @@ export declare class PnFindProductPricelist {
|
|
|
8
9
|
sourceData: ProductPriceSourceData;
|
|
9
10
|
gotData: boolean;
|
|
10
11
|
loading: boolean;
|
|
12
|
+
postagetype: any;
|
|
13
|
+
weight: ProductPriceListWeight;
|
|
14
|
+
weightvalue: number;
|
|
11
15
|
componentWillLoad(): void;
|
|
12
16
|
setState(): void;
|
|
13
17
|
getDataSource(): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as createStore}from"./index-7c277874.js";var _a=createStore({i18n:{maxweightlabel:"",maxmeasurementlabel:""},market:{currency:""}}),state=_a.state,onChange=_a.onChange;export{state as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as l,a as i}from"./p-bfc523fc.js";import{s as e}from"./p-4f283190.js";import"./p-ce136600.js";const s=class{constructor(l){t(this,l),this.item=null,this.shownitems=[]}componentWillLoad(){this.item.pricestamps&&this.shownitems.push(Object.assign(Object.assign({},this.item),{priceagent:null,pricesenddirect:null})),this.item.priceagent&&this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,pricesenddirect:null})),this.item.pricesenddirect&&this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,priceagent:null}))}render(){return l(i,null,this.shownitems.map((t=>l("pn-product-tile",null,l("pn-illustration",{slot:"illustration",illustration:t.illustration}),l("div",{slot:"content"},l("div",{class:"content"},l("h3",null,t.name),t.description?l("div",{class:"description"},t.description):null,t.info?l("div",{class:"description"},t.info):null)),t.maxweight?l("pn-product-tile-info",{label:e.i18n.maxweightlabel,text:t.maxweight+""}):null,t.maximummeasurements?l("pn-product-tile-info",{label:e.i18n.maxmeasurementlabel,text:t.maximummeasurements}):null,t.pricestamps?l("pn-product-tile-price",{slot:"price",label:"With stamps",amount:t.pricestamps+"",currency:e.market.currency}):null,t.priceagent?l("pn-product-tile-price",{slot:"price",label:"Service point",amount:t.priceagent+"",currency:e.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,t.pricesenddirect?l("pn-product-tile-price",{slot:"price",label:"Send direct",amount:t.pricesenddirect+"",currency:e.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,t.info?l("small",{slot:"note"},l("p",null,t.note)):null))))}};s.style="";export{s as pn_product_pricelist_result}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,a as e}from"./p-bfc523fc.js";import{c as a}from"./p-21e0e386.js";import{s as i}from"./p-4f283190.js";import"./p-ce136600.js";const l={sv:{maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym"},en:{maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement"},da:{maxweightlabel:"Max vægt",maxmeasurementlabel:"Maks. Volumen"},no:{maxweightlabel:"Maks vekt",maxmeasurementlabel:"Maks volum"},fi:{maxweightlabel:"Max paino",maxmeasurementlabel:"Max äänenvoimakkuus"}},n={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}},r=class{constructor(s){t(this,s),this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-se-findprice.xlsx",this.language="sv",this.market="se",this.productid="",this.filteredItems=[],this.sourceData={types:[],data:[]},this.gotData=!1,this.loading=!1}componentWillLoad(){this.setState(),this.getDataSource().then((()=>{}))}setState(){this.market&&(i.market=n[this.market]),this.language&&l[this.language]&&(i.i18n=l[this.language])}async getDataSource(){if(!this.productid)return;this.loading=!0;const t=await fetch(this.source),s=await t.blob();try{const t=await a(s);this.sourceData=t,this.filterItems()}catch(e){this.loading=!1,console.warn("Unable to parse data")}}filterItems(){var t;(null===(t=this.sourceData)||void 0===t?void 0:t.data)?(this.loading=!1,this.filteredItems=this.sourceData.data.filter((t=>t.id===this.productid)),this.gotData=this.filteredItems.length>0):console.info("Data has not yet been loaded")}render(){return s(e,null,s("div",{class:"content"},s("slot",null)),this.loading?s("pn-spinner",null):null,s("div",{class:"resultlist","data-list-count":this.filteredItems.length},this.filteredItems.map((t=>s("div",null,s("pn-product-pricelist-result",{item:t}))))))}static get watchers(){return{market:["setState"],language:["setState"]}}};r.style='pn-product-pricelist pn-spinner{margin:1em auto}pn-product-pricelist .resultlist:not([data-list-count="0"]){margin-top:1.5em}';export{r as pn_product_pricelist}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7331d3bb.system.js"],(function(e){"use strict";var t,l,n;return{setters:[function(e){t=e.r;l=e.h;n=e.a}],execute:function(){var i="pn-product-tile{margin-bottom:1em;border:0.1rem solid #D3CECB;outline:none;background:white;-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;padding:1.5em;word-break:break-word;text-decoration:none;border-radius:0.8rem}pn-product-tile [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:0.5em}pn-product-tile>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-tile .tilecontent{-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}pn-product-tile .details{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;width:100%;-ms-flex-align:center;align-items:center}pn-product-tile .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:calc((100% / 3) * 2);-ms-flex-flow:wrap;flex-flow:wrap}pn-product-tile .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";var r=e("pn_product_tile",function(){function e(e){t(this,e)}e.prototype.render=function(){return l(n,null,l("slot",{name:"illustration"}),l("div",{class:"tilecontent"},l("slot",{name:"content"}),l("div",{class:"details"},l("div",{class:"info"},l("slot",null)),l("slot",{name:"price"})),l("slot",{name:"note"})))};return e}());r.style=i;var s="pn-product-tile-info{-ms-flex-item-align:center;align-self:center}";var o=e("pn_product_tile_info",function(){function e(e){t(this,e)}e.prototype.render=function(){return l(n,null,this.label?l("p",null,l("small",null,this.label)):null,this.text?l("h3",null,this.text):null)};return e}());l("pn-icon",{symbol:"align-center",small:"false",color:"black"});o.style=s;var a="pn-product-tile-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-tile-price+pn-product-tile-price{margin-left:1.5em}pn-product-tile-price small{display:-ms-flexbox;display:flex}pn-product-tile-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-tile-price a{text-decoration:none;color:#005D92}pn-product-tile-price a h3{text-decoration:underline}";var p=e("pn_product_tile_price",function(){function e(e){t(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?l(n,null,l("a",{href:this.url},this.label?l("p",null,l("small",null,this.label,l("pn-icon",{symbol:"open-in-new",small:"true",color:"blue700"}))):null,l("h3",null,this.amount?l("span",{class:"pn-2xl"},this.amount):null,this.currency?l("span",null,this.currency):null))):l(n,null,this.label?l("p",null,l("small",null,this.label)):null,l("h3",null,this.amount?l("span",{class:"pn-2xl"},this.amount):null,this.currency?l("span",null,this.currency):null))};return e}());p.style=a}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7331d3bb.system.js","./p-2fa246f1.system.js","./p-46018354.system.js"],(function(t){"use strict";var e,i,n,s;return{setters:[function(t){e=t.r;i=t.h;n=t.a},function(t){s=t.s},function(){}],execute:function(){var r="";var l=t("pn_product_pricelist_result",function(){function t(t){e(this,t);this.item=null;this.shownitems=[]}t.prototype.componentWillLoad=function(){if(this.item.pricestamps){this.shownitems.push(Object.assign(Object.assign({},this.item),{priceagent:null,pricesenddirect:null}))}if(this.item.priceagent){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,pricesenddirect:null}))}if(this.item.pricesenddirect){this.shownitems.push(Object.assign(Object.assign({},this.item),{pricestamps:null,priceagent:null}))}};t.prototype.render=function(){return i(n,null,this.shownitems.map((function(t){return i("pn-product-tile",null,i("pn-illustration",{slot:"illustration",illustration:t.illustration}),i("div",{slot:"content"},i("div",{class:"content"},i("h3",null,t.name),t.description?i("div",{class:"description"},t.description):null,t.info?i("div",{class:"description"},t.info):null)),t.maxweight?i("pn-product-tile-info",{label:s.i18n.maxweightlabel,text:t.maxweight+""}):null,t.maximummeasurements?i("pn-product-tile-info",{label:s.i18n.maxmeasurementlabel,text:t.maximummeasurements}):null,t.pricestamps?i("pn-product-tile-price",{slot:"price",label:"With stamps",amount:t.pricestamps+"",currency:s.market.currency}):null,t.priceagent?i("pn-product-tile-price",{slot:"price",label:"Service point",amount:t.priceagent+"",currency:s.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,t.pricesenddirect?i("pn-product-tile-price",{slot:"price",label:"Send direct",amount:t.pricesenddirect+"",currency:s.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,t.info?i("small",{slot:"note"},i("p",null,t.note)):null)})))};return t}());l.style=r}}}));
|