@zealsolutions/zeal-ui 1.0.0-alpha.330 → 1.0.0-alpha.331
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 +285 -270
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { openBlock as o, createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import { o as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { openBlock as o, createElementBlock as s, createVNode as M, createElementVNode as n, createTextVNode as j, mergeModels as ee, useModel as me, getCurrentInstance as re, ref as g, computed as _, watch as R, nextTick as te, onMounted as be, onBeforeUnmount as ge, createBlock as A, Teleport as ke, withModifiers as E, withDirectives as G, vModelText as we, createCommentVNode as v, normalizeClass as C, toDisplayString as m, Fragment as N, renderList as L, normalizeStyle as K, pushScopeId as $e, popScopeId as Ce, Transition as se, withCtx as ie, resolveDynamicComponent as ce, unref as q, vShow as ue, renderSlot as V } from "vue";
|
|
2
|
+
import _e from "../../HouseIcon-BxmNyxvv.js";
|
|
3
|
+
import Me from "../../ArrowLeftIcon-Cgsy08pY.js";
|
|
4
|
+
import pe from "../../MagnifyingGlassIcon-ChYNIA-H.js";
|
|
5
|
+
import { _ as Se } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { o as de } from "../../index-CedrSBIl.js";
|
|
7
|
+
import le from "../../BellIcon-lK5EZXNf.js";
|
|
8
|
+
import Te from "../../CircleCheckIcon-CA15yXgI.js";
|
|
9
|
+
import Ie from "../../XMarkIcon-DKJ_--uA.js";
|
|
10
|
+
const Ae = /* @__PURE__ */ n("span", { class: "hidden whitespace-nowrap sm:inline" }, "Search", -1), Ee = /* @__PURE__ */ n("kbd", { class: "hidden items-center gap-px rounded border border-proclusteal-300 bg-proclusteal-100 px-[5px] py-0.5 font-sans text-[11px] font-bold leading-none text-proclusteal-500 sm:inline-flex" }, [
|
|
11
11
|
/* @__PURE__ */ n("span", null, "⌘"),
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
], -1),
|
|
12
|
+
/* @__PURE__ */ j("K ")
|
|
13
|
+
], -1), He = {
|
|
14
14
|
__name: "GlobalSearchPill",
|
|
15
15
|
emits: ["click"],
|
|
16
16
|
setup(e) {
|
|
17
|
-
return (
|
|
17
|
+
return (i, c) => (o(), s("button", {
|
|
18
18
|
type: "button",
|
|
19
19
|
class: "inline-flex h-[34px] cursor-pointer items-center justify-center gap-[7px] rounded-lg border border-proclusteal-300 bg-white pl-[11px] pr-[9px] font-sans text-[13px] font-semibold text-proclusteal-600 transition-[border-color,color,box-shadow] duration-150 hover:border-proclusteal-950 hover:text-proclusteal-800 hover:shadow-[0_1px_3px_rgba(20,40,45,0.08)] focus:border-proclusteal-950 focus:text-proclusteal-800 focus:outline-none",
|
|
20
20
|
title: "Search (Ctrl K)",
|
|
21
21
|
"aria-label": "Search (Ctrl K)",
|
|
22
|
-
onClick:
|
|
22
|
+
onClick: c[0] || (c[0] = (k) => i.$emit("click"))
|
|
23
23
|
}, [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
M(pe, { class: "!h-[15px] !w-[15px] flex-none text-proclusteal-950" }),
|
|
25
|
+
Ae,
|
|
26
|
+
Ee
|
|
27
27
|
]));
|
|
28
28
|
}
|
|
29
29
|
}, Ne = {
|
|
@@ -39,57 +39,57 @@ const Ie = /* @__PURE__ */ n("span", { class: "hidden whitespace-nowrap sm:inlin
|
|
|
39
39
|
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"/>' },
|
|
40
40
|
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"/>' },
|
|
41
41
|
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"/>' }
|
|
42
|
-
},
|
|
42
|
+
}, De = {
|
|
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
|
|
47
|
-
const
|
|
48
|
-
return Object.prototype.hasOwnProperty.call(
|
|
46
|
+
function Oe(e, i = {}) {
|
|
47
|
+
const c = { ...Ne, ...i };
|
|
48
|
+
return Object.prototype.hasOwnProperty.call(c, e) ? c[e] : { ...De, label: e };
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return (e == null ? "" : String(e)).replace(/[&<>"']/g, (
|
|
50
|
+
function Ue(e) {
|
|
51
|
+
return (e == null ? "" : String(e)).replace(/[&<>"']/g, (i) => ({
|
|
52
52
|
"&": "&",
|
|
53
53
|
"<": "<",
|
|
54
54
|
">": ">",
|
|
55
55
|
'"': """,
|
|
56
56
|
"'": "'"
|
|
57
|
-
})[
|
|
57
|
+
})[i]);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function fe(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 i = String(e).trim();
|
|
63
|
+
return /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(i) || /^(rgb|rgba|hsl|hsla)\([0-9.,%\s/]+\)$/i.test(i) || /^[a-z]{3,20}$/i.test(i) ? i : "";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function D(e) {
|
|
66
66
|
if (!e)
|
|
67
67
|
return "";
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
68
|
+
const i = String(e).trim();
|
|
69
|
+
if (i.includes("\\"))
|
|
70
70
|
return "";
|
|
71
|
-
let
|
|
71
|
+
let c;
|
|
72
72
|
try {
|
|
73
|
-
|
|
73
|
+
c = new URL(i, "https://url-check.invalid/");
|
|
74
74
|
} catch {
|
|
75
75
|
return "";
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return c.protocol === "http:" || c.protocol === "https:" ? i : "";
|
|
78
78
|
}
|
|
79
79
|
function je(e) {
|
|
80
|
-
return String(e || "").toLowerCase().split(/\s+/).filter((
|
|
80
|
+
return String(e || "").toLowerCase().split(/\s+/).filter((i) => i.length >= 2);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
85
|
-
return
|
|
86
|
-
const
|
|
87
|
-
return
|
|
82
|
+
function oe(e, i) {
|
|
83
|
+
const c = Ue(e);
|
|
84
|
+
if (!i || !i.length)
|
|
85
|
+
return c;
|
|
86
|
+
const k = new RegExp(`(${i.map((f) => f.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "ig");
|
|
87
|
+
return c.replace(k, "<mark>$1</mark>");
|
|
88
88
|
}
|
|
89
|
-
const Le = (e) => (
|
|
89
|
+
const Le = (e) => ($e("data-v-b4eb0ff3"), e = e(), Ce(), e), ze = { class: "flex items-center gap-2.5 border-b border-proclusteal-200 px-4 py-3.5" }, Pe = ["placeholder"], Be = {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: "px-[18px] pb-0.5 pt-3.5 text-[15px] font-extrabold text-[#1e262c]"
|
|
92
|
-
},
|
|
92
|
+
}, Ve = {
|
|
93
93
|
key: 1,
|
|
94
94
|
class: "border-b border-proclusteal-200 px-[18px] pb-3 pt-2.5"
|
|
95
95
|
}, Re = ["onClick"], Ke = { class: "sticky top-0 z-[1] border-t border-proclusteal-200 bg-proclusteal-150 px-[18px] py-2 text-[12px] font-extrabold tracking-[0.3px] text-proclusteal-700" }, Ge = { class: "ml-0.5 text-[#667079]" }, qe = ["href", "data-row-idx", "onClick", "onMouseenter"], Fe = ["innerHTML"], Qe = { class: "min-w-0 flex-1" }, Xe = ["innerHTML"], Ye = ["innerHTML"], Je = /* @__PURE__ */ Le(() => /* @__PURE__ */ n("svg", {
|
|
@@ -102,9 +102,9 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
102
102
|
"stroke-linejoin": "round"
|
|
103
103
|
}, [
|
|
104
104
|
/* @__PURE__ */ n("polyline", { points: "9 18 15 12 9 6" })
|
|
105
|
-
], -1)),
|
|
105
|
+
], -1)), ne = "mb-2 mr-2 inline-flex cursor-pointer items-center gap-[7px] rounded-[20px] border border-[#dde3e8] bg-[#f4f6f8] px-3.5 py-1.5 text-[13px] font-bold text-proclusteal-700 hover:border-proclusteal-950", ae = "!border-proclusteal-950 !bg-proclusteal-950 !text-white", B = "px-5 py-[26px] text-center text-[13px] font-medium text-[#667079]", We = {
|
|
106
106
|
__name: "GlobalSearchModal",
|
|
107
|
-
props: /* @__PURE__ */
|
|
107
|
+
props: /* @__PURE__ */ ee({
|
|
108
108
|
searchProvider: {
|
|
109
109
|
type: Function,
|
|
110
110
|
required: !0
|
|
@@ -129,228 +129,228 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
129
129
|
open: { type: Boolean, default: !1 },
|
|
130
130
|
openModifiers: {}
|
|
131
131
|
}),
|
|
132
|
-
emits: /* @__PURE__ */
|
|
133
|
-
setup(e, { emit:
|
|
134
|
-
const
|
|
135
|
-
let
|
|
136
|
-
const
|
|
132
|
+
emits: /* @__PURE__ */ ee(["navigate"], ["update:open"]),
|
|
133
|
+
setup(e, { emit: i }) {
|
|
134
|
+
const c = e, k = i, f = me(e, "open"), y = re(), b = g(null), S = g(null), w = g(null), $ = g(""), x = g(""), p = g([]), l = g("all"), u = g("zero"), d = g(-1);
|
|
135
|
+
let T = null, H = 0, O = null, I = null;
|
|
136
|
+
const F = _(() => je(x.value)), Q = (t) => Oe(t, c.types), X = _(() => {
|
|
137
137
|
let t = 0;
|
|
138
|
-
return
|
|
139
|
-
const a =
|
|
138
|
+
return p.value.filter((r) => l.value === "all" || r.type === l.value).map((r) => {
|
|
139
|
+
const a = Q(r.type);
|
|
140
140
|
return {
|
|
141
|
-
type:
|
|
141
|
+
type: r.type,
|
|
142
142
|
label: a.label,
|
|
143
|
-
items:
|
|
144
|
-
url:
|
|
145
|
-
titleHtml:
|
|
146
|
-
subtitleHtml:
|
|
147
|
-
tileColour:
|
|
143
|
+
items: r.items.map((h) => ({
|
|
144
|
+
url: D(h.Url),
|
|
145
|
+
titleHtml: oe(h.Title, F.value),
|
|
146
|
+
subtitleHtml: oe(h.Subtitle, F.value),
|
|
147
|
+
tileColour: fe(h.Colour) || a.colour,
|
|
148
148
|
tileIcon: a.icon,
|
|
149
149
|
flatIdx: t++
|
|
150
150
|
}))
|
|
151
151
|
};
|
|
152
152
|
});
|
|
153
|
-
}),
|
|
153
|
+
}), Y = _(() => X.value.flatMap((t) => t.items)), xe = _(() => p.value.reduce((t, r) => t + r.items.length, 0));
|
|
154
154
|
function z(t) {
|
|
155
|
-
const
|
|
156
|
-
if (!
|
|
157
|
-
|
|
155
|
+
const r = Y.value;
|
|
156
|
+
if (!r.length) {
|
|
157
|
+
d.value = -1;
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
|
|
161
|
-
var
|
|
162
|
-
const a = (
|
|
160
|
+
d.value = Math.min(Math.max(t, 0), r.length - 1), te(() => {
|
|
161
|
+
var h;
|
|
162
|
+
const a = (h = w.value) == null ? void 0 : h.querySelector(`[data-row-idx="${d.value}"]`);
|
|
163
163
|
a == null || a.scrollIntoView({ block: "nearest" });
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
function Y(t) {
|
|
167
|
-
var s;
|
|
168
|
-
l.value = t, z(0), (s = y.value) == null || s.focus();
|
|
169
|
-
}
|
|
170
166
|
function J(t) {
|
|
171
|
-
var
|
|
172
|
-
|
|
167
|
+
var r;
|
|
168
|
+
l.value = t, z(0), (r = b.value) == null || r.focus();
|
|
169
|
+
}
|
|
170
|
+
function W(t) {
|
|
171
|
+
var r, a;
|
|
172
|
+
t && (k("navigate", t), (a = (r = y == null ? void 0 : y.vnode) == null ? void 0 : r.props) != null && a.onNavigate || (window.location.href = t), U());
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
|
|
174
|
+
function U() {
|
|
175
|
+
f.value = !1;
|
|
176
176
|
}
|
|
177
|
-
async function
|
|
178
|
-
const
|
|
179
|
-
|
|
177
|
+
async function he(t) {
|
|
178
|
+
const r = ++H;
|
|
179
|
+
x.value = t;
|
|
180
180
|
try {
|
|
181
|
-
const a = await
|
|
182
|
-
if (
|
|
181
|
+
const a = await c.searchProvider(t);
|
|
182
|
+
if (r !== H || !f.value)
|
|
183
183
|
return;
|
|
184
|
-
|
|
184
|
+
p.value = a && a.groups || [], l.value = "all", u.value = p.value.length ? "results" : "empty", z(0);
|
|
185
185
|
} catch {
|
|
186
|
-
if (
|
|
186
|
+
if (r !== H || !f.value)
|
|
187
187
|
return;
|
|
188
|
-
|
|
188
|
+
p.value = [], u.value = "error", d.value = -1;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
R(
|
|
192
|
-
clearTimeout(
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
|
|
191
|
+
R($, (t) => {
|
|
192
|
+
clearTimeout(T);
|
|
193
|
+
const r = t.trim();
|
|
194
|
+
if (r.length < c.minChars) {
|
|
195
|
+
H++, p.value = [], u.value = r.length ? "hint" : "zero", d.value = -1;
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
|
|
199
|
-
}), R(
|
|
200
|
-
t ? (
|
|
201
|
-
var
|
|
202
|
-
return (
|
|
203
|
-
})) : (clearTimeout(
|
|
198
|
+
T = setTimeout(() => he(r), c.debounce);
|
|
199
|
+
}), R(f, (t) => {
|
|
200
|
+
t ? (O = document.activeElement, $.value = "", x.value = "", p.value = [], l.value = "all", u.value = "zero", d.value = -1, I = document.body.style.overflow, document.body.style.overflow = "hidden", te(() => {
|
|
201
|
+
var r;
|
|
202
|
+
return (r = b.value) == null ? void 0 : r.focus();
|
|
203
|
+
})) : (clearTimeout(T), H++, I !== null && (document.body.style.overflow = I, I = null), O != null && O.focus && O.focus());
|
|
204
204
|
}, { immediate: !0 });
|
|
205
|
-
function
|
|
206
|
-
var
|
|
205
|
+
function ye(t) {
|
|
206
|
+
var r;
|
|
207
207
|
if (t.key === "Escape") {
|
|
208
|
-
t.preventDefault(),
|
|
208
|
+
t.preventDefault(), U();
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
if (t.key === "ArrowDown") {
|
|
212
|
-
t.preventDefault(), z(
|
|
212
|
+
t.preventDefault(), z(d.value + 1);
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
if (t.key === "ArrowUp") {
|
|
216
|
-
t.preventDefault(), z(
|
|
216
|
+
t.preventDefault(), z(d.value - 1);
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
219
|
if (t.key === "Enter") {
|
|
220
220
|
if (t.isComposing)
|
|
221
221
|
return;
|
|
222
|
-
const a =
|
|
222
|
+
const a = Y.value;
|
|
223
223
|
if (!a.length)
|
|
224
224
|
return;
|
|
225
|
-
t.preventDefault(),
|
|
225
|
+
t.preventDefault(), W(a[d.value >= 0 ? d.value : 0].url);
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
if (t.key === "Tab") {
|
|
229
|
-
const a = (
|
|
229
|
+
const a = (r = S.value) == null ? void 0 : r.querySelectorAll('input, button, a[href], [tabindex]:not([tabindex="-1"])');
|
|
230
230
|
if (!(a != null && a.length))
|
|
231
231
|
return;
|
|
232
|
-
const
|
|
233
|
-
t.shiftKey && document.activeElement ===
|
|
232
|
+
const h = a[0], P = a[a.length - 1];
|
|
233
|
+
t.shiftKey && document.activeElement === h ? (t.preventDefault(), P.focus()) : !t.shiftKey && document.activeElement === P && (t.preventDefault(), h.focus());
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function ve(t) {
|
|
237
237
|
if (!t)
|
|
238
238
|
return !1;
|
|
239
|
-
const
|
|
240
|
-
return
|
|
239
|
+
const r = (t.tagName || "").toLowerCase();
|
|
240
|
+
return r === "input" || r === "textarea" || r === "select" || t.isContentEditable;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
if (t.key === "Escape" &&
|
|
244
|
-
t.preventDefault(),
|
|
242
|
+
function Z(t) {
|
|
243
|
+
if (t.key === "Escape" && f.value) {
|
|
244
|
+
t.preventDefault(), U();
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
247
247
|
if ((t.ctrlKey || t.metaKey) && (t.key === "k" || t.key === "K")) {
|
|
248
|
-
t.preventDefault(),
|
|
248
|
+
t.preventDefault(), f.value = !f.value;
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
|
-
t.key === "/" && !
|
|
251
|
+
t.key === "/" && !f.value && !ve(document.activeElement) && (t.preventDefault(), f.value = !0);
|
|
252
252
|
}
|
|
253
|
-
return
|
|
254
|
-
document.addEventListener("keydown",
|
|
255
|
-
}),
|
|
256
|
-
document.removeEventListener("keydown",
|
|
257
|
-
}), (t,
|
|
258
|
-
|
|
253
|
+
return be(() => {
|
|
254
|
+
document.addEventListener("keydown", Z);
|
|
255
|
+
}), ge(() => {
|
|
256
|
+
document.removeEventListener("keydown", Z), clearTimeout(T), H++, I !== null && (document.body.style.overflow = I, I = null);
|
|
257
|
+
}), (t, r) => (o(), A(ke, { to: "body" }, [
|
|
258
|
+
f.value ? (o(), s("div", {
|
|
259
259
|
key: 0,
|
|
260
260
|
class: "fixed inset-0 z-[20000] flex items-start justify-center bg-[#11181c]/45",
|
|
261
|
-
onMousedown:
|
|
262
|
-
onKeydown:
|
|
261
|
+
onMousedown: E(U, ["self"]),
|
|
262
|
+
onKeydown: ye
|
|
263
263
|
}, [
|
|
264
264
|
n("div", {
|
|
265
265
|
ref_key: "panelEl",
|
|
266
|
-
ref:
|
|
266
|
+
ref: S,
|
|
267
267
|
class: "mt-[4vh] flex max-h-[88vh] w-[94%] max-w-[720px] flex-col overflow-hidden rounded-[14px] bg-white font-sans shadow-[0_30px_80px_rgba(0,0,0,0.3)] sm:mt-[8vh] sm:max-h-[82vh]",
|
|
268
268
|
role: "dialog",
|
|
269
269
|
"aria-modal": "true",
|
|
270
270
|
"aria-label": "Search"
|
|
271
271
|
}, [
|
|
272
272
|
n("div", ze, [
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
M(pe, { class: "!h-[18px] !w-[18px] flex-none text-proclusteal-400" }),
|
|
274
|
+
G(n("input", {
|
|
275
275
|
ref_key: "inputEl",
|
|
276
|
-
ref:
|
|
277
|
-
"onUpdate:modelValue":
|
|
276
|
+
ref: b,
|
|
277
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => $.value = a),
|
|
278
278
|
type: "text",
|
|
279
279
|
autocomplete: "off",
|
|
280
280
|
placeholder: e.placeholder,
|
|
281
281
|
class: "flex-1 border-0 bg-transparent p-0 text-[16px] text-[#1e262c] outline-none placeholder:text-proclusteal-400 focus:ring-0"
|
|
282
282
|
}, null, 8, Pe), [
|
|
283
|
-
[
|
|
283
|
+
[we, $.value]
|
|
284
284
|
]),
|
|
285
285
|
n("button", {
|
|
286
286
|
type: "button",
|
|
287
287
|
class: "cursor-pointer border-0 bg-transparent px-1 text-[22px] leading-none text-proclusteal-400 hover:text-proclusteal-700",
|
|
288
288
|
"aria-label": "Close search",
|
|
289
289
|
title: "Close (Esc)",
|
|
290
|
-
onClick:
|
|
290
|
+
onClick: U
|
|
291
291
|
}, "×")
|
|
292
292
|
]),
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
u.value === "results" ? (o(), s("div", Be, " Search results ")) : v("", !0),
|
|
294
|
+
u.value === "results" ? (o(), s("div", Ve, [
|
|
295
295
|
n("button", {
|
|
296
296
|
type: "button",
|
|
297
|
-
class:
|
|
298
|
-
onClick:
|
|
297
|
+
class: C([ne, l.value === "all" ? ae : ""]),
|
|
298
|
+
onClick: r[1] || (r[1] = (a) => J("all"))
|
|
299
299
|
}, [
|
|
300
|
-
|
|
300
|
+
j(" All "),
|
|
301
301
|
n("span", {
|
|
302
|
-
class:
|
|
303
|
-
}, "(" + m(
|
|
302
|
+
class: C(["font-bold", l.value === "all" ? "opacity-85" : "opacity-60"])
|
|
303
|
+
}, "(" + m(xe.value) + ")", 3)
|
|
304
304
|
], 2),
|
|
305
|
-
(o(!0),
|
|
305
|
+
(o(!0), s(N, null, L(p.value, (a) => (o(), s("button", {
|
|
306
306
|
key: a.type,
|
|
307
307
|
type: "button",
|
|
308
|
-
class:
|
|
309
|
-
onClick: (
|
|
308
|
+
class: C([ne, l.value === a.type ? ae : ""]),
|
|
309
|
+
onClick: (h) => J(a.type)
|
|
310
310
|
}, [
|
|
311
|
-
|
|
311
|
+
j(m(Q(a.type).label) + " ", 1),
|
|
312
312
|
n("span", {
|
|
313
|
-
class:
|
|
313
|
+
class: C(["font-bold", l.value === a.type ? "opacity-85" : "opacity-60"])
|
|
314
314
|
}, "(" + m(a.items.length) + ")", 3)
|
|
315
315
|
], 10, Re))), 128))
|
|
316
316
|
])) : v("", !0),
|
|
317
317
|
n("div", {
|
|
318
318
|
ref_key: "resultsEl",
|
|
319
|
-
ref:
|
|
319
|
+
ref: w,
|
|
320
320
|
class: "overflow-y-auto pb-2.5"
|
|
321
321
|
}, [
|
|
322
|
-
|
|
322
|
+
u.value === "zero" ? (o(), s("div", {
|
|
323
323
|
key: 0,
|
|
324
|
-
class:
|
|
325
|
-
}, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) :
|
|
324
|
+
class: C(B)
|
|
325
|
+
}, " Search across SOPs, incidents, assets, people and more — you only ever see what you have access to. ")) : u.value === "hint" ? (o(), s("div", {
|
|
326
326
|
key: 1,
|
|
327
|
-
class:
|
|
328
|
-
}, " Keep typing… enter at least " + m(e.minChars) + " characters to search. ", 1)) :
|
|
327
|
+
class: C(B)
|
|
328
|
+
}, " Keep typing… enter at least " + m(e.minChars) + " characters to search. ", 1)) : u.value === "empty" ? (o(), s("div", {
|
|
329
329
|
key: 2,
|
|
330
|
-
class:
|
|
331
|
-
}, " No results for “" + m(
|
|
330
|
+
class: C(B)
|
|
331
|
+
}, " No results for “" + m(x.value) + "” — try a broader term or a code. ", 1)) : u.value === "error" ? (o(), s("div", {
|
|
332
332
|
key: 3,
|
|
333
|
-
class:
|
|
334
|
-
}, " Search is temporarily unavailable. ")) : (o(!0),
|
|
333
|
+
class: C(B)
|
|
334
|
+
}, " Search is temporarily unavailable. ")) : (o(!0), s(N, { key: 4 }, L(X.value, (a) => (o(), s("div", {
|
|
335
335
|
key: a.type
|
|
336
336
|
}, [
|
|
337
337
|
n("div", Ke, [
|
|
338
|
-
|
|
338
|
+
j(m(a.label) + " ", 1),
|
|
339
339
|
n("span", Ge, "(" + m(a.items.length) + ")", 1)
|
|
340
340
|
]),
|
|
341
|
-
(o(!0),
|
|
342
|
-
key:
|
|
343
|
-
href:
|
|
344
|
-
class:
|
|
345
|
-
"data-row-idx":
|
|
346
|
-
onClick:
|
|
347
|
-
onMouseenter: (P) =>
|
|
341
|
+
(o(!0), s(N, null, L(a.items, (h) => (o(), s("a", {
|
|
342
|
+
key: h.flatIdx,
|
|
343
|
+
href: h.url || null,
|
|
344
|
+
class: C(["flex items-center gap-[13px] px-[18px] py-[11px] text-[#1e262c] no-underline", { "bg-proclusteal-50": h.flatIdx === d.value }]),
|
|
345
|
+
"data-row-idx": h.flatIdx,
|
|
346
|
+
onClick: E((P) => W(h.url), ["exact", "prevent"]),
|
|
347
|
+
onMouseenter: (P) => d.value = h.flatIdx
|
|
348
348
|
}, [
|
|
349
349
|
n("span", {
|
|
350
350
|
class: "inline-flex h-[42px] w-[42px] flex-none items-center justify-center rounded-[10px] text-white",
|
|
351
|
-
style:
|
|
351
|
+
style: K({ background: h.tileColour })
|
|
352
352
|
}, [
|
|
353
|
-
(o(),
|
|
353
|
+
(o(), s("svg", {
|
|
354
354
|
class: "h-5 w-5",
|
|
355
355
|
viewBox: "0 0 24 24",
|
|
356
356
|
fill: "none",
|
|
@@ -358,17 +358,17 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
358
358
|
"stroke-width": "2",
|
|
359
359
|
"stroke-linecap": "round",
|
|
360
360
|
"stroke-linejoin": "round",
|
|
361
|
-
innerHTML:
|
|
361
|
+
innerHTML: h.tileIcon
|
|
362
362
|
}, null, 8, Fe))
|
|
363
363
|
], 4),
|
|
364
364
|
n("span", Qe, [
|
|
365
365
|
n("span", {
|
|
366
366
|
class: "gs-marked block truncate text-[14px] font-bold",
|
|
367
|
-
innerHTML:
|
|
367
|
+
innerHTML: h.titleHtml
|
|
368
368
|
}, null, 8, Xe),
|
|
369
369
|
n("span", {
|
|
370
370
|
class: "gs-marked mt-0.5 block truncate text-[12.5px] text-[#5b6570]",
|
|
371
|
-
innerHTML:
|
|
371
|
+
innerHTML: h.subtitleHtml
|
|
372
372
|
}, null, 8, Ye)
|
|
373
373
|
]),
|
|
374
374
|
Je
|
|
@@ -379,13 +379,13 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
379
379
|
], 32)) : v("", !0)
|
|
380
380
|
]));
|
|
381
381
|
}
|
|
382
|
-
}, Ze = /* @__PURE__ */
|
|
382
|
+
}, Ze = /* @__PURE__ */ Se(We, [["__scopeId", "data-v-b4eb0ff3"]]), et = {
|
|
383
383
|
key: 0,
|
|
384
384
|
class: "absolute -right-[3px] -top-[3px] h-2 w-2 rounded-full bg-[#dd3730] ring-2 ring-white"
|
|
385
385
|
}, tt = { class: "absolute right-0 top-full z-30 mt-2 w-[400px] max-w-[90vw] origin-top-right overflow-hidden rounded-[10px] border border-proclusteal-300 bg-white shadow-zeal-md" }, lt = { class: "max-h-[420px] overflow-y-auto" }, ot = {
|
|
386
386
|
key: 0,
|
|
387
387
|
class: "px-5 py-[26px] text-center text-[13px] font-medium text-[#667079]"
|
|
388
|
-
}, nt = ["onClick"], at = { class: "inline-flex h-[42px] w-[42px] flex-none items-center justify-center rounded-[10px] bg-proclusteal-950 text-white" },
|
|
388
|
+
}, nt = ["onClick"], at = { class: "inline-flex h-[42px] w-[42px] flex-none items-center justify-center rounded-[10px] bg-proclusteal-950 text-white" }, rt = { class: "min-w-0 flex-1" }, st = { class: "block truncate text-[14px] font-bold text-[#1e262c]" }, it = { class: "block truncate text-[12.5px] text-[#5b6570]" }, ct = {
|
|
389
389
|
key: 0,
|
|
390
390
|
class: "mt-0.5 block text-[12px] text-proclusteal-500"
|
|
391
391
|
}, ut = { class: "flex flex-none flex-col items-center gap-2 pt-0.5 text-proclusteal-600" }, pt = ["onClick"], dt = ["onClick"], ft = ["href"], xt = {
|
|
@@ -405,25 +405,25 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
407
|
emits: ["markAsRead", "deleteNotification", "navigate"],
|
|
408
|
-
setup(e, { emit:
|
|
409
|
-
const
|
|
410
|
-
var
|
|
411
|
-
return ((
|
|
412
|
-
}),
|
|
413
|
-
|
|
414
|
-
|
|
408
|
+
setup(e, { emit: i }) {
|
|
409
|
+
const c = e, k = i, f = g(null), y = g(!1), b = _(() => {
|
|
410
|
+
var x;
|
|
411
|
+
return ((x = c.notifications) == null ? void 0 : x.data) || [];
|
|
412
|
+
}), S = _(() => b.value.some((x) => x.ClassRead === "unread"));
|
|
413
|
+
de(f, () => {
|
|
414
|
+
y.value = !1;
|
|
415
415
|
});
|
|
416
|
-
function
|
|
417
|
-
return Object.prototype.hasOwnProperty.call(
|
|
416
|
+
function w(x) {
|
|
417
|
+
return Object.prototype.hasOwnProperty.call(c.iconMap, x.VueAppTypeIcon) && c.iconMap[x.VueAppTypeIcon] || le;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
|
|
419
|
+
function $(x) {
|
|
420
|
+
y.value = !1;
|
|
421
|
+
const p = D(x);
|
|
422
|
+
p && k("navigate", p);
|
|
423
423
|
}
|
|
424
|
-
return (
|
|
424
|
+
return (x, p) => (o(), s("div", {
|
|
425
425
|
ref_key: "rootEl",
|
|
426
|
-
ref:
|
|
426
|
+
ref: f,
|
|
427
427
|
class: "relative font-sans"
|
|
428
428
|
}, [
|
|
429
429
|
n("button", {
|
|
@@ -431,12 +431,12 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
431
431
|
class: "relative flex cursor-pointer items-center justify-center text-proclusteal-600 transition-colors duration-150 hover:text-proclusteal-900",
|
|
432
432
|
title: "View Notifications",
|
|
433
433
|
"aria-label": "View Notifications",
|
|
434
|
-
onClick:
|
|
434
|
+
onClick: p[0] || (p[0] = (l) => y.value = !y.value)
|
|
435
435
|
}, [
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
M(le, { class: "!h-[21px] !w-[21px]" }),
|
|
437
|
+
S.value ? (o(), s("span", et)) : v("", !0)
|
|
438
438
|
]),
|
|
439
|
-
|
|
439
|
+
M(se, {
|
|
440
440
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
441
441
|
"enter-from-class": "scale-95 opacity-0",
|
|
442
442
|
"enter-to-class": "scale-100 opacity-100",
|
|
@@ -444,53 +444,53 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
444
444
|
"leave-from-class": "scale-100 opacity-100",
|
|
445
445
|
"leave-to-class": "scale-95 opacity-0"
|
|
446
446
|
}, {
|
|
447
|
-
default:
|
|
448
|
-
|
|
447
|
+
default: ie(() => [
|
|
448
|
+
G(n("div", tt, [
|
|
449
449
|
n("div", lt, [
|
|
450
|
-
|
|
451
|
-
(o(!0),
|
|
450
|
+
b.value.length ? v("", !0) : (o(), s("div", ot, " No notifications. ")),
|
|
451
|
+
(o(!0), s(N, null, L(b.value, (l) => (o(), s("div", {
|
|
452
452
|
key: l.NotifyID,
|
|
453
|
-
class:
|
|
454
|
-
onClick: (
|
|
453
|
+
class: C(["flex cursor-pointer items-start gap-3 border-b border-proclusteal-200 px-4 py-3", l.ClassRead === "unread" ? "bg-proclusteal-50" : "bg-white"]),
|
|
454
|
+
onClick: (u) => $(l.url)
|
|
455
455
|
}, [
|
|
456
456
|
n("span", at, [
|
|
457
|
-
(o(),
|
|
457
|
+
(o(), A(ce(w(l)), { class: "!h-5 !w-5" }))
|
|
458
458
|
]),
|
|
459
|
-
n("span",
|
|
460
|
-
n("span",
|
|
459
|
+
n("span", rt, [
|
|
460
|
+
n("span", st, m(l.notifyname), 1),
|
|
461
461
|
n("span", it, m(l.summary), 1),
|
|
462
|
-
l.dateText ? (o(),
|
|
462
|
+
l.dateText ? (o(), s("span", ct, m(l.dateText), 1)) : v("", !0)
|
|
463
463
|
]),
|
|
464
464
|
n("span", ut, [
|
|
465
|
-
l.ClassRead === "unread" ? (o(),
|
|
465
|
+
l.ClassRead === "unread" ? (o(), s("button", {
|
|
466
466
|
key: 0,
|
|
467
467
|
type: "button",
|
|
468
468
|
class: "hover:text-proclusteal-900",
|
|
469
469
|
title: "Mark notification as read",
|
|
470
470
|
"aria-label": "Mark notification as read",
|
|
471
|
-
onClick:
|
|
471
|
+
onClick: E((u) => x.$emit("markAsRead", l.NotifyID), ["stop"])
|
|
472
472
|
}, [
|
|
473
|
-
|
|
473
|
+
M(Te, { class: "!h-4 !w-4" })
|
|
474
474
|
], 8, pt)) : v("", !0),
|
|
475
475
|
n("button", {
|
|
476
476
|
type: "button",
|
|
477
477
|
class: "hover:text-[#dd3730]",
|
|
478
478
|
title: "Delete notification",
|
|
479
479
|
"aria-label": "Delete notification",
|
|
480
|
-
onClick:
|
|
480
|
+
onClick: E((u) => x.$emit("deleteNotification", l.NotifyID), ["stop"])
|
|
481
481
|
}, [
|
|
482
|
-
|
|
482
|
+
M(Ie, { class: "!w-3" })
|
|
483
483
|
], 8, dt)
|
|
484
484
|
])
|
|
485
485
|
], 10, nt))), 128))
|
|
486
486
|
]),
|
|
487
487
|
n("a", {
|
|
488
|
-
href:
|
|
488
|
+
href: q(D)(e.notificationsUrl) || null,
|
|
489
489
|
class: "block border-t border-proclusteal-200 px-4 py-2.5 text-center text-[13px] font-bold text-proclusteal-700 no-underline hover:bg-proclusteal-50 hover:text-proclusteal-900",
|
|
490
|
-
onClick:
|
|
490
|
+
onClick: p[1] || (p[1] = E((l) => $(e.notificationsUrl), ["exact", "prevent"]))
|
|
491
491
|
}, " See all notifications ", 8, ft)
|
|
492
492
|
], 512), [
|
|
493
|
-
[
|
|
493
|
+
[ue, y.value]
|
|
494
494
|
])
|
|
495
495
|
]),
|
|
496
496
|
_: 1
|
|
@@ -516,21 +516,21 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
516
516
|
}
|
|
517
517
|
},
|
|
518
518
|
emits: ["select"],
|
|
519
|
-
setup(e, { emit:
|
|
520
|
-
const
|
|
521
|
-
R(() =>
|
|
522
|
-
|
|
519
|
+
setup(e, { emit: i }) {
|
|
520
|
+
const c = e, k = i, f = g(null), y = g(!1), b = g(!1);
|
|
521
|
+
R(() => c.user.avatarUrl, () => {
|
|
522
|
+
b.value = !1;
|
|
523
523
|
});
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
|
|
524
|
+
const S = _(() => `${c.user.firstName || ""} ${c.user.surname || ""}`.trim()), w = _(() => `${(c.user.firstName || "").charAt(0)}${(c.user.surname || "").charAt(0)}`.toUpperCase());
|
|
525
|
+
de(f, () => {
|
|
526
|
+
y.value = !1;
|
|
527
527
|
});
|
|
528
|
-
function
|
|
529
|
-
|
|
528
|
+
function $(x) {
|
|
529
|
+
y.value = !1, k("select", x);
|
|
530
530
|
}
|
|
531
|
-
return (
|
|
531
|
+
return (x, p) => (o(), s("div", {
|
|
532
532
|
ref_key: "rootEl",
|
|
533
|
-
ref:
|
|
533
|
+
ref: f,
|
|
534
534
|
class: "relative font-sans"
|
|
535
535
|
}, [
|
|
536
536
|
n("button", {
|
|
@@ -538,17 +538,17 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
538
538
|
class: "flex cursor-pointer items-center justify-center",
|
|
539
539
|
title: "View Menu Options",
|
|
540
540
|
"aria-label": "View Menu Options",
|
|
541
|
-
onClick:
|
|
541
|
+
onClick: p[1] || (p[1] = (l) => y.value = !y.value)
|
|
542
542
|
}, [
|
|
543
|
-
e.user.avatarUrl && !
|
|
543
|
+
e.user.avatarUrl && !b.value ? (o(), s("img", {
|
|
544
544
|
key: 0,
|
|
545
545
|
src: e.user.avatarUrl,
|
|
546
546
|
alt: "",
|
|
547
547
|
class: "h-[34px] w-[34px] rounded-full object-cover",
|
|
548
|
-
onError:
|
|
549
|
-
}, null, 40, ht)) : (o(),
|
|
548
|
+
onError: p[0] || (p[0] = (l) => b.value = !0)
|
|
549
|
+
}, null, 40, ht)) : (o(), s("span", yt, m(w.value), 1))
|
|
550
550
|
]),
|
|
551
|
-
|
|
551
|
+
M(se, {
|
|
552
552
|
"enter-active-class": "transition-all ease-out duration-75",
|
|
553
553
|
"enter-from-class": "scale-95 opacity-0",
|
|
554
554
|
"enter-to-class": "scale-100 opacity-100",
|
|
@@ -556,22 +556,22 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
556
556
|
"leave-from-class": "scale-100 opacity-100",
|
|
557
557
|
"leave-to-class": "scale-95 opacity-0"
|
|
558
558
|
}, {
|
|
559
|
-
default:
|
|
560
|
-
|
|
559
|
+
default: ie(() => [
|
|
560
|
+
G(n("div", vt, [
|
|
561
561
|
n("div", mt, [
|
|
562
|
-
n("span", bt, m(
|
|
562
|
+
n("span", bt, m(S.value), 1),
|
|
563
563
|
gt,
|
|
564
564
|
n("span", kt, m(e.user.orgName), 1)
|
|
565
565
|
]),
|
|
566
566
|
wt,
|
|
567
|
-
(o(!0),
|
|
568
|
-
l.divider ? (o(),
|
|
567
|
+
(o(!0), s(N, null, L(e.menuItems, (l, u) => (o(), s(N, { key: u }, [
|
|
568
|
+
l.divider ? (o(), s("div", $t)) : (o(), s("a", {
|
|
569
569
|
key: 1,
|
|
570
|
-
href: l.href &&
|
|
570
|
+
href: l.href && q(D)(l.href) || null,
|
|
571
571
|
class: "flex items-center gap-2.5 px-[18px] py-2 text-[13px] font-semibold text-proclusteal-700 no-underline hover:bg-proclusteal-50 hover:text-proclusteal-900",
|
|
572
|
-
onClick:
|
|
572
|
+
onClick: E((d) => $(l), ["exact", "prevent"])
|
|
573
573
|
}, [
|
|
574
|
-
l.icon ? (o(),
|
|
574
|
+
l.icon ? (o(), A(ce(l.icon), {
|
|
575
575
|
key: 0,
|
|
576
576
|
class: "!h-4 !w-4 flex-none"
|
|
577
577
|
})) : v("", !0),
|
|
@@ -579,7 +579,7 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
579
579
|
], 8, Ct))
|
|
580
580
|
], 64))), 128))
|
|
581
581
|
], 512), [
|
|
582
|
-
[
|
|
582
|
+
[ue, y.value]
|
|
583
583
|
])
|
|
584
584
|
]),
|
|
585
585
|
_: 1
|
|
@@ -592,7 +592,7 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
592
592
|
}, It = {
|
|
593
593
|
key: 0,
|
|
594
594
|
class: "font-normal text-black-800"
|
|
595
|
-
}, At =
|
|
595
|
+
}, At = ["href", "title", "aria-label"], Et = { class: "flex items-center gap-[18px] sm:gap-[25px]" }, Bt = {
|
|
596
596
|
__name: "AppHeader",
|
|
597
597
|
props: {
|
|
598
598
|
title: {
|
|
@@ -615,6 +615,12 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
615
615
|
type: Boolean,
|
|
616
616
|
default: !1
|
|
617
617
|
},
|
|
618
|
+
// Per-module accent (proclus `.top-left-part:after`): a 2x45px bar dividing the
|
|
619
|
+
// brand block from the header icons. Omit for no divider.
|
|
620
|
+
accentColour: {
|
|
621
|
+
type: String,
|
|
622
|
+
default: ""
|
|
623
|
+
},
|
|
618
624
|
user: {
|
|
619
625
|
type: Object,
|
|
620
626
|
default: null
|
|
@@ -649,85 +655,94 @@ const Le = (e) => (we("data-v-b4eb0ff3"), e = e(), $e(), e), ze = { class: "flex
|
|
|
649
655
|
}
|
|
650
656
|
},
|
|
651
657
|
emits: ["navigate", "home", "menu-select", "markAsRead", "deleteNotification"],
|
|
652
|
-
setup(e, { emit:
|
|
653
|
-
const
|
|
654
|
-
function
|
|
655
|
-
var
|
|
656
|
-
if (!
|
|
658
|
+
setup(e, { emit: i }) {
|
|
659
|
+
const c = e, k = i, f = re(), y = g(!1), b = _(() => fe(c.accentColour)), S = _(() => b.value || "#1c6f63");
|
|
660
|
+
function w(l) {
|
|
661
|
+
var d, T;
|
|
662
|
+
if (!l)
|
|
657
663
|
return;
|
|
658
|
-
const
|
|
659
|
-
|
|
664
|
+
const u = D(l);
|
|
665
|
+
u && (k("navigate", u), (T = (d = f == null ? void 0 : f.vnode) == null ? void 0 : d.props) != null && T.onNavigate || (window.location.href = u));
|
|
660
666
|
}
|
|
661
|
-
function
|
|
662
|
-
|
|
667
|
+
function $() {
|
|
668
|
+
k("home"), w(c.homeUrl);
|
|
663
669
|
}
|
|
664
|
-
function
|
|
670
|
+
function x() {
|
|
665
671
|
window.history.back();
|
|
666
672
|
}
|
|
667
|
-
function
|
|
668
|
-
|
|
673
|
+
function p(l) {
|
|
674
|
+
k("menu-select", l), l.href && w(l.href);
|
|
669
675
|
}
|
|
670
|
-
return (
|
|
676
|
+
return (l, u) => (o(), s("header", Mt, [
|
|
671
677
|
n("div", St, [
|
|
672
|
-
|
|
673
|
-
e.title ? (o(),
|
|
674
|
-
|
|
675
|
-
e.subtitle ? (o(),
|
|
678
|
+
V(l.$slots, "logo"),
|
|
679
|
+
e.title ? (o(), s("span", Tt, [
|
|
680
|
+
j(m(e.title), 1),
|
|
681
|
+
e.subtitle ? (o(), s("span", It, " " + m(e.subtitle), 1)) : v("", !0)
|
|
676
682
|
])) : v("", !0),
|
|
677
|
-
|
|
678
|
-
|
|
683
|
+
b.value ? (o(), s("span", {
|
|
684
|
+
key: 1,
|
|
685
|
+
class: "h-[45px] w-[2px] shrink-0",
|
|
686
|
+
style: K({ background: b.value }),
|
|
687
|
+
"aria-hidden": "true"
|
|
688
|
+
}, null, 4)) : v("", !0),
|
|
689
|
+
n("nav", {
|
|
690
|
+
class: "flex items-center gap-7 text-proclusteal-600",
|
|
691
|
+
style: K({ "--hdr-accent": S.value })
|
|
692
|
+
}, [
|
|
693
|
+
e.homeUrl ? (o(), s("a", {
|
|
679
694
|
key: 0,
|
|
680
|
-
href:
|
|
681
|
-
class: "hover:text-
|
|
695
|
+
href: q(D)(e.homeUrl) || null,
|
|
696
|
+
class: "hover:text-[var(--hdr-accent)]",
|
|
682
697
|
title: e.homeTooltip,
|
|
683
698
|
"aria-label": e.homeTooltip,
|
|
684
|
-
onClick:
|
|
699
|
+
onClick: E($, ["exact", "prevent"])
|
|
685
700
|
}, [
|
|
686
|
-
|
|
687
|
-
], 8,
|
|
688
|
-
e.showBack ? (o(),
|
|
701
|
+
M(_e, { class: "!h-[22px] !w-[22px]" })
|
|
702
|
+
], 8, At)) : v("", !0),
|
|
703
|
+
e.showBack ? (o(), s("button", {
|
|
689
704
|
key: 1,
|
|
690
705
|
type: "button",
|
|
691
|
-
class: "cursor-pointer hover:text-
|
|
706
|
+
class: "cursor-pointer hover:text-[var(--hdr-accent)]",
|
|
692
707
|
title: "Go Back",
|
|
693
708
|
"aria-label": "Go Back",
|
|
694
|
-
onClick:
|
|
709
|
+
onClick: x
|
|
695
710
|
}, [
|
|
696
|
-
|
|
711
|
+
M(Me, { class: "!h-[22px] !w-[22px]" })
|
|
697
712
|
])) : v("", !0)
|
|
698
|
-
]),
|
|
699
|
-
|
|
713
|
+
], 4),
|
|
714
|
+
V(l.$slots, "left")
|
|
700
715
|
]),
|
|
701
|
-
n("div",
|
|
702
|
-
|
|
703
|
-
e.searchProvider ? (o(),
|
|
716
|
+
n("div", Et, [
|
|
717
|
+
V(l.$slots, "right"),
|
|
718
|
+
e.searchProvider ? (o(), A(He, {
|
|
704
719
|
key: 0,
|
|
705
|
-
onClick:
|
|
720
|
+
onClick: u[0] || (u[0] = (d) => y.value = !0)
|
|
706
721
|
})) : v("", !0),
|
|
707
|
-
e.notifications ? (o(),
|
|
722
|
+
e.notifications ? (o(), A(xt, {
|
|
708
723
|
key: 1,
|
|
709
724
|
notifications: e.notifications,
|
|
710
725
|
"notifications-url": e.notificationsUrl,
|
|
711
726
|
"icon-map": e.notificationIconMap,
|
|
712
|
-
onMarkAsRead:
|
|
713
|
-
onDeleteNotification:
|
|
714
|
-
onNavigate:
|
|
727
|
+
onMarkAsRead: u[1] || (u[1] = (d) => l.$emit("markAsRead", d)),
|
|
728
|
+
onDeleteNotification: u[2] || (u[2] = (d) => l.$emit("deleteNotification", d)),
|
|
729
|
+
onNavigate: w
|
|
715
730
|
}, null, 8, ["notifications", "notifications-url", "icon-map"])) : v("", !0),
|
|
716
|
-
e.user ? (o(),
|
|
731
|
+
e.user ? (o(), A(_t, {
|
|
717
732
|
key: 2,
|
|
718
733
|
user: e.user,
|
|
719
734
|
"menu-items": e.menuItems,
|
|
720
|
-
onSelect:
|
|
735
|
+
onSelect: p
|
|
721
736
|
}, null, 8, ["user", "menu-items"])) : v("", !0)
|
|
722
737
|
]),
|
|
723
|
-
e.searchProvider ? (o(),
|
|
738
|
+
e.searchProvider ? (o(), A(Ze, {
|
|
724
739
|
key: 0,
|
|
725
|
-
open:
|
|
726
|
-
"onUpdate:open":
|
|
740
|
+
open: y.value,
|
|
741
|
+
"onUpdate:open": u[3] || (u[3] = (d) => y.value = d),
|
|
727
742
|
"search-provider": e.searchProvider,
|
|
728
743
|
placeholder: e.searchPlaceholder,
|
|
729
744
|
types: e.searchTypes,
|
|
730
|
-
onNavigate:
|
|
745
|
+
onNavigate: w
|
|
731
746
|
}, null, 8, ["open", "search-provider", "placeholder", "types"])) : v("", !0)
|
|
732
747
|
]));
|
|
733
748
|
}
|
|
@@ -736,8 +751,8 @@ export {
|
|
|
736
751
|
Bt as AppHeader,
|
|
737
752
|
Ne as DEFAULT_SEARCH_TYPES,
|
|
738
753
|
Ze as GlobalSearchModal,
|
|
739
|
-
|
|
754
|
+
He as GlobalSearchPill,
|
|
740
755
|
xt as HeaderNotificationDropdown,
|
|
741
756
|
_t as HeaderUserMenu,
|
|
742
|
-
|
|
757
|
+
D as safeUrl
|
|
743
758
|
};
|