@swisspost/internet-header 1.15.5 → 1.15.7

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 (38) hide show
  1. package/dist/cjs/index.cjs.js +2 -2
  2. package/dist/cjs/{klp-widget.controller-14bfba32.js → klp-widget.controller-0fcd9b93.js} +6 -90
  3. package/dist/cjs/{post-internet-header-322a9daf.js → post-internet-header-e598e8aa.js} +2 -2
  4. package/dist/cjs/{post-klp-login-widget-7ef3951b.js → post-klp-login-widget-55d445ca.js} +1 -1
  5. package/dist/cjs/post-klp-login-widget.cjs.entry.js +1 -1
  6. package/dist/cjs/swisspost-internet-header.cjs.entry.js +1 -1
  7. package/dist/collection/assets/js/klp-login-widget.js +6 -90
  8. package/dist/components/klp-widget.controller.js +6 -90
  9. package/dist/components/swisspost-internet-header.js +2 -2
  10. package/dist/docs.json +1 -1
  11. package/dist/esm/index.js +2 -2
  12. package/dist/esm/{klp-widget.controller-b101390d.js → klp-widget.controller-923655c6.js} +6 -90
  13. package/dist/esm/{post-internet-header-6c14d5da.js → post-internet-header-4458a028.js} +2 -2
  14. package/dist/esm/{post-klp-login-widget-9eee8a0f.js → post-klp-login-widget-c2d438ef.js} +1 -1
  15. package/dist/esm/post-klp-login-widget.entry.js +1 -1
  16. package/dist/esm/swisspost-internet-header.entry.js +1 -1
  17. package/dist/esm-es5/index.js +1 -1
  18. package/dist/esm-es5/{klp-widget.controller-b101390d.js → klp-widget.controller-923655c6.js} +1 -1
  19. package/dist/esm-es5/{post-internet-header-6c14d5da.js → post-internet-header-4458a028.js} +1 -1
  20. package/dist/esm-es5/{post-klp-login-widget-9eee8a0f.js → post-klp-login-widget-c2d438ef.js} +1 -1
  21. package/dist/esm-es5/post-klp-login-widget.entry.js +1 -1
  22. package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
  23. package/dist/swisspost-internet-header/index.esm.js +1 -1
  24. package/dist/swisspost-internet-header/{p-28543187.system.js → p-0eb7ba2b.system.js} +1 -1
  25. package/dist/swisspost-internet-header/{p-c7bbc2e7.system.js → p-40f16d41.system.js} +1 -1
  26. package/dist/swisspost-internet-header/{p-49021214.js → p-4e88559b.js} +1 -1
  27. package/dist/swisspost-internet-header/{p-8be43d4a.js → p-5e977438.js} +1 -1
  28. package/dist/swisspost-internet-header/{p-2adebad1.system.entry.js → p-610e776d.system.entry.js} +1 -1
  29. package/dist/swisspost-internet-header/p-695fe962.system.js +1 -1
  30. package/dist/swisspost-internet-header/p-7e19f0a4.entry.js +1 -0
  31. package/dist/swisspost-internet-header/{p-fbfedf80.entry.js → p-87b6aebd.entry.js} +1 -1
  32. package/dist/swisspost-internet-header/{p-92490846.system.js → p-d459523a.system.js} +1 -1
  33. package/dist/swisspost-internet-header/{p-c0302ebd.system.entry.js → p-d6f48ad5.system.entry.js} +1 -1
  34. package/dist/swisspost-internet-header/{p-525bd03e.system.js → p-e2cbb027.system.js} +1 -1
  35. package/dist/swisspost-internet-header/{p-8599504c.js → p-e6247215.js} +1 -1
  36. package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
  37. package/package.json +2 -2
  38. package/dist/swisspost-internet-header/p-a50e0dc1.entry.js +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postInternetHeader = require('./post-internet-header-322a9daf.js');
5
+ const postInternetHeader = require('./post-internet-header-e598e8aa.js');
6
6
  const postInternetBreadcrumbs = require('./post-internet-breadcrumbs-ba6c9c31.js');
7
7
  const postInternetFooter = require('./post-internet-footer-69042a11.js');
8
8
  const postSkiplinks = require('./post-skiplinks-894eb1ca.js');
@@ -11,7 +11,7 @@ const postLanguageSwitch = require('./post-language-switch-f5f3d5bf.js');
11
11
  const postLogo = require('./post-logo-bcf3b0a3.js');
