@postnord/pn-marketweb-components 2.0.150-test2 → 2.1.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.
Files changed (152) hide show
  1. package/cjs/{data-4fa6b08d.js → data-b5ef4f7c.js} +2 -2
  2. package/cjs/loader.cjs.js +1 -1
  3. package/cjs/pn-find-price-result.cjs.entry.js +4 -4
  4. package/cjs/{pn-find-price-store-a91ce3f6.js → pn-find-price-store-0b8c195c.js} +2 -2
  5. package/cjs/pn-find-price.cjs.entry.js +7 -7
  6. package/cjs/pn-language-selector_9.cjs.entry.js +19 -29
  7. package/cjs/pn-market-web-components.cjs.js +1 -1
  8. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +42 -7
  9. package/cjs/{pn-marketweb-siteheader-login-button_4.cjs.entry.js → pn-marketweb-siteheader-login-links_2.cjs.entry.js} +18 -67
  10. package/cjs/pn-marketweb-siteheader.cjs.entry.js +2 -2
  11. package/cjs/{pn-product-card_3.cjs.entry.js → pn-product-card_4.cjs.entry.js} +18 -0
  12. package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
  13. package/cjs/pn-proxio-pricegroup.cjs.entry.js +22 -6
  14. package/collection/collection-manifest.json +0 -4
  15. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +13 -25
  16. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +45 -14
  17. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +23 -13
  18. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +25 -56
  19. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css +0 -26
  20. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +3 -3
  21. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +5 -4
  22. package/collection/components/widgets/pn-find-price/data.js +2 -2
  23. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +7 -7
  24. package/collection/components/widgets/pn-find-price/pn-find-price-store.js +2 -2
  25. package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +5 -5
  26. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +0 -3
  27. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +0 -1
  28. package/collection/globals/MarketWebLoginManager.js +1 -1
  29. package/custom-elements/index.d.ts +0 -24
  30. package/custom-elements/index.js +242 -634
  31. package/esm/{data-059c2a58.js → data-9c9c5f41.js} +2 -2
  32. package/esm/loader.js +1 -1
  33. package/esm/pn-find-price-result.entry.js +4 -4
  34. package/esm/{pn-find-price-store-bde5071d.js → pn-find-price-store-b4556c9b.js} +2 -2
  35. package/esm/pn-find-price.entry.js +7 -7
  36. package/esm/pn-language-selector_9.entry.js +19 -29
  37. package/esm/pn-market-web-components.js +1 -1
  38. package/esm/pn-marketweb-siteheader-login-linklist.entry.js +42 -7
  39. package/esm/{pn-marketweb-siteheader-login-button_4.entry.js → pn-marketweb-siteheader-login-links_2.entry.js} +19 -66
  40. package/esm/pn-marketweb-siteheader.entry.js +2 -2
  41. package/esm/{pn-product-card_3.entry.js → pn-product-card_4.entry.js} +19 -2
  42. package/esm/pn-product-pricelist.entry.js +1 -1
  43. package/esm/pn-proxio-pricegroup.entry.js +19 -3
  44. package/esm-es5/{data-059c2a58.js → data-9c9c5f41.js} +1 -1
  45. package/esm-es5/loader.js +1 -1
  46. package/esm-es5/pn-find-price-result.entry.js +1 -1
  47. package/esm-es5/{pn-find-price-store-bde5071d.js → pn-find-price-store-b4556c9b.js} +1 -1
  48. package/esm-es5/pn-find-price.entry.js +1 -1
  49. package/esm-es5/pn-language-selector_9.entry.js +1 -1
  50. package/esm-es5/pn-market-web-components.js +1 -1
  51. package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
  52. package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +1 -0
  53. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  54. package/esm-es5/pn-product-card_4.entry.js +1 -0
  55. package/esm-es5/pn-product-pricelist.entry.js +1 -1
  56. package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
  57. package/package.json +1 -1
  58. package/pn-market-web-components/p-022d9a78.entry.js +1 -0
  59. package/pn-market-web-components/{p-70b360dd.entry.js → p-0b0727dc.entry.js} +1 -1
  60. package/pn-market-web-components/p-198d9c77.system.entry.js +1 -0
  61. package/pn-market-web-components/p-332e9005.entry.js +1 -0
  62. package/pn-market-web-components/{p-3738a2df.system.js → p-37017f68.system.js} +1 -1
  63. package/pn-market-web-components/{p-b9a84e67.entry.js → p-3ae38e63.entry.js} +1 -1
  64. package/pn-market-web-components/p-3c0d63fb.system.entry.js +1 -0
  65. package/pn-market-web-components/p-63c30175.entry.js +1 -0
  66. package/pn-market-web-components/p-67887512.system.js +1 -1
  67. package/pn-market-web-components/p-6b33db5b.system.entry.js +1 -0
  68. package/pn-market-web-components/{p-98a7ddd1.system.entry.js → p-736e5b84.system.entry.js} +1 -1
  69. package/pn-market-web-components/p-77557da8.entry.js +1 -0
  70. package/pn-market-web-components/p-92fd28e6.entry.js +1 -0
  71. package/pn-market-web-components/p-a119cb8e.entry.js +1 -0
  72. package/pn-market-web-components/{p-8b684578.entry.js → p-aab2e28f.entry.js} +1 -1
  73. package/pn-market-web-components/{p-59be826b.system.entry.js → p-ac0e3c22.system.entry.js} +1 -1
  74. package/pn-market-web-components/p-c4254e9e.js +1 -0
  75. package/pn-market-web-components/{p-7f9c643c.system.entry.js → p-d0653c80.system.entry.js} +1 -1
  76. package/pn-market-web-components/p-d542a52b.system.entry.js +1 -0
  77. package/pn-market-web-components/{p-ecdf2b69.system.entry.js → p-e4a4e68f.system.entry.js} +1 -1
  78. package/pn-market-web-components/p-eb662559.system.entry.js +1 -0
  79. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  80. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.d.ts +2 -1
  81. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.d.ts +1 -1
  82. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +2 -3
  83. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +8 -10
  84. package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -4
  85. package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +5 -5
  86. package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +2 -2
  87. package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +1 -1
  88. package/types/components.d.ts +1 -85
  89. package/umd/pn-marketweb-init.js +1 -1
  90. package/umd/pn-marketweb-salesforce.js +2 -2
  91. package/cjs/pn-proxio-findprice-result.cjs.entry.js +0 -63
  92. package/cjs/pn-proxio-findprice.cjs.entry.js +0 -311
  93. package/cjs/pn-titletag.cjs.entry.js +0 -24
  94. package/cjs/translations-585711ff.js +0 -21
  95. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.css +0 -0
  96. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +0 -77
  97. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.css +0 -0
  98. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js +0 -55
  99. package/collection/components/widgets/pn-proxio-findprice/data.js +0 -52
  100. package/collection/components/widgets/pn-proxio-findprice/find-price.stories.js +0 -27
  101. package/collection/components/widgets/pn-proxio-findprice/img/clouds.svg +0 -5
  102. package/collection/components/widgets/pn-proxio-findprice/img/large-package.svg +0 -9
  103. package/collection/components/widgets/pn-proxio-findprice/img/medium-package.svg +0 -9
  104. package/collection/components/widgets/pn-proxio-findprice/img/postnord-person1.svg +0 -52
  105. package/collection/components/widgets/pn-proxio-findprice/img/postnord-person2.svg +0 -56
  106. package/collection/components/widgets/pn-proxio-findprice/img/small-package.svg +0 -23
  107. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.css +0 -9
  108. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +0 -234
  109. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.js +0 -29
  110. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.js +0 -106
  111. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.js +0 -1
  112. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.css +0 -105
  113. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +0 -250
  114. package/esm/pn-proxio-findprice-result.entry.js +0 -59
  115. package/esm/pn-proxio-findprice.entry.js +0 -307
  116. package/esm/pn-titletag.entry.js +0 -20
  117. package/esm/translations-022fefa0.js +0 -19
  118. package/esm-es5/pn-marketweb-siteheader-login-button_4.entry.js +0 -1
  119. package/esm-es5/pn-product-card_3.entry.js +0 -1
  120. package/esm-es5/pn-proxio-findprice-result.entry.js +0 -1
  121. package/esm-es5/pn-proxio-findprice.entry.js +0 -1
  122. package/esm-es5/pn-titletag.entry.js +0 -1
  123. package/esm-es5/translations-022fefa0.js +0 -1
  124. package/pn-market-web-components/p-10eafcd7.entry.js +0 -1
  125. package/pn-market-web-components/p-20be85a1.system.entry.js +0 -1
  126. package/pn-market-web-components/p-27bcc4a1.system.entry.js +0 -1
  127. package/pn-market-web-components/p-3969ec4d.entry.js +0 -1
  128. package/pn-market-web-components/p-499bb3ac.entry.js +0 -1
  129. package/pn-market-web-components/p-4a03854b.system.entry.js +0 -1
  130. package/pn-market-web-components/p-557328e3.system.entry.js +0 -1
  131. package/pn-market-web-components/p-8afa354b.system.entry.js +0 -1
  132. package/pn-market-web-components/p-951861fa.entry.js +0 -1
  133. package/pn-market-web-components/p-a120063f.js +0 -1
  134. package/pn-market-web-components/p-b501b216.system.js +0 -1
  135. package/pn-market-web-components/p-dd01024a.system.entry.js +0 -1
  136. package/pn-market-web-components/p-de823255.entry.js +0 -1
  137. package/pn-market-web-components/p-e0b034c2.entry.js +0 -1
  138. package/pn-market-web-components/p-e397e11b.entry.js +0 -1
  139. package/pn-market-web-components/p-e4ebf17d.system.entry.js +0 -1
  140. package/pn-market-web-components/p-f58bde56.js +0 -1
  141. package/pn-market-web-components/p-f782ce94.system.entry.js +0 -1
  142. package/pn-market-web-components/p-fe95397b.entry.js +0 -1
  143. package/pn-market-web-components/p-ff83e974.entry.js +0 -1
  144. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.d.ts +0 -10
  145. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.d.ts +0 -6
  146. package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.d.ts +0 -22
  147. package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.d.ts +0 -51
  148. package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.d.ts +0 -106
  149. package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.d.ts +0 -39
  150. package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice.d.ts +0 -24
  151. /package/pn-market-web-components/{p-a07906d5.js → p-86b52823.js} +0 -0
  152. /package/pn-market-web-components/{p-1534926e.system.js → p-bfa7c83f.system.js} +0 -0
