@swisspost/internet-header 1.15.24 → 1.16.1
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/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{klp-widget.controller-d8938377.js → klp-widget.controller-7a8a5ddc.js} +26 -2
- package/dist/cjs/{post-internet-header-7556c7d7.js → post-internet-header-5c0dbfd2.js} +3 -3
- package/dist/cjs/{post-klp-login-widget-0237ef6a.js → post-klp-login-widget-75dfc12f.js} +31 -1
- package/dist/cjs/post-klp-login-widget.cjs.entry.js +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.entry.js +1 -1
- package/dist/collection/assets/js/klp-login-widget.js +26 -2
- package/dist/collection/components/post-internet-breadcrumbs/post-internet-breadcrumbs.js +1 -1
- package/dist/collection/components/post-internet-header/post-internet-header.js +1 -1
- package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.js +30 -0
- package/dist/components/klp-widget.controller.js +26 -2
- package/dist/components/post-klp-login-widget2.js +30 -0
- package/dist/components/swisspost-internet-header.js +3 -3
- package/dist/docs.json +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/{klp-widget.controller-e635b42e.js → klp-widget.controller-6f5a7586.js} +26 -2
- package/dist/esm/{post-internet-header-e1b98bd6.js → post-internet-header-6768743b.js} +3 -3
- package/dist/esm/{post-klp-login-widget-0eadcd31.js → post-klp-login-widget-6aeb2fd2.js} +31 -1
- package/dist/esm/post-klp-login-widget.entry.js +1 -1
- package/dist/esm/swisspost-internet-header.entry.js +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{klp-widget.controller-e635b42e.js → klp-widget.controller-6f5a7586.js} +2 -2
- package/dist/esm-es5/post-internet-header-6768743b.js +1 -0
- package/dist/esm-es5/{post-klp-login-widget-0eadcd31.js → post-klp-login-widget-6aeb2fd2.js} +1 -1
- package/dist/esm-es5/post-klp-login-widget.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
- package/dist/swisspost-internet-header/index.esm.js +1 -1
- package/dist/swisspost-internet-header/{p-6e7f7a32.system.js → p-1d65df23.system.js} +1 -1
- package/dist/swisspost-internet-header/p-2aced2a4.entry.js +1 -0
- package/dist/swisspost-internet-header/p-695fe962.system.js +1 -1
- package/dist/swisspost-internet-header/{p-a14bbb6c.system.js → p-7ceca008.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-45fcb989.system.js → p-9ba6f8b6.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-dd01f7fe.js → p-9f6b64df.js} +1 -1
- package/dist/swisspost-internet-header/{p-d7bb8c4f.js → p-ccc07e33.js} +1 -1
- package/dist/swisspost-internet-header/p-cf4d8f82.js +1 -0
- package/dist/swisspost-internet-header/{p-095131e8.system.entry.js → p-eefdd3f5.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-28e2e93e.system.entry.js → p-f6e9c9eb.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-ed30835e.entry.js → p-fa6b0e3c.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-fc7b59e2.system.js +1 -0
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
- package/dist/types/components/post-internet-breadcrumbs/post-internet-breadcrumbs.d.ts +1 -1
- package/dist/types/components/post-internet-header/post-internet-header.d.ts +1 -1
- package/dist/types/components/post-klp-login-widget/post-klp-login-widget.d.ts +3 -0
- package/dist/types/components.d.ts +4 -4
- package/package.json +3 -3
- package/dist/esm-es5/post-internet-header-e1b98bd6.js +0 -1
- package/dist/swisspost-internet-header/p-1be3e7c9.js +0 -1
- package/dist/swisspost-internet-header/p-810b3f48.system.js +0 -1
- package/dist/swisspost-internet-header/p-b44980bc.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postInternetHeader = require('./post-internet-header-
|
|
5
|
+
const postInternetHeader = require('./post-internet-header-5c0dbfd2.js');
|
|
6
6
|
const postInternetBreadcrumbs = require('./post-internet-breadcrumbs-6c043d02.js');
|
|
7
7
|
const postInternetFooter = require('./post-internet-footer-9e46e1fc.js');
|
|
8
8
|
const postSkiplinks = require('./post-skiplinks-469cc355.js');
|
|
@@ -11,7 +11,7 @@ const postLanguageSwitch = require('./post-language-switch-0730827b.js');
|
|
|
11
11
|
const postLogo = require('./post-logo-4c1f9387.js');
|
|
12
12
|
const postMainNavigation = require('./post-main-navigation-bd2473fb.js');
|
|
13
13
|
const postSearch = require('./post-search-1894421f.js');
|
|
14
|
-
const postKlpLoginWidget = require('./post-klp-login-widget-
|
|
14
|
+
const postKlpLoginWidget = require('./post-klp-login-widget-75dfc12f.js');
|
|
15
15
|
require('./index-ecd8c9bb.js');
|
|
16
16
|
require('./index-fbcc9ff3.js');
|
|
17
17
|
require('./language.service-15af0e29.js');
|
|
@@ -14311,6 +14311,7 @@ const vertx = window.vertx || {};
|
|
|
14311
14311
|
}
|
|
14312
14312
|
}
|
|
14313
14313
|
|
|
14314
|
+
|
|
14314
14315
|
function audit(message) {
|
|
14315
14316
|
const auditingEvent = JSON.stringify({
|
|
14316
14317
|
adr: address,
|
|
@@ -15219,6 +15220,12 @@ const vertx = window.vertx || {};
|
|
|
15219
15220
|
if (!address) {
|
|
15220
15221
|
if (trySubscription()) {
|
|
15221
15222
|
log('Subscribing to get an address');
|
|
15223
|
+
if (globalThis.console && globalThis.console.info) {
|
|
15224
|
+
console.info('[klp-login-widget] subscribe attempt', {
|
|
15225
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
15226
|
+
userAgent: navigator.userAgent,
|
|
15227
|
+
});
|
|
15228
|
+
}
|
|
15222
15229
|
const startTime = new Date().getTime();
|
|
15223
15230
|
fetch(platformEndPoints.subscribe, {
|
|
15224
15231
|
method: 'GET',
|
|
@@ -15229,8 +15236,25 @@ const vertx = window.vertx || {};
|
|
|
15229
15236
|
.then(message => handleMessage(message))
|
|
15230
15237
|
.catch(error => {
|
|
15231
15238
|
log('Failed to subscribe: ' + error.message);
|
|
15232
|
-
|
|
15233
|
-
|
|
15239
|
+
if (globalThis.console && globalThis.console.warn) {
|
|
15240
|
+
console.warn('[klp-login-widget] subscribe failed', {
|
|
15241
|
+
errorType: error.constructor ? error.constructor.name : typeof error,
|
|
15242
|
+
errorMessage: error.message,
|
|
15243
|
+
isTypeError: error instanceof TypeError,
|
|
15244
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
15245
|
+
userAgent: navigator.userAgent,
|
|
15246
|
+
url: globalThis.location.href,
|
|
15247
|
+
});
|
|
15248
|
+
}
|
|
15249
|
+
if (error instanceof TypeError) {
|
|
15250
|
+
// Fetch cancelled by browser navigation, not an auth failure.
|
|
15251
|
+
// Do not call logout(): this would delete NCTRL and prevent recovery.
|
|
15252
|
+
log('Subscribe cancelled by navigation: preserving NCTRL, skipping logout.');
|
|
15253
|
+
renderWidget();
|
|
15254
|
+
} else {
|
|
15255
|
+
logout();
|
|
15256
|
+
renderWidget();
|
|
15257
|
+
}
|
|
15234
15258
|
});
|
|
15235
15259
|
logPerformanceMetric('subscribe()', new Date().getTime() - startTime);
|
|
15236
15260
|
} else {
|
|
@@ -373,7 +373,7 @@ const setMainNavigationIds = (navMainEntities) => {
|
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
const name = "@swisspost/internet-header";
|
|
376
|
-
const version = "1.
|
|
376
|
+
const version = "1.16.1";
|
|
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:9.
|
|
417
|
+
"@swisspost/design-system-styles": "workspace:9.8.0",
|
|
418
418
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
419
419
|
"iframe-resizer": "4.4.5",
|
|
420
420
|
jquery: "3.7.1",
|
|
@@ -453,7 +453,7 @@ const devDependencies = {
|
|
|
453
453
|
sass: "1.77.8",
|
|
454
454
|
"start-server-and-test": "2.0.5",
|
|
455
455
|
"ts-jest": "29.2.4",
|
|
456
|
-
typescript: "5.
|
|
456
|
+
typescript: "5.9.3"
|
|
457
457
|
};
|
|
458
458
|
const keywords = [
|
|
459
459
|
"components",
|
|
@@ -31,7 +31,7 @@ const PostKlpLoginWidget = class {
|
|
|
31
31
|
if (((_b = (_a = store.state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.showJobsLoginWidget) ||
|
|
32
32
|
!((_d = (_c = store.state.localizedConfig) === null || _c === void 0 ? void 0 : _c.header) === null || _d === void 0 ? void 0 : _d.loginWidgetOptions))
|
|
33
33
|
return;
|
|
34
|
-
const { initializeKLPLoginWidget } = await Promise.resolve().then(function () { return require('./klp-widget.controller-
|
|
34
|
+
const { initializeKLPLoginWidget } = await Promise.resolve().then(function () { return require('./klp-widget.controller-7a8a5ddc.js'); });
|
|
35
35
|
let _e = store.state.localizedConfig.header.loginWidgetOptions, { platform } = _e, widgetOptions = __rest(_e, ["platform"]);
|
|
36
36
|
if (this.logoutUrl !== undefined) {
|
|
37
37
|
platform = Object.assign(Object.assign({}, platform), { logoutURL: this.logoutUrl });
|
|
@@ -40,6 +40,36 @@ const PostKlpLoginWidget = class {
|
|
|
40
40
|
platform = Object.assign(Object.assign({}, platform), { selfAdminOrigin: this.selfAdminOrigin });
|
|
41
41
|
}
|
|
42
42
|
initializeKLPLoginWidget('post-klp-login-widget', Object.assign(Object.assign(Object.assign({}, widgetOptions), { environment: store.state.environment }), { platform }));
|
|
43
|
+
this.setupTracking();
|
|
44
|
+
}
|
|
45
|
+
setupTracking() {
|
|
46
|
+
var _a;
|
|
47
|
+
if (typeof window === 'undefined')
|
|
48
|
+
return;
|
|
49
|
+
window.dataLayer = window.dataLayer || [];
|
|
50
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleClick);
|
|
51
|
+
}
|
|
52
|
+
handleClick(event) {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
const settingsLink = event
|
|
55
|
+
.composedPath()
|
|
56
|
+
.find(el => el instanceof HTMLAnchorElement && el.matches('#authenticated-menu a[href*="/settings"]'));
|
|
57
|
+
if (!settingsLink)
|
|
58
|
+
return;
|
|
59
|
+
const linkText = (_b = (_a = settingsLink
|
|
60
|
+
.querySelector('.klp-widget-notification-link-text')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
61
|
+
window.dataLayer.push({
|
|
62
|
+
event: 'select_menu',
|
|
63
|
+
type: 'authenticated_menu',
|
|
64
|
+
label: 'settings',
|
|
65
|
+
text: linkText,
|
|
66
|
+
link_url: settingsLink.href,
|
|
67
|
+
additional_info: '',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', this.handleClick);
|
|
43
73
|
}
|
|
44
74
|
/**
|
|
45
75
|
* Sets the focus on the login button
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postKlpLoginWidget = require('./post-klp-login-widget-
|
|
5
|
+
const postKlpLoginWidget = require('./post-klp-login-widget-75dfc12f.js');
|
|
6
6
|
require('./index-ecd8c9bb.js');
|
|
7
7
|
require('./store-c3e61d64.js');
|
|
8
8
|
require('./svg-sprite.component-aff81fb2.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postInternetHeader = require('./post-internet-header-
|
|
5
|
+
const postInternetHeader = require('./post-internet-header-5c0dbfd2.js');
|
|
6
6
|
require('./index-ecd8c9bb.js');
|
|
7
7
|
require('./index-fbcc9ff3.js');
|
|
8
8
|
require('./language.service-15af0e29.js');
|
|
@@ -456,6 +456,7 @@ const vertx = window.vertx || {};
|
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
+
|
|
459
460
|
function audit(message) {
|
|
460
461
|
const auditingEvent = JSON.stringify({
|
|
461
462
|
adr: address,
|
|
@@ -1364,6 +1365,12 @@ const vertx = window.vertx || {};
|
|
|
1364
1365
|
if (!address) {
|
|
1365
1366
|
if (trySubscription()) {
|
|
1366
1367
|
log('Subscribing to get an address');
|
|
1368
|
+
if (globalThis.console && globalThis.console.info) {
|
|
1369
|
+
console.info('[klp-login-widget] subscribe attempt', {
|
|
1370
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
1371
|
+
userAgent: navigator.userAgent,
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1367
1374
|
const startTime = new Date().getTime();
|
|
1368
1375
|
fetch(platformEndPoints.subscribe, {
|
|
1369
1376
|
method: 'GET',
|
|
@@ -1374,8 +1381,25 @@ const vertx = window.vertx || {};
|
|
|
1374
1381
|
.then(message => handleMessage(message))
|
|
1375
1382
|
.catch(error => {
|
|
1376
1383
|
log('Failed to subscribe: ' + error.message);
|
|
1377
|
-
|
|
1378
|
-
|
|
1384
|
+
if (globalThis.console && globalThis.console.warn) {
|
|
1385
|
+
console.warn('[klp-login-widget] subscribe failed', {
|
|
1386
|
+
errorType: error.constructor ? error.constructor.name : typeof error,
|
|
1387
|
+
errorMessage: error.message,
|
|
1388
|
+
isTypeError: error instanceof TypeError,
|
|
1389
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
1390
|
+
userAgent: navigator.userAgent,
|
|
1391
|
+
url: globalThis.location.href,
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
if (error instanceof TypeError) {
|
|
1395
|
+
// Fetch cancelled by browser navigation, not an auth failure.
|
|
1396
|
+
// Do not call logout(): this would delete NCTRL and prevent recovery.
|
|
1397
|
+
log('Subscribe cancelled by navigation: preserving NCTRL, skipping logout.');
|
|
1398
|
+
renderWidget();
|
|
1399
|
+
} else {
|
|
1400
|
+
logout();
|
|
1401
|
+
renderWidget();
|
|
1402
|
+
}
|
|
1379
1403
|
});
|
|
1380
1404
|
logPerformanceMetric('subscribe()', new Date().getTime() - startTime);
|
|
1381
1405
|
} else {
|
|
@@ -246,7 +246,7 @@ export class PostInternetBreadcrumbs {
|
|
|
246
246
|
"optional": true,
|
|
247
247
|
"docs": {
|
|
248
248
|
"tags": [],
|
|
249
|
-
"text": "Add custom breadcrumb items to the end of the pre-configured list. Handy if your online service has
|
|
249
|
+
"text": "Add custom breadcrumb items to the end of the pre-configured list. Handy if your online service has its own navigation structure."
|
|
250
250
|
},
|
|
251
251
|
"attribute": "custom-items",
|
|
252
252
|
"reflect": false
|
|
@@ -457,7 +457,7 @@ export class PostInternetHeader {
|
|
|
457
457
|
"optional": true,
|
|
458
458
|
"docs": {
|
|
459
459
|
"tags": [],
|
|
460
|
-
"text": "
|
|
460
|
+
"text": "Define a proxy URL for the config fetch request."
|
|
461
461
|
},
|
|
462
462
|
"attribute": "config-proxy",
|
|
463
463
|
"reflect": false
|
|
@@ -33,6 +33,36 @@ export class PostKlpLoginWidget {
|
|
|
33
33
|
platform = Object.assign(Object.assign({}, platform), { selfAdminOrigin: this.selfAdminOrigin });
|
|
34
34
|
}
|
|
35
35
|
initializeKLPLoginWidget('post-klp-login-widget', Object.assign(Object.assign(Object.assign({}, widgetOptions), { environment: state.environment }), { platform }));
|
|
36
|
+
this.setupTracking();
|
|
37
|
+
}
|
|
38
|
+
setupTracking() {
|
|
39
|
+
var _a;
|
|
40
|
+
if (typeof window === 'undefined')
|
|
41
|
+
return;
|
|
42
|
+
window.dataLayer = window.dataLayer || [];
|
|
43
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleClick);
|
|
44
|
+
}
|
|
45
|
+
handleClick(event) {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
const settingsLink = event
|
|
48
|
+
.composedPath()
|
|
49
|
+
.find(el => el instanceof HTMLAnchorElement && el.matches('#authenticated-menu a[href*="/settings"]'));
|
|
50
|
+
if (!settingsLink)
|
|
51
|
+
return;
|
|
52
|
+
const linkText = (_b = (_a = settingsLink
|
|
53
|
+
.querySelector('.klp-widget-notification-link-text')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
54
|
+
window.dataLayer.push({
|
|
55
|
+
event: 'select_menu',
|
|
56
|
+
type: 'authenticated_menu',
|
|
57
|
+
label: 'settings',
|
|
58
|
+
text: linkText,
|
|
59
|
+
link_url: settingsLink.href,
|
|
60
|
+
additional_info: '',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
disconnectedCallback() {
|
|
64
|
+
var _a;
|
|
65
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', this.handleClick);
|
|
36
66
|
}
|
|
37
67
|
/**
|
|
38
68
|
* Sets the focus on the login button
|
|
@@ -14309,6 +14309,7 @@ const vertx = window.vertx || {};
|
|
|
14309
14309
|
}
|
|
14310
14310
|
}
|
|
14311
14311
|
|
|
14312
|
+
|
|
14312
14313
|
function audit(message) {
|
|
14313
14314
|
const auditingEvent = JSON.stringify({
|
|
14314
14315
|
adr: address,
|
|
@@ -15217,6 +15218,12 @@ const vertx = window.vertx || {};
|
|
|
15217
15218
|
if (!address) {
|
|
15218
15219
|
if (trySubscription()) {
|
|
15219
15220
|
log('Subscribing to get an address');
|
|
15221
|
+
if (globalThis.console && globalThis.console.info) {
|
|
15222
|
+
console.info('[klp-login-widget] subscribe attempt', {
|
|
15223
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
15224
|
+
userAgent: navigator.userAgent,
|
|
15225
|
+
});
|
|
15226
|
+
}
|
|
15220
15227
|
const startTime = new Date().getTime();
|
|
15221
15228
|
fetch(platformEndPoints.subscribe, {
|
|
15222
15229
|
method: 'GET',
|
|
@@ -15227,8 +15234,25 @@ const vertx = window.vertx || {};
|
|
|
15227
15234
|
.then(message => handleMessage(message))
|
|
15228
15235
|
.catch(error => {
|
|
15229
15236
|
log('Failed to subscribe: ' + error.message);
|
|
15230
|
-
|
|
15231
|
-
|
|
15237
|
+
if (globalThis.console && globalThis.console.warn) {
|
|
15238
|
+
console.warn('[klp-login-widget] subscribe failed', {
|
|
15239
|
+
errorType: error.constructor ? error.constructor.name : typeof error,
|
|
15240
|
+
errorMessage: error.message,
|
|
15241
|
+
isTypeError: error instanceof TypeError,
|
|
15242
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
15243
|
+
userAgent: navigator.userAgent,
|
|
15244
|
+
url: globalThis.location.href,
|
|
15245
|
+
});
|
|
15246
|
+
}
|
|
15247
|
+
if (error instanceof TypeError) {
|
|
15248
|
+
// Fetch cancelled by browser navigation, not an auth failure.
|
|
15249
|
+
// Do not call logout(): this would delete NCTRL and prevent recovery.
|
|
15250
|
+
log('Subscribe cancelled by navigation: preserving NCTRL, skipping logout.');
|
|
15251
|
+
renderWidget();
|
|
15252
|
+
} else {
|
|
15253
|
+
logout();
|
|
15254
|
+
renderWidget();
|
|
15255
|
+
}
|
|
15232
15256
|
});
|
|
15233
15257
|
logPerformanceMetric('subscribe()', new Date().getTime() - startTime);
|
|
15234
15258
|
} else {
|
|
@@ -40,6 +40,36 @@ const PostKlpLoginWidget = /*@__PURE__*/ proxyCustomElement(class PostKlpLoginWi
|
|
|
40
40
|
platform = Object.assign(Object.assign({}, platform), { selfAdminOrigin: this.selfAdminOrigin });
|
|
41
41
|
}
|
|
42
42
|
initializeKLPLoginWidget('post-klp-login-widget', Object.assign(Object.assign(Object.assign({}, widgetOptions), { environment: state.environment }), { platform }));
|
|
43
|
+
this.setupTracking();
|
|
44
|
+
}
|
|
45
|
+
setupTracking() {
|
|
46
|
+
var _a;
|
|
47
|
+
if (typeof window === 'undefined')
|
|
48
|
+
return;
|
|
49
|
+
window.dataLayer = window.dataLayer || [];
|
|
50
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleClick);
|
|
51
|
+
}
|
|
52
|
+
handleClick(event) {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
const settingsLink = event
|
|
55
|
+
.composedPath()
|
|
56
|
+
.find(el => el instanceof HTMLAnchorElement && el.matches('#authenticated-menu a[href*="/settings"]'));
|
|
57
|
+
if (!settingsLink)
|
|
58
|
+
return;
|
|
59
|
+
const linkText = (_b = (_a = settingsLink
|
|
60
|
+
.querySelector('.klp-widget-notification-link-text')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
61
|
+
window.dataLayer.push({
|
|
62
|
+
event: 'select_menu',
|
|
63
|
+
type: 'authenticated_menu',
|
|
64
|
+
label: 'settings',
|
|
65
|
+
text: linkText,
|
|
66
|
+
link_url: settingsLink.href,
|
|
67
|
+
additional_info: '',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', this.handleClick);
|
|
43
73
|
}
|
|
44
74
|
/**
|
|
45
75
|
* Sets the focus on the login button
|
|
@@ -378,7 +378,7 @@ const setMainNavigationIds = (navMainEntities) => {
|
|
|
378
378
|
};
|
|
379
379
|
|
|
380
380
|
const name = "@swisspost/internet-header";
|
|
381
|
-
const version = "1.
|
|
381
|
+
const version = "1.16.1";
|
|
382
382
|
const description = "The header for client facing applications.";
|
|
383
383
|
const author = "Swiss Post <design-system@post.ch>";
|
|
384
384
|
const license = "Apache-2.0";
|
|
@@ -419,7 +419,7 @@ const scripts = {
|
|
|
419
419
|
generate: "stencil generate"
|
|
420
420
|
};
|
|
421
421
|
const dependencies = {
|
|
422
|
-
"@swisspost/design-system-styles": "workspace:9.
|
|
422
|
+
"@swisspost/design-system-styles": "workspace:9.8.0",
|
|
423
423
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
424
424
|
"iframe-resizer": "4.4.5",
|
|
425
425
|
jquery: "3.7.1",
|
|
@@ -458,7 +458,7 @@ const devDependencies = {
|
|
|
458
458
|
sass: "1.77.8",
|
|
459
459
|
"start-server-and-test": "2.0.5",
|
|
460
460
|
"ts-jest": "29.2.4",
|
|
461
|
-
typescript: "5.
|
|
461
|
+
typescript: "5.9.3"
|
|
462
462
|
};
|
|
463
463
|
const keywords = [
|
|
464
464
|
"components",
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "
|
|
2
|
+
"timestamp": "2026-02-26T09:02:53",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.19.2",
|
|
@@ -749,7 +749,7 @@
|
|
|
749
749
|
"mutable": false,
|
|
750
750
|
"attr": "custom-items",
|
|
751
751
|
"reflectToAttr": false,
|
|
752
|
-
"docs": "Add custom breadcrumb items to the end of the pre-configured list. Handy if your online service has
|
|
752
|
+
"docs": "Add custom breadcrumb items to the end of the pre-configured list. Handy if your online service has its own navigation structure.",
|
|
753
753
|
"docsTags": [],
|
|
754
754
|
"values": [
|
|
755
755
|
{
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
"mutable": false,
|
|
917
917
|
"attr": "config-proxy",
|
|
918
918
|
"reflectToAttr": false,
|
|
919
|
-
"docs": "
|
|
919
|
+
"docs": "Define a proxy URL for the config fetch request.",
|
|
920
920
|
"docsTags": [],
|
|
921
921
|
"values": [
|
|
922
922
|
{
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as PostInternetHeader } from './post-internet-header-
|
|
1
|
+
export { P as PostInternetHeader } from './post-internet-header-6768743b.js';
|
|
2
2
|
export { P as PostInternetBreadcrumbs } from './post-internet-breadcrumbs-ee507bec.js';
|
|
3
3
|
export { P as PostInternetFooter } from './post-internet-footer-cae59692.js';
|
|
4
4
|
export { P as PostSkiplinks } from './post-skiplinks-0779348d.js';
|
|
@@ -7,7 +7,7 @@ export { P as PostLanguageSwitch } from './post-language-switch-d9159f47.js';
|
|
|
7
7
|
export { P as PostLogo } from './post-logo-2c3faf36.js';
|
|
8
8
|
export { P as PostMainNavigation } from './post-main-navigation-58b5c03d.js';
|
|
9
9
|
export { P as PostSearch } from './post-search-daf7d66d.js';
|
|
10
|
-
export { P as PostKlpLoginWidget } from './post-klp-login-widget-
|
|
10
|
+
export { P as PostKlpLoginWidget } from './post-klp-login-widget-6aeb2fd2.js';
|
|
11
11
|
import './index-bb0e68fd.js';
|
|
12
12
|
import './index-d3f1363d.js';
|
|
13
13
|
import './language.service-2960ab93.js';
|
|
@@ -14309,6 +14309,7 @@ const vertx = window.vertx || {};
|
|
|
14309
14309
|
}
|
|
14310
14310
|
}
|
|
14311
14311
|
|
|
14312
|
+
|
|
14312
14313
|
function audit(message) {
|
|
14313
14314
|
const auditingEvent = JSON.stringify({
|
|
14314
14315
|
adr: address,
|
|
@@ -15217,6 +15218,12 @@ const vertx = window.vertx || {};
|
|
|
15217
15218
|
if (!address) {
|
|
15218
15219
|
if (trySubscription()) {
|
|
15219
15220
|
log('Subscribing to get an address');
|
|
15221
|
+
if (globalThis.console && globalThis.console.info) {
|
|
15222
|
+
console.info('[klp-login-widget] subscribe attempt', {
|
|
15223
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
15224
|
+
userAgent: navigator.userAgent,
|
|
15225
|
+
});
|
|
15226
|
+
}
|
|
15220
15227
|
const startTime = new Date().getTime();
|
|
15221
15228
|
fetch(platformEndPoints.subscribe, {
|
|
15222
15229
|
method: 'GET',
|
|
@@ -15227,8 +15234,25 @@ const vertx = window.vertx || {};
|
|
|
15227
15234
|
.then(message => handleMessage(message))
|
|
15228
15235
|
.catch(error => {
|
|
15229
15236
|
log('Failed to subscribe: ' + error.message);
|
|
15230
|
-
|
|
15231
|
-
|
|
15237
|
+
if (globalThis.console && globalThis.console.warn) {
|
|
15238
|
+
console.warn('[klp-login-widget] subscribe failed', {
|
|
15239
|
+
errorType: error.constructor ? error.constructor.name : typeof error,
|
|
15240
|
+
errorMessage: error.message,
|
|
15241
|
+
isTypeError: error instanceof TypeError,
|
|
15242
|
+
hasNctrl: document.cookie.includes(controlCookieName + '='),
|
|
15243
|
+
userAgent: navigator.userAgent,
|
|
15244
|
+
url: globalThis.location.href,
|
|
15245
|
+
});
|
|
15246
|
+
}
|
|
15247
|
+
if (error instanceof TypeError) {
|
|
15248
|
+
// Fetch cancelled by browser navigation, not an auth failure.
|
|
15249
|
+
// Do not call logout(): this would delete NCTRL and prevent recovery.
|
|
15250
|
+
log('Subscribe cancelled by navigation: preserving NCTRL, skipping logout.');
|
|
15251
|
+
renderWidget();
|
|
15252
|
+
} else {
|
|
15253
|
+
logout();
|
|
15254
|
+
renderWidget();
|
|
15255
|
+
}
|
|
15232
15256
|
});
|
|
15233
15257
|
logPerformanceMetric('subscribe()', new Date().getTime() - startTime);
|
|
15234
15258
|
} else {
|
|
@@ -371,7 +371,7 @@ const setMainNavigationIds = (navMainEntities) => {
|
|
|
371
371
|
};
|
|
372
372
|
|
|
373
373
|
const name = "@swisspost/internet-header";
|
|
374
|
-
const version = "1.
|
|
374
|
+
const version = "1.16.1";
|
|
375
375
|
const description = "The header for client facing applications.";
|
|
376
376
|
const author = "Swiss Post <design-system@post.ch>";
|
|
377
377
|
const license = "Apache-2.0";
|
|
@@ -412,7 +412,7 @@ const scripts = {
|
|
|
412
412
|
generate: "stencil generate"
|
|
413
413
|
};
|
|
414
414
|
const dependencies = {
|
|
415
|
-
"@swisspost/design-system-styles": "workspace:9.
|
|
415
|
+
"@swisspost/design-system-styles": "workspace:9.8.0",
|
|
416
416
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
417
417
|
"iframe-resizer": "4.4.5",
|
|
418
418
|
jquery: "3.7.1",
|
|
@@ -451,7 +451,7 @@ const devDependencies = {
|
|
|
451
451
|
sass: "1.77.8",
|
|
452
452
|
"start-server-and-test": "2.0.5",
|
|
453
453
|
"ts-jest": "29.2.4",
|
|
454
|
-
typescript: "5.
|
|
454
|
+
typescript: "5.9.3"
|
|
455
455
|
};
|
|
456
456
|
const keywords = [
|
|
457
457
|
"components",
|
|
@@ -29,7 +29,7 @@ const PostKlpLoginWidget = class {
|
|
|
29
29
|
if (((_b = (_a = state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.showJobsLoginWidget) ||
|
|
30
30
|
!((_d = (_c = state.localizedConfig) === null || _c === void 0 ? void 0 : _c.header) === null || _d === void 0 ? void 0 : _d.loginWidgetOptions))
|
|
31
31
|
return;
|
|
32
|
-
const { initializeKLPLoginWidget } = await import('./klp-widget.controller-
|
|
32
|
+
const { initializeKLPLoginWidget } = await import('./klp-widget.controller-6f5a7586.js');
|
|
33
33
|
let _e = state.localizedConfig.header.loginWidgetOptions, { platform } = _e, widgetOptions = __rest(_e, ["platform"]);
|
|
34
34
|
if (this.logoutUrl !== undefined) {
|
|
35
35
|
platform = Object.assign(Object.assign({}, platform), { logoutURL: this.logoutUrl });
|
|
@@ -38,6 +38,36 @@ const PostKlpLoginWidget = class {
|
|
|
38
38
|
platform = Object.assign(Object.assign({}, platform), { selfAdminOrigin: this.selfAdminOrigin });
|
|
39
39
|
}
|
|
40
40
|
initializeKLPLoginWidget('post-klp-login-widget', Object.assign(Object.assign(Object.assign({}, widgetOptions), { environment: state.environment }), { platform }));
|
|
41
|
+
this.setupTracking();
|
|
42
|
+
}
|
|
43
|
+
setupTracking() {
|
|
44
|
+
var _a;
|
|
45
|
+
if (typeof window === 'undefined')
|
|
46
|
+
return;
|
|
47
|
+
window.dataLayer = window.dataLayer || [];
|
|
48
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleClick);
|
|
49
|
+
}
|
|
50
|
+
handleClick(event) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
const settingsLink = event
|
|
53
|
+
.composedPath()
|
|
54
|
+
.find(el => el instanceof HTMLAnchorElement && el.matches('#authenticated-menu a[href*="/settings"]'));
|
|
55
|
+
if (!settingsLink)
|
|
56
|
+
return;
|
|
57
|
+
const linkText = (_b = (_a = settingsLink
|
|
58
|
+
.querySelector('.klp-widget-notification-link-text')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
59
|
+
window.dataLayer.push({
|
|
60
|
+
event: 'select_menu',
|
|
61
|
+
type: 'authenticated_menu',
|
|
62
|
+
label: 'settings',
|
|
63
|
+
text: linkText,
|
|
64
|
+
link_url: settingsLink.href,
|
|
65
|
+
additional_info: '',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
var _a;
|
|
70
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', this.handleClick);
|
|
41
71
|
}
|
|
42
72
|
/**
|
|
43
73
|
* Sets the focus on the login button
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as post_klp_login_widget } from './post-klp-login-widget-
|
|
1
|
+
export { P as post_klp_login_widget } from './post-klp-login-widget-6aeb2fd2.js';
|
|
2
2
|
import './index-bb0e68fd.js';
|
|
3
3
|
import './store-629cab77.js';
|
|
4
4
|
import './svg-sprite.component-abb69a1b.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as swisspost_internet_header } from './post-internet-header-
|
|
1
|
+
export { P as swisspost_internet_header } from './post-internet-header-6768743b.js';
|
|
2
2
|
import './index-bb0e68fd.js';
|
|
3
3
|
import './index-d3f1363d.js';
|
|
4
4
|
import './language.service-2960ab93.js';
|
package/dist/esm-es5/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PostInternetHeader}from"./post-internet-header-
|
|
1
|
+
export{P as PostInternetHeader}from"./post-internet-header-6768743b.js";export{P as PostInternetBreadcrumbs}from"./post-internet-breadcrumbs-ee507bec.js";export{P as PostInternetFooter}from"./post-internet-footer-cae59692.js";export{P as PostSkiplinks}from"./post-skiplinks-0779348d.js";export{P as PostMetaNavigation}from"./post-meta-navigation-4bf72315.js";export{P as PostLanguageSwitch}from"./post-language-switch-d9159f47.js";export{P as PostLogo}from"./post-logo-2c3faf36.js";export{P as PostMainNavigation}from"./post-main-navigation-58b5c03d.js";export{P as PostSearch}from"./post-search-daf7d66d.js";export{P as PostKlpLoginWidget}from"./post-klp-login-widget-6aeb2fd2.js";import"./index-bb0e68fd.js";import"./index-d3f1363d.js";import"./language.service-2960ab93.js";import"./store-629cab77.js";import"./utils-c8805f81.js";import"./svg-sprite.component-abb69a1b.js";import"./svg-icon.component-70692acc.js";import"./if.component-d88d9e48.js";import"./bodyScrollLock.esm-afcc00e3.js";import"./ui.service-22f2c593.js";
|