@postnord/pn-marketweb-components 2.0.10 → 2.0.14
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/{FetchHelper-33d3c535.js → FetchHelper-c6cee722.js} +44 -3
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +2 -2
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +1 -1
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +2 -2
- package/cjs/{pn-product-card_3.cjs.entry.js → pn-product-card_4.cjs.entry.js} +19 -1
- package/cjs/pn-product-pricelist-result.cjs.entry.js +2 -2
- package/collection/collection-manifest.json +1 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +3 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +32 -4
- package/collection/components/minor/pn-titletag/pn-titletag.css +19 -0
- package/collection/components/minor/pn-titletag/pn-titletag.js +60 -0
- package/collection/components/minor/pn-titletag/title-tag.stories.js +24 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +3 -7
- package/collection/components/widgets/pn-product-card/pn-product-card.css +25 -46
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +2 -6
- package/collection/globals/MarketWebContextService.js +44 -3
- package/custom-elements/index.d.ts +6 -0
- package/custom-elements/index.js +72 -11
- package/esm/{FetchHelper-aa15fc6b.js → FetchHelper-1dfe8514.js} +44 -3
- package/esm/loader.js +1 -1
- package/esm/pn-find-price-result.entry.js +2 -2
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm/pn-marketweb-siteheader.entry.js +2 -2
- package/esm/{pn-product-card_3.entry.js → pn-product-card_4.entry.js} +20 -3
- package/esm/pn-product-pricelist-result.entry.js +2 -2
- package/esm-es5/FetchHelper-1dfe8514.js +1 -0
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_4.entry.js +1 -0
- package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-0780aaab.system.entry.js +1 -0
- package/pn-market-web-components/p-17c4004f.entry.js +1 -0
- package/pn-market-web-components/{p-2cdede77.system.entry.js → p-32dce26f.system.entry.js} +1 -1
- package/pn-market-web-components/{p-0351965d.system.entry.js → p-3a4b70d1.system.entry.js} +1 -1
- package/pn-market-web-components/p-6174a610.system.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-723b9901.system.entry.js +1 -0
- package/pn-market-web-components/p-96491220.entry.js +1 -0
- package/pn-market-web-components/p-99c929aa.system.entry.js +1 -0
- package/pn-market-web-components/p-adfb38e0.entry.js +1 -0
- package/pn-market-web-components/p-ea39d576.entry.js +1 -0
- package/pn-market-web-components/p-f0f58646.js +1 -0
- package/pn-market-web-components/{p-45735570.entry.js → p-f18674eb.entry.js} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/minor/pn-titletag/pn-titletag.d.ts +8 -0
- package/types/components.d.ts +29 -0
- package/types/globals/MarketWebContextService.d.ts +31 -0
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/umd/standalone-loader-salesforce.js +5 -11
- package/esm-es5/FetchHelper-aa15fc6b.js +0 -1
- package/esm-es5/pn-product-card_3.entry.js +0 -1
- package/pn-market-web-components/p-1ecf47ed.entry.js +0 -1
- package/pn-market-web-components/p-2a624d21.entry.js +0 -1
- package/pn-market-web-components/p-2a695f6f.js +0 -1
- package/pn-market-web-components/p-6f556e76.system.entry.js +0 -1
- package/pn-market-web-components/p-ae775ba5.system.entry.js +0 -1
- package/pn-market-web-components/p-b2840380.entry.js +0 -1
- package/pn-market-web-components/p-c2fada23.entry.js +0 -1
- package/pn-market-web-components/p-d437da74.system.js +0 -1
- package/pn-market-web-components/p-e7f8da0b.system.entry.js +0 -1
|
@@ -15,8 +15,8 @@ let PnfindPriceResult = class {
|
|
|
15
15
|
this.weightText = "";
|
|
16
16
|
this.linkId = '';
|
|
17
17
|
this.usp = {
|
|
18
|
-
Billigast: h("
|
|
19
|
-
Snabbast: h("
|
|
18
|
+
Billigast: h("pn-titletag", { slot: "Billigast", icon: "box-label" }, this.item.highestrankusp),
|
|
19
|
+
Snabbast: h("pn-titletag", { slot: "Snabbast", icon: "box-label", color: "blue700" }, this.item.highestrankusp)
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
componentWillLoad() {
|
|
@@ -53,5 +53,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
patchBrowser().then(options => {
|
|
56
|
-
return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[4,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["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-product-pricelist-result",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[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-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-filter-checkbox",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["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-product-
|
|
56
|
+
return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[4,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["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-product-pricelist-result",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[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-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-filter-checkbox",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["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-product-card_4",[[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1],"service":[1],"linkid":[1]}],[4,"pn-titletag",{"icon":[1],"color":[1537]}],[4,"pn-product-card"]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-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-marketweb-input",[[0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"usp":[16],"weightText":[32],"linkId":[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{"url":[1],"linktitle":[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-tile-info_2",[[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[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],"fullname":[1],"loggedin":[4],"loginManager":[32],"toggleButtonText":[32],"username":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"search":[1040],"primary":[4],"autoCompleteOptions":[32]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]]], options);
|
|
57
57
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-5397620b.js';
|
|
2
|
-
import { F as FetchHelper, M as MarketWebContextService } from './FetchHelper-
|
|
2
|
+
import { F as FetchHelper, M as MarketWebContextService } from './FetchHelper-1dfe8514.js';
|
|
3
3
|
|
|
4
4
|
const translations = {
|
|
5
5
|
'sv': {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, a as Host, g as getElement } from './index-5397620b.js';
|
|
2
|
-
import { F as FetchHelper, M as MarketWebContextService } from './FetchHelper-
|
|
2
|
+
import { F as FetchHelper, M as MarketWebContextService } from './FetchHelper-1dfe8514.js';
|
|
3
3
|
import { M as MarketWebLoginManager } from './MarketWebLoginManager-8fef95d2.js';
|
|
4
4
|
|
|
5
5
|
const translations = {
|
|
@@ -299,7 +299,7 @@ let PnMarketwebSiteheader = class {
|
|
|
299
299
|
var _a, _b, _c, _d, _e, _f;
|
|
300
300
|
return (h(Host, { language: this.language, market: this.market, environment: this.environment }, h("header", null, h("div", { class: "siteheader-row" }, h("div", { class: "siteheader-topleft" }, h("slot", { name: "topleft" }), (this.gotData && this.siteSelector && !this.hideSiteSelector) &&
|
|
301
301
|
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
|
-
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) => h("pn-site-selector-item", { heading: site.linkText + ' ', description: site.linkDescription, url: this.adjustSiteSelectorUrl(site.href), newwindow: site.openInNewWindow })))), h("div", { class: "siteheader-logocontainer" }, h("a", { href: this.homePageLink, title: "Home", class: "siteheader-logolink" }, h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65" }, h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "#00A0D6", transform: "translate(0 0)" })))), h("div", { class: "siteheader-topright" }, h("slot", { name: "toprightstart" }), (this.gotData && this.loginDialog && !this.hideLogin) && (h("pn-marketweb-siteheader-login", { token: this.userToken, fullname: this.userFullname, loggedin: this.userLoggedin, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
302
|
+
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) => h("pn-site-selector-item", { heading: site.linkText + ' ', description: site.linkDescription, url: this.adjustSiteSelectorUrl(site.href), newwindow: site.openInNewWindow })))), h("div", { class: "siteheader-logocontainer" }, h("a", { href: this.homePageLink, title: "Home", class: "siteheader-logolink" }, h("slot", { name: "logo" }, h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65" }, h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "#00A0D6", transform: "translate(0 0)" }))))), h("div", { class: "siteheader-topright" }, h("slot", { name: "toprightstart" }), (this.gotData && this.loginDialog && !this.hideLogin) && (h("pn-marketweb-siteheader-login", { token: this.userToken, fullname: this.userFullname, loggedin: this.userLoggedin, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
303
303
|
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) }))), h("slot", { name: "toprightend" }))), h("div", { class: "siteheader-row" }, h("div", { class: "siteheader-menu" }, (this.gotData && this.menuItems) && (h("pn-mainnav", { market: this.market, language: this.language, onMenuOpenChange: (e) => {
|
|
304
304
|
document.body.setAttribute("data-siteheader-menuopen", (e.detail + ''));
|
|
305
305
|
} }, h("pn-mainnav-level", null, h("pn-mainnav-list", null, this.menuItems.map((item) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as Host } from './index-5397620b.js';
|
|
1
|
+
import { r as registerInstance, h, a as Host, g as getElement } from './index-5397620b.js';
|
|
2
2
|
|
|
3
|
-
const pnProductCardCss = "pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:\"\" !important}pn-product-card [slot=title]
|
|
3
|
+
const pnProductCardCss = "pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:\"\" !important}pn-product-card [slot=title] [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=title] [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=title] [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=title] [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card [slot=title]>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card [slot=title]>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card [slot=title]>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card [slot=title] .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card [slot=title] .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=title] [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:0.6em;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=title] [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=title] [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=title] [slot=mobiledownload]{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card [slot=title] [slot=mobiledownload] #riktiga{-ms-flex-order:4;order:4;margin-top:1em}pn-product-card [slot=title] [slot=mobiledownload] #riktiga>div>a::after{content:\"\" !important}pn-product-card [slot=title] [slot=mobiledownload] .riktigaAndroidImg{width:6em;margin:0.5em}pn-product-card [slot=title] [slot=mobiledownload] .riktigaAppleImg{width:5.6em;margin:0.5em}pn-product-card [slot=title] [slot=mobiledownload] a{text-decoration:none;color:#005D92}pn-product-card [slot=title] [slot=mobiledownload] a h3{text-decoration:underline}pn-product-card [slot=title] [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:2;flex-grow:2;-ms-flex-align:end;align-items:flex-end;text-align:center}@media screen and (min-width: 36em){pn-product-card [slot=title] [slot=servicepoint]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=title] [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=title] .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 [slot=title] .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card [slot=title] .info>*{min-width:6em;margin:0.5em 1em 0.5em 0}";
|
|
4
4
|
|
|
5
5
|
let PnProductCard = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -45,4 +45,21 @@ let PnProductCardPrice = class {
|
|
|
45
45
|
};
|
|
46
46
|
PnProductCardPrice.style = pnProductCardPriceCss;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const pnTitletagCss = "pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700]{background:#E0F8FF;color:#005D92}";
|
|
49
|
+
|
|
50
|
+
let PnTiletag = class {
|
|
51
|
+
constructor(hostRef) {
|
|
52
|
+
registerInstance(this, hostRef);
|
|
53
|
+
/** Icon of the tag */
|
|
54
|
+
this.icon = null;
|
|
55
|
+
/** Icon of the tag */
|
|
56
|
+
this.color = "green700";
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
return (h(Host, null, h("slot", null), this.icon ? (h("pn-icon", { symbol: this.icon, small: "false", color: this.color })) : null));
|
|
60
|
+
}
|
|
61
|
+
get hostElement() { return getElement(this); }
|
|
62
|
+
};
|
|
63
|
+
PnTiletag.style = pnTitletagCss;
|
|
64
|
+
|
|
65
|
+
export { PnProductCard as pn_product_card, PnProductCardInfo as pn_product_card_info, PnProductCardPrice as pn_product_card_price, PnTiletag as pn_titletag };
|
|
@@ -53,8 +53,8 @@ let PnFindProductPricelistResult = class {
|
|
|
53
53
|
render() {
|
|
54
54
|
return (h(Host, null, this.shownitems.map((item) => (h("pn-product-card", { "data-productid": item.id }, h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), h("div", { slot: "title" }, h("h2", null, item.name, " "), (this.item.highestrankusp) ?
|
|
55
55
|
(this.item.highestrankusp === "Billigast") ?
|
|
56
|
-
(h("
|
|
57
|
-
: (h("
|
|
56
|
+
(h("pn-titletag", { slot: "Billigast", icon: "box-label" }, this.item.highestrankusp))
|
|
57
|
+
: (h("pn-titletag", { slot: "Snabbast", icon: "bolt", color: "blue700" }, this.item.highestrankusp)) : null), h("div", { slot: "content" }, h("div", { class: "content" }, (this.item.description) ? (h("div", { class: "description" }, this.description.map((desc) => (h("li", null, desc))))) : 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("div", { slot: "additionalUSP" })) : null, this.showMeasurement ? (h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (h("pn-product-card-price", { slot: "sendDirectPrice", label: state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: state.market.currency, url: sendDirectUrl, service: this.item.name + "-portal" })) : null, this.item.pricestamps ? (h("pn-product-card-price", { slot: "stampPrice", label: state.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: state.market.currency, url: stampShopUrl, service: this.item.name + "-eshop" })) : null))
|
|
58
58
|
// <pn-product-tile>
|
|
59
59
|
// <pn-illustration slot="illustration" illustration={ item.illustration }></pn-illustration>
|
|
60
60
|
// <div slot="content">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{u(r.next(t))}catch(e){i(e)}}function s(t){try{u(r["throw"](t))}catch(e){i(e)}}function u(t){t.done?n(t.value):o(t.value).then(a,s)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var MarketWebContextService=function(){function t(t){if(t===void 0){t=window.location.href}this.href="";this.market="";this.language="";this.environment="";this.url=null;this.allowedLanguages=["sv","da","fi","no","en","de"];this.allowedMarkets=["se","dk","fi","no","com","de","tpl"];this.wwwMarkets=["se","dk","fi","no","de","com"];this.developmentDomains=["localhost",".local","local.",".dev","dev."];this.markets={se:{fallbackLanguage:"sv",integration:"se-integration.postnord.com",preproduction:"se-preproduction.postnord.com",production:"se-production.postnord.com",live:"www.postnord.se"},dk:{fallbackLanguage:"da",integration:"dk-integration.postnord.com",preproduction:"dk-preproduction.postnord.com",production:"dk-production.postnord.com",live:"www.postnord.dk"},fi:{fallbackLanguage:"fi",integration:"fi-integration.postnord.com",preproduction:"fi-preproduction.postnord.com",production:"fi-production.postnord.com",live:"www.postnord.fi"},no:{fallbackLanguage:"no",integration:"no-integration.postnord.com",preproduction:"no-preproduction.postnord.com",production:"no-production.postnord.com",live:"www.postnord.no"},com:{fallbackLanguage:"en",integration:"com-integration.postnord.com",preproduction:"com-preproduction.postnord.com",production:"com-production.postnord.com",live:"www.postnord.com"},de:{fallbackLanguage:"en",integration:"de-integration.postnord.com",preproduction:"de-preproduction.postnord.com",production:"de-production.postnord.com",live:"www.postnord.de"},tpl:{fallbackLanguage:"sv",integration:"tpl-integration.postnord.com",preproduction:"tpl-preproduction.postnord.com",production:"tpl-production.postnord.com",live:"tpl.postnord.com"}};this.environmentTypes=["integration","preproduction","production"];this.environments={production:{name:"production",url:"https://www.postnord.xx/"},preproduction:{name:"preproduction",url:"https://com-preproduction.postnord.com/"},integration:{name:"integration",url:"https://com-integration.postnord.com/"}};this.href=t;this.url=new URL(this.href)}t.prototype.getLanguage=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.language){return[2,this.language]}return[4,this.resolveLanguage()];case 1:t.sent();return[2,this.language]}}))}))};t.prototype.getMarket=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.market){return[2,this.market]}return[4,this.resolveMarket()];case 1:t.sent();return[2,this.market]}}))}))};t.prototype.getEndpoint=function(t,e){if(e===void 0){e=""}return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=this.environments.production.url;if(this.markets[e]&&this.markets[e][t]){if(t==="production"&&window.location.hostname.indexOf(this.markets[e]["live"])===0){return[2,"https://"+this.markets[e]["live"]]}if(window.location.hostname.indexOf(this.markets[e][t])===0){return[2,"https://"+this.markets[e][t]]}}if(this.environments[t]){n=this.environments[t].url;if(t===this.environments.production.name){if(this.wwwMarkets.indexOf(e)!==-1){n=n.replace(".xx","."+e)}else{n=n.replace(".xx",".com");n=n.replace("www.",e+".")}}}return[2,n]}))}))};t.prototype.getEnvironmentName=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(n){t=this.environmentTypes.filter((function(t){return e.url.hostname.indexOf("-"+t)!==-1}))[0];if(t){this.environment=t;return[2,this.environment]}if(this.url.hostname.indexOf("www.")!==-1){this.environment=this.environments.production.name;return[2,this.environment]}this.environment=this.environments.integration.name;return[2,this.environment]}))}))};t.prototype.isDevEnvironment=function(){var t=this;var e=this.developmentDomains.filter((function(e){return t.url.hostname.indexOf(e)!==-1}))[0];return e.length>0};t.prototype.resolveMarket=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o,i,a,s,u,c;var l=this;return __generator(this,(function(f){if(this.href.indexOf("//www.")!==-1){t=this.url.hostname.substring(this.url.hostname.lastIndexOf(".")+1,this.url.hostname.length);if(t&&this.markets[t]){this.market=t}else{console.warn("Unable to define market from www. domain",this.href)}}e=this.environmentTypes.filter((function(t){return l.url.hostname.indexOf("-"+t)!==-1}));if(!this.market&&e&&e.length>0){n=e[0];r=this.url.hostname.substring(0,this.url.hostname.indexOf("-"+n));if(r&&this.markets[r]){this.market=r}else{console.warn("Unable to define market from preset environment names",this.href)}}if(!this.market){if(this.url.hostname.indexOf("www")===-1&&this.url.hostname.indexOf(".postnord.")>0){o=this.url.hostname.indexOf(".")!==this.url.hostname.indexOf(".postnord")?this.url.hostname.indexOf("."):0;i=this.url.hostname.substring(o,this.url.hostname.indexOf(".postnord."));if(this.allowedMarkets.indexOf(i)!==-1){this.market=i;return[2]}}}if(!this.market){a=this.developmentDomains.filter((function(t){return l.url.hostname.indexOf(t)!==-1}))[0];if(!a){this.market=this.allowedMarkets[0];return[2]}s=this.href.replace(a,"");u=this.allowedMarkets.filter((function(t){var e=["."+t,t+".","/"+t+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(u){this.market=u}else{c=Object.entries(this.markets).filter((function(t){var e=["."+t[1].fallbackLanguage,t[1].fallbackLanguage+".","/"+t[1].fallbackLanguage+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(c&&c[0]){this.market=c[0]}}}if(!this.market){console.info("Was unable to detect market, used fallback");this.market=this.allowedMarkets[0]}return[2]}))}))};t.prototype.resolveLanguage=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o;var i=this;return __generator(this,(function(a){if(this.language){return[2]}o=[(t=document.querySelector("html[lang]"))===null||t===void 0?void 0:t.getAttribute("lang"),(e=document.querySelector('[http-equiv="content-language"][content]'))===null||e===void 0?void 0:e.getAttribute("content"),(n=document.querySelector('[property="og:locale"][content]'))===null||n===void 0?void 0:n.getAttribute("content"),(r=document.querySelector("[lang]"))===null||r===void 0?void 0:r.getAttribute("lang")];o.filter((function(t){return t})).forEach((function(t){if(i.allowedLanguages.indexOf(t)){i.language=t;return}}));if(!this.language&&this.market){this.language=this.markets[this.market].fallbackLanguage}return[2]}))}))};return t}();var FetchHelper=function(){function t(t){var e=this;if(t===void 0){t=""}this.storagePrefix="";this.store={get:function(t,n){if(n===void 0){n=false}var r=n?window.localStorage:window.sessionStorage;var o=n?window.sessionStorage:window.localStorage;var i=r.getItem("".concat(e.storagePrefix,"-").concat(t));if(!i){i=o.getItem("".concat(e.storagePrefix,"-").concat(t))}if(!i){return i}if(i.indexOf("{")===0){try{return JSON.parse(i)}catch(a){}}if(i.indexOf(",")!==-1){return i.split(",")}return i},set:function(t,n,r){if(r===void 0){r=false}var o=r?window.localStorage:window.sessionStorage;if(typeof n==="object"&&typeof n.length==="undefined"){o.setItem("".concat(e.storagePrefix,"-").concat(t),JSON.stringify(n));return}o.setItem("".concat(e.storagePrefix,"-").concat(t),n)},remove:function(t){window.sessionStorage.removeItem("".concat(e.storagePrefix,"-").concat(t))}};this.storagePrefix=t}t.prototype.fetchJson=function(t,e,n,r){if(e===void 0){e={}}if(n===void 0){n=false}if(r===void 0){r=null}return __awaiter(this,void 0,void 0,(function(){var o;var i=this;return __generator(this,(function(a){o=new Promise((function(o){return __awaiter(i,void 0,void 0,(function(){var i,a,s,u,c,l;return __generator(this,(function(f){switch(f.label){case 0:i=true;a=typeof t==="string"?t:t.url;s=a;u=null;c=null;if(n){c=this.store.get(s);if(c&&!c.permanent){i=false}if(c&&c.data){u=c.data;o(u)}}if(!i)return[3,3];return[4,window.fetch(t,e)];case 1:l=f.sent();return[4,l.json()];case 2:u=f.sent();o(u);if(n){if(typeof r==="function"&&c!=null){r(u)}this.store.set(s,this.wrapJson(u,true),true);this.store.set(s,this.wrapJson(u,false),false)}f.label=3;case 3:return[2]}}))}))}));return[2,o]}))}))};t.prototype.wrapJson=function(t,e){if(e===void 0){e=false}var n=new Date;return{timestamp:n.getTime(),time:n.toISOString(),data:t,permanent:e}};return t}();export{FetchHelper as F,MarketWebContextService as M};
|
package/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-5397620b.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],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[4,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["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-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[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-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-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{name:[1],identifier:[1],url:[1]}]]],["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-product-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-5397620b.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],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[4,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["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-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[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-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-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{name:[1],identifier:[1],url:[1]}]]],["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-product-card_4",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-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-marketweb-input",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],usp:[16],weightText:[32],linkId:[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{url:[1],linktitle:[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-tile-info_2",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[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],fullname:[1],loggedin:[4],loginManager:[32],toggleButtonText:[32],username:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],n)}))};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{s as state}from"./pn-find-price-store-625a6d87.js";import{a as sendDirectUrl,b as stampShopUrl,R as RiktigaValues}from"./data-f0ac26a9.js";import"./index-7b21ecff.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.description=[];this.showMeasurement=false;this.weightText="";this.linkId="";this.usp={Billigast:h("
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{s as state}from"./pn-find-price-store-625a6d87.js";import{a as sendDirectUrl,b as stampShopUrl,R as RiktigaValues}from"./data-f0ac26a9.js";import"./index-7b21ecff.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.description=[];this.showMeasurement=false;this.weightText="";this.linkId="";this.usp={Billigast:h("pn-titletag",{slot:"Billigast",icon:"box-label"},this.item.highestrankusp),Snabbast:h("pn-titletag",{slot:"Snabbast",icon:"box-label",color:"blue700"},this.item.highestrankusp)}}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){if(this.item.additionalusp){var t=this.item.additionalusp.split("/");this.Usp1=t.length>0?t[0]:null;this.Usp2=t.length>1?t[1]:null;this.Usp3=t.length>2?t[2]:null}if(this.item.description){this.description=this.item.description.split("#bullet").filter((function(t){return t!==""}))}this.showMeasurement=this.item.maxmått!==null||this.item.rulle!==null;this.linkId="".concat(this.item.id,"-").concat(this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g,""))};t.prototype.render=function(){return h(Host,null,h("pn-product-card",{"data-productid":this.item.id},h("pn-illustration",{slot:"illustration",illustration:this.item.illustration}),h("div",{slot:"title"},this.item.infopagelink?h("h2",null,h("a",{href:this.item.infopagelink,target:"_blank"},this.item.name)):h("h2",null,this.item.name),this.usp[this.item.highestrankusp]),h("div",{slot:"content"},h("div",{class:"content"},this.item.description?h("div",{class:"description"},this.description.map((function(t){return h("li",null,t)}))):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("div",{slot:"additionalUSP"},this.Usp1?h("span",null,this.Usp1):null,this.Usp2?h("span",null,this.Usp2):null,this.Usp3?h("span",null,this.Usp3):null):null,this.showMeasurement?h("pn-product-card-info",{paket:this.item.maxmått,rulle:this.item.rulle}):null,h("div",{slot:"cardprice"},this.item.pricesenddirect?h("pn-product-card-price",{slot:"sendDirectPrice",label:state.i18n.senddirectcta,amount:this.item.pricesenddirect+"",currency:state.market.currency,url:sendDirectUrl,linkid:this.linkId+"-portal"}):null,this.item.pricestamps?this.item.name.toLocaleLowerCase()!=="riktiga vykort"?h("pn-product-card-price",{slot:"stampPrice",label:state.i18n.stampshopcta,amount:this.item.pricestamps+"",currency:state.market.currency,url:stampShopUrl,linkid:this.linkId+"-stampshop"}):h("pn-product-card-price",{slot:"riktiga",label:state.i18n.riktigaVykort,amount:this.item.pricestamps+"",currency:state.market.currency,url:RiktigaValues["WebUrl"],linkid:this.linkId+"-riktiga"}):null),h("div",{slot:"servicepoint"},this.item.showservicepointlink?h("a",{href:state.market.servicePoint,target:"_blank"},h("pn-icon",{symbol:"map-marker",color:"blue700"}),state.i18n.servicePointLink):null),h("div",{slot:"mobiledownload"},this.item.name.toLocaleLowerCase()==="riktiga vykort"?h("div",{id:"riktiga"},h("h4",null,state.i18n.riktigaVykortMobile),h("div",null,h("a",{href:RiktigaValues["AndroidAppUrl"],target:"_blank"},h("img",{class:"riktigaAndroidImg",src:RiktigaValues["AndroidImg"]})),h("a",{href:RiktigaValues["IosAppUrl"],target:"_blank"},h("img",{class:"riktigaAppleImg",src:RiktigaValues["IosImg"]})))):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{d as doc,N as NAMESPACE,w as win,p as promiseResolve,H,b as bootstrapLazy}from"./index-5397620b.js";var patchBrowser=function(){{patchCloneNodeFix(H.prototype)}var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(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 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}};patchBrowser().then((function(e){return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[4,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["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-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[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-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-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{name:[1],identifier:[1],url:[1]}]]],["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-product-
|
|
1
|
+
import{d as doc,N as NAMESPACE,w as win,p as promiseResolve,H,b as bootstrapLazy}from"./index-5397620b.js";var patchBrowser=function(){{patchCloneNodeFix(H.prototype)}var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(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 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}};patchBrowser().then((function(e){return bootstrapLazy([["pn-marketweb-siteheader",[[4,"pn-marketweb-siteheader",{market:[1537],language:[1537],environment:[1537],userToken:[1,"user-token"],userFullname:[1,"user-fullname"],userLoggedin:[4,"user-loggedin"],endpoint:[1],hideSiteSelector:[1540,"hide-site-selector"],hideLanguageSelector:[1540,"hide-language-selector"],hideSearch:[1540,"hide-search"],hideLogin:[1540,"hide-login"],AutocompleteEndpoint:[1,"autocomplete-endpoint"],sessionForward:[4,"session-forward"],cache:[4],spaMode:[4,"spa-mode"],i18n:[32],gotData:[32],fetchingData:[32],homePageLink:[32],menuItems:[32],siteDefinition:[32],search:[32],siteSelector:[32],languageSelector:[32],languageOptions:[32],loginDialog:[32],minimizeSearch:[32],loggedIn:[32],loginManager:[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["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-product-pricelist-result",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[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-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-filter-checkbox",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search",[[1,"pn-marketweb-search",{disabled:[4],placeholder:[1],inputid:[1],name:[1],autocomplete:[1],list:[1],value:[1],label:[1],loading:[4],button:[1],light:[4],suggestionObserver:[32],hasClonedInput:[32],listSuggestion:[32]},[[0,"input","inputHandler"]]]]],["pn-product-tile",[[4,"pn-product-tile"]]],["pn-profile-selector",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["pn-profile-selector-option",[[0,"pn-profile-selector-option",{name:[1],identifier:[1],url:[1]}]]],["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-product-card_4",[[0,"pn-product-card-info",{rulle:[1],paket:[1],label:[1],text:[1]}],[0,"pn-product-card-price",{label:[1],amount:[1],currency:[1],note:[1],url:[1],service:[1],linkid:[1]}],[4,"pn-titletag",{icon:[1],color:[1537]}],[4,"pn-product-card"]]],["pn-find-service-and-price-result",[[0,"pn-find-service-and-price-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-marketweb-input",[[0,"pn-marketweb-input",{disabled:[4],error:[1],invalid:[4],helpertext:[1],label:[1],placeholder:[1],inputid:[1],name:[1],required:[4],type:[1025],autocomplete:[1],valid:[4],value:[1],maxlength:[1],min:[1],max:[1],step:[1],pattern:[1],showText:[32]}]]],["pn-find-price-result",[[0,"pn-find-price-result",{item:[1040],shownitems:[16],Usp1:[1,"usp-1"],Usp2:[1,"usp-2"],Usp3:[1,"usp-3"],description:[16],showMeasurement:[4,"show-measurement"],usp:[16],weightText:[32],linkId:[32]}]]],["pn-site-footer_2",[[4,"pn-site-footer",{url:[1],linktitle:[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-tile-info_2",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[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],fullname:[1],loggedin:[4],loginManager:[32],toggleButtonText:[32],username:[32]}],[0,"pn-marketweb-siteheader-search",{i18n:[8,"i-1-8n"],showOnlyLink:[1028,"show-only-link"],hideSearch:[1028,"hide-search"],language:[1537],search:[1040],primary:[4],autoCompleteOptions:[32]}],[4,"pn-site-selector",{buttontext:[1537],heading:[1537],language:[1537],i18n:[32]}],[0,"pn-site-selector-item",{url:[1],heading:[1],description:[1],newwindow:[4]}]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function o(t){try{l(i.next(t))}catch(e){a(e)}}function s(t){try{l(i["throw"](t))}catch(e){a(e)}}function l(t){t.done?n(t.value):r(t.value).then(o,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(a=o[0]&2?r["return"]:o[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;if(r=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;r=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=e.call(t,n)}catch(s){o=[6,s];r=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-aa15fc6b.js";var translations={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa"}};var pnMarketwebSitefooterCss="";var PnMarketwebSiteheader=function(){function t(t){registerInstance(this,t);this.endpointPath="/api/footer/footer";this.market="se";this.language="sv";this.environment=null;this.endpoint=null;this.cache=false;this.gotData=false;this.fetchingData=false;this.fetchHelper=new FetchHelper("sitefooter")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var e,n,i,i,r,a;return __generator(this,(function(o){switch(o.label){case 0:n=new MarketWebContextService(t);if(!!this.market)return[3,2];return[4,n.getMarket()];case 1:i=o.sent();this.market=i;o.label=2;case 2:if(!!this.language)return[3,4];return[4,n.getLanguage()];case 3:i=o.sent();this.language=i;o.label=4;case 4:if(!!this.environment)return[3,6];r=this;return[4,n.getEnvironmentName()];case 5:r.environment=o.sent();o.label=6;case 6:if(!(!this.endpoint&&((e=this.environment)===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,8];a=this;return[4,n.getEndpoint(this.environment,this.market)];case 7:a.endpoint=o.sent();o.label=8;case 8:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.setTranslations();return[4,this.fetchData()];case 1:t.sent();return[2]}}))}))};t.prototype.setTranslations=function(){if(this.language&&translations[this.language]){this.i18n=translations[this.language]}};t.prototype.onLanguageChange=function(){this.setTranslations();this.fetchData()};t.prototype.onMarketChange=function(){this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(i){switch(i.label){case 0:if(this.endpoint===null||!this.market||!this.language){return[2]}this.fetchingData=true;t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;e="".concat(t).concat(this.endpointPath,"?market=").concat(this.market,"&language=").concat(this.language);return[4,this.fetchHelper.fetchJson(e,{mode:"cors"},this.cache,this.onFetchRefreshed.bind(this))];case 1:n=i.sent();return[4,this.setStateFromData(n)];case 2:i.sent();return[2]}}))}))};t.prototype.onFetchRefreshed=function(t){this.setStateFromData(t)};t.prototype.getLinkContentByType=function(t){if(t===void 0){t=""}switch(t){case"facebook":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M38.6754 16H17.3246C16.593 16 16 16.5929 16 17.3246V38.6754C16 39.407 16.593 40 17.3246 40H28.8191V30.706H25.6915V27.0839H28.8191V24.4127C28.8191 21.3128 30.7124 19.6248 33.4778 19.6248C34.8023 19.6248 35.9409 19.7235 36.2726 19.7675V23.0071L34.3547 23.008C32.8507 23.008 32.5596 23.7226 32.5596 24.7713V27.0839H36.1463L35.6793 30.706H32.5596V40H38.6754C39.407 40 40 39.407 40 38.6754V17.3246C40 16.5929 39.407 16 38.6754 16Z" fill="white" />\n </svg>';case"twitter":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M41.3337 19.8587C40.3525 20.2871 39.2981 20.5766 38.1914 20.7068C39.321 20.0402 40.1884 18.9847 40.5969 17.7272C39.5399 18.3443 38.369 18.7925 37.1228 19.0341C36.1248 17.9874 34.7029 17.3333 33.1294 17.3333C30.1079 17.3333 27.6583 19.7446 27.6583 22.7188C27.6583 23.1409 27.7067 23.552 27.8 23.9461C23.253 23.7216 19.2218 21.5775 16.5234 18.3191C16.0525 19.1146 15.7827 20.0397 15.7827 21.0267C15.7827 22.8951 16.7486 24.5436 18.2166 25.5093C17.3197 25.4814 16.4762 25.2391 15.7385 24.8358C15.7381 24.8582 15.7381 24.8808 15.7381 24.9035C15.7381 27.5129 17.6239 29.6896 20.1267 30.1843C19.6676 30.3074 19.1843 30.3732 18.6853 30.3732C18.3328 30.3732 17.99 30.3395 17.656 30.2766C18.3522 32.4163 20.3726 33.9733 22.7667 34.0168C20.8943 35.4612 18.5353 36.3222 15.9721 36.3222C15.5305 36.3222 15.095 36.2968 14.667 36.2471C17.0881 37.7751 19.9639 38.6666 23.0535 38.6666C33.1166 38.6666 38.6195 30.4602 38.6195 23.3433C38.6195 23.1098 38.6142 22.8776 38.6037 22.6466C39.6725 21.8873 40.6002 20.9387 41.3337 19.8587Z" fill="white" />\n </svg>';case"linkedin":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path d="M37.5809 16H18.4191C17.0832 16 16 17.0747 16 18.399V37.601C16 38.9267 17.0832 40 18.4191 40H37.5809C38.9182 40 40 38.9253 40 37.601V18.399C40 17.0747 38.9182 16 37.5809 16ZM23.7013 34.9895H20.4725V24.7229H23.7013V34.9895ZM22.0653 23.4634C21.0462 23.4634 20.3874 22.7487 20.3874 21.8672C20.3874 20.965 21.0672 20.2711 22.1085 20.2711C23.1499 20.2711 23.7864 20.9636 23.8074 21.8672C23.8074 22.7501 23.1485 23.4634 22.0653 23.4634ZM35.4912 34.9895H32.2624V29.3002C32.2624 27.9772 31.7948 27.075 30.6264 27.075C29.7344 27.075 29.204 27.6834 28.9695 28.2711C28.8843 28.4808 28.8634 28.7746 28.8634 29.0685V34.9881H25.6332V27.9979C25.6332 26.7177 25.5913 25.6472 25.5481 24.7229H28.3525L28.5018 26.1507H28.566C28.9904 25.4789 30.0318 24.4925 31.7739 24.4925C33.8984 24.4925 35.4912 25.8996 35.4912 28.9222V34.9895Z" fill="white" />\n </svg>';case"instagram":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M27.9995 18.1621C31.2037 18.1621 31.5829 18.1745 32.8485 18.2321C34.0183 18.2854 34.6538 18.4807 35.0767 18.6451C35.6369 18.8628 36.0365 19.1228 36.4566 19.5425C36.8768 19.9626 37.1368 20.3623 37.354 20.9224C37.5184 21.3454 37.7137 21.9808 37.767 23.1507C37.8246 24.4158 37.837 24.7955 37.837 27.9998C37.837 31.204 37.8246 31.5832 37.767 32.8488C37.7137 34.0187 37.5184 34.6541 37.354 35.0771C37.1363 35.6373 36.8763 36.0369 36.4566 36.457C36.0365 36.8772 35.6369 37.1372 35.0767 37.3545C34.6538 37.5188 34.0183 37.7141 32.8485 37.7674C31.5834 37.8251 31.2037 37.8375 27.9995 37.8375C24.7953 37.8375 24.4157 37.8251 23.1506 37.7674C21.9807 37.7141 21.3453 37.5188 20.9223 37.3545C20.3622 37.1368 19.9625 36.8767 19.5424 36.457C19.1223 36.0369 18.8622 35.6373 18.645 35.0771C18.4807 34.6541 18.2854 34.0187 18.232 32.8488C18.1744 31.5837 18.162 31.204 18.162 27.9998C18.162 24.7955 18.1744 24.4163 18.232 23.1507C18.2854 21.9808 18.4807 21.3454 18.645 20.9224C18.8627 20.3623 19.1228 19.9626 19.5424 19.5425C19.9625 19.1224 20.3622 18.8623 20.9223 18.6451C21.3453 18.4807 21.9807 18.2854 23.1506 18.2321C24.4161 18.1745 24.7953 18.1621 27.9995 18.1621ZM27.9995 16C24.7405 16 24.3318 16.0138 23.052 16.0724C21.7749 16.1305 20.9028 16.3334 20.1392 16.6302C19.35 16.9369 18.6807 17.3471 18.0139 18.0144C17.347 18.6813 16.9365 19.3505 16.6302 20.1393C16.3334 20.9029 16.1305 21.7751 16.0724 23.0521C16.0138 24.332 16 24.7407 16 27.9998C16 31.2588 16.0138 31.6675 16.0724 32.9474C16.1305 34.2245 16.3334 35.0966 16.6302 35.8602C16.9369 36.6495 17.347 37.3187 18.0144 37.9856C18.6817 38.6529 19.3505 39.0631 20.1397 39.3698C20.9028 39.6666 21.7754 39.8695 23.0524 39.9276C24.3323 39.9862 24.741 40 28 40C31.259 40 31.6677 39.9862 32.9476 39.9276C34.2246 39.8695 35.0972 39.6666 35.8603 39.3698C36.6495 39.0631 37.3188 38.6529 37.9856 37.9856C38.653 37.3182 39.0631 36.6495 39.3698 35.8602C39.6666 35.0971 39.8695 34.2245 39.9276 32.9474C39.9862 31.6675 40 31.2588 40 27.9998C40 24.7407 39.9862 24.332 39.9276 23.0521C39.8695 21.7751 39.6666 20.9024 39.3698 20.1393C39.0631 19.35 38.653 18.6808 37.9856 18.0139C37.3183 17.3466 36.6495 16.9365 35.8603 16.6297C35.0963 16.3334 34.2241 16.1305 32.9471 16.0724C31.6672 16.0138 31.2585 16 27.9995 16ZM27.9996 21.8379C24.5963 21.8379 21.8379 24.5969 21.8379 27.9998C21.8379 31.4027 24.5968 34.1616 27.9996 34.1616C31.4025 34.1616 34.1613 31.4027 34.1613 27.9998C34.1613 24.5969 31.4029 21.8379 27.9996 21.8379ZM27.9996 31.9995C25.7904 31.9995 23.9999 30.2085 23.9999 27.9998C23.9999 25.7905 25.7909 24 27.9996 24C30.2083 24 31.9993 25.791 31.9993 27.9998C31.9993 30.209 30.2088 31.9995 27.9996 31.9995ZM35.845 21.594C35.845 22.3892 35.2003 23.0339 34.4051 23.0339C33.6098 23.0339 32.9651 22.3892 32.9651 21.594C32.9651 20.7987 33.6098 20.154 34.4051 20.154C35.2003 20.154 35.845 20.7987 35.845 21.594Z" fill="white" />\n </svg>';case"youtube":return'<svg width="56" height="56" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 56 56" style="enable-background:new 0 0 56 56;" xml:space="preserve">\n <circle fill="#005D92" cx="28" cy="28" r="28"></circle>\n <g transform="translate(9937 4831.656)">\n <path fill="#fff" d="M-9909-4793.8c0,0-2.2,0-4.7-0.1c-1.4,0-2.7-0.1-3.7-0.2c-1.3-0.1-2.1-0.2-2.6-0.3\n c-0.3-0.1-0.6-0.2-0.9-0.4c-0.3-0.2-0.5-0.3-0.7-0.6s-0.4-0.5-0.6-0.7c-0.2-0.3-0.3-0.6-0.4-0.9c-0.4-1.7-0.6-4-0.6-6.7\n c0-1.2,0.1-2.4,0.2-3.6c0.1-0.6,0.1-1.1,0.2-1.7c0.1-0.5,0.1-1.1,0.2-1.5c0.1-0.3,0.2-0.6,0.4-0.9c0.2-0.3,0.3-0.5,0.6-0.7\n s0.5-0.4,0.7-0.6c0.3-0.2,0.6-0.3,0.9-0.4c0.5-0.1,1.4-0.3,2.6-0.3c1-0.1,2.2-0.1,3.7-0.2c2.4-0.1,4.6-0.1,4.7-0.1\n c0,0,2.2,0,4.7,0.1c1.4,0,2.7,0.1,3.7,0.2c1.3,0.1,2.1,0.2,2.6,0.3c0.3,0.1,0.6,0.2,0.9,0.4c0.3,0.2,0.5,0.3,0.7,0.6\n s0.4,0.5,0.6,0.7c0.2,0.3,0.3,0.6,0.4,0.9c0.2,0.9,0.4,2,0.5,3.1c0.1,1.1,0.1,2.3,0.1,3.6c0,1.2-0.1,2.4-0.2,3.6\n c-0.1,0.6-0.1,1.1-0.2,1.7c-0.1,0.5-0.2,1.1-0.2,1.5c-0.1,0.3-0.2,0.6-0.4,0.9c-0.2,0.3-0.3,0.5-0.6,0.7c-0.2,0.2-0.5,0.4-0.7,0.6\n c-0.3,0.2-0.6,0.3-0.9,0.4c-0.5,0.1-1.4,0.3-2.6,0.3c-1,0.1-2.2,0.1-3.7,0.2C-9906.8-4793.8-9909-4793.8-9909-4793.8z\n M-9911.8-4807.9v8.4l7.3-4.2L-9911.8-4807.9z"></path>\n </g>\n </svg>';default:return""}};t.prototype.setStateFromData=function(t){if(typeof t!=="object"){console.warn("Data was not valid",t)}this.siteDefinition=t.sitedefinition;this.footerContent=t.footer;this.gotData=true;this.fetchingData=true};t.prototype.uniqueId=function(t){return"footer-"+t.replace(/[^A-Za-z0-9.\\\/]/gim,"")};t.prototype.render=function(){var t=this;var e,n,i,r,a;return h(Host,{language:this.language,market:this.market,environment:this.environment},h("pn-site-footer",{url:(n=(e=this.siteDefinition)===null||e===void 0?void 0:e.url)!==null&&n!==void 0?n:""},this.gotData&&((i=this.footerContent)===null||i===void 0?void 0:i.columns)?this.footerContent.columns.map((function(e){return h("pn-site-footer-col",null,h("h3",null,e.heading),e.links?h("ul",Object.assign({},e.links&&e.links[0]&&e.links[0].linkType&&{class:"social-media"}),e.links.map((function(e){if(!e.linkHref){return false}var n=e.linkText;if(e.linkType){n=t.getLinkContentByType(e.linkType)}var i=t.uniqueId(n);return h("li",null,h("a",Object.assign({href:e.linkHref},e.openInNewWindow&&{target:"_blank"},{title:e.linkText,innerHTML:n,id:i})))}))):null,e.body?h("div",{innerHTML:e.body}):null)})):null,h("div",{slot:"bottom"},this.gotData&&((r=this.footerContent)===null||r===void 0?void 0:r.copyrightText)?h("span",null,this.footerContent.copyrightText):null,this.gotData&&((a=this.footerContent)===null||a===void 0?void 0:a.bottomLinks)?h("span",null,this.footerContent.bottomLinks.map((function(e){if(!e.linkHref){return h("span",null,e.linkText)}var n=t.uniqueId(e.linkText);return h("a",Object.assign({href:e.linkHref},e.openInNewWindow&&{target:"_blank"},{title:e.linkText,id:n}),e.linkText)}))):null)))};Object.defineProperty(t.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{language:["onLanguageChange"],market:["onMarketChange"]}},enumerable:false,configurable:true});return t}();PnMarketwebSiteheader.style=pnMarketwebSitefooterCss;export{PnMarketwebSiteheader as pn_marketweb_sitefooter};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function o(t){try{l(i.next(t))}catch(e){a(e)}}function s(t){try{l(i["throw"](t))}catch(e){a(e)}}function l(t){t.done?n(t.value):r(t.value).then(o,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(a=o[0]&2?r["return"]:o[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;if(r=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;r=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=e.call(t,n)}catch(s){o=[6,s];r=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-1dfe8514.js";var translations={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa"}};var pnMarketwebSitefooterCss="";var PnMarketwebSiteheader=function(){function t(t){registerInstance(this,t);this.endpointPath="/api/footer/footer";this.market="se";this.language="sv";this.environment=null;this.endpoint=null;this.cache=false;this.gotData=false;this.fetchingData=false;this.fetchHelper=new FetchHelper("sitefooter")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var e,n,i,i,r,a;return __generator(this,(function(o){switch(o.label){case 0:n=new MarketWebContextService(t);if(!!this.market)return[3,2];return[4,n.getMarket()];case 1:i=o.sent();this.market=i;o.label=2;case 2:if(!!this.language)return[3,4];return[4,n.getLanguage()];case 3:i=o.sent();this.language=i;o.label=4;case 4:if(!!this.environment)return[3,6];r=this;return[4,n.getEnvironmentName()];case 5:r.environment=o.sent();o.label=6;case 6:if(!(!this.endpoint&&((e=this.environment)===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,8];a=this;return[4,n.getEndpoint(this.environment,this.market)];case 7:a.endpoint=o.sent();o.label=8;case 8:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.setTranslations();return[4,this.fetchData()];case 1:t.sent();return[2]}}))}))};t.prototype.setTranslations=function(){if(this.language&&translations[this.language]){this.i18n=translations[this.language]}};t.prototype.onLanguageChange=function(){this.setTranslations();this.fetchData()};t.prototype.onMarketChange=function(){this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(i){switch(i.label){case 0:if(this.endpoint===null||!this.market||!this.language){return[2]}this.fetchingData=true;t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;e="".concat(t).concat(this.endpointPath,"?market=").concat(this.market,"&language=").concat(this.language);return[4,this.fetchHelper.fetchJson(e,{mode:"cors"},this.cache,this.onFetchRefreshed.bind(this))];case 1:n=i.sent();return[4,this.setStateFromData(n)];case 2:i.sent();return[2]}}))}))};t.prototype.onFetchRefreshed=function(t){this.setStateFromData(t)};t.prototype.getLinkContentByType=function(t){if(t===void 0){t=""}switch(t){case"facebook":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M38.6754 16H17.3246C16.593 16 16 16.5929 16 17.3246V38.6754C16 39.407 16.593 40 17.3246 40H28.8191V30.706H25.6915V27.0839H28.8191V24.4127C28.8191 21.3128 30.7124 19.6248 33.4778 19.6248C34.8023 19.6248 35.9409 19.7235 36.2726 19.7675V23.0071L34.3547 23.008C32.8507 23.008 32.5596 23.7226 32.5596 24.7713V27.0839H36.1463L35.6793 30.706H32.5596V40H38.6754C39.407 40 40 39.407 40 38.6754V17.3246C40 16.5929 39.407 16 38.6754 16Z" fill="white" />\n </svg>';case"twitter":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M41.3337 19.8587C40.3525 20.2871 39.2981 20.5766 38.1914 20.7068C39.321 20.0402 40.1884 18.9847 40.5969 17.7272C39.5399 18.3443 38.369 18.7925 37.1228 19.0341C36.1248 17.9874 34.7029 17.3333 33.1294 17.3333C30.1079 17.3333 27.6583 19.7446 27.6583 22.7188C27.6583 23.1409 27.7067 23.552 27.8 23.9461C23.253 23.7216 19.2218 21.5775 16.5234 18.3191C16.0525 19.1146 15.7827 20.0397 15.7827 21.0267C15.7827 22.8951 16.7486 24.5436 18.2166 25.5093C17.3197 25.4814 16.4762 25.2391 15.7385 24.8358C15.7381 24.8582 15.7381 24.8808 15.7381 24.9035C15.7381 27.5129 17.6239 29.6896 20.1267 30.1843C19.6676 30.3074 19.1843 30.3732 18.6853 30.3732C18.3328 30.3732 17.99 30.3395 17.656 30.2766C18.3522 32.4163 20.3726 33.9733 22.7667 34.0168C20.8943 35.4612 18.5353 36.3222 15.9721 36.3222C15.5305 36.3222 15.095 36.2968 14.667 36.2471C17.0881 37.7751 19.9639 38.6666 23.0535 38.6666C33.1166 38.6666 38.6195 30.4602 38.6195 23.3433C38.6195 23.1098 38.6142 22.8776 38.6037 22.6466C39.6725 21.8873 40.6002 20.9387 41.3337 19.8587Z" fill="white" />\n </svg>';case"linkedin":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path d="M37.5809 16H18.4191C17.0832 16 16 17.0747 16 18.399V37.601C16 38.9267 17.0832 40 18.4191 40H37.5809C38.9182 40 40 38.9253 40 37.601V18.399C40 17.0747 38.9182 16 37.5809 16ZM23.7013 34.9895H20.4725V24.7229H23.7013V34.9895ZM22.0653 23.4634C21.0462 23.4634 20.3874 22.7487 20.3874 21.8672C20.3874 20.965 21.0672 20.2711 22.1085 20.2711C23.1499 20.2711 23.7864 20.9636 23.8074 21.8672C23.8074 22.7501 23.1485 23.4634 22.0653 23.4634ZM35.4912 34.9895H32.2624V29.3002C32.2624 27.9772 31.7948 27.075 30.6264 27.075C29.7344 27.075 29.204 27.6834 28.9695 28.2711C28.8843 28.4808 28.8634 28.7746 28.8634 29.0685V34.9881H25.6332V27.9979C25.6332 26.7177 25.5913 25.6472 25.5481 24.7229H28.3525L28.5018 26.1507H28.566C28.9904 25.4789 30.0318 24.4925 31.7739 24.4925C33.8984 24.4925 35.4912 25.8996 35.4912 28.9222V34.9895Z" fill="white" />\n </svg>';case"instagram":return'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="28" cy="28" r="28" fill="#005D92" />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M27.9995 18.1621C31.2037 18.1621 31.5829 18.1745 32.8485 18.2321C34.0183 18.2854 34.6538 18.4807 35.0767 18.6451C35.6369 18.8628 36.0365 19.1228 36.4566 19.5425C36.8768 19.9626 37.1368 20.3623 37.354 20.9224C37.5184 21.3454 37.7137 21.9808 37.767 23.1507C37.8246 24.4158 37.837 24.7955 37.837 27.9998C37.837 31.204 37.8246 31.5832 37.767 32.8488C37.7137 34.0187 37.5184 34.6541 37.354 35.0771C37.1363 35.6373 36.8763 36.0369 36.4566 36.457C36.0365 36.8772 35.6369 37.1372 35.0767 37.3545C34.6538 37.5188 34.0183 37.7141 32.8485 37.7674C31.5834 37.8251 31.2037 37.8375 27.9995 37.8375C24.7953 37.8375 24.4157 37.8251 23.1506 37.7674C21.9807 37.7141 21.3453 37.5188 20.9223 37.3545C20.3622 37.1368 19.9625 36.8767 19.5424 36.457C19.1223 36.0369 18.8622 35.6373 18.645 35.0771C18.4807 34.6541 18.2854 34.0187 18.232 32.8488C18.1744 31.5837 18.162 31.204 18.162 27.9998C18.162 24.7955 18.1744 24.4163 18.232 23.1507C18.2854 21.9808 18.4807 21.3454 18.645 20.9224C18.8627 20.3623 19.1228 19.9626 19.5424 19.5425C19.9625 19.1224 20.3622 18.8623 20.9223 18.6451C21.3453 18.4807 21.9807 18.2854 23.1506 18.2321C24.4161 18.1745 24.7953 18.1621 27.9995 18.1621ZM27.9995 16C24.7405 16 24.3318 16.0138 23.052 16.0724C21.7749 16.1305 20.9028 16.3334 20.1392 16.6302C19.35 16.9369 18.6807 17.3471 18.0139 18.0144C17.347 18.6813 16.9365 19.3505 16.6302 20.1393C16.3334 20.9029 16.1305 21.7751 16.0724 23.0521C16.0138 24.332 16 24.7407 16 27.9998C16 31.2588 16.0138 31.6675 16.0724 32.9474C16.1305 34.2245 16.3334 35.0966 16.6302 35.8602C16.9369 36.6495 17.347 37.3187 18.0144 37.9856C18.6817 38.6529 19.3505 39.0631 20.1397 39.3698C20.9028 39.6666 21.7754 39.8695 23.0524 39.9276C24.3323 39.9862 24.741 40 28 40C31.259 40 31.6677 39.9862 32.9476 39.9276C34.2246 39.8695 35.0972 39.6666 35.8603 39.3698C36.6495 39.0631 37.3188 38.6529 37.9856 37.9856C38.653 37.3182 39.0631 36.6495 39.3698 35.8602C39.6666 35.0971 39.8695 34.2245 39.9276 32.9474C39.9862 31.6675 40 31.2588 40 27.9998C40 24.7407 39.9862 24.332 39.9276 23.0521C39.8695 21.7751 39.6666 20.9024 39.3698 20.1393C39.0631 19.35 38.653 18.6808 37.9856 18.0139C37.3183 17.3466 36.6495 16.9365 35.8603 16.6297C35.0963 16.3334 34.2241 16.1305 32.9471 16.0724C31.6672 16.0138 31.2585 16 27.9995 16ZM27.9996 21.8379C24.5963 21.8379 21.8379 24.5969 21.8379 27.9998C21.8379 31.4027 24.5968 34.1616 27.9996 34.1616C31.4025 34.1616 34.1613 31.4027 34.1613 27.9998C34.1613 24.5969 31.4029 21.8379 27.9996 21.8379ZM27.9996 31.9995C25.7904 31.9995 23.9999 30.2085 23.9999 27.9998C23.9999 25.7905 25.7909 24 27.9996 24C30.2083 24 31.9993 25.791 31.9993 27.9998C31.9993 30.209 30.2088 31.9995 27.9996 31.9995ZM35.845 21.594C35.845 22.3892 35.2003 23.0339 34.4051 23.0339C33.6098 23.0339 32.9651 22.3892 32.9651 21.594C32.9651 20.7987 33.6098 20.154 34.4051 20.154C35.2003 20.154 35.845 20.7987 35.845 21.594Z" fill="white" />\n </svg>';case"youtube":return'<svg width="56" height="56" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 56 56" style="enable-background:new 0 0 56 56;" xml:space="preserve">\n <circle fill="#005D92" cx="28" cy="28" r="28"></circle>\n <g transform="translate(9937 4831.656)">\n <path fill="#fff" d="M-9909-4793.8c0,0-2.2,0-4.7-0.1c-1.4,0-2.7-0.1-3.7-0.2c-1.3-0.1-2.1-0.2-2.6-0.3\n c-0.3-0.1-0.6-0.2-0.9-0.4c-0.3-0.2-0.5-0.3-0.7-0.6s-0.4-0.5-0.6-0.7c-0.2-0.3-0.3-0.6-0.4-0.9c-0.4-1.7-0.6-4-0.6-6.7\n c0-1.2,0.1-2.4,0.2-3.6c0.1-0.6,0.1-1.1,0.2-1.7c0.1-0.5,0.1-1.1,0.2-1.5c0.1-0.3,0.2-0.6,0.4-0.9c0.2-0.3,0.3-0.5,0.6-0.7\n s0.5-0.4,0.7-0.6c0.3-0.2,0.6-0.3,0.9-0.4c0.5-0.1,1.4-0.3,2.6-0.3c1-0.1,2.2-0.1,3.7-0.2c2.4-0.1,4.6-0.1,4.7-0.1\n c0,0,2.2,0,4.7,0.1c1.4,0,2.7,0.1,3.7,0.2c1.3,0.1,2.1,0.2,2.6,0.3c0.3,0.1,0.6,0.2,0.9,0.4c0.3,0.2,0.5,0.3,0.7,0.6\n s0.4,0.5,0.6,0.7c0.2,0.3,0.3,0.6,0.4,0.9c0.2,0.9,0.4,2,0.5,3.1c0.1,1.1,0.1,2.3,0.1,3.6c0,1.2-0.1,2.4-0.2,3.6\n c-0.1,0.6-0.1,1.1-0.2,1.7c-0.1,0.5-0.2,1.1-0.2,1.5c-0.1,0.3-0.2,0.6-0.4,0.9c-0.2,0.3-0.3,0.5-0.6,0.7c-0.2,0.2-0.5,0.4-0.7,0.6\n c-0.3,0.2-0.6,0.3-0.9,0.4c-0.5,0.1-1.4,0.3-2.6,0.3c-1,0.1-2.2,0.1-3.7,0.2C-9906.8-4793.8-9909-4793.8-9909-4793.8z\n M-9911.8-4807.9v8.4l7.3-4.2L-9911.8-4807.9z"></path>\n </g>\n </svg>';default:return""}};t.prototype.setStateFromData=function(t){if(typeof t!=="object"){console.warn("Data was not valid",t)}this.siteDefinition=t.sitedefinition;this.footerContent=t.footer;this.gotData=true;this.fetchingData=true};t.prototype.uniqueId=function(t){return"footer-"+t.replace(/[^A-Za-z0-9.\\\/]/gim,"")};t.prototype.render=function(){var t=this;var e,n,i,r,a;return h(Host,{language:this.language,market:this.market,environment:this.environment},h("pn-site-footer",{url:(n=(e=this.siteDefinition)===null||e===void 0?void 0:e.url)!==null&&n!==void 0?n:""},this.gotData&&((i=this.footerContent)===null||i===void 0?void 0:i.columns)?this.footerContent.columns.map((function(e){return h("pn-site-footer-col",null,h("h3",null,e.heading),e.links?h("ul",Object.assign({},e.links&&e.links[0]&&e.links[0].linkType&&{class:"social-media"}),e.links.map((function(e){if(!e.linkHref){return false}var n=e.linkText;if(e.linkType){n=t.getLinkContentByType(e.linkType)}var i=t.uniqueId(n);return h("li",null,h("a",Object.assign({href:e.linkHref},e.openInNewWindow&&{target:"_blank"},{title:e.linkText,innerHTML:n,id:i})))}))):null,e.body?h("div",{innerHTML:e.body}):null)})):null,h("div",{slot:"bottom"},this.gotData&&((r=this.footerContent)===null||r===void 0?void 0:r.copyrightText)?h("span",null,this.footerContent.copyrightText):null,this.gotData&&((a=this.footerContent)===null||a===void 0?void 0:a.bottomLinks)?h("span",null,this.footerContent.bottomLinks.map((function(e){if(!e.linkHref){return h("span",null,e.linkText)}var n=t.uniqueId(e.linkText);return h("a",Object.assign({href:e.linkHref},e.openInNewWindow&&{target:"_blank"},{title:e.linkText,id:n}),e.linkText)}))):null)))};Object.defineProperty(t.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{language:["onLanguageChange"],market:["onMarketChange"]}},enumerable:false,configurable:true});return t}();PnMarketwebSiteheader.style=pnMarketwebSitefooterCss;export{PnMarketwebSiteheader as pn_marketweb_sitefooter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(t){r(t)}}function s(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):a(e.value).then(o,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;a=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1];r=o;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(o);break}if(r[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(s){o=[6,s];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,e as createEvent,h,a as Host,g as getElement}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-aa15fc6b.js";import{M as MarketWebLoginManager}from"./MarketWebLoginManager-8fef95d2.js";var translations={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa"}};var pnMarketwebSiteheaderCss="body[data-siteheader-menuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-menuopen=true]{max-height:initial;overflow:initial}}pn-marketweb-siteheader{display:block;background:#FFFFFF}pn-marketweb-siteheader header{position:relative;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-webkit-box-shadow:0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);box-shadow:0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}@media screen and (min-width: 48em){pn-marketweb-siteheader header{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:initial;justify-content:initial}}pn-marketweb-siteheader .siteheader-row{display:-ms-flexbox;display:flex;-ms-flex-flow:row;flex-flow:row;-ms-flex-align:center;align-items:center;width:100%;padding:0 1.6rem;min-height:2em}pn-marketweb-siteheader .siteheader-row:not(:last-child){border-bottom:0.1rem solid #F3F2F2}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-row{-ms-flex-pack:justify;justify-content:space-between;min-height:3.2em}}pn-marketweb-siteheader .siteheader-topright{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}pn-marketweb-siteheader .siteheader-logocontainer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:relative;min-height:3em;background:#FFFFFF;z-index:1}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-logocontainer{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}}pn-marketweb-siteheader .siteheader-logolink{height:100%;max-height:6.4rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}pn-marketweb-siteheader .siteheader-logolink:hover,pn-marketweb-siteheader .siteheader-logolink:focus,pn-marketweb-siteheader .siteheader-logolink:active{-webkit-box-shadow:none;box-shadow:none}pn-marketweb-siteheader .siteheader-row>pn-marketweb-siteheader-search{display:none}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-row>pn-marketweb-siteheader-search{display:block}}pn-marketweb-siteheader pn-spinner{display:none}pn-marketweb-siteheader pn-nav-dropdown:not(.hydrated) .nav-dropdown-content-container{display:none}.siteheader-topleft pn-site-selector{padding:1rem 0;display:none}@media screen and (min-width: 48em){.siteheader-topleft pn-site-selector{display:block}}@media screen and (min-width: 60em){.siteheader-topleft pn-site-selector{margin-left:1.3rem}}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label,.siteheader-topleft pn-site-selector:is(a){font-size:0}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label pn-icon,.siteheader-topleft pn-site-selector:is(a) pn-icon{font-size:initial;margin-left:0}@media screen and (min-width: 60em){.siteheader-topleft pn-site-selector .pn-nav-dropdown-label,.siteheader-topleft pn-site-selector:is(a){font-size:initial}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label pn-icon,.siteheader-topleft pn-site-selector:is(a) pn-icon{margin-left:0.4em}}@media screen and (min-width: 60em){.siteheader-topright{margin-right:1.6rem}}.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{padding:1rem 0;display:none;-ms-flex-item-align:center;align-self:center}@media screen and (min-width: 48em){.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{display:block;margin-left:1rem}}@media screen and (min-width: 60em){.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{margin-left:1.6rem}}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label,.siteheader-topright>pn-language-selector:is(a),.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label,.siteheader-topright>pn-marketweb-siteheader-login:is(a),.siteheader-topright>a .pn-nav-dropdown-label,.siteheader-topright>a:is(a){font-size:0}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-language-selector:is(a) pn-icon,.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-marketweb-siteheader-login:is(a) pn-icon,.siteheader-topright>a .pn-nav-dropdown-label pn-icon,.siteheader-topright>a:is(a) pn-icon{font-size:initial;margin-left:0}@media screen and (min-width: 60em){.siteheader-topright>pn-language-selector .pn-nav-dropdown-label,.siteheader-topright>pn-language-selector:is(a),.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label,.siteheader-topright>pn-marketweb-siteheader-login:is(a),.siteheader-topright>a .pn-nav-dropdown-label,.siteheader-topright>a:is(a){font-size:initial}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-language-selector:is(a) pn-icon,.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-marketweb-siteheader-login:is(a) pn-icon,.siteheader-topright>a .pn-nav-dropdown-label pn-icon,.siteheader-topright>a:is(a) pn-icon{margin-left:0.4em}}.siteheader-menu{max-width:100%;width:100%;overflow:visible;overflow-x:clip}@media screen and (min-width: 60em){.siteheader-menu{margin-top:auto;overflow:visible}}.siteheader-menu pn-mainnav-link a[target]::after{content:none}.siteheader-menu pn-marketweb-siteheader-search{padding:0.3rem 1.6rem;width:100%}.siteheader-menu [slot=top] pn-search-field{width:100%}.siteheader-menu-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.siteheader-menu-footer>*{margin:1.6rem}";var PnMarketwebSiteheader=function(){function e(e){registerInstance(this,e);this.changeLanguage=createEvent(this,"changeLanguage",7);this.changeMarket=createEvent(this,"changeMarket",7);this.endpointPath="/api/navigation/header";this.market=null;this.language=null;this.environment=null;this.userToken="";this.userFullname="";this.userLoggedin=false;this.endpoint=null;this.hideSiteSelector=false;this.hideLanguageSelector=false;this.hideSearch=false;this.hideLogin=false;this.AutocompleteEndpoint="";this.sessionForward=false;this.cache=false;this.spaMode=false;this.gotData=false;this.fetchingData=false;this.homePageLink="/";this.menuItems=[];this.search={AutocompleteEndpoint:this.AutocompleteEndpoint};this.siteSelector=null;this.languageSelector=null;this.languageOptions=[];this.loginDialog=null;this.minimizeSearch=false;this.loggedIn=false;this.fetchHelper=new FetchHelper("siteheader");this.loginManager=null}e.prototype.componentWillLoad=function(){var e=this;this.loginManager=new MarketWebLoginManager({eventTarget:this.hostElement});this.setInitialValues().then((function(){e.init()}))};e.prototype.setInitialValues=function(e){if(e===void 0){e=window.location.href}return __awaiter(this,void 0,void 0,(function(){var t,n,i,i,a,r;return __generator(this,(function(o){switch(o.label){case 0:n=new MarketWebContextService(e);if(!!this.market)return[3,2];return[4,n.getMarket()];case 1:i=o.sent();this.market=i;o.label=2;case 2:if(!!this.language)return[3,4];return[4,n.getLanguage()];case 3:i=o.sent();this.language=i;o.label=4;case 4:if(!!this.environment)return[3,6];a=this;return[4,n.getEnvironmentName()];case 5:a.environment=o.sent();o.label=6;case 6:if(!(!this.endpoint&&((t=this.environment)===null||t===void 0?void 0:t.indexOf("local"))===-1))return[3,8];r=this;return[4,n.getEndpoint(this.environment,this.market)];case 7:r.endpoint=o.sent();o.label=8;case 8:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.setTranslations();return[4,this.fetchData()];case 1:t.sent();window.setTimeout((function(){e.checkMenuOverflow()}),50);return[2]}}))}))};e.prototype.setTranslations=function(){if(this.language&&translations[this.language]){this.i18n=translations[this.language]}};e.prototype.onLanguageSelectorChange=function(e){this.language=e.detail;window.dispatchEvent(new CustomEvent("marketweb-languagechange",{detail:this.language}))};e.prototype.onLanguageChange=function(){this.setTranslations();this.changeLanguage.emit(this.language);this.fetchData()};e.prototype.onMarketChange=function(){this.changeMarket.emit(this.market);this.fetchData()};e.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:if(this.endpoint===null||!this.market||!this.language){return[2]}this.fetchingData=true;e=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;t="".concat(e).concat(this.endpointPath,"?market=").concat(this.market,"&language=").concat(this.language);return[4,this.fetchHelper.fetchJson(t,{mode:"cors"},this.cache,this.onFetchRefreshed.bind(this))];case 1:n=i.sent();return[4,this.setStateFromData(n)];case 2:i.sent();return[2]}}))}))};e.prototype.onFetchRefreshed=function(e){this.setStateFromData(e)};e.prototype.getLanguageVersionUrl=function(e){if(this.spaMode){return null}var t=document.querySelector('link[rel="alternate"][hreflang="'.concat(e.twoLetterISOLanguageName,'"]'));if(t){return t.getAttribute("href")}var n=this.siteDefinition.url;return n+(n.lastIndexOf("/")!==n.length-1?"/":"")+e.twoLetterISOLanguageName};e.prototype.setStateFromData=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,i;var a=this;return __generator(this,(function(r){switch(r.label){case 0:if(typeof e!=="object"){console.warn("Data was not valid",e)}this.siteDefinition=e.sitedefinition;this.menuItems=e.mainMenu.menuItems;if(!this.menuItems[0]||((t=this.menuItems[0])===null||t===void 0?void 0:t.name)!==this.i18n.menuHomeButton){this.menuItems.unshift({href:this.siteDefinition.url,name:this.i18n.menuHomeButton,id:"homelink",open:false,selected:false,children:[]})}this.search=Object.assign(Object.assign({},e.search),{AutocompleteEndpoint:this.AutocompleteEndpoint});this.siteSelector=e.siteSelectorViewModel;this.languageSelector=e.languageSelectorViewModel;this.setLanguageOptions();this.loginDialog=e.loginViewModel;return[4,this.spaModeAdjustments()];case 1:r.sent();this.gotData=true;this.fetchingData=true;this.homePageLink=(i=(n=this.siteDefinition)===null||n===void 0?void 0:n.url)!==null&&i!==void 0?i:document.location.hostname;window.setTimeout((function(){a.checkMenuOverflow()}),100);return[2]}}))}))};e.prototype.setLanguageOptions=function(){var e;if(!this.languageSelector||!this.languageSelector.languages){return}var t=(e=Array.prototype.slice.call(document.querySelectorAll('link[rel="alternate"][hreflang]')))!==null&&e!==void 0?e:[];var n=t.map((function(e){return e.getAttribute("hreflang")}));var i=[];this.languageSelector.languages.map((function(e){if(n&&n.length>0){if(n.includes(e.twoLetterISOLanguageName)){i.push(e)}}else{i.push(e)}}));this.languageOptions=i};e.prototype.spaModeAdjustments=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.spaMode){return[2]}return[2]}))}))};e.prototype.onLoginStateChange=function(e){var t,n,i;if(((t=e.detail)===null||t===void 0?void 0:t.loggedIn)&&((n=e.detail)===null||n===void 0?void 0:n.token)){this.loggedIn=((i=e.detail)===null||i===void 0?void 0:i.loggedIn)===true}};e.prototype.promotedItemId=function(e){return"promo-"+e.linkText.replace(/[^A-Za-z0-9.\\\/]/gim,"")};e.prototype.handleResize=function(){var e=this;requestAnimationFrame((function(){e.checkMenuOverflow()}))};e.prototype.checkMenuOverflow=function(){var e=this.hostElement.querySelectorAll(".siteheader-row")[1];if(!e){return}var t=e.querySelector("pn-mainnav-level");if(!t){return}var n=t.parentElement;if(n.tagName.toLocaleLowerCase()!=="nav"){return}var i=n.scrollWidth;var a=t.clientWidth;var r=i<a;if(r&&this.minimizeSearch===false){this.minimizeSearch=true}};e.prototype.adjustSiteSelectorUrl=function(e){if(!this.loggedIn){return e}var t=["portal.postnord.com"];var n=t.filter((function(t){return e.indexOf(t)!==-1}));if(n.length===0){return e}return this.loginManager.getLoginUrl(e)};e.prototype.render=function(){var e=this;var t,n,i,a,r,o;return h(Host,{language:this.language,market:this.market,environment:this.environment},h("header",null,h("div",{class:"siteheader-row"},h("div",{class:"siteheader-topleft"},h("slot",{name:"topleft"}),this.gotData&&this.siteSelector&&!this.hideSiteSelector&&h("pn-site-selector",{language:this.language,buttontext:(n=(t=this.siteSelector)===null||t===void 0?void 0:t.currentSiteTitle)!==null&&n!==void 0?n:"postnord"},this.gotData&&((i=this.siteSelector)===null||i===void 0?void 0:i.currentSiteTitle)&&h("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle+" ",description:this.siteSelector.currentSiteDescription}),this.gotData&&((a=this.siteSelector)===null||a===void 0?void 0:a.siteSelections)&&this.siteSelector.siteSelections.map((function(t){return h("pn-site-selector-item",{heading:t.linkText+" ",description:t.linkDescription,url:e.adjustSiteSelectorUrl(t.href),newwindow:t.openInNewWindow})})))),h("div",{class:"siteheader-logocontainer"},h("a",{href:this.homePageLink,title:"Home",class:"siteheader-logolink"},h("svg",{class:"siteheader-logo",xmlns:"http://www.w3.org/2000/svg",width:"12.7rem",height:"2.4rem",viewBox:"0 0 141.73 26.65"},h("path",{d:"M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z",fill:"#00A0D6",transform:"translate(0 0)"})))),h("div",{class:"siteheader-topright"},h("slot",{name:"toprightstart"}),this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{token:this.userToken,fullname:this.userFullname,loggedin:this.userLoggedin,loginDialog:this.loginDialog,endpoint:this.endpoint,i18n:this.i18n}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),h("slot",{name:"toprightend"}))),h("div",{class:"siteheader-row"},h("div",{class:"siteheader-menu"},this.gotData&&this.menuItems&&h("pn-mainnav",{market:this.market,language:this.language,onMenuOpenChange:function(e){document.body.setAttribute("data-siteheader-menuopen",e.detail+"")}},h("pn-mainnav-level",null,h("pn-mainnav-list",null,this.menuItems.map((function(t){var n,i;return h("pn-mainnav-link",{name:t.name,href:t.href,itemid:t.id,target:(n=t.linkTarget)!==null&&n!==void 0?n:"_self",linkid:t.trackingId},(t.promotedMenuItems&&t.promotedMenuItems.length>0||t.children&&t.children.length>0)&&h("pn-mainnav-level",null,t.children.length>0&&h("pn-mainnav-list",{heading:(i=t.navigationHeading)!==null&&i!==void 0?i:""},t.children.map((function(e){var t;return h("pn-mainnav-link",{name:e.name,href:e.href,target:(t=e.linkTarget)!==null&&t!==void 0?t:"_self",linkid:e.trackingId})}))),t.promotedMenuItems&&t.promotedMenuItems.length>0&&h("pn-mainnav-list",{heading:t.promotedMenuItemsHeader},t.promotedMenuItems.map((function(n){return h("pn-mainnav-link",{href:n.href,name:n.linkText,target:n.openInNewWindow?"_blank":"_self",linkid:e.promotedItemId(n)+t.id})})))))}))),h("div",{slot:"footer",class:"siteheader-menu-footer"},this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{emitEvents:false,loginDialog:this.loginDialog,endpoint:this.endpoint,fullname:this.userFullname,loggedin:this.userLoggedin,i18n:this.i18n}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),!this.hideSiteSelector&&h("pn-site-selector",{language:this.language},this.gotData&&((r=this.siteSelector)===null||r===void 0?void 0:r.currentSiteTitle)&&h("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle,description:this.siteSelector.currentSiteDescription}),this.gotData&&((o=this.siteSelector)===null||o===void 0?void 0:o.siteSelections)&&this.siteSelector.siteSelections.map((function(e){return h("pn-site-selector-item",{heading:e.linkText,description:e.linkDescription,url:e.pageLink,newwindow:e.openInNewWindow})})))),h("div",{slot:"top",class:"siteheader-menu-top"},h("pn-marketweb-siteheader-search",{language:this.language,search:this.search,"hide-search":this.hideSearch,i18n:this.i18n}))))),h("pn-marketweb-siteheader-search",{language:this.language,primary:true,search:this.search,"hide-search":this.hideSearch,"show-only-link":this.minimizeSearch,i18n:this.i18n}))))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["onLanguageChange"],market:["onMarketChange"]}},enumerable:false,configurable:true});return e}();PnMarketwebSiteheader.style=pnMarketwebSiteheaderCss;export{PnMarketwebSiteheader as pn_marketweb_siteheader};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(t){r(t)}}function s(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):a(e.value).then(o,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;a=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1];r=o;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(o);break}if(r[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(s){o=[6,s];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,e as createEvent,h,a as Host,g as getElement}from"./index-5397620b.js";import{F as FetchHelper,M as MarketWebContextService}from"./FetchHelper-1dfe8514.js";import{M as MarketWebLoginManager}from"./MarketWebLoginManager-8fef95d2.js";var translations={sv:{searchlabel:"Sök",searchplaceholder:"Vad letar du efter?",searchbuttontext:"Sök",menuHomeButton:"Hem",menuGoBackButton:"Gå tillbaka",mainMenuButton:"Meny",menuStartButton:"Start"},en:{searchlabel:"Search",searchplaceholder:"Search",searchbuttontext:"Search",menuHomeButton:"Home",menuGoBackButton:"Go back",mainMenuButton:"Menu",menuStartButton:"Start"},da:{searchlabel:"Søg",searchplaceholder:"Søg",searchbuttontext:"Søg",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbage",mainMenuButton:"Menu",menuStartButton:"Start"},no:{searchlabel:"Søk",searchplaceholder:"Søk",searchbuttontext:"Søk",menuHomeButton:"Hjem",menuGoBackButton:"Gå tilbake",mainMenuButton:"Meny",menuStartButton:"Start"},fi:{searchlabel:"Hae",searchplaceholder:"Hae",searchbuttontext:"Hae",menuHomeButton:"Koti",menuGoBackButton:"Mene takaisin",mainMenuButton:"Valikko",menuStartButton:"Alkaa"}};var pnMarketwebSiteheaderCss="body[data-siteheader-menuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-menuopen=true]{max-height:initial;overflow:initial}}pn-marketweb-siteheader{display:block;background:#FFFFFF}pn-marketweb-siteheader header{position:relative;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-webkit-box-shadow:0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);box-shadow:0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}@media screen and (min-width: 48em){pn-marketweb-siteheader header{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:initial;justify-content:initial}}pn-marketweb-siteheader .siteheader-row{display:-ms-flexbox;display:flex;-ms-flex-flow:row;flex-flow:row;-ms-flex-align:center;align-items:center;width:100%;padding:0 1.6rem;min-height:2em}pn-marketweb-siteheader .siteheader-row:not(:last-child){border-bottom:0.1rem solid #F3F2F2}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-row{-ms-flex-pack:justify;justify-content:space-between;min-height:3.2em}}pn-marketweb-siteheader .siteheader-topright{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}pn-marketweb-siteheader .siteheader-logocontainer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:relative;min-height:3em;background:#FFFFFF;z-index:1}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-logocontainer{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}}pn-marketweb-siteheader .siteheader-logolink{height:100%;max-height:6.4rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}pn-marketweb-siteheader .siteheader-logolink:hover,pn-marketweb-siteheader .siteheader-logolink:focus,pn-marketweb-siteheader .siteheader-logolink:active{-webkit-box-shadow:none;box-shadow:none}pn-marketweb-siteheader .siteheader-row>pn-marketweb-siteheader-search{display:none}@media screen and (min-width: 48em){pn-marketweb-siteheader .siteheader-row>pn-marketweb-siteheader-search{display:block}}pn-marketweb-siteheader pn-spinner{display:none}pn-marketweb-siteheader pn-nav-dropdown:not(.hydrated) .nav-dropdown-content-container{display:none}.siteheader-topleft pn-site-selector{padding:1rem 0;display:none}@media screen and (min-width: 48em){.siteheader-topleft pn-site-selector{display:block}}@media screen and (min-width: 60em){.siteheader-topleft pn-site-selector{margin-left:1.3rem}}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label,.siteheader-topleft pn-site-selector:is(a){font-size:0}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label pn-icon,.siteheader-topleft pn-site-selector:is(a) pn-icon{font-size:initial;margin-left:0}@media screen and (min-width: 60em){.siteheader-topleft pn-site-selector .pn-nav-dropdown-label,.siteheader-topleft pn-site-selector:is(a){font-size:initial}.siteheader-topleft pn-site-selector .pn-nav-dropdown-label pn-icon,.siteheader-topleft pn-site-selector:is(a) pn-icon{margin-left:0.4em}}@media screen and (min-width: 60em){.siteheader-topright{margin-right:1.6rem}}.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{padding:1rem 0;display:none;-ms-flex-item-align:center;align-self:center}@media screen and (min-width: 48em){.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{display:block;margin-left:1rem}}@media screen and (min-width: 60em){.siteheader-topright>pn-language-selector,.siteheader-topright>pn-marketweb-siteheader-login,.siteheader-topright>a{margin-left:1.6rem}}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label,.siteheader-topright>pn-language-selector:is(a),.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label,.siteheader-topright>pn-marketweb-siteheader-login:is(a),.siteheader-topright>a .pn-nav-dropdown-label,.siteheader-topright>a:is(a){font-size:0}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-language-selector:is(a) pn-icon,.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-marketweb-siteheader-login:is(a) pn-icon,.siteheader-topright>a .pn-nav-dropdown-label pn-icon,.siteheader-topright>a:is(a) pn-icon{font-size:initial;margin-left:0}@media screen and (min-width: 60em){.siteheader-topright>pn-language-selector .pn-nav-dropdown-label,.siteheader-topright>pn-language-selector:is(a),.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label,.siteheader-topright>pn-marketweb-siteheader-login:is(a),.siteheader-topright>a .pn-nav-dropdown-label,.siteheader-topright>a:is(a){font-size:initial}.siteheader-topright>pn-language-selector .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-language-selector:is(a) pn-icon,.siteheader-topright>pn-marketweb-siteheader-login .pn-nav-dropdown-label pn-icon,.siteheader-topright>pn-marketweb-siteheader-login:is(a) pn-icon,.siteheader-topright>a .pn-nav-dropdown-label pn-icon,.siteheader-topright>a:is(a) pn-icon{margin-left:0.4em}}.siteheader-menu{max-width:100%;width:100%;overflow:visible;overflow-x:clip}@media screen and (min-width: 60em){.siteheader-menu{margin-top:auto;overflow:visible}}.siteheader-menu pn-mainnav-link a[target]::after{content:none}.siteheader-menu pn-marketweb-siteheader-search{padding:0.3rem 1.6rem;width:100%}.siteheader-menu [slot=top] pn-search-field{width:100%}.siteheader-menu-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.siteheader-menu-footer>*{margin:1.6rem}";var PnMarketwebSiteheader=function(){function e(e){registerInstance(this,e);this.changeLanguage=createEvent(this,"changeLanguage",7);this.changeMarket=createEvent(this,"changeMarket",7);this.endpointPath="/api/navigation/header";this.market=null;this.language=null;this.environment=null;this.userToken="";this.userFullname="";this.userLoggedin=false;this.endpoint=null;this.hideSiteSelector=false;this.hideLanguageSelector=false;this.hideSearch=false;this.hideLogin=false;this.AutocompleteEndpoint="";this.sessionForward=false;this.cache=false;this.spaMode=false;this.gotData=false;this.fetchingData=false;this.homePageLink="/";this.menuItems=[];this.search={AutocompleteEndpoint:this.AutocompleteEndpoint};this.siteSelector=null;this.languageSelector=null;this.languageOptions=[];this.loginDialog=null;this.minimizeSearch=false;this.loggedIn=false;this.fetchHelper=new FetchHelper("siteheader");this.loginManager=null}e.prototype.componentWillLoad=function(){var e=this;this.loginManager=new MarketWebLoginManager({eventTarget:this.hostElement});this.setInitialValues().then((function(){e.init()}))};e.prototype.setInitialValues=function(e){if(e===void 0){e=window.location.href}return __awaiter(this,void 0,void 0,(function(){var t,n,i,i,a,r;return __generator(this,(function(o){switch(o.label){case 0:n=new MarketWebContextService(e);if(!!this.market)return[3,2];return[4,n.getMarket()];case 1:i=o.sent();this.market=i;o.label=2;case 2:if(!!this.language)return[3,4];return[4,n.getLanguage()];case 3:i=o.sent();this.language=i;o.label=4;case 4:if(!!this.environment)return[3,6];a=this;return[4,n.getEnvironmentName()];case 5:a.environment=o.sent();o.label=6;case 6:if(!(!this.endpoint&&((t=this.environment)===null||t===void 0?void 0:t.indexOf("local"))===-1))return[3,8];r=this;return[4,n.getEndpoint(this.environment,this.market)];case 7:r.endpoint=o.sent();o.label=8;case 8:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.setTranslations();return[4,this.fetchData()];case 1:t.sent();window.setTimeout((function(){e.checkMenuOverflow()}),50);return[2]}}))}))};e.prototype.setTranslations=function(){if(this.language&&translations[this.language]){this.i18n=translations[this.language]}};e.prototype.onLanguageSelectorChange=function(e){this.language=e.detail;window.dispatchEvent(new CustomEvent("marketweb-languagechange",{detail:this.language}))};e.prototype.onLanguageChange=function(){this.setTranslations();this.changeLanguage.emit(this.language);this.fetchData()};e.prototype.onMarketChange=function(){this.changeMarket.emit(this.market);this.fetchData()};e.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:if(this.endpoint===null||!this.market||!this.language){return[2]}this.fetchingData=true;e=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;t="".concat(e).concat(this.endpointPath,"?market=").concat(this.market,"&language=").concat(this.language);return[4,this.fetchHelper.fetchJson(t,{mode:"cors"},this.cache,this.onFetchRefreshed.bind(this))];case 1:n=i.sent();return[4,this.setStateFromData(n)];case 2:i.sent();return[2]}}))}))};e.prototype.onFetchRefreshed=function(e){this.setStateFromData(e)};e.prototype.getLanguageVersionUrl=function(e){if(this.spaMode){return null}var t=document.querySelector('link[rel="alternate"][hreflang="'.concat(e.twoLetterISOLanguageName,'"]'));if(t){return t.getAttribute("href")}var n=this.siteDefinition.url;return n+(n.lastIndexOf("/")!==n.length-1?"/":"")+e.twoLetterISOLanguageName};e.prototype.setStateFromData=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,i;var a=this;return __generator(this,(function(r){switch(r.label){case 0:if(typeof e!=="object"){console.warn("Data was not valid",e)}this.siteDefinition=e.sitedefinition;this.menuItems=e.mainMenu.menuItems;if(!this.menuItems[0]||((t=this.menuItems[0])===null||t===void 0?void 0:t.name)!==this.i18n.menuHomeButton){this.menuItems.unshift({href:this.siteDefinition.url,name:this.i18n.menuHomeButton,id:"homelink",open:false,selected:false,children:[]})}this.search=Object.assign(Object.assign({},e.search),{AutocompleteEndpoint:this.AutocompleteEndpoint});this.siteSelector=e.siteSelectorViewModel;this.languageSelector=e.languageSelectorViewModel;this.setLanguageOptions();this.loginDialog=e.loginViewModel;return[4,this.spaModeAdjustments()];case 1:r.sent();this.gotData=true;this.fetchingData=true;this.homePageLink=(i=(n=this.siteDefinition)===null||n===void 0?void 0:n.url)!==null&&i!==void 0?i:document.location.hostname;window.setTimeout((function(){a.checkMenuOverflow()}),100);return[2]}}))}))};e.prototype.setLanguageOptions=function(){var e;if(!this.languageSelector||!this.languageSelector.languages){return}var t=(e=Array.prototype.slice.call(document.querySelectorAll('link[rel="alternate"][hreflang]')))!==null&&e!==void 0?e:[];var n=t.map((function(e){return e.getAttribute("hreflang")}));var i=[];this.languageSelector.languages.map((function(e){if(n&&n.length>0){if(n.includes(e.twoLetterISOLanguageName)){i.push(e)}}else{i.push(e)}}));this.languageOptions=i};e.prototype.spaModeAdjustments=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.spaMode){return[2]}return[2]}))}))};e.prototype.onLoginStateChange=function(e){var t,n,i;if(((t=e.detail)===null||t===void 0?void 0:t.loggedIn)&&((n=e.detail)===null||n===void 0?void 0:n.token)){this.loggedIn=((i=e.detail)===null||i===void 0?void 0:i.loggedIn)===true}};e.prototype.promotedItemId=function(e){return"promo-"+e.linkText.replace(/[^A-Za-z0-9.\\\/]/gim,"")};e.prototype.handleResize=function(){var e=this;requestAnimationFrame((function(){e.checkMenuOverflow()}))};e.prototype.checkMenuOverflow=function(){var e=this.hostElement.querySelectorAll(".siteheader-row")[1];if(!e){return}var t=e.querySelector("pn-mainnav-level");if(!t){return}var n=t.parentElement;if(n.tagName.toLocaleLowerCase()!=="nav"){return}var i=n.scrollWidth;var a=t.clientWidth;var r=i<a;if(r&&this.minimizeSearch===false){this.minimizeSearch=true}};e.prototype.adjustSiteSelectorUrl=function(e){if(!this.loggedIn){return e}var t=["portal.postnord.com"];var n=t.filter((function(t){return e.indexOf(t)!==-1}));if(n.length===0){return e}return this.loginManager.getLoginUrl(e)};e.prototype.render=function(){var e=this;var t,n,i,a,r,o;return h(Host,{language:this.language,market:this.market,environment:this.environment},h("header",null,h("div",{class:"siteheader-row"},h("div",{class:"siteheader-topleft"},h("slot",{name:"topleft"}),this.gotData&&this.siteSelector&&!this.hideSiteSelector&&h("pn-site-selector",{language:this.language,buttontext:(n=(t=this.siteSelector)===null||t===void 0?void 0:t.currentSiteTitle)!==null&&n!==void 0?n:"postnord"},this.gotData&&((i=this.siteSelector)===null||i===void 0?void 0:i.currentSiteTitle)&&h("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle+" ",description:this.siteSelector.currentSiteDescription}),this.gotData&&((a=this.siteSelector)===null||a===void 0?void 0:a.siteSelections)&&this.siteSelector.siteSelections.map((function(t){return h("pn-site-selector-item",{heading:t.linkText+" ",description:t.linkDescription,url:e.adjustSiteSelectorUrl(t.href),newwindow:t.openInNewWindow})})))),h("div",{class:"siteheader-logocontainer"},h("a",{href:this.homePageLink,title:"Home",class:"siteheader-logolink"},h("slot",{name:"logo"},h("svg",{class:"siteheader-logo",xmlns:"http://www.w3.org/2000/svg",width:"12.7rem",height:"2.4rem",viewBox:"0 0 141.73 26.65"},h("path",{d:"M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z",fill:"#00A0D6",transform:"translate(0 0)"}))))),h("div",{class:"siteheader-topright"},h("slot",{name:"toprightstart"}),this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{token:this.userToken,fullname:this.userFullname,loggedin:this.userLoggedin,loginDialog:this.loginDialog,endpoint:this.endpoint,i18n:this.i18n}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),h("slot",{name:"toprightend"}))),h("div",{class:"siteheader-row"},h("div",{class:"siteheader-menu"},this.gotData&&this.menuItems&&h("pn-mainnav",{market:this.market,language:this.language,onMenuOpenChange:function(e){document.body.setAttribute("data-siteheader-menuopen",e.detail+"")}},h("pn-mainnav-level",null,h("pn-mainnav-list",null,this.menuItems.map((function(t){var n,i;return h("pn-mainnav-link",{name:t.name,href:t.href,itemid:t.id,target:(n=t.linkTarget)!==null&&n!==void 0?n:"_self",linkid:t.trackingId},(t.promotedMenuItems&&t.promotedMenuItems.length>0||t.children&&t.children.length>0)&&h("pn-mainnav-level",null,t.children.length>0&&h("pn-mainnav-list",{heading:(i=t.navigationHeading)!==null&&i!==void 0?i:""},t.children.map((function(e){var t;return h("pn-mainnav-link",{name:e.name,href:e.href,target:(t=e.linkTarget)!==null&&t!==void 0?t:"_self",linkid:e.trackingId})}))),t.promotedMenuItems&&t.promotedMenuItems.length>0&&h("pn-mainnav-list",{heading:t.promotedMenuItemsHeader},t.promotedMenuItems.map((function(n){return h("pn-mainnav-link",{href:n.href,name:n.linkText,target:n.openInNewWindow?"_blank":"_self",linkid:e.promotedItemId(n)+t.id})})))))}))),h("div",{slot:"footer",class:"siteheader-menu-footer"},this.gotData&&this.loginDialog&&!this.hideLogin&&h("pn-marketweb-siteheader-login",{emitEvents:false,loginDialog:this.loginDialog,endpoint:this.endpoint,fullname:this.userFullname,loggedin:this.userLoggedin,i18n:this.i18n}),this.gotData&&this.languageOptions&&this.languageOptions.length&&!this.hideLanguageSelector&&h("pn-language-selector",{value:this.language},this.languageOptions.map((function(t){return h("pn-language-selector-option",{name:t.nativeName,code:t.twoLetterISOLanguageName,selected:t.isCurrent,url:e.getLanguageVersionUrl(t)})}))),!this.hideSiteSelector&&h("pn-site-selector",{language:this.language},this.gotData&&((r=this.siteSelector)===null||r===void 0?void 0:r.currentSiteTitle)&&h("pn-site-selector-item",{heading:this.siteSelector.currentSiteTitle,description:this.siteSelector.currentSiteDescription}),this.gotData&&((o=this.siteSelector)===null||o===void 0?void 0:o.siteSelections)&&this.siteSelector.siteSelections.map((function(e){return h("pn-site-selector-item",{heading:e.linkText,description:e.linkDescription,url:e.pageLink,newwindow:e.openInNewWindow})})))),h("div",{slot:"top",class:"siteheader-menu-top"},h("pn-marketweb-siteheader-search",{language:this.language,search:this.search,"hide-search":this.hideSearch,i18n:this.i18n}))))),h("pn-marketweb-siteheader-search",{language:this.language,primary:true,search:this.search,"hide-search":this.hideSearch,"show-only-link":this.minimizeSearch,i18n:this.i18n}))))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["onLanguageChange"],market:["onMarketChange"]}},enumerable:false,configurable:true});return e}();PnMarketwebSiteheader.style=pnMarketwebSiteheaderCss;export{PnMarketwebSiteheader as pn_marketweb_siteheader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";var pnProductCardCss='pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:"" !important}pn-product-card [slot=title] [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=title] [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=title] [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=title] [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card [slot=title]>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card [slot=title]>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card [slot=title]>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card [slot=title] .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card [slot=title] .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=title] [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:0.6em;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=title] [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=title] [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=title] [slot=mobiledownload]{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card [slot=title] [slot=mobiledownload] #riktiga{-ms-flex-order:4;order:4;margin-top:1em}pn-product-card [slot=title] [slot=mobiledownload] #riktiga>div>a::after{content:"" !important}pn-product-card [slot=title] [slot=mobiledownload] .riktigaAndroidImg{width:6em;margin:0.5em}pn-product-card [slot=title] [slot=mobiledownload] .riktigaAppleImg{width:5.6em;margin:0.5em}pn-product-card [slot=title] [slot=mobiledownload] a{text-decoration:none;color:#005D92}pn-product-card [slot=title] [slot=mobiledownload] a h3{text-decoration:underline}pn-product-card [slot=title] [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:2;flex-grow:2;-ms-flex-align:end;align-items:flex-end;text-align:center}@media screen and (min-width: 36em){pn-product-card [slot=title] [slot=servicepoint]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=title] [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=title] .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 [slot=title] .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card [slot=title] .info>*{min-width:6em;margin:0.5em 1em 0.5em 0}';var PnProductCard=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){return h(Host,null,h("slot",{name:"illustration"}),h("div",{class:"cardcontent"},h("div",{class:"details"},h("slot",{name:"title"}),h("slot",{name:"content"}),h("div",{class:"info"},h("slot",null)),h("slot",{name:"note"}),h("slot",{name:"additionalUSP"})),h("div",{class:"cardprice"},h("slot",{name:"cardprice"}),h("slot",{name:"mobiledownload"}),h("slot",{name:"servicepoint"}))))};return t}();PnProductCard.style=pnProductCardCss;var pnProductCardInfoCss='pn-product-card-info{-ms-flex-item-align:center;align-self:center}.cardinfocontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;font-size:0.875em;gap:1.6rem}@media screen and (min-width: 36em){.cardinfocontent{-ms-flex-direction:row;flex-direction:row}}.cardinfocontent>div p{margin:0.25em 0.25em 0 0}.cardinfocontent-item{margin-top:0.5em}[slot=formatPre]{font-family:"PostNordSans", "Verdana";margin:0.5em 3em 0 0}[slot=formatPre]>strong{font-weight:bold}.cardinfoprice{display:-ms-flexbox;display:flex;font-size:1em;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}';var PnProductCardInfo=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){return this.label?h(Host,null,h("div",{class:"cardinfocontent"},this.text?h("pre",{slot:"formatPre"},this.text):null)):h(Host,null,h("div",{class:"cardinfocontent"},this.paket?h("div",{class:"cardinfocontent-item"},h("strong",null,"Maxmått:"),this.paket.split("/").map((function(t){return t.split(":").length>0?h("p",null,h("strong",null,t.split(":")[0]+": ")," ",t.split(":")[1]):h("p",null,t)}))):null,this.rulle?h("div",{class:"cardinfocontent-item"},h("strong",null,"Rulle:"),this.rulle.split("/").map((function(t){return t.split(":").length>0?h("p",null,h("strong",null,t.split(":")[0]+": ")," ",t.split(":")[1]):h("p",null,t)}))):null))};return t}();h("pn-icon",{symbol:"align-center",small:"false",color:"black"});PnProductCardInfo.style=pnProductCardInfoCss;var pnProductCardPriceCss="pn-product-card-price{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card-price span:last-child{display:inline-block;margin-left:0.2em}pn-product-card-price+pn-product-card-price{margin-right:0}pn-product-card-price pn-icon{display:inline-block;-ms-flex-item-align:center;align-self:center}pn-product-card-price .price{font-size:2.5em;font-weight:bold;-ms-flex-order:1;order:1}pn-product-card-price pn-button{min-width:12.8em;font-size:1.25;-ms-flex-order:2;order:2}@media screen and (min-width: 48em){pn-product-card-price pn-button{-ms-flex-order:3;order:3;margin-bottom:1.6rem}}pn-product-card-price p{font-weight:lighter;font-size:0.875em;-ms-flex-item-align:center;align-self:center;margin-top:0.8rem;-ms-flex-order:3;order:3}@media screen and (min-width: 48em){pn-product-card-price p{-ms-flex-order:2;order:2}}";var PnProductCardPrice=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){if(!this.amount){return}return this.url?h(Host,{id:this.linkid},h("div",{class:"price"},this.amount?h("span",null,this.amount):null,this.currency?h("span",null," "+this.currency):null),this.note?h("p",null,this.note):null,this.label?h("pn-button",{small:"true",icon:"open-in-new",appearance:"light",href:this.url,target:"_blank"},this.label):null):h(Host,null,h("div",{class:"price"},this.amount?h("span",null,this.amount):null,this.currency?h("span",null,this.currency):null))};return t}();PnProductCardPrice.style=pnProductCardPriceCss;var pnTitletagCss="pn-titletag{display:-ms-inline-flexbox;display:inline-flex;border-radius:0.4rem;height:2.5em;font-weight:normal;font-size:0.75em;text-align:center;vertical-align:bottom;padding:0.6rem;gap:0.6em}pn-titletag[color=green700]{color:#005E41;background:#DCF6E7}pn-titletag[color=blue700]{background:#E0F8FF;color:#005D92}";var PnTiletag=function(){function t(t){registerInstance(this,t);this.icon=null;this.color="green700"}t.prototype.render=function(){return h(Host,null,h("slot",null),this.icon?h("pn-icon",{symbol:this.icon,small:"false",color:this.color}):null)};Object.defineProperty(t.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PnTiletag.style=pnTitletagCss;export{PnProductCard as pn_product_card,PnProductCardInfo as pn_product_card_info,PnProductCardPrice as pn_product_card_price,PnTiletag as pn_titletag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{c as createStore}from"./index-7b21ecff.js";import{s as sendDirectUrl,a as stampShopUrl}from"./data-108a2820.js";var _a=createStore({i18n:{maxweightlabel:"",weightlabel:"",maxmeasurementlabel:"",sizeheading:"",senddirectcta:"",stampshopcta:""},market:{currency:""}}),state=_a.state,onChange=_a.onChange;var pnProductPricelistResultCss="";var PnFindProductPricelistResult=function(){function t(t){registerInstance(this,t);this.item=null;this.description=[];this.shownitems=[];this.showMeasurement=false;this.weightText=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){if(this.item.description){this.description=this.item.description.split("#bullet").filter((function(t){return t!==""}))}this.showMeasurement=this.item.maxmått!==null||this.item.rulle!==null;this.shownitems=[this.item]};t.prototype.render=function(){var t=this;return h(Host,null,this.shownitems.map((function(e){return h("pn-product-card",{"data-productid":e.id},h("pn-illustration",{slot:"illustration",illustration:t.item.illustration}),h("div",{slot:"title"},h("h2",null,e.name," "),t.item.highestrankusp?t.item.highestrankusp==="Billigast"?h("
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-5397620b.js";import{c as createStore}from"./index-7b21ecff.js";import{s as sendDirectUrl,a as stampShopUrl}from"./data-108a2820.js";var _a=createStore({i18n:{maxweightlabel:"",weightlabel:"",maxmeasurementlabel:"",sizeheading:"",senddirectcta:"",stampshopcta:""},market:{currency:""}}),state=_a.state,onChange=_a.onChange;var pnProductPricelistResultCss="";var PnFindProductPricelistResult=function(){function t(t){registerInstance(this,t);this.item=null;this.description=[];this.shownitems=[];this.showMeasurement=false;this.weightText=""}t.prototype.componentWillLoad=function(){this.composeItems()};t.prototype.composeItems=function(){if(this.item.description){this.description=this.item.description.split("#bullet").filter((function(t){return t!==""}))}this.showMeasurement=this.item.maxmått!==null||this.item.rulle!==null;this.shownitems=[this.item]};t.prototype.render=function(){var t=this;return h(Host,null,this.shownitems.map((function(e){return h("pn-product-card",{"data-productid":e.id},h("pn-illustration",{slot:"illustration",illustration:t.item.illustration}),h("div",{slot:"title"},h("h2",null,e.name," "),t.item.highestrankusp?t.item.highestrankusp==="Billigast"?h("pn-titletag",{slot:"Billigast",icon:"box-label"},t.item.highestrankusp):h("pn-titletag",{slot:"Snabbast",icon:"bolt",color:"blue700"},t.item.highestrankusp):null),h("div",{slot:"content"},h("div",{class:"content"},t.item.description?h("div",{class:"description"},t.description.map((function(t){return h("li",null,t)}))):null,t.item.info?h("div",{class:"description"},t.item.info):null)),t.item.note?h("small",{slot:"note"},h("p",null,t.item.note)):null,t.item.additionalusp?h("div",{slot:"additionalUSP"}):null,t.showMeasurement?h("pn-product-card-info",{paket:t.item.maxmått,rulle:t.item.rulle}):null,h("div",{slot:"cardprice"},t.item.pricesenddirect?h("pn-product-card-price",{slot:"sendDirectPrice",label:state.i18n.senddirectcta,amount:t.item.pricesenddirect+"",currency:state.market.currency,url:sendDirectUrl,service:t.item.name+"-portal"}):null,t.item.pricestamps?h("pn-product-card-price",{slot:"stampPrice",label:state.i18n.stampshopcta,amount:t.item.pricestamps+"",currency:state.market.currency,url:stampShopUrl,service:t.item.name+"-eshop"}):null))})))};Object.defineProperty(t,"watchers",{get:function(){return{item:["composeItems"]}},enumerable:false,configurable:true});return t}();PnFindProductPricelistResult.style=pnProductPricelistResultCss;export{PnFindProductPricelistResult as pn_product_pricelist_result};
|