@postnord/pn-marketweb-components 2.0.23-beta3 → 2.0.23-beta6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-customernumber-selector-option.cjs.entry.js +2 -2
- package/cjs/pn-customernumber-selector.cjs.entry.js +3 -3
- package/cjs/pn-find-price-result.cjs.entry.js +5 -5
- package/cjs/pn-find-price.cjs.entry.js +7 -5
- package/cjs/pn-language-selector_9.cjs.entry.js +51 -59
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +72 -0
- package/cjs/pn-marketweb-siteheader-login-links_2.cjs.entry.js +186 -0
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +26 -7
- package/cjs/pn-product-card_4.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector-option.cjs.entry.js +2 -2
- package/collection/collection-manifest.json +3 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +22 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +149 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/{pn-marketweb-siteheader-profileselection.css → pn-marketweb-siteheader-login-links.css} +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +199 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.css +93 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +269 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.css +0 -17
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +79 -72
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +24 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +69 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/translations.js +20 -5
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +4 -4
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +7 -7
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.stories.js +3 -3
- package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +4 -4
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +5 -5
- package/collection/components/widgets/pn-find-price/pn-find-price.js +7 -5
- package/collection/components/widgets/pn-product-card/pn-product-card.css +1 -0
- package/custom-elements/index.d.ts +16 -4
- package/custom-elements/index.js +294 -185
- package/esm/loader.js +1 -1
- package/esm/pn-customernumber-selector-option.entry.js +2 -2
- package/esm/pn-customernumber-selector.entry.js +3 -3
- package/esm/pn-find-price-result.entry.js +5 -5
- package/esm/pn-find-price.entry.js +7 -5
- package/esm/pn-language-selector_9.entry.js +51 -59
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js +68 -0
- package/esm/pn-marketweb-siteheader-login-links_2.entry.js +181 -0
- package/esm/pn-marketweb-siteheader.entry.js +26 -7
- package/esm/pn-product-card_4.entry.js +1 -1
- package/esm/pn-profile-selector-option.entry.js +2 -2
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
- package/esm-es5/pn-customernumber-selector.entry.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_4.entry.js +1 -1
- package/esm-es5/pn-profile-selector-option.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-04240175.entry.js +1 -0
- package/pn-market-web-components/p-08411f5e.entry.js +1 -0
- package/pn-market-web-components/{p-77887623.system.entry.js → p-1924152a.system.entry.js} +1 -1
- package/pn-market-web-components/p-1f2d9304.entry.js +1 -0
- package/pn-market-web-components/p-2ac481d7.entry.js +1 -0
- package/pn-market-web-components/{p-4cea6bf3.system.entry.js → p-2afc5570.system.entry.js} +1 -1
- package/pn-market-web-components/p-5cc29b6e.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-6ce5a56d.system.entry.js +1 -0
- package/pn-market-web-components/p-77c9b601.entry.js +1 -0
- package/pn-market-web-components/p-8a763bfd.system.entry.js +1 -0
- package/pn-market-web-components/{p-2a7e6d3a.system.entry.js → p-93cecc43.system.entry.js} +1 -1
- package/pn-market-web-components/p-a7bb94a0.entry.js +1 -0
- package/pn-market-web-components/p-ba41a7c0.system.entry.js +1 -0
- package/pn-market-web-components/p-c5a97974.entry.js +1 -0
- package/pn-market-web-components/{p-7f5bee11.entry.js → p-dc1827a6.entry.js} +1 -1
- package/pn-market-web-components/p-e32dc098.entry.js +1 -0
- package/pn-market-web-components/p-e66a8bb8.system.entry.js +1 -0
- package/pn-market-web-components/{p-ddbd131f.system.entry.js → p-e6fa11ad.system.entry.js} +1 -1
- package/pn-market-web-components/p-ec96434c.system.entry.js +1 -0
- package/pn-market-web-components/{p-e23a18f4.system.entry.js → p-f7d1c0a0.system.entry.js} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.d.ts +13 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.d.ts +14 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.d.ts +20 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +6 -4
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +21 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts +4 -2
- package/types/components/layout-components/pn-marketweb-siteheader/translations.d.ts +15 -0
- package/types/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.d.ts +1 -1
- package/types/components/profile/pn-customernumber-selector/pn-customernumber-selector.d.ts +1 -1
- package/types/components/profile/pn-profile-selector/pn-profile-selector-option.d.ts +1 -1
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +1 -1
- package/types/components.d.ts +89 -45
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/cjs/pn-marketweb-siteheader-profileselection.cjs.entry.js +0 -161
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.js +0 -319
- package/esm/pn-marketweb-siteheader-profileselection.entry.js +0 -157
- package/esm-es5/pn-marketweb-siteheader-profileselection.entry.js +0 -1
- package/pn-market-web-components/p-39c42017.entry.js +0 -1
- package/pn-market-web-components/p-3a4b70d1.system.entry.js +0 -1
- package/pn-market-web-components/p-47cf8713.system.entry.js +0 -1
- package/pn-market-web-components/p-63a2ba1c.entry.js +0 -1
- package/pn-market-web-components/p-7e294268.entry.js +0 -1
- package/pn-market-web-components/p-a26e5490.system.entry.js +0 -1
- package/pn-market-web-components/p-a94593a9.system.entry.js +0 -1
- package/pn-market-web-components/p-ac8285b4.entry.js +0 -1
- package/pn-market-web-components/p-b1685197.entry.js +0 -1
- package/pn-market-web-components/p-e08a29ff.entry.js +0 -1
- package/pn-market-web-components/p-ea39d576.entry.js +0 -1
- package/pn-market-web-components/p-fcea21cb.entry.js +0 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.d.ts +0 -28
|
@@ -14,7 +14,8 @@ const translations = {
|
|
|
14
14
|
"menuHomeButton": "Hem",
|
|
15
15
|
"menuGoBackButton": "Gå tillbaka",
|
|
16
16
|
"mainMenuButton": "Meny",
|
|
17
|
-
"menuStartButton": "Start"
|
|
17
|
+
"menuStartButton": "Start",
|
|
18
|
+
"profileSelectionFlyoutHeading": "Inloggad som",
|
|
18
19
|
},
|
|
19
20
|
'en': {
|
|
20
21
|
"searchlabel": "Search",
|
|
@@ -23,7 +24,8 @@ const translations = {
|
|
|
23
24
|
"menuHomeButton": "Home",
|
|
24
25
|
"menuGoBackButton": "Go back",
|
|
25
26
|
"mainMenuButton": "Menu",
|
|
26
|
-
"menuStartButton": "Start"
|
|
27
|
+
"menuStartButton": "Start",
|
|
28
|
+
"profileSelectionFlyoutHeading": "Logged in as",
|
|
27
29
|
},
|
|
28
30
|
'da': {
|
|
29
31
|
"searchlabel": "Søg",
|
|
@@ -32,7 +34,8 @@ const translations = {
|
|
|
32
34
|
"menuHomeButton": "Hjem",
|
|
33
35
|
"menuGoBackButton": "Gå tilbage",
|
|
34
36
|
"mainMenuButton": "Menu",
|
|
35
|
-
"menuStartButton": "Start"
|
|
37
|
+
"menuStartButton": "Start",
|
|
38
|
+
"profileSelectionFlyoutHeading": "Logget ind som",
|
|
36
39
|
},
|
|
37
40
|
'no': {
|
|
38
41
|
"searchlabel": "Søk",
|
|
@@ -41,7 +44,8 @@ const translations = {
|
|
|
41
44
|
"menuHomeButton": "Hjem",
|
|
42
45
|
"menuGoBackButton": "Gå tilbake",
|
|
43
46
|
"mainMenuButton": "Meny",
|
|
44
|
-
"menuStartButton": "Start"
|
|
47
|
+
"menuStartButton": "Start",
|
|
48
|
+
"profileSelectionFlyoutHeading": "Logget på som",
|
|
45
49
|
},
|
|
46
50
|
'fi': {
|
|
47
51
|
"searchlabel": "Hae",
|
|
@@ -50,7 +54,18 @@ const translations = {
|
|
|
50
54
|
"menuHomeButton": "Koti",
|
|
51
55
|
"menuGoBackButton": "Mene takaisin",
|
|
52
56
|
"mainMenuButton": "Valikko",
|
|
53
|
-
"menuStartButton": "Alkaa"
|
|
57
|
+
"menuStartButton": "Alkaa",
|
|
58
|
+
"profileSelectionFlyoutHeading": "Kirjautunut sisään nimellä",
|
|
59
|
+
},
|
|
60
|
+
'de': {
|
|
61
|
+
"searchlabel": "Suche",
|
|
62
|
+
"searchplaceholder": "Wonach suchen Sie?",
|
|
63
|
+
"searchbuttontext": "Suche",
|
|
64
|
+
"menuHomeButton": "Heim",
|
|
65
|
+
"menuGoBackButton": "Geh zurück",
|
|
66
|
+
"mainMenuButton": "Menü",
|
|
67
|
+
"menuStartButton": "Start",
|
|
68
|
+
"profileSelectionFlyoutHeading": "Eingeloggt als",
|
|
54
69
|
}
|
|
55
70
|
};
|
|
56
71
|
|
|
@@ -86,6 +101,8 @@ let PnMarketwebSiteheader = class {
|
|
|
86
101
|
this.hideSearch = false;
|
|
87
102
|
/** Hides the login if set to true*/
|
|
88
103
|
this.hideLogin = false;
|
|
104
|
+
/** If this is selected we will show the new profile selection dropdown instead of the login version */
|
|
105
|
+
this.showProfileSelection = false;
|
|
89
106
|
/** Autocomplete endpoint */
|
|
90
107
|
this.AutocompleteEndpoint = "";
|
|
91
108
|
/** Forward session to backend */
|
|
@@ -94,6 +111,7 @@ let PnMarketwebSiteheader = class {
|
|
|
94
111
|
this.cache = false;
|
|
95
112
|
/** Event based only language switch */
|
|
96
113
|
this.spaMode = false;
|
|
114
|
+
this.i18n = { "searchlabel": "", "searchplaceholder": "", "searchbuttontext": "", "menuHomeButton": "", "menuGoBackButton": "", "mainMenuButton": "", "menuStartButton": "", "profileSelectionFlyoutHeading": "" };
|
|
97
115
|
this.gotData = false;
|
|
98
116
|
this.fetchingData = false;
|
|
99
117
|
this.homePageLink = "/";
|
|
@@ -256,6 +274,7 @@ let PnMarketwebSiteheader = class {
|
|
|
256
274
|
}
|
|
257
275
|
onLoginStateChange(e) {
|
|
258
276
|
var _a, _b, _c;
|
|
277
|
+
console.log('onLoginStateChange(e', e);
|
|
259
278
|
if (((_a = e.detail) === null || _a === void 0 ? void 0 : _a.loggedIn) && ((_b = e.detail) === null || _b === void 0 ? void 0 : _b.token)) {
|
|
260
279
|
this.loggedIn = ((_c = e.detail) === null || _c === void 0 ? void 0 : _c.loggedIn) === true;
|
|
261
280
|
}
|
|
@@ -303,7 +322,7 @@ let PnMarketwebSiteheader = class {
|
|
|
303
322
|
var _a, _b, _c, _d, _e, _f;
|
|
304
323
|
return (index.h(index.Host, { language: this.language, market: this.market, environment: this.environment }, index.h("header", null, index.h("div", { class: "siteheader-row" }, index.h("div", { class: "siteheader-topleft" }, index.h("slot", { name: "topleft" }), (this.gotData && this.siteSelector && !this.hideSiteSelector) &&
|
|
305
324
|
index.h("pn-site-selector", { language: this.language, buttontext: (_b = (_a = this.siteSelector) === null || _a === void 0 ? void 0 : _a.currentSiteTitle) !== null && _b !== void 0 ? _b : 'postnord' }, (this.gotData && ((_c = this.siteSelector) === null || _c === void 0 ? void 0 : _c.currentSiteTitle)) &&
|
|
306
|
-
index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle + ' ', description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_d = this.siteSelector) === null || _d === void 0 ? void 0 : _d.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText + ' ', description: site.linkDescription, url: this.adjustSiteSelectorUrl(site.href), newwindow: site.openInNewWindow })))), index.h("div", { class: "siteheader-logocontainer" }, index.h("a", { href: this.homePageLink, title: "Home", class: "siteheader-logolink" }, index.h("slot", { name: "logo" }, index.h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65" }, index.h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "#00A0D6", transform: "translate(0 0)" }))))), index.h("div", { class: "siteheader-topright" }, index.h("slot", { name: "toprightstart" }), (this.gotData && this.loginDialog && !this.hideLogin) && (index.h("pn-marketweb-siteheader-login", { token: this.userToken, fullname: this.userFullname, loggedin: this.userLoggedin, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
325
|
+
index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle + ' ', description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_d = this.siteSelector) === null || _d === void 0 ? void 0 : _d.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText + ' ', description: site.linkDescription, url: this.adjustSiteSelectorUrl(site.href), newwindow: site.openInNewWindow })))), index.h("div", { class: "siteheader-logocontainer" }, index.h("a", { href: this.homePageLink, title: "Home", class: "siteheader-logolink" }, index.h("slot", { name: "logo" }, index.h("svg", { class: "siteheader-logo", xmlns: "http://www.w3.org/2000/svg", width: "12.7rem", height: "2.4rem", viewBox: "0 0 141.73 26.65" }, index.h("path", { d: "M108.84,13.35c0,6.34-5.17,9-10,9S89,19.76,89,13.63c0-6.28,5.08-9,10-9S108.84,7.25,108.84,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.29,3.29,0,0,0,3.42,3.41A3.24,3.24,0,0,0,102.28,13.54Zm-83,0c0,4.83-3.32,8.82-8.49,8.82a6.54,6.54,0,0,1-4.65-1.57v5.86H0V5.16H6.17V6.8a6.43,6.43,0,0,1,5.11-2.18C16.41,4.62,19.31,8.58,19.31,13.54Zm-6.53,0A3.27,3.27,0,0,0,9.4,10,3.28,3.28,0,0,0,6,13.54,3.29,3.29,0,0,0,9.4,16.95,3.24,3.24,0,0,0,12.78,13.54Zm103.69,0.27c0-2.54,1.54-3.32,3.6-3.32a6.56,6.56,0,0,1,2.08.3L122.3,5.1a3.92,3.92,0,0,0-1.45-.18c-3.45,0-4.38,2.18-4.38,2.18V5.16H110.3V21.84h6.17v-8ZM141.73,0V21.84h-6.16V20.21a6.43,6.43,0,0,1-5.11,2.18c-5.14,0-8-4-8-8.91s3.32-8.82,8.49-8.82a6.54,6.54,0,0,1,4.65,1.57v-5Zm-6,13.48a3.28,3.28,0,0,0-3.41-3.41A3.24,3.24,0,0,0,129,13.47,3.4,3.4,0,1,0,135.75,13.47ZM81.35,4.62c-3.6,0-4.9,2.18-4.9,2.18V5.16H70.29V21.84h6.16V13.29c0-2.11.79-3.08,2.69-3.08s2.18,1.57,2.18,3.57v8.07h6.22V11.6C87.55,7,85.34,4.62,81.35,4.62ZM64.07,1.42H57.9V21.84h6.16V10.36H67l2.81-5.2H64.07V1.42ZM50.26,11.21c-2-.3-2.87-0.3-2.87-1.09s0.81-.94,2.42-0.94a16.15,16.15,0,0,1,5.11.91L56,5.41a24.56,24.56,0,0,0-6.13-.75c-5.89,0-9,2.27-9,5.89,0,2.81,1.66,4.47,6.53,5.11,2.06,0.27,2.81.39,2.81,1.15s-0.82,1-2.24,1a16.67,16.67,0,0,1-6-1.3L40.77,21.3a22.14,22.14,0,0,0,6.68,1c6.35,0,9.28-2.24,9.28-5.89C56.72,13.54,55.15,12,50.26,11.21ZM40.19,13.35c0,6.34-5.17,9-10,9s-9.82-2.6-9.82-8.73c0-6.28,5.08-9,10-9S40.19,7.25,40.19,13.35Zm-6.56.18a3.4,3.4,0,1,0-6.8,0,3.28,3.28,0,0,0,3.41,3.41A3.24,3.24,0,0,0,33.63,13.54Z", fill: "#00A0D6", transform: "translate(0 0)" }))))), index.h("div", { class: "siteheader-topright" }, index.h("slot", { name: "toprightstart" }), (this.gotData && this.loginDialog && !this.hideLogin) && (index.h("pn-marketweb-siteheader-login", { token: this.userToken, fullname: this.userFullname, loggedin: this.userLoggedin, loginDialog: this.loginDialog, endpoint: this.endpoint, i18n: this.i18n, showProfileSelection: this.showProfileSelection })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
307
326
|
index.h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => index.h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), index.h("slot", { name: "toprightend" }))), index.h("div", { class: "siteheader-row" }, index.h("div", { class: "siteheader-menu" }, (this.gotData && this.menuItems) && (index.h("pn-mainnav", { market: this.market, language: this.language, onMenuOpenChange: (e) => {
|
|
308
327
|
document.body.setAttribute("data-siteheader-menuopen", (e.detail + ''));
|
|
309
328
|
} }, index.h("pn-mainnav-level", null, index.h("pn-mainnav-list", null, this.menuItems.map((item) => {
|
|
@@ -315,7 +334,7 @@ let PnMarketwebSiteheader = class {
|
|
|
315
334
|
return (index.h("pn-mainnav-link", { name: childitem.name, href: childitem.href, target: (_a = childitem.linkTarget) !== null && _a !== void 0 ? _a : "_self", linkid: childitem.trackingId }));
|
|
316
335
|
})), (item.promotedMenuItems && item.promotedMenuItems.length > 0) &&
|
|
317
336
|
index.h("pn-mainnav-list", { heading: item.promotedMenuItemsHeader }, item.promotedMenuItems.map((childitem) => (index.h("pn-mainnav-link", { href: childitem.href, name: childitem.linkText, target: childitem.openInNewWindow ? "_blank" : "_self", linkid: this.promotedItemId(childitem) + item.id })))))));
|
|
318
|
-
})), index.h("div", { slot: "footer", class: "siteheader-menu-footer" }, (this.gotData && this.loginDialog && !this.hideLogin) && (index.h("pn-marketweb-siteheader-login", { emitEvents: false, loginDialog: this.loginDialog, endpoint: this.endpoint, fullname: this.userFullname, loggedin: this.userLoggedin, i18n: this.i18n })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
337
|
+
})), index.h("div", { slot: "footer", class: "siteheader-menu-footer" }, (this.gotData && this.loginDialog && !this.hideLogin) && (index.h("pn-marketweb-siteheader-login", { emitEvents: false, loginDialog: this.loginDialog, endpoint: this.endpoint, fullname: this.userFullname, loggedin: this.userLoggedin, i18n: this.i18n, showProfileSelection: this.showProfileSelection })), (this.gotData && this.languageOptions && this.languageOptions.length) && !this.hideLanguageSelector &&
|
|
319
338
|
index.h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => index.h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))), !this.hideSiteSelector &&
|
|
320
339
|
index.h("pn-site-selector", { language: this.language }, (this.gotData && ((_e = this.siteSelector) === null || _e === void 0 ? void 0 : _e.currentSiteTitle)) &&
|
|
321
340
|
index.h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription }), (this.gotData && ((_f = this.siteSelector) === null || _f === void 0 ? void 0 : _f.siteSelections)) && this.siteSelector.siteSelections.map((site) => index.h("pn-site-selector-item", { heading: site.linkText, description: site.linkDescription, url: site.pageLink, newwindow: site.openInNewWindow })))), index.h("div", { slot: "top", class: "siteheader-menu-top" }, index.h("pn-marketweb-siteheader-search", { language: this.language, search: this.search, "hide-search": this.hideSearch, i18n: this.i18n })))))), index.h("pn-marketweb-siteheader-search", { language: this.language, primary: true, search: this.search, "hide-search": this.hideSearch, "show-only-link": this.minimizeSearch, i18n: this.i18n })))));
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e3e27c79.js');
|
|
6
6
|
|
|
7
|
-
const pnProductCardCss = "pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:\"\" !important}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:0.6em;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=mobiledownload]{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card [slot=mobiledownload] #riktiga{-ms-flex-order:4;order:4;margin-top:1em}pn-product-card [slot=mobiledownload] #riktiga>div>a::after{content:\"\" !important}pn-product-card [slot=mobiledownload] .riktigaAndroidImg{width:6em;margin:0.5em}pn-product-card [slot=mobiledownload] .riktigaAppleImg{width:5.6em;margin:0.5em}pn-product-card [slot=mobiledownload] a{text-decoration:none;color:#005D92}pn-product-card [slot=mobiledownload] a h3{text-decoration:underline}pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:2;flex-grow:2;-ms-flex-align:end;align-items:flex-end;text-align:center}@media screen and (min-width: 36em){pn-product-card [slot=servicepoint]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 1em 0.5em 0}";
|
|
7
|
+
const pnProductCardCss = "pn-product-card{border:0.1rem solid #D3CECB;outline:none;background:#FFFFFF;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);display:-ms-flexbox;display:flex;word-break:break-word;text-decoration:none;border-radius:0.8rem;position:relative;padding:11rem 2.4rem 2.4rem;margin-bottom:1.6rem}@media screen and (min-width: 36em){pn-product-card{padding:2.4rem}}pn-product-card [slot=title]{display:-ms-flexbox;display:flex;width:100%;margin-bottom:0.8rem;gap:1.6rem;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}@media screen and (min-width: 36em){pn-product-card [slot=title]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:inherit;align-items:inherit}}pn-product-card [slot=title] h2{width:100%}@media screen and (min-width: 36em){pn-product-card [slot=title] h2{width:auto}}pn-product-card [slot=title] h2>a{color:#000000}pn-product-card [slot=title] h2>a::after{content:\"\" !important}pn-product-card [slot=note]{margin-top:1em;margin-bottom:1em;font-size:0.8em}pn-product-card [slot=additionalUSP]{display:-ms-flexbox;display:flex}pn-product-card [slot=additionalUSP] :first-child{margin-left:0em}pn-product-card [slot=additionalUSP] span{margin-left:1em;background:#D3CECB;color:#2D2013;border-radius:0.25em;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:0.3em;margin-top:0.5em;font-size:0.75em}pn-product-card>pn-illustration{min-width:8rem;width:8rem;height:8rem;-ms-flex-item-align:center;align-self:center;position:absolute;top:1.6rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);border-radius:100%}@media screen and (min-width: 36em){pn-product-card>pn-illustration{-webkit-box-shadow:none;box-shadow:none;top:1.6rem;right:1.6rem;left:auto;-webkit-transform:none;transform:none}}@media screen and (min-width: 48em){pn-product-card>pn-illustration{position:static;top:auto;right:auto;margin-right:3rem}}pn-product-card .cardcontent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 48em){pn-product-card .cardcontent{-ms-flex-direction:row;flex-direction:row;gap:1.6rem}}pn-product-card [slot=cardprice]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:0.6em;-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 36em){pn-product-card [slot=cardprice]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=cardprice]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card [slot=mobiledownload]{margin-top:1rem;white-space:nowrap;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-product-card [slot=mobiledownload] #riktiga{-ms-flex-order:4;order:4;margin-top:1em}pn-product-card [slot=mobiledownload] #riktiga>div>a::after{content:\"\" !important}pn-product-card [slot=mobiledownload] .riktigaAndroidImg{width:6em;margin:0.5em}pn-product-card [slot=mobiledownload] .riktigaAppleImg{width:5.6em;margin:0.5em}pn-product-card [slot=mobiledownload] a{text-decoration:none;color:#005D92}pn-product-card [slot=mobiledownload] a h3{text-decoration:underline}pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:2;flex-grow:2;-ms-flex-align:end;align-items:flex-end;text-align:center}@media screen and (min-width: 36em){pn-product-card [slot=servicepoint]{-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}}@media screen and (min-width: 48em){pn-product-card [slot=servicepoint]{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:end;align-items:flex-end}}pn-product-card .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:100%}pn-product-card .info{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-positive:1;flex-grow:1;-ms-flex-flow:wrap;flex-flow:wrap;padding:0 1em 0 0}pn-product-card .info>*{min-width:6em;margin:0.5em 1em 0.5em 0}";
|
|
8
8
|
|
|
9
9
|
let PnProductCard = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -9,12 +9,12 @@ const pnProfileSelectorOptionCss = "pn-profile-selector-option{display:-ms-flexb
|
|
|
9
9
|
let PnProfileSelectorOption = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
|
-
this.
|
|
12
|
+
this.heading = "";
|
|
13
13
|
this.description = "";
|
|
14
14
|
this.url = "";
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (index.h(index.Host, null, index.h("a", { class: "profileselectoroption", href: this.url }, index.h("span", { class: "profileselectoroption-text" }, index.h("span", { class: "profileselectoroption-title" }, this.
|
|
17
|
+
return (index.h(index.Host, null, index.h("a", { class: "profileselectoroption", href: this.url }, index.h("span", { class: "profileselectoroption-text" }, index.h("span", { class: "profileselectoroption-title" }, this.heading), index.h("span", { class: "profileselectoroption-description" }, this.description)), index.h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
|
|
18
18
|
}
|
|
19
19
|
get hostElement() { return index.getElement(this); }
|
|
20
20
|
};
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
"./components/input/pn-marketweb-input/pn-marketweb-input.js",
|
|
8
8
|
"./components/input/pn-marketweb-search/pn-marketweb-search.js",
|
|
9
9
|
"./components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js",
|
|
10
|
+
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js",
|
|
11
|
+
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js",
|
|
12
|
+
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js",
|
|
10
13
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js",
|
|
11
|
-
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.js",
|
|
12
14
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js",
|
|
13
15
|
"./components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js",
|
|
14
16
|
"./components/minor/pn-titletag/pn-titletag.js",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
pn-marketweb-siteheader-login-linklist {
|
|
2
|
+
padding: 1rem 0;
|
|
3
|
+
max-height: 5.2rem;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
pn-marketweb-siteheader-login-linklist strong {
|
|
7
|
+
padding: 0.8rem 1.6rem;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
pn-marketweb-siteheader-login-linklist ul, pn-marketweb-siteheader-login-linklist li {
|
|
12
|
+
list-style: none;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
pn-marketweb-siteheader-login-linklist li {
|
|
17
|
+
padding: 0.8rem 1.6rem;
|
|
18
|
+
}
|
|
19
|
+
pn-marketweb-siteheader-login-linklist li pn-button {
|
|
20
|
+
display: block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Component, Prop, h, Element, Host } from "@stencil/core";
|
|
2
|
+
export class PnMarketwebSiteheaderLoginLinklist {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.heading = null;
|
|
5
|
+
this.links = [];
|
|
6
|
+
this.idNamespace = "";
|
|
7
|
+
this.loginManager = null;
|
|
8
|
+
}
|
|
9
|
+
componentWillLoad() {
|
|
10
|
+
}
|
|
11
|
+
uniqueId(text) {
|
|
12
|
+
return "loginlink-" + text.replace(/[^A-Za-z0-9.\\\/]/igm, "") + "-" + this.idNamespace;
|
|
13
|
+
}
|
|
14
|
+
linkAppearanceAttributes(link) {
|
|
15
|
+
let attributes = {};
|
|
16
|
+
if (link.linkType) {
|
|
17
|
+
switch (link.linkType) {
|
|
18
|
+
case 'primary':
|
|
19
|
+
attributes = {
|
|
20
|
+
appearance: '',
|
|
21
|
+
variant: ''
|
|
22
|
+
};
|
|
23
|
+
break;
|
|
24
|
+
case 'secondary':
|
|
25
|
+
attributes = {
|
|
26
|
+
appearance: 'light',
|
|
27
|
+
variant: 'outlined'
|
|
28
|
+
};
|
|
29
|
+
break;
|
|
30
|
+
case 'regularlink':
|
|
31
|
+
default:
|
|
32
|
+
attributes = {
|
|
33
|
+
appearance: 'light',
|
|
34
|
+
variant: 'borderless',
|
|
35
|
+
icon: 'arrow-right'
|
|
36
|
+
};
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
return attributes;
|
|
40
|
+
}
|
|
41
|
+
if (!link.linkType) {
|
|
42
|
+
attributes = {
|
|
43
|
+
appearance: link.primaryLinkApperance ? "dark" : "light"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return attributes;
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
if (!this.links || this.links.length === 0) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
return (h(Host, null,
|
|
53
|
+
this.heading ? h("strong", null, this.heading) : null,
|
|
54
|
+
h("ul", null, this.links.map((link) => {
|
|
55
|
+
return (h("li", null,
|
|
56
|
+
h("pn-button", Object.assign({ href: link.href, id: this.uniqueId(link.linkText) }, (link.openInNewWindow && { target: '_blank' }), this.linkAppearanceAttributes(link), { onClick: () => { if (link.isLogoutLink) {
|
|
57
|
+
this.loginManager.clearUserData();
|
|
58
|
+
} } }), link.linkText)));
|
|
59
|
+
}))));
|
|
60
|
+
}
|
|
61
|
+
static get is() { return "pn-marketweb-siteheader-login-linklist"; }
|
|
62
|
+
static get originalStyleUrls() { return {
|
|
63
|
+
"$": ["pn-marketweb-siteheader-login-linklist.scss"]
|
|
64
|
+
}; }
|
|
65
|
+
static get styleUrls() { return {
|
|
66
|
+
"$": ["pn-marketweb-siteheader-login-linklist.css"]
|
|
67
|
+
}; }
|
|
68
|
+
static get properties() { return {
|
|
69
|
+
"heading": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"attribute": "heading",
|
|
84
|
+
"reflect": false,
|
|
85
|
+
"defaultValue": "null"
|
|
86
|
+
},
|
|
87
|
+
"links": {
|
|
88
|
+
"type": "unknown",
|
|
89
|
+
"mutable": false,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "LoginDialogLink[]",
|
|
92
|
+
"resolved": "LoginDialogLink[]",
|
|
93
|
+
"references": {
|
|
94
|
+
"LoginDialogLink": {
|
|
95
|
+
"location": "import",
|
|
96
|
+
"path": "./pn-marketweb-siteheader-types"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": ""
|
|
105
|
+
},
|
|
106
|
+
"defaultValue": "[]"
|
|
107
|
+
},
|
|
108
|
+
"idNamespace": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "string",
|
|
113
|
+
"resolved": "string",
|
|
114
|
+
"references": {}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": false,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": ""
|
|
121
|
+
},
|
|
122
|
+
"attribute": "id-namespace",
|
|
123
|
+
"reflect": false,
|
|
124
|
+
"defaultValue": "\"\""
|
|
125
|
+
},
|
|
126
|
+
"loginManager": {
|
|
127
|
+
"type": "unknown",
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "MarketWebLoginManager",
|
|
131
|
+
"resolved": "MarketWebLoginManager",
|
|
132
|
+
"references": {
|
|
133
|
+
"MarketWebLoginManager": {
|
|
134
|
+
"location": "import",
|
|
135
|
+
"path": "../../../globals/MarketWebLoginManager"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"defaultValue": "null"
|
|
146
|
+
}
|
|
147
|
+
}; }
|
|
148
|
+
static get elementRef() { return "hostElement"; }
|
|
149
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Component, Prop, h, Element, Watch, Host } from "@stencil/core";
|
|
2
|
+
export class PnMarketwebSiteheaderLoginLinks {
|
|
3
|
+
constructor() {
|
|
4
|
+
// Login dialog
|
|
5
|
+
this.loginDialog = null;
|
|
6
|
+
this.loginManager = null;
|
|
7
|
+
this.idNamespace = "";
|
|
8
|
+
this.loggedin = false;
|
|
9
|
+
this.username = "";
|
|
10
|
+
}
|
|
11
|
+
componentWillLoad() {
|
|
12
|
+
this.init();
|
|
13
|
+
console.log('from links', this.loggedin);
|
|
14
|
+
}
|
|
15
|
+
async init() {
|
|
16
|
+
this.adjustLoginLinks();
|
|
17
|
+
}
|
|
18
|
+
adjustLoginLinks() {
|
|
19
|
+
var _a, _b, _c, _d;
|
|
20
|
+
if (!this.loginDialog) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const adjustLink = (link, i) => {
|
|
24
|
+
link.isLogoutLink = (link.href.indexOf('logout') !== -1);
|
|
25
|
+
if (link.isLogoutLink) {
|
|
26
|
+
link.href = this.loginManager.getLogoutUrl(link.href.replace('logout', '').replace('http://window.location.href/?', '').replace('https://window.location.href/?', ''));
|
|
27
|
+
}
|
|
28
|
+
if (i === 0 && !link.href) {
|
|
29
|
+
link.href = this.loginManager.getLoginUrl();
|
|
30
|
+
link.linkType = 'primary';
|
|
31
|
+
}
|
|
32
|
+
if (link.primaryLinkApperance && !link.linkType) {
|
|
33
|
+
link.linkType = 'primary';
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
if ((_a = this.loginDialog) === null || _a === void 0 ? void 0 : _a.loginMenuLinks) {
|
|
37
|
+
(_b = this.loginDialog) === null || _b === void 0 ? void 0 : _b.loginMenuLinks.forEach(adjustLink);
|
|
38
|
+
}
|
|
39
|
+
if ((_c = this.loginDialog) === null || _c === void 0 ? void 0 : _c.loggedInLinks) {
|
|
40
|
+
(_d = this.loginDialog) === null || _d === void 0 ? void 0 : _d.loggedInLinks.forEach(adjustLink);
|
|
41
|
+
}
|
|
42
|
+
this.loginDialog.legacyLoginLinks = [
|
|
43
|
+
{
|
|
44
|
+
href: this.loginManager.getLoginUrl(this.loginDialog.loginUrl),
|
|
45
|
+
linkText: this.loginDialog.loginLinkText,
|
|
46
|
+
openInNewWindow: false,
|
|
47
|
+
isLogoutLink: false,
|
|
48
|
+
pageLink: null,
|
|
49
|
+
linkType: 'primary',
|
|
50
|
+
primaryLinkApperance: true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
href: this.loginManager.getLoginUrl(this.loginDialog.registerUrl),
|
|
54
|
+
linkText: this.loginDialog.createLoginLinkText,
|
|
55
|
+
openInNewWindow: false,
|
|
56
|
+
isLogoutLink: false,
|
|
57
|
+
pageLink: null,
|
|
58
|
+
primaryLinkApperance: false
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
var _a;
|
|
64
|
+
if (!this.loginDialog) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
let hostElementAttribute = {
|
|
68
|
+
username: null,
|
|
69
|
+
loggedin: false,
|
|
70
|
+
};
|
|
71
|
+
if (this.username) {
|
|
72
|
+
hostElementAttribute.username = this.username;
|
|
73
|
+
hostElementAttribute.loggedin = this.loggedin;
|
|
74
|
+
}
|
|
75
|
+
return (h(Host, Object.assign({}, hostElementAttribute),
|
|
76
|
+
(!this.loginDialog.overrideLoginMenu) ?
|
|
77
|
+
h("div", { "data-loggedin": this.loggedin + '' }, (this.loggedin) ?
|
|
78
|
+
h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })
|
|
79
|
+
:
|
|
80
|
+
h("div", null, ((_a = this.loginDialog.loginMenuLinks) === null || _a === void 0 ? void 0 : _a.length) > 0 ?
|
|
81
|
+
h("pn-marketweb-siteheader-login-linklist", { heading: this.loginDialog.loginTitle, links: this.loginDialog.loginMenuLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })
|
|
82
|
+
:
|
|
83
|
+
h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.legacyLoginLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })))
|
|
84
|
+
: null,
|
|
85
|
+
(this.loginDialog.overrideLoginMenu) ?
|
|
86
|
+
h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loginMenuLinks, loginManager: this.loginManager, idNamespace: this.idNamespace })
|
|
87
|
+
: null));
|
|
88
|
+
}
|
|
89
|
+
static get is() { return "pn-marketweb-siteheader-login-links"; }
|
|
90
|
+
static get originalStyleUrls() { return {
|
|
91
|
+
"$": ["pn-marketweb-siteheader-login-links.scss"]
|
|
92
|
+
}; }
|
|
93
|
+
static get styleUrls() { return {
|
|
94
|
+
"$": ["pn-marketweb-siteheader-login-links.css"]
|
|
95
|
+
}; }
|
|
96
|
+
static get properties() { return {
|
|
97
|
+
"loginDialog": {
|
|
98
|
+
"type": "unknown",
|
|
99
|
+
"mutable": true,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "LoginDialog",
|
|
102
|
+
"resolved": "LoginDialog",
|
|
103
|
+
"references": {
|
|
104
|
+
"LoginDialog": {
|
|
105
|
+
"location": "import",
|
|
106
|
+
"path": "./pn-marketweb-siteheader-types"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": ""
|
|
115
|
+
},
|
|
116
|
+
"defaultValue": "null"
|
|
117
|
+
},
|
|
118
|
+
"loginManager": {
|
|
119
|
+
"type": "unknown",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "MarketWebLoginManager",
|
|
123
|
+
"resolved": "MarketWebLoginManager",
|
|
124
|
+
"references": {
|
|
125
|
+
"MarketWebLoginManager": {
|
|
126
|
+
"location": "import",
|
|
127
|
+
"path": "../../../globals/MarketWebLoginManager"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": false,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": ""
|
|
136
|
+
},
|
|
137
|
+
"defaultValue": "null"
|
|
138
|
+
},
|
|
139
|
+
"idNamespace": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "string",
|
|
144
|
+
"resolved": "string",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": ""
|
|
152
|
+
},
|
|
153
|
+
"attribute": "id-namespace",
|
|
154
|
+
"reflect": false,
|
|
155
|
+
"defaultValue": "\"\""
|
|
156
|
+
},
|
|
157
|
+
"loggedin": {
|
|
158
|
+
"type": "boolean",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "boolean",
|
|
162
|
+
"resolved": "boolean",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": ""
|
|
170
|
+
},
|
|
171
|
+
"attribute": "loggedin",
|
|
172
|
+
"reflect": true,
|
|
173
|
+
"defaultValue": "false"
|
|
174
|
+
},
|
|
175
|
+
"username": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "string",
|
|
180
|
+
"resolved": "string",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": ""
|
|
188
|
+
},
|
|
189
|
+
"attribute": "username",
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "\"\""
|
|
192
|
+
}
|
|
193
|
+
}; }
|
|
194
|
+
static get elementRef() { return "hostElement"; }
|
|
195
|
+
static get watchers() { return [{
|
|
196
|
+
"propName": "loginDialog",
|
|
197
|
+
"methodName": "init"
|
|
198
|
+
}]; }
|
|
199
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
.pn-marketweb-siteheader-login-profileselection-heading {
|
|
2
|
+
display: block;
|
|
3
|
+
padding: 0.5rem 0 1rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pn-marketweb-siteheader-login-profileselection-user,
|
|
7
|
+
.pn-marketweb-siteheader-login-profileselection-currentprofile {
|
|
8
|
+
margin-top: 1rem;
|
|
9
|
+
margin-bottom: 1rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pn-marketweb-siteheader-login-profileselection-user-name,
|
|
13
|
+
.pn-marketweb-siteheader-login-profileselection-currentprofile-name {
|
|
14
|
+
line-height: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pn-marketweb-siteheader-login-profileselection-user-description,
|
|
18
|
+
.pn-marketweb-siteheader-login-profileselection-currentprofile-description {
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
white-space: normal;
|
|
21
|
+
word-break: break-all;
|
|
22
|
+
color: #5E554A;
|
|
23
|
+
font-size: 0.75em;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pn-marketweb-siteheader-login-profileselection-divider {
|
|
27
|
+
height: 1rem;
|
|
28
|
+
width: 100%;
|
|
29
|
+
background: #00A0D6;
|
|
30
|
+
position: relative;
|
|
31
|
+
margin-left: -1em;
|
|
32
|
+
margin-top: 1.6rem;
|
|
33
|
+
margin-bottom: 1.6rem;
|
|
34
|
+
border-radius: 0 0.6em 0.6em 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
}
|
|
37
|
+
.pn-marketweb-siteheader-login-profileselection-divider::after {
|
|
38
|
+
content: "";
|
|
39
|
+
width: 0.6em;
|
|
40
|
+
height: 0.6em;
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
position: absolute;
|
|
43
|
+
right: 0;
|
|
44
|
+
top: 0;
|
|
45
|
+
background: inherit;
|
|
46
|
+
transform: translateX(calc(100% + 0.2em));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.pn-marketweb-siteheader-login-profileselection-profileoption-link {
|
|
50
|
+
display: flex;
|
|
51
|
+
background: #FFFFFF;
|
|
52
|
+
transition: background 0.15s ease-in-out;
|
|
53
|
+
margin: 0 -1em;
|
|
54
|
+
padding: 0.6rem 1.6rem;
|
|
55
|
+
text-decoration: none;
|
|
56
|
+
color: #005D92;
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
.pn-marketweb-siteheader-login-profileselection-profileoption-link:hover, .pn-marketweb-siteheader-login-profileselection-profileoption-link:focus, .pn-marketweb-siteheader-login-profileselection-profileoption-link:active {
|
|
60
|
+
background: #F3F2F2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.pn-marketweb-siteheader-login-profileselection-profileoption-content {
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pn-marketweb-siteheader-login-profileselection-profileoption-name {
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.pn-marketweb-siteheader-login-profileselection-profileoption-description {
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
white-space: normal;
|
|
74
|
+
word-break: break-all;
|
|
75
|
+
color: #5E554A;
|
|
76
|
+
font-size: 0.75em;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pn-marketweb-siteheader-login-profileselection-logout {
|
|
80
|
+
padding: 1.6rem;
|
|
81
|
+
text-align: center;
|
|
82
|
+
width: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pn-marketweb-siteheader-login-profileselection-logout-link {
|
|
86
|
+
display: inline-block;
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
color: #005D92;
|
|
89
|
+
text-decoration: none;
|
|
90
|
+
}
|
|
91
|
+
.pn-marketweb-siteheader-login-profileselection-logout-link:hover, .pn-marketweb-siteheader-login-profileselection-logout-link:focus, .pn-marketweb-siteheader-login-profileselection-logout-link:active {
|
|
92
|
+
text-decoration: underline;
|
|
93
|
+
}
|