@zealsolutions/zeal-ui 1.0.0-alpha.381 → 1.0.0-alpha.382
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 +234 -234
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { openBlock as r, createElementBlock as i, createVNode as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
1
|
+
import { openBlock as r, createElementBlock as i, createVNode as N, createElementVNode as a, createTextVNode as G, mergeModels as se, useModel as Ie, getCurrentInstance as he, ref as b, computed as A, watch as J, nextTick as ie, onMounted as ye, onBeforeUnmount as ve, createBlock as z, Teleport as Ae, withModifiers as j, withDirectives as te, vModelText as Te, createCommentVNode as k, normalizeClass as T, toDisplayString as _, Fragment as O, renderList as P, unref as Q, normalizeStyle as Z, pushScopeId as Le, popScopeId as He, Transition as me, withCtx as ne, resolveDynamicComponent as be, vShow as ke, renderSlot as Y } from "vue";
|
|
2
|
+
import Ne from "../../HouseIcon-BxmNyxvv.js";
|
|
3
|
+
import ze from "../../ArrowLeftIcon-Cgsy08pY.js";
|
|
4
|
+
import { _ as Oe } from "../../Tooltip-BG8E8i-l.js";
|
|
5
5
|
import ge from "../../MagnifyingGlassIcon-ChYNIA-H.js";
|
|
6
|
-
import { _ as
|
|
6
|
+
import { _ as Re } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
import { o as we } from "../../index-2g68oy2H.js";
|
|
8
8
|
import ce from "../../BellIcon-lK5EZXNf.js";
|
|
9
9
|
import je from "../../CircleCheckIcon-CA15yXgI.js";
|
|
10
10
|
import De from "../../XMarkIcon-DKJ_--uA.js";
|
|
11
|
-
const
|
|
11
|
+
const Pe = /* @__PURE__ */ a("span", { class: "hidden whitespace-nowrap sm:inline" }, "Search", -1), Be = /* @__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__ */
|
|
14
|
-
], -1),
|
|
13
|
+
/* @__PURE__ */ G("K ")
|
|
14
|
+
], -1), Ue = {
|
|
15
15
|
__name: "GlobalSearchPill",
|
|
16
16
|
emits: ["click"],
|
|
17
17
|
setup(e) {
|
|
@@ -22,9 +22,9 @@ const Re = /* @__PURE__ */ a("span", { class: "hidden whitespace-nowrap sm:inlin
|
|
|
22
22
|
"aria-label": "Search (Ctrl K)",
|
|
23
23
|
onClick: t[0] || (t[0] = (x) => o.$emit("click"))
|
|
24
24
|
}, [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
N(ge, { class: "!h-[15px] !w-[15px] flex-none text-white" }),
|
|
26
|
+
Pe,
|
|
27
|
+
Be
|
|
28
28
|
]));
|
|
29
29
|
}
|
|
30
30
|
}, K = {
|
|
@@ -40,15 +40,15 @@ const Re = /* @__PURE__ */ a("span", { class: "hidden whitespace-nowrap sm:inlin
|
|
|
40
40
|
EDS: { label: "Equipment Data", colour: "#708090", icon: '<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><rect x="8" y="2" width="8" height="4" rx="1" ry="1"/><line x1="8" y1="12" x2="16" y2="12"/><line x1="8" y1="16" x2="14" y2="16"/>' },
|
|
41
41
|
TIS: { label: "Training Sheets", colour: "#4682b4", icon: '<line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/>' },
|
|
42
42
|
Training: { label: "Training", colour: "#3f7cac", icon: '<path d="M22 10 12 5 2 10l10 5 10-5z"/><path d="M6 12v5c0 1 2.7 3 6 3s6-2 6-3v-5"/>' }
|
|
43
|
-
},
|
|
43
|
+
}, Ve = {
|
|
44
44
|
colour: "#9aa4ad",
|
|
45
45
|
icon: '<circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>'
|
|
46
46
|
};
|
|
47
|
-
function
|
|
47
|
+
function Ke(e, o = {}) {
|
|
48
48
|
const t = { ...K, ...o };
|
|
49
|
-
return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : { ...
|
|
49
|
+
return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : { ...Ve, label: e };
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Ge(e) {
|
|
52
52
|
return (e == null ? "" : String(e)).replace(/[&<>"']/g, (o) => ({
|
|
53
53
|
"&": "&",
|
|
54
54
|
"<": "<",
|
|
@@ -81,13 +81,13 @@ 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
|
-
const t =
|
|
84
|
+
const t = Ge(e);
|
|
85
85
|
if (!o || !o.length)
|
|
86
86
|
return t;
|
|
87
87
|
const x = new RegExp(`(${o.map((d) => d.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "ig");
|
|
88
88
|
return t.replace(x, "<mark>$1</mark>");
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const qe = {
|
|
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"/>',
|
|
@@ -96,8 +96,8 @@ const Ge = {
|
|
|
96
96
|
presentation: '<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"/><rect x="8" y="12" width="8" height="5" rx="1"/>',
|
|
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
|
-
function
|
|
100
|
-
return typeof e != "string" ? o :
|
|
99
|
+
function Fe(e, o) {
|
|
100
|
+
return typeof e != "string" ? o : qe[e.toLowerCase()] || o;
|
|
101
101
|
}
|
|
102
102
|
const oe = "zui.search.recent", _e = 5;
|
|
103
103
|
function ee() {
|
|
@@ -111,7 +111,7 @@ function ee() {
|
|
|
111
111
|
return [];
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Ye(e) {
|
|
115
115
|
const o = typeof e == "string" ? e.trim() : "";
|
|
116
116
|
if (!o)
|
|
117
117
|
return ee();
|
|
@@ -129,16 +129,16 @@ function Xe() {
|
|
|
129
129
|
}
|
|
130
130
|
return [];
|
|
131
131
|
}
|
|
132
|
-
const re = (e) => (
|
|
132
|
+
const re = (e) => (Le("data-v-7b7d8437"), e = e(), He(), e), Je = { class: "zui-search-field flex items-center gap-2.5 border-b-[1px] border-proclusteal-200 dark:border-line px-4 py-3.5" }, Qe = ["placeholder"], Ze = {
|
|
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
|
+
}, et = {
|
|
136
136
|
key: 1,
|
|
137
137
|
class: "border-b-[1px] border-proclusteal-200 dark:border-line px-[18px] pb-3 pt-2.5"
|
|
138
|
-
},
|
|
138
|
+
}, tt = ["onClick"], nt = {
|
|
139
139
|
key: 0,
|
|
140
140
|
class: "zui-search-recent py-1.5"
|
|
141
|
-
},
|
|
141
|
+
}, ot = { class: "flex items-center justify-between px-[18px] py-2" }, rt = /* @__PURE__ */ re(() => /* @__PURE__ */ a("span", { class: "text-[12px] font-extrabold tracking-[0.3px] text-proclusteal-700 dark:text-content" }, "Recent searches", -1)), at = ["onClick"], lt = /* @__PURE__ */ re(() => /* @__PURE__ */ a("svg", {
|
|
142
142
|
class: "h-4 w-4 flex-none text-[#9aa4ad]",
|
|
143
143
|
viewBox: "0 0 24 24",
|
|
144
144
|
fill: "none",
|
|
@@ -153,7 +153,7 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
153
153
|
r: "10"
|
|
154
154
|
}),
|
|
155
155
|
/* @__PURE__ */ a("polyline", { points: "12 6 12 12 16 14" })
|
|
156
|
-
], -1)),
|
|
156
|
+
], -1)), st = { class: "min-w-0 flex-1 truncate" }, it = { class: "zui-search-group sticky top-0 z-[1] border-t-[1px] border-proclusteal-200 dark:border-line bg-proclusteal-150 dark:bg-surface px-[18px] py-2 text-[12px] font-extrabold tracking-[0.3px] text-proclusteal-700 dark:text-content" }, ct = { class: "ml-0.5 text-[#667079] dark:text-content-muted" }, ut = ["href", "target", "rel", "data-row-idx", "onClick", "onMouseenter"], dt = ["innerHTML"], pt = { class: "min-w-0 flex-1" }, ft = { class: "flex min-w-0 items-center gap-[6px]" }, xt = ["aria-label", "innerHTML"], ht = ["innerHTML"], yt = ["innerHTML"], vt = /* @__PURE__ */ re(() => /* @__PURE__ */ a("svg", {
|
|
157
157
|
class: "h-4 w-4 flex-none text-[#c2cad1] dark:text-content-muted",
|
|
158
158
|
viewBox: "0 0 24 24",
|
|
159
159
|
fill: "none",
|
|
@@ -163,7 +163,7 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { 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", X = "zui-search-state px-5 py-[26px] text-center text-[13px] font-medium text-[#667079] dark:text-content-muted", mt = {
|
|
167
167
|
__name: "GlobalSearchModal",
|
|
168
168
|
props: /* @__PURE__ */ se({
|
|
169
169
|
searchProvider: {
|
|
@@ -192,19 +192,19 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
192
192
|
}),
|
|
193
193
|
emits: /* @__PURE__ */ se(["navigate"], ["update:open"]),
|
|
194
194
|
setup(e, { emit: o }) {
|
|
195
|
-
const t = e, x = o, d =
|
|
196
|
-
let
|
|
197
|
-
const
|
|
195
|
+
const t = e, x = o, d = Ie(e, "open"), p = he(), S = b(null), M = b(null), E = b(null), C = b(""), $ = b(""), m = b([]), h = b("all"), l = b("zero"), f = b(-1), y = b([]);
|
|
196
|
+
let H = null, L = 0, R = null, I = null;
|
|
197
|
+
const W = A(() => We($.value)), q = (n) => Ke(n, t.types), F = A(() => {
|
|
198
198
|
let n = 0;
|
|
199
|
-
return
|
|
199
|
+
return m.value.filter((u) => h.value === "all" || u.type === h.value).map((u) => {
|
|
200
200
|
const s = q(u.type);
|
|
201
201
|
return {
|
|
202
202
|
type: u.type,
|
|
203
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,
|
|
206
|
+
titleHtml: ue(c.Title, W.value),
|
|
207
|
+
subtitleHtml: ue(c.Subtitle, W.value),
|
|
208
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
|
|
@@ -215,7 +215,7 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
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.
|
|
218
|
-
kindIcon:
|
|
218
|
+
kindIcon: Fe(c.Kind, null),
|
|
219
219
|
kindLabel: typeof c.Kind == "string" ? c.Kind : "",
|
|
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
|
|
@@ -225,8 +225,8 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
225
225
|
}))
|
|
226
226
|
};
|
|
227
227
|
});
|
|
228
|
-
}), v = A(() => F.value.flatMap((n) => n.items)),
|
|
229
|
-
function
|
|
228
|
+
}), v = A(() => F.value.flatMap((n) => n.items)), g = A(() => m.value.reduce((n, u) => n + u.items.length, 0));
|
|
229
|
+
function w(n) {
|
|
230
230
|
const u = v.value;
|
|
231
231
|
if (!u.length) {
|
|
232
232
|
f.value = -1;
|
|
@@ -240,61 +240,61 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
240
240
|
}
|
|
241
241
|
function U(n) {
|
|
242
242
|
var u;
|
|
243
|
-
h.value = n,
|
|
243
|
+
h.value = n, w(0), (u = S.value) == null || u.focus();
|
|
244
244
|
}
|
|
245
245
|
function ae(n, u = !1) {
|
|
246
246
|
var s, c;
|
|
247
247
|
if (n) {
|
|
248
248
|
if (u) {
|
|
249
|
-
window.open(n, "_blank", "noopener"),
|
|
249
|
+
window.open(n, "_blank", "noopener"), D();
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
|
-
x("navigate", n), (c = (s = p == null ? void 0 : p.vnode) == null ? void 0 : s.props) != null && c.onNavigate || (window.location.href = n),
|
|
252
|
+
x("navigate", n), (c = (s = p == null ? void 0 : p.vnode) == null ? void 0 : s.props) != null && c.onNavigate || (window.location.href = n), D();
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function D() {
|
|
256
256
|
d.value = !1;
|
|
257
257
|
}
|
|
258
|
-
async function
|
|
259
|
-
const u = ++
|
|
260
|
-
|
|
258
|
+
async function $e(n) {
|
|
259
|
+
const u = ++L;
|
|
260
|
+
$.value = n;
|
|
261
261
|
try {
|
|
262
262
|
const s = await t.searchProvider(n);
|
|
263
|
-
if (u !==
|
|
263
|
+
if (u !== L || !d.value)
|
|
264
264
|
return;
|
|
265
|
-
|
|
265
|
+
m.value = s && s.groups || [], h.value = "all", l.value = m.value.length ? "results" : "empty", m.value.length && (y.value = Ye(n)), w(0);
|
|
266
266
|
} catch {
|
|
267
|
-
if (u !==
|
|
267
|
+
if (u !== L || !d.value)
|
|
268
268
|
return;
|
|
269
|
-
|
|
269
|
+
m.value = [], l.value = "error", f.value = -1;
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
J(
|
|
273
|
-
clearTimeout(
|
|
272
|
+
J(C, (n) => {
|
|
273
|
+
clearTimeout(H);
|
|
274
274
|
const u = n.trim();
|
|
275
275
|
if (u.length < t.minChars) {
|
|
276
|
-
|
|
276
|
+
L++, m.value = [], l.value = u.length ? "hint" : "zero", f.value = -1;
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
279
|
-
|
|
279
|
+
H = setTimeout(() => $e(u), t.debounce);
|
|
280
280
|
}), J(d, (n) => {
|
|
281
|
-
n ? (
|
|
281
|
+
n ? (R = document.activeElement, y.value = ee(), C.value = "", $.value = "", m.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
|
-
return (u =
|
|
284
|
-
})) : (clearTimeout(
|
|
283
|
+
return (u = S.value) == null ? void 0 : u.focus();
|
|
284
|
+
})) : (clearTimeout(H), L++, I !== null && (document.body.style.overflow = I, I = null), R != null && R.focus && R.focus());
|
|
285
285
|
}, { immediate: !0 });
|
|
286
|
-
function
|
|
286
|
+
function Me(n) {
|
|
287
287
|
var u;
|
|
288
288
|
if (n.key === "Escape") {
|
|
289
|
-
n.preventDefault(),
|
|
289
|
+
n.preventDefault(), D();
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
292
|
if (n.key === "ArrowDown") {
|
|
293
|
-
n.preventDefault(),
|
|
293
|
+
n.preventDefault(), w(f.value + 1);
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
296
|
if (n.key === "ArrowUp") {
|
|
297
|
-
n.preventDefault(),
|
|
297
|
+
n.preventDefault(), w(f.value - 1);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
if (n.key === "Enter") {
|
|
@@ -316,7 +316,7 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
316
316
|
n.shiftKey && document.activeElement === c ? (n.preventDefault(), V.focus()) : !n.shiftKey && document.activeElement === V && (n.preventDefault(), c.focus());
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function Ee(n) {
|
|
320
320
|
if (!n)
|
|
321
321
|
return !1;
|
|
322
322
|
const u = (n.tagName || "").toLowerCase();
|
|
@@ -324,25 +324,25 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
324
324
|
}
|
|
325
325
|
function le(n) {
|
|
326
326
|
if (n.key === "Escape" && d.value) {
|
|
327
|
-
n.preventDefault(),
|
|
327
|
+
n.preventDefault(), D();
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
330
|
if ((n.ctrlKey || n.metaKey) && (n.key === "k" || n.key === "K")) {
|
|
331
331
|
n.preventDefault(), d.value = !d.value;
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
n.key === "/" && !d.value && !
|
|
334
|
+
n.key === "/" && !d.value && !Ee(document.activeElement) && (n.preventDefault(), d.value = !0);
|
|
335
335
|
}
|
|
336
336
|
return ye(() => {
|
|
337
337
|
document.addEventListener("keydown", le);
|
|
338
338
|
}), ve(() => {
|
|
339
|
-
document.removeEventListener("keydown", le), clearTimeout(
|
|
340
|
-
}), (n, u) => (r(),
|
|
339
|
+
document.removeEventListener("keydown", le), clearTimeout(H), L++, I !== null && (document.body.style.overflow = I, I = null);
|
|
340
|
+
}), (n, u) => (r(), z(Ae, { to: "body" }, [
|
|
341
341
|
d.value ? (r(), i("div", {
|
|
342
342
|
key: 0,
|
|
343
343
|
class: "zui-search-overlay fixed inset-0 z-[20000] flex items-start justify-center bg-[#11181c]/45",
|
|
344
|
-
onMousedown: D
|
|
345
|
-
onKeydown:
|
|
344
|
+
onMousedown: j(D, ["self"]),
|
|
345
|
+
onKeydown: Me
|
|
346
346
|
}, [
|
|
347
347
|
a("div", {
|
|
348
348
|
ref_key: "panelEl",
|
|
@@ -352,59 +352,59 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
352
352
|
"aria-modal": "true",
|
|
353
353
|
"aria-label": "Search"
|
|
354
354
|
}, [
|
|
355
|
-
a("div",
|
|
356
|
-
|
|
355
|
+
a("div", Je, [
|
|
356
|
+
N(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
|
-
ref:
|
|
360
|
-
"onUpdate:modelValue": u[0] || (u[0] = (s) =>
|
|
359
|
+
ref: S,
|
|
360
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => C.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,
|
|
366
|
-
[
|
|
365
|
+
}, null, 8, Qe), [
|
|
366
|
+
[Te, C.value]
|
|
367
367
|
]),
|
|
368
368
|
a("button", {
|
|
369
369
|
type: "button",
|
|
370
370
|
class: "cursor-pointer border-0 bg-[transparent] px-1 text-[22px] leading-none text-proclusteal-400 dark:text-content-muted hover:text-proclusteal-700 dark:hover:text-content",
|
|
371
371
|
"aria-label": "Close search",
|
|
372
372
|
title: "Close (Esc)",
|
|
373
|
-
onClick:
|
|
373
|
+
onClick: D
|
|
374
374
|
}, "×")
|
|
375
375
|
]),
|
|
376
|
-
l.value === "results" ? (r(), i("div",
|
|
377
|
-
l.value === "results" ? (r(), i("div",
|
|
376
|
+
l.value === "results" ? (r(), i("div", Ze, " Search results ")) : k("", !0),
|
|
377
|
+
l.value === "results" ? (r(), i("div", et, [
|
|
378
378
|
a("button", {
|
|
379
379
|
type: "button",
|
|
380
380
|
class: T([de, h.value === "all" ? pe : ""]),
|
|
381
381
|
onClick: u[1] || (u[1] = (s) => U("all"))
|
|
382
382
|
}, [
|
|
383
|
-
|
|
383
|
+
G(" All "),
|
|
384
384
|
a("span", {
|
|
385
385
|
class: T(["font-bold", h.value === "all" ? "opacity-85" : "opacity-60"])
|
|
386
|
-
}, "(" +
|
|
386
|
+
}, "(" + _(g.value) + ")", 3)
|
|
387
387
|
], 2),
|
|
388
|
-
(r(!0), i(O, null, P(
|
|
388
|
+
(r(!0), i(O, null, P(m.value, (s) => (r(), i("button", {
|
|
389
389
|
key: s.type,
|
|
390
390
|
type: "button",
|
|
391
391
|
class: T([de, h.value === s.type ? pe : ""]),
|
|
392
392
|
onClick: (c) => U(s.type)
|
|
393
393
|
}, [
|
|
394
|
-
|
|
394
|
+
G(_(q(s.type).label) + " ", 1),
|
|
395
395
|
a("span", {
|
|
396
396
|
class: T(["font-bold", h.value === s.type ? "opacity-85" : "opacity-60"])
|
|
397
|
-
}, "(" +
|
|
398
|
-
], 10,
|
|
399
|
-
])) :
|
|
397
|
+
}, "(" + _(s.items.length) + ")", 3)
|
|
398
|
+
], 10, tt))), 128))
|
|
399
|
+
])) : k("", !0),
|
|
400
400
|
a("div", {
|
|
401
401
|
ref_key: "resultsEl",
|
|
402
402
|
ref: E,
|
|
403
403
|
class: "zui-search-results overflow-y-auto pb-2.5"
|
|
404
404
|
}, [
|
|
405
|
-
l.value === "zero" && y.value.length ? (r(), i("div",
|
|
406
|
-
a("div",
|
|
407
|
-
|
|
405
|
+
l.value === "zero" && y.value.length ? (r(), i("div", nt, [
|
|
406
|
+
a("div", ot, [
|
|
407
|
+
rt,
|
|
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",
|
|
@@ -417,29 +417,29 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
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) =>
|
|
420
|
+
onClick: (V) => C.value = s
|
|
421
421
|
}, [
|
|
422
|
-
|
|
423
|
-
a("span",
|
|
424
|
-
], 8,
|
|
422
|
+
lt,
|
|
423
|
+
a("span", st, _(s), 1)
|
|
424
|
+
], 8, at))), 128))
|
|
425
425
|
])) : l.value === "zero" ? (r(), i("div", {
|
|
426
426
|
key: 1,
|
|
427
|
-
class: T(
|
|
427
|
+
class: T(X)
|
|
428
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 " +
|
|
430
|
+
class: T(X)
|
|
431
|
+
}, " Keep typing… enter at least " + _(e.minChars) + " characters to search. ", 1)) : l.value === "empty" ? (r(), i("div", {
|
|
432
432
|
key: 3,
|
|
433
|
-
class: T(
|
|
434
|
-
}, " No results for “" +
|
|
433
|
+
class: T(X)
|
|
434
|
+
}, " No results for “" + _($.value) + "” — try a broader term or a code. ", 1)) : l.value === "error" ? (r(), i("div", {
|
|
435
435
|
key: 4,
|
|
436
|
-
class: T(
|
|
436
|
+
class: T(X)
|
|
437
437
|
}, " Search is temporarily unavailable. ")) : (r(!0), i(O, { key: 5 }, P(F.value, (s) => (r(), i("div", {
|
|
438
438
|
key: s.type
|
|
439
439
|
}, [
|
|
440
|
-
a("div",
|
|
441
|
-
|
|
442
|
-
a("span",
|
|
440
|
+
a("div", it, [
|
|
441
|
+
G(_(s.label) + " ", 1),
|
|
442
|
+
a("span", ct, "(" + _(s.items.length) + ")", 1)
|
|
443
443
|
]),
|
|
444
444
|
(r(!0), i(O, null, P(s.items, (c) => (r(), i("a", {
|
|
445
445
|
key: c.flatIdx,
|
|
@@ -448,7 +448,7 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
448
448
|
rel: c.newWindow ? "noopener noreferrer" : null,
|
|
449
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
|
-
onClick:
|
|
451
|
+
onClick: j((V) => ae(c.url, c.newWindow), ["exact", "prevent"]),
|
|
452
452
|
onMouseenter: (V) => f.value = c.flatIdx
|
|
453
453
|
}, [
|
|
454
454
|
a("span", {
|
|
@@ -464,10 +464,10 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
464
464
|
"stroke-linecap": "round",
|
|
465
465
|
"stroke-linejoin": "round",
|
|
466
466
|
innerHTML: c.tileIcon
|
|
467
|
-
}, null, 8,
|
|
467
|
+
}, null, 8, dt))
|
|
468
468
|
], 4),
|
|
469
|
-
a("span",
|
|
470
|
-
a("span",
|
|
469
|
+
a("span", pt, [
|
|
470
|
+
a("span", ft, [
|
|
471
471
|
c.kindIcon ? (r(), i("svg", {
|
|
472
472
|
key: 0,
|
|
473
473
|
class: "h-[13px] w-[13px] flex-none text-[#8a969c] dark:text-content-muted",
|
|
@@ -480,26 +480,26 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
480
480
|
"aria-label": c.kindLabel,
|
|
481
481
|
role: "img",
|
|
482
482
|
innerHTML: c.kindIcon
|
|
483
|
-
}, null, 8,
|
|
483
|
+
}, null, 8, xt)) : k("", !0),
|
|
484
484
|
a("span", {
|
|
485
485
|
class: "gs-marked min-w-0 truncate text-[14px] font-bold",
|
|
486
486
|
innerHTML: c.titleHtml
|
|
487
|
-
}, null, 8,
|
|
487
|
+
}, null, 8, ht)
|
|
488
488
|
]),
|
|
489
489
|
a("span", {
|
|
490
490
|
class: "gs-marked mt-0.5 block truncate text-[12.5px] text-[#5b6570] dark:text-content-muted",
|
|
491
491
|
innerHTML: c.subtitleHtml
|
|
492
|
-
}, null, 8,
|
|
492
|
+
}, null, 8, yt)
|
|
493
493
|
]),
|
|
494
|
-
|
|
495
|
-
], 42,
|
|
494
|
+
vt
|
|
495
|
+
], 42, ut))), 128))
|
|
496
496
|
]))), 128))
|
|
497
497
|
], 512)
|
|
498
498
|
], 512)
|
|
499
|
-
], 32)) :
|
|
499
|
+
], 32)) : k("", !0)
|
|
500
500
|
]));
|
|
501
501
|
}
|
|
502
|
-
},
|
|
502
|
+
}, bt = /* @__PURE__ */ Re(mt, [["__scopeId", "data-v-7b7d8437"]]), fe = {
|
|
503
503
|
"reference library": "RefLib",
|
|
504
504
|
reflib: "RefLib",
|
|
505
505
|
repository: "RefLib",
|
|
@@ -517,7 +517,7 @@ const re = (e) => (Te("data-v-7b7d8437"), e = e(), Ne(), e), Ye = { class: "zui-
|
|
|
517
517
|
directory: "Contact",
|
|
518
518
|
"telephone directory": "Contact"
|
|
519
519
|
};
|
|
520
|
-
function
|
|
520
|
+
function kt(e) {
|
|
521
521
|
if (!e)
|
|
522
522
|
return "";
|
|
523
523
|
const o = String(e).trim();
|
|
@@ -532,7 +532,7 @@ function bt(e) {
|
|
|
532
532
|
}
|
|
533
533
|
return !t || !Object.prototype.hasOwnProperty.call(K, t) ? "" : K[t].icon || "";
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function gt(e) {
|
|
536
536
|
if (!e)
|
|
537
537
|
return "";
|
|
538
538
|
if (e.dateText)
|
|
@@ -540,19 +540,19 @@ function kt(e) {
|
|
|
540
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
541
|
return [o, t, x].filter(Boolean).join(" ");
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const wt = {
|
|
544
544
|
key: 0,
|
|
545
545
|
class: "absolute -right-[3px] -top-[3px] h-2 w-2 rounded-full bg-[#dd3730] ring-2 ring-white dark:ring-surface-raised"
|
|
546
|
-
},
|
|
546
|
+
}, Ct = { class: "absolute right-0 top-full z-30 mt-2 w-[400px] max-w-[90vw] origin-top-right overflow-hidden rounded-[10px] border-[1px] border-proclusteal-300 dark:border-line bg-surface-raised shadow-zeal-md" }, _t = { class: "max-h-[420px] overflow-y-auto" }, St = {
|
|
547
547
|
key: 0,
|
|
548
548
|
class: "px-5 py-[26px] text-center text-[13px] font-medium text-[#667079] dark:text-content-muted"
|
|
549
|
-
},
|
|
549
|
+
}, $t = {
|
|
550
550
|
key: 1,
|
|
551
551
|
class: "px-5 py-[26px] text-center text-[13px] font-medium text-[#667079] dark:text-content-muted"
|
|
552
|
-
},
|
|
552
|
+
}, Mt = ["onClick"], Et = { class: "inline-flex h-[42px] w-[42px] flex-none items-center justify-center rounded-[10px] bg-proclusteal-950 text-white" }, It = ["innerHTML"], At = { class: "min-w-0 flex-1" }, Tt = { class: "block truncate text-[14px] font-bold text-[#1e262c] dark:text-content" }, Lt = { class: "block truncate text-[12.5px] text-[#5b6570] dark:text-content-muted" }, Ht = {
|
|
553
553
|
key: 0,
|
|
554
554
|
class: "mt-0.5 block text-[12px] text-proclusteal-500 dark:text-content-muted"
|
|
555
|
-
},
|
|
555
|
+
}, Nt = { class: "flex flex-none flex-col items-center gap-2 pt-0.5 text-proclusteal-600 dark:text-content-muted" }, zt = ["onClick"], Ot = ["onClick"], Rt = ["href"], jt = {
|
|
556
556
|
__name: "HeaderNotificationDropdown",
|
|
557
557
|
props: {
|
|
558
558
|
// The feed as /personal/GetNotifications.ashx returns it: { data: [...] }. Null means
|
|
@@ -581,30 +581,30 @@ const gt = {
|
|
|
581
581
|
},
|
|
582
582
|
emits: ["markAsRead", "deleteNotification", "navigate", "open"],
|
|
583
583
|
setup(e, { emit: o }) {
|
|
584
|
-
const t = e, x = o, d =
|
|
584
|
+
const t = e, x = o, d = b(null), p = b(!1), S = A(() => {
|
|
585
585
|
var l;
|
|
586
586
|
return ((l = t.notifications) == null ? void 0 : l.data) || [];
|
|
587
|
-
}), M = A(() => t.unreadCount !== null && t.unreadCount !== void 0 ? t.unreadCount > 0 :
|
|
587
|
+
}), M = A(() => t.unreadCount !== null && t.unreadCount !== void 0 ? t.unreadCount > 0 : S.value.some((l) => l.ClassRead === "unread"));
|
|
588
588
|
we(d, () => {
|
|
589
589
|
p.value = !1;
|
|
590
590
|
});
|
|
591
591
|
function E() {
|
|
592
592
|
p.value = !p.value, p.value && x("open");
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function C(l) {
|
|
595
595
|
return l && Object.prototype.hasOwnProperty.call(t.iconMap, l) && t.iconMap[l] || null;
|
|
596
596
|
}
|
|
597
|
-
function
|
|
598
|
-
const f =
|
|
597
|
+
function $(l) {
|
|
598
|
+
const f = C(l.VueAppTypeIcon) || C(l.AppTypeName);
|
|
599
599
|
if (f)
|
|
600
600
|
return { component: f, path: "" };
|
|
601
|
-
const y =
|
|
601
|
+
const y = kt(l.AppTypeName);
|
|
602
602
|
return y ? { component: null, path: y } : { component: ce, path: "" };
|
|
603
603
|
}
|
|
604
|
-
const
|
|
604
|
+
const m = A(() => S.value.map((l) => ({
|
|
605
605
|
item: l,
|
|
606
|
-
icon:
|
|
607
|
-
date:
|
|
606
|
+
icon: $(l),
|
|
607
|
+
date: gt(l),
|
|
608
608
|
unread: l.ClassRead === "unread"
|
|
609
609
|
})));
|
|
610
610
|
function h(l) {
|
|
@@ -624,10 +624,10 @@ const gt = {
|
|
|
624
624
|
"aria-label": "View Notifications",
|
|
625
625
|
onClick: E
|
|
626
626
|
}, [
|
|
627
|
-
|
|
628
|
-
M.value ? (r(), i("span",
|
|
627
|
+
N(ce, { class: "!h-[21px] !w-[21px]" }),
|
|
628
|
+
M.value ? (r(), i("span", wt)) : k("", !0)
|
|
629
629
|
]),
|
|
630
|
-
|
|
630
|
+
N(me, {
|
|
631
631
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
632
632
|
"enter-from-class": "scale-95 opacity-0",
|
|
633
633
|
"enter-to-class": "scale-100 opacity-100",
|
|
@@ -636,16 +636,16 @@ const gt = {
|
|
|
636
636
|
"leave-to-class": "scale-95 opacity-0"
|
|
637
637
|
}, {
|
|
638
638
|
default: ne(() => [
|
|
639
|
-
te(a("div",
|
|
640
|
-
a("div",
|
|
641
|
-
e.notifications ?
|
|
642
|
-
(r(!0), i(O, null, P(
|
|
639
|
+
te(a("div", Ct, [
|
|
640
|
+
a("div", _t, [
|
|
641
|
+
e.notifications ? S.value.length ? k("", !0) : (r(), i("div", $t, " No notifications. ")) : (r(), i("div", St, " Loading notifications… ")),
|
|
642
|
+
(r(!0), i(O, null, P(m.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: (
|
|
645
|
+
onClick: (H) => h(y.item.url)
|
|
646
646
|
}, [
|
|
647
|
-
a("span",
|
|
648
|
-
y.icon.component ? (r(),
|
|
647
|
+
a("span", Et, [
|
|
648
|
+
y.icon.component ? (r(), z(be(y.icon.component), {
|
|
649
649
|
key: 0,
|
|
650
650
|
class: "!h-5 !w-5"
|
|
651
651
|
})) : (r(), i("svg", {
|
|
@@ -658,41 +658,41 @@ const gt = {
|
|
|
658
658
|
"stroke-linecap": "round",
|
|
659
659
|
"stroke-linejoin": "round",
|
|
660
660
|
innerHTML: y.icon.path
|
|
661
|
-
}, null, 8,
|
|
661
|
+
}, null, 8, It))
|
|
662
662
|
]),
|
|
663
|
-
a("span",
|
|
664
|
-
a("span",
|
|
665
|
-
a("span",
|
|
666
|
-
y.date ? (r(), i("span",
|
|
663
|
+
a("span", At, [
|
|
664
|
+
a("span", Tt, _(y.item.notifyname), 1),
|
|
665
|
+
a("span", Lt, _(y.item.summary), 1),
|
|
666
|
+
y.date ? (r(), i("span", Ht, _(y.date), 1)) : k("", !0)
|
|
667
667
|
]),
|
|
668
|
-
a("span",
|
|
668
|
+
a("span", Nt, [
|
|
669
669
|
y.unread ? (r(), i("button", {
|
|
670
670
|
key: 0,
|
|
671
671
|
type: "button",
|
|
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:
|
|
675
|
+
onClick: j((H) => l.$emit("markAsRead", y.item.NotifyID), ["stop"])
|
|
676
676
|
}, [
|
|
677
|
-
|
|
678
|
-
], 8,
|
|
677
|
+
N(je, { class: "!h-4 !w-4" })
|
|
678
|
+
], 8, zt)) : k("", !0),
|
|
679
679
|
a("button", {
|
|
680
680
|
type: "button",
|
|
681
681
|
class: "hover:text-[#dd3730]",
|
|
682
682
|
title: "Delete notification",
|
|
683
683
|
"aria-label": "Delete notification",
|
|
684
|
-
onClick:
|
|
684
|
+
onClick: j((H) => l.$emit("deleteNotification", y.item.NotifyID), ["stop"])
|
|
685
685
|
}, [
|
|
686
|
-
|
|
687
|
-
], 8,
|
|
686
|
+
N(De, { class: "!w-3" })
|
|
687
|
+
], 8, Ot)
|
|
688
688
|
])
|
|
689
|
-
], 10,
|
|
689
|
+
], 10, Mt))), 128))
|
|
690
690
|
]),
|
|
691
691
|
a("a", {
|
|
692
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: f[0] || (f[0] =
|
|
695
|
-
}, " See all notifications ", 8,
|
|
694
|
+
onClick: f[0] || (f[0] = j((y) => h(e.notificationsUrl), ["exact", "prevent"]))
|
|
695
|
+
}, " See all notifications ", 8, Rt)
|
|
696
696
|
], 512), [
|
|
697
697
|
[ke, p.value]
|
|
698
698
|
])
|
|
@@ -701,13 +701,13 @@ const gt = {
|
|
|
701
701
|
})
|
|
702
702
|
], 512));
|
|
703
703
|
}
|
|
704
|
-
}, Dt = ["src"],
|
|
704
|
+
}, Dt = ["src"], Pt = {
|
|
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
|
-
},
|
|
707
|
+
}, Bt = { 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" }, Ut = { class: "flex max-w-[260px] flex-col gap-0.5 whitespace-normal px-[18px] pb-2.5 pt-3" }, Vt = { class: "block text-[14px] font-bold text-proclusteal-800 dark:text-content" }, Kt = /* @__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), Gt = { 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), qt = {
|
|
708
708
|
key: 0,
|
|
709
709
|
class: "my-1 h-px bg-proclusteal-200 dark:bg-line"
|
|
710
|
-
},
|
|
710
|
+
}, Ft = ["href", "onClick"], Yt = {
|
|
711
711
|
__name: "HeaderUserMenu",
|
|
712
712
|
props: {
|
|
713
713
|
user: {
|
|
@@ -721,18 +721,18 @@ const gt = {
|
|
|
721
721
|
},
|
|
722
722
|
emits: ["select"],
|
|
723
723
|
setup(e, { emit: o }) {
|
|
724
|
-
const t = e, x = o, d =
|
|
724
|
+
const t = e, x = o, d = b(null), p = b(!1), S = b(!1);
|
|
725
725
|
J(() => t.user.avatarUrl, () => {
|
|
726
|
-
|
|
726
|
+
S.value = !1;
|
|
727
727
|
});
|
|
728
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
|
|
733
|
-
p.value = !1, x("select",
|
|
732
|
+
function C($) {
|
|
733
|
+
p.value = !1, x("select", $);
|
|
734
734
|
}
|
|
735
|
-
return (
|
|
735
|
+
return ($, m) => (r(), i("div", {
|
|
736
736
|
ref_key: "rootEl",
|
|
737
737
|
ref: d,
|
|
738
738
|
class: "relative font-sans"
|
|
@@ -742,17 +742,17 @@ 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: m[1] || (m[1] = (h) => p.value = !p.value)
|
|
746
746
|
}, [
|
|
747
|
-
e.user.avatarUrl && !
|
|
747
|
+
e.user.avatarUrl && !S.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",
|
|
752
|
+
onError: m[0] || (m[0] = (h) => S.value = !0)
|
|
753
|
+
}, null, 40, Dt)) : (r(), i("span", Pt, _(E.value), 1))
|
|
754
754
|
]),
|
|
755
|
-
|
|
755
|
+
N(me, {
|
|
756
756
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
757
757
|
"enter-from-class": "scale-95 opacity-0",
|
|
758
758
|
"enter-to-class": "scale-100 opacity-100",
|
|
@@ -761,26 +761,26 @@ const gt = {
|
|
|
761
761
|
"leave-to-class": "scale-95 opacity-0"
|
|
762
762
|
}, {
|
|
763
763
|
default: ne(() => [
|
|
764
|
-
te(a("div",
|
|
765
|
-
a("div",
|
|
766
|
-
a("span",
|
|
767
|
-
|
|
768
|
-
a("span",
|
|
764
|
+
te(a("div", Bt, [
|
|
765
|
+
a("div", Ut, [
|
|
766
|
+
a("span", Vt, _(M.value), 1),
|
|
767
|
+
Kt,
|
|
768
|
+
a("span", Gt, _(e.user.orgName), 1)
|
|
769
769
|
]),
|
|
770
770
|
Wt,
|
|
771
771
|
(r(!0), i(O, null, P(e.menuItems, (h, l) => (r(), i(O, { key: l }, [
|
|
772
|
-
h.divider ? (r(), i("div",
|
|
772
|
+
h.divider ? (r(), i("div", qt)) : (r(), i("a", {
|
|
773
773
|
key: 1,
|
|
774
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:
|
|
776
|
+
onClick: j((f) => C(h), ["exact", "prevent"])
|
|
777
777
|
}, [
|
|
778
|
-
h.icon ? (r(),
|
|
778
|
+
h.icon ? (r(), z(be(h.icon), {
|
|
779
779
|
key: 0,
|
|
780
780
|
class: "!h-4 !w-4 flex-none"
|
|
781
|
-
})) :
|
|
782
|
-
a("span", null,
|
|
783
|
-
], 8,
|
|
781
|
+
})) : k("", !0),
|
|
782
|
+
a("span", null, _(h.label), 1)
|
|
783
|
+
], 8, Ft))
|
|
784
784
|
], 64))), 128))
|
|
785
785
|
], 512), [
|
|
786
786
|
[ke, p.value]
|
|
@@ -790,30 +790,30 @@ const gt = {
|
|
|
790
790
|
})
|
|
791
791
|
], 512));
|
|
792
792
|
}
|
|
793
|
-
}, Xt =
|
|
794
|
-
function
|
|
793
|
+
}, Se = 18, Xt = 2;
|
|
794
|
+
function Jt({ headerWidth: e, leftEnd: o, rightStart: t, pillWidth: x }, d = Se) {
|
|
795
795
|
if (!(e > 0) || !(x > 0))
|
|
796
796
|
return !1;
|
|
797
797
|
const p = e / 2;
|
|
798
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(),
|
|
801
|
+
function Qt(e, o, t, x, d = (p) => getComputedStyle(p)) {
|
|
802
|
+
const p = e.getBoundingClientRect(), S = o.getBoundingClientRect(), M = t.getBoundingClientRect(), E = x.getBoundingClientRect().width, C = 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, S.width) + C, 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:
|
|
805
|
+
leftEnd: $,
|
|
806
806
|
rightStart: p.width - xe(d(e).paddingRight) - h,
|
|
807
807
|
pillWidth: E
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
|
-
const
|
|
810
|
+
const Zt = {
|
|
811
811
|
key: 0,
|
|
812
812
|
class: "hidden min-w-0 shrink-[999] truncate text-[18px] font-semibold text-proclusteal-800 dark:text-content sm:inline"
|
|
813
|
-
},
|
|
813
|
+
}, en = {
|
|
814
814
|
key: 0,
|
|
815
815
|
class: "font-normal text-black-800 dark:text-content-muted"
|
|
816
|
-
},
|
|
816
|
+
}, tn = ["href", "aria-label"], fn = {
|
|
817
817
|
__name: "AppHeader",
|
|
818
818
|
props: {
|
|
819
819
|
title: {
|
|
@@ -898,36 +898,36 @@ const Qt = {
|
|
|
898
898
|
"notifications-open"
|
|
899
899
|
],
|
|
900
900
|
setup(e, { emit: o }) {
|
|
901
|
-
const t = e, x = o, d = he(), p =
|
|
901
|
+
const t = e, x = o, d = he(), p = b(!1), S = A(() => !!t.notifications || t.unreadCount !== null && t.unreadCount !== void 0), M = b(null), E = b(null), C = b(null), $ = b(null), m = b(!1);
|
|
902
902
|
function h() {
|
|
903
|
-
var
|
|
904
|
-
const v = (
|
|
905
|
-
|
|
903
|
+
var w;
|
|
904
|
+
const v = (w = $.value) == null ? void 0 : w.$el, g = Se + (m.value ? 0 : Xt);
|
|
905
|
+
m.value = (v == null ? void 0 : v.nodeType) === 1 && !!(M.value && E.value && C.value) && Jt(Qt(M.value, E.value, C.value, v), g);
|
|
906
906
|
}
|
|
907
907
|
let l = null, f = !1, y = !0;
|
|
908
|
-
function
|
|
908
|
+
function H() {
|
|
909
909
|
f || (f = !0, requestAnimationFrame(() => {
|
|
910
910
|
f = !1, y && h();
|
|
911
911
|
}));
|
|
912
912
|
}
|
|
913
913
|
ye(() => {
|
|
914
914
|
if (h(), typeof ResizeObserver == "function") {
|
|
915
|
-
l = new ResizeObserver(
|
|
916
|
-
for (const v of [M.value, E.value,
|
|
915
|
+
l = new ResizeObserver(H);
|
|
916
|
+
for (const v of [M.value, E.value, C.value])
|
|
917
917
|
v && l.observe(v);
|
|
918
918
|
}
|
|
919
|
-
}), J(
|
|
919
|
+
}), J($, h, { flush: "post" }), ve(() => {
|
|
920
920
|
y = !1, l == null || l.disconnect();
|
|
921
921
|
});
|
|
922
|
-
const
|
|
922
|
+
const L = A(() => Ce(t.accentColour)), R = A(() => L.value || "#1c6f63");
|
|
923
923
|
function I(v) {
|
|
924
|
-
var
|
|
924
|
+
var w, U;
|
|
925
925
|
if (!v)
|
|
926
926
|
return;
|
|
927
|
-
const
|
|
928
|
-
|
|
927
|
+
const g = B(v);
|
|
928
|
+
g && (x("navigate", g), (U = (w = d == null ? void 0 : d.vnode) == null ? void 0 : w.props) != null && U.onNavigate || (window.location.href = g));
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function W() {
|
|
931
931
|
x("home"), I(t.homeUrl);
|
|
932
932
|
}
|
|
933
933
|
function q() {
|
|
@@ -936,7 +936,7 @@ const Qt = {
|
|
|
936
936
|
function F(v) {
|
|
937
937
|
x("menu-select", v), v.href && I(v.href);
|
|
938
938
|
}
|
|
939
|
-
return (v,
|
|
939
|
+
return (v, g) => (r(), i("header", {
|
|
940
940
|
ref_key: "headerEl",
|
|
941
941
|
ref: M,
|
|
942
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]"
|
|
@@ -946,22 +946,22 @@ const Qt = {
|
|
|
946
946
|
ref: E,
|
|
947
947
|
class: "flex min-w-0 items-center gap-[18px]"
|
|
948
948
|
}, [
|
|
949
|
-
|
|
950
|
-
e.title ? (r(), i("span",
|
|
951
|
-
|
|
952
|
-
e.subtitle ? (r(), i("span",
|
|
953
|
-
])) :
|
|
954
|
-
|
|
949
|
+
Y(v.$slots, "logo"),
|
|
950
|
+
e.title ? (r(), i("span", Zt, [
|
|
951
|
+
G(_(e.title), 1),
|
|
952
|
+
e.subtitle ? (r(), i("span", en, " " + _(e.subtitle), 1)) : k("", !0)
|
|
953
|
+
])) : k("", !0),
|
|
954
|
+
L.value ? (r(), i("span", {
|
|
955
955
|
key: 1,
|
|
956
956
|
class: "h-[45px] w-[2px] shrink-0",
|
|
957
|
-
style: Z({ background:
|
|
957
|
+
style: Z({ background: L.value }),
|
|
958
958
|
"aria-hidden": "true"
|
|
959
|
-
}, null, 4)) :
|
|
959
|
+
}, null, 4)) : k("", !0),
|
|
960
960
|
a("nav", {
|
|
961
961
|
class: "flex items-center gap-7 text-proclusteal-600 dark:text-content-muted",
|
|
962
|
-
style: Z({ "--hdr-accent":
|
|
962
|
+
style: Z({ "--hdr-accent": R.value })
|
|
963
963
|
}, [
|
|
964
|
-
e.homeUrl ? (r(),
|
|
964
|
+
e.homeUrl ? (r(), z(Oe, {
|
|
965
965
|
key: 0,
|
|
966
966
|
text: e.homeTooltip,
|
|
967
967
|
position: "bottom"
|
|
@@ -971,13 +971,13 @@ const Qt = {
|
|
|
971
971
|
href: Q(B)(e.homeUrl) || null,
|
|
972
972
|
class: "hover:text-[var(--hdr-accent)]",
|
|
973
973
|
"aria-label": e.homeTooltip,
|
|
974
|
-
onClick:
|
|
974
|
+
onClick: j(W, ["exact", "prevent"])
|
|
975
975
|
}, [
|
|
976
|
-
|
|
977
|
-
], 8,
|
|
976
|
+
N(Ne, { class: "!h-[22px] !w-[22px]" })
|
|
977
|
+
], 8, tn)
|
|
978
978
|
]),
|
|
979
979
|
_: 1
|
|
980
|
-
}, 8, ["text"])) :
|
|
980
|
+
}, 8, ["text"])) : k("", !0),
|
|
981
981
|
e.showBack ? (r(), i("button", {
|
|
982
982
|
key: 1,
|
|
983
983
|
type: "button",
|
|
@@ -986,63 +986,63 @@ const Qt = {
|
|
|
986
986
|
"aria-label": "Go Back",
|
|
987
987
|
onClick: q
|
|
988
988
|
}, [
|
|
989
|
-
|
|
990
|
-
])) :
|
|
991
|
-
|
|
989
|
+
N(ze, { class: "!h-[22px] !w-[22px]" })
|
|
990
|
+
])) : k("", !0),
|
|
991
|
+
Y(v.$slots, "nav-extra")
|
|
992
992
|
], 4),
|
|
993
|
-
|
|
993
|
+
Y(v.$slots, "left")
|
|
994
994
|
], 512),
|
|
995
995
|
a("div", {
|
|
996
996
|
ref_key: "rightEl",
|
|
997
|
-
ref:
|
|
997
|
+
ref: C,
|
|
998
998
|
class: "flex items-center gap-[18px] sm:gap-[25px]"
|
|
999
999
|
}, [
|
|
1000
|
-
|
|
1000
|
+
Y(v.$slots, "right"),
|
|
1001
1001
|
e.ready ? (r(), i(O, { key: 0 }, [
|
|
1002
|
-
e.searchProvider ? (r(),
|
|
1002
|
+
e.searchProvider ? (r(), z(Ue, {
|
|
1003
1003
|
key: 0,
|
|
1004
1004
|
ref_key: "pillEl",
|
|
1005
|
-
ref:
|
|
1006
|
-
onClick:
|
|
1007
|
-
class: T({ "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":
|
|
1008
|
-
}, null, 8, ["class"])) :
|
|
1009
|
-
|
|
1005
|
+
ref: $,
|
|
1006
|
+
onClick: g[0] || (g[0] = (w) => p.value = !0),
|
|
1007
|
+
class: T({ "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2": m.value })
|
|
1008
|
+
}, null, 8, ["class"])) : k("", !0),
|
|
1009
|
+
S.value ? (r(), z(jt, {
|
|
1010
1010
|
key: 1,
|
|
1011
1011
|
notifications: e.notifications,
|
|
1012
1012
|
"unread-count": e.unreadCount,
|
|
1013
1013
|
"notifications-url": e.notificationsUrl,
|
|
1014
1014
|
"icon-map": e.notificationIconMap,
|
|
1015
|
-
onMarkAsRead:
|
|
1016
|
-
onDeleteNotification:
|
|
1017
|
-
onOpen:
|
|
1015
|
+
onMarkAsRead: g[1] || (g[1] = (w) => v.$emit("markAsRead", w)),
|
|
1016
|
+
onDeleteNotification: g[2] || (g[2] = (w) => v.$emit("deleteNotification", w)),
|
|
1017
|
+
onOpen: g[3] || (g[3] = (w) => v.$emit("notifications-open")),
|
|
1018
1018
|
onNavigate: I
|
|
1019
|
-
}, null, 8, ["notifications", "unread-count", "notifications-url", "icon-map"])) :
|
|
1020
|
-
e.user ? (r(),
|
|
1019
|
+
}, null, 8, ["notifications", "unread-count", "notifications-url", "icon-map"])) : k("", !0),
|
|
1020
|
+
e.user ? (r(), z(Yt, {
|
|
1021
1021
|
key: 2,
|
|
1022
1022
|
user: e.user,
|
|
1023
1023
|
"menu-items": e.menuItems,
|
|
1024
1024
|
onSelect: F
|
|
1025
|
-
}, null, 8, ["user", "menu-items"])) :
|
|
1026
|
-
], 64)) :
|
|
1025
|
+
}, null, 8, ["user", "menu-items"])) : k("", !0)
|
|
1026
|
+
], 64)) : k("", !0)
|
|
1027
1027
|
], 512),
|
|
1028
|
-
e.searchProvider ? (r(),
|
|
1028
|
+
e.searchProvider ? (r(), z(bt, {
|
|
1029
1029
|
key: 0,
|
|
1030
1030
|
open: p.value,
|
|
1031
|
-
"onUpdate:open":
|
|
1031
|
+
"onUpdate:open": g[4] || (g[4] = (w) => p.value = w),
|
|
1032
1032
|
"search-provider": e.searchProvider,
|
|
1033
1033
|
placeholder: e.searchPlaceholder,
|
|
1034
1034
|
types: e.searchTypes,
|
|
1035
1035
|
onNavigate: I
|
|
1036
|
-
}, null, 8, ["open", "search-provider", "placeholder", "types"])) :
|
|
1036
|
+
}, null, 8, ["open", "search-provider", "placeholder", "types"])) : k("", !0)
|
|
1037
1037
|
], 512));
|
|
1038
1038
|
}
|
|
1039
1039
|
};
|
|
1040
1040
|
export {
|
|
1041
|
-
|
|
1041
|
+
fn as AppHeader,
|
|
1042
1042
|
K as DEFAULT_SEARCH_TYPES,
|
|
1043
|
-
|
|
1044
|
-
|
|
1043
|
+
bt as GlobalSearchModal,
|
|
1044
|
+
Ue as GlobalSearchPill,
|
|
1045
1045
|
jt as HeaderNotificationDropdown,
|
|
1046
|
-
|
|
1046
|
+
Yt as HeaderUserMenu,
|
|
1047
1047
|
B as safeUrl
|
|
1048
1048
|
};
|