@postnord/pn-marketweb-components 2.0.23-beta3 → 2.0.23-beta6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-customernumber-selector-option.cjs.entry.js +2 -2
- package/cjs/pn-customernumber-selector.cjs.entry.js +3 -3
- package/cjs/pn-find-price-result.cjs.entry.js +5 -5
- package/cjs/pn-find-price.cjs.entry.js +7 -5
- package/cjs/pn-language-selector_9.cjs.entry.js +51 -59
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +72 -0
- package/cjs/pn-marketweb-siteheader-login-links_2.cjs.entry.js +186 -0
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +26 -7
- package/cjs/pn-product-card_4.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector-option.cjs.entry.js +2 -2
- package/collection/collection-manifest.json +3 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +22 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +149 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/{pn-marketweb-siteheader-profileselection.css → pn-marketweb-siteheader-login-links.css} +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +199 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.css +93 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +269 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.css +0 -17
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +79 -72
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +24 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +69 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/translations.js +20 -5
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +4 -4
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +7 -7
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.stories.js +3 -3
- package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +4 -4
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +5 -5
- package/collection/components/widgets/pn-find-price/pn-find-price.js +7 -5
- package/collection/components/widgets/pn-product-card/pn-product-card.css +1 -0
- package/custom-elements/index.d.ts +16 -4
- package/custom-elements/index.js +294 -185
- package/esm/loader.js +1 -1
- package/esm/pn-customernumber-selector-option.entry.js +2 -2
- package/esm/pn-customernumber-selector.entry.js +3 -3
- package/esm/pn-find-price-result.entry.js +5 -5
- package/esm/pn-find-price.entry.js +7 -5
- package/esm/pn-language-selector_9.entry.js +51 -59
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js +68 -0
- package/esm/pn-marketweb-siteheader-login-links_2.entry.js +181 -0
- package/esm/pn-marketweb-siteheader.entry.js +26 -7
- package/esm/pn-product-card_4.entry.js +1 -1
- package/esm/pn-profile-selector-option.entry.js +2 -2
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
- package/esm-es5/pn-customernumber-selector.entry.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_4.entry.js +1 -1
- package/esm-es5/pn-profile-selector-option.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-04240175.entry.js +1 -0
- package/pn-market-web-components/p-08411f5e.entry.js +1 -0
- package/pn-market-web-components/{p-77887623.system.entry.js → p-1924152a.system.entry.js} +1 -1
- package/pn-market-web-components/p-1f2d9304.entry.js +1 -0
- package/pn-market-web-components/p-2ac481d7.entry.js +1 -0
- package/pn-market-web-components/{p-4cea6bf3.system.entry.js → p-2afc5570.system.entry.js} +1 -1
- package/pn-market-web-components/p-5cc29b6e.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-6ce5a56d.system.entry.js +1 -0
- package/pn-market-web-components/p-77c9b601.entry.js +1 -0
- package/pn-market-web-components/p-8a763bfd.system.entry.js +1 -0
- package/pn-market-web-components/{p-2a7e6d3a.system.entry.js → p-93cecc43.system.entry.js} +1 -1
- package/pn-market-web-components/p-a7bb94a0.entry.js +1 -0
- package/pn-market-web-components/p-ba41a7c0.system.entry.js +1 -0
- package/pn-market-web-components/p-c5a97974.entry.js +1 -0
- package/pn-market-web-components/{p-7f5bee11.entry.js → p-dc1827a6.entry.js} +1 -1
- package/pn-market-web-components/p-e32dc098.entry.js +1 -0
- package/pn-market-web-components/p-e66a8bb8.system.entry.js +1 -0
- package/pn-market-web-components/{p-ddbd131f.system.entry.js → p-e6fa11ad.system.entry.js} +1 -1
- package/pn-market-web-components/p-ec96434c.system.entry.js +1 -0
- package/pn-market-web-components/{p-e23a18f4.system.entry.js → p-f7d1c0a0.system.entry.js} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.d.ts +13 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.d.ts +14 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.d.ts +20 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +6 -4
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +21 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts +4 -2
- package/types/components/layout-components/pn-marketweb-siteheader/translations.d.ts +15 -0
- package/types/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.d.ts +1 -1
- package/types/components/profile/pn-customernumber-selector/pn-customernumber-selector.d.ts +1 -1
- package/types/components/profile/pn-profile-selector/pn-profile-selector-option.d.ts +1 -1
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +1 -1
- package/types/components.d.ts +89 -45
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/cjs/pn-marketweb-siteheader-profileselection.cjs.entry.js +0 -161
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.js +0 -319
- package/esm/pn-marketweb-siteheader-profileselection.entry.js +0 -157
- package/esm-es5/pn-marketweb-siteheader-profileselection.entry.js +0 -1
- package/pn-market-web-components/p-39c42017.entry.js +0 -1
- package/pn-market-web-components/p-3a4b70d1.system.entry.js +0 -1
- package/pn-market-web-components/p-47cf8713.system.entry.js +0 -1
- package/pn-market-web-components/p-63a2ba1c.entry.js +0 -1
- package/pn-market-web-components/p-7e294268.entry.js +0 -1
- package/pn-market-web-components/p-a26e5490.system.entry.js +0 -1
- package/pn-market-web-components/p-a94593a9.system.entry.js +0 -1
- package/pn-market-web-components/p-ac8285b4.entry.js +0 -1
- package/pn-market-web-components/p-b1685197.entry.js +0 -1
- package/pn-market-web-components/p-e08a29ff.entry.js +0 -1
- package/pn-market-web-components/p-ea39d576.entry.js +0 -1
- package/pn-market-web-components/p-fcea21cb.entry.js +0 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.d.ts +0 -28
package/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter.cjs",[[4,"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.cjs",[[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.cjs",[[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-customernumber-selector.cjs",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"
|
|
17
|
+
return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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"],"showProfileSelection":[1540,"show-profile-selection"],"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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter.cjs",[[4,"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.cjs",[[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.cjs",[[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-customernumber-selector.cjs",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"heading":[1],"description":[1],"i18n":[32]}]]],["pn-customernumber-selector-option.cjs",[[4,"pn-customernumber-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["pn-filter-checkbox.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search.cjs",[[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.cjs",[[4,"pn-product-tile"]]],["pn-profile-selector.cjs",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"heading":[1],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option.cjs",[[0,"pn-profile-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["pn-sidenav.cjs",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level.cjs",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link.cjs",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-find-service-and-price-result.cjs",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level.cjs",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input.cjs",[[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.cjs",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32]}]]],["pn-site-footer_2.cjs",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button.cjs",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link.cjs",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-marketweb-siteheader-login-linklist.cjs",[[0,"pn-marketweb-siteheader-login-linklist",{"heading":[1],"links":[16],"idNamespace":[1,"id-namespace"],"loginManager":[16]}]]],["pn-marketweb-siteheader-login-links_2.cjs",[[0,"pn-marketweb-siteheader-login-links",{"loginDialog":[1040],"loginManager":[16],"idNamespace":[1,"id-namespace"],"loggedin":[516],"username":[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{"loginDialog":[1040],"loginManager":[16],"endpoint":[1],"loggedin":[4],"idNamespace":[1,"id-namespace"],"heading":[1],"i18n":[16],"profileSelectorDialog":[16],"user":[32],"logoutLink":[32]}]]],["pn-product-tile-info_2.cjs",[[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.cjs",[[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[16],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"showProfileSelection":[1028,"show-profile-selection"],"loginManager":[32],"loginLinks":[32],"toggleButtonText":[32],"username":[32]}],[4,"pn-mainnav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"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]}]]],["pn-product-card_4.cjs",[[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"]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -9,12 +9,12 @@ const pnCustomernumberSelectorOptionCss = "pn-customernumber-selector-option{dis
|
|
|
9
9
|
let PnProfileSelectorOption = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
|
-
this.
|
|
12
|
+
this.heading = "";
|
|
13
13
|
this.description = "";
|
|
14
14
|
this.url = "";
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (index.h(index.Host, null, index.h("a", { class: "customernumberoption", href: this.url }, index.h("span", { class: "customernumberoption-text" }, index.h("span", { class: "customernumberoption-title" }, this.
|
|
17
|
+
return (index.h(index.Host, null, index.h("a", { class: "customernumberoption", href: this.url }, index.h("span", { class: "customernumberoption-text" }, index.h("span", { class: "customernumberoption-title" }, this.heading), index.h("span", { class: "customernumberoption-description" }, this.description), index.h("slot", null)))));
|
|
18
18
|
}
|
|
19
19
|
get hostElement() { return index.getElement(this); }
|
|
20
20
|
};
|
|
@@ -32,8 +32,8 @@ let PnCustomernumberSelector = class {
|
|
|
32
32
|
index.registerInstance(this, hostRef);
|
|
33
33
|
this.language = "sv";
|
|
34
34
|
this.open = false;
|
|
35
|
-
this.
|
|
36
|
-
this.description = "
|
|
35
|
+
this.heading = "";
|
|
36
|
+
this.description = "";
|
|
37
37
|
this.i18n = translations["en"];
|
|
38
38
|
}
|
|
39
39
|
componentWillLoad() {
|
|
@@ -48,7 +48,7 @@ let PnCustomernumberSelector = class {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (index.h(index.Host, null, index.h("div", { class: "customernumber-container" }, index.h("button", { class: "customernumber-toggle", "aria-label": this.i18n.toggleLinkTitleText, onClick: () => this.open = !this.open }, index.h("div", { class: "customernumber-selected" }, index.h("strong", { class: "customernumber-selected-title" }, this.
|
|
51
|
+
return (index.h(index.Host, null, index.h("div", { class: "customernumber-container" }, index.h("button", { class: "customernumber-toggle", "aria-label": this.i18n.toggleLinkTitleText, onClick: () => this.open = !this.open }, index.h("div", { class: "customernumber-selected" }, index.h("strong", { class: "customernumber-selected-title" }, this.heading), index.h("div", { class: "customernumber-selected-description" }, this.description)), index.h("pn-icon", { symbol: this.open ? 'angle-up' : 'angle-down', small: "false", color: "blue700" })), index.h("div", { class: "customernumber-options" }, index.h("slot", null)))));
|
|
52
52
|
}
|
|
53
53
|
get hostElement() { return index.getElement(this); }
|
|
54
54
|
};
|
|
@@ -37,10 +37,10 @@ let PnfindPriceResult = class {
|
|
|
37
37
|
}
|
|
38
38
|
this.showMeasurement = (this.item.maxmått !== null) || (this.item.rulle !== null);
|
|
39
39
|
this.linkId = `${this.item.id}-${this.item.name.toLocaleLowerCase().replace(/[^a-zA-Z0-9]/g, '')}`;
|
|
40
|
-
var
|
|
41
|
-
this.shopLabel =
|
|
42
|
-
this.shopUrl =
|
|
43
|
-
this.shopId =
|
|
40
|
+
var showServicepointLink = (this.item.ombudpurchase === "Yes");
|
|
41
|
+
this.shopLabel = showServicepointLink ? pnFindPriceStore.state.i18n.ombudHeader : pnFindPriceStore.state.i18n.stampshopcta;
|
|
42
|
+
this.shopUrl = showServicepointLink ? pnFindPriceStore.state.market.servicePoint : data.stampShopUrl;
|
|
43
|
+
this.shopId = showServicepointLink ? '-servicepoint' : '-stampshop';
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
return (index.h(index.Host, null, index.h("pn-product-card", { "data-productid": this.item.id }, index.h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), index.h("div", { slot: "title" }, this.item.infopagelink ?
|
|
@@ -49,7 +49,7 @@ let PnfindPriceResult = class {
|
|
|
49
49
|
(index.h("pn-titletag", { slot: "Snabbast", icon: "bolt", color: "blue700" }, this.item.highestrankusp))
|
|
50
50
|
: (this.item.highestrankusp === "Billigast") ?
|
|
51
51
|
(index.h("pn-titletag", { slot: "Billigast", icon: "box-label", color: "green700" }, this.item.highestrankusp))
|
|
52
|
-
: null), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, (this.item.description) ? (index.h("div", { class: "description" }, this.description.map((desc) => (index.h("li", null, desc))))) : null, (this.item.info) ? (index.h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (index.h("
|
|
52
|
+
: null), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, (this.item.description) ? (index.h("div", { class: "description" }, this.description.map((desc) => (index.h("li", null, desc))))) : null, (this.item.info) ? (index.h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (index.h("div", { slot: "note" }, index.h("p", null, this.item.note))) : null, this.item.additionalusp ? (index.h("div", { slot: "additionalUSP" }, this.Usp1 ? (index.h("span", null, this.Usp1)) : null, this.Usp2 ? (index.h("span", null, this.Usp2)) : null, this.Usp3 ? (index.h("span", null, this.Usp3)) : null)) : null, this.showMeasurement ?
|
|
53
53
|
(index.h("pn-product-card-info", { paket: this.item.maxmått, rulle: this.item.rulle })) : null, index.h("div", { slot: "cardprice" }, this.item.pricesenddirect ? (index.h("pn-product-card-price", { slot: "sendDirectPrice", label: pnFindPriceStore.state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: pnFindPriceStore.state.market.currency, url: data.sendDirectUrl, linkid: this.linkId + '-portal' })) : null, this.item.pricestamps ? ((this.item.name.toLocaleLowerCase() !== "riktiga vykort") ?
|
|
54
54
|
(index.h("pn-product-card-price", { slot: "stampPrice", label: this.shopLabel, amount: this.item.pricestamps + '', currency: pnFindPriceStore.state.market.currency, url: this.shopUrl, linkid: this.linkId + this.shopId })) :
|
|
55
55
|
(index.h("pn-product-card-price", { slot: "riktiga", label: pnFindPriceStore.state.i18n.riktigaVykort, amount: this.item.pricestamps + '', currency: pnFindPriceStore.state.market.currency, url: data.RiktigaValues["WebUrl"], linkid: this.linkId + '-riktiga' }))) : null), index.h("div", { slot: "servicepoint" }, (this.item.showservicepointlink) ? (index.h("a", { href: pnFindPriceStore.state.market.servicePoint, target: "_blank" }, index.h("pn-icon", { symbol: "map-marker", color: "blue700" }), pnFindPriceStore.state.i18n.servicePointLink)) : null), index.h("div", { slot: "mobiledownload" }, (this.item.name.toLocaleLowerCase() === "riktiga vykort") ?
|
|
@@ -163,14 +163,16 @@ let PnfindPrice = class {
|
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
const sizeItemData = deliveryScopeData.filter((x) => x.sizecategory.toLocaleLowerCase() === this.sizecategory.value.toLocaleLowerCase());
|
|
166
|
-
if (this.weight
|
|
166
|
+
if (!this.weight) {
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
const comparisonWeight = this.weight.value <= 20 ? this.weight.value * 1000 : this.weight.value;
|
|
170
|
-
let
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
let weightFilteredData = sizeItemData.filter(x => (x.maxweight <= 20 ? x.maxweight * 1000 : x.maxweight) === comparisonWeight);
|
|
171
|
+
if (this.weightvalue !== 0) {
|
|
172
|
+
let clubbedProducts = sizeItemData.filter(x => x.maxweight.toString().includes("upto")).
|
|
173
|
+
filter(x => (Number(x.maxweight.toString().toLocaleLowerCase().replace("upto", '')) - comparisonWeight) >= 0);
|
|
174
|
+
weightFilteredData = weightFilteredData.concat(clubbedProducts);
|
|
175
|
+
}
|
|
174
176
|
if (weightFilteredData.length === 0 && this.weightvalue !== 0) {
|
|
175
177
|
weightFilteredData = sizeItemData.filter(x => (x.maxweight <= 20 ? x.maxweight * 1000 : x.maxweight) >= comparisonWeight);
|
|
176
178
|
if (weightFilteredData.length > 0) {
|
|
@@ -333,7 +333,7 @@ let PnMainnavList = class {
|
|
|
333
333
|
};
|
|
334
334
|
PnMainnavList.style = pnMainnavListCss;
|
|
335
335
|
|
|
336
|
-
const pnMarketwebSiteheaderLoginCss = "pn-marketweb-siteheader-login{padding:1rem 0;max-height:5.2rem;position:relative}pn-marketweb-siteheader-login
|
|
336
|
+
const pnMarketwebSiteheaderLoginCss = "pn-marketweb-siteheader-login{padding:1rem 0;max-height:5.2rem;position:relative}pn-marketweb-siteheader-login pn-nav-dropdown{display:none}pn-marketweb-siteheader-login.hydrated pn-nav-dropdown{display:block}";
|
|
337
337
|
|
|
338
338
|
let PnMarketwebSiteheaderLogin = class {
|
|
339
339
|
constructor(hostRef) {
|
|
@@ -343,12 +343,15 @@ let PnMarketwebSiteheaderLogin = class {
|
|
|
343
343
|
this.endpoint = "";
|
|
344
344
|
/** Access token passed from backend */
|
|
345
345
|
this.token = "";
|
|
346
|
+
this.i18n = { "searchlabel": "", "searchplaceholder": "", "searchbuttontext": "", "menuHomeButton": "", "menuGoBackButton": "", "mainMenuButton": "", "menuStartButton": "", "profileSelectionFlyoutHeading": "" };
|
|
346
347
|
this.emitEvents = true;
|
|
347
348
|
// Login dialog
|
|
348
349
|
this.loginDialog = null;
|
|
349
350
|
/** User Fullname */
|
|
350
351
|
this.fullname = "";
|
|
351
352
|
this.loggedin = false;
|
|
353
|
+
/** If this is selected we will show the new profile selection dropdown instead of the login version */
|
|
354
|
+
this.showProfileSelection = false;
|
|
352
355
|
this.loginManager = null;
|
|
353
356
|
this.toggleButtonText = "";
|
|
354
357
|
this.username = this.fullname;
|
|
@@ -372,6 +375,47 @@ let PnMarketwebSiteheaderLogin = class {
|
|
|
372
375
|
this.toggleButtonText = this.loginDialog.loginMenuLinkText;
|
|
373
376
|
this.loginManager.init(this.emitEvents);
|
|
374
377
|
this.setToggleButtonText();
|
|
378
|
+
this.adjustLoginLinks();
|
|
379
|
+
}
|
|
380
|
+
adjustLoginLinks() {
|
|
381
|
+
var _a, _b, _c;
|
|
382
|
+
if (!((_a = this.loginDialog) === null || _a === void 0 ? void 0 : _a.loginMenuLinks)) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const adjustLink = (link, i) => {
|
|
386
|
+
link.isLogoutLink = (link.href.indexOf('logout') !== -1);
|
|
387
|
+
if (link.isLogoutLink) {
|
|
388
|
+
link.href = this.loginManager.getLogoutUrl(link.href.replace('logout', '').replace('http://window.location.href/?', '').replace('https://window.location.href/?', ''));
|
|
389
|
+
}
|
|
390
|
+
if (i === 0 && !link.href) {
|
|
391
|
+
link.href = this.loginManager.getLoginUrl();
|
|
392
|
+
link.linkType = 'primary';
|
|
393
|
+
}
|
|
394
|
+
if (link.primaryLinkApperance && !link.linkType) {
|
|
395
|
+
link.linkType = 'primary';
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
(_b = this.loginDialog) === null || _b === void 0 ? void 0 : _b.loginMenuLinks.forEach(adjustLink);
|
|
399
|
+
(_c = this.loginDialog) === null || _c === void 0 ? void 0 : _c.loggedInLinks.forEach(adjustLink);
|
|
400
|
+
this.loginDialog.legacyLoginLinks = [
|
|
401
|
+
{
|
|
402
|
+
href: this.loginManager.getLoginUrl(this.loginDialog.loginUrl),
|
|
403
|
+
linkText: this.loginDialog.loginLinkText,
|
|
404
|
+
openInNewWindow: false,
|
|
405
|
+
isLogoutLink: false,
|
|
406
|
+
pageLink: null,
|
|
407
|
+
linkType: 'primary',
|
|
408
|
+
primaryLinkApperance: true
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
href: this.loginManager.getLoginUrl(this.loginDialog.registerUrl),
|
|
412
|
+
linkText: this.loginDialog.createLoginLinkText,
|
|
413
|
+
openInNewWindow: false,
|
|
414
|
+
isLogoutLink: false,
|
|
415
|
+
pageLink: null,
|
|
416
|
+
primaryLinkApperance: false
|
|
417
|
+
}
|
|
418
|
+
];
|
|
375
419
|
}
|
|
376
420
|
setUserName() {
|
|
377
421
|
const userInfo = this.loginManager.getUserInfo();
|
|
@@ -409,74 +453,22 @@ let PnMarketwebSiteheaderLogin = class {
|
|
|
409
453
|
this.setToggleButtonText();
|
|
410
454
|
}
|
|
411
455
|
}
|
|
412
|
-
uniqueId(text) {
|
|
413
|
-
return "loginlink-" + text.replace(/[^A-Za-z0-9.\\\/]/igm, "") + "-" + (this.emitEvents ? "1" : "2");
|
|
414
|
-
}
|
|
415
|
-
linkAppearanceAttributes(link) {
|
|
416
|
-
let attributes = {};
|
|
417
|
-
if (link.linkType) {
|
|
418
|
-
switch (link.linkType) {
|
|
419
|
-
case 'primary':
|
|
420
|
-
attributes = {
|
|
421
|
-
appearance: '',
|
|
422
|
-
variant: ''
|
|
423
|
-
};
|
|
424
|
-
break;
|
|
425
|
-
case 'secondary':
|
|
426
|
-
attributes = {
|
|
427
|
-
appearance: 'light',
|
|
428
|
-
variant: 'outlined'
|
|
429
|
-
};
|
|
430
|
-
break;
|
|
431
|
-
case 'regularlink':
|
|
432
|
-
default:
|
|
433
|
-
attributes = {
|
|
434
|
-
appearance: 'light',
|
|
435
|
-
variant: 'borderless',
|
|
436
|
-
icon: 'arrow-right'
|
|
437
|
-
};
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
return attributes;
|
|
441
|
-
}
|
|
442
|
-
if (!link.linkType) {
|
|
443
|
-
attributes = {
|
|
444
|
-
appearance: link.primaryLinkApperance ? "dark" : "light"
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
return attributes;
|
|
448
|
-
}
|
|
449
456
|
render() {
|
|
450
|
-
var _a, _b, _c;
|
|
451
457
|
if (!this.loginDialog) {
|
|
452
458
|
return;
|
|
453
459
|
}
|
|
454
460
|
let hostElementAttribute = {
|
|
455
|
-
username: null
|
|
461
|
+
username: null,
|
|
462
|
+
loggedin: 'false',
|
|
456
463
|
};
|
|
457
464
|
if (this.username) {
|
|
458
465
|
hostElementAttribute.username = this.username;
|
|
466
|
+
hostElementAttribute.loggedin = this.loggedin + '';
|
|
459
467
|
}
|
|
460
|
-
return (index.h(index.Host, Object.assign({}, hostElementAttribute), index.h("pn-nav-dropdown", { label: this.toggleButtonText, icon: "user", class: "siteheader-logindialog" },
|
|
461
|
-
index.h("
|
|
462
|
-
index.h("div", null, (_a = this.loginDialog.loginTitle) !== null && _a !== void 0 ? _a : index.h("strong", null, this.loginDialog.loginTitle), ((_b = this.loginDialog.loginMenuLinks) === null || _b === void 0 ? void 0 : _b.length) > 0 ?
|
|
463
|
-
index.h("ul", null, this.loginDialog.loginMenuLinks.map((link, i) => {
|
|
464
|
-
const href = (i === 0 && !link.href) ? this.loginManager.getLoginUrl() : link.href;
|
|
465
|
-
return (index.h("li", null, index.h("pn-button", Object.assign({ href: href, id: this.uniqueId(link.linkText) }, this.linkAppearanceAttributes(link), (link.openInNewWindow && { target: '_blank' })), link.linkText)));
|
|
466
|
-
}))
|
|
467
|
-
: (index.h("ul", null, index.h("li", null, index.h("pn-button", { href: this.loginManager.getLoginUrl(this.loginDialog.loginUrl), target: "_top" }, this.loginDialog.loginLinkText)), index.h("li", null, index.h("pn-button", { href: this.loginDialog.registerUrl, target: "_top", appearance: "light", variant: "outlined" }, this.loginDialog.createLoginLinkText)))))
|
|
468
|
-
:
|
|
469
|
-
index.h("div", null, index.h("ul", null, this.loginDialog.loggedInLinks.map((link) => {
|
|
470
|
-
const isLogoutLink = link.href.indexOf('logout') !== -1;
|
|
471
|
-
const href = (isLogoutLink) ? this.loginManager.getLogoutUrl(link.href.replace('logout', '').replace('http://window.location.href/?', '').replace('https://window.location.href/?', '')) : link.href;
|
|
472
|
-
return (index.h("li", null, index.h("pn-button", Object.assign({ href: href, id: this.uniqueId(link.linkText) }, (link.openInNewWindow && { target: '_blank' }), this.linkAppearanceAttributes(link), { onClick: () => {
|
|
473
|
-
if (isLogoutLink) {
|
|
474
|
-
this.loginManager.clearUserData();
|
|
475
|
-
}
|
|
476
|
-
} }), link.linkText)));
|
|
477
|
-
}))))
|
|
468
|
+
return (index.h(index.Host, Object.assign({}, hostElementAttribute), index.h("pn-nav-dropdown", { label: this.toggleButtonText, icon: "user", class: "siteheader-logindialog" }, this.loggedin && this.showProfileSelection ?
|
|
469
|
+
index.h("pn-marketweb-siteheader-login-profileselection", { loginDialog: this.loginDialog, loginManager: this.loginManager, loggedin: this.loggedin, i18n: this.i18n, idNamespace: this.emitEvents ? '1' : '2', endpoint: this.endpoint })
|
|
478
470
|
:
|
|
479
|
-
index.h("
|
|
471
|
+
index.h("pn-marketweb-siteheader-login-links", { loginDialog: this.loginDialog, loginManager: this.loginManager, loggedin: this.loggedin, idNamespace: this.emitEvents ? '1' : '2', username: this.username }))));
|
|
480
472
|
}
|
|
481
473
|
get hostElement() { return index.getElement(this); }
|
|
482
474
|
static get watchers() { return {
|
|
@@ -55,5 +55,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
patchBrowser().then(options => {
|
|
58
|
-
return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter.cjs",[[4,"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.cjs",[[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.cjs",[[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-customernumber-selector.cjs",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"
|
|
58
|
+
return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[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"],"showProfileSelection":[1540,"show-profile-selection"],"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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["pn-marketweb-sitefooter.cjs",[[4,"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.cjs",[[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.cjs",[[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-customernumber-selector.cjs",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"heading":[1],"description":[1],"i18n":[32]}]]],["pn-customernumber-selector-option.cjs",[[4,"pn-customernumber-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["pn-filter-checkbox.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-marketweb-search.cjs",[[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.cjs",[[4,"pn-product-tile"]]],["pn-profile-selector.cjs",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"heading":[1],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option.cjs",[[0,"pn-profile-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["pn-sidenav.cjs",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level.cjs",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link.cjs",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-find-service-and-price-result.cjs",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level.cjs",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-marketweb-input.cjs",[[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.cjs",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32]}]]],["pn-site-footer_2.cjs",[[4,"pn-site-footer",{"url":[1],"linktitle":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button.cjs",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link.cjs",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-marketweb-siteheader-login-linklist.cjs",[[0,"pn-marketweb-siteheader-login-linklist",{"heading":[1],"links":[16],"idNamespace":[1,"id-namespace"],"loginManager":[16]}]]],["pn-marketweb-siteheader-login-links_2.cjs",[[0,"pn-marketweb-siteheader-login-links",{"loginDialog":[1040],"loginManager":[16],"idNamespace":[1,"id-namespace"],"loggedin":[516],"username":[1]}],[0,"pn-marketweb-siteheader-login-profileselection",{"loginDialog":[1040],"loginManager":[16],"endpoint":[1],"loggedin":[4],"idNamespace":[1,"id-namespace"],"heading":[1],"i18n":[16],"profileSelectorDialog":[16],"user":[32],"logoutLink":[32]}]]],["pn-product-tile-info_2.cjs",[[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.cjs",[[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[16],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"showProfileSelection":[1028,"show-profile-selection"],"loginManager":[32],"loginLinks":[32],"toggleButtonText":[32],"username":[32]}],[4,"pn-mainnav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"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]}]]],["pn-product-card_4.cjs",[[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"]]]], options);
|
|
59
59
|
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3e27c79.js');
|
|
6
|
+
|
|
7
|
+
const pnMarketwebSiteheaderLoginLinklistCss = "pn-marketweb-siteheader-login-linklist{padding:1rem 0;max-height:5.2rem;position:relative}pn-marketweb-siteheader-login-linklist strong{padding:0.8rem 1.6rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}pn-marketweb-siteheader-login-linklist ul,pn-marketweb-siteheader-login-linklist li{list-style:none;margin:0;padding:0}pn-marketweb-siteheader-login-linklist li{padding:0.8rem 1.6rem}pn-marketweb-siteheader-login-linklist li pn-button{display:block;width:100%}";
|
|
8
|
+
|
|
9
|
+
let PnMarketwebSiteheaderLoginLinklist = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.heading = null;
|
|
13
|
+
this.links = [];
|
|
14
|
+
this.idNamespace = "";
|
|
15
|
+
this.loginManager = null;
|
|
16
|
+
}
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
}
|
|
19
|
+
uniqueId(text) {
|
|
20
|
+
return "loginlink-" + text.replace(/[^A-Za-z0-9.\\\/]/igm, "") + "-" + this.idNamespace;
|
|
21
|
+
}
|
|
22
|
+
linkAppearanceAttributes(link) {
|
|
23
|
+
let attributes = {};
|
|
24
|
+
if (link.linkType) {
|
|
25
|
+
switch (link.linkType) {
|
|
26
|
+
case 'primary':
|
|
27
|
+
attributes = {
|
|
28
|
+
appearance: '',
|
|
29
|
+
variant: ''
|
|
30
|
+
};
|
|
31
|
+
break;
|
|
32
|
+
case 'secondary':
|
|
33
|
+
attributes = {
|
|
34
|
+
appearance: 'light',
|
|
35
|
+
variant: 'outlined'
|
|
36
|
+
};
|
|
37
|
+
break;
|
|
38
|
+
case 'regularlink':
|
|
39
|
+
default:
|
|
40
|
+
attributes = {
|
|
41
|
+
appearance: 'light',
|
|
42
|
+
variant: 'borderless',
|
|
43
|
+
icon: 'arrow-right'
|
|
44
|
+
};
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
return attributes;
|
|
48
|
+
}
|
|
49
|
+
if (!link.linkType) {
|
|
50
|
+
attributes = {
|
|
51
|
+
appearance: link.primaryLinkApperance ? "dark" : "light"
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return attributes;
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
if (!this.links || this.links.length === 0) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
return (index.h(index.Host, null, this.heading ? index.h("strong", null, this.heading) : null, index.h("ul", null, this.links.map((link) => {
|
|
61
|
+
return (index.h("li", null, index.h("pn-button", Object.assign({ href: link.href, id: this.uniqueId(link.linkText) }, (link.openInNewWindow && { target: '_blank' }), this.linkAppearanceAttributes(link), { onClick: () => {
|
|
62
|
+
if (link.isLogoutLink) {
|
|
63
|
+
this.loginManager.clearUserData();
|
|
64
|
+
}
|
|
65
|
+
} }), link.linkText)));
|
|
66
|
+
}))));
|
|
67
|
+
}
|
|
68
|
+
get hostElement() { return index.getElement(this); }
|
|
69
|
+
};
|
|
70
|
+
PnMarketwebSiteheaderLoginLinklist.style = pnMarketwebSiteheaderLoginLinklistCss;
|
|
71
|
+
|
|
72
|
+
exports.pn_marketweb_siteheader_login_linklist = PnMarketwebSiteheaderLoginLinklist;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3e27c79.js');
|
|
6
|
+
|
|
7
|
+
const pnMarketwebSiteheaderLoginLinksCss = "";
|
|
8
|
+
|
|
9
|
+
let PnMarketwebSiteheaderLoginLinks = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
// Login dialog
|
|
13
|
+
this.loginDialog = null;
|
|
14
|
+
this.loginManager = null;
|
|
15
|
+
this.idNamespace = "";
|
|
16
|
+
this.loggedin = false;
|
|
17
|
+
this.username = "";
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.init();
|
|
21
|
+
console.log('from links', this.loggedin);
|
|
22
|
+
}
|
|
23
|
+
async init() {
|
|
24
|
+
this.adjustLoginLinks();
|
|
25
|
+
}
|
|
26
|
+
adjustLoginLinks() {
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
if (!this.loginDialog) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const adjustLink = (link, i) => {
|
|
32
|
+
link.isLogoutLink = (link.href.indexOf('logout') !== -1);
|
|
33
|
+
if (link.isLogoutLink) {
|
|
34
|
+
link.href = this.loginManager.getLogoutUrl(link.href.replace('logout', '').replace('http://window.location.href/?', '').replace('https://window.location.href/?', ''));
|
|
35
|
+
}
|
|
36
|
+
if (i === 0 && !link.href) {
|
|
37
|
+
link.href = this.loginManager.getLoginUrl();
|
|
38
|
+
link.linkType = 'primary';
|
|
39
|
+
}
|
|
40
|
+
if (link.primaryLinkApperance && !link.linkType) {
|
|
41
|
+
link.linkType = 'primary';
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
if ((_a = this.loginDialog) === null || _a === void 0 ? void 0 : _a.loginMenuLinks) {
|
|
45
|
+
(_b = this.loginDialog) === null || _b === void 0 ? void 0 : _b.loginMenuLinks.forEach(adjustLink);
|
|
46
|
+
}
|
|
47
|
+
if ((_c = this.loginDialog) === null || _c === void 0 ? void 0 : _c.loggedInLinks) {
|
|
48
|
+
(_d = this.loginDialog) === null || _d === void 0 ? void 0 : _d.loggedInLinks.forEach(adjustLink);
|
|
49
|
+
}
|
|
50
|
+
this.loginDialog.legacyLoginLinks = [
|
|
51
|
+
{
|
|
52
|
+
href: this.loginManager.getLoginUrl(this.loginDialog.loginUrl),
|
|
53
|
+
linkText: this.loginDialog.loginLinkText,
|
|
54
|
+
openInNewWindow: false,
|
|
55
|
+
isLogoutLink: false,
|
|
56
|
+
pageLink: null,
|
|
57
|
+
linkType: 'primary',
|
|
58
|
+
primaryLinkApperance: true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
href: this.loginManager.getLoginUrl(this.loginDialog.registerUrl),
|
|
62
|
+
linkText: this.loginDialog.createLoginLinkText,
|
|
63
|
+
openInNewWindow: false,
|
|
64
|
+
isLogoutLink: false,
|
|
65
|
+
pageLink: null,
|
|
66
|
+
primaryLinkApperance: false
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
var _a;
|
|
72
|
+
if (!this.loginDialog) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
let hostElementAttribute = {
|
|
76
|
+
username: null,
|
|
77
|
+
loggedin: false,
|
|
78
|
+
};
|
|
79
|
+
if (this.username) {
|
|
80
|
+
hostElementAttribute.username = this.username;
|
|
81
|
+
hostElementAttribute.loggedin = this.loggedin;
|
|
82
|
+
}
|
|
83
|
+
return (index.h(index.Host, Object.assign({}, hostElementAttribute), (!this.loginDialog.overrideLoginMenu) ?
|
|
84
|
+
index.h("div", { "data-loggedin": this.loggedin + '' }, (this.loggedin) ?
|
|
85
|
+
index.h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })
|
|
86
|
+
:
|
|
87
|
+
index.h("div", null, ((_a = this.loginDialog.loginMenuLinks) === null || _a === void 0 ? void 0 : _a.length) > 0 ?
|
|
88
|
+
index.h("pn-marketweb-siteheader-login-linklist", { heading: this.loginDialog.loginTitle, links: this.loginDialog.loginMenuLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })
|
|
89
|
+
:
|
|
90
|
+
index.h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.legacyLoginLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })))
|
|
91
|
+
: null, (this.loginDialog.overrideLoginMenu) ?
|
|
92
|
+
index.h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loginMenuLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })
|
|
93
|
+
: null));
|
|
94
|
+
}
|
|
95
|
+
get hostElement() { return index.getElement(this); }
|
|
96
|
+
static get watchers() { return {
|
|
97
|
+
"loginDialog": ["init"]
|
|
98
|
+
}; }
|
|
99
|
+
};
|
|
100
|
+
PnMarketwebSiteheaderLoginLinks.style = pnMarketwebSiteheaderLoginLinksCss;
|
|
101
|
+
|
|
102
|
+
const pnMarketwebSiteheaderLoginProfileselectionCss = ".pn-marketweb-siteheader-login-profileselection-heading{display:block;padding:0.5rem 0 1rem}.pn-marketweb-siteheader-login-profileselection-user,.pn-marketweb-siteheader-login-profileselection-currentprofile{margin-top:1rem;margin-bottom:1rem}.pn-marketweb-siteheader-login-profileselection-user-name,.pn-marketweb-siteheader-login-profileselection-currentprofile-name{line-height:1}.pn-marketweb-siteheader-login-profileselection-user-description,.pn-marketweb-siteheader-login-profileselection-currentprofile-description{font-weight:400;white-space:normal;word-break:break-all;color:#5E554A;font-size:0.75em}.pn-marketweb-siteheader-login-profileselection-divider{height:1rem;width:100%;background:#00A0D6;position:relative;margin-left:-1em;margin-top:1.6rem;margin-bottom:1.6rem;border-radius:0 0.6em 0.6em 0;padding:0}.pn-marketweb-siteheader-login-profileselection-divider::after{content:\"\";width:0.6em;height:0.6em;border-radius:50%;position:absolute;right:0;top:0;background:inherit;-webkit-transform:translateX(calc(100% + 0.2em));transform:translateX(calc(100% + 0.2em))}.pn-marketweb-siteheader-login-profileselection-profileoption-link{display:-ms-flexbox;display:flex;background:#FFFFFF;-webkit-transition:background 0.15s ease-in-out;transition:background 0.15s ease-in-out;margin:0 -1em;padding:0.6rem 1.6rem;text-decoration:none;color:#005D92;-ms-flex-align:center;align-items:center}.pn-marketweb-siteheader-login-profileselection-profileoption-link:hover,.pn-marketweb-siteheader-login-profileselection-profileoption-link:focus,.pn-marketweb-siteheader-login-profileselection-profileoption-link:active{background:#F3F2F2}.pn-marketweb-siteheader-login-profileselection-profileoption-content{-ms-flex-positive:1;flex-grow:1}.pn-marketweb-siteheader-login-profileselection-profileoption-name{font-weight:700}.pn-marketweb-siteheader-login-profileselection-profileoption-description{font-weight:400;white-space:normal;word-break:break-all;color:#5E554A;font-size:0.75em}.pn-marketweb-siteheader-login-profileselection-logout{padding:1.6rem;text-align:center;width:100%}.pn-marketweb-siteheader-login-profileselection-logout-link{display:inline-block;font-weight:500;color:#005D92;text-decoration:none}.pn-marketweb-siteheader-login-profileselection-logout-link:hover,.pn-marketweb-siteheader-login-profileselection-logout-link:focus,.pn-marketweb-siteheader-login-profileselection-logout-link:active{text-decoration:underline}";
|
|
103
|
+
|
|
104
|
+
let PnMarketwebSiteheaderLoginProfileselection = class {
|
|
105
|
+
constructor(hostRef) {
|
|
106
|
+
index.registerInstance(this, hostRef);
|
|
107
|
+
// Login dialog
|
|
108
|
+
this.loginDialog = null;
|
|
109
|
+
this.loginManager = null;
|
|
110
|
+
this.endpoint = "";
|
|
111
|
+
this.loggedin = false;
|
|
112
|
+
this.idNamespace = "";
|
|
113
|
+
this.heading = "";
|
|
114
|
+
this.i18n = { "searchlabel": "", "searchplaceholder": "", "searchbuttontext": "", "menuHomeButton": "", "menuGoBackButton": "", "mainMenuButton": "", "menuStartButton": "", "profileSelectionFlyoutHeading": "" };
|
|
115
|
+
this.user = null;
|
|
116
|
+
this.logoutLink = null;
|
|
117
|
+
this.profileSelectorDialog = {
|
|
118
|
+
currentProfile: {
|
|
119
|
+
name: 'Hedin',
|
|
120
|
+
customerid: '5560230053'
|
|
121
|
+
},
|
|
122
|
+
profiles: [
|
|
123
|
+
{
|
|
124
|
+
name: 'Bilmetro AB',
|
|
125
|
+
customerid: '5560612789'
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
componentWillLoad() {
|
|
131
|
+
var _a;
|
|
132
|
+
console.log('loginDialog', this.loginDialog);
|
|
133
|
+
console.log('this.loginManager', this.loginManager);
|
|
134
|
+
console.log('### this.loggedin', this.loggedin);
|
|
135
|
+
console.log('this.endpoint', this.endpoint);
|
|
136
|
+
if (!this.heading && ((_a = this.i18n) === null || _a === void 0 ? void 0 : _a.profileSelectionFlyoutHeading)) {
|
|
137
|
+
this.heading = this.i18n.profileSelectionFlyoutHeading;
|
|
138
|
+
}
|
|
139
|
+
this.init();
|
|
140
|
+
}
|
|
141
|
+
init() {
|
|
142
|
+
this.updateUserInfo();
|
|
143
|
+
this.adjustLoginLinks();
|
|
144
|
+
}
|
|
145
|
+
adjustLoginLinks() {
|
|
146
|
+
var _a, _b, _c, _d;
|
|
147
|
+
const adjustLink = (link, i) => {
|
|
148
|
+
link.isLogoutLink = (link.href.indexOf('logout') !== -1);
|
|
149
|
+
if (link.isLogoutLink) {
|
|
150
|
+
link.href = this.loginManager.getLogoutUrl(link.href.replace('logout', '').replace('http://window.location.href/?', '').replace('https://window.location.href/?', ''));
|
|
151
|
+
}
|
|
152
|
+
if (i === 0 && !link.href) {
|
|
153
|
+
link.href = this.loginManager.getLoginUrl();
|
|
154
|
+
link.linkType = 'primary';
|
|
155
|
+
}
|
|
156
|
+
if (link.primaryLinkApperance && !link.linkType) {
|
|
157
|
+
link.linkType = 'primary';
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
if ((_a = this.loginDialog) === null || _a === void 0 ? void 0 : _a.loggedInLinks) {
|
|
161
|
+
(_b = this.loginDialog) === null || _b === void 0 ? void 0 : _b.loggedInLinks.forEach(adjustLink);
|
|
162
|
+
}
|
|
163
|
+
this.logoutLink = (_d = (_c = this.loginDialog) === null || _c === void 0 ? void 0 : _c.loggedInLinks.filter(x => x.isLogoutLink)[0]) !== null && _d !== void 0 ? _d : null;
|
|
164
|
+
}
|
|
165
|
+
updateUserInfo() {
|
|
166
|
+
const userInfo = this.loginManager.getUserInfo();
|
|
167
|
+
this.user = userInfo;
|
|
168
|
+
console.log('this.user', this.user);
|
|
169
|
+
}
|
|
170
|
+
render() {
|
|
171
|
+
if (!this.loginDialog || !this.profileSelectorDialog) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
let hostElementAttribute = {};
|
|
175
|
+
return (index.h(index.Host, Object.assign({}, hostElementAttribute), this.heading ? index.h("strong", { class: "pn-marketweb-siteheader-login-profileselection-heading" }, this.heading) : null, index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-user" }, index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-name" }, this.user.given_name), index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-description" }, this.user.username)), index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" }, index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.profileSelectorDialog.currentProfile.name), index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.profileSelectorDialog.currentProfile.customerid)), index.h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks.filter(x => x.isLogoutLink === false), loginManager: this.loginManager, idNamespace: this.idNamespace }), index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-divider" }), this.profileSelectorDialog.profiles.map((profile) => {
|
|
176
|
+
return (index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, index.h("a", { href: `${this.endpoint}?selectprofile=${profile.customerid}}`, class: "pn-marketweb-siteheader-login-profileselection-profileoption-link" }, index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-content" }, index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-name" }, profile.name), index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, profile.customerid)), index.h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
|
|
177
|
+
}), this.logoutLink ?
|
|
178
|
+
index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-logout" }, index.h("a", { href: this.logoutLink.href, rel: "nofollower noopener", class: "pn-marketweb-siteheader-login-profileselection-logout-link" }, this.logoutLink.linkText))
|
|
179
|
+
: null));
|
|
180
|
+
}
|
|
181
|
+
get hostElement() { return index.getElement(this); }
|
|
182
|
+
};
|
|
183
|
+
PnMarketwebSiteheaderLoginProfileselection.style = pnMarketwebSiteheaderLoginProfileselectionCss;
|
|
184
|
+
|
|
185
|
+
exports.pn_marketweb_siteheader_login_links = PnMarketwebSiteheaderLoginLinks;
|
|
186
|
+
exports.pn_marketweb_siteheader_login_profileselection = PnMarketwebSiteheaderLoginProfileselection;
|