@zealsolutions/zeal-ui 1.0.0-alpha.357 → 1.0.0-alpha.359
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 +129 -120
- package/dist/components/tiptap/index.js +307 -294
- package/dist/css/editorStyles.css +11 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as a, createElementBlock as
|
|
1
|
+
import { openBlock as a, createElementBlock as i, createVNode as T, createElementVNode as r, createTextVNode as j, mergeModels as te, useModel as ke, getCurrentInstance as ie, ref as k, computed as $, watch as K, nextTick as ne, onMounted as ge, onBeforeUnmount as we, createBlock as E, Teleport as Ce, withModifiers as N, withDirectives as G, vModelText as $e, createCommentVNode as m, normalizeClass as M, toDisplayString as b, Fragment as H, renderList as P, normalizeStyle as q, pushScopeId as Se, popScopeId as _e, Transition as ce, withCtx as ue, resolveDynamicComponent as de, unref as F, vShow as pe, renderSlot as V } from "vue";
|
|
2
2
|
import Me from "../../HouseIcon-BxmNyxvv.js";
|
|
3
3
|
import Te from "../../ArrowLeftIcon-Cgsy08pY.js";
|
|
4
4
|
import fe from "../../MagnifyingGlassIcon-ChYNIA-H.js";
|
|
@@ -14,12 +14,12 @@ const Ne = /* @__PURE__ */ r("span", { class: "hidden whitespace-nowrap sm:inlin
|
|
|
14
14
|
__name: "GlobalSearchPill",
|
|
15
15
|
emits: ["click"],
|
|
16
16
|
setup(e) {
|
|
17
|
-
return (
|
|
17
|
+
return (c, o) => (a(), i("button", {
|
|
18
18
|
type: "button",
|
|
19
19
|
class: "zui-search-pill inline-flex h-[34px] cursor-pointer items-center justify-center gap-[7px] rounded-lg border-[1px] border-solid border-proclusteal-300 dark:border-line bg-surface-raised pl-[11px] pr-[9px] font-sans text-[13px] font-semibold text-proclusteal-600 dark:text-content-muted transition-[border-color,color,box-shadow] duration-150 hover:border-proclusteal-950 dark:hover:border-focus hover:text-proclusteal-800 dark:hover:text-content hover:shadow-[0_1px_3px_rgba(20,40,45,0.08)] focus:border-proclusteal-950 dark:focus:border-focus focus:text-proclusteal-800 dark:focus:text-content focus:outline-none",
|
|
20
20
|
title: "Search (Ctrl K)",
|
|
21
21
|
"aria-label": "Search (Ctrl K)",
|
|
22
|
-
onClick: o[0] || (o[0] = (y) =>
|
|
22
|
+
onClick: o[0] || (o[0] = (y) => c.$emit("click"))
|
|
23
23
|
}, [
|
|
24
24
|
T(fe, { class: "!h-[15px] !w-[15px] flex-none text-proclusteal-950 dark:text-focus" }),
|
|
25
25
|
Ne,
|
|
@@ -43,47 +43,47 @@ const Ne = /* @__PURE__ */ r("span", { class: "hidden whitespace-nowrap sm:inlin
|
|
|
43
43
|
colour: "#9aa4ad",
|
|
44
44
|
icon: '<circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>'
|
|
45
45
|
};
|
|
46
|
-
function ze(e,
|
|
47
|
-
const o = { ...D, ...
|
|
46
|
+
function ze(e, c = {}) {
|
|
47
|
+
const o = { ...D, ...c };
|
|
48
48
|
return Object.prototype.hasOwnProperty.call(o, e) ? o[e] : { ...Le, label: e };
|
|
49
49
|
}
|
|
50
50
|
function De(e) {
|
|
51
|
-
return (e == null ? "" : String(e)).replace(/[&<>"']/g, (
|
|
51
|
+
return (e == null ? "" : String(e)).replace(/[&<>"']/g, (c) => ({
|
|
52
52
|
"&": "&",
|
|
53
53
|
"<": "<",
|
|
54
54
|
">": ">",
|
|
55
55
|
'"': """,
|
|
56
56
|
"'": "'"
|
|
57
|
-
})[
|
|
57
|
+
})[c]);
|
|
58
58
|
}
|
|
59
59
|
function he(e) {
|
|
60
60
|
if (!e)
|
|
61
61
|
return "";
|
|
62
|
-
const
|
|
63
|
-
return /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(
|
|
62
|
+
const c = String(e).trim();
|
|
63
|
+
return /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(c) || /^(rgb|rgba|hsl|hsla)\([0-9.,%\s/]+\)$/i.test(c) || /^[a-z]{3,20}$/i.test(c) ? c : "";
|
|
64
64
|
}
|
|
65
65
|
function O(e) {
|
|
66
66
|
if (!e)
|
|
67
67
|
return "";
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
68
|
+
const c = String(e).trim();
|
|
69
|
+
if (c.includes("\\"))
|
|
70
70
|
return "";
|
|
71
71
|
let o;
|
|
72
72
|
try {
|
|
73
|
-
o = new URL(
|
|
73
|
+
o = new URL(c, "https://url-check.invalid/");
|
|
74
74
|
} catch {
|
|
75
75
|
return "";
|
|
76
76
|
}
|
|
77
|
-
return o.protocol === "http:" || o.protocol === "https:" ?
|
|
77
|
+
return o.protocol === "http:" || o.protocol === "https:" ? c : "";
|
|
78
78
|
}
|
|
79
79
|
function je(e) {
|
|
80
|
-
return String(e || "").toLowerCase().split(/\s+/).filter((
|
|
80
|
+
return String(e || "").toLowerCase().split(/\s+/).filter((c) => c.length >= 2);
|
|
81
81
|
}
|
|
82
|
-
function ae(e,
|
|
82
|
+
function ae(e, c) {
|
|
83
83
|
const o = De(e);
|
|
84
|
-
if (!
|
|
84
|
+
if (!c || !c.length)
|
|
85
85
|
return o;
|
|
86
|
-
const y = new RegExp(`(${
|
|
86
|
+
const y = new RegExp(`(${c.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "ig");
|
|
87
87
|
return o.replace(y, "<mark>$1</mark>");
|
|
88
88
|
}
|
|
89
89
|
const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-search-field flex items-center gap-2.5 border-b-[1px] border-proclusteal-200 dark:border-line px-4 py-3.5" }, Be = ["placeholder"], Re = {
|
|
@@ -130,12 +130,12 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
130
130
|
openModifiers: {}
|
|
131
131
|
}),
|
|
132
132
|
emits: /* @__PURE__ */ te(["navigate"], ["update:open"]),
|
|
133
|
-
setup(e, { emit:
|
|
134
|
-
const o = e, y =
|
|
133
|
+
setup(e, { emit: c }) {
|
|
134
|
+
const o = e, y = c, p = ke(e, "open"), x = ie(), w = k(null), _ = k(null), A = k(null), g = k(""), S = k(""), v = k([]), f = k("all"), n = k("zero"), u = k(-1);
|
|
135
135
|
let d = null, C = 0, L = null, I = null;
|
|
136
136
|
const Q = $(() => je(S.value)), Y = (t) => ze(t, o.types), X = $(() => {
|
|
137
137
|
let t = 0;
|
|
138
|
-
return
|
|
138
|
+
return v.value.filter((s) => f.value === "all" || s.type === f.value).map((s) => {
|
|
139
139
|
const l = Y(s.type);
|
|
140
140
|
return {
|
|
141
141
|
type: s.type,
|
|
@@ -150,16 +150,16 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
150
150
|
}))
|
|
151
151
|
};
|
|
152
152
|
});
|
|
153
|
-
}), J = $(() => X.value.flatMap((t) => t.items)), ye = $(() =>
|
|
153
|
+
}), J = $(() => X.value.flatMap((t) => t.items)), ye = $(() => v.value.reduce((t, s) => t + s.items.length, 0));
|
|
154
154
|
function U(t) {
|
|
155
155
|
const s = J.value;
|
|
156
156
|
if (!s.length) {
|
|
157
|
-
|
|
157
|
+
u.value = -1;
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
u.value = Math.min(Math.max(t, 0), s.length - 1), ne(() => {
|
|
161
161
|
var h;
|
|
162
|
-
const l = (h = A.value) == null ? void 0 : h.querySelector(`[data-row-idx="${
|
|
162
|
+
const l = (h = A.value) == null ? void 0 : h.querySelector(`[data-row-idx="${u.value}"]`);
|
|
163
163
|
l == null || l.scrollIntoView({ block: "nearest" });
|
|
164
164
|
});
|
|
165
165
|
}
|
|
@@ -181,23 +181,23 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
181
181
|
const l = await o.searchProvider(t);
|
|
182
182
|
if (s !== C || !p.value)
|
|
183
183
|
return;
|
|
184
|
-
|
|
184
|
+
v.value = l && l.groups || [], f.value = "all", n.value = v.value.length ? "results" : "empty", U(0);
|
|
185
185
|
} catch {
|
|
186
186
|
if (s !== C || !p.value)
|
|
187
187
|
return;
|
|
188
|
-
|
|
188
|
+
v.value = [], n.value = "error", u.value = -1;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
K(g, (t) => {
|
|
192
192
|
clearTimeout(d);
|
|
193
193
|
const s = t.trim();
|
|
194
194
|
if (s.length < o.minChars) {
|
|
195
|
-
C++,
|
|
195
|
+
C++, v.value = [], n.value = s.length ? "hint" : "zero", u.value = -1;
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
198
|
d = setTimeout(() => me(s), o.debounce);
|
|
199
199
|
}), K(p, (t) => {
|
|
200
|
-
t ? (L = document.activeElement, g.value = "", S.value = "",
|
|
200
|
+
t ? (L = document.activeElement, g.value = "", S.value = "", v.value = [], f.value = "all", n.value = "zero", u.value = -1, I = document.body.style.overflow, document.body.style.overflow = "hidden", ne(() => {
|
|
201
201
|
var s;
|
|
202
202
|
return (s = w.value) == null ? void 0 : s.focus();
|
|
203
203
|
})) : (clearTimeout(d), C++, I !== null && (document.body.style.overflow = I, I = null), L != null && L.focus && L.focus());
|
|
@@ -209,11 +209,11 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
if (t.key === "ArrowDown") {
|
|
212
|
-
t.preventDefault(), U(
|
|
212
|
+
t.preventDefault(), U(u.value + 1);
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
if (t.key === "ArrowUp") {
|
|
216
|
-
t.preventDefault(), U(
|
|
216
|
+
t.preventDefault(), U(u.value - 1);
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
219
|
if (t.key === "Enter") {
|
|
@@ -222,7 +222,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
222
222
|
const l = J.value;
|
|
223
223
|
if (!l.length)
|
|
224
224
|
return;
|
|
225
|
-
t.preventDefault(), Z(l[
|
|
225
|
+
t.preventDefault(), Z(l[u.value >= 0 ? u.value : 0].url);
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
if (t.key === "Tab") {
|
|
@@ -255,7 +255,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
255
255
|
}), we(() => {
|
|
256
256
|
document.removeEventListener("keydown", ee), clearTimeout(d), C++, I !== null && (document.body.style.overflow = I, I = null);
|
|
257
257
|
}), (t, s) => (a(), E(Ce, { to: "body" }, [
|
|
258
|
-
p.value ? (a(),
|
|
258
|
+
p.value ? (a(), i("div", {
|
|
259
259
|
key: 0,
|
|
260
260
|
class: "zui-search-overlay fixed inset-0 z-[20000] flex items-start justify-center bg-[#11181c]/45",
|
|
261
261
|
onMousedown: N(z, ["self"]),
|
|
@@ -290,8 +290,8 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
290
290
|
onClick: z
|
|
291
291
|
}, "×")
|
|
292
292
|
]),
|
|
293
|
-
n.value === "results" ? (a(),
|
|
294
|
-
n.value === "results" ? (a(),
|
|
293
|
+
n.value === "results" ? (a(), i("div", Re, " Search results ")) : m("", !0),
|
|
294
|
+
n.value === "results" ? (a(), i("div", Ve, [
|
|
295
295
|
r("button", {
|
|
296
296
|
type: "button",
|
|
297
297
|
class: M([re, f.value === "all" ? le : ""]),
|
|
@@ -302,7 +302,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
302
302
|
class: M(["font-bold", f.value === "all" ? "opacity-85" : "opacity-60"])
|
|
303
303
|
}, "(" + b(ye.value) + ")", 3)
|
|
304
304
|
], 2),
|
|
305
|
-
(a(!0),
|
|
305
|
+
(a(!0), i(H, null, P(v.value, (l) => (a(), i("button", {
|
|
306
306
|
key: l.type,
|
|
307
307
|
type: "button",
|
|
308
308
|
class: M([re, f.value === l.type ? le : ""]),
|
|
@@ -313,44 +313,44 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
313
313
|
class: M(["font-bold", f.value === l.type ? "opacity-85" : "opacity-60"])
|
|
314
314
|
}, "(" + b(l.items.length) + ")", 3)
|
|
315
315
|
], 10, Ke))), 128))
|
|
316
|
-
])) :
|
|
316
|
+
])) : m("", !0),
|
|
317
317
|
r("div", {
|
|
318
318
|
ref_key: "resultsEl",
|
|
319
319
|
ref: A,
|
|
320
320
|
class: "zui-search-results overflow-y-auto pb-2.5"
|
|
321
321
|
}, [
|
|
322
|
-
n.value === "zero" ? (a(),
|
|
322
|
+
n.value === "zero" ? (a(), i("div", {
|
|
323
323
|
key: 0,
|
|
324
324
|
class: M(R)
|
|
325
|
-
}, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) : n.value === "hint" ? (a(),
|
|
325
|
+
}, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) : n.value === "hint" ? (a(), i("div", {
|
|
326
326
|
key: 1,
|
|
327
327
|
class: M(R)
|
|
328
|
-
}, " Keep typing… enter at least " + b(e.minChars) + " characters to search. ", 1)) : n.value === "empty" ? (a(),
|
|
328
|
+
}, " Keep typing… enter at least " + b(e.minChars) + " characters to search. ", 1)) : n.value === "empty" ? (a(), i("div", {
|
|
329
329
|
key: 2,
|
|
330
330
|
class: M(R)
|
|
331
|
-
}, " No results for “" + b(S.value) + "” — try a broader term or a code. ", 1)) : n.value === "error" ? (a(),
|
|
331
|
+
}, " No results for “" + b(S.value) + "” — try a broader term or a code. ", 1)) : n.value === "error" ? (a(), i("div", {
|
|
332
332
|
key: 3,
|
|
333
333
|
class: M(R)
|
|
334
|
-
}, " Search is temporarily unavailable. ")) : (a(!0),
|
|
334
|
+
}, " Search is temporarily unavailable. ")) : (a(!0), i(H, { key: 4 }, P(X.value, (l) => (a(), i("div", {
|
|
335
335
|
key: l.type
|
|
336
336
|
}, [
|
|
337
337
|
r("div", qe, [
|
|
338
338
|
j(b(l.label) + " ", 1),
|
|
339
339
|
r("span", Ge, "(" + b(l.items.length) + ")", 1)
|
|
340
340
|
]),
|
|
341
|
-
(a(!0),
|
|
341
|
+
(a(!0), i(H, null, P(l.items, (h) => (a(), i("a", {
|
|
342
342
|
key: h.flatIdx,
|
|
343
343
|
href: h.url || null,
|
|
344
|
-
class: M(["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": h.flatIdx ===
|
|
344
|
+
class: M(["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": h.flatIdx === u.value }]),
|
|
345
345
|
"data-row-idx": h.flatIdx,
|
|
346
346
|
onClick: N((B) => Z(h.url), ["exact", "prevent"]),
|
|
347
|
-
onMouseenter: (B) =>
|
|
347
|
+
onMouseenter: (B) => u.value = h.flatIdx
|
|
348
348
|
}, [
|
|
349
349
|
r("span", {
|
|
350
350
|
class: "inline-flex h-[42px] w-[42px] flex-none items-center justify-center rounded-[10px] text-white",
|
|
351
351
|
style: q({ background: h.tileColour })
|
|
352
352
|
}, [
|
|
353
|
-
(a(),
|
|
353
|
+
(a(), i("svg", {
|
|
354
354
|
class: "h-5 w-5",
|
|
355
355
|
viewBox: "0 0 24 24",
|
|
356
356
|
fill: "none",
|
|
@@ -376,7 +376,7 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
376
376
|
]))), 128))
|
|
377
377
|
], 512)
|
|
378
378
|
], 512)
|
|
379
|
-
], 32)) :
|
|
379
|
+
], 32)) : m("", !0)
|
|
380
380
|
]));
|
|
381
381
|
}
|
|
382
382
|
}, et = /* @__PURE__ */ Ae(Ze, [["__scopeId", "data-v-80fd510b"]]), se = {
|
|
@@ -400,14 +400,14 @@ const Pe = (e) => (Se("data-v-80fd510b"), e = e(), _e(), e), Ue = { class: "zui-
|
|
|
400
400
|
function tt(e) {
|
|
401
401
|
if (!e)
|
|
402
402
|
return "";
|
|
403
|
-
const
|
|
404
|
-
if (!
|
|
403
|
+
const c = String(e).trim();
|
|
404
|
+
if (!c)
|
|
405
405
|
return "";
|
|
406
406
|
let o = null;
|
|
407
|
-
if (Object.prototype.hasOwnProperty.call(D,
|
|
408
|
-
o =
|
|
407
|
+
if (Object.prototype.hasOwnProperty.call(D, c))
|
|
408
|
+
o = c;
|
|
409
409
|
else {
|
|
410
|
-
const y =
|
|
410
|
+
const y = c.toLowerCase(), p = Object.keys(D).find((x) => x.toLowerCase() === y);
|
|
411
411
|
p ? o = p : Object.prototype.hasOwnProperty.call(se, y) && (o = se[y]);
|
|
412
412
|
}
|
|
413
413
|
return !o || !Object.prototype.hasOwnProperty.call(D, o) ? "" : D[o].icon || "";
|
|
@@ -417,8 +417,8 @@ function nt(e) {
|
|
|
417
417
|
return "";
|
|
418
418
|
if (e.dateText)
|
|
419
419
|
return String(e.dateText);
|
|
420
|
-
const
|
|
421
|
-
return [
|
|
420
|
+
const c = e.notifyday != null ? String(e.notifyday).replace(/^0/, "") : "", o = e.notifymonthname ? String(e.notifymonthname) : "", y = e.notifyyear != null ? String(e.notifyyear) : "";
|
|
421
|
+
return [c, o, y].filter(Boolean).join(" ");
|
|
422
422
|
}
|
|
423
423
|
const ot = {
|
|
424
424
|
key: 0,
|
|
@@ -460,8 +460,8 @@ const ot = {
|
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
emits: ["markAsRead", "deleteNotification", "navigate", "open"],
|
|
463
|
-
setup(e, { emit:
|
|
464
|
-
const o = e, y =
|
|
463
|
+
setup(e, { emit: c }) {
|
|
464
|
+
const o = e, y = c, p = k(null), x = k(!1), w = $(() => {
|
|
465
465
|
var n;
|
|
466
466
|
return ((n = o.notifications) == null ? void 0 : n.data) || [];
|
|
467
467
|
}), _ = $(() => o.unreadCount !== null && o.unreadCount !== void 0 ? o.unreadCount > 0 : w.value.some((n) => n.ClassRead === "unread"));
|
|
@@ -475,13 +475,13 @@ const ot = {
|
|
|
475
475
|
return n && Object.prototype.hasOwnProperty.call(o.iconMap, n) && o.iconMap[n] || null;
|
|
476
476
|
}
|
|
477
477
|
function S(n) {
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
480
|
-
return { component:
|
|
478
|
+
const u = g(n.VueAppTypeIcon) || g(n.AppTypeName);
|
|
479
|
+
if (u)
|
|
480
|
+
return { component: u, path: "" };
|
|
481
481
|
const d = tt(n.AppTypeName);
|
|
482
482
|
return d ? { component: null, path: d } : { component: oe, path: "" };
|
|
483
483
|
}
|
|
484
|
-
const
|
|
484
|
+
const v = $(() => w.value.map((n) => ({
|
|
485
485
|
item: n,
|
|
486
486
|
icon: S(n),
|
|
487
487
|
date: nt(n),
|
|
@@ -489,10 +489,10 @@ const ot = {
|
|
|
489
489
|
})));
|
|
490
490
|
function f(n) {
|
|
491
491
|
x.value = !1;
|
|
492
|
-
const
|
|
493
|
-
|
|
492
|
+
const u = O(n);
|
|
493
|
+
u && y("navigate", u);
|
|
494
494
|
}
|
|
495
|
-
return (n,
|
|
495
|
+
return (n, u) => (a(), i("div", {
|
|
496
496
|
ref_key: "rootEl",
|
|
497
497
|
ref: p,
|
|
498
498
|
class: "relative font-sans"
|
|
@@ -505,7 +505,7 @@ const ot = {
|
|
|
505
505
|
onClick: A
|
|
506
506
|
}, [
|
|
507
507
|
T(oe, { class: "!h-[21px] !w-[21px]" }),
|
|
508
|
-
_.value ? (a(),
|
|
508
|
+
_.value ? (a(), i("span", ot)) : m("", !0)
|
|
509
509
|
]),
|
|
510
510
|
T(ce, {
|
|
511
511
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
@@ -518,8 +518,8 @@ const ot = {
|
|
|
518
518
|
default: ue(() => [
|
|
519
519
|
G(r("div", at, [
|
|
520
520
|
r("div", rt, [
|
|
521
|
-
e.notifications ? w.value.length ?
|
|
522
|
-
(a(!0),
|
|
521
|
+
e.notifications ? w.value.length ? m("", !0) : (a(), i("div", st, " No notifications. ")) : (a(), i("div", lt, " Loading notifications… ")),
|
|
522
|
+
(a(!0), i(H, null, P(v.value, (d) => (a(), i("div", {
|
|
523
523
|
key: d.item.NotifyID,
|
|
524
524
|
class: M(["flex cursor-pointer items-start gap-3 border-b-[1px] border-proclusteal-200 dark:border-line px-4 py-3", d.unread ? "bg-proclusteal-50 dark:bg-surface-hover" : "bg-surface-raised"]),
|
|
525
525
|
onClick: (C) => f(d.item.url)
|
|
@@ -528,7 +528,7 @@ const ot = {
|
|
|
528
528
|
d.icon.component ? (a(), E(de(d.icon.component), {
|
|
529
529
|
key: 0,
|
|
530
530
|
class: "!h-5 !w-5"
|
|
531
|
-
})) : (a(),
|
|
531
|
+
})) : (a(), i("svg", {
|
|
532
532
|
key: 1,
|
|
533
533
|
class: "h-5 w-5",
|
|
534
534
|
viewBox: "0 0 24 24",
|
|
@@ -543,10 +543,10 @@ const ot = {
|
|
|
543
543
|
r("span", dt, [
|
|
544
544
|
r("span", pt, b(d.item.notifyname), 1),
|
|
545
545
|
r("span", ft, b(d.item.summary), 1),
|
|
546
|
-
d.date ? (a(),
|
|
546
|
+
d.date ? (a(), i("span", xt, b(d.date), 1)) : m("", !0)
|
|
547
547
|
]),
|
|
548
548
|
r("span", ht, [
|
|
549
|
-
d.unread ? (a(),
|
|
549
|
+
d.unread ? (a(), i("button", {
|
|
550
550
|
key: 0,
|
|
551
551
|
type: "button",
|
|
552
552
|
class: "hover:text-proclusteal-900 dark:hover:text-focus",
|
|
@@ -555,7 +555,7 @@ const ot = {
|
|
|
555
555
|
onClick: N((C) => n.$emit("markAsRead", d.item.NotifyID), ["stop"])
|
|
556
556
|
}, [
|
|
557
557
|
T(Ie, { class: "!h-4 !w-4" })
|
|
558
|
-
], 8, yt)) :
|
|
558
|
+
], 8, yt)) : m("", !0),
|
|
559
559
|
r("button", {
|
|
560
560
|
type: "button",
|
|
561
561
|
class: "hover:text-[#dd3730]",
|
|
@@ -571,7 +571,7 @@ const ot = {
|
|
|
571
571
|
r("a", {
|
|
572
572
|
href: F(O)(e.notificationsUrl) || null,
|
|
573
573
|
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",
|
|
574
|
-
onClick:
|
|
574
|
+
onClick: u[0] || (u[0] = N((d) => f(e.notificationsUrl), ["exact", "prevent"]))
|
|
575
575
|
}, " See all notifications ", 8, vt)
|
|
576
576
|
], 512), [
|
|
577
577
|
[pe, x.value]
|
|
@@ -600,8 +600,8 @@ const ot = {
|
|
|
600
600
|
}
|
|
601
601
|
},
|
|
602
602
|
emits: ["select"],
|
|
603
|
-
setup(e, { emit:
|
|
604
|
-
const o = e, y =
|
|
603
|
+
setup(e, { emit: c }) {
|
|
604
|
+
const o = e, y = c, p = k(null), x = k(!1), w = k(!1);
|
|
605
605
|
K(() => o.user.avatarUrl, () => {
|
|
606
606
|
w.value = !1;
|
|
607
607
|
});
|
|
@@ -612,7 +612,7 @@ const ot = {
|
|
|
612
612
|
function g(S) {
|
|
613
613
|
x.value = !1, y("select", S);
|
|
614
614
|
}
|
|
615
|
-
return (S,
|
|
615
|
+
return (S, v) => (a(), i("div", {
|
|
616
616
|
ref_key: "rootEl",
|
|
617
617
|
ref: p,
|
|
618
618
|
class: "relative font-sans"
|
|
@@ -622,15 +622,15 @@ const ot = {
|
|
|
622
622
|
class: "flex cursor-pointer items-center justify-center",
|
|
623
623
|
title: "View Menu Options",
|
|
624
624
|
"aria-label": "View Menu Options",
|
|
625
|
-
onClick:
|
|
625
|
+
onClick: v[1] || (v[1] = (f) => x.value = !x.value)
|
|
626
626
|
}, [
|
|
627
|
-
e.user.avatarUrl && !w.value ? (a(),
|
|
627
|
+
e.user.avatarUrl && !w.value ? (a(), i("img", {
|
|
628
628
|
key: 0,
|
|
629
629
|
src: e.user.avatarUrl,
|
|
630
630
|
alt: "",
|
|
631
631
|
class: "h-[34px] w-[34px] rounded-full object-cover",
|
|
632
|
-
onError:
|
|
633
|
-
}, null, 40, kt)) : (a(),
|
|
632
|
+
onError: v[0] || (v[0] = (f) => w.value = !0)
|
|
633
|
+
}, null, 40, kt)) : (a(), i("span", gt, b(A.value), 1))
|
|
634
634
|
]),
|
|
635
635
|
T(ce, {
|
|
636
636
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
@@ -648,17 +648,17 @@ const ot = {
|
|
|
648
648
|
r("span", _t, b(e.user.orgName), 1)
|
|
649
649
|
]),
|
|
650
650
|
Mt,
|
|
651
|
-
(a(!0),
|
|
652
|
-
f.divider ? (a(),
|
|
651
|
+
(a(!0), i(H, null, P(e.menuItems, (f, n) => (a(), i(H, { key: n }, [
|
|
652
|
+
f.divider ? (a(), i("div", Tt)) : (a(), i("a", {
|
|
653
653
|
key: 1,
|
|
654
654
|
href: f.href && F(O)(f.href) || null,
|
|
655
655
|
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",
|
|
656
|
-
onClick: N((
|
|
656
|
+
onClick: N((u) => g(f), ["exact", "prevent"])
|
|
657
657
|
}, [
|
|
658
658
|
f.icon ? (a(), E(de(f.icon), {
|
|
659
659
|
key: 0,
|
|
660
660
|
class: "!h-4 !w-4 flex-none"
|
|
661
|
-
})) :
|
|
661
|
+
})) : m("", !0),
|
|
662
662
|
r("span", null, b(f.label), 1)
|
|
663
663
|
], 8, At))
|
|
664
664
|
], 64))), 128))
|
|
@@ -743,6 +743,13 @@ const ot = {
|
|
|
743
743
|
searchTypes: {
|
|
744
744
|
type: Object,
|
|
745
745
|
default: () => ({})
|
|
746
|
+
},
|
|
747
|
+
// #479: gate for the three top-right icons (search pill, bell, profile). Default true so
|
|
748
|
+
// existing consumers are unaffected; an app that loads its header data asynchronously passes
|
|
749
|
+
// false until user + notifications + search have all settled, then true to reveal all at once.
|
|
750
|
+
ready: {
|
|
751
|
+
type: Boolean,
|
|
752
|
+
default: !0
|
|
746
753
|
}
|
|
747
754
|
},
|
|
748
755
|
emits: [
|
|
@@ -753,42 +760,42 @@ const ot = {
|
|
|
753
760
|
"deleteNotification",
|
|
754
761
|
"notifications-open"
|
|
755
762
|
],
|
|
756
|
-
setup(e, { emit:
|
|
757
|
-
const o = e, y =
|
|
763
|
+
setup(e, { emit: c }) {
|
|
764
|
+
const o = e, y = c, p = ie(), x = k(!1), w = $(() => !!o.notifications || o.unreadCount !== null && o.unreadCount !== void 0), _ = $(() => he(o.accentColour)), A = $(() => _.value || "#1c6f63");
|
|
758
765
|
function g(n) {
|
|
759
766
|
var d, C;
|
|
760
767
|
if (!n)
|
|
761
768
|
return;
|
|
762
|
-
const
|
|
763
|
-
|
|
769
|
+
const u = O(n);
|
|
770
|
+
u && (y("navigate", u), (C = (d = p == null ? void 0 : p.vnode) == null ? void 0 : d.props) != null && C.onNavigate || (window.location.href = u));
|
|
764
771
|
}
|
|
765
772
|
function S() {
|
|
766
773
|
y("home"), g(o.homeUrl);
|
|
767
774
|
}
|
|
768
|
-
function
|
|
775
|
+
function v() {
|
|
769
776
|
window.history.back();
|
|
770
777
|
}
|
|
771
778
|
function f(n) {
|
|
772
779
|
y("menu-select", n), n.href && g(n.href);
|
|
773
780
|
}
|
|
774
|
-
return (n,
|
|
781
|
+
return (n, u) => (a(), i("header", Et, [
|
|
775
782
|
r("div", Nt, [
|
|
776
783
|
V(n.$slots, "logo"),
|
|
777
|
-
e.title ? (a(),
|
|
784
|
+
e.title ? (a(), i("span", Ht, [
|
|
778
785
|
j(b(e.title), 1),
|
|
779
|
-
e.subtitle ? (a(),
|
|
780
|
-
])) :
|
|
781
|
-
_.value ? (a(),
|
|
786
|
+
e.subtitle ? (a(), i("span", Ot, " " + b(e.subtitle), 1)) : m("", !0)
|
|
787
|
+
])) : m("", !0),
|
|
788
|
+
_.value ? (a(), i("span", {
|
|
782
789
|
key: 1,
|
|
783
790
|
class: "h-[45px] w-[2px] shrink-0",
|
|
784
791
|
style: q({ background: _.value }),
|
|
785
792
|
"aria-hidden": "true"
|
|
786
|
-
}, null, 4)) :
|
|
793
|
+
}, null, 4)) : m("", !0),
|
|
787
794
|
r("nav", {
|
|
788
795
|
class: "flex items-center gap-7 text-proclusteal-600 dark:text-content-muted",
|
|
789
796
|
style: q({ "--hdr-accent": A.value })
|
|
790
797
|
}, [
|
|
791
|
-
e.homeUrl ? (a(),
|
|
798
|
+
e.homeUrl ? (a(), i("a", {
|
|
792
799
|
key: 0,
|
|
793
800
|
href: F(O)(e.homeUrl) || null,
|
|
794
801
|
class: "hover:text-[var(--hdr-accent)]",
|
|
@@ -797,53 +804,55 @@ const ot = {
|
|
|
797
804
|
onClick: N(S, ["exact", "prevent"])
|
|
798
805
|
}, [
|
|
799
806
|
T(Me, { class: "!h-[22px] !w-[22px]" })
|
|
800
|
-
], 8, Lt)) :
|
|
801
|
-
e.showBack ? (a(),
|
|
807
|
+
], 8, Lt)) : m("", !0),
|
|
808
|
+
e.showBack ? (a(), i("button", {
|
|
802
809
|
key: 1,
|
|
803
810
|
type: "button",
|
|
804
811
|
class: "cursor-pointer hover:text-[var(--hdr-accent)]",
|
|
805
812
|
title: "Go Back",
|
|
806
813
|
"aria-label": "Go Back",
|
|
807
|
-
onClick:
|
|
814
|
+
onClick: v
|
|
808
815
|
}, [
|
|
809
816
|
T(Te, { class: "!h-[22px] !w-[22px]" })
|
|
810
|
-
])) :
|
|
817
|
+
])) : m("", !0)
|
|
811
818
|
], 4),
|
|
812
819
|
V(n.$slots, "left")
|
|
813
820
|
]),
|
|
814
821
|
r("div", zt, [
|
|
815
822
|
V(n.$slots, "right"),
|
|
816
|
-
e.
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
823
|
+
e.ready ? (a(), i(H, { key: 0 }, [
|
|
824
|
+
e.searchProvider ? (a(), E(Oe, {
|
|
825
|
+
key: 0,
|
|
826
|
+
onClick: u[0] || (u[0] = (d) => x.value = !0)
|
|
827
|
+
})) : m("", !0),
|
|
828
|
+
w.value ? (a(), E(bt, {
|
|
829
|
+
key: 1,
|
|
830
|
+
notifications: e.notifications,
|
|
831
|
+
"unread-count": e.unreadCount,
|
|
832
|
+
"notifications-url": e.notificationsUrl,
|
|
833
|
+
"icon-map": e.notificationIconMap,
|
|
834
|
+
onMarkAsRead: u[1] || (u[1] = (d) => n.$emit("markAsRead", d)),
|
|
835
|
+
onDeleteNotification: u[2] || (u[2] = (d) => n.$emit("deleteNotification", d)),
|
|
836
|
+
onOpen: u[3] || (u[3] = (d) => n.$emit("notifications-open")),
|
|
837
|
+
onNavigate: g
|
|
838
|
+
}, null, 8, ["notifications", "unread-count", "notifications-url", "icon-map"])) : m("", !0),
|
|
839
|
+
e.user ? (a(), E(It, {
|
|
840
|
+
key: 2,
|
|
841
|
+
user: e.user,
|
|
842
|
+
"menu-items": e.menuItems,
|
|
843
|
+
onSelect: f
|
|
844
|
+
}, null, 8, ["user", "menu-items"])) : m("", !0)
|
|
845
|
+
], 64)) : m("", !0)
|
|
837
846
|
]),
|
|
838
847
|
e.searchProvider ? (a(), E(et, {
|
|
839
848
|
key: 0,
|
|
840
849
|
open: x.value,
|
|
841
|
-
"onUpdate:open":
|
|
850
|
+
"onUpdate:open": u[4] || (u[4] = (d) => x.value = d),
|
|
842
851
|
"search-provider": e.searchProvider,
|
|
843
852
|
placeholder: e.searchPlaceholder,
|
|
844
853
|
types: e.searchTypes,
|
|
845
854
|
onNavigate: g
|
|
846
|
-
}, null, 8, ["open", "search-provider", "placeholder", "types"])) :
|
|
855
|
+
}, null, 8, ["open", "search-provider", "placeholder", "types"])) : m("", !0)
|
|
847
856
|
]));
|
|
848
857
|
}
|
|
849
858
|
};
|