@@ -1,12 +1,12 @@
1
- import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';
2
- import { state as headerState } from './pn-marketweb-siteheader-store';
1
+ import { Component, Prop, h, Element, Watch, Host } from "@stencil/core";
2
+ import { state as headerState } from "./pn-marketweb-siteheader-store";
3
3
  export class PnMarketwebSiteheaderLoginLinks {
4
4
  constructor() {
5
5
  // Login dialog
6
6
  this.loginDialog = null;
7
- this.idNamespace = '';
7
+ this.idNamespace = "";
8
8
  this.loggedin = false;
9
- this.username = '';
9
+ this.username = "";
10
10
  }
11
11
  componentWillLoad() {
12
12
  this.init();
@@ -21,12 +21,12 @@ export class PnMarketwebSiteheaderLoginLinks {
21
21
  }
22
22
  const adjustLink = (link, i) => {
23
23
  if (!link.isLogoutLink) {
24
- link.isLogoutLink = link.pageLink.indexOf('location.href') !== -1 && link.pageLink.indexOf('logout') !== -1;
24
+ link.isLogoutLink = (link.pageLink.indexOf('location.href') !== -1 && link.pageLink.indexOf('logout') !== -1);
25
25
  }
26
26
  if (link.isLogoutLink) {
27
27
  link.href = headerState.loginManager.getLogoutUrl(link.href);
28
28
  }
29
- link.href = link.href.replace('window.location.href', window.location.href);
29
+ link.href = link.href.replace("window.location.href", window.location.href);
30
30
  if (i === 0 && !link.href) {
31
31
  link.href = headerState.loginManager.getLoginUrl();
32
32
  link.linkType = 'primary';
@@ -49,7 +49,7 @@ export class PnMarketwebSiteheaderLoginLinks {
49
49
  isLogoutLink: false,
50
50
  pageLink: null,
51
51
  linkType: 'primary',
52
- primaryLinkApperance: true,
52
+ primaryLinkApperance: true
53
53
  },
54
54
  {
55
55
  href: headerState.loginManager.getLoginUrl(this.loginDialog.registerUrl),
@@ -57,8 +57,8 @@ export class PnMarketwebSiteheaderLoginLinks {
57
57
  openInNewWindow: false,
58
58
  isLogoutLink: false,
59
59
  pageLink: null,
60
- primaryLinkApperance: false,
61
- },
60
+ primaryLinkApperance: false
61
+ }
62
62
  ];
63
63
  }
64
64
  render() {
@@ -75,8 +75,18 @@ export class PnMarketwebSiteheaderLoginLinks {
75
75
  hostElementAttribute.loggedin = this.loggedin;
76
76
  }
77
77
  return (h(Host, Object.assign({}, hostElementAttribute),
78
- !this.loginDialog.overrideLoginMenu ? (h("div", { "data-loggedin": this.loggedin + '' }, this.loggedin ? (h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks, idNamespace: this.idNamespace })) : (h("div", null, ((_a = this.loginDialog.loginMenuLinks) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (h("pn-marketweb-siteheader-login-linklist", { heading: this.loginDialog.loginTitle, links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })) : (h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.legacyLoginLinks, idNamespace: this.idNamespace })))))) : null,
79
- this.loginDialog.overrideLoginMenu ? (h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })) : null));
78
+ (!this.loginDialog.overrideLoginMenu) ?
79
+ h("div", { "data-loggedin": this.loggedin + '' }, (this.loggedin) ?
80
+ h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loggedInLinks, idNamespace: this.idNamespace })
81
+ :
82
+ h("div", null, ((_a = this.loginDialog.loginMenuLinks) === null || _a === void 0 ? void 0 : _a.length) > 0 ?
83
+ h("pn-marketweb-siteheader-login-linklist", { heading: this.loginDialog.loginTitle, links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })
84
+ :
85
+ h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.legacyLoginLinks, idNamespace: this.idNamespace })))
86
+ : null,
87
+ (this.loginDialog.overrideLoginMenu) ?
88
+ h("pn-marketweb-siteheader-login-linklist", { links: this.loginDialog.loginMenuLinks, idNamespace: this.idNamespace })
89
+ : null));
80
90
  }
