@postnord/pn-marketweb-components 1.0.44-beta1 → 1.0.44-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +5 -15
- package/cjs/{pn-find-price-store-85b100ba.js → pn-find-price-store-d9aabecb.js} +1 -0
- package/cjs/pn-find-price.cjs.entry.js +48 -65
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-product-card_3.cjs.entry.js +49 -0
- package/collection/collection-manifest.json +3 -0
- package/collection/components/widgets/pn-find-price/data.js +36 -62
- package/collection/components/widgets/pn-find-price/pn-find-price-result.css +6 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +18 -24
- package/collection/components/widgets/pn-find-price/pn-find-price-store.js +1 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +6 -4
- package/collection/components/widgets/pn-find-price/pn-find-price.css +1 -0
- package/collection/components/widgets/pn-find-price/pn-find-price.js +5 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-info.css +30 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-info.js +92 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-price.css +37 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-price.js +112 -0
- package/collection/components/widgets/pn-product-card/pn-product-card.css +86 -0
- package/collection/components/widgets/pn-product-card/pn-product-card.js +26 -0
- package/collection/components/widgets/pn-product-card/product-card.stories.js +50 -0
- package/custom-elements/index.d.ts +18 -0
- package/custom-elements/index.js +102 -79
- package/esm/loader.js +1 -1
- package/esm/pn-find-price-result.entry.js +5 -15
- package/esm/{pn-find-price-store-d2053b72.js → pn-find-price-store-8560f26c.js} +1 -0
- package/esm/pn-find-price.entry.js +48 -65
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-product-card_3.entry.js +43 -0
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/{pn-find-price-store-d2053b72.js → pn-find-price-store-8560f26c.js} +1 -1
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-product-card_3.entry.js +1 -0
- package/package.json +7 -6
- package/pn-market-web-components/p-0fb48ff6.entry.js +1 -0
- package/pn-market-web-components/p-1051c2d9.system.entry.js +1 -0
- package/pn-market-web-components/{p-c30207e6.js → p-390d9a03.js} +1 -1
- package/pn-market-web-components/p-492e6f0d.system.js +1 -0
- package/pn-market-web-components/p-80ca78f4.entry.js +1 -0
- package/pn-market-web-components/p-a22df959.system.js +1 -1
- package/pn-market-web-components/p-a425e095.system.entry.js +1 -0
- package/pn-market-web-components/p-b42fd0cb.entry.js +1 -0
- package/pn-market-web-components/p-f2898a60.system.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +2 -0
- package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +2 -0
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +6 -1
- package/types/components/widgets/pn-product-card/pn-product-card-info.d.ts +7 -0
- package/types/components/widgets/pn-product-card/pn-product-card-price.d.ts +8 -0
- package/types/components/widgets/pn-product-card/pn-product-card.d.ts +3 -0
- package/types/components.d.ts +57 -0
- package/pn-market-web-components/p-233ca151.system.js +0 -1
- package/pn-market-web-components/p-4fcabdb8.entry.js +0 -1
- package/pn-market-web-components/p-b30e348c.system.entry.js +0 -1
- package/pn-market-web-components/p-bea2dcc6.entry.js +0 -1
- package/pn-market-web-components/p-d8882f68.system.entry.js +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { r as registerInstance, h, a as Host } from './index-b26d0794.js';
|
|
2
|
+
|
|
3
|
+
const pnProductCardCss = "pn-product-card{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-card [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.5em}pn-product-card [slot=content] h3>[slot=Biligast]{font-size:0.6em;background:#005E41;color:white;border-radius:0.37em;width:4em;line-height:2em;text-align:center;margin-left:0.6em;font-weight:normal}pn-product-card [slot=content] h3>[slot=Snabbast]{font-size:0.6em;background:#005D92;color:white;border-radius:0.37em;width:5em;line-height:2em;text-align:center;vertical-align:bottom;margin-left:0.6em;font-weight:normal}pn-product-card [slot=additionalUSP]{font-size:0.6em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-card .cardcontent{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-card .cardprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:66.6666666667%;-ms-flex-flow:wrap;flex-flow:wrap}pn-product-card .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";
|
|
4
|
+
|
|
5
|
+
let PnProductCard = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, null, h("slot", { name: "illustration" }), h("div", { class: "cardcontent" }, h("div", { class: "details" }, h("slot", { name: "content" }), h("div", { class: "info" }, h("slot", null)), h("slot", { name: "note" }), h("slot", { name: "additionalUSP" })), h("div", { class: "cardprice" }, h("div", null, h("slot", { name: "price" }), h("slot", { name: "sendDirectPrice" }), h("slot", { name: "stampPrice" }))))));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
PnProductCard.style = pnProductCardCss;
|
|
14
|
+
|
|
15
|
+
const pnProductCardInfoCss = "pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em}.cardinfocontent>div{margin:10px}[slot=formatPre]{font-size:1em;font-family:\"PostNordSans\", \"Verdana\"}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";
|
|
16
|
+
|
|
17
|
+
let PnProductCardInfo = class {
|
|
18
|
+
constructor(hostRef) {
|
|
19
|
+
registerInstance(this, hostRef);
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (this.label) ? (h(Host, null, h("div", { class: "cardinfocontent" }, (this.text) ? (h("pre", { slot: "formatPre" }, this.text)) : null))) : (h(Host, null, h("div", { class: "cardinfocontent" }, h("div", null, h("h4", null, "Paket:"), h("pre", { slot: "formatPre" }, this.paket)), h("div", null, h("h4", null, "Rulle:"), h("pre", { slot: "formatPre" }, this.rulle)))));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
h("pn-icon", { symbol: "align-center", small: "false", color: "black" });
|
|
26
|
+
PnProductCardInfo.style = pnProductCardInfoCss;
|
|
27
|
+
|
|
28
|
+
const pnProductCardPriceCss = "pn-product-card-price{margin-top:1em;white-space:nowrap;text-align:center}pn-product-card-price span{font-size:1.25em}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-left:1.5em}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price pn-button{width:12.8em;margin-bottom:1em;margin-top:0.5em}pn-product-card-price p{font-weight:lighter;font-size:0.6em;-ms-flex-item-align:center;align-self:center;margin-top:0.5em}pn-product-card-price a{text-decoration:none;color:#005D92}pn-product-card-price a h3{text-decoration:underline}";
|
|
29
|
+
|
|
30
|
+
let PnProductCardPrice = class {
|
|
31
|
+
constructor(hostRef) {
|
|
32
|
+
registerInstance(this, hostRef);
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
if (!this.amount) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
return (this.url) ? (h(Host, null, h("h3", null, (this.amount) ? (h("span", null, this.amount)) : null, (this.currency) ? (h("span", null, this.currency)) : null, (this.note) ? (h("p", null, this.note)) : null), (this.label) ? (h("a", { href: this.url }, h("pn-button", { small: "true", icon: "arrow-right", appearance: "secondary" }, this.label))) : null)) : (h(Host, null, h("h3", null, (this.amount) ? (h("span", null, this.amount)) : null, (this.currency) ? (h("span", null, this.currency)) : null)));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
PnProductCardPrice.style = pnProductCardPriceCss;
|
|
42
|
+
|
|
43
|
+
export { PnProductCard as pn_product_card, PnProductCardInfo as pn_product_card_info, PnProductCardPrice as pn_product_card_price };
|
package/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-b26d0794.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,n){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-price",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["pn-find-service-and-price",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["pn-product-pricelist",[[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]}]]],["pn-marketweb-sitefooter",[[0,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["pn-bonus-progressbar",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["pn-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search",[[1,"pn-filter-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],value:[1],label:[1],loading:[4],button:[1],light:[4]},[[0,"input","inputHandler"]]]]],["pn-pex-pricefinder",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["pn-profile-selector",[[0,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],spamode:[4],loginManager:[32],loggedIn:[32],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-sidenav",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["pn-sidenav-link",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-bonus-progressbar-level",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-language-selector_9",[[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[8,"i-1-8n"],emitEvents:[4,"emit-events"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32],username:[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:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["pn-product-tile_3",[[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]}]]]],n)}))};export{defineCustomElements};
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-b26d0794.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,n){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-price",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["pn-find-service-and-price",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["pn-product-pricelist",[[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]}]]],["pn-marketweb-sitefooter",[[0,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["pn-bonus-progressbar",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["pn-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search",[[1,"pn-filter-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],value:[1],label:[1],loading:[4],button:[1],light:[4]},[[0,"input","inputHandler"]]]]],["pn-pex-pricefinder",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["pn-profile-selector",[[0,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],spamode:[4],loginManager:[32],loggedIn:[32],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-sidenav",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["pn-sidenav-link",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-bonus-progressbar-level",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-product-card_3",[[4,"pn-product-card"],[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1]}]]],["pn-language-selector_9",[[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[8,"i-1-8n"],emitEvents:[4,"emit-events"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32],username:[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:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["pn-product-tile_3",[[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]}]]]],n)}))};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host}from"./index-b26d0794.js";import{s as state}from"./pn-find-price-store-
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-b26d0794.js";import{s as state}from"./pn-find-price-store-8560f26c.js";import"./index-94746173.js";var pnFindPriceResultCss="pn-find-price-result .test{margin:3em 0}.resultcontent{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";var PnfindPriceResult=function(){function t(t){registerInstance(this,t);this.item=null;this.shownitems=[];this.weightText=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){};t.prototype.render=function(){return h(Host,null,h("pn-product-card",null,h("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),h("div",{slot:"content"},h("div",{class:"content"},h("h3",null,this.item.name,this.item.highestrankusp?this.item.highestrankusp==="Biligast"?h("span",{slot:"Biligast"},this.item.highestrankusp):h("span",{slot:"Snabbast"},this.item.highestrankusp):null),this.item.description?h("div",{class:"description"},this.item.description):null,this.item.info?h("div",{class:"description"},this.item.info):null)),this.item.note?h("small",{slot:"note"},h("p",null,this.item.note)):null,this.item.additionalusp?h("small",{slot:"additionalUSP"},h("p",null,this.item.additionalusp)):null,this.item.maximummeasurements?h("pn-product-card-info",{label:state.i18n.maxmeasurementlabel,text:this.item.maximummeasurements}):null,this.item.paket?h("pn-product-card-info",{paket:this.item.paket,rulle:this.item.rulle}):null,this.item.priceagent?h("pn-product-card-price",{slot:"price",label:"",amount:this.item.priceagent+"",currency:state.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,this.item.pricesenddirect?h("pn-product-card-price",{slot:"sendDirectPrice",label:state.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:state.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,this.item.pricestamps?h("pn-product-card-price",{slot:"stampPrice",label:state.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:state.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx",note:state.i18n.message}):null))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}();PnfindPriceResult.style=pnFindPriceResultCss;export{PnfindPriceResult as pn_find_price_result};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as createStore}from"./index-94746173.js";var _a=createStore({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:""},market:{currency:""}}),state=_a.state,onChange=_a.onChange;export{state as s};
|
|
1
|
+
import{c as createStore}from"./index-94746173.js";var _a=createStore({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:""},market:{currency:""}}),state=_a.state,onChange=_a.onChange;export{state as s};
|
|
@@ -1 +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 o(e){try{l(a.next(e))}catch(t){r(t)}}function s(e){try{l(a["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):n(e.value).then(o,s)}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,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(s){o=[6,s];n=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[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}from"./index-b26d0794.js";import{c as convertFileForSizeCategogy}from"./convert-8cce67c4.js";import{s as state}from"./pn-find-price-store-d2053b72.js";import"./index-94746173.js";var translations={sv:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Endast leveranser inom Sverige",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:"Deliveries within Sweden only",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:"Kun leveringer indenfor Sverige",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:"Kun leveranser innen Sverige",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:"Toimitukset vain Ruotsin sisällä",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 markets={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}};var sizeCategories=[{name:"Document",value:"document",illustration:"claims",unit:"gram"},{name:"Box Of Chocolate",value:"boxofchocolate",illustration:"outgoing",unit:"gram"},{name:"Rubber Boots",value:"rubberboots",illustration:"christmas",unit:"combo"},{name:"Moving Box",value:"movingbox",illustration:"outgoing",unit:"kgram"}];var weights={gram:[{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}],kgram:[{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}],combo:[{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},{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 pnFindPriceCss="pn-find-price .findprice-form{max-width:50em;margin:0 auto}pn-find-price h2,pn-find-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-price .sizecategory{text-align:center;margin-bottom:3rem}pn-find-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-price .weightoption-input{width:5em;position:relative}pn-find-price .weightoption-input input::-webkit-outer-spin-button,pn-find-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-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-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-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-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-price .resultlist{margin:3em 0}";var PnfindPrice=function(){function e(e){registerInstance(this,e);this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice.xlsx";this.language="sv";this.market="se";this.filteredItems=[];this.weight={value:0,name:""};this.weightvalue=0;this.sourceData={types:[],data:[]};this.sizecategory={value:"",name:"",icon:"",unit:""}}e.prototype.componentWillLoad=function(){this.setState();this.getDataSource()};e.prototype.getDataSource=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,a,n;return __generator(this,(function(r){switch(r.label){case 0:e="?cache="+Math.floor(Math.random()*(1e4-1)+1);return[4,fetch(this.source+e)];case 1:t=r.sent();return[4,t.blob()];case 2:i=r.sent();r.label=3;case 3:r.trys.push([3,5,,6]);return[4,convertFileForSizeCategogy(i)];case 4:a=r.sent();this.sourceData=a;this.filterItems();return[3,6];case 5:n=r.sent();console.log("Unable to parse data");return[3,6];case 6:return[2]}}))}))};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.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}var i=this.sourceData.data.filter((function(e){return e.deliveryscope==="Sweden"}));if(!this.sizecategory){return}var a=i.filter((function(t){return t.sizecategory===e.sizecategory.value}));if(!this.weight||!this.weight.value){return}var n=this.weight.value<=20?this.weight.value*1e3:this.weight.value;var r=a.filter((function(e){return(e.maxweight<=20?e.maxweight*1e3:e.maxweight)===n}));if(r.length===0){r=a.filter((function(e){return(e.maxweight<=20?e.maxweight*1e3:e.maxweight)>=n}));if(r.length>0){r.sort((function(e,t){return e.maxweight-t.maxweight}));var o=__spreadArray([],new Map(r.reverse().map((function(e){return[e["id"],e]}))).values());if(o.length>0){r=o}}}this.filteredItems=r};e.prototype.render=function(){var e=this;return h("div",null,h("div",{class:"findprice-form"},h("div",null,h("div",{class:"heading"},state.i18n.deliveryscopeheading)),h("div",null,h("div",{class:"heading"},state.i18n.componentheading),h("div",{class:"sizecategory"},sizeCategories.map((function(t){return h("pn-choice-button",{choiceid:t.value,value:t.value,name:"sizecategory",type:"radio",checked:t.value===e.sizecategory.value,onChange:function(){e.sizecategory=sizeCategories.filter((function(e){return e.value===t.value}))[0];if(e.weight.value===0){e.weight=weights[e.sizecategory.unit][0];e.weightvalue=e.weight.value}}},h("pn-illustration",{illustration:t.illustration})," ",t.name)})))),this.sizecategory.value&&weights[this.sizecategory.unit]?h("div",null,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.sizecategory.unit].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.sizecategory.unit].findIndex((function(t){return t.value===e.weightvalue})),onChange:function(t){var i=t.target.value;e.weight=weights[e.sizecategory.unit][i];e.weightvalue=e.weight.value},min:"0",max:weights[this.sizecategory.unit].length-1}),h("datalist",{id:"weightlist"},weights[this.sizecategory.unit].map((function(t,i){var a=t.name;if(weights[e.sizecategory.unit].length>6){a=i%5===0||i===0||i===weights[e.sizecategory.unit].length-1?t.name:""}return h("option",Object.assign({value:i},a?{label:a}:{}))})))))):null),this.filteredItems&&this.filteredItems.length>0?h("div",{class:"resultlist"},state.i18n.resultlistheading?h("div",{class:"heading"},state.i18n.resultlistheading):null,this.filteredItems.map((function(e){return h("div",null,h("pn-find-price-result",{item:e}))}))):null)};Object.defineProperty(e,"watchers",{get:function(){return{market:["setState"],language:["setState"],weightvalue:["filterItems"],sizecategory:["filterItems"]}},enumerable:false,configurable:true});return e}();PnfindPrice.style=pnFindPriceCss;export{PnfindPrice as pn_find_price};
|
|
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}from"./index-b26d0794.js";import{c as convertFileForSizeCategogy}from"./convert-8cce67c4.js";import{s as state}from"./pn-find-price-store-8560f26c.js";import"./index-94746173.js";var translations={sv:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Endast leveranser inom Sverige",sizeheading:"Hur mycket väger det?",resultlistheading:"Några utvalda val",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp portokod online",stampshopcta:"Beställ fysiska frimärken",message:"*Vid köp hos valfritt ombud"},en:{componentheading:"What do you want to send?",deliveryscopeheading:"Deliveries within Sweden only",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy postcode online",stampshopcta:"Order physical stamps",message:"When buying from any agent"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Kun leveringer indenfor Sverige",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:"Kun leveranser innen Sverige",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:"Toimitukset vain Ruotsin sisällä",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 markets={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}};var sizeCategories=[{name:"Dokument eller paket upp till 2 kg",value:"upto2kg",illustration:"package-letter-calendar",unit:"2kg",maxWeight:2},{name:"Större paket M-L upp till 5 kg",value:"upto5kg",illustration:"packages-in-a-pile",unit:"5kg",maxWeight:5},{name:"Tyngre paket upp till 20 kg",value:"upto20kg",illustration:"scale-package-16-abroad",unit:"20kg",maxWeight:20}];var weights={"2kg":[{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}],"5kg":[{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5}],"20kg":[{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 pnFindPriceCss="pn-find-price .findprice-form{max-width:50em;margin:0 auto}pn-find-price h2,pn-find-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-price .sizecategory{text-align:center;margin-bottom:3rem;font-size:0.9em}pn-find-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-price .weightoption-input{width:5em;position:relative}pn-find-price .weightoption-input input::-webkit-outer-spin-button,pn-find-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-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-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-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-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-price .resultlist{margin:3em 0}";var PnfindPrice=function(){function e(e){registerInstance(this,e);this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice.xlsx";this.language="sv";this.market="se";this.filteredItems=[];this.weight={value:0,name:""};this.weightvalue=0;this.sourceData={types:[],data:[]};this.sizecategory={value:"",name:"",icon:"",unit:""}}e.prototype.componentWillLoad=function(){this.setState();this.getDataSource()};e.prototype.getDataSource=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,a,n;return __generator(this,(function(r){switch(r.label){case 0:e="?cache="+Math.floor(Math.random()*(1e4-1)+1);return[4,fetch(this.source+e)];case 1:t=r.sent();return[4,t.blob()];case 2:i=r.sent();r.label=3;case 3:r.trys.push([3,5,,6]);return[4,convertFileForSizeCategogy(i)];case 4:a=r.sent();this.sourceData=a;this.filterItems();return[3,6];case 5:n=r.sent();console.log("Unable to parse data");return[3,6];case 6:return[2]}}))}))};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.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}var i=this.sourceData.data.filter((function(e){return e.deliveryscope==="Sweden"}));if(!this.sizecategory){return}var a=i.filter((function(t){return t.sizecategory===e.sizecategory.value}));if(!this.weight||!this.weight.value){return}var n=this.weight.value<=20?this.weight.value*1e3:this.weight.value;var r=a.filter((function(e){return(e.maxweight<=20?e.maxweight*1e3:e.maxweight)===n}));if(r.length===0){r=a.filter((function(e){return(e.maxweight<=20?e.maxweight*1e3:e.maxweight)>=n}));if(r.length>0){r.sort((function(e,t){return e.maxweight-t.maxweight}));var s=__spreadArray([],new Map(r.reverse().map((function(e){return[e["id"],e]}))).values());if(s.length>0){r=s}}}r.sort((function(e,t){var i=e.highestrankusp?e.highestrankusp.toLowerCase():"z";var a=t.highestrankusp?t.highestrankusp.toLowerCase():"z";return i.localeCompare(a)}));this.filteredItems=r};e.prototype.render=function(){var e=this;return h("div",null,h("div",{class:"findprice-form"},h("div",null,h("div",{class:"heading"},state.i18n.deliveryscopeheading)),h("div",null,h("div",{class:"heading"},state.i18n.componentheading),h("div",{class:"sizecategory"},sizeCategories.map((function(t){return h("pn-choice-button",{choiceid:t.value,value:t.value,name:"sizecategory",type:"radio",checked:t.value===e.sizecategory.value,onChange:function(){e.sizecategory=sizeCategories.filter((function(e){return e.value===t.value}))[0];if(e.weight.value===0){e.weight=weights[e.sizecategory.unit][0];e.weightvalue=e.weight.value}}},h("pn-illustration",{illustration:t.illustration})," ",t.name)})))),this.sizecategory.value&&weights[this.sizecategory.unit]?h("div",null,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.sizecategory.unit].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.sizecategory.unit].findIndex((function(t){return t.value===e.weightvalue})),onChange:function(t){var i=t.target.value;e.weight=weights[e.sizecategory.unit][i];e.weightvalue=e.weight.value},min:"0",max:weights[this.sizecategory.unit].length-1}),h("datalist",{id:"weightlist"},weights[this.sizecategory.unit].map((function(t,i){var a=t.name;if(weights[e.sizecategory.unit].length>6){a=i%5===0||i===0||i===weights[e.sizecategory.unit].length-1?t.name:""}return h("option",Object.assign({value:i},a?{label:a}:{}))})))))):null),this.filteredItems&&this.filteredItems.length>0?h("div",{class:"resultlist"},state.i18n.resultlistheading?h("div",{class:"heading"},state.i18n.resultlistheading):null,this.filteredItems.map((function(e){return h("div",null,h("pn-find-price-result",{item:e}))}))):null)};Object.defineProperty(e,"watchers",{get:function(){return{market:["setState"],language:["setState"],weightvalue:["filterItems"],sizecategory:["filterItems"]}},enumerable:false,configurable:true});return e}();PnfindPrice.style=pnFindPriceCss;export{PnfindPrice as pn_find_price};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as doc,N as NAMESPACE,w as win,p as promiseResolve,H,b as bootstrapLazy}from"./index-b26d0794.js";var patchBrowser=function(){{patchCloneNodeFix(H.prototype)}var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var n={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{n.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href}return promiseResolve(n)};var patchCloneNodeFix=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var a=n.call(this,false);var t=this.childNodes;if(e){for(var i=0;i<t.length;i++){if(t[i].nodeType!==2){a.appendChild(t[i].cloneNode(true))}}}return a}};patchBrowser().then((function(e){return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-price",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["pn-find-service-and-price",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["pn-product-pricelist",[[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]}]]],["pn-marketweb-sitefooter",[[0,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["pn-bonus-progressbar",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["pn-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search",[[1,"pn-filter-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],value:[1],label:[1],loading:[4],button:[1],light:[4]},[[0,"input","inputHandler"]]]]],["pn-pex-pricefinder",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["pn-profile-selector",[[0,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],spamode:[4],loginManager:[32],loggedIn:[32],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-sidenav",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["pn-sidenav-link",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-bonus-progressbar-level",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-language-selector_9",[[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[8,"i-1-8n"],emitEvents:[4,"emit-events"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32],username:[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:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["pn-product-tile_3",[[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
|
+
import{d as doc,N as NAMESPACE,w as win,p as promiseResolve,H,b as bootstrapLazy}from"./index-b26d0794.js";var patchBrowser=function(){{patchCloneNodeFix(H.prototype)}var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var n={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{n.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href}return promiseResolve(n)};var patchCloneNodeFix=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var a=n.call(this,false);var t=this.childNodes;if(e){for(var i=0;i<t.length;i++){if(t[i].nodeType!==2){a.appendChild(t[i].cloneNode(true))}}}return a}};patchBrowser().then((function(e){return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-price",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["pn-find-service-and-price",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["pn-product-pricelist",[[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]}]]],["pn-marketweb-sitefooter",[[0,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["pn-bonus-progressbar",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["pn-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search",[[1,"pn-filter-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],value:[1],label:[1],loading:[4],button:[1],light:[4]},[[0,"input","inputHandler"]]]]],["pn-pex-pricefinder",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["pn-profile-selector",[[0,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],spamode:[4],loginManager:[32],loggedIn:[32],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-sidenav",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["pn-sidenav-link",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["pn-bonus-progressbar-level",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["pn-product-card_3",[[4,"pn-product-card"],[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1]}]]],["pn-language-selector_9",[[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[8,"i-1-8n"],emitEvents:[4,"emit-events"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32],username:[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:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["pn-product-tile_3",[[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)}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-b26d0794.js";var pnProductCardCss="pn-product-card{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-card [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.5em}pn-product-card [slot=content] h3>[slot=Biligast]{font-size:0.6em;background:#005E41;color:white;border-radius:0.37em;width:4em;line-height:2em;text-align:center;margin-left:0.6em;font-weight:normal}pn-product-card [slot=content] h3>[slot=Snabbast]{font-size:0.6em;background:#005D92;color:white;border-radius:0.37em;width:5em;line-height:2em;text-align:center;vertical-align:bottom;margin-left:0.6em;font-weight:normal}pn-product-card [slot=additionalUSP]{font-size:0.6em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-card .cardcontent{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-card .cardprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:66.6666666667%;-ms-flex-flow:wrap;flex-flow:wrap}pn-product-card .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";var PnProductCard=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return h(Host,null,h("slot",{name:"illustration"}),h("div",{class:"cardcontent"},h("div",{class:"details"},h("slot",{name:"content"}),h("div",{class:"info"},h("slot",null)),h("slot",{name:"note"}),h("slot",{name:"additionalUSP"})),h("div",{class:"cardprice"},h("div",null,h("slot",{name:"price"}),h("slot",{name:"sendDirectPrice"}),h("slot",{name:"stampPrice"})))))};return e}();PnProductCard.style=pnProductCardCss;var pnProductCardInfoCss='pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em}.cardinfocontent>div{margin:10px}[slot=formatPre]{font-size:1em;font-family:"PostNordSans", "Verdana"}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}';var PnProductCardInfo=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return this.label?h(Host,null,h("div",{class:"cardinfocontent"},this.text?h("pre",{slot:"formatPre"},this.text):null)):h(Host,null,h("div",{class:"cardinfocontent"},h("div",null,h("h4",null,"Paket:"),h("pre",{slot:"formatPre"},this.paket)),h("div",null,h("h4",null,"Rulle:"),h("pre",{slot:"formatPre"},this.rulle))))};return e}();h("pn-icon",{symbol:"align-center",small:"false",color:"black"});PnProductCardInfo.style=pnProductCardInfoCss;var pnProductCardPriceCss="pn-product-card-price{margin-top:1em;white-space:nowrap;text-align:center}pn-product-card-price span{font-size:1.25em}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-left:1.5em}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price pn-button{width:12.8em;margin-bottom:1em;margin-top:0.5em}pn-product-card-price p{font-weight:lighter;font-size:0.6em;-ms-flex-item-align:center;align-self:center;margin-top:0.5em}pn-product-card-price a{text-decoration:none;color:#005D92}pn-product-card-price a h3{text-decoration:underline}";var PnProductCardPrice=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",null,this.amount):null,this.currency?h("span",null,this.currency):null,this.note?h("p",null,this.note):null),this.label?h("a",{href:this.url},h("pn-button",{small:"true",icon:"arrow-right",appearance:"secondary"},this.label)):null):h(Host,null,h("h3",null,this.amount?h("span",null,this.amount):null,this.currency?h("span",null,this.currency):null))};return e}();PnProductCardPrice.style=pnProductCardPriceCss;export{PnProductCard as pn_product_card,PnProductCardInfo as pn_product_card_info,PnProductCardPrice as pn_product_card_price};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postnord/pn-marketweb-components",
|
|
3
|
-
"version": "1.0.44-
|
|
3
|
+
"version": "1.0.44-beta2",
|
|
4
4
|
"description": "PostNord Market Websites Components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,14 +31,15 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/core": "7.15.5",
|
|
34
|
-
"@postnord/web-components": "3.0.
|
|
34
|
+
"@postnord/web-components": "3.0.15",
|
|
35
35
|
"@stencil/core": "2.10.0",
|
|
36
36
|
"@stencil/sass": "1.5.2",
|
|
37
37
|
"@stencil/store": "1.5.0",
|
|
38
|
-
"@storybook/addon-actions": "6.
|
|
39
|
-
"@storybook/addon-
|
|
40
|
-
"@storybook/addon-
|
|
41
|
-
"@storybook/
|
|
38
|
+
"@storybook/addon-actions": "6.4.18",
|
|
39
|
+
"@storybook/addon-docs": "^6.4.18",
|
|
40
|
+
"@storybook/addon-essentials": "6.4.18",
|
|
41
|
+
"@storybook/addon-links": "6.4.18",
|
|
42
|
+
"@storybook/html": "6.4.18",
|
|
42
43
|
"@storybook/preset-scss": "1.0.3",
|
|
43
44
|
"@types/jest": "26.0.24",
|
|
44
45
|
"babel-loader": "8.2.2",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i}from"./p-ec0adffe.js";import{c as t}from"./p-7dd91709.js";import{s as a}from"./p-390d9a03.js";import"./p-3359dac6.js";const n={sv:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Endast leveranser inom Sverige",sizeheading:"Hur mycket väger det?",resultlistheading:"Några utvalda val",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp portokod online",stampshopcta:"Beställ fysiska frimärken",message:"*Vid köp hos valfritt ombud"},en:{componentheading:"What do you want to send?",deliveryscopeheading:"Deliveries within Sweden only",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy postcode online",stampshopcta:"Order physical stamps",message:"When buying from any agent"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Kun leveringer indenfor Sverige",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:"Kun leveranser innen Sverige",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:"Toimitukset vain Ruotsin sisällä",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"}},o=[{name:"Dokument eller paket upp till 2 kg",value:"upto2kg",illustration:"package-letter-calendar",unit:"2kg",maxWeight:2},{name:"Större paket M-L upp till 5 kg",value:"upto5kg",illustration:"packages-in-a-pile",unit:"5kg",maxWeight:5},{name:"Tyngre paket upp till 20 kg",value:"upto20kg",illustration:"scale-package-16-abroad",unit:"20kg",maxWeight:20}],l={"2kg":[{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}],"5kg":[{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5}],"20kg":[{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}]};let r=class{constructor(i){e(this,i),this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice.xlsx",this.language="sv",this.market="se",this.filteredItems=[],this.weight={value:0,name:""},this.weightvalue=0,this.sourceData={types:[],data:[]},this.sizecategory={value:"",name:"",icon:"",unit:""}}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");const i=this.sourceData.data.filter((e=>"Sweden"===e.deliveryscope));if(!this.sizecategory)return;const t=i.filter((e=>e.sizecategory===this.sizecategory.value));if(!this.weight||!this.weight.value)return;const a=this.weight.value<=20?1e3*this.weight.value:this.weight.value;let n=t.filter((e=>(e.maxweight<=20?1e3*e.maxweight:e.maxweight)===a));if(0===n.length&&(n=t.filter((e=>(e.maxweight<=20?1e3*e.maxweight:e.maxweight)>=a)),n.length>0)){n.sort(((e,i)=>e.maxweight-i.maxweight));const e=[...new Map(n.reverse().map((e=>[e.id,e]))).values()];e.length>0&&(n=e)}n.sort(((e,i)=>{var t=e.highestrankusp?e.highestrankusp.toLowerCase():"z",a=i.highestrankusp?i.highestrankusp.toLowerCase():"z";return t.localeCompare(a)})),this.filteredItems=n}render(){return i("div",null,i("div",{class:"findprice-form"},i("div",null,i("div",{class:"heading"},a.i18n.deliveryscopeheading)),i("div",null,i("div",{class:"heading"},a.i18n.componentheading),i("div",{class:"sizecategory"},o.map((e=>i("pn-choice-button",{choiceid:e.value,value:e.value,name:"sizecategory",type:"radio",checked:e.value===this.sizecategory.value,onChange:()=>{this.sizecategory=o.filter((i=>i.value===e.value))[0],0===this.weight.value&&(this.weight=l[this.sizecategory.unit][0],this.weightvalue=this.weight.value)}},i("pn-illustration",{illustration:e.illustration})," ",e.name))))),this.sizecategory.value&&l[this.sizecategory.unit]?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.sizecategory.unit].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.sizecategory.unit].findIndex((e=>e.value===this.weightvalue)):0,onChange:e=>{this.weight=l[this.sizecategory.unit][e.target.value],this.weightvalue=this.weight.value},min:"0",max:l[this.sizecategory.unit].length-1}),i("datalist",{id:"weightlist"},l[this.sizecategory.unit].map(((e,t)=>{let a=e.name;return l[this.sizecategory.unit].length>6&&(a=t%5==0||0===t||t===l[this.sizecategory.unit].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-price-result",{item:e}))))):null)}static get watchers(){return{market:["setState"],language:["setState"],weightvalue:["filterItems"],sizecategory:["filterItems"]}}};r.style="pn-find-price .findprice-form{max-width:50em;margin:0 auto}pn-find-price h2,pn-find-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-price .sizecategory{text-align:center;margin-bottom:3rem;font-size:0.9em}pn-find-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-price .weightoption-input{width:5em;position:relative}pn-find-price .weightoption-input input::-webkit-outer-spin-button,pn-find-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-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-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-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-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-price .resultlist{margin:3em 0}";export{r as pn_find_price}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-5510f188.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.r;n=e.h;r=e.a}],execute:function(){var i="pn-product-card{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-card [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.5em}pn-product-card [slot=content] h3>[slot=Biligast]{font-size:0.6em;background:#005E41;color:white;border-radius:0.37em;width:4em;line-height:2em;text-align:center;margin-left:0.6em;font-weight:normal}pn-product-card [slot=content] h3>[slot=Snabbast]{font-size:0.6em;background:#005D92;color:white;border-radius:0.37em;width:5em;line-height:2em;text-align:center;vertical-align:bottom;margin-left:0.6em;font-weight:normal}pn-product-card [slot=additionalUSP]{font-size:0.6em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-card .cardcontent{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-card .cardprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:66.6666666667%;-ms-flex-flow:wrap;flex-flow:wrap}pn-product-card .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";var o=e("pn_product_card",function(){function e(e){t(this,e)}e.prototype.render=function(){return n(r,null,n("slot",{name:"illustration"}),n("div",{class:"cardcontent"},n("div",{class:"details"},n("slot",{name:"content"}),n("div",{class:"info"},n("slot",null)),n("slot",{name:"note"}),n("slot",{name:"additionalUSP"})),n("div",{class:"cardprice"},n("div",null,n("slot",{name:"price"}),n("slot",{name:"sendDirectPrice"}),n("slot",{name:"stampPrice"})))))};return e}());o.style=i;var l='pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em}.cardinfocontent>div{margin:10px}[slot=formatPre]{font-size:1em;font-family:"PostNordSans", "Verdana"}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}';var a=e("pn_product_card_info",function(){function e(e){t(this,e)}e.prototype.render=function(){return this.label?n(r,null,n("div",{class:"cardinfocontent"},this.text?n("pre",{slot:"formatPre"},this.text):null)):n(r,null,n("div",{class:"cardinfocontent"},n("div",null,n("h4",null,"Paket:"),n("pre",{slot:"formatPre"},this.paket)),n("div",null,n("h4",null,"Rulle:"),n("pre",{slot:"formatPre"},this.rulle))))};return e}());n("pn-icon",{symbol:"align-center",small:"false",color:"black"});a.style=l;var c="pn-product-card-price{margin-top:1em;white-space:nowrap;text-align:center}pn-product-card-price span{font-size:1.25em}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-left:1.5em}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price pn-button{width:12.8em;margin-bottom:1em;margin-top:0.5em}pn-product-card-price p{font-weight:lighter;font-size:0.6em;-ms-flex-item-align:center;align-self:center;margin-top:0.5em}pn-product-card-price a{text-decoration:none;color:#005D92}pn-product-card-price a h3{text-decoration:underline}";var s=e("pn_product_card_price",function(){function e(e){t(this,e)}e.prototype.render=function(){if(!this.amount){return}return this.url?n(r,null,n("h3",null,this.amount?n("span",null,this.amount):null,this.currency?n("span",null,this.currency):null,this.note?n("p",null,this.note):null),this.label?n("a",{href:this.url},n("pn-button",{small:"true",icon:"arrow-right",appearance:"secondary"},this.label)):null):n(r,null,n("h3",null,this.amount?n("span",null,this.amount):null,this.currency?n("span",null,this.currency):null))};return e}());s.style=c}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./p-3359dac6.js";const{state:a}=e({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:""},market:{currency:""}});export{a as s}
|
|
1
|
+
import{c as e}from"./p-3359dac6.js";const{state:a}=e({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:""},market:{currency:""}});export{a as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-cec6130e.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.c}],execute:function(){var s=t({i18n:{componentheading:"",deliveryscopeheading:"",sizeheading:"",resultlistheading:"",weightlabel:"",maxweightlabel:"",maxmeasurementlabel:"",senddirectcta:"",stampshopcta:"",message:""},market:{currency:""}}),a=s.state,n=s.onChange;e("s",a)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,a as n}from"./p-ec0adffe.js";let i=class{constructor(t){e(this,t)}render(){return t(n,null,t("slot",{name:"illustration"}),t("div",{class:"cardcontent"},t("div",{class:"details"},t("slot",{name:"content"}),t("div",{class:"info"},t("slot",null)),t("slot",{name:"note"}),t("slot",{name:"additionalUSP"})),t("div",{class:"cardprice"},t("div",null,t("slot",{name:"price"}),t("slot",{name:"sendDirectPrice"}),t("slot",{name:"stampPrice"})))))}};i.style="pn-product-card{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-card [slot=content] h3{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.5em}pn-product-card [slot=content] h3>[slot=Biligast]{font-size:0.6em;background:#005E41;color:white;border-radius:0.37em;width:4em;line-height:2em;text-align:center;margin-left:0.6em;font-weight:normal}pn-product-card [slot=content] h3>[slot=Snabbast]{font-size:0.6em;background:#005D92;color:white;border-radius:0.37em;width:5em;line-height:2em;text-align:center;vertical-align:bottom;margin-left:0.6em;font-weight:normal}pn-product-card [slot=additionalUSP]{font-size:0.6em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;margin-right:3rem;-ms-flex-item-align:center;align-self:center}pn-product-card .cardcontent{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-card .cardprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;max-width:66.6666666667%;-ms-flex-flow:wrap;flex-flow:wrap}pn-product-card .info>*{min-width:6em;margin:0.2em 1em 0.2em 0}";let r=class{constructor(t){e(this,t)}render(){return t(n,null,this.label?t("div",{class:"cardinfocontent"},this.text?t("pre",{slot:"formatPre"},this.text):null):t("div",{class:"cardinfocontent"},t("div",null,t("h4",null,"Paket:"),t("pre",{slot:"formatPre"},this.paket)),t("div",null,t("h4",null,"Rulle:"),t("pre",{slot:"formatPre"},this.rulle))))}};t("pn-icon",{symbol:"align-center",small:"false",color:"black"}),r.style='pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em}.cardinfocontent>div{margin:10px}[slot=formatPre]{font-size:1em;font-family:"PostNordSans", "Verdana"}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}';let o=class{constructor(t){e(this,t)}render(){if(this.amount)return this.url?t(n,null,t("h3",null,this.amount?t("span",null,this.amount):null,this.currency?t("span",null,this.currency):null,this.note?t("p",null,this.note):null),this.label?t("a",{href:this.url},t("pn-button",{small:"true",icon:"arrow-right",appearance:"secondary"},this.label)):null):t(n,null,t("h3",null,this.amount?t("span",null,this.amount):null,this.currency?t("span",null,this.currency):null))}};o.style="pn-product-card-price{margin-top:1em;white-space:nowrap;text-align:center}pn-product-card-price span{font-size:1.25em}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-left:1.5em}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price pn-button{width:12.8em;margin-bottom:1em;margin-top:0.5em}pn-product-card-price p{font-weight:lighter;font-size:0.6em;-ms-flex-item-align:center;align-self:center;margin-top:0.5em}pn-product-card-price a{text-decoration:none;color:#005D92}pn-product-card-price a h3{text-decoration:underline}";export{i as pn_product_card,r as pn_product_card_info,o as pn_product_card_price}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-5510f188.system.js"],(function(){"use strict";var e,n,t,a,i,r;return{setters:[function(s){e=s.d;n=s.N;t=s.w;a=s.p;i=s.H;r=s.b}],execute:function(){var s=function(){{l(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 s={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return a(s)};var l=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}};s().then((function(e){return r([["p-da370548.system",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-
|
|
1
|
+
System.register(["./p-5510f188.system.js"],(function(){"use strict";var e,n,t,a,i,r;return{setters:[function(s){e=s.d;n=s.N;t=s.w;a=s.p;i=s.H;r=s.b}],execute:function(){var s=function(){{l(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 s={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return a(s)};var l=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}};s().then((function(e){return r([["p-da370548.system",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-a425e095.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-0d0ea574.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-eb75d0cf.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-2e6644ea.system",[[0,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-7d92e5c7.system",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-478ac9b4.system",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-0ba9ae69.system",[[1,"pn-filter-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],value:[1],label:[1],loading:[4],button:[1],light:[4]},[[0,"input","inputHandler"]]]]],["p-33cefc5e.system",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-d133f30d.system",[[0,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],spamode:[4],loginManager:[32],loggedIn:[32],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-12297437.system",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-21463fc1.system",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-eb049e9d.system",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-f2898a60.system",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-50454694.system",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-b7fdc5cb.system",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-1caf4231.system",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-c127e22c.system",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["p-6ee881ea.system",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-043f460c.system",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-1051c2d9.system",[[4,"pn-product-card"],[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1]}]]],["p-1611123a.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"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[8,"i-1-8n"],emitEvents:[4,"emit-events"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32],username:[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:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["p-02a985d9.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)}))}}}));
|
|
@@ -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-5510f188.system.js","./p-5ce5be4f.system.js","./p-492e6f0d.system.js","./p-cec6130e.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:"Endast leveranser inom Sverige",sizeheading:"Hur mycket väger det?",resultlistheading:"Några utvalda val",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp portokod online",stampshopcta:"Beställ fysiska frimärken",message:"*Vid köp hos valfritt ombud"},en:{componentheading:"What do you want to send?",deliveryscopeheading:"Deliveries within Sweden only",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy postcode online",stampshopcta:"Order physical stamps",message:"When buying from any agent"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Kun leveringer indenfor Sverige",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:"Kun leveranser innen Sverige",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:"Toimitukset vain Ruotsin sisällä",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 s={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}};var o=[{name:"Dokument eller paket upp till 2 kg",value:"upto2kg",illustration:"package-letter-calendar",unit:"2kg",maxWeight:2},{name:"Större paket M-L upp till 5 kg",value:"upto5kg",illustration:"packages-in-a-pile",unit:"5kg",maxWeight:5},{name:"Tyngre paket upp till 20 kg",value:"upto20kg",illustration:"scale-package-16-abroad",unit:"20kg",maxWeight:20}];var l={"2kg":[{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}],"5kg":[{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5}],"20kg":[{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-find-price .findprice-form{max-width:50em;margin:0 auto}pn-find-price h2,pn-find-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-price .sizecategory{text-align:center;margin-bottom:3rem;font-size:0.9em}pn-find-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-price .weightoption-input{width:5em;position:relative}pn-find-price .weightoption-input input::-webkit-outer-spin-button,pn-find-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-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-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-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-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-price .resultlist{margin:3em 0}";var g=e("pn_find_price",function(){function e(e){t(this,e);this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice.xlsx";this.language="sv";this.market="se";this.filteredItems=[];this.weight={value:0,name:""};this.weightvalue=0;this.sourceData={types:[],data:[]};this.sizecategory={value:"",name:"",icon:"",unit:""}}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(s){switch(s.label){case 0:e="?cache="+Math.floor(Math.random()*(1e4-1)+1);return[4,fetch(this.source+e)];case 1:t=s.sent();return[4,t.blob()];case 2:i=s.sent();s.label=3;case 3:s.trys.push([3,5,,6]);return[4,a(i)];case 4:n=s.sent();this.sourceData=n;this.filterItems();return[3,6];case 5:r=s.sent();console.log("Unable to parse data");return[3,6];case 6:return[2]}}))}))};e.prototype.setState=function(){if(this.market){n.market=s[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}var i=this.sourceData.data.filter((function(e){return e.deliveryscope==="Sweden"}));if(!this.sizecategory){return}var a=i.filter((function(t){return t.sizecategory===e.sizecategory.value}));if(!this.weight||!this.weight.value){return}var n=this.weight.value<=20?this.weight.value*1e3:this.weight.value;var r=a.filter((function(e){return(e.maxweight<=20?e.maxweight*1e3:e.maxweight)===n}));if(r.length===0){r=a.filter((function(e){return(e.maxweight<=20?e.maxweight*1e3:e.maxweight)>=n}));if(r.length>0){r.sort((function(e,t){return e.maxweight-t.maxweight}));var s=__spreadArray([],new Map(r.reverse().map((function(e){return[e["id"],e]}))).values());if(s.length>0){r=s}}}r.sort((function(e,t){var i=e.highestrankusp?e.highestrankusp.toLowerCase():"z";var a=t.highestrankusp?t.highestrankusp.toLowerCase():"z";return i.localeCompare(a)}));this.filteredItems=r};e.prototype.render=function(){var e=this;return i("div",null,i("div",{class:"findprice-form"},i("div",null,i("div",{class:"heading"},n.i18n.deliveryscopeheading)),i("div",null,i("div",{class:"heading"},n.i18n.componentheading),i("div",{class:"sizecategory"},o.map((function(t){return i("pn-choice-button",{choiceid:t.value,value:t.value,name:"sizecategory",type:"radio",checked:t.value===e.sizecategory.value,onChange:function(){e.sizecategory=o.filter((function(e){return e.value===t.value}))[0];if(e.weight.value===0){e.weight=l[e.sizecategory.unit][0];e.weightvalue=e.weight.value}}},i("pn-illustration",{illustration:t.illustration})," ",t.name)})))),this.sizecategory.value&&l[this.sizecategory.unit]?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=l[e.sizecategory.unit].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.sizecategory.unit].findIndex((function(t){return t.value===e.weightvalue})),onChange:function(t){var i=t.target.value;e.weight=l[e.sizecategory.unit][i];e.weightvalue=e.weight.value},min:"0",max:l[this.sizecategory.unit].length-1}),i("datalist",{id:"weightlist"},l[this.sizecategory.unit].map((function(t,a){var n=t.name;if(l[e.sizecategory.unit].length>6){n=a%5===0||a===0||a===l[e.sizecategory.unit].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-price-result",{item:e}))}))):null)};Object.defineProperty(e,"watchers",{get:function(){return{market:["setState"],language:["setState"],weightvalue:["filterItems"],sizecategory:["filterItems"]}},enumerable:false,configurable:true});return e}());g.style=u}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,a as l}from"./p-ec0adffe.js";import{s as i}from"./p-390d9a03.js";import"./p-3359dac6.js";let e=class{constructor(s){t(this,s),this.item=null,this.shownitems=[],this.weightText=""}componentWillLoad(){this.composeItems()}composeItems(){}render(){return s(l,null,s("pn-product-card",null,s("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),s("div",{slot:"content"},s("div",{class:"content"},s("h3",null,this.item.name,this.item.highestrankusp?s("span","Biligast"===this.item.highestrankusp?{slot:"Biligast"}:{slot:"Snabbast"},this.item.highestrankusp):null),this.item.description?s("div",{class:"description"},this.item.description):null,this.item.info?s("div",{class:"description"},this.item.info):null)),this.item.note?s("small",{slot:"note"},s("p",null,this.item.note)):null,this.item.additionalusp?s("small",{slot:"additionalUSP"},s("p",null,this.item.additionalusp)):null,this.item.maximummeasurements?s("pn-product-card-info",{label:i.i18n.maxmeasurementlabel,text:this.item.maximummeasurements}):null,this.item.paket?s("pn-product-card-info",{paket:this.item.paket,rulle:this.item.rulle}):null,this.item.priceagent?s("pn-product-card-price",{slot:"price",label:"",amount:this.item.priceagent+"",currency:i.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,this.item.pricesenddirect?s("pn-product-card-price",{slot:"sendDirectPrice",label:i.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:i.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,this.item.pricestamps?s("pn-product-card-price",{slot:"stampPrice",label:i.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:i.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx",note:i.i18n.message}):null))}static get watchers(){return{item:["composeItems"]}}};e.style="pn-find-price-result .test{margin:3em 0}.resultcontent{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";export{e as pn_find_price_result}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-5510f188.system.js","./p-492e6f0d.system.js","./p-cec6130e.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="pn-find-price-result .test{margin:3em 0}.resultcontent{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";var l=t("pn_find_price_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(){};t.prototype.render=function(){return i(s,null,i("pn-product-card",null,i("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),i("div",{slot:"content"},i("div",{class:"content"},i("h3",null,this.item.name,this.item.highestrankusp?this.item.highestrankusp==="Biligast"?i("span",{slot:"Biligast"},this.item.highestrankusp):i("span",{slot:"Snabbast"},this.item.highestrankusp):null),this.item.description?i("div",{class:"description"},this.item.description):null,this.item.info?i("div",{class:"description"},this.item.info):null)),this.item.note?i("small",{slot:"note"},i("p",null,this.item.note)):null,this.item.additionalusp?i("small",{slot:"additionalUSP"},i("p",null,this.item.additionalusp)):null,this.item.maximummeasurements?i("pn-product-card-info",{label:n.i18n.maxmeasurementlabel,text:this.item.maximummeasurements}):null,this.item.paket?i("pn-product-card-info",{paket:this.item.paket,rulle:this.item.rulle}):null,this.item.priceagent?i("pn-product-card-price",{slot:"price",label:"",amount:this.item.priceagent+"",currency:n.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx"}):null,this.item.pricesenddirect?i("pn-product-card-price",{slot:"sendDirectPrice",label:n.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:n.market.currency,url:"https://portal.postnord.com/skickadirekt/"}):null,this.item.pricestamps?i("pn-product-card-price",{slot:"stampPrice",label:n.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:n.market.currency,url:"https://shop.postnord.se/ebutik/default.aspx",note:n.i18n.message}):null))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}());l.style=r}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,N as n,w as a,p as t,H as i,b as r}from"./p-ec0adffe.js";const l=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{l(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),o={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,a.location.href)).href,t(o))})().then((e=>r([["p-5f8ef634",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-
|
|
1
|
+
import{d as e,N as n,w as a,p as t,H as i,b as r}from"./p-ec0adffe.js";const l=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{l(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),o={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,a.location.href)).href,t(o))})().then((e=>r([["p-5f8ef634",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],token:[1],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-0fb48ff6",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-22738646",[[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-725e4377",[[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-93d8620b",[[0,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-772c078c",[[4,"pn-bonus-progressbar",{icon:[1],heading:[1],theme:[513],bonuspercentage:[1],currency:[513],value:[1538],min:[1538],max:[1538],valuepercentage:[32],progresspercentage:[32],levelValues:[32],currentLevelAdjustedValue:[32]}]]],["p-a37ea453",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-a25fc106",[[1,"pn-filter-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],value:[1],label:[1],loading:[4],button:[1],light:[4]},[[0,"input","inputHandler"]]]]],["p-942f590f",[[0,"pn-pex-pricefinder",{language:[1],currency:[1],apiUrl:[1,"api-url"],i18n:[32],fromzip:[32],tozip:[32],weight:[32],when:[32],response:[32]},[[0,"language","setLanguage"]]]]],["p-a5284c78",[[0,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],spamode:[4],loginManager:[32],loggedIn:[32],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-77d43e30",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-53e14b27",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-cce32042",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-b42fd0cb",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-325a7cae",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-d1053abf",[[0,"pn-product-pricelist-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-52787ac9",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-0d975e39",[[4,"pn-site-footer",{url:[1]}],[4,"pn-site-footer-col"]]],["p-dd4de1a9",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-dde2cf1c",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-80ca78f4",[[4,"pn-product-card"],[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1]}]]],["p-38ff23f5",[[4,"pn-mainnav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],listCount:[32],alignment:[32]}],[4,"pn-language-selector",{value:[1537],selectedLanguageName:[32],options:[32],i18n:[32]}],[0,"pn-language-selector-option",{name:[1],code:[1],url:[1],selected:[4],currentLanguage:[1,"current-language"]}],[4,"pn-mainnav",{market:[1],language:[1],navigationId:[1,"navigation-id"],openMenu:[1028,"open-menu"],navLabel:[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{heading:[1],linkCount:[32]}],[0,"pn-marketweb-siteheader-login",{endpoint:[1],token:[1],i18n:[8,"i-1-8n"],emitEvents:[4,"emit-events"],loginDialog:[1040],loginManager:[32],loggedIn:[32],toggleButtonText:[32],username:[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:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]],["p-02c8dcd0",[[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)));
|
|
@@ -9,6 +9,7 @@ declare const state: {
|
|
|
9
9
|
maxmeasurementlabel: string;
|
|
10
10
|
senddirectcta: string;
|
|
11
11
|
stampshopcta: string;
|
|
12
|
+
message: string;
|
|
12
13
|
};
|
|
13
14
|
market: {
|
|
14
15
|
currency: string;
|
|
@@ -24,6 +25,7 @@ declare const state: {
|
|
|
24
25
|
maxmeasurementlabel: string;
|
|
25
26
|
senddirectcta: string;
|
|
26
27
|
stampshopcta: string;
|
|
28
|
+
message: string;
|
|
27
29
|
};
|
|
28
30
|
market: {
|
|
29
31
|
currency: string;
|
|
@@ -9,6 +9,7 @@ export declare const translations: {
|
|
|
9
9
|
maxmeasurementlabel: string;
|
|
10
10
|
senddirectcta: string;
|
|
11
11
|
stampshopcta: string;
|
|
12
|
+
message: string;
|
|
12
13
|
};
|
|
13
14
|
en: {
|
|
14
15
|
componentheading: string;
|
|
@@ -20,6 +21,7 @@ export declare const translations: {
|
|
|
20
21
|
maxmeasurementlabel: string;
|
|
21
22
|
senddirectcta: string;
|
|
22
23
|
stampshopcta: string;
|
|
24
|
+
message: string;
|
|
23
25
|
};
|
|
24
26
|
da: {
|
|
25
27
|
componentheading: string;
|
|
@@ -8,6 +8,7 @@ export interface FindPriceSizeCategory {
|
|
|
8
8
|
value: string;
|
|
9
9
|
icon: string;
|
|
10
10
|
unit: string;
|
|
11
|
+
maxWeight: number;
|
|
11
12
|
}
|
|
12
13
|
export interface PnfindPricei18n {
|
|
13
14
|
componentheading: string;
|
|
@@ -19,7 +20,7 @@ export interface PnfindPricei18n {
|
|
|
19
20
|
maxmeasurementlabel: string;
|
|
20
21
|
senddirectcta: string;
|
|
21
22
|
stampshopcta: string;
|
|
22
|
-
|
|
23
|
+
message: string;
|
|
23
24
|
}
|
|
24
25
|
export interface PnfindPriceMarket {
|
|
25
26
|
currency: string;
|
|
@@ -34,10 +35,14 @@ export interface ProductPriceItm {
|
|
|
34
35
|
what: string;
|
|
35
36
|
deliveryscope: string;
|
|
36
37
|
name: string;
|
|
38
|
+
highestrankusp: string;
|
|
39
|
+
additionalusp: string;
|
|
37
40
|
maxweight: number;
|
|
38
41
|
pricestamps?: number;
|
|
39
42
|
pricesenddirect?: number;
|
|
40
43
|
priceagent?: number;
|
|
44
|
+
paket?: string;
|
|
45
|
+
rulle?: string;
|
|
41
46
|
maximummeasurements?: string;
|
|
42
47
|
info?: string;
|
|
43
48
|
note?: string;
|