@postnord/pn-marketweb-components 2.0.31 → 2.0.34
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/pn-marketweb-siteheader-login-links_2.cjs.entry.js +7 -5
- package/cjs/pn-sidenav-togglebutton.cjs.entry.js +5 -2
- package/cjs/pn-sidenav.cjs.entry.js +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +8 -6
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +5 -2
- package/collection/components/navigation/pn-sidenav/pn-sidenav.css +14 -2
- package/custom-elements/index.js +13 -8
- package/esm/pn-marketweb-siteheader-login-links_2.entry.js +7 -5
- package/esm/pn-sidenav-togglebutton.entry.js +5 -2
- package/esm/pn-sidenav.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -1
- package/esm-es5/pn-sidenav-togglebutton.entry.js +1 -1
- package/esm-es5/pn-sidenav.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/{p-03f98561.system.entry.js → p-011fc8e2.system.entry.js} +1 -1
- package/pn-market-web-components/p-67380aa4.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-b88337dd.system.entry.js +1 -0
- package/pn-market-web-components/p-bd827fe6.entry.js +1 -0
- package/pn-market-web-components/p-d10fa9e8.system.entry.js +1 -0
- package/pn-market-web-components/p-f62d44bd.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +2 -1
- package/types/components/navigation/pn-sidenav/pn-sidenav-togglebutton.d.ts +1 -1
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/pn-market-web-components/p-17a6a334.system.entry.js +0 -1
- package/pn-market-web-components/p-1b5ba17f.entry.js +0 -1
- package/pn-market-web-components/p-214ddbff.entry.js +0 -1
- package/pn-market-web-components/p-413d9bd4.system.entry.js +0 -1
- package/pn-market-web-components/p-4eebeea1.entry.js +0 -1
|
@@ -135,7 +135,7 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
|
|
|
135
135
|
if (!this.loggedin || !this.profileSelectorDialog || this.profileSelectorDialog.profiles.length > 0) {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
138
|
+
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') > -1 && this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
139
139
|
const req = await fetch(apiUrl);
|
|
140
140
|
const reqdata = await req.json();
|
|
141
141
|
const fallbackData = {
|
|
@@ -143,12 +143,14 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
|
|
|
143
143
|
profiles: [
|
|
144
144
|
{
|
|
145
145
|
name: "Hedin HMC Motor Company AB",
|
|
146
|
-
|
|
146
|
+
customerNumber: "5560230053",
|
|
147
|
+
id: "7ab29701-5430-1a1a-4557-146bfd2aa35b",
|
|
147
148
|
selected: false
|
|
148
149
|
},
|
|
149
150
|
{
|
|
150
151
|
name: "Bilmetro AB",
|
|
151
|
-
|
|
152
|
+
customerNumber: "5560612789",
|
|
153
|
+
id: "43707a2b-8e91-cef1-1907-0c091b907ff3",
|
|
152
154
|
selected: true
|
|
153
155
|
}
|
|
154
156
|
]
|
|
@@ -210,9 +212,9 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
|
|
|
210
212
|
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.userName), ((this.user && this.user.username) && this.userName !== this.user.username) ?
|
|
211
213
|
index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-description" }, this.user.username)
|
|
212
214
|
: null), this.currentProfile !== null && this.currentProfile.name ?
|
|
213
|
-
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.
|
|
215
|
+
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.customerNumber))
|
|
214
216
|
: 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) => {
|
|
215
|
-
return (index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, index.h("a", { href: `${this.endpoint}/
|
|
217
|
+
return (index.h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, index.h("a", { href: `${this.endpoint}/api/user/setprofile?profile=${profile.id}&returnUrl=${window.location.href}`, 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.customerNumber)), index.h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
|
|
216
218
|
}), this.logoutLink ?
|
|
217
219
|
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))
|
|
218
220
|
: null));
|
|
@@ -15,10 +15,13 @@ let PnSidenavTogglebutton = class {
|
|
|
15
15
|
this.label = "";
|
|
16
16
|
this.i18n = { open: '', close: '', navLabel: '' };
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
onClick() {
|
|
19
|
+
pnSidenavStore.state.openMenu = !pnSidenavStore.state.openMenu;
|
|
20
|
+
const body = document.querySelector('body');
|
|
21
|
+
body.setAttribute('data-siteheader-sidemenuopen', pnSidenavStore.state.openMenu + '');
|
|
19
22
|
}
|
|
20
23
|
render() {
|
|
21
|
-
return (index.h(index.Host, null, index.h("pn-button", { appearance: "light", icon:
|
|
24
|
+
return (index.h(index.Host, null, index.h("pn-button", { appearance: "light", icon: pnSidenavStore.state.openMenu ? 'close-small' : 'bars', "left-icon": true, small: true, onclick: this.onClick.bind(this), label: this.label }, index.h("slot", null))));
|
|
22
25
|
}
|
|
23
26
|
get hostElement() { return index.getElement(this); }
|
|
24
27
|
};
|
|
@@ -34,7 +34,7 @@ const translations = {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
const pnSidenavCss = "pn-sidenav{display:block;height:auto;width:
|
|
37
|
+
const pnSidenavCss = "body[data-siteheader-sidemenuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-sidemenuopen=true]{max-height:initial;overflow:initial}}pn-sidenav{display:block;height:auto;width:100vw;padding:0 1.6rem;background-color:#FFFFFF;z-index:6;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;z-index:inherit;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";
|
|
38
38
|
|
|
39
39
|
let PnSidenav = class {
|
|
40
40
|
constructor(hostRef) {
|
|
@@ -33,7 +33,7 @@ export class PnMarketwebSiteheaderLoginProfileselection {
|
|
|
33
33
|
if (!this.loggedin || !this.profileSelectorDialog || this.profileSelectorDialog.profiles.length > 0) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
36
|
+
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') > -1 && this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
37
37
|
const req = await fetch(apiUrl);
|
|
38
38
|
const reqdata = await req.json();
|
|
39
39
|
const fallbackData = {
|
|
@@ -41,12 +41,14 @@ export class PnMarketwebSiteheaderLoginProfileselection {
|
|
|
41
41
|
profiles: [
|
|
42
42
|
{
|
|
43
43
|
name: "Hedin HMC Motor Company AB",
|
|
44
|
-
|
|
44
|
+
customerNumber: "5560230053",
|
|
45
|
+
id: "7ab29701-5430-1a1a-4557-146bfd2aa35b",
|
|
45
46
|
selected: false
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
name: "Bilmetro AB",
|
|
49
|
-
|
|
50
|
+
customerNumber: "5560612789",
|
|
51
|
+
id: "43707a2b-8e91-cef1-1907-0c091b907ff3",
|
|
50
52
|
selected: true
|
|
51
53
|
}
|
|
52
54
|
]
|
|
@@ -115,16 +117,16 @@ export class PnMarketwebSiteheaderLoginProfileselection {
|
|
|
115
117
|
this.currentProfile !== null && this.currentProfile.name ?
|
|
116
118
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" },
|
|
117
119
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.currentProfile.name),
|
|
118
|
-
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.
|
|
120
|
+
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.customerNumber))
|
|
119
121
|
: null,
|
|
120
122
|
h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks.filter(x => x.isLogoutLink === false), loginManager: this.loginManager, idNamespace: this.idNamespace }),
|
|
121
123
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-divider" }),
|
|
122
124
|
this.profileSelectorDialog.profiles.filter(x => x.selected === false).map((profile) => {
|
|
123
125
|
return (h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" },
|
|
124
|
-
h("a", { href: `${this.endpoint}/
|
|
126
|
+
h("a", { href: `${this.endpoint}/api/user/setprofile?profile=${profile.id}&returnUrl=${window.location.href}`, class: "pn-marketweb-siteheader-login-profileselection-profileoption-link" },
|
|
125
127
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-content" },
|
|
126
128
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-name" }, profile.name),
|
|
127
|
-
h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, profile.
|
|
129
|
+
h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, profile.customerNumber)),
|
|
128
130
|
h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
|
|
129
131
|
}),
|
|
130
132
|
this.logoutLink ?
|
|
@@ -6,11 +6,14 @@ export class PnSidenavTogglebutton {
|
|
|
6
6
|
this.label = "";
|
|
7
7
|
this.i18n = { open: '', close: '', navLabel: '' };
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
onClick() {
|
|
10
|
+
state.openMenu = !state.openMenu;
|
|
11
|
+
const body = document.querySelector('body');
|
|
12
|
+
body.setAttribute('data-siteheader-sidemenuopen', state.openMenu + '');
|
|
10
13
|
}
|
|
11
14
|
render() {
|
|
12
15
|
return (h(Host, null,
|
|
13
|
-
h("pn-button", { appearance: "light", icon:
|
|
16
|
+
h("pn-button", { appearance: "light", icon: state.openMenu ? 'close-small' : 'bars', "left-icon": true, small: true, onclick: this.onClick.bind(this), label: this.label },
|
|
14
17
|
h("slot", null))));
|
|
15
18
|
}
|
|
16
19
|
static get is() { return "pn-sidenav-togglebutton"; }
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
body[data-siteheader-sidemenuopen=true] {
|
|
2
|
+
max-height: 100vh;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
}
|
|
5
|
+
@media screen and (min-width: 60em) {
|
|
6
|
+
body[data-siteheader-sidemenuopen=true] {
|
|
7
|
+
max-height: initial;
|
|
8
|
+
overflow: initial;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
pn-sidenav {
|
|
2
13
|
display: block;
|
|
3
14
|
height: auto;
|
|
4
|
-
width:
|
|
15
|
+
width: 100vw;
|
|
5
16
|
padding: 0 1.6rem;
|
|
6
17
|
background-color: #FFFFFF;
|
|
7
|
-
z-index:
|
|
18
|
+
z-index: 6;
|
|
8
19
|
transform: translateX(-100vw);
|
|
9
20
|
transition: transform 0.2s 0s;
|
|
10
21
|
transition-property: transform, visibility;
|
|
@@ -30,6 +41,7 @@ pn-sidenav[open=true] {
|
|
|
30
41
|
transform: none;
|
|
31
42
|
visibility: visible;
|
|
32
43
|
top: 0;
|
|
44
|
+
z-index: inherit;
|
|
33
45
|
width: 100%;
|
|
34
46
|
padding: 0;
|
|
35
47
|
height: auto;
|
package/custom-elements/index.js
CHANGED
|
@@ -4950,7 +4950,7 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
4950
4950
|
if (!this.loggedin || !this.profileSelectorDialog || this.profileSelectorDialog.profiles.length > 0) {
|
|
4951
4951
|
return;
|
|
4952
4952
|
}
|
|
4953
|
-
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
4953
|
+
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') > -1 && this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
4954
4954
|
const req = await fetch(apiUrl);
|
|
4955
4955
|
const reqdata = await req.json();
|
|
4956
4956
|
const fallbackData = {
|
|
@@ -4958,12 +4958,14 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
4958
4958
|
profiles: [
|
|
4959
4959
|
{
|
|
4960
4960
|
name: "Hedin HMC Motor Company AB",
|
|
4961
|
-
|
|
4961
|
+
customerNumber: "5560230053",
|
|
4962
|
+
id: "7ab29701-5430-1a1a-4557-146bfd2aa35b",
|
|
4962
4963
|
selected: false
|
|
4963
4964
|
},
|
|
4964
4965
|
{
|
|
4965
4966
|
name: "Bilmetro AB",
|
|
4966
|
-
|
|
4967
|
+
customerNumber: "5560612789",
|
|
4968
|
+
id: "43707a2b-8e91-cef1-1907-0c091b907ff3",
|
|
4967
4969
|
selected: true
|
|
4968
4970
|
}
|
|
4969
4971
|
]
|
|
@@ -5025,9 +5027,9 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
5025
5027
|
return (h(Host, Object.assign({}, hostElementAttribute), this.heading ? h("strong", { class: "pn-marketweb-siteheader-login-profileselection-heading" }, this.heading) : null, h("div", { class: "pn-marketweb-siteheader-login-profileselection-user" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-name" }, this.userName), ((this.user && this.user.username) && this.userName !== this.user.username) ?
|
|
5026
5028
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-description" }, this.user.username)
|
|
5027
5029
|
: null), this.currentProfile !== null && this.currentProfile.name ?
|
|
5028
|
-
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.currentProfile.name), h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.
|
|
5030
|
+
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.currentProfile.name), h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.customerNumber))
|
|
5029
5031
|
: null, h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks.filter(x => x.isLogoutLink === false), loginManager: this.loginManager, idNamespace: this.idNamespace }), h("div", { class: "pn-marketweb-siteheader-login-profileselection-divider" }), this.profileSelectorDialog.profiles.filter(x => x.selected === false).map((profile) => {
|
|
5030
|
-
return (h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, h("a", { href: `${this.endpoint}/
|
|
5032
|
+
return (h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, h("a", { href: `${this.endpoint}/api/user/setprofile?profile=${profile.id}&returnUrl=${window.location.href}`, class: "pn-marketweb-siteheader-login-profileselection-profileoption-link" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-content" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-name" }, profile.name), h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, profile.customerNumber)), h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
|
|
5031
5033
|
}), this.logoutLink ?
|
|
5032
5034
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-logout" }, h("a", { href: this.logoutLink.href, rel: "nofollower noopener", class: "pn-marketweb-siteheader-login-profileselection-logout-link" }, this.logoutLink.linkText))
|
|
5033
5035
|
: null));
|
|
@@ -5761,7 +5763,7 @@ const { state, onChange } = createStore({
|
|
|
5761
5763
|
}
|
|
5762
5764
|
});
|
|
5763
5765
|
|
|
5764
|
-
const pnSidenavCss = "pn-sidenav{display:block;height:auto;width:
|
|
5766
|
+
const pnSidenavCss = "body[data-siteheader-sidemenuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-sidemenuopen=true]{max-height:initial;overflow:initial}}pn-sidenav{display:block;height:auto;width:100vw;padding:0 1.6rem;background-color:#FFFFFF;z-index:6;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;z-index:inherit;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";
|
|
5765
5767
|
|
|
5766
5768
|
let PnSidenav$1 = class extends HTMLElement {
|
|
5767
5769
|
constructor() {
|
|
@@ -5929,10 +5931,13 @@ let PnSidenavTogglebutton$1 = class extends HTMLElement {
|
|
|
5929
5931
|
this.label = "";
|
|
5930
5932
|
this.i18n = { open: '', close: '', navLabel: '' };
|
|
5931
5933
|
}
|
|
5932
|
-
|
|
5934
|
+
onClick() {
|
|
5935
|
+
state.openMenu = !state.openMenu;
|
|
5936
|
+
const body = document.querySelector('body');
|
|
5937
|
+
body.setAttribute('data-siteheader-sidemenuopen', state.openMenu + '');
|
|
5933
5938
|
}
|
|
5934
5939
|
render() {
|
|
5935
|
-
return (h(Host, null, h("pn-button", { appearance: "light", icon:
|
|
5940
|
+
return (h(Host, null, h("pn-button", { appearance: "light", icon: state.openMenu ? 'close-small' : 'bars', "left-icon": true, small: true, onclick: this.onClick.bind(this), label: this.label }, h("slot", null))));
|
|
5936
5941
|
}
|
|
5937
5942
|
get hostElement() { return this; }
|
|
5938
5943
|
static get style() { return pnSidenavTogglebuttonCss; }
|
|
@@ -131,7 +131,7 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
|
|
|
131
131
|
if (!this.loggedin || !this.profileSelectorDialog || this.profileSelectorDialog.profiles.length > 0) {
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
134
|
+
let apiUrl = `${this.endpoint}${(this.endpoint.lastIndexOf('/') > -1 && this.endpoint.lastIndexOf('/') === this.endpoint.length - 1) ? '' : '/'}api/user/parentprofiles`;
|
|
135
135
|
const req = await fetch(apiUrl);
|
|
136
136
|
const reqdata = await req.json();
|
|
137
137
|
const fallbackData = {
|
|
@@ -139,12 +139,14 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
|
|
|
139
139
|
profiles: [
|
|
140
140
|
{
|
|
141
141
|
name: "Hedin HMC Motor Company AB",
|
|
142
|
-
|
|
142
|
+
customerNumber: "5560230053",
|
|
143
|
+
id: "7ab29701-5430-1a1a-4557-146bfd2aa35b",
|
|
143
144
|
selected: false
|
|
144
145
|
},
|
|
145
146
|
{
|
|
146
147
|
name: "Bilmetro AB",
|
|
147
|
-
|
|
148
|
+
customerNumber: "5560612789",
|
|
149
|
+
id: "43707a2b-8e91-cef1-1907-0c091b907ff3",
|
|
148
150
|
selected: true
|
|
149
151
|
}
|
|
150
152
|
]
|
|
@@ -206,9 +208,9 @@ let PnMarketwebSiteheaderLoginProfileselection = class {
|
|
|
206
208
|
return (h(Host, Object.assign({}, hostElementAttribute), this.heading ? h("strong", { class: "pn-marketweb-siteheader-login-profileselection-heading" }, this.heading) : null, h("div", { class: "pn-marketweb-siteheader-login-profileselection-user" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-name" }, this.userName), ((this.user && this.user.username) && this.userName !== this.user.username) ?
|
|
207
209
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-user-description" }, this.user.username)
|
|
208
210
|
: null), this.currentProfile !== null && this.currentProfile.name ?
|
|
209
|
-
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.currentProfile.name), h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.
|
|
211
|
+
h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-name" }, this.currentProfile.name), h("div", { class: "pn-marketweb-siteheader-login-profileselection-currentprofile-description" }, this.currentProfile.customerNumber))
|
|
210
212
|
: null, h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks.filter(x => x.isLogoutLink === false), loginManager: this.loginManager, idNamespace: this.idNamespace }), h("div", { class: "pn-marketweb-siteheader-login-profileselection-divider" }), this.profileSelectorDialog.profiles.filter(x => x.selected === false).map((profile) => {
|
|
211
|
-
return (h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, h("a", { href: `${this.endpoint}/
|
|
213
|
+
return (h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, h("a", { href: `${this.endpoint}/api/user/setprofile?profile=${profile.id}&returnUrl=${window.location.href}`, class: "pn-marketweb-siteheader-login-profileselection-profileoption-link" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-content" }, h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-name" }, profile.name), h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, profile.customerNumber)), h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
|
|
212
214
|
}), this.logoutLink ?
|
|
213
215
|
h("div", { class: "pn-marketweb-siteheader-login-profileselection-logout" }, h("a", { href: this.logoutLink.href, rel: "nofollower noopener", class: "pn-marketweb-siteheader-login-profileselection-logout-link" }, this.logoutLink.linkText))
|
|
214
216
|
: null));
|
|
@@ -11,10 +11,13 @@ let PnSidenavTogglebutton = class {
|
|
|
11
11
|
this.label = "";
|
|
12
12
|
this.i18n = { open: '', close: '', navLabel: '' };
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
onClick() {
|
|
15
|
+
state.openMenu = !state.openMenu;
|
|
16
|
+
const body = document.querySelector('body');
|
|
17
|
+
body.setAttribute('data-siteheader-sidemenuopen', state.openMenu + '');
|
|
15
18
|
}
|
|
16
19
|
render() {
|
|
17
|
-
return (h(Host, null, h("pn-button", { appearance: "light", icon:
|
|
20
|
+
return (h(Host, null, h("pn-button", { appearance: "light", icon: state.openMenu ? 'close-small' : 'bars', "left-icon": true, small: true, onclick: this.onClick.bind(this), label: this.label }, h("slot", null))));
|
|
18
21
|
}
|
|
19
22
|
get hostElement() { return getElement(this); }
|
|
20
23
|
};
|
package/esm/pn-sidenav.entry.js
CHANGED
|
@@ -30,7 +30,7 @@ const translations = {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const pnSidenavCss = "pn-sidenav{display:block;height:auto;width:
|
|
33
|
+
const pnSidenavCss = "body[data-siteheader-sidemenuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-sidemenuopen=true]{max-height:initial;overflow:initial}}pn-sidenav{display:block;height:auto;width:100vw;padding:0 1.6rem;background-color:#FFFFFF;z-index:6;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;z-index:inherit;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";
|
|
34
34
|
|
|
35
35
|
let PnSidenav = class {
|
|
36
36
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,i,n,t){function o(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,r){function l(e){try{s(t.next(e))}catch(i){r(i)}}function a(e){try{s(t["throw"](e))}catch(i){r(i)}}function s(e){e.done?n(e.value):o(e.value).then(l,a)}s((t=t.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,o,r,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(i){return s([e,i])}}function s(l){if(t)throw new TypeError("Generator is already executing.");while(n)try{if(t=1,o&&(r=l[0]&2?o["return"]:l[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;if(o=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1];r=l;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(l);break}if(r[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(a){l=[6,a];o=0}finally{t=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";var pnMarketwebSiteheaderLoginLinksCss="";var PnMarketwebSiteheaderLoginLinks=function(){function e(e){registerInstance(this,e);this.loginDialog=null;this.loginManager=null;this.idNamespace="";this.loggedin=false;this.username=""}e.prototype.componentWillLoad=function(){this.init()};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.adjustLoginLinks();return[2]}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;if(!this.loginDialog){return}var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loginMenuLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loginMenuLinks.forEach(r)}if((t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks){(o=this.loginDialog)===null||o===void 0?void 0:o.loggedInLinks.forEach(r)}this.loginDialog.legacyLoginLinks=[{href:this.loginManager.getLoginUrl(this.loginDialog.loginUrl),linkText:this.loginDialog.loginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,linkType:"primary",primaryLinkApperance:true},{href:this.loginManager.getLoginUrl(this.loginDialog.registerUrl),linkText:this.loginDialog.createLoginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,primaryLinkApperance:false}]};e.prototype.render=function(){var e;if(!this.loginDialog){return}var i={username:null,loggedin:false};if(this.username){i.username=this.username;i.loggedin=this.loggedin}return h(Host,Object.assign({},i),!this.loginDialog.overrideLoginMenu?h("div",{"data-loggedin":this.loggedin+""},this.loggedin?h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):h("div",null,((e=this.loginDialog.loginMenuLinks)===null||e===void 0?void 0:e.length)>0?h("pn-marketweb-siteheader-login-linklist",{heading:this.loginDialog.loginTitle,links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.legacyLoginLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}))):null,this.loginDialog.overrideLoginMenu?h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{loginDialog:["init"]}},enumerable:false,configurable:true});return e}();PnMarketwebSiteheaderLoginLinks.style=pnMarketwebSiteheaderLoginLinksCss;var 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}';var PnMarketwebSiteheaderLoginProfileselection=function(){function e(e){registerInstance(this,e);this.loginDialog=null;this.loginManager=null;this.endpoint="";this.loggedin=false;this.idNamespace="";this.heading=null;this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""};this.user=null;this.logoutLink=null;this.userName=null;this.profileSelectorDialog={profiles:[]};this.currentProfile=null}e.prototype.componentWillLoad=function(){var e;if(this.heading===null&&((e=this.i18n)===null||e===void 0?void 0:e.profileSelectionFlyoutHeading)){this.heading=this.i18n.profileSelectionFlyoutHeading}this.init()};e.prototype.init=function(){this.updateUserInfo();this.adjustLoginLinks();this.fetchProfiles()};e.prototype.fetchProfiles=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,t,o,r;return __generator(this,(function(l){switch(l.label){case 0:if(!this.loggedin||!this.profileSelectorDialog||this.profileSelectorDialog.profiles.length>0){return[2]}e="".concat(this.endpoint).concat(this.endpoint.lastIndexOf("/")===this.endpoint.length-1?"":"/","api/user/parentprofiles");return[4,fetch(e)];case 1:i=l.sent();return[4,i.json()];case 2:n=l.sent();t={loggedin:true,profiles:[{name:"Hedin HMC Motor Company AB",organizationNumber:"5560230053",selected:false},{name:"Bilmetro AB",organizationNumber:"5560612789",selected:true}]};o=window.location.href.indexOf("localhost:6008")!==-1?t:n;if(!o||!o.profiles||!o.profiles.length){return[2]}this.profileSelectorDialog.profiles=o.profiles;r=o.profiles.filter((function(e){return e.selected===true}));if(r[0]&&r[0].name){this.currentProfile=r[0]}return[2]}}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loggedInLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loggedInLinks.forEach(r)}this.logoutLink=(o=(t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks.filter((function(e){return e.isLogoutLink}))[0])!==null&&o!==void 0?o:null};e.prototype.updateUserInfo=function(){var e=this.loginManager.getUserInfo();this.user=e;if(!e){return}if(e.given_name){this.userName=e.given_name;return}if(e.family_name){this.userName=e.family_name;return}if(e.username){this.userName=e.username;return}};e.prototype.render=function(){var e=this;if(!this.loginDialog||!this.profileSelectorDialog){return}var i={};return h(Host,Object.assign({},i),this.heading?h("strong",{class:"pn-marketweb-siteheader-login-profileselection-heading"},this.heading):null,h("div",{class:"pn-marketweb-siteheader-login-profileselection-user"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-user-name"},this.userName),this.user&&this.user.username&&this.userName!==this.user.username?h("div",{class:"pn-marketweb-siteheader-login-profileselection-user-description"},this.user.username):null),this.currentProfile!==null&&this.currentProfile.name?h("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-name"},this.currentProfile.name),h("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-description"},this.currentProfile.organizationNumber)):null,h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks.filter((function(e){return e.isLogoutLink===false})),loginManager:this.loginManager,idNamespace:this.idNamespace}),h("div",{class:"pn-marketweb-siteheader-login-profileselection-divider"}),this.profileSelectorDialog.profiles.filter((function(e){return e.selected===false})).map((function(i){return h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption"},h("a",{href:"".concat(e.endpoint,"/UnifiedLogin/ExternalLoginCallback?returnUrl=").concat(window.location.href,"?profile=").concat(i.organizationNumber,"}"),class:"pn-marketweb-siteheader-login-profileselection-profileoption-link"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-content"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-name"},i.name),h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-description"},i.organizationNumber)),h("pn-icon",{symbol:"arrow-right",small:"false",color:"blue700"})))})),this.logoutLink?h("div",{class:"pn-marketweb-siteheader-login-profileselection-logout"},h("a",{href:this.logoutLink.href,rel:"nofollower noopener",class:"pn-marketweb-siteheader-login-profileselection-logout-link"},this.logoutLink.linkText)):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PnMarketwebSiteheaderLoginProfileselection.style=pnMarketwebSiteheaderLoginProfileselectionCss;export{PnMarketwebSiteheaderLoginLinks as pn_marketweb_siteheader_login_links,PnMarketwebSiteheaderLoginProfileselection as pn_marketweb_siteheader_login_profileselection};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,i,n,t){function o(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,r){function l(e){try{s(t.next(e))}catch(i){r(i)}}function a(e){try{s(t["throw"](e))}catch(i){r(i)}}function s(e){e.done?n(e.value):o(e.value).then(l,a)}s((t=t.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,o,r,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(i){return s([e,i])}}function s(l){if(t)throw new TypeError("Generator is already executing.");while(n)try{if(t=1,o&&(r=l[0]&2?o["return"]:l[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;if(o=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1];r=l;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(l);break}if(r[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(a){l=[6,a];o=0}finally{t=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";var pnMarketwebSiteheaderLoginLinksCss="";var PnMarketwebSiteheaderLoginLinks=function(){function e(e){registerInstance(this,e);this.loginDialog=null;this.loginManager=null;this.idNamespace="";this.loggedin=false;this.username=""}e.prototype.componentWillLoad=function(){this.init()};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.adjustLoginLinks();return[2]}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;if(!this.loginDialog){return}var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loginMenuLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loginMenuLinks.forEach(r)}if((t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks){(o=this.loginDialog)===null||o===void 0?void 0:o.loggedInLinks.forEach(r)}this.loginDialog.legacyLoginLinks=[{href:this.loginManager.getLoginUrl(this.loginDialog.loginUrl),linkText:this.loginDialog.loginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,linkType:"primary",primaryLinkApperance:true},{href:this.loginManager.getLoginUrl(this.loginDialog.registerUrl),linkText:this.loginDialog.createLoginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,primaryLinkApperance:false}]};e.prototype.render=function(){var e;if(!this.loginDialog){return}var i={username:null,loggedin:false};if(this.username){i.username=this.username;i.loggedin=this.loggedin}return h(Host,Object.assign({},i),!this.loginDialog.overrideLoginMenu?h("div",{"data-loggedin":this.loggedin+""},this.loggedin?h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):h("div",null,((e=this.loginDialog.loginMenuLinks)===null||e===void 0?void 0:e.length)>0?h("pn-marketweb-siteheader-login-linklist",{heading:this.loginDialog.loginTitle,links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.legacyLoginLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}))):null,this.loginDialog.overrideLoginMenu?h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{loginDialog:["init"]}},enumerable:false,configurable:true});return e}();PnMarketwebSiteheaderLoginLinks.style=pnMarketwebSiteheaderLoginLinksCss;var 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}';var PnMarketwebSiteheaderLoginProfileselection=function(){function e(e){registerInstance(this,e);this.loginDialog=null;this.loginManager=null;this.endpoint="";this.loggedin=false;this.idNamespace="";this.heading=null;this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""};this.user=null;this.logoutLink=null;this.userName=null;this.profileSelectorDialog={profiles:[]};this.currentProfile=null}e.prototype.componentWillLoad=function(){var e;if(this.heading===null&&((e=this.i18n)===null||e===void 0?void 0:e.profileSelectionFlyoutHeading)){this.heading=this.i18n.profileSelectionFlyoutHeading}this.init()};e.prototype.init=function(){this.updateUserInfo();this.adjustLoginLinks();this.fetchProfiles()};e.prototype.fetchProfiles=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,t,o,r;return __generator(this,(function(l){switch(l.label){case 0:if(!this.loggedin||!this.profileSelectorDialog||this.profileSelectorDialog.profiles.length>0){return[2]}e="".concat(this.endpoint).concat(this.endpoint.lastIndexOf("/")>-1&&this.endpoint.lastIndexOf("/")===this.endpoint.length-1?"":"/","api/user/parentprofiles");return[4,fetch(e)];case 1:i=l.sent();return[4,i.json()];case 2:n=l.sent();t={loggedin:true,profiles:[{name:"Hedin HMC Motor Company AB",customerNumber:"5560230053",id:"7ab29701-5430-1a1a-4557-146bfd2aa35b",selected:false},{name:"Bilmetro AB",customerNumber:"5560612789",id:"43707a2b-8e91-cef1-1907-0c091b907ff3",selected:true}]};o=window.location.href.indexOf("localhost:6008")!==-1?t:n;if(!o||!o.profiles||!o.profiles.length){return[2]}this.profileSelectorDialog.profiles=o.profiles;r=o.profiles.filter((function(e){return e.selected===true}));if(r[0]&&r[0].name){this.currentProfile=r[0]}return[2]}}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loggedInLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loggedInLinks.forEach(r)}this.logoutLink=(o=(t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks.filter((function(e){return e.isLogoutLink}))[0])!==null&&o!==void 0?o:null};e.prototype.updateUserInfo=function(){var e=this.loginManager.getUserInfo();this.user=e;if(!e){return}if(e.given_name){this.userName=e.given_name;return}if(e.family_name){this.userName=e.family_name;return}if(e.username){this.userName=e.username;return}};e.prototype.render=function(){var e=this;if(!this.loginDialog||!this.profileSelectorDialog){return}var i={};return h(Host,Object.assign({},i),this.heading?h("strong",{class:"pn-marketweb-siteheader-login-profileselection-heading"},this.heading):null,h("div",{class:"pn-marketweb-siteheader-login-profileselection-user"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-user-name"},this.userName),this.user&&this.user.username&&this.userName!==this.user.username?h("div",{class:"pn-marketweb-siteheader-login-profileselection-user-description"},this.user.username):null),this.currentProfile!==null&&this.currentProfile.name?h("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-name"},this.currentProfile.name),h("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-description"},this.currentProfile.customerNumber)):null,h("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks.filter((function(e){return e.isLogoutLink===false})),loginManager:this.loginManager,idNamespace:this.idNamespace}),h("div",{class:"pn-marketweb-siteheader-login-profileselection-divider"}),this.profileSelectorDialog.profiles.filter((function(e){return e.selected===false})).map((function(i){return h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption"},h("a",{href:"".concat(e.endpoint,"/api/user/setprofile?profile=").concat(i.id,"&returnUrl=").concat(window.location.href),class:"pn-marketweb-siteheader-login-profileselection-profileoption-link"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-content"},h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-name"},i.name),h("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-description"},i.customerNumber)),h("pn-icon",{symbol:"arrow-right",small:"false",color:"blue700"})))})),this.logoutLink?h("div",{class:"pn-marketweb-siteheader-login-profileselection-logout"},h("a",{href:this.logoutLink.href,rel:"nofollower noopener",class:"pn-marketweb-siteheader-login-profileselection-logout-link"},this.logoutLink.linkText)):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PnMarketwebSiteheaderLoginProfileselection.style=pnMarketwebSiteheaderLoginProfileselectionCss;export{PnMarketwebSiteheaderLoginLinks as pn_marketweb_siteheader_login_links,PnMarketwebSiteheaderLoginProfileselection as pn_marketweb_siteheader_login_profileselection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";import{s as state}from"./pn-sidenav-store-50b186d6.js";import"./index-7b21ecff.js";var pnSidenavTogglebuttonCss="pn-sidenav-togglebutton{display:block;width:100%;padding:0.8rem 1.6rem;background:#EFFBFF}@media screen and (min-width: 64em){pn-sidenav-togglebutton{display:none}}";var PnSidenavTogglebutton=function(){function e(e){registerInstance(this,e);this.label="";this.i18n={open:"",close:"",navLabel:""}}e.prototype.
|
|
1
|
+
import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";import{s as state}from"./pn-sidenav-store-50b186d6.js";import"./index-7b21ecff.js";var pnSidenavTogglebuttonCss="pn-sidenav-togglebutton{display:block;width:100%;padding:0.8rem 1.6rem;background:#EFFBFF}@media screen and (min-width: 64em){pn-sidenav-togglebutton{display:none}}";var PnSidenavTogglebutton=function(){function e(e){registerInstance(this,e);this.label="";this.i18n={open:"",close:"",navLabel:""}}e.prototype.onClick=function(){state.openMenu=!state.openMenu;var e=document.querySelector("body");e.setAttribute("data-siteheader-sidemenuopen",state.openMenu+"")};e.prototype.render=function(){return h(Host,null,h("pn-button",{appearance:"light",icon:state.openMenu?"close-small":"bars","left-icon":true,small:true,onclick:this.onClick.bind(this),label:this.label},h("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PnSidenavTogglebutton.style=pnSidenavTogglebuttonCss;export{PnSidenavTogglebutton as pn_sidenav_togglebutton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,t,i){function a(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function o(e){try{l(i.next(e))}catch(n){r(n)}}function s(e){try{l(i["throw"](e))}catch(n){r(n)}}function l(e){e.done?t(e.value):a(e.value).then(o,s)}l((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(n){return l([e,n])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(t)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){t.label=o[1];break}if(o[0]===6&&t.label<r[1]){t.label=r[1];r=o;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(o);break}if(r[2])t.ops.pop();t.trys.pop();continue}o=n.call(e,t)}catch(s){o=[6,s];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-5397620b.js";import{s as state}from"./pn-sidenav-store-50b186d6.js";import"./index-7b21ecff.js";var translations={sv:{open:"Öppna",close:"Stäng",navLabel:"Undernavigering"},en:{open:"Open",close:"Close",navLabel:"Sub navigation"},da:{open:"Åbne",close:"Stæng",navLabel:"Undernavigation"},no:{open:"Åpne",close:"Stäng",navLabel:"Undernavigering"},fi:{open:"Avaa",close:"Sulje",navLabel:"Ali navigointi"}};var pnSidenavCss="body[data-siteheader-sidemenuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-sidemenuopen=true]{max-height:initial;overflow:initial}}pn-sidenav{display:block;height:auto;width:100vw;padding:0 1.6rem;background-color:#FFFFFF;z-index:6;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;z-index:inherit;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";var PnSidenav=function(){function e(e){registerInstance(this,e);this.language="sv";this.navLabel="";this.i18n={open:"",close:"",navLabel:""}}e.prototype.componentWillLoad=function(){this.init()};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.setLanguage();if(window.matchMedia("screen and (min-width:64em)").matches===false){state.openMenu=false}return[2]}))}))};e.prototype.setLanguage=function(){if(translations[this.language]){state.i18n=translations[this.language];if(!this.navLabel){this.navLabel=this.i18n.navLabel}}};e.prototype.onOpenSubMenuLevelChange=function(e){state.openLevel=e.detail};e.prototype.render=function(){return h(Host,{open:(state.openMenu==true)+""},h("slot",{name:"above"}),h("nav",{class:"sidenav","aria-label":this.navLabel},h("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PnSidenav.style=pnSidenavCss;export{PnSidenav as pn_sidenav};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,i,n,t){function o(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,r){function l(e){try{s(t.next(e))}catch(i){r(i)}}function a(e){try{s(t["throw"](e))}catch(i){r(i)}}function s(e){e.done?n(e.value):o(e.value).then(l,a)}s((t=t.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,o,r,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(i){return s([e,i])}}function s(l){if(t)throw new TypeError("Generator is already executing.");while(n)try{if(t=1,o&&(r=l[0]&2?o["return"]:l[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;if(o=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1];r=l;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(l);break}if(r[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(a){l=[6,a];o=0}finally{t=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var i,n,t,o;return{setters:[function(e){i=e.r;n=e.h;t=e.a;o=e.g}],execute:function(){var r="";var l=e("pn_marketweb_siteheader_login_links",function(){function e(e){i(this,e);this.loginDialog=null;this.loginManager=null;this.idNamespace="";this.loggedin=false;this.username=""}e.prototype.componentWillLoad=function(){this.init()};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.adjustLoginLinks();return[2]}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;if(!this.loginDialog){return}var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loginMenuLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loginMenuLinks.forEach(r)}if((t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks){(o=this.loginDialog)===null||o===void 0?void 0:o.loggedInLinks.forEach(r)}this.loginDialog.legacyLoginLinks=[{href:this.loginManager.getLoginUrl(this.loginDialog.loginUrl),linkText:this.loginDialog.loginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,linkType:"primary",primaryLinkApperance:true},{href:this.loginManager.getLoginUrl(this.loginDialog.registerUrl),linkText:this.loginDialog.createLoginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,primaryLinkApperance:false}]};e.prototype.render=function(){var e;if(!this.loginDialog){return}var i={username:null,loggedin:false};if(this.username){i.username=this.username;i.loggedin=this.loggedin}return n(t,Object.assign({},i),!this.loginDialog.overrideLoginMenu?n("div",{"data-loggedin":this.loggedin+""},this.loggedin?n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):n("div",null,((e=this.loginDialog.loginMenuLinks)===null||e===void 0?void 0:e.length)>0?n("pn-marketweb-siteheader-login-linklist",{heading:this.loginDialog.loginTitle,links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.legacyLoginLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}))):null,this.loginDialog.overrideLoginMenu?n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{loginDialog:["init"]}},enumerable:false,configurable:true});return e}());l.style=r;var a='.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}';var s=e("pn_marketweb_siteheader_login_profileselection",function(){function e(e){i(this,e);this.loginDialog=null;this.loginManager=null;this.endpoint="";this.loggedin=false;this.idNamespace="";this.heading=null;this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""};this.user=null;this.logoutLink=null;this.userName=null;this.profileSelectorDialog={profiles:[]};this.currentProfile=null}e.prototype.componentWillLoad=function(){var e;if(this.heading===null&&((e=this.i18n)===null||e===void 0?void 0:e.profileSelectionFlyoutHeading)){this.heading=this.i18n.profileSelectionFlyoutHeading}this.init()};e.prototype.init=function(){this.updateUserInfo();this.adjustLoginLinks();this.fetchProfiles()};e.prototype.fetchProfiles=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,t,o,r;return __generator(this,(function(l){switch(l.label){case 0:if(!this.loggedin||!this.profileSelectorDialog||this.profileSelectorDialog.profiles.length>0){return[2]}e="".concat(this.endpoint).concat(this.endpoint.lastIndexOf("/")===this.endpoint.length-1?"":"/","api/user/parentprofiles");return[4,fetch(e)];case 1:i=l.sent();return[4,i.json()];case 2:n=l.sent();t={loggedin:true,profiles:[{name:"Hedin HMC Motor Company AB",organizationNumber:"5560230053",selected:false},{name:"Bilmetro AB",organizationNumber:"5560612789",selected:true}]};o=window.location.href.indexOf("localhost:6008")!==-1?t:n;if(!o||!o.profiles||!o.profiles.length){return[2]}this.profileSelectorDialog.profiles=o.profiles;r=o.profiles.filter((function(e){return e.selected===true}));if(r[0]&&r[0].name){this.currentProfile=r[0]}return[2]}}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loggedInLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loggedInLinks.forEach(r)}this.logoutLink=(o=(t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks.filter((function(e){return e.isLogoutLink}))[0])!==null&&o!==void 0?o:null};e.prototype.updateUserInfo=function(){var e=this.loginManager.getUserInfo();this.user=e;if(!e){return}if(e.given_name){this.userName=e.given_name;return}if(e.family_name){this.userName=e.family_name;return}if(e.username){this.userName=e.username;return}};e.prototype.render=function(){var e=this;if(!this.loginDialog||!this.profileSelectorDialog){return}var i={};return n(t,Object.assign({},i),this.heading?n("strong",{class:"pn-marketweb-siteheader-login-profileselection-heading"},this.heading):null,n("div",{class:"pn-marketweb-siteheader-login-profileselection-user"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-user-name"},this.userName),this.user&&this.user.username&&this.userName!==this.user.username?n("div",{class:"pn-marketweb-siteheader-login-profileselection-user-description"},this.user.username):null),this.currentProfile!==null&&this.currentProfile.name?n("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-name"},this.currentProfile.name),n("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-description"},this.currentProfile.organizationNumber)):null,n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks.filter((function(e){return e.isLogoutLink===false})),loginManager:this.loginManager,idNamespace:this.idNamespace}),n("div",{class:"pn-marketweb-siteheader-login-profileselection-divider"}),this.profileSelectorDialog.profiles.filter((function(e){return e.selected===false})).map((function(i){return n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption"},n("a",{href:"".concat(e.endpoint,"/UnifiedLogin/ExternalLoginCallback?returnUrl=").concat(window.location.href,"?profile=").concat(i.organizationNumber,"}"),class:"pn-marketweb-siteheader-login-profileselection-profileoption-link"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-content"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-name"},i.name),n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-description"},i.organizationNumber)),n("pn-icon",{symbol:"arrow-right",small:"false",color:"blue700"})))})),this.logoutLink?n("div",{class:"pn-marketweb-siteheader-login-profileselection-logout"},n("a",{href:this.logoutLink.href,rel:"nofollower noopener",class:"pn-marketweb-siteheader-login-profileselection-logout-link"},this.logoutLink.linkText)):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());s.style=a}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,i,n,t){function o(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,r){function l(e){try{s(t.next(e))}catch(i){r(i)}}function a(e){try{s(t["throw"](e))}catch(i){r(i)}}function s(e){e.done?n(e.value):o(e.value).then(l,a)}s((t=t.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,o,r,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(i){return s([e,i])}}function s(l){if(t)throw new TypeError("Generator is already executing.");while(n)try{if(t=1,o&&(r=l[0]&2?o["return"]:l[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;if(o=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1];r=l;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(l);break}if(r[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(a){l=[6,a];o=0}finally{t=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var i,n,t,o;return{setters:[function(e){i=e.r;n=e.h;t=e.a;o=e.g}],execute:function(){var r="";var l=e("pn_marketweb_siteheader_login_links",function(){function e(e){i(this,e);this.loginDialog=null;this.loginManager=null;this.idNamespace="";this.loggedin=false;this.username=""}e.prototype.componentWillLoad=function(){this.init()};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.adjustLoginLinks();return[2]}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;if(!this.loginDialog){return}var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loginMenuLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loginMenuLinks.forEach(r)}if((t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks){(o=this.loginDialog)===null||o===void 0?void 0:o.loggedInLinks.forEach(r)}this.loginDialog.legacyLoginLinks=[{href:this.loginManager.getLoginUrl(this.loginDialog.loginUrl),linkText:this.loginDialog.loginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,linkType:"primary",primaryLinkApperance:true},{href:this.loginManager.getLoginUrl(this.loginDialog.registerUrl),linkText:this.loginDialog.createLoginLinkText,openInNewWindow:false,isLogoutLink:false,pageLink:null,primaryLinkApperance:false}]};e.prototype.render=function(){var e;if(!this.loginDialog){return}var i={username:null,loggedin:false};if(this.username){i.username=this.username;i.loggedin=this.loggedin}return n(t,Object.assign({},i),!this.loginDialog.overrideLoginMenu?n("div",{"data-loggedin":this.loggedin+""},this.loggedin?n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):n("div",null,((e=this.loginDialog.loginMenuLinks)===null||e===void 0?void 0:e.length)>0?n("pn-marketweb-siteheader-login-linklist",{heading:this.loginDialog.loginTitle,links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.legacyLoginLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}))):null,this.loginDialog.overrideLoginMenu?n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{loginDialog:["init"]}},enumerable:false,configurable:true});return e}());l.style=r;var a='.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}';var s=e("pn_marketweb_siteheader_login_profileselection",function(){function e(e){i(this,e);this.loginDialog=null;this.loginManager=null;this.endpoint="";this.loggedin=false;this.idNamespace="";this.heading=null;this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""};this.user=null;this.logoutLink=null;this.userName=null;this.profileSelectorDialog={profiles:[]};this.currentProfile=null}e.prototype.componentWillLoad=function(){var e;if(this.heading===null&&((e=this.i18n)===null||e===void 0?void 0:e.profileSelectionFlyoutHeading)){this.heading=this.i18n.profileSelectionFlyoutHeading}this.init()};e.prototype.init=function(){this.updateUserInfo();this.adjustLoginLinks();this.fetchProfiles()};e.prototype.fetchProfiles=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,t,o,r;return __generator(this,(function(l){switch(l.label){case 0:if(!this.loggedin||!this.profileSelectorDialog||this.profileSelectorDialog.profiles.length>0){return[2]}e="".concat(this.endpoint).concat(this.endpoint.lastIndexOf("/")>-1&&this.endpoint.lastIndexOf("/")===this.endpoint.length-1?"":"/","api/user/parentprofiles");return[4,fetch(e)];case 1:i=l.sent();return[4,i.json()];case 2:n=l.sent();t={loggedin:true,profiles:[{name:"Hedin HMC Motor Company AB",customerNumber:"5560230053",id:"7ab29701-5430-1a1a-4557-146bfd2aa35b",selected:false},{name:"Bilmetro AB",customerNumber:"5560612789",id:"43707a2b-8e91-cef1-1907-0c091b907ff3",selected:true}]};o=window.location.href.indexOf("localhost:6008")!==-1?t:n;if(!o||!o.profiles||!o.profiles.length){return[2]}this.profileSelectorDialog.profiles=o.profiles;r=o.profiles.filter((function(e){return e.selected===true}));if(r[0]&&r[0].name){this.currentProfile=r[0]}return[2]}}))}))};e.prototype.adjustLoginLinks=function(){var e=this;var i,n,t,o;var r=function(i,n){i.isLogoutLink=i.href.indexOf("logout")!==-1;if(i.isLogoutLink){i.href=e.loginManager.getLogoutUrl(i.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))}if(n===0&&!i.href){i.href=e.loginManager.getLoginUrl();i.linkType="primary"}if(i.primaryLinkApperance&&!i.linkType){i.linkType="primary"}};if((i=this.loginDialog)===null||i===void 0?void 0:i.loggedInLinks){(n=this.loginDialog)===null||n===void 0?void 0:n.loggedInLinks.forEach(r)}this.logoutLink=(o=(t=this.loginDialog)===null||t===void 0?void 0:t.loggedInLinks.filter((function(e){return e.isLogoutLink}))[0])!==null&&o!==void 0?o:null};e.prototype.updateUserInfo=function(){var e=this.loginManager.getUserInfo();this.user=e;if(!e){return}if(e.given_name){this.userName=e.given_name;return}if(e.family_name){this.userName=e.family_name;return}if(e.username){this.userName=e.username;return}};e.prototype.render=function(){var e=this;if(!this.loginDialog||!this.profileSelectorDialog){return}var i={};return n(t,Object.assign({},i),this.heading?n("strong",{class:"pn-marketweb-siteheader-login-profileselection-heading"},this.heading):null,n("div",{class:"pn-marketweb-siteheader-login-profileselection-user"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-user-name"},this.userName),this.user&&this.user.username&&this.userName!==this.user.username?n("div",{class:"pn-marketweb-siteheader-login-profileselection-user-description"},this.user.username):null),this.currentProfile!==null&&this.currentProfile.name?n("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-name"},this.currentProfile.name),n("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-description"},this.currentProfile.customerNumber)):null,n("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks.filter((function(e){return e.isLogoutLink===false})),loginManager:this.loginManager,idNamespace:this.idNamespace}),n("div",{class:"pn-marketweb-siteheader-login-profileselection-divider"}),this.profileSelectorDialog.profiles.filter((function(e){return e.selected===false})).map((function(i){return n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption"},n("a",{href:"".concat(e.endpoint,"/api/user/setprofile?profile=").concat(i.id,"&returnUrl=").concat(window.location.href),class:"pn-marketweb-siteheader-login-profileselection-profileoption-link"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-content"},n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-name"},i.name),n("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-description"},i.customerNumber)),n("pn-icon",{symbol:"arrow-right",small:"false",color:"blue700"})))})),this.logoutLink?n("div",{class:"pn-marketweb-siteheader-login-profileselection-logout"},n("a",{href:this.logoutLink.href,rel:"nofollower noopener",class:"pn-marketweb-siteheader-login-profileselection-logout-link"},this.logoutLink.linkText)):null)};Object.defineProperty(e.prototype,"hostElement",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());s.style=a}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,a as n,g as s}from"./p-58e8d7d5.js";import{s as o}from"./p-bb626ab4.js";import"./p-86f06e26.js";let a=class{constructor(t){e(this,t),this.label="",this.i18n={open:"",close:"",navLabel:""}}onClick(){o.openMenu=!o.openMenu,document.querySelector("body").setAttribute("data-siteheader-sidemenuopen",o.openMenu+"")}render(){return t(n,null,t("pn-button",{appearance:"light",icon:o.openMenu?"close-small":"bars","left-icon":!0,small:!0,onclick:this.onClick.bind(this),label:this.label},t("slot",null)))}get hostElement(){return s(this)}};a.style="pn-sidenav-togglebutton{display:block;width:100%;padding:0.8rem 1.6rem;background:#EFFBFF}@media screen and (min-width: 64em){pn-sidenav-togglebutton{display:none}}";export{a as pn_sidenav_togglebutton}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,a,i,r;return{setters:[function(s){e=s.d;n=s.N;t=s.w;a=s.p;i=s.H;r=s.b}],execute:function(){var s=function(){{o(i.prototype)}var r=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(n,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var s={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return a(s)};var o=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var a=this.childNodes;if(e){for(var i=0;i<a.length;i++){if(a[i].nodeType!==2){t.appendChild(a[i].cloneNode(true))}}}return t}};s().then((function(e){return r([["p-c0be6802.system",[[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"]]]]],["p-db6efb10.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-8144bcbc.system",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-fecc53bb.system",[[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]}]]],["p-723b9901.system",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-7422abda.system",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-d7776336.system",[[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]}]]],["p-2da8e5e8.system",[[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"]]]]],["p-1924152a.system",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e6fa11ad.system",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-2718b89a.system",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-80dce81e.system",[[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"]]]]],["p-290d5824.system",[[4,"pn-product-tile"]]],["p-8f9f1b71.system",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-93cecc43.system",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-
|
|
1
|
+
System.register(["./p-36654f2a.system.js"],(function(){"use strict";var e,n,t,a,i,r;return{setters:[function(s){e=s.d;n=s.N;t=s.w;a=s.p;i=s.H;r=s.b}],execute:function(){var s=function(){{o(i.prototype)}var r=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(n,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===n}));var s={};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href}return a(s)};var o=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var a=this.childNodes;if(e){for(var i=0;i<a.length;i++){if(a[i].nodeType!==2){t.appendChild(a[i].cloneNode(true))}}}return t}};s().then((function(e){return r([["p-c0be6802.system",[[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"]]]]],["p-db6efb10.system",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-8144bcbc.system",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-fecc53bb.system",[[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]}]]],["p-723b9901.system",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-7422abda.system",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-d7776336.system",[[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]}]]],["p-2da8e5e8.system",[[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"]]]]],["p-1924152a.system",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e6fa11ad.system",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-2718b89a.system",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-80dce81e.system",[[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"]]]]],["p-290d5824.system",[[4,"pn-product-tile"]]],["p-8f9f1b71.system",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-93cecc43.system",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-d10fa9e8.system",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-885bc8d7.system",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-625fb7fb.system",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-b88337dd.system",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-8117b79e.system",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-f7b013a7.system",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-9edaf6b6.system",[[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]}]]],["p-0d5d05cc.system",[[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]}]]],["p-c2a4803f.system",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-1ce871c5.system",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-fc1083d2.system",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-e66a8bb8.system",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-011fc8e2.system",[[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],userName:[32]}]]],["p-a921d3fd.system",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-f7d1c0a0.system",[[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]}]]],["p-6ce5a56d.system",[[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"]]]],e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-36654f2a.system.js","./p-02ea55ad.system.js","./p-825b8fb8.system.js"],(function(e){"use strict";var n,t,o,i,s;return{setters:[function(e){n=e.r;t=e.h;o=e.a;i=e.g},function(e){s=e.s},function(){}],execute:function(){var r="pn-sidenav-togglebutton{display:block;width:100%;padding:0.8rem 1.6rem;background:#EFFBFF}@media screen and (min-width: 64em){pn-sidenav-togglebutton{display:none}}";var u=e("pn_sidenav_togglebutton",function(){function e(e){n(this,e);this.label="";this.i18n={open:"",close:"",navLabel:""}}e.prototype.onClick=function(){s.openMenu=!s.openMenu;var e=document.querySelector("body");e.setAttribute("data-siteheader-sidemenuopen",s.openMenu+"")};e.prototype.render=function(){return t(o,null,t("pn-button",{appearance:"light",icon:s.openMenu?"close-small":"bars","left-icon":true,small:true,onclick:this.onClick.bind(this),label:this.label},t("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());u.style=r}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i,a as t,g as n}from"./p-58e8d7d5.js";let o=class{constructor(i){e(this,i),this.loginDialog=null,this.loginManager=null,this.idNamespace="",this.loggedin=!1,this.username=""}componentWillLoad(){this.init()}async init(){this.adjustLoginLinks()}adjustLoginLinks(){var e,i,t,n;if(!this.loginDialog)return;const o=(e,i)=>{e.isLogoutLink=-1!==e.href.indexOf("logout"),e.isLogoutLink&&(e.href=this.loginManager.getLogoutUrl(e.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))),0!==i||e.href||(e.href=this.loginManager.getLoginUrl(),e.linkType="primary"),e.primaryLinkApperance&&!e.linkType&&(e.linkType="primary")};(null===(e=this.loginDialog)||void 0===e?void 0:e.loginMenuLinks)&&(null===(i=this.loginDialog)||void 0===i||i.loginMenuLinks.forEach(o)),(null===(t=this.loginDialog)||void 0===t?void 0:t.loggedInLinks)&&(null===(n=this.loginDialog)||void 0===n||n.loggedInLinks.forEach(o)),this.loginDialog.legacyLoginLinks=[{href:this.loginManager.getLoginUrl(this.loginDialog.loginUrl),linkText:this.loginDialog.loginLinkText,openInNewWindow:!1,isLogoutLink:!1,pageLink:null,linkType:"primary",primaryLinkApperance:!0},{href:this.loginManager.getLoginUrl(this.loginDialog.registerUrl),linkText:this.loginDialog.createLoginLinkText,openInNewWindow:!1,isLogoutLink:!1,pageLink:null,primaryLinkApperance:!1}]}render(){var e;if(!this.loginDialog)return;let n={username:null,loggedin:!1};return this.username&&(n.username=this.username,n.loggedin=this.loggedin),i(t,Object.assign({},n),this.loginDialog.overrideLoginMenu?null:i("div",{"data-loggedin":this.loggedin+""},this.loggedin?i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):i("div",null,(null===(e=this.loginDialog.loginMenuLinks)||void 0===e?void 0:e.length)>0?i("pn-marketweb-siteheader-login-linklist",{heading:this.loginDialog.loginTitle,links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.legacyLoginLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}))),this.loginDialog.overrideLoginMenu?i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):null)}get hostElement(){return n(this)}static get watchers(){return{loginDialog:["init"]}}};o.style="";let l=class{constructor(i){e(this,i),this.loginDialog=null,this.loginManager=null,this.endpoint="",this.loggedin=!1,this.idNamespace="",this.heading=null,this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""},this.user=null,this.logoutLink=null,this.userName=null,this.profileSelectorDialog={profiles:[]},this.currentProfile=null}componentWillLoad(){var e;null===this.heading&&(null===(e=this.i18n)||void 0===e?void 0:e.profileSelectionFlyoutHeading)&&(this.heading=this.i18n.profileSelectionFlyoutHeading),this.init()}init(){this.updateUserInfo(),this.adjustLoginLinks(),this.fetchProfiles()}async fetchProfiles(){if(!this.loggedin||!this.profileSelectorDialog||this.profileSelectorDialog.profiles.length>0)return;let e=`${this.endpoint}${this.endpoint.lastIndexOf("/")>-1&&this.endpoint.lastIndexOf("/")===this.endpoint.length-1?"":"/"}api/user/parentprofiles`;const i=await fetch(e),t=await i.json(),n=-1!==window.location.href.indexOf("localhost:6008")?{loggedin:!0,profiles:[{name:"Hedin HMC Motor Company AB",customerNumber:"5560230053",id:"7ab29701-5430-1a1a-4557-146bfd2aa35b",selected:!1},{name:"Bilmetro AB",customerNumber:"5560612789",id:"43707a2b-8e91-cef1-1907-0c091b907ff3",selected:!0}]}:t;if(!n||!n.profiles||!n.profiles.length)return;this.profileSelectorDialog.profiles=n.profiles;const o=n.profiles.filter((e=>!0===e.selected));o[0]&&o[0].name&&(this.currentProfile=o[0])}adjustLoginLinks(){var e,i,t,n;(null===(e=this.loginDialog)||void 0===e?void 0:e.loggedInLinks)&&(null===(i=this.loginDialog)||void 0===i||i.loggedInLinks.forEach(((e,i)=>{e.isLogoutLink=-1!==e.href.indexOf("logout"),e.isLogoutLink&&(e.href=this.loginManager.getLogoutUrl(e.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))),0!==i||e.href||(e.href=this.loginManager.getLoginUrl(),e.linkType="primary"),e.primaryLinkApperance&&!e.linkType&&(e.linkType="primary")}))),this.logoutLink=null!==(n=null===(t=this.loginDialog)||void 0===t?void 0:t.loggedInLinks.filter((e=>e.isLogoutLink))[0])&&void 0!==n?n:null}updateUserInfo(){const e=this.loginManager.getUserInfo();this.user=e,e&&(e.given_name?this.userName=e.given_name:e.family_name?this.userName=e.family_name:e.username&&(this.userName=e.username))}render(){if(this.loginDialog&&this.profileSelectorDialog)return i(t,Object.assign({},{}),this.heading?i("strong",{class:"pn-marketweb-siteheader-login-profileselection-heading"},this.heading):null,i("div",{class:"pn-marketweb-siteheader-login-profileselection-user"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-user-name"},this.userName),this.user&&this.user.username&&this.userName!==this.user.username?i("div",{class:"pn-marketweb-siteheader-login-profileselection-user-description"},this.user.username):null),null!==this.currentProfile&&this.currentProfile.name?i("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-name"},this.currentProfile.name),i("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-description"},this.currentProfile.customerNumber)):null,i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks.filter((e=>!1===e.isLogoutLink)),loginManager:this.loginManager,idNamespace:this.idNamespace}),i("div",{class:"pn-marketweb-siteheader-login-profileselection-divider"}),this.profileSelectorDialog.profiles.filter((e=>!1===e.selected)).map((e=>i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption"},i("a",{href:`${this.endpoint}/api/user/setprofile?profile=${e.id}&returnUrl=${window.location.href}`,class:"pn-marketweb-siteheader-login-profileselection-profileoption-link"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-content"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-name"},e.name),i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-description"},e.customerNumber)),i("pn-icon",{symbol:"arrow-right",small:"false",color:"blue700"}))))),this.logoutLink?i("div",{class:"pn-marketweb-siteheader-login-profileselection-logout"},i("a",{href:this.logoutLink.href,rel:"nofollower noopener",class:"pn-marketweb-siteheader-login-profileselection-logout-link"},this.logoutLink.linkText)):null)}get hostElement(){return n(this)}};l.style='.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}';export{o as pn_marketweb_siteheader_login_links,l as pn_marketweb_siteheader_login_profileselection}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,t,i){function a(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function o(e){try{l(i.next(e))}catch(n){r(n)}}function s(e){try{l(i["throw"](e))}catch(n){r(n)}}function l(e){e.done?t(e.value):a(e.value).then(o,s)}l((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(n){return l([e,n])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(t)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){t.label=o[1];break}if(o[0]===6&&t.label<r[1]){t.label=r[1];r=o;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(o);break}if(r[2])t.ops.pop();t.trys.pop();continue}o=n.call(e,t)}catch(s){o=[6,s];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js","./p-02ea55ad.system.js","./p-825b8fb8.system.js"],(function(e){"use strict";var n,t,i,a,r;return{setters:[function(e){n=e.r;t=e.h;i=e.a;a=e.g},function(e){r=e.s},function(){}],execute:function(){var o={sv:{open:"Öppna",close:"Stäng",navLabel:"Undernavigering"},en:{open:"Open",close:"Close",navLabel:"Sub navigation"},da:{open:"Åbne",close:"Stæng",navLabel:"Undernavigation"},no:{open:"Åpne",close:"Stäng",navLabel:"Undernavigering"},fi:{open:"Avaa",close:"Sulje",navLabel:"Ali navigointi"}};var s="body[data-siteheader-sidemenuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-sidemenuopen=true]{max-height:initial;overflow:initial}}pn-sidenav{display:block;height:auto;width:100vw;padding:0 1.6rem;background-color:#FFFFFF;z-index:6;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;z-index:inherit;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";var l=e("pn_sidenav",function(){function e(e){n(this,e);this.language="sv";this.navLabel="";this.i18n={open:"",close:"",navLabel:""}}e.prototype.componentWillLoad=function(){this.init()};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.setLanguage();if(window.matchMedia("screen and (min-width:64em)").matches===false){r.openMenu=false}return[2]}))}))};e.prototype.setLanguage=function(){if(o[this.language]){r.i18n=o[this.language];if(!this.navLabel){this.navLabel=this.i18n.navLabel}}};e.prototype.onOpenSubMenuLevelChange=function(e){r.openLevel=e.detail};e.prototype.render=function(){return t(i,{open:(r.openMenu==true)+""},t("slot",{name:"above"}),t("nav",{class:"sidenav","aria-label":this.navLabel},t("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());l.style=s}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as n,a as e,g as t}from"./p-58e8d7d5.js";import{s}from"./p-bb626ab4.js";import"./p-86f06e26.js";const a={sv:{open:"Öppna",close:"Stäng",navLabel:"Undernavigering"},en:{open:"Open",close:"Close",navLabel:"Sub navigation"},da:{open:"Åbne",close:"Stæng",navLabel:"Undernavigation"},no:{open:"Åpne",close:"Stäng",navLabel:"Undernavigering"},fi:{open:"Avaa",close:"Sulje",navLabel:"Ali navigointi"}};let o=class{constructor(n){i(this,n),this.language="sv",this.navLabel="",this.i18n={open:"",close:"",navLabel:""}}componentWillLoad(){this.init()}async init(){this.setLanguage(),!1===window.matchMedia("screen and (min-width:64em)").matches&&(s.openMenu=!1)}setLanguage(){a[this.language]&&(s.i18n=a[this.language],this.navLabel||(this.navLabel=this.i18n.navLabel))}onOpenSubMenuLevelChange(i){s.openLevel=i.detail}render(){return n(e,{open:(1==s.openMenu)+""},n("slot",{name:"above"}),n("nav",{class:"sidenav","aria-label":this.navLabel},n("slot",null)))}get hostElement(){return t(this)}};o.style="body[data-siteheader-sidemenuopen=true]{max-height:100vh;overflow:hidden}@media screen and (min-width: 60em){body[data-siteheader-sidemenuopen=true]{max-height:initial;overflow:initial}}pn-sidenav{display:block;height:auto;width:100vw;padding:0 1.6rem;background-color:#FFFFFF;z-index:6;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;z-index:inherit;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";export{o as pn_sidenav}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,N as n,w as a,p as t,H as i,b as r}from"./p-58e8d7d5.js";const o=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{o(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),l={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,a.location.href)).href,t(l))})().then((e=>r([["p-f27f817e",[[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"]]]]],["p-00dc1309",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-774b7a9f",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-b32a8507",[[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]}]]],["p-17c4004f",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-189ef99c",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-51df9292",[[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]}]]],["p-381b3ec0",[[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"]]]]],["p-1f2d9304",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e32dc098",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-81d764a0",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-e9fe5c54",[[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"]]]]],["p-d0155ddf",[[4,"pn-product-tile"]]],["p-dbaa2116",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-a7bb94a0",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-
|
|
1
|
+
import{d as e,N as n,w as a,p as t,H as i,b as r}from"./p-58e8d7d5.js";const o=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const a=n.call(this,!1),t=this.childNodes;if(e)for(let n=0;n<t.length;n++)2!==t[n].nodeType&&a.appendChild(t[n].cloneNode(!0));return a}};(()=>{o(i.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)),l={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,a.location.href)).href,t(l))})().then((e=>r([["p-f27f817e",[[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"]]]]],["p-00dc1309",[[0,"pn-find-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],weight:[32],weightvalue:[32],sourceData:[32],sizecategory:[32]}]]],["p-774b7a9f",[[0,"pn-find-service-and-price",{source:[1],language:[1025],market:[1025],filteredItems:[32],postagetype:[32],weight:[32],weightvalue:[32],deliveryscope:[32],sourceData:[32]}]]],["p-b32a8507",[[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]}]]],["p-17c4004f",[[0,"pn-product-pricelist-result",{item:[1040],description:[16],shownitems:[16],showMeasurement:[4,"show-measurement"],weightText:[32]}]]],["p-189ef99c",[[4,"pn-marketweb-sitefooter",{market:[1537],language:[1537],environment:[1537],endpoint:[1],cache:[4],siteDefinition:[32],footerContent:[32],i18n:[32],gotData:[32],fetchingData:[32]}]]],["p-51df9292",[[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]}]]],["p-381b3ec0",[[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"]]]]],["p-1f2d9304",[[4,"pn-customernumber-selector",{language:[1537],open:[1540],heading:[1],description:[1],i18n:[32]}]]],["p-e32dc098",[[4,"pn-customernumber-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-81d764a0",[[1,"pn-filter-checkbox",{value:[520],name:[1],checkboxid:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-e9fe5c54",[[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"]]]]],["p-d0155ddf",[[4,"pn-product-tile"]]],["p-dbaa2116",[[4,"pn-profile-selector",{language:[1537],returnUrl:[1,"return-url"],heading:[1],i18n:[32],isLoading:[32],numberOfProfiles:[32]}]]],["p-a7bb94a0",[[0,"pn-profile-selector-option",{heading:[1],description:[1],url:[1]}]]],["p-f62d44bd",[[4,"pn-sidenav",{language:[1],navLabel:[1,"nav-label"],i18n:[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-227e1d46",[[4,"pn-sidenav-level",{level:[32],levelId:[32],isOpen:[32],parentName:[32],parentHref:[32],parentLinkId:[32],alignment:[32]}]]],["p-f774e2cc",[[4,"pn-sidenav-link",{name:[1],href:[1],target:[1],linkid:[1],icon:[1],current:[4],levelId:[32],open:[32],hasChildren:[32]}]]],["p-67380aa4",[[4,"pn-sidenav-togglebutton",{label:[1],i18n:[32]}]]],["p-61dbe832",[[0,"pn-find-service-and-price-result",{item:[1040],shownitems:[16],weightText:[32]}]]],["p-c240b614",[[0,"pn-bonus-progressbar-level",{current:[516],value:[1538],bonuspercentage:[1537],visualpercentage:[1538],percentage:[32],max:[32],min:[32],currency:[32]}]]],["p-996d8a6a",[[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]}]]],["p-845d6b0a",[[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]}]]],["p-414dc33c",[[4,"pn-site-footer",{url:[1],linktitle:[1]}],[4,"pn-site-footer-col"]]],["p-15112837",[[4,"pn-choice-button",{value:[520],name:[1],choiceid:[1],type:[1],disabled:[4],checked:[4],indeterminate:[1028]},[[0,"change","handlechange"]]]]],["p-715d1ef7",[[4,"pn-mainnav-link",{name:[1],href:[1],target:[1],linkid:[1],levelId:[32],open:[32],hasChildren:[32]}]]],["p-08411f5e",[[0,"pn-marketweb-siteheader-login-linklist",{heading:[1],links:[16],idNamespace:[1,"id-namespace"],loginManager:[16]}]]],["p-bd827fe6",[[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],userName:[32]}]]],["p-8e146205",[[0,"pn-product-tile-info",{label:[1],text:[1],icon:[1]}],[0,"pn-product-tile-price",{label:[1],amount:[1],currency:[1],url:[1]}]]],["p-dc1827a6",[[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]}]]],["p-2ac481d7",[[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"]]]],e)));
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
const s = document.createElement('script');
|
|
20
20
|
s.setAttribute("type", "module");
|
|
21
|
-
s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.
|
|
21
|
+
s.setAttribute("src", "https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.34/umd/standalone-loader-salesforce.js");
|
|
22
22
|
document.querySelector("head").appendChild(s);
|
|
23
23
|
|
|
24
24
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js","./p-02ea55ad.system.js","./p-825b8fb8.system.js"],(function(e){"use strict";var n,t,o,i,r;return{setters:[function(e){n=e.r;t=e.h;o=e.a;i=e.g},function(e){r=e.s},function(){}],execute:function(){var s="pn-sidenav-togglebutton{display:block;width:100%;padding:0.8rem 1.6rem;background:#EFFBFF}@media screen and (min-width: 64em){pn-sidenav-togglebutton{display:none}}";var l=e("pn_sidenav_togglebutton",function(){function e(e){n(this,e);this.label="";this.i18n={open:"",close:"",navLabel:""}}e.prototype.componentWillLoad=function(){};e.prototype.render=function(){return t(o,null,t("pn-button",{appearance:"light",icon:"bars","left-icon":true,small:true,onclick:function(){r.openMenu=!r.openMenu},label:this.label},t("slot",null)))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());l.style=s}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as i,a as t,g as n}from"./p-58e8d7d5.js";let o=class{constructor(i){e(this,i),this.loginDialog=null,this.loginManager=null,this.idNamespace="",this.loggedin=!1,this.username=""}componentWillLoad(){this.init()}async init(){this.adjustLoginLinks()}adjustLoginLinks(){var e,i,t,n;if(!this.loginDialog)return;const o=(e,i)=>{e.isLogoutLink=-1!==e.href.indexOf("logout"),e.isLogoutLink&&(e.href=this.loginManager.getLogoutUrl(e.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))),0!==i||e.href||(e.href=this.loginManager.getLoginUrl(),e.linkType="primary"),e.primaryLinkApperance&&!e.linkType&&(e.linkType="primary")};(null===(e=this.loginDialog)||void 0===e?void 0:e.loginMenuLinks)&&(null===(i=this.loginDialog)||void 0===i||i.loginMenuLinks.forEach(o)),(null===(t=this.loginDialog)||void 0===t?void 0:t.loggedInLinks)&&(null===(n=this.loginDialog)||void 0===n||n.loggedInLinks.forEach(o)),this.loginDialog.legacyLoginLinks=[{href:this.loginManager.getLoginUrl(this.loginDialog.loginUrl),linkText:this.loginDialog.loginLinkText,openInNewWindow:!1,isLogoutLink:!1,pageLink:null,linkType:"primary",primaryLinkApperance:!0},{href:this.loginManager.getLoginUrl(this.loginDialog.registerUrl),linkText:this.loginDialog.createLoginLinkText,openInNewWindow:!1,isLogoutLink:!1,pageLink:null,primaryLinkApperance:!1}]}render(){var e;if(!this.loginDialog)return;let n={username:null,loggedin:!1};return this.username&&(n.username=this.username,n.loggedin=this.loggedin),i(t,Object.assign({},n),this.loginDialog.overrideLoginMenu?null:i("div",{"data-loggedin":this.loggedin+""},this.loggedin?i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):i("div",null,(null===(e=this.loginDialog.loginMenuLinks)||void 0===e?void 0:e.length)>0?i("pn-marketweb-siteheader-login-linklist",{heading:this.loginDialog.loginTitle,links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.legacyLoginLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}))),this.loginDialog.overrideLoginMenu?i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loginMenuLinks,loginManager:this.loginManager,idNamespace:this.idNamespace}):null)}get hostElement(){return n(this)}static get watchers(){return{loginDialog:["init"]}}};o.style="";let l=class{constructor(i){e(this,i),this.loginDialog=null,this.loginManager=null,this.endpoint="",this.loggedin=!1,this.idNamespace="",this.heading=null,this.i18n={searchlabel:"",searchplaceholder:"",searchbuttontext:"",menuHomeButton:"",menuGoBackButton:"",mainMenuButton:"",menuStartButton:"",profileSelectionFlyoutHeading:""},this.user=null,this.logoutLink=null,this.userName=null,this.profileSelectorDialog={profiles:[]},this.currentProfile=null}componentWillLoad(){var e;null===this.heading&&(null===(e=this.i18n)||void 0===e?void 0:e.profileSelectionFlyoutHeading)&&(this.heading=this.i18n.profileSelectionFlyoutHeading),this.init()}init(){this.updateUserInfo(),this.adjustLoginLinks(),this.fetchProfiles()}async fetchProfiles(){if(!this.loggedin||!this.profileSelectorDialog||this.profileSelectorDialog.profiles.length>0)return;let e=`${this.endpoint}${this.endpoint.lastIndexOf("/")===this.endpoint.length-1?"":"/"}api/user/parentprofiles`;const i=await fetch(e),t=await i.json(),n=-1!==window.location.href.indexOf("localhost:6008")?{loggedin:!0,profiles:[{name:"Hedin HMC Motor Company AB",organizationNumber:"5560230053",selected:!1},{name:"Bilmetro AB",organizationNumber:"5560612789",selected:!0}]}:t;if(!n||!n.profiles||!n.profiles.length)return;this.profileSelectorDialog.profiles=n.profiles;const o=n.profiles.filter((e=>!0===e.selected));o[0]&&o[0].name&&(this.currentProfile=o[0])}adjustLoginLinks(){var e,i,t,n;(null===(e=this.loginDialog)||void 0===e?void 0:e.loggedInLinks)&&(null===(i=this.loginDialog)||void 0===i||i.loggedInLinks.forEach(((e,i)=>{e.isLogoutLink=-1!==e.href.indexOf("logout"),e.isLogoutLink&&(e.href=this.loginManager.getLogoutUrl(e.href.replace("logout","").replace("http://window.location.href/?","").replace("https://window.location.href/?",""))),0!==i||e.href||(e.href=this.loginManager.getLoginUrl(),e.linkType="primary"),e.primaryLinkApperance&&!e.linkType&&(e.linkType="primary")}))),this.logoutLink=null!==(n=null===(t=this.loginDialog)||void 0===t?void 0:t.loggedInLinks.filter((e=>e.isLogoutLink))[0])&&void 0!==n?n:null}updateUserInfo(){const e=this.loginManager.getUserInfo();this.user=e,e&&(e.given_name?this.userName=e.given_name:e.family_name?this.userName=e.family_name:e.username&&(this.userName=e.username))}render(){if(this.loginDialog&&this.profileSelectorDialog)return i(t,Object.assign({},{}),this.heading?i("strong",{class:"pn-marketweb-siteheader-login-profileselection-heading"},this.heading):null,i("div",{class:"pn-marketweb-siteheader-login-profileselection-user"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-user-name"},this.userName),this.user&&this.user.username&&this.userName!==this.user.username?i("div",{class:"pn-marketweb-siteheader-login-profileselection-user-description"},this.user.username):null),null!==this.currentProfile&&this.currentProfile.name?i("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-name"},this.currentProfile.name),i("div",{class:"pn-marketweb-siteheader-login-profileselection-currentprofile-description"},this.currentProfile.organizationNumber)):null,i("pn-marketweb-siteheader-login-linklist",{links:this.loginDialog.loggedInLinks.filter((e=>!1===e.isLogoutLink)),loginManager:this.loginManager,idNamespace:this.idNamespace}),i("div",{class:"pn-marketweb-siteheader-login-profileselection-divider"}),this.profileSelectorDialog.profiles.filter((e=>!1===e.selected)).map((e=>i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption"},i("a",{href:`${this.endpoint}/UnifiedLogin/ExternalLoginCallback?returnUrl=${window.location.href}?profile=${e.organizationNumber}}`,class:"pn-marketweb-siteheader-login-profileselection-profileoption-link"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-content"},i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-name"},e.name),i("div",{class:"pn-marketweb-siteheader-login-profileselection-profileoption-description"},e.organizationNumber)),i("pn-icon",{symbol:"arrow-right",small:"false",color:"blue700"}))))),this.logoutLink?i("div",{class:"pn-marketweb-siteheader-login-profileselection-logout"},i("a",{href:this.logoutLink.href,rel:"nofollower noopener",class:"pn-marketweb-siteheader-login-profileselection-logout-link"},this.logoutLink.linkText)):null)}get hostElement(){return n(this)}};l.style='.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}';export{o as pn_marketweb_siteheader_login_links,l as pn_marketweb_siteheader_login_profileselection}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as n,a as e,g as o}from"./p-58e8d7d5.js";import{s}from"./p-bb626ab4.js";import"./p-86f06e26.js";let a=class{constructor(n){t(this,n),this.label="",this.i18n={open:"",close:"",navLabel:""}}componentWillLoad(){}render(){return n(e,null,n("pn-button",{appearance:"light",icon:"bars","left-icon":!0,small:!0,onclick:()=>{s.openMenu=!s.openMenu},label:this.label},n("slot",null)))}get hostElement(){return o(this)}};a.style="pn-sidenav-togglebutton{display:block;width:100%;padding:0.8rem 1.6rem;background:#EFFBFF}@media screen and (min-width: 64em){pn-sidenav-togglebutton{display:none}}";export{a as pn_sidenav_togglebutton}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,e,t,i){function r(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,a){function o(n){try{l(i.next(n))}catch(e){a(e)}}function s(n){try{l(i["throw"](n))}catch(e){a(e)}}function l(n){n.done?t(n.value):r(n.value).then(o,s)}l((i=i.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(n){return function(e){return l([n,e])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(t)try{if(i=1,r&&(a=o[0]&2?r["return"]:o[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;if(r=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;r=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){t.label=o[1];break}if(o[0]===6&&t.label<a[1]){t.label=a[1];a=o;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(o);break}if(a[2])t.ops.pop();t.trys.pop();continue}o=e.call(n,t)}catch(s){o=[6,s];r=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js","./p-02ea55ad.system.js","./p-825b8fb8.system.js"],(function(n){"use strict";var e,t,i,r,a;return{setters:[function(n){e=n.r;t=n.h;i=n.a;r=n.g},function(n){a=n.s},function(){}],execute:function(){var o={sv:{open:"Öppna",close:"Stäng",navLabel:"Undernavigering"},en:{open:"Open",close:"Close",navLabel:"Sub navigation"},da:{open:"Åbne",close:"Stæng",navLabel:"Undernavigation"},no:{open:"Åpne",close:"Stäng",navLabel:"Undernavigering"},fi:{open:"Avaa",close:"Sulje",navLabel:"Ali navigointi"}};var s="pn-sidenav{display:block;height:auto;width:calc(100vw - 2.4rem);padding:0 1.6rem;background-color:#FFFFFF;z-index:4;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";var l=n("pn_sidenav",function(){function n(n){e(this,n);this.language="sv";this.navLabel="";this.i18n={open:"",close:"",navLabel:""}}n.prototype.componentWillLoad=function(){this.init()};n.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.setLanguage();if(window.matchMedia("screen and (min-width:64em)").matches===false){a.openMenu=false}return[2]}))}))};n.prototype.setLanguage=function(){if(o[this.language]){a.i18n=o[this.language];if(!this.navLabel){this.navLabel=this.i18n.navLabel}}};n.prototype.onOpenSubMenuLevelChange=function(n){a.openLevel=n.detail};n.prototype.render=function(){return t(i,{open:(a.openMenu==true)+""},t("slot",{name:"above"}),t("nav",{class:"sidenav","aria-label":this.navLabel},t("slot",null)))};Object.defineProperty(n.prototype,"hostElement",{get:function(){return r(this)},enumerable:false,configurable:true});return n}());l.style=s}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,h as i,a as t,g as e}from"./p-58e8d7d5.js";import{s}from"./p-bb626ab4.js";import"./p-86f06e26.js";const a={sv:{open:"Öppna",close:"Stäng",navLabel:"Undernavigering"},en:{open:"Open",close:"Close",navLabel:"Sub navigation"},da:{open:"Åbne",close:"Stæng",navLabel:"Undernavigation"},no:{open:"Åpne",close:"Stäng",navLabel:"Undernavigering"},fi:{open:"Avaa",close:"Sulje",navLabel:"Ali navigointi"}};let o=class{constructor(i){n(this,i),this.language="sv",this.navLabel="",this.i18n={open:"",close:"",navLabel:""}}componentWillLoad(){this.init()}async init(){this.setLanguage(),!1===window.matchMedia("screen and (min-width:64em)").matches&&(s.openMenu=!1)}setLanguage(){a[this.language]&&(s.i18n=a[this.language],this.navLabel||(this.navLabel=this.i18n.navLabel))}onOpenSubMenuLevelChange(n){s.openLevel=n.detail}render(){return i(t,{open:(1==s.openMenu)+""},i("slot",{name:"above"}),i("nav",{class:"sidenav","aria-label":this.navLabel},i("slot",null)))}get hostElement(){return e(this)}};o.style="pn-sidenav{display:block;height:auto;width:calc(100vw - 2.4rem);padding:0 1.6rem;background-color:#FFFFFF;z-index:4;-webkit-transform:translateX(-100vw);transform:translateX(-100vw);-webkit-transition:-webkit-transform 0.2s 0s;transition:-webkit-transform 0.2s 0s;transition:transform 0.2s 0s;transition:transform 0.2s 0s, -webkit-transform 0.2s 0s;-webkit-transition-property:visibility, -webkit-transform;transition-property:visibility, -webkit-transform;transition-property:transform, visibility;transition-property:transform, visibility, -webkit-transform;-ms-flex-flow:column;flex-flow:column;visibility:hidden;position:fixed;top:10.2rem;bottom:0;left:0}pn-sidenav[open=true]{visibility:visible;-webkit-transform:none;transform:none}@media screen and (min-width: 48em){pn-sidenav{top:15.3rem}}@media screen and (min-width: 64em){pn-sidenav{position:relative;-webkit-transform:none;transform:none;visibility:visible;top:0;width:100%;padding:0;height:auto;bottom:auto;left:auto}}";export{o as pn_sidenav}
|