12
12
  const postMainNavigation = require('./post-main-navigation-c228865d.js');
13
13
  const postSearch = require('./post-search-b188f1a0.js');
14
- const postKlpLoginWidget = require('./post-klp-login-widget-7ef3951b.js');
14
+ const postKlpLoginWidget = require('./post-klp-login-widget-55d445ca.js');
15
15
  require('./index-ecd8c9bb.js');
16
16
  require('./index-fbcc9ff3.js');
17
17
  require('./language.service-2a3c77d1.js');
@@ -14505,60 +14505,16 @@ const vertx = window.vertx || {};
14505
14505
  isUserActive = true;
14506
14506
  }
14507
14507
 
14508
- function restoreState() {
14509
- const state = loadPersistedState();
14510
- if (state) {
14511
- address = state.address;
14512
- retrySubscribeOnFail = true;
14513
- sessionData = state.sessionData;
14514
- renderWidget();
14515
- if (isCurrentLocationPostCh()) {
14516
- renderNotificationsWidget(loadDocumentFromCache(documentUnreadNotifications));
14517
- }
14518
- }
14519
- }
14520
-
14521
- function loadPersistedState() {
14522
- if (isHTML5StorageSupported()) {
14523
- const persistedState = sessionStorage.getItem(persistedStateKey);
14524
- if (persistedState) {
14525
- try {
14526
- const state = JSON.parse(persistedState);
14527
- if (state.ttl > new Date().getTime() && isPersistedStateValid(state.sessionData)) {
14528
- log('Valid persisted state loaded: ' + persistedState);
14529
- return state;
14530
- } else {
14531
- log('Persisted state expired or invalid');
14532
- removePersistedState();
14533
- setControlCookie('all', 'sub');
14534
- }
14535
- } catch (err) {
14536
- log("Persisted state was invalid due to error '" + err + "'");
14537
- removePersistedState();
14538
- setControlCookie('all', 'sub');
14539
- }
14540
- } else {
14541
- log('No persisted state found');
14542
- removePersistedState();
14543
- setControlCookie('all', 'sub');
14544
- }
14545
- } else {
14546
- log('State not loaded because HTML storage not supported');
14547
- }
14548
- return null;
14549
- }
14550
-
14551
14508
  function persistState(ttl) {
14552
14509
  if (isHTML5StorageSupported()) {
14553
14510
  sessionStorage.setItem(
14554
14511
  persistedStateKey,
14555
- '{"ttl": ' +
14556
- (new Date().getTime() + ttl) +
14557
- ',"sessionData": ' +
14558
- JSON.stringify(sessionData) +
14559
- ', "address":"' +
14560
- address +
14561
- '"}',
14512
+ JSON.stringify({
14513
+ ttl: new Date().getTime() + ttl,
14514
+ sessionData:
14515
+ "If you're looking for this info, contact the Swiss Post Design System Team!",
14516
+ address: "If you're looking for this info, contact the Swiss Post Design System Team!",
14517
+ }),
14562
14518
  );
14563
14519
  log('State persisted');
14564
14520
  setControlCookie('hash', encodeURIComponent(hash(sessionData)));
@@ -14577,32 +14533,6 @@ const vertx = window.vertx || {};
14577
14533
  }
14578
14534
  }
14579
14535
 
14580
- function isPersistedStateValid(persistedData) {
14581
- const hashPersistedData = hash(persistedData).toString();
14582
- const hashCookie = getControlCookieVal('hash');
14583
- if (hashPersistedData === hashCookie) {
14584
- return true;
14585
- }
14586
- if (hashCookie === undefined && !isCurrentLocationPostCh()) {
14587
- log(
14588
- 'Cache validated because on a different host=[' +
14589
- window.location.hostname +
14590
- '] than control cookie domain=[' +
14591
- controlCookieDomain +
14592
- ']',
14593
- );
14594
- return true;
14595
- }
14596
- log(
14597
- 'PersistedData are invalid [hashPersistedData=' +
14598
- hashPersistedData +
14599
- ',control cookie=' +
14600
- hashCookie +
14601
- ']',
14602
- );
14603
- return false;
14604
- }
14605
-
14606
14536
  function isCurrentLocationPostCh() {
14607
14537
  return controlCookieDomainRegEx.test(window.location.hostname);
14608
14538
  }
