@freedom-code-compliance/fcc-redesign 0.1.53 → 0.1.55
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/index.cjs +1 -1
- package/dist/index.js +740 -704
- package/dist/styles.css +1 -1
- package/index.d.ts +24 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createContext as e, createElement as t, forwardRef as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
2
|
-
import { AlertCircle as f, AlertTriangle as p, ArrowLeft as m, ArrowUp as h, Bell as g, Calendar as _, Check as v, CheckCheck as y, CheckCircle as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronUp as T, ChevronsUpDown as E, Circle as D, Clock as O, Columns3 as k, Copy as A, Delete as j, ExternalLink as M,
|
|
2
|
+
import { AlertCircle as f, AlertTriangle as p, ArrowLeft as m, ArrowUp as h, Bell as g, Calendar as _, Check as v, CheckCheck as y, CheckCircle as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronUp as T, ChevronsUpDown as E, Circle as D, Clock as O, Columns3 as k, Copy as A, Delete as j, ExternalLink as M, File as N, FileText as P, Filter as F, GripVertical as I, Hash as L, Image as ee, Info as R, LayoutGrid as z, List as B, Loader2 as te, LogOut as V, Map as ne, Maximize2 as re, Menu as ie, MessageSquare as ae, Mic as oe, MicOff as se, Minus as ce, Moon as le, MoreHorizontal as ue, MoreVertical as de, Move as fe, PanelRightClose as pe, Paperclip as me, Pause as he, Pencil as ge, PencilLine as _e, Phone as ve, PhoneForwarded as ye, PhoneIncoming as be, PhoneMissed as xe, PhoneOff as Se, PhoneOutgoing as Ce, Pin as we, PinOff as Te, Play as Ee, Plus as De, Quote as Oe, Reply as ke, Search as Ae, SlidersHorizontal as je, Smile as Me, SquarePen as Ne, Sun as Pe, TicketPlus as Fe, Trash2 as Ie, TrendingDown as Le, TrendingUp as Re, UserPlus as ze, Users as Be, Voicemail as Ve, X as H } from "lucide-react";
|
|
3
3
|
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
4
|
-
import { createPortal as
|
|
4
|
+
import { createPortal as He } from "react-dom";
|
|
5
5
|
//#region src/components/ui/Toast.jsx
|
|
6
|
-
var
|
|
6
|
+
var Ue = e(null), We = {
|
|
7
7
|
success: /* @__PURE__ */ W(b, {
|
|
8
8
|
size: 16,
|
|
9
9
|
style: { color: "var(--accent-green)" }
|
|
@@ -16,12 +16,12 @@ var He = e(null), Ue = {
|
|
|
16
16
|
size: 16,
|
|
17
17
|
style: { color: "var(--accent-yellow)" }
|
|
18
18
|
}),
|
|
19
|
-
info: /* @__PURE__ */ W(
|
|
19
|
+
info: /* @__PURE__ */ W(R, {
|
|
20
20
|
size: 16,
|
|
21
21
|
style: { color: "var(--accent-blue)" }
|
|
22
22
|
})
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function Ge({ toast: e, onDismiss: t }) {
|
|
25
25
|
return o(() => {
|
|
26
26
|
if (!(e.sticky || e.duration === 0)) {
|
|
27
27
|
let n = setTimeout(() => t(e.id), e.duration || 4e3);
|
|
@@ -38,7 +38,7 @@ function We({ toast: e, onDismiss: t }) {
|
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ W("span", {
|
|
40
40
|
className: "toast-icon",
|
|
41
|
-
children:
|
|
41
|
+
children: We[e.type] || We.info
|
|
42
42
|
}),
|
|
43
43
|
/* @__PURE__ */ G("div", {
|
|
44
44
|
className: "toast-content",
|
|
@@ -68,7 +68,7 @@ function We({ toast: e, onDismiss: t }) {
|
|
|
68
68
|
]
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Ke({ children: e }) {
|
|
72
72
|
let [t, n] = d([]), r = i((e) => {
|
|
73
73
|
let t = Date.now() + Math.random();
|
|
74
74
|
n((n) => [...n.slice(-4), {
|
|
@@ -78,35 +78,35 @@ function Ge({ children: e }) {
|
|
|
78
78
|
}, []), a = i((e) => {
|
|
79
79
|
n((t) => t.filter((t) => t.id !== e));
|
|
80
80
|
}, []);
|
|
81
|
-
return /* @__PURE__ */ G(
|
|
81
|
+
return /* @__PURE__ */ G(Ue.Provider, {
|
|
82
82
|
value: { addToast: r },
|
|
83
83
|
children: [e, /* @__PURE__ */ W("div", {
|
|
84
84
|
className: "toast-container",
|
|
85
|
-
children: t.map((e) => /* @__PURE__ */ W(
|
|
85
|
+
children: t.map((e) => /* @__PURE__ */ W(Ge, {
|
|
86
86
|
toast: e,
|
|
87
87
|
onDismiss: a
|
|
88
88
|
}, e.id))
|
|
89
89
|
})]
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
let e = a(
|
|
92
|
+
function qe() {
|
|
93
|
+
let e = a(Ue);
|
|
94
94
|
if (!e) throw Error("useToast must be used within ToastProvider");
|
|
95
95
|
return e;
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/context/ThemeContext.jsx
|
|
99
|
-
var
|
|
100
|
-
function
|
|
99
|
+
var Je = e(void 0), Ye = "dark", Xe = "fcc-theme";
|
|
100
|
+
function Ze(e) {
|
|
101
101
|
if (typeof document > "u") return;
|
|
102
102
|
let t = document.documentElement;
|
|
103
103
|
t.classList.remove("dark", "light"), e === "light" && t.classList.add("light");
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Qe({ children: e, defaultTheme: t = Ye, storageKey: n = Xe }) {
|
|
106
106
|
let [r, i] = d(() => typeof window > "u" ? t : window.localStorage.getItem(n) || t);
|
|
107
107
|
return o(() => {
|
|
108
|
-
typeof window < "u" && window.localStorage.setItem(n, r),
|
|
109
|
-
}, [n, r]), /* @__PURE__ */ W(
|
|
108
|
+
typeof window < "u" && window.localStorage.setItem(n, r), Ze(r);
|
|
109
|
+
}, [n, r]), /* @__PURE__ */ W(Je.Provider, {
|
|
110
110
|
value: {
|
|
111
111
|
theme: r,
|
|
112
112
|
setTheme: i,
|
|
@@ -117,40 +117,40 @@ function Ze({ children: e, defaultTheme: t = Je, storageKey: n = Ye }) {
|
|
|
117
117
|
children: e
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
let e = a(
|
|
120
|
+
function $e() {
|
|
121
|
+
let e = a(Je);
|
|
122
122
|
if (!e) throw Error("useTheme must be used within a ThemeProvider");
|
|
123
123
|
return e;
|
|
124
124
|
}
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/lib/FCCDesignProvider.jsx
|
|
127
|
-
function
|
|
128
|
-
return /* @__PURE__ */ W(
|
|
127
|
+
function et({ children: e, ...t }) {
|
|
128
|
+
return /* @__PURE__ */ W(Qe, {
|
|
129
129
|
...t,
|
|
130
|
-
children: /* @__PURE__ */ W(
|
|
130
|
+
children: /* @__PURE__ */ W(Ke, { children: e })
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region src/components/layout/FCCAppShellContext.jsx
|
|
135
|
-
var
|
|
135
|
+
var tt = () => {}, nt = e({
|
|
136
136
|
sidebarPinned: !1,
|
|
137
|
-
setSidebarPinned:
|
|
138
|
-
toggleSidebarPinned:
|
|
137
|
+
setSidebarPinned: tt,
|
|
138
|
+
toggleSidebarPinned: tt,
|
|
139
139
|
mobileMenuOpen: !1,
|
|
140
|
-
setMobileMenuOpen:
|
|
141
|
-
toggleMobileMenu:
|
|
142
|
-
closeMobileMenu:
|
|
140
|
+
setMobileMenuOpen: tt,
|
|
141
|
+
toggleMobileMenu: tt,
|
|
142
|
+
closeMobileMenu: tt,
|
|
143
143
|
isMobileViewport: !1,
|
|
144
144
|
pinnable: !1,
|
|
145
145
|
mobileMenuEnabled: !1
|
|
146
146
|
});
|
|
147
|
-
function
|
|
148
|
-
return a(
|
|
147
|
+
function rt() {
|
|
148
|
+
return a(nt);
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region src/components/layout/FCCSidePanel.jsx
|
|
152
|
-
var K = (...e) => e.filter(Boolean).join(" "),
|
|
153
|
-
function
|
|
152
|
+
var K = (...e) => e.filter(Boolean).join(" "), it = 300;
|
|
153
|
+
function at({ open: e = !1, width: t = 320, expandedWidth: n, expanded: r = !1, panel: i, children: a, className: s = "", contentClassName: c = "", panelClassName: l = "" }) {
|
|
154
154
|
let f = r && n ? n : t, p = u(null), m = u(null), [h, g] = d(e ? i : null), [_, v] = d(f), [y, b] = d(e && !!i);
|
|
155
155
|
o(() => () => {
|
|
156
156
|
p.current &&= (window.cancelAnimationFrame(p.current), null), m.current &&= (window.clearTimeout(m.current), null);
|
|
@@ -168,7 +168,7 @@ function it({ open: e = !1, width: t = 320, expandedWidth: n, expanded: r = !1,
|
|
|
168
168
|
]), o(() => {
|
|
169
169
|
if (!(e || !y)) return m.current = window.setTimeout(() => {
|
|
170
170
|
b(!1), g(null), m.current = null;
|
|
171
|
-
},
|
|
171
|
+
}, it), () => {
|
|
172
172
|
m.current &&= (window.clearTimeout(m.current), null);
|
|
173
173
|
};
|
|
174
174
|
}, [e, y]);
|
|
@@ -188,7 +188,7 @@ function it({ open: e = !1, width: t = 320, expandedWidth: n, expanded: r = !1,
|
|
|
188
188
|
})]
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function ot({ title: e, subtitle: t, onClose: n, actions: r, className: i = "" }) {
|
|
192
192
|
return /* @__PURE__ */ G("div", {
|
|
193
193
|
className: K("fcc-side-panel-header", i),
|
|
194
194
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -211,13 +211,13 @@ function at({ title: e, subtitle: t, onClose: n, actions: r, className: i = "" }
|
|
|
211
211
|
})]
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function st({ children: e, className: t = "" }) {
|
|
215
215
|
return /* @__PURE__ */ W("div", {
|
|
216
216
|
className: K("fcc-side-panel-body", t),
|
|
217
217
|
children: e
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function ct({ tabs: e = [], activeTab: t = 0, onTabChange: n, className: r = "" }) {
|
|
221
221
|
return /* @__PURE__ */ W("div", {
|
|
222
222
|
className: K("fcc-side-panel-tabs", r),
|
|
223
223
|
children: e.map((e, r) => /* @__PURE__ */ W("button", {
|
|
@@ -227,10 +227,10 @@ function st({ tabs: e = [], activeTab: t = 0, onTabChange: n, className: r = ""
|
|
|
227
227
|
}, e))
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function lt({ placeholder: e = "Search...", value: t, onChange: n, className: r = "" }) {
|
|
231
231
|
return /* @__PURE__ */ G("div", {
|
|
232
232
|
className: K("fcc-side-panel-search", r),
|
|
233
|
-
children: [/* @__PURE__ */ W(
|
|
233
|
+
children: [/* @__PURE__ */ W(Ae, { size: 13 }), n ? /* @__PURE__ */ W("input", {
|
|
234
234
|
className: "fcc-side-panel-search-input",
|
|
235
235
|
type: "text",
|
|
236
236
|
placeholder: e,
|
|
@@ -242,13 +242,13 @@ function ct({ placeholder: e = "Search...", value: t, onChange: n, className: r
|
|
|
242
242
|
})]
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function ut({ children: e, className: t = "" }) {
|
|
246
246
|
return /* @__PURE__ */ W("div", {
|
|
247
247
|
className: K("fcc-side-panel-group-label", t),
|
|
248
248
|
children: e
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function dt({ dot: e, label: t, detail: n, time: r, onClick: i, className: a = "" }) {
|
|
252
252
|
return /* @__PURE__ */ G("div", {
|
|
253
253
|
className: K("fcc-side-panel-item", a),
|
|
254
254
|
onClick: i,
|
|
@@ -274,7 +274,7 @@ function ut({ dot: e, label: t, detail: n, time: r, onClick: i, className: a = "
|
|
|
274
274
|
]
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function ft({ avatar: e, title: t, detail: n, time: r, unread: i, onClick: a, className: o = "" }) {
|
|
278
278
|
return /* @__PURE__ */ G("div", {
|
|
279
279
|
className: K("fcc-side-panel-card", o),
|
|
280
280
|
onClick: a,
|
|
@@ -300,7 +300,7 @@ function dt({ avatar: e, title: t, detail: n, time: r, unread: i, onClick: a, cl
|
|
|
300
300
|
})]
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function pt({ avatar: e, name: t, time: n, active: r, online: i, onClick: a, className: o = "" }) {
|
|
304
304
|
return /* @__PURE__ */ G("div", {
|
|
305
305
|
className: K("fcc-side-panel-contact", r && "active", o),
|
|
306
306
|
onClick: a,
|
|
@@ -320,20 +320,20 @@ function ft({ avatar: e, name: t, time: n, active: r, online: i, onClick: a, cla
|
|
|
320
320
|
]
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function mt({ children: e, onClick: t, className: n = "" }) {
|
|
324
324
|
return /* @__PURE__ */ W("div", {
|
|
325
325
|
className: K("fcc-side-panel-action", n),
|
|
326
326
|
onClick: t,
|
|
327
327
|
children: e
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function ht({ children: e, className: t = "" }) {
|
|
331
331
|
return /* @__PURE__ */ W("div", {
|
|
332
332
|
className: K("fcc-side-panel-chat-wrap", t),
|
|
333
333
|
children: e
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function gt({ title: e, headerActions: t, messages: n = [], input: r, className: i = "" }) {
|
|
337
337
|
return /* @__PURE__ */ G("div", {
|
|
338
338
|
className: K("fcc-side-panel-conversation", i),
|
|
339
339
|
children: [
|
|
@@ -358,7 +358,7 @@ function ht({ title: e, headerActions: t, messages: n = [], input: r, className:
|
|
|
358
358
|
]
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function _t({ from: e = "other", meta: t, children: n, className: r = "" }) {
|
|
362
362
|
let i = e === "you";
|
|
363
363
|
return /* @__PURE__ */ G("div", {
|
|
364
364
|
className: K("fcc-side-panel-msg-row", i ? "fcc-msg-right" : "fcc-msg-left", r),
|
|
@@ -373,7 +373,7 @@ function gt({ from: e = "other", meta: t, children: n, className: r = "" }) {
|
|
|
373
373
|
}
|
|
374
374
|
//#endregion
|
|
375
375
|
//#region src/components/layout/FCCBreadcrumbs.jsx
|
|
376
|
-
function
|
|
376
|
+
function vt(e, t) {
|
|
377
377
|
let n = [
|
|
378
378
|
"fcc-breadcrumb-item",
|
|
379
379
|
t ? "current" : "",
|
|
@@ -396,7 +396,7 @@ function _t(e, t) {
|
|
|
396
396
|
children: e.label
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function yt({ items: e = [], className: t = "" }) {
|
|
400
400
|
let n = e.filter((e) => e?.label);
|
|
401
401
|
return n.length === 0 ? null : /* @__PURE__ */ W("nav", {
|
|
402
402
|
className: ["fcc-breadcrumbs", t].filter(Boolean).join(" "),
|
|
@@ -408,25 +408,25 @@ function vt({ items: e = [], className: t = "" }) {
|
|
|
408
408
|
children: [t > 0 && /* @__PURE__ */ W("span", {
|
|
409
409
|
className: "fcc-breadcrumb-sep",
|
|
410
410
|
children: "/"
|
|
411
|
-
}),
|
|
411
|
+
}), vt(e, r)]
|
|
412
412
|
}, e.key || e.label || t);
|
|
413
413
|
})
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
//#endregion
|
|
417
417
|
//#region src/components/layout/FCCHeaderStatus.jsx
|
|
418
|
-
var
|
|
418
|
+
var bt = {
|
|
419
419
|
success: "fcc-header-status-success",
|
|
420
420
|
warning: "fcc-header-status-warning",
|
|
421
421
|
danger: "fcc-header-status-danger",
|
|
422
422
|
info: "fcc-header-status-info",
|
|
423
423
|
neutral: "fcc-header-status-neutral"
|
|
424
424
|
};
|
|
425
|
-
function
|
|
425
|
+
function xt({ label: e, tone: t = "success", dotColor: n, className: r = "" }) {
|
|
426
426
|
return e ? /* @__PURE__ */ G("div", {
|
|
427
427
|
className: [
|
|
428
428
|
"fcc-header-status",
|
|
429
|
-
|
|
429
|
+
bt[t] || bt.neutral,
|
|
430
430
|
r
|
|
431
431
|
].filter(Boolean).join(" "),
|
|
432
432
|
children: [/* @__PURE__ */ W("span", {
|
|
@@ -437,8 +437,8 @@ function bt({ label: e, tone: t = "success", dotColor: n, className: r = "" }) {
|
|
|
437
437
|
}
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region src/components/layout/FCCWorkspaceHeader.jsx
|
|
440
|
-
function
|
|
441
|
-
let { isMobileViewport: s, mobileMenuEnabled: c, mobileMenuOpen: l, toggleMobileMenu: u } =
|
|
440
|
+
function St({ breadcrumbs: e = [], status: t, actions: n, leftSlot: r, rightSlot: i, className: a = "", showMobileMenuToggle: o = !0 }) {
|
|
441
|
+
let { isMobileViewport: s, mobileMenuEnabled: c, mobileMenuOpen: l, toggleMobileMenu: u } = rt(), d = o && c && s;
|
|
442
442
|
return /* @__PURE__ */ G("header", {
|
|
443
443
|
className: ["fcc-workspace-header", a].filter(Boolean).join(" "),
|
|
444
444
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -450,12 +450,12 @@ function xt({ breadcrumbs: e = [], status: t, actions: n, leftSlot: r, rightSlot
|
|
|
450
450
|
"aria-label": l ? "Close menu" : "Open menu",
|
|
451
451
|
"aria-expanded": l,
|
|
452
452
|
title: l ? "Close menu" : "Open menu",
|
|
453
|
-
children: /* @__PURE__ */ W(
|
|
454
|
-
}), r || /* @__PURE__ */ W(
|
|
453
|
+
children: /* @__PURE__ */ W(ie, { size: 20 })
|
|
454
|
+
}), r || /* @__PURE__ */ W(yt, { items: e })]
|
|
455
455
|
}), /* @__PURE__ */ G("div", {
|
|
456
456
|
className: "fcc-workspace-header-right",
|
|
457
457
|
children: [
|
|
458
|
-
t && /* @__PURE__ */ W(
|
|
458
|
+
t && /* @__PURE__ */ W(xt, { ...t }),
|
|
459
459
|
n,
|
|
460
460
|
i
|
|
461
461
|
]
|
|
@@ -464,8 +464,8 @@ function xt({ breadcrumbs: e = [], status: t, actions: n, leftSlot: r, rightSlot
|
|
|
464
464
|
}
|
|
465
465
|
//#endregion
|
|
466
466
|
//#region src/components/layout/FCCMainWindow.jsx
|
|
467
|
-
function
|
|
468
|
-
let d = o ? /* @__PURE__ */ W(
|
|
467
|
+
function Ct({ breadcrumbs: e = [], status: t, headerActions: n, header: r, children: i, overlay: a, sidePanel: o, callbar: s = null, className: c = "", headerClassName: l = "", contentClassName: u = "" }) {
|
|
468
|
+
let d = o ? /* @__PURE__ */ W(at, {
|
|
469
469
|
open: o.open,
|
|
470
470
|
width: o.width,
|
|
471
471
|
expandedWidth: o.expandedWidth,
|
|
@@ -479,7 +479,7 @@ function St({ breadcrumbs: e = [], status: t, headerActions: n, header: r, child
|
|
|
479
479
|
return /* @__PURE__ */ G("div", {
|
|
480
480
|
className: ["fcc-main-window", c].filter(Boolean).join(" "),
|
|
481
481
|
children: [
|
|
482
|
-
r || /* @__PURE__ */ W(
|
|
482
|
+
r || /* @__PURE__ */ W(St, {
|
|
483
483
|
breadcrumbs: e,
|
|
484
484
|
status: t,
|
|
485
485
|
actions: n,
|
|
@@ -500,7 +500,7 @@ function St({ breadcrumbs: e = [], status: t, headerActions: n, header: r, child
|
|
|
500
500
|
}
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region src/components/layout/FCCSidebar.jsx
|
|
503
|
-
function
|
|
503
|
+
function wt(e, t) {
|
|
504
504
|
if (!e.disabled) {
|
|
505
505
|
if (e.onClick) {
|
|
506
506
|
e.onClick(e);
|
|
@@ -509,10 +509,10 @@ function Ct(e, t) {
|
|
|
509
509
|
t?.(e);
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function Tt(e, t) {
|
|
513
513
|
return !e.childrenSections?.length || !t ? !1 : e.childrenSections.some((e) => e.items?.some((e) => e.key === t));
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Et(e, t) {
|
|
516
516
|
if (!t.trim()) return e;
|
|
517
517
|
let n = t.trim().toLowerCase();
|
|
518
518
|
return e.map((e) => ({
|
|
@@ -520,8 +520,8 @@ function Tt(e, t) {
|
|
|
520
520
|
items: e.items.filter((e) => e.label.toLowerCase().includes(n) || e.pageTitle?.toLowerCase().includes(n) || e.summary?.toLowerCase().includes(n))
|
|
521
521
|
})).filter((e) => e.items.length > 0);
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
let [l, u] = d({}), [f, p] = d({}), { pinnable: m, sidebarPinned: h, toggleSidebarPinned: g, isMobileViewport: _, mobileMenuEnabled: v, closeMobileMenu: y } =
|
|
523
|
+
function Dt({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, onNavigate: i, user: a, footer: o, onLogout: s, className: c = "" }) {
|
|
524
|
+
let [l, u] = d({}), [f, p] = d({}), { pinnable: m, sidebarPinned: h, toggleSidebarPinned: g, isMobileViewport: _, mobileMenuEnabled: v, closeMobileMenu: y } = rt(), b = m && !_, x = v && _;
|
|
525
525
|
function C(e, t) {
|
|
526
526
|
p((n) => ({
|
|
527
527
|
...n,
|
|
@@ -556,7 +556,7 @@ function Et({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
556
556
|
"aria-label": h ? "Unpin sidebar" : "Pin sidebar open",
|
|
557
557
|
title: h ? "Unpin sidebar" : "Pin sidebar open",
|
|
558
558
|
"aria-pressed": h,
|
|
559
|
-
children: W(h ?
|
|
559
|
+
children: W(h ? Te : we, { size: 14 })
|
|
560
560
|
}) : null
|
|
561
561
|
]
|
|
562
562
|
}),
|
|
@@ -564,7 +564,7 @@ function Et({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
564
564
|
className: "fcc-sidebar-nav",
|
|
565
565
|
"aria-label": `${e} navigation`,
|
|
566
566
|
children: n.map((e) => {
|
|
567
|
-
let t = e.childrenSections?.length > 0, n =
|
|
567
|
+
let t = e.childrenSections?.length > 0, n = Tt(e, r), a = e.key === r || n || (r?.startsWith?.(`${e.key}/`) ?? !1), o = t && (f[e.key] ?? a), s = l[e.key] || "", c = t ? Et(e.childrenSections, s) : [];
|
|
568
568
|
return /* @__PURE__ */ G("div", {
|
|
569
569
|
className: [
|
|
570
570
|
"fcc-sidebar-entry",
|
|
@@ -579,7 +579,7 @@ function Et({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
579
579
|
e.disabled ? "disabled" : ""
|
|
580
580
|
].filter(Boolean).join(" "),
|
|
581
581
|
onClick: () => {
|
|
582
|
-
t && C(e.key, !0),
|
|
582
|
+
t && C(e.key, !0), wt(e, i);
|
|
583
583
|
},
|
|
584
584
|
"aria-current": a ? "page" : void 0,
|
|
585
585
|
disabled: e.disabled,
|
|
@@ -616,7 +616,7 @@ function Et({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
616
616
|
className: "fcc-sidebar-accordion",
|
|
617
617
|
children: [/* @__PURE__ */ G("div", {
|
|
618
618
|
className: "fcc-sidebar-search",
|
|
619
|
-
children: [/* @__PURE__ */ W(
|
|
619
|
+
children: [/* @__PURE__ */ W(Ae, { size: 13 }), /* @__PURE__ */ W("input", {
|
|
620
620
|
type: "text",
|
|
621
621
|
className: "fcc-sidebar-search-input",
|
|
622
622
|
value: s,
|
|
@@ -641,7 +641,7 @@ function Et({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
641
641
|
children: e.items.map((e) => /* @__PURE__ */ W("button", {
|
|
642
642
|
type: "button",
|
|
643
643
|
className: ["fcc-sidebar-child-item", e.key === r ? "active" : ""].filter(Boolean).join(" "),
|
|
644
|
-
onClick: () =>
|
|
644
|
+
onClick: () => wt(e, i),
|
|
645
645
|
title: e.label,
|
|
646
646
|
children: /* @__PURE__ */ W("span", {
|
|
647
647
|
className: "fcc-sidebar-label",
|
|
@@ -682,7 +682,7 @@ function Et({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
682
682
|
title: "Logout",
|
|
683
683
|
"aria-label": "Logout",
|
|
684
684
|
onClick: s,
|
|
685
|
-
children: /* @__PURE__ */ W(
|
|
685
|
+
children: /* @__PURE__ */ W(V, { size: 16 })
|
|
686
686
|
})]
|
|
687
687
|
})
|
|
688
688
|
]
|
|
@@ -690,8 +690,8 @@ function Et({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
690
690
|
}
|
|
691
691
|
//#endregion
|
|
692
692
|
//#region src/components/layout/FCCAppShell.jsx
|
|
693
|
-
var
|
|
694
|
-
function
|
|
693
|
+
var Ot = "fcc-sidebar-pinned", kt = 1024;
|
|
694
|
+
function At(e) {
|
|
695
695
|
if (typeof window > "u") return !1;
|
|
696
696
|
try {
|
|
697
697
|
return window.localStorage.getItem(e) === "true";
|
|
@@ -699,13 +699,13 @@ function kt(e) {
|
|
|
699
699
|
return !1;
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function jt(e, t) {
|
|
703
703
|
if (!(typeof window > "u")) try {
|
|
704
704
|
window.localStorage.setItem(e, t ? "true" : "false");
|
|
705
705
|
} catch {}
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
let [k, A] = d(() => T ?
|
|
707
|
+
function Mt({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, onNavigate: a, user: s, footer: c, onLogout: u, breadcrumbs: f = [], status: p, headerActions: m, header: h, children: g, overlay: _, sidePanel: v, callbar: y = null, className: b = "", sidebarClassName: x = "", mainClassName: S = "", headerClassName: C = "", contentClassName: w = "", pinnable: T = !0, mobileMenuEnabled: E = !0, mobileBreakpoint: D = kt, pinStorageKey: O = Ot }) {
|
|
708
|
+
let [k, A] = d(() => T ? At(O) : !1), [j, M] = d(!1), [N, P] = d(() => typeof window > "u" ? 1920 : window.innerWidth);
|
|
709
709
|
o(() => {
|
|
710
710
|
if (typeof window > "u") return;
|
|
711
711
|
let e = () => P(window.innerWidth);
|
|
@@ -713,7 +713,7 @@ function jt({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
713
713
|
}, []);
|
|
714
714
|
let F = E && N < D, I = F && j;
|
|
715
715
|
o(() => {
|
|
716
|
-
T &&
|
|
716
|
+
T && jt(O, k);
|
|
717
717
|
}, [
|
|
718
718
|
T,
|
|
719
719
|
O,
|
|
@@ -752,12 +752,12 @@ function jt({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
752
752
|
I && "fcc-mobile-menu-open",
|
|
753
753
|
b
|
|
754
754
|
].filter(Boolean).join(" ");
|
|
755
|
-
return /* @__PURE__ */ W(
|
|
755
|
+
return /* @__PURE__ */ W(nt.Provider, {
|
|
756
756
|
value: z,
|
|
757
757
|
children: /* @__PURE__ */ G("div", {
|
|
758
758
|
className: B,
|
|
759
759
|
children: [
|
|
760
|
-
/* @__PURE__ */ W(
|
|
760
|
+
/* @__PURE__ */ W(Dt, {
|
|
761
761
|
appName: e,
|
|
762
762
|
logo: t,
|
|
763
763
|
navItems: n,
|
|
@@ -768,7 +768,7 @@ function jt({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
768
768
|
onLogout: u,
|
|
769
769
|
className: x
|
|
770
770
|
}),
|
|
771
|
-
/* @__PURE__ */ W(
|
|
771
|
+
/* @__PURE__ */ W(Ct, {
|
|
772
772
|
breadcrumbs: f,
|
|
773
773
|
status: p,
|
|
774
774
|
headerActions: m,
|
|
@@ -807,7 +807,7 @@ function q({ size: e, title: t, ...n } = {}, r = 14) {
|
|
|
807
807
|
function J({ title: e }) {
|
|
808
808
|
return e ? /* @__PURE__ */ W("title", { children: e }) : null;
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function Nt(e) {
|
|
811
811
|
let { title: t } = e ?? {};
|
|
812
812
|
return /* @__PURE__ */ G("svg", {
|
|
813
813
|
viewBox: "0 0 16 16",
|
|
@@ -816,7 +816,7 @@ function Mt(e) {
|
|
|
816
816
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6.5l-2.5-2.5a.5.5 0 0 0-.354-.146H8.5a.5.5 0 0 0-.5.5v2.793L6.854 9.001a.5.5 0 0 0-.708 0L2 13.147V3Zm12 8.207V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-.44l4.5-4.5L8.146 9.707a.5.5 0 0 0 .708 0L11.5 7.06l2.5 2.5V11.207Z" })]
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function Pt(e) {
|
|
820
820
|
let { title: t } = e ?? {};
|
|
821
821
|
return /* @__PURE__ */ G("svg", {
|
|
822
822
|
viewBox: "0 0 16 16",
|
|
@@ -840,7 +840,7 @@ function Nt(e) {
|
|
|
840
840
|
]
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Ft(e) {
|
|
844
844
|
let { title: t } = e ?? {};
|
|
845
845
|
return /* @__PURE__ */ G("svg", {
|
|
846
846
|
viewBox: "0 0 16 16",
|
|
@@ -849,7 +849,7 @@ function Pt(e) {
|
|
|
849
849
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M8 1l2.2 4.4L15 6.3l-3.5 3.4.8 4.9L8 12.4 3.7 14.6l.8-4.9L1 6.3l4.8-.9L8 1Z" })]
|
|
850
850
|
});
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function It(e) {
|
|
853
853
|
let { title: t } = e ?? {};
|
|
854
854
|
return /* @__PURE__ */ G("svg", {
|
|
855
855
|
viewBox: "0 0 16 16",
|
|
@@ -862,7 +862,7 @@ function Ft(e) {
|
|
|
862
862
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M1 8h3l2-5 2 10 2-5h3" })]
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function Lt(e) {
|
|
866
866
|
let { title: t } = e ?? {};
|
|
867
867
|
return /* @__PURE__ */ G("svg", {
|
|
868
868
|
viewBox: "0 0 16 16",
|
|
@@ -871,7 +871,7 @@ function It(e) {
|
|
|
871
871
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M3 2h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm1 3v2h8V5H4Zm0 4v2h5V9H4Z" })]
|
|
872
872
|
});
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Rt(e) {
|
|
875
875
|
let { title: t } = e ?? {};
|
|
876
876
|
return /* @__PURE__ */ G("svg", {
|
|
877
877
|
viewBox: "0 0 16 16",
|
|
@@ -880,7 +880,7 @@ function Lt(e) {
|
|
|
880
880
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M2 3.5A1.5 1.5 0 0 1 3.5 2h3.379a1.5 1.5 0 0 1 1.06.44l.622.62A1.5 1.5 0 0 0 9.622 3.5H12.5A1.5 1.5 0 0 1 14 5v7.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 12.5v-9Z" })]
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function zt(e) {
|
|
884
884
|
let { title: t } = e ?? {};
|
|
885
885
|
return /* @__PURE__ */ G("svg", {
|
|
886
886
|
viewBox: "0 0 16 16",
|
|
@@ -906,7 +906,7 @@ function Rt(e) {
|
|
|
906
906
|
]
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Bt(e) {
|
|
910
910
|
let { title: t } = e ?? {};
|
|
911
911
|
return /* @__PURE__ */ G("svg", {
|
|
912
912
|
viewBox: "0 0 16 16",
|
|
@@ -928,7 +928,7 @@ function zt(e) {
|
|
|
928
928
|
]
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function Vt(e) {
|
|
932
932
|
let { title: t } = e ?? {};
|
|
933
933
|
return /* @__PURE__ */ G("svg", {
|
|
934
934
|
viewBox: "0 0 16 16",
|
|
@@ -941,7 +941,7 @@ function Bt(e) {
|
|
|
941
941
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M11 2l3 3-8 8H3v-3l8-8Z" })]
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function Ht(e) {
|
|
945
945
|
let { title: t } = e ?? {};
|
|
946
946
|
return /* @__PURE__ */ G("svg", {
|
|
947
947
|
viewBox: "0 0 14 14",
|
|
@@ -954,7 +954,7 @@ function Vt(e) {
|
|
|
954
954
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M3.5 5.5L7 9l3.5-3.5" })]
|
|
955
955
|
});
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Ut(e) {
|
|
958
958
|
let { title: t } = e ?? {};
|
|
959
959
|
return /* @__PURE__ */ G("svg", {
|
|
960
960
|
viewBox: "0 0 14 14",
|
|
@@ -967,7 +967,7 @@ function Ht(e) {
|
|
|
967
967
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M3.5 9L7 5.5 10.5 9" })]
|
|
968
968
|
});
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function Wt(e) {
|
|
971
971
|
let { title: t } = e ?? {};
|
|
972
972
|
return /* @__PURE__ */ G("svg", {
|
|
973
973
|
viewBox: "0 0 14 14",
|
|
@@ -976,7 +976,7 @@ function Ut(e) {
|
|
|
976
976
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M7 1l1.76 3.52L13 5.26l-3 2.94.7 4.13L7 10.4 3.3 12.33l.7-4.13-3-2.94 4.24-.74L7 1Z" })]
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function Gt(e) {
|
|
980
980
|
let { title: t } = e ?? {};
|
|
981
981
|
return /* @__PURE__ */ G("svg", {
|
|
982
982
|
viewBox: "0 0 14 14",
|
|
@@ -1001,7 +1001,7 @@ function Wt(e) {
|
|
|
1001
1001
|
]
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Kt(e) {
|
|
1005
1005
|
let { title: t } = e ?? {};
|
|
1006
1006
|
return /* @__PURE__ */ G("svg", {
|
|
1007
1007
|
viewBox: "0 0 14 14",
|
|
@@ -1025,7 +1025,7 @@ function Gt(e) {
|
|
|
1025
1025
|
]
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function qt(e) {
|
|
1029
1029
|
let { title: t } = e ?? {};
|
|
1030
1030
|
return /* @__PURE__ */ G("svg", {
|
|
1031
1031
|
viewBox: "0 0 14 14",
|
|
@@ -1040,7 +1040,7 @@ function Kt(e) {
|
|
|
1040
1040
|
})]
|
|
1041
1041
|
});
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function Jt(e) {
|
|
1044
1044
|
let { title: t } = e ?? {};
|
|
1045
1045
|
return /* @__PURE__ */ G("svg", {
|
|
1046
1046
|
viewBox: "0 0 14 14",
|
|
@@ -1056,7 +1056,7 @@ function qt(e) {
|
|
|
1056
1056
|
})]
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function Yt(e) {
|
|
1060
1060
|
let { title: t } = e ?? {};
|
|
1061
1061
|
return /* @__PURE__ */ G("svg", {
|
|
1062
1062
|
viewBox: "0 0 14 14",
|
|
@@ -1080,7 +1080,7 @@ function Jt(e) {
|
|
|
1080
1080
|
]
|
|
1081
1081
|
});
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function Xt(e) {
|
|
1084
1084
|
let { title: t } = e ?? {};
|
|
1085
1085
|
return /* @__PURE__ */ G("svg", {
|
|
1086
1086
|
viewBox: "0 0 14 14",
|
|
@@ -1089,7 +1089,7 @@ function Yt(e) {
|
|
|
1089
1089
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M7 1a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V2a1 1 0 0 1 1-1Zm0 10a1.25 1.25 0 1 1 0 2.5A1.25 1.25 0 0 1 7 11Z" })]
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Zt(e) {
|
|
1093
1093
|
let { title: t } = e ?? {};
|
|
1094
1094
|
return /* @__PURE__ */ G("svg", {
|
|
1095
1095
|
viewBox: "0 0 14 14",
|
|
@@ -1121,7 +1121,7 @@ function Xt(e) {
|
|
|
1121
1121
|
]
|
|
1122
1122
|
});
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function Qt(e) {
|
|
1125
1125
|
let { title: t } = e ?? {};
|
|
1126
1126
|
return /* @__PURE__ */ G("svg", {
|
|
1127
1127
|
viewBox: "0 0 14 14",
|
|
@@ -1155,7 +1155,7 @@ function Zt(e) {
|
|
|
1155
1155
|
]
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function $t(e) {
|
|
1159
1159
|
let { title: t } = e ?? {};
|
|
1160
1160
|
return /* @__PURE__ */ G("svg", {
|
|
1161
1161
|
viewBox: "0 0 14 14",
|
|
@@ -1189,7 +1189,7 @@ function Qt(e) {
|
|
|
1189
1189
|
]
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function en(e) {
|
|
1193
1193
|
let { title: t } = e ?? {};
|
|
1194
1194
|
return /* @__PURE__ */ G("svg", {
|
|
1195
1195
|
viewBox: "0 0 14 14",
|
|
@@ -1201,7 +1201,7 @@ function $t(e) {
|
|
|
1201
1201
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M6 8l2-2m-2.5-.5L4 7a2.83 2.83 0 0 0 4 4l1.5-1.5m-1-5L10 3a2.83 2.83 0 0 1 4 4l-1.5 1.5" })]
|
|
1202
1202
|
});
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function tn(e) {
|
|
1205
1205
|
let { title: t } = e ?? {};
|
|
1206
1206
|
return /* @__PURE__ */ G("svg", {
|
|
1207
1207
|
viewBox: "0 0 14 14",
|
|
@@ -1214,7 +1214,7 @@ function en(e) {
|
|
|
1214
1214
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M2.5 4h9M5 4V2.5h4V4m-4.5 1v5.5m3-5.5v5.5M3.5 4l.5 8h6l.5-8" })]
|
|
1215
1215
|
});
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function nn(e) {
|
|
1218
1218
|
let { title: t } = e ?? {};
|
|
1219
1219
|
return /* @__PURE__ */ G("svg", {
|
|
1220
1220
|
viewBox: "0 0 14 14",
|
|
@@ -1235,7 +1235,7 @@ function tn(e) {
|
|
|
1235
1235
|
]
|
|
1236
1236
|
});
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function rn(e) {
|
|
1239
1239
|
let { title: t } = e ?? {};
|
|
1240
1240
|
return /* @__PURE__ */ G("svg", {
|
|
1241
1241
|
viewBox: "0 0 14 14",
|
|
@@ -1247,7 +1247,7 @@ function nn(e) {
|
|
|
1247
1247
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })]
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function an(e) {
|
|
1251
1251
|
let { title: t } = e ?? {};
|
|
1252
1252
|
return /* @__PURE__ */ G("svg", {
|
|
1253
1253
|
viewBox: "0 0 14 14",
|
|
@@ -1260,7 +1260,7 @@ function rn(e) {
|
|
|
1260
1260
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M3 7.5l3 3 5-6" })]
|
|
1261
1261
|
});
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function on(e) {
|
|
1264
1264
|
let { title: t } = e ?? {};
|
|
1265
1265
|
return /* @__PURE__ */ G("svg", {
|
|
1266
1266
|
viewBox: "0 0 14 14",
|
|
@@ -1283,7 +1283,7 @@ function an(e) {
|
|
|
1283
1283
|
]
|
|
1284
1284
|
});
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function sn(e) {
|
|
1287
1287
|
let { title: t } = e ?? {};
|
|
1288
1288
|
return /* @__PURE__ */ G("svg", {
|
|
1289
1289
|
viewBox: "0 0 14 14",
|
|
@@ -1296,7 +1296,7 @@ function on(e) {
|
|
|
1296
1296
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M5.5 12a1.5 1.5 0 0 0 3 0M7 1a4 4 0 0 0-4 4c0 3-1.5 4.5-1.5 4.5h11S11 8 11 5a4 4 0 0 0-4-4Z" })]
|
|
1297
1297
|
});
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function cn(e) {
|
|
1300
1300
|
let { title: t } = e ?? {};
|
|
1301
1301
|
return /* @__PURE__ */ G("svg", {
|
|
1302
1302
|
viewBox: "0 0 14 14",
|
|
@@ -1319,7 +1319,7 @@ function sn(e) {
|
|
|
1319
1319
|
]
|
|
1320
1320
|
});
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function ln(e) {
|
|
1323
1323
|
let { title: t } = e ?? {};
|
|
1324
1324
|
return /* @__PURE__ */ G("svg", {
|
|
1325
1325
|
viewBox: "0 0 14 14",
|
|
@@ -1332,7 +1332,7 @@ function cn(e) {
|
|
|
1332
1332
|
children: [/* @__PURE__ */ W(J, { title: t }), /* @__PURE__ */ W("path", { d: "M1.5 3h11M3.5 7h7M5.5 11h3" })]
|
|
1333
1333
|
});
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function un(e) {
|
|
1336
1336
|
let { title: t } = e ?? {};
|
|
1337
1337
|
return /* @__PURE__ */ G("svg", {
|
|
1338
1338
|
viewBox: "0 0 14 14",
|
|
@@ -1354,7 +1354,7 @@ function ln(e) {
|
|
|
1354
1354
|
]
|
|
1355
1355
|
});
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1357
|
+
function dn(e) {
|
|
1358
1358
|
let { title: t } = e ?? {};
|
|
1359
1359
|
return /* @__PURE__ */ G("svg", {
|
|
1360
1360
|
viewBox: "0 0 14 14",
|
|
@@ -1378,40 +1378,40 @@ function un(e) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
//#endregion
|
|
1380
1380
|
//#region src/components/IconRegistry.js
|
|
1381
|
-
var
|
|
1382
|
-
inbox:
|
|
1383
|
-
issues:
|
|
1384
|
-
reviews:
|
|
1385
|
-
pulse:
|
|
1386
|
-
initiatives:
|
|
1387
|
-
projects:
|
|
1388
|
-
more:
|
|
1389
|
-
search:
|
|
1390
|
-
edit:
|
|
1391
|
-
chevronDown:
|
|
1392
|
-
chevronUp:
|
|
1393
|
-
star:
|
|
1394
|
-
statusInProgress:
|
|
1395
|
-
statusDone:
|
|
1396
|
-
statusTodo:
|
|
1397
|
-
statusBacklog:
|
|
1398
|
-
statusCancelled:
|
|
1399
|
-
priorityUrgent:
|
|
1400
|
-
priorityHigh:
|
|
1401
|
-
priorityMedium:
|
|
1402
|
-
priorityLow:
|
|
1403
|
-
link:
|
|
1404
|
-
trash:
|
|
1405
|
-
settings:
|
|
1406
|
-
close:
|
|
1407
|
-
check:
|
|
1408
|
-
copy:
|
|
1409
|
-
bell:
|
|
1410
|
-
calendar:
|
|
1411
|
-
filter:
|
|
1412
|
-
user:
|
|
1413
|
-
label:
|
|
1414
|
-
}),
|
|
1381
|
+
var fn = Object.freeze({
|
|
1382
|
+
inbox: Nt,
|
|
1383
|
+
issues: Pt,
|
|
1384
|
+
reviews: Ft,
|
|
1385
|
+
pulse: It,
|
|
1386
|
+
initiatives: Lt,
|
|
1387
|
+
projects: Rt,
|
|
1388
|
+
more: zt,
|
|
1389
|
+
search: Bt,
|
|
1390
|
+
edit: Vt,
|
|
1391
|
+
chevronDown: Ht,
|
|
1392
|
+
chevronUp: Ut,
|
|
1393
|
+
star: Wt,
|
|
1394
|
+
statusInProgress: Gt,
|
|
1395
|
+
statusDone: Kt,
|
|
1396
|
+
statusTodo: qt,
|
|
1397
|
+
statusBacklog: Jt,
|
|
1398
|
+
statusCancelled: Yt,
|
|
1399
|
+
priorityUrgent: Xt,
|
|
1400
|
+
priorityHigh: Zt,
|
|
1401
|
+
priorityMedium: Qt,
|
|
1402
|
+
priorityLow: $t,
|
|
1403
|
+
link: en,
|
|
1404
|
+
trash: tn,
|
|
1405
|
+
settings: nn,
|
|
1406
|
+
close: rn,
|
|
1407
|
+
check: an,
|
|
1408
|
+
copy: on,
|
|
1409
|
+
bell: sn,
|
|
1410
|
+
calendar: cn,
|
|
1411
|
+
filter: ln,
|
|
1412
|
+
user: un,
|
|
1413
|
+
label: dn
|
|
1414
|
+
}), pn = Object.freeze({
|
|
1415
1415
|
"chevron-down": "chevronDown",
|
|
1416
1416
|
"chevron-up": "chevronUp",
|
|
1417
1417
|
"status-in-progress": "statusInProgress",
|
|
@@ -1424,13 +1424,13 @@ var dn = Object.freeze({
|
|
|
1424
1424
|
"priority-medium": "priorityMedium",
|
|
1425
1425
|
"priority-low": "priorityLow"
|
|
1426
1426
|
});
|
|
1427
|
-
function
|
|
1428
|
-
return e ?
|
|
1427
|
+
function mn(e) {
|
|
1428
|
+
return e ? fn[e] ?? fn[pn[e]] ?? null : null;
|
|
1429
1429
|
}
|
|
1430
1430
|
//#endregion
|
|
1431
1431
|
//#region src/components/FCCIcon.jsx
|
|
1432
|
-
function
|
|
1433
|
-
let c = n ??
|
|
1432
|
+
function hn({ name: e, icon: n, size: r = 16, title: i, color: a, style: o, ...s } = {}) {
|
|
1433
|
+
let c = n ?? mn(e);
|
|
1434
1434
|
return c ? t(c, {
|
|
1435
1435
|
size: r,
|
|
1436
1436
|
title: i,
|
|
@@ -1449,11 +1449,11 @@ function mn({ name: e, icon: n, size: r = 16, title: i, color: a, style: o, ...s
|
|
|
1449
1449
|
}
|
|
1450
1450
|
//#endregion
|
|
1451
1451
|
//#region src/components/layout/FCCHeaderIconButton.jsx
|
|
1452
|
-
function
|
|
1453
|
-
let m = s != null && s !== !1, h = p["aria-label"] || i, g = a ?? i, _ = t ? /* @__PURE__ */ W(
|
|
1452
|
+
function gn({ icon: e, iconName: t, iconSize: n = 20, label: i, title: a, active: o = !1, badge: s, badgeLabel: c, badgeClassName: l = "", className: u = "", children: d, type: f = "button", ...p }) {
|
|
1453
|
+
let m = s != null && s !== !1, h = p["aria-label"] || i, g = a ?? i, _ = t ? /* @__PURE__ */ W(hn, {
|
|
1454
1454
|
name: t,
|
|
1455
1455
|
size: n
|
|
1456
|
-
}) : r(e) ? e : e ? /* @__PURE__ */ W(
|
|
1456
|
+
}) : r(e) ? e : e ? /* @__PURE__ */ W(hn, {
|
|
1457
1457
|
icon: e,
|
|
1458
1458
|
size: n
|
|
1459
1459
|
}) : d;
|
|
@@ -1476,8 +1476,8 @@ function hn({ icon: e, iconName: t, iconSize: n = 20, label: i, title: a, active
|
|
|
1476
1476
|
}
|
|
1477
1477
|
//#endregion
|
|
1478
1478
|
//#region src/components/layout/FCCBrandLogo.jsx
|
|
1479
|
-
function
|
|
1480
|
-
let { theme: a } =
|
|
1479
|
+
function _n({ darkSrc: e, lightSrc: t, alt: n = "FCC", className: r = "", ...i }) {
|
|
1480
|
+
let { theme: a } = $e(), o = a === "dark" ? e || t : t || e;
|
|
1481
1481
|
return o ? /* @__PURE__ */ W("img", {
|
|
1482
1482
|
src: o,
|
|
1483
1483
|
alt: n,
|
|
@@ -1487,8 +1487,8 @@ function gn({ darkSrc: e, lightSrc: t, alt: n = "FCC", className: r = "", ...i }
|
|
|
1487
1487
|
}
|
|
1488
1488
|
//#endregion
|
|
1489
1489
|
//#region src/components/layout/FCCThemeToggle.jsx
|
|
1490
|
-
function
|
|
1491
|
-
let { theme: t, toggleTheme: n } =
|
|
1490
|
+
function vn({ className: e = "" }) {
|
|
1491
|
+
let { theme: t, toggleTheme: n } = $e(), r = t === "dark";
|
|
1492
1492
|
return /* @__PURE__ */ W("button", {
|
|
1493
1493
|
type: "button",
|
|
1494
1494
|
onClick: n,
|
|
@@ -1501,15 +1501,15 @@ function _n({ className: e = "" }) {
|
|
|
1501
1501
|
].filter(Boolean).join(" "),
|
|
1502
1502
|
title: r ? "Switch to light mode" : "Switch to dark mode",
|
|
1503
1503
|
"aria-label": r ? "Switch to light mode" : "Switch to dark mode",
|
|
1504
|
-
children: W(r ?
|
|
1504
|
+
children: W(r ? le : Pe, { size: 16 })
|
|
1505
1505
|
});
|
|
1506
1506
|
}
|
|
1507
1507
|
//#endregion
|
|
1508
1508
|
//#region src/components/ui/AppLoader.jsx
|
|
1509
|
-
function
|
|
1509
|
+
function yn({ label: e = "Loading...", fullscreen: t = !1, className: n = "" }) {
|
|
1510
1510
|
return t ? /* @__PURE__ */ G("div", {
|
|
1511
1511
|
className: `loader-fullscreen ${n}`,
|
|
1512
|
-
children: [/* @__PURE__ */ W(
|
|
1512
|
+
children: [/* @__PURE__ */ W(te, {
|
|
1513
1513
|
size: 32,
|
|
1514
1514
|
className: "loader-spin"
|
|
1515
1515
|
}), e && /* @__PURE__ */ W("span", {
|
|
@@ -1518,7 +1518,7 @@ function vn({ label: e = "Loading...", fullscreen: t = !1, className: n = "" })
|
|
|
1518
1518
|
})]
|
|
1519
1519
|
}) : /* @__PURE__ */ G("div", {
|
|
1520
1520
|
className: `loader ${n}`,
|
|
1521
|
-
children: [/* @__PURE__ */ W(
|
|
1521
|
+
children: [/* @__PURE__ */ W(te, {
|
|
1522
1522
|
size: 20,
|
|
1523
1523
|
className: "loader-spin"
|
|
1524
1524
|
}), e && /* @__PURE__ */ W("span", {
|
|
@@ -1527,13 +1527,13 @@ function vn({ label: e = "Loading...", fullscreen: t = !1, className: n = "" })
|
|
|
1527
1527
|
})]
|
|
1528
1528
|
});
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1531
|
-
return /* @__PURE__ */ W(
|
|
1530
|
+
function bn({ size: e = 16, className: t = "" }) {
|
|
1531
|
+
return /* @__PURE__ */ W(te, {
|
|
1532
1532
|
size: e,
|
|
1533
1533
|
className: `loader-spin ${t}`
|
|
1534
1534
|
});
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function xn({ label: e = "Loading...", fullscreen: t = !1, size: n = 64, darkSrc: r, lightSrc: i, alt: a = "FCC", className: o = "" }) {
|
|
1537
1537
|
let s = /* @__PURE__ */ G("div", {
|
|
1538
1538
|
className: "fcc-loader-stage",
|
|
1539
1539
|
style: { "--fcc-loader-size": `${n}px` },
|
|
@@ -1541,7 +1541,7 @@ function bn({ label: e = "Loading...", fullscreen: t = !1, size: n = 64, darkSrc
|
|
|
1541
1541
|
children: [
|
|
1542
1542
|
/* @__PURE__ */ W("span", { className: "fcc-loader-ring" }),
|
|
1543
1543
|
/* @__PURE__ */ W("span", { className: "fcc-loader-glow" }),
|
|
1544
|
-
/* @__PURE__ */ W(
|
|
1544
|
+
/* @__PURE__ */ W(_n, {
|
|
1545
1545
|
darkSrc: r,
|
|
1546
1546
|
lightSrc: i,
|
|
1547
1547
|
alt: a,
|
|
@@ -1578,7 +1578,7 @@ function bn({ label: e = "Loading...", fullscreen: t = !1, size: n = 64, darkSrc
|
|
|
1578
1578
|
}
|
|
1579
1579
|
//#endregion
|
|
1580
1580
|
//#region src/components/ui/FCCDetailsPanel.jsx
|
|
1581
|
-
function
|
|
1581
|
+
function Sn({ open: e, onClose: t, title: n, header: r, children: a, loading: s = !1, loadingLabel: c = "Loading...", loaderSize: l = 64, loaderDarkSrc: f, loaderLightSrc: p, width: m, zIndex: h = 1100, showBackdrop: g = !0, resizable: _ = !0, minWidth: v = 360, storageKey: y, className: b = "" }) {
|
|
1582
1582
|
let [x, S] = d(!1), [C, w] = d(!1), [T, E] = d(!1), [D, O] = d(() => {
|
|
1583
1583
|
if (!y || typeof window > "u") return null;
|
|
1584
1584
|
let e = window.localStorage.getItem(y), t = e ? parseInt(e, 10) : NaN;
|
|
@@ -1621,7 +1621,7 @@ function xn({ open: e, onClose: t, title: n, header: r, children: a, loading: s
|
|
|
1621
1621
|
y
|
|
1622
1622
|
]), !x || typeof document > "u" || !j) return null;
|
|
1623
1623
|
let P = D == null ? m : `${D}px`;
|
|
1624
|
-
return
|
|
1624
|
+
return He(/* @__PURE__ */ G("div", {
|
|
1625
1625
|
className: `fcc-details-panel-root ${C ? "fcc-details-panel-root--visible" : ""}`,
|
|
1626
1626
|
style: { zIndex: h },
|
|
1627
1627
|
children: [g && /* @__PURE__ */ W("div", {
|
|
@@ -1658,7 +1658,7 @@ function xn({ open: e, onClose: t, title: n, header: r, children: a, loading: s
|
|
|
1658
1658
|
className: "fcc-details-panel-body",
|
|
1659
1659
|
children: s ? /* @__PURE__ */ W("div", {
|
|
1660
1660
|
className: "fcc-details-panel-loading",
|
|
1661
|
-
children: /* @__PURE__ */ W(
|
|
1661
|
+
children: /* @__PURE__ */ W(xn, {
|
|
1662
1662
|
label: c,
|
|
1663
1663
|
size: l,
|
|
1664
1664
|
darkSrc: f,
|
|
@@ -1672,7 +1672,7 @@ function xn({ open: e, onClose: t, title: n, header: r, children: a, loading: s
|
|
|
1672
1672
|
}
|
|
1673
1673
|
//#endregion
|
|
1674
1674
|
//#region src/components/chat/FCCChatSidebar.constants.js
|
|
1675
|
-
var
|
|
1675
|
+
var Cn = [
|
|
1676
1676
|
{
|
|
1677
1677
|
id: "hubs",
|
|
1678
1678
|
label: "Hubs"
|
|
@@ -1685,7 +1685,7 @@ var Sn = [
|
|
|
1685
1685
|
id: "dms",
|
|
1686
1686
|
label: "DMs"
|
|
1687
1687
|
}
|
|
1688
|
-
],
|
|
1688
|
+
], wn = {
|
|
1689
1689
|
mobile: 1024,
|
|
1690
1690
|
smallDesktop: 1440
|
|
1691
1691
|
}, Y = {
|
|
@@ -1694,23 +1694,23 @@ var Sn = [
|
|
|
1694
1694
|
small: 320,
|
|
1695
1695
|
mobile: "100%"
|
|
1696
1696
|
};
|
|
1697
|
-
function
|
|
1697
|
+
function Tn() {
|
|
1698
1698
|
if (typeof window > "u") return "bigDesktop";
|
|
1699
1699
|
let e = window.innerWidth;
|
|
1700
|
-
return e <
|
|
1700
|
+
return e < wn.mobile ? "mobile" : e <= wn.smallDesktop ? "smallDesktop" : "bigDesktop";
|
|
1701
1701
|
}
|
|
1702
1702
|
//#endregion
|
|
1703
1703
|
//#region src/components/chat/useFCCChatSidebarWidths.js
|
|
1704
|
-
function
|
|
1705
|
-
let [e, t] = d(
|
|
1704
|
+
function En() {
|
|
1705
|
+
let [e, t] = d(Tn);
|
|
1706
1706
|
return o(() => {
|
|
1707
1707
|
if (typeof window > "u") return;
|
|
1708
|
-
let e = () => t(
|
|
1708
|
+
let e = () => t(Tn());
|
|
1709
1709
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1710
1710
|
}, []), e;
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1713
|
-
let t =
|
|
1712
|
+
function Dn(e = !1) {
|
|
1713
|
+
let t = En();
|
|
1714
1714
|
if (t === "mobile") return {
|
|
1715
1715
|
viewport: t,
|
|
1716
1716
|
railWidth: 0,
|
|
@@ -1739,32 +1739,32 @@ function En(e = !1) {
|
|
|
1739
1739
|
}
|
|
1740
1740
|
//#endregion
|
|
1741
1741
|
//#region src/components/chat/FCCChatSidebar.jsx
|
|
1742
|
-
var X = (...e) => e.filter(Boolean).join(" "),
|
|
1742
|
+
var X = (...e) => e.filter(Boolean).join(" "), On = {
|
|
1743
1743
|
hubs: {
|
|
1744
1744
|
searchPlaceholder: "Search projects...",
|
|
1745
1745
|
emptyTitle: "No hubs found",
|
|
1746
1746
|
emptyCopy: "No subscribed hubs",
|
|
1747
|
-
icon:
|
|
1747
|
+
icon: ae,
|
|
1748
1748
|
actionLabel: "Write an update",
|
|
1749
|
-
actionIcon:
|
|
1749
|
+
actionIcon: _e
|
|
1750
1750
|
},
|
|
1751
1751
|
tickets: {
|
|
1752
1752
|
searchPlaceholder: "Search tickets...",
|
|
1753
1753
|
emptyTitle: "No tickets",
|
|
1754
1754
|
emptyCopy: "Create a ticket to start a conversation",
|
|
1755
|
-
icon:
|
|
1755
|
+
icon: ae,
|
|
1756
1756
|
actionLabel: "New Ticket",
|
|
1757
|
-
actionIcon:
|
|
1757
|
+
actionIcon: Fe
|
|
1758
1758
|
},
|
|
1759
1759
|
dms: {
|
|
1760
1760
|
searchPlaceholder: "Find a DM",
|
|
1761
1761
|
emptyTitle: "No conversations yet",
|
|
1762
1762
|
emptyCopy: "",
|
|
1763
|
-
icon:
|
|
1763
|
+
icon: Be,
|
|
1764
1764
|
actionLabel: "New message",
|
|
1765
|
-
actionIcon:
|
|
1765
|
+
actionIcon: Ne
|
|
1766
1766
|
}
|
|
1767
|
-
},
|
|
1767
|
+
}, kn = [
|
|
1768
1768
|
{
|
|
1769
1769
|
value: "last_activity",
|
|
1770
1770
|
label: "Last Activity"
|
|
@@ -1777,7 +1777,7 @@ var X = (...e) => e.filter(Boolean).join(" "), Dn = {
|
|
|
1777
1777
|
value: "title",
|
|
1778
1778
|
label: "Title"
|
|
1779
1779
|
}
|
|
1780
|
-
],
|
|
1780
|
+
], An = [
|
|
1781
1781
|
{
|
|
1782
1782
|
value: "",
|
|
1783
1783
|
label: "All"
|
|
@@ -1791,7 +1791,7 @@ var X = (...e) => e.filter(Boolean).join(" "), Dn = {
|
|
|
1791
1791
|
label: "Resolved"
|
|
1792
1792
|
}
|
|
1793
1793
|
];
|
|
1794
|
-
function
|
|
1794
|
+
function jn(e) {
|
|
1795
1795
|
let [t, n] = d(() => !e || typeof document > "u" ? null : document.querySelector(e));
|
|
1796
1796
|
return o(() => {
|
|
1797
1797
|
if (!e || typeof document > "u") return;
|
|
@@ -1801,7 +1801,7 @@ function An(e) {
|
|
|
1801
1801
|
return () => window.cancelAnimationFrame(t);
|
|
1802
1802
|
}, [e]), e ? t : null;
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function Mn(e) {
|
|
1805
1805
|
return [
|
|
1806
1806
|
e?.title,
|
|
1807
1807
|
e?.subtitle,
|
|
@@ -1811,24 +1811,24 @@ function jn(e) {
|
|
|
1811
1811
|
e?.badge
|
|
1812
1812
|
].filter(Boolean).join(" ").toLowerCase();
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function Nn(e = "") {
|
|
1815
1815
|
let t = String(e).trim().split(/\s+/).filter(Boolean);
|
|
1816
1816
|
return t.length === 0 ? "FC" : t.slice(0, 2).map((e) => e[0]).join("").toUpperCase();
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1818
|
+
function Pn(e, t) {
|
|
1819
1819
|
return e?.searchByTab?.[t] ?? e?.search ?? "";
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1821
|
+
function Fn(e, t) {
|
|
1822
1822
|
return e?.modeByTab?.[t] ?? e?.mode ?? "subscribed";
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1824
|
+
function In(e, t, n) {
|
|
1825
1825
|
n?.({
|
|
1826
1826
|
...e || {},
|
|
1827
1827
|
...t
|
|
1828
1828
|
});
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1831
|
-
|
|
1830
|
+
function Ln(e, t, n, r) {
|
|
1831
|
+
In(e, {
|
|
1832
1832
|
search: n,
|
|
1833
1833
|
searchByTab: {
|
|
1834
1834
|
...e?.searchByTab || {},
|
|
@@ -1836,8 +1836,8 @@ function In(e, t, n, r) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
}, r);
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1840
|
-
|
|
1839
|
+
function Rn(e, t, n, r) {
|
|
1840
|
+
In(e, {
|
|
1841
1841
|
mode: n,
|
|
1842
1842
|
modeByTab: {
|
|
1843
1843
|
...e?.modeByTab || {},
|
|
@@ -1845,33 +1845,33 @@ function Ln(e, t, n, r) {
|
|
|
1845
1845
|
}
|
|
1846
1846
|
}, r);
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function zn(e) {
|
|
1849
1849
|
let t = e?.ticketSortBy ?? e?.sortBy ?? "last_activity";
|
|
1850
|
-
return
|
|
1850
|
+
return kn.find((e) => e.value === t)?.label || "Last Activity";
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function Bn(e) {
|
|
1853
1853
|
let t = e?.ticketStatus ?? e?.status ?? "";
|
|
1854
|
-
return
|
|
1854
|
+
return An.find((e) => e.value === t)?.label || "All";
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function Vn(e, t, n, r) {
|
|
1857
1857
|
let i = e?.[t] ?? n[0]?.value, a = n[(Math.max(0, n.findIndex((e) => e.value === i)) + 1) % n.length];
|
|
1858
|
-
|
|
1858
|
+
In(e, { [t]: a?.value ?? n[0]?.value }, r);
|
|
1859
1859
|
}
|
|
1860
1860
|
function Z(e) {
|
|
1861
1861
|
return e == null ? "" : String(typeof e == "string" || typeof e == "number" ? e : e.value ?? e.id ?? "");
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function Hn(e) {
|
|
1864
1864
|
return e == null ? "" : typeof e == "string" || typeof e == "number" ? String(e) : e.label ?? e.name ?? e.title ?? e.email ?? e.value ?? e.id ?? "";
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1867
|
-
let t =
|
|
1866
|
+
function Un(e) {
|
|
1867
|
+
let t = Hn(e);
|
|
1868
1868
|
return typeof t == "string" || typeof t == "number" ? String(t) : Z(e);
|
|
1869
1869
|
}
|
|
1870
|
-
function
|
|
1870
|
+
function Wn(e = [], t, n = "") {
|
|
1871
1871
|
let r = e.find((e) => Z(e) === t);
|
|
1872
|
-
return r ?
|
|
1872
|
+
return r ? Hn(r) : n;
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1874
|
+
function Gn({ item: e, size: t = "md" }) {
|
|
1875
1875
|
let n = e?.avatar, r = e?.avatarUrl, i = e?.title || e?.name || "Chat", a = e?.presenceStatus;
|
|
1876
1876
|
return n ? /* @__PURE__ */ G("span", {
|
|
1877
1877
|
className: X("fcc-chat-avatar-wrap", `fcc-chat-avatar-wrap-${t}`, a && "has-presence"),
|
|
@@ -1893,17 +1893,17 @@ function Wn({ item: e, size: t = "md" }) {
|
|
|
1893
1893
|
children: [/* @__PURE__ */ W("span", {
|
|
1894
1894
|
className: X("fcc-chat-avatar", `fcc-chat-avatar-${t}`),
|
|
1895
1895
|
style: e?.avatarStyle,
|
|
1896
|
-
children: e?.avatarText ||
|
|
1896
|
+
children: e?.avatarText || Nn(i)
|
|
1897
1897
|
}), a && /* @__PURE__ */ W("span", { className: X("fcc-chat-presence-dot", a) })]
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1900
|
+
function Kn({ item: e }) {
|
|
1901
1901
|
let t = e?.avatarGroup;
|
|
1902
|
-
if (!Array.isArray(t) || t.length <= 1) return /* @__PURE__ */ W(
|
|
1902
|
+
if (!Array.isArray(t) || t.length <= 1) return /* @__PURE__ */ W(Gn, { item: t?.[0] || e });
|
|
1903
1903
|
let n = t.slice(0, 3), r = t.length - n.length;
|
|
1904
1904
|
return /* @__PURE__ */ G("span", {
|
|
1905
1905
|
className: "fcc-chat-dm-avatar-group",
|
|
1906
|
-
children: [n.map((t, n) => /* @__PURE__ */ W(
|
|
1906
|
+
children: [n.map((t, n) => /* @__PURE__ */ W(Gn, {
|
|
1907
1907
|
item: {
|
|
1908
1908
|
...t,
|
|
1909
1909
|
title: t.name || e.title
|
|
@@ -1915,7 +1915,7 @@ function Gn({ item: e }) {
|
|
|
1915
1915
|
})]
|
|
1916
1916
|
});
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function qn({ title: e, scopedTitle: t, onClose: n, headerActions: r, closeTitle: i = "Close chat" }) {
|
|
1919
1919
|
return /* @__PURE__ */ G("header", {
|
|
1920
1920
|
className: "fcc-chat-header",
|
|
1921
1921
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -1940,11 +1940,11 @@ function Kn({ title: e, scopedTitle: t, onClose: n, headerActions: r, closeTitle
|
|
|
1940
1940
|
})]
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Jn({ activeTab: e, onTabChange: t }) {
|
|
1944
1944
|
return /* @__PURE__ */ W("nav", {
|
|
1945
1945
|
className: "fcc-chat-tabs",
|
|
1946
1946
|
"aria-label": "Chat sections",
|
|
1947
|
-
children:
|
|
1947
|
+
children: Cn.map((n) => /* @__PURE__ */ W("button", {
|
|
1948
1948
|
type: "button",
|
|
1949
1949
|
className: X("fcc-chat-tab", e === n.id && "active"),
|
|
1950
1950
|
onClick: () => t?.(n.id),
|
|
@@ -1953,27 +1953,27 @@ function qn({ activeTab: e, onTabChange: t }) {
|
|
|
1953
1953
|
}, n.id))
|
|
1954
1954
|
});
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function Yn({ activeTab: e, mode: t, filters: n, onFiltersChange: r }) {
|
|
1957
1957
|
return /* @__PURE__ */ G("div", {
|
|
1958
1958
|
className: "fcc-chat-filter-pills",
|
|
1959
1959
|
"aria-label": `${e} scope`,
|
|
1960
1960
|
children: [/* @__PURE__ */ W("button", {
|
|
1961
1961
|
type: "button",
|
|
1962
1962
|
className: X("fcc-chat-filter-pill", t === "subscribed" && "active"),
|
|
1963
|
-
onClick: () =>
|
|
1963
|
+
onClick: () => Rn(n, e, "subscribed", r),
|
|
1964
1964
|
children: "Subscribed"
|
|
1965
1965
|
}), /* @__PURE__ */ W("button", {
|
|
1966
1966
|
type: "button",
|
|
1967
1967
|
className: X("fcc-chat-filter-pill", t === "all" && "active"),
|
|
1968
|
-
onClick: () =>
|
|
1968
|
+
onClick: () => Rn(n, e, "all", r),
|
|
1969
1969
|
children: "All"
|
|
1970
1970
|
})]
|
|
1971
1971
|
});
|
|
1972
1972
|
}
|
|
1973
|
-
function
|
|
1973
|
+
function Xn({ value: e, onChange: t, placeholder: n }) {
|
|
1974
1974
|
return /* @__PURE__ */ G("div", {
|
|
1975
1975
|
className: "fcc-chat-search",
|
|
1976
|
-
children: [/* @__PURE__ */ W(
|
|
1976
|
+
children: [/* @__PURE__ */ W(Ae, { size: 14 }), /* @__PURE__ */ W("input", {
|
|
1977
1977
|
value: e,
|
|
1978
1978
|
onChange: (e) => t(e.target.value),
|
|
1979
1979
|
placeholder: n,
|
|
@@ -1981,17 +1981,17 @@ function Yn({ value: e, onChange: t, placeholder: n }) {
|
|
|
1981
1981
|
})]
|
|
1982
1982
|
});
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1985
|
-
let [i, a] = d(!1), o =
|
|
1984
|
+
function Zn({ activeTab: e, filters: t, onFiltersChange: n, toolbarActions: r }) {
|
|
1985
|
+
let [i, a] = d(!1), o = On[e] || On.hubs, s = Pn(t, e), c = Fn(t, e), l = (r) => Ln(t, e, r, n);
|
|
1986
1986
|
return e === "hubs" ? /* @__PURE__ */ G("div", {
|
|
1987
1987
|
className: "fcc-chat-toolbar fcc-chat-toolbar-hubs",
|
|
1988
1988
|
children: [
|
|
1989
|
-
/* @__PURE__ */ W(
|
|
1989
|
+
/* @__PURE__ */ W(Xn, {
|
|
1990
1990
|
value: s,
|
|
1991
1991
|
onChange: l,
|
|
1992
1992
|
placeholder: o.searchPlaceholder
|
|
1993
1993
|
}),
|
|
1994
|
-
/* @__PURE__ */ W(
|
|
1994
|
+
/* @__PURE__ */ W(Yn, {
|
|
1995
1995
|
activeTab: e,
|
|
1996
1996
|
mode: c,
|
|
1997
1997
|
filters: t,
|
|
@@ -2004,7 +2004,7 @@ function Xn({ activeTab: e, filters: t, onFiltersChange: n, toolbarActions: r })
|
|
|
2004
2004
|
]
|
|
2005
2005
|
}) : e === "dms" ? /* @__PURE__ */ G("div", {
|
|
2006
2006
|
className: "fcc-chat-toolbar fcc-chat-toolbar-dms",
|
|
2007
|
-
children: [/* @__PURE__ */ W(
|
|
2007
|
+
children: [/* @__PURE__ */ W(Xn, {
|
|
2008
2008
|
value: s,
|
|
2009
2009
|
onChange: l,
|
|
2010
2010
|
placeholder: o.searchPlaceholder
|
|
@@ -2016,7 +2016,7 @@ function Xn({ activeTab: e, filters: t, onFiltersChange: n, toolbarActions: r })
|
|
|
2016
2016
|
className: "fcc-chat-toolbar fcc-chat-toolbar-tickets",
|
|
2017
2017
|
children: [/* @__PURE__ */ G("div", {
|
|
2018
2018
|
className: "fcc-chat-ticket-toolbar-row",
|
|
2019
|
-
children: [/* @__PURE__ */ W(
|
|
2019
|
+
children: [/* @__PURE__ */ W(Yn, {
|
|
2020
2020
|
activeTab: e,
|
|
2021
2021
|
mode: c,
|
|
2022
2022
|
filters: t,
|
|
@@ -2030,13 +2030,13 @@ function Xn({ activeTab: e, filters: t, onFiltersChange: n, toolbarActions: r })
|
|
|
2030
2030
|
"aria-label": "Toggle filters",
|
|
2031
2031
|
"aria-expanded": i,
|
|
2032
2032
|
onClick: () => a((e) => !e),
|
|
2033
|
-
children: /* @__PURE__ */ W(
|
|
2033
|
+
children: /* @__PURE__ */ W(je, { size: 14 })
|
|
2034
2034
|
})]
|
|
2035
2035
|
})]
|
|
2036
2036
|
}), /* @__PURE__ */ G("div", {
|
|
2037
2037
|
className: X("fcc-chat-ticket-filters", i && "open"),
|
|
2038
2038
|
"aria-hidden": !i,
|
|
2039
|
-
children: [/* @__PURE__ */ W(
|
|
2039
|
+
children: [/* @__PURE__ */ W(Xn, {
|
|
2040
2040
|
value: s,
|
|
2041
2041
|
onChange: l,
|
|
2042
2042
|
placeholder: o.searchPlaceholder
|
|
@@ -2045,23 +2045,23 @@ function Xn({ activeTab: e, filters: t, onFiltersChange: n, toolbarActions: r })
|
|
|
2045
2045
|
children: [/* @__PURE__ */ G("button", {
|
|
2046
2046
|
type: "button",
|
|
2047
2047
|
className: "fcc-chat-ticket-select-button",
|
|
2048
|
-
onClick: () =>
|
|
2049
|
-
children: [/* @__PURE__ */ G("span", { children: ["Sort: ",
|
|
2048
|
+
onClick: () => Vn(t, "ticketSortBy", kn, n),
|
|
2049
|
+
children: [/* @__PURE__ */ G("span", { children: ["Sort: ", zn(t)] }), /* @__PURE__ */ W(S, { size: 14 })]
|
|
2050
2050
|
}), /* @__PURE__ */ G("button", {
|
|
2051
2051
|
type: "button",
|
|
2052
2052
|
className: "fcc-chat-ticket-select-button",
|
|
2053
|
-
onClick: () =>
|
|
2054
|
-
children: [/* @__PURE__ */ G("span", { children: ["Status: ",
|
|
2053
|
+
onClick: () => Vn(t, "ticketStatus", An, n),
|
|
2054
|
+
children: [/* @__PURE__ */ G("span", { children: ["Status: ", Bn(t)] }), /* @__PURE__ */ W(S, { size: 14 })]
|
|
2055
2055
|
})]
|
|
2056
2056
|
})]
|
|
2057
2057
|
})]
|
|
2058
2058
|
});
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2060
|
+
function Qn(e, t) {
|
|
2061
2061
|
return e.countLabel ? e.countLabel : t === "tickets" && e.replyCount != null ? `${e.replyCount} ${e.replyCount === 1 ? "reply" : "replies"}` : e.messageCount == null ? null : `${e.messageCount} ${e.messageCount === 1 ? "message" : "messages"}`;
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2064
|
-
let r = e.title || e.name || "Untitled", i = e.subtitle || e.description || "Project type not set", a =
|
|
2063
|
+
function $n({ item: e, selected: t, onSelect: n }) {
|
|
2064
|
+
let r = e.title || e.name || "Untitled", i = e.subtitle || e.description || "Project type not set", a = Qn(e, "hubs"), o = !!e.unread;
|
|
2065
2065
|
return /* @__PURE__ */ G("button", {
|
|
2066
2066
|
type: "button",
|
|
2067
2067
|
className: X("fcc-chat-list-row", "fcc-chat-hub-row", t && "selected", o && "unread"),
|
|
@@ -2093,14 +2093,14 @@ function Qn({ item: e, selected: t, onSelect: n }) {
|
|
|
2093
2093
|
children: i
|
|
2094
2094
|
}), a && /* @__PURE__ */ G("span", {
|
|
2095
2095
|
className: "fcc-chat-row-count",
|
|
2096
|
-
children: [/* @__PURE__ */ W(
|
|
2096
|
+
children: [/* @__PURE__ */ W(ae, { size: 12 }), a]
|
|
2097
2097
|
})]
|
|
2098
2098
|
})]
|
|
2099
2099
|
})]
|
|
2100
2100
|
});
|
|
2101
2101
|
}
|
|
2102
|
-
function
|
|
2103
|
-
let r = e.title || e.name || "Untitled Ticket", i = e.subtitle || e.description, a =
|
|
2102
|
+
function er({ item: e, selected: t, onSelect: n }) {
|
|
2103
|
+
let r = e.title || e.name || "Untitled Ticket", i = e.subtitle || e.description, a = Qn(e, "tickets"), o = !!e.unread;
|
|
2104
2104
|
return /* @__PURE__ */ G("button", {
|
|
2105
2105
|
type: "button",
|
|
2106
2106
|
className: X("fcc-chat-list-row", "fcc-chat-ticket-row", t && "selected", o && "unread"),
|
|
@@ -2131,13 +2131,13 @@ function $n({ item: e, selected: t, onSelect: n }) {
|
|
|
2131
2131
|
children: i
|
|
2132
2132
|
}), a && /* @__PURE__ */ G("span", {
|
|
2133
2133
|
className: "fcc-chat-row-count",
|
|
2134
|
-
children: [/* @__PURE__ */ W(
|
|
2134
|
+
children: [/* @__PURE__ */ W(ae, { size: 12 }), a]
|
|
2135
2135
|
})]
|
|
2136
2136
|
})]
|
|
2137
2137
|
})]
|
|
2138
2138
|
});
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2140
|
+
function tr({ item: e, selected: t, onSelect: n }) {
|
|
2141
2141
|
let r = e.title || e.name || "Direct Message", i = !!e.unread;
|
|
2142
2142
|
return /* @__PURE__ */ G("button", {
|
|
2143
2143
|
type: "button",
|
|
@@ -2153,7 +2153,7 @@ function er({ item: e, selected: t, onSelect: n }) {
|
|
|
2153
2153
|
className: "fcc-chat-row-dot",
|
|
2154
2154
|
style: { backgroundColor: e.dotColor || "var(--accent-primary)" }
|
|
2155
2155
|
}),
|
|
2156
|
-
/* @__PURE__ */ W(
|
|
2156
|
+
/* @__PURE__ */ W(Kn, { item: e }),
|
|
2157
2157
|
/* @__PURE__ */ W("span", {
|
|
2158
2158
|
className: "fcc-chat-row-body",
|
|
2159
2159
|
children: /* @__PURE__ */ G("span", {
|
|
@@ -2170,15 +2170,15 @@ function er({ item: e, selected: t, onSelect: n }) {
|
|
|
2170
2170
|
]
|
|
2171
2171
|
});
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2174
|
-
return W(e === "hubs" ?
|
|
2173
|
+
function nr({ tab: e, item: t, selected: n, onSelect: r }) {
|
|
2174
|
+
return W(e === "hubs" ? $n : e === "tickets" ? er : tr, {
|
|
2175
2175
|
item: t,
|
|
2176
2176
|
selected: n,
|
|
2177
2177
|
onSelect: r
|
|
2178
2178
|
});
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2181
|
-
let l = e === "hubs" ? t : e === "tickets" ? n : r, u =
|
|
2180
|
+
function rr({ activeTab: e, hubs: t, tickets: n, dms: r, selectedId: i, onSelectItem: a, loading: o, error: s, filters: c }) {
|
|
2181
|
+
let l = e === "hubs" ? t : e === "tickets" ? n : r, u = Pn(c, e).trim().toLowerCase(), d = Fn(c, e), f = On[e] || On.hubs, p = f.icon, m = l.filter((t) => !(u && !Mn(t).includes(u) || e !== "dms" && d === "subscribed" && t.subscribed === !1));
|
|
2182
2182
|
if (o?.[e]) return /* @__PURE__ */ G("div", {
|
|
2183
2183
|
className: "fcc-chat-list-state",
|
|
2184
2184
|
children: [/* @__PURE__ */ W("span", { className: "fcc-chat-loader" }), /* @__PURE__ */ G("span", { children: [
|
|
@@ -2219,7 +2219,7 @@ function nr({ activeTab: e, hubs: t, tickets: n, dms: r, selectedId: i, onSelect
|
|
|
2219
2219
|
n.length,
|
|
2220
2220
|
")"
|
|
2221
2221
|
]
|
|
2222
|
-
}), n.map((t) => /* @__PURE__ */ W(
|
|
2222
|
+
}), n.map((t) => /* @__PURE__ */ W(nr, {
|
|
2223
2223
|
tab: e,
|
|
2224
2224
|
item: t,
|
|
2225
2225
|
selected: i === t.id,
|
|
@@ -2230,7 +2230,7 @@ function nr({ activeTab: e, hubs: t, tickets: n, dms: r, selectedId: i, onSelect
|
|
|
2230
2230
|
}
|
|
2231
2231
|
return /* @__PURE__ */ W("div", {
|
|
2232
2232
|
className: "fcc-chat-list",
|
|
2233
|
-
children: m.map((t) => /* @__PURE__ */ W(
|
|
2233
|
+
children: m.map((t) => /* @__PURE__ */ W(nr, {
|
|
2234
2234
|
tab: e,
|
|
2235
2235
|
item: t,
|
|
2236
2236
|
selected: i === t.id,
|
|
@@ -2238,7 +2238,7 @@ function nr({ activeTab: e, hubs: t, tickets: n, dms: r, selectedId: i, onSelect
|
|
|
2238
2238
|
}, t.id))
|
|
2239
2239
|
});
|
|
2240
2240
|
}
|
|
2241
|
-
function
|
|
2241
|
+
function ir({ attachments: e = [], renderAttachment: t, layout: n = "default", compact: r = !1 }) {
|
|
2242
2242
|
if (!e.length) return null;
|
|
2243
2243
|
let i = n === "hub", a = n === "ticket", o = i || a, s = e.map((e, n) => t ? /* @__PURE__ */ W("span", { children: t(e) }, e.id || n) : o && e.thumbnailUrl ? /* @__PURE__ */ G("a", {
|
|
2244
2244
|
className: X("fcc-chat-grid-attachment", i && "hub", a && "ticket"),
|
|
@@ -2250,13 +2250,13 @@ function rr({ attachments: e = [], renderAttachment: t, layout: n = "default", c
|
|
|
2250
2250
|
alt: e.alt || e.name || "Attachment"
|
|
2251
2251
|
}), /* @__PURE__ */ W("span", {
|
|
2252
2252
|
className: "fcc-chat-hub-attachment-overlay",
|
|
2253
|
-
children: /* @__PURE__ */ W(
|
|
2253
|
+
children: /* @__PURE__ */ W(ee, { size: 20 })
|
|
2254
2254
|
})]
|
|
2255
2255
|
}, e.id || n) : o ? /* @__PURE__ */ G("a", {
|
|
2256
2256
|
className: X("fcc-chat-grid-file-attachment", i && "hub", a && "ticket"),
|
|
2257
2257
|
href: e.url || "#",
|
|
2258
2258
|
onClick: e.url ? void 0 : (e) => e.preventDefault(),
|
|
2259
|
-
children: [/* @__PURE__ */ W(
|
|
2259
|
+
children: [/* @__PURE__ */ W(me, { size: 15 }), /* @__PURE__ */ W("span", { children: e.name || "Attachment" })]
|
|
2260
2260
|
}, e.id || n) : /* @__PURE__ */ G("a", {
|
|
2261
2261
|
className: X("fcc-chat-attachment", e.thumbnailUrl && "has-thumb"),
|
|
2262
2262
|
href: e.url || "#",
|
|
@@ -2264,7 +2264,7 @@ function rr({ attachments: e = [], renderAttachment: t, layout: n = "default", c
|
|
|
2264
2264
|
children: [e.thumbnailUrl ? /* @__PURE__ */ W("img", {
|
|
2265
2265
|
src: e.thumbnailUrl,
|
|
2266
2266
|
alt: e.alt || e.name || "Attachment"
|
|
2267
|
-
}) : /* @__PURE__ */ W(
|
|
2267
|
+
}) : /* @__PURE__ */ W(me, { size: 14 }), /* @__PURE__ */ W("span", { children: e.name || "Attachment" })]
|
|
2268
2268
|
}, e.id || n));
|
|
2269
2269
|
return /* @__PURE__ */ W("div", {
|
|
2270
2270
|
className: X("fcc-chat-attachments", r && "compact", i && "fcc-chat-hub-attachments", a && "fcc-chat-ticket-attachments"),
|
|
@@ -2274,15 +2274,51 @@ function rr({ attachments: e = [], renderAttachment: t, layout: n = "default", c
|
|
|
2274
2274
|
})
|
|
2275
2275
|
});
|
|
2276
2276
|
}
|
|
2277
|
-
function
|
|
2277
|
+
function ar({ attachments: e = [], renderAttachment: t, layout: n = "default", compact: r = !1 }) {
|
|
2278
|
+
return /* @__PURE__ */ W(ir, {
|
|
2279
|
+
attachments: e,
|
|
2280
|
+
renderAttachment: t,
|
|
2281
|
+
layout: n,
|
|
2282
|
+
compact: r
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
function or({ attachments: e = [], onRemove: t }) {
|
|
2286
|
+
let [n, r] = d(/* @__PURE__ */ new Map());
|
|
2287
|
+
return o(() => {
|
|
2288
|
+
let t = /* @__PURE__ */ new Map();
|
|
2289
|
+
return e.forEach((e, n) => {
|
|
2290
|
+
e?.type?.startsWith?.("image/") && t.set(n, URL.createObjectURL(e));
|
|
2291
|
+
}), r(t), () => {
|
|
2292
|
+
t.forEach((e) => URL.revokeObjectURL(e));
|
|
2293
|
+
};
|
|
2294
|
+
}, [e]), e.length ? /* @__PURE__ */ W("div", {
|
|
2295
|
+
className: "fcc-chat-attachment-preview-list",
|
|
2296
|
+
children: e.map((e, r) => {
|
|
2297
|
+
let i = n.get(r), a = e?.type?.startsWith?.("image/"), o = e?.type === "application/pdf" ? P : N;
|
|
2298
|
+
return /* @__PURE__ */ G("div", {
|
|
2299
|
+
className: X("fcc-chat-attachment-preview", a && i && "image"),
|
|
2300
|
+
children: [a && i ? /* @__PURE__ */ W("img", {
|
|
2301
|
+
src: i,
|
|
2302
|
+
alt: e?.name || "Attachment"
|
|
2303
|
+
}) : /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(o, { size: 16 }), /* @__PURE__ */ W("span", { children: e?.name || "Attachment" })] }), t && /* @__PURE__ */ W("button", {
|
|
2304
|
+
type: "button",
|
|
2305
|
+
onClick: () => t(r),
|
|
2306
|
+
"aria-label": "Remove attachment",
|
|
2307
|
+
children: /* @__PURE__ */ W(H, { size: 12 })
|
|
2308
|
+
})]
|
|
2309
|
+
}, `${e?.name || "attachment"}-${r}`);
|
|
2310
|
+
})
|
|
2311
|
+
}) : null;
|
|
2312
|
+
}
|
|
2313
|
+
function sr(e) {
|
|
2278
2314
|
let t = e?.body ?? e?.text ?? "";
|
|
2279
2315
|
return typeof t == "string" ? t : typeof t == "number" ? String(t) : "";
|
|
2280
2316
|
}
|
|
2281
|
-
function
|
|
2282
|
-
let t =
|
|
2317
|
+
function cr(e) {
|
|
2318
|
+
let t = sr(e);
|
|
2283
2319
|
!t || typeof navigator > "u" || !navigator.clipboard || navigator.clipboard.writeText(t).catch(() => {});
|
|
2284
2320
|
}
|
|
2285
|
-
function
|
|
2321
|
+
function lr({ message: e, isOwn: t, onMessageReaction: n, onMessageReply: r, onMessageQuoteReply: i, onMessageMoreActions: a, onMessageCopy: o }) {
|
|
2286
2322
|
let s = (t, n, r) => {
|
|
2287
2323
|
if (t.preventDefault(), t.stopPropagation(), n) {
|
|
2288
2324
|
n(e);
|
|
@@ -2300,7 +2336,7 @@ function or({ message: e, isOwn: t, onMessageReaction: n, onMessageReply: r, onM
|
|
|
2300
2336
|
title: "Add reaction",
|
|
2301
2337
|
"aria-label": "Add reaction",
|
|
2302
2338
|
onClick: (e) => s(e, n),
|
|
2303
|
-
children: /* @__PURE__ */ W(
|
|
2339
|
+
children: /* @__PURE__ */ W(Me, { size: 13 })
|
|
2304
2340
|
}),
|
|
2305
2341
|
t ? /* @__PURE__ */ W("button", {
|
|
2306
2342
|
type: "button",
|
|
@@ -2308,13 +2344,13 @@ function or({ message: e, isOwn: t, onMessageReaction: n, onMessageReply: r, onM
|
|
|
2308
2344
|
title: "More actions",
|
|
2309
2345
|
"aria-label": "More actions",
|
|
2310
2346
|
onClick: (e) => s(e, a),
|
|
2311
|
-
children: /* @__PURE__ */ W(
|
|
2347
|
+
children: /* @__PURE__ */ W(ue, { size: 13 })
|
|
2312
2348
|
}) : /* @__PURE__ */ W("button", {
|
|
2313
2349
|
type: "button",
|
|
2314
2350
|
className: "fcc-chat-message-action-button",
|
|
2315
2351
|
title: "Copy",
|
|
2316
2352
|
"aria-label": "Copy",
|
|
2317
|
-
onClick: (t) => s(t, o, () =>
|
|
2353
|
+
onClick: (t) => s(t, o, () => cr(e)),
|
|
2318
2354
|
children: /* @__PURE__ */ W(A, { size: 13 })
|
|
2319
2355
|
}),
|
|
2320
2356
|
e.hideReplyAction !== !0 && /* @__PURE__ */ W("button", {
|
|
@@ -2323,7 +2359,7 @@ function or({ message: e, isOwn: t, onMessageReaction: n, onMessageReply: r, onM
|
|
|
2323
2359
|
title: "Reply",
|
|
2324
2360
|
"aria-label": "Reply",
|
|
2325
2361
|
onClick: (e) => s(e, r),
|
|
2326
|
-
children: /* @__PURE__ */ W(
|
|
2362
|
+
children: /* @__PURE__ */ W(ke, { size: 13 })
|
|
2327
2363
|
}),
|
|
2328
2364
|
e.hideQuoteReplyAction !== !0 && /* @__PURE__ */ W("button", {
|
|
2329
2365
|
type: "button",
|
|
@@ -2331,12 +2367,12 @@ function or({ message: e, isOwn: t, onMessageReaction: n, onMessageReply: r, onM
|
|
|
2331
2367
|
title: "Quote reply",
|
|
2332
2368
|
"aria-label": "Quote reply",
|
|
2333
2369
|
onClick: (e) => s(e, i),
|
|
2334
|
-
children: /* @__PURE__ */ W(
|
|
2370
|
+
children: /* @__PURE__ */ W(Oe, { size: 13 })
|
|
2335
2371
|
})
|
|
2336
2372
|
]
|
|
2337
2373
|
});
|
|
2338
2374
|
}
|
|
2339
|
-
function
|
|
2375
|
+
function ur({ messages: e = [], renderMessageAttachment: t, renderInlineReply: n, emptyLabel: r = "No messages yet.", attachmentLayout: i = "default", onMessageReaction: a, onMessageReply: o, onMessageQuoteReply: s, onMessageMoreActions: c, onMessageCopy: l }) {
|
|
2340
2376
|
return e.length ? /* @__PURE__ */ W("div", {
|
|
2341
2377
|
className: "fcc-chat-message-list",
|
|
2342
2378
|
children: e.map((e, r) => {
|
|
@@ -2344,7 +2380,7 @@ function sr({ messages: e = [], renderMessageAttachment: t, renderInlineReply: n
|
|
|
2344
2380
|
className: "fcc-chat-date-divider",
|
|
2345
2381
|
children: /* @__PURE__ */ W("span", { children: e.label })
|
|
2346
2382
|
}, e.id || `divider-${r}`);
|
|
2347
|
-
let u = e.from === "you" || e.isOwn, d = e.reactions?.length > 0, f = e.attachments?.length > 0, p = !!(e.body || e.text), m = /* @__PURE__ */ W(
|
|
2383
|
+
let u = e.from === "you" || e.isOwn, d = e.reactions?.length > 0, f = e.attachments?.length > 0, p = !!(e.body || e.text), m = /* @__PURE__ */ W(lr, {
|
|
2348
2384
|
message: e,
|
|
2349
2385
|
isOwn: u,
|
|
2350
2386
|
onMessageReaction: e.onReaction || a,
|
|
@@ -2356,7 +2392,7 @@ function sr({ messages: e = [], renderMessageAttachment: t, renderInlineReply: n
|
|
|
2356
2392
|
return /* @__PURE__ */ G("article", {
|
|
2357
2393
|
className: X("fcc-chat-message", u && "own", d && "has-reactions"),
|
|
2358
2394
|
children: [
|
|
2359
|
-
!u && /* @__PURE__ */ W(
|
|
2395
|
+
!u && /* @__PURE__ */ W(Gn, {
|
|
2360
2396
|
item: e.author || e,
|
|
2361
2397
|
size: "sm"
|
|
2362
2398
|
}),
|
|
@@ -2387,7 +2423,7 @@ function sr({ messages: e = [], renderMessageAttachment: t, renderInlineReply: n
|
|
|
2387
2423
|
className: "fcc-chat-message-bubble",
|
|
2388
2424
|
children: e.body || e.text
|
|
2389
2425
|
}),
|
|
2390
|
-
f && /* @__PURE__ */ W(
|
|
2426
|
+
f && /* @__PURE__ */ W(ir, {
|
|
2391
2427
|
attachments: e.attachments,
|
|
2392
2428
|
renderAttachment: t,
|
|
2393
2429
|
layout: e.attachmentLayout || i,
|
|
@@ -2417,7 +2453,7 @@ function sr({ messages: e = [], renderMessageAttachment: t, renderInlineReply: n
|
|
|
2417
2453
|
n?.(e)
|
|
2418
2454
|
]
|
|
2419
2455
|
}),
|
|
2420
|
-
u && /* @__PURE__ */ W(
|
|
2456
|
+
u && /* @__PURE__ */ W(Gn, {
|
|
2421
2457
|
item: e.author || e,
|
|
2422
2458
|
size: "sm"
|
|
2423
2459
|
})
|
|
@@ -2429,7 +2465,7 @@ function sr({ messages: e = [], renderMessageAttachment: t, renderInlineReply: n
|
|
|
2429
2465
|
children: r
|
|
2430
2466
|
});
|
|
2431
2467
|
}
|
|
2432
|
-
function
|
|
2468
|
+
function dr({ placeholder: e = "Type your message... Use @ to mention users or departments", value: t, onChange: n, onSubmit: r, disabled: i = !1, leadingAction: a, sendLabel: o = "Send message", children: s }) {
|
|
2433
2469
|
let [c, l] = d(""), u = t != null, f = u ? t : c;
|
|
2434
2470
|
return s ? /* @__PURE__ */ W("div", {
|
|
2435
2471
|
className: "fcc-chat-composer-frame",
|
|
@@ -2446,7 +2482,7 @@ function cr({ placeholder: e = "Type your message... Use @ to mention users or d
|
|
|
2446
2482
|
rows: 3
|
|
2447
2483
|
}), /* @__PURE__ */ G("div", {
|
|
2448
2484
|
className: "fcc-chat-composer-actions",
|
|
2449
|
-
children: [/* @__PURE__ */ W("span", { children: a || /* @__PURE__ */ W(
|
|
2485
|
+
children: [/* @__PURE__ */ W("span", { children: a || /* @__PURE__ */ W(me, { size: 18 }) }), /* @__PURE__ */ W("button", {
|
|
2450
2486
|
type: "button",
|
|
2451
2487
|
className: "fcc-chat-send-button",
|
|
2452
2488
|
onClick: () => {
|
|
@@ -2460,15 +2496,15 @@ function cr({ placeholder: e = "Type your message... Use @ to mention users or d
|
|
|
2460
2496
|
})]
|
|
2461
2497
|
});
|
|
2462
2498
|
}
|
|
2463
|
-
function
|
|
2499
|
+
function fr({ placeholder: e = "Type your message... Use @ to mention users or departments", value: t, onChange: n, onSubmit: r, disabled: i = !1, attachments: a = [], onAttach: o, onRemoveAttachment: s, quote: c, onCancelQuote: l, mentionSuggestions: f = [], departmentSuggestions: p = [], leadingAction: m, sendLabel: g = "Send message", className: _ = "" }) {
|
|
2464
2500
|
let [v, y] = d(""), b = u(null), x = t != null, S = x ? t : v, C = String(S || "").includes("@") ? [...f, ...p].slice(0, 6) : [];
|
|
2465
|
-
return /* @__PURE__ */ W(
|
|
2501
|
+
return /* @__PURE__ */ W(dr, { children: /* @__PURE__ */ G("div", {
|
|
2466
2502
|
className: X("fcc-chat-composer", _),
|
|
2467
2503
|
children: [
|
|
2468
2504
|
c && /* @__PURE__ */ G("div", {
|
|
2469
2505
|
className: "fcc-chat-composer-quote",
|
|
2470
2506
|
children: [
|
|
2471
|
-
/* @__PURE__ */ W(
|
|
2507
|
+
/* @__PURE__ */ W(Oe, { size: 14 }),
|
|
2472
2508
|
/* @__PURE__ */ W("span", { children: c.body || c.text || c.label || "Quoted message" }),
|
|
2473
2509
|
l && /* @__PURE__ */ W("button", {
|
|
2474
2510
|
type: "button",
|
|
@@ -2494,18 +2530,18 @@ function lr({ placeholder: e = "Type your message... Use @ to mention users or d
|
|
|
2494
2530
|
children: C.map((e, t) => /* @__PURE__ */ G("button", {
|
|
2495
2531
|
type: "button",
|
|
2496
2532
|
onClick: () => {
|
|
2497
|
-
let t =
|
|
2533
|
+
let t = Un(e), r = String(S || "").replace(/@\S*$/, `@${t} `);
|
|
2498
2534
|
x || y(r), n?.(r);
|
|
2499
2535
|
},
|
|
2500
|
-
children: [/* @__PURE__ */ W(
|
|
2536
|
+
children: [/* @__PURE__ */ W(Gn, {
|
|
2501
2537
|
item: {
|
|
2502
|
-
title:
|
|
2538
|
+
title: Hn(e),
|
|
2503
2539
|
avatarUrl: e.avatarUrl,
|
|
2504
2540
|
avatarText: e.avatarText,
|
|
2505
2541
|
presenceStatus: e.presenceStatus
|
|
2506
2542
|
},
|
|
2507
2543
|
size: "sm"
|
|
2508
|
-
}), /* @__PURE__ */ W("span", { children:
|
|
2544
|
+
}), /* @__PURE__ */ W("span", { children: Hn(e) })]
|
|
2509
2545
|
}, Z(e) || t))
|
|
2510
2546
|
}),
|
|
2511
2547
|
a.length > 0 && /* @__PURE__ */ W("div", {
|
|
@@ -2513,7 +2549,7 @@ function lr({ placeholder: e = "Type your message... Use @ to mention users or d
|
|
|
2513
2549
|
children: a.map((e, t) => /* @__PURE__ */ G("span", {
|
|
2514
2550
|
className: "fcc-chat-composer-attachment",
|
|
2515
2551
|
children: [
|
|
2516
|
-
/* @__PURE__ */ W(
|
|
2552
|
+
/* @__PURE__ */ W(me, { size: 13 }),
|
|
2517
2553
|
/* @__PURE__ */ W("span", { children: e.name || e.fileName || "Attachment" }),
|
|
2518
2554
|
s && /* @__PURE__ */ W("button", {
|
|
2519
2555
|
type: "button",
|
|
@@ -2541,8 +2577,8 @@ function lr({ placeholder: e = "Type your message... Use @ to mention users or d
|
|
|
2541
2577
|
onClick: () => b.current?.click(),
|
|
2542
2578
|
"aria-label": "Attach files",
|
|
2543
2579
|
title: "Attach files",
|
|
2544
|
-
children: /* @__PURE__ */ W(
|
|
2545
|
-
})] }) : m || /* @__PURE__ */ W(
|
|
2580
|
+
children: /* @__PURE__ */ W(me, { size: 18 })
|
|
2581
|
+
})] }) : m || /* @__PURE__ */ W(me, { size: 18 }) }), /* @__PURE__ */ W("button", {
|
|
2546
2582
|
type: "button",
|
|
2547
2583
|
className: "fcc-chat-send-button",
|
|
2548
2584
|
onClick: () => {
|
|
@@ -2561,8 +2597,8 @@ function lr({ placeholder: e = "Type your message... Use @ to mention users or d
|
|
|
2561
2597
|
]
|
|
2562
2598
|
}) });
|
|
2563
2599
|
}
|
|
2564
|
-
function
|
|
2565
|
-
let [M,
|
|
2600
|
+
function pr({ title: e = "New Ticket", description: t = "", projects: n = [], departments: r = [], targetTypes: i = [], defaultProjectId: a = "", defaultProjectName: s = "", lockProject: c = !1, initialValues: l = {}, files: f, onFilesChange: p, onAttach: h, onRemoveFile: g, attachmentAccept: _, attachLabel: y = "Attach files", projectLabel: b = "Project", departmentLabel: x = "Department", targetLabel: S = "Target", titleLabel: C = "Ticket title", messageLabel: w = "Message", titlePlaceholder: T = "What needs attention?", messagePlaceholder: E = "Add context, files to review, or next action...", onSearchProjects: D, onSubmit: O, onClose: k, isSubmitting: A = !1, submitLabel: j = "Submit Ticket" }) {
|
|
2601
|
+
let [M, N] = d(String(s || "")), [F, I] = d([]), L = u(null), ee = Array.isArray(f), R = ee ? f : F, [z, B] = d(() => ({
|
|
2566
2602
|
projectId: a || l.projectId || "",
|
|
2567
2603
|
departmentCode: l.departmentCode || Z(r[0]) || "",
|
|
2568
2604
|
targetType: l.targetType || Z(i[0]) || "",
|
|
@@ -2573,10 +2609,10 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2573
2609
|
o(() => {
|
|
2574
2610
|
D?.(M);
|
|
2575
2611
|
}, [D, M]);
|
|
2576
|
-
let V = (e, t) =>
|
|
2612
|
+
let V = (e, t) => B((n) => ({
|
|
2577
2613
|
...n,
|
|
2578
2614
|
[e]: t
|
|
2579
|
-
})), ne =
|
|
2615
|
+
})), ne = Wn(n, z.projectId, s), re = (e) => {
|
|
2580
2616
|
ee || I(e), p?.(e);
|
|
2581
2617
|
}, ie = (e) => {
|
|
2582
2618
|
let t = Array.from(e.target.files || []);
|
|
@@ -2611,12 +2647,12 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2611
2647
|
className: "fcc-chat-field",
|
|
2612
2648
|
children: [/* @__PURE__ */ W("span", { children: b }), c ? /* @__PURE__ */ G("div", {
|
|
2613
2649
|
className: "fcc-chat-readonly-field",
|
|
2614
|
-
children: [/* @__PURE__ */ W(
|
|
2650
|
+
children: [/* @__PURE__ */ W(P, { size: 14 }), ne || s || "Project locked"]
|
|
2615
2651
|
}) : /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G("div", {
|
|
2616
2652
|
className: "fcc-chat-search fcc-chat-create-search",
|
|
2617
|
-
children: [/* @__PURE__ */ W(
|
|
2653
|
+
children: [/* @__PURE__ */ W(Ae, { size: 14 }), /* @__PURE__ */ W("input", {
|
|
2618
2654
|
value: M,
|
|
2619
|
-
onChange: (e) =>
|
|
2655
|
+
onChange: (e) => N(e.target.value),
|
|
2620
2656
|
placeholder: "Search projects..."
|
|
2621
2657
|
})]
|
|
2622
2658
|
}), n.length > 0 && /* @__PURE__ */ W("div", {
|
|
@@ -2627,9 +2663,9 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2627
2663
|
type: "button",
|
|
2628
2664
|
className: X("fcc-chat-option-row", z.projectId === t && "selected"),
|
|
2629
2665
|
onClick: () => {
|
|
2630
|
-
V("projectId", t),
|
|
2666
|
+
V("projectId", t), N(Un(e));
|
|
2631
2667
|
},
|
|
2632
|
-
children: [/* @__PURE__ */ W("span", { children:
|
|
2668
|
+
children: [/* @__PURE__ */ W("span", { children: Hn(e) }), z.projectId === t && /* @__PURE__ */ W(v, { size: 14 })]
|
|
2633
2669
|
}, t);
|
|
2634
2670
|
})
|
|
2635
2671
|
})] })]
|
|
@@ -2643,7 +2679,7 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2643
2679
|
onChange: (e) => V("departmentCode", e.target.value),
|
|
2644
2680
|
children: r.map((e) => /* @__PURE__ */ W("option", {
|
|
2645
2681
|
value: Z(e),
|
|
2646
|
-
children:
|
|
2682
|
+
children: Hn(e)
|
|
2647
2683
|
}, Z(e)))
|
|
2648
2684
|
})]
|
|
2649
2685
|
}), /* @__PURE__ */ G("label", {
|
|
@@ -2656,7 +2692,7 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2656
2692
|
children: "General"
|
|
2657
2693
|
}), i.map((e) => /* @__PURE__ */ W("option", {
|
|
2658
2694
|
value: Z(e),
|
|
2659
|
-
children:
|
|
2695
|
+
children: Hn(e)
|
|
2660
2696
|
}, Z(e)))]
|
|
2661
2697
|
})]
|
|
2662
2698
|
})]
|
|
@@ -2694,14 +2730,14 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2694
2730
|
type: "button",
|
|
2695
2731
|
className: "fcc-chat-attach-inline-button",
|
|
2696
2732
|
onClick: () => L.current?.click(),
|
|
2697
|
-
children: [/* @__PURE__ */ W(
|
|
2733
|
+
children: [/* @__PURE__ */ W(me, { size: 14 }), y]
|
|
2698
2734
|
}),
|
|
2699
2735
|
R.length > 0 && /* @__PURE__ */ W("div", {
|
|
2700
2736
|
className: "fcc-chat-composer-attachments",
|
|
2701
2737
|
children: R.map((e, t) => /* @__PURE__ */ G("span", {
|
|
2702
2738
|
className: "fcc-chat-composer-attachment",
|
|
2703
2739
|
children: [
|
|
2704
|
-
/* @__PURE__ */ W(
|
|
2740
|
+
/* @__PURE__ */ W(me, { size: 13 }),
|
|
2705
2741
|
/* @__PURE__ */ W("span", { children: e.name || e.fileName || `Attachment ${t + 1}` }),
|
|
2706
2742
|
/* @__PURE__ */ W("button", {
|
|
2707
2743
|
type: "button",
|
|
@@ -2742,7 +2778,7 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2742
2778
|
type: "submit",
|
|
2743
2779
|
className: "fcc-chat-primary-action",
|
|
2744
2780
|
disabled: A || !z.title.trim(),
|
|
2745
|
-
children: [A && /* @__PURE__ */ W(
|
|
2781
|
+
children: [A && /* @__PURE__ */ W(te, {
|
|
2746
2782
|
size: 14,
|
|
2747
2783
|
className: "fcc-chat-spin-icon"
|
|
2748
2784
|
}), j]
|
|
@@ -2751,7 +2787,7 @@ function ur({ title: e = "New Ticket", description: t = "", projects: n = [], de
|
|
|
2751
2787
|
]
|
|
2752
2788
|
});
|
|
2753
2789
|
}
|
|
2754
|
-
function
|
|
2790
|
+
function mr({ open: e = !1, title: t = "New message", users: n = [], selectedUserIds: r, onSelectedUserIdsChange: i, onSearchUsers: a, onCreateDM: s, onClose: c, isSubmitting: l = !1, emptyLabel: u = "No people found" }) {
|
|
2755
2791
|
let [f, p] = d(""), [m, h] = d([]), g = Array.isArray(r), _ = g ? r : m;
|
|
2756
2792
|
if (o(() => {
|
|
2757
2793
|
e && a?.(f);
|
|
@@ -2760,7 +2796,7 @@ function dr({ open: e = !1, title: t = "New message", users: n = [], selectedUse
|
|
|
2760
2796
|
e,
|
|
2761
2797
|
f
|
|
2762
2798
|
]), !e) return null;
|
|
2763
|
-
let y = n.filter((e) => f.trim() ?
|
|
2799
|
+
let y = n.filter((e) => f.trim() ? Un(e).toLowerCase().includes(f.trim().toLowerCase()) : !0), b = (e) => {
|
|
2764
2800
|
g || h(e), i?.(e);
|
|
2765
2801
|
}, x = (e) => {
|
|
2766
2802
|
let t = Z(e);
|
|
@@ -2780,7 +2816,7 @@ function dr({ open: e = !1, title: t = "New message", users: n = [], selectedUse
|
|
|
2780
2816
|
children: [
|
|
2781
2817
|
/* @__PURE__ */ W("span", {
|
|
2782
2818
|
className: "fcc-chat-create-icon",
|
|
2783
|
-
children: /* @__PURE__ */ W(
|
|
2819
|
+
children: /* @__PURE__ */ W(ze, { size: 17 })
|
|
2784
2820
|
}),
|
|
2785
2821
|
/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("strong", { children: t }), /* @__PURE__ */ W("span", { children: "Select one person or build a small group conversation." })] }),
|
|
2786
2822
|
/* @__PURE__ */ W("button", {
|
|
@@ -2797,7 +2833,7 @@ function dr({ open: e = !1, title: t = "New message", users: n = [], selectedUse
|
|
|
2797
2833
|
children: [
|
|
2798
2834
|
/* @__PURE__ */ G("div", {
|
|
2799
2835
|
className: "fcc-chat-search",
|
|
2800
|
-
children: [/* @__PURE__ */ W(
|
|
2836
|
+
children: [/* @__PURE__ */ W(Ae, { size: 14 }), /* @__PURE__ */ W("input", {
|
|
2801
2837
|
value: f,
|
|
2802
2838
|
onChange: (e) => p(e.target.value),
|
|
2803
2839
|
placeholder: "Search teammates...",
|
|
@@ -2809,7 +2845,7 @@ function dr({ open: e = !1, title: t = "New message", users: n = [], selectedUse
|
|
|
2809
2845
|
children: S.map((e) => /* @__PURE__ */ G("button", {
|
|
2810
2846
|
type: "button",
|
|
2811
2847
|
onClick: () => x(e),
|
|
2812
|
-
children: [
|
|
2848
|
+
children: [Hn(e), /* @__PURE__ */ W(H, { size: 12 })]
|
|
2813
2849
|
}, Z(e)))
|
|
2814
2850
|
}),
|
|
2815
2851
|
/* @__PURE__ */ W("div", {
|
|
@@ -2824,11 +2860,11 @@ function dr({ open: e = !1, title: t = "New message", users: n = [], selectedUse
|
|
|
2824
2860
|
className: X("fcc-chat-person-row", n && "selected"),
|
|
2825
2861
|
onClick: () => x(e),
|
|
2826
2862
|
children: [
|
|
2827
|
-
/* @__PURE__ */ W(
|
|
2863
|
+
/* @__PURE__ */ W(Gn, { item: {
|
|
2828
2864
|
...e,
|
|
2829
|
-
title:
|
|
2865
|
+
title: Hn(e)
|
|
2830
2866
|
} }),
|
|
2831
|
-
/* @__PURE__ */ G("span", { children: [/* @__PURE__ */ W("strong", { children:
|
|
2867
|
+
/* @__PURE__ */ G("span", { children: [/* @__PURE__ */ W("strong", { children: Hn(e) }), (e.subtitle || e.email || e.role) && /* @__PURE__ */ W("small", { children: e.subtitle || e.email || e.role })] }),
|
|
2832
2868
|
n && /* @__PURE__ */ W(v, { size: 15 })
|
|
2833
2869
|
]
|
|
2834
2870
|
}, t);
|
|
@@ -2848,7 +2884,7 @@ function dr({ open: e = !1, title: t = "New message", users: n = [], selectedUse
|
|
|
2848
2884
|
className: "fcc-chat-primary-action",
|
|
2849
2885
|
disabled: l || _.length === 0,
|
|
2850
2886
|
onClick: () => s?.(S, _),
|
|
2851
|
-
children: [l && /* @__PURE__ */ W(
|
|
2887
|
+
children: [l && /* @__PURE__ */ W(te, {
|
|
2852
2888
|
size: 14,
|
|
2853
2889
|
className: "fcc-chat-spin-icon"
|
|
2854
2890
|
}), "Start message"]
|
|
@@ -2858,7 +2894,7 @@ function dr({ open: e = !1, title: t = "New message", users: n = [], selectedUse
|
|
|
2858
2894
|
})
|
|
2859
2895
|
});
|
|
2860
2896
|
}
|
|
2861
|
-
function
|
|
2897
|
+
function hr({ steps: e = [
|
|
2862
2898
|
"Submitted",
|
|
2863
2899
|
"Received",
|
|
2864
2900
|
"In Progress",
|
|
@@ -2880,7 +2916,7 @@ function fr({ steps: e = [
|
|
|
2880
2916
|
}, t))
|
|
2881
2917
|
});
|
|
2882
2918
|
}
|
|
2883
|
-
function
|
|
2919
|
+
function gr({ updates: e = [], onSelectUpdate: t, action: n, renderMessageAttachment: r, renderInlineReply: i }) {
|
|
2884
2920
|
return e.length ? /* @__PURE__ */ G("div", {
|
|
2885
2921
|
className: "fcc-chat-hub-feed",
|
|
2886
2922
|
children: [e.map((e) => /* @__PURE__ */ G("article", {
|
|
@@ -2905,7 +2941,7 @@ function pr({ updates: e = [], onSelectUpdate: t, action: n, renderMessageAttach
|
|
|
2905
2941
|
"aria-label": "Edit update",
|
|
2906
2942
|
title: "Edit",
|
|
2907
2943
|
onClick: (e) => e.stopPropagation(),
|
|
2908
|
-
children: /* @__PURE__ */ W(
|
|
2944
|
+
children: /* @__PURE__ */ W(ge, { size: 14 })
|
|
2909
2945
|
}),
|
|
2910
2946
|
/* @__PURE__ */ W("button", {
|
|
2911
2947
|
type: "button",
|
|
@@ -2913,13 +2949,13 @@ function pr({ updates: e = [], onSelectUpdate: t, action: n, renderMessageAttach
|
|
|
2913
2949
|
"aria-label": "Delete update",
|
|
2914
2950
|
title: "Delete",
|
|
2915
2951
|
onClick: (e) => e.stopPropagation(),
|
|
2916
|
-
children: /* @__PURE__ */ W(
|
|
2952
|
+
children: /* @__PURE__ */ W(Ie, { size: 14 })
|
|
2917
2953
|
})
|
|
2918
2954
|
]
|
|
2919
2955
|
}),
|
|
2920
2956
|
/* @__PURE__ */ G("div", {
|
|
2921
2957
|
className: "fcc-chat-hub-card-head",
|
|
2922
|
-
children: [/* @__PURE__ */ W(
|
|
2958
|
+
children: [/* @__PURE__ */ W(Gn, {
|
|
2923
2959
|
item: e.author || e,
|
|
2924
2960
|
size: "md"
|
|
2925
2961
|
}), /* @__PURE__ */ G("div", {
|
|
@@ -2928,7 +2964,7 @@ function pr({ updates: e = [], onSelectUpdate: t, action: n, renderMessageAttach
|
|
|
2928
2964
|
})]
|
|
2929
2965
|
}),
|
|
2930
2966
|
/* @__PURE__ */ W("p", { children: e.body }),
|
|
2931
|
-
/* @__PURE__ */ W(
|
|
2967
|
+
/* @__PURE__ */ W(ir, {
|
|
2932
2968
|
attachments: e.attachments,
|
|
2933
2969
|
renderAttachment: r,
|
|
2934
2970
|
layout: "hub"
|
|
@@ -2952,7 +2988,7 @@ function pr({ updates: e = [], onSelectUpdate: t, action: n, renderMessageAttach
|
|
|
2952
2988
|
children: "No hub updates yet."
|
|
2953
2989
|
});
|
|
2954
2990
|
}
|
|
2955
|
-
function
|
|
2991
|
+
function _r({ detail: e, onCloseDetail: t }) {
|
|
2956
2992
|
return e ? /* @__PURE__ */ G("header", {
|
|
2957
2993
|
className: "fcc-chat-hub-detail-header",
|
|
2958
2994
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -2979,13 +3015,13 @@ function mr({ detail: e, onCloseDetail: t }) {
|
|
|
2979
3015
|
onClick: t,
|
|
2980
3016
|
"aria-label": "Collapse panel",
|
|
2981
3017
|
title: "Collapse panel",
|
|
2982
|
-
children: /* @__PURE__ */ W(
|
|
3018
|
+
children: /* @__PURE__ */ W(pe, { size: 15 })
|
|
2983
3019
|
})
|
|
2984
3020
|
]
|
|
2985
3021
|
})]
|
|
2986
3022
|
}) : null;
|
|
2987
3023
|
}
|
|
2988
|
-
function
|
|
3024
|
+
function vr({ detail: e, onCloseDetail: t }) {
|
|
2989
3025
|
if (!e) return null;
|
|
2990
3026
|
let n = e.kind === "dms", r = e.kind === "tickets";
|
|
2991
3027
|
return n ? /* @__PURE__ */ G("header", {
|
|
@@ -2995,7 +3031,7 @@ function hr({ detail: e, onCloseDetail: t }) {
|
|
|
2995
3031
|
children: [/* @__PURE__ */ W("strong", { children: "Direct Message" }), e.participantCount != null && /* @__PURE__ */ G("span", {
|
|
2996
3032
|
title: `${e.participantCount} participants`,
|
|
2997
3033
|
children: [
|
|
2998
|
-
/* @__PURE__ */ W(
|
|
3034
|
+
/* @__PURE__ */ W(Be, { size: 14 }),
|
|
2999
3035
|
" ",
|
|
3000
3036
|
e.participantCount
|
|
3001
3037
|
]
|
|
@@ -3006,7 +3042,7 @@ function hr({ detail: e, onCloseDetail: t }) {
|
|
|
3006
3042
|
onClick: t,
|
|
3007
3043
|
"aria-label": "Close direct message",
|
|
3008
3044
|
title: "Close",
|
|
3009
|
-
children: /* @__PURE__ */ W(
|
|
3045
|
+
children: /* @__PURE__ */ W(pe, { size: 16 })
|
|
3010
3046
|
})]
|
|
3011
3047
|
}) : /* @__PURE__ */ G("header", {
|
|
3012
3048
|
className: "fcc-chat-thread-detail-header",
|
|
@@ -3019,7 +3055,7 @@ function hr({ detail: e, onCloseDetail: t }) {
|
|
|
3019
3055
|
className: "fcc-chat-thread-menu-button",
|
|
3020
3056
|
"aria-label": "Thread actions",
|
|
3021
3057
|
title: "Thread actions",
|
|
3022
|
-
children: /* @__PURE__ */ W(
|
|
3058
|
+
children: /* @__PURE__ */ W(ue, { size: 16 })
|
|
3023
3059
|
}), /* @__PURE__ */ G("div", {
|
|
3024
3060
|
className: "fcc-chat-thread-title-stack",
|
|
3025
3061
|
children: [/* @__PURE__ */ G("div", {
|
|
@@ -3051,7 +3087,7 @@ function hr({ detail: e, onCloseDetail: t }) {
|
|
|
3051
3087
|
onClick: t,
|
|
3052
3088
|
"aria-label": "Collapse panel",
|
|
3053
3089
|
title: "Collapse panel",
|
|
3054
|
-
children: /* @__PURE__ */ W(
|
|
3090
|
+
children: /* @__PURE__ */ W(pe, { size: 15 })
|
|
3055
3091
|
})
|
|
3056
3092
|
]
|
|
3057
3093
|
})]
|
|
@@ -3068,7 +3104,7 @@ function hr({ detail: e, onCloseDetail: t }) {
|
|
|
3068
3104
|
}), e.participantCount != null && /* @__PURE__ */ G("span", {
|
|
3069
3105
|
className: "fcc-chat-detail-count",
|
|
3070
3106
|
children: [
|
|
3071
|
-
/* @__PURE__ */ W(
|
|
3107
|
+
/* @__PURE__ */ W(Be, { size: 12 }),
|
|
3072
3108
|
" ",
|
|
3073
3109
|
e.participantCount
|
|
3074
3110
|
]
|
|
@@ -3077,7 +3113,7 @@ function hr({ detail: e, onCloseDetail: t }) {
|
|
|
3077
3113
|
})]
|
|
3078
3114
|
});
|
|
3079
3115
|
}
|
|
3080
|
-
function
|
|
3116
|
+
function yr({ detail: e, slots: t, onCloseDetail: n, composer: r }) {
|
|
3081
3117
|
if (!e) return /* @__PURE__ */ G("div", {
|
|
3082
3118
|
className: "fcc-chat-detail-empty",
|
|
3083
3119
|
children: [/* @__PURE__ */ W(D, { size: 18 }), /* @__PURE__ */ W("span", { children: "Select a hub, ticket, or direct message." })]
|
|
@@ -3099,9 +3135,9 @@ function gr({ detail: e, slots: t, onCloseDetail: n, composer: r }) {
|
|
|
3099
3135
|
children: /* @__PURE__ */ G("button", {
|
|
3100
3136
|
type: "button",
|
|
3101
3137
|
className: "fcc-chat-footer-action",
|
|
3102
|
-
children: [/* @__PURE__ */ W(
|
|
3138
|
+
children: [/* @__PURE__ */ W(_e, { size: 16 }), "Write an update"]
|
|
3103
3139
|
})
|
|
3104
|
-
}) : /* @__PURE__ */ W(
|
|
3140
|
+
}) : /* @__PURE__ */ W(fr, {
|
|
3105
3141
|
...r,
|
|
3106
3142
|
...i,
|
|
3107
3143
|
placeholder: i.placeholder || e.composerPlaceholder || r?.placeholder,
|
|
@@ -3110,25 +3146,25 @@ function gr({ detail: e, slots: t, onCloseDetail: n, composer: r }) {
|
|
|
3110
3146
|
return /* @__PURE__ */ G("div", {
|
|
3111
3147
|
className: X("fcc-chat-detail", e.kind === "hubs" && "fcc-chat-detail-hubs"),
|
|
3112
3148
|
children: [
|
|
3113
|
-
e.kind === "hubs" ? /* @__PURE__ */ W(
|
|
3149
|
+
e.kind === "hubs" ? /* @__PURE__ */ W(_r, {
|
|
3114
3150
|
detail: e,
|
|
3115
3151
|
onCloseDetail: n
|
|
3116
|
-
}) : /* @__PURE__ */ W(
|
|
3152
|
+
}) : /* @__PURE__ */ W(vr, {
|
|
3117
3153
|
detail: e,
|
|
3118
3154
|
onCloseDetail: n
|
|
3119
3155
|
}),
|
|
3120
|
-
e.kind === "tickets" && /* @__PURE__ */ W(
|
|
3156
|
+
e.kind === "tickets" && /* @__PURE__ */ W(hr, {
|
|
3121
3157
|
steps: e.statusSteps,
|
|
3122
3158
|
current: e.status
|
|
3123
3159
|
}),
|
|
3124
3160
|
/* @__PURE__ */ W("div", {
|
|
3125
3161
|
className: "fcc-chat-detail-body",
|
|
3126
|
-
children: e.kind === "hubs" && e.updates ? /* @__PURE__ */ W(
|
|
3162
|
+
children: e.kind === "hubs" && e.updates ? /* @__PURE__ */ W(gr, {
|
|
3127
3163
|
updates: e.updates,
|
|
3128
3164
|
onSelectUpdate: e.onSelectUpdate,
|
|
3129
3165
|
renderMessageAttachment: t?.renderMessageAttachment,
|
|
3130
3166
|
renderInlineReply: t?.renderInlineReply
|
|
3131
|
-
}) : /* @__PURE__ */ W(
|
|
3167
|
+
}) : /* @__PURE__ */ W(ur, {
|
|
3132
3168
|
messages: e.messages || [],
|
|
3133
3169
|
renderMessageAttachment: t?.renderMessageAttachment,
|
|
3134
3170
|
renderInlineReply: t?.renderInlineReply,
|
|
@@ -3144,8 +3180,8 @@ function gr({ detail: e, slots: t, onCloseDetail: n, composer: r }) {
|
|
|
3144
3180
|
]
|
|
3145
3181
|
});
|
|
3146
3182
|
}
|
|
3147
|
-
function
|
|
3148
|
-
let O =
|
|
3183
|
+
function br({ open: e = !1, activeTab: t = "hubs", onTabChange: n, onClose: r, title: a = "Chat", scopedTitle: s, hubs: c = [], tickets: u = [], dms: f = [], selectedId: p = null, detailOpen: m = !1, onSelectItem: h, onCloseDetail: g, loading: _ = {}, error: v = {}, filters: y, onFiltersChange: b, detail: x = null, newTicket: S, newDM: C, composer: w, slots: T = {}, mobilePortalTargetSelector: E = ".fcc-main-window-content", className: D = "" }) {
|
|
3184
|
+
let O = En(), k = Dn(m), A = jn(E), j = On[t] || On.hubs, M = j.actionIcon || De, [N, P] = d(null), [F, I] = d(null), L = t === "hubs" ? T.hubsToolbarActions : t === "tickets" ? T.ticketsToolbarActions : T.dmsToolbarActions, ee = i((e) => {
|
|
3149
3185
|
h?.(e);
|
|
3150
3186
|
}, [h]);
|
|
3151
3187
|
o(() => {
|
|
@@ -3208,7 +3244,7 @@ function _r({ open: e = !1, activeTab: t = "hubs", onTabChange: n, onClose: r, t
|
|
|
3208
3244
|
children: [/* @__PURE__ */ W("aside", {
|
|
3209
3245
|
className: "fcc-chat-detail-panel",
|
|
3210
3246
|
"aria-label": "Chat detail panel",
|
|
3211
|
-
children: /* @__PURE__ */ W(
|
|
3247
|
+
children: /* @__PURE__ */ W(yr, {
|
|
3212
3248
|
detail: x,
|
|
3213
3249
|
slots: T,
|
|
3214
3250
|
onCloseDetail: g,
|
|
@@ -3218,13 +3254,13 @@ function _r({ open: e = !1, activeTab: t = "hubs", onTabChange: n, onClose: r, t
|
|
|
3218
3254
|
className: "fcc-chat-rail",
|
|
3219
3255
|
"aria-label": "Chat sidebar",
|
|
3220
3256
|
children: [
|
|
3221
|
-
/* @__PURE__ */ W(
|
|
3257
|
+
/* @__PURE__ */ W(qn, {
|
|
3222
3258
|
title: a,
|
|
3223
3259
|
scopedTitle: s,
|
|
3224
3260
|
onClose: r,
|
|
3225
3261
|
headerActions: T.headerActions
|
|
3226
3262
|
}),
|
|
3227
|
-
N === "ticket" ? /* @__PURE__ */ W(
|
|
3263
|
+
N === "ticket" ? /* @__PURE__ */ W(pr, {
|
|
3228
3264
|
...S || {},
|
|
3229
3265
|
onSubmit: B,
|
|
3230
3266
|
onClose: () => {
|
|
@@ -3232,17 +3268,17 @@ function _r({ open: e = !1, activeTab: t = "hubs", onTabChange: n, onClose: r, t
|
|
|
3232
3268
|
},
|
|
3233
3269
|
isSubmitting: S?.isSubmitting || F === "ticket"
|
|
3234
3270
|
}) : /* @__PURE__ */ G(U, { children: [
|
|
3235
|
-
/* @__PURE__ */ W(
|
|
3271
|
+
/* @__PURE__ */ W(Jn, {
|
|
3236
3272
|
activeTab: t,
|
|
3237
3273
|
onTabChange: n
|
|
3238
3274
|
}),
|
|
3239
|
-
/* @__PURE__ */ W(
|
|
3275
|
+
/* @__PURE__ */ W(Zn, {
|
|
3240
3276
|
activeTab: t,
|
|
3241
3277
|
filters: y,
|
|
3242
3278
|
onFiltersChange: b,
|
|
3243
3279
|
toolbarActions: L
|
|
3244
3280
|
}),
|
|
3245
|
-
/* @__PURE__ */ W(
|
|
3281
|
+
/* @__PURE__ */ W(rr, {
|
|
3246
3282
|
activeTab: t,
|
|
3247
3283
|
hubs: c,
|
|
3248
3284
|
tickets: u,
|
|
@@ -3263,7 +3299,7 @@ function _r({ open: e = !1, activeTab: t = "hubs", onTabChange: n, onClose: r, t
|
|
|
3263
3299
|
})
|
|
3264
3300
|
})
|
|
3265
3301
|
] }),
|
|
3266
|
-
/* @__PURE__ */ W(
|
|
3302
|
+
/* @__PURE__ */ W(mr, {
|
|
3267
3303
|
...C || {},
|
|
3268
3304
|
open: N === "dm",
|
|
3269
3305
|
onClose: () => {
|
|
@@ -3276,14 +3312,14 @@ function _r({ open: e = !1, activeTab: t = "hubs", onTabChange: n, onClose: r, t
|
|
|
3276
3312
|
})]
|
|
3277
3313
|
})
|
|
3278
3314
|
});
|
|
3279
|
-
return O === "mobile" && A ?
|
|
3315
|
+
return O === "mobile" && A ? He(/* @__PURE__ */ W("div", {
|
|
3280
3316
|
className: "fcc-chat-mobile-portal",
|
|
3281
3317
|
children: ne
|
|
3282
3318
|
}), A) : ne;
|
|
3283
3319
|
}
|
|
3284
3320
|
//#endregion
|
|
3285
3321
|
//#region src/components/ui/Button.jsx
|
|
3286
|
-
var
|
|
3322
|
+
var xr = {
|
|
3287
3323
|
default: "btn-primary",
|
|
3288
3324
|
destructive: "btn-danger",
|
|
3289
3325
|
success: "btn-success",
|
|
@@ -3293,7 +3329,7 @@ var vr = {
|
|
|
3293
3329
|
muted: "btn-muted",
|
|
3294
3330
|
ghost: "btn-ghost",
|
|
3295
3331
|
link: "btn-link"
|
|
3296
|
-
},
|
|
3332
|
+
}, Sr = {
|
|
3297
3333
|
sm: "btn-sm",
|
|
3298
3334
|
default: "",
|
|
3299
3335
|
lg: "btn-lg",
|
|
@@ -3303,8 +3339,8 @@ var vr = {
|
|
|
3303
3339
|
ref: a,
|
|
3304
3340
|
className: [
|
|
3305
3341
|
"btn",
|
|
3306
|
-
|
|
3307
|
-
|
|
3342
|
+
xr[e],
|
|
3343
|
+
Sr[t],
|
|
3308
3344
|
n
|
|
3309
3345
|
].filter(Boolean).join(" "),
|
|
3310
3346
|
...i,
|
|
@@ -3313,7 +3349,7 @@ var vr = {
|
|
|
3313
3349
|
});
|
|
3314
3350
|
//#endregion
|
|
3315
3351
|
//#region src/components/ui/DropdownMenu.jsx
|
|
3316
|
-
function
|
|
3352
|
+
function Cr({ trigger: e, children: t, align: n = "left", className: r = "", sideOffset: i = 6, onOpenChange: a }) {
|
|
3317
3353
|
let [s, l] = d(!1), [f, p] = d(null), m = u(null), h = u(null);
|
|
3318
3354
|
return o(() => {
|
|
3319
3355
|
a?.(s);
|
|
@@ -3351,7 +3387,7 @@ function br({ trigger: e, children: t, align: n = "left", className: r = "", sid
|
|
|
3351
3387
|
ref: m,
|
|
3352
3388
|
onClick: () => l((e) => !e),
|
|
3353
3389
|
children: e
|
|
3354
|
-
}), s && typeof document < "u" &&
|
|
3390
|
+
}), s && typeof document < "u" && He(/* @__PURE__ */ W("div", {
|
|
3355
3391
|
ref: h,
|
|
3356
3392
|
className: "dropdown",
|
|
3357
3393
|
onClick: () => l(!1),
|
|
@@ -3366,7 +3402,7 @@ function br({ trigger: e, children: t, align: n = "left", className: r = "", sid
|
|
|
3366
3402
|
}), document.body)]
|
|
3367
3403
|
});
|
|
3368
3404
|
}
|
|
3369
|
-
function
|
|
3405
|
+
function wr({ icon: e, children: t, shortcut: n, active: r, onClick: i, className: a = "" }) {
|
|
3370
3406
|
return /* @__PURE__ */ G("div", {
|
|
3371
3407
|
className: `dropdown-item ${r ? "active" : ""} ${a}`,
|
|
3372
3408
|
onClick: i,
|
|
@@ -3390,7 +3426,7 @@ function xr({ icon: e, children: t, shortcut: n, active: r, onClick: i, classNam
|
|
|
3390
3426
|
]
|
|
3391
3427
|
});
|
|
3392
3428
|
}
|
|
3393
|
-
function
|
|
3429
|
+
function Tr({ checked: e, onCheckedChange: t, children: n, className: r = "" }) {
|
|
3394
3430
|
return /* @__PURE__ */ G("div", {
|
|
3395
3431
|
className: `dropdown-item ${e ? "active" : ""} ${r}`,
|
|
3396
3432
|
onClick: () => t?.(!e),
|
|
@@ -3403,21 +3439,21 @@ function Sr({ checked: e, onCheckedChange: t, children: n, className: r = "" })
|
|
|
3403
3439
|
})]
|
|
3404
3440
|
});
|
|
3405
3441
|
}
|
|
3406
|
-
function
|
|
3442
|
+
function Er({ children: e, className: t = "" }) {
|
|
3407
3443
|
return /* @__PURE__ */ W("div", {
|
|
3408
3444
|
className: `dropdown-label ${t}`,
|
|
3409
3445
|
children: e
|
|
3410
3446
|
});
|
|
3411
3447
|
}
|
|
3412
|
-
function
|
|
3448
|
+
function Dr({ className: e = "" }) {
|
|
3413
3449
|
return /* @__PURE__ */ W("div", { className: `dropdown-divider ${e}` });
|
|
3414
3450
|
}
|
|
3415
3451
|
//#endregion
|
|
3416
3452
|
//#region src/components/ui/WorkspaceTabs.jsx
|
|
3417
|
-
function
|
|
3453
|
+
function Or(e, n) {
|
|
3418
3454
|
return e ? r(e) ? e : t(e, { size: n }) : null;
|
|
3419
3455
|
}
|
|
3420
|
-
function
|
|
3456
|
+
function kr({ items: e = [], value: t, defaultValue: n, onValueChange: r, ariaLabel: a = "Workspace tabs", iconSize: s = 14, variant: l = "plain", className: f = "", itemClassName: p = "" }) {
|
|
3421
3457
|
let m = u(null), h = u(null), g = u(/* @__PURE__ */ new Map()), [_, v] = d(n ?? e[0]?.id ?? ""), y = t === void 0 ? _ : t, b = i(() => {
|
|
3422
3458
|
let e = h.current, t = g.current.get(y);
|
|
3423
3459
|
if (e) {
|
|
@@ -3479,7 +3515,7 @@ function Er({ items: e = [], value: t, defaultValue: n, onValueChange: r, ariaLa
|
|
|
3479
3515
|
"aria-hidden": "true",
|
|
3480
3516
|
className: "workspace-tabs-indicator"
|
|
3481
3517
|
}), e.map((e) => {
|
|
3482
|
-
let t = e.id === y, n =
|
|
3518
|
+
let t = e.id === y, n = Or(e.icon, s);
|
|
3483
3519
|
return /* @__PURE__ */ G("button", {
|
|
3484
3520
|
type: "button",
|
|
3485
3521
|
role: "tab",
|
|
@@ -3516,12 +3552,12 @@ function Er({ items: e = [], value: t, defaultValue: n, onValueChange: r, ariaLa
|
|
|
3516
3552
|
}
|
|
3517
3553
|
//#endregion
|
|
3518
3554
|
//#region src/components/data/KPICard.jsx
|
|
3519
|
-
function
|
|
3555
|
+
function Ar({ title: e, value: t, change: n, changeLabel: r, trend: i = "neutral", icon: a, className: o = "" }) {
|
|
3520
3556
|
let s = {
|
|
3521
3557
|
up: "var(--accent-green)",
|
|
3522
3558
|
down: "var(--accent-red)",
|
|
3523
3559
|
neutral: "var(--text-tertiary)"
|
|
3524
|
-
}, c = i === "up" ?
|
|
3560
|
+
}, c = i === "up" ? Re : i === "down" ? Le : ce;
|
|
3525
3561
|
return /* @__PURE__ */ G("div", {
|
|
3526
3562
|
className: `kpi-card ${o}`,
|
|
3527
3563
|
children: [
|
|
@@ -3557,7 +3593,7 @@ function Dr({ title: e, value: t, change: n, changeLabel: r, trend: i = "neutral
|
|
|
3557
3593
|
]
|
|
3558
3594
|
});
|
|
3559
3595
|
}
|
|
3560
|
-
function
|
|
3596
|
+
function jr({ label: e, value: t, subtitle: n, color: r, className: i = "" }) {
|
|
3561
3597
|
return /* @__PURE__ */ G("div", {
|
|
3562
3598
|
className: `stat-card ${i}`,
|
|
3563
3599
|
children: [r && /* @__PURE__ */ W("div", {
|
|
@@ -3584,36 +3620,36 @@ function Or({ label: e, value: t, subtitle: n, color: r, className: i = "" }) {
|
|
|
3584
3620
|
}
|
|
3585
3621
|
//#endregion
|
|
3586
3622
|
//#region src/components/FCCNotificationSidePanel/FCCNotificationSidePanel.jsx
|
|
3587
|
-
var
|
|
3588
|
-
function
|
|
3623
|
+
var Mr = "all", Nr = "unread";
|
|
3624
|
+
function Pr(...e) {
|
|
3589
3625
|
return e.filter(Boolean).join(" ");
|
|
3590
3626
|
}
|
|
3591
|
-
function
|
|
3627
|
+
function Fr(e = "") {
|
|
3592
3628
|
let t = String(e).trim();
|
|
3593
3629
|
if (!t) return "??";
|
|
3594
3630
|
let n = t.split(/\s+/).filter(Boolean);
|
|
3595
3631
|
return n.length >= 2 ? `${n[0]?.[0] || ""}${n[n.length - 1]?.[0] || ""}`.toUpperCase() : t.slice(0, 2).toUpperCase();
|
|
3596
3632
|
}
|
|
3597
|
-
function
|
|
3633
|
+
function Ir(e) {
|
|
3598
3634
|
return e.createdAt || e.timestamp || e.date || e.timeStamp || null;
|
|
3599
3635
|
}
|
|
3600
|
-
function
|
|
3636
|
+
function Lr(e) {
|
|
3601
3637
|
return typeof e.isRead == "boolean" ? e.isRead : typeof e.read == "boolean" ? e.read : "readAt" in e ? !!e.readAt : !1;
|
|
3602
3638
|
}
|
|
3603
|
-
function
|
|
3639
|
+
function Rr(e) {
|
|
3604
3640
|
return e.body || e.message || e.text || e.detail || "";
|
|
3605
3641
|
}
|
|
3606
|
-
function
|
|
3642
|
+
function zr(e, t = "Notification") {
|
|
3607
3643
|
return typeof e == "string" || typeof e == "number" ? String(e) : t;
|
|
3608
3644
|
}
|
|
3609
|
-
function
|
|
3645
|
+
function Br(e) {
|
|
3610
3646
|
if (!e) return "";
|
|
3611
3647
|
let t = new Date(e), n = t.getTime();
|
|
3612
3648
|
if (Number.isNaN(n)) return String(e);
|
|
3613
3649
|
let r = Math.max(0, Date.now() - n), i = Math.floor(r / 6e4), a = Math.floor(r / 36e5), o = Math.floor(r / 864e5);
|
|
3614
3650
|
return i < 1 ? "Just now" : i < 60 ? `${i}m ago` : a < 24 ? `${a}h ago` : o === 1 ? "Yesterday" : o < 7 ? `${o}d ago` : t.toLocaleDateString();
|
|
3615
3651
|
}
|
|
3616
|
-
function
|
|
3652
|
+
function Vr(e) {
|
|
3617
3653
|
if (!e) return "older";
|
|
3618
3654
|
let t = new Date(e);
|
|
3619
3655
|
if (Number.isNaN(t.getTime())) return "older";
|
|
@@ -3624,23 +3660,23 @@ function Rr(e) {
|
|
|
3624
3660
|
let o = new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
3625
3661
|
return o.getTime() === r.getTime() ? "today" : o.getTime() === i.getTime() ? "yesterday" : o >= a ? "thisWeek" : "older";
|
|
3626
3662
|
}
|
|
3627
|
-
function
|
|
3628
|
-
let t =
|
|
3663
|
+
function Hr(e) {
|
|
3664
|
+
let t = Ir(e), n = e.actorName || e.userName || e.user || e.requesterName || e.senderName || "Someone";
|
|
3629
3665
|
return {
|
|
3630
3666
|
...e,
|
|
3631
3667
|
id: e.id,
|
|
3632
3668
|
title: e.title || "Notification",
|
|
3633
|
-
body:
|
|
3669
|
+
body: Rr(e),
|
|
3634
3670
|
actorName: n,
|
|
3635
3671
|
avatarUrl: e.avatarUrl || e.actorAvatarUrl || e.userAvatar || e.imageUrl || null,
|
|
3636
|
-
avatarInitials: e.avatarInitials || e.initials ||
|
|
3672
|
+
avatarInitials: e.avatarInitials || e.initials || Fr(n),
|
|
3637
3673
|
timestamp: t,
|
|
3638
|
-
timeLabel: e.timeLabel || e.time ||
|
|
3639
|
-
isRead:
|
|
3640
|
-
groupKey: e.groupKey ||
|
|
3674
|
+
timeLabel: e.timeLabel || e.time || Br(t),
|
|
3675
|
+
isRead: Lr(e),
|
|
3676
|
+
groupKey: e.groupKey || Vr(t)
|
|
3641
3677
|
};
|
|
3642
3678
|
}
|
|
3643
|
-
function
|
|
3679
|
+
function Ur({ name: e, avatarUrl: t, initials: n }) {
|
|
3644
3680
|
return t ? /* @__PURE__ */ W("span", {
|
|
3645
3681
|
className: "fcc-notification-side-panel-avatar",
|
|
3646
3682
|
"aria-hidden": "true",
|
|
@@ -3651,19 +3687,19 @@ function Br({ name: e, avatarUrl: t, initials: n }) {
|
|
|
3651
3687
|
}) : /* @__PURE__ */ W("span", {
|
|
3652
3688
|
className: "fcc-notification-side-panel-avatar",
|
|
3653
3689
|
"aria-hidden": "true",
|
|
3654
|
-
children: n ||
|
|
3690
|
+
children: n || Fr(e)
|
|
3655
3691
|
});
|
|
3656
3692
|
}
|
|
3657
|
-
function
|
|
3658
|
-
let [w, T] = d(f), E = u ?? w, D = l(() => e.map(
|
|
3659
|
-
id:
|
|
3693
|
+
function Wr({ notifications: e = [], loading: t = !1, title: n = "Notifications", statusLabel: r, emptyTitle: i = "No notifications yet", emptyUnreadTitle: a = "No unread notifications", emptyDescription: o = "New alerts will show up here as they arrive.", markAllReadLabel: s = "Mark all as read", closeLabel: c = "Close notifications", activeFilter: u, defaultFilter: f = Mr, onFilterChange: p, onNotificationClick: m, onMarkRead: h, onMarkAllRead: _, onClose: y, renderNotification: b, showCloseButton: x = !0, showMarkAllRead: S = !0, className: C = "" }) {
|
|
3694
|
+
let [w, T] = d(f), E = u ?? w, D = l(() => e.map(Hr), [e]), O = D.filter((e) => !e.isRead).length, k = r || (O > 0 ? `${O} unread update${O === 1 ? "" : "s"}` : "All caught up"), A = [{
|
|
3695
|
+
id: Mr,
|
|
3660
3696
|
label: "All",
|
|
3661
3697
|
badge: D.length
|
|
3662
3698
|
}, {
|
|
3663
|
-
id:
|
|
3699
|
+
id: Nr,
|
|
3664
3700
|
label: "Unread",
|
|
3665
3701
|
badge: O
|
|
3666
|
-
}], j = E ===
|
|
3702
|
+
}], j = E === Nr ? D.filter((e) => !e.isRead) : D, M = l(() => {
|
|
3667
3703
|
let e = {
|
|
3668
3704
|
today: [],
|
|
3669
3705
|
yesterday: [],
|
|
@@ -3686,12 +3722,12 @@ function Vr({ notifications: e = [], loading: t = !1, title: n = "Notifications"
|
|
|
3686
3722
|
type: "button",
|
|
3687
3723
|
onClick: () => P(e),
|
|
3688
3724
|
className: "fcc-notification-side-panel-card-button",
|
|
3689
|
-
"aria-label": `${
|
|
3690
|
-
children: /* @__PURE__ */ W(
|
|
3725
|
+
"aria-label": `${zr(e.title)}${t ? ", unread" : ""}`,
|
|
3726
|
+
children: /* @__PURE__ */ W(jr, {
|
|
3691
3727
|
label: e.timeLabel,
|
|
3692
3728
|
value: /* @__PURE__ */ G("span", {
|
|
3693
3729
|
className: "fcc-notification-side-panel-card-title",
|
|
3694
|
-
children: [/* @__PURE__ */ W(
|
|
3730
|
+
children: [/* @__PURE__ */ W(Ur, {
|
|
3695
3731
|
name: e.actorName,
|
|
3696
3732
|
avatarUrl: e.avatarUrl,
|
|
3697
3733
|
initials: e.avatarInitials
|
|
@@ -3702,7 +3738,7 @@ function Vr({ notifications: e = [], loading: t = !1, title: n = "Notifications"
|
|
|
3702
3738
|
children: [/* @__PURE__ */ W("span", { children: e.body }), t && /* @__PURE__ */ W("span", { className: "fcc-notification-side-panel-unread-dot" })]
|
|
3703
3739
|
}),
|
|
3704
3740
|
color: t ? "var(--accent-primary)" : "var(--border-secondary)",
|
|
3705
|
-
className:
|
|
3741
|
+
className: Pr("fcc-notification-side-panel-card", t && "fcc-notification-side-panel-card-unread")
|
|
3706
3742
|
})
|
|
3707
3743
|
}, e.id);
|
|
3708
3744
|
}
|
|
@@ -3721,9 +3757,9 @@ function Vr({ notifications: e = [], loading: t = !1, title: n = "Notifications"
|
|
|
3721
3757
|
})]
|
|
3722
3758
|
}, e);
|
|
3723
3759
|
}
|
|
3724
|
-
let L = E ===
|
|
3760
|
+
let L = E === Nr ? a : i;
|
|
3725
3761
|
return /* @__PURE__ */ G("div", {
|
|
3726
|
-
className:
|
|
3762
|
+
className: Pr("fcc-notification-side-panel", C),
|
|
3727
3763
|
children: [
|
|
3728
3764
|
/* @__PURE__ */ G("header", {
|
|
3729
3765
|
className: "fcc-notification-side-panel-header",
|
|
@@ -3738,16 +3774,16 @@ function Vr({ notifications: e = [], loading: t = !1, title: n = "Notifications"
|
|
|
3738
3774
|
})]
|
|
3739
3775
|
}), /* @__PURE__ */ G("div", {
|
|
3740
3776
|
className: "fcc-notification-side-panel-actions",
|
|
3741
|
-
children: [S && /* @__PURE__ */ W(
|
|
3777
|
+
children: [S && /* @__PURE__ */ W(Cr, {
|
|
3742
3778
|
align: "right",
|
|
3743
3779
|
trigger: /* @__PURE__ */ W(Q, {
|
|
3744
3780
|
variant: "ghost",
|
|
3745
3781
|
size: "icon",
|
|
3746
3782
|
className: "fcc-notification-side-panel-icon-button",
|
|
3747
3783
|
"aria-label": "Notification actions",
|
|
3748
|
-
children: /* @__PURE__ */ W(
|
|
3784
|
+
children: /* @__PURE__ */ W(de, { size: 16 })
|
|
3749
3785
|
}),
|
|
3750
|
-
children: /* @__PURE__ */ W(
|
|
3786
|
+
children: /* @__PURE__ */ W(wr, {
|
|
3751
3787
|
className: O === 0 ? "fcc-notification-side-panel-menu-item-disabled" : "",
|
|
3752
3788
|
onClick: () => {
|
|
3753
3789
|
O !== 0 && _?.();
|
|
@@ -3768,7 +3804,7 @@ function Vr({ notifications: e = [], loading: t = !1, title: n = "Notifications"
|
|
|
3768
3804
|
}),
|
|
3769
3805
|
/* @__PURE__ */ W("div", {
|
|
3770
3806
|
className: "fcc-notification-side-panel-tabs",
|
|
3771
|
-
children: /* @__PURE__ */ W(
|
|
3807
|
+
children: /* @__PURE__ */ W(kr, {
|
|
3772
3808
|
items: A,
|
|
3773
3809
|
value: E,
|
|
3774
3810
|
onValueChange: N,
|
|
@@ -3781,7 +3817,7 @@ function Vr({ notifications: e = [], loading: t = !1, title: n = "Notifications"
|
|
|
3781
3817
|
className: "fcc-notification-side-panel-body",
|
|
3782
3818
|
children: t ? /* @__PURE__ */ W("div", {
|
|
3783
3819
|
className: "fcc-notification-side-panel-state",
|
|
3784
|
-
children: /* @__PURE__ */ W(
|
|
3820
|
+
children: /* @__PURE__ */ W(te, {
|
|
3785
3821
|
className: "fcc-notification-side-panel-loader",
|
|
3786
3822
|
size: 24
|
|
3787
3823
|
})
|
|
@@ -3813,8 +3849,8 @@ function Vr({ notifications: e = [], loading: t = !1, title: n = "Notifications"
|
|
|
3813
3849
|
}
|
|
3814
3850
|
//#endregion
|
|
3815
3851
|
//#region src/components/ui/FCCFullPagePanel.jsx
|
|
3816
|
-
var
|
|
3817
|
-
function
|
|
3852
|
+
var Gr = 220, Kr = 96;
|
|
3853
|
+
function qr({ open: e, onClose: t, children: n, className: r = "", closeOnEscape: i = !0, lockScroll: a = !0 }) {
|
|
3818
3854
|
let [s, c] = d(e ? "open" : "closed"), l = e || s !== "closed";
|
|
3819
3855
|
return o(() => {
|
|
3820
3856
|
if (a) return l ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
@@ -3836,11 +3872,11 @@ function Wr({ open: e, onClose: t, children: n, className: r = "", closeOnEscape
|
|
|
3836
3872
|
return () => cancelAnimationFrame(e);
|
|
3837
3873
|
}
|
|
3838
3874
|
if (s === "closed") return;
|
|
3839
|
-
let t = requestAnimationFrame(() => c("closing")), n = window.setTimeout(() => c("closed"),
|
|
3875
|
+
let t = requestAnimationFrame(() => c("closing")), n = window.setTimeout(() => c("closed"), Gr);
|
|
3840
3876
|
return () => {
|
|
3841
3877
|
cancelAnimationFrame(t), window.clearTimeout(n);
|
|
3842
3878
|
};
|
|
3843
|
-
}, [e, s]), !l || typeof document > "u" ? null :
|
|
3879
|
+
}, [e, s]), !l || typeof document > "u" ? null : He(/* @__PURE__ */ W("div", {
|
|
3844
3880
|
className: `fcc-fpp-overlay ${r}`,
|
|
3845
3881
|
"data-state": s,
|
|
3846
3882
|
role: "dialog",
|
|
@@ -3851,7 +3887,7 @@ function Wr({ open: e, onClose: t, children: n, className: r = "", closeOnEscape
|
|
|
3851
3887
|
})
|
|
3852
3888
|
}), document.body);
|
|
3853
3889
|
}
|
|
3854
|
-
function
|
|
3890
|
+
function Jr({ title: e, subtitle: t, eyebrow: n, leading: r, actions: i, endActions: a, onClose: o, hidden: s = !1, revealed: c = !1, onMouseEnter: l, onMouseLeave: u, className: d = "" }) {
|
|
3855
3891
|
let f = a || o;
|
|
3856
3892
|
return /* @__PURE__ */ G("div", {
|
|
3857
3893
|
className: `fcc-fpp-header ${d}`,
|
|
@@ -3904,32 +3940,32 @@ function Gr({ title: e, subtitle: t, eyebrow: n, leading: r, actions: i, endActi
|
|
|
3904
3940
|
})]
|
|
3905
3941
|
});
|
|
3906
3942
|
}
|
|
3907
|
-
function
|
|
3943
|
+
function Yr({ onReveal: e, className: t = "" }) {
|
|
3908
3944
|
return /* @__PURE__ */ W("div", {
|
|
3909
3945
|
className: `fcc-fpp-header-reveal-zone ${t}`,
|
|
3910
3946
|
onMouseEnter: e,
|
|
3911
3947
|
"aria-hidden": "true"
|
|
3912
3948
|
});
|
|
3913
3949
|
}
|
|
3914
|
-
function
|
|
3950
|
+
function Xr({ children: e, className: t = "" }) {
|
|
3915
3951
|
return /* @__PURE__ */ W("div", {
|
|
3916
3952
|
className: `fcc-fpp-toolbar ${t}`,
|
|
3917
3953
|
children: e
|
|
3918
3954
|
});
|
|
3919
3955
|
}
|
|
3920
|
-
function
|
|
3956
|
+
function Zr({ children: e, className: t = "" }) {
|
|
3921
3957
|
return /* @__PURE__ */ W("div", {
|
|
3922
3958
|
className: `fcc-fpp-body ${t}`,
|
|
3923
3959
|
children: e
|
|
3924
3960
|
});
|
|
3925
3961
|
}
|
|
3926
|
-
function
|
|
3962
|
+
function Qr({ children: e, className: t = "" }) {
|
|
3927
3963
|
return /* @__PURE__ */ W("div", {
|
|
3928
3964
|
className: `fcc-fpp-main ${t}`,
|
|
3929
3965
|
children: e
|
|
3930
3966
|
});
|
|
3931
3967
|
}
|
|
3932
|
-
function
|
|
3968
|
+
function $r({ children: e, side: t = "right", footer: n, className: r = "" }) {
|
|
3933
3969
|
return /* @__PURE__ */ G("aside", {
|
|
3934
3970
|
className: `fcc-fpp-sidebar fcc-fpp-sidebar-${t} ${r}`,
|
|
3935
3971
|
children: [/* @__PURE__ */ W("div", {
|
|
@@ -3941,13 +3977,13 @@ function Xr({ children: e, side: t = "right", footer: n, className: r = "" }) {
|
|
|
3941
3977
|
})]
|
|
3942
3978
|
});
|
|
3943
3979
|
}
|
|
3944
|
-
function
|
|
3980
|
+
function ei({ children: e, className: t = "" }) {
|
|
3945
3981
|
return /* @__PURE__ */ W("div", {
|
|
3946
3982
|
className: `fcc-fpp-footer ${t}`,
|
|
3947
3983
|
children: e
|
|
3948
3984
|
});
|
|
3949
3985
|
}
|
|
3950
|
-
function
|
|
3986
|
+
function ti({ label: e, value: t, children: n, className: r = "" }) {
|
|
3951
3987
|
return /* @__PURE__ */ G("div", {
|
|
3952
3988
|
className: r,
|
|
3953
3989
|
children: [(e || t) && /* @__PURE__ */ G("div", {
|
|
@@ -3965,7 +4001,7 @@ function Qr({ label: e, value: t, children: n, className: r = "" }) {
|
|
|
3965
4001
|
})]
|
|
3966
4002
|
});
|
|
3967
4003
|
}
|
|
3968
|
-
function
|
|
4004
|
+
function ni({ leading: e, children: t, actions: n, hidden: r = !1, className: i = "" }) {
|
|
3969
4005
|
return /* @__PURE__ */ G("div", {
|
|
3970
4006
|
className: `fcc-fpp-subheader ${i}`,
|
|
3971
4007
|
"data-hidden": r ? "true" : "false",
|
|
@@ -3975,7 +4011,7 @@ function $r({ leading: e, children: t, actions: n, hidden: r = !1, className: i
|
|
|
3975
4011
|
className: "fcc-fpp-subheader-lead",
|
|
3976
4012
|
children: e
|
|
3977
4013
|
}),
|
|
3978
|
-
t !== void 0 && /* @__PURE__ */ W(
|
|
4014
|
+
t !== void 0 && /* @__PURE__ */ W(ri, { children: t }),
|
|
3979
4015
|
n && /* @__PURE__ */ W("div", {
|
|
3980
4016
|
className: "fcc-fpp-subheader-actions",
|
|
3981
4017
|
children: n
|
|
@@ -3983,7 +4019,7 @@ function $r({ leading: e, children: t, actions: n, hidden: r = !1, className: i
|
|
|
3983
4019
|
]
|
|
3984
4020
|
});
|
|
3985
4021
|
}
|
|
3986
|
-
function
|
|
4022
|
+
function ri({ children: e }) {
|
|
3987
4023
|
let t = u(null), [n, r] = d(!1), [a, s] = d(!1), l = i(() => {
|
|
3988
4024
|
let e = t.current;
|
|
3989
4025
|
if (!e) return;
|
|
@@ -4037,27 +4073,27 @@ function ei({ children: e }) {
|
|
|
4037
4073
|
]
|
|
4038
4074
|
});
|
|
4039
4075
|
}
|
|
4040
|
-
var
|
|
4041
|
-
function
|
|
4042
|
-
return typeof window > "u" ? e : Math.floor(window.innerWidth /
|
|
4076
|
+
var ii = 200, ai = 720, oi = 3, si = 8;
|
|
4077
|
+
function ci(e) {
|
|
4078
|
+
return typeof window > "u" ? e : Math.floor(window.innerWidth / oi);
|
|
4043
4079
|
}
|
|
4044
|
-
function
|
|
4045
|
-
let [m, h] = d(() =>
|
|
4046
|
-
if (typeof window > "u" || !s) return Math.min(n,
|
|
4047
|
-
let e = window.localStorage.getItem(s), t = e ? Number(e) : NaN, i =
|
|
4080
|
+
function li({ children: e, side: t = "right", defaultWidth: n = 320, minWidth: r = ii, maxWidth: a = ai, storageKey: s, className: c = "", onWidthChange: l, footer: f, hidden: p = !1 }) {
|
|
4081
|
+
let [m, h] = d(() => ci(a)), [g, _] = d(!1), [v, y] = d(!1), [b, x] = d(() => {
|
|
4082
|
+
if (typeof window > "u" || !s) return Math.min(n, ci(a));
|
|
4083
|
+
let e = window.localStorage.getItem(s), t = e ? Number(e) : NaN, i = ci(a);
|
|
4048
4084
|
return Number.isFinite(t) && t >= r && t <= i ? t : Math.min(n, i);
|
|
4049
4085
|
}), S = u(!1), C = u(0), w = u(b);
|
|
4050
4086
|
o(() => {
|
|
4051
4087
|
if (typeof window > "u") return;
|
|
4052
4088
|
let e = () => {
|
|
4053
|
-
let e =
|
|
4089
|
+
let e = ci(a);
|
|
4054
4090
|
h(e), x((t) => Math.min(t, e));
|
|
4055
4091
|
};
|
|
4056
4092
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
4057
4093
|
}, [a]), o(() => {
|
|
4058
4094
|
!s || typeof window > "u" || window.localStorage.setItem(s, String(b));
|
|
4059
4095
|
}, [s, b]), o(() => {
|
|
4060
|
-
l?.(g ?
|
|
4096
|
+
l?.(g ? si : b);
|
|
4061
4097
|
}, [
|
|
4062
4098
|
b,
|
|
4063
4099
|
g,
|
|
@@ -4090,7 +4126,7 @@ function oi({ children: e, side: t = "right", defaultWidth: n = 320, minWidth: r
|
|
|
4090
4126
|
t,
|
|
4091
4127
|
r,
|
|
4092
4128
|
m
|
|
4093
|
-
]), O = p ? 0 : g ?
|
|
4129
|
+
]), O = p ? 0 : g ? si : b;
|
|
4094
4130
|
return /* @__PURE__ */ G("aside", {
|
|
4095
4131
|
className: `fcc-fpp-sidebar fcc-fpp-sidebar-${t} fcc-fpp-sidebar-resizable ${g ? "fcc-fpp-sidebar-collapsed" : ""} ${p ? "fcc-fpp-sidebar-hidden" : ""} ${c}`,
|
|
4096
4132
|
style: {
|
|
@@ -4112,7 +4148,7 @@ function oi({ children: e, side: t = "right", defaultWidth: n = 320, minWidth: r
|
|
|
4112
4148
|
children: /* @__PURE__ */ W("span", {
|
|
4113
4149
|
className: "fcc-fpp-sidebar-resizer-grip",
|
|
4114
4150
|
"aria-hidden": "true",
|
|
4115
|
-
children: /* @__PURE__ */ W(
|
|
4151
|
+
children: /* @__PURE__ */ W(I, { size: 10 })
|
|
4116
4152
|
})
|
|
4117
4153
|
}), !g && !p && /* @__PURE__ */ G("div", {
|
|
4118
4154
|
className: "fcc-fpp-sidebar-inner",
|
|
@@ -4126,8 +4162,8 @@ function oi({ children: e, side: t = "right", defaultWidth: n = 320, minWidth: r
|
|
|
4126
4162
|
})]
|
|
4127
4163
|
});
|
|
4128
4164
|
}
|
|
4129
|
-
function
|
|
4130
|
-
let [f, p] = d(() =>
|
|
4165
|
+
function ui({ children: e, collapsed: t = !1, className: n = "", ariaLabel: r = "Document controls", storageKey: a, onCollapsedChange: s, showMinimize: c }) {
|
|
4166
|
+
let [f, p] = d(() => fi(a) ?? {
|
|
4131
4167
|
dock: "bottom",
|
|
4132
4168
|
x: null,
|
|
4133
4169
|
y: null
|
|
@@ -4170,7 +4206,7 @@ function si({ children: e, collapsed: t = !1, className: n = "", ariaLabel: r =
|
|
|
4170
4206
|
];
|
|
4171
4207
|
d.sort((e, t) => e.d - t.d);
|
|
4172
4208
|
let f = d[0];
|
|
4173
|
-
_(f.d <=
|
|
4209
|
+
_(f.d <= Kr ? f.dock : null), p({
|
|
4174
4210
|
dock: "free",
|
|
4175
4211
|
x: l,
|
|
4176
4212
|
y: u
|
|
@@ -4201,7 +4237,7 @@ function si({ children: e, collapsed: t = !1, className: n = "", ariaLabel: r =
|
|
|
4201
4237
|
];
|
|
4202
4238
|
i.sort((e, t) => e.d - t.d);
|
|
4203
4239
|
let a = i[0];
|
|
4204
|
-
a.d <=
|
|
4240
|
+
a.d <= Kr && (p({
|
|
4205
4241
|
dock: a.dock,
|
|
4206
4242
|
x: null,
|
|
4207
4243
|
y: null
|
|
@@ -4221,7 +4257,7 @@ function si({ children: e, collapsed: t = !1, className: n = "", ariaLabel: r =
|
|
|
4221
4257
|
alignItems: "flex-start"
|
|
4222
4258
|
};
|
|
4223
4259
|
}, [f]);
|
|
4224
|
-
return /* @__PURE__ */ G(U, { children: [m && /* @__PURE__ */ W(
|
|
4260
|
+
return /* @__PURE__ */ G(U, { children: [m && /* @__PURE__ */ W(di, { activeDock: g }), /* @__PURE__ */ W("div", {
|
|
4225
4261
|
className: `fcc-fpp-bottom-anchor ${t ? "fcc-fpp-bottom-anchor--collapsed" : ""} ${n}`,
|
|
4226
4262
|
"data-dock": f.dock,
|
|
4227
4263
|
"data-orientation": S,
|
|
@@ -4231,7 +4267,7 @@ function si({ children: e, collapsed: t = !1, className: n = "", ariaLabel: r =
|
|
|
4231
4267
|
children: /* @__PURE__ */ G("div", {
|
|
4232
4268
|
ref: b,
|
|
4233
4269
|
className: "fcc-fpp-bottom-wrap",
|
|
4234
|
-
children: [/* @__PURE__ */ W(
|
|
4270
|
+
children: [/* @__PURE__ */ W(pi, {
|
|
4235
4271
|
ariaLabel: r,
|
|
4236
4272
|
collapsed: t,
|
|
4237
4273
|
orientation: S,
|
|
@@ -4242,7 +4278,7 @@ function si({ children: e, collapsed: t = !1, className: n = "", ariaLabel: r =
|
|
|
4242
4278
|
onPointerDown: C,
|
|
4243
4279
|
"aria-label": "Drag to reposition controls",
|
|
4244
4280
|
title: "Drag to reposition. Release near an edge to dock.",
|
|
4245
|
-
children: /* @__PURE__ */ W(
|
|
4281
|
+
children: /* @__PURE__ */ W(fe, {
|
|
4246
4282
|
size: 11,
|
|
4247
4283
|
strokeWidth: 2.25
|
|
4248
4284
|
})
|
|
@@ -4250,7 +4286,7 @@ function si({ children: e, collapsed: t = !1, className: n = "", ariaLabel: r =
|
|
|
4250
4286
|
})
|
|
4251
4287
|
})] });
|
|
4252
4288
|
}
|
|
4253
|
-
function
|
|
4289
|
+
function di({ activeDock: e }) {
|
|
4254
4290
|
return /* @__PURE__ */ G("div", {
|
|
4255
4291
|
className: "fcc-fpp-drop-zones",
|
|
4256
4292
|
"aria-hidden": "true",
|
|
@@ -4294,7 +4330,7 @@ function ci({ activeDock: e }) {
|
|
|
4294
4330
|
]
|
|
4295
4331
|
});
|
|
4296
4332
|
}
|
|
4297
|
-
function
|
|
4333
|
+
function fi(e) {
|
|
4298
4334
|
if (!e || typeof window > "u") return null;
|
|
4299
4335
|
try {
|
|
4300
4336
|
let t = window.localStorage.getItem(e);
|
|
@@ -4311,7 +4347,7 @@ function li(e) {
|
|
|
4311
4347
|
return null;
|
|
4312
4348
|
}
|
|
4313
4349
|
}
|
|
4314
|
-
function
|
|
4350
|
+
function pi({ children: e, ariaLabel: t, collapsed: n, orientation: r = "horizontal" }) {
|
|
4315
4351
|
let a = r === "vertical", s = u(null), [l, f] = d(!1), [p, m] = d(!1), [h, g] = d(!1), _ = i(() => {
|
|
4316
4352
|
let e = s.current;
|
|
4317
4353
|
if (e) if (a) {
|
|
@@ -4378,7 +4414,7 @@ function ui({ children: e, ariaLabel: t, collapsed: n, orientation: r = "horizon
|
|
|
4378
4414
|
}
|
|
4379
4415
|
//#endregion
|
|
4380
4416
|
//#region src/components/ui/Accordion.jsx
|
|
4381
|
-
function
|
|
4417
|
+
function mi({ title: e, header: t, defaultOpen: n = !1, className: r = "", contentClassName: i = "", children: a }) {
|
|
4382
4418
|
let [o, s] = d(n);
|
|
4383
4419
|
return /* @__PURE__ */ G("div", {
|
|
4384
4420
|
className: `accordion-item ${r}`,
|
|
@@ -4406,7 +4442,7 @@ function di({ title: e, header: t, defaultOpen: n = !1, className: r = "", conte
|
|
|
4406
4442
|
})]
|
|
4407
4443
|
});
|
|
4408
4444
|
}
|
|
4409
|
-
function
|
|
4445
|
+
function hi({ items: e = [], className: t = "" }) {
|
|
4410
4446
|
let [n, r] = d(/* @__PURE__ */ new Set());
|
|
4411
4447
|
function i(e) {
|
|
4412
4448
|
r((t) => {
|
|
@@ -4448,12 +4484,12 @@ function fi({ items: e = [], className: t = "" }) {
|
|
|
4448
4484
|
}
|
|
4449
4485
|
//#endregion
|
|
4450
4486
|
//#region src/components/ui/Avatar.jsx
|
|
4451
|
-
var
|
|
4487
|
+
var gi = {
|
|
4452
4488
|
sm: "avatar-sm",
|
|
4453
4489
|
md: "",
|
|
4454
4490
|
lg: "avatar-lg",
|
|
4455
4491
|
xl: "avatar-xl"
|
|
4456
|
-
},
|
|
4492
|
+
}, _i = [
|
|
4457
4493
|
"#5e6ad2",
|
|
4458
4494
|
"#5bb98e",
|
|
4459
4495
|
"#c9a84e",
|
|
@@ -4462,13 +4498,13 @@ var pi = {
|
|
|
4462
4498
|
"#5a8ebf",
|
|
4463
4499
|
"#c4a06a"
|
|
4464
4500
|
];
|
|
4465
|
-
function
|
|
4501
|
+
function vi(e) {
|
|
4466
4502
|
let t = 0;
|
|
4467
4503
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
4468
|
-
return
|
|
4504
|
+
return _i[Math.abs(t) % _i.length];
|
|
4469
4505
|
}
|
|
4470
|
-
function
|
|
4471
|
-
let [o, s] = d(!1), c = t || (n ? n.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase() : "?"), l = a.background ||
|
|
4506
|
+
function yi({ imageUrl: e, initials: t, name: n, size: r = "md", className: i = "", style: a = {} }) {
|
|
4507
|
+
let [o, s] = d(!1), c = t || (n ? n.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase() : "?"), l = a.background || vi(c), u = gi[r] || "";
|
|
4472
4508
|
return e && !o ? /* @__PURE__ */ W("img", {
|
|
4473
4509
|
src: e,
|
|
4474
4510
|
alt: n || "",
|
|
@@ -4489,7 +4525,7 @@ function gi({ imageUrl: e, initials: t, name: n, size: r = "md", className: i =
|
|
|
4489
4525
|
}
|
|
4490
4526
|
//#endregion
|
|
4491
4527
|
//#region src/components/ui/Badge.jsx
|
|
4492
|
-
var
|
|
4528
|
+
var bi = {
|
|
4493
4529
|
default: "var(--text-quaternary)",
|
|
4494
4530
|
secondary: "var(--text-quaternary)",
|
|
4495
4531
|
success: "var(--accent-green)",
|
|
@@ -4501,7 +4537,7 @@ var _i = {
|
|
|
4501
4537
|
orange: "var(--accent-orange)"
|
|
4502
4538
|
};
|
|
4503
4539
|
function $({ variant: e = "default", className: t = "", children: n, showDot: r = !0, ...i }) {
|
|
4504
|
-
let a =
|
|
4540
|
+
let a = bi[e] || bi.default;
|
|
4505
4541
|
return /* @__PURE__ */ G("span", {
|
|
4506
4542
|
className: `badge ${r ? "" : "badge--no-dot"} ${t}`.trim(),
|
|
4507
4543
|
...i,
|
|
@@ -4513,24 +4549,24 @@ function $({ variant: e = "default", className: t = "", children: n, showDot: r
|
|
|
4513
4549
|
}
|
|
4514
4550
|
//#endregion
|
|
4515
4551
|
//#region src/components/ui/Card.jsx
|
|
4516
|
-
var
|
|
4552
|
+
var xi = {
|
|
4517
4553
|
default: "card-default",
|
|
4518
4554
|
green: "card-green",
|
|
4519
4555
|
red: "card-red",
|
|
4520
4556
|
yellow: "card-yellow"
|
|
4521
|
-
},
|
|
4557
|
+
}, Si = n(function({ variant: e = "default", className: t = "", children: n, hoverActions: r, ...i }, a) {
|
|
4522
4558
|
return /* @__PURE__ */ G("div", {
|
|
4523
4559
|
ref: a,
|
|
4524
4560
|
className: [
|
|
4525
4561
|
"card",
|
|
4526
|
-
|
|
4562
|
+
xi[e],
|
|
4527
4563
|
r ? "card-hover-reveal" : "",
|
|
4528
4564
|
t
|
|
4529
4565
|
].filter(Boolean).join(" "),
|
|
4530
4566
|
...i,
|
|
4531
|
-
children: [n, r && /* @__PURE__ */ W(
|
|
4567
|
+
children: [n, r && /* @__PURE__ */ W(Ci, { children: r })]
|
|
4532
4568
|
});
|
|
4533
|
-
}),
|
|
4569
|
+
}), Ci = n(function({ className: e = "", children: t, ariaLabel: n = "Card actions", "aria-label": r, ...i }, a) {
|
|
4534
4570
|
return /* @__PURE__ */ W("div", {
|
|
4535
4571
|
ref: a,
|
|
4536
4572
|
className: `card-hover-action-badge ${e}`,
|
|
@@ -4539,7 +4575,7 @@ var vi = {
|
|
|
4539
4575
|
...i,
|
|
4540
4576
|
children: t
|
|
4541
4577
|
});
|
|
4542
|
-
}),
|
|
4578
|
+
}), wi = n(function({ className: e = "", children: t, type: n = "button", ...r }, i) {
|
|
4543
4579
|
return /* @__PURE__ */ W("button", {
|
|
4544
4580
|
ref: i,
|
|
4545
4581
|
type: n,
|
|
@@ -4547,50 +4583,50 @@ var vi = {
|
|
|
4547
4583
|
...r,
|
|
4548
4584
|
children: t
|
|
4549
4585
|
});
|
|
4550
|
-
}),
|
|
4586
|
+
}), Ti = n(function({ className: e = "", children: t, ...n }, r) {
|
|
4551
4587
|
return /* @__PURE__ */ W("div", {
|
|
4552
4588
|
ref: r,
|
|
4553
4589
|
className: `card-layer ${e}`,
|
|
4554
4590
|
...n,
|
|
4555
4591
|
children: t
|
|
4556
4592
|
});
|
|
4557
|
-
}),
|
|
4593
|
+
}), Ei = n(function({ className: e = "", children: t, ...n }, r) {
|
|
4558
4594
|
return /* @__PURE__ */ W("div", {
|
|
4559
4595
|
ref: r,
|
|
4560
4596
|
className: `card-header ${e}`,
|
|
4561
4597
|
...n,
|
|
4562
4598
|
children: t
|
|
4563
4599
|
});
|
|
4564
|
-
}),
|
|
4600
|
+
}), Di = n(function({ className: e = "", children: t, ...n }, r) {
|
|
4565
4601
|
return /* @__PURE__ */ W("h3", {
|
|
4566
4602
|
ref: r,
|
|
4567
4603
|
className: `card-title ${e}`,
|
|
4568
4604
|
...n,
|
|
4569
4605
|
children: t
|
|
4570
4606
|
});
|
|
4571
|
-
}),
|
|
4607
|
+
}), Oi = n(function({ className: e = "", children: t, ...n }, r) {
|
|
4572
4608
|
return /* @__PURE__ */ W("p", {
|
|
4573
4609
|
ref: r,
|
|
4574
4610
|
className: `card-description ${e}`,
|
|
4575
4611
|
...n,
|
|
4576
4612
|
children: t
|
|
4577
4613
|
});
|
|
4578
|
-
}),
|
|
4614
|
+
}), ki = n(function({ className: e = "", children: t, ...n }, r) {
|
|
4579
4615
|
return /* @__PURE__ */ W("div", {
|
|
4580
4616
|
ref: r,
|
|
4581
4617
|
className: `card-body ${e}`,
|
|
4582
4618
|
...n,
|
|
4583
4619
|
children: t
|
|
4584
4620
|
});
|
|
4585
|
-
}),
|
|
4621
|
+
}), Ai = n(function({ className: e = "", children: t, ...n }, r) {
|
|
4586
4622
|
return /* @__PURE__ */ W("div", {
|
|
4587
4623
|
ref: r,
|
|
4588
4624
|
className: `card-footer ${e}`,
|
|
4589
4625
|
...n,
|
|
4590
4626
|
children: t
|
|
4591
4627
|
});
|
|
4592
|
-
}),
|
|
4593
|
-
function
|
|
4628
|
+
}), ji = 220;
|
|
4629
|
+
function Mi({ open: e, onClose: t, children: n, className: r = "", overlayClassName: i = "", contained: a = !1 }) {
|
|
4594
4630
|
let s = u(null), [c, l] = d(e ? "open" : "closed"), f = e || c !== "closed";
|
|
4595
4631
|
return o(() => {
|
|
4596
4632
|
if (!a) return f ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
@@ -4607,7 +4643,7 @@ function ki({ open: e, onClose: t, children: n, className: r = "", overlayClassN
|
|
|
4607
4643
|
return () => cancelAnimationFrame(e);
|
|
4608
4644
|
}
|
|
4609
4645
|
if (c === "closed") return;
|
|
4610
|
-
let t = requestAnimationFrame(() => l("closing")), n = window.setTimeout(() => l("closed"),
|
|
4646
|
+
let t = requestAnimationFrame(() => l("closing")), n = window.setTimeout(() => l("closed"), ji);
|
|
4611
4647
|
return () => {
|
|
4612
4648
|
cancelAnimationFrame(t), window.clearTimeout(n);
|
|
4613
4649
|
};
|
|
@@ -4624,7 +4660,7 @@ function ki({ open: e, onClose: t, children: n, className: r = "", overlayClassN
|
|
|
4624
4660
|
})
|
|
4625
4661
|
}) : null;
|
|
4626
4662
|
}
|
|
4627
|
-
function
|
|
4663
|
+
function Ni({ children: e, onClose: t, className: n = "" }) {
|
|
4628
4664
|
return /* @__PURE__ */ G("div", {
|
|
4629
4665
|
className: `dialog-header ${n}`,
|
|
4630
4666
|
children: [/* @__PURE__ */ W("div", {
|
|
@@ -4637,25 +4673,25 @@ function Ai({ children: e, onClose: t, className: n = "" }) {
|
|
|
4637
4673
|
})]
|
|
4638
4674
|
});
|
|
4639
4675
|
}
|
|
4640
|
-
function
|
|
4676
|
+
function Pi({ children: e, className: t = "" }) {
|
|
4641
4677
|
return /* @__PURE__ */ W("h3", {
|
|
4642
4678
|
className: `dialog-title ${t}`,
|
|
4643
4679
|
children: e
|
|
4644
4680
|
});
|
|
4645
4681
|
}
|
|
4646
|
-
function
|
|
4682
|
+
function Fi({ children: e, className: t = "" }) {
|
|
4647
4683
|
return /* @__PURE__ */ W("p", {
|
|
4648
4684
|
className: `dialog-description ${t}`,
|
|
4649
4685
|
children: e
|
|
4650
4686
|
});
|
|
4651
4687
|
}
|
|
4652
|
-
function
|
|
4688
|
+
function Ii({ children: e, className: t = "" }) {
|
|
4653
4689
|
return /* @__PURE__ */ W("div", {
|
|
4654
4690
|
className: `dialog-body ${t}`,
|
|
4655
4691
|
children: e
|
|
4656
4692
|
});
|
|
4657
4693
|
}
|
|
4658
|
-
function
|
|
4694
|
+
function Li({ children: e, className: t = "" }) {
|
|
4659
4695
|
return /* @__PURE__ */ W("div", {
|
|
4660
4696
|
className: `dialog-footer ${t}`,
|
|
4661
4697
|
children: e
|
|
@@ -4663,7 +4699,7 @@ function Pi({ children: e, className: t = "" }) {
|
|
|
4663
4699
|
}
|
|
4664
4700
|
//#endregion
|
|
4665
4701
|
//#region src/components/ui/Input.jsx
|
|
4666
|
-
var
|
|
4702
|
+
var Ri = n(function({ id: e, label: t, labelMode: n = "stacked", description: r, error: i, clearable: a = !1, startIcon: o, endIcon: c, placeholder: l, value: f, defaultValue: p, className: m = "", inputClassName: h = "", disabled: g = !1, type: _ = "text", "aria-describedby": v, "aria-invalid": y, onChange: b, ...x }, S) {
|
|
4667
4703
|
let C = u(null), w = s(), T = e || w, E = i && i !== !0 ? i : r, D = E ? `${T}-helper` : void 0, O = !!(i || y), k = !!(t && n === "floating"), A = [v, D].filter(Boolean).join(" ") || void 0, j = k ? " " : l, M = f !== void 0, [N, P] = d(() => String(p ?? "")), F = a && !g && (M ? String(f ?? "") : N).length > 0;
|
|
4668
4704
|
function I(e) {
|
|
4669
4705
|
C.current = e, typeof S == "function" ? S(e) : S && (S.current = e);
|
|
@@ -4757,7 +4793,7 @@ var Fi = n(function({ id: e, label: t, labelMode: n = "stacked", description: r,
|
|
|
4757
4793
|
});
|
|
4758
4794
|
//#endregion
|
|
4759
4795
|
//#region src/components/ui/SearchableSelect.jsx
|
|
4760
|
-
function
|
|
4796
|
+
function zi({ options: e = [], value: t, onChange: n, placeholder: r = "Select...", searchPlaceholder: i = "Search...", allowEmpty: a = !1, disabled: s = !1, className: l = "" }) {
|
|
4761
4797
|
let [f, p] = d(!1), [m, h] = d(""), [g, _] = d(-1), [y, b] = d(null), x = u(null), C = u(null), w = u(null), T = e.filter((e) => e.label.toLowerCase().includes(m.toLowerCase()) || e.description && e.description.toLowerCase().includes(m.toLowerCase())), E = e.find((e) => e.value === t);
|
|
4762
4798
|
o(() => {
|
|
4763
4799
|
f && w.current && w.current.focus();
|
|
@@ -4810,7 +4846,7 @@ function Ii({ options: e = [], value: t, onChange: n, placeholder: r = "Select..
|
|
|
4810
4846
|
size: 14,
|
|
4811
4847
|
className: "searchable-select-chevron"
|
|
4812
4848
|
})]
|
|
4813
|
-
}), f && typeof document < "u" &&
|
|
4849
|
+
}), f && typeof document < "u" && He(/* @__PURE__ */ G("div", {
|
|
4814
4850
|
ref: C,
|
|
4815
4851
|
className: "searchable-select-dropdown",
|
|
4816
4852
|
style: {
|
|
@@ -4823,7 +4859,7 @@ function Ii({ options: e = [], value: t, onChange: n, placeholder: r = "Select..
|
|
|
4823
4859
|
children: [/* @__PURE__ */ G("div", {
|
|
4824
4860
|
className: "searchable-select-search",
|
|
4825
4861
|
children: [
|
|
4826
|
-
/* @__PURE__ */ W(
|
|
4862
|
+
/* @__PURE__ */ W(Ae, { size: 14 }),
|
|
4827
4863
|
/* @__PURE__ */ W("input", {
|
|
4828
4864
|
ref: w,
|
|
4829
4865
|
value: m,
|
|
@@ -4882,7 +4918,7 @@ function Ii({ options: e = [], value: t, onChange: n, placeholder: r = "Select..
|
|
|
4882
4918
|
}
|
|
4883
4919
|
//#endregion
|
|
4884
4920
|
//#region src/components/ui/Sheet.jsx
|
|
4885
|
-
function
|
|
4921
|
+
function Bi({ open: e, onClose: t, side: n = "right", title: r, children: i, className: a = "" }) {
|
|
4886
4922
|
let s = u(null);
|
|
4887
4923
|
return o(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
4888
4924
|
document.body.style.overflow = "";
|
|
@@ -4916,7 +4952,7 @@ function Li({ open: e, onClose: t, side: n = "right", title: r, children: i, cla
|
|
|
4916
4952
|
})
|
|
4917
4953
|
}) : null;
|
|
4918
4954
|
}
|
|
4919
|
-
function
|
|
4955
|
+
function Vi({ children: e, className: t = "" }) {
|
|
4920
4956
|
return /* @__PURE__ */ W("div", {
|
|
4921
4957
|
className: `sheet-footer ${t}`,
|
|
4922
4958
|
children: e
|
|
@@ -4924,17 +4960,17 @@ function Ri({ children: e, className: t = "" }) {
|
|
|
4924
4960
|
}
|
|
4925
4961
|
//#endregion
|
|
4926
4962
|
//#region src/components/ui/StatusMetric.jsx
|
|
4927
|
-
function
|
|
4963
|
+
function Hi(...e) {
|
|
4928
4964
|
return e.filter(Boolean).join(" ");
|
|
4929
4965
|
}
|
|
4930
|
-
var
|
|
4966
|
+
var Ui = {
|
|
4931
4967
|
default: "",
|
|
4932
4968
|
warning: "status-metric--warning"
|
|
4933
4969
|
};
|
|
4934
|
-
function
|
|
4970
|
+
function Wi({ children: e, tone: t = "default", showIcon: n = !0, icon: r, iconSize: i = 12, className: a = "" }) {
|
|
4935
4971
|
let o = r || (t === "warning" ? p : O);
|
|
4936
4972
|
return /* @__PURE__ */ G("span", {
|
|
4937
|
-
className:
|
|
4973
|
+
className: Hi("status-metric", Ui[t], a),
|
|
4938
4974
|
children: [n && o && /* @__PURE__ */ W("span", {
|
|
4939
4975
|
className: "status-metric-icon",
|
|
4940
4976
|
children: /* @__PURE__ */ W(o, { size: i })
|
|
@@ -4946,7 +4982,7 @@ function Vi({ children: e, tone: t = "default", showIcon: n = !0, icon: r, iconS
|
|
|
4946
4982
|
}
|
|
4947
4983
|
//#endregion
|
|
4948
4984
|
//#region src/components/ui/Switch.jsx
|
|
4949
|
-
function
|
|
4985
|
+
function Gi({ checked: e = !1, onCheckedChange: t, disabled: n = !1, size: r = "md", label: i }) {
|
|
4950
4986
|
return /* @__PURE__ */ G("div", {
|
|
4951
4987
|
className: "toggle-row",
|
|
4952
4988
|
children: [i && /* @__PURE__ */ W("span", {
|
|
@@ -4964,13 +5000,13 @@ function Hi({ checked: e = !1, onCheckedChange: t, disabled: n = !1, size: r = "
|
|
|
4964
5000
|
}
|
|
4965
5001
|
//#endregion
|
|
4966
5002
|
//#region src/components/ui/Tabs.jsx
|
|
4967
|
-
var
|
|
5003
|
+
var Ki = e({
|
|
4968
5004
|
value: "",
|
|
4969
5005
|
onChange: () => {},
|
|
4970
5006
|
registerTrigger: () => {},
|
|
4971
5007
|
getTriggerNode: () => null
|
|
4972
5008
|
});
|
|
4973
|
-
function
|
|
5009
|
+
function qi({ defaultValue: e, value: t, onValueChange: n, children: r, className: a = "" }) {
|
|
4974
5010
|
let [o, s] = d(e || ""), c = u(/* @__PURE__ */ new Map()), l = t === void 0 ? o : t, f = n || s, p = i((e, t) => {
|
|
4975
5011
|
if (t) {
|
|
4976
5012
|
c.current.set(e, t);
|
|
@@ -4978,7 +5014,7 @@ function Wi({ defaultValue: e, value: t, onValueChange: n, children: r, classNam
|
|
|
4978
5014
|
}
|
|
4979
5015
|
c.current.delete(e);
|
|
4980
5016
|
}, []), m = i((e) => c.current.get(e) || null, []);
|
|
4981
|
-
return /* @__PURE__ */ W(
|
|
5017
|
+
return /* @__PURE__ */ W(Ki.Provider, {
|
|
4982
5018
|
value: {
|
|
4983
5019
|
value: l,
|
|
4984
5020
|
onChange: f,
|
|
@@ -4991,8 +5027,8 @@ function Wi({ defaultValue: e, value: t, onValueChange: n, children: r, classNam
|
|
|
4991
5027
|
})
|
|
4992
5028
|
});
|
|
4993
5029
|
}
|
|
4994
|
-
function
|
|
4995
|
-
let { value: n, getTriggerNode: r } = a(
|
|
5030
|
+
function Ji({ children: e, className: t = "" }) {
|
|
5031
|
+
let { value: n, getTriggerNode: r } = a(Ki), i = u(null);
|
|
4996
5032
|
return c(() => {
|
|
4997
5033
|
let e = i.current, t = r(n);
|
|
4998
5034
|
if (!e) return;
|
|
@@ -5018,8 +5054,8 @@ function Gi({ children: e, className: t = "" }) {
|
|
|
5018
5054
|
}), e]
|
|
5019
5055
|
});
|
|
5020
5056
|
}
|
|
5021
|
-
function
|
|
5022
|
-
let { value: r, onChange: i, registerTrigger: o } = a(
|
|
5057
|
+
function Yi({ value: e, children: t, className: n = "" }) {
|
|
5058
|
+
let { value: r, onChange: i, registerTrigger: o } = a(Ki), s = r === e;
|
|
5023
5059
|
return /* @__PURE__ */ W("button", {
|
|
5024
5060
|
ref: (t) => o(e, t),
|
|
5025
5061
|
className: `tab ${s ? "active" : ""} ${n}`,
|
|
@@ -5030,8 +5066,8 @@ function Ki({ value: e, children: t, className: n = "" }) {
|
|
|
5030
5066
|
children: t
|
|
5031
5067
|
});
|
|
5032
5068
|
}
|
|
5033
|
-
function
|
|
5034
|
-
let { value: r } = a(
|
|
5069
|
+
function Xi({ value: e, children: t, className: n = "" }) {
|
|
5070
|
+
let { value: r } = a(Ki);
|
|
5035
5071
|
return r === e ? /* @__PURE__ */ W("div", {
|
|
5036
5072
|
className: n,
|
|
5037
5073
|
role: "tabpanel",
|
|
@@ -5040,7 +5076,7 @@ function qi({ value: e, children: t, className: n = "" }) {
|
|
|
5040
5076
|
}
|
|
5041
5077
|
//#endregion
|
|
5042
5078
|
//#region src/components/ui/Textarea.jsx
|
|
5043
|
-
var
|
|
5079
|
+
var Zi = n(function({ className: e = "", startAdornment: t, endAdornment: n, ...r }, i) {
|
|
5044
5080
|
return t || n ? /* @__PURE__ */ G("div", {
|
|
5045
5081
|
className: ["textarea-wrapper", e].filter(Boolean).join(" "),
|
|
5046
5082
|
children: [
|
|
@@ -5066,7 +5102,7 @@ var Ji = n(function({ className: e = "", startAdornment: t, endAdornment: n, ...
|
|
|
5066
5102
|
});
|
|
5067
5103
|
//#endregion
|
|
5068
5104
|
//#region src/components/ui/Tooltip.jsx
|
|
5069
|
-
function
|
|
5105
|
+
function Qi({ content: e, side: t = "top", children: n, className: r = "" }) {
|
|
5070
5106
|
let [i, a] = d(!1), [s, l] = d(null), f = u(null), p = u(null), m = u(null);
|
|
5071
5107
|
function h() {
|
|
5072
5108
|
m.current = setTimeout(() => a(!0), 300);
|
|
@@ -5101,7 +5137,7 @@ function Yi({ content: e, side: t = "top", children: n, className: r = "" }) {
|
|
|
5101
5137
|
position: "relative",
|
|
5102
5138
|
display: "inline-flex"
|
|
5103
5139
|
},
|
|
5104
|
-
children: [n, i && typeof document < "u" &&
|
|
5140
|
+
children: [n, i && typeof document < "u" && He(/* @__PURE__ */ W("div", {
|
|
5105
5141
|
ref: p,
|
|
5106
5142
|
className: `tooltip tooltip-${t} tooltip-portal`,
|
|
5107
5143
|
role: "tooltip",
|
|
@@ -5117,17 +5153,17 @@ function Yi({ content: e, side: t = "top", children: n, className: r = "" }) {
|
|
|
5117
5153
|
}
|
|
5118
5154
|
//#endregion
|
|
5119
5155
|
//#region src/components/ui/viewModeDefaults.js
|
|
5120
|
-
var
|
|
5156
|
+
var $i = {
|
|
5121
5157
|
kanban: k,
|
|
5122
5158
|
board: k,
|
|
5123
5159
|
columns: k,
|
|
5124
|
-
table:
|
|
5125
|
-
list:
|
|
5126
|
-
rows:
|
|
5127
|
-
grid:
|
|
5160
|
+
table: B,
|
|
5161
|
+
list: B,
|
|
5162
|
+
rows: B,
|
|
5163
|
+
grid: z,
|
|
5128
5164
|
calendar: _,
|
|
5129
|
-
map:
|
|
5130
|
-
},
|
|
5165
|
+
map: ne
|
|
5166
|
+
}, ea = [{
|
|
5131
5167
|
value: "kanban",
|
|
5132
5168
|
label: "Kanban",
|
|
5133
5169
|
title: "Board View"
|
|
@@ -5138,13 +5174,13 @@ var Xi = {
|
|
|
5138
5174
|
}];
|
|
5139
5175
|
//#endregion
|
|
5140
5176
|
//#region src/components/ui/ViewModeToggle.jsx
|
|
5141
|
-
function
|
|
5142
|
-
return e.icon ? e.icon :
|
|
5177
|
+
function ta(e) {
|
|
5178
|
+
return e.icon ? e.icon : $i[e.value] ?? null;
|
|
5143
5179
|
}
|
|
5144
|
-
function
|
|
5180
|
+
function na(e, n) {
|
|
5145
5181
|
return e ? r(e) ? e : t(e, { size: n }) : null;
|
|
5146
5182
|
}
|
|
5147
|
-
function
|
|
5183
|
+
function ra({ options: e = ea, value: t, defaultValue: n, onValueChange: r, ariaLabel: a = "View mode", iconSize: s = 16, showLabels: l = !1, className: f = "", optionClassName: p = "" }) {
|
|
5148
5184
|
let m = u(null), h = u(null), g = u(/* @__PURE__ */ new Map()), [_, v] = d(n ?? e[0]?.value ?? ""), y = t === void 0 ? _ : t, b = i(() => {
|
|
5149
5185
|
let e = h.current, t = g.current.get(y);
|
|
5150
5186
|
if (e) {
|
|
@@ -5206,7 +5242,7 @@ function ea({ options: e = Zi, value: t, defaultValue: n, onValueChange: r, aria
|
|
|
5206
5242
|
"aria-hidden": "true",
|
|
5207
5243
|
className: "view-mode-toggle-indicator"
|
|
5208
5244
|
}), e.map((e) => {
|
|
5209
|
-
let t = e.value === y, n =
|
|
5245
|
+
let t = e.value === y, n = na(ta(e), s);
|
|
5210
5246
|
return /* @__PURE__ */ G("button", {
|
|
5211
5247
|
type: "button",
|
|
5212
5248
|
"aria-pressed": t,
|
|
@@ -5236,8 +5272,8 @@ function ea({ options: e = Zi, value: t, defaultValue: n, onValueChange: r, aria
|
|
|
5236
5272
|
}
|
|
5237
5273
|
//#endregion
|
|
5238
5274
|
//#region src/components/ui/CallControlsBar.jsx
|
|
5239
|
-
function
|
|
5240
|
-
return /* @__PURE__ */ W(
|
|
5275
|
+
function ia({ icon: e, label: t, onClick: n, active: r, danger: i, compact: a, title: o }) {
|
|
5276
|
+
return /* @__PURE__ */ W(Qi, {
|
|
5241
5277
|
content: o,
|
|
5242
5278
|
children: /* @__PURE__ */ G("button", {
|
|
5243
5279
|
type: "button",
|
|
@@ -5261,7 +5297,7 @@ function ta({ icon: e, label: t, onClick: n, active: r, danger: i, compact: a, t
|
|
|
5261
5297
|
})
|
|
5262
5298
|
});
|
|
5263
5299
|
}
|
|
5264
|
-
function
|
|
5300
|
+
function aa({ isMuted: e, isOnHold: t, onMute: n, onHold: r, onTransfer: i, onInvite: a, onKeypad: o, onEnd: s, compact: c = !1, hideEnd: l = !1, className: u = "" }) {
|
|
5265
5301
|
return /* @__PURE__ */ G("div", {
|
|
5266
5302
|
className: `call-controls-bar ${u}`,
|
|
5267
5303
|
style: {
|
|
@@ -5271,45 +5307,45 @@ function na({ isMuted: e, isOnHold: t, onMute: n, onHold: r, onTransfer: i, onIn
|
|
|
5271
5307
|
flexWrap: "nowrap"
|
|
5272
5308
|
},
|
|
5273
5309
|
children: [
|
|
5274
|
-
/* @__PURE__ */ W(
|
|
5275
|
-
icon: e ?
|
|
5310
|
+
/* @__PURE__ */ W(ia, {
|
|
5311
|
+
icon: e ? se : oe,
|
|
5276
5312
|
label: e ? "Unmute" : "Mute",
|
|
5277
5313
|
onClick: n,
|
|
5278
5314
|
active: e,
|
|
5279
5315
|
compact: c,
|
|
5280
5316
|
title: "Mute (M)"
|
|
5281
5317
|
}),
|
|
5282
|
-
/* @__PURE__ */ W(
|
|
5283
|
-
icon: t ?
|
|
5318
|
+
/* @__PURE__ */ W(ia, {
|
|
5319
|
+
icon: t ? Ee : he,
|
|
5284
5320
|
label: t ? "Resume" : "Hold",
|
|
5285
5321
|
onClick: r,
|
|
5286
5322
|
active: t,
|
|
5287
5323
|
compact: c,
|
|
5288
5324
|
title: "Hold (H)"
|
|
5289
5325
|
}),
|
|
5290
|
-
/* @__PURE__ */ W(
|
|
5291
|
-
icon:
|
|
5326
|
+
/* @__PURE__ */ W(ia, {
|
|
5327
|
+
icon: ye,
|
|
5292
5328
|
label: "Transfer",
|
|
5293
5329
|
onClick: i,
|
|
5294
5330
|
compact: c,
|
|
5295
5331
|
title: "Transfer (T)"
|
|
5296
5332
|
}),
|
|
5297
|
-
/* @__PURE__ */ W(
|
|
5298
|
-
icon:
|
|
5333
|
+
/* @__PURE__ */ W(ia, {
|
|
5334
|
+
icon: ze,
|
|
5299
5335
|
label: "Invite",
|
|
5300
5336
|
onClick: a,
|
|
5301
5337
|
compact: c,
|
|
5302
5338
|
title: "Invite observer"
|
|
5303
5339
|
}),
|
|
5304
|
-
/* @__PURE__ */ W(
|
|
5305
|
-
icon:
|
|
5340
|
+
/* @__PURE__ */ W(ia, {
|
|
5341
|
+
icon: L,
|
|
5306
5342
|
label: "Keypad",
|
|
5307
5343
|
onClick: o,
|
|
5308
5344
|
compact: c,
|
|
5309
5345
|
title: "Keypad"
|
|
5310
5346
|
}),
|
|
5311
|
-
!l && /* @__PURE__ */ W(
|
|
5312
|
-
icon:
|
|
5347
|
+
!l && /* @__PURE__ */ W(ia, {
|
|
5348
|
+
icon: Se,
|
|
5313
5349
|
label: "End",
|
|
5314
5350
|
onClick: s,
|
|
5315
5351
|
danger: !0,
|
|
@@ -5321,15 +5357,15 @@ function na({ isMuted: e, isOnHold: t, onMute: n, onHold: r, onTransfer: i, onIn
|
|
|
5321
5357
|
}
|
|
5322
5358
|
//#endregion
|
|
5323
5359
|
//#region src/components/phone/phoneUtils.js
|
|
5324
|
-
function
|
|
5360
|
+
function oa(e) {
|
|
5325
5361
|
return e == null || Number.isNaN(e) ? "0:00" : `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
5326
5362
|
}
|
|
5327
|
-
function
|
|
5363
|
+
function sa(e) {
|
|
5328
5364
|
if (!e) return "";
|
|
5329
5365
|
let t = new Date(e).getTime() - Date.now();
|
|
5330
|
-
return t <= 0 ? "now" :
|
|
5366
|
+
return t <= 0 ? "now" : oa(Math.ceil(t / 1e3));
|
|
5331
5367
|
}
|
|
5332
|
-
function
|
|
5368
|
+
function ca(e) {
|
|
5333
5369
|
if (!e) return "";
|
|
5334
5370
|
let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 1e3);
|
|
5335
5371
|
if (n < 60) return "just now";
|
|
@@ -5340,12 +5376,12 @@ function aa(e) {
|
|
|
5340
5376
|
let a = Math.floor(i / 24);
|
|
5341
5377
|
return a === 1 ? "Yesterday" : a < 7 ? `${a}d ago` : new Date(e).toLocaleDateString();
|
|
5342
5378
|
}
|
|
5343
|
-
function
|
|
5379
|
+
function la(e) {
|
|
5344
5380
|
if (!e) return "none";
|
|
5345
5381
|
let t = new Date(e).getTime() - Date.now();
|
|
5346
5382
|
return t <= 0 ? "overdue" : t < 30 * 1e3 ? "urgent" : t < 120 * 1e3 ? "warning" : "normal";
|
|
5347
5383
|
}
|
|
5348
|
-
var
|
|
5384
|
+
var ua = {
|
|
5349
5385
|
intake: "Intake",
|
|
5350
5386
|
plan_review: "Plan Review",
|
|
5351
5387
|
inspections: "Inspections",
|
|
@@ -5355,31 +5391,31 @@ var sa = {
|
|
|
5355
5391
|
sales: "Sales",
|
|
5356
5392
|
escalations: "Escalations"
|
|
5357
5393
|
};
|
|
5358
|
-
function
|
|
5359
|
-
return e ?
|
|
5394
|
+
function da(e) {
|
|
5395
|
+
return e ? ua[e] ? ua[e] : e.split("_").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ") : "";
|
|
5360
5396
|
}
|
|
5361
|
-
var
|
|
5397
|
+
var fa = {
|
|
5362
5398
|
client: "Client",
|
|
5363
5399
|
building_department: "Building Dept",
|
|
5364
5400
|
staff: "Staff",
|
|
5365
5401
|
unknown: "Unknown"
|
|
5366
5402
|
};
|
|
5367
|
-
function
|
|
5368
|
-
return
|
|
5403
|
+
function pa(e) {
|
|
5404
|
+
return fa[e] || "Unknown";
|
|
5369
5405
|
}
|
|
5370
|
-
var
|
|
5406
|
+
var ma = {
|
|
5371
5407
|
open: "Open",
|
|
5372
5408
|
in_progress: "In progress",
|
|
5373
5409
|
resolved: "Resolved",
|
|
5374
5410
|
closed: "Closed",
|
|
5375
5411
|
awaiting_reply: "Awaiting reply"
|
|
5376
5412
|
};
|
|
5377
|
-
function
|
|
5378
|
-
return
|
|
5413
|
+
function ha(e) {
|
|
5414
|
+
return ma[e] || (e ? e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()) : "");
|
|
5379
5415
|
}
|
|
5380
5416
|
//#endregion
|
|
5381
5417
|
//#region src/components/ui/TicketLinkChip.jsx
|
|
5382
|
-
var
|
|
5418
|
+
var ga = {
|
|
5383
5419
|
intake: "var(--accent-blue)",
|
|
5384
5420
|
plan_review: "var(--accent-purple)",
|
|
5385
5421
|
inspections: "var(--accent-green)",
|
|
@@ -5389,7 +5425,7 @@ var pa = {
|
|
|
5389
5425
|
sales: "var(--accent-orange)",
|
|
5390
5426
|
escalations: "var(--accent-red)"
|
|
5391
5427
|
};
|
|
5392
|
-
function
|
|
5428
|
+
function _a(e) {
|
|
5393
5429
|
switch (e) {
|
|
5394
5430
|
case "resolved":
|
|
5395
5431
|
case "closed": return "success";
|
|
@@ -5398,12 +5434,12 @@ function ma(e) {
|
|
|
5398
5434
|
default: return "secondary";
|
|
5399
5435
|
}
|
|
5400
5436
|
}
|
|
5401
|
-
function
|
|
5437
|
+
function va(e, t) {
|
|
5402
5438
|
return e ? e.length > t ? `${e.slice(0, t - 1)}…` : e : "";
|
|
5403
5439
|
}
|
|
5404
|
-
function
|
|
5440
|
+
function ya({ ticket: e, onClick: t, variant: n = "default", className: r = "" }) {
|
|
5405
5441
|
if (!e) return null;
|
|
5406
|
-
let i =
|
|
5442
|
+
let i = ga[e.department] ?? ga.tech_support, a = t ? "button" : "span", o = n === "compact" ? `#${e.number}` : `#${e.number} · ${va(e.title, 28)}`;
|
|
5407
5443
|
return n === "detailed" ? /* @__PURE__ */ G(a, {
|
|
5408
5444
|
type: t ? "button" : void 0,
|
|
5409
5445
|
onClick: t,
|
|
@@ -5447,7 +5483,7 @@ function ga({ ticket: e, onClick: t, variant: n = "default", className: r = "" }
|
|
|
5447
5483
|
}),
|
|
5448
5484
|
/* @__PURE__ */ G("span", {
|
|
5449
5485
|
style: { color: "var(--text-secondary)" },
|
|
5450
|
-
children: ["· ",
|
|
5486
|
+
children: ["· ", va(e.title, 40)]
|
|
5451
5487
|
})
|
|
5452
5488
|
]
|
|
5453
5489
|
}), /* @__PURE__ */ G("span", {
|
|
@@ -5460,10 +5496,10 @@ function ga({ ticket: e, onClick: t, variant: n = "default", className: r = "" }
|
|
|
5460
5496
|
variant: "secondary",
|
|
5461
5497
|
showDot: !1,
|
|
5462
5498
|
className: "badge--no-dot",
|
|
5463
|
-
children:
|
|
5499
|
+
children: da(e.department)
|
|
5464
5500
|
}), e.status && /* @__PURE__ */ W($, {
|
|
5465
|
-
variant:
|
|
5466
|
-
children:
|
|
5501
|
+
variant: _a(e.status),
|
|
5502
|
+
children: ha(e.status)
|
|
5467
5503
|
})]
|
|
5468
5504
|
})]
|
|
5469
5505
|
}) : /* @__PURE__ */ G(a, {
|
|
@@ -5502,19 +5538,19 @@ function ga({ ticket: e, onClick: t, variant: n = "default", className: r = "" }
|
|
|
5502
5538
|
}
|
|
5503
5539
|
//#endregion
|
|
5504
5540
|
//#region src/components/ui/PresenceDot.jsx
|
|
5505
|
-
var
|
|
5541
|
+
var ba = {
|
|
5506
5542
|
available: "var(--accent-green, #22c55e)",
|
|
5507
5543
|
busy: "var(--accent-yellow, #f59e0b)",
|
|
5508
5544
|
in_call: "var(--accent-yellow, #f59e0b)",
|
|
5509
5545
|
dnd: "var(--accent-red, #ef4444)",
|
|
5510
5546
|
offline: "var(--text-tertiary, #71717a)"
|
|
5511
|
-
},
|
|
5547
|
+
}, xa = {
|
|
5512
5548
|
xs: 6,
|
|
5513
5549
|
sm: 8,
|
|
5514
5550
|
md: 10
|
|
5515
5551
|
};
|
|
5516
|
-
function
|
|
5517
|
-
let r =
|
|
5552
|
+
function Sa({ status: e = "offline", size: t = "sm", className: n = "" }) {
|
|
5553
|
+
let r = xa[t] ?? 8, i = ba[e] ?? ba.offline;
|
|
5518
5554
|
return /* @__PURE__ */ W("span", {
|
|
5519
5555
|
className: `presence-dot ${e === "in_call" ? "presence-dot-pulse" : ""} ${n}`,
|
|
5520
5556
|
style: {
|
|
@@ -5531,13 +5567,13 @@ function ya({ status: e = "offline", size: t = "sm", className: n = "" }) {
|
|
|
5531
5567
|
}
|
|
5532
5568
|
//#endregion
|
|
5533
5569
|
//#region src/components/ui/PresenceAvatar.jsx
|
|
5534
|
-
var
|
|
5570
|
+
var Ca = {
|
|
5535
5571
|
sm: "sm",
|
|
5536
5572
|
md: "md",
|
|
5537
5573
|
lg: "lg"
|
|
5538
5574
|
};
|
|
5539
|
-
function
|
|
5540
|
-
let c =
|
|
5575
|
+
function wa({ name: e, initials: t, avatarUrl: n, status: r = "offline", activity: i = null, size: a = "md", showActivity: o = !0, className: s = "" }) {
|
|
5576
|
+
let c = Ca[a] || "md", l = a === "sm" ? "xs" : a === "md" ? "sm" : "md";
|
|
5541
5577
|
return /* @__PURE__ */ G("div", {
|
|
5542
5578
|
className: `presence-avatar ${s}`,
|
|
5543
5579
|
style: {
|
|
@@ -5550,7 +5586,7 @@ function xa({ name: e, initials: t, avatarUrl: n, status: r = "offline", activit
|
|
|
5550
5586
|
position: "relative",
|
|
5551
5587
|
display: "inline-flex"
|
|
5552
5588
|
},
|
|
5553
|
-
children: [/* @__PURE__ */ W(
|
|
5589
|
+
children: [/* @__PURE__ */ W(yi, {
|
|
5554
5590
|
name: e,
|
|
5555
5591
|
initials: t,
|
|
5556
5592
|
imageUrl: n,
|
|
@@ -5561,7 +5597,7 @@ function xa({ name: e, initials: t, avatarUrl: n, status: r = "offline", activit
|
|
|
5561
5597
|
left: -1,
|
|
5562
5598
|
top: -1
|
|
5563
5599
|
},
|
|
5564
|
-
children: /* @__PURE__ */ W(
|
|
5600
|
+
children: /* @__PURE__ */ W(Sa, {
|
|
5565
5601
|
status: r,
|
|
5566
5602
|
size: l
|
|
5567
5603
|
})
|
|
@@ -5578,27 +5614,27 @@ function xa({ name: e, initials: t, avatarUrl: n, status: r = "offline", activit
|
|
|
5578
5614
|
}
|
|
5579
5615
|
//#endregion
|
|
5580
5616
|
//#region src/components/ui/Callbar.jsx
|
|
5581
|
-
var
|
|
5617
|
+
var Ta = {
|
|
5582
5618
|
connecting: "Connecting…",
|
|
5583
5619
|
ringing: "Ringing…",
|
|
5584
5620
|
connected: "Connected",
|
|
5585
5621
|
on_hold: "On hold",
|
|
5586
5622
|
ending: "Ending…"
|
|
5587
|
-
},
|
|
5623
|
+
}, Ea = {
|
|
5588
5624
|
connecting: "info",
|
|
5589
5625
|
ringing: "info",
|
|
5590
5626
|
connected: "success",
|
|
5591
5627
|
on_hold: "warning",
|
|
5592
5628
|
ending: "error"
|
|
5593
5629
|
};
|
|
5594
|
-
function
|
|
5630
|
+
function Da(e) {
|
|
5595
5631
|
return e === "connected" ? "var(--accent-green)" : e === "on_hold" ? "var(--accent-yellow)" : e === "ending" ? "var(--accent-red)" : "var(--accent-blue)";
|
|
5596
5632
|
}
|
|
5597
|
-
function
|
|
5633
|
+
function Oa(e) {
|
|
5598
5634
|
return e === "connecting" || e === "ringing";
|
|
5599
5635
|
}
|
|
5600
|
-
function
|
|
5601
|
-
let [y, b] = d(!1), x = _ || y, C =
|
|
5636
|
+
function ka({ state: e = "connected", caller: t = {}, ticket: n = null, durationSec: r = 0, isMuted: i, isOnHold: a, observers: o = [], recordingConsentPending: s = !1, onMute: c, onHold: u, onTransfer: f, onInvite: p, onKeypad: m, onEnd: h, onMinimize: g, minimized: _ = !1, className: v = "" }) {
|
|
5637
|
+
let [y, b] = d(!1), x = _ || y, C = Ta[e] || e, w = Oa(e), E = Da(e), D = l(() => `${Math.floor(r / 60)}:${Math.floor(r % 60).toString().padStart(2, "0")}`, [r]), O = o.slice(0, 3), k = Math.max(0, o.length - 3), A = () => {
|
|
5602
5638
|
b((e) => !e), g?.();
|
|
5603
5639
|
};
|
|
5604
5640
|
return x ? /* @__PURE__ */ G("div", {
|
|
@@ -5650,7 +5686,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5650
5686
|
gap: 6
|
|
5651
5687
|
},
|
|
5652
5688
|
children: [
|
|
5653
|
-
/* @__PURE__ */ W(
|
|
5689
|
+
/* @__PURE__ */ W(aa, {
|
|
5654
5690
|
isMuted: i,
|
|
5655
5691
|
isOnHold: a,
|
|
5656
5692
|
onMute: c,
|
|
@@ -5667,7 +5703,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5667
5703
|
size: "sm",
|
|
5668
5704
|
onClick: h,
|
|
5669
5705
|
"aria-label": "End call",
|
|
5670
|
-
children: [/* @__PURE__ */ W(
|
|
5706
|
+
children: [/* @__PURE__ */ W(Se, {
|
|
5671
5707
|
size: 13,
|
|
5672
5708
|
style: { marginRight: 4 }
|
|
5673
5709
|
}), "End"]
|
|
@@ -5720,7 +5756,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5720
5756
|
gap: 8
|
|
5721
5757
|
},
|
|
5722
5758
|
children: [/* @__PURE__ */ W($, {
|
|
5723
|
-
variant:
|
|
5759
|
+
variant: Ea[e] || "secondary",
|
|
5724
5760
|
children: C
|
|
5725
5761
|
}), (e === "connected" || e === "on_hold") && /* @__PURE__ */ W("span", {
|
|
5726
5762
|
style: {
|
|
@@ -5763,7 +5799,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5763
5799
|
},
|
|
5764
5800
|
children: t.number
|
|
5765
5801
|
})]
|
|
5766
|
-
}), n ? /* @__PURE__ */ W(
|
|
5802
|
+
}), n ? /* @__PURE__ */ W(ya, {
|
|
5767
5803
|
ticket: n,
|
|
5768
5804
|
variant: "compact"
|
|
5769
5805
|
}) : /* @__PURE__ */ W("button", {
|
|
@@ -5781,7 +5817,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5781
5817
|
flexShrink: 0
|
|
5782
5818
|
},
|
|
5783
5819
|
children: [
|
|
5784
|
-
O.map((e) => /* @__PURE__ */ W(
|
|
5820
|
+
O.map((e) => /* @__PURE__ */ W(wa, {
|
|
5785
5821
|
name: e.name,
|
|
5786
5822
|
initials: e.initials,
|
|
5787
5823
|
avatarUrl: e.avatarUrl,
|
|
@@ -5798,7 +5834,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5798
5834
|
},
|
|
5799
5835
|
children: ["+", k]
|
|
5800
5836
|
}),
|
|
5801
|
-
/* @__PURE__ */ W(
|
|
5837
|
+
/* @__PURE__ */ W(aa, {
|
|
5802
5838
|
isMuted: i,
|
|
5803
5839
|
isOnHold: a,
|
|
5804
5840
|
onMute: c,
|
|
@@ -5815,7 +5851,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5815
5851
|
size: "sm",
|
|
5816
5852
|
onClick: h,
|
|
5817
5853
|
"aria-label": "End call",
|
|
5818
|
-
children: [/* @__PURE__ */ W(
|
|
5854
|
+
children: [/* @__PURE__ */ W(Se, {
|
|
5819
5855
|
size: 14,
|
|
5820
5856
|
style: { marginRight: 6 }
|
|
5821
5857
|
}), "End call"]
|
|
@@ -5844,7 +5880,7 @@ function Ea({ state: e = "connected", caller: t = {}, ticket: n = null, duration
|
|
|
5844
5880
|
}
|
|
5845
5881
|
//#endregion
|
|
5846
5882
|
//#region src/components/ui/CallCard.jsx
|
|
5847
|
-
var
|
|
5883
|
+
var Aa = {
|
|
5848
5884
|
client: {
|
|
5849
5885
|
accent: "var(--accent-green)",
|
|
5850
5886
|
variant: "success"
|
|
@@ -5862,17 +5898,17 @@ var Da = {
|
|
|
5862
5898
|
variant: "warning"
|
|
5863
5899
|
}
|
|
5864
5900
|
};
|
|
5865
|
-
function
|
|
5901
|
+
function ja(e) {
|
|
5866
5902
|
return e ? Math.max(0, Math.floor((Date.now() - new Date(e).getTime()) / 1e3)) : 0;
|
|
5867
5903
|
}
|
|
5868
|
-
function
|
|
5869
|
-
let [_, v] = d(() =>
|
|
5904
|
+
function Ma({ variant: e = "primary", callerName: t, callerNumber: n, callerType: r = "unknown", avatarUrl: i, ticket: a = null, ticketCandidates: s = [], projectRef: c = null, transferContext: l = null, ringStartedAt: u, onAccept: f, onDecline: p, onSendToVoicemail: m, onPromote: h, className: g = "" }) {
|
|
5905
|
+
let [_, v] = d(() => ja(u)), [y, b] = d(s[0]?.id || "none");
|
|
5870
5906
|
o(() => {
|
|
5871
5907
|
if (!u) return;
|
|
5872
|
-
let e = setInterval(() => v(
|
|
5908
|
+
let e = setInterval(() => v(ja(u)), 1e3);
|
|
5873
5909
|
return () => clearInterval(e);
|
|
5874
5910
|
}, [u]);
|
|
5875
|
-
let x =
|
|
5911
|
+
let x = Aa[r] || Aa.unknown;
|
|
5876
5912
|
return e === "mini" ? /* @__PURE__ */ G("div", {
|
|
5877
5913
|
role: "button",
|
|
5878
5914
|
tabIndex: 0,
|
|
@@ -5898,7 +5934,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
5898
5934
|
cursor: "pointer"
|
|
5899
5935
|
},
|
|
5900
5936
|
children: [
|
|
5901
|
-
/* @__PURE__ */ W(
|
|
5937
|
+
/* @__PURE__ */ W(yi, {
|
|
5902
5938
|
name: t,
|
|
5903
5939
|
imageUrl: i,
|
|
5904
5940
|
size: "sm"
|
|
@@ -5927,14 +5963,14 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
5927
5963
|
variant: x.variant,
|
|
5928
5964
|
showDot: !1,
|
|
5929
5965
|
className: "badge--no-dot",
|
|
5930
|
-
children:
|
|
5966
|
+
children: pa(r)
|
|
5931
5967
|
})]
|
|
5932
5968
|
}), /* @__PURE__ */ G("div", {
|
|
5933
5969
|
style: {
|
|
5934
5970
|
fontSize: "var(--text-xs)",
|
|
5935
5971
|
color: "var(--text-tertiary)"
|
|
5936
5972
|
},
|
|
5937
|
-
children: ["Ringing · ",
|
|
5973
|
+
children: ["Ringing · ", oa(_)]
|
|
5938
5974
|
})]
|
|
5939
5975
|
}),
|
|
5940
5976
|
/* @__PURE__ */ W("button", {
|
|
@@ -5942,7 +5978,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
5942
5978
|
className: "btn btn-ghost btn-icon btn-sm",
|
|
5943
5979
|
onClick: () => f?.(),
|
|
5944
5980
|
"aria-label": "Accept",
|
|
5945
|
-
children: /* @__PURE__ */ W(
|
|
5981
|
+
children: /* @__PURE__ */ W(ve, {
|
|
5946
5982
|
size: 16,
|
|
5947
5983
|
style: { color: "var(--accent-green)" }
|
|
5948
5984
|
})
|
|
@@ -5952,7 +5988,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
5952
5988
|
className: "btn btn-ghost btn-icon btn-sm",
|
|
5953
5989
|
onClick: p,
|
|
5954
5990
|
"aria-label": "Decline",
|
|
5955
|
-
children: /* @__PURE__ */ W(
|
|
5991
|
+
children: /* @__PURE__ */ W(Se, { size: 16 })
|
|
5956
5992
|
})
|
|
5957
5993
|
]
|
|
5958
5994
|
}) : /* @__PURE__ */ G("div", {
|
|
@@ -6010,7 +6046,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6010
6046
|
alignItems: "center",
|
|
6011
6047
|
minWidth: 0
|
|
6012
6048
|
},
|
|
6013
|
-
children: [/* @__PURE__ */ W(
|
|
6049
|
+
children: [/* @__PURE__ */ W(yi, {
|
|
6014
6050
|
name: t,
|
|
6015
6051
|
imageUrl: i,
|
|
6016
6052
|
size: "md"
|
|
@@ -6035,7 +6071,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6035
6071
|
variant: x.variant,
|
|
6036
6072
|
showDot: !1,
|
|
6037
6073
|
className: "badge--no-dot",
|
|
6038
|
-
children:
|
|
6074
|
+
children: pa(r)
|
|
6039
6075
|
})]
|
|
6040
6076
|
}), /* @__PURE__ */ W("div", {
|
|
6041
6077
|
style: {
|
|
@@ -6056,7 +6092,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6056
6092
|
children: [/* @__PURE__ */ W("span", {
|
|
6057
6093
|
style: { marginRight: 4 },
|
|
6058
6094
|
children: "•"
|
|
6059
|
-
}),
|
|
6095
|
+
}), oa(_)]
|
|
6060
6096
|
})]
|
|
6061
6097
|
}), /* @__PURE__ */ W("div", {
|
|
6062
6098
|
style: {
|
|
@@ -6069,7 +6105,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6069
6105
|
flexDirection: "column",
|
|
6070
6106
|
gap: 6
|
|
6071
6107
|
},
|
|
6072
|
-
children: [/* @__PURE__ */ W(
|
|
6108
|
+
children: [/* @__PURE__ */ W(ya, {
|
|
6073
6109
|
ticket: a,
|
|
6074
6110
|
variant: "detailed"
|
|
6075
6111
|
}), c && /* @__PURE__ */ W("div", {
|
|
@@ -6107,7 +6143,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6107
6143
|
name: "ticket-cand",
|
|
6108
6144
|
checked: y === e.id,
|
|
6109
6145
|
onChange: () => b(e.id)
|
|
6110
|
-
}), /* @__PURE__ */ W(
|
|
6146
|
+
}), /* @__PURE__ */ W(ya, {
|
|
6111
6147
|
ticket: e,
|
|
6112
6148
|
variant: "compact"
|
|
6113
6149
|
})]
|
|
@@ -6167,7 +6203,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6167
6203
|
size: "sm",
|
|
6168
6204
|
onClick: m,
|
|
6169
6205
|
"aria-label": "Send to voicemail",
|
|
6170
|
-
children: /* @__PURE__ */ W(
|
|
6206
|
+
children: /* @__PURE__ */ W(Ve, { size: 14 })
|
|
6171
6207
|
}),
|
|
6172
6208
|
/* @__PURE__ */ W(Q, {
|
|
6173
6209
|
type: "button",
|
|
@@ -6184,7 +6220,7 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6184
6220
|
!a && s.length > 0 ? y === "none" ? f?.("none") : y === "new" ? f?.("new") : f?.(y) : f?.();
|
|
6185
6221
|
},
|
|
6186
6222
|
style: { fontWeight: 600 },
|
|
6187
|
-
children: [/* @__PURE__ */ W(
|
|
6223
|
+
children: [/* @__PURE__ */ W(ve, {
|
|
6188
6224
|
size: 14,
|
|
6189
6225
|
style: { marginRight: 6 }
|
|
6190
6226
|
}), "Accept"]
|
|
@@ -6196,26 +6232,26 @@ function ka({ variant: e = "primary", callerName: t, callerNumber: n, callerType
|
|
|
6196
6232
|
}
|
|
6197
6233
|
//#endregion
|
|
6198
6234
|
//#region src/components/phone/phoneHistoryUtils.js
|
|
6199
|
-
var
|
|
6235
|
+
var Na = {
|
|
6200
6236
|
completed: "var(--accent-green)",
|
|
6201
6237
|
voicemail: "var(--accent-yellow)",
|
|
6202
6238
|
missed: "var(--accent-red)",
|
|
6203
6239
|
transferred: "var(--accent-purple)",
|
|
6204
6240
|
callback: "var(--accent-blue)"
|
|
6205
6241
|
};
|
|
6206
|
-
function
|
|
6242
|
+
function Pa(e) {
|
|
6207
6243
|
return e ? e.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase() : "?";
|
|
6208
6244
|
}
|
|
6209
|
-
function
|
|
6210
|
-
return t === "missed" ?
|
|
6245
|
+
function Fa(e, t) {
|
|
6246
|
+
return t === "missed" ? xe : t === "voicemail" ? Ve : t === "transferred" ? ye : e === "inbound" ? be : Ce;
|
|
6211
6247
|
}
|
|
6212
|
-
function
|
|
6248
|
+
function Ia(e) {
|
|
6213
6249
|
return e ? new Date(e).toLocaleTimeString([], {
|
|
6214
6250
|
hour: "numeric",
|
|
6215
6251
|
minute: "2-digit"
|
|
6216
6252
|
}) : "";
|
|
6217
6253
|
}
|
|
6218
|
-
function
|
|
6254
|
+
function La(e) {
|
|
6219
6255
|
return e ? new Date(e).toLocaleDateString([], {
|
|
6220
6256
|
month: "short",
|
|
6221
6257
|
day: "numeric"
|
|
@@ -6223,7 +6259,7 @@ function Pa(e) {
|
|
|
6223
6259
|
}
|
|
6224
6260
|
//#endregion
|
|
6225
6261
|
//#region src/components/phone/phoneHistoryRow.jsx
|
|
6226
|
-
function
|
|
6262
|
+
function Ra({ name: e, avatarUrl: t, children: n }) {
|
|
6227
6263
|
let [r, i] = d(!1);
|
|
6228
6264
|
return /* @__PURE__ */ G("span", {
|
|
6229
6265
|
className: "phone-sp-history-avatar",
|
|
@@ -6233,10 +6269,10 @@ function Fa({ name: e, avatarUrl: t, children: n }) {
|
|
|
6233
6269
|
alt: "",
|
|
6234
6270
|
className: "phone-sp-history-avatar-img",
|
|
6235
6271
|
onError: () => i(!0)
|
|
6236
|
-
}) :
|
|
6272
|
+
}) : Pa(e), n]
|
|
6237
6273
|
});
|
|
6238
6274
|
}
|
|
6239
|
-
function
|
|
6275
|
+
function za({ children: e, title: t }) {
|
|
6240
6276
|
return /* @__PURE__ */ W("span", {
|
|
6241
6277
|
className: "phone-sp-history-avatar-dir",
|
|
6242
6278
|
title: t,
|
|
@@ -6245,7 +6281,7 @@ function Ia({ children: e, title: t }) {
|
|
|
6245
6281
|
}
|
|
6246
6282
|
//#endregion
|
|
6247
6283
|
//#region src/components/phone/FCCCallsSidePanel.jsx
|
|
6248
|
-
var
|
|
6284
|
+
var Ba = [
|
|
6249
6285
|
{
|
|
6250
6286
|
value: "intake",
|
|
6251
6287
|
label: "Intake"
|
|
@@ -6282,7 +6318,7 @@ var La = [
|
|
|
6282
6318
|
value: "global_support",
|
|
6283
6319
|
label: "Global Support"
|
|
6284
6320
|
}
|
|
6285
|
-
],
|
|
6321
|
+
], Va = [
|
|
6286
6322
|
{
|
|
6287
6323
|
id: "dial",
|
|
6288
6324
|
label: "Dial"
|
|
@@ -6295,7 +6331,7 @@ var La = [
|
|
|
6295
6331
|
id: "voicemail",
|
|
6296
6332
|
label: "Voicemail"
|
|
6297
6333
|
}
|
|
6298
|
-
],
|
|
6334
|
+
], Ha = [
|
|
6299
6335
|
{
|
|
6300
6336
|
d: "1",
|
|
6301
6337
|
l: ""
|
|
@@ -6344,7 +6380,7 @@ var La = [
|
|
|
6344
6380
|
d: "#",
|
|
6345
6381
|
l: ""
|
|
6346
6382
|
}
|
|
6347
|
-
],
|
|
6383
|
+
], Ua = [
|
|
6348
6384
|
{
|
|
6349
6385
|
id: "open",
|
|
6350
6386
|
label: "Open"
|
|
@@ -6361,7 +6397,7 @@ var La = [
|
|
|
6361
6397
|
id: "all",
|
|
6362
6398
|
label: "All"
|
|
6363
6399
|
}
|
|
6364
|
-
],
|
|
6400
|
+
], Wa = [
|
|
6365
6401
|
{
|
|
6366
6402
|
id: "pending",
|
|
6367
6403
|
label: "Pending"
|
|
@@ -6374,47 +6410,47 @@ var La = [
|
|
|
6374
6410
|
id: "all",
|
|
6375
6411
|
label: "All"
|
|
6376
6412
|
}
|
|
6377
|
-
],
|
|
6413
|
+
], Ga = {
|
|
6378
6414
|
today: "TODAY",
|
|
6379
6415
|
yesterday: "YESTERDAY",
|
|
6380
6416
|
thisweek: "EARLIER THIS WEEK",
|
|
6381
6417
|
older: "OLDER"
|
|
6382
|
-
},
|
|
6418
|
+
}, Ka = [
|
|
6383
6419
|
"today",
|
|
6384
6420
|
"yesterday",
|
|
6385
6421
|
"thisweek",
|
|
6386
6422
|
"older"
|
|
6387
6423
|
];
|
|
6388
|
-
function
|
|
6424
|
+
function qa(e) {
|
|
6389
6425
|
if (!e) return "older";
|
|
6390
6426
|
let t = new Date(e), n = /* @__PURE__ */ new Date(), r = new Date(n.getFullYear(), n.getMonth(), n.getDate()), i = new Date(r);
|
|
6391
6427
|
i.setDate(i.getDate() - 1);
|
|
6392
6428
|
let a = new Date(r);
|
|
6393
6429
|
return a.setDate(a.getDate() - 6), t >= r ? "today" : t >= i ? "yesterday" : t >= a ? "thisweek" : "older";
|
|
6394
6430
|
}
|
|
6395
|
-
function
|
|
6431
|
+
function Ja(e) {
|
|
6396
6432
|
if (!e) return "";
|
|
6397
6433
|
if (e.startsWith("+")) return e;
|
|
6398
6434
|
let t = e.replace(/\D/g, "");
|
|
6399
6435
|
return t.length <= 3 ? t : t.length <= 6 ? `(${t.slice(0, 3)}) ${t.slice(3)}` : t.length <= 10 ? `(${t.slice(0, 3)}) ${t.slice(3, 6)}-${t.slice(6)}` : `+${t.slice(0, t.length - 10)} (${t.slice(-10, -7)}) ${t.slice(-7, -4)}-${t.slice(-4)}`;
|
|
6400
6436
|
}
|
|
6401
|
-
function
|
|
6437
|
+
function Ya(e) {
|
|
6402
6438
|
return String(e || "").replace(/[^\d+*#]/g, "").slice(0, 18);
|
|
6403
6439
|
}
|
|
6404
|
-
function
|
|
6440
|
+
function Xa(e) {
|
|
6405
6441
|
return e?.department || e?.ticket?.department || null;
|
|
6406
6442
|
}
|
|
6407
|
-
function
|
|
6408
|
-
return !t || t === "all" ||
|
|
6443
|
+
function Za(e, t) {
|
|
6444
|
+
return !t || t === "all" || Xa(e) === t;
|
|
6409
6445
|
}
|
|
6410
|
-
function
|
|
6446
|
+
function Qa(e) {
|
|
6411
6447
|
return e?.caller?.number || e?.phoneNumber || e?.number || "";
|
|
6412
6448
|
}
|
|
6413
|
-
function
|
|
6449
|
+
function $a(e) {
|
|
6414
6450
|
let t = [];
|
|
6415
|
-
return e.outcome && t.push(e.outcome), e.durationSec > 0 && t.push(
|
|
6451
|
+
return e.outcome && t.push(e.outcome), e.durationSec > 0 && t.push(oa(e.durationSec)), e.ticket?.number && t.push(`#${e.ticket.number}`), Xa(e) && t.push(da(Xa(e))), t.join(" · ");
|
|
6416
6452
|
}
|
|
6417
|
-
function
|
|
6453
|
+
function eo(e, t) {
|
|
6418
6454
|
return t ? [
|
|
6419
6455
|
e?.caller?.name,
|
|
6420
6456
|
e?.caller?.number,
|
|
@@ -6423,8 +6459,8 @@ function Za(e, t) {
|
|
|
6423
6459
|
e?.ticket?.number
|
|
6424
6460
|
].filter(Boolean).join(" ").toLowerCase().includes(t) : !0;
|
|
6425
6461
|
}
|
|
6426
|
-
function
|
|
6427
|
-
let a =
|
|
6462
|
+
function to({ call: e, groupKey: n, onOpenTicket: r, onSelectCall: i }) {
|
|
6463
|
+
let a = Fa(e.direction, e.outcome), o = Na[e.outcome] || "var(--text-quaternary)", s = $a(e), c = Ia(e.startedAt), l = La(e.startedAt);
|
|
6428
6464
|
return /* @__PURE__ */ G("li", {
|
|
6429
6465
|
className: "phone-sp-history-row",
|
|
6430
6466
|
children: [/* @__PURE__ */ G("button", {
|
|
@@ -6432,10 +6468,10 @@ function Qa({ call: e, groupKey: n, onOpenTicket: r, onSelectCall: i }) {
|
|
|
6432
6468
|
className: "phone-sp-history-row-main",
|
|
6433
6469
|
onClick: () => i?.(e),
|
|
6434
6470
|
children: [
|
|
6435
|
-
/* @__PURE__ */ W(
|
|
6471
|
+
/* @__PURE__ */ W(Ra, {
|
|
6436
6472
|
name: e.caller?.name,
|
|
6437
6473
|
avatarUrl: e.caller?.avatarUrl,
|
|
6438
|
-
children: /* @__PURE__ */ W(
|
|
6474
|
+
children: /* @__PURE__ */ W(za, {
|
|
6439
6475
|
title: e.direction === "inbound" ? "Incoming" : "Outgoing",
|
|
6440
6476
|
children: t(a, { size: 9 })
|
|
6441
6477
|
})
|
|
@@ -6477,17 +6513,17 @@ function Qa({ call: e, groupKey: n, onOpenTicket: r, onSelectCall: i }) {
|
|
|
6477
6513
|
title: e.ticket ? `Open ${e.ticket.number}` : "Create ticket",
|
|
6478
6514
|
"aria-label": e.ticket ? `Open ${e.ticket.number}` : "Create ticket",
|
|
6479
6515
|
onClick: () => r?.(e),
|
|
6480
|
-
children: /* @__PURE__ */ W(
|
|
6516
|
+
children: /* @__PURE__ */ W(P, { size: 12 })
|
|
6481
6517
|
})
|
|
6482
6518
|
})]
|
|
6483
6519
|
});
|
|
6484
6520
|
}
|
|
6485
|
-
function
|
|
6486
|
-
let [u, f] = d(
|
|
6487
|
-
let t =
|
|
6521
|
+
function no({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDialValue: a, onDial: o, onDialValueChange: s, onRedial: c, recentLimit: l }) {
|
|
6522
|
+
let [u, f] = d(Ya(a)), p = i != null, m = p ? Ya(i) : u, h = e.slice(0, l), g = (e) => {
|
|
6523
|
+
let t = Ya(e);
|
|
6488
6524
|
p || f(t), s?.(t);
|
|
6489
6525
|
}, _ = (e) => g(`${m}${e}`), v = () => g(m.slice(0, -1)), y = (e) => g(e.target.value), b = (e) => {
|
|
6490
|
-
let t =
|
|
6526
|
+
let t = Ya(Qa(e));
|
|
6491
6527
|
t && (g(t), c?.(e));
|
|
6492
6528
|
};
|
|
6493
6529
|
return /* @__PURE__ */ G("div", {
|
|
@@ -6503,7 +6539,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6503
6539
|
autoComplete: "off",
|
|
6504
6540
|
spellCheck: !1,
|
|
6505
6541
|
className: "phone-sp-dial-input",
|
|
6506
|
-
value:
|
|
6542
|
+
value: Ja(m),
|
|
6507
6543
|
onChange: y,
|
|
6508
6544
|
placeholder: "Enter number",
|
|
6509
6545
|
"aria-label": "Phone number"
|
|
@@ -6519,7 +6555,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6519
6555
|
className: "phone-sp-keypad",
|
|
6520
6556
|
role: "group",
|
|
6521
6557
|
"aria-label": "Dial keypad",
|
|
6522
|
-
children:
|
|
6558
|
+
children: Ha.map((e) => /* @__PURE__ */ G("button", {
|
|
6523
6559
|
type: "button",
|
|
6524
6560
|
className: "phone-sp-key",
|
|
6525
6561
|
onClick: () => _(e.d),
|
|
@@ -6539,7 +6575,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6539
6575
|
className: "phone-sp-action-btn phone-sp-action-btn--primary phone-sp-dial-call",
|
|
6540
6576
|
disabled: !m || r || n,
|
|
6541
6577
|
onClick: () => o?.(m),
|
|
6542
|
-
children: [/* @__PURE__ */ W(
|
|
6578
|
+
children: [/* @__PURE__ */ W(ve, { size: 14 }), n ? "Calling" : "Call"]
|
|
6543
6579
|
})
|
|
6544
6580
|
]
|
|
6545
6581
|
}), h.length > 0 && /* @__PURE__ */ G("section", {
|
|
@@ -6556,7 +6592,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6556
6592
|
}), /* @__PURE__ */ W("ul", {
|
|
6557
6593
|
className: "phone-sp-history-list",
|
|
6558
6594
|
children: h.map((e) => {
|
|
6559
|
-
let n =
|
|
6595
|
+
let n = Fa(e.direction, e.outcome), r = Na[e.outcome] || "var(--text-quaternary)", i = Qa(e);
|
|
6560
6596
|
return /* @__PURE__ */ G("li", {
|
|
6561
6597
|
className: "phone-sp-history-row",
|
|
6562
6598
|
children: [/* @__PURE__ */ G("button", {
|
|
@@ -6566,10 +6602,10 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6566
6602
|
disabled: !i,
|
|
6567
6603
|
title: i ? `Redial ${i}` : void 0,
|
|
6568
6604
|
children: [
|
|
6569
|
-
/* @__PURE__ */ W(
|
|
6605
|
+
/* @__PURE__ */ W(Ra, {
|
|
6570
6606
|
name: e.caller?.name,
|
|
6571
6607
|
avatarUrl: e.caller?.avatarUrl,
|
|
6572
|
-
children: /* @__PURE__ */ W(
|
|
6608
|
+
children: /* @__PURE__ */ W(za, {
|
|
6573
6609
|
title: e.direction === "inbound" ? "Incoming" : "Outgoing",
|
|
6574
6610
|
children: t(n, { size: 9 })
|
|
6575
6611
|
})
|
|
@@ -6587,7 +6623,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6587
6623
|
"aria-hidden": !0
|
|
6588
6624
|
}), /* @__PURE__ */ W("span", {
|
|
6589
6625
|
className: "phone-sp-history-meta-text",
|
|
6590
|
-
children:
|
|
6626
|
+
children: $a(e) || "call"
|
|
6591
6627
|
})]
|
|
6592
6628
|
})]
|
|
6593
6629
|
}),
|
|
@@ -6595,7 +6631,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6595
6631
|
className: "phone-sp-history-time",
|
|
6596
6632
|
children: /* @__PURE__ */ W("span", {
|
|
6597
6633
|
className: "phone-sp-history-time-primary",
|
|
6598
|
-
children:
|
|
6634
|
+
children: Ia(e.startedAt)
|
|
6599
6635
|
})
|
|
6600
6636
|
})
|
|
6601
6637
|
]
|
|
@@ -6608,7 +6644,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6608
6644
|
title: "Redial",
|
|
6609
6645
|
"aria-label": "Redial",
|
|
6610
6646
|
onClick: () => b(e),
|
|
6611
|
-
children: /* @__PURE__ */ W(
|
|
6647
|
+
children: /* @__PURE__ */ W(ve, { size: 12 })
|
|
6612
6648
|
})
|
|
6613
6649
|
})]
|
|
6614
6650
|
}, e.id);
|
|
@@ -6617,7 +6653,7 @@ function $a({ history: e, isDialing: n, dialDisabled: r, dialValue: i, defaultDi
|
|
|
6617
6653
|
})]
|
|
6618
6654
|
});
|
|
6619
6655
|
}
|
|
6620
|
-
function
|
|
6656
|
+
function ro({ history: e, onOpenTicket: t, onSelectCall: n }) {
|
|
6621
6657
|
let r = l(() => {
|
|
6622
6658
|
let t = {
|
|
6623
6659
|
today: [],
|
|
@@ -6626,10 +6662,10 @@ function eo({ history: e, onOpenTicket: t, onSelectCall: n }) {
|
|
|
6626
6662
|
older: []
|
|
6627
6663
|
};
|
|
6628
6664
|
return e.slice().sort((e, t) => new Date(t.startedAt) - new Date(e.startedAt)).forEach((e) => {
|
|
6629
|
-
t[
|
|
6630
|
-
}),
|
|
6665
|
+
t[qa(e.startedAt)].push(e);
|
|
6666
|
+
}), Ka.map((e) => ({
|
|
6631
6667
|
key: e,
|
|
6632
|
-
label:
|
|
6668
|
+
label: Ga[e],
|
|
6633
6669
|
rows: t[e]
|
|
6634
6670
|
})).filter((e) => e.rows.length > 0);
|
|
6635
6671
|
}, [e]);
|
|
@@ -6654,7 +6690,7 @@ function eo({ history: e, onOpenTicket: t, onSelectCall: n }) {
|
|
|
6654
6690
|
})]
|
|
6655
6691
|
}), /* @__PURE__ */ W("ul", {
|
|
6656
6692
|
className: "phone-sp-history-list",
|
|
6657
|
-
children: e.rows.map((r) => /* @__PURE__ */ W(
|
|
6693
|
+
children: e.rows.map((r) => /* @__PURE__ */ W(to, {
|
|
6658
6694
|
call: r,
|
|
6659
6695
|
groupKey: e.key,
|
|
6660
6696
|
onOpenTicket: t,
|
|
@@ -6664,7 +6700,7 @@ function eo({ history: e, onOpenTicket: t, onSelectCall: n }) {
|
|
|
6664
6700
|
}, e.key))
|
|
6665
6701
|
});
|
|
6666
6702
|
}
|
|
6667
|
-
function
|
|
6703
|
+
function io({ durationSec: e }) {
|
|
6668
6704
|
let [t, n] = d(0);
|
|
6669
6705
|
return /* @__PURE__ */ G("div", {
|
|
6670
6706
|
className: "phone-sp-playback",
|
|
@@ -6682,7 +6718,7 @@ function to({ durationSec: e }) {
|
|
|
6682
6718
|
}),
|
|
6683
6719
|
/* @__PURE__ */ G("span", {
|
|
6684
6720
|
className: "phone-sp-playback-time",
|
|
6685
|
-
children: ["0:00 / ",
|
|
6721
|
+
children: ["0:00 / ", oa(e)]
|
|
6686
6722
|
}),
|
|
6687
6723
|
/* @__PURE__ */ W("input", {
|
|
6688
6724
|
className: "phone-sp-playback-slider",
|
|
@@ -6697,7 +6733,7 @@ function to({ durationSec: e }) {
|
|
|
6697
6733
|
})]
|
|
6698
6734
|
});
|
|
6699
6735
|
}
|
|
6700
|
-
function
|
|
6736
|
+
function ao({ voicemail: e, currentUserId: t, onClaimVoicemail: n, onOpenTicket: r, onResolveVoicemail: i, onReviewVoicemail: a }) {
|
|
6701
6737
|
let o = e.assignedTo?.userId === t, s = e.status === "resolved";
|
|
6702
6738
|
return /* @__PURE__ */ G("article", {
|
|
6703
6739
|
className: "phone-sp-vm-card",
|
|
@@ -6714,7 +6750,7 @@ function no({ voicemail: e, currentUserId: t, onClaimVoicemail: n, onOpenTicket:
|
|
|
6714
6750
|
children: [
|
|
6715
6751
|
e.caller?.number || "Unknown number",
|
|
6716
6752
|
" · ",
|
|
6717
|
-
|
|
6753
|
+
ca(e.receivedAt)
|
|
6718
6754
|
]
|
|
6719
6755
|
})]
|
|
6720
6756
|
}), /* @__PURE__ */ W($, {
|
|
@@ -6733,14 +6769,14 @@ function no({ voicemail: e, currentUserId: t, onClaimVoicemail: n, onOpenTicket:
|
|
|
6733
6769
|
size: "sm",
|
|
6734
6770
|
className: "phone-sp-action-btn",
|
|
6735
6771
|
onClick: () => r?.(e),
|
|
6736
|
-
children: [/* @__PURE__ */ W(
|
|
6772
|
+
children: [/* @__PURE__ */ W(P, { size: 12 }), "Ticket"]
|
|
6737
6773
|
}), !s && /* @__PURE__ */ G(U, { children: [
|
|
6738
6774
|
/* @__PURE__ */ G(Q, {
|
|
6739
6775
|
variant: "ghost",
|
|
6740
6776
|
size: "sm",
|
|
6741
6777
|
className: "phone-sp-action-btn",
|
|
6742
6778
|
onClick: () => n?.(e),
|
|
6743
|
-
children: [/* @__PURE__ */ W(
|
|
6779
|
+
children: [/* @__PURE__ */ W(ze, { size: 12 }), "Claim"]
|
|
6744
6780
|
}),
|
|
6745
6781
|
/* @__PURE__ */ G(Q, {
|
|
6746
6782
|
variant: "ghost",
|
|
@@ -6758,12 +6794,12 @@ function no({ voicemail: e, currentUserId: t, onClaimVoicemail: n, onOpenTicket:
|
|
|
6758
6794
|
})
|
|
6759
6795
|
] })]
|
|
6760
6796
|
}),
|
|
6761
|
-
/* @__PURE__ */ W(
|
|
6797
|
+
/* @__PURE__ */ W(io, { durationSec: e.durationSec })
|
|
6762
6798
|
]
|
|
6763
6799
|
});
|
|
6764
6800
|
}
|
|
6765
|
-
function
|
|
6766
|
-
let a =
|
|
6801
|
+
function oo({ callback: e, currentUserId: t, onClaimCallback: n, onCompleteCallback: r, onOpenTicket: i }) {
|
|
6802
|
+
let a = la(e.slaDeadlineAt), o = a === "overdue" ? "error" : a === "urgent" || a === "warning" ? "warning" : "info", s = e.assignedTo?.userId === t;
|
|
6767
6803
|
return /* @__PURE__ */ G("article", {
|
|
6768
6804
|
className: "phone-sp-vm-card",
|
|
6769
6805
|
children: [
|
|
@@ -6779,12 +6815,12 @@ function ro({ callback: e, currentUserId: t, onClaimCallback: n, onCompleteCallb
|
|
|
6779
6815
|
children: [
|
|
6780
6816
|
e.caller?.number || "Unknown number",
|
|
6781
6817
|
" · ",
|
|
6782
|
-
|
|
6818
|
+
ca(e.createdAt)
|
|
6783
6819
|
]
|
|
6784
6820
|
})]
|
|
6785
6821
|
}), /* @__PURE__ */ G($, {
|
|
6786
6822
|
variant: o,
|
|
6787
|
-
children: ["SLA ",
|
|
6823
|
+
children: ["SLA ", sa(e.slaDeadlineAt)]
|
|
6788
6824
|
})]
|
|
6789
6825
|
}),
|
|
6790
6826
|
/* @__PURE__ */ W("p", {
|
|
@@ -6799,14 +6835,14 @@ function ro({ callback: e, currentUserId: t, onClaimCallback: n, onCompleteCallb
|
|
|
6799
6835
|
size: "sm",
|
|
6800
6836
|
className: "phone-sp-action-btn",
|
|
6801
6837
|
onClick: () => i?.(e),
|
|
6802
|
-
children: [/* @__PURE__ */ W(
|
|
6838
|
+
children: [/* @__PURE__ */ W(P, { size: 12 }), "Ticket"]
|
|
6803
6839
|
}),
|
|
6804
6840
|
!s && /* @__PURE__ */ G(Q, {
|
|
6805
6841
|
variant: "secondary",
|
|
6806
6842
|
size: "sm",
|
|
6807
6843
|
className: "phone-sp-action-btn phone-sp-action-btn--primary",
|
|
6808
6844
|
onClick: () => n?.(e),
|
|
6809
|
-
children: [/* @__PURE__ */ W(
|
|
6845
|
+
children: [/* @__PURE__ */ W(ve, { size: 12 }), "Claim"]
|
|
6810
6846
|
}),
|
|
6811
6847
|
s && /* @__PURE__ */ G(Q, {
|
|
6812
6848
|
variant: "secondary",
|
|
@@ -6820,13 +6856,13 @@ function ro({ callback: e, currentUserId: t, onClaimCallback: n, onCompleteCallb
|
|
|
6820
6856
|
]
|
|
6821
6857
|
});
|
|
6822
6858
|
}
|
|
6823
|
-
function
|
|
6824
|
-
let [u, f] = d("open"), [p, m] = d("pending"), [h, g] = d(""), _ = h.trim().toLowerCase(), v = l(() => c.filter((e) => u === "open" ? e.status === "open" : u === "resolved" ? e.status === "resolved" : u === "mine" ? e.assignedTo?.userId === t : !0).filter((e) =>
|
|
6859
|
+
function so({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicemail: r, onCompleteCallback: i, onOpenTicket: a, onResolveVoicemail: o, onReviewVoicemail: s, voicemails: c }) {
|
|
6860
|
+
let [u, f] = d("open"), [p, m] = d("pending"), [h, g] = d(""), _ = h.trim().toLowerCase(), v = l(() => c.filter((e) => u === "open" ? e.status === "open" : u === "resolved" ? e.status === "resolved" : u === "mine" ? e.assignedTo?.userId === t : !0).filter((e) => eo(e, _)).sort((e, t) => new Date(t.receivedAt) - new Date(e.receivedAt)), [
|
|
6825
6861
|
t,
|
|
6826
6862
|
_,
|
|
6827
6863
|
u,
|
|
6828
6864
|
c
|
|
6829
|
-
]), y = l(() => e.filter((e) => p === "pending" ? e.status === "open" : p === "called_back" ? e.status === "called_back" || e.status === "resolved" : !0).filter((e) =>
|
|
6865
|
+
]), y = l(() => e.filter((e) => p === "pending" ? e.status === "open" : p === "called_back" ? e.status === "called_back" || e.status === "resolved" : !0).filter((e) => eo(e, _)).sort((e, t) => new Date(e.slaDeadlineAt) - new Date(t.slaDeadlineAt)), [
|
|
6830
6866
|
e,
|
|
6831
6867
|
p,
|
|
6832
6868
|
_
|
|
@@ -6836,7 +6872,7 @@ function io({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicema
|
|
|
6836
6872
|
children: [
|
|
6837
6873
|
/* @__PURE__ */ G("div", {
|
|
6838
6874
|
className: "phone-sp-search",
|
|
6839
|
-
children: [/* @__PURE__ */ W(
|
|
6875
|
+
children: [/* @__PURE__ */ W(Ae, { size: 13 }), /* @__PURE__ */ W("input", {
|
|
6840
6876
|
type: "search",
|
|
6841
6877
|
className: "phone-sp-search-input",
|
|
6842
6878
|
placeholder: "Search voicemails & callbacks...",
|
|
@@ -6846,11 +6882,11 @@ function io({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicema
|
|
|
6846
6882
|
}),
|
|
6847
6883
|
/* @__PURE__ */ W("div", {
|
|
6848
6884
|
className: "phone-sp-section-head",
|
|
6849
|
-
children: /* @__PURE__ */ W(
|
|
6885
|
+
children: /* @__PURE__ */ W(ut, { children: "VOICEMAIL QUEUE" })
|
|
6850
6886
|
}),
|
|
6851
6887
|
/* @__PURE__ */ W("div", {
|
|
6852
6888
|
className: "phone-sp-pill-tabs",
|
|
6853
|
-
children:
|
|
6889
|
+
children: Ua.map((e) => /* @__PURE__ */ W("button", {
|
|
6854
6890
|
type: "button",
|
|
6855
6891
|
className: `phone-sp-pill-tab${u === e.id ? " is-active" : ""}`,
|
|
6856
6892
|
onClick: () => f(e.id),
|
|
@@ -6862,7 +6898,7 @@ function io({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicema
|
|
|
6862
6898
|
children: b === 0 && u === "open" ? "No new voicemails. Nice." : "Nothing matches this filter."
|
|
6863
6899
|
}) : /* @__PURE__ */ W("div", {
|
|
6864
6900
|
className: "phone-sp-list",
|
|
6865
|
-
children: v.map((e) => /* @__PURE__ */ W(
|
|
6901
|
+
children: v.map((e) => /* @__PURE__ */ W(ao, {
|
|
6866
6902
|
voicemail: e,
|
|
6867
6903
|
currentUserId: t,
|
|
6868
6904
|
onClaimVoicemail: r,
|
|
@@ -6873,7 +6909,7 @@ function io({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicema
|
|
|
6873
6909
|
}),
|
|
6874
6910
|
/* @__PURE__ */ W("div", {
|
|
6875
6911
|
className: "phone-sp-section-head phone-sp-section-head--spaced",
|
|
6876
|
-
children: /* @__PURE__ */ G(
|
|
6912
|
+
children: /* @__PURE__ */ G(ut, { children: ["CALLBACKS", x > 0 && /* @__PURE__ */ W($, {
|
|
6877
6913
|
variant: "warning",
|
|
6878
6914
|
className: "phone-sp-inline-badge",
|
|
6879
6915
|
children: "Pending"
|
|
@@ -6881,7 +6917,7 @@ function io({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicema
|
|
|
6881
6917
|
}),
|
|
6882
6918
|
/* @__PURE__ */ W("div", {
|
|
6883
6919
|
className: "phone-sp-pill-tabs",
|
|
6884
|
-
children:
|
|
6920
|
+
children: Wa.map((e) => /* @__PURE__ */ W("button", {
|
|
6885
6921
|
type: "button",
|
|
6886
6922
|
className: `phone-sp-pill-tab${p === e.id ? " is-active" : ""}`,
|
|
6887
6923
|
onClick: () => m(e.id),
|
|
@@ -6893,7 +6929,7 @@ function io({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicema
|
|
|
6893
6929
|
children: "No callback requests yet."
|
|
6894
6930
|
}) : /* @__PURE__ */ W("div", {
|
|
6895
6931
|
className: "phone-sp-list",
|
|
6896
|
-
children: y.map((e) => /* @__PURE__ */ W(
|
|
6932
|
+
children: y.map((e) => /* @__PURE__ */ W(oo, {
|
|
6897
6933
|
callback: e,
|
|
6898
6934
|
currentUserId: t,
|
|
6899
6935
|
onClaimCallback: n,
|
|
@@ -6904,28 +6940,28 @@ function io({ callbacks: e, currentUserId: t, onClaimCallback: n, onClaimVoicema
|
|
|
6904
6940
|
]
|
|
6905
6941
|
});
|
|
6906
6942
|
}
|
|
6907
|
-
function
|
|
6943
|
+
function co({ activeTab: e, callbacks: t = [], className: n = "", currentUserId: r, defaultDepartment: i = "all", defaultDialValue: a = "", defaultTab: o = "dial", departments: s = Ba, departmentValue: c, dialDisabled: u = !1, dialValue: f, headerActions: p, history: m = [], isDialing: h = !1, newCount: g, onClaimCallback: _, onClaimVoicemail: v, onClose: y, onCompleteCallback: b, onDepartmentChange: x, onDial: S, onDialValueChange: C, onExpand: w, onMore: T, onOpenTicket: E, onRedial: D, onResolveVoicemail: O, onReviewVoicemail: k, onSelectCall: A, onTabChange: j, recentLimit: M = 4, showMoreAction: N = !0, title: P = "Calls", voicemails: F = [] }) {
|
|
6908
6944
|
let [I, L] = d(o), [ee, R] = d(i), z = e ?? I, B = c ?? ee, te = l(() => s.some((e) => e.value === "all") ? s : [{
|
|
6909
6945
|
value: "all",
|
|
6910
6946
|
label: "All Departments"
|
|
6911
6947
|
}, ...s], [s]), V = (t) => {
|
|
6912
6948
|
e ?? L(t), j?.(t);
|
|
6913
|
-
},
|
|
6949
|
+
}, ne = (e) => {
|
|
6914
6950
|
c ?? R(e), x?.(e);
|
|
6915
|
-
}, ie = l(() => m.filter((e) =>
|
|
6916
|
-
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(
|
|
6951
|
+
}, ie = l(() => m.filter((e) => Za(e, B)), [B, m]), ae = l(() => F.filter((e) => Za(e, B)), [B, F]), oe = l(() => t.filter((e) => Za(e, B)), [t, B]), se = ie.length, ce = ae.filter((e) => e.status === "open").length, le = g ?? ce;
|
|
6952
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(ot, {
|
|
6917
6953
|
title: /* @__PURE__ */ G("span", {
|
|
6918
6954
|
className: "phone-sp-title",
|
|
6919
|
-
children: [P,
|
|
6955
|
+
children: [P, le > 0 && /* @__PURE__ */ G($, {
|
|
6920
6956
|
variant: "info",
|
|
6921
6957
|
showDot: !1,
|
|
6922
6958
|
className: "phone-sp-title-badge",
|
|
6923
6959
|
children: [
|
|
6924
|
-
/* @__PURE__ */ W(
|
|
6960
|
+
/* @__PURE__ */ W(Ve, {
|
|
6925
6961
|
size: 11,
|
|
6926
6962
|
"aria-hidden": !0
|
|
6927
6963
|
}),
|
|
6928
|
-
|
|
6964
|
+
le,
|
|
6929
6965
|
" new"
|
|
6930
6966
|
]
|
|
6931
6967
|
})]
|
|
@@ -6940,7 +6976,7 @@ function ao({ activeTab: e, callbacks: t = [], className: n = "", currentUserId:
|
|
|
6940
6976
|
title: "More",
|
|
6941
6977
|
"aria-label": "More phone options",
|
|
6942
6978
|
onClick: T,
|
|
6943
|
-
children: /* @__PURE__ */ W(
|
|
6979
|
+
children: /* @__PURE__ */ W(ue, { size: 14 })
|
|
6944
6980
|
}),
|
|
6945
6981
|
w && /* @__PURE__ */ W(Q, {
|
|
6946
6982
|
variant: "ghost",
|
|
@@ -6949,21 +6985,21 @@ function ao({ activeTab: e, callbacks: t = [], className: n = "", currentUserId:
|
|
|
6949
6985
|
title: "Expand to workspace",
|
|
6950
6986
|
"aria-label": "Expand to workspace",
|
|
6951
6987
|
onClick: w,
|
|
6952
|
-
children: /* @__PURE__ */ W(
|
|
6988
|
+
children: /* @__PURE__ */ W(re, { size: 14 })
|
|
6953
6989
|
})
|
|
6954
6990
|
] })
|
|
6955
|
-
}), /* @__PURE__ */ G(
|
|
6991
|
+
}), /* @__PURE__ */ G(st, {
|
|
6956
6992
|
className: `phone-sp-body ${n}`.trim(),
|
|
6957
6993
|
children: [
|
|
6958
|
-
/* @__PURE__ */ W(
|
|
6994
|
+
/* @__PURE__ */ W(qi, {
|
|
6959
6995
|
value: z,
|
|
6960
6996
|
onValueChange: V,
|
|
6961
6997
|
className: "phone-sp-tabs-wrap",
|
|
6962
|
-
children: /* @__PURE__ */ W(
|
|
6998
|
+
children: /* @__PURE__ */ W(Ji, {
|
|
6963
6999
|
className: "phone-sp-tabs-list",
|
|
6964
|
-
children:
|
|
7000
|
+
children: Va.map((e) => {
|
|
6965
7001
|
let t = e.id === "calls" ? se : e.id === "voicemail" ? ce : null;
|
|
6966
|
-
return /* @__PURE__ */ G(
|
|
7002
|
+
return /* @__PURE__ */ G(Yi, {
|
|
6967
7003
|
value: e.id,
|
|
6968
7004
|
className: "phone-sp-tab",
|
|
6969
7005
|
children: [/* @__PURE__ */ W("span", {
|
|
@@ -6981,9 +7017,9 @@ function ao({ activeTab: e, callbacks: t = [], className: n = "", currentUserId:
|
|
|
6981
7017
|
}),
|
|
6982
7018
|
/* @__PURE__ */ W("div", {
|
|
6983
7019
|
className: "phone-sp-filter",
|
|
6984
|
-
children: /* @__PURE__ */ W(
|
|
7020
|
+
children: /* @__PURE__ */ W(zi, {
|
|
6985
7021
|
value: B,
|
|
6986
|
-
onChange:
|
|
7022
|
+
onChange: ne,
|
|
6987
7023
|
options: te,
|
|
6988
7024
|
placeholder: "All Departments",
|
|
6989
7025
|
searchPlaceholder: "Search departments...",
|
|
@@ -6994,7 +7030,7 @@ function ao({ activeTab: e, callbacks: t = [], className: n = "", currentUserId:
|
|
|
6994
7030
|
className: "phone-sp-tab-panel",
|
|
6995
7031
|
role: "tabpanel",
|
|
6996
7032
|
children: [
|
|
6997
|
-
z === "dial" && /* @__PURE__ */ W(
|
|
7033
|
+
z === "dial" && /* @__PURE__ */ W(no, {
|
|
6998
7034
|
history: ie,
|
|
6999
7035
|
isDialing: h,
|
|
7000
7036
|
dialDisabled: u,
|
|
@@ -7005,12 +7041,12 @@ function ao({ activeTab: e, callbacks: t = [], className: n = "", currentUserId:
|
|
|
7005
7041
|
onRedial: D,
|
|
7006
7042
|
recentLimit: M
|
|
7007
7043
|
}),
|
|
7008
|
-
z === "calls" && /* @__PURE__ */ W(
|
|
7044
|
+
z === "calls" && /* @__PURE__ */ W(ro, {
|
|
7009
7045
|
history: ie,
|
|
7010
7046
|
onOpenTicket: E,
|
|
7011
7047
|
onSelectCall: A
|
|
7012
7048
|
}),
|
|
7013
|
-
z === "voicemail" && /* @__PURE__ */ W(
|
|
7049
|
+
z === "voicemail" && /* @__PURE__ */ W(so, {
|
|
7014
7050
|
callbacks: oe,
|
|
7015
7051
|
currentUserId: r,
|
|
7016
7052
|
onClaimCallback: _,
|
|
@@ -7028,35 +7064,35 @@ function ao({ activeTab: e, callbacks: t = [], className: n = "", currentUserId:
|
|
|
7028
7064
|
}
|
|
7029
7065
|
//#endregion
|
|
7030
7066
|
//#region src/components/ui/QueueItem.jsx
|
|
7031
|
-
var
|
|
7067
|
+
var lo = {
|
|
7032
7068
|
ringing: {
|
|
7033
|
-
icon:
|
|
7069
|
+
icon: be,
|
|
7034
7070
|
color: "var(--accent-red)",
|
|
7035
7071
|
label: "Ringing"
|
|
7036
7072
|
},
|
|
7037
7073
|
voicemail: {
|
|
7038
|
-
icon:
|
|
7074
|
+
icon: Ve,
|
|
7039
7075
|
color: "var(--accent-yellow)",
|
|
7040
7076
|
label: "Voicemail"
|
|
7041
7077
|
},
|
|
7042
7078
|
callback: {
|
|
7043
|
-
icon:
|
|
7079
|
+
icon: ye,
|
|
7044
7080
|
color: "var(--accent-blue)",
|
|
7045
7081
|
label: "Callback"
|
|
7046
7082
|
},
|
|
7047
7083
|
missed: {
|
|
7048
|
-
icon:
|
|
7084
|
+
icon: xe,
|
|
7049
7085
|
color: "var(--text-tertiary)",
|
|
7050
7086
|
label: "Missed"
|
|
7051
7087
|
}
|
|
7052
|
-
},
|
|
7088
|
+
}, uo = {
|
|
7053
7089
|
client: "success",
|
|
7054
7090
|
building_department: "info",
|
|
7055
7091
|
staff: "purple",
|
|
7056
7092
|
unknown: "warning"
|
|
7057
7093
|
};
|
|
7058
|
-
function
|
|
7059
|
-
let d =
|
|
7094
|
+
function fo({ kind: e, caller: t = {}, ticket: n = null, ago: r = null, slaDeadlineAt: i = null, voicemailDurationSec: a, assignedTo: o = null, actions: s = [], onAction: c, onClick: l, className: u = "" }) {
|
|
7095
|
+
let d = lo[e] || lo.ringing, f = d.icon, p = s.slice(0, 2), m = s.slice(2), h = i ? la(i) : "none", g = h === "urgent" ? "var(--accent-red)" : h === "warning" ? "var(--accent-yellow)" : "var(--text-secondary)";
|
|
7060
7096
|
return /* @__PURE__ */ G("div", {
|
|
7061
7097
|
role: "button",
|
|
7062
7098
|
tabIndex: 0,
|
|
@@ -7107,12 +7143,12 @@ function co({ kind: e, caller: t = {}, ticket: n = null, ago: r = null, slaDeadl
|
|
|
7107
7143
|
children: t.name
|
|
7108
7144
|
}),
|
|
7109
7145
|
/* @__PURE__ */ W($, {
|
|
7110
|
-
variant:
|
|
7146
|
+
variant: uo[t.type] || "warning",
|
|
7111
7147
|
showDot: !1,
|
|
7112
7148
|
className: "badge--no-dot",
|
|
7113
|
-
children:
|
|
7149
|
+
children: pa(t.type)
|
|
7114
7150
|
}),
|
|
7115
|
-
n && /* @__PURE__ */ W(
|
|
7151
|
+
n && /* @__PURE__ */ W(ya, {
|
|
7116
7152
|
ticket: n,
|
|
7117
7153
|
variant: "compact"
|
|
7118
7154
|
})
|
|
@@ -7138,8 +7174,8 @@ function co({ kind: e, caller: t = {}, ticket: n = null, ago: r = null, slaDeadl
|
|
|
7138
7174
|
children: d.label
|
|
7139
7175
|
}),
|
|
7140
7176
|
/* @__PURE__ */ W("span", { children: "·" }),
|
|
7141
|
-
e === "voicemail" && a != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", { children:
|
|
7142
|
-
r && /* @__PURE__ */ W("span", { children:
|
|
7177
|
+
e === "voicemail" && a != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", { children: oa(a) }), /* @__PURE__ */ W("span", { children: "·" })] }),
|
|
7178
|
+
r && /* @__PURE__ */ W("span", { children: ca(r) }),
|
|
7143
7179
|
i && /* @__PURE__ */ G("span", {
|
|
7144
7180
|
style: {
|
|
7145
7181
|
color: g,
|
|
@@ -7147,12 +7183,12 @@ function co({ kind: e, caller: t = {}, ticket: n = null, ago: r = null, slaDeadl
|
|
|
7147
7183
|
fontVariantNumeric: "tabular-nums",
|
|
7148
7184
|
fontWeight: 600
|
|
7149
7185
|
},
|
|
7150
|
-
children: ["SLA ",
|
|
7186
|
+
children: ["SLA ", sa(i)]
|
|
7151
7187
|
})
|
|
7152
7188
|
]
|
|
7153
7189
|
})]
|
|
7154
7190
|
}),
|
|
7155
|
-
o && /* @__PURE__ */ W(
|
|
7191
|
+
o && /* @__PURE__ */ W(wa, {
|
|
7156
7192
|
name: o.name,
|
|
7157
7193
|
initials: o.initials,
|
|
7158
7194
|
avatarUrl: null,
|
|
@@ -7174,15 +7210,15 @@ function co({ kind: e, caller: t = {}, ticket: n = null, ago: r = null, slaDeadl
|
|
|
7174
7210
|
title: e.label,
|
|
7175
7211
|
onClick: () => c?.(e.key),
|
|
7176
7212
|
children: e.icon
|
|
7177
|
-
}, e.key)), m.length > 0 && /* @__PURE__ */ W(
|
|
7213
|
+
}, e.key)), m.length > 0 && /* @__PURE__ */ W(Cr, {
|
|
7178
7214
|
align: "right",
|
|
7179
7215
|
trigger: /* @__PURE__ */ W("button", {
|
|
7180
7216
|
type: "button",
|
|
7181
7217
|
className: "btn btn-ghost btn-icon btn-sm",
|
|
7182
7218
|
"aria-label": "More actions",
|
|
7183
|
-
children: /* @__PURE__ */ W(
|
|
7219
|
+
children: /* @__PURE__ */ W(ue, { size: 16 })
|
|
7184
7220
|
}),
|
|
7185
|
-
children: m.map((e) => /* @__PURE__ */ W(
|
|
7221
|
+
children: m.map((e) => /* @__PURE__ */ W(wr, {
|
|
7186
7222
|
onClick: () => c?.(e.key),
|
|
7187
7223
|
children: e.label
|
|
7188
7224
|
}, e.key))
|
|
@@ -7193,14 +7229,14 @@ function co({ kind: e, caller: t = {}, ticket: n = null, ago: r = null, slaDeadl
|
|
|
7193
7229
|
}
|
|
7194
7230
|
//#endregion
|
|
7195
7231
|
//#region src/components/data/ActivityFeed.jsx
|
|
7196
|
-
function
|
|
7232
|
+
function po({ items: e = [], className: t = "" }) {
|
|
7197
7233
|
return /* @__PURE__ */ W("div", {
|
|
7198
7234
|
className: `activity-feed ${t}`,
|
|
7199
7235
|
children: e.map((e, t) => /* @__PURE__ */ G("div", {
|
|
7200
7236
|
className: "activity-item",
|
|
7201
7237
|
children: [/* @__PURE__ */ W("div", {
|
|
7202
7238
|
className: "activity-avatar",
|
|
7203
|
-
children: /* @__PURE__ */ W(
|
|
7239
|
+
children: /* @__PURE__ */ W(yi, {
|
|
7204
7240
|
name: e.user,
|
|
7205
7241
|
size: "sm"
|
|
7206
7242
|
})
|
|
@@ -7232,7 +7268,7 @@ function lo({ items: e = [], className: t = "" }) {
|
|
|
7232
7268
|
}
|
|
7233
7269
|
//#endregion
|
|
7234
7270
|
//#region src/components/data/CommandBar.jsx
|
|
7235
|
-
function
|
|
7271
|
+
function mo({ open: e, onClose: t, groups: n = [], onSelect: r, placeholder: i = "Type a command or search..." }) {
|
|
7236
7272
|
let [a, s] = d(""), [c, l] = d(0), f = u(null);
|
|
7237
7273
|
if (o(() => {
|
|
7238
7274
|
if (e) {
|
|
@@ -7268,7 +7304,7 @@ function uo({ open: e, onClose: t, groups: n = [], onSelect: r, placeholder: i =
|
|
|
7268
7304
|
className: "command-input-wrapper",
|
|
7269
7305
|
children: [/* @__PURE__ */ W("span", {
|
|
7270
7306
|
className: "command-input-icon",
|
|
7271
|
-
children: /* @__PURE__ */ W(
|
|
7307
|
+
children: /* @__PURE__ */ W(Ae, { size: 16 })
|
|
7272
7308
|
}), /* @__PURE__ */ W("input", {
|
|
7273
7309
|
ref: f,
|
|
7274
7310
|
className: "command-input",
|
|
@@ -7316,7 +7352,7 @@ function uo({ open: e, onClose: t, groups: n = [], onSelect: r, placeholder: i =
|
|
|
7316
7352
|
}
|
|
7317
7353
|
//#endregion
|
|
7318
7354
|
//#region src/components/data/DataTable.jsx
|
|
7319
|
-
function
|
|
7355
|
+
function ho({ columns: e, data: t, onRowClick: n, className: r = "" }) {
|
|
7320
7356
|
let [i, a] = d(null), [o, s] = d("asc");
|
|
7321
7357
|
function c(e) {
|
|
7322
7358
|
i === e ? s((e) => e === "asc" ? "desc" : "asc") : (a(e), s("asc"));
|
|
@@ -7357,7 +7393,7 @@ function fo({ columns: e, data: t, onRowClick: n, className: r = "" }) {
|
|
|
7357
7393
|
}
|
|
7358
7394
|
//#endregion
|
|
7359
7395
|
//#region src/components/data/FilterBar.jsx
|
|
7360
|
-
function
|
|
7396
|
+
function go({ searchValue: e = "", onSearchChange: t, filters: n = [], onClearAll: r, children: i, className: a = "" }) {
|
|
7361
7397
|
let o = n.some((e) => e.active);
|
|
7362
7398
|
return /* @__PURE__ */ G("div", {
|
|
7363
7399
|
className: `filter-bar ${a}`,
|
|
@@ -7365,7 +7401,7 @@ function po({ searchValue: e = "", onSearchChange: t, filters: n = [], onClearAl
|
|
|
7365
7401
|
/* @__PURE__ */ G("div", {
|
|
7366
7402
|
className: "filter-bar-search",
|
|
7367
7403
|
children: [
|
|
7368
|
-
/* @__PURE__ */ W(
|
|
7404
|
+
/* @__PURE__ */ W(Ae, { size: 14 }),
|
|
7369
7405
|
/* @__PURE__ */ W("input", {
|
|
7370
7406
|
className: "filter-bar-input",
|
|
7371
7407
|
value: e,
|
|
@@ -7382,7 +7418,7 @@ function po({ searchValue: e = "", onSearchChange: t, filters: n = [], onClearAl
|
|
|
7382
7418
|
/* @__PURE__ */ G("div", {
|
|
7383
7419
|
className: "filter-bar-filters",
|
|
7384
7420
|
children: [
|
|
7385
|
-
/* @__PURE__ */ W(
|
|
7421
|
+
/* @__PURE__ */ W(F, {
|
|
7386
7422
|
size: 14,
|
|
7387
7423
|
style: { color: "var(--text-tertiary)" }
|
|
7388
7424
|
}),
|
|
@@ -7407,22 +7443,22 @@ function po({ searchValue: e = "", onSearchChange: t, filters: n = [], onClearAl
|
|
|
7407
7443
|
}
|
|
7408
7444
|
//#endregion
|
|
7409
7445
|
//#region src/components/data/KanbanBoard.jsx
|
|
7410
|
-
function
|
|
7446
|
+
function _o(...e) {
|
|
7411
7447
|
return e.filter(Boolean).join(" ");
|
|
7412
7448
|
}
|
|
7413
|
-
function
|
|
7449
|
+
function vo({ children: e, className: t = "", style: n }) {
|
|
7414
7450
|
return /* @__PURE__ */ W("div", {
|
|
7415
|
-
className:
|
|
7451
|
+
className: _o("kanban-board", t),
|
|
7416
7452
|
style: n,
|
|
7417
7453
|
children: e
|
|
7418
7454
|
});
|
|
7419
7455
|
}
|
|
7420
|
-
function
|
|
7456
|
+
function yo({ title: e, count: t, color: n, headerAction: r = null, countVariant: i = "pill", children: a, className: o = "", style: s, headerClassName: c = "", headerStyle: l, countClassName: u = "", bodyClassName: d = "", bodyStyle: f }) {
|
|
7421
7457
|
return /* @__PURE__ */ G("div", {
|
|
7422
|
-
className:
|
|
7458
|
+
className: _o("kanban-column", o),
|
|
7423
7459
|
style: s,
|
|
7424
7460
|
children: [/* @__PURE__ */ G("div", {
|
|
7425
|
-
className:
|
|
7461
|
+
className: _o("kanban-column-header", c),
|
|
7426
7462
|
style: l,
|
|
7427
7463
|
children: [/* @__PURE__ */ G("div", {
|
|
7428
7464
|
className: "kanban-column-title",
|
|
@@ -7437,7 +7473,7 @@ function go({ title: e, count: t, color: n, headerAction: r = null, countVariant
|
|
|
7437
7473
|
}),
|
|
7438
7474
|
t != null && /* @__PURE__ */ W($, {
|
|
7439
7475
|
showDot: !1,
|
|
7440
|
-
className:
|
|
7476
|
+
className: _o("workflow-column-count", "kanban-column-count", i === "inline" ? "kanban-column-count--inline" : "", u),
|
|
7441
7477
|
children: t
|
|
7442
7478
|
})
|
|
7443
7479
|
]
|
|
@@ -7449,16 +7485,16 @@ function go({ title: e, count: t, color: n, headerAction: r = null, countVariant
|
|
|
7449
7485
|
})
|
|
7450
7486
|
})]
|
|
7451
7487
|
}), /* @__PURE__ */ W("div", {
|
|
7452
|
-
className:
|
|
7488
|
+
className: _o("kanban-column-body", d),
|
|
7453
7489
|
style: f,
|
|
7454
7490
|
children: a
|
|
7455
7491
|
})]
|
|
7456
7492
|
});
|
|
7457
7493
|
}
|
|
7458
|
-
function
|
|
7494
|
+
function bo({ title: e, subtitle: t, badges: n, avatar: r, footer: i, footerEnd: a, children: o, onClick: s, className: c = "", style: l }) {
|
|
7459
7495
|
let u = a ?? r;
|
|
7460
7496
|
return /* @__PURE__ */ W("div", {
|
|
7461
|
-
className:
|
|
7497
|
+
className: _o("kanban-card", c),
|
|
7462
7498
|
onClick: s,
|
|
7463
7499
|
style: l,
|
|
7464
7500
|
children: o || /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G("div", {
|
|
@@ -7488,23 +7524,23 @@ function _o({ title: e, subtitle: t, badges: n, avatar: r, footer: i, footerEnd:
|
|
|
7488
7524
|
}
|
|
7489
7525
|
//#endregion
|
|
7490
7526
|
//#region src/components/data/TableBoard.jsx
|
|
7491
|
-
function
|
|
7527
|
+
function xo(...e) {
|
|
7492
7528
|
return e.filter(Boolean).join(" ");
|
|
7493
7529
|
}
|
|
7494
|
-
function
|
|
7530
|
+
function So({ children: e, className: t = "" }) {
|
|
7495
7531
|
return /* @__PURE__ */ W("div", {
|
|
7496
|
-
className:
|
|
7532
|
+
className: xo("table-board", t),
|
|
7497
7533
|
children: e
|
|
7498
7534
|
});
|
|
7499
7535
|
}
|
|
7500
|
-
function
|
|
7536
|
+
function Co({ title: e, count: t, accentColor: n, open: r, defaultOpen: i = !0, onOpenChange: a, children: o, className: s = "" }) {
|
|
7501
7537
|
let [c, l] = d(i), u = r != null, f = u ? r : c;
|
|
7502
7538
|
function p() {
|
|
7503
7539
|
let e = !f;
|
|
7504
7540
|
u || l(e), a?.(e);
|
|
7505
7541
|
}
|
|
7506
7542
|
return /* @__PURE__ */ G("section", {
|
|
7507
|
-
className:
|
|
7543
|
+
className: xo("table-board-group", s),
|
|
7508
7544
|
style: n ? { "--table-board-group-accent-color": n } : void 0,
|
|
7509
7545
|
children: [/* @__PURE__ */ G("button", {
|
|
7510
7546
|
type: "button",
|
|
@@ -7513,7 +7549,7 @@ function bo({ title: e, count: t, accentColor: n, open: r, defaultOpen: i = !0,
|
|
|
7513
7549
|
"aria-expanded": f,
|
|
7514
7550
|
children: [
|
|
7515
7551
|
/* @__PURE__ */ W("span", {
|
|
7516
|
-
className:
|
|
7552
|
+
className: xo("table-board-group-chevron", !f && "collapsed"),
|
|
7517
7553
|
children: /* @__PURE__ */ W(S, { size: 12 })
|
|
7518
7554
|
}),
|
|
7519
7555
|
/* @__PURE__ */ W("span", {
|
|
@@ -7526,7 +7562,7 @@ function bo({ title: e, count: t, accentColor: n, open: r, defaultOpen: i = !0,
|
|
|
7526
7562
|
})
|
|
7527
7563
|
]
|
|
7528
7564
|
}), /* @__PURE__ */ W("div", {
|
|
7529
|
-
className:
|
|
7565
|
+
className: xo("table-board-group-panel", f && "open"),
|
|
7530
7566
|
children: /* @__PURE__ */ W("div", {
|
|
7531
7567
|
className: "table-board-group-panel-inner",
|
|
7532
7568
|
children: o
|
|
@@ -7534,7 +7570,7 @@ function bo({ title: e, count: t, accentColor: n, open: r, defaultOpen: i = !0,
|
|
|
7534
7570
|
})]
|
|
7535
7571
|
});
|
|
7536
7572
|
}
|
|
7537
|
-
function
|
|
7573
|
+
function wo({ priority: e, id: t, statusColor: n = "var(--accent-yellow)", title: i, subtitle: a, subtitleInline: s = !1, pills: c = [], maxVisibleLeadingPills: l, pinnedTrailingPillsCount: f = 0, metric: m, metricTone: h = "default", metricIcon: g, showMetricIcon: _ = !0, avatar: v, avatarImageUrl: y, avatarLabel: b, avatarName: x, avatarStyle: S, meta: C, onClick: w, className: T = "" }) {
|
|
7538
7574
|
let E = typeof w == "function", D = u(null), [k, A] = d(!1), j = Array.isArray(c) ? c : [], M = Math.max(0, Math.min(f, j.length)), N = M > 0 ? j.slice(0, -M) : j, P = M > 0 ? j.slice(-M) : [], F = typeof l == "number" && l >= 0 ? N.slice(0, l) : N, I = Math.max(0, N.length - F.length), L = [
|
|
7539
7575
|
...F,
|
|
7540
7576
|
...I > 0 ? [{
|
|
@@ -7546,7 +7582,7 @@ function xo({ priority: e, id: t, statusColor: n = "var(--accent-yellow)", title
|
|
|
7546
7582
|
function ee(e) {
|
|
7547
7583
|
E && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), w());
|
|
7548
7584
|
}
|
|
7549
|
-
let R = x || C || b, z = S || (y ? void 0 : { background: "var(--accent-blue)" }), B = g || (h === "warning" ? p : O), te = v || (y || b || R ? /* @__PURE__ */ W(
|
|
7585
|
+
let R = x || C || b, z = S || (y ? void 0 : { background: "var(--accent-blue)" }), B = g || (h === "warning" ? p : O), te = v || (y || b || R ? /* @__PURE__ */ W(yi, {
|
|
7550
7586
|
imageUrl: y,
|
|
7551
7587
|
initials: b,
|
|
7552
7588
|
name: R,
|
|
@@ -7573,7 +7609,7 @@ function xo({ priority: e, id: t, statusColor: n = "var(--accent-yellow)", title
|
|
|
7573
7609
|
l,
|
|
7574
7610
|
f
|
|
7575
7611
|
]), /* @__PURE__ */ G("div", {
|
|
7576
|
-
className:
|
|
7612
|
+
className: xo("table-board-row", E && "clickable", T),
|
|
7577
7613
|
onClick: w,
|
|
7578
7614
|
onKeyDown: ee,
|
|
7579
7615
|
role: E ? "button" : void 0,
|
|
@@ -7595,19 +7631,19 @@ function xo({ priority: e, id: t, statusColor: n = "var(--accent-yellow)", title
|
|
|
7595
7631
|
})
|
|
7596
7632
|
}),
|
|
7597
7633
|
/* @__PURE__ */ G("span", {
|
|
7598
|
-
className:
|
|
7634
|
+
className: xo("table-board-title-block", s && "inline-subtitle"),
|
|
7599
7635
|
children: [/* @__PURE__ */ W("span", {
|
|
7600
7636
|
className: "table-board-title",
|
|
7601
7637
|
children: i
|
|
7602
7638
|
}), a != null && a !== "" && /* @__PURE__ */ W("span", {
|
|
7603
|
-
className:
|
|
7639
|
+
className: xo("table-board-subtitle", s && "inline"),
|
|
7604
7640
|
children: a
|
|
7605
7641
|
})]
|
|
7606
7642
|
}),
|
|
7607
7643
|
/* @__PURE__ */ W("span", { className: "table-board-spacer" }),
|
|
7608
7644
|
L.length > 0 && /* @__PURE__ */ W("span", {
|
|
7609
7645
|
ref: D,
|
|
7610
|
-
className:
|
|
7646
|
+
className: xo("table-board-pills", k && "has-overflow"),
|
|
7611
7647
|
children: L.map((e, t) => /* @__PURE__ */ G("span", {
|
|
7612
7648
|
className: "table-board-pill",
|
|
7613
7649
|
children: [
|
|
@@ -7623,7 +7659,7 @@ function xo({ priority: e, id: t, statusColor: n = "var(--accent-yellow)", title
|
|
|
7623
7659
|
m != null && (r(m) ? m : /* @__PURE__ */ W($, {
|
|
7624
7660
|
className: "table-board-metric",
|
|
7625
7661
|
showDot: !1,
|
|
7626
|
-
children: /* @__PURE__ */ W(
|
|
7662
|
+
children: /* @__PURE__ */ W(Wi, {
|
|
7627
7663
|
tone: h,
|
|
7628
7664
|
icon: B,
|
|
7629
7665
|
showIcon: _,
|
|
@@ -7640,7 +7676,7 @@ function xo({ priority: e, id: t, statusColor: n = "var(--accent-yellow)", title
|
|
|
7640
7676
|
}
|
|
7641
7677
|
//#endregion
|
|
7642
7678
|
//#region src/components/data/NotificationsPanel.jsx
|
|
7643
|
-
function
|
|
7679
|
+
function To({ notifications: e = [], onMarkRead: t, onMarkAllRead: n, className: r = "" }) {
|
|
7644
7680
|
let i = e.filter((e) => !e.read);
|
|
7645
7681
|
return /* @__PURE__ */ G("div", {
|
|
7646
7682
|
className: `notifications-panel ${r}`,
|
|
@@ -7671,7 +7707,7 @@ function So({ notifications: e = [], onMarkRead: t, onMarkAllRead: n, className:
|
|
|
7671
7707
|
className: `notification-item ${e.read ? "" : "unread"}`,
|
|
7672
7708
|
onClick: () => !e.read && t?.(e.id),
|
|
7673
7709
|
children: [
|
|
7674
|
-
/* @__PURE__ */ W(
|
|
7710
|
+
/* @__PURE__ */ W(yi, {
|
|
7675
7711
|
name: e.user,
|
|
7676
7712
|
size: "sm"
|
|
7677
7713
|
}),
|
|
@@ -7696,4 +7732,4 @@ function So({ notifications: e = [], onMarkRead: t, onMarkAllRead: n, className:
|
|
|
7696
7732
|
});
|
|
7697
7733
|
}
|
|
7698
7734
|
//#endregion
|
|
7699
|
-
export {
|
|
7735
|
+
export { hi as Accordion, mi as AccordionItem, po as ActivityFeed, yn as AppLoader, yi as Avatar, $ as Badge, sn as BellIcon, Q as Button, cn as CalendarIcon, Ma as CallCard, aa as CallControlsBar, ka as Callbar, Si as Card, ki as CardContent, Oi as CardDescription, Ai as CardFooter, Ei as CardHeader, wi as CardHoverAction, Ci as CardHoverActions, Ti as CardLayer, Di as CardTitle, an as CheckIcon, Ht as ChevronDown, Ut as ChevronUp, rn as CloseIcon, mo as CommandBar, on as CopyIcon, $i as DEFAULT_ICON_BY_VALUE, ea as DEFAULT_VIEW_MODE_OPTIONS, ho as DataTable, Mi as Dialog, Ii as DialogBody, Fi as DialogDescription, Li as DialogFooter, Ni as DialogHeader, Pi as DialogTitle, Cr as DropdownMenu, Tr as DropdownMenuCheckboxItem, wr as DropdownMenuItem, Er as DropdownMenuLabel, Dr as DropdownMenuSeparator, Vt as EditIcon, Mt as FCCAppShell, nt as FCCAppShellContext, _n as FCCBrandLogo, yt as FCCBreadcrumbs, co as FCCCallsSidePanel, or as FCCChatAttachmentPreview, ar as FCCChatAttachmentsList, fr as FCCChatComposer, dr as FCCChatComposerFrame, gr as FCCChatHubFeed, ur as FCCChatMessageList, mr as FCCChatNewDMModal, pr as FCCChatNewTicketForm, br as FCCChatSidebar, hr as FCCChatTicketStatusTracker, et as FCCDesignProvider, Sn as FCCDetailsPanel, qr as FCCFullPagePanel, Zr as FCCFullPagePanelBody, ui as FCCFullPagePanelBottomControls, ei as FCCFullPagePanelFooter, Jr as FCCFullPagePanelHeader, Yr as FCCFullPagePanelHeaderRevealZone, Qr as FCCFullPagePanelMain, li as FCCFullPagePanelResizableSidebar, $r as FCCFullPagePanelSidebar, ti as FCCFullPagePanelSidebarFooter, ni as FCCFullPagePanelSubHeader, Xr as FCCFullPagePanelToolbar, gn as FCCHeaderIconButton, xt as FCCHeaderStatus, hn as FCCIcon, xn as FCCLoader, Ct as FCCMainWindow, Wr as FCCNotificationSidePanel, at as FCCSidePanel, mt as FCCSidePanelAction, st as FCCSidePanelBody, ft as FCCSidePanelCard, ht as FCCSidePanelChatWrap, pt as FCCSidePanelContact, gt as FCCSidePanelConversation, ut as FCCSidePanelGroupLabel, ot as FCCSidePanelHeader, dt as FCCSidePanelItem, _t as FCCSidePanelMessage, lt as FCCSidePanelSearch, ct as FCCSidePanelTabs, Dt as FCCSidebar, vn as FCCThemeToggle, St as FCCWorkspaceHeader, wn as FCC_CHAT_BREAKPOINTS, Cn as FCC_CHAT_TABS, Y as FCC_CHAT_WIDTHS, pn as FCC_ICON_ALIASES, fn as FCC_ICON_MAP, go as FilterBar, ln as FilterIcon, Nt as InboxIcon, Lt as InitiativesIcon, Ri as Input, Pt as IssuesIcon, Ar as KPICard, vo as KanbanBoard, bo as KanbanCard, yo as KanbanColumn, dn as LabelIcon, en as LinkIcon, zt as MoreIcon, To as NotificationsPanel, wa as PresenceAvatar, Sa as PresenceDot, Zt as PriorityHigh, $t as PriorityLow, Qt as PriorityMedium, Xt as PriorityUrgent, Rt as ProjectsIcon, It as PulseIcon, fo as QueueItem, Ft as ReviewsIcon, Bt as SearchIcon, zi as SearchableSelect, nn as SettingsIcon, Bi as Sheet, Vi as SheetFooter, bn as Spinner, Wt as StarIcon, jr as StatCard, Jt as StatusBacklog, Yt as StatusCancelled, Kt as StatusDone, Gt as StatusInProgress, Wi as StatusMetric, qt as StatusTodo, Gi as Switch, So as TableBoard, Co as TableBoardGroup, wo as TableBoardRow, qi as Tabs, Xi as TabsContent, Ji as TabsList, Yi as TabsTrigger, Zi as Textarea, Qe as ThemeProvider, ya as TicketLinkChip, Ke as ToastProvider, Qi as Tooltip, tn as TrashIcon, un as UserIcon, ra as ViewModeToggle, kr as WorkspaceTabs, mn as resolveFCCIconComponent, rt as useFCCAppShell, Dn as useFCCChatSidebarWidths, En as useFCCChatViewport, $e as useTheme, qe as useToast };
|