@postnord/pn-marketweb-components 2.0.23-beta6 → 2.0.26

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.
Files changed (56) hide show
  1. package/cjs/loader.cjs.js +1 -1
  2. package/cjs/pn-find-price-result.cjs.entry.js +1 -1
  3. package/cjs/{pn-find-price-store-a2728ff4.js → pn-find-price-store-0b8c195c.js} +2 -0
  4. package/cjs/pn-find-price.cjs.entry.js +10 -4
  5. package/cjs/pn-market-web-components.cjs.js +1 -1
  6. package/cjs/pn-marketweb-siteheader-login-links_2.cjs.entry.js +33 -18
  7. package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
  8. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +0 -1
  9. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +58 -25
  10. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +1 -1
  11. package/collection/components/widgets/pn-find-price/pn-find-price-store.js +2 -0
  12. package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +6 -0
  13. package/collection/components/widgets/pn-find-price/pn-find-price.css +6 -3
  14. package/collection/components/widgets/pn-find-price/pn-find-price.js +2 -0
  15. package/custom-elements/index.js +45 -22
  16. package/esm/loader.js +1 -1
  17. package/esm/pn-find-price-result.entry.js +1 -1
  18. package/esm/{pn-find-price-store-f531ab7e.js → pn-find-price-store-b4556c9b.js} +2 -0
  19. package/esm/pn-find-price.entry.js +10 -4
  20. package/esm/pn-market-web-components.js +1 -1
  21. package/esm/pn-marketweb-siteheader-login-links_2.entry.js +33 -18
  22. package/esm/pn-product-pricelist.entry.js +1 -1
  23. package/esm-es5/loader.js +1 -1
  24. package/esm-es5/pn-find-price-result.entry.js +1 -1
  25. package/esm-es5/pn-find-price-store-b4556c9b.js +1 -0
  26. package/esm-es5/pn-find-price.entry.js +1 -1
  27. package/esm-es5/pn-market-web-components.js +1 -1
  28. package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -1
  29. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  30. package/package.json +1 -1
  31. package/pn-market-web-components/p-00dc1309.entry.js +1 -0
  32. package/pn-market-web-components/{p-8a763bfd.system.entry.js → p-0d5d05cc.system.entry.js} +1 -1
  33. package/pn-market-web-components/p-1f48e652.entry.js +1 -0
  34. package/pn-market-web-components/p-37017f68.system.js +1 -0
  35. package/pn-market-web-components/p-67887512.system.js +1 -1
  36. package/pn-market-web-components/p-825132b4.system.entry.js +1 -0
  37. package/pn-market-web-components/{p-5cc29b6e.entry.js → p-845d6b0a.entry.js} +1 -1
  38. package/pn-market-web-components/{p-1f5b2d7a.entry.js → p-b32a8507.entry.js} +1 -1
  39. package/pn-market-web-components/p-c4254e9e.js +1 -0
  40. package/pn-market-web-components/p-db6efb10.system.entry.js +1 -0
  41. package/pn-market-web-components/{p-c1c79c65.system.entry.js → p-fecc53bb.system.entry.js} +1 -1
  42. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  43. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.d.ts +3 -1
  44. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +2 -2
  45. package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -0
  46. package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +6 -0
  47. package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +2 -0
  48. package/types/components.d.ts +2 -0
  49. package/umd/pn-marketweb-salesforce.js +12 -12
  50. package/esm-es5/pn-find-price-store-f531ab7e.js +0 -1
  51. package/pn-market-web-components/p-04240175.entry.js +0 -1
  52. package/pn-market-web-components/p-2afc5570.system.entry.js +0 -1
  53. package/pn-market-web-components/p-77c9b601.entry.js +0 -1
  54. package/pn-market-web-components/p-893206f2.js +0 -1
  55. package/pn-market-web-components/p-ba41a7c0.system.entry.js +0 -1
  56. package/pn-market-web-components/p-c2670af1.system.js +0 -1
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"],"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);
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":[1040],"currentProfile":[1040],"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
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3e27c79.js');
6
- const pnFindPriceStore = require('./pn-find-price-store-a2728ff4.js');
6
+ const pnFindPriceStore = require('./pn-find-price-store-0b8c195c.js');
7
7
  const data = require('./data-b5ef4f7c.js');