81
91
  static get is() { return "pn-marketweb-siteheader-login-links"; }
82
92
  static get originalStyleUrls() { return {
@@ -123,7 +133,7 @@ export class PnMarketwebSiteheaderLoginLinks {
123
133
  },
124
134
  "attribute": "id-namespace",
125
135
  "reflect": false,
126
- "defaultValue": "''"
136
+ "defaultValue": "\"\""
127
137
  },
128
138
  "loggedin": {
129
139
  "type": "boolean",
@@ -159,7 +169,7 @@ export class PnMarketwebSiteheaderLoginLinks {
159
169
  },
160
170
  "attribute": "username",
161
171
  "reflect": false,
162
- "defaultValue": "''"
172
+ "defaultValue": "\"\""
163
173
  }
164
174
  }; }
165
175
  static get elementRef() { return "hostElement"; }
@@ -1,55 +1,42 @@
1
- import { Component, Element, Event, h, Host, Prop, State, Watch } from '@stencil/core';
2
- import { MarketWebLoginManager } from '../../../globals/MarketWebLoginManager';
3
- import { state as headerState } from './pn-marketweb-siteheader-store';
1
+ import { Component, Prop, h, State, Element, Watch, Event, Host } from "@stencil/core";
2
+ import { MarketWebLoginManager } from "../../../globals/MarketWebLoginManager";
3
+ import { state as headerState } from "./pn-marketweb-siteheader-store";
4
4
  export class PnMarketwebSiteheaderLogin {
5
5
  constructor() {
6
6
  var _a;
7
7
  /** Specifies which endpoint domain we should load from */
8
- this.endpoint = '';
8
+ this.endpoint = "";
9
9
  /** Access token passed from backend */
10
- this.token = '';
11
- this.i18n = {
12
- searchlabel: '',
13
- searchplaceholder: '',
14
- searchbuttontext: '',
15
- menuHomeButton: '',
16
- menuGoBackButton: '',
17
- mainMenuButton: '',
18
- menuStartButton: '',
19
- profileSelectionFlyoutHeading: '',
20
- loginButtonText: '',
21
- loginPreamble: '',
22
- };
10
+ this.token = "";
11
+ this.i18n = { "searchlabel": "", "searchplaceholder": "", "searchbuttontext": "", "menuHomeButton": "", "menuGoBackButton": "", "mainMenuButton": "", "menuStartButton": "", "profileSelectionFlyoutHeading": "" };
23
12
  this.siteUrl = '';
24
13
  this.emitEvents = true;
25
14
  // Login dialog
26
15
  this.loginDialog = null;
27
16
  /** User Fullname */
28
- this.fullname = '';
17
+ this.fullname = "";
29
18
  this.loggedin = false;
30
19
  /** If this is selected we will show the new profile selection dropdown instead of the login version */
31
20
  this.showProfileSelection = false;
32
21
  /** Continiously check if a user is logged in **/
33
22
  this.checkUserLoggedInStateInterval = 0;
34
- this.toggleButtonText = ((_a = this.loginDialog) === null || _a === void 0 ? void 0 : _a.loginMenuLinkText) ? this.loginDialog.loginMenuLinkText : '';
23
+ this.toggleButtonText = (((_a = this.loginDialog) === null || _a === void 0 ? void 0 : _a.loginMenuLinkText) ? this.loginDialog.loginMenuLinkText : "");
35
24
  this.username = this.fullname;
36
25
  }
37
26
  componentWillLoad() {
38
- console.log('env: ', this.environment);
39
27
  const userInfo = this.loggedin && this.fullname ? { given_name: this.fullname } : null;
40
28
  headerState.loginManager = new MarketWebLoginManager({
41
29
  endpoint: this.endpoint,
42
30
  eventTarget: this.hostElement,
43
31
  checkUserLoggedInStateInterval: this.checkUserLoggedInStateInterval,
44
- userInfo,
32
+ userInfo
45
33
  });
46
34
  headerState.loginManager.setSiteUrl(this.siteUrl);
47
- this.hostElement['loginmanager'] = headerState.loginManager;
35
+ this.hostElement["loginmanager"] = headerState.loginManager;
48
36
  if (this.token) {
49
37
  headerState.loginManager.registerToken(this.token, 'backend');
50
38
  }
51
- else if (this.emitEvents) {
52
- // The primary login instance
39
+ else if (this.emitEvents) { // The primary login instance
53
40
  headerState.loginManager.invalidateTokenOfType('backend');
54
41
  }
55
42
  this.hostElement.addEventListener(headerState.loginManager.events.loginstatechange, this.onLoginStateChange.bind(this));
@@ -69,7 +56,7 @@ export class PnMarketwebSiteheaderLogin {
69
56
  }
70
57
  const adjustLink = (link, i) => {
71
58
  if (!link.isLogoutLink) {
72
- link.isLogoutLink = link.pageLink.indexOf('location.href') !== -1 && link.pageLink.indexOf('logout') !== -1;
59
+ link.isLogoutLink = (link.pageLink.indexOf('location.href') !== -1 && link.pageLink.indexOf('logout') !== -1);
73
60
  }
74
61
  if (link.isLogoutLink) {
75
62
  link.href = headerState.loginManager.getLogoutUrl(link.href);
@@ -95,7 +82,7 @@ export class PnMarketwebSiteheaderLogin {
95
82
  isLogoutLink: false,
96
83
  pageLink: null,
97
84
  linkType: 'primary',
98
- primaryLinkApperance: true,
85
+ primaryLinkApperance: true
99
86
  },
100
87
  {
101
88
  href: headerState.loginManager.getLoginUrl(this.loginDialog.registerUrl),
@@ -103,18 +90,18 @@ export class PnMarketwebSiteheaderLogin {
103
90
  openInNewWindow: false,
104
91
  isLogoutLink: false,
105
92
  pageLink: null,
106
- primaryLinkApperance: false,
107
- },
93
+ primaryLinkApperance: false
94
+ }
108
95
  ];
109
96
  }
110
97
  setUserName() {
111
98
  const userInfo = headerState.loginManager.getUserInfo();
112
- let name = '';
99
+ let name = "";
113
100
  if (!this.loggedin || !userInfo) {
114
101
  this.username = name;
115
102
  }
116
103
  if (userInfo && userInfo.given_name) {
117
- name = userInfo.given_name + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name) ? ` ${userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name}` : '');
104
+ name = userInfo.given_name + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name) ? ` ${userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name}` : "");
118
105
  }
