@visma-swno/vsn-navigation 1.2.0-beta.1 → 1.2.0-beta.10
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.
|
@@ -275,40 +275,40 @@ function De(e) {
|
|
|
275
275
|
function w(e) {
|
|
276
276
|
window.dispatchEvent(new CustomEvent(y, { detail: e }));
|
|
277
277
|
}
|
|
278
|
-
var T = "", E, Oe, D,
|
|
279
|
-
|
|
280
|
-
var
|
|
281
|
-
getLocale:
|
|
282
|
-
setLocale:
|
|
283
|
-
}),
|
|
284
|
-
if (e === (E ?? T)) return
|
|
285
|
-
if (!D || !
|
|
278
|
+
var T = "", E, Oe, D, ke, Ae, O = new ye();
|
|
279
|
+
O.resolve();
|
|
280
|
+
var k = 0, je = (e) => (ge(((e, t) => Ee(Ae, e, t))), T = Oe = e.sourceLocale, D = new Set(e.targetLocales), D.add(e.sourceLocale), ke = e.loadLocale, {
|
|
281
|
+
getLocale: Me,
|
|
282
|
+
setLocale: Ne
|
|
283
|
+
}), Me = () => T, Ne = (e) => {
|
|
284
|
+
if (e === (E ?? T)) return O.promise;
|
|
285
|
+
if (!D || !ke) throw Error("Internal error");
|
|
286
286
|
if (!D.has(e)) throw Error("Invalid locale code");
|
|
287
|
-
|
|
288
|
-
let t =
|
|
289
|
-
return E = e,
|
|
287
|
+
k++;
|
|
288
|
+
let t = k;
|
|
289
|
+
return E = e, O.settled && (O = new ye()), w({
|
|
290
290
|
status: "loading",
|
|
291
291
|
loadingLocale: e
|
|
292
|
-
}), (e === Oe ? Promise.resolve({ templates: void 0 }) :
|
|
293
|
-
|
|
292
|
+
}), (e === Oe ? Promise.resolve({ templates: void 0 }) : ke(e)).then((n) => {
|
|
293
|
+
k === t && (T = e, E = void 0, Ae = n.templates, w({
|
|
294
294
|
status: "ready",
|
|
295
295
|
readyLocale: e
|
|
296
|
-
}),
|
|
296
|
+
}), O.resolve());
|
|
297
297
|
}, (n) => {
|
|
298
|
-
|
|
298
|
+
k === t && (w({
|
|
299
299
|
status: "error",
|
|
300
300
|
errorLocale: e,
|
|
301
301
|
errorMessage: n.toString()
|
|
302
|
-
}),
|
|
303
|
-
}),
|
|
304
|
-
},
|
|
302
|
+
}), O.reject(n));
|
|
303
|
+
}), O.promise;
|
|
304
|
+
}, Pe = () => {
|
|
305
305
|
if (typeof navigator > "u") return !1;
|
|
306
306
|
let e = navigator.userAgentData?.platform ?? navigator.platform ?? "";
|
|
307
307
|
return /mac/i.test(e);
|
|
308
|
-
},
|
|
308
|
+
}, Fe = (e) => !e.shiftKey && !e.altKey && (Pe() ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey), A = (e) => e.shiftKey || e.altKey || e.ctrlKey || e.metaKey, j = (e) => !A(e), Ie = () => x("Choose a service"), Le = () => x("Search"), Re = () => Pe() ? "Cmd+K" : "CTRL+K", ze = (e) => x(b`Type at least ${e} characters to search`), Be = () => x("Menu items"), Ve = (e) => x(b`Load ${e} more`), He = () => x("VSN"), Ue = "survicate-sdk", We = "ui-components-feedback", Ge = (e) => `https://survey.survicate.com/workspaces/${e}/web_surveys.js`;
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/shared/icons.ts
|
|
311
|
-
function
|
|
311
|
+
function M(e, t = 24, r) {
|
|
312
312
|
return n`<svg
|
|
313
313
|
xmlns="http://www.w3.org/2000/svg"
|
|
314
314
|
width="${t}"
|
|
@@ -323,23 +323,23 @@ function j(e, t = 24, r) {
|
|
|
323
323
|
class=${r ?? ""}
|
|
324
324
|
>${e}</svg>`;
|
|
325
325
|
}
|
|
326
|
-
var
|
|
326
|
+
var Ke = i``, qe = i`
|
|
327
327
|
<path d="M4 5h16"/>
|
|
328
328
|
<path d="M4 12h16"/>
|
|
329
329
|
<path d="M4 19h16"/>
|
|
330
|
-
`,
|
|
330
|
+
`, Je = i`
|
|
331
331
|
<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/>
|
|
332
332
|
<path d="M20 2v4"/>
|
|
333
333
|
<path d="M22 4h-4"/>
|
|
334
334
|
<circle cx="4" cy="20" r="2"/>
|
|
335
|
-
`,
|
|
335
|
+
`, Ye = i`
|
|
336
336
|
<path d="M10.268 21a2 2 0 0 0 3.464 0"/>
|
|
337
337
|
<path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/>
|
|
338
|
-
`,
|
|
338
|
+
`, Xe = i`
|
|
339
339
|
<path d="M10.268 21a2 2 0 0 0 3.464 0"/>
|
|
340
340
|
<path d="M11.68 2.009A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673c-.824-.85-1.678-1.731-2.21-3.348"/>
|
|
341
341
|
<circle cx="18" cy="5" r="3"/>
|
|
342
|
-
`,
|
|
342
|
+
`, Ze = i`
|
|
343
343
|
<path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"/>
|
|
344
344
|
<path d="M7 10v12"/>
|
|
345
345
|
`;
|
|
@@ -350,14 +350,14 @@ i`
|
|
|
350
350
|
<path d="M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2"/>
|
|
351
351
|
<path d="M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16"/>
|
|
352
352
|
`;
|
|
353
|
-
var
|
|
353
|
+
var Qe = i`
|
|
354
354
|
<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/>
|
|
355
355
|
<path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
|
|
356
|
-
`,
|
|
356
|
+
`, $e = i`
|
|
357
357
|
<circle cx="12" cy="12" r="10"/>
|
|
358
358
|
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
|
|
359
359
|
<path d="M12 17h.01"/>
|
|
360
|
-
`,
|
|
360
|
+
`, et = i`
|
|
361
361
|
<circle cx="12" cy="8" r="5"/>
|
|
362
362
|
<path d="M20 21a8 8 0 0 0-16 0"/>
|
|
363
363
|
`;
|
|
@@ -368,11 +368,11 @@ i`
|
|
|
368
368
|
<path d="M12 17v5"/>
|
|
369
369
|
<path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/>
|
|
370
370
|
`;
|
|
371
|
-
var
|
|
371
|
+
var tt = i`
|
|
372
372
|
<path d="m16 17 5-5-5-5"/>
|
|
373
373
|
<path d="M21 12H9"/>
|
|
374
374
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>
|
|
375
|
-
`,
|
|
375
|
+
`, nt = i`
|
|
376
376
|
<path d="M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6"/>
|
|
377
377
|
<path d="m21 3-9 9"/>
|
|
378
378
|
<path d="M15 3h6v6"/>
|
|
@@ -381,17 +381,17 @@ i`
|
|
|
381
381
|
<circle cx="12" cy="12" r="10"/>
|
|
382
382
|
<circle cx="12" cy="12" r="1"/>
|
|
383
383
|
`;
|
|
384
|
-
var
|
|
384
|
+
var rt = i`
|
|
385
385
|
<path d="m7 15 5 5 5-5"/>
|
|
386
386
|
<path d="m7 9 5-5 5 5"/>
|
|
387
|
-
`,
|
|
387
|
+
`, it = i`
|
|
388
388
|
<path d="m18 15-6-6-6 6"/>
|
|
389
|
-
`,
|
|
389
|
+
`, N = i`
|
|
390
390
|
<path d="m6 9 6 6 6-6"/>
|
|
391
|
-
`,
|
|
391
|
+
`, at = i`
|
|
392
392
|
<circle cx="11" cy="11" r="8"/>
|
|
393
393
|
<path d="m21 21-4.3-4.3"/>
|
|
394
|
-
`,
|
|
394
|
+
`, ot = i`
|
|
395
395
|
<circle cx="12" cy="12" r="10"/>
|
|
396
396
|
<path d="m15 9-6 6"/>
|
|
397
397
|
<path d="m9 9 6 6"/>
|
|
@@ -401,7 +401,7 @@ i`
|
|
|
401
401
|
<line x1="12" x2="12" y1="8" y2="12"/>
|
|
402
402
|
<line x1="12" x2="12.01" y1="16" y2="16"/>
|
|
403
403
|
`;
|
|
404
|
-
var
|
|
404
|
+
var st = i`
|
|
405
405
|
<path d="M12 16h.01"/>
|
|
406
406
|
<path d="M12 8v4"/>
|
|
407
407
|
<path d="M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z"/>
|
|
@@ -412,12 +412,12 @@ i`
|
|
|
412
412
|
`, i`
|
|
413
413
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.60982 1.03843C2.99778 0.96126 3.39992 1.00087 3.76537 1.15224C4.13082 1.30362 4.44318 1.55996 4.66294 1.88886C4.8827 2.21776 5 2.60444 5 3V4H7V3C7 2.60444 7.1173 2.21776 7.33706 1.88886C7.55682 1.55996 7.86918 1.30362 8.23463 1.15224C8.60009 1.00087 9.00222 0.96126 9.39018 1.03843C9.77814 1.1156 10.1345 1.30608 10.4142 1.58579C10.6939 1.86549 10.8844 2.22186 10.9616 2.60982C11.0387 2.99778 10.9991 3.39992 10.8478 3.76537C10.6964 4.13082 10.44 4.44318 10.1111 4.66294C9.78224 4.8827 9.39556 5 9 5H8V7H9C9.39556 7 9.78224 7.1173 10.1111 7.33706C10.44 7.55682 10.6964 7.86918 10.8478 8.23463C10.9991 8.60009 11.0387 9.00222 10.9616 9.39018C10.8844 9.77814 10.6939 10.1345 10.4142 10.4142C10.1345 10.6939 9.77814 10.8844 9.39018 10.9616C9.00222 11.0387 8.60009 10.9991 8.23463 10.8478C7.86918 10.6964 7.55682 10.44 7.33706 10.1111C7.1173 9.78224 7 9.39556 7 9V8H5V9C5 9.39556 4.8827 9.78224 4.66294 10.1111C4.44318 10.44 4.13082 10.6964 3.76537 10.8478C3.39992 10.9991 2.99778 11.0387 2.60982 10.9616C2.22186 10.8844 1.86549 10.6939 1.58579 10.4142C1.30608 10.1345 1.1156 9.77814 1.03843 9.39018C0.96126 9.00222 1.00087 8.60009 1.15224 8.23463C1.30362 7.86918 1.55996 7.55682 1.88886 7.33706C2.21776 7.1173 2.60444 7 3 7H4V5H3C2.60444 5 2.21776 4.8827 1.88886 4.66294C1.55996 4.44318 1.30362 4.13082 1.15224 3.76537C1.00087 3.39992 0.96126 2.99778 1.03843 2.60982C1.1156 2.22186 1.30608 1.86549 1.58579 1.58579C1.86549 1.30608 2.22186 1.1156 2.60982 1.03843ZM4 4V3C4 2.80222 3.94135 2.60888 3.83147 2.44443C3.72159 2.27998 3.56541 2.15181 3.38268 2.07612C3.19996 2.00043 2.99889 1.98063 2.80491 2.01922C2.61093 2.0578 2.43275 2.15304 2.29289 2.29289C2.15304 2.43275 2.0578 2.61093 2.01922 2.80491C1.98063 2.99889 2.00043 3.19996 2.07612 3.38268C2.15181 3.56541 2.27998 3.72159 2.44443 3.83147C2.60888 3.94135 2.80222 4 3 4H4ZM5 5V7H7V5H5ZM4 8H3C2.80222 8 2.60888 8.05865 2.44443 8.16853C2.27998 8.27841 2.15181 8.43459 2.07612 8.61732C2.00043 8.80004 1.98063 9.00111 2.01922 9.19509C2.0578 9.38907 2.15304 9.56726 2.29289 9.70711C2.43275 9.84696 2.61093 9.9422 2.80491 9.98079C2.99889 10.0194 3.19996 9.99957 3.38268 9.92388C3.56541 9.84819 3.72159 9.72002 3.83147 9.55557C3.94135 9.39112 4 9.19778 4 9V8ZM8 8V9C8 9.19778 8.05865 9.39112 8.16853 9.55557C8.27841 9.72002 8.43459 9.84819 8.61732 9.92388C8.80004 9.99957 9.00111 10.0194 9.19509 9.98079C9.38907 9.9422 9.56726 9.84696 9.70711 9.70711C9.84696 9.56726 9.9422 9.38907 9.98079 9.19509C10.0194 9.00111 9.99957 8.80004 9.92388 8.61732C9.84819 8.43459 9.72002 8.27841 9.55557 8.16853C9.39112 8.05865 9.19778 8 9 8H8ZM8 4H9C9.19778 4 9.39112 3.94135 9.55557 3.83147C9.72002 3.72159 9.84819 3.56541 9.92388 3.38268C9.99957 3.19996 10.0194 2.99889 9.98079 2.80491C9.9422 2.61093 9.84696 2.43275 9.70711 2.29289C9.56726 2.15304 9.38907 2.0578 9.19509 2.01922C9.00111 1.98063 8.80004 2.00043 8.61732 2.07612C8.43459 2.15181 8.27841 2.27998 8.16853 2.44443C8.05865 2.60888 8 2.80222 8 3V4Z"/>
|
|
414
414
|
`;
|
|
415
|
-
var
|
|
415
|
+
var ct = i`
|
|
416
416
|
<path d="m9 18 6-6-6-6"/>
|
|
417
417
|
`;
|
|
418
418
|
//#endregion
|
|
419
419
|
//#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
|
|
420
|
-
function
|
|
420
|
+
function P(e, t, n, r) {
|
|
421
421
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
422
422
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
423
423
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
@@ -425,12 +425,9 @@ function N(e, t, n, r) {
|
|
|
425
425
|
}
|
|
426
426
|
//#endregion
|
|
427
427
|
//#region src/components/vsn-side-bar/vsn-menu/vsn-menu-item.ts
|
|
428
|
-
var
|
|
429
|
-
static {
|
|
430
|
-
P = this;
|
|
431
|
-
}
|
|
428
|
+
var F, I = class extends e {
|
|
432
429
|
static {
|
|
433
|
-
|
|
430
|
+
F = this;
|
|
434
431
|
}
|
|
435
432
|
static {
|
|
436
433
|
this._idCounter = 0;
|
|
@@ -452,7 +449,7 @@ var P, F = class extends e {
|
|
|
452
449
|
}
|
|
453
450
|
}, this._onItemMouseLeave = () => {
|
|
454
451
|
this._showTooltip = !1;
|
|
455
|
-
}, this._tooltipId = `vsn-side-menu-item-tooltip-${
|
|
452
|
+
}, this._tooltipId = `vsn-side-menu-item-tooltip-${F._idCounter++}`;
|
|
456
453
|
}
|
|
457
454
|
willUpdate(e) {
|
|
458
455
|
let t = this.tree;
|
|
@@ -477,7 +474,7 @@ var P, F = class extends e {
|
|
|
477
474
|
<div class="ga-tooltip ga-tooltip--right-center w-34 max-w-135">${this.tree?.label}</div>
|
|
478
475
|
</div>
|
|
479
476
|
<span class="ga-side-navigation__item-icon">
|
|
480
|
-
${e ? this._isExpanded ?
|
|
477
|
+
${e ? this._isExpanded ? M(N, 16) : M(ct, 16) : ""}
|
|
481
478
|
</span>
|
|
482
479
|
<div class="ga-side-navigation__item-content">
|
|
483
480
|
<div class="ga-side-navigation__item-label">${this.tree?.label}</div>
|
|
@@ -511,7 +508,7 @@ var P, F = class extends e {
|
|
|
511
508
|
this._isExpanded = !this._isExpanded, e.preventDefault(), e.stopPropagation();
|
|
512
509
|
return;
|
|
513
510
|
}
|
|
514
|
-
if (e.button !== 0 || e
|
|
511
|
+
if (e.button !== 0 || A(e)) return;
|
|
515
512
|
e.preventDefault(), e.stopPropagation();
|
|
516
513
|
let n = new CustomEvent("vsn-menu-item-changed", {
|
|
517
514
|
bubbles: !0,
|
|
@@ -521,19 +518,16 @@ var P, F = class extends e {
|
|
|
521
518
|
this.dispatchEvent(n);
|
|
522
519
|
}
|
|
523
520
|
};
|
|
524
|
-
|
|
521
|
+
P([s({ attribute: !1 })], I.prototype, "tree", void 0), P([s({ type: Number })], I.prototype, "level", void 0), P([ue({
|
|
525
522
|
context: de,
|
|
526
523
|
subscribe: !0
|
|
527
|
-
}), l()],
|
|
524
|
+
}), l()], I.prototype, "_currentActiveId", void 0), P([l()], I.prototype, "_isActive", void 0), P([l()], I.prototype, "_isExpanded", void 0), P([l()], I.prototype, "_showTooltip", void 0), P([l()], I.prototype, "_tooltipPos", void 0), P([c(".ga-side-navigation__item-label")], I.prototype, "_labelEl", void 0), I = F = P([o("vsn-menu-item")], I);
|
|
528
525
|
//#endregion
|
|
529
526
|
//#region src/components/vsn-side-bar/vsn-menu/vsn-menu.ts
|
|
530
|
-
var
|
|
527
|
+
var L = class extends e {
|
|
531
528
|
constructor(...e) {
|
|
532
529
|
super(...e), this.items = [], this._currentActiveId = "", this.currentItem = "";
|
|
533
530
|
}
|
|
534
|
-
static {
|
|
535
|
-
this.styles = [h];
|
|
536
|
-
}
|
|
537
531
|
createRenderRoot() {
|
|
538
532
|
return this;
|
|
539
533
|
}
|
|
@@ -542,125 +536,143 @@ var I = class extends e {
|
|
|
542
536
|
}
|
|
543
537
|
render() {
|
|
544
538
|
return n`
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
</div>
|
|
539
|
+
<div class="flex flex-col ga-side-navigation__body h-full">
|
|
540
|
+
<div class="flex-1 overflow-y-auto ga-scroll">
|
|
541
|
+
${d(this.items, (e) => this.menuItem(e))}
|
|
542
|
+
</div>
|
|
543
|
+
<div>
|
|
544
|
+
<slot name="nav-footer"></slot>
|
|
552
545
|
</div>
|
|
546
|
+
</div>
|
|
553
547
|
`;
|
|
554
548
|
}
|
|
555
549
|
menuItem(e) {
|
|
556
|
-
return n
|
|
550
|
+
return n`
|
|
551
|
+
<vsn-menu-item .tree=${e}></vsn-menu-item>`;
|
|
557
552
|
}
|
|
558
553
|
};
|
|
559
|
-
|
|
554
|
+
P([s({ attribute: !1 })], L.prototype, "items", void 0), P([le({ context: de }), l()], L.prototype, "_currentActiveId", void 0), P([s()], L.prototype, "currentItem", void 0), L = P([o("vsn-menu")], L);
|
|
560
555
|
//#endregion
|
|
561
556
|
//#region src/components/vsn-side-bar/vsn-menu/vsn-menu-button.ts
|
|
562
|
-
var
|
|
557
|
+
var R = class extends e {
|
|
563
558
|
constructor(...e) {
|
|
564
|
-
super(...e), this.label = "", this._onKeydown = (e) => {
|
|
565
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.click());
|
|
559
|
+
super(...e), this.label = "", this.closeOnClick = !1, this._onKeydown = (e) => {
|
|
560
|
+
e.defaultPrevented || j(e) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), this.click());
|
|
561
|
+
}, this._onClick = (e) => {
|
|
562
|
+
e.defaultPrevented || e.button !== 0 || A(e) || this.closeOnClick && this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
|
|
563
|
+
bubbles: !0,
|
|
564
|
+
composed: !0
|
|
565
|
+
}));
|
|
566
566
|
};
|
|
567
567
|
}
|
|
568
568
|
static {
|
|
569
569
|
this.styles = [t`
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
:host {
|
|
575
|
-
display: block;
|
|
576
|
-
border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
|
|
577
|
-
}
|
|
570
|
+
/* Every dimension multiplies by --ga-base-scaling-factor (default 1) so the
|
|
571
|
+
whole component scales uniformly with the host's density setting.
|
|
572
|
+
Layout spacing lives on the inner .row, NOT on :host — a consuming app's
|
|
573
|
+
reset (* { margin: 0; padding: 0 }) overrides :host but can't reach the shadow. */
|
|
578
574
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
575
|
+
:host {
|
|
576
|
+
display: block;
|
|
577
|
+
cursor: pointer;
|
|
578
|
+
outline-style: none;
|
|
579
|
+
}
|
|
582
580
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
}
|
|
581
|
+
:host(:hover) {
|
|
582
|
+
background-color: var(--ga-color-surface-action-hover-2);
|
|
583
|
+
}
|
|
587
584
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
585
|
+
:host(:focus-visible) > .row::after {
|
|
586
|
+
position: absolute;
|
|
587
|
+
inset: 3px;
|
|
588
|
+
border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
|
|
589
|
+
border-style: var(--tw-border-style);
|
|
590
|
+
border-width: 2px;
|
|
591
|
+
border-color: var(--ga-color-border-focus);
|
|
592
|
+
--tw-content: '';
|
|
593
|
+
content: var(--tw-content);
|
|
594
|
+
}
|
|
597
595
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
596
|
+
.row {
|
|
597
|
+
position: relative;
|
|
598
|
+
display: flex;
|
|
599
|
+
align-items: center;
|
|
600
|
+
/* spacing-04 padding-block + 20px label line-height = 44px row,
|
|
601
|
+
matching Gaia's .ga-side-navigation__item (py-3 / px-4 / gap-3). */
|
|
602
|
+
gap: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
|
|
603
|
+
padding-block: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
|
|
604
|
+
padding-inline: calc(var(--ga-size-spacing-05) * var(--ga-base-scaling-factor, 1));
|
|
605
|
+
}
|
|
605
606
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
font-feature-settings: 'liga' 1, 'calt' 1;
|
|
614
|
-
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
615
|
-
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
616
|
-
letter-spacing: calc(var(--ga-text-md-letter-spacing) * var(--ga-base-scaling-factor, 1));
|
|
617
|
-
color: var(--ga-color-text-action);
|
|
618
|
-
}
|
|
607
|
+
.icon {
|
|
608
|
+
width: calc(1rem * var(--ga-base-scaling-factor, 1));
|
|
609
|
+
flex-shrink: 0;
|
|
610
|
+
color: var(--ga-color-icon-primary);
|
|
611
|
+
display: inline-flex;
|
|
612
|
+
align-items: center;
|
|
613
|
+
}
|
|
619
614
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
615
|
+
.label {
|
|
616
|
+
flex: 1;
|
|
617
|
+
display: inline-flex;
|
|
618
|
+
overflow: hidden;
|
|
619
|
+
white-space: nowrap;
|
|
620
|
+
text-overflow: ellipsis;
|
|
621
|
+
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
|
|
622
|
+
font-feature-settings: 'liga' 1, 'calt' 1;
|
|
623
|
+
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
624
|
+
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
625
|
+
letter-spacing: calc(var(--ga-text-md-letter-spacing) * var(--ga-base-scaling-factor, 1));
|
|
626
|
+
color: var(--ga-color-text-action);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
slot[name="kbd"]::slotted(kbd) {
|
|
630
|
+
display: inline-flex;
|
|
631
|
+
align-items: center;
|
|
632
|
+
justify-content: center;
|
|
633
|
+
gap: calc(0.125rem * var(--ga-base-scaling-factor, 1));
|
|
634
|
+
flex-shrink: 0;
|
|
635
|
+
cursor: default;
|
|
636
|
+
border: calc(1px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-disabled);
|
|
637
|
+
border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
|
|
638
|
+
background-color: var(--ga-color-white);
|
|
639
|
+
/* !important: the <kbd> is host-provided slotted content, so a
|
|
640
|
+
consuming app's * { padding: 0 } reset overrides ::slotted normal
|
|
641
|
+
rules. We can't move it to an inner shadow element (it's the
|
|
642
|
+
host's element), so important is the accepted defense here. */
|
|
643
|
+
padding-inline: calc(var(--ga-size-spacing-02) * var(--ga-base-scaling-factor, 1)) !important;
|
|
644
|
+
padding-block: calc(1px * var(--ga-base-scaling-factor, 1)) !important;
|
|
645
|
+
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
|
|
646
|
+
font-size: calc(var(--ga-text-xs-font-size) * var(--ga-base-scaling-factor, 1));
|
|
647
|
+
line-height: calc(var(--ga-text-xs-line-height) * var(--ga-base-scaling-factor, 1));
|
|
648
|
+
letter-spacing: calc(var(--ga-text-xs-letter-spacing) * var(--ga-base-scaling-factor, 1));
|
|
649
|
+
color: var(--ga-color-text-body);
|
|
650
|
+
}
|
|
651
|
+
`];
|
|
643
652
|
}
|
|
644
653
|
connectedCallback() {
|
|
645
|
-
super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("keydown", this._onKeydown);
|
|
654
|
+
super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("keydown", this._onKeydown), this.addEventListener("click", this._onClick);
|
|
646
655
|
}
|
|
647
656
|
disconnectedCallback() {
|
|
648
|
-
this.removeEventListener("keydown", this._onKeydown), super.disconnectedCallback();
|
|
657
|
+
this.removeEventListener("keydown", this._onKeydown), this.removeEventListener("click", this._onClick), super.disconnectedCallback();
|
|
649
658
|
}
|
|
650
659
|
render() {
|
|
651
660
|
return n`
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
661
|
+
<div class="row">
|
|
662
|
+
<span class="icon"><slot name="icon"></slot></span>
|
|
663
|
+
<span class="label">${this.label}</span>
|
|
664
|
+
<slot name="kbd"></slot>
|
|
665
|
+
</div>
|
|
666
|
+
`;
|
|
658
667
|
}
|
|
659
668
|
};
|
|
660
|
-
|
|
669
|
+
P([s()], R.prototype, "label", void 0), P([s({
|
|
670
|
+
type: Boolean,
|
|
671
|
+
attribute: "close-on-click"
|
|
672
|
+
})], R.prototype, "closeOnClick", void 0), R = P([o("vsn-menu-button")], R);
|
|
661
673
|
//#endregion
|
|
662
674
|
//#region src/components/vsn-side-bar/vsn-menu/vsn-menu-separator.ts
|
|
663
|
-
var
|
|
675
|
+
var lt = class extends e {
|
|
664
676
|
static {
|
|
665
677
|
this.styles = [t`
|
|
666
678
|
/* flow-root establishes a BFC so the .line's margins stay contained.
|
|
@@ -683,29 +695,30 @@ var st = class extends e {
|
|
|
683
695
|
return n`<div class="line"></div>`;
|
|
684
696
|
}
|
|
685
697
|
};
|
|
686
|
-
|
|
698
|
+
lt = P([o("vsn-menu-separator")], lt);
|
|
687
699
|
//#endregion
|
|
688
700
|
//#region src/components/vsn-side-bar/vsn-footer/vsn-footer.keyboard.ts
|
|
689
|
-
var
|
|
701
|
+
var ut = class {
|
|
690
702
|
constructor(e) {
|
|
691
703
|
this._prevExpanded = !1, this.onUserKeydown = (e) => {
|
|
692
|
-
e.key === "Enter" || e.key === " " ? (e.preventDefault(), this.host.expanded = !this.host.expanded) : e.key === "Escape" && this.host.expanded && (e.preventDefault(), this.host.expanded = !1);
|
|
704
|
+
e.defaultPrevented || (j(e) && (e.key === "Enter" || e.key === " ") ? (e.preventDefault(), this.host.expanded = !this.host.expanded) : j(e) && e.key === "Escape" && this.host.expanded && (e.preventDefault(), this.host.expanded = !1));
|
|
693
705
|
}, this.onDropdownKeydown = (e) => {
|
|
694
|
-
if (e.
|
|
706
|
+
if (e.defaultPrevented) return;
|
|
707
|
+
if (j(e) && e.key === "Escape") {
|
|
695
708
|
e.preventDefault(), this._closeAndRefocus();
|
|
696
709
|
return;
|
|
697
710
|
}
|
|
698
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
711
|
+
if (j(e) && (e.key === "Enter" || e.key === " ")) {
|
|
699
712
|
let t = e.target;
|
|
700
713
|
t instanceof HTMLElement && t.classList.contains("ga-side-navigation__footer-dropdown-item") && (e.preventDefault(), t.click());
|
|
701
714
|
return;
|
|
702
715
|
}
|
|
703
|
-
if (e.key === "Tab"
|
|
716
|
+
if (j(e) && e.key === "Tab") {
|
|
704
717
|
let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__footer-dropdown-item")), n = t[t.length - 1];
|
|
705
718
|
n && e.target === n && (this.host.expanded = !1);
|
|
706
719
|
return;
|
|
707
720
|
}
|
|
708
|
-
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
721
|
+
if (A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
709
722
|
e.preventDefault();
|
|
710
723
|
let t = this.host.querySelector(".ga-side-navigation__footer-dropdown");
|
|
711
724
|
if (!t) return;
|
|
@@ -725,7 +738,7 @@ var ct = class {
|
|
|
725
738
|
this.host.querySelector(".ga-side-navigation__user")?.focus();
|
|
726
739
|
});
|
|
727
740
|
}
|
|
728
|
-
},
|
|
741
|
+
}, dt = class {
|
|
729
742
|
constructor(e, t, n) {
|
|
730
743
|
this._onPointerDown = (e) => {
|
|
731
744
|
let t = e.composedPath();
|
|
@@ -742,79 +755,40 @@ var ct = class {
|
|
|
742
755
|
hostDisconnected() {
|
|
743
756
|
document.removeEventListener("pointerdown", this._onPointerDown, !0);
|
|
744
757
|
}
|
|
745
|
-
},
|
|
746
|
-
|
|
747
|
-
:where(.ga-side-navigation__user),
|
|
748
|
-
:where(.ga-side-navigation__footer-dropdown-item) {
|
|
749
|
-
width: 100%;
|
|
750
|
-
cursor: pointer;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
.ga-side-navigation__footer-dropdown-item:focus-visible {
|
|
754
|
-
outline: 2px solid var(--ga-color-border-focus);
|
|
755
|
-
outline-offset: 4px;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
.vsn-side-navigation__user-info {
|
|
759
|
-
display: flex;
|
|
760
|
-
flex-direction: column;
|
|
761
|
-
flex: 1;
|
|
762
|
-
min-width: 0;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
.vsn-side-navigation__user-info > .ga-side-navigation__user-name {
|
|
766
|
-
flex: initial;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
.vsn-side-navigation__user-email {
|
|
770
|
-
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
771
|
-
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
772
|
-
font-weight: 400;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
.vsn-side-navigation__user-avatar--icon {
|
|
776
|
-
display: inline-flex;
|
|
777
|
-
align-items: center;
|
|
778
|
-
justify-content: center;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
`, dt = "initials";
|
|
782
|
-
function ft(e, t, n, r) {
|
|
758
|
+
}, ft = "initials";
|
|
759
|
+
function pt(e, t, n, r) {
|
|
783
760
|
if (!t) return;
|
|
784
761
|
let i = new URLSearchParams({
|
|
785
|
-
type:
|
|
762
|
+
type: ft,
|
|
786
763
|
size: r
|
|
787
764
|
});
|
|
788
765
|
return n && i.set("client_id", n), `${e}${t}?${i}`;
|
|
789
766
|
}
|
|
790
767
|
//#endregion
|
|
791
768
|
//#region src/components/vsn-side-bar/vsn-footer/vsn-footer.ts
|
|
792
|
-
var
|
|
793
|
-
profile:
|
|
794
|
-
logout:
|
|
795
|
-
},
|
|
769
|
+
var mt = {
|
|
770
|
+
profile: et,
|
|
771
|
+
logout: tt
|
|
772
|
+
}, ht = () => ({
|
|
796
773
|
profile: x("My profile"),
|
|
797
774
|
logout: x("Log out")
|
|
798
|
-
}),
|
|
799
|
-
static {
|
|
800
|
-
this.styles = [h, ut];
|
|
801
|
-
}
|
|
775
|
+
}), z = class extends e {
|
|
802
776
|
createRenderRoot() {
|
|
803
777
|
return this;
|
|
804
778
|
}
|
|
805
779
|
get _items() {
|
|
806
780
|
return [{
|
|
807
781
|
id: "profile",
|
|
808
|
-
label:
|
|
782
|
+
label: ht().profile,
|
|
809
783
|
url: this.myProfileUrl
|
|
810
784
|
}, {
|
|
811
785
|
id: "logout",
|
|
812
|
-
label:
|
|
786
|
+
label: ht().logout,
|
|
813
787
|
url: "/logout"
|
|
814
788
|
}];
|
|
815
789
|
}
|
|
816
790
|
constructor() {
|
|
817
|
-
super(), this.expanded = !1, this._avatarFailed = !1, this._keyboard = new
|
|
791
|
+
super(), this.expanded = !1, this._avatarFailed = !1, this._keyboard = new ut(this), new dt(this, [".ga-side-navigation__footer-dropdown", ".ga-side-navigation__user"], () => {
|
|
818
792
|
this.expanded = !1;
|
|
819
793
|
});
|
|
820
794
|
}
|
|
@@ -826,62 +800,63 @@ var pt = {
|
|
|
826
800
|
}
|
|
827
801
|
render() {
|
|
828
802
|
return n`
|
|
829
|
-
|
|
830
|
-
|
|
803
|
+
<div class="ga-side-navigation__footer">
|
|
804
|
+
${this.expanded ? this.renderDropdown() : r}
|
|
831
805
|
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
806
|
+
<div
|
|
807
|
+
role="button"
|
|
808
|
+
tabindex="0"
|
|
809
|
+
aria-expanded="${this.expanded}"
|
|
810
|
+
aria-haspopup="menu"
|
|
811
|
+
class="ga-side-navigation__user
|
|
838
812
|
${this.expanded ? "ga-side-navigation__user--active" : ""}"
|
|
839
|
-
|
|
840
|
-
|
|
813
|
+
@click=${this._toggle}
|
|
814
|
+
@keydown=${this._keyboard.onUserKeydown}>
|
|
841
815
|
|
|
842
|
-
|
|
816
|
+
${this.renderAvatar()}
|
|
843
817
|
|
|
844
|
-
|
|
818
|
+
<div class="vsn-side-navigation__user-info">
|
|
845
819
|
<span class="ga-side-navigation__user-name">
|
|
846
820
|
${this.user.userName}
|
|
847
821
|
</span>
|
|
848
|
-
|
|
822
|
+
${this.user.userEmail ? n`<span class="vsn-side-navigation__user-email">
|
|
849
823
|
${this.user.userEmail}
|
|
850
824
|
</span>` : r}
|
|
851
|
-
|
|
825
|
+
</div>
|
|
852
826
|
|
|
853
|
-
|
|
854
|
-
${this.expanded ?
|
|
827
|
+
<span class="ga-side-navigation__user-action">
|
|
828
|
+
${this.expanded ? M(it, 16) : M(rt, 16)}
|
|
855
829
|
</span>
|
|
856
830
|
|
|
857
|
-
</div>
|
|
858
831
|
</div>
|
|
832
|
+
</div>
|
|
859
833
|
`;
|
|
860
834
|
}
|
|
861
835
|
renderDropdown() {
|
|
862
836
|
return n`
|
|
863
837
|
<div class="ga-side-navigation__footer-dropdown" @keydown=${this._keyboard.onDropdownKeydown}>
|
|
864
838
|
|
|
865
|
-
|
|
839
|
+
${this._items.map((e) => {
|
|
866
840
|
let t = n`
|
|
867
|
-
|
|
868
|
-
${
|
|
841
|
+
<span class="ga-side-navigation__footer-dropdown-icon">
|
|
842
|
+
${M(mt[e.id], 16)}
|
|
869
843
|
</span>
|
|
870
|
-
|
|
844
|
+
<span class="ga-side-navigation__footer-dropdown-title">
|
|
871
845
|
${e.label}
|
|
872
846
|
</span>
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
${
|
|
847
|
+
${e.external ? n`
|
|
848
|
+
<span class="ga-side-navigation__footer-dropdown-trail">
|
|
849
|
+
${M(nt, 16)}
|
|
876
850
|
</span>
|
|
877
|
-
|
|
878
|
-
|
|
851
|
+
` : r}
|
|
852
|
+
`;
|
|
879
853
|
return e.id === "profile" ? n`<a
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
854
|
+
class="ga-side-navigation__footer-dropdown-item"
|
|
855
|
+
href=${e.url ?? ""}
|
|
856
|
+
@click=${(t) => this._handleProfileClick(t, e)}>
|
|
857
|
+
${t}
|
|
858
|
+
</a>` : n`
|
|
859
|
+
<div
|
|
885
860
|
role="button"
|
|
886
861
|
tabindex="0"
|
|
887
862
|
class="ga-side-navigation__footer-dropdown-item"
|
|
@@ -912,60 +887,63 @@ var pt = {
|
|
|
912
887
|
}));
|
|
913
888
|
}
|
|
914
889
|
renderAvatar() {
|
|
915
|
-
let e =
|
|
890
|
+
let e = pt(this.profilePictureBaseUrl, this.user.userId, this.user.clientId, "small");
|
|
916
891
|
return e && !this._avatarFailed ? n`<img
|
|
917
892
|
class="ga-side-navigation__user-avatar"
|
|
918
893
|
src=${e}
|
|
919
894
|
alt=""
|
|
920
895
|
@error=${() => {
|
|
921
896
|
this._avatarFailed = !0;
|
|
922
|
-
}}
|
|
923
|
-
${
|
|
897
|
+
}}/>` : n`<span class="ga-side-navigation__user-avatar vsn-side-navigation__user-avatar--icon">
|
|
898
|
+
${M(et, 24)}
|
|
924
899
|
</span>`;
|
|
925
900
|
}
|
|
926
901
|
};
|
|
927
|
-
|
|
902
|
+
P([s({ attribute: !1 })], z.prototype, "user", void 0), P([s()], z.prototype, "profilePictureBaseUrl", void 0), P([s()], z.prototype, "myProfileUrl", void 0), P([s({
|
|
928
903
|
type: Boolean,
|
|
929
904
|
reflect: !0
|
|
930
|
-
})],
|
|
905
|
+
})], z.prototype, "expanded", void 0), P([l()], z.prototype, "_avatarFailed", void 0), z = P([S(), o("vsn-footer")], z);
|
|
931
906
|
//#endregion
|
|
932
907
|
//#region src/components/vsn-side-bar/vsn-header/vsn-header.keyboard.ts
|
|
933
|
-
var
|
|
908
|
+
var gt = class {
|
|
934
909
|
constructor(e) {
|
|
935
910
|
this.onSwitcherKeydown = (e) => {
|
|
936
|
-
if (e.
|
|
937
|
-
if (e
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
if (!this.host.
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
if (
|
|
948
|
-
|
|
911
|
+
if (!e.defaultPrevented) {
|
|
912
|
+
if (j(e) && (e.key === "Enter" || e.key === " ")) {
|
|
913
|
+
if (e.preventDefault(), this.host.expanded && !this.host.canClose) return;
|
|
914
|
+
(this.host.expanded || this.host.hasAvailableItems || this.host.modulesLoading) && (this.host.expanded = !this.host.expanded);
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
if (j(e) && e.key === "ArrowDown" && !this.host.expanded) {
|
|
918
|
+
if (!this.host.hasAvailableItems) return;
|
|
919
|
+
e.preventDefault(), this.host.expanded = !0;
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
if (j(e) && e.key === "Escape" && this.host.expanded) {
|
|
923
|
+
if (!this.host.canClose) return;
|
|
924
|
+
e.preventDefault(), this.host.expanded = !1;
|
|
925
|
+
}
|
|
949
926
|
}
|
|
950
927
|
}, this.host = e, e.addController(this);
|
|
951
928
|
}
|
|
952
929
|
hostConnected() {}
|
|
953
|
-
},
|
|
930
|
+
}, B = class extends e {
|
|
954
931
|
constructor(...e) {
|
|
955
|
-
super(...e), this.items = [], this.loading = !1, this._handleKeydown = (e) => {
|
|
956
|
-
if (e.
|
|
932
|
+
super(...e), this.items = [], this.loading = !1, this.maxHeight = 0, this._handleKeydown = (e) => {
|
|
933
|
+
if (e.defaultPrevented) return;
|
|
934
|
+
if (j(e) && e.key === "Escape") {
|
|
957
935
|
e.preventDefault(), this.dispatchEvent(new CustomEvent("close-request", {
|
|
958
936
|
bubbles: !0,
|
|
959
937
|
composed: !0
|
|
960
938
|
}));
|
|
961
939
|
return;
|
|
962
940
|
}
|
|
963
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
941
|
+
if (j(e) && (e.key === "Enter" || e.key === " ")) {
|
|
964
942
|
let t = e.target;
|
|
965
943
|
t instanceof HTMLElement && t.classList.contains("ga-side-navigation__switcher-dropdown-item") && (e.preventDefault(), t.click());
|
|
966
944
|
return;
|
|
967
945
|
}
|
|
968
|
-
if (e.key === "Tab"
|
|
946
|
+
if (j(e) && e.key === "Tab") {
|
|
969
947
|
let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item")), n = t[t.length - 1];
|
|
970
948
|
n && e.target === n && this.dispatchEvent(new CustomEvent("tab-exit", {
|
|
971
949
|
bubbles: !0,
|
|
@@ -973,7 +951,7 @@ var ht = class {
|
|
|
973
951
|
}));
|
|
974
952
|
return;
|
|
975
953
|
}
|
|
976
|
-
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
954
|
+
if (A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
977
955
|
e.preventDefault();
|
|
978
956
|
let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item"));
|
|
979
957
|
if (t.length === 0) return;
|
|
@@ -999,11 +977,11 @@ var ht = class {
|
|
|
999
977
|
this.loading || this.querySelector(".ga-side-navigation__switcher-dropdown-item")?.focus();
|
|
1000
978
|
}
|
|
1001
979
|
_handleItemClick(e, t) {
|
|
1002
|
-
e.preventDefault(), this.dispatchEvent(new CustomEvent("item-select", {
|
|
980
|
+
A(e) || (e.preventDefault(), this.dispatchEvent(new CustomEvent("item-select", {
|
|
1003
981
|
detail: { id: t },
|
|
1004
982
|
bubbles: !0,
|
|
1005
983
|
composed: !0
|
|
1006
|
-
}));
|
|
984
|
+
})));
|
|
1007
985
|
}
|
|
1008
986
|
render() {
|
|
1009
987
|
return this.loading ? n`
|
|
@@ -1014,11 +992,12 @@ var ht = class {
|
|
|
1014
992
|
<span class="vsn-spinner"></span>
|
|
1015
993
|
</div>
|
|
1016
994
|
` : n`
|
|
1017
|
-
<div class="ga-side-navigation__switcher-dropdown"
|
|
995
|
+
<div class="ga-side-navigation__switcher-dropdown ga-scroll"
|
|
1018
996
|
role="menu"
|
|
1019
|
-
|
|
997
|
+
style=${`max-height: ${Math.max(0, this.maxHeight)}px`}
|
|
998
|
+
aria-label=${Ie()}
|
|
1020
999
|
@keydown=${this._handleKeydown}>
|
|
1021
|
-
<span class="ga-side-navigation__switcher-dropdown-header">${
|
|
1000
|
+
<span class="ga-side-navigation__switcher-dropdown-header">${Ie()}</span>
|
|
1022
1001
|
${this.items.map((e) => n`
|
|
1023
1002
|
<a class="ga-side-navigation__switcher-dropdown-item"
|
|
1024
1003
|
href=${e.url ?? ""}
|
|
@@ -1031,59 +1010,10 @@ var ht = class {
|
|
|
1031
1010
|
`;
|
|
1032
1011
|
}
|
|
1033
1012
|
};
|
|
1034
|
-
|
|
1013
|
+
P([s({ attribute: !1 })], B.prototype, "items", void 0), P([s({ type: Boolean })], B.prototype, "loading", void 0), P([s({ attribute: !1 })], B.prototype, "maxHeight", void 0), B = P([S(), o("vsn-switcher-menu")], B);
|
|
1035
1014
|
//#endregion
|
|
1036
|
-
//#region src/components/vsn-side-bar/vsn-search/vsn-search.
|
|
1037
|
-
var
|
|
1038
|
-
.vsn-search__trigger,
|
|
1039
|
-
.vsn-search__clear {
|
|
1040
|
-
display: inline-flex;
|
|
1041
|
-
align-items: center;
|
|
1042
|
-
background: none;
|
|
1043
|
-
border: none;
|
|
1044
|
-
padding: 0;
|
|
1045
|
-
cursor: pointer;
|
|
1046
|
-
flex-shrink: 0;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.vsn-search__trigger {
|
|
1050
|
-
color: var(--ga-color-icon-primary);
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.vsn-search__clear {
|
|
1054
|
-
color: var(--ga-color-icon-action);
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
.vsn-search__trigger:disabled {
|
|
1058
|
-
cursor: default;
|
|
1059
|
-
opacity: 0.5;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
.vsn-search__helper {
|
|
1063
|
-
display: -webkit-box;
|
|
1064
|
-
-webkit-box-orient: vertical;
|
|
1065
|
-
-webkit-line-clamp: 3;
|
|
1066
|
-
flex: 1 0 0;
|
|
1067
|
-
max-width: 550px;
|
|
1068
|
-
margin-inline: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
|
|
1069
|
-
padding: 0 calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
|
|
1070
|
-
overflow: hidden;
|
|
1071
|
-
text-overflow: ellipsis;
|
|
1072
|
-
font-family: var(--ga-font-family-primary);
|
|
1073
|
-
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1074
|
-
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1075
|
-
font-weight: 400;
|
|
1076
|
-
color: var(--ga-color-text-body);
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
.ga-side-navigation__search input {
|
|
1080
|
-
color: var(--ga-color-text-body);
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
.ga-side-navigation__search input::placeholder {
|
|
1084
|
-
color: var(--ga-color-text-disable-selected);
|
|
1085
|
-
}
|
|
1086
|
-
`, B = class extends e {
|
|
1015
|
+
//#region src/components/vsn-side-bar/vsn-search/vsn-search.ts
|
|
1016
|
+
var V = class extends e {
|
|
1087
1017
|
constructor(...e) {
|
|
1088
1018
|
super(...e), this.shortcut = "", this.value = "", this.loading = !1, this._emitSearch = () => {
|
|
1089
1019
|
this._canSearch && this.dispatchEvent(new CustomEvent("vsn-search-submit", {
|
|
@@ -1091,22 +1021,18 @@ var _t = t`
|
|
|
1091
1021
|
bubbles: !0,
|
|
1092
1022
|
composed: !0
|
|
1093
1023
|
}));
|
|
1094
|
-
}, this.
|
|
1095
|
-
this.dispatchEvent(new CustomEvent("vsn-search-
|
|
1096
|
-
detail: { value: this.value },
|
|
1024
|
+
}, this._emitSearchCleared = () => {
|
|
1025
|
+
this.dispatchEvent(new CustomEvent("vsn-search-cleared", {
|
|
1097
1026
|
bubbles: !0,
|
|
1098
1027
|
composed: !0
|
|
1099
1028
|
}));
|
|
1100
1029
|
}, this._handleEscape = (e) => {
|
|
1101
|
-
e.key === "Escape" && this.
|
|
1030
|
+
e.defaultPrevented || j(e) && e.key === "Escape" && this.value.length > 0 && (e.preventDefault(), this._emitSearchCleared());
|
|
1102
1031
|
};
|
|
1103
1032
|
}
|
|
1104
1033
|
createRenderRoot() {
|
|
1105
1034
|
return this;
|
|
1106
1035
|
}
|
|
1107
|
-
static {
|
|
1108
|
-
this.styles = [h, _t];
|
|
1109
|
-
}
|
|
1110
1036
|
focus() {
|
|
1111
1037
|
let e = this.querySelector("input");
|
|
1112
1038
|
e?.focus(), e?.select();
|
|
@@ -1123,7 +1049,7 @@ var _t = t`
|
|
|
1123
1049
|
}));
|
|
1124
1050
|
}
|
|
1125
1051
|
_handleEnter(e) {
|
|
1126
|
-
e.key === "Enter" && this._emitSearch();
|
|
1052
|
+
e.defaultPrevented || j(e) && e.key === "Enter" && this._emitSearch();
|
|
1127
1053
|
}
|
|
1128
1054
|
render() {
|
|
1129
1055
|
let e = this.value.length > 0 && this.value.length < 3;
|
|
@@ -1135,16 +1061,17 @@ var _t = t`
|
|
|
1135
1061
|
aria-label=${x("Search")}
|
|
1136
1062
|
?disabled=${!this._canSearch}
|
|
1137
1063
|
@click=${this._emitSearch}>
|
|
1138
|
-
${
|
|
1064
|
+
${M(at, 24)}
|
|
1139
1065
|
</button>
|
|
1140
1066
|
<input type="search"
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1067
|
+
.placeholder=${Le()}
|
|
1068
|
+
.value=${this.value}
|
|
1069
|
+
@input=${this._handleInput}
|
|
1070
|
+
@keydown=${this._handleEnter}/>
|
|
1145
1071
|
${this._trailingSlot()}
|
|
1146
1072
|
</div>
|
|
1147
|
-
${u(e, () => n
|
|
1073
|
+
${u(e, () => n`
|
|
1074
|
+
<div class="vsn-search__helper">${ze(3)}</div>`)}
|
|
1148
1075
|
`;
|
|
1149
1076
|
}
|
|
1150
1077
|
_trailingSlot() {
|
|
@@ -1161,8 +1088,8 @@ var _t = t`
|
|
|
1161
1088
|
_clearButton() {
|
|
1162
1089
|
return n`
|
|
1163
1090
|
<button class="vsn-search__clear" aria-label=${x("Clear search")}
|
|
1164
|
-
|
|
1165
|
-
${
|
|
1091
|
+
@click=${this._emitSearchCleared}>
|
|
1092
|
+
${M(ot, 16)}
|
|
1166
1093
|
</button>
|
|
1167
1094
|
`;
|
|
1168
1095
|
}
|
|
@@ -1170,18 +1097,15 @@ var _t = t`
|
|
|
1170
1097
|
return n`<kbd class="ga-side-navigation__search-shortcut">${this.shortcut}</kbd>`;
|
|
1171
1098
|
}
|
|
1172
1099
|
};
|
|
1173
|
-
|
|
1100
|
+
P([s()], V.prototype, "shortcut", void 0), P([s()], V.prototype, "value", void 0), P([s({ type: Boolean })], V.prototype, "loading", void 0), V = P([S(), o("vsn-search")], V);
|
|
1174
1101
|
//#endregion
|
|
1175
1102
|
//#region src/components/vsn-side-bar/vsn-header/vsn-header.ts
|
|
1176
|
-
var
|
|
1103
|
+
var H = class extends e {
|
|
1177
1104
|
createRenderRoot() {
|
|
1178
1105
|
return this;
|
|
1179
1106
|
}
|
|
1180
|
-
static {
|
|
1181
|
-
this.styles = [h, a(gt)];
|
|
1182
|
-
}
|
|
1183
1107
|
constructor() {
|
|
1184
|
-
super(), this.modules = [], this.modulesLoading = !1, this.hasMenu = !1, this.searchValue = "", this.searchLoading = !1, this.expanded = !1, this._keyboard = new
|
|
1108
|
+
super(), this.modules = [], this.modulesLoading = !1, this.hasMenu = !1, this.moduleSwitcherMaxHeight = 0, this.searchValue = "", this.searchLoading = !1, this.expanded = !1, this._keyboard = new gt(this), new dt(this, [".ga-side-navigation__switcher-dropdown", ".ga-side-navigation__switcher"], () => {
|
|
1185
1109
|
this.canClose && (this.expanded = !1);
|
|
1186
1110
|
});
|
|
1187
1111
|
}
|
|
@@ -1199,29 +1123,28 @@ var V = class extends e {
|
|
|
1199
1123
|
@keydown=${this._keyboard.onSwitcherKeydown}
|
|
1200
1124
|
title="">
|
|
1201
1125
|
<span class="ga-side-navigation__switcher-title">${e.title}</span>
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
</span>
|
|
1206
|
-
`)}
|
|
1126
|
+
<span class="ga-side-navigation__switcher-action">
|
|
1127
|
+
${this.canClose ? this.expanded ? M(N, 16) : M(rt, 16) : M(Ke, 16)}
|
|
1128
|
+
</span>
|
|
1207
1129
|
</div>
|
|
1208
1130
|
|
|
1209
1131
|
${u(this.expanded, () => n`
|
|
1210
1132
|
<vsn-switcher-menu
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1133
|
+
.items=${e.kind === "loading" ? [] : e.available}
|
|
1134
|
+
.loading=${e.kind === "loading"}
|
|
1135
|
+
.maxHeight=${this.moduleSwitcherMaxHeight}
|
|
1136
|
+
@item-select=${this._onItemSelect}
|
|
1137
|
+
@close-request=${this._onCloseRequest}
|
|
1138
|
+
@focus-switcher=${this._onFocusSwitcher}
|
|
1139
|
+
@tab-exit=${this._onTabExit}>
|
|
1217
1140
|
</vsn-switcher-menu>`)}
|
|
1218
1141
|
</div>
|
|
1219
1142
|
|
|
1220
1143
|
${u(this.search?.enabled, () => n`
|
|
1221
1144
|
<vsn-search
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1145
|
+
.shortcut=${Re()}
|
|
1146
|
+
.value=${this.searchValue}
|
|
1147
|
+
.loading=${this.searchLoading}>
|
|
1225
1148
|
</vsn-search>`)}
|
|
1226
1149
|
</div>
|
|
1227
1150
|
`;
|
|
@@ -1229,7 +1152,7 @@ var V = class extends e {
|
|
|
1229
1152
|
get _state() {
|
|
1230
1153
|
if (this.modulesLoading) return {
|
|
1231
1154
|
kind: "loading",
|
|
1232
|
-
title: this.activeModuleLabel ||
|
|
1155
|
+
title: this.activeModuleLabel || He()
|
|
1233
1156
|
};
|
|
1234
1157
|
let e = this.modules.find((e) => e.id === this.activeModuleId);
|
|
1235
1158
|
return e ? {
|
|
@@ -1238,7 +1161,7 @@ var V = class extends e {
|
|
|
1238
1161
|
available: this.modules.filter((t) => t.id !== e.id)
|
|
1239
1162
|
} : {
|
|
1240
1163
|
kind: "no-active",
|
|
1241
|
-
title:
|
|
1164
|
+
title: He(),
|
|
1242
1165
|
available: this.modules
|
|
1243
1166
|
};
|
|
1244
1167
|
}
|
|
@@ -1282,85 +1205,16 @@ var V = class extends e {
|
|
|
1282
1205
|
this.canClose && (this.expanded = !1);
|
|
1283
1206
|
}
|
|
1284
1207
|
};
|
|
1285
|
-
|
|
1208
|
+
P([s({ attribute: !1 })], H.prototype, "modules", void 0), P([s()], H.prototype, "activeModuleId", void 0), P([s()], H.prototype, "activeModuleLabel", void 0), P([s({ type: Boolean })], H.prototype, "modulesLoading", void 0), P([s({ type: Boolean })], H.prototype, "hasMenu", void 0), P([s({ attribute: !1 })], H.prototype, "moduleSwitcherMaxHeight", void 0), P([s({ attribute: !1 })], H.prototype, "search", void 0), P([s()], H.prototype, "searchValue", void 0), P([s({ type: Boolean })], H.prototype, "searchLoading", void 0), P([s({
|
|
1286
1209
|
type: Boolean,
|
|
1287
1210
|
reflect: !0
|
|
1288
|
-
})],
|
|
1211
|
+
})], H.prototype, "expanded", void 0), H = P([S(), o("vsn-header")], H);
|
|
1289
1212
|
//#endregion
|
|
1290
|
-
//#region src/components/vsn-side-bar/vsn-search-results/vsn-search-results.
|
|
1291
|
-
var
|
|
1292
|
-
.vsn-search-results__empty {
|
|
1293
|
-
display: flex;
|
|
1294
|
-
flex-direction: column;
|
|
1295
|
-
align-items: center;
|
|
1296
|
-
padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1297
|
-
text-align: center;
|
|
1298
|
-
gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
.vsn-search-results__empty-title {
|
|
1302
|
-
font-family: var(--ga-font-family-primary);
|
|
1303
|
-
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1304
|
-
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1305
|
-
font-weight: 600;
|
|
1306
|
-
margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
.vsn-search-results__empty-message,
|
|
1310
|
-
.vsn-search-results__empty-hint {
|
|
1311
|
-
font-family: var(--ga-font-family-primary);
|
|
1312
|
-
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1313
|
-
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1314
|
-
font-weight: 400;
|
|
1315
|
-
color: var(--ga-color-text-disable-selected);
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
.vsn-search-results__empty-support {
|
|
1319
|
-
margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1320
|
-
font-family: var(--ga-font-family-primary);
|
|
1321
|
-
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1322
|
-
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1323
|
-
font-weight: 400;
|
|
1324
|
-
color: var(--ga-color-text-on-disabled);
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
.vsn-search-results__error {
|
|
1328
|
-
display: flex;
|
|
1329
|
-
flex-direction: column;
|
|
1330
|
-
align-items: center;
|
|
1331
|
-
padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1332
|
-
text-align: center;
|
|
1333
|
-
font-family: var(--ga-font-family-primary);
|
|
1334
|
-
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1335
|
-
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1336
|
-
font-weight: 400;
|
|
1337
|
-
color: var(--ga-color-text-body);
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
.vsn-search-results__load-more {
|
|
1341
|
-
width: 100%;
|
|
1342
|
-
padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 4 * var(--ga-base-scaling-factor, 1));
|
|
1343
|
-
background: none;
|
|
1344
|
-
border: none;
|
|
1345
|
-
cursor: pointer;
|
|
1346
|
-
color: var(--ga-color-text-action);
|
|
1347
|
-
text-align: center;
|
|
1348
|
-
font-family: var(--ga-font-family-primary);
|
|
1349
|
-
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1350
|
-
font-style: normal;
|
|
1351
|
-
font-weight: 500;
|
|
1352
|
-
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1353
|
-
letter-spacing: var(--ga-text-md-letter-spacing);
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
.vsn-search-results__load-more:disabled {
|
|
1357
|
-
cursor: not-allowed;
|
|
1358
|
-
opacity: 0.5;
|
|
1359
|
-
}
|
|
1360
|
-
`, yt = class {
|
|
1213
|
+
//#region src/components/vsn-side-bar/vsn-search-results/vsn-search-results.keyboard.ts
|
|
1214
|
+
var _t = class {
|
|
1361
1215
|
constructor(e) {
|
|
1362
1216
|
this.onResultsKeydown = (e) => {
|
|
1363
|
-
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
1217
|
+
if (e.defaultPrevented || A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
1364
1218
|
e.preventDefault();
|
|
1365
1219
|
let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__search-results-item"));
|
|
1366
1220
|
if (t.length === 0) return;
|
|
@@ -1371,16 +1225,13 @@ var vt = t`
|
|
|
1371
1225
|
}, this.host = e, e.addController(this);
|
|
1372
1226
|
}
|
|
1373
1227
|
hostConnected() {}
|
|
1374
|
-
},
|
|
1228
|
+
}, U = class extends e {
|
|
1375
1229
|
constructor(...e) {
|
|
1376
|
-
super(...e), this.loadingMore = !1, this._keyboard = new
|
|
1230
|
+
super(...e), this.loadingMore = !1, this._keyboard = new _t(this);
|
|
1377
1231
|
}
|
|
1378
1232
|
createRenderRoot() {
|
|
1379
1233
|
return this;
|
|
1380
1234
|
}
|
|
1381
|
-
static {
|
|
1382
|
-
this.styles = [h, vt];
|
|
1383
|
-
}
|
|
1384
1235
|
render() {
|
|
1385
1236
|
return this.errorMessage ? this._errorState(this.errorMessage) : this.results === void 0 ? n`${r}` : this.results.length === 0 ? this._emptyState() : this._resultsList(this.results);
|
|
1386
1237
|
}
|
|
@@ -1404,7 +1255,8 @@ var vt = t`
|
|
|
1404
1255
|
_resultsList(e) {
|
|
1405
1256
|
let t = e.length;
|
|
1406
1257
|
return n`
|
|
1407
|
-
<div class="ga-side-navigation__body h-full"
|
|
1258
|
+
<div class="ga-side-navigation__body h-full ga-scroll"
|
|
1259
|
+
@keydown=${this._keyboard.onResultsKeydown}>
|
|
1408
1260
|
<div class="ga-side-navigation__search-results-title">
|
|
1409
1261
|
${x(t === 1 ? b`${t} result` : b`${t} results`)}
|
|
1410
1262
|
</div>
|
|
@@ -1415,7 +1267,7 @@ var vt = t`
|
|
|
1415
1267
|
class="vsn-search-results__load-more"
|
|
1416
1268
|
?disabled=${this.loadingMore}
|
|
1417
1269
|
@click=${this._onLoadMore}>
|
|
1418
|
-
${
|
|
1270
|
+
${Ve(30)}
|
|
1419
1271
|
</button>
|
|
1420
1272
|
`)}
|
|
1421
1273
|
</div>
|
|
@@ -1450,44 +1302,26 @@ var vt = t`
|
|
|
1450
1302
|
}));
|
|
1451
1303
|
}
|
|
1452
1304
|
};
|
|
1453
|
-
|
|
1305
|
+
P([s({ attribute: !1 })], U.prototype, "results", void 0), P([s()], U.prototype, "errorMessage", void 0), P([s()], U.prototype, "nextCursor", void 0), P([s({ type: Boolean })], U.prototype, "loadingMore", void 0), U = P([S(), o("vsn-search-results")], U);
|
|
1454
1306
|
//#endregion
|
|
1455
|
-
//#region src/components/vsn-side-bar/vsn-template/vsn-template.
|
|
1456
|
-
var
|
|
1457
|
-
.vsn-template__row {
|
|
1458
|
-
display: flex;
|
|
1459
|
-
flex-direction: column;
|
|
1460
|
-
align-items: flex-start;
|
|
1461
|
-
align-self: stretch;
|
|
1462
|
-
padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) 0;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
.vsn-template__bar {
|
|
1466
|
-
height: calc(1rem * var(--ga-base-scaling-factor, 1));
|
|
1467
|
-
border-radius: var(--ga-radius);
|
|
1468
|
-
background: var(--ga-color-miscellaneous-skeleton-element, #F2F3F5);
|
|
1469
|
-
flex-shrink: 0;
|
|
1470
|
-
}
|
|
1471
|
-
`, xt = [
|
|
1307
|
+
//#region src/components/vsn-side-bar/vsn-template/vsn-template.ts
|
|
1308
|
+
var vt = [
|
|
1472
1309
|
160,
|
|
1473
1310
|
96,
|
|
1474
1311
|
144,
|
|
1475
1312
|
192,
|
|
1476
1313
|
160
|
|
1477
|
-
],
|
|
1314
|
+
], yt = class extends e {
|
|
1478
1315
|
createRenderRoot() {
|
|
1479
1316
|
return this;
|
|
1480
1317
|
}
|
|
1481
|
-
static {
|
|
1482
|
-
this.styles = [h, bt];
|
|
1483
|
-
}
|
|
1484
1318
|
render() {
|
|
1485
1319
|
return n`
|
|
1486
1320
|
<div class="ga-side-navigation__body h-full"
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
${
|
|
1321
|
+
role="status"
|
|
1322
|
+
aria-busy="true"
|
|
1323
|
+
aria-label=${x("Loading results")}>
|
|
1324
|
+
${vt.map((e) => n`
|
|
1491
1325
|
<div class="vsn-template__row">
|
|
1492
1326
|
<div class="vsn-template__bar" style="width: ${e}px"></div>
|
|
1493
1327
|
</div>
|
|
@@ -1496,59 +1330,17 @@ var bt = t`
|
|
|
1496
1330
|
`;
|
|
1497
1331
|
}
|
|
1498
1332
|
};
|
|
1499
|
-
|
|
1333
|
+
yt = P([S(), o("vsn-template")], yt);
|
|
1500
1334
|
//#endregion
|
|
1501
|
-
//#region src/components/vsn-side-bar/vsn-error-state/vsn-error-state.
|
|
1502
|
-
var
|
|
1503
|
-
.vsn-error-state {
|
|
1504
|
-
display: flex;
|
|
1505
|
-
flex-direction: column;
|
|
1506
|
-
align-items: flex-start;
|
|
1507
|
-
padding: calc(1.5rem * var(--ga-base-scaling-factor, 1)) calc(1rem * var(--ga-base-scaling-factor, 1));
|
|
1508
|
-
gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
.vsn-error-state__icon {
|
|
1512
|
-
display: inline-flex;
|
|
1513
|
-
color: var(--ga-color-icon-error);
|
|
1514
|
-
margin-bottom: calc(0.5rem * var(--ga-base-scaling-factor, 1));
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
.vsn-error-state__title {
|
|
1518
|
-
font-family: var(--ga-font-family-primary);
|
|
1519
|
-
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1520
|
-
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1521
|
-
font-weight: 600;
|
|
1522
|
-
margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
.vsn-error-state__message,
|
|
1526
|
-
.vsn-error-state__hint {
|
|
1527
|
-
font-family: var(--ga-font-family-primary);
|
|
1528
|
-
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1529
|
-
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1530
|
-
font-weight: 400;
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
.vsn-error-state__support {
|
|
1534
|
-
margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1535
|
-
font-family: var(--ga-font-family-primary);
|
|
1536
|
-
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1537
|
-
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1538
|
-
font-weight: 400;
|
|
1539
|
-
color: var(--ga-color-text-on-disabled);
|
|
1540
|
-
}
|
|
1541
|
-
`, wt = class extends e {
|
|
1335
|
+
//#region src/components/vsn-side-bar/vsn-error-state/vsn-error-state.ts
|
|
1336
|
+
var bt = class extends e {
|
|
1542
1337
|
createRenderRoot() {
|
|
1543
1338
|
return this;
|
|
1544
1339
|
}
|
|
1545
|
-
static {
|
|
1546
|
-
this.styles = [h, Ct];
|
|
1547
|
-
}
|
|
1548
1340
|
render() {
|
|
1549
1341
|
return n`
|
|
1550
1342
|
<div class="vsn-error-state" role="alert" aria-live="assertive">
|
|
1551
|
-
<div class="vsn-error-state__icon">${
|
|
1343
|
+
<div class="vsn-error-state__icon">${M(st, 24)}</div>
|
|
1552
1344
|
<div class="vsn-error-state__title">${x("Loading error")}</div>
|
|
1553
1345
|
<div class="vsn-error-state__message">${x("We're unable to load the menu.")}</div>
|
|
1554
1346
|
<div class="vsn-error-state__hint">${x("Please check your internet connection and try again.")}</div>
|
|
@@ -1557,43 +1349,19 @@ var Ct = t`
|
|
|
1557
1349
|
`;
|
|
1558
1350
|
}
|
|
1559
1351
|
};
|
|
1560
|
-
|
|
1352
|
+
bt = P([S(), o("vsn-error-state")], bt);
|
|
1561
1353
|
//#endregion
|
|
1562
|
-
//#region src/components/vsn-side-bar/vsn-search-scopes/vsn-search-scopes.
|
|
1563
|
-
var
|
|
1564
|
-
@layer components {
|
|
1565
|
-
vsn-search-scopes {
|
|
1566
|
-
display: block;
|
|
1567
|
-
flex-shrink: 0;
|
|
1568
|
-
padding: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
vsn-search-scopes .ga-radio-group {
|
|
1572
|
-
gap: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
vsn-search-scopes .ga-radio-button__label {
|
|
1576
|
-
line-height: calc(0.25rem * 6 * var(--ga-base-scaling-factor, 1));
|
|
1577
|
-
display: -webkit-box;
|
|
1578
|
-
-webkit-box-orient: vertical;
|
|
1579
|
-
-webkit-line-clamp: 1;
|
|
1580
|
-
overflow: hidden;
|
|
1581
|
-
text-overflow: ellipsis;
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
`, U, W = class extends e {
|
|
1354
|
+
//#region src/components/vsn-side-bar/vsn-search-scopes/vsn-search-scopes.ts
|
|
1355
|
+
var W, G = class extends e {
|
|
1585
1356
|
static {
|
|
1586
|
-
|
|
1357
|
+
W = this;
|
|
1587
1358
|
}
|
|
1588
1359
|
constructor(...e) {
|
|
1589
|
-
super(...e), this.scopes = [], this.selectedScopeId = "", this._name = `vsn-search-scope-${++
|
|
1360
|
+
super(...e), this.scopes = [], this.selectedScopeId = "", this._name = `vsn-search-scope-${++W._counter}`;
|
|
1590
1361
|
}
|
|
1591
1362
|
createRenderRoot() {
|
|
1592
1363
|
return this;
|
|
1593
1364
|
}
|
|
1594
|
-
static {
|
|
1595
|
-
this.styles = [h, Tt];
|
|
1596
|
-
}
|
|
1597
1365
|
static {
|
|
1598
1366
|
this._counter = 0;
|
|
1599
1367
|
}
|
|
@@ -1628,16 +1396,16 @@ var Tt = t`
|
|
|
1628
1396
|
}));
|
|
1629
1397
|
}
|
|
1630
1398
|
};
|
|
1631
|
-
|
|
1399
|
+
P([s({ attribute: !1 })], G.prototype, "scopes", void 0), P([s()], G.prototype, "selectedScopeId", void 0), G = W = P([S(), o("vsn-search-scopes")], G);
|
|
1632
1400
|
//#endregion
|
|
1633
1401
|
//#region src/shared/lang/locale-codes.ts
|
|
1634
|
-
var
|
|
1402
|
+
var xt = "en", St = [
|
|
1635
1403
|
"da",
|
|
1636
1404
|
"fi",
|
|
1637
1405
|
"nl",
|
|
1638
1406
|
"no",
|
|
1639
1407
|
"sv"
|
|
1640
|
-
],
|
|
1408
|
+
], Ct = /* @__PURE__ */ p({ templates: () => wt }), wt = {
|
|
1641
1409
|
s09a45db408570a7a: "Min profil",
|
|
1642
1410
|
s119f9875b7d4cdfc: "Har du brug for hjælp? Kontakt support.",
|
|
1643
1411
|
s1228605ee65ddefa: b`${0} resultat`,
|
|
@@ -1667,7 +1435,7 @@ var Et = "en", Dt = [
|
|
|
1667
1435
|
sfbf31f663cef6cc2: "Prøv andre søgeord eller tjek stavningen.",
|
|
1668
1436
|
s7c510419ea376840: "VSN",
|
|
1669
1437
|
s38385cd359b17f7a: "Loading modules"
|
|
1670
|
-
},
|
|
1438
|
+
}, Tt = /* @__PURE__ */ p({ templates: () => Et }), Et = {
|
|
1671
1439
|
s09a45db408570a7a: "Oma profiili",
|
|
1672
1440
|
s119f9875b7d4cdfc: "Tarvitsetko apua? Ota yhteyttä tukeen.",
|
|
1673
1441
|
s1228605ee65ddefa: b`${0} tulos`,
|
|
@@ -1697,7 +1465,7 @@ var Et = "en", Dt = [
|
|
|
1697
1465
|
sfbf31f663cef6cc2: "Kokeile eri hakusanoja tai tarkista kirjoitusasu.",
|
|
1698
1466
|
s7c510419ea376840: "VSN",
|
|
1699
1467
|
s38385cd359b17f7a: "Loading modules"
|
|
1700
|
-
},
|
|
1468
|
+
}, Dt = /* @__PURE__ */ p({ templates: () => Ot }), Ot = {
|
|
1701
1469
|
s09a45db408570a7a: "Mijn profiel",
|
|
1702
1470
|
s119f9875b7d4cdfc: "Hulp nodig? Neem contact op met ondersteuning.",
|
|
1703
1471
|
s1228605ee65ddefa: b`${0} resultaat`,
|
|
@@ -1727,7 +1495,7 @@ var Et = "en", Dt = [
|
|
|
1727
1495
|
sfbf31f663cef6cc2: "Probeer andere zoekwoorden of controleer de spelling.",
|
|
1728
1496
|
s7c510419ea376840: "VSN",
|
|
1729
1497
|
s38385cd359b17f7a: "Loading modules"
|
|
1730
|
-
},
|
|
1498
|
+
}, kt = /* @__PURE__ */ p({ templates: () => At }), At = {
|
|
1731
1499
|
s09a45db408570a7a: "Min profil",
|
|
1732
1500
|
s119f9875b7d4cdfc: "Trenger du hjelp? Kontakt støtte.",
|
|
1733
1501
|
s1228605ee65ddefa: b`${0} resultat`,
|
|
@@ -1757,7 +1525,7 @@ var Et = "en", Dt = [
|
|
|
1757
1525
|
sfbf31f663cef6cc2: "Prøv andre søkeord eller sjekk stavemåten.",
|
|
1758
1526
|
s7c510419ea376840: "VSN",
|
|
1759
1527
|
s38385cd359b17f7a: "Loading modules"
|
|
1760
|
-
},
|
|
1528
|
+
}, jt = /* @__PURE__ */ p({ templates: () => Mt }), Mt = {
|
|
1761
1529
|
s09a45db408570a7a: "Min profil",
|
|
1762
1530
|
s119f9875b7d4cdfc: "Behöver du hjälp? Kontakta support.",
|
|
1763
1531
|
s1228605ee65ddefa: b`${0} resultat`,
|
|
@@ -1787,31 +1555,260 @@ var Et = "en", Dt = [
|
|
|
1787
1555
|
sfbf31f663cef6cc2: "Prova andra sökord eller kontrollera stavningen.",
|
|
1788
1556
|
s7c510419ea376840: "VSN",
|
|
1789
1557
|
s38385cd359b17f7a: "Loading modules"
|
|
1790
|
-
},
|
|
1791
|
-
da:
|
|
1792
|
-
fi:
|
|
1793
|
-
nl:
|
|
1794
|
-
no:
|
|
1795
|
-
sv:
|
|
1796
|
-
}, { getLocale:
|
|
1797
|
-
sourceLocale:
|
|
1798
|
-
targetLocales:
|
|
1799
|
-
loadLocale: (e) =>
|
|
1800
|
-
}),
|
|
1558
|
+
}, Nt = {
|
|
1559
|
+
da: Ct,
|
|
1560
|
+
fi: Tt,
|
|
1561
|
+
nl: Dt,
|
|
1562
|
+
no: kt,
|
|
1563
|
+
sv: jt
|
|
1564
|
+
}, { getLocale: Pt, setLocale: Ft } = je({
|
|
1565
|
+
sourceLocale: xt,
|
|
1566
|
+
targetLocales: St,
|
|
1567
|
+
loadLocale: (e) => Nt[e] ? Promise.resolve(Nt[e]) : Promise.reject(/* @__PURE__ */ Error(`Unknown locale: ${e}`))
|
|
1568
|
+
}), It = t`
|
|
1569
|
+
@layer components {
|
|
1570
|
+
:where(.ga-side-navigation__user),
|
|
1571
|
+
:where(.ga-side-navigation__footer-dropdown-item) {
|
|
1572
|
+
width: 100%;
|
|
1573
|
+
cursor: pointer;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
.ga-side-navigation__footer-dropdown-item:focus-visible {
|
|
1577
|
+
outline: 2px solid var(--ga-color-border-focus);
|
|
1578
|
+
outline-offset: 4px;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
.vsn-side-navigation__user-info {
|
|
1582
|
+
display: flex;
|
|
1583
|
+
flex-direction: column;
|
|
1584
|
+
flex: 1;
|
|
1585
|
+
min-width: 0;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
.vsn-side-navigation__user-info > .ga-side-navigation__user-name {
|
|
1589
|
+
flex: initial;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.vsn-side-navigation__user-email {
|
|
1593
|
+
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1594
|
+
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1595
|
+
font-weight: 400;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.vsn-side-navigation__user-avatar--icon {
|
|
1599
|
+
display: inline-flex;
|
|
1600
|
+
align-items: center;
|
|
1601
|
+
justify-content: center;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
`, Lt = t`
|
|
1605
|
+
@layer components {
|
|
1606
|
+
.vsn-switcher-anchor {
|
|
1607
|
+
position: relative;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
.ga-side-navigation__switcher-dropdown {
|
|
1611
|
+
position: absolute;
|
|
1612
|
+
top: 100%;
|
|
1613
|
+
left: 0;
|
|
1614
|
+
right: 0;
|
|
1615
|
+
z-index: 10;
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
`, Rt = t`
|
|
1619
|
+
.vsn-search__trigger,
|
|
1620
|
+
.vsn-search__clear {
|
|
1621
|
+
display: inline-flex;
|
|
1622
|
+
align-items: center;
|
|
1623
|
+
background: none;
|
|
1624
|
+
border: none;
|
|
1625
|
+
padding: 0;
|
|
1626
|
+
cursor: pointer;
|
|
1627
|
+
flex-shrink: 0;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
.vsn-search__trigger {
|
|
1631
|
+
color: var(--ga-color-icon-primary);
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
.vsn-search__clear {
|
|
1635
|
+
color: var(--ga-color-icon-action);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
.vsn-search__trigger:disabled {
|
|
1639
|
+
cursor: default;
|
|
1640
|
+
opacity: 0.5;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
.vsn-search__helper {
|
|
1644
|
+
display: -webkit-box;
|
|
1645
|
+
-webkit-box-orient: vertical;
|
|
1646
|
+
-webkit-line-clamp: 3;
|
|
1647
|
+
flex: 1 0 0;
|
|
1648
|
+
max-width: 550px;
|
|
1649
|
+
margin-inline: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
|
|
1650
|
+
padding: 0 calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
|
|
1651
|
+
overflow: hidden;
|
|
1652
|
+
text-overflow: ellipsis;
|
|
1653
|
+
font-family: var(--ga-font-family-primary);
|
|
1654
|
+
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1655
|
+
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1656
|
+
font-weight: 400;
|
|
1657
|
+
color: var(--ga-color-text-body);
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
.ga-side-navigation__search input {
|
|
1661
|
+
color: var(--ga-color-text-body);
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
.ga-side-navigation__search input::placeholder {
|
|
1665
|
+
color: var(--ga-color-text-disable-selected);
|
|
1666
|
+
}
|
|
1667
|
+
`, zt = t`
|
|
1668
|
+
.vsn-search-results__empty {
|
|
1669
|
+
display: flex;
|
|
1670
|
+
flex-direction: column;
|
|
1671
|
+
align-items: center;
|
|
1672
|
+
padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1673
|
+
text-align: center;
|
|
1674
|
+
gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
.vsn-search-results__empty-title {
|
|
1678
|
+
font-family: var(--ga-font-family-primary);
|
|
1679
|
+
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1680
|
+
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1681
|
+
font-weight: 600;
|
|
1682
|
+
margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
.vsn-search-results__empty-message,
|
|
1686
|
+
.vsn-search-results__empty-hint {
|
|
1687
|
+
font-family: var(--ga-font-family-primary);
|
|
1688
|
+
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1689
|
+
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1690
|
+
font-weight: 400;
|
|
1691
|
+
color: var(--ga-color-text-disable-selected);
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
.vsn-search-results__empty-support {
|
|
1695
|
+
margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1696
|
+
font-family: var(--ga-font-family-primary);
|
|
1697
|
+
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1698
|
+
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1699
|
+
font-weight: 400;
|
|
1700
|
+
color: var(--ga-color-text-on-disabled);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
.vsn-search-results__error {
|
|
1704
|
+
display: flex;
|
|
1705
|
+
flex-direction: column;
|
|
1706
|
+
align-items: center;
|
|
1707
|
+
padding: calc(2rem * var(--ga-base-scaling-factor, 1)) calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1708
|
+
text-align: center;
|
|
1709
|
+
font-family: var(--ga-font-family-primary);
|
|
1710
|
+
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1711
|
+
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1712
|
+
font-weight: 400;
|
|
1713
|
+
color: var(--ga-color-text-body);
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
.vsn-search-results__load-more {
|
|
1717
|
+
width: 100%;
|
|
1718
|
+
padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 4 * var(--ga-base-scaling-factor, 1));
|
|
1719
|
+
background: none;
|
|
1720
|
+
border: none;
|
|
1721
|
+
cursor: pointer;
|
|
1722
|
+
color: var(--ga-color-text-action);
|
|
1723
|
+
text-align: center;
|
|
1724
|
+
font-family: var(--ga-font-family-primary);
|
|
1725
|
+
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1726
|
+
font-style: normal;
|
|
1727
|
+
font-weight: 500;
|
|
1728
|
+
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1729
|
+
letter-spacing: var(--ga-text-md-letter-spacing);
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
.vsn-search-results__load-more:disabled {
|
|
1733
|
+
cursor: not-allowed;
|
|
1734
|
+
opacity: 0.5;
|
|
1735
|
+
}
|
|
1736
|
+
`, Bt = t`
|
|
1801
1737
|
@layer components {
|
|
1802
|
-
|
|
1803
|
-
|
|
1738
|
+
vsn-search-scopes {
|
|
1739
|
+
display: block;
|
|
1740
|
+
flex-shrink: 0;
|
|
1741
|
+
padding: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1)) calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1));
|
|
1804
1742
|
}
|
|
1805
1743
|
|
|
1806
|
-
.ga-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1744
|
+
vsn-search-scopes .ga-radio-group {
|
|
1745
|
+
gap: calc(0.25rem * 2 * var(--ga-base-scaling-factor, 1));
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
vsn-search-scopes .ga-radio-button__label {
|
|
1749
|
+
line-height: calc(0.25rem * 6 * var(--ga-base-scaling-factor, 1));
|
|
1750
|
+
display: -webkit-box;
|
|
1751
|
+
-webkit-box-orient: vertical;
|
|
1752
|
+
-webkit-line-clamp: 1;
|
|
1753
|
+
overflow: hidden;
|
|
1754
|
+
text-overflow: ellipsis;
|
|
1812
1755
|
}
|
|
1813
1756
|
}
|
|
1757
|
+
`, Vt = t`
|
|
1758
|
+
.vsn-template__row {
|
|
1759
|
+
display: flex;
|
|
1760
|
+
flex-direction: column;
|
|
1761
|
+
align-items: flex-start;
|
|
1762
|
+
align-self: stretch;
|
|
1763
|
+
padding: calc(0.25rem * 3 * var(--ga-base-scaling-factor, 1)) 0;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
.vsn-template__bar {
|
|
1767
|
+
height: calc(1rem * var(--ga-base-scaling-factor, 1));
|
|
1768
|
+
border-radius: var(--ga-radius);
|
|
1769
|
+
background: var(--ga-color-miscellaneous-skeleton-element, #F2F3F5);
|
|
1770
|
+
flex-shrink: 0;
|
|
1771
|
+
}
|
|
1814
1772
|
`, Ht = t`
|
|
1773
|
+
.vsn-error-state {
|
|
1774
|
+
display: flex;
|
|
1775
|
+
flex-direction: column;
|
|
1776
|
+
align-items: flex-start;
|
|
1777
|
+
padding: calc(1.5rem * var(--ga-base-scaling-factor, 1)) calc(1rem * var(--ga-base-scaling-factor, 1));
|
|
1778
|
+
gap: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.vsn-error-state__icon {
|
|
1782
|
+
display: inline-flex;
|
|
1783
|
+
color: var(--ga-color-icon-error);
|
|
1784
|
+
margin-bottom: calc(0.5rem * var(--ga-base-scaling-factor, 1));
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.vsn-error-state__title {
|
|
1788
|
+
font-family: var(--ga-font-family-primary);
|
|
1789
|
+
font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1790
|
+
line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1791
|
+
font-weight: 600;
|
|
1792
|
+
margin-bottom: calc(0.25rem * var(--ga-base-scaling-factor, 1));
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
.vsn-error-state__message,
|
|
1796
|
+
.vsn-error-state__hint {
|
|
1797
|
+
font-family: var(--ga-font-family-primary);
|
|
1798
|
+
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1799
|
+
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1800
|
+
font-weight: 400;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
.vsn-error-state__support {
|
|
1804
|
+
margin-top: calc(1.5rem * var(--ga-base-scaling-factor, 1));
|
|
1805
|
+
font-family: var(--ga-font-family-primary);
|
|
1806
|
+
font-size: calc(var(--ga-text-sm-font-size) * var(--ga-base-scaling-factor, 1));
|
|
1807
|
+
line-height: calc(var(--ga-text-sm-line-height) * var(--ga-base-scaling-factor, 1));
|
|
1808
|
+
font-weight: 400;
|
|
1809
|
+
color: var(--ga-color-text-on-disabled);
|
|
1810
|
+
}
|
|
1811
|
+
`, Ut = t`
|
|
1815
1812
|
.vsn-spinner {
|
|
1816
1813
|
display: inline-block;
|
|
1817
1814
|
flex-shrink: 0;
|
|
@@ -1831,7 +1828,7 @@ var Et = "en", Dt = [
|
|
|
1831
1828
|
@keyframes vsn-spin {
|
|
1832
1829
|
to { transform: rotate(360deg); }
|
|
1833
1830
|
}
|
|
1834
|
-
`,
|
|
1831
|
+
`, Wt = class {
|
|
1835
1832
|
constructor(e, t, n) {
|
|
1836
1833
|
this._onHostClick = (e) => {
|
|
1837
1834
|
let t = this._host.renderRoot.querySelector(this._clickedSelector);
|
|
@@ -1844,14 +1841,14 @@ var Et = "en", Dt = [
|
|
|
1844
1841
|
hostDisconnected() {
|
|
1845
1842
|
this._host.removeEventListener("click", this._onHostClick);
|
|
1846
1843
|
}
|
|
1847
|
-
},
|
|
1844
|
+
}, Gt = "button:not([disabled]), a[href], [tabindex]:not([tabindex=\"-1\"])", Kt = class {
|
|
1848
1845
|
constructor(e) {
|
|
1849
1846
|
this.onKeydown = (e) => {
|
|
1850
|
-
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
1847
|
+
if (e.defaultPrevented || A(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
1851
1848
|
let t = this.host.renderRoot.querySelector("slot[name=\"nav-footer\"]");
|
|
1852
1849
|
if (!t) return;
|
|
1853
1850
|
let n = [];
|
|
1854
|
-
for (let e of t.assignedElements({ flatten: !0 })) e.matches(
|
|
1851
|
+
for (let e of t.assignedElements({ flatten: !0 })) e.matches(Gt) && n.push(e), n.push(...Array.from(e.querySelectorAll(Gt)));
|
|
1855
1852
|
if (n.length === 0) return;
|
|
1856
1853
|
let r = e.composedPath()[0];
|
|
1857
1854
|
if (!(r instanceof HTMLElement)) return;
|
|
@@ -1863,18 +1860,24 @@ var Et = "en", Dt = [
|
|
|
1863
1860
|
}, this.host = e, e.addController(this);
|
|
1864
1861
|
}
|
|
1865
1862
|
hostConnected() {}
|
|
1866
|
-
},
|
|
1863
|
+
}, K = t`
|
|
1864
|
+
.ga-scroll {
|
|
1865
|
+
scrollbar-color: var(--ga-color-text-disabled) var(--ga-color-surface-page);
|
|
1866
|
+
scrollbar-width: thin;
|
|
1867
|
+
}
|
|
1868
|
+
`, q = class extends e {
|
|
1867
1869
|
static {
|
|
1868
1870
|
this.styles = [
|
|
1869
1871
|
h,
|
|
1872
|
+
K,
|
|
1873
|
+
Lt,
|
|
1874
|
+
It,
|
|
1875
|
+
Rt,
|
|
1876
|
+
zt,
|
|
1877
|
+
Bt,
|
|
1870
1878
|
Vt,
|
|
1871
|
-
ut,
|
|
1872
|
-
_t,
|
|
1873
|
-
vt,
|
|
1874
|
-
Tt,
|
|
1875
|
-
bt,
|
|
1876
|
-
Ct,
|
|
1877
1879
|
Ht,
|
|
1880
|
+
Ut,
|
|
1878
1881
|
t`
|
|
1879
1882
|
:host {
|
|
1880
1883
|
position: absolute;
|
|
@@ -1889,7 +1892,7 @@ var Et = "en", Dt = [
|
|
|
1889
1892
|
];
|
|
1890
1893
|
}
|
|
1891
1894
|
constructor() {
|
|
1892
|
-
super(), this.modules = [], this.modulesLoading = !1, this.lang = "en", this.error = !1, this.open = !1, this._searchQuery = "", this._searchLoading = !1, this._activeScopeId = "menu", this._searchLoadingMore = !1, this._navFooterKeyboard = new
|
|
1895
|
+
super(), this.modules = [], this.modulesLoading = !1, this.lang = "en", this.error = !1, this.open = !1, this._searchQuery = "", this._searchLoading = !1, this._activeScopeId = "menu", this._searchLoadingMore = !1, this._moduleSwitcherMaxHeight = 0, this._navFooterKeyboard = new Kt(this), this._onNavigate = (e) => {
|
|
1893
1896
|
this._searchQuery = "", this._searchResults = void 0, this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
|
|
1894
1897
|
bubbles: !0,
|
|
1895
1898
|
composed: !0
|
|
@@ -1906,13 +1909,18 @@ var Et = "en", Dt = [
|
|
|
1906
1909
|
}));
|
|
1907
1910
|
}, this._onScopeChanged = (e) => {
|
|
1908
1911
|
this._activeScopeId = e.detail.scopeId, this._runSearch(this._searchQuery, this._activeScopeId);
|
|
1909
|
-
}, new
|
|
1912
|
+
}, new Wt(this, ".ga-side-navigation", () => this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
|
|
1910
1913
|
bubbles: !0,
|
|
1911
1914
|
composed: !0
|
|
1912
|
-
})))
|
|
1915
|
+
}))), this._resizeObserver = new ResizeObserver((e) => {
|
|
1916
|
+
this._observeMenuSize(e);
|
|
1917
|
+
}), this._resizeObserver.observe(this);
|
|
1918
|
+
}
|
|
1919
|
+
_observeMenuSize(e) {
|
|
1920
|
+
this._moduleSwitcherMaxHeight = Math.max(0, e[0].contentRect.height - 134);
|
|
1913
1921
|
}
|
|
1914
1922
|
willUpdate(e) {
|
|
1915
|
-
e.has("lang") &&
|
|
1923
|
+
e.has("lang") && Ft(this.lang).catch(console.error), e.has("open") && e.get("open") && !this.open && (this._searchQuery = "", this._activeScopeId = "menu", this._clearSearchState(), this.renderRoot.querySelector("vsn-header")?.reset(), this.renderRoot.querySelector("vsn-footer")?.reset());
|
|
1916
1924
|
}
|
|
1917
1925
|
async focusSearch() {
|
|
1918
1926
|
await this.updateComplete, this.menu?.search?.enabled && this.renderRoot.querySelector("vsn-search")?.focus();
|
|
@@ -1923,11 +1931,8 @@ var Et = "en", Dt = [
|
|
|
1923
1931
|
_onSearchSubmit(e) {
|
|
1924
1932
|
this._runSearch(e.detail.query, this._activeScopeId);
|
|
1925
1933
|
}
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
bubbles: !0,
|
|
1929
|
-
composed: !0
|
|
1930
|
-
}));
|
|
1934
|
+
_onSearchCleared() {
|
|
1935
|
+
this._searchQuery = "", this._clearSearchState(), this.focusSearch();
|
|
1931
1936
|
}
|
|
1932
1937
|
_clearSearchState() {
|
|
1933
1938
|
this._searchAbort?.abort(), this._searchAbort = void 0, this._searchResults = void 0, this._searchLoading = !1, this._searchLoadingMore = !1, this._searchError = void 0, this._searchNextCursor = void 0;
|
|
@@ -2013,43 +2018,48 @@ var Et = "en", Dt = [
|
|
|
2013
2018
|
${this.header()}
|
|
2014
2019
|
${this.scopesGroup()}
|
|
2015
2020
|
${e === "error" ? this.errorState() : e === "loading" ? this.loadingState() : e === "results" ? this.searchResults() : this.renderMenu(this.menu)}
|
|
2016
|
-
${e === "menu" ? n
|
|
2021
|
+
${e === "menu" ? n`
|
|
2022
|
+
<slot name="nav-footer"></slot>` : n``}
|
|
2017
2023
|
${this.auth ? this.footer(this.auth) : ""}
|
|
2018
2024
|
</div>
|
|
2019
2025
|
`;
|
|
2020
2026
|
}
|
|
2021
2027
|
searchResults() {
|
|
2022
|
-
return n
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2028
|
+
return n`
|
|
2029
|
+
<vsn-search-results
|
|
2030
|
+
class="flex-1 min-h-0"
|
|
2031
|
+
.results=${this._searchResults}
|
|
2032
|
+
.errorMessage=${this._searchError}
|
|
2033
|
+
.nextCursor=${this._searchNextCursor}
|
|
2034
|
+
.loadingMore=${this._searchLoadingMore}>
|
|
2035
|
+
</vsn-search-results>`;
|
|
2029
2036
|
}
|
|
2030
2037
|
loadingState() {
|
|
2031
|
-
return n
|
|
2038
|
+
return n`
|
|
2039
|
+
<vsn-template class="flex-1 min-h-0"></vsn-template>`;
|
|
2032
2040
|
}
|
|
2033
2041
|
errorState() {
|
|
2034
|
-
return n
|
|
2042
|
+
return n`
|
|
2043
|
+
<vsn-error-state class="flex-1 min-h-0"></vsn-error-state>`;
|
|
2035
2044
|
}
|
|
2036
2045
|
header() {
|
|
2037
2046
|
let e = this.menu?.items.length ? this.menu.search : void 0;
|
|
2038
2047
|
return n`
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2048
|
+
<vsn-header
|
|
2049
|
+
.modules=${this.modules}
|
|
2050
|
+
.activeModuleId=${this.activeModuleId}
|
|
2051
|
+
.activeModuleLabel=${this.activeModuleLabel}
|
|
2052
|
+
.modulesLoading=${this.modulesLoading}
|
|
2053
|
+
.hasMenu=${(this.menu?.items.length ?? 0) > 0}
|
|
2054
|
+
.search=${e}
|
|
2055
|
+
.searchValue=${this._searchQuery}
|
|
2056
|
+
.searchLoading=${this._searchLoading}
|
|
2057
|
+
.moduleSwitcherMaxHeight=${this._moduleSwitcherMaxHeight}
|
|
2058
|
+
@vsn-search-input=${this._onSearchInput}
|
|
2059
|
+
@vsn-search-submit=${this._onSearchSubmit}
|
|
2060
|
+
@vsn-search-cleared=${this._onSearchCleared}
|
|
2061
|
+
>
|
|
2062
|
+
</vsn-header>`;
|
|
2053
2063
|
}
|
|
2054
2064
|
scopesGroup() {
|
|
2055
2065
|
if (!this.menu?.search?.enabled) return n``;
|
|
@@ -2058,7 +2068,7 @@ var Et = "en", Dt = [
|
|
|
2058
2068
|
<vsn-search-scopes
|
|
2059
2069
|
.scopes=${[{
|
|
2060
2070
|
id: "menu",
|
|
2061
|
-
label:
|
|
2071
|
+
label: Be()
|
|
2062
2072
|
}, ...e.map((e) => ({
|
|
2063
2073
|
id: e.id,
|
|
2064
2074
|
label: e.label
|
|
@@ -2069,30 +2079,28 @@ var Et = "en", Dt = [
|
|
|
2069
2079
|
`;
|
|
2070
2080
|
}
|
|
2071
2081
|
renderMenu(e) {
|
|
2072
|
-
return n
|
|
2082
|
+
return n`
|
|
2083
|
+
<vsn-menu class="flex-1 min-h-0" .items=${e?.items ?? []} .currentItem=${e?.currentItem ?? ""}></vsn-menu>`;
|
|
2073
2084
|
}
|
|
2074
2085
|
footer(e) {
|
|
2075
2086
|
return n`
|
|
2076
2087
|
<vsn-footer
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2088
|
+
.user=${e.user}
|
|
2089
|
+
.profilePictureBaseUrl=${e.profilePictureBaseUrl}
|
|
2090
|
+
.myProfileUrl=${e.myProfileUrl}>
|
|
2080
2091
|
</vsn-footer>
|
|
2081
2092
|
`;
|
|
2082
2093
|
}
|
|
2083
2094
|
};
|
|
2084
|
-
|
|
2095
|
+
P([s({ attribute: !1 })], q.prototype, "modules", void 0), P([s()], q.prototype, "activeModuleId", void 0), P([s()], q.prototype, "activeModuleLabel", void 0), P([s({ type: Boolean })], q.prototype, "modulesLoading", void 0), P([s()], q.prototype, "lang", void 0), P([s({ attribute: !1 })], q.prototype, "auth", void 0), P([s({ type: Boolean })], q.prototype, "error", void 0), P([s({
|
|
2085
2096
|
type: Boolean,
|
|
2086
2097
|
reflect: !0
|
|
2087
|
-
})],
|
|
2098
|
+
})], q.prototype, "open", void 0), P([s({ attribute: !1 })], q.prototype, "menu", void 0), P([l()], q.prototype, "_searchQuery", void 0), P([l()], q.prototype, "_searchResults", void 0), P([l()], q.prototype, "_searchLoading", void 0), P([l()], q.prototype, "_activeScopeId", void 0), P([l()], q.prototype, "_searchError", void 0), P([l()], q.prototype, "_searchNextCursor", void 0), P([l()], q.prototype, "_searchLoadingMore", void 0), P([l()], q.prototype, "_moduleSwitcherMaxHeight", void 0), q = P([o("vsn-side-bar")], q);
|
|
2088
2099
|
//#endregion
|
|
2089
2100
|
//#region src/components/vsn-top-bar/vsn-breadcrumb-menu-item.ts
|
|
2090
|
-
var
|
|
2091
|
-
static {
|
|
2092
|
-
K = this;
|
|
2093
|
-
}
|
|
2101
|
+
var J, Y = class extends e {
|
|
2094
2102
|
static {
|
|
2095
|
-
|
|
2103
|
+
J = this;
|
|
2096
2104
|
}
|
|
2097
2105
|
static {
|
|
2098
2106
|
this._idCounter = 0;
|
|
@@ -2116,7 +2124,7 @@ var K, q = class extends e {
|
|
|
2116
2124
|
e.preventDefault(), e.stopPropagation(), this._isExpanded = !this._isExpanded;
|
|
2117
2125
|
return;
|
|
2118
2126
|
}
|
|
2119
|
-
if (!this.tree || e.button !== 0 || e
|
|
2127
|
+
if (!this.tree || e.button !== 0 || A(e)) return;
|
|
2120
2128
|
e.preventDefault(), e.stopPropagation();
|
|
2121
2129
|
let t = [...this.ancestorPath, this.tree];
|
|
2122
2130
|
this.dispatchEvent(new CustomEvent("vsn-breadcrumb-menu-leaf-select", {
|
|
@@ -2124,7 +2132,7 @@ var K, q = class extends e {
|
|
|
2124
2132
|
bubbles: !0,
|
|
2125
2133
|
composed: !0
|
|
2126
2134
|
}));
|
|
2127
|
-
}, this._tooltipId = `vsn-menu-item-tooltip-${
|
|
2135
|
+
}, this._tooltipId = `vsn-menu-item-tooltip-${J._idCounter++}`;
|
|
2128
2136
|
}
|
|
2129
2137
|
createRenderRoot() {
|
|
2130
2138
|
return this;
|
|
@@ -2150,7 +2158,7 @@ var K, q = class extends e {
|
|
|
2150
2158
|
<div class="ga-tooltip ga-tooltip--right-start" style="white-space: nowrap">${e}</div>
|
|
2151
2159
|
</div>
|
|
2152
2160
|
<span class="ga-side-navigation__item-icon">
|
|
2153
|
-
${this._isParent() ? this._isExpanded ?
|
|
2161
|
+
${this._isParent() ? this._isExpanded ? M(N, 16) : M(ct, 16) : ""}
|
|
2154
2162
|
</span>
|
|
2155
2163
|
<div class="ga-side-navigation__item-content">
|
|
2156
2164
|
<div class="ga-side-navigation__item-label">${e}</div>
|
|
@@ -2174,33 +2182,33 @@ var K, q = class extends e {
|
|
|
2174
2182
|
if (this.tree && _(this.tree)) return this.tree.items.length > 0;
|
|
2175
2183
|
}
|
|
2176
2184
|
};
|
|
2177
|
-
|
|
2185
|
+
P([s({ attribute: !1 })], Y.prototype, "tree", void 0), P([s({ type: Number })], Y.prototype, "level", void 0), P([s({ type: Array })], Y.prototype, "ancestorPath", void 0), P([l()], Y.prototype, "_isExpanded", void 0), P([l()], Y.prototype, "_showTooltip", void 0), P([l()], Y.prototype, "_tooltipPos", void 0), P([c(".ga-side-navigation__item-label")], Y.prototype, "_labelEl", void 0), Y = J = P([o("vsn-breadcrumb-menu-item")], Y);
|
|
2178
2186
|
//#endregion
|
|
2179
2187
|
//#region src/components/vsn-top-bar/vsn-breadcrumb-menu.ts
|
|
2180
|
-
var
|
|
2181
|
-
static {
|
|
2182
|
-
this.styles = h;
|
|
2183
|
-
}
|
|
2188
|
+
var qt = class extends e {
|
|
2184
2189
|
createRenderRoot() {
|
|
2185
2190
|
return this;
|
|
2186
2191
|
}
|
|
2187
2192
|
menuItem(e) {
|
|
2188
|
-
return n
|
|
2193
|
+
return n`
|
|
2194
|
+
<vsn-breadcrumb-menu-item .tree=${e}></vsn-breadcrumb-menu-item>`;
|
|
2189
2195
|
}
|
|
2190
2196
|
render() {
|
|
2191
2197
|
return n`
|
|
2192
|
-
<div class="ga-side-navigation
|
|
2193
|
-
|
|
2198
|
+
<div class="ga-side-navigation ga-scroll"
|
|
2199
|
+
style="height: auto; overflow: visible; width: 238px; min-width: var(--ga-size-160); max-width: 512px; border-radius: var(--ga-radius); border: var(--ga-size-border-width-sm) solid var(--ga-color-border-primary); background: var(--ga-color-surface-primary);">
|
|
2200
|
+
<div class="ga-side-navigation__body overflow-y-auto ga-scroll"
|
|
2201
|
+
style="overflow-x: hidden; max-height: 60vh;">
|
|
2194
2202
|
${d(this.treeList, (e) => this.menuItem(e))}
|
|
2195
2203
|
</div>
|
|
2196
2204
|
</div>
|
|
2197
2205
|
`;
|
|
2198
2206
|
}
|
|
2199
2207
|
};
|
|
2200
|
-
|
|
2208
|
+
P([s({ attribute: !1 })], qt.prototype, "treeList", void 0), qt = P([o("vsn-breadcrumb-menu")], qt);
|
|
2201
2209
|
//#endregion
|
|
2202
2210
|
//#region src/components/vsn-top-bar/vsn-breadcrumbs.ts
|
|
2203
|
-
var
|
|
2211
|
+
var X = class extends e {
|
|
2204
2212
|
constructor(...e) {
|
|
2205
2213
|
super(...e), this.modules = [], this._openPopoverId = null, this._displayMode = "full", this._overflowCount = 0, this._tooltip = null, this._mqDesktop = window.matchMedia("(min-width: 1440px)"), this._mqTablet = window.matchMedia("(min-width: 768px) and (max-width: 1439px)"), this._ro = null, this._lastContainerWidth = 0, this._mounted = !1, this._handleMediaChange = () => {
|
|
2206
2214
|
this._mqDesktop.matches ? (this._displayMode = "full", this._overflowCount = 0) : this._mqTablet.matches ? (this._displayMode = "overflow", this._overflowCount = 0, this._mounted && this.updateComplete.then(() => this._recalculateOverflow())) : (this._displayMode = "mobile", this._overflowCount = 0);
|
|
@@ -2219,14 +2227,20 @@ var Y = class extends e {
|
|
|
2219
2227
|
};
|
|
2220
2228
|
}
|
|
2221
2229
|
static {
|
|
2222
|
-
this.styles = [
|
|
2230
|
+
this.styles = [
|
|
2231
|
+
h,
|
|
2232
|
+
K,
|
|
2233
|
+
t`
|
|
2223
2234
|
/* Temporary, until breadcrumb styles are updated */
|
|
2235
|
+
|
|
2224
2236
|
.ga-breadcrumb {
|
|
2225
2237
|
flex-wrap: nowrap;
|
|
2226
2238
|
overflow-x: clip;
|
|
2227
2239
|
}
|
|
2240
|
+
|
|
2228
2241
|
/* Dropdowns use the native Popover API — promoted to the top layer on open,
|
|
2229
2242
|
bypassing all stacking contexts. */
|
|
2243
|
+
|
|
2230
2244
|
.ga-breadcrumb-item__menu[popover] {
|
|
2231
2245
|
position: fixed;
|
|
2232
2246
|
inset: unset;
|
|
@@ -2236,34 +2250,42 @@ var Y = class extends e {
|
|
|
2236
2250
|
background: transparent;
|
|
2237
2251
|
overflow: visible;
|
|
2238
2252
|
}
|
|
2253
|
+
|
|
2239
2254
|
.ga-breadcrumb-item__trigger[aria-expanded='true'] .ga-breadcrumb-item__label {
|
|
2240
2255
|
outline: none;
|
|
2241
2256
|
}
|
|
2257
|
+
|
|
2242
2258
|
.ga-breadcrumb-item--link .ga-breadcrumb-item__trigger:hover,
|
|
2243
2259
|
.ga-breadcrumb-item--overflow .ga-breadcrumb-item__trigger:hover {
|
|
2244
2260
|
background-color: var(--ga-color-surface-action-hover-2);
|
|
2245
2261
|
text-decoration: none;
|
|
2246
2262
|
}
|
|
2263
|
+
|
|
2247
2264
|
.ga-breadcrumb-item--link .ga-breadcrumb-item__trigger:hover .ga-breadcrumb-item__label,
|
|
2248
2265
|
.ga-breadcrumb-item--overflow .ga-breadcrumb-item__trigger:hover .ga-breadcrumb-item__label {
|
|
2249
2266
|
text-decoration: none;
|
|
2250
2267
|
}
|
|
2268
|
+
|
|
2251
2269
|
.ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger {
|
|
2252
2270
|
color: var(--ga-color-text-body);
|
|
2253
2271
|
cursor: default;
|
|
2254
2272
|
}
|
|
2273
|
+
|
|
2255
2274
|
.ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger .ga-breadcrumb-item__label {
|
|
2256
2275
|
color: var(--ga-color-text-body);
|
|
2257
2276
|
}
|
|
2277
|
+
|
|
2258
2278
|
.ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger:hover {
|
|
2259
2279
|
background-color: transparent;
|
|
2260
2280
|
color: var(--ga-color-text-body);
|
|
2261
2281
|
}
|
|
2282
|
+
|
|
2262
2283
|
.ga-breadcrumb-item.ga-breadcrumb-item--ancestor .ga-breadcrumb-item__trigger:hover .ga-breadcrumb-item__label {
|
|
2263
2284
|
text-decoration: none;
|
|
2264
2285
|
color: var(--ga-color-text-body);
|
|
2265
2286
|
}
|
|
2266
|
-
`
|
|
2287
|
+
`
|
|
2288
|
+
];
|
|
2267
2289
|
}
|
|
2268
2290
|
connectedCallback() {
|
|
2269
2291
|
super.connectedCallback(), this._mqDesktop.addEventListener("change", this._handleMediaChange), this._mqTablet.addEventListener("change", this._handleMediaChange), this._handleMediaChange();
|
|
@@ -2370,10 +2392,11 @@ var Y = class extends e {
|
|
|
2370
2392
|
>
|
|
2371
2393
|
<span class="ga-breadcrumb-item__label">${"VSN"}</span>
|
|
2372
2394
|
</button>
|
|
2373
|
-
${this._breadcrumbPath.length > 0 ? n`<span class="ga-breadcrumb-item__separator"
|
|
2395
|
+
${this._breadcrumbPath.length > 0 ? n`<span class="ga-breadcrumb-item__separator"
|
|
2396
|
+
aria-hidden="true">/</span>` : ""}
|
|
2374
2397
|
<div
|
|
2375
2398
|
id="vsn-bc-modules-popover"
|
|
2376
|
-
class="ga-breadcrumb-item__menu"
|
|
2399
|
+
class="ga-breadcrumb-item__menu ga-scroll"
|
|
2377
2400
|
popover="auto"
|
|
2378
2401
|
@beforetoggle=${(e) => this._handlePopoverBeforeToggle("vsn-bc-modules-trigger", e)}
|
|
2379
2402
|
@toggle=${(e) => this._handlePopoverToggle("vsn-bc-modules-popover", e)}
|
|
@@ -2399,7 +2422,10 @@ var Y = class extends e {
|
|
|
2399
2422
|
}
|
|
2400
2423
|
_renderLeafAsAncestor(e) {
|
|
2401
2424
|
return n`
|
|
2402
|
-
<div class="ga-breadcrumb-item ga-breadcrumb-item--link ga-breadcrumb-item--ancestor"
|
|
2425
|
+
<div class="ga-breadcrumb-item ga-breadcrumb-item--link ga-breadcrumb-item--ancestor"
|
|
2426
|
+
aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r}
|
|
2427
|
+
data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter}
|
|
2428
|
+
@mouseleave=${this._onBreadcrumbMouseLeave}>
|
|
2403
2429
|
<span class="ga-breadcrumb-item__trigger">
|
|
2404
2430
|
<span class="ga-breadcrumb-item__label">${e.label ?? ""}</span>
|
|
2405
2431
|
</span>
|
|
@@ -2419,7 +2445,10 @@ var Y = class extends e {
|
|
|
2419
2445
|
}
|
|
2420
2446
|
_renderCurrentItem(e) {
|
|
2421
2447
|
return n`
|
|
2422
|
-
<div class="ga-breadcrumb-item ga-breadcrumb-item--current-page"
|
|
2448
|
+
<div class="ga-breadcrumb-item ga-breadcrumb-item--current-page"
|
|
2449
|
+
aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r}
|
|
2450
|
+
data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter}
|
|
2451
|
+
@mouseleave=${this._onBreadcrumbMouseLeave}>
|
|
2423
2452
|
<span class="ga-breadcrumb-item__trigger" aria-current="page">
|
|
2424
2453
|
<span class="ga-breadcrumb-item__label">${e.label ?? ""}</span>
|
|
2425
2454
|
</span>
|
|
@@ -2429,7 +2458,10 @@ var Y = class extends e {
|
|
|
2429
2458
|
if (!_(e) || e.items.length === 0) return n``;
|
|
2430
2459
|
let i = this._popoverItemId(t), a = this._popoverItemTriggerId(t);
|
|
2431
2460
|
return n`
|
|
2432
|
-
<div class="ga-breadcrumb-item ga-breadcrumb-item--link"
|
|
2461
|
+
<div class="ga-breadcrumb-item ga-breadcrumb-item--link"
|
|
2462
|
+
aria-describedby=${this._tooltip ? "vsn-breadcrumb-tooltip" : r}
|
|
2463
|
+
data-tooltip-label="${e.label ?? ""}" @mouseenter=${this._onBreadcrumbMouseEnter}
|
|
2464
|
+
@mouseleave=${this._onBreadcrumbMouseLeave}>
|
|
2433
2465
|
<button
|
|
2434
2466
|
id=${a}
|
|
2435
2467
|
class="ga-breadcrumb-item__trigger"
|
|
@@ -2512,7 +2544,8 @@ var Y = class extends e {
|
|
|
2512
2544
|
${this._displayMode === "full" ? this._renderFullBreadcrumbs() : this._displayMode === "overflow" ? this._renderOverflowBreadcrumbs() : this._renderMobileBreadcrumbs()}
|
|
2513
2545
|
</div>
|
|
2514
2546
|
${this._tooltip ? n`
|
|
2515
|
-
<div id="vsn-breadcrumb-tooltip" role="tooltip"
|
|
2547
|
+
<div id="vsn-breadcrumb-tooltip" role="tooltip"
|
|
2548
|
+
style="position: fixed; left: ${this._tooltip.x}px; top: ${this._tooltip.y}px; pointer-events: none; z-index: 9999;">
|
|
2516
2549
|
<div class="ga-tooltip ga-tooltip--bottom-start" style="white-space: nowrap">${this._tooltip.label}</div>
|
|
2517
2550
|
</div>
|
|
2518
2551
|
` : r}
|
|
@@ -2520,13 +2553,10 @@ var Y = class extends e {
|
|
|
2520
2553
|
`;
|
|
2521
2554
|
}
|
|
2522
2555
|
};
|
|
2523
|
-
|
|
2556
|
+
P([s({ attribute: !1 })], X.prototype, "tree", void 0), P([s({ type: Array })], X.prototype, "modules", void 0), P([s()], X.prototype, "activeModuleId", void 0), P([l()], X.prototype, "_openPopoverId", void 0), P([l()], X.prototype, "_displayMode", void 0), P([l()], X.prototype, "_overflowCount", void 0), P([l()], X.prototype, "_tooltip", void 0), X = P([S(), o("vsn-breadcrumbs")], X);
|
|
2524
2557
|
//#endregion
|
|
2525
2558
|
//#region src/components/vsn-top-bar/vsn-ai-assistant.ts
|
|
2526
|
-
var
|
|
2527
|
-
static {
|
|
2528
|
-
this.styles = h;
|
|
2529
|
-
}
|
|
2559
|
+
var Jt = class extends e {
|
|
2530
2560
|
createRenderRoot() {
|
|
2531
2561
|
return this;
|
|
2532
2562
|
}
|
|
@@ -2539,24 +2569,22 @@ var Kt = class extends e {
|
|
|
2539
2569
|
}
|
|
2540
2570
|
render() {
|
|
2541
2571
|
return n`
|
|
2542
|
-
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2543
|
-
|
|
2572
|
+
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2573
|
+
aria-label=${x("Open AI assistant")} @click=${this._handleClick}>
|
|
2574
|
+
<span class="ga-icon">${M(Je)}</span>
|
|
2544
2575
|
</button>
|
|
2545
2576
|
`;
|
|
2546
2577
|
}
|
|
2547
2578
|
};
|
|
2548
|
-
|
|
2579
|
+
Jt = P([S(), o("vsn-ai-assistant")], Jt);
|
|
2549
2580
|
//#endregion
|
|
2550
2581
|
//#region src/components/vsn-top-bar/vsn-feedback.ts
|
|
2551
|
-
var
|
|
2582
|
+
var Z = class extends e {
|
|
2552
2583
|
constructor(...e) {
|
|
2553
2584
|
super(...e), this._compact = !1, this.feedback = null, this._mqMobile = window.matchMedia("(max-width: 767px)"), this._handleMediaChange = () => {
|
|
2554
2585
|
this._compact = this._mqMobile.matches;
|
|
2555
2586
|
}, this._traitSet = !1;
|
|
2556
2587
|
}
|
|
2557
|
-
static {
|
|
2558
|
-
this.styles = h;
|
|
2559
|
-
}
|
|
2560
2588
|
createRenderRoot() {
|
|
2561
2589
|
return this;
|
|
2562
2590
|
}
|
|
@@ -2566,7 +2594,7 @@ var X = class extends e {
|
|
|
2566
2594
|
updated(e) {
|
|
2567
2595
|
if (super.updated(e), e.has("feedback") && this.feedback?.workspaceId && !document.getElementById("survicate-sdk") && !window._sva) {
|
|
2568
2596
|
let e = document.createElement("script");
|
|
2569
|
-
e.id =
|
|
2597
|
+
e.id = Ue, e.src = Ge(this.feedback.workspaceId), e.async = !0, e.onload = () => this._applyVisitorTraits(), document.head.appendChild(e);
|
|
2570
2598
|
}
|
|
2571
2599
|
if (e.has("auth")) {
|
|
2572
2600
|
let t = e.get("auth");
|
|
@@ -2586,27 +2614,26 @@ var X = class extends e {
|
|
|
2586
2614
|
this.dispatchEvent(new CustomEvent("vsn-feedback", {
|
|
2587
2615
|
bubbles: !0,
|
|
2588
2616
|
composed: !0
|
|
2589
|
-
})), this.feedback?.surveyId && (this._applyVisitorTraits(), window._sva?.invokeEvent(
|
|
2617
|
+
})), this.feedback?.surveyId && (this._applyVisitorTraits(), window._sva?.invokeEvent(We));
|
|
2590
2618
|
}
|
|
2591
2619
|
render() {
|
|
2592
2620
|
return this._compact ? n`
|
|
2593
|
-
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2594
|
-
|
|
2621
|
+
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2622
|
+
aria-label=${x("Send feedback")} @click=${this._handleClick}>
|
|
2623
|
+
<span class="ga-icon">${M(Ze)}</span>
|
|
2595
2624
|
</button>
|
|
2596
2625
|
` : n`
|
|
2597
|
-
<button type="button" class="ga-button ga-button--secondary" aria-label=${x("Send feedback")}
|
|
2626
|
+
<button type="button" class="ga-button ga-button--secondary" aria-label=${x("Send feedback")}
|
|
2627
|
+
@click=${this._handleClick}>
|
|
2598
2628
|
${x("Feedback")}
|
|
2599
2629
|
</button>
|
|
2600
2630
|
`;
|
|
2601
2631
|
}
|
|
2602
2632
|
};
|
|
2603
|
-
|
|
2633
|
+
P([l()], Z.prototype, "_compact", void 0), P([s({ attribute: !1 })], Z.prototype, "feedback", void 0), P([s({ attribute: !1 })], Z.prototype, "auth", void 0), Z = P([S(), o("vsn-feedback")], Z);
|
|
2604
2634
|
//#endregion
|
|
2605
2635
|
//#region src/components/vsn-top-bar/vsn-home.ts
|
|
2606
|
-
var
|
|
2607
|
-
static {
|
|
2608
|
-
this.styles = h;
|
|
2609
|
-
}
|
|
2636
|
+
var Yt = class extends e {
|
|
2610
2637
|
createRenderRoot() {
|
|
2611
2638
|
return this;
|
|
2612
2639
|
}
|
|
@@ -2623,30 +2650,17 @@ var Z = class extends e {
|
|
|
2623
2650
|
}
|
|
2624
2651
|
render() {
|
|
2625
2652
|
return this.landingPageUrl ? n`
|
|
2626
|
-
<a href=${this.landingPageUrl} class="ga-button ga-button--ghost ga-button--icon-only" aria-label=${x("Home")}
|
|
2627
|
-
|
|
2653
|
+
<a href=${this.landingPageUrl} class="ga-button ga-button--ghost ga-button--icon-only" aria-label=${x("Home")}
|
|
2654
|
+
@click=${this._handleClick}>
|
|
2655
|
+
<span class="ga-icon">${M(Qe)}</span>
|
|
2628
2656
|
</a>
|
|
2629
2657
|
` : r;
|
|
2630
2658
|
}
|
|
2631
2659
|
};
|
|
2632
|
-
|
|
2660
|
+
P([s({ attribute: "landing-page-url" })], Yt.prototype, "landingPageUrl", void 0), Yt = P([S(), o("vsn-home")], Yt);
|
|
2633
2661
|
//#endregion
|
|
2634
2662
|
//#region src/components/vsn-top-bar/vsn-menu-toggle.ts
|
|
2635
|
-
var
|
|
2636
|
-
constructor(...e) {
|
|
2637
|
-
super(...e), this._tooltip = null, this._onMouseEnter = (e) => {
|
|
2638
|
-
let t = e.currentTarget.getBoundingClientRect();
|
|
2639
|
-
this._tooltip = {
|
|
2640
|
-
x: t.left,
|
|
2641
|
-
y: t.bottom + 4
|
|
2642
|
-
};
|
|
2643
|
-
}, this._onMouseLeave = () => {
|
|
2644
|
-
this._tooltip = null;
|
|
2645
|
-
};
|
|
2646
|
-
}
|
|
2647
|
-
static {
|
|
2648
|
-
this.styles = h;
|
|
2649
|
-
}
|
|
2663
|
+
var Xt = class extends e {
|
|
2650
2664
|
createRenderRoot() {
|
|
2651
2665
|
return this;
|
|
2652
2666
|
}
|
|
@@ -2654,34 +2668,42 @@ var qt = class extends e {
|
|
|
2654
2668
|
this.querySelector("button")?.focus(e);
|
|
2655
2669
|
}
|
|
2656
2670
|
_handleClick() {
|
|
2657
|
-
this.
|
|
2671
|
+
this._tooltipElement.hidePopover?.(), this.dispatchEvent(new CustomEvent("toggle-side-bar", {
|
|
2658
2672
|
bubbles: !0,
|
|
2659
2673
|
composed: !0
|
|
2660
2674
|
}));
|
|
2661
2675
|
}
|
|
2676
|
+
_onActivate(e) {
|
|
2677
|
+
let t = e.currentTarget.getBoundingClientRect();
|
|
2678
|
+
this._tooltipElement.style.left = `${t.left}px`, this._tooltipElement.style.top = `${t.bottom + 4}px`, this._tooltipElement.showPopover?.();
|
|
2679
|
+
}
|
|
2680
|
+
_onDeactivate() {
|
|
2681
|
+
this._tooltipElement.hidePopover?.();
|
|
2682
|
+
}
|
|
2662
2683
|
render() {
|
|
2663
2684
|
return n`
|
|
2664
|
-
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Open menu")}
|
|
2665
|
-
|
|
2685
|
+
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Open menu")}
|
|
2686
|
+
aria-describedby="vsn-menu-toggle-tooltip"
|
|
2687
|
+
@click=${this._handleClick}
|
|
2688
|
+
@mouseenter=${this._onActivate}
|
|
2689
|
+
@mouseleave=${this._onDeactivate}>
|
|
2690
|
+
<span class="ga-icon">${M(qe)}</span>
|
|
2666
2691
|
</button>
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
</div>
|
|
2671
|
-
|
|
2692
|
+
<div id="vsn-menu-toggle-tooltip" role="tooltip"
|
|
2693
|
+
style="position: fixed; inset: unset; margin: 0; padding: 0; border: none; background: transparent; overflow: visible; pointer-events: none; z-index: 9999;"
|
|
2694
|
+
popover="manual">
|
|
2695
|
+
<div class="ga-tooltip ga-tooltip--bottom-start" style="white-space: nowrap">${Re()}</div>
|
|
2696
|
+
</div>
|
|
2672
2697
|
`;
|
|
2673
2698
|
}
|
|
2674
2699
|
};
|
|
2675
|
-
|
|
2700
|
+
P([c("div[role=\"tooltip\"]", !0)], Xt.prototype, "_tooltipElement", void 0), Xt = P([S(), o("vsn-menu-toggle")], Xt);
|
|
2676
2701
|
//#endregion
|
|
2677
2702
|
//#region src/components/vsn-top-bar/vsn-notifications.ts
|
|
2678
|
-
var
|
|
2703
|
+
var Zt = class extends e {
|
|
2679
2704
|
constructor(...e) {
|
|
2680
2705
|
super(...e), this.notificationActive = !1;
|
|
2681
2706
|
}
|
|
2682
|
-
static {
|
|
2683
|
-
this.styles = h;
|
|
2684
|
-
}
|
|
2685
2707
|
createRenderRoot() {
|
|
2686
2708
|
return this;
|
|
2687
2709
|
}
|
|
@@ -2693,22 +2715,23 @@ var Jt = class extends e {
|
|
|
2693
2715
|
}));
|
|
2694
2716
|
}
|
|
2695
2717
|
render() {
|
|
2696
|
-
let e = this.notificationActive ?
|
|
2718
|
+
let e = this.notificationActive ? Xe : Ye;
|
|
2697
2719
|
return n`
|
|
2698
|
-
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2699
|
-
|
|
2720
|
+
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2721
|
+
aria-label=${x("Notifications")} @click=${this._handleClick}>
|
|
2722
|
+
<span class="ga-icon">${M(e)}</span>
|
|
2700
2723
|
</button>
|
|
2701
2724
|
`;
|
|
2702
2725
|
}
|
|
2703
2726
|
};
|
|
2704
|
-
|
|
2727
|
+
P([s({
|
|
2705
2728
|
type: Boolean,
|
|
2706
2729
|
attribute: "notification-active",
|
|
2707
2730
|
reflect: !0
|
|
2708
|
-
})],
|
|
2731
|
+
})], Zt.prototype, "notificationActive", void 0), Zt = P([S(), o("vsn-notifications")], Zt);
|
|
2709
2732
|
//#endregion
|
|
2710
2733
|
//#region src/components/vsn-top-bar/vsn-help.ts
|
|
2711
|
-
function
|
|
2734
|
+
function Qt(e) {
|
|
2712
2735
|
try {
|
|
2713
2736
|
let t = new URL(e);
|
|
2714
2737
|
return t.protocol === "https:" || t.protocol === "http:";
|
|
@@ -2716,10 +2739,7 @@ function Yt(e) {
|
|
|
2716
2739
|
return !1;
|
|
2717
2740
|
}
|
|
2718
2741
|
}
|
|
2719
|
-
var
|
|
2720
|
-
static {
|
|
2721
|
-
this.styles = h;
|
|
2722
|
-
}
|
|
2742
|
+
var $t = class extends e {
|
|
2723
2743
|
createRenderRoot() {
|
|
2724
2744
|
return this;
|
|
2725
2745
|
}
|
|
@@ -2731,18 +2751,20 @@ var Xt = class extends e {
|
|
|
2731
2751
|
}));
|
|
2732
2752
|
}
|
|
2733
2753
|
render() {
|
|
2734
|
-
return this.helpUrl &&
|
|
2735
|
-
<a href=${this.helpUrl} rel="noopener noreferrer" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2736
|
-
|
|
2754
|
+
return this.helpUrl && Qt(this.helpUrl) ? n`
|
|
2755
|
+
<a href=${this.helpUrl} target="_blank" rel="noopener noreferrer" class="ga-button ga-button--secondary ga-button--icon-only"
|
|
2756
|
+
aria-label=${x("Help")}>
|
|
2757
|
+
<span class="ga-icon">${M($e)}</span>
|
|
2737
2758
|
</a>
|
|
2738
2759
|
` : n`
|
|
2739
|
-
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Help")}
|
|
2740
|
-
|
|
2760
|
+
<button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Help")}
|
|
2761
|
+
@click=${this._handleClick}>
|
|
2762
|
+
<span class="ga-icon">${M($e)}</span>
|
|
2741
2763
|
</button>
|
|
2742
2764
|
`;
|
|
2743
2765
|
}
|
|
2744
2766
|
};
|
|
2745
|
-
|
|
2767
|
+
P([s({ attribute: "help-url" })], $t.prototype, "helpUrl", void 0), $t = P([S(), o("vsn-help")], $t);
|
|
2746
2768
|
//#endregion
|
|
2747
2769
|
//#region src/components/vsn-top-bar/vsn-top-bar.ts
|
|
2748
2770
|
var Q = class extends e {
|
|
@@ -2750,7 +2772,7 @@ var Q = class extends e {
|
|
|
2750
2772
|
super(...e), this.modules = [], this.feedback = null, this.showHelp = !1, this.showNotification = !1, this.notificationActive = !1, this.lang = "en";
|
|
2751
2773
|
}
|
|
2752
2774
|
willUpdate(e) {
|
|
2753
|
-
e.has("lang") &&
|
|
2775
|
+
e.has("lang") && Ft(this.lang).catch(console.error);
|
|
2754
2776
|
}
|
|
2755
2777
|
focusMenuToggle() {
|
|
2756
2778
|
this.renderRoot.querySelector("vsn-menu-toggle")?.focus();
|
|
@@ -2852,26 +2874,28 @@ var Q = class extends e {
|
|
|
2852
2874
|
`;
|
|
2853
2875
|
}
|
|
2854
2876
|
};
|
|
2855
|
-
|
|
2877
|
+
P([s({ attribute: !1 })], Q.prototype, "tree", void 0), P([s({ type: Array })], Q.prototype, "modules", void 0), P([s()], Q.prototype, "activeModuleId", void 0), P([s({ attribute: "landing-page-url" })], Q.prototype, "landingPageUrl", void 0), P([s({ attribute: !1 })], Q.prototype, "feedback", void 0), P([s({ attribute: !1 })], Q.prototype, "auth", void 0), P([s({
|
|
2856
2878
|
type: Boolean,
|
|
2857
2879
|
attribute: "show-help"
|
|
2858
|
-
})], Q.prototype, "showHelp", void 0),
|
|
2880
|
+
})], Q.prototype, "showHelp", void 0), P([s({ attribute: "help-url" })], Q.prototype, "helpUrl", void 0), P([s({
|
|
2859
2881
|
type: Boolean,
|
|
2860
2882
|
attribute: "show-notification"
|
|
2861
|
-
})], Q.prototype, "showNotification", void 0),
|
|
2883
|
+
})], Q.prototype, "showNotification", void 0), P([s({
|
|
2862
2884
|
type: Boolean,
|
|
2863
2885
|
attribute: "notification-active"
|
|
2864
|
-
})], Q.prototype, "notificationActive", void 0),
|
|
2886
|
+
})], Q.prototype, "notificationActive", void 0), P([s()], Q.prototype, "lang", void 0), Q = P([o("vsn-top-bar")], Q);
|
|
2865
2887
|
//#endregion
|
|
2866
2888
|
//#region src/components/vsn-navigation.ts
|
|
2867
2889
|
var $ = class extends e {
|
|
2868
2890
|
constructor(...e) {
|
|
2869
|
-
super(...e), this.lang = "en", this.showHelp = !1, this.feedback = null, this.showNotification = !1, this.notificationActive = !1, this.
|
|
2870
|
-
!
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2891
|
+
super(...e), this.lang = "en", this.showHelp = !1, this.feedback = null, this.showNotification = !1, this.notificationActive = !1, this.open = !1, this._currentItem = "", this._resolvedModules = [], this._modulesLoading = !1, this._modulesLoadToken = 0, this._restoreFocusToToggle = !1, this._onShortcut = (e) => {
|
|
2892
|
+
e.defaultPrevented || !Fe(e) || e.key.toLowerCase() !== "k" || (e.preventDefault(), this.dispatchEvent(new CustomEvent("vsn-open", {
|
|
2893
|
+
cancelable: !0,
|
|
2894
|
+
bubbles: !0,
|
|
2895
|
+
composed: !0
|
|
2896
|
+
})) && this._openAndFocusSearch());
|
|
2897
|
+
}, this._onEscape = (e) => {
|
|
2898
|
+
e.defaultPrevented || this.open && j(e) && e.key === "Escape" && (e.preventDefault(), this.open = !1);
|
|
2875
2899
|
};
|
|
2876
2900
|
}
|
|
2877
2901
|
_resolveModules() {
|
|
@@ -2892,7 +2916,10 @@ var $ = class extends e {
|
|
|
2892
2916
|
});
|
|
2893
2917
|
}
|
|
2894
2918
|
static {
|
|
2895
|
-
this.styles = [
|
|
2919
|
+
this.styles = [
|
|
2920
|
+
h,
|
|
2921
|
+
K,
|
|
2922
|
+
t`
|
|
2896
2923
|
:host {
|
|
2897
2924
|
display: flex;
|
|
2898
2925
|
flex-direction: column;
|
|
@@ -2911,12 +2938,8 @@ var $ = class extends e {
|
|
|
2911
2938
|
min-height: 0;
|
|
2912
2939
|
overflow: hidden;
|
|
2913
2940
|
}
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
height: 100%;
|
|
2917
|
-
overflow-y: auto;
|
|
2918
|
-
}
|
|
2919
|
-
`];
|
|
2941
|
+
`
|
|
2942
|
+
];
|
|
2920
2943
|
}
|
|
2921
2944
|
willUpdate(e) {
|
|
2922
2945
|
e.has("tree") && this.tree && (this.tree.currentItem ? this._currentItem = this.tree.currentItem : this.tree.items.length > 0 && (this._currentItem = this._getFirstLeafId(this.tree.items[0]))), e.has("modules") && this._resolveModules();
|
|
@@ -2938,29 +2961,32 @@ var $ = class extends e {
|
|
|
2938
2961
|
};
|
|
2939
2962
|
}
|
|
2940
2963
|
_onToggleSideBar() {
|
|
2941
|
-
this.
|
|
2964
|
+
this.open ? this._closeSideBar() : this._openAndFocusSearch();
|
|
2942
2965
|
}
|
|
2943
2966
|
_openAndFocusSearch() {
|
|
2944
|
-
this.
|
|
2945
|
-
}
|
|
2946
|
-
_onSideBarClose() {
|
|
2947
|
-
this._closeSideBar();
|
|
2967
|
+
this.open = !0, this.updateComplete.then(() => this.renderRoot.querySelector("vsn-side-bar")?.focusSearch());
|
|
2948
2968
|
}
|
|
2949
2969
|
_closeSideBar() {
|
|
2950
|
-
|
|
2951
|
-
|
|
2970
|
+
this.open = !1;
|
|
2971
|
+
}
|
|
2972
|
+
update(e) {
|
|
2973
|
+
if (e.has("open") && e.get("open") && !this.open) {
|
|
2974
|
+
let e = this.renderRoot.querySelector("vsn-side-bar");
|
|
2975
|
+
this._restoreFocusToToggle = e?.matches(":focus-within") ?? !1;
|
|
2976
|
+
}
|
|
2977
|
+
super.update(e);
|
|
2952
2978
|
}
|
|
2953
2979
|
updated(e) {
|
|
2954
|
-
e.has("
|
|
2980
|
+
e.has("open") && e.get("open") && !this.open && this._restoreFocusToToggle && this.renderRoot.querySelector("vsn-top-bar")?.focusMenuToggle();
|
|
2955
2981
|
}
|
|
2956
2982
|
connectedCallback() {
|
|
2957
|
-
super.connectedCallback(), document.addEventListener("keydown", this._onShortcut), document.addEventListener("keydown", this.
|
|
2983
|
+
super.connectedCallback(), document.addEventListener("keydown", this._onShortcut), document.addEventListener("keydown", this._onEscape);
|
|
2958
2984
|
}
|
|
2959
2985
|
disconnectedCallback() {
|
|
2960
|
-
document.removeEventListener("keydown", this._onShortcut), document.removeEventListener("keydown", this.
|
|
2986
|
+
document.removeEventListener("keydown", this._onShortcut), document.removeEventListener("keydown", this._onEscape), super.disconnectedCallback();
|
|
2961
2987
|
}
|
|
2962
2988
|
_onTopBarClick(e) {
|
|
2963
|
-
this.
|
|
2989
|
+
this.open && (e.composedPath().some((e) => e.tagName?.toUpperCase() === "VSN-MENU-TOGGLE") || (this.open = !1));
|
|
2964
2990
|
}
|
|
2965
2991
|
render() {
|
|
2966
2992
|
return n`
|
|
@@ -2978,7 +3004,7 @@ var $ = class extends e {
|
|
|
2978
3004
|
?notification-active=${this.notificationActive}
|
|
2979
3005
|
@toggle-side-bar=${this._onToggleSideBar}
|
|
2980
3006
|
@click=${this._onTopBarClick}
|
|
2981
|
-
@vsn-breadcrumb-dropdown-open=${this.
|
|
3007
|
+
@vsn-breadcrumb-dropdown-open=${this._closeSideBar}
|
|
2982
3008
|
>
|
|
2983
3009
|
<slot name="context-selector" slot="context-selector"></slot>
|
|
2984
3010
|
</vsn-top-bar>
|
|
@@ -2991,27 +3017,31 @@ var $ = class extends e {
|
|
|
2991
3017
|
.activeModuleLabel=${this.modules?.activeModuleLabel}
|
|
2992
3018
|
.modulesLoading=${this._modulesLoading}
|
|
2993
3019
|
.auth=${this.auth}
|
|
2994
|
-
?open=${this.
|
|
2995
|
-
@vsn-side-bar-close=${this.
|
|
3020
|
+
?open=${this.open}
|
|
3021
|
+
@vsn-side-bar-close=${this._closeSideBar}
|
|
2996
3022
|
>
|
|
2997
3023
|
<slot name="nav-footer" slot="nav-footer"></slot>
|
|
2998
3024
|
</vsn-side-bar>
|
|
2999
|
-
<div class="
|
|
3025
|
+
<div class="h-full overflow-y-auto ga-scroll">
|
|
3000
3026
|
<slot></slot>
|
|
3001
3027
|
</div>
|
|
3002
3028
|
</div>
|
|
3003
3029
|
`;
|
|
3004
3030
|
}
|
|
3005
3031
|
};
|
|
3006
|
-
|
|
3032
|
+
P([s()], $.prototype, "lang", void 0), P([s({ attribute: !1 })], $.prototype, "tree", void 0), P([s({ attribute: !1 })], $.prototype, "modules", void 0), P([s({ attribute: !1 })], $.prototype, "auth", void 0), P([s({ attribute: "landing-page-url" })], $.prototype, "landingPageUrl", void 0), P([s({
|
|
3007
3033
|
type: Boolean,
|
|
3008
3034
|
attribute: "show-help"
|
|
3009
|
-
})], $.prototype, "showHelp", void 0),
|
|
3035
|
+
})], $.prototype, "showHelp", void 0), P([s({ attribute: "help-url" })], $.prototype, "helpUrl", void 0), P([s({ attribute: !1 })], $.prototype, "feedback", void 0), P([s({
|
|
3010
3036
|
type: Boolean,
|
|
3011
3037
|
attribute: "show-notification"
|
|
3012
|
-
})], $.prototype, "showNotification", void 0),
|
|
3038
|
+
})], $.prototype, "showNotification", void 0), P([s({
|
|
3013
3039
|
type: Boolean,
|
|
3014
3040
|
attribute: "notification-active"
|
|
3015
|
-
})], $.prototype, "notificationActive", void 0),
|
|
3041
|
+
})], $.prototype, "notificationActive", void 0), P([s({
|
|
3042
|
+
type: Boolean,
|
|
3043
|
+
attribute: "open",
|
|
3044
|
+
reflect: !0
|
|
3045
|
+
})], $.prototype, "open", void 0), P([l()], $.prototype, "_currentItem", void 0), P([l()], $.prototype, "_resolvedModules", void 0), P([l()], $.prototype, "_modulesLoading", void 0), $ = P([o("vsn-navigation")], $);
|
|
3016
3046
|
//#endregion
|
|
3017
3047
|
export { v as SearchError, $ as VSNNavigation, g as isTreeLeaf, _ as isTreeParent };
|