@@ -14700,19 +14630,6 @@ const vertx = window.vertx || {};
14700
14630
  }
14701
14631
  }
14702
14632
 
14703
- function loadDocumentFromCache(documentType) {
14704
- const persistedKey = persistedDocumentPrefix + documentType;
14705
- if (isHTML5StorageSupported()) {
14706
- const persistedDocument = sessionStorage.getItem(persistedKey);
14707
- if (persistedDocument) {
14708
- const document = $.parseJSON(persistedDocument);
14709
- log('Document ' + documentType + ' has been read from cache with value ' + document);
14710
- return document;
14711
- }
14712
- }
14713
- return null;
14714
- }
14715
-
14716
14633
  function saveDocumentOnCache(document, documentType) {
14717
14634
  const key = persistedDocumentPrefix + documentType;
14718
14635
  if (isHTML5StorageSupported()) {
@@ -15372,7 +15289,6 @@ const vertx = window.vertx || {};
15372
15289
  }
15373
15290
 
15374
15291
  function init() {
15375
- restoreState();
15376
15292
  subscribe();
15377
15293
  if (conf.keepAliveOnInit && isUserAuthenticated()) {
15378
15294
  keepAliveSessionsOnInit();
@@ -368,7 +368,7 @@ const setMainNavigationIds = (navMainEntities) => {
368
368
  };
369
369
 
370
370
  const name = "@swisspost/internet-header";
371
- const version = "1.15.5";
371
+ const version = "1.15.7";
372
372
  const description = "The header for client facing applications.";
373
373
  const author = "Swiss Post <design-system@post.ch>";
374
374
  const license = "Apache-2.0";
@@ -409,7 +409,7 @@ const scripts = {
409
409
  generate: "stencil generate"
410
410
  };
411
411
  const dependencies = {
412
- "@swisspost/design-system-styles": "workspace:8.7.1",
412
+ "@swisspost/design-system-styles": "workspace:8.8.1",
413
413
  "body-scroll-lock": "4.0.0-beta.0",
414
414
  "iframe-resizer": "4.4.5",
415
415
  jquery: "3.7.1",
@@ -30,7 +30,7 @@ const PostKlpLoginWidget = class {
30
30
  if (((_b = (_a = store.state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.showJobsLoginWidget) ||
31
31
  !((_d = (_c = store.state.localizedConfig) === null || _c === void 0 ? void 0 : _c.header) === null || _d === void 0 ? void 0 : _d.loginWidgetOptions))
32
32
  return;
33
- const { initializeKLPLoginWidget } = await Promise.resolve().then(function () { return require('./klp-widget.controller-14bfba32.js'); });
33
+ const { initializeKLPLoginWidget } = await Promise.resolve().then(function () { return require('./klp-widget.controller-0fcd9b93.js'); });
34
34
  const _e = store.state.localizedConfig.header.loginWidgetOptions, { platform } = _e, widgetOptions = __rest(_e, ["platform"]);
35
35
  initializeKLPLoginWidget('post-klp-login-widget', Object.assign(Object.assign(Object.assign({}, widgetOptions), { environment: store.state.environment }), (this.logoutUrl !== undefined
36
36
  ? { platform: Object.assign(Object.assign({}, platform), { logoutURL: this.logoutUrl }) }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postKlpLoginWidget = require('./post-klp-login-widget-7ef3951b.js');
5
+ const postKlpLoginWidget = require('./post-klp-login-widget-55d445ca.js');
6
6
  require('./index-ecd8c9bb.js');
7
7
  require('./store-eabc7f7a.js');
8
8
  require('./svg-sprite.component-440522a9.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const postInternetHeader = require('./post-internet-header-322a9daf.js');
5
+ const postInternetHeader = require('./post-internet-header-e598e8aa.js');
6
6
  require('./index-ecd8c9bb.js');
7
7
  require('./index-fbcc9ff3.js');
8
8
  require('./language.service-2a3c77d1.js');
@@ -650,60 +650,16 @@ const vertx = window.vertx || {};
650
650
  isUserActive = true;
651
651
  }
652
652
 
653
- function restoreState() {
654
- const state = loadPersistedState();
655
- if (state) {
656
- address = state.address;
657
- retrySubscribeOnFail = true;
658
- sessionData = state.sessionData;
659
- renderWidget();
660
- if (isCurrentLocationPostCh()) {
661
- renderNotificationsWidget(loadDocumentFromCache(documentUnreadNotifications));
662
- }
663
- }
664
- }
665
-
666
- function loadPersistedState() {
667
- if (isHTML5StorageSupported()) {
668
- const persistedState = sessionStorage.getItem(persistedStateKey);
669
- if (persistedState) {
670
- try {
671
- const state = JSON.parse(persistedState);
672
- if (state.ttl > new Date().getTime() && isPersistedStateValid(state.sessionData)) {
673
- log('Valid persisted state loaded: ' + persistedState);
674
- return state;
675
- } else {
676
- log('Persisted state expired or invalid');
677
- removePersistedState();
678
- setControlCookie('all', 'sub');
679
- }
680
- } catch (err) {
681
- log("Persisted state was invalid due to error '" + err + "'");
682
- removePersistedState();
683
- setControlCookie('all', 'sub');
684
- }
685
- } else {
686
- log('No persisted state found');
687
- removePersistedState();
688
- setControlCookie('all', 'sub');
689
- }
690
- } else {
691
- log('State not loaded because HTML storage not supported');
692
- }
693
- return null;
694
- }
695
-
696
653
  function persistState(ttl) {
697
654
  if (isHTML5StorageSupported()) {
698
655
  sessionStorage.setItem(
699
656
  persistedStateKey,
700
- '{"ttl": ' +
701
- (new Date().getTime() + ttl) +
702
- ',"sessionData": ' +
703
- JSON.stringify(sessionData) +
704
- ', "address":"' +
705
- address +
706
- '"}',
657
+ JSON.stringify({
658
+ ttl: new Date().getTime() + ttl,
659
+ sessionData:
660
+ "If you're looking for this info, contact the Swiss Post Design System Team!",
661
+ address: "If you're looking for this info, contact the Swiss Post Design System Team!",
662
+ }),
707
663
  );
708
664
  log('State persisted');
709
665
  setControlCookie('hash', encodeURIComponent(hash(sessionData)));
@@ -722,32 +678,6 @@ const vertx = window.vertx || {};
722
678
  }
723
679
  }
724
680
 
725
- function isPersistedStateValid(persistedData) {
726
- const hashPersistedData = hash(persistedData).toString();
727
- const hashCookie = getControlCookieVal('hash');
728
- if (hashPersistedData === hashCookie) {
729
- return true;
730
- }
731
- if (hashCookie === undefined && !isCurrentLocationPostCh()) {
732
- log(
733
- 'Cache validated because on a different host=[' +
734
- window.location.hostname +
735
- '] than control cookie domain=[' +
736
- controlCookieDomain +
737
- ']',
738
- );
739
- return true;
740
- }
741
- log(
742
- 'PersistedData are invalid [hashPersistedData=' +
743
- hashPersistedData +
744
- ',control cookie=' +
745
- hashCookie +
746
- ']',
747
- );
748
- return false;
749
- }
750
-
751
681
  function isCurrentLocationPostCh() {
752
682
  return controlCookieDomainRegEx.test(window.location.hostname);
753
683
  }
@@ -845,19 +775,6 @@ const vertx = window.vertx || {};
845
775
  }
846
776
  }
847
777
 
848
- function loadDocumentFromCache(documentType) {
849
- const persistedKey = persistedDocumentPrefix + documentType;
850
- if (isHTML5StorageSupported()) {
851
- const persistedDocument = sessionStorage.getItem(persistedKey);
852
- if (persistedDocument) {
853
- const document = $.parseJSON(persistedDocument);
854
- log('Document ' + documentType + ' has been read from cache with value ' + document);
855
- return document;
856
- }
857
- }
858
- return null;
859
- }
860
-
861
778
  function saveDocumentOnCache(document, documentType) {
862
779
  const key = persistedDocumentPrefix + documentType;
863
780
  if (isHTML5StorageSupported()) {
@@ -1517,7 +1434,6 @@ const vertx = window.vertx || {};
1517
1434
  }
1518
1435
 
1519
1436
  function init() {
1520
- restoreState();
1521
1437
  subscribe();
1522
1438
  if (conf.keepAliveOnInit && isUserAuthenticated()) {
1523
1439
  keepAliveSessionsOnInit();
@@ -14503,60 +14503,16 @@ const vertx = window.vertx || {};
14503
14503
  isUserActive = true;
14504
14504
  }
14505
14505
 
14506
- function restoreState() {
14507
- const state = loadPersistedState();
14508
- if (state) {
14509
- address = state.address;
14510
- retrySubscribeOnFail = true;
14511
- sessionData = state.sessionData;
14512
- renderWidget();
14513
- if (isCurrentLocationPostCh()) {
14514
- renderNotificationsWidget(loadDocumentFromCache(documentUnreadNotifications));
14515
- }
14516
- }
14517
- }
14518
-
14519
- function loadPersistedState() {
14520
- if (isHTML5StorageSupported()) {
14521
- const persistedState = sessionStorage.getItem(persistedStateKey);
14522
- if (persistedState) {
14523
- try {
14524
- const state = JSON.parse(persistedState);
14525
- if (state.ttl > new Date().getTime() && isPersistedStateValid(state.sessionData)) {
14526
- log('Valid persisted state loaded: ' + persistedState);
14527
- return state;
14528
- } else {
14529
- log('Persisted state expired or invalid');
14530
- removePersistedState();
14531
- setControlCookie('all', 'sub');
14532
- }
14533
- } catch (err) {
14534
- log("Persisted state was invalid due to error '" + err + "'");
14535
- removePersistedState();
14536
- setControlCookie('all', 'sub');
14537
- }
14538
- } else {
14539
- log('No persisted state found');
14540
- removePersistedState();
14541
- setControlCookie('all', 'sub');
14542
- }
14543
- } else {
14544
- log('State not loaded because HTML storage not supported');
14545
- }
14546
- return null;
14547
- }
14548
-
14549
14506
  function persistState(ttl) {
14550
14507
  if (isHTML5StorageSupported()) {
14551
14508
  sessionStorage.setItem(
14552
14509
  persistedStateKey,
14553
- '{"ttl": ' +
14554
- (new Date().getTime() + ttl) +
14555
- ',"sessionData": ' +
14556
- JSON.stringify(sessionData) +
14557
- ', "address":"' +
14558
- address +
14559
- '"}',
14510
+ JSON.stringify({
14511
+ ttl: new Date().getTime() + ttl,
14512
+ sessionData:
14513
+ "If you're looking for this info, contact the Swiss Post Design System Team!",
14514
+ address: "If you're looking for this info, contact the Swiss Post Design System Team!",
14515
+ }),
14560
14516
  );
14561
14517
  log('State persisted');
14562
14518
  setControlCookie('hash', encodeURIComponent(hash(sessionData)));
@@ -14575,32 +14531,6 @@ const vertx = window.vertx || {};
14575
14531
  }
14576
14532
  }
14577
14533
 
14578
- function isPersistedStateValid(persistedData) {
14579
- const hashPersistedData = hash(persistedData).toString();
14580
- const hashCookie = getControlCookieVal('hash');
14581
- if (hashPersistedData === hashCookie) {
14582
- return true;
14583
- }
14584
- if (hashCookie === undefined && !isCurrentLocationPostCh()) {
14585
- log(
14586
- 'Cache validated because on a different host=[' +
14587
- window.location.hostname +
14588
- '] than control cookie domain=[' +
14589
- controlCookieDomain +
14590
- ']',
14591
- );
14592
- return true;
14593
- }
14594
- log(
14595
- 'PersistedData are invalid [hashPersistedData=' +
14596
- hashPersistedData +
14597
- ',control cookie=' +
14598
- hashCookie +
14599
- ']',
14600
- );
14601
- return false;
14602
- }
14603
-
14604
14534
  function isCurrentLocationPostCh() {
14605
14535
  return controlCookieDomainRegEx.test(window.location.hostname);
14606
14536
  }
@@ -14698,19 +14628,6 @@ const vertx = window.vertx || {};
14698
14628
  }
14699
14629
  }
14700
14630
 
14701
- function loadDocumentFromCache(documentType) {
14702
- const persistedKey = persistedDocumentPrefix + documentType;
14703
- if (isHTML5StorageSupported()) {
14704
- const persistedDocument = sessionStorage.getItem(persistedKey);
14705
- if (persistedDocument) {
14706
- const document = $.parseJSON(persistedDocument);
14707
- log('Document ' + documentType + ' has been read from cache with value ' + document);
14708
- return document;
14709
- }
14710
- }
14711
- return null;
14712
- }
14713
-
14714
14631
  function saveDocumentOnCache(document, documentType) {
14715
14632
  const key = persistedDocumentPrefix + documentType;
14716
14633
  if (isHTML5StorageSupported()) {
@@ -15370,7 +15287,6 @@ const vertx = window.vertx || {};
15370
15287
  }
15371
15288
 
15372
15289
  function init() {
15373
- restoreState();
15374
15290
  subscribe();
15375
15291
  if (conf.keepAliveOnInit && isUserAuthenticated()) {
15376
15292
  keepAliveSessionsOnInit();
@@ -373,7 +373,7 @@ const setMainNavigationIds = (navMainEntities) => {
373
373
  };
374
374
 
375
375
  const name = "@swisspost/internet-header";
376
- const version = "1.15.5";
376
+ const version = "1.15.7";
377
377
  const description = "The header for client facing applications.";
378
378
  const author = "Swiss Post <design-system@post.ch>";
379
379
  const license = "Apache-2.0";
@@ -414,7 +414,7 @@ const scripts = {
414
414
  generate: "stencil generate"
415
415
  };
416
416
  const dependencies = {
417
- "@swisspost/design-system-styles": "workspace:8.7.1",
417
+ "@swisspost/design-system-styles": "workspace:8.8.1",
418
418
  "body-scroll-lock": "4.0.0-beta.0",
419
419
  "iframe-resizer": "4.4.5",
420
420
  jquery: "3.7.1",
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-01-20T12:20:18",
2
+ "timestamp": "2025-02-03T13:51:51",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.19.2",
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { P as PostInternetHeader } from './post-internet-header-6c14d5da.js';
1
+ export { P as PostInternetHeader } from './post-internet-header-4458a028.js';
2
2
  export { P as PostInternetBreadcrumbs } from './post-internet-breadcrumbs-853096c4.js';
3
3
  export { P as PostInternetFooter } from './post-internet-footer-3a7024bf.js';
4
4
  export { P as PostSkiplinks } from './post-skiplinks-8c64cda3.js';
@@ -7,7 +7,7 @@ export { P as PostLanguageSwitch } from './post-language-switch-c6015c5b.js';
7
7
  export { P as PostLogo } from './post-logo-ca6f588b.js';
8
8
  export { P as PostMainNavigation } from './post-main-navigation-605861c5.js';
9
9
  export { P as PostSearch } from './post-search-5ebe2715.js';
10
- export { P as PostKlpLoginWidget } from './post-klp-login-widget-9eee8a0f.js';
10
+ export { P as PostKlpLoginWidget } from './post-klp-login-widget-c2d438ef.js';
11
11
  import './index-bb0e68fd.js';
12
12
  import './index-d3f1363d.js';
13
13
  import './language.service-490983de.js';
@@ -14503,60 +14503,16 @@ const vertx = window.vertx || {};
14503
14503
  isUserActive = true;
14504
14504
  }
14505
14505
 
14506
- function restoreState() {
14507
- const state = loadPersistedState();
14508
- if (state) {
14509
- address = state.address;
14510
- retrySubscribeOnFail = true;
14511
- sessionData = state.sessionData;
14512
- renderWidget();
14513
- if (isCurrentLocationPostCh()) {
14514
- renderNotificationsWidget(loadDocumentFromCache(documentUnreadNotifications));
14515
- }
14516
- }
14517
- }
14518
-
14519
- function loadPersistedState() {
14520
- if (isHTML5StorageSupported()) {
14521
- const persistedState = sessionStorage.getItem(persistedStateKey);
14522
- if (persistedState) {
14523
- try {
14524
- const state = JSON.parse(persistedState);
14525
- if (state.ttl > new Date().getTime() && isPersistedStateValid(state.sessionData)) {
14526
- log('Valid persisted state loaded: ' + persistedState);
14527
- return state;
14528
- } else {
14529
- log('Persisted state expired or invalid');
14530
- removePersistedState();
14531
- setControlCookie('all', 'sub');
14532
- }
14533
- } catch (err) {
14534
- log("Persisted state was invalid due to error '" + err + "'");
14535
- removePersistedState();
14536
- setControlCookie('all', 'sub');
14537
- }
14538
- } else {
14539
- log('No persisted state found');
14540
- removePersistedState();
14541
- setControlCookie('all', 'sub');
14542
- }
14543
- } else {
14544
- log('State not loaded because HTML storage not supported');
14545
- }
14546
- return null;
14547
- }
14548
-
14549
14506
  function persistState(ttl) {
14550
14507
  if (isHTML5StorageSupported()) {
14551
14508
  sessionStorage.setItem(
14552
14509
  persistedStateKey,
14553
- '{"ttl": ' +
14554
- (new Date().getTime() + ttl) +
14555
- ',"sessionData": ' +
14556
- JSON.stringify(sessionData) +
14557
- ', "address":"' +
14558
- address +
14559
- '"}',
14510
+ JSON.stringify({
14511
+ ttl: new Date().getTime() + ttl,
14512
+ sessionData:
14513
+ "If you're looking for this info, contact the Swiss Post Design System Team!",
14514
+ address: "If you're looking for this info, contact the Swiss Post Design System Team!",
14515
+ }),
14560
14516
  );
14561
14517
  log('State persisted');
14562
14518
  setControlCookie('hash', encodeURIComponent(hash(sessionData)));
@@ -14575,32 +14531,6 @@ const vertx = window.vertx || {};
14575
14531
  }
14576
14532
  }
14577
14533
 
14578
- function isPersistedStateValid(persistedData) {
14579
- const hashPersistedData = hash(persistedData).toString();
14580
- const hashCookie = getControlCookieVal('hash');
14581
- if (hashPersistedData === hashCookie) {
14582
- return true;
14583
- }
14584
- if (hashCookie === undefined && !isCurrentLocationPostCh()) {
14585
- log(
14586
- 'Cache validated because on a different host=[' +
14587
- window.location.hostname +
14588
- '] than control cookie domain=[' +
14589
- controlCookieDomain +
14590
- ']',
14591
- );
14592
- return true;
14593
- }
14594
- log(
14595
- 'PersistedData are invalid [hashPersistedData=' +
14596
- hashPersistedData +
14597
- ',control cookie=' +
14598
- hashCookie +
14599
- ']',
14600
- );
14601
- return false;
14602
- }
14603
-
14604
14534
  function isCurrentLocationPostCh() {
14605
14535
  return controlCookieDomainRegEx.test(window.location.hostname);
14606
14536
  }
@@ -14698,19 +14628,6 @@ const vertx = window.vertx || {};
14698
14628
  }
14699
14629
  }
14700
14630
 
14701
- function loadDocumentFromCache(documentType) {
14702
- const persistedKey = persistedDocumentPrefix + documentType;
14703
- if (isHTML5StorageSupported()) {
14704
- const persistedDocument = sessionStorage.getItem(persistedKey);
14705
- if (persistedDocument) {
14706
- const document = $.parseJSON(persistedDocument);
14707
- log('Document ' + documentType + ' has been read from cache with value ' + document);
14708
- return document;
14709
- }
14710
- }
14711
- return null;
14712
- }
14713
-
14714
14631
  function saveDocumentOnCache(document, documentType) {
14715
14632
  const key = persistedDocumentPrefix + documentType;
14716
14633
  if (isHTML5StorageSupported()) {
@@ -15370,7 +15287,6 @@ const vertx = window.vertx || {};
15370
15287
  }
15371
15288
 
15372
15289
  function init() {
15373
- restoreState();
15374
15290
  subscribe();
15375
15291
  if (conf.keepAliveOnInit && isUserAuthenticated()) {
15376
15292
  keepAliveSessionsOnInit();
@@ -366,7 +366,7 @@ const setMainNavigationIds = (navMainEntities) => {
366
366
  };
367
367
 
368
368
  const name = "@swisspost/internet-header";
369
- const version = "1.15.5";
369
+ const version = "1.15.7";
370
370
  const description = "The header for client facing applications.";
371
371
  const author = "Swiss Post <design-system@post.ch>";
372
372
  const license = "Apache-2.0";
@@ -407,7 +407,7 @@ const scripts = {
407
407
  generate: "stencil generate"
408
408
  };
409
409
  const dependencies = {
410
- "@swisspost/design-system-styles": "workspace:8.7.1",
410
+ "@swisspost/design-system-styles": "workspace:8.8.1",
411
411
  "body-scroll-lock": "4.0.0-beta.0",
412
412
  "iframe-resizer": "4.4.5",
413
413
  jquery: "3.7.1",
@@ -28,7 +28,7 @@ const PostKlpLoginWidget = class {
28
28
  if (((_b = (_a = state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.showJobsLoginWidget) ||
29
29
  !((_d = (_c = state.localizedConfig) === null || _c === void 0 ? void 0 : _c.header) === null || _d === void 0 ? void 0 : _d.loginWidgetOptions))
30
30
  return;
31
- const { initializeKLPLoginWidget } = await import('./klp-widget.controller-b101390d.js');
31
+ const { initializeKLPLoginWidget } = await import('./klp-widget.controller-923655c6.js');
32
32
  const _e = state.localizedConfig.header.loginWidgetOptions, { platform } = _e, widgetOptions = __rest(_e, ["platform"]);
33
33
  initializeKLPLoginWidget('post-klp-login-widget', Object.assign(Object.assign(Object.assign({}, widgetOptions), { environment: state.environment }), (this.logoutUrl !== undefined
34
34
  ? { platform: Object.assign(Object.assign({}, platform), { logoutURL: this.logoutUrl }) }
@@ -1,4 +1,4 @@
1
- export { P as post_klp_login_widget } from './post-klp-login-widget-9eee8a0f.js';
1
+ export { P as post_klp_login_widget } from './post-klp-login-widget-c2d438ef.js';
2
2
  import './index-bb0e68fd.js';
3
3
  import './store-b1332c1e.js';
4
4
  import './svg-sprite.component-d3726867.js';
@@ -1,4 +1,4 @@
1
- export { P as swisspost_internet_header } from './post-internet-header-6c14d5da.js';
1
+ export { P as swisspost_internet_header } from './post-internet-header-4458a028.js';
2
2
  import './index-bb0e68fd.js';
3
3
  import './index-d3f1363d.js';
4
4
  import './language.service-490983de.js';
@@ -1 +1 @@
1
- export{P as PostInternetHeader}from"./post-internet-header-6c14d5da.js";export{P as PostInternetBreadcrumbs}from"./post-internet-breadcrumbs-853096c4.js";export{P as PostInternetFooter}from"./post-internet-footer-3a7024bf.js";export{P as PostSkiplinks}from"./post-skiplinks-8c64cda3.js";export{P as PostMetaNavigation}from"./post-meta-navigation-f2660b07.js";export{P as PostLanguageSwitch}from"./post-language-switch-c6015c5b.js";export{P as PostLogo}from"./post-logo-ca6f588b.js";export{P as PostMainNavigation}from"./post-main-navigation-605861c5.js";export{P as PostSearch}from"./post-search-5ebe2715.js";export{P as PostKlpLoginWidget}from"./post-klp-login-widget-9eee8a0f.js";import"./index-bb0e68fd.js";import"./index-d3f1363d.js";import"./language.service-490983de.js";import"./store-b1332c1e.js";import"./utils-c8805f81.js";import"./svg-sprite.component-d3726867.js";import"./svg-icon.component-70692acc.js";import"./if.component-d88d9e48.js";import"./bodyScrollLock.esm-afcc00e3.js";import"./ui.service-22f2c593.js";
1
+ export{P as PostInternetHeader}from"./post-internet-header-4458a028.js";export{P as PostInternetBreadcrumbs}from"./post-internet-breadcrumbs-853096c4.js";export{P as PostInternetFooter}from"./post-internet-footer-3a7024bf.js";export{P as PostSkiplinks}from"./post-skiplinks-8c64cda3.js";export{P as PostMetaNavigation}from"./post-meta-navigation-f2660b07.js";export{P as PostLanguageSwitch}from"./post-language-switch-c6015c5b.js";export{P as PostLogo}from"./post-logo-ca6f588b.js";export{P as PostMainNavigation}from"./post-main-navigation-605861c5.js";export{P as PostSearch}from"./post-search-5ebe2715.js";export{P as PostKlpLoginWidget}from"./post-klp-login-widget-c2d438ef.js";import"./index-bb0e68fd.js";import"./index-d3f1363d.js";import"./language.service-490983de.js";import"./store-b1332c1e.js";import"./utils-c8805f81.js";import"./svg-sprite.component-d3726867.js";import"./svg-icon.component-70692acc.js";import"./if.component-d88d9e48.js";import"./bodyScrollLock.esm-afcc00e3.js";import"./ui.service-22f2c593.js";