119
106
  if (!name && userInfo && userInfo.email) {
120
107
  name = userInfo.email;
@@ -156,11 +143,10 @@ export class PnMarketwebSiteheaderLogin {
156
143
  hostElementAttribute.loggedin = this.loggedin + '';
157
144
  }
158
145
  return (h(Host, Object.assign({}, hostElementAttribute),
159
- h("pn-nav-dropdown", { label: this.toggleButtonText, icon: "user", class: "siteheader-logindialog" },
160
- this.environment !== 'production' && !this.loggedin && h("pn-marketweb-siteheader-login-button", { label: /* this.i18n?.loginButtonText */ 'login check' }),
161
- this.environment !== 'production' && this.loggedin && h("pn-marketweb-siteheader-login-mypage-button", { myPageUrl: "https://account.postnord.com/secure/profile" }),
162
- this.loggedin && this.showProfileSelection ? (h("pn-marketweb-siteheader-login-profileselection", { loginDialog: this.loginDialog, loggedin: this.loggedin, i18n: this.i18n, idNamespace: this.emitEvents ? '1' : '2', endpoint: this.endpoint })) : (h("pn-marketweb-siteheader-login-links", { loginDialog: this.loginDialog, loggedin: this.loggedin, idNamespace: this.emitEvents ? '1' : '2', username: this.username })),
163
- this.environment !== 'production' && h("p", null, "L\u00E4s mer om v\u00E5ra inloggade tj\u00E4nster och hur du anv\u00E4nder dem"))));
146
+ h("pn-nav-dropdown", { label: this.toggleButtonText, icon: "user", class: "siteheader-logindialog" }, this.loggedin && this.showProfileSelection ?
147
+ h("pn-marketweb-siteheader-login-profileselection", { loginDialog: this.loginDialog, loggedin: this.loggedin, i18n: this.i18n, idNamespace: this.emitEvents ? '1' : '2', endpoint: this.endpoint })
148
+ :
149
+ h("pn-marketweb-siteheader-login-links", { loginDialog: this.loginDialog, loggedin: this.loggedin, idNamespace: this.emitEvents ? '1' : '2', username: this.username }))));
164
150
  }
