@postnord/pn-marketweb-components 2.0.61 → 2.0.64
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-market-web-components.cjs.js +1 -1
- package/cjs/pn-profile-modal-profile.cjs.entry.js +3 -4
- package/cjs/pn-profile-modal-type.cjs.entry.js +5 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.css +7 -0
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +4 -5
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +5 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal.stories.js +5541 -292
- package/custom-elements/index.js +9 -6
- package/esm/loader.js +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-profile-modal-profile.entry.js +3 -4
- package/esm/pn-profile-modal-type.entry.js +5 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-profile-modal-profile.entry.js +1 -1
- package/esm-es5/pn-profile-modal-type.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-16c4bc50.entry.js +1 -0
- package/pn-market-web-components/p-58a57436.system.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-7b9fb94f.system.entry.js +1 -0
- package/pn-market-web-components/p-fea72975.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/umd/pn-marketweb-salesforce.js +32 -2
- package/pn-market-web-components/p-61c19b8b.system.entry.js +0 -1
- package/pn-market-web-components/p-7d75397b.entry.js +0 -1
- package/pn-market-web-components/p-ac715146.entry.js +0 -1
- package/pn-market-web-components/p-c9f92707.system.entry.js +0 -1
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
comp.setAttribute('market', 'dk');
|
|
13
13
|
comp.setAttribute('language', 'da');
|
|
14
14
|
comp.setAttribute('site-domain-in-urls', 'true');
|
|
15
|
+
comp.setAttribute('spa-mode', 'true');
|
|
15
16
|
})
|
|
16
17
|
document.body.insertBefore(header, document.body.firstElementChild);
|
|
17
18
|
document.body.appendChild(footer);
|
|
@@ -19,14 +20,43 @@
|
|
|
19
20
|
|
|
20
21
|
const s = document.createElement('script');
|
|
21
22
|
s.setAttribute("type", "module");
|
|
22
|
-
s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.
|
|
23
|
+
s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.64/umd/standalone-loader-salesforce.js");
|
|
23
24
|
document.querySelector("head").appendChild(s);
|
|
24
25
|
|
|
25
26
|
const style = document.createElement('link');
|
|
26
27
|
style.setAttribute("rel", "stylesheet");
|
|
27
|
-
style.setAttribute("href", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.
|
|
28
|
+
style.setAttribute("href", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.64/umd/pn-marketweb-wrongrembase.css");
|
|
28
29
|
document.querySelector("head").appendChild(style);
|
|
29
30
|
|
|
31
|
+
|
|
32
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
33
|
+
if (!window["haslangchange"]) {
|
|
34
|
+
|
|
35
|
+
window.addEventListener('marketweb-languagechange', (e) => {
|
|
36
|
+
let lang = e.detail;
|
|
37
|
+
if (lang === "en") {
|
|
38
|
+
lang = "en_US";
|
|
39
|
+
}
|
|
40
|
+
const queryParams = new URLSearchParams(window.location.search);
|
|
41
|
+
const currentLanguageValue = queryParams.get("language");
|
|
42
|
+
if (currentLanguageValue === lang) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
queryParams.set("language", lang);
|
|
46
|
+
const newUrl = window.location.origin + window.location.pathname + queryParams.toString();
|
|
47
|
+
if (newUrl.indexOf("/article/") !== -1) {
|
|
48
|
+
if (lang === "en_US" && newUrl.indexOf("-da-") !== -1) {
|
|
49
|
+
newUrl = newUrl.replace("-da-", "-en-");
|
|
50
|
+
}
|
|
51
|
+
if (lang === "da" && newUrl.indexOf("-en-") !== -1) {
|
|
52
|
+
newUrl = newUrl.replace("-en-", "-da-");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
window.location.href = newUrl;
|
|
56
|
+
});
|
|
57
|
+
window["haslangchange"] = true;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
30
60
|
window["renderpncomponent-interval"] = window.setInterval(renderPNComponents,150);
|
|
31
61
|
renderPNComponents();
|
|
32
62
|
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js","./p-94958580.system.js","./p-825b8fb8.system.js"],(function(e){"use strict";var i,t,o,l,r,n;return{setters:[function(e){i=e.r;t=e.e;o=e.h;l=e.a;r=e.g},function(e){n=e.s},function(){}],execute:function(){var s=".pn-profile-modal-profile-listitem{overflow:hidden;max-height:10rem;-webkit-transition:max-height 0.15s ease;transition:max-height 0.15s ease;opacity:1}.pn-profile-modal-profile-listitem[aria-hidden=true]{max-height:0;opacity:0}.pn-profile-modal-profile-listitem-button{padding:0.8rem;margin:0;background:#FFFFFF;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;cursor:pointer;border-radius:0.8rem;-webkit-transition:background 0.15s ease;transition:background 0.15s ease;text-align:left;width:100%}.pn-profile-modal-profile-listitem-button:hover,.pn-profile-modal-profile-listitem-button:focus,.pn-profile-modal-profile-listitem-button:active{background:#EFFBFF}.pn-profile-modal-profile-listitem-heading{color:#005D92;font-weight:700;font-size:1.6rem}.pn-profile-modal-profile-listitem-description{color:#5E554A;font-weight:400;font-size:1.2rem}.pn-profile-modal-profile-details{max-height:300rem;-webkit-transition:max-height 0.15s ease;transition:max-height 0.15s ease;opacity:1}.pn-profile-modal-profile-details[aria-hidden=true]{max-height:0;opacity:0;overflow:hidden}.pn-profile-modal-profile-details>pn-button{position:relative;margin-left:-1.2rem}.pn-profile-modal-profile-details>pn-button .pn-button-content{font-weight:500}.pn-profile-modal-profile-details-company{border-top:1px solid #D3CECB;border-bottom:1px solid #D3CECB;padding:0.8rem 0.8rem;margin:1.6rem 0}.pn-profile-modal-profile-details-label{font-size:1.4rem;font-weight:500;margin-bottom:1.2rem}.pn-profile-modal-profile-details-company-heading{font-weight:700;font-size:1.6rem}.pn-profile-modal-profile-details-company-description{color:#5E554A;font-weight:400;font-size:1.2rem}.pn-profile-modal-profile-details-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:1.6rem;padding:0 0}.pn-profile-modal-profile-details-list-label{font-size:1.4rem;font-weight:500;margin:0 0 0 0.8rem}";var a=e("pn_profile_modal_profile",function(){function e(e){i(this,e);this.urlSelected=t(this,"urlSelected",7);this.showCustomerNumbersEvent=t(this,"showCustomerNumbersEvent",7);this.heading=null;this.description=null;this.url=null;this.selected=false;this.showCustomerNumbers=false;this.pleaseSelectText="";this.visible=false;this.identifier=""}e.prototype.componentWillLoad=function(){this.identifier=this.heading+this.url};e.prototype.onProfileOptionClick=function(){this.selected=true;if(this.url){this.urlSelected.emit(this.url)}else{this.showCustomerNumbers=true;n.selectedProfile=this.identifier}};e.prototype.render=function(){var e=this;return o(l,null,o("div",{class:"pn-profile-modal-profile-listitem","aria-hidden":!!n.selectedProfile+""},o("button",{class:"pn-profile-modal-profile-listitem-button",onClick:this.onProfileOptionClick.bind(this)},o("div",{class:"pn-profile-modal-profile-listitem-heading"},this.heading),o("div",{class:"pn-profile-modal-profile-listitem-description"},this.description))),o("div",{class:"pn-profile-modal-profile-details","aria-hidden":!this.showCustomerNumbers+""},o("pn-button",{appearance:"light",variant:"borderless",icon:"arrow-left","left-icon":"true",small:"true",onClick:function(){e.showCustomerNumbers=false;n.selectedProfile=""}},n.i18n.toText," ",n.selectedType),o("div",{class:"pn-profile-modal-profile-details-company"},o("div",{class:"pn-profile-modal-profile-details-label"},n.i18n.choosenCompanyText),o("div",{class:"pn-profile-modal-profile-details-company-heading"},this.heading),o("div",{class:"pn-profile-modal-profile-details-company-description"},this.description)),o("div",{class:"pn-profile-modal-profile-details-list"},o("div",{class:"pn-profile-modal-profile-details-list-label"},this.pleaseSelectText),o("slot",null))))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());a.style=s}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,a as o,g as l}from"./p-58e8d7d5.js";import{s}from"./p-9344cd23.js";import"./p-86f06e26.js";let p=class{constructor(t){e(this,t),this.typeid="",this.name="false",this.selected=!1,this.selectedprofile=null}onSelectedChange(){this.selected&&(s.selectedType=this.name)}render(){return t(o,{selected:this.selected+"","selected-profile":this.selectedprofile+""},t("slot",null))}get hostElement(){return l(this)}static get watchers(){return{selected:["onSelectedChange"]}}};p.style="pn-profile-modal-type{display:-ms-flexbox;display:flex;width:100%;padding:3.2rem 0 1.2rem;-ms-flex-direction:column;flex-direction:column;gap:1.6rem;display:none}pn-profile-modal-type:first-of-type{margin-top:2.4rem}pn-profile-modal-type:last-of-type{border-bottom:0;padding-bottom:0}pn-profile-modal-type:last-of-type .profileselectoroption{padding-bottom:0}pn-profile-modal-type[selected=true]{display:-ms-flexbox;display:flex;opacity:1}";export{p as pn_profile_modal_type}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,e,h as o,a as t,g as l}from"./p-58e8d7d5.js";import{s as r}from"./p-9344cd23.js";import"./p-86f06e26.js";let a=class{constructor(o){i(this,o),this.urlSelected=e(this,"urlSelected",7),this.showCustomerNumbersEvent=e(this,"showCustomerNumbersEvent",7),this.heading=null,this.description=null,this.url=null,this.selected=!1,this.showCustomerNumbers=!1,this.pleaseSelectText="",this.visible=!1,this.identifier=""}componentWillLoad(){this.identifier=this.heading+this.url}onProfileOptionClick(){this.selected=!0,this.url?this.urlSelected.emit(this.url):(this.showCustomerNumbers=!0,r.selectedProfile=this.identifier)}render(){return o(t,null,o("div",{class:"pn-profile-modal-profile-listitem","aria-hidden":!!r.selectedProfile+""},o("button",{class:"pn-profile-modal-profile-listitem-button",onClick:this.onProfileOptionClick.bind(this)},o("div",{class:"pn-profile-modal-profile-listitem-heading"},this.heading),o("div",{class:"pn-profile-modal-profile-listitem-description"},this.description))),o("div",{class:"pn-profile-modal-profile-details","aria-hidden":!this.showCustomerNumbers+""},o("pn-button",{appearance:"light",variant:"borderless",icon:"arrow-left","left-icon":"true",small:"true",onClick:()=>{this.showCustomerNumbers=!1,r.selectedProfile=""}},r.i18n.toText," ",r.selectedType),o("div",{class:"pn-profile-modal-profile-details-company"},o("div",{class:"pn-profile-modal-profile-details-label"},r.i18n.choosenCompanyText),o("div",{class:"pn-profile-modal-profile-details-company-heading"},this.heading),o("div",{class:"pn-profile-modal-profile-details-company-description"},this.description)),o("div",{class:"pn-profile-modal-profile-details-list"},o("div",{class:"pn-profile-modal-profile-details-list-label"},this.pleaseSelectText),o("slot",null))))}get hostElement(){return l(this)}};a.style=".pn-profile-modal-profile-listitem{overflow:hidden;max-height:10rem;-webkit-transition:max-height 0.15s ease;transition:max-height 0.15s ease;opacity:1}.pn-profile-modal-profile-listitem[aria-hidden=true]{max-height:0;opacity:0}.pn-profile-modal-profile-listitem-button{padding:0.8rem;margin:0;background:#FFFFFF;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;cursor:pointer;border-radius:0.8rem;-webkit-transition:background 0.15s ease;transition:background 0.15s ease;text-align:left;width:100%}.pn-profile-modal-profile-listitem-button:hover,.pn-profile-modal-profile-listitem-button:focus,.pn-profile-modal-profile-listitem-button:active{background:#EFFBFF}.pn-profile-modal-profile-listitem-heading{color:#005D92;font-weight:700;font-size:1.6rem}.pn-profile-modal-profile-listitem-description{color:#5E554A;font-weight:400;font-size:1.2rem}.pn-profile-modal-profile-details{max-height:300rem;-webkit-transition:max-height 0.15s ease;transition:max-height 0.15s ease;opacity:1}.pn-profile-modal-profile-details[aria-hidden=true]{max-height:0;opacity:0;overflow:hidden}.pn-profile-modal-profile-details>pn-button{position:relative;margin-left:-1.2rem}.pn-profile-modal-profile-details>pn-button .pn-button-content{font-weight:500}.pn-profile-modal-profile-details-company{border-top:1px solid #D3CECB;border-bottom:1px solid #D3CECB;padding:0.8rem 0.8rem;margin:1.6rem 0}.pn-profile-modal-profile-details-label{font-size:1.4rem;font-weight:500;margin-bottom:1.2rem}.pn-profile-modal-profile-details-company-heading{font-weight:700;font-size:1.6rem}.pn-profile-modal-profile-details-company-description{color:#5E554A;font-weight:400;font-size:1.2rem}.pn-profile-modal-profile-details-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:1.6rem;padding:0 0}.pn-profile-modal-profile-details-list-label{font-size:1.4rem;font-weight:500;margin:0 0 0 0.8rem}";export{a as pn_profile_modal_profile}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js","./p-94958580.system.js","./p-825b8fb8.system.js"],(function(e){"use strict";var t,o,n,l,i;return{setters:[function(e){t=e.r;o=e.h;n=e.a;l=e.g},function(e){i=e.s},function(){}],execute:function(){var r="pn-profile-modal-type{display:-ms-flexbox;display:flex;width:100%;padding:3.2rem 0 1.2rem;-ms-flex-direction:column;flex-direction:column;gap:1.6rem;display:none}pn-profile-modal-type:first-of-type{margin-top:2.4rem}pn-profile-modal-type:last-of-type{border-bottom:0;padding-bottom:0}pn-profile-modal-type:last-of-type .profileselectoroption{padding-bottom:0}pn-profile-modal-type[selected=true]{display:-ms-flexbox;display:flex;opacity:1}";var s=e("pn_profile_modal_type",function(){function e(e){t(this,e);this.typeid="";this.name="false";this.selected=false;this.selectedprofile=null}e.prototype.onSelectedChange=function(){if(this.selected){i.selectedType=this.name}};e.prototype.render=function(){return o(n,{selected:this.selected+"","selected-profile":this.selectedprofile+""},o("slot",null))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["onSelectedChange"]}},enumerable:false,configurable:true});return e}());s.style=r}}}));
|