8
8
  require('./index-28bbc937.js');
9
9
 
@@ -8,6 +8,8 @@ const { state, onChange } = index.createStore({
8
8
  componentheading: '',
9
9
  deliveryscopeheading: '',
10
10
  resultlistheading: '',
11
+ sizeheading: '',
12
+ weightheading: '',
11
13
  weightlabel: '',
12
14
  maxweightlabel: '',
13
15
  maxmeasurementlabel: '',
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-e3e27c79.js');
6
6
  const data = require('./data-b5ef4f7c.js');
7
7
  const convert = require('./convert-362ef5e6.js');
8
- const pnFindPriceStore = require('./pn-find-price-store-a2728ff4.js');
8
+ const pnFindPriceStore = require('./pn-find-price-store-0b8c195c.js');
9
9
  require('./index-28bbc937.js');
10
10
 
11
11
  const translations = {
@@ -13,6 +13,8 @@ const translations = {
13
13
  'componentheading': 'Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?',
14
14
  'deliveryscopeheading': 'Endast leveranser inom Sverige',
15
15
  'resultlistheading': 'Några bra alternativ för dig',
16
+ 'sizeheading': 'Uppskatta storleken på din försändelse',
17
+ 'weightheading': 'Uppskatta vikten på din försändelse',
16
18
  'weightlabel': 'Vikt',
17
19
  'maxweightlabel': 'Maxvikt',
18
20
  'maxmeasurementlabel': 'Maxvolym',
@@ -29,6 +31,8 @@ const translations = {
29
31
  'componentheading': 'Our prices and terms and conditions for domestic shipments for you as a direct paying customer',
30
32
  'deliveryscopeheading': 'Deliveries within Sweden only',
31
33
  'resultlistheading': 'Some suitable options for you',
34
+ 'sizeheading': 'Estimate the size of your shipment',
35
+ 'weightheading': 'Estimate the weight of your shipment',
32
36
  'weightlabel': 'Weight',
33
37
  'maxweightlabel': 'Max weight',
34
38
  'maxmeasurementlabel': 'Maximum measurement',
@@ -45,6 +49,8 @@ const translations = {
45
49
  'componentheading': 'Vad vill du skicka?',
46
50
  'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
47
51
  'resultlistheading': 'Nogle passende muligheder for dig',
52
+ 'sizeheading': 'Anslå størrelsen på din forsendelse',
53
+ 'weightheading': 'Anslå vægten af din forsendelse',
48
54
  'weightlabel': 'Vægt',
49
55
  'maxweightlabel': 'Max vægt',
50
56
  'maxmeasurementlabel': 'Maks. Volumen',
@@ -110,7 +116,7 @@ const postnordPerson1Svg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA0IiBoZW
110
116
 
111
117
  const cloudsSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjc4IiBoZWlnaHQ9IjU1IiB2aWV3Qm94PSIwIDAgMjc4IDU1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjQ3LjM1NSA0OS42ODE1QzI0Ny42OTQgNTIuNDc5IDI0OS43MjIgNTQuNjI2MSAyNTIuMTgxIDU0LjYyNjFIMjcyLjkyNkMyNzUuNjIgNTQuNjI2MSAyNzcuNzk4IDUyLjA1MjIgMjc3Ljc5OCA0OC44Njg2VjQ4LjgwMDhDMjc3Ljc5OCA0NS42MTczIDI3NS42MiA0My4wNDMzIDI3Mi45MjYgNDMuMDQzM0gyNzAuNTM3QzI2OS42MDggMzkuMjQzOSAyNjYuODQ2IDM2LjQ3MyAyNjMuNTg1IDM2LjQ3M0gyNTkuNzE3QzI1OS4zNzMgMzEuODQxIDI1Ni4xMDEgMjguMjA5MiAyNTIuMTI0IDI4LjIwOTJDMjQ4LjE0NiAyOC4yMDkyIDI0NC44OCAzMS44NDEgMjQ0LjUzIDM2LjQ3M0gyNDIuMDk1QzIzOC4wODMgMzYuNDczIDIzNC44MTYgNDAuNjcyNiAyMzQuODE2IDQ1LjgyMDVWNDkuNjgxNUgyNDcuMzU1WiIgZmlsbD0iI0UwRjhGRiIvPgo8cGF0aCBkPSJNMTIuMDM5MSA0Ni4xMDIyQzEyLjMxNzYgNDguNTU2OSAxNC4wODY3IDUwLjQzNzMgMTYuMjQyMSA1MC40MzczSDM0LjU4MDdDMzYuOTMwNCA1MC40MzczIDM4LjgyMTYgNDguMjAyIDM4LjgyMTYgNDUuNDI0OFY0NS4zNTcxQzM4LjgyMTYgNDIuNTc5OSAzNi45MzA0IDQwLjM0NDYgMzQuNTgwNyA0MC4zNDQ2SDMyLjQ2ODRDMzEuNjY3OCAzNy4wMjA5IDI5LjIyNyAzNC41ODcyIDI2LjMyODMgMzQuNTg3MkgyMi45MTc5QzIyLjYwMDQgMzAuNTU5NyAxOS43MzI3IDI3LjQwNzEgMTYuMjQyMSAyNy40MDcxQzEyLjc1MTQgMjcuNDA3MSA5Ljg4MzcxIDMwLjU1OTcgOS41NjYyMiAzNC41ODcySDcuNDE2NThDMy44NjM0NiAzNC41ODcyIDAuOTk4MDQ3IDM4LjI0NDggMC45OTgwNDcgNDIuNzE1NFY0Ni4xMDIySDEyLjAzOTFaIiBmaWxsPSIjRTBGOEZGIi8+CjxwYXRoIGQ9Ik0xMzEuMDU2IDI2LjU4NjRDMTMxLjQ0OSAzMC4wNDIzIDEzMy45NDggMzIuNjg5NSAxMzYuOTkxIDMyLjY4OTVIMTYyLjg5MUMxNjYuMjA5IDMyLjY4OTUgMTY4Ljg4IDI5LjU0MjYgMTY4Ljg4IDI1LjYzMjhWMjUuNTM3NUMxNjguODggMjEuNjI3NyAxNjYuMjA5IDE4LjQ4MDggMTYyLjg5MSAxOC40ODA4SDE1OS45MDdDMTU4Ljc3NyAxMy44MDE1IDE1NS4zMyAxMC4zNzUzIDE1MS4yMzYgMTAuMzc1M0gxNDYuNDJDMTQ1Ljk3MSA0LjcwNTMzIDE0MS45MjEgMC4yNjcwOSAxMzYuOTkxIDAuMjY3MDlDMTMyLjA2MiAwLjI2NzA5IDEyOC4wMTIgNC43MDUzMyAxMjcuNTYzIDEwLjM3NTNIMTI0LjUyOEMxMTkuNTEgMTAuMzc1MyAxMTUuNDYzIDE1LjUyNDcgMTE1LjQ2MyAyMS44MTg0VjI2LjU4NjRIMTMxLjA1NloiIGZpbGw9IiNFMEY4RkYiLz4KPC9zdmc+Cg==';
112
118
 
113
- const pnFindPriceCss = "@charset \"UTF-8\";pn-find-price .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-find-price .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em}pn-find-price .sizeTable #clouds{position:absolute;top:0em;left:4em;z-index:-1}pn-find-price .firstCell{margin-right:0;margin-left:auto}pn-find-price .findprice-form{max-width:60em;margin:0 auto 3em auto}pn-find-price h2,pn-find-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-price .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-find-price .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption{font-size:0.9em;max-width:41rem;margin:0 auto}pn-find-price .weightoption-content{text-align:center}pn-find-price .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom}pn-find-price .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption-content pn-choice-button ::before{content:\"Max  \";font-weight:lighter}pn-find-price .resultlist{margin:3.2rem 0}pn-find-price .servicePoint{text-align:center}pn-find-price .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-find-price .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-find-price .servicePoint a{color:#005D92;text-decoration:none}pn-find-price .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
119
+ const pnFindPriceCss = "@charset \"UTF-8\";pn-find-price .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-find-price .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em}pn-find-price .sizeTable #clouds{position:absolute;top:0em;left:4em;z-index:-1}pn-find-price .firstCell{margin-right:0;margin-left:auto}pn-find-price .findprice-form{max-width:60em;margin:0em auto 3em auto}pn-find-price h2{text-align:center;margin-bottom:1rem}pn-find-price .heading{text-align:center;line-height:1.1;font-weight:bold;margin-bottom:1rem;color:#005D92}pn-find-price .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-find-price .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption{font-size:0.9em;max-width:41rem;margin:0 auto}pn-find-price .weightoption-content{text-align:center}pn-find-price .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom}pn-find-price .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center}pn-find-price .weightoption-content pn-choice-button ::before{content:\"Max  \";font-weight:lighter}pn-find-price .resultlist{margin:3.2rem 0}pn-find-price .servicePoint{text-align:center}pn-find-price .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-find-price .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-find-price .servicePoint a{color:#005D92;text-decoration:none}pn-find-price .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
114
120
 
115
121
  let PnfindPrice = class {
116
122
  constructor(hostRef) {
@@ -198,11 +204,11 @@ let PnfindPrice = class {
198
204
  this.filteredItems = weightFilteredData;
199
205
  }
200
206
  render() {
201
- return (index.h("div", { class: "findprice-form" }, index.h("div", null, index.h("div", { class: "sizecategory" }, index.h("table", { class: "sizeTable" }, index.h("img", { id: "clouds", src: cloudsSvg }), index.h("tr", null, index.h("td", null, index.h("img", { class: "firstCell", src: postnordPerson1Svg })), index.h("td", null, index.h("img", { src: smallPackageSvg })), index.h("td", null, index.h("img", { src: mediumPackageSvg })), index.h("td", null, index.h("img", { src: largePackageSvg }))), index.h("tr", null, index.h("td", null), data.sizeCategories.map((sizeCategory) => (index.h("td", null, index.h("pn-radio-button", { radioid: sizeCategory.value, value: sizeCategory.value, name: "sizecategory", checked: sizeCategory.value === this.sizecategory.value, onChange: () => {
207
+ return (index.h("div", { class: "findprice-form" }, index.h("div", null, index.h("h4", { class: "heading" }, pnFindPriceStore.state.i18n.sizeheading), index.h("div", { class: "sizecategory" }, index.h("table", { class: "sizeTable" }, index.h("img", { id: "clouds", src: cloudsSvg }), index.h("tr", null, index.h("td", null, index.h("img", { class: "firstCell", src: postnordPerson1Svg })), index.h("td", null, index.h("img", { src: smallPackageSvg })), index.h("td", null, index.h("img", { src: mediumPackageSvg })), index.h("td", null, index.h("img", { src: largePackageSvg }))), index.h("tr", null, index.h("td", null), data.sizeCategories.map((sizeCategory) => (index.h("td", null, index.h("pn-radio-button", { radioid: sizeCategory.value, value: sizeCategory.value, name: "sizecategory", checked: sizeCategory.value === this.sizecategory.value, onChange: () => {
202
208
  this.sizecategory = data.sizeCategories.filter(x => x.value === sizeCategory.value)[0];
203
209
  this.weight = { value: 0, name: "" };
204
210
  this.weightvalue = this.weight.value;
205
- } })))))))), (this.sizecategory.value && data.weights[this.sizecategory.unit]) ? (index.h("div", { class: "weightoption" }, index.h("div", { class: "weightoption-content" }, data.weights[this.sizecategory.unit].map((wght) => (index.h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : data.weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
211
+ } })))))))), index.h("h4", { class: "heading" }, pnFindPriceStore.state.i18n.weightheading), (this.sizecategory.value && data.weights[this.sizecategory.unit]) ? (index.h("div", { class: "weightoption" }, index.h("div", { class: "weightoption-content" }, data.weights[this.sizecategory.unit].map((wght) => (index.h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : data.weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
206
212
  this.weight = data.weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
207
213
  this.weightvalue = this.weight.value;
208
214
  } }, wght.name)))))) : null, (this.filteredItems && this.filteredItems.length > 0) ? (index.h("div", { class: "resultlist" }, (pnFindPriceStore.state.i18n.resultlistheading) ? (index.h("div", { class: "resultHeading" }, pnFindPriceStore.state.i18n.resultlistheading)) : null, this.filteredItems.map((item) => (index.h("div", null, index.h("pn-find-price-result", { item: item })))))) : null));
@@ -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"],"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);
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":[1040],"currentProfile":[1040],"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
  });
@@ -18,7 +18,6 @@ let PnMarketwebSiteheaderLoginLinks = class {
18
18
  }
19
19
  componentWillLoad() {
20
20
  this.init();
21
- console.log('from links', this.loggedin);
22
21
  }
23
22
  async init() {
24
23
  this.adjustLoginLinks();
@@ -110,30 +109,29 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
110
109
  this.endpoint = "";
111
110
  this.loggedin = false;
112
111
  this.idNamespace = "";
113
- this.heading = "";
112
+ this.heading = null;
114
113
  this.i18n = { "searchlabel": "", "searchplaceholder": "", "searchbuttontext": "", "menuHomeButton": "", "menuGoBackButton": "", "mainMenuButton": "", "menuStartButton": "", "profileSelectionFlyoutHeading": "" };
115
114
  this.user = null;
116
115
  this.logoutLink = null;
117
116
  this.profileSelectorDialog = {
118
- currentProfile: {
119
- name: 'Hedin',
120
- customerid: '5560230053'
121
- },
122
117
  profiles: [
123
- {
124
- name: 'Bilmetro AB',
125
- customerid: '5560612789'
126
- }
118
+ // {
119
+ // name: 'Hedin',
120
+ // organizationNumber: '5560230053',
121
+ // selected: true
122
+ // } as ProfileSelectorCustomer,
123
+ // {
124
+ // name: 'Bilmetro AB',
125
+ // organizationNumber: '5560612789',
126
+ // selected: false
127
+ // } as ProfileSelectorCustomer
127
128
  ]
128
129
  };
130
+ this.currentProfile = null;
129
131
  }
130
132
  componentWillLoad() {
131
133
  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)) {
134
+ if (this.heading === null && ((_a = this.i18n) === null || _a === void 0 ? void 0 : _a.profileSelectionFlyoutHeading)) {
137
135
  this.heading = this.i18n.profileSelectionFlyoutHeading;
138
136
  }
139
137
  this.init();
@@ -141,6 +139,22 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
141
139
  init() {
142
140
  this.updateUserInfo();
143
141
  this.adjustLoginLinks();
142
+ this.fetchProfiles();
143
+ }
144
+ async fetchProfiles() {
145
+ if (!this.loggedin || !this.profileSelectorDialog || this.profileSelectorDialog.profiles.length > 0) {
146
+ return;
147
+ }
148
+ const req = await fetch(`${this.endpoint}api/user/parentprofiles`);
149
+ const data = await req.json();
150
+ if (!data || !data.profiles || !data.profiles.length) {
151
+ return;
152
+ }
153
+ this.profileSelectorDialog.profiles = data.profiles;
154
+ const currentProfileObj = data.profiles.filter(x => x.selected === true);
155
+ if (currentProfileObj[0] && currentProfileObj[0].name) {
156
+ this.currentProfile = currentProfileObj[0];
157
+ }
144
158
  }
145
159
  adjustLoginLinks() {
146
160
  var _a, _b, _c, _d;
@@ -165,15 +179,16 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
165
179
  updateUserInfo() {
166
180
  const userInfo = this.loginManager.getUserInfo();
167
181
  this.user = userInfo;
168
- console.log('this.user', this.user);
169
182
  }
170
183
  render() {
171
184
  if (!this.loginDialog || !this.profileSelectorDialog) {
172
185
  return;
173
186
  }
174
187
  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" }))));
188
+ 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)), this.currentProfile !== null && this.currentProfile.name ?
189
+ index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" }, index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.currentProfile.name), index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.organizationNumber))
190
+ : null, 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.filter(x => x.selected === false).map((profile) => {
191
+ return (index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, index.h("a", { href: `${this.endpoint}?selectprofile=${profile.organizationNumber}}`, 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.organizationNumber)), index.h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
177
192
  }), this.logoutLink ?
178
193
  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
194
  : null));
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-e3e27c79.js');
6
6
  const data = require('./data-e77c1ada.js');
7
7
  const convert = require('./convert-362ef5e6.js');
8
- const pnFindPriceStore = require('./pn-find-price-store-a2728ff4.js');
8
+ const pnFindPriceStore = require('./pn-find-price-store-0b8c195c.js');
9
9
  require('./index-28bbc937.js');
10
10
 
11
11
  const translations = {
@@ -10,7 +10,6 @@ export class PnMarketwebSiteheaderLoginLinks {
10
10
  }
11
11
  componentWillLoad() {
12
12
  this.init();
13
- console.log('from links', this.loggedin);
14
13
  }
15
14
  async init() {
16
15
  this.adjustLoginLinks();
@@ -7,30 +7,29 @@ export class PnMarketwebSiteheaderLoginProfileselection {
7
7
  this.endpoint = "";
8
8
  this.loggedin = false;
9
9
  this.idNamespace = "";
10
- this.heading = "";
10
+ this.heading = null;
11
11
  this.i18n = { "searchlabel": "", "searchplaceholder": "", "searchbuttontext": "", "menuHomeButton": "", "menuGoBackButton": "", "mainMenuButton": "", "menuStartButton": "", "profileSelectionFlyoutHeading": "" };
12
12
  this.user = null;
13
13
  this.logoutLink = null;
14
14
  this.profileSelectorDialog = {
15
- currentProfile: {
16
- name: 'Hedin',
17
- customerid: '5560230053'
18
- },
19
15
  profiles: [
20
- {
21
- name: 'Bilmetro AB',
22
- customerid: '5560612789'
23
- }
16
+ // {
17
+ // name: 'Hedin',
18
+ // organizationNumber: '5560230053',
19
+ // selected: true
20
+ // } as ProfileSelectorCustomer,
21
+ // {
22
+ // name: 'Bilmetro AB',
23
+ // organizationNumber: '5560612789',
24
+ // selected: false
25
+ // } as ProfileSelectorCustomer
24
26
  ]
25
27
  };
28
+ this.currentProfile = null;
26
29
  }
27
30
  componentWillLoad() {
28
31
  var _a;
29
- console.log('loginDialog', this.loginDialog);
30
- console.log('this.loginManager', this.loginManager);
31
- console.log('### this.loggedin', this.loggedin);
32
- console.log('this.endpoint', this.endpoint);
33
- if (!this.heading && ((_a = this.i18n) === null || _a === void 0 ? void 0 : _a.profileSelectionFlyoutHeading)) {
32
+ if (this.heading === null && ((_a = this.i18n) === null || _a === void 0 ? void 0 : _a.profileSelectionFlyoutHeading)) {
34
33
  this.heading = this.i18n.profileSelectionFlyoutHeading;
35
34
  }
36
35
  this.init();
@@ -38,6 +37,22 @@ export class PnMarketwebSiteheaderLoginProfileselection {
38
37
  init() {
39
38
  this.updateUserInfo();
40
39
  this.adjustLoginLinks();
40
+ this.fetchProfiles();
41
+ }
42
+ async fetchProfiles() {
43
+ if (!this.loggedin || !this.profileSelectorDialog || this.profileSelectorDialog.profiles.length > 0) {
44
+ return;
45
+ }
46
+ const req = await fetch(`${this.endpoint}api/user/parentprofiles`);
47
+ const data = await req.json();
48
+ if (!data || !data.profiles || !data.profiles.length) {
49
+ return;
50
+ }
51
+ this.profileSelectorDialog.profiles = data.profiles;
52
+ const currentProfileObj = data.profiles.filter(x => x.selected === true);
53
+ if (currentProfileObj[0] && currentProfileObj[0].name) {
54
+ this.currentProfile = currentProfileObj[0];
55
+ }
41
56
  }
42
57
  adjustLoginLinks() {
43
58
  var _a, _b, _c, _d;
@@ -62,7 +77,6 @@ export class PnMarketwebSiteheaderLoginProfileselection {
62
77
  updateUserInfo() {
63
78
  const userInfo = this.loginManager.getUserInfo();
64
79
  this.user = userInfo;
65
- console.log('this.user', this.user);
66
80
  }
67
81
  render() {
68
82
  if (!this.loginDialog || !this.profileSelectorDialog) {
@@ -74,17 +88,19 @@ export class PnMarketwebSiteheaderLoginProfileselection {
74
88
  h("div", { class: "pn-marketweb-siteheader-login-profileselection-user" },
75
89
  h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-name" }, this.user.given_name),
76
90
  h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-description" }, this.user.username)),
77
- h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" },
78
- h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.profileSelectorDialog.currentProfile.name),
79
- h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.profileSelectorDialog.currentProfile.customerid)),
91
+ this.currentProfile !== null && this.currentProfile.name ?
92
+ h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" },
93
+ h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.currentProfile.name),
94
+ h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.organizationNumber))
95
+ : null,
80
96
  h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks.filter(x => x.isLogoutLink === false), loginManager: this.loginManager, idNamespace: this.idNamespace }),
81
97
  h("div", { class: "pn-marketweb-siteheader-login-profileselection-divider" }),
82
- this.profileSelectorDialog.profiles.map((profile) => {
98
+ this.profileSelectorDialog.profiles.filter(x => x.selected === false).map((profile) => {
83
99
  return (h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" },
84
- h("a", { href: `${this.endpoint}?selectprofile=${profile.customerid}}`, class: "pn-marketweb-siteheader-login-profileselection-profileoption-link" },
100
+ h("a", { href: `${this.endpoint}?selectprofile=${profile.organizationNumber}}`, class: "pn-marketweb-siteheader-login-profileselection-profileoption-link" },
85
101
  h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-content" },
86
102
  h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-name" }, profile.name),
87
- h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, profile.customerid)),
103
+ h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, profile.organizationNumber)),
88
104
  h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
89
105
  }),
90
106
  this.logoutLink ?
@@ -212,7 +228,7 @@ export class PnMarketwebSiteheaderLoginProfileselection {
212
228
  },
213
229
  "attribute": "heading",
214
230
  "reflect": false,
215
- "defaultValue": "\"\""
231
+ "defaultValue": "null"
216
232
  },
217
233
  "i18n": {
218
234
  "type": "unknown",
@@ -237,7 +253,7 @@ export class PnMarketwebSiteheaderLoginProfileselection {
237
253
  },
238
254
  "profileSelectorDialog": {
239
255
  "type": "unknown",
240
- "mutable": false,
256
+ "mutable": true,
241
257
  "complexType": {
242
258
  "original": "ProfileSelectorDialog",
243
259
  "resolved": "ProfileSelectorDialog",
@@ -245,7 +261,24 @@ export class PnMarketwebSiteheaderLoginProfileselection {
245
261
  "ProfileSelectorDialog": {
246
262
  "location": "import",
247
263
  "path": "./pn-marketweb-siteheader-types"
248
- },
264
+ }
265
+ }
266
+ },
267
+ "required": false,
268
+ "optional": false,
269
+ "docs": {
270
+ "tags": [],
271
+ "text": ""
272
+ },
273
+ "defaultValue": "{\n profiles: [\n // {\n // name: 'Hedin',\n // organizationNumber: '5560230053',\n // selected: true\n // } as ProfileSelectorCustomer,\n // {\n // name: 'Bilmetro AB',\n // organizationNumber: '5560612789',\n // selected: false\n // } as ProfileSelectorCustomer\n ]\n}"
274
+ },
275
+ "currentProfile": {
276
+ "type": "unknown",
277
+ "mutable": true,
278
+ "complexType": {
279
+ "original": "ProfileSelectorCustomer",
280
+ "resolved": "ProfileSelectorCustomer",
281
+ "references": {
249
282
  "ProfileSelectorCustomer": {
250
283
  "location": "import",
251
284
  "path": "./pn-marketweb-siteheader-types"
@@ -258,7 +291,7 @@ export class PnMarketwebSiteheaderLoginProfileselection {
258
291
  "tags": [],
259
292
  "text": ""
260
293
  },
261
- "defaultValue": "{\n currentProfile: {\n name: 'Hedin',\n customerid: '5560230053'\n } as ProfileSelectorCustomer,\n profiles: [\n {\n name: 'Bilmetro AB',\n customerid: '5560612789'\n } as ProfileSelectorCustomer\n ]\n}"
294
+ "defaultValue": "null"
262
295
  }
263
296
  }; }
264
297
  static get states() { return {
@@ -1,6 +1,6 @@
1
1
  import readme from "./readme.md";
2
2
 
3
- const usertoken = '5e5357915ea021150aa24fe6bd889bdacee14da41632a6c305e13ee';
3
+ const usertoken = '7c896d4f9c38537836a4fac76cf7343011ccfb35715f81af0e10e9e';
4
4
 
5
5
  export default {
6
6
  title: "Web Components/Market web site Header",
@@ -5,6 +5,8 @@ const { state, onChange } = createStore({
5
5
  componentheading: '',
6
6
  deliveryscopeheading: '',
7
7
  resultlistheading: '',
8
+ sizeheading: '',
9
+ weightheading: '',
8
10
  weightlabel: '',
9
11
  maxweightlabel: '',
10
12
  maxmeasurementlabel: '',
@@ -3,6 +3,8 @@ export const translations = {
3
3
  'componentheading': 'Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?',
4
4
  'deliveryscopeheading': 'Endast leveranser inom Sverige',
5
5
  'resultlistheading': 'Några bra alternativ för dig',
6
+ 'sizeheading': 'Uppskatta storleken på din försändelse',
7
+ 'weightheading': 'Uppskatta vikten på din försändelse',
6
8
  'weightlabel': 'Vikt',
7
9
  'maxweightlabel': 'Maxvikt',
8
10
  'maxmeasurementlabel': 'Maxvolym',
@@ -19,6 +21,8 @@ export const translations = {
19
21
  'componentheading': 'Our prices and terms and conditions for domestic shipments for you as a direct paying customer',
20
22
  'deliveryscopeheading': 'Deliveries within Sweden only',
21
23
  'resultlistheading': 'Some suitable options for you',
24
+ 'sizeheading': 'Estimate the size of your shipment',
25
+ 'weightheading': 'Estimate the weight of your shipment',
22
26
  'weightlabel': 'Weight',
23
27
  'maxweightlabel': 'Max weight',
24
28
  'maxmeasurementlabel': 'Maximum measurement',
@@ -35,6 +39,8 @@ export const translations = {
35
39
  'componentheading': 'Vad vill du skicka?',
36
40
  'deliveryscopeheading': 'Kun leveringer indenfor Sverige',
37
41
  'resultlistheading': 'Nogle passende muligheder for dig',
42
+ 'sizeheading': 'Anslå størrelsen på din forsendelse',
43
+ 'weightheading': 'Anslå vægten af din forsendelse',
38
44
  'weightlabel': 'Vægt',
39
45
  'maxweightlabel': 'Max vægt',
40
46
  'maxmeasurementlabel': 'Maks. Volumen',
@@ -23,15 +23,18 @@ pn-find-price .firstCell {
23
23
  }
24
24
  pn-find-price .findprice-form {
25
25
  max-width: 60em;
26
- margin: 0 auto 3em auto;
26
+ margin: 0em auto 3em auto;
27
+ }
28
+ pn-find-price h2 {
29
+ text-align: center;
30
+ margin-bottom: 1rem;
27
31
  }
28
- pn-find-price h2,
29
32
  pn-find-price .heading {
30
33
  text-align: center;
31
- font-size: 1.5em;
32
34
  line-height: 1.1;
33
35
  font-weight: bold;
34
36
  margin-bottom: 1rem;
37
+ color: #005D92;
35
38
  }
36
39
  pn-find-price .resultHeading {
37
40
  text-align: center;
@@ -95,6 +95,7 @@ export class PnfindPrice {
95
95
  render() {
96
96
  return (h("div", { class: "findprice-form" },
97
97
  h("div", null,
98
+ h("h4", { class: "heading" }, state.i18n.sizeheading),
98
99
  h("div", { class: "sizecategory" },
99
100
  h("table", { class: "sizeTable" },
100
101
  h("img", { id: "clouds", src: clouds }),
@@ -115,6 +116,7 @@ export class PnfindPrice {
115
116
  this.weight = { value: 0, name: "" };
116
117
  this.weightvalue = this.weight.value;
117
118
  } })))))))),
119
+ h("h4", { class: "heading" }, state.i18n.weightheading),
118
120
  (this.sizecategory.value && weights[this.sizecategory.unit]) ? (h("div", { class: "weightoption" }, h("div", { class: "weightoption-content" }, weights[this.sizecategory.unit].map((wght) => (h("pn-choice-button", { choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
119
121
  this.weight = weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
120
122
  this.weightvalue = this.weight.value;