165
151
  static get is() { return "pn-marketweb-siteheader-login"; }
166
152
  static get originalStyleUrls() { return {
@@ -186,7 +172,7 @@ export class PnMarketwebSiteheaderLogin {
186
172
  },
187
173
  "attribute": "endpoint",
188
174
  "reflect": false,
189
- "defaultValue": "''"
175
+ "defaultValue": "\"\""
190
176
  },
191
177
  "token": {
192
178
  "type": "string",
@@ -204,7 +190,7 @@ export class PnMarketwebSiteheaderLogin {
204
190
  },
205
191
  "attribute": "token",
206
192
  "reflect": false,
207
- "defaultValue": "''"
193
+ "defaultValue": "\"\""
208
194
  },
209
195
  "i18n": {
210
196
  "type": "unknown",
@@ -225,7 +211,7 @@ export class PnMarketwebSiteheaderLogin {
225
211
  "tags": [],
226
212
  "text": ""
227
213
  },
228
- "defaultValue": "{\n searchlabel: '',\n searchplaceholder: '',\n searchbuttontext: '',\n menuHomeButton: '',\n menuGoBackButton: '',\n mainMenuButton: '',\n menuStartButton: '',\n profileSelectionFlyoutHeading: '',\n loginButtonText: '',\n loginPreamble: '',\n } as SiteHeaderI18N"
214
+ "defaultValue": "{ \"searchlabel\":\"\", \"searchplaceholder\":\"\", \"searchbuttontext\":\"\", \"menuHomeButton\": \"\", \"menuGoBackButton\": \"\", \"mainMenuButton\": \"\", \"menuStartButton\": \"\", \"profileSelectionFlyoutHeading\": \"\" } as SiteHeaderI18N"
229
215
  },
230
216
  "siteUrl": {
231
217
  "type": "string",
@@ -300,7 +286,7 @@ export class PnMarketwebSiteheaderLogin {
300
286
  },
301
287
  "attribute": "fullname",
302
288
  "reflect": false,
303
- "defaultValue": "''"
289
+ "defaultValue": "\"\""
304
290
  },
305
291
  "loggedin": {
306
292
  "type": "boolean",
@@ -355,23 +341,6 @@ export class PnMarketwebSiteheaderLogin {
355
341
  "attribute": "check-user-logged-in-state-interval",
356
342
  "reflect": false,
357
343
  "defaultValue": "0"
358
- },
359
- "environment": {
360
- "type": "string",
361
- "mutable": false,
362
- "complexType": {
363
- "original": "string",
364
- "resolved": "string",
365
- "references": {}
366
- },
367
- "required": false,
368
- "optional": true,
369
- "docs": {
370
- "tags": [],
371
- "text": ""
372
- },
373
- "attribute": "environment",
374
- "reflect": false
375
344
  }
376
345
  }; }
