@zealsolutions/zeal-ui 1.0.0-alpha.380 → 1.0.0-alpha.381
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/header/index.js +185 -185
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as r, createElementBlock as i, createVNode as L, createElementVNode as a, createTextVNode as
|
|
1
|
+
import { openBlock as r, createElementBlock as i, createVNode as L, createElementVNode as a, createTextVNode as W, mergeModels as se, useModel as Ee, getCurrentInstance as he, ref as m, computed as A, watch as J, nextTick as ie, onMounted as ye, onBeforeUnmount as ve, createBlock as H, Teleport as Ie, withModifiers as D, withDirectives as te, vModelText as Ae, createCommentVNode as g, normalizeClass as T, toDisplayString as C, Fragment as O, renderList as P, unref as Q, normalizeStyle as Z, pushScopeId as Te, popScopeId as Ne, Transition as me, withCtx as ne, resolveDynamicComponent as be, vShow as ke, renderSlot as X } from "vue";
|
|
2
2
|
import ze from "../../HouseIcon-BxmNyxvv.js";
|
|
3
3
|
import Le from "../../ArrowLeftIcon-Cgsy08pY.js";
|
|
4
4
|
import { _ as He } from "../../Tooltip-BG8E8i-l.js";
|
|
@@ -10,7 +10,7 @@ import je from "../../CircleCheckIcon-CA15yXgI.js";
|
|
|
10
10
|
import De from "../../XMarkIcon-DKJ_--uA.js";
|
|
11
11
|
const Re = /* @__PURE__ */ a("span", { class: "hidden whitespace-nowrap sm:inline" }, "Search", -1), Pe = /* @__PURE__ */ a("kbd", { class: "zui-search-kbd hidden items-center gap-px rounded border-[1px] border-white/40 bg-white/15 px-[5px] py-0.5 font-sans text-[11px] font-bold leading-none text-white/90 sm:inline-flex" }, [
|
|
12
12
|
/* @__PURE__ */ a("span", null, "⌘"),
|
|
13
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ W("K ")
|
|
14
14
|
], -1), Be = {
|
|
15
15
|
__name: "GlobalSearchPill",
|
|
16
16
|
emits: ["click"],
|
|
@@ -20,7 +20,7 @@ const Re = /* @__PURE__ */ a("span", { class: "hidden whitespace-nowrap sm:inlin
|
|
|
20
20
|
class: "zui-search-pill inline-flex h-[34px] cursor-pointer items-center justify-center gap-[7px] rounded-lg border-[1px] border-solid border-proclusteal-900 bg-proclusteal-900 pl-[11px] pr-[9px] font-sans text-[13px] font-semibold text-white transition-[border-color,box-shadow] duration-150 hover:border-proclusteal-950 hover:shadow-[0_1px_3px_rgba(20,40,45,0.25)] focus:border-proclusteal-950 focus:outline-none",
|
|
21
21
|
title: "Search (Ctrl K)",
|
|
22
22
|
"aria-label": "Search (Ctrl K)",
|
|
23
|
-
onClick: t[0] || (t[0] = (
|
|
23
|
+
onClick: t[0] || (t[0] = (x) => o.$emit("click"))
|
|
24
24
|
}, [
|
|
25
25
|
L(ge, { class: "!h-[15px] !w-[15px] flex-none text-white" }),
|
|
26
26
|
Re,
|
|
@@ -77,17 +77,17 @@ function B(e) {
|
|
|
77
77
|
}
|
|
78
78
|
return t.protocol === "http:" || t.protocol === "https:" ? o : "";
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function We(e) {
|
|
81
81
|
return String(e || "").toLowerCase().split(/\s+/).filter((o) => o.length >= 2);
|
|
82
82
|
}
|
|
83
83
|
function ue(e, o) {
|
|
84
84
|
const t = Ke(e);
|
|
85
85
|
if (!o || !o.length)
|
|
86
86
|
return t;
|
|
87
|
-
const
|
|
88
|
-
return t.replace(
|
|
87
|
+
const x = new RegExp(`(${o.map((d) => d.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "ig");
|
|
88
|
+
return t.replace(x, "<mark>$1</mark>");
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const Ge = {
|
|
91
91
|
video: '<polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/>',
|
|
92
92
|
image: '<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/>',
|
|
93
93
|
pdf: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="9" y1="15" x2="15" y2="15"/>',
|
|
@@ -97,7 +97,7 @@ const We = {
|
|
|
97
97
|
document: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/>'
|
|
98
98
|
};
|
|
99
99
|
function qe(e, o) {
|
|
100
|
-
return typeof e != "string" ? o :
|
|
100
|
+
return typeof e != "string" ? o : Ge[e.toLowerCase()] || o;
|
|
101
101
|
}
|
|
102
102
|
const oe = "zui.search.recent", _e = 5;
|
|
103
103
|
function ee() {
|
|
@@ -115,21 +115,21 @@ function Fe(e) {
|
|
|
115
115
|
const o = typeof e == "string" ? e.trim() : "";
|
|
116
116
|
if (!o)
|
|
117
117
|
return ee();
|
|
118
|
-
const t = [o, ...ee().filter((
|
|
118
|
+
const t = [o, ...ee().filter((x) => x.toLowerCase() !== o.toLowerCase())].slice(0, _e);
|
|
119
119
|
try {
|
|
120
120
|
window.localStorage.setItem(oe, JSON.stringify(t));
|
|
121
121
|
} catch {
|
|
122
122
|
}
|
|
123
123
|
return t;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Xe() {
|
|
126
126
|
try {
|
|
127
127
|
window.localStorage.removeItem(oe);
|
|
128
128
|
} catch {
|
|
129
129
|
}
|
|
130
130
|
return [];
|
|
131
131
|
}
|
|
132
|
-
const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e),
|
|
132
|
+
const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-search-field flex items-center gap-2.5 border-b-[1px] border-proclusteal-200 dark:border-line px-4 py-3.5" }, Je = ["placeholder"], Qe = {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "px-[18px] pb-0.5 pt-3.5 text-[15px] font-extrabold text-[#1e262c] dark:text-content"
|
|
135
135
|
}, Ze = {
|
|
@@ -163,7 +163,7 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Je = { class: "zui-
|
|
|
163
163
|
"stroke-linejoin": "round"
|
|
164
164
|
}, [
|
|
165
165
|
/* @__PURE__ */ a("polyline", { points: "9 18 15 12 9 6" })
|
|
166
|
-
], -1)), de = "zui-search-chip mb-2 mr-2 inline-flex cursor-pointer items-center gap-[7px] rounded-[20px] border-[1px] border-[#dde3e8] dark:border-line bg-[#f4f6f8] dark:bg-surface px-3.5 py-1.5 text-[13px] font-bold text-proclusteal-700 dark:text-content hover:border-proclusteal-950 dark:hover:border-focus", pe = "!border-proclusteal-950 !bg-proclusteal-950 !text-white",
|
|
166
|
+
], -1)), de = "zui-search-chip mb-2 mr-2 inline-flex cursor-pointer items-center gap-[7px] rounded-[20px] border-[1px] border-[#dde3e8] dark:border-line bg-[#f4f6f8] dark:bg-surface px-3.5 py-1.5 text-[13px] font-bold text-proclusteal-700 dark:text-content hover:border-proclusteal-950 dark:hover:border-focus", pe = "!border-proclusteal-950 !bg-proclusteal-950 !text-white", Y = "zui-search-state px-5 py-[26px] text-center text-[13px] font-medium text-[#667079] dark:text-content-muted", vt = {
|
|
167
167
|
__name: "GlobalSearchModal",
|
|
168
168
|
props: /* @__PURE__ */ se({
|
|
169
169
|
searchProvider: {
|
|
@@ -192,26 +192,26 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Je = { class: "zui-
|
|
|
192
192
|
}),
|
|
193
193
|
emits: /* @__PURE__ */ se(["navigate"], ["update:open"]),
|
|
194
194
|
setup(e, { emit: o }) {
|
|
195
|
-
const t = e,
|
|
195
|
+
const t = e, x = o, d = Ee(e, "open"), p = he(), _ = m(null), M = m(null), E = m(null), w = m(""), S = m(""), b = m([]), h = m("all"), l = m("zero"), f = m(-1), y = m([]);
|
|
196
196
|
let z = null, N = 0, j = null, I = null;
|
|
197
|
-
const
|
|
197
|
+
const G = A(() => We(S.value)), q = (n) => Ve(n, t.types), F = A(() => {
|
|
198
198
|
let n = 0;
|
|
199
|
-
return
|
|
200
|
-
const
|
|
199
|
+
return b.value.filter((u) => h.value === "all" || u.type === h.value).map((u) => {
|
|
200
|
+
const s = q(u.type);
|
|
201
201
|
return {
|
|
202
202
|
type: u.type,
|
|
203
|
-
label:
|
|
203
|
+
label: s.label,
|
|
204
204
|
items: u.items.map((c) => ({
|
|
205
205
|
url: B(c.Url),
|
|
206
|
-
titleHtml: ue(c.Title,
|
|
207
|
-
subtitleHtml: ue(c.Subtitle,
|
|
208
|
-
tileColour: Ce(c.Colour) ||
|
|
206
|
+
titleHtml: ue(c.Title, G.value),
|
|
207
|
+
subtitleHtml: ue(c.Subtitle, G.value),
|
|
208
|
+
tileColour: Ce(c.Colour) || s.colour,
|
|
209
209
|
// #518, REVISED 2026-09-26 (user: "the main icon to be Ref Library and then a
|
|
210
210
|
// small icon next to the name to show what type of document it is"). The tile
|
|
211
211
|
// carries the GROUP icon again - it is what tells the reader which part of
|
|
212
212
|
// Proclus a hit came from, and the first revision threw that away by putting the
|
|
213
213
|
// file type there instead.
|
|
214
|
-
tileIcon:
|
|
214
|
+
tileIcon: s.icon,
|
|
215
215
|
// The file type, as a small badge beside the title. `null` fallback rather than
|
|
216
216
|
// the group icon: an item with no kind must render NO badge, not a second copy
|
|
217
217
|
// of the tile icon next to its own name.
|
|
@@ -220,36 +220,36 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Je = { class: "zui-
|
|
|
220
220
|
// #519: a file opens in a new tab so the search - and whatever the user was
|
|
221
221
|
// doing behind it - is still there when they close the document. The ITEM may
|
|
222
222
|
// override its group, because one group can hold both files and pages.
|
|
223
|
-
newWindow: c.NewWindow === !0 || c.NewWindow !== !1 &&
|
|
223
|
+
newWindow: c.NewWindow === !0 || c.NewWindow !== !1 && s.newWindow === !0,
|
|
224
224
|
flatIdx: n++
|
|
225
225
|
}))
|
|
226
226
|
};
|
|
227
227
|
});
|
|
228
|
-
}), v = A(() => F.value.flatMap((n) => n.items)), k = A(() =>
|
|
229
|
-
function
|
|
228
|
+
}), v = A(() => F.value.flatMap((n) => n.items)), k = A(() => b.value.reduce((n, u) => n + u.items.length, 0));
|
|
229
|
+
function $(n) {
|
|
230
230
|
const u = v.value;
|
|
231
231
|
if (!u.length) {
|
|
232
|
-
|
|
232
|
+
f.value = -1;
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
|
-
|
|
235
|
+
f.value = Math.min(Math.max(n, 0), u.length - 1), ie(() => {
|
|
236
236
|
var c;
|
|
237
|
-
const
|
|
238
|
-
|
|
237
|
+
const s = (c = E.value) == null ? void 0 : c.querySelector(`[data-row-idx="${f.value}"]`);
|
|
238
|
+
s == null || s.scrollIntoView({ block: "nearest" });
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
241
|
function U(n) {
|
|
242
242
|
var u;
|
|
243
|
-
|
|
243
|
+
h.value = n, $(0), (u = _.value) == null || u.focus();
|
|
244
244
|
}
|
|
245
245
|
function ae(n, u = !1) {
|
|
246
|
-
var
|
|
246
|
+
var s, c;
|
|
247
247
|
if (n) {
|
|
248
248
|
if (u) {
|
|
249
249
|
window.open(n, "_blank", "noopener"), R();
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
|
-
|
|
252
|
+
x("navigate", n), (c = (s = p == null ? void 0 : p.vnode) == null ? void 0 : s.props) != null && c.onNavigate || (window.location.href = n), R();
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
function R() {
|
|
@@ -257,28 +257,28 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Je = { class: "zui-
|
|
|
257
257
|
}
|
|
258
258
|
async function Se(n) {
|
|
259
259
|
const u = ++N;
|
|
260
|
-
|
|
260
|
+
S.value = n;
|
|
261
261
|
try {
|
|
262
|
-
const
|
|
262
|
+
const s = await t.searchProvider(n);
|
|
263
263
|
if (u !== N || !d.value)
|
|
264
264
|
return;
|
|
265
|
-
|
|
265
|
+
b.value = s && s.groups || [], h.value = "all", l.value = b.value.length ? "results" : "empty", b.value.length && (y.value = Fe(n)), $(0);
|
|
266
266
|
} catch {
|
|
267
267
|
if (u !== N || !d.value)
|
|
268
268
|
return;
|
|
269
|
-
|
|
269
|
+
b.value = [], l.value = "error", f.value = -1;
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
J(w, (n) => {
|
|
273
273
|
clearTimeout(z);
|
|
274
274
|
const u = n.trim();
|
|
275
275
|
if (u.length < t.minChars) {
|
|
276
|
-
N++,
|
|
276
|
+
N++, b.value = [], l.value = u.length ? "hint" : "zero", f.value = -1;
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
279
279
|
z = setTimeout(() => Se(u), t.debounce);
|
|
280
|
-
}),
|
|
281
|
-
n ? (j = document.activeElement, y.value = ee(), w.value = "",
|
|
280
|
+
}), J(d, (n) => {
|
|
281
|
+
n ? (j = document.activeElement, y.value = ee(), w.value = "", S.value = "", b.value = [], h.value = "all", l.value = "zero", f.value = -1, I = document.body.style.overflow, document.body.style.overflow = "hidden", ie(() => {
|
|
282
282
|
var u;
|
|
283
283
|
return (u = _.value) == null ? void 0 : u.focus();
|
|
284
284
|
})) : (clearTimeout(z), N++, I !== null && (document.body.style.overflow = I, I = null), j != null && j.focus && j.focus());
|
|
@@ -290,29 +290,29 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Je = { class: "zui-
|
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
292
|
if (n.key === "ArrowDown") {
|
|
293
|
-
n.preventDefault(),
|
|
293
|
+
n.preventDefault(), $(f.value + 1);
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
296
|
if (n.key === "ArrowUp") {
|
|
297
|
-
n.preventDefault(),
|
|
297
|
+
n.preventDefault(), $(f.value - 1);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
if (n.key === "Enter") {
|
|
301
301
|
if (n.isComposing)
|
|
302
302
|
return;
|
|
303
|
-
const
|
|
304
|
-
if (!
|
|
303
|
+
const s = v.value;
|
|
304
|
+
if (!s.length)
|
|
305
305
|
return;
|
|
306
306
|
n.preventDefault();
|
|
307
|
-
const c =
|
|
307
|
+
const c = s[f.value >= 0 ? f.value : 0];
|
|
308
308
|
ae(c.url, c.newWindow);
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
311
|
if (n.key === "Tab") {
|
|
312
|
-
const
|
|
313
|
-
if (!(
|
|
312
|
+
const s = (u = M.value) == null ? void 0 : u.querySelectorAll('input, button, a[href], [tabindex]:not([tabindex="-1"])');
|
|
313
|
+
if (!(s != null && s.length))
|
|
314
314
|
return;
|
|
315
|
-
const c =
|
|
315
|
+
const c = s[0], V = s[s.length - 1];
|
|
316
316
|
n.shiftKey && document.activeElement === c ? (n.preventDefault(), V.focus()) : !n.shiftKey && document.activeElement === V && (n.preventDefault(), c.focus());
|
|
317
317
|
}
|
|
318
318
|
}
|
|
@@ -346,23 +346,23 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Je = { class: "zui-
|
|
|
346
346
|
}, [
|
|
347
347
|
a("div", {
|
|
348
348
|
ref_key: "panelEl",
|
|
349
|
-
ref:
|
|
349
|
+
ref: M,
|
|
350
350
|
class: "zui-search-panel mt-[4vh] flex max-h-[88vh] w-[94%] max-w-[720px] flex-col overflow-hidden rounded-[14px] bg-surface-raised font-sans shadow-[0_30px_80px_rgba(0,0,0,0.3)] sm:mt-[8vh] sm:max-h-[82vh]",
|
|
351
351
|
role: "dialog",
|
|
352
352
|
"aria-modal": "true",
|
|
353
353
|
"aria-label": "Search"
|
|
354
354
|
}, [
|
|
355
|
-
a("div",
|
|
355
|
+
a("div", Ye, [
|
|
356
356
|
L(ge, { class: "!h-[18px] !w-[18px] flex-none text-proclusteal-400 dark:text-content-muted" }),
|
|
357
357
|
te(a("input", {
|
|
358
358
|
ref_key: "inputEl",
|
|
359
359
|
ref: _,
|
|
360
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
360
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => w.value = s),
|
|
361
361
|
type: "text",
|
|
362
362
|
autocomplete: "off",
|
|
363
363
|
placeholder: e.placeholder,
|
|
364
364
|
class: "zui-search-input flex-1 border-0 bg-[transparent] p-0 text-[16px] text-[#1e262c] dark:text-content outline-none placeholder:text-proclusteal-400 dark:placeholder:text-content-muted focus:ring-0"
|
|
365
|
-
}, null, 8,
|
|
365
|
+
}, null, 8, Je), [
|
|
366
366
|
[Ae, w.value]
|
|
367
367
|
]),
|
|
368
368
|
a("button", {
|
|
@@ -373,83 +373,83 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Je = { class: "zui-
|
|
|
373
373
|
onClick: R
|
|
374
374
|
}, "×")
|
|
375
375
|
]),
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
l.value === "results" ? (r(), i("div", Qe, " Search results ")) : g("", !0),
|
|
377
|
+
l.value === "results" ? (r(), i("div", Ze, [
|
|
378
378
|
a("button", {
|
|
379
379
|
type: "button",
|
|
380
|
-
class: T([de,
|
|
381
|
-
onClick: u[1] || (u[1] = (
|
|
380
|
+
class: T([de, h.value === "all" ? pe : ""]),
|
|
381
|
+
onClick: u[1] || (u[1] = (s) => U("all"))
|
|
382
382
|
}, [
|
|
383
|
-
|
|
383
|
+
W(" All "),
|
|
384
384
|
a("span", {
|
|
385
|
-
class: T(["font-bold",
|
|
385
|
+
class: T(["font-bold", h.value === "all" ? "opacity-85" : "opacity-60"])
|
|
386
386
|
}, "(" + C(k.value) + ")", 3)
|
|
387
387
|
], 2),
|
|
388
|
-
(r(!0), i(O, null, P(
|
|
389
|
-
key:
|
|
388
|
+
(r(!0), i(O, null, P(b.value, (s) => (r(), i("button", {
|
|
389
|
+
key: s.type,
|
|
390
390
|
type: "button",
|
|
391
|
-
class: T([de,
|
|
392
|
-
onClick: (c) => U(
|
|
391
|
+
class: T([de, h.value === s.type ? pe : ""]),
|
|
392
|
+
onClick: (c) => U(s.type)
|
|
393
393
|
}, [
|
|
394
|
-
|
|
394
|
+
W(C(q(s.type).label) + " ", 1),
|
|
395
395
|
a("span", {
|
|
396
|
-
class: T(["font-bold",
|
|
397
|
-
}, "(" + C(
|
|
396
|
+
class: T(["font-bold", h.value === s.type ? "opacity-85" : "opacity-60"])
|
|
397
|
+
}, "(" + C(s.items.length) + ")", 3)
|
|
398
398
|
], 10, et))), 128))
|
|
399
399
|
])) : g("", !0),
|
|
400
400
|
a("div", {
|
|
401
401
|
ref_key: "resultsEl",
|
|
402
|
-
ref:
|
|
402
|
+
ref: E,
|
|
403
403
|
class: "zui-search-results overflow-y-auto pb-2.5"
|
|
404
404
|
}, [
|
|
405
|
-
|
|
405
|
+
l.value === "zero" && y.value.length ? (r(), i("div", tt, [
|
|
406
406
|
a("div", nt, [
|
|
407
407
|
ot,
|
|
408
408
|
a("button", {
|
|
409
409
|
type: "button",
|
|
410
410
|
class: "cursor-pointer border-0 bg-[transparent] p-0 text-[12px] font-semibold text-[#667079] dark:text-content-muted hover:text-proclusteal-950 dark:hover:text-focus",
|
|
411
411
|
"data-test": "search-recent-clear",
|
|
412
|
-
onClick: u[2] || (u[2] = (
|
|
412
|
+
onClick: u[2] || (u[2] = (s) => y.value = Q(Xe)())
|
|
413
413
|
}, "Clear")
|
|
414
414
|
]),
|
|
415
|
-
(r(!0), i(O, null, P(y.value, (
|
|
416
|
-
key:
|
|
415
|
+
(r(!0), i(O, null, P(y.value, (s, c) => (r(), i("button", {
|
|
416
|
+
key: s,
|
|
417
417
|
type: "button",
|
|
418
418
|
"data-test": "search-recent-item",
|
|
419
419
|
class: "zui-search-recent-row flex w-full cursor-pointer items-center gap-[13px] border-0 bg-[transparent] px-[18px] py-[9px] text-left text-[14px] text-[#1e262c] dark:text-content hover:bg-proclusteal-50 dark:hover:bg-surface-hover",
|
|
420
|
-
onClick: (V) => w.value =
|
|
420
|
+
onClick: (V) => w.value = s
|
|
421
421
|
}, [
|
|
422
422
|
at,
|
|
423
|
-
a("span", lt, C(
|
|
423
|
+
a("span", lt, C(s), 1)
|
|
424
424
|
], 8, rt))), 128))
|
|
425
|
-
])) :
|
|
425
|
+
])) : l.value === "zero" ? (r(), i("div", {
|
|
426
426
|
key: 1,
|
|
427
|
-
class: T(
|
|
428
|
-
}, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) :
|
|
427
|
+
class: T(Y)
|
|
428
|
+
}, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) : l.value === "hint" ? (r(), i("div", {
|
|
429
429
|
key: 2,
|
|
430
|
-
class: T(
|
|
431
|
-
}, " Keep typing… enter at least " + C(e.minChars) + " characters to search. ", 1)) :
|
|
430
|
+
class: T(Y)
|
|
431
|
+
}, " Keep typing… enter at least " + C(e.minChars) + " characters to search. ", 1)) : l.value === "empty" ? (r(), i("div", {
|
|
432
432
|
key: 3,
|
|
433
|
-
class: T(
|
|
434
|
-
}, " No results for “" + C(
|
|
433
|
+
class: T(Y)
|
|
434
|
+
}, " No results for “" + C(S.value) + "” — try a broader term or a code. ", 1)) : l.value === "error" ? (r(), i("div", {
|
|
435
435
|
key: 4,
|
|
436
|
-
class: T(
|
|
437
|
-
}, " Search is temporarily unavailable. ")) : (r(!0), i(O, { key: 5 }, P(F.value, (
|
|
438
|
-
key:
|
|
436
|
+
class: T(Y)
|
|
437
|
+
}, " Search is temporarily unavailable. ")) : (r(!0), i(O, { key: 5 }, P(F.value, (s) => (r(), i("div", {
|
|
438
|
+
key: s.type
|
|
439
439
|
}, [
|
|
440
440
|
a("div", st, [
|
|
441
|
-
|
|
442
|
-
a("span", it, "(" + C(
|
|
441
|
+
W(C(s.label) + " ", 1),
|
|
442
|
+
a("span", it, "(" + C(s.items.length) + ")", 1)
|
|
443
443
|
]),
|
|
444
|
-
(r(!0), i(O, null, P(
|
|
444
|
+
(r(!0), i(O, null, P(s.items, (c) => (r(), i("a", {
|
|
445
445
|
key: c.flatIdx,
|
|
446
446
|
href: c.url || null,
|
|
447
447
|
target: c.newWindow ? "_blank" : null,
|
|
448
448
|
rel: c.newWindow ? "noopener noreferrer" : null,
|
|
449
|
-
class: T(["zui-search-row flex items-center gap-[13px] px-[18px] py-[11px] text-[#1e262c] dark:text-content no-underline", { "bg-proclusteal-50 dark:bg-surface-hover": c.flatIdx ===
|
|
449
|
+
class: T(["zui-search-row flex items-center gap-[13px] px-[18px] py-[11px] text-[#1e262c] dark:text-content no-underline", { "bg-proclusteal-50 dark:bg-surface-hover": c.flatIdx === f.value }]),
|
|
450
450
|
"data-row-idx": c.flatIdx,
|
|
451
451
|
onClick: D((V) => ae(c.url, c.newWindow), ["exact", "prevent"]),
|
|
452
|
-
onMouseenter: (V) =>
|
|
452
|
+
onMouseenter: (V) => f.value = c.flatIdx
|
|
453
453
|
}, [
|
|
454
454
|
a("span", {
|
|
455
455
|
class: "inline-flex h-[42px] w-[42px] flex-none items-center justify-center rounded-[10px] text-white",
|
|
@@ -527,8 +527,8 @@ function bt(e) {
|
|
|
527
527
|
if (Object.prototype.hasOwnProperty.call(K, o))
|
|
528
528
|
t = o;
|
|
529
529
|
else {
|
|
530
|
-
const
|
|
531
|
-
d ? t = d : Object.prototype.hasOwnProperty.call(fe,
|
|
530
|
+
const x = o.toLowerCase(), d = Object.keys(K).find((p) => p.toLowerCase() === x);
|
|
531
|
+
d ? t = d : Object.prototype.hasOwnProperty.call(fe, x) && (t = fe[x]);
|
|
532
532
|
}
|
|
533
533
|
return !t || !Object.prototype.hasOwnProperty.call(K, t) ? "" : K[t].icon || "";
|
|
534
534
|
}
|
|
@@ -537,8 +537,8 @@ function kt(e) {
|
|
|
537
537
|
return "";
|
|
538
538
|
if (e.dateText)
|
|
539
539
|
return String(e.dateText);
|
|
540
|
-
const o = e.notifyday != null ? String(e.notifyday).replace(/^0/, "") : "", t = e.notifymonthname ? String(e.notifymonthname) : "",
|
|
541
|
-
return [o, t,
|
|
540
|
+
const o = e.notifyday != null ? String(e.notifyday).replace(/^0/, "") : "", t = e.notifymonthname ? String(e.notifymonthname) : "", x = e.notifyyear != null ? String(e.notifyyear) : "";
|
|
541
|
+
return [o, t, x].filter(Boolean).join(" ");
|
|
542
542
|
}
|
|
543
543
|
const gt = {
|
|
544
544
|
key: 0,
|
|
@@ -581,38 +581,38 @@ const gt = {
|
|
|
581
581
|
},
|
|
582
582
|
emits: ["markAsRead", "deleteNotification", "navigate", "open"],
|
|
583
583
|
setup(e, { emit: o }) {
|
|
584
|
-
const t = e,
|
|
585
|
-
var
|
|
586
|
-
return ((
|
|
587
|
-
}),
|
|
584
|
+
const t = e, x = o, d = m(null), p = m(!1), _ = A(() => {
|
|
585
|
+
var l;
|
|
586
|
+
return ((l = t.notifications) == null ? void 0 : l.data) || [];
|
|
587
|
+
}), M = A(() => t.unreadCount !== null && t.unreadCount !== void 0 ? t.unreadCount > 0 : _.value.some((l) => l.ClassRead === "unread"));
|
|
588
588
|
we(d, () => {
|
|
589
589
|
p.value = !1;
|
|
590
590
|
});
|
|
591
|
-
function
|
|
592
|
-
p.value = !p.value, p.value &&
|
|
591
|
+
function E() {
|
|
592
|
+
p.value = !p.value, p.value && x("open");
|
|
593
593
|
}
|
|
594
|
-
function w(
|
|
595
|
-
return
|
|
594
|
+
function w(l) {
|
|
595
|
+
return l && Object.prototype.hasOwnProperty.call(t.iconMap, l) && t.iconMap[l] || null;
|
|
596
596
|
}
|
|
597
|
-
function
|
|
598
|
-
const
|
|
599
|
-
if (
|
|
600
|
-
return { component:
|
|
601
|
-
const y = bt(
|
|
597
|
+
function S(l) {
|
|
598
|
+
const f = w(l.VueAppTypeIcon) || w(l.AppTypeName);
|
|
599
|
+
if (f)
|
|
600
|
+
return { component: f, path: "" };
|
|
601
|
+
const y = bt(l.AppTypeName);
|
|
602
602
|
return y ? { component: null, path: y } : { component: ce, path: "" };
|
|
603
603
|
}
|
|
604
|
-
const
|
|
605
|
-
item:
|
|
606
|
-
icon:
|
|
607
|
-
date: kt(
|
|
608
|
-
unread:
|
|
604
|
+
const b = A(() => _.value.map((l) => ({
|
|
605
|
+
item: l,
|
|
606
|
+
icon: S(l),
|
|
607
|
+
date: kt(l),
|
|
608
|
+
unread: l.ClassRead === "unread"
|
|
609
609
|
})));
|
|
610
|
-
function
|
|
610
|
+
function h(l) {
|
|
611
611
|
p.value = !1;
|
|
612
|
-
const
|
|
613
|
-
|
|
612
|
+
const f = B(l);
|
|
613
|
+
f && x("navigate", f);
|
|
614
614
|
}
|
|
615
|
-
return (
|
|
615
|
+
return (l, f) => (r(), i("div", {
|
|
616
616
|
ref_key: "rootEl",
|
|
617
617
|
ref: d,
|
|
618
618
|
class: "relative font-sans"
|
|
@@ -622,10 +622,10 @@ const gt = {
|
|
|
622
622
|
class: "relative flex cursor-pointer items-center justify-center text-proclusteal-600 dark:text-content-muted transition-colors duration-150 hover:text-proclusteal-900 dark:hover:text-focus",
|
|
623
623
|
title: "View Notifications",
|
|
624
624
|
"aria-label": "View Notifications",
|
|
625
|
-
onClick:
|
|
625
|
+
onClick: E
|
|
626
626
|
}, [
|
|
627
627
|
L(ce, { class: "!h-[21px] !w-[21px]" }),
|
|
628
|
-
|
|
628
|
+
M.value ? (r(), i("span", gt)) : g("", !0)
|
|
629
629
|
]),
|
|
630
630
|
L(me, {
|
|
631
631
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
@@ -639,10 +639,10 @@ const gt = {
|
|
|
639
639
|
te(a("div", wt, [
|
|
640
640
|
a("div", Ct, [
|
|
641
641
|
e.notifications ? _.value.length ? g("", !0) : (r(), i("div", St, " No notifications. ")) : (r(), i("div", _t, " Loading notifications… ")),
|
|
642
|
-
(r(!0), i(O, null, P(
|
|
642
|
+
(r(!0), i(O, null, P(b.value, (y) => (r(), i("div", {
|
|
643
643
|
key: y.item.NotifyID,
|
|
644
644
|
class: T(["flex cursor-pointer items-start gap-3 border-b-[1px] border-proclusteal-200 dark:border-line px-4 py-3", y.unread ? "bg-proclusteal-50 dark:bg-surface-hover" : "bg-surface-raised"]),
|
|
645
|
-
onClick: (z) =>
|
|
645
|
+
onClick: (z) => h(y.item.url)
|
|
646
646
|
}, [
|
|
647
647
|
a("span", Mt, [
|
|
648
648
|
y.icon.component ? (r(), H(be(y.icon.component), {
|
|
@@ -672,7 +672,7 @@ const gt = {
|
|
|
672
672
|
class: "hover:text-proclusteal-900 dark:hover:text-focus",
|
|
673
673
|
title: "Mark notification as read",
|
|
674
674
|
"aria-label": "Mark notification as read",
|
|
675
|
-
onClick: D((z) =>
|
|
675
|
+
onClick: D((z) => l.$emit("markAsRead", y.item.NotifyID), ["stop"])
|
|
676
676
|
}, [
|
|
677
677
|
L(je, { class: "!h-4 !w-4" })
|
|
678
678
|
], 8, Lt)) : g("", !0),
|
|
@@ -681,7 +681,7 @@ const gt = {
|
|
|
681
681
|
class: "hover:text-[#dd3730]",
|
|
682
682
|
title: "Delete notification",
|
|
683
683
|
"aria-label": "Delete notification",
|
|
684
|
-
onClick: D((z) =>
|
|
684
|
+
onClick: D((z) => l.$emit("deleteNotification", y.item.NotifyID), ["stop"])
|
|
685
685
|
}, [
|
|
686
686
|
L(De, { class: "!w-3" })
|
|
687
687
|
], 8, Ht)
|
|
@@ -689,9 +689,9 @@ const gt = {
|
|
|
689
689
|
], 10, $t))), 128))
|
|
690
690
|
]),
|
|
691
691
|
a("a", {
|
|
692
|
-
href:
|
|
692
|
+
href: Q(B)(e.notificationsUrl) || null,
|
|
693
693
|
class: "block border-t-[1px] border-proclusteal-200 dark:border-line px-4 py-2.5 text-center text-[13px] font-bold text-proclusteal-700 dark:text-content no-underline hover:bg-proclusteal-50 dark:hover:bg-surface-hover hover:text-proclusteal-900 dark:hover:text-focus",
|
|
694
|
-
onClick:
|
|
694
|
+
onClick: f[0] || (f[0] = D((y) => h(e.notificationsUrl), ["exact", "prevent"]))
|
|
695
695
|
}, " See all notifications ", 8, Ot)
|
|
696
696
|
], 512), [
|
|
697
697
|
[ke, p.value]
|
|
@@ -704,7 +704,7 @@ const gt = {
|
|
|
704
704
|
}, Dt = ["src"], Rt = {
|
|
705
705
|
key: 1,
|
|
706
706
|
class: "inline-flex h-[34px] w-[34px] items-center justify-center rounded-full bg-proclusteal-900 text-[13px] font-bold uppercase leading-none tracking-[0.5px] text-white"
|
|
707
|
-
}, Pt = { class: "absolute right-0 top-full z-30 mt-2 w-[260px] origin-top-right rounded-[10px] border-[1px] border-proclusteal-300 dark:border-line bg-surface-raised py-1 shadow-zeal-md" }, Bt = { class: "flex max-w-[260px] flex-col gap-0.5 whitespace-normal px-[18px] pb-2.5 pt-3" }, Ut = { class: "block text-[14px] font-bold text-proclusteal-800 dark:text-content" }, Vt = /* @__PURE__ */ a("span", { class: "my-1.5 block h-0.5 w-8 flex-none rounded-[1px] bg-[#cdd4da] dark:bg-line-strong" }, null, -1), Kt = { class: "block break-words text-[12px] leading-[1.3] text-proclusteal-600 dark:text-content-muted" },
|
|
707
|
+
}, Pt = { class: "absolute right-0 top-full z-30 mt-2 w-[260px] origin-top-right rounded-[10px] border-[1px] border-proclusteal-300 dark:border-line bg-surface-raised py-1 shadow-zeal-md" }, Bt = { class: "flex max-w-[260px] flex-col gap-0.5 whitespace-normal px-[18px] pb-2.5 pt-3" }, Ut = { class: "block text-[14px] font-bold text-proclusteal-800 dark:text-content" }, Vt = /* @__PURE__ */ a("span", { class: "my-1.5 block h-0.5 w-8 flex-none rounded-[1px] bg-[#cdd4da] dark:bg-line-strong" }, null, -1), Kt = { class: "block break-words text-[12px] leading-[1.3] text-proclusteal-600 dark:text-content-muted" }, Wt = /* @__PURE__ */ a("div", { class: "h-px bg-proclusteal-200 dark:bg-line" }, null, -1), Gt = {
|
|
708
708
|
key: 0,
|
|
709
709
|
class: "my-1 h-px bg-proclusteal-200 dark:bg-line"
|
|
710
710
|
}, qt = ["href", "onClick"], Ft = {
|
|
@@ -721,18 +721,18 @@ const gt = {
|
|
|
721
721
|
},
|
|
722
722
|
emits: ["select"],
|
|
723
723
|
setup(e, { emit: o }) {
|
|
724
|
-
const t = e,
|
|
725
|
-
|
|
724
|
+
const t = e, x = o, d = m(null), p = m(!1), _ = m(!1);
|
|
725
|
+
J(() => t.user.avatarUrl, () => {
|
|
726
726
|
_.value = !1;
|
|
727
727
|
});
|
|
728
|
-
const
|
|
728
|
+
const M = A(() => `${t.user.firstName || ""} ${t.user.surname || ""}`.trim()), E = A(() => `${(t.user.firstName || "").charAt(0)}${(t.user.surname || "").charAt(0)}`.toUpperCase());
|
|
729
729
|
we(d, () => {
|
|
730
730
|
p.value = !1;
|
|
731
731
|
});
|
|
732
|
-
function w(
|
|
733
|
-
p.value = !1,
|
|
732
|
+
function w(S) {
|
|
733
|
+
p.value = !1, x("select", S);
|
|
734
734
|
}
|
|
735
|
-
return (
|
|
735
|
+
return (S, b) => (r(), i("div", {
|
|
736
736
|
ref_key: "rootEl",
|
|
737
737
|
ref: d,
|
|
738
738
|
class: "relative font-sans"
|
|
@@ -742,15 +742,15 @@ const gt = {
|
|
|
742
742
|
class: "flex cursor-pointer items-center justify-center",
|
|
743
743
|
title: "View Menu Options",
|
|
744
744
|
"aria-label": "View Menu Options",
|
|
745
|
-
onClick:
|
|
745
|
+
onClick: b[1] || (b[1] = (h) => p.value = !p.value)
|
|
746
746
|
}, [
|
|
747
747
|
e.user.avatarUrl && !_.value ? (r(), i("img", {
|
|
748
748
|
key: 0,
|
|
749
749
|
src: e.user.avatarUrl,
|
|
750
750
|
alt: "",
|
|
751
751
|
class: "h-[34px] w-[34px] rounded-full object-cover",
|
|
752
|
-
onError:
|
|
753
|
-
}, null, 40, Dt)) : (r(), i("span", Rt, C(
|
|
752
|
+
onError: b[0] || (b[0] = (h) => _.value = !0)
|
|
753
|
+
}, null, 40, Dt)) : (r(), i("span", Rt, C(E.value), 1))
|
|
754
754
|
]),
|
|
755
755
|
L(me, {
|
|
756
756
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
@@ -763,23 +763,23 @@ const gt = {
|
|
|
763
763
|
default: ne(() => [
|
|
764
764
|
te(a("div", Pt, [
|
|
765
765
|
a("div", Bt, [
|
|
766
|
-
a("span", Ut, C(
|
|
766
|
+
a("span", Ut, C(M.value), 1),
|
|
767
767
|
Vt,
|
|
768
768
|
a("span", Kt, C(e.user.orgName), 1)
|
|
769
769
|
]),
|
|
770
|
-
|
|
771
|
-
(r(!0), i(O, null, P(e.menuItems, (
|
|
772
|
-
|
|
770
|
+
Wt,
|
|
771
|
+
(r(!0), i(O, null, P(e.menuItems, (h, l) => (r(), i(O, { key: l }, [
|
|
772
|
+
h.divider ? (r(), i("div", Gt)) : (r(), i("a", {
|
|
773
773
|
key: 1,
|
|
774
|
-
href:
|
|
774
|
+
href: h.href && Q(B)(h.href) || null,
|
|
775
775
|
class: "flex items-center gap-2.5 px-[18px] py-2 text-[13px] font-semibold text-proclusteal-700 dark:text-content no-underline hover:bg-proclusteal-50 dark:hover:bg-surface-hover hover:text-proclusteal-900 dark:hover:text-focus",
|
|
776
|
-
onClick: D((
|
|
776
|
+
onClick: D((f) => w(h), ["exact", "prevent"])
|
|
777
777
|
}, [
|
|
778
|
-
|
|
778
|
+
h.icon ? (r(), H(be(h.icon), {
|
|
779
779
|
key: 0,
|
|
780
780
|
class: "!h-4 !w-4 flex-none"
|
|
781
781
|
})) : g("", !0),
|
|
782
|
-
a("span", null, C(
|
|
782
|
+
a("span", null, C(h.label), 1)
|
|
783
783
|
], 8, qt))
|
|
784
784
|
], 64))), 128))
|
|
785
785
|
], 512), [
|
|
@@ -790,26 +790,26 @@ const gt = {
|
|
|
790
790
|
})
|
|
791
791
|
], 512));
|
|
792
792
|
}
|
|
793
|
-
},
|
|
794
|
-
function
|
|
795
|
-
if (!(e > 0) || !(
|
|
793
|
+
}, Xt = 18;
|
|
794
|
+
function Yt({ headerWidth: e, leftEnd: o, rightStart: t, pillWidth: x }, d = Xt) {
|
|
795
|
+
if (!(e > 0) || !(x > 0))
|
|
796
796
|
return !1;
|
|
797
797
|
const p = e / 2;
|
|
798
|
-
return p -
|
|
798
|
+
return p - x / 2 - d >= o && p + x / 2 + d <= t;
|
|
799
799
|
}
|
|
800
800
|
const xe = (e) => parseFloat(e) || 0;
|
|
801
|
-
function
|
|
802
|
-
const p = e.getBoundingClientRect(), _ = o.getBoundingClientRect(),
|
|
801
|
+
function Jt(e, o, t, x, d = (p) => getComputedStyle(p)) {
|
|
802
|
+
const p = e.getBoundingClientRect(), _ = o.getBoundingClientRect(), M = t.getBoundingClientRect(), E = x.offsetWidth, w = Array.from(o.children).reduce((l, f) => d(f).overflowX === "visible" ? l : l + Math.max(0, f.scrollWidth - f.clientWidth), 0), S = _.left - p.left + Math.max(o.scrollWidth, _.width) + w, h = d(x).position !== "absolute" ? Math.max(0, M.width - E - xe(d(t).columnGap)) : M.width;
|
|
803
803
|
return {
|
|
804
804
|
headerWidth: p.width,
|
|
805
|
-
leftEnd:
|
|
806
|
-
rightStart: p.width - xe(d(e).paddingRight) -
|
|
807
|
-
pillWidth:
|
|
805
|
+
leftEnd: S,
|
|
806
|
+
rightStart: p.width - xe(d(e).paddingRight) - h,
|
|
807
|
+
pillWidth: E
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
|
-
const
|
|
810
|
+
const Qt = {
|
|
811
811
|
key: 0,
|
|
812
|
-
class: "hidden
|
|
812
|
+
class: "hidden min-w-0 shrink-[999] truncate text-[18px] font-semibold text-proclusteal-800 dark:text-content sm:inline"
|
|
813
813
|
}, Zt = {
|
|
814
814
|
key: 0,
|
|
815
815
|
class: "font-normal text-black-800 dark:text-content-muted"
|
|
@@ -898,57 +898,57 @@ const Xt = {
|
|
|
898
898
|
"notifications-open"
|
|
899
899
|
],
|
|
900
900
|
setup(e, { emit: o }) {
|
|
901
|
-
const t = e,
|
|
902
|
-
function
|
|
901
|
+
const t = e, x = o, d = he(), p = m(!1), _ = A(() => !!t.notifications || t.unreadCount !== null && t.unreadCount !== void 0), M = m(null), E = m(null), w = m(null), S = m(null), b = m(!1);
|
|
902
|
+
function h() {
|
|
903
903
|
var k;
|
|
904
|
-
const v = (k =
|
|
905
|
-
|
|
904
|
+
const v = (k = S.value) == null ? void 0 : k.$el;
|
|
905
|
+
b.value = (v == null ? void 0 : v.nodeType) === 1 && !!(M.value && E.value && w.value) && Yt(Jt(M.value, E.value, w.value, v));
|
|
906
906
|
}
|
|
907
|
-
let
|
|
907
|
+
let l = null, f = !1, y = !0;
|
|
908
908
|
function z() {
|
|
909
|
-
|
|
910
|
-
|
|
909
|
+
f || (f = !0, requestAnimationFrame(() => {
|
|
910
|
+
f = !1, y && h();
|
|
911
911
|
}));
|
|
912
912
|
}
|
|
913
913
|
ye(() => {
|
|
914
|
-
if (
|
|
915
|
-
|
|
916
|
-
for (const v of [
|
|
917
|
-
v &&
|
|
914
|
+
if (h(), typeof ResizeObserver == "function") {
|
|
915
|
+
l = new ResizeObserver(z);
|
|
916
|
+
for (const v of [M.value, E.value, w.value])
|
|
917
|
+
v && l.observe(v);
|
|
918
918
|
}
|
|
919
|
-
}),
|
|
920
|
-
y = !1,
|
|
919
|
+
}), J(S, h, { flush: "post" }), ve(() => {
|
|
920
|
+
y = !1, l == null || l.disconnect();
|
|
921
921
|
});
|
|
922
922
|
const N = A(() => Ce(t.accentColour)), j = A(() => N.value || "#1c6f63");
|
|
923
923
|
function I(v) {
|
|
924
|
-
var
|
|
924
|
+
var $, U;
|
|
925
925
|
if (!v)
|
|
926
926
|
return;
|
|
927
927
|
const k = B(v);
|
|
928
|
-
k && (
|
|
928
|
+
k && (x("navigate", k), (U = ($ = d == null ? void 0 : d.vnode) == null ? void 0 : $.props) != null && U.onNavigate || (window.location.href = k));
|
|
929
929
|
}
|
|
930
|
-
function
|
|
931
|
-
|
|
930
|
+
function G() {
|
|
931
|
+
x("home"), I(t.homeUrl);
|
|
932
932
|
}
|
|
933
933
|
function q() {
|
|
934
934
|
window.history.back();
|
|
935
935
|
}
|
|
936
936
|
function F(v) {
|
|
937
|
-
|
|
937
|
+
x("menu-select", v), v.href && I(v.href);
|
|
938
938
|
}
|
|
939
939
|
return (v, k) => (r(), i("header", {
|
|
940
940
|
ref_key: "headerEl",
|
|
941
|
-
ref:
|
|
942
|
-
class: "relative flex h-[70px] shrink-0 items-center justify-between border-b-[1px] border-proclusteal-300 dark:border-line bg-surface-raised px-[15px] font-sans shadow-[0_1px_3px_rgba(20,40,45,0.05)] sm:px-[25px]"
|
|
941
|
+
ref: M,
|
|
942
|
+
class: "relative flex h-[70px] shrink-0 items-center justify-between gap-[18px] border-b-[1px] border-proclusteal-300 dark:border-line bg-surface-raised px-[15px] font-sans shadow-[0_1px_3px_rgba(20,40,45,0.05)] sm:px-[25px]"
|
|
943
943
|
}, [
|
|
944
944
|
a("div", {
|
|
945
945
|
ref_key: "leftEl",
|
|
946
|
-
ref:
|
|
946
|
+
ref: E,
|
|
947
947
|
class: "flex min-w-0 items-center gap-[18px]"
|
|
948
948
|
}, [
|
|
949
|
-
|
|
950
|
-
e.title ? (r(), i("span",
|
|
951
|
-
|
|
949
|
+
X(v.$slots, "logo"),
|
|
950
|
+
e.title ? (r(), i("span", Qt, [
|
|
951
|
+
W(C(e.title), 1),
|
|
952
952
|
e.subtitle ? (r(), i("span", Zt, " " + C(e.subtitle), 1)) : g("", !0)
|
|
953
953
|
])) : g("", !0),
|
|
954
954
|
N.value ? (r(), i("span", {
|
|
@@ -968,10 +968,10 @@ const Xt = {
|
|
|
968
968
|
}, {
|
|
969
969
|
default: ne(() => [
|
|
970
970
|
a("a", {
|
|
971
|
-
href:
|
|
971
|
+
href: Q(B)(e.homeUrl) || null,
|
|
972
972
|
class: "hover:text-[var(--hdr-accent)]",
|
|
973
973
|
"aria-label": e.homeTooltip,
|
|
974
|
-
onClick: D(
|
|
974
|
+
onClick: D(G, ["exact", "prevent"])
|
|
975
975
|
}, [
|
|
976
976
|
L(ze, { class: "!h-[22px] !w-[22px]" })
|
|
977
977
|
], 8, en)
|
|
@@ -988,23 +988,23 @@ const Xt = {
|
|
|
988
988
|
}, [
|
|
989
989
|
L(Le, { class: "!h-[22px] !w-[22px]" })
|
|
990
990
|
])) : g("", !0),
|
|
991
|
-
|
|
991
|
+
X(v.$slots, "nav-extra")
|
|
992
992
|
], 4),
|
|
993
|
-
|
|
993
|
+
X(v.$slots, "left")
|
|
994
994
|
], 512),
|
|
995
995
|
a("div", {
|
|
996
996
|
ref_key: "rightEl",
|
|
997
997
|
ref: w,
|
|
998
998
|
class: "flex items-center gap-[18px] sm:gap-[25px]"
|
|
999
999
|
}, [
|
|
1000
|
-
|
|
1000
|
+
X(v.$slots, "right"),
|
|
1001
1001
|
e.ready ? (r(), i(O, { key: 0 }, [
|
|
1002
1002
|
e.searchProvider ? (r(), H(Be, {
|
|
1003
1003
|
key: 0,
|
|
1004
1004
|
ref_key: "pillEl",
|
|
1005
|
-
ref:
|
|
1006
|
-
onClick: k[0] || (k[0] = (
|
|
1007
|
-
class: T({ "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":
|
|
1005
|
+
ref: S,
|
|
1006
|
+
onClick: k[0] || (k[0] = ($) => p.value = !0),
|
|
1007
|
+
class: T({ "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2": b.value })
|
|
1008
1008
|
}, null, 8, ["class"])) : g("", !0),
|
|
1009
1009
|
_.value ? (r(), H(jt, {
|
|
1010
1010
|
key: 1,
|
|
@@ -1012,9 +1012,9 @@ const Xt = {
|
|
|
1012
1012
|
"unread-count": e.unreadCount,
|
|
1013
1013
|
"notifications-url": e.notificationsUrl,
|
|
1014
1014
|
"icon-map": e.notificationIconMap,
|
|
1015
|
-
onMarkAsRead: k[1] || (k[1] = (
|
|
1016
|
-
onDeleteNotification: k[2] || (k[2] = (
|
|
1017
|
-
onOpen: k[3] || (k[3] = (
|
|
1015
|
+
onMarkAsRead: k[1] || (k[1] = ($) => v.$emit("markAsRead", $)),
|
|
1016
|
+
onDeleteNotification: k[2] || (k[2] = ($) => v.$emit("deleteNotification", $)),
|
|
1017
|
+
onOpen: k[3] || (k[3] = ($) => v.$emit("notifications-open")),
|
|
1018
1018
|
onNavigate: I
|
|
1019
1019
|
}, null, 8, ["notifications", "unread-count", "notifications-url", "icon-map"])) : g("", !0),
|
|
1020
1020
|
e.user ? (r(), H(Ft, {
|
|
@@ -1028,7 +1028,7 @@ const Xt = {
|
|
|
1028
1028
|
e.searchProvider ? (r(), H(mt, {
|
|
1029
1029
|
key: 0,
|
|
1030
1030
|
open: p.value,
|
|
1031
|
-
"onUpdate:open": k[4] || (k[4] = (
|
|
1031
|
+
"onUpdate:open": k[4] || (k[4] = ($) => p.value = $),
|
|
1032
1032
|
"search-provider": e.searchProvider,
|
|
1033
1033
|
placeholder: e.searchPlaceholder,
|
|
1034
1034
|
types: e.searchTypes,
|