@postnord/pn-marketweb-components 2.1.8 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-siteheader-login-button_5.cjs.entry.js +68 -58
- package/cjs/pn-share-item.cjs.entry.js +22 -0
- package/cjs/pn-share.cjs.entry.js +64 -0
- package/collection/collection-manifest.json +2 -0
- package/collection/components/cta/pn-share/pn-share-item.css +42 -0
- package/collection/components/cta/pn-share/pn-share-item.js +61 -0
- package/collection/components/cta/pn-share/pn-share.css +23 -0
- package/collection/components/cta/pn-share/pn-share.js +91 -0
- package/collection/components/cta/pn-share/pn-share.stories.js +22 -0
- package/collection/components/cta/pn-share/translations.js +17 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +78 -68
- package/custom-elements/index.d.ts +12 -0
- package/custom-elements/index.js +188 -100
- package/esm/loader.js +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-siteheader-login-button_5.entry.js +68 -58
- package/esm/pn-share-item.entry.js +18 -0
- package/esm/pn-share.entry.js +60 -0
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-login-button_5.entry.js +1 -1
- package/esm-es5/pn-share-item.entry.js +1 -0
- package/esm-es5/pn-share.entry.js +1 -0
- package/package.json +1 -1
- package/pn-market-web-components/p-086a72ca.system.entry.js +1 -0
- package/pn-market-web-components/p-138b1e76.entry.js +1 -0
- package/pn-market-web-components/{p-eb4eed7f.entry.js → p-381c034b.entry.js} +1 -1
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/{p-aba46e52.system.entry.js → p-a5171cb9.system.entry.js} +1 -1
- package/pn-market-web-components/p-ecf712bb.system.entry.js +1 -0
- package/pn-market-web-components/p-ee589138.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/cta/pn-share/pn-share-item.d.ts +6 -0
- package/types/components/cta/pn-share/pn-share.d.ts +10 -0
- package/types/components/cta/pn-share/translations.d.ts +17 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.d.ts +3 -2
- package/types/components.d.ts +34 -0
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +2 -2
package/custom-elements/index.js
CHANGED
|
@@ -22356,7 +22356,7 @@ let PnChoiceButton$1 = class extends HTMLElement {
|
|
|
22356
22356
|
static get style() { return pnChoiceButtonCss; }
|
|
22357
22357
|
};
|
|
22358
22358
|
|
|
22359
|
-
const translations$
|
|
22359
|
+
const translations$d = {
|
|
22360
22360
|
'sv': {
|
|
22361
22361
|
'toggleLinkTitleText': `Välj kundnummer`,
|
|
22362
22362
|
},
|
|
@@ -22387,7 +22387,7 @@ let PnCustomernumberSelector$1 = class extends HTMLElement {
|
|
|
22387
22387
|
this.open = false;
|
|
22388
22388
|
this.heading = "";
|
|
22389
22389
|
this.description = "";
|
|
22390
|
-
this.i18n = translations$
|
|
22390
|
+
this.i18n = translations$d["en"];
|
|
22391
22391
|
}
|
|
22392
22392
|
componentWillLoad() {
|
|
22393
22393
|
this.init();
|
|
@@ -22396,8 +22396,8 @@ let PnCustomernumberSelector$1 = class extends HTMLElement {
|
|
|
22396
22396
|
this.setTranslations();
|
|
22397
22397
|
}
|
|
22398
22398
|
setTranslations() {
|
|
22399
|
-
if (this.language && translations$
|
|
22400
|
-
this.i18n = translations$
|
|
22399
|
+
if (this.language && translations$d[this.language]) {
|
|
22400
|
+
this.i18n = translations$d[this.language];
|
|
22401
22401
|
}
|
|
22402
22402
|
}
|
|
22403
22403
|
render() {
|
|
@@ -22487,7 +22487,7 @@ let PnFilterCheckbox$1 = class extends HTMLElement {
|
|
|
22487
22487
|
static get style() { return pnFilterCheckboxCss; }
|
|
22488
22488
|
};
|
|
22489
22489
|
|
|
22490
|
-
const translations$
|
|
22490
|
+
const translations$c = {
|
|
22491
22491
|
'sv': {
|
|
22492
22492
|
'componentheading': 'Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?',
|
|
22493
22493
|
'deliveryscopeheading': 'Endast leveranser inom Sverige',
|
|
@@ -24716,8 +24716,8 @@ let PnfindPrice = class extends HTMLElement {
|
|
|
24716
24716
|
if (this.market) {
|
|
24717
24717
|
state$8.market = markets$3[this.market];
|
|
24718
24718
|
}
|
|
24719
|
-
if (this.language && translations$
|
|
24720
|
-
state$8.i18n = translations$
|
|
24719
|
+
if (this.language && translations$c[this.language]) {
|
|
24720
|
+
state$8.i18n = translations$c[this.language];
|
|
24721
24721
|
}
|
|
24722
24722
|
}
|
|
24723
24723
|
filterItems() {
|
|
@@ -24840,7 +24840,7 @@ let PnfindPriceResult = class extends HTMLElement {
|
|
|
24840
24840
|
static get style() { return pnFindPriceResultCss; }
|
|
24841
24841
|
};
|
|
24842
24842
|
|
|
24843
|
-
const translations$
|
|
24843
|
+
const translations$b = {
|
|
24844
24844
|
'sv': {
|
|
24845
24845
|
'componentheading': 'Vad vill du skicka?',
|
|
24846
24846
|
'deliveryscopeheading': 'Hit eller dit?',
|
|
@@ -25023,8 +25023,8 @@ let PnfindServiceAndPrice = class extends HTMLElement {
|
|
|
25023
25023
|
if (this.market) {
|
|
25024
25024
|
state$7.market = markets$2[this.market];
|
|
25025
25025
|
}
|
|
25026
|
-
if (this.language && translations$
|
|
25027
|
-
state$7.i18n = translations$
|
|
25026
|
+
if (this.language && translations$b[this.language]) {
|
|
25027
|
+
state$7.i18n = translations$b[this.language];
|
|
25028
25028
|
}
|
|
25029
25029
|
}
|
|
25030
25030
|
filterItems() {
|
|
@@ -25149,7 +25149,7 @@ let PnfindServiceAndPriceResult = class extends HTMLElement {
|
|
|
25149
25149
|
static get style() { return pnFindServiceAndPriceResultCss; }
|
|
25150
25150
|
};
|
|
25151
25151
|
|
|
25152
|
-
const translations$
|
|
25152
|
+
const translations$a = {
|
|
25153
25153
|
'sv': {
|
|
25154
25154
|
"heading": "Språk",
|
|
25155
25155
|
},
|
|
@@ -25234,8 +25234,8 @@ let PnlanguageSelector = class extends HTMLElement {
|
|
|
25234
25234
|
this.setLanguage.emit(this.value);
|
|
25235
25235
|
}
|
|
25236
25236
|
setTranslations() {
|
|
25237
|
-
if (translations$
|
|
25238
|
-
this.i18n = translations$
|
|
25237
|
+
if (translations$a[this.value]) {
|
|
25238
|
+
this.i18n = translations$a[this.value];
|
|
25239
25239
|
}
|
|
25240
25240
|
}
|
|
25241
25241
|
onValueChange() {
|
|
@@ -25303,7 +25303,7 @@ let PnLineShape$1 = class extends HTMLElement {
|
|
|
25303
25303
|
static get style() { return pnLineShapeCss; }
|
|
25304
25304
|
};
|
|
25305
25305
|
|
|
25306
|
-
const translations$
|
|
25306
|
+
const translations$9 = {
|
|
25307
25307
|
'sv': {
|
|
25308
25308
|
"menuHomeButton": "Hem",
|
|
25309
25309
|
"menuGoBackButton": "Gå tillbaka",
|
|
@@ -25397,8 +25397,8 @@ let PnMainnav$1 = class extends HTMLElement {
|
|
|
25397
25397
|
this.marketChange.emit(this.market);
|
|
25398
25398
|
}
|
|
25399
25399
|
onLanguageChange(event) {
|
|
25400
|
-
if (translations$
|
|
25401
|
-
state$6.i18n = translations$
|
|
25400
|
+
if (translations$9[event.detail]) {
|
|
25401
|
+
state$6.i18n = translations$9[event.detail];
|
|
25402
25402
|
if (!this.navLabel) {
|
|
25403
25403
|
this.navLabel = state$6.i18n.navLabel;
|
|
25404
25404
|
}
|
|
@@ -26082,7 +26082,7 @@ const getSocialMediaIconsByType = (linkType = '', fill = '#005D92') => {
|
|
|
26082
26082
|
}
|
|
26083
26083
|
};
|
|
26084
26084
|
|
|
26085
|
-
const translations$
|
|
26085
|
+
const translations$8 = {
|
|
26086
26086
|
'sv': {
|
|
26087
26087
|
"searchlabel": "Sök",
|
|
26088
26088
|
"searchplaceholder": "Vad letar du efter?",
|
|
@@ -26190,8 +26190,8 @@ let PnMarketwebSiteheader$2 = class extends HTMLElement {
|
|
|
26190
26190
|
await this.fetchData();
|
|
26191
26191
|
}
|
|
26192
26192
|
setTranslations() {
|
|
26193
|
-
if (this.language && translations$
|
|
26194
|
-
this.i18n = translations$
|
|
26193
|
+
if (this.language && translations$8[this.language]) {
|
|
26194
|
+
this.i18n = translations$8[this.language];
|
|
26195
26195
|
}
|
|
26196
26196
|
}
|
|
26197
26197
|
onLanguageChange() {
|
|
@@ -26338,7 +26338,7 @@ const { state: state$5, onChange: onChange$5 } = createStore({
|
|
|
26338
26338
|
loginManager: null
|
|
26339
26339
|
});
|
|
26340
26340
|
|
|
26341
|
-
const translations$
|
|
26341
|
+
const translations$7 = {
|
|
26342
26342
|
sv: {
|
|
26343
26343
|
searchlabel: 'Sök',
|
|
26344
26344
|
searchplaceholder: 'Vad letar du efter?',
|
|
@@ -26533,8 +26533,8 @@ let PnMarketwebSiteheader$1 = class extends HTMLElement {
|
|
|
26533
26533
|
}, 50);
|
|
26534
26534
|
}
|
|
26535
26535
|
setTranslations() {
|
|
26536
|
-
if (this.language && translations$
|
|
26537
|
-
this.i18n = translations$
|
|
26536
|
+
if (this.language && translations$7[this.language]) {
|
|
26537
|
+
this.i18n = translations$7[this.language];
|
|
26538
26538
|
}
|
|
26539
26539
|
if (this.searchPlaceholder) {
|
|
26540
26540
|
this.i18n.searchplaceholder = this.searchPlaceholder;
|
|
@@ -27537,15 +27537,24 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
27537
27537
|
this.__registerHost();
|
|
27538
27538
|
// Login dialog
|
|
27539
27539
|
this.loginDialog = null;
|
|
27540
|
-
this.endpoint =
|
|
27540
|
+
this.endpoint = '';
|
|
27541
27541
|
this.loggedin = false;
|
|
27542
|
-
this.idNamespace =
|
|
27542
|
+
this.idNamespace = '';
|
|
27543
27543
|
this.heading = null;
|
|
27544
|
-
this.i18n = {
|
|
27544
|
+
this.i18n = {
|
|
27545
|
+
searchlabel: '',
|
|
27546
|
+
searchplaceholder: '',
|
|
27547
|
+
searchbuttontext: '',
|
|
27548
|
+
menuHomeButton: '',
|
|
27549
|
+
menuGoBackButton: '',
|
|
27550
|
+
mainMenuButton: '',
|
|
27551
|
+
menuStartButton: '',
|
|
27552
|
+
profileSelectionFlyoutHeading: '',
|
|
27553
|
+
};
|
|
27545
27554
|
this.user = null;
|
|
27546
27555
|
this.logoutLink = null;
|
|
27547
27556
|
this.userName = null;
|
|
27548
|
-
this.userEmail =
|
|
27557
|
+
this.userEmail = '';
|
|
27549
27558
|
this.currentProfile = null;
|
|
27550
27559
|
this.profileoptions = [];
|
|
27551
27560
|
}
|
|
@@ -27565,84 +27574,84 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
27565
27574
|
if (!this.loggedin || this.profileoptions.length > 0) {
|
|
27566
27575
|
return;
|
|
27567
27576
|
}
|
|
27568
|
-
let apiUrl = `${this.endpoint}${
|
|
27577
|
+
let apiUrl = `${this.endpoint}${this.endpoint.lastIndexOf('/') > -1 && this.endpoint.lastIndexOf('/') === this.endpoint.length - 1 ? '' : '/'}api/user/parentorganizations`;
|
|
27569
27578
|
const req = await fetch(apiUrl);
|
|
27570
27579
|
const reqdata = await req.json();
|
|
27571
27580
|
const fallbackData = {
|
|
27572
27581
|
loggedin: true,
|
|
27573
27582
|
organizations: [
|
|
27574
27583
|
{
|
|
27575
|
-
name:
|
|
27576
|
-
customerNumber:
|
|
27577
|
-
id:
|
|
27584
|
+
name: 'Forsheda Livs AB',
|
|
27585
|
+
customerNumber: '5564513603',
|
|
27586
|
+
id: 'dbba867d-1dff-3dbb-b420-c57b4b828b73',
|
|
27578
27587
|
selected: true,
|
|
27579
27588
|
profiles: [
|
|
27580
27589
|
{
|
|
27581
|
-
name:
|
|
27582
|
-
customerNumber:
|
|
27583
|
-
id:
|
|
27584
|
-
ssid:
|
|
27590
|
+
name: 'Forsheda Livs AB',
|
|
27591
|
+
customerNumber: '20685482',
|
|
27592
|
+
id: 'f757ba28-9a73-15a2-f128-4b394d970f3f',
|
|
27593
|
+
ssid: '',
|
|
27585
27594
|
selected: false,
|
|
27586
|
-
customerGroup:
|
|
27595
|
+
customerGroup: 'Business',
|
|
27587
27596
|
},
|
|
27588
27597
|
{
|
|
27589
|
-
name:
|
|
27590
|
-
customerNumber:
|
|
27591
|
-
id:
|
|
27592
|
-
ssid:
|
|
27598
|
+
name: 'ICA MAXI KUNGSBACKA',
|
|
27599
|
+
customerNumber: '20831191',
|
|
27600
|
+
id: '5aea41df-32b0-3f7e-2946-78598360177d',
|
|
27601
|
+
ssid: '259686',
|
|
27593
27602
|
selected: true,
|
|
27594
|
-
customerGroup:
|
|
27595
|
-
}
|
|
27596
|
-
]
|
|
27603
|
+
customerGroup: 'Agent',
|
|
27604
|
+
},
|
|
27605
|
+
],
|
|
27597
27606
|
},
|
|
27598
27607
|
{
|
|
27599
|
-
name:
|
|
27600
|
-
customerNumber:
|
|
27601
|
-
id:
|
|
27608
|
+
name: 'Hem Livs i Kungsbacka AB',
|
|
27609
|
+
customerNumber: '5565271250',
|
|
27610
|
+
id: '97ca363c-40ef-cca9-7a3c-9e7f025567c2',
|
|
27602
27611
|
selected: false,
|
|
27603
27612
|
profiles: [
|
|
27604
27613
|
{
|
|
27605
|
-
name:
|
|
27606
|
-
customerNumber:
|
|
27607
|
-
id:
|
|
27608
|
-
ssid:
|
|
27614
|
+
name: 'ICA KVANTUM KUNGSBACKA',
|
|
27615
|
+
customerNumber: '20831193',
|
|
27616
|
+
id: 'fbd61ffd-41c6-2206-b88e-cfef91e1dc39',
|
|
27617
|
+
ssid: '259691',
|
|
27609
27618
|
selected: false,
|
|
27610
|
-
customerGroup:
|
|
27611
|
-
}
|
|
27612
|
-
]
|
|
27619
|
+
customerGroup: 'Agent',
|
|
27620
|
+
},
|
|
27621
|
+
],
|
|
27613
27622
|
},
|
|
27614
27623
|
{
|
|
27615
|
-
name:
|
|
27616
|
-
customerNumber:
|
|
27617
|
-
id:
|
|
27624
|
+
name: 'ICA SUPERMARKET TORGET',
|
|
27625
|
+
customerNumber: '5568902679',
|
|
27626
|
+
id: '7cb76a94-e1a5-5f57-58fd-bc563851b28e',
|
|
27618
27627
|
selected: false,
|
|
27619
27628
|
profiles: [
|
|
27620
27629
|
{
|
|
27621
|
-
name:
|
|
27622
|
-
customerNumber:
|
|
27623
|
-
id:
|
|
27624
|
-
ssid:
|
|
27630
|
+
name: 'ICA SUPERMARKET TORGET',
|
|
27631
|
+
customerNumber: '20831212',
|
|
27632
|
+
id: '3a2db017-b68f-6fa0-fe70-542c08cd97ce',
|
|
27633
|
+
ssid: '',
|
|
27625
27634
|
selected: false,
|
|
27626
|
-
customerGroup:
|
|
27627
|
-
}
|
|
27628
|
-
]
|
|
27629
|
-
}
|
|
27630
|
-
]
|
|
27635
|
+
customerGroup: 'Agent',
|
|
27636
|
+
},
|
|
27637
|
+
],
|
|
27638
|
+
},
|
|
27639
|
+
],
|
|
27631
27640
|
};
|
|
27632
|
-
const data =
|
|
27641
|
+
const data = window.location.href.indexOf('localhost:6008') !== -1 ? fallbackData : reqdata;
|
|
27633
27642
|
if (!data || !data.organizations || !data.organizations.length) {
|
|
27634
27643
|
return;
|
|
27635
27644
|
}
|
|
27636
|
-
data.organizations.forEach(
|
|
27645
|
+
data.organizations.forEach(org => {
|
|
27637
27646
|
if (org.selected === true && org.profiles) {
|
|
27638
27647
|
const selectedProfile = org.profiles.filter(x => x.selected === true);
|
|
27639
|
-
if (selectedProfile && selectedProfile[0] && selectedProfile[0].customerGroup.toLocaleLowerCase() ===
|
|
27648
|
+
if (selectedProfile && selectedProfile[0] && selectedProfile[0].customerGroup.toLocaleLowerCase() === 'agent' && selectedProfile[0].ssid) {
|
|
27640
27649
|
org.customerNumber = selectedProfile[0].ssid;
|
|
27641
27650
|
}
|
|
27642
27651
|
}
|
|
27643
27652
|
else {
|
|
27644
|
-
if (org.customerNumber.length === 10 && org.customerNumber.substring(0, 2) ===
|
|
27645
|
-
org.customerNumber = org.customerNumber.substring(0, 6) +
|
|
27653
|
+
if (org.customerNumber.length === 10 && org.customerNumber.substring(0, 2) === '55') {
|
|
27654
|
+
org.customerNumber = org.customerNumber.substring(0, 6) + '-' + org.customerNumber.substring(6);
|
|
27646
27655
|
}
|
|
27647
27656
|
this.profileoptions.push(org);
|
|
27648
27657
|
}
|
|
@@ -27652,8 +27661,8 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
27652
27661
|
name: this.userName,
|
|
27653
27662
|
customerNumber: '',
|
|
27654
27663
|
id: '',
|
|
27655
|
-
selected:
|
|
27656
|
-
profiles: []
|
|
27664
|
+
selected: !currentProfileObj,
|
|
27665
|
+
profiles: [],
|
|
27657
27666
|
};
|
|
27658
27667
|
if (!currentProfileObj) {
|
|
27659
27668
|
currentProfileObj = userProfileOption;
|
|
@@ -27667,7 +27676,7 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
27667
27676
|
var _a, _b, _c, _d;
|
|
27668
27677
|
const adjustLink = (link, i) => {
|
|
27669
27678
|
if (!link.isLogoutLink) {
|
|
27670
|
-
link.isLogoutLink =
|
|
27679
|
+
link.isLogoutLink = link.pageLink.indexOf('location.href') !== -1 && link.pageLink.indexOf('logout') !== -1;
|
|
27671
27680
|
}
|
|
27672
27681
|
if (link.isLogoutLink) {
|
|
27673
27682
|
link.href = state$5.loginManager.getLogoutUrl(link.href);
|
|
@@ -27695,7 +27704,7 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
27695
27704
|
this.userEmail = userInfo.email;
|
|
27696
27705
|
}
|
|
27697
27706
|
if (userInfo && userInfo.given_name) {
|
|
27698
|
-
this.userName = userInfo.given_name + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name) ? ` ${userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name}` :
|
|
27707
|
+
this.userName = userInfo.given_name + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name) ? ` ${userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name}` : '');
|
|
27699
27708
|
}
|
|
27700
27709
|
if (userInfo && userInfo.given_name) {
|
|
27701
27710
|
this.userName = userInfo.given_name;
|
|
@@ -27710,19 +27719,20 @@ let PnMarketwebSiteheaderLoginProfileselection$1 = class extends HTMLElement {
|
|
|
27710
27719
|
return;
|
|
27711
27720
|
}
|
|
27712
27721
|
}
|
|
27722
|
+
filterLogoutLink(loggedInLinks) {
|
|
27723
|
+
return loggedInLinks.filter((link) => !link.isLogoutLink);
|
|
27724
|
+
}
|
|
27713
27725
|
render() {
|
|
27714
27726
|
if (!this.loginDialog) {
|
|
27715
27727
|
return;
|
|
27716
27728
|
}
|
|
27717
27729
|
let hostElementAttribute = {};
|
|
27718
|
-
return (h(Host, Object.assign({}, hostElementAttribute), this.heading ? h("strong", { class: "pn-marketweb-siteheader-login-profileselection-heading" }, this.heading) : null, this.currentProfile !== null && this.currentProfile.name ?
|
|
27719
|
-
|
|
27720
|
-
|
|
27721
|
-
let customerNumber =
|
|
27730
|
+
return (h(Host, Object.assign({}, hostElementAttribute), this.heading ? h("strong", { class: "pn-marketweb-siteheader-login-profileselection-heading" }, this.heading) : 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 ? this.currentProfile.customerNumber : this.userEmail))) : null, h("pn-marketweb-siteheader-login-linklist", { links: this.filterLogoutLink(this.loginDialog.loggedInLinks), idNamespace: this.idNamespace }), h("div", { class: "pn-marketweb-siteheader-login-profileselection-divider" }), this.profileoptions
|
|
27731
|
+
.filter(x => x.selected !== true)
|
|
27732
|
+
.map(organization => {
|
|
27733
|
+
let customerNumber = organization.profiles.length > 0 ? organization.profiles[0].customerNumber : organization.customerNumber;
|
|
27722
27734
|
return (h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption" }, h("a", { href: `${this.endpoint}/api/user/setprofile?customernumber=${customerNumber}&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" }, organization.name), h("div", { class: "pn-marketweb-siteheader-login-profileselection-profileoption-description" }, organization.customerNumber ? organization.customerNumber : this.userEmail)), h("pn-icon", { symbol: "arrow-right", small: "false", color: "blue700" }))));
|
|
27723
|
-
}), this.logoutLink ?
|
|
27724
|
-
h("div", { class: "pn-marketweb-siteheader-login-profileselection-logout" }, h("a", { href: this.logoutLink.href, rel: "nofollower noopener", id: "pn-marketweb-header-logoutlink", onClick: () => state$5.loginManager.clearUserData(), class: "pn-marketweb-siteheader-login-profileselection-logout-link" }, this.logoutLink.linkText))
|
|
27725
|
-
: null));
|
|
27735
|
+
}), this.logoutLink ? (h("div", { class: "pn-marketweb-siteheader-login-profileselection-logout" }, h("a", { href: this.logoutLink.href, rel: "nofollower noopener", id: "pn-marketweb-header-logoutlink", onClick: () => state$5.loginManager.clearUserData(), class: "pn-marketweb-siteheader-login-profileselection-logout-link" }, this.logoutLink.linkText))) : null));
|
|
27726
27736
|
}
|
|
27727
27737
|
get hostElement() { return this; }
|
|
27728
27738
|
static get style() { return pnMarketwebSiteheaderLoginProfileselectionCss; }
|
|
@@ -27877,7 +27887,7 @@ let PnSpotlight$2 = class extends HTMLElement {
|
|
|
27877
27887
|
static get style() { return pnParcelTrackerCss; }
|
|
27878
27888
|
};
|
|
27879
27889
|
|
|
27880
|
-
const translations$
|
|
27890
|
+
const translations$6 = {
|
|
27881
27891
|
'sv': {
|
|
27882
27892
|
"heading": "Prisindikation med PEX Bud",
|
|
27883
27893
|
"labelFrom": "Från postkod",
|
|
@@ -27912,7 +27922,7 @@ let PnPexPricefinder$1 = class extends HTMLElement {
|
|
|
27912
27922
|
this.currency = "Kr";
|
|
27913
27923
|
/** API Url */
|
|
27914
27924
|
this.apiUrl = "/api/pex/order";
|
|
27915
|
-
this.i18n = translations$
|
|
27925
|
+
this.i18n = translations$6.sv;
|
|
27916
27926
|
this.fromzip = null;
|
|
27917
27927
|
this.tozip = null;
|
|
27918
27928
|
this.weight = 1;
|
|
@@ -27947,8 +27957,8 @@ let PnPexPricefinder$1 = class extends HTMLElement {
|
|
|
27947
27957
|
});
|
|
27948
27958
|
}
|
|
27949
27959
|
setLanguage() {
|
|
27950
|
-
if (translations$
|
|
27951
|
-
this.i18n = translations$
|
|
27960
|
+
if (translations$6[this.language]) {
|
|
27961
|
+
this.i18n = translations$6[this.language];
|
|
27952
27962
|
}
|
|
27953
27963
|
}
|
|
27954
27964
|
onSubmit(e) {
|
|
@@ -28048,7 +28058,7 @@ let PnProductCardPrice$1 = class extends HTMLElement {
|
|
|
28048
28058
|
static get style() { return pnProductCardPriceCss; }
|
|
28049
28059
|
};
|
|
28050
28060
|
|
|
28051
|
-
const translations$
|
|
28061
|
+
const translations$5 = {
|
|
28052
28062
|
'sv': {
|
|
28053
28063
|
'componentheading': 'Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?',
|
|
28054
28064
|
'deliveryscopeheading': 'Endast leveranser inom Sverige',
|
|
@@ -28183,8 +28193,8 @@ let PnFindProductPricelist = class extends HTMLElement {
|
|
|
28183
28193
|
if (this.market) {
|
|
28184
28194
|
state$8.market = markets$1[this.market];
|
|
28185
28195
|
}
|
|
28186
|
-
if (this.language && translations$
|
|
28187
|
-
state$8.i18n = translations$
|
|
28196
|
+
if (this.language && translations$5[this.language]) {
|
|
28197
|
+
state$8.i18n = translations$5[this.language];
|
|
28188
28198
|
}
|
|
28189
28199
|
}
|
|
28190
28200
|
async getDataSource() {
|
|
@@ -28569,7 +28579,7 @@ let PnProfileModalType$1 = class extends HTMLElement {
|
|
|
28569
28579
|
static get style() { return pnProfileModalTypeCss; }
|
|
28570
28580
|
};
|
|
28571
28581
|
|
|
28572
|
-
const translations$
|
|
28582
|
+
const translations$4 = {
|
|
28573
28583
|
'sv': {
|
|
28574
28584
|
'introMessage': `Välj ombud du vill agera som?`,
|
|
28575
28585
|
},
|
|
@@ -28599,7 +28609,7 @@ let PnProfileSelector$1 = class extends HTMLElement {
|
|
|
28599
28609
|
this.language = "sv"; //sv
|
|
28600
28610
|
this.returnUrl = "/"; //sv
|
|
28601
28611
|
this.heading = null; //sv
|
|
28602
|
-
this.i18n = translations$
|
|
28612
|
+
this.i18n = translations$4["en"];
|
|
28603
28613
|
this.isLoading = true;
|
|
28604
28614
|
this.numberOfProfiles = 1;
|
|
28605
28615
|
}
|
|
@@ -28610,8 +28620,8 @@ let PnProfileSelector$1 = class extends HTMLElement {
|
|
|
28610
28620
|
this.setTranslations();
|
|
28611
28621
|
}
|
|
28612
28622
|
setTranslations() {
|
|
28613
|
-
if (this.language && translations$
|
|
28614
|
-
this.i18n = translations$
|
|
28623
|
+
if (this.language && translations$4[this.language]) {
|
|
28624
|
+
this.i18n = translations$4[this.language];
|
|
28615
28625
|
}
|
|
28616
28626
|
}
|
|
28617
28627
|
render() {
|
|
@@ -28638,7 +28648,7 @@ let PnProfileSelectorOption$1 = class extends HTMLElement {
|
|
|
28638
28648
|
static get style() { return pnProfileSelectorOptionCss; }
|
|
28639
28649
|
};
|
|
28640
28650
|
|
|
28641
|
-
const translations$
|
|
28651
|
+
const translations$3 = {
|
|
28642
28652
|
'sv': {
|
|
28643
28653
|
'componentheading': 'Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?',
|
|
28644
28654
|
'deliveryscopeheading': 'Endast leveranser inom Sverige',
|
|
@@ -28887,8 +28897,8 @@ let PnProxioFindPrice = class extends HTMLElement {
|
|
|
28887
28897
|
if (this.market) {
|
|
28888
28898
|
state$1.market = markets[this.market];
|
|
28889
28899
|
}
|
|
28890
|
-
if (this.language && translations$
|
|
28891
|
-
state$1.i18n = translations$
|
|
28900
|
+
if (this.language && translations$3[this.language]) {
|
|
28901
|
+
state$1.i18n = translations$3[this.language];
|
|
28892
28902
|
}
|
|
28893
28903
|
}
|
|
28894
28904
|
filterItems() {
|
|
@@ -28938,7 +28948,7 @@ let PnProxioFindPrice = class extends HTMLElement {
|
|
|
28938
28948
|
static get style() { return pnProxioFindpriceCss; }
|
|
28939
28949
|
};
|
|
28940
28950
|
|
|
28941
|
-
const translations$
|
|
28951
|
+
const translations$2 = {
|
|
28942
28952
|
'sv': {
|
|
28943
28953
|
"from": "Från ",
|
|
28944
28954
|
"labelMaxDimensionsRoll": "Rulle",
|
|
@@ -28972,7 +28982,7 @@ let PnProxioFindPriceResult = class extends HTMLElement {
|
|
|
28972
28982
|
this.shopLabel = '';
|
|
28973
28983
|
this.shopUrl = '';
|
|
28974
28984
|
this.shopId = '';
|
|
28975
|
-
this.i18n = translations$
|
|
28985
|
+
this.i18n = translations$2["sv"];
|
|
28976
28986
|
}
|
|
28977
28987
|
componentWillLoad() {
|
|
28978
28988
|
this.composeItems();
|
|
@@ -29027,7 +29037,7 @@ let PnProxioPricegroup$1 = class extends HTMLElement {
|
|
|
29027
29037
|
this.cache = true;
|
|
29028
29038
|
this.activeWeightIndex = 0;
|
|
29029
29039
|
this.data = null;
|
|
29030
|
-
this.i18n = translations$
|
|
29040
|
+
this.i18n = translations$2["sv"];
|
|
29031
29041
|
this.fetchHelper = new FetchHelper("proxiopricegroup");
|
|
29032
29042
|
}
|
|
29033
29043
|
componentWillLoad() {
|
|
@@ -29076,8 +29086,8 @@ let PnProxioPricegroup$1 = class extends HTMLElement {
|
|
|
29076
29086
|
this.activeWeightIndex = weightIndex;
|
|
29077
29087
|
}
|
|
29078
29088
|
setLanguage() {
|
|
29079
|
-
if (translations$
|
|
29080
|
-
this.i18n = translations$
|
|
29089
|
+
if (translations$2[this.language]) {
|
|
29090
|
+
this.i18n = translations$2[this.language];
|
|
29081
29091
|
}
|
|
29082
29092
|
}
|
|
29083
29093
|
getPriceString(product) {
|
|
@@ -29242,6 +29252,80 @@ let PnQuoteCard$1 = class extends HTMLElement {
|
|
|
29242
29252
|
static get style() { return pnQuoteCardCss; }
|
|
29243
29253
|
};
|
|
29244
29254
|
|
|
29255
|
+
const translations$1 = {
|
|
29256
|
+
sv: {
|
|
29257
|
+
sharelabel: 'Dela med',
|
|
29258
|
+
},
|
|
29259
|
+
en: {
|
|
29260
|
+
sharelabel: 'Share to',
|
|
29261
|
+
},
|
|
29262
|
+
da: {
|
|
29263
|
+
sharelabel: 'Del med',
|
|
29264
|
+
},
|
|
29265
|
+
no: {
|
|
29266
|
+
sharelabel: 'Dele med',
|
|
29267
|
+
},
|
|
29268
|
+
fi: {
|
|
29269
|
+
sharelabel: 'Jakaa',
|
|
29270
|
+
},
|
|
29271
|
+
};
|
|
29272
|
+
|
|
29273
|
+
const pnShareCss = "pn-share .pn-share__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0.8rem}pn-share .pn-share__heading{font-size:1.6rem;font-weight:500}pn-share .pn-share__heading:after{content:\"\";display:block;height:0.2rem;background-color:#F3F2F2;margin-top:0.4rem;margin-bottom:0.8rem}pn-share .pn-share__items{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:0.8rem;-ms-flex-align:center;align-items:center}";
|
|
29274
|
+
|
|
29275
|
+
const SHARE_URLS = [
|
|
29276
|
+
{ platform: 'linkedin', url: 'https://www.linkedin.com/sharing/share-offsite/?url=', text: 'LinkedIn' },
|
|
29277
|
+
{ platform: 'twitter', url: 'https://twitter.com/intent/tweet?url=', text: 'Twitter' },
|
|
29278
|
+
{ platform: 'facebook', url: 'https://www.facebook.com/sharer/sharer.php?u=', text: 'Facebook' },
|
|
29279
|
+
];
|
|
29280
|
+
let PnShare$1 = class extends HTMLElement {
|
|
29281
|
+
constructor() {
|
|
29282
|
+
super();
|
|
29283
|
+
this.__registerHost();
|
|
29284
|
+
this.link = null;
|
|
29285
|
+
this.language = 'sv';
|
|
29286
|
+
}
|
|
29287
|
+
componentWillLoad() {
|
|
29288
|
+
this.setTranslations();
|
|
29289
|
+
}
|
|
29290
|
+
setTranslations() {
|
|
29291
|
+
if (this.language === 'nb') {
|
|
29292
|
+
this.language = 'no';
|
|
29293
|
+
}
|
|
29294
|
+
if (this.language && translations$1[this.language]) {
|
|
29295
|
+
this.i18n = translations$1[this.language];
|
|
29296
|
+
}
|
|
29297
|
+
}
|
|
29298
|
+
onLanguageChange() {
|
|
29299
|
+
this.setTranslations();
|
|
29300
|
+
}
|
|
29301
|
+
render() {
|
|
29302
|
+
return (h(Host, null, h("div", { class: "pn-share__container" }, h("h3", { class: "pn-share__heading" }, this.i18n.sharelabel, ":"), h("div", { class: "pn-share__items" }, SHARE_URLS.map(platform => {
|
|
29303
|
+
return (h("pn-share-item", { link: `${platform.url}${this.link}`, text: platform.text }, h("pn-icon", { slot: "icon", symbol: platform.platform })));
|
|
29304
|
+
})))));
|
|
29305
|
+
}
|
|
29306
|
+
get hostElement() { return this; }
|
|
29307
|
+
static get watchers() { return {
|
|
29308
|
+
"language": ["onLanguageChange"]
|
|
29309
|
+
}; }
|
|
29310
|
+
static get style() { return pnShareCss; }
|
|
29311
|
+
};
|
|
29312
|
+
|
|
29313
|
+
const pnShareItemCss = "pn-share-item .pn-share-item__container{padding:0.3rem 0.6rem;border:1px solid #D3CECB;border-radius:0.8rem;background-color:#FFFFFF;-webkit-transition:background-color ease-in-out 0.3s;transition:background-color ease-in-out 0.3s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}pn-share-item a{text-decoration:none;color:#005D92;-webkit-transition:color 0.3s;transition:color 0.3s;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.8rem;font-size:1.6rem;font-weight:400}pn-share-item [slot=icon] svg{height:1.6rem;width:1.6rem}pn-share-item [slot=icon] svg path{fill:#005D92;-webkit-transition:fill 0.3s;transition:fill 0.3s}pn-share-item:hover{cursor:pointer}pn-share-item:hover .pn-share-item__container{background-color:#0D234B}pn-share-item:hover a{color:#FFFFFF;text-decoration:none}pn-share-item:hover [slot=icon] svg{fill:#0D234B}pn-share-item:hover [slot=icon] svg path{fill:#FFFFFF}";
|
|
29314
|
+
|
|
29315
|
+
let PnShareItem$1 = class extends HTMLElement {
|
|
29316
|
+
constructor() {
|
|
29317
|
+
super();
|
|
29318
|
+
this.__registerHost();
|
|
29319
|
+
this.link = null;
|
|
29320
|
+
this.text = null;
|
|
29321
|
+
}
|
|
29322
|
+
render() {
|
|
29323
|
+
return (h(Host, null, h("div", { class: "pn-share-item__container" }, h("a", { href: `${this.link}` }, h("slot", { name: "icon" }), " ", this.text))));
|
|
29324
|
+
}
|
|
29325
|
+
get hostElement() { return this; }
|
|
29326
|
+
static get style() { return pnShareItemCss; }
|
|
29327
|
+
};
|
|
29328
|
+
|
|
29245
29329
|
const translations = {
|
|
29246
29330
|
'sv': {
|
|
29247
29331
|
"open": "Öppna",
|
|
@@ -29849,6 +29933,8 @@ const PnProxioProductcardInformation = /*@__PURE__*/proxyCustomElement(PnProxioP
|
|
|
29849
29933
|
const PnProxioProductcardPricelink = /*@__PURE__*/proxyCustomElement(PnProxioProductcardPricelink$1, [0,"pn-proxio-productcard-pricelink",{"price":[1],"link":[1],"linktext":[1]}]);
|
|
29850
29934
|
const PnQuickCta = /*@__PURE__*/proxyCustomElement(PnQuickCta$1, [4,"pn-quick-cta",{"heading":[1],"preamble":[1]}]);
|
|
29851
29935
|
const PnQuoteCard = /*@__PURE__*/proxyCustomElement(PnQuoteCard$1, [4,"pn-quote-card",{"quote":[1],"name":[1],"occupation":[1]}]);
|
|
29936
|
+
const PnShare = /*@__PURE__*/proxyCustomElement(PnShare$1, [0,"pn-share",{"link":[1],"language":[1537],"i18n":[32]}]);
|
|
29937
|
+
const PnShareItem = /*@__PURE__*/proxyCustomElement(PnShareItem$1, [4,"pn-share-item",{"link":[1],"text":[1]}]);
|
|
29852
29938
|
const PnSidenav = /*@__PURE__*/proxyCustomElement(PnSidenav$1, [4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]);
|
|
29853
29939
|
const PnSidenavLevel = /*@__PURE__*/proxyCustomElement(PnSidenavLevel$1, [4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]);
|
|
29854
29940
|
const PnSidenavLink = /*@__PURE__*/proxyCustomElement(PnSidenavLink$1, [4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]);
|
|
@@ -29922,6 +30008,8 @@ const defineCustomElements = (opts) => {
|
|
|
29922
30008
|
PnProxioProductcardPricelink,
|
|
29923
30009
|
PnQuickCta,
|
|
29924
30010
|
PnQuoteCard,
|
|
30011
|
+
PnShare,
|
|
30012
|
+
PnShareItem,
|
|
29925
30013
|
PnSidenav,
|
|
29926
30014
|
PnSidenavLevel,
|
|
29927
30015
|
PnSidenavLink,
|
|
@@ -29943,4 +30031,4 @@ const defineCustomElements = (opts) => {
|
|
|
29943
30031
|
}
|
|
29944
30032
|
};
|
|
29945
30033
|
|
|
29946
|
-
export { PnBonusProgressbar, PnBonusProgressbarLevel, PnBreakpoints, PnChart, PnChartsCard, PnChoiceButton, PnCustomernumberSelector, PnCustomernumberSelectorOption, PnFilterCheckbox, PnFindPrice, PnFindPriceResult, PnFindServiceAndPrice, PnFindServiceAndPriceResult, PnLanguageSelector, PnLanguageSelectorOption, PnLineShape, PnMainnav, PnMainnavLevel, PnMainnavLink, PnMainnavList, PnMarketwebInput, PnMarketwebSearch, PnMarketwebSitefooter, PnMarketwebSiteheader, PnMarketwebSiteheaderLogin, PnMarketwebSiteheaderLoginButton, PnMarketwebSiteheaderLoginLinklist, PnMarketwebSiteheaderLoginLinks, PnMarketwebSiteheaderLoginMypageButton, PnMarketwebSiteheaderLoginProfileselection, PnMarketwebSiteheaderSearch, PnMarketwebSiteheaderUnifiedLogin, PnParcelTracker, PnPexPricefinder, PnProductCard, PnProductCardInfo, PnProductCardPrice, PnProductPricelist, PnProductPricelistResult, PnProductTile, PnProductTileInfo, PnProductTilePrice, PnProfileModal, PnProfileModalCustomernumber, PnProfileModalProfile, PnProfileModalType, PnProfileSelector, PnProfileSelectorOption, PnProxioFindprice, PnProxioFindpriceResult, PnProxioPricegroup, PnProxioProductcard, PnProxioProductcardDescription, PnProxioProductcardInformation, PnProxioProductcardPricelink, PnQuickCta, PnQuoteCard, PnSidenav, PnSidenavLevel, PnSidenavLink, PnSidenavTogglebutton, PnSiteFooter, PnSiteFooterCol, PnSiteSelector, PnSiteSelectorItem, PnSpotlight, PnStatsInfo, PnStatsInfoData, PnTeaserCard, PnTitletag, defineCustomElements };
|
|
30034
|
+
export { PnBonusProgressbar, PnBonusProgressbarLevel, PnBreakpoints, PnChart, PnChartsCard, PnChoiceButton, PnCustomernumberSelector, PnCustomernumberSelectorOption, PnFilterCheckbox, PnFindPrice, PnFindPriceResult, PnFindServiceAndPrice, PnFindServiceAndPriceResult, PnLanguageSelector, PnLanguageSelectorOption, PnLineShape, PnMainnav, PnMainnavLevel, PnMainnavLink, PnMainnavList, PnMarketwebInput, PnMarketwebSearch, PnMarketwebSitefooter, PnMarketwebSiteheader, PnMarketwebSiteheaderLogin, PnMarketwebSiteheaderLoginButton, PnMarketwebSiteheaderLoginLinklist, PnMarketwebSiteheaderLoginLinks, PnMarketwebSiteheaderLoginMypageButton, PnMarketwebSiteheaderLoginProfileselection, PnMarketwebSiteheaderSearch, PnMarketwebSiteheaderUnifiedLogin, PnParcelTracker, PnPexPricefinder, PnProductCard, PnProductCardInfo, PnProductCardPrice, PnProductPricelist, PnProductPricelistResult, PnProductTile, PnProductTileInfo, PnProductTilePrice, PnProfileModal, PnProfileModalCustomernumber, PnProfileModalProfile, PnProfileModalType, PnProfileSelector, PnProfileSelectorOption, PnProxioFindprice, PnProxioFindpriceResult, PnProxioPricegroup, PnProxioProductcard, PnProxioProductcardDescription, PnProxioProductcardInformation, PnProxioProductcardPricelink, PnQuickCta, PnQuoteCard, PnShare, PnShareItem, PnSidenav, PnSidenavLevel, PnSidenavLink, PnSidenavTogglebutton, PnSiteFooter, PnSiteFooterCol, PnSiteSelector, PnSiteSelectorItem, PnSpotlight, PnStatsInfo, PnStatsInfoData, PnTeaserCard, PnTitletag, defineCustomElements };
|