@postnord/pn-marketweb-components 1.0.42-beta → 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/{MarketWebLoginManager-5431b20e.js → MarketWebLoginManager-1282a883.js} +1 -1
- package/cjs/{convert-57b3dd5e.js → convert-b8a6d658.js} +55 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-choice-button.cjs.entry.js +39 -0
- package/cjs/pn-find-price-result.cjs.entry.js +34 -0
- package/cjs/pn-find-price-store-d9aabecb.js +24 -0
- package/cjs/pn-find-price.cjs.entry.js +243 -0
- package/cjs/{pn-choice-button_2.cjs.entry.js → pn-find-service-and-price-result.cjs.entry.js} +0 -33
- package/cjs/pn-find-service-and-price.cjs.entry.js +1 -1
- package/cjs/pn-language-selector_9.cjs.entry.js +17 -2
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +0 -1
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +5 -6
- package/cjs/pn-product-card_3.cjs.entry.js +49 -0
- package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector.cjs.entry.js +1 -1
- package/collection/collection-manifest.json +5 -0
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +0 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +28 -30
- package/collection/components/navigation/pn-language-selector/pn-language-selector.js +15 -0
- package/collection/components/widgets/pn-find-price/data.js +42 -0
- package/collection/components/widgets/pn-find-price/find-price.stories.js +27 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-result.css +9 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +94 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-store.js +21 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +73 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-types.js +1 -0
- package/collection/components/widgets/pn-find-price/pn-find-price.css +56 -0
- package/collection/components/widgets/pn-find-price/pn-find-price.js +217 -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/collection/globals/MarketWebLoginManager.js +1 -1
- package/collection/globals/shared/productprice/convert.js +55 -1
- package/custom-elements/index.d.ts +30 -0
- package/custom-elements/index.js +465 -66
- package/esm/{MarketWebLoginManager-12c15210.js → MarketWebLoginManager-310d2552.js} +1 -1
- package/esm/{convert-b49a0857.js → convert-8cce67c4.js} +55 -1
- package/esm/loader.js +1 -1
- package/esm/{pn-choice-button_2.entry.js → pn-choice-button.entry.js} +1 -39
- package/esm/pn-find-price-result.entry.js +30 -0
- package/esm/pn-find-price-store-8560f26c.js +22 -0
- package/esm/pn-find-price.entry.js +239 -0
- package/esm/pn-find-service-and-price-result.entry.js +41 -0
- package/esm/pn-find-service-and-price.entry.js +1 -1
- package/esm/pn-language-selector_9.entry.js +17 -2
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-sitefooter.entry.js +0 -1
- package/esm/pn-marketweb-siteheader.entry.js +5 -6
- package/esm/pn-product-card_3.entry.js +43 -0
- package/esm/pn-product-pricelist.entry.js +1 -1
- package/esm/pn-profile-selector.entry.js +1 -1
- package/esm-es5/{MarketWebLoginManager-12c15210.js → MarketWebLoginManager-310d2552.js} +1 -1
- package/esm-es5/{convert-b49a0857.js → convert-8cce67c4.js} +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-choice-button.entry.js +1 -0
- package/esm-es5/pn-find-price-result.entry.js +1 -0
- package/esm-es5/pn-find-price-store-8560f26c.js +1 -0
- package/esm-es5/pn-find-price.entry.js +1 -0
- package/esm-es5/pn-find-service-and-price-result.entry.js +1 -0
- package/esm-es5/pn-find-service-and-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_3.entry.js +1 -0
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-profile-selector.entry.js +1 -1
- package/package.json +7 -6
- package/pn-market-web-components/{p-e6a209c6.system.entry.js → p-0d0ea574.system.entry.js} +1 -1
- 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-1611123a.system.entry.js +1 -0
- package/pn-market-web-components/{p-b8af690a.entry.js → p-22738646.entry.js} +1 -1
- package/pn-market-web-components/{p-412ed7a0.js → p-2456901a.js} +1 -1
- package/pn-market-web-components/p-2e6644ea.system.entry.js +1 -0
- package/pn-market-web-components/p-325a7cae.entry.js +1 -0
- package/pn-market-web-components/p-38ff23f5.entry.js +1 -0
- package/pn-market-web-components/p-390d9a03.js +1 -0
- package/pn-market-web-components/p-492e6f0d.system.js +1 -0
- package/pn-market-web-components/p-50454694.system.entry.js +1 -0
- package/pn-market-web-components/{p-91624bd5.system.js → p-5ce5be4f.system.js} +2 -2
- package/pn-market-web-components/p-5f8ef634.entry.js +1 -0
- package/pn-market-web-components/p-6ee881ea.system.entry.js +1 -0
- package/pn-market-web-components/p-725e4377.entry.js +1 -0
- package/pn-market-web-components/{p-21e0e386.js → p-7dd91709.js} +1 -1
- package/pn-market-web-components/p-80ca78f4.entry.js +1 -0
- package/pn-market-web-components/p-93d8620b.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-592ef510.entry.js → p-a5284c78.entry.js} +1 -1
- package/pn-market-web-components/p-b42fd0cb.entry.js +1 -0
- package/pn-market-web-components/{p-030c3c8a.system.entry.js → p-d133f30d.system.entry.js} +1 -1
- package/pn-market-web-components/p-da370548.system.entry.js +1 -0
- package/pn-market-web-components/p-dd4de1a9.entry.js +1 -0
- package/pn-market-web-components/{p-e04f8d34.system.entry.js → p-eb75d0cf.system.entry.js} +1 -1
- package/pn-market-web-components/{p-f9437818.system.js → p-f1311662.system.js} +1 -1
- 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/navigation/pn-language-selector/pn-language-selector.d.ts +1 -0
- package/types/components/widgets/pn-find-price/pn-find-price-result.d.ts +9 -0
- package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +35 -0
- package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +73 -0
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +51 -0
- package/types/components/widgets/pn-find-price/pn-find-price.d.ts +16 -0
- 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 +94 -0
- package/esm-es5/pn-choice-button_2.entry.js +0 -1
- package/pn-market-web-components/p-37801e32.entry.js +0 -1
- package/pn-market-web-components/p-4aa3b95d.entry.js +0 -1
- package/pn-market-web-components/p-861210ae.entry.js +0 -1
- package/pn-market-web-components/p-b2383083.system.entry.js +0 -1
- package/pn-market-web-components/p-bbb59009.entry.js +0 -1
- package/pn-market-web-components/p-ca1c99dc.system.entry.js +0 -1
- package/pn-market-web-components/p-ec1127de.system.entry.js +0 -1
- package/pn-market-web-components/p-ef8a89bc.entry.js +0 -1
- package/pn-market-web-components/p-f6b6052b.system.entry.js +0 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-cd08e313.js');
|
|
6
6
|
const MarketWebContextService = require('./MarketWebContextService-bdc46f40.js');
|
|
7
|
-
const MarketWebLoginManager = require('./MarketWebLoginManager-
|
|
7
|
+
const MarketWebLoginManager = require('./MarketWebLoginManager-1282a883.js');
|
|
8
8
|
const FetchHelper = require('./FetchHelper-f80943bf.js');
|
|
9
9
|
|
|
10
10
|
const translations = {
|
|
@@ -148,7 +148,6 @@ let PnMarketwebSiteheader = class {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
onLanguageSelectorChange(e) {
|
|
151
|
-
console.log('onLanguageSelectorChange(e', e);
|
|
152
151
|
this.language = e.detail;
|
|
153
152
|
window.dispatchEvent(new CustomEvent('marketweb-languagechange', { detail: this.language }));
|
|
154
153
|
}
|
|
@@ -297,10 +296,10 @@ let PnMarketwebSiteheader = class {
|
|
|
297
296
|
}
|
|
298
297
|
render() {
|
|
299
298
|
var _a, _b, _c, _d, _e, _f;
|
|
300
|
-
return (index.h(index.Host, { language: this.language, market: this.market, environment: this.environment }, index.h("header", null, index.h("div", { class: "siteheader-row" }, index.h("div", { class: "siteheader-topleft" }, index.h("slot", { name: "topleft" }), !this.hideSiteSelector &&
|
|
299
|
+
return (index.h(index.Host, { language: this.language, market: this.market, environment: this.environment }, index.h("header", null, index.h("div", { class: "siteheader-row" }, index.h("div", { class: "siteheader-topleft" }, index.h("slot", { name: "topleft" }), (this.gotData && this.siteSelector && !this.hideSiteSelector) &&
|
|
301
300
|
index.h("pn-site-selector", { language: this.language, buttontext: (_b = (_a = this.siteSelector) === null || _a === void 0 ? void 0 : _a.currentSiteTitle) !== null && _b !== void 0 ? _b : 'postnord' }, (this.gotData && ((_c = this.siteSelector) === null || _c === void 0 ? void 0 : _c.currentSiteTitle)) &&
|
|
302
301
|
index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle + ' ', description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_d = this.siteSelector) === null || _d === void 0 ? void 0 : _d.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText + ' ', description: site.linkDescription, url: this.adjustSiteSelectorUrl(site.href), newwindow: site.openInNewWindow })))), index.h("div", { class: "siteheader-logocontainer" }, index.h("a", { href: this.homePageLink, title: "Home", class: "siteheader-logolink" }, index.h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65" }, index.h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "#00A0D6", transform: "translate(0 0)" })))), index.h("div", { class: "siteheader-topright" }, index.h("slot", { name: "toprightstart" }), (this.gotData && this.loginDialog && !this.hideLogin) && (index.h("pn-marketweb-siteheader-login", { token: this.token, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
303
|
-
index.h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => index.h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), index.h("slot", { name: "toprightend" }))), index.h("div", { class: "siteheader-row" }, index.h("div", { class: "siteheader-menu" }, index.h("pn-mainnav", { market: this.market, language: this.language, onMenuOpenChange: (e) => {
|
|
302
|
+
index.h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => index.h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), index.h("slot", { name: "toprightend" }))), index.h("div", { class: "siteheader-row" }, index.h("div", { class: "siteheader-menu" }, (this.gotData && this.menuItems) && (index.h("pn-mainnav", { market: this.market, language: this.language, onMenuOpenChange: (e) => {
|
|
304
303
|
document.body.setAttribute("data-siteheader-menuopen", (e.detail + ''));
|
|
305
304
|
} }, index.h("pn-mainnav-level", null, index.h("pn-mainnav-list", null, this.menuItems.map((item) => {
|
|
306
305
|
var _a, _b;
|
|
@@ -310,11 +309,11 @@ let PnMarketwebSiteheader = class {
|
|
|
310
309
|
var _a;
|
|
311
310
|
return (index.h("pn-mainnav-link", { name: childitem.name, href: childitem.href, target: (_a = childitem.linkTarget) !== null && _a !== void 0 ? _a : "_self", linkid: childitem.trackingId }));
|
|
312
311
|
})), (item.promotedMenuItems && item.promotedMenuItems.length > 0) &&
|
|
313
|
-
index.h("pn-mainnav-list", { heading: item.promotedMenuItemsHeader }, item.promotedMenuItems.map((childitem) => (index.h("pn-mainnav-link", { href: childitem.href, name: childitem.linkText, target: childitem.openInNewWindow ? "_blank" : "_self", linkid: this.promotedItemId(childitem) })))))));
|
|
312
|
+
index.h("pn-mainnav-list", { heading: item.promotedMenuItemsHeader }, item.promotedMenuItems.map((childitem) => (index.h("pn-mainnav-link", { href: childitem.href, name: childitem.linkText, target: childitem.openInNewWindow ? "_blank" : "_self", linkid: this.promotedItemId(childitem) + item.id })))))));
|
|
314
313
|
})), index.h("div", { slot: "footer", class: "siteheader-menu-footer" }, (this.gotData && this.loginDialog && !this.hideLogin) && (index.h("pn-marketweb-siteheader-login", { emitEvents: false, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
315
314
|
index.h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => index.h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), !this.hideSiteSelector &&
|
|
316
315
|
index.h("pn-site-selector", { language: this.language }, (this.gotData && ((_e = this.siteSelector) === null || _e === void 0 ? void 0 : _e.currentSiteTitle)) &&
|
|
317
|
-
index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_f = this.siteSelector) === null || _f === void 0 ? void 0 : _f.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: site.pageLink, newwindow: site.openInNewWindow })))), index.h("div", { slot: "top", class: "siteheader-menu-top" }, index.h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, i18n: this.i18n }))))), index.h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n })))));
|
|
316
|
+
index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_f = this.siteSelector) === null || _f === void 0 ? void 0 : _f.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: site.pageLink, newwindow: site.openInNewWindow })))), index.h("div", { slot: "top", class: "siteheader-menu-top" }, index.h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, i18n: this.i18n })))))), index.h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n })))));
|
|
318
317
|
}
|
|
319
318
|
get hostElement() { return index.getElement(this); }
|
|
320
319
|
static get watchers() { return {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-cd08e313.js');
|
|
6
|
+
|
|
7
|
+
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}";
|
|
8
|
+
|
|
9
|
+
let PnProductCard = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (index.h(index.Host, null, index.h("slot", { name: "illustration" }), index.h("div", { class: "cardcontent" }, index.h("div", { class: "details" }, index.h("slot", { name: "content" }), index.h("div", { class: "info" }, index.h("slot", null)), index.h("slot", { name: "note" }), index.h("slot", { name: "additionalUSP" })), index.h("div", { class: "cardprice" }, index.h("div", null, index.h("slot", { name: "price" }), index.h("slot", { name: "sendDirectPrice" }), index.h("slot", { name: "stampPrice" }))))));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
PnProductCard.style = pnProductCardCss;
|
|
18
|
+
|
|
19
|
+
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}";
|
|
20
|
+
|
|
21
|
+
let PnProductCardInfo = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
index.registerInstance(this, hostRef);
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return (this.label) ? (index.h(index.Host, null, index.h("div", { class: "cardinfocontent" }, (this.text) ? (index.h("pre", { slot: "formatPre" }, this.text)) : null))) : (index.h(index.Host, null, index.h("div", { class: "cardinfocontent" }, index.h("div", null, index.h("h4", null, "Paket:"), index.h("pre", { slot: "formatPre" }, this.paket)), index.h("div", null, index.h("h4", null, "Rulle:"), index.h("pre", { slot: "formatPre" }, this.rulle)))));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
index.h("pn-icon", { symbol: "align-center", small: "false", color: "black" });
|
|
30
|
+
PnProductCardInfo.style = pnProductCardInfoCss;
|
|
31
|
+
|
|
32
|
+
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}";
|
|
33
|
+
|
|
34
|
+
let PnProductCardPrice = class {
|
|
35
|
+
constructor(hostRef) {
|
|
36
|
+
index.registerInstance(this, hostRef);
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
if (!this.amount) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
return (this.url) ? (index.h(index.Host, null, index.h("h3", null, (this.amount) ? (index.h("span", null, this.amount)) : null, (this.currency) ? (index.h("span", null, this.currency)) : null, (this.note) ? (index.h("p", null, this.note)) : null), (this.label) ? (index.h("a", { href: this.url }, index.h("pn-button", { small: "true", icon: "arrow-right", appearance: "secondary" }, this.label))) : null)) : (index.h(index.Host, null, index.h("h3", null, (this.amount) ? (index.h("span", null, this.amount)) : null, (this.currency) ? (index.h("span", null, this.currency)) : null)));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
PnProductCardPrice.style = pnProductCardPriceCss;
|
|
46
|
+
|
|
47
|
+
exports.pn_product_card = PnProductCard;
|
|
48
|
+
exports.pn_product_card_info = PnProductCardInfo;
|
|
49
|
+
exports.pn_product_card_price = PnProductCardPrice;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-cd08e313.js');
|
|
6
|
-
const convert = require('./convert-
|
|
6
|
+
const convert = require('./convert-b8a6d658.js');
|
|
7
7
|
const pnProductPricelistStore = require('./pn-product-pricelist-store-8dda97db.js');
|
|
8
8
|
require('./index-31d574c5.js');
|
|
9
9
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-cd08e313.js');
|
|
6
6
|
const MarketWebContextService = require('./MarketWebContextService-bdc46f40.js');
|
|
7
|
-
const MarketWebLoginManager = require('./MarketWebLoginManager-
|
|
7
|
+
const MarketWebLoginManager = require('./MarketWebLoginManager-1282a883.js');
|
|
8
8
|
|
|
9
9
|
const translations = {
|
|
10
10
|
'sv': {
|
|
@@ -23,9 +23,14 @@
|
|
|
23
23
|
"./components/navigation/pn-site-footer/pn-site-footer.js",
|
|
24
24
|
"./components/navigation/pn-site-selector/pn-site-selector-item.js",
|
|
25
25
|
"./components/navigation/pn-site-selector/pn-site-selector.js",
|
|
26
|
+
"./components/widgets/pn-find-price/pn-find-price-result.js",
|
|
27
|
+
"./components/widgets/pn-find-price/pn-find-price.js",
|
|
26
28
|
"./components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js",
|
|
27
29
|
"./components/widgets/pn-find-service-and-price/pn-find-service-and-price.js",
|
|
28
30
|
"./components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js",
|
|
31
|
+
"./components/widgets/pn-product-card/pn-product-card-info.js",
|
|
32
|
+
"./components/widgets/pn-product-card/pn-product-card-price.js",
|
|
33
|
+
"./components/widgets/pn-product-card/pn-product-card.js",
|
|
29
34
|
"./components/widgets/pn-product-pricelist/pn-product-pricelist-result.js",
|
|
30
35
|
"./components/widgets/pn-product-pricelist/pn-product-pricelist.js",
|
|
31
36
|
"./components/widgets/pn-product-tile/pn-product-tile-info.js",
|
|
@@ -127,7 +127,7 @@ export class PnMarketwebSiteheaderLogin {
|
|
|
127
127
|
:
|
|
128
128
|
h("div", null,
|
|
129
129
|
h("ul", null, this.loginDialog.loggedInLinks.map((link) => {
|
|
130
|
-
const isLogoutLink = link.href.indexOf('logout');
|
|
130
|
+
const isLogoutLink = link.href.indexOf('logout') !== -1;
|
|
131
131
|
const href = (isLogoutLink) ? this.loginManager.getLogoutUrl(link.href.replace('logout', '').replace('http://window.location.href/?', '').replace('https://window.location.href/?', '')) : link.href;
|
|
132
132
|
return (h("li", null,
|
|
133
133
|
h("pn-button", Object.assign({ href: href, id: this.uniqueId(link.linkText) }, (link.openInNewWindow && { target: '_blank' }), this.linkAppearanceAttributes(link), { onClick: () => { if (isLogoutLink) {
|
package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js
CHANGED
|
@@ -91,7 +91,6 @@ export class PnMarketwebSiteheader {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
onLanguageSelectorChange(e) {
|
|
94
|
-
console.log('onLanguageSelectorChange(e', e);
|
|
95
94
|
this.language = e.detail;
|
|
96
95
|
window.dispatchEvent(new CustomEvent('marketweb-languagechange', { detail: this.language }));
|
|
97
96
|
}
|
|
@@ -251,7 +250,7 @@ export class PnMarketwebSiteheader {
|
|
|
251
250
|
h("div", { class: "siteheader-row" },
|
|
252
251
|
h("div", { class: "siteheader-topleft" },
|
|
253
252
|
h("slot", { name: "topleft" }),
|
|
254
|
-
!this.hideSiteSelector &&
|
|
253
|
+
(this.gotData && this.siteSelector && !this.hideSiteSelector) &&
|
|
255
254
|
h("pn-site-selector", { language: this.language, buttontext: (_b = (_a = this.siteSelector) === null || _a === void 0 ? void 0 : _a.currentSiteTitle) !== null && _b !== void 0 ? _b : 'postnord' },
|
|
256
255
|
(this.gotData && ((_c = this.siteSelector) === null || _c === void 0 ? void 0 : _c.currentSiteTitle)) &&
|
|
257
256
|
h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle + ' ', description: this.siteSelector.currentSiteDescription }),
|
|
@@ -267,34 +266,33 @@ export class PnMarketwebSiteheader {
|
|
|
267
266
|
h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))),
|
|
268
267
|
h("slot", { name: "toprightend" }))),
|
|
269
268
|
h("div", { class: "siteheader-row" },
|
|
270
|
-
h("div", { class: "siteheader-menu" },
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
h("pn-mainnav-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
item.children.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
(item.
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
h("
|
|
288
|
-
|
|
289
|
-
(this.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
(
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
h("
|
|
297
|
-
h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, i18n: this.i18n }))))),
|
|
269
|
+
h("div", { class: "siteheader-menu" }, (this.gotData && this.menuItems) && (h("pn-mainnav", { market: this.market, language: this.language, onMenuOpenChange: (e) => {
|
|
270
|
+
document.body.setAttribute("data-siteheader-menuopen", (e.detail + ''));
|
|
271
|
+
} },
|
|
272
|
+
h("pn-mainnav-level", null,
|
|
273
|
+
h("pn-mainnav-list", null, this.menuItems.map((item) => {
|
|
274
|
+
var _a, _b;
|
|
275
|
+
return (h("pn-mainnav-link", { name: item.name, href: item.href, itemid: item.id, target: (_a = item.linkTarget) !== null && _a !== void 0 ? _a : "_self", linkid: item.trackingId }, ((item.promotedMenuItems && item.promotedMenuItems.length > 0) || (item.children && item.children.length > 0)) &&
|
|
276
|
+
h("pn-mainnav-level", null,
|
|
277
|
+
item.children.length > 0 &&
|
|
278
|
+
h("pn-mainnav-list", { heading: ((_b = item.navigationHeading) !== null && _b !== void 0 ? _b : "") }, item.children.map((childitem) => {
|
|
279
|
+
var _a;
|
|
280
|
+
return (h("pn-mainnav-link", { name: childitem.name, href: childitem.href, target: (_a = childitem.linkTarget) !== null && _a !== void 0 ? _a : "_self", linkid: childitem.trackingId }));
|
|
281
|
+
})),
|
|
282
|
+
(item.promotedMenuItems && item.promotedMenuItems.length > 0) &&
|
|
283
|
+
h("pn-mainnav-list", { heading: item.promotedMenuItemsHeader }, item.promotedMenuItems.map((childitem) => (h("pn-mainnav-link", { href: childitem.href, name: childitem.linkText, target: childitem.openInNewWindow ? "_blank" : "_self", linkid: this.promotedItemId(childitem) + item.id })))))));
|
|
284
|
+
})),
|
|
285
|
+
h("div", { slot: "footer", class: "siteheader-menu-footer" },
|
|
286
|
+
(this.gotData && this.loginDialog && !this.hideLogin) && (h("pn-marketweb-siteheader-login", { emitEvents: false, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })),
|
|
287
|
+
(this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
288
|
+
h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))),
|
|
289
|
+
!this.hideSiteSelector &&
|
|
290
|
+
h("pn-site-selector", { language: this.language },
|
|
291
|
+
(this.gotData && ((_e = this.siteSelector) === null || _e === void 0 ? void 0 : _e.currentSiteTitle)) &&
|
|
292
|
+
h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription }),
|
|
293
|
+
(this.gotData && ((_f = this.siteSelector) === null || _f === void 0 ? void 0 : _f.siteSelections)) && this.siteSelector.siteSelections.map((site) => h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: site.pageLink, newwindow: site.openInNewWindow })))),
|
|
294
|
+
h("div", { slot: "top", class: "siteheader-menu-top" },
|
|
295
|
+
h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, i18n: this.i18n })))))),
|
|
298
296
|
h("pn-marketweb-siteheader-search", { search: this.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n })))));
|
|
299
297
|
}
|
|
300
298
|
static get is() { return "pn-marketweb-siteheader"; }
|
|
@@ -8,6 +8,7 @@ export class PnlanguageSelector {
|
|
|
8
8
|
this.options = [];
|
|
9
9
|
}
|
|
10
10
|
componentWillLoad() {
|
|
11
|
+
this.setInitialSelectedLanguageName();
|
|
11
12
|
this.setTranslations();
|
|
12
13
|
}
|
|
13
14
|
componentDidLoad() {
|
|
@@ -17,6 +18,20 @@ export class PnlanguageSelector {
|
|
|
17
18
|
this.setSelectedLanguageName();
|
|
18
19
|
this.addEventBindingsToOptions();
|
|
19
20
|
}
|
|
21
|
+
setInitialSelectedLanguageName() {
|
|
22
|
+
if (!window.Intl || !this.value) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const langs = new Intl.DisplayNames([this.value], { type: 'language' });
|
|
26
|
+
if (!langs) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const languageName = langs.of(this.value);
|
|
30
|
+
if (!languageName) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.selectedLanguageName = languageName.charAt(0).toUpperCase() + languageName.slice(1);
|
|
34
|
+
}
|
|
20
35
|
addEventBindingsToOptions() {
|
|
21
36
|
const options = [].slice.apply(this.hostElement.querySelectorAll("pn-language-selector-option"));
|
|
22
37
|
options.map((option) => {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
const sizeCategories = [
|
|
3
|
+
{ name: "Dokument eller paket upp till 2 kg", value: "upto2kg", illustration: "package-letter-calendar", unit: "2kg", maxWeight:2 },
|
|
4
|
+
{ name: "Större paket M-L upp till 5 kg", value: "upto5kg", illustration: "packages-in-a-pile", unit: "5kg", maxWeight:5},
|
|
5
|
+
{ name: "Tyngre paket upp till 20 kg", value: "upto20kg", illustration: "scale-package-16-abroad", unit: "20kg", maxWeight: 20 },
|
|
6
|
+
];
|
|
7
|
+
|
|
8
|
+
const weights = {
|
|
9
|
+
"2kg": [
|
|
10
|
+
{ name: "50g", abbreviation: 'g', value: 50 },
|
|
11
|
+
{ name: "100g", abbreviation: 'g', value: 100 },
|
|
12
|
+
{ name: "250g", abbreviation: 'g', value: 250 },
|
|
13
|
+
{ name: "500g", abbreviation: 'g', value: 500 },
|
|
14
|
+
{ name: "1kg", abbreviation: 'kg', value: 1 },
|
|
15
|
+
{ name: "2kg", abbreviation: 'kg', value: 2 },
|
|
16
|
+
],
|
|
17
|
+
"5kg": [
|
|
18
|
+
{ name: "2kg", abbreviation: 'kg', value: 2 },
|
|
19
|
+
{ name: "3kg", abbreviation: 'kg', value: 3 },
|
|
20
|
+
{ name: "4kg", abbreviation: 'kg', value: 4 },
|
|
21
|
+
{ name: "5kg", abbreviation: 'kg', value: 5 },
|
|
22
|
+
],
|
|
23
|
+
"20kg": [
|
|
24
|
+
{ name: "5kg", abbreviation: 'kg', value: 5 },
|
|
25
|
+
{ name: "6kg", abbreviation: 'kg', value: 6 },
|
|
26
|
+
{ name: "7Kg", abbreviation: 'kg', value: 7 },
|
|
27
|
+
{ name: "8kg", abbreviation: 'kg', value: 8 },
|
|
28
|
+
{ name: "9kg", abbreviation: 'kg', value: 9 },
|
|
29
|
+
{ name: "10kg", abbreviation: 'kg', value: 10 },
|
|
30
|
+
{ name: "11kg", abbreviation: 'kg', value: 11 },
|
|
31
|
+
{ name: "12kg", abbreviation: 'kg', value: 12 },
|
|
32
|
+
{ name: "13kg", abbreviation: 'kg', value: 13 },
|
|
33
|
+
{ name: "14kg", abbreviation: 'kg', value: 14 },
|
|
34
|
+
{ name: "15kg", abbreviation: 'kg', value: 15 },
|
|
35
|
+
{ name: "16kg", abbreviation: 'kg', value: 16 },
|
|
36
|
+
{ name: "17kg", abbreviation: 'kg', value: 17 },
|
|
37
|
+
{ name: "18kg", abbreviation: 'kg', value: 18 },
|
|
38
|
+
{ name: "20kg", abbreviation: 'kg', value: 20 },
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { weights, sizeCategories};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import readme from "./readme.md";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Widgets /Find Price",
|
|
5
|
+
parameters: {
|
|
6
|
+
notes: readme
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Template = ({ ...args }) => {
|
|
11
|
+
return `
|
|
12
|
+
<div style="max-width: 100%; margin:1em auto 0;">
|
|
13
|
+
<pn-find-price
|
|
14
|
+
source="${args.source}"
|
|
15
|
+
market="${args.market}"
|
|
16
|
+
language="${args.language}"
|
|
17
|
+
></pn-find-price>
|
|
18
|
+
</div>
|
|
19
|
+
`;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Primary = Template.bind({});
|
|
23
|
+
Primary.args = {
|
|
24
|
+
source: 'https://com-integration.postnord.com/globalassets/global/prices/sv-findprice.xlsx',
|
|
25
|
+
language: 'sv',
|
|
26
|
+
market: 'se',
|
|
27
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Component, h, Prop, Host, Watch, State } from "@stencil/core";
|
|
2
|
+
import { state } from "./pn-find-price-store";
|
|
3
|
+
export class PnfindPriceResult {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.item = null;
|
|
6
|
+
this.shownitems = [];
|
|
7
|
+
this.weightText = "";
|
|
8
|
+
}
|
|
9
|
+
componentWillLoad() {
|
|
10
|
+
this.composeItems();
|
|
11
|
+
}
|
|
12
|
+
composeItems() {
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h(Host, null, h("pn-product-card", null,
|
|
16
|
+
h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }),
|
|
17
|
+
h("div", { slot: "content" },
|
|
18
|
+
h("div", { class: "content" },
|
|
19
|
+
h("h3", null,
|
|
20
|
+
this.item.name,
|
|
21
|
+
(this.item.highestrankusp) ?
|
|
22
|
+
(this.item.highestrankusp === "Biligast") ?
|
|
23
|
+
(h("span", { slot: "Biligast" }, this.item.highestrankusp)) : (h("span", { slot: "Snabbast" }, this.item.highestrankusp)) : null),
|
|
24
|
+
(this.item.description) ? (h("div", { class: "description" }, this.item.description)) : null,
|
|
25
|
+
(this.item.info) ? (h("div", { class: "description" }, this.item.info)) : null)),
|
|
26
|
+
this.item.note ? (h("small", { slot: "note" },
|
|
27
|
+
h("p", null, this.item.note))) : null,
|
|
28
|
+
this.item.additionalusp ? (h("small", { slot: "additionalUSP" },
|
|
29
|
+
h("p", null, this.item.additionalusp))) : null,
|
|
30
|
+
this.item.maximummeasurements ? (h("pn-product-card-info", { label: state.i18n.maxmeasurementlabel, text: this.item.maximummeasurements })) : null,
|
|
31
|
+
this.item.paket ? (h("pn-product-card-info", { paket: this.item.paket, rulle: this.item.rulle })) : null,
|
|
32
|
+
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,
|
|
33
|
+
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,
|
|
34
|
+
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)));
|
|
35
|
+
}
|
|
36
|
+
static get is() { return "pn-find-price-result"; }
|
|
37
|
+
static get originalStyleUrls() { return {
|
|
38
|
+
"$": ["pn-find-price-result.scss"]
|
|
39
|
+
}; }
|
|
40
|
+
static get styleUrls() { return {
|
|
41
|
+
"$": ["pn-find-price-result.css"]
|
|
42
|
+
}; }
|
|
43
|
+
static get properties() { return {
|
|
44
|
+
"item": {
|
|
45
|
+
"type": "unknown",
|
|
46
|
+
"mutable": true,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "ProductPriceItm",
|
|
49
|
+
"resolved": "ProductPriceItm",
|
|
50
|
+
"references": {
|
|
51
|
+
"ProductPriceItm": {
|
|
52
|
+
"location": "import",
|
|
53
|
+
"path": "./pn-find-price-types"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": ""
|
|
62
|
+
},
|
|
63
|
+
"defaultValue": "null"
|
|
64
|
+
},
|
|
65
|
+
"shownitems": {
|
|
66
|
+
"type": "unknown",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "ProductPriceItm[]",
|
|
70
|
+
"resolved": "ProductPriceItm[]",
|
|
71
|
+
"references": {
|
|
72
|
+
"ProductPriceItm": {
|
|
73
|
+
"location": "import",
|
|
74
|
+
"path": "./pn-find-price-types"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": ""
|
|
83
|
+
},
|
|
84
|
+
"defaultValue": "[]"
|
|
85
|
+
}
|
|
86
|
+
}; }
|
|
87
|
+
static get states() { return {
|
|
88
|
+
"weightText": {}
|
|
89
|
+
}; }
|
|
90
|
+
static get watchers() { return [{
|
|
91
|
+
"propName": "item",
|
|
92
|
+
"methodName": "composeItems"
|
|
93
|
+
}]; }
|
|
94
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createStore } from "@stencil/store";
|
|
2
|
+
// Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
|
|
3
|
+
const { state, onChange } = createStore({
|
|
4
|
+
i18n: {
|
|
5
|
+
componentheading: '',
|
|
6
|
+
deliveryscopeheading: '',
|
|
7
|
+
sizeheading: '',
|
|
8
|
+
resultlistheading: '',
|
|
9
|
+
weightlabel: '',
|
|
10
|
+
maxweightlabel: '',
|
|
11
|
+
maxmeasurementlabel: '',
|
|
12
|
+
senddirectcta: '',
|
|
13
|
+
stampshopcta: '',
|
|
14
|
+
message: ''
|
|
15
|
+
},
|
|
16
|
+
market: {
|
|
17
|
+
currency: ""
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export { state, onChange };
|
|
21
|
+
export default state;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export const translations = {
|
|
2
|
+
'sv': {
|
|
3
|
+
'componentheading': 'Vad vill du skicka?',
|
|
4
|
+
'deliveryscopeheading': 'Endast leveranser inom Sverige',
|
|
5
|
+
'sizeheading': 'Hur mycket väger det?',
|
|
6
|
+
'resultlistheading': 'Några utvalda val',
|
|
7
|
+
'weightlabel': 'Vikt',
|
|
8
|
+
'maxweightlabel': 'Maxvikt',
|
|
9
|
+
'maxmeasurementlabel': 'Maxvolym',
|
|
10
|
+
'senddirectcta': 'Köp portokod online',
|
|
11
|
+
'stampshopcta': 'Beställ fysiska frimärken',
|
|
12
|
+
'message': '*Vid köp hos valfritt ombud'
|
|
13
|
+
},
|
|
14
|
+
'en': {
|
|
15
|
+
'componentheading': 'What do you want to send?',
|
|
16
|
+
'deliveryscopeheading': 'Deliveries within Sweden only',
|
|
17
|
+
'sizeheading': 'How much does it weigh?',
|
|
18
|
+
'resultlistheading': 'Some suitable options for you',
|
|
19
|
+
'weightlabel': 'Weight',
|
|
20
|
+
'maxweightlabel': 'Max weight',
|
|
21
|
+
'maxmeasurementlabel': 'Maximum measurement',
|
|
22
|
+
'senddirectcta': 'Buy postcode online',
|
|
23
|
+
'stampshopcta': 'Order physical stamps',
|
|
24
|
+
'message': 'When buying from any agent'
|
|
25
|
+
},
|
|
26
|
+
'da': {
|
|
27
|
+
'componentheading': 'Vad vill du skicka?',
|
|
28
|
+
'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
|
|
29
|
+
'sizeheading': 'How much does it weigh?',
|
|
30
|
+
'resultlistheading': 'Some suitable options for you',
|
|
31
|
+
'weightlabel': 'Vægt',
|
|
32
|
+
'maxweightlabel': 'Max vægt',
|
|
33
|
+
'maxmeasurementlabel': 'Maks. Volumen',
|
|
34
|
+
'senddirectcta': 'Buy shipping in Send Direct',
|
|
35
|
+
'stampshopcta': 'Order home stamps from the webshop',
|
|
36
|
+
},
|
|
37
|
+
'no': {
|
|
38
|
+
'componentheading': 'Vad vill du skicka?',
|
|
39
|
+
'deliveryscopeheading': 'Kun leveranser innen Sverige',
|
|
40
|
+
'sizeheading': 'How much does it weigh?',
|
|
41
|
+
'resultlistheading': 'Some suitable options for you',
|
|
42
|
+
'weightlabel': 'Vekt',
|
|
43
|
+
'maxweightlabel': 'Maks vekt',
|
|
44
|
+
'maxmeasurementlabel': 'Maks volum',
|
|
45
|
+
'senddirectcta': 'Buy shipping in Send Direct',
|
|
46
|
+
'stampshopcta': 'Order home stamps from the webshop',
|
|
47
|
+
},
|
|
48
|
+
'fi': {
|
|
49
|
+
'componentheading': 'Vad vill du skicka?',
|
|
50
|
+
'deliveryscopeheading': 'Toimitukset vain Ruotsin sisällä',
|
|
51
|
+
'sizeheading': 'How much does it weigh?',
|
|
52
|
+
'resultlistheading': 'Some suitable options for you',
|
|
53
|
+
'weightlabel': 'Paino',
|
|
54
|
+
'maxweightlabel': 'Max paino',
|
|
55
|
+
'maxmeasurementlabel': 'Max äänenvoimakkuus',
|
|
56
|
+
'senddirectcta': 'Buy shipping in Send Direct',
|
|
57
|
+
'stampshopcta': 'Order home stamps from the webshop',
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export const markets = {
|
|
61
|
+
'se': {
|
|
62
|
+
"currency": "kr",
|
|
63
|
+
},
|
|
64
|
+
'dk': {
|
|
65
|
+
"currency": "dk",
|
|
66
|
+
},
|
|
67
|
+
'fi': {
|
|
68
|
+
"currency": " €",
|
|
69
|
+
},
|
|
70
|
+
'no': {
|
|
71
|
+
"currency": "kr",
|
|
72
|
+
}
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
pn-find-price .findprice-form {
|
|
2
|
+
max-width: 50em;
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
}
|
|
5
|
+
pn-find-price h2,
|
|
6
|
+
pn-find-price .heading {
|
|
7
|
+
text-align: center;
|
|
8
|
+
font-size: 1.5em;
|
|
9
|
+
line-height: 1.1;
|
|
10
|
+
font-weight: bold;
|
|
11
|
+
margin-bottom: 1rem;
|
|
12
|
+
}
|
|
13
|
+
pn-find-price .sizecategory {
|
|
14
|
+
text-align: center;
|
|
15
|
+
margin-bottom: 3rem;
|
|
16
|
+
font-size: 0.9em;
|
|
17
|
+
}
|
|
18
|
+
pn-find-price .weightoption {
|
|
19
|
+
display: flex;
|
|
20
|
+
gap: 1em;
|
|
21
|
+
}
|
|
22
|
+
pn-find-price .weightoption-input {
|
|
23
|
+
width: 5em;
|
|
24
|
+
position: relative;
|
|
25
|
+
}
|
|
26
|
+
pn-find-price .weightoption-input input::-webkit-outer-spin-button,
|
|
27
|
+
pn-find-price .weightoption-input input::-webkit-inner-spin-button {
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
pn-find-price .weightoption-input-abbreviation {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 50%;
|
|
34
|
+
transform: translateY(-50%);
|
|
35
|
+
right: 1.2em;
|
|
36
|
+
margin-top: 1.55rem;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
}
|
|
39
|
+
pn-find-price .weightoption-range {
|
|
40
|
+
flex-grow: 1;
|
|
41
|
+
align-self: flex-end;
|
|
42
|
+
position: relative;
|
|
43
|
+
top: 0.5em;
|
|
44
|
+
}
|
|
45
|
+
pn-find-price .weightoption-range input {
|
|
46
|
+
width: calc(100% - 1.5em);
|
|
47
|
+
}
|
|
48
|
+
pn-find-price .weightoption-range datalist {
|
|
49
|
+
width: 100%;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
font-size: 0.75em;
|
|
53
|
+
}
|
|
54
|
+
pn-find-price .resultlist {
|
|
55
|
+
margin: 3em 0;
|
|
56
|
+
}
|