377
346
  static get states() { return {
@@ -87,29 +87,6 @@ pn-marketweb-siteheader .siteheader-row > pn-marketweb-siteheader-search {
87
87
  pn-marketweb-siteheader pn-spinner {
88
88
  display: none;
89
89
  }
90
- pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content {
91
- max-width: 350px;
92
- display: flex;
93
- flex-direction: column;
94
- gap: 2.4rem;
95
- padding: 4rem;
96
- }
97
- pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content pn-button {
98
- width: 100%;
99
- }
100
- pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content pn-marketweb-siteheader-login-links::before,
101
- pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content p::before {
102
- display: block;
103
- content: "";
104
- height: 2px;
105
- background: #F9F8F8;
106
- width: 100%;
107
- margin-bottom: 2.4rem;
108
- }
109
- pn-marketweb-siteheader pn-nav-dropdown .nav-dropdown-content-container .nav-dropdown-content p {
110
- font-size: 1.4rem;
111
- color: #005D92;
112
- }
113
90
  pn-marketweb-siteheader pn-nav-dropdown:not(.hydrated) .nav-dropdown-content-container {
114
91
  display: none;
115
92
  }
@@ -383,9 +360,6 @@ header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav
383
360
  background-color: #00A0D6;
384
361
  text-decoration: none;
385
362
  }
386
- header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-marketweb-siteheader-login-linklist ul li a {
387
- color: #005D92;
388
- }
389
363
  header[data-header-theme=dotcom] > pn-marketweb-siteheader > header [data-level="1"] pn-mainnav-link pn-icon.first-level_arrow svg > path {
390
364
  fill: #FFFFFF;
391
365
  }
@@ -1,7 +1,7 @@
1
- import { Component, Element, Event, h, Host, Listen, Prop, State, Watch } from '@stencil/core';
1
+ import { Component, Element, Event, h, Host, Listen, Prop, State, Watch, } from '@stencil/core';
2
2
  import { FetchHelper } from '../../../globals/FetchHelper';
3
3
  import { MarketWebContextService } from '../../../globals/MarketWebContextService';
4
- import { state as headerState } from './pn-marketweb-siteheader-store';
4
+ import { state as headerState } from "./pn-marketweb-siteheader-store";
5
5
  import { translations } from './translations';
6
6
  export class PnMarketwebSiteheader {
7
7
  constructor() {
@@ -367,7 +367,7 @@ export class PnMarketwebSiteheader {
367
367
  })),
368
368
  h("div", { slot: "footer", class: "siteheader-menu-footer" },
369
369
  h("slot", { name: "menu-footer-cta" }),
370
- this.gotData && this.loginDialog && !this.hideLogin && (h("pn-marketweb-siteheader-login", { emitEvents: false, siteUrl: this.siteDefinition.url, loginDialog: this.loginDialog, endpoint: this.endpoint, fullname: this.userFullname, loggedin: this.userLoggedin, i18n: this.i18n, showProfileSelection: this.showProfileSelection, environment: this.environment })),
370
+ this.gotData && this.loginDialog && !this.hideLogin && (h("pn-marketweb-siteheader-login", { emitEvents: false, siteUrl: this.siteDefinition.url, loginDialog: this.loginDialog, endpoint: this.endpoint, fullname: this.userFullname, loggedin: this.userLoggedin, i18n: this.i18n, showProfileSelection: this.showProfileSelection })),
371
371
  this.gotData && this.languageOptions && this.languageOptions.length && !this.hideLanguageSelector && (h("pn-language-selector", { value: this.language }, this.languageOptions.map(language => (h("pn-language-selector-option", { name: language.nativeName, code: language.twoLetterISOLanguageName, selected: language.isCurrent, url: this.getLanguageVersionUrl(language) }))))),
372
372
  !this.hideSiteSelector && (h("pn-site-selector", { language: this.language },
373
373
  this.gotData && ((_e = this.siteSelector) === null || _e === void 0 ? void 0 : _e.currentSiteTitle) && (h("pn-site-selector-item", { heading: this.siteSelector.currentSiteTitle, description: this.siteSelector.currentSiteDescription })),
@@ -380,7 +380,7 @@ const LoggedInTemplate = ({ ...args }) => {
380
380
  language="${args.language}"
381
381
  endpoint="${args.endpoint}"
382
382
  user-token="${args.token}"
383
- check-user-logged-in-state-interval="${args.checkUserLoggedInStateInterval + ''}"
383
+ check-user-logged-in-state-interval="${args.checkUserLoggedInStateInterval+''}"
384
384
  >
385
385
  </pn-marketweb-siteheader>
386
386
  </div>
@@ -477,7 +477,7 @@ DotComSiteHeader.args = {
477
477
  language: 'sv',
478
478
  endpoint: 'https://com-integration.postnord.com',
479
479
  name: 'DotCom User',
480
- loggedin: true,
480
+ loggedin: false,
481
481
  };
482
482
 
483
483
  const TPLSiteHeaderTemplate = ({ ...args }) => {
@@ -510,8 +510,8 @@ TPLSiteHeader.args = {
510
510
  hideHomeMenuItem: true,
511
511
  hideLanguageSelector: false,
512
512
  loggedin: false,
513
- buttonText: 'Kontrolltornet',
514
- placeholder: 'placeholder',
513
+ buttonText: "Kontrolltornet",
514
+ placeholder: "placeholder"
515
515
  };
516
516
 
517
517
  const ATLoginTestTemplate = ({ ...args }) => {
@@ -534,3 +534,4 @@ const ATLoginTestTemplate = ({ ...args }) => {
534
534
  </header>`;
535
535
  };
536
536
  export const ATLoginTest = ATLoginTestTemplate.bind({});
537
+
@@ -34,7 +34,7 @@ const weights = {
34
34
 
35
35
 
36
36
 
37
- const RealValues =
37
+ const RiktigaValues =
38
38
  {
39
39
  WebUrl: "https://riktigavykort.postnord.se/sv",
40
40
  AndroidAppUrl: "https://play.google.com/store/apps/details?id=se.posten.riktigavykort&hl=sv",
@@ -54,4 +54,4 @@ const stampShopUrl = "https://shop.postnord.se/ebutik/default.aspx";
54
54
  const productDescriptionUrl = "https://se-integration.postnord.com/skicka-forsandelser/brev-och-vykort/"
55
55
 
56
56
 
57
- export { weights, sizeCategories, fileLocation, sendDirectUrl, stampShopUrl, RealValues };
57
+ export { weights, sizeCategories, fileLocation, sendDirectUrl, stampShopUrl, RiktigaValues };
@@ -1,6 +1,6 @@
1
1
  import { Component, h, Prop, Host, Watch, State } from "@stencil/core";
2
2
  import { state } from "./pn-find-price-store";
3
- import { sendDirectUrl, stampShopUrl, RealValues } from "./data.js";
3
+ import { sendDirectUrl, stampShopUrl, RiktigaValues } from "./data.js";
4
4
  export class PnfindPriceResult {
5
5
  constructor() {
6
6
  this.item = null;
@@ -62,18 +62,18 @@ export class PnfindPriceResult {
62
62
  this.item.pricesenddirect ? (h("pn-product-card-price", { slot: "sendDirectPrice", label: state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: state.market.currency, url: sendDirectUrl, linkid: this.linkId + '-portal' })) : null,
63
63
  this.item.pricestamps ? ((this.item.name.toLocaleLowerCase() !== "riktiga vykort") ?
64
64
  (h("pn-product-card-price", { slot: "stampPrice", label: this.shopLabel, amount: this.item.pricestamps + '', currency: state.market.currency, url: this.shopUrl, linkid: this.linkId + this.shopId })) :
65
- (h("pn-product-card-price", { slot: "riktiga", label: state.i18n.realPostcard, amount: this.item.pricestamps + '', currency: state.market.currency, url: RealValues["WebUrl"], linkid: this.linkId + '-riktiga' }))) : null),
65
+ (h("pn-product-card-price", { slot: "riktiga", label: state.i18n.riktigaVykort, amount: this.item.pricestamps + '', currency: state.market.currency, url: RiktigaValues["WebUrl"], linkid: this.linkId + '-riktiga' }))) : null),
66
66
  h("div", { slot: "servicepoint" }, (this.item.showservicepointlink) ? (h("a", { href: state.market.servicePoint, target: "_blank" },
67
67
  h("pn-icon", { symbol: "map-marker", color: "blue700" }),
68
68
  state.i18n.servicePointLink)) : null),
69
69
  h("div", { slot: "mobiledownload" }, (this.item.name.toLocaleLowerCase() === "riktiga vykort") ?
70
70
  (h("div", { id: "riktiga" },
71
- h("h4", null, state.i18n.realPostcardMobile),
71
+ h("h4", null, state.i18n.riktigaVykortMobile),
72
72
  h("div", null,
73
- h("a", { href: RealValues["AndroidAppUrl"], target: "_blank" },
74
- h("img", { class: "riktigaAndroidImg", src: RealValues["AndroidImg"] })),
75
- h("a", { href: RealValues["IosAppUrl"], target: "_blank" },
76
- h("img", { class: "riktigaAppleImg", src: RealValues["IosImg"] }))))) : null))));
73
+ h("a", { href: RiktigaValues["AndroidAppUrl"], target: "_blank" },
74
+ h("img", { class: "riktigaAndroidImg", src: RiktigaValues["AndroidImg"] })),
75
+ h("a", { href: RiktigaValues["IosAppUrl"], target: "_blank" },
76
+ h("img", { class: "riktigaAppleImg", src: RiktigaValues["IosImg"] }))))) : null))));
77
77
  }
78
78
  static get is() { return "pn-find-price-result"; }
79
79
  static get originalStyleUrls() { return {
@@ -15,8 +15,8 @@ const { state, onChange } = createStore({
15
15
  message: '',
16
16
  servicePointHeader: '',
17
17
  servicePointLink: '',
18
- realPostcard: '',
19
- realPostcardMobile: '',
18
+ riktigaVykort: '',
19
+ riktigaVykortMobile: '',
20
20
  ombudHeader: ''
21
21
  },
22
22
  market: {
@@ -13,8 +13,8 @@ export const translations = {
13
13
  'message': '*Vid köp hos valfritt ombud',
14
14
  'servicePointHeader': 'Eller hitta närmaste serviceställe',
15
15
  'servicePointLink': 'Hitta Serviceställe',
16
- 'realPostcard': 'Köp Riktiga Vykort',
17
- 'realPostcardMobile': 'Ladda ner appen',
16
+ 'riktigaVykort': 'Köp Riktiga Vykort',
17
+ 'riktigaVykortMobile': 'Ladda ner appen',
18
18
  'ombudHeader': 'Köp via ombud'
19
19
  },
20
20
  'en': {
@@ -31,8 +31,8 @@ export const translations = {
31
31
  'message': 'When buying from any agent',
32
32
  'servicePointHeader': 'Find service point',
33
33
  'servicePointLink': 'Find service point',
34
- 'realPostcard': 'Buy Postcards',
35
- 'realPostcardMobile': 'Download the app',
34
+ 'riktigaVykort': 'Buy Postcards',
35
+ 'riktigaVykortMobile': 'Download the app',
36
36
  'ombudHeader': 'Purchase by agent'
37
37
  },
38
38
  'da': {
@@ -49,7 +49,7 @@ export const translations = {
49
49
  'message': 'When buying from any agent',
50
50
  'servicePointHeader': 'Find nærmeste servicested',
51
51
  'servicePointLink': 'Find nærmeste servicested',
52
- 'realPostcard': 'Køb Riktiga Vykort',
52
+ 'riktigaVykort': 'Køb Riktiga Vykort',
53
53
  'ombudHeader': 'Køb af agent'
54
54
  },
55
55
  'no': {
@@ -14,9 +14,6 @@ pn-proxio-pricegroup div.weightvaluecontainer {
14
14
  pn-proxio-pricegroup div.weightvaluecontainer pn-button {
15
15
  transform: translateY(-0.4rem);
16
16
  }
17
- pn-proxio-pricegroup div.weightvaluecontainer pn-button button::before {
18
- display: none;
19
- }
20
17
  pn-proxio-pricegroup div.weightradios {
21
18
  display: flex;
22
19
  flex-direction: row;
@@ -42,7 +42,6 @@ export class PnProxioPricegroup {
42
42
  }
43
43
  const endpoint = (this.endpoint.lastIndexOf("/") === this.endpoint.length - 1) ? this.endpoint.substring(0, this.endpoint.length - 1) : this.endpoint;
44
44
  const fetchUrl = `${endpoint}/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
45
- //const fetchUrl = `http://localhost:51444/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
46
45
  const data = await this.fetchHelper.fetchJson(fetchUrl, {
47
46
  'mode': 'cors',
48
47
  }, this.cache, this.onFetchData.bind(this));
@@ -332,7 +332,7 @@ class MarketWebLoginManager {
332
332
  getBaseUrl() {
333
333
  const atEnvironments = ["localhost", "integration.", 'local.'];
334
334
  let useATEnv = atEnvironments.filter(x => this.endpoint.indexOf(x) !== -1).length > 0;
335
- if (['devportal.postnord.com', 'atportal.postnord.com'].indexOf(window.location.hostname) !== -1) {
335
+ if (window.location.hostname.indexOf('atportal.postnord.com') === 0) {
336
336
  useATEnv = true;
337
337
  }
338
338
  if (useATEnv) {
@@ -152,12 +152,6 @@ export const PnMarketwebSiteheaderLogin: {
152
152
  new (): PnMarketwebSiteheaderLogin;
153
153
  };
154
154
 
155
- interface PnMarketwebSiteheaderLoginButton extends Components.PnMarketwebSiteheaderLoginButton, HTMLElement {}
156
- export const PnMarketwebSiteheaderLoginButton: {
157
- prototype: PnMarketwebSiteheaderLoginButton;
158
- new (): PnMarketwebSiteheaderLoginButton;
159
- };
160
-
161
155
  interface PnMarketwebSiteheaderLoginLinklist extends Components.PnMarketwebSiteheaderLoginLinklist, HTMLElement {}
162
156
  export const PnMarketwebSiteheaderLoginLinklist: {
163
157
  prototype: PnMarketwebSiteheaderLoginLinklist;
@@ -170,12 +164,6 @@ export const PnMarketwebSiteheaderLoginLinks: {
170
164
  new (): PnMarketwebSiteheaderLoginLinks;
171
165
  };
172
166
 
173
- interface PnMarketwebSiteheaderLoginMypageButton extends Components.PnMarketwebSiteheaderLoginMypageButton, HTMLElement {}
174
- export const PnMarketwebSiteheaderLoginMypageButton: {
175
- prototype: PnMarketwebSiteheaderLoginMypageButton;
176
- new (): PnMarketwebSiteheaderLoginMypageButton;
177
- };
178
-
179
167
  interface PnMarketwebSiteheaderLoginProfileselection extends Components.PnMarketwebSiteheaderLoginProfileselection, HTMLElement {}
180
168
  export const PnMarketwebSiteheaderLoginProfileselection: {
181
169
  prototype: PnMarketwebSiteheaderLoginProfileselection;
@@ -284,18 +272,6 @@ export const PnProfileSelectorOption: {
284
272
  new (): PnProfileSelectorOption;
285
273
  };
286
274
 
287
- interface PnProxioFindprice extends Components.PnProxioFindprice, HTMLElement {}
288
- export const PnProxioFindprice: {
289
- prototype: PnProxioFindprice;
290
- new (): PnProxioFindprice;
291
- };
292
-
293
- interface PnProxioFindpriceResult extends Components.PnProxioFindpriceResult, HTMLElement {}
294
- export const PnProxioFindpriceResult: {
295
- prototype: PnProxioFindpriceResult;
296
- new (): PnProxioFindpriceResult;
297
- };
298
-
299
275
  interface PnProxioPricegroup extends Components.PnProxioPricegroup, HTMLElement {}
300
276
  export const PnProxioPricegroup: {
301
277
  prototype: PnProxioPricegroup;