prometeo-design-system 4.6.4 → 4.7.0
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/DialogModal.es.js +123 -112
- package/dist/Header.es.js +22 -22
- package/dist/IconButton.es.js +124 -77
- package/dist/Icons/AccountCircle.es.js +1 -1
- package/dist/Icons/Add.es.js +1 -1
- package/dist/Icons/ArrowDownward.es.js +1 -1
- package/dist/Icons/ArrowLeft.es.js +1 -1
- package/dist/Icons/ArrowUpDown.es.js +1 -1
- package/dist/Icons/ArrowUpward.es.js +1 -1
- package/dist/Icons/AttachFile.es.js +1 -1
- package/dist/Icons/Boards.es.js +1 -1
- package/dist/Icons/Calendar.es.js +1 -1
- package/dist/Icons/Cancel.es.js +1 -1
- package/dist/Icons/Check.es.js +1 -1
- package/dist/Icons/CheckCircle.es.js +1 -1
- package/dist/Icons/CheckList.es.js +1 -1
- package/dist/Icons/ChevronDown.es.js +1 -1
- package/dist/Icons/Clock.es.js +1 -1
- package/dist/Icons/Close.es.js +1 -1
- package/dist/Icons/CloseNavBarDesktop.es.js +1 -1
- package/dist/Icons/Collapse.es.js +1 -1
- package/dist/Icons/Company.es.js +1 -1
- package/dist/Icons/Copy.es.js +1 -1
- package/dist/Icons/CrevronLeft.es.js +1 -1
- package/dist/Icons/CrevronRight.es.js +1 -1
- package/dist/Icons/DocumentFill.es.js +1 -1
- package/dist/Icons/Download.es.js +1 -1
- package/dist/Icons/DragIndicator.es.js +1 -1
- package/dist/Icons/Edit.es.js +1 -1
- package/dist/Icons/EditFill.es.js +1 -1
- package/dist/Icons/Email.es.js +1 -1
- package/dist/Icons/Error.es.js +1 -1
- package/dist/Icons/EyeVisibility.es.js +1 -1
- package/dist/Icons/EyeVisibilityOff.es.js +1 -1
- package/dist/Icons/FaLock.es.js +1 -1
- package/dist/Icons/FastForward.es.js +1 -1
- package/dist/Icons/File.es.js +1 -1
- package/dist/Icons/Filter.es.js +1 -1
- package/dist/Icons/FormatColorText.es.js +1 -1
- package/dist/Icons/Help.es.js +1 -1
- package/dist/Icons/HistoryActivity.es.js +1 -1
- package/dist/Icons/Home.es.js +1 -1
- package/dist/Icons/Image.es.js +1 -1
- package/dist/Icons/Info.es.js +1 -1
- package/dist/Icons/Logout.es.js +1 -1
- package/dist/Icons/MessageSquare.es.js +1 -1
- package/dist/Icons/MessageSquareFill.es.js +1 -1
- package/dist/Icons/MoreVert.es.js +1 -1
- package/dist/Icons/Notifications.es.js +1 -1
- package/dist/Icons/Pause.es.js +1 -1
- package/dist/Icons/Reassignment.es.js +1 -1
- package/dist/Icons/ReassignmentFill.es.js +1 -1
- package/dist/Icons/Reload.es.js +1 -1
- package/dist/Icons/Search.es.js +1 -1
- package/dist/Icons/Send.es.js +1 -1
- package/dist/Icons/Settings.es.js +1 -1
- package/dist/Icons/Shared.es.js +1 -1
- package/dist/Icons/Sort.es.js +1 -1
- package/dist/Icons/StarFill.es.js +1 -1
- package/dist/Icons/Stars.es.js +1 -1
- package/dist/Icons/Ticket.es.js +1 -1
- package/dist/Icons/TicketFilled.es.js +1 -1
- package/dist/Icons/Trash.es.js +1 -1
- package/dist/Icons/TrashFill.es.js +1 -1
- package/dist/Icons/Upload.es.js +1 -1
- package/dist/Icons/UploadCloud.es.js +1 -1
- package/dist/Icons/UserAdd.es.js +1 -1
- package/dist/Icons/UserAddFill.es.js +1 -1
- package/dist/Icons/UserAvatar.es.js +1 -1
- package/dist/Icons/UserPerson.es.js +1 -1
- package/dist/Icons/WhatsApp.es.js +1 -1
- package/dist/Icons/iconUtils.d.ts +2 -0
- package/dist/PyrionLayout.es.js +764 -745
- package/dist/Scrollable.es.js +136 -133
- package/dist/Skeleton.es.js +1 -1
- package/dist/assets/DialogModal.png +0 -0
- package/dist/assets/Header.png +0 -0
- package/dist/components/Header/Header.d.ts +2 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +4 -1
- package/dist/components/PyrionNavigationDrawer/PLNotificationsLoader.d.ts +6 -0
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +3 -1
- package/dist/components/Scrollable/Scrollable.d.ts +2 -0
- package/dist/iconUtils-rTOfKDxE.js +9 -0
- package/package.json +1 -1
- package/dist/iconUtils-D0lVAgGT.js +0 -5
package/dist/PyrionLayout.es.js
CHANGED
|
@@ -1,454 +1,455 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { u as
|
|
3
|
-
import { c as
|
|
4
|
-
import { g as
|
|
5
|
-
import
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { useLocation as
|
|
8
|
-
import { CloseNavBarDesktop as
|
|
9
|
-
import { c as
|
|
10
|
-
import { B as
|
|
11
|
-
import
|
|
12
|
-
import { CrevronLeft as
|
|
2
|
+
import { u as Ke, g as gt } from "./useDevice-vwn4GLwK.js";
|
|
3
|
+
import { c as T } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { g as ye } from "./utils-X4-h3cum.js";
|
|
5
|
+
import He, { forwardRef as he, useState as G, useRef as O, useEffect as ne, memo as R, useContext as Ye, createContext as Ee, useCallback as x, Children as vt, isValidElement as Se, useMemo as me, useImperativeHandle as _e, useLayoutEffect as wt, use as Nt } from "react";
|
|
6
|
+
import { createPortal as Ve } from "react-dom";
|
|
7
|
+
import { useLocation as yt, useNavigate as St } from "react-router";
|
|
8
|
+
import { CloseNavBarDesktop as Ct } from "./Icons/CloseNavBarDesktop.es.js";
|
|
9
|
+
import { c as Pe } from "./index-BOQuZ0gG.js";
|
|
10
|
+
import { B as Xe } from "./badge-CiiB9SGl.js";
|
|
11
|
+
import jt from "./PlainTooltip.es.js";
|
|
12
|
+
import { CrevronLeft as kt } from "./Icons/CrevronLeft.es.js";
|
|
13
13
|
import { Scrollable as be } from "./Scrollable.es.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import ie from "./TicketCard.es.js";
|
|
15
|
+
import Je from "./UserCard.es.js";
|
|
16
16
|
import pe from "./Button.es.js";
|
|
17
|
-
import { Logout as
|
|
18
|
-
import
|
|
19
|
-
import { T as
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
import { Logout as Lt } from "./Icons/Logout.es.js";
|
|
18
|
+
import Dt from "./NotificationCard.es.js";
|
|
19
|
+
import { T as At, a as Tt } from "./TabLinks-C0ywjYt-.js";
|
|
20
|
+
import Ce from "./Skeleton.es.js";
|
|
21
|
+
import { Notifications as Ge } from "./Icons/Notifications.es.js";
|
|
22
|
+
import { Close as Me } from "./Icons/Close.es.js";
|
|
23
|
+
import { Help as Qe } from "./Icons/Help.es.js";
|
|
24
|
+
import { Settings as Ot } from "./Icons/Settings.es.js";
|
|
25
|
+
const It = he((t, r) => {
|
|
26
|
+
const [s, o] = G(t?.currentTabName || t.tabs[0].name), c = O(null), { tabs: l = [], className: u, activeColor: i = "var(--neutral-900)", currentSystemId: m } = t;
|
|
27
|
+
ne(() => {
|
|
28
|
+
c.current?.style.setProperty("--tab-bg", i);
|
|
29
|
+
}, [i]);
|
|
30
|
+
const p = l.find((d) => d.id === m || d.name === (t?.currentTabName || s));
|
|
30
31
|
return /* @__PURE__ */ e.jsx(
|
|
31
32
|
"div",
|
|
32
33
|
{
|
|
33
34
|
ref: r,
|
|
34
|
-
className:
|
|
35
|
+
className: T(
|
|
35
36
|
"select-none",
|
|
36
37
|
"flex flex-col gap-2",
|
|
37
38
|
"bg-neutral-strong-default",
|
|
38
39
|
"h-full w-14 max-w-14 pl-[6px] py-6",
|
|
39
40
|
"border-r border-neutral-default-default",
|
|
40
|
-
|
|
41
|
+
u
|
|
41
42
|
),
|
|
42
43
|
children: l.map(
|
|
43
|
-
(
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
(d) => {
|
|
45
|
+
const w = d.name === p?.name, h = typeof d.thumbnail == "string" ? /* @__PURE__ */ e.jsx("img", { src: d.thumbnail, alt: d.description, className: "aspect-square object-contain rounded", draggable: !1 }) : d.thumbnail, C = () => {
|
|
46
|
+
d.disabled || (o(d.name), d.onClick && d.onClick(d.name));
|
|
46
47
|
};
|
|
47
48
|
return /* @__PURE__ */ e.jsx(
|
|
48
49
|
"div",
|
|
49
50
|
{
|
|
50
|
-
className:
|
|
51
|
+
className: T(
|
|
51
52
|
"bg-[(--tab-bg)]",
|
|
52
53
|
"h-12 w-[50px] z-20",
|
|
53
54
|
"flex items-center pl-[6px] ",
|
|
54
55
|
"rounded-l-[8px]",
|
|
55
56
|
"tabswitch-element relative",
|
|
56
|
-
|
|
57
|
+
w && "active"
|
|
57
58
|
),
|
|
58
59
|
onClick: C,
|
|
59
|
-
ref:
|
|
60
|
-
children: /* @__PURE__ */ e.jsx("div", { className:
|
|
60
|
+
ref: c,
|
|
61
|
+
children: /* @__PURE__ */ e.jsx("div", { className: T(
|
|
61
62
|
"size-8 rounded-[4px]",
|
|
62
63
|
"grid place-items-center",
|
|
63
64
|
"tab-thumbnail-icon",
|
|
64
65
|
"bg-transparent text-neutral-default-default",
|
|
65
|
-
|
|
66
|
-
), children:
|
|
66
|
+
d?.className
|
|
67
|
+
), children: h })
|
|
67
68
|
},
|
|
68
|
-
|
|
69
|
+
d.name
|
|
69
70
|
);
|
|
70
71
|
}
|
|
71
72
|
)
|
|
72
73
|
}
|
|
73
74
|
);
|
|
74
|
-
}),
|
|
75
|
-
const
|
|
76
|
-
return
|
|
77
|
-
l && s?.subscribeToSidebarOpen((
|
|
78
|
-
|
|
75
|
+
}), Ze = R(he(({ children: t, className: r, context: s, modal: o = !1, closeOnOverlayClick: c = !1, unmountChildrenOnClose: l = !0 }, u) => {
|
|
76
|
+
const i = xe(t, s), m = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: p } = Et(), { closeSidebar: d } = ce(), [w, h] = G(() => l ? p : !0), [C, A] = G(!1);
|
|
77
|
+
return ne(() => {
|
|
78
|
+
l && s?.subscribeToSidebarOpen((N) => {
|
|
79
|
+
N ? (A(!1), h(!0)) : A(!0);
|
|
79
80
|
});
|
|
80
|
-
}, [l, s]),
|
|
81
|
-
const
|
|
82
|
-
if (!
|
|
83
|
-
const
|
|
84
|
-
C && (
|
|
81
|
+
}, [l, s]), ne(() => {
|
|
82
|
+
const N = u && typeof u == "object" && "current" in u ? u.current : null;
|
|
83
|
+
if (!N) return;
|
|
84
|
+
const y = () => {
|
|
85
|
+
C && (h(!1), A(!1));
|
|
85
86
|
};
|
|
86
|
-
return
|
|
87
|
-
}, [C]), /* @__PURE__ */ e.jsxs("div", { ref:
|
|
88
|
-
o &&
|
|
87
|
+
return N.addEventListener("transitionend", y), () => N.removeEventListener("transitionend", y);
|
|
88
|
+
}, [C]), /* @__PURE__ */ e.jsxs("div", { ref: u, className: T("sidebar", m ? "collapsed" : "expanded", "h-full overflow-auto", r), "aria-modal": o || void 0, children: [
|
|
89
|
+
o && m && /* @__PURE__ */ e.jsx(
|
|
89
90
|
"div",
|
|
90
91
|
{
|
|
91
|
-
className:
|
|
92
|
-
onClick: (
|
|
93
|
-
|
|
92
|
+
className: T("navigation-drawer-sidebar-overlay"),
|
|
93
|
+
onClick: (N) => {
|
|
94
|
+
N.preventDefault(), N.stopPropagation(), c && d?.();
|
|
94
95
|
},
|
|
95
96
|
"aria-hidden": "true"
|
|
96
97
|
}
|
|
97
98
|
),
|
|
98
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
99
|
+
/* @__PURE__ */ e.jsxs("div", { className: T("navigation-drawer-sidebar-inner"), children: [
|
|
99
100
|
/* @__PURE__ */ e.jsx("div", { className: "secure-click-margin" }),
|
|
100
|
-
|
|
101
|
+
w && i
|
|
101
102
|
] })
|
|
102
103
|
] });
|
|
103
|
-
})),
|
|
104
|
-
const t =
|
|
104
|
+
})), et = Ee(null), tt = Ee(null), Et = () => {
|
|
105
|
+
const t = Ye(et);
|
|
105
106
|
if (!t) throw new Error("useDrawerState must be used within NavigationDrawer");
|
|
106
107
|
return t;
|
|
107
|
-
},
|
|
108
|
-
const t =
|
|
108
|
+
}, ce = () => {
|
|
109
|
+
const t = Ye(tt);
|
|
109
110
|
if (!t) throw new Error("useDrawerActions must be used within NavigationDrawer");
|
|
110
111
|
return t;
|
|
111
|
-
}, xe = (t, r) => typeof t == "function" ? r ? t(r) : null : t,
|
|
112
|
+
}, xe = (t, r) => typeof t == "function" ? r ? t(r) : null : t, rt = "navigation-drawer-collapsed", We = () => {
|
|
112
113
|
if (typeof window > "u") return !1;
|
|
113
114
|
try {
|
|
114
|
-
const t = sessionStorage.getItem(
|
|
115
|
+
const t = sessionStorage.getItem(rt);
|
|
115
116
|
return t ? JSON.parse(t) : !1;
|
|
116
117
|
} catch {
|
|
117
118
|
return !1;
|
|
118
119
|
}
|
|
119
|
-
},
|
|
120
|
+
}, _t = (t) => {
|
|
120
121
|
if (!(typeof window > "u"))
|
|
121
122
|
try {
|
|
122
|
-
sessionStorage.setItem(
|
|
123
|
+
sessionStorage.setItem(rt, JSON.stringify(t));
|
|
123
124
|
} catch {
|
|
124
125
|
}
|
|
125
|
-
},
|
|
126
|
-
const { children: r, classNameDrawer: s, classNameSidebar: o, disableDragOpen:
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
}, []),
|
|
130
|
-
const
|
|
131
|
-
if (!
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
126
|
+
}, Pt = (t) => {
|
|
127
|
+
const { children: r, classNameDrawer: s, classNameSidebar: o, disableDragOpen: c, modal: l = !0, closeOnOutsideClick: u = !0 } = t, i = O(null), m = O(null), p = t.outletRef ?? O(null), d = O(null), w = O(We()), h = O(!1), C = O("drawer"), A = O(/* @__PURE__ */ new Set()), N = O(/* @__PURE__ */ new Set()), y = O(!1), D = O(null), W = x((n) => {
|
|
128
|
+
const f = m.current;
|
|
129
|
+
f && (f.classList.toggle("collapsed", n), f.classList.toggle("expanded", !n));
|
|
130
|
+
}, []), q = x((n) => {
|
|
131
|
+
const f = d.current;
|
|
132
|
+
if (!f) return;
|
|
133
|
+
f.classList.toggle("collapsed", n), f.classList.toggle("expanded", !n);
|
|
134
|
+
const g = i.current;
|
|
135
|
+
g && (g.classList.toggle("sidebar-collapsed", n), g.classList.toggle("sidebar-expanded", !n));
|
|
135
136
|
}, []), j = x(
|
|
136
|
-
(n, { notify:
|
|
137
|
-
const
|
|
138
|
-
|
|
137
|
+
(n, { notify: f = !0 } = {}) => {
|
|
138
|
+
const g = w.current !== n;
|
|
139
|
+
w.current = n, _t(n), W(n), f && g && A.current.forEach((I) => I(n));
|
|
139
140
|
},
|
|
140
|
-
[
|
|
141
|
-
),
|
|
142
|
-
(n, { notify:
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
const
|
|
146
|
-
|
|
141
|
+
[W]
|
|
142
|
+
), U = x(
|
|
143
|
+
(n, { notify: f = !0 } = {}) => {
|
|
144
|
+
const g = h.current !== n;
|
|
145
|
+
if (h.current = n, q(n), f && g) {
|
|
146
|
+
const I = !n;
|
|
147
|
+
N.current.forEach((H) => H(I));
|
|
147
148
|
}
|
|
148
149
|
},
|
|
149
|
-
[
|
|
150
|
-
),
|
|
151
|
-
(n, { notify:
|
|
152
|
-
const
|
|
153
|
-
C.current = n, window.matchMedia("(min-width: 768px)").matches || j(n !== "drawer", { notify:
|
|
154
|
-
const
|
|
155
|
-
|
|
150
|
+
[q]
|
|
151
|
+
), S = x(
|
|
152
|
+
(n, { notify: f = !0 } = {}) => {
|
|
153
|
+
const g = C.current, I = g !== n;
|
|
154
|
+
C.current = n, window.matchMedia("(min-width: 768px)").matches || j(n !== "drawer", { notify: f });
|
|
155
|
+
const H = g === "sidebar", F = n === "sidebar";
|
|
156
|
+
f && I && H !== F && N.current.forEach((re) => re(F)), U(n !== "sidebar", { notify: f }), j(n !== "drawer", { notify: f });
|
|
156
157
|
},
|
|
157
|
-
[j,
|
|
158
|
-
),
|
|
159
|
-
const
|
|
160
|
-
if (!
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
D.current =
|
|
164
|
-
const
|
|
165
|
-
|
|
158
|
+
[j, U]
|
|
159
|
+
), $ = x((n) => {
|
|
160
|
+
const f = i.current;
|
|
161
|
+
if (!f || window.matchMedia("(min-width: 768px)").matches) return;
|
|
162
|
+
y.current = !0;
|
|
163
|
+
const g = p.current?.offsetLeft ?? 0, I = d.current?.offsetLeft ?? g, H = n === "drawer" ? 0 : n === "sidebar" ? I : g;
|
|
164
|
+
D.current = H, f.scrollTo({ left: H, behavior: "smooth" });
|
|
165
|
+
const F = () => {
|
|
166
|
+
y.current = !1, D.current = null, f.removeEventListener("scrollend", F);
|
|
166
167
|
};
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
f.addEventListener("scrollend", F, { once: !0 }), setTimeout(() => {
|
|
169
|
+
y.current && F();
|
|
169
170
|
}, 1e3);
|
|
170
|
-
}, []),
|
|
171
|
-
const n =
|
|
172
|
-
if (!n || !
|
|
173
|
-
const
|
|
171
|
+
}, []), Q = x(() => {
|
|
172
|
+
const n = i.current, f = p.current;
|
|
173
|
+
if (!n || !f || window.matchMedia("(min-width: 768px)").matches) return;
|
|
174
|
+
const g = [
|
|
174
175
|
{ panel: "drawer", offset: 0 },
|
|
175
|
-
{ panel: "outlet", offset:
|
|
176
|
-
],
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
let
|
|
180
|
-
for (let
|
|
181
|
-
const
|
|
182
|
-
|
|
176
|
+
{ panel: "outlet", offset: f.offsetLeft }
|
|
177
|
+
], I = d.current;
|
|
178
|
+
I && g.push({ panel: "sidebar", offset: I.offsetLeft });
|
|
179
|
+
const H = n.scrollLeft;
|
|
180
|
+
let F = g[0], re = Math.abs(H - F.offset);
|
|
181
|
+
for (let oe = 1; oe < g.length; oe++) {
|
|
182
|
+
const fe = Math.abs(H - g[oe].offset);
|
|
183
|
+
fe < re && (F = g[oe], re = fe);
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
-
}, [
|
|
186
|
-
|
|
187
|
-
const n =
|
|
188
|
-
n && (
|
|
189
|
-
}, [
|
|
190
|
-
const n =
|
|
191
|
-
if (!n || !
|
|
185
|
+
S(F.panel);
|
|
186
|
+
}, [S]);
|
|
187
|
+
ne(() => {
|
|
188
|
+
const n = i.current;
|
|
189
|
+
n && (c?.drawer && n.classList.add("disabled-dragopen"), c?.sidebar && n.classList.add("disabled-dragopen-sidebar"));
|
|
190
|
+
}, [c, i]), ne(() => {
|
|
191
|
+
const n = i.current, f = p.current;
|
|
192
|
+
if (!n || !f) return;
|
|
192
193
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
193
|
-
const
|
|
194
|
-
j(
|
|
194
|
+
const I = We();
|
|
195
|
+
j(I, { notify: !1 }), U(!0, { notify: !1 });
|
|
195
196
|
return;
|
|
196
197
|
}
|
|
197
198
|
requestAnimationFrame(() => {
|
|
198
|
-
n.scrollLeft =
|
|
199
|
+
n.scrollLeft = f.offsetLeft, S("outlet");
|
|
199
200
|
});
|
|
200
|
-
}, [
|
|
201
|
-
const n =
|
|
202
|
-
if (!n || !
|
|
203
|
-
let
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
const
|
|
208
|
-
return /(auto|scroll|overlay)/.test(
|
|
209
|
-
},
|
|
210
|
-
let
|
|
211
|
-
for (;
|
|
212
|
-
if (
|
|
213
|
-
return
|
|
214
|
-
|
|
201
|
+
}, [S, j, U]), ne(() => {
|
|
202
|
+
const n = i.current;
|
|
203
|
+
if (!n || !p.current) return;
|
|
204
|
+
let g = !1, I = 0, H = 0;
|
|
205
|
+
const F = (L) => {
|
|
206
|
+
I = L.touches[0].clientX, H = L.touches[0].clientY;
|
|
207
|
+
}, re = (L, K) => {
|
|
208
|
+
const V = window.getComputedStyle(L), le = K === "x" ? V.overflowX : V.overflowY;
|
|
209
|
+
return /(auto|scroll|overlay)/.test(le) ? K === "x" ? L.scrollWidth > L.clientWidth : L.scrollHeight > L.clientHeight : !1;
|
|
210
|
+
}, oe = (L, K) => {
|
|
211
|
+
let V = L;
|
|
212
|
+
for (; V && V !== n; ) {
|
|
213
|
+
if (re(V, K))
|
|
214
|
+
return V;
|
|
215
|
+
V = V.parentElement;
|
|
215
216
|
}
|
|
216
217
|
return null;
|
|
217
|
-
},
|
|
218
|
-
if (!(
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
218
|
+
}, fe = (L, K, V) => V === 0 ? !1 : K === "x" ? V < 0 ? L.scrollLeft + L.clientWidth < L.scrollWidth : L.scrollLeft > 0 : V < 0 ? L.scrollTop + L.clientHeight < L.scrollHeight : L.scrollTop > 0, we = (L) => {
|
|
219
|
+
if (!(L.target instanceof HTMLElement)) return;
|
|
220
|
+
const K = L.touches[0].clientX - I, V = L.touches[0].clientY - H, le = Math.abs(K) > Math.abs(V) ? "x" : "y", a = le === "x" ? K : V, v = oe(L.target, le);
|
|
221
|
+
if (v && fe(v, le, a))
|
|
221
222
|
return;
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
if (
|
|
225
|
-
if (C.current === "sidebar" &&
|
|
226
|
-
|
|
223
|
+
const P = n.classList.contains("disabled-dragopen"), k = n.classList.contains("disabled-dragopen-sidebar"), J = () => L.cancelable ? (L.preventDefault(), !0) : !1;
|
|
224
|
+
if (le === "x") {
|
|
225
|
+
if (K > 0) {
|
|
226
|
+
if (C.current === "sidebar" && !k) {
|
|
227
|
+
g = !0;
|
|
227
228
|
return;
|
|
228
229
|
}
|
|
229
|
-
if (
|
|
230
|
-
|
|
230
|
+
if (P) {
|
|
231
|
+
J();
|
|
231
232
|
return;
|
|
232
233
|
}
|
|
233
|
-
} else if (
|
|
234
|
-
if (C.current === "drawer" && !
|
|
235
|
-
|
|
234
|
+
} else if (K < 0) {
|
|
235
|
+
if (C.current === "drawer" && !P) {
|
|
236
|
+
g = !0;
|
|
236
237
|
return;
|
|
237
238
|
}
|
|
238
|
-
if (
|
|
239
|
-
|
|
239
|
+
if (k) {
|
|
240
|
+
J();
|
|
240
241
|
return;
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
|
-
|
|
244
|
+
g = !0;
|
|
244
245
|
}
|
|
245
|
-
},
|
|
246
|
+
}, Ne = () => {
|
|
246
247
|
setTimeout(() => {
|
|
247
|
-
|
|
248
|
+
g && (Q(), g = !1);
|
|
248
249
|
}, 100);
|
|
249
250
|
};
|
|
250
|
-
return n.addEventListener("touchstart",
|
|
251
|
-
n.removeEventListener("touchstart",
|
|
251
|
+
return n.addEventListener("touchstart", F, { passive: !1 }), n.addEventListener("touchmove", we, { passive: !1 }), n.addEventListener("touchend", Ne), () => {
|
|
252
|
+
n.removeEventListener("touchstart", F), n.removeEventListener("touchmove", we), n.removeEventListener("touchend", Ne);
|
|
252
253
|
};
|
|
253
|
-
}, [
|
|
254
|
-
const
|
|
255
|
-
const n = window.matchMedia("(min-width: 768px)").matches,
|
|
254
|
+
}, [Q]);
|
|
255
|
+
const Y = x(() => {
|
|
256
|
+
const n = window.matchMedia("(min-width: 768px)").matches, f = !w.current;
|
|
256
257
|
if (n) {
|
|
257
|
-
j(
|
|
258
|
+
j(f);
|
|
258
259
|
return;
|
|
259
260
|
}
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
}, [
|
|
263
|
-
|
|
264
|
-
toggleCollapse: () =>
|
|
261
|
+
const g = f ? "outlet" : "drawer";
|
|
262
|
+
S(g), $(g);
|
|
263
|
+
}, [$, S, j]), X = O(null);
|
|
264
|
+
X.current || (X.current = {
|
|
265
|
+
toggleCollapse: () => Y(),
|
|
265
266
|
getIsCollapsed: () => {
|
|
266
267
|
if (!window.matchMedia("(min-width: 768px)").matches) {
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
const
|
|
270
|
-
return
|
|
268
|
+
const f = i.current, g = p.current;
|
|
269
|
+
if (f && g) {
|
|
270
|
+
const I = f.scrollLeft, H = g.offsetLeft, F = Math.abs(I - H) < Math.abs(I - 0);
|
|
271
|
+
return F !== w.current && (w.current = F, W(F)), F;
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
|
-
return
|
|
274
|
+
return w.current;
|
|
274
275
|
},
|
|
275
276
|
subscribeToCollapse: (n) => (A.current.add(n), () => {
|
|
276
277
|
A.current.delete(n);
|
|
277
278
|
}),
|
|
278
279
|
openSidebar: () => {
|
|
279
|
-
if (
|
|
280
|
+
if (d.current) {
|
|
280
281
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
281
|
-
|
|
282
|
+
U(!1);
|
|
282
283
|
return;
|
|
283
284
|
}
|
|
284
|
-
|
|
285
|
+
S("sidebar"), $("sidebar");
|
|
285
286
|
}
|
|
286
287
|
},
|
|
287
288
|
closeSidebar: () => {
|
|
288
289
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
289
|
-
|
|
290
|
+
U(!0);
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
292
|
-
|
|
293
|
+
S("outlet"), $("outlet");
|
|
293
294
|
},
|
|
294
295
|
toggleSidebar: () => {
|
|
295
|
-
if (!
|
|
296
|
+
if (!d.current) return;
|
|
296
297
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
297
|
-
|
|
298
|
+
U(!h.current);
|
|
298
299
|
return;
|
|
299
300
|
}
|
|
300
301
|
const n = C.current === "sidebar" ? "outlet" : "sidebar";
|
|
301
|
-
|
|
302
|
+
S(n), $(n);
|
|
302
303
|
},
|
|
303
|
-
getIsSidebarOpen: () =>
|
|
304
|
-
subscribeToSidebarOpen: (n) => (
|
|
305
|
-
|
|
304
|
+
getIsSidebarOpen: () => d.current ? window.matchMedia("(min-width: 768px)").matches ? !h.current : C.current === "sidebar" : !1,
|
|
305
|
+
subscribeToSidebarOpen: (n) => (N.current.add(n), () => {
|
|
306
|
+
N.current.delete(n);
|
|
306
307
|
}),
|
|
307
308
|
setDrawerDragEnabled: (n) => {
|
|
308
|
-
const
|
|
309
|
-
if (!
|
|
310
|
-
const
|
|
309
|
+
const f = i.current;
|
|
310
|
+
if (!f) return;
|
|
311
|
+
const g = f.scrollLeft;
|
|
311
312
|
if (n) {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
const I = f.style.scrollBehavior;
|
|
314
|
+
f.style.scrollBehavior = "auto", f.classList.remove("disabled-dragopen"), requestAnimationFrame(() => {
|
|
315
|
+
f.scrollLeft = g, requestAnimationFrame(() => {
|
|
316
|
+
f.style.scrollBehavior = I;
|
|
316
317
|
});
|
|
317
318
|
});
|
|
318
319
|
} else
|
|
319
|
-
|
|
320
|
+
f.classList.add("disabled-dragopen");
|
|
320
321
|
},
|
|
321
322
|
setSidebarDragEnabled: (n) => {
|
|
322
|
-
const
|
|
323
|
-
if (
|
|
323
|
+
const f = i.current;
|
|
324
|
+
if (f)
|
|
324
325
|
if (n) {
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
326
|
+
const g = f.scrollLeft, I = f.style.scrollBehavior;
|
|
327
|
+
f.style.scrollBehavior = "auto", f.classList.remove("disabled-dragopen-sidebar"), requestAnimationFrame(() => {
|
|
328
|
+
f.scrollLeft = g, requestAnimationFrame(() => {
|
|
329
|
+
f.style.scrollBehavior = I;
|
|
329
330
|
});
|
|
330
331
|
});
|
|
331
332
|
} else
|
|
332
|
-
|
|
333
|
+
f.classList.add("disabled-dragopen-sidebar");
|
|
333
334
|
}
|
|
334
335
|
});
|
|
335
|
-
const
|
|
336
|
-
let
|
|
337
|
-
const
|
|
338
|
-
let
|
|
339
|
-
|
|
340
|
-
if (!
|
|
341
|
-
|
|
336
|
+
const E = X.current, _ = typeof r == "function" ? r(E) : r, b = vt.toArray(_);
|
|
337
|
+
let M = null, B = null, z = null;
|
|
338
|
+
const Z = [];
|
|
339
|
+
let ae = null, ee = null;
|
|
340
|
+
b.forEach((n) => {
|
|
341
|
+
if (!Se(n)) {
|
|
342
|
+
Z.push(n);
|
|
342
343
|
return;
|
|
343
344
|
}
|
|
344
|
-
if (n.type ===
|
|
345
|
-
|
|
345
|
+
if (n.type === Re && !M) {
|
|
346
|
+
M = n;
|
|
346
347
|
return;
|
|
347
348
|
}
|
|
348
|
-
if (n.type ===
|
|
349
|
-
|
|
349
|
+
if (n.type === je && !B) {
|
|
350
|
+
B = n;
|
|
350
351
|
return;
|
|
351
352
|
}
|
|
352
|
-
if (n.type ===
|
|
353
|
-
|
|
353
|
+
if (n.type === ke && !z) {
|
|
354
|
+
z = n;
|
|
354
355
|
return;
|
|
355
356
|
}
|
|
356
|
-
if (n.type ===
|
|
357
|
-
|
|
357
|
+
if (n.type === Oe && !ae) {
|
|
358
|
+
ae = n;
|
|
358
359
|
return;
|
|
359
360
|
}
|
|
360
|
-
if (n.type ===
|
|
361
|
-
|
|
361
|
+
if (n.type === Ze && !ee) {
|
|
362
|
+
ee = n;
|
|
362
363
|
return;
|
|
363
364
|
}
|
|
364
|
-
|
|
365
|
+
Z.push(n);
|
|
365
366
|
});
|
|
366
|
-
const
|
|
367
|
-
isCollapsed:
|
|
368
|
-
isSidebarOpen: !
|
|
369
|
-
}), [
|
|
370
|
-
return /* @__PURE__ */ e.jsx(
|
|
367
|
+
const ge = !!B, ve = B ?? (Z.length ? /* @__PURE__ */ e.jsx(je, { children: Z }) : null), Le = ge ? Z : [], de = ae ?? (!!ae ? /* @__PURE__ */ e.jsx(Oe, { children: _, context: E, modal: l, closeOnOutsideClick: u }) : null), De = z ?? (!!z ? /* @__PURE__ */ e.jsx(ke, { children: z }) : null), Ae = !!ee, te = ee, ue = me(() => ({
|
|
368
|
+
isCollapsed: w.current,
|
|
369
|
+
isSidebarOpen: !h.current
|
|
370
|
+
}), [w.current, h.current]);
|
|
371
|
+
return /* @__PURE__ */ e.jsx(et.Provider, { value: ue, children: /* @__PURE__ */ e.jsx(tt.Provider, { value: E, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: i, className: T(
|
|
371
372
|
"w-full h-full max-h-dvh overflow-y-hidden",
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
Ae ? "navigation-drawer-with-sidebar" : "navigation-drawer",
|
|
374
|
+
c?.drawer ? "disabled-dragopen" : "",
|
|
375
|
+
c?.sidebar ? "disabled-dragopen-sidebar" : ""
|
|
375
376
|
), children: [
|
|
376
377
|
/* @__PURE__ */ e.jsxs(
|
|
377
378
|
"div",
|
|
378
379
|
{
|
|
379
|
-
ref:
|
|
380
|
-
className:
|
|
380
|
+
ref: m,
|
|
381
|
+
className: T(
|
|
381
382
|
"bg-neutral-default-default border-r border-neutral-strong-default h-dvh md:h-screen p-4 overflow-hidden drawer flex flex-col gap-4",
|
|
382
|
-
|
|
383
|
+
w.current ? "collapsed" : "expanded",
|
|
383
384
|
s
|
|
384
385
|
),
|
|
385
386
|
children: [
|
|
386
387
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 gap-4 overflow-hidden", children: [
|
|
387
388
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
388
|
-
/* @__PURE__ */ e.jsx(
|
|
389
|
-
|
|
389
|
+
/* @__PURE__ */ e.jsx(st, { onToggleCollapse: Y }),
|
|
390
|
+
M
|
|
390
391
|
] }),
|
|
391
392
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 overflow-hidden relative flex-col", children: [
|
|
392
|
-
|
|
393
|
-
|
|
393
|
+
Le,
|
|
394
|
+
ve
|
|
394
395
|
] })
|
|
395
396
|
] }),
|
|
396
|
-
|
|
397
|
+
De
|
|
397
398
|
]
|
|
398
399
|
}
|
|
399
400
|
),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
ref:
|
|
403
|
-
className:
|
|
404
|
-
}) :
|
|
401
|
+
de && Se(de) ? He.cloneElement(de, { ref: p, modal: l, closeOnOutsideClick: u }) : de,
|
|
402
|
+
te && Se(te) ? He.cloneElement(te, {
|
|
403
|
+
ref: d,
|
|
404
|
+
className: T("sidebar", te.props?.className, o)
|
|
405
|
+
}) : te
|
|
405
406
|
] }) }) });
|
|
406
|
-
},
|
|
407
|
+
}, qe = R(Pt), st = R(({ onToggleCollapse: t }) => /* @__PURE__ */ e.jsx(
|
|
407
408
|
"button",
|
|
408
409
|
{
|
|
409
410
|
type: "button",
|
|
410
411
|
onClick: t,
|
|
411
412
|
className: "collapse-button cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300 w-max",
|
|
412
|
-
children: /* @__PURE__ */ e.jsx(
|
|
413
|
+
children: /* @__PURE__ */ e.jsx(Ct, { size: 32, className: "transition-transform duration-300 p-1" })
|
|
413
414
|
}
|
|
414
415
|
), (t, r) => t.onToggleCollapse === r.onToggleCollapse);
|
|
415
|
-
|
|
416
|
-
const
|
|
416
|
+
st.displayName = "NavigationDrawerCollapseButton";
|
|
417
|
+
const Re = R(({ children: t, className: r, context: s }) => {
|
|
417
418
|
const o = xe(t, s);
|
|
418
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
419
|
+
return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: o });
|
|
419
420
|
});
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
const
|
|
423
|
-
return /* @__PURE__ */ e.jsx("div", { ...o, className:
|
|
421
|
+
Re.displayName = "NavigationDrawerHeader";
|
|
422
|
+
const je = R(({ children: t, className: r, context: s, ...o }) => {
|
|
423
|
+
const c = xe(t, s);
|
|
424
|
+
return /* @__PURE__ */ e.jsx("div", { ...o, className: T("w-full flex-1 drawer-content select-none", r), children: c });
|
|
424
425
|
});
|
|
425
|
-
|
|
426
|
-
const
|
|
426
|
+
je.displayName = "NavigationDrawerContent";
|
|
427
|
+
const ke = R(({ children: t, className: r, context: s }) => {
|
|
427
428
|
const o = xe(t, s);
|
|
428
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
429
|
+
return /* @__PURE__ */ e.jsx("div", { className: T("flex items-center justify-between", r), children: o });
|
|
429
430
|
});
|
|
430
|
-
|
|
431
|
-
const
|
|
432
|
-
|
|
433
|
-
const
|
|
434
|
-
const
|
|
435
|
-
|
|
431
|
+
ke.displayName = "NavigationDrawerFooter";
|
|
432
|
+
const nt = R(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: T("w-full border-t border-neutral-strong-default ", t) }));
|
|
433
|
+
nt.displayName = "NavigationDrawerSpacer";
|
|
434
|
+
const Oe = R(he(({ children: t, className: r, context: s, modal: o, closeOnOutsideClick: c }, l) => {
|
|
435
|
+
const u = xe(t, s), i = ce(), m = () => {
|
|
436
|
+
c && (i.toggleCollapse(), i.closeSidebar());
|
|
436
437
|
};
|
|
437
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-outlet", ref: l, className:
|
|
438
|
-
o && /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer-backdrop select-none", onClick:
|
|
439
|
-
|
|
438
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-outlet", ref: l, className: T("flex-1 overflow-auto relative h-full max-h-dvh", r), children: [
|
|
439
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer-backdrop select-none", onClick: m }),
|
|
440
|
+
u
|
|
440
441
|
] }) });
|
|
441
|
-
}), (t, r) => t.children === r.children && t.className === r.className),
|
|
442
|
-
Root:
|
|
443
|
-
Header:
|
|
444
|
-
Content:
|
|
445
|
-
Footer:
|
|
446
|
-
Spacer:
|
|
447
|
-
Outlet:
|
|
448
|
-
Sidebar:
|
|
442
|
+
}), (t, r) => t.children === r.children && t.className === r.className), se = Object.assign(qe, {
|
|
443
|
+
Root: qe,
|
|
444
|
+
Header: Re,
|
|
445
|
+
Content: je,
|
|
446
|
+
Footer: ke,
|
|
447
|
+
Spacer: nt,
|
|
448
|
+
Outlet: Oe,
|
|
449
|
+
Sidebar: Ze
|
|
449
450
|
});
|
|
450
|
-
|
|
451
|
-
const
|
|
451
|
+
se.displayName = "NavigationDrawer";
|
|
452
|
+
const Mt = "hover:bg-neutral-medium-hover", Rt = Pe("", {
|
|
452
453
|
variants: {
|
|
453
454
|
isSelected: {
|
|
454
455
|
true: "bg-neutral-medium-selected ",
|
|
@@ -459,8 +460,8 @@ const Et = "hover:bg-neutral-medium-hover", Pt = Ee("", {
|
|
|
459
460
|
false: "cursor-pointer"
|
|
460
461
|
}
|
|
461
462
|
}
|
|
462
|
-
}),
|
|
463
|
-
|
|
463
|
+
}), Bt = Pe(
|
|
464
|
+
T(
|
|
464
465
|
"select-none line-clamp-1 min-w-max",
|
|
465
466
|
"prometeo-fonts-label-large transition-colors duration-300 ease-out"
|
|
466
467
|
),
|
|
@@ -482,8 +483,8 @@ const Et = "hover:bg-neutral-medium-hover", Pt = Ee("", {
|
|
|
482
483
|
{ isSelected: !1, disabled: !1, className: " text-neutral-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" }
|
|
483
484
|
]
|
|
484
485
|
}
|
|
485
|
-
),
|
|
486
|
-
|
|
486
|
+
), Te = Pe(
|
|
487
|
+
T(
|
|
487
488
|
"transition-colors duration-300 ease-out min-w-max"
|
|
488
489
|
),
|
|
489
490
|
{
|
|
@@ -504,138 +505,138 @@ const Et = "hover:bg-neutral-medium-hover", Pt = Ee("", {
|
|
|
504
505
|
{ isSelected: !1, disabled: !1, className: "text-neutral-default-default group-active:text-neutral-default-pressed group-focus-visible:text-neutral-default-pressed" }
|
|
505
506
|
]
|
|
506
507
|
}
|
|
507
|
-
),
|
|
508
|
+
), Ft = (t) => {
|
|
508
509
|
const {
|
|
509
510
|
title: r,
|
|
510
511
|
icon: s,
|
|
511
512
|
count: o,
|
|
512
|
-
className:
|
|
513
|
+
className: c,
|
|
513
514
|
isSelected: l = !1,
|
|
514
|
-
hasSublinks:
|
|
515
|
-
subLinksCollapsed:
|
|
516
|
-
onToggleSublinks:
|
|
517
|
-
as:
|
|
518
|
-
onClick:
|
|
519
|
-
onAuxClick:
|
|
520
|
-
disabled:
|
|
515
|
+
hasSublinks: u,
|
|
516
|
+
subLinksCollapsed: i,
|
|
517
|
+
onToggleSublinks: m,
|
|
518
|
+
as: p = "div",
|
|
519
|
+
onClick: d,
|
|
520
|
+
onAuxClick: w,
|
|
521
|
+
disabled: h = !1,
|
|
521
522
|
tooltipText: C
|
|
522
|
-
} = t, A = (
|
|
523
|
-
|
|
524
|
-
},
|
|
523
|
+
} = t, A = (W) => {
|
|
524
|
+
h || d?.(W);
|
|
525
|
+
}, N = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
525
526
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center flex-nowrap", children: [
|
|
526
|
-
s && (C ? /* @__PURE__ */ e.jsx(
|
|
527
|
-
/* @__PURE__ */ e.jsx("label", { className:
|
|
527
|
+
s && (C ? /* @__PURE__ */ e.jsx(jt, { title: C, disabled: h, children: /* @__PURE__ */ e.jsx(s, { size: 24, className: Te({ disabled: h, isSelected: l }) }) }) : /* @__PURE__ */ e.jsx(s, { size: 24, className: Te({ disabled: h, isSelected: l }) })),
|
|
528
|
+
/* @__PURE__ */ e.jsx("label", { className: Bt({ disabled: h, isSelected: l }), children: r })
|
|
528
529
|
] }),
|
|
529
530
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 items-center", children: [
|
|
530
|
-
o && o ? /* @__PURE__ */ e.jsx(
|
|
531
|
-
|
|
531
|
+
o && o ? /* @__PURE__ */ e.jsx(Xe, { count: o, maxCount: 9, className: "badge", disabled: h }) : "",
|
|
532
|
+
u && /* @__PURE__ */ e.jsx(
|
|
532
533
|
"div",
|
|
533
534
|
{
|
|
534
|
-
className:
|
|
535
|
+
className: T(
|
|
535
536
|
"sublinks-toggle",
|
|
536
537
|
"transition-all duration-200",
|
|
537
538
|
"rounded-full relative grid place-items-center size-6",
|
|
538
539
|
l && "text-primary-default-default",
|
|
539
|
-
`${
|
|
540
|
+
`${i ? "-rotate-90" : "rotate-90"}`
|
|
540
541
|
),
|
|
541
542
|
children: /* @__PURE__ */ e.jsx(
|
|
542
543
|
"button",
|
|
543
544
|
{
|
|
544
|
-
disabled:
|
|
545
|
+
disabled: h,
|
|
545
546
|
type: "button",
|
|
546
|
-
onClick:
|
|
547
|
-
className:
|
|
548
|
-
children: /* @__PURE__ */ e.jsx(
|
|
547
|
+
onClick: m,
|
|
548
|
+
className: T("absolute cursor-pointer hover:text-primary-default-hover top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 p-2 z-100 select-none", Te({ disabled: h, isSelected: l }), h && "pointer-events-none"),
|
|
549
|
+
children: /* @__PURE__ */ e.jsx(kt, {})
|
|
549
550
|
}
|
|
550
551
|
)
|
|
551
552
|
}
|
|
552
553
|
)
|
|
553
554
|
] })
|
|
554
|
-
] }),
|
|
555
|
+
] }), y = T(
|
|
555
556
|
"group navitem",
|
|
556
557
|
"h-12 flex-1 flex items-center p-3 rounded-lg justify-between w-full",
|
|
557
558
|
"transition-all duration-300",
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
559
|
+
Mt,
|
|
560
|
+
Rt({ isSelected: l, disabled: h }),
|
|
561
|
+
c
|
|
561
562
|
);
|
|
562
|
-
if (
|
|
563
|
-
const
|
|
563
|
+
if (p === "a") {
|
|
564
|
+
const W = {
|
|
564
565
|
onClick: A,
|
|
565
|
-
onAuxClick:
|
|
566
|
-
className:
|
|
566
|
+
onAuxClick: w,
|
|
567
|
+
className: y
|
|
567
568
|
};
|
|
568
|
-
return /* @__PURE__ */ e.jsx("a", { ...
|
|
569
|
+
return /* @__PURE__ */ e.jsx("a", { ...W, children: N });
|
|
569
570
|
}
|
|
570
|
-
if (
|
|
571
|
-
const
|
|
571
|
+
if (p === "button") {
|
|
572
|
+
const W = {
|
|
572
573
|
onClick: A,
|
|
573
574
|
type: "button",
|
|
574
|
-
className:
|
|
575
|
+
className: y
|
|
575
576
|
};
|
|
576
|
-
return /* @__PURE__ */ e.jsx("button", { ...
|
|
577
|
+
return /* @__PURE__ */ e.jsx("button", { ...W, children: N });
|
|
577
578
|
}
|
|
578
579
|
const D = {
|
|
579
580
|
onClick: A,
|
|
580
|
-
className:
|
|
581
|
+
className: y
|
|
581
582
|
};
|
|
582
|
-
return /* @__PURE__ */ e.jsx("div", { ...D, children:
|
|
583
|
-
},
|
|
584
|
-
|
|
585
|
-
const
|
|
586
|
-
const { title: r, icon: s, count: o, className:
|
|
587
|
-
return
|
|
588
|
-
|
|
583
|
+
return /* @__PURE__ */ e.jsx("div", { ...D, children: N });
|
|
584
|
+
}, Be = R(Ft);
|
|
585
|
+
Be.displayName = "NavigationDrawerItemBase";
|
|
586
|
+
const zt = (t) => {
|
|
587
|
+
const { title: r, icon: s, count: o, className: c, isActive: l, onClick: u, isView: i = !0, disabled: m, tooltipText: p } = t;
|
|
588
|
+
return i ? /* @__PURE__ */ e.jsx(
|
|
589
|
+
Be,
|
|
589
590
|
{
|
|
590
591
|
as: "button",
|
|
591
592
|
title: r,
|
|
592
593
|
icon: s,
|
|
593
594
|
count: o,
|
|
594
|
-
className:
|
|
595
|
+
className: c,
|
|
595
596
|
isSelected: l,
|
|
596
|
-
onClick:
|
|
597
|
-
disabled:
|
|
598
|
-
tooltipText:
|
|
597
|
+
onClick: u,
|
|
598
|
+
disabled: m,
|
|
599
|
+
tooltipText: p
|
|
599
600
|
}
|
|
600
601
|
) : null;
|
|
601
|
-
},
|
|
602
|
-
|
|
603
|
-
const
|
|
602
|
+
}, at = R(zt);
|
|
603
|
+
at.displayName = "NavigationDrawerActionItem";
|
|
604
|
+
const Ut = ({ actions: t, activeActionId: r, onActionClick: s, className: o }) => /* @__PURE__ */ e.jsx(be, { className: T("flex flex-col gap-2 w-full ", o), scrollbarProps: { hide: !0 }, persistScroll: "navigation-actions", indicators: {
|
|
604
605
|
top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
|
|
605
606
|
bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
|
|
606
|
-
}, children: t?.map((
|
|
607
|
-
const { id: l, onClick:
|
|
608
|
-
s?.(l,
|
|
607
|
+
}, children: t?.map((c) => {
|
|
608
|
+
const { id: l, onClick: u, isView: i = !0, payload: m, ...p } = c, d = l === r, w = () => {
|
|
609
|
+
s?.(l, m), u?.();
|
|
609
610
|
};
|
|
610
|
-
return
|
|
611
|
-
|
|
611
|
+
return i ? /* @__PURE__ */ e.jsx(
|
|
612
|
+
at,
|
|
612
613
|
{
|
|
613
|
-
...
|
|
614
|
+
...p,
|
|
614
615
|
id: l,
|
|
615
|
-
isActive:
|
|
616
|
-
onClick:
|
|
616
|
+
isActive: d,
|
|
617
|
+
onClick: w
|
|
617
618
|
},
|
|
618
619
|
l
|
|
619
620
|
) : null;
|
|
620
|
-
}) }),
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
const { className: r, title: s, path: o, onClick:
|
|
624
|
-
|
|
625
|
-
}, [o]),
|
|
621
|
+
}) }), ot = R(Ut);
|
|
622
|
+
ot.displayName = "NavigationDrawerActions";
|
|
623
|
+
const Ht = (t) => {
|
|
624
|
+
const { className: r, title: s, path: o, onClick: c, isSelected: l, parentPath: u } = t, i = x(() => {
|
|
625
|
+
c?.(o);
|
|
626
|
+
}, [o]), m = x(() => {
|
|
626
627
|
if (o.startsWith("./")) {
|
|
627
|
-
if (!
|
|
628
|
-
const
|
|
629
|
-
window.open(
|
|
628
|
+
if (!u) return;
|
|
629
|
+
const p = u + o.slice(2);
|
|
630
|
+
window.open(p, "_blank");
|
|
630
631
|
} else
|
|
631
632
|
window.open(o, "_blank");
|
|
632
633
|
}, [o]);
|
|
633
634
|
return /* @__PURE__ */ e.jsx(
|
|
634
635
|
"a",
|
|
635
636
|
{
|
|
636
|
-
onClick:
|
|
637
|
-
onAuxClick:
|
|
638
|
-
className:
|
|
637
|
+
onClick: i,
|
|
638
|
+
onAuxClick: m,
|
|
639
|
+
className: T(
|
|
639
640
|
"group",
|
|
640
641
|
"transition-all duration-300 ease-in-out cursor-pointer",
|
|
641
642
|
"h-10 w-full rounded-lg py-[11px] px-3",
|
|
@@ -643,26 +644,26 @@ const Ft = (t) => {
|
|
|
643
644
|
l && "bg-neutral-medium-selected hover:bg-neutral-medium-hover active:bg-transparent focus:bg-transparent",
|
|
644
645
|
r
|
|
645
646
|
),
|
|
646
|
-
children: /* @__PURE__ */ e.jsx("p", { className:
|
|
647
|
+
children: /* @__PURE__ */ e.jsx("p", { className: T(
|
|
647
648
|
"prometeo-fonts-label-large text-neutral-medium-default",
|
|
648
649
|
"group-active:text-neutral-default-focused group-focus:text-neutral-default-focused",
|
|
649
650
|
l && "text-primary-default-default group-hover:text-primary-default-hover group-focus:text-primary-default-focused group-active:text-primary-default-focused"
|
|
650
651
|
), children: s })
|
|
651
652
|
}
|
|
652
653
|
);
|
|
653
|
-
},
|
|
654
|
-
|
|
655
|
-
const
|
|
656
|
-
const [s, o] =
|
|
657
|
-
|
|
654
|
+
}, lt = R(Ht);
|
|
655
|
+
lt.displayName = "NavItemSecondary";
|
|
656
|
+
const Vt = he((t, r) => {
|
|
657
|
+
const [s, o] = G(!0), c = O(null), { path: l, title: u, icon: i, count: m, className: p, isSelected: d = !1, onClick: w, sublinks: h, toggleCollapse: C, getIsCollapsed: A, subscribeToCollapse: N, isView: y = !0, disabled: D, tooltipText: W } = t;
|
|
658
|
+
ne(() => N ? N((_) => {
|
|
658
659
|
_ && o(!0);
|
|
659
|
-
}) : void 0, [
|
|
660
|
-
const
|
|
661
|
-
o((
|
|
662
|
-
}, []), j = x((
|
|
663
|
-
o(
|
|
664
|
-
}, []),
|
|
665
|
-
toggle:
|
|
660
|
+
}) : void 0, [N]);
|
|
661
|
+
const q = x(() => {
|
|
662
|
+
o((E) => !E);
|
|
663
|
+
}, []), j = x((E) => {
|
|
664
|
+
o(E);
|
|
665
|
+
}, []), U = {
|
|
666
|
+
toggle: q,
|
|
666
667
|
setIsCollapsed: j,
|
|
667
668
|
get isCollapsed() {
|
|
668
669
|
return s;
|
|
@@ -671,169 +672,169 @@ const zt = he((t, r) => {
|
|
|
671
672
|
return A?.() ?? !1;
|
|
672
673
|
},
|
|
673
674
|
toggleDrawerCollapse: C,
|
|
674
|
-
subscribeToCollapse:
|
|
675
|
+
subscribeToCollapse: N
|
|
675
676
|
};
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
const
|
|
679
|
-
if (
|
|
677
|
+
_e(r, () => U, [U, s, A, C]);
|
|
678
|
+
const S = i, $ = x(() => {
|
|
679
|
+
const E = A?.() ?? !1;
|
|
680
|
+
if (h && h.length > 0 && E) {
|
|
680
681
|
j(!1), C?.();
|
|
681
682
|
return;
|
|
682
683
|
}
|
|
683
|
-
|
|
684
|
-
}, [l,
|
|
684
|
+
w?.(l);
|
|
685
|
+
}, [l, w, h, C, j, A]), Q = x(() => {
|
|
685
686
|
window.open(l, "_blank");
|
|
686
|
-
}, [l]),
|
|
687
|
-
if (!
|
|
688
|
-
if (t.subLinksRender &&
|
|
689
|
-
return t.subLinksRender(
|
|
690
|
-
const
|
|
687
|
+
}, [l]), Y = () => {
|
|
688
|
+
if (!h || D) return null;
|
|
689
|
+
if (t.subLinksRender && h)
|
|
690
|
+
return t.subLinksRender(h, U);
|
|
691
|
+
const E = x((_) => {
|
|
691
692
|
if (_.startsWith("./")) {
|
|
692
|
-
const
|
|
693
|
-
|
|
693
|
+
const b = l + _.slice(2);
|
|
694
|
+
w?.(b);
|
|
694
695
|
} else
|
|
695
|
-
|
|
696
|
+
w?.(_);
|
|
696
697
|
}, [l]);
|
|
697
|
-
return
|
|
698
|
-
const _ =
|
|
698
|
+
return ne(() => {
|
|
699
|
+
const _ = c.current;
|
|
699
700
|
if (!_) return;
|
|
700
|
-
const
|
|
701
|
-
_.style.setProperty("--sublinks-max-height", `${
|
|
702
|
-
}, []), /* @__PURE__ */ e.jsx("div", { ref:
|
|
703
|
-
},
|
|
704
|
-
|
|
701
|
+
const b = _.scrollHeight;
|
|
702
|
+
_.style.setProperty("--sublinks-max-height", `${b}px`);
|
|
703
|
+
}, []), /* @__PURE__ */ e.jsx("div", { ref: c, className: `sublinks flex flex-col gap-1 ml-8 ${s ? "collapsed" : "expanded"}`, children: h.map((_) => /* @__PURE__ */ e.jsx(lt, { ..._, onClick: E, parentPath: l }, `${_.title}-${_.path}`)) });
|
|
704
|
+
}, X = (E) => {
|
|
705
|
+
E.stopPropagation(), E.preventDefault(), q();
|
|
705
706
|
};
|
|
706
|
-
return
|
|
707
|
+
return y ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 ", children: [
|
|
707
708
|
/* @__PURE__ */ e.jsx(
|
|
708
|
-
|
|
709
|
+
Be,
|
|
709
710
|
{
|
|
710
711
|
as: "a",
|
|
711
|
-
title:
|
|
712
|
-
icon:
|
|
713
|
-
count:
|
|
714
|
-
className:
|
|
715
|
-
isSelected:
|
|
716
|
-
hasSublinks: !!
|
|
712
|
+
title: u,
|
|
713
|
+
icon: S,
|
|
714
|
+
count: m,
|
|
715
|
+
className: p,
|
|
716
|
+
isSelected: d,
|
|
717
|
+
hasSublinks: !!h,
|
|
717
718
|
subLinksCollapsed: s,
|
|
718
|
-
onToggleSublinks:
|
|
719
|
-
onClick:
|
|
720
|
-
onAuxClick:
|
|
719
|
+
onToggleSublinks: X,
|
|
720
|
+
onClick: $,
|
|
721
|
+
onAuxClick: Q,
|
|
721
722
|
disabled: D,
|
|
722
|
-
tooltipText:
|
|
723
|
+
tooltipText: W
|
|
723
724
|
}
|
|
724
725
|
),
|
|
725
|
-
|
|
726
|
+
Y()
|
|
726
727
|
] }) : null;
|
|
727
|
-
}),
|
|
728
|
-
|
|
729
|
-
const
|
|
730
|
-
const { pathname:
|
|
731
|
-
return /* @__PURE__ */ e.jsx(be, { className:
|
|
728
|
+
}), it = R(Vt);
|
|
729
|
+
it.displayName = "NavigationDrawerLinkItem";
|
|
730
|
+
const Wt = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: o, toggleCollapse: c, subscribeToCollapse: l }) => {
|
|
731
|
+
const { pathname: u } = yt();
|
|
732
|
+
return /* @__PURE__ */ e.jsx(be, { className: T("flex flex-col gap-2 w-full ", s), scrollbarProps: { hide: !0 }, persistScroll: "navigation-links", indicators: {
|
|
732
733
|
top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
|
|
733
734
|
bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
|
|
734
|
-
}, children: t?.map((
|
|
735
|
-
const
|
|
735
|
+
}, children: t?.map((i, m) => {
|
|
736
|
+
const p = i.isSelected || i.path === u || (i.relatedPaths?.some((d) => u.startsWith(d)) ?? !1);
|
|
736
737
|
return /* @__PURE__ */ e.jsx(
|
|
737
|
-
|
|
738
|
+
it,
|
|
738
739
|
{
|
|
739
|
-
...
|
|
740
|
-
isSelected:
|
|
740
|
+
...i,
|
|
741
|
+
isSelected: p,
|
|
741
742
|
onClick: r,
|
|
742
|
-
toggleCollapse:
|
|
743
|
+
toggleCollapse: c,
|
|
743
744
|
getIsCollapsed: o,
|
|
744
745
|
subscribeToCollapse: l,
|
|
745
|
-
disabled:
|
|
746
|
-
isView:
|
|
746
|
+
disabled: i.disabled,
|
|
747
|
+
isView: i.isView
|
|
747
748
|
},
|
|
748
|
-
|
|
749
|
+
m
|
|
749
750
|
);
|
|
750
751
|
}) });
|
|
751
|
-
},
|
|
752
|
-
|
|
753
|
-
const
|
|
754
|
-
const { getIsCollapsed: l, toggleCollapse:
|
|
752
|
+
}, ct = R(Wt);
|
|
753
|
+
ct.displayName = "NavigationDrawerNavlinks";
|
|
754
|
+
const dt = R(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: o, onActionClick: c }) => {
|
|
755
|
+
const { getIsCollapsed: l, toggleCollapse: u, subscribeToCollapse: i } = ce();
|
|
755
756
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
756
|
-
/* @__PURE__ */ e.jsx(
|
|
757
|
+
/* @__PURE__ */ e.jsx(se.Spacer, { className: "pb-3" }),
|
|
757
758
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col overflow-hidden h-full gap-4 relative w-full", children: [
|
|
758
759
|
/* @__PURE__ */ e.jsx(
|
|
759
|
-
|
|
760
|
+
ct,
|
|
760
761
|
{
|
|
761
762
|
getIsCollapsed: l,
|
|
762
|
-
toggleCollapse:
|
|
763
|
-
subscribeToCollapse:
|
|
763
|
+
toggleCollapse: u,
|
|
764
|
+
subscribeToCollapse: i,
|
|
764
765
|
navlinks: t,
|
|
765
766
|
handleNavigation: r,
|
|
766
767
|
className: "flex flex-1 min-h-[35dvh] w-full"
|
|
767
768
|
}
|
|
768
769
|
),
|
|
769
770
|
/* @__PURE__ */ e.jsx(
|
|
770
|
-
|
|
771
|
+
ot,
|
|
771
772
|
{
|
|
772
773
|
actions: s,
|
|
773
774
|
activeActionId: o,
|
|
774
|
-
onActionClick:
|
|
775
|
+
onActionClick: c,
|
|
775
776
|
className: "max-h-[30dvh]"
|
|
776
777
|
}
|
|
777
778
|
)
|
|
778
779
|
] })
|
|
779
780
|
] });
|
|
780
781
|
}, (t, r) => t.navlinks === r.navlinks && t.handleNavigation === r.handleNavigation && t.allActions === r.allActions && t.activeActionId === r.activeActionId && t.onActionClick === r.onActionClick);
|
|
781
|
-
|
|
782
|
-
const
|
|
783
|
-
const { sessions: r, onSessionClick: s, secondarySlot: o, subImageUrlAccessor:
|
|
782
|
+
dt.displayName = "PyrionNavigationDrawer.Content";
|
|
783
|
+
const qt = (t) => {
|
|
784
|
+
const { sessions: r, onSessionClick: s, secondarySlot: o, subImageUrlAccessor: c } = t;
|
|
784
785
|
if (!r || r.length === 0)
|
|
785
786
|
return null;
|
|
786
|
-
const l = (
|
|
787
|
-
s && s(
|
|
788
|
-
},
|
|
789
|
-
if (!
|
|
787
|
+
const l = (m) => {
|
|
788
|
+
s && s(m);
|
|
789
|
+
}, u = (m) => {
|
|
790
|
+
if (!c)
|
|
790
791
|
return;
|
|
791
|
-
const
|
|
792
|
-
if (!
|
|
792
|
+
const p = m.metadata;
|
|
793
|
+
if (!p)
|
|
793
794
|
return;
|
|
794
|
-
const
|
|
795
|
-
if (
|
|
796
|
-
return typeof
|
|
797
|
-
},
|
|
798
|
-
return /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex flex-col gap-2", children: r?.map((
|
|
799
|
-
const { auth_id:
|
|
800
|
-
return /* @__PURE__ */ e.jsx(
|
|
801
|
-
|
|
795
|
+
const d = ye({ metadata: p }, c);
|
|
796
|
+
if (d != null)
|
|
797
|
+
return typeof d == "string" ? d : String(d);
|
|
798
|
+
}, i = x((m) => typeof o == "function" ? o(m) : o, [o]);
|
|
799
|
+
return /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex flex-col gap-2", children: r?.map((m) => {
|
|
800
|
+
const { auth_id: p } = m;
|
|
801
|
+
return /* @__PURE__ */ e.jsx(ie, { className: " shrink-0 h-max", children: /* @__PURE__ */ e.jsx(ie.Content, { onClick: () => l(m), className: "p-0 group-data-[expanded=true]/ticketcard:border-none", children: /* @__PURE__ */ e.jsx(
|
|
802
|
+
Je,
|
|
802
803
|
{
|
|
803
|
-
name:
|
|
804
|
+
name: p.name,
|
|
804
805
|
avatarSize: "xxs",
|
|
805
|
-
secondarySlot:
|
|
806
|
-
subImageUrl:
|
|
807
|
-
imageUrl:
|
|
806
|
+
secondarySlot: i(m),
|
|
807
|
+
subImageUrl: u(m),
|
|
808
|
+
imageUrl: p.profile_picture,
|
|
808
809
|
className: "pyrion-navigation-drawer-user-card"
|
|
809
810
|
},
|
|
810
|
-
|
|
811
|
-
) }) },
|
|
811
|
+
m.token
|
|
812
|
+
) }) }, m.token);
|
|
812
813
|
}) });
|
|
813
|
-
},
|
|
814
|
+
}, $t = ({
|
|
814
815
|
state: t,
|
|
815
816
|
currentAppSessions: r,
|
|
816
817
|
resolveUserSecondarySlot: s,
|
|
817
818
|
resolveSessionSecondarySlot: o,
|
|
818
|
-
onSessionClick:
|
|
819
|
+
onSessionClick: c,
|
|
819
820
|
onLogoutClick: l,
|
|
820
|
-
onProfileClick:
|
|
821
|
-
options:
|
|
822
|
-
currentSystemId:
|
|
823
|
-
userOptionsControls:
|
|
824
|
-
mobileAppSwitcherControls:
|
|
821
|
+
onProfileClick: u,
|
|
822
|
+
options: i,
|
|
823
|
+
currentSystemId: m,
|
|
824
|
+
userOptionsControls: p,
|
|
825
|
+
mobileAppSwitcherControls: d
|
|
825
826
|
}) => {
|
|
826
|
-
const { getIsCollapsed:
|
|
827
|
-
const
|
|
828
|
-
|
|
829
|
-
}, [
|
|
830
|
-
return
|
|
831
|
-
|
|
832
|
-
}), [C,
|
|
833
|
-
/* @__PURE__ */ e.jsx(
|
|
834
|
-
/* @__PURE__ */ e.jsxs(
|
|
835
|
-
/* @__PURE__ */ e.jsx(
|
|
836
|
-
|
|
827
|
+
const { getIsCollapsed: w, toggleCollapse: h, subscribeToCollapse: C } = ce(), A = x(() => {
|
|
828
|
+
const N = w();
|
|
829
|
+
N ? (h(), p.current?.open()) : u?.(N);
|
|
830
|
+
}, [w, h, p, u]);
|
|
831
|
+
return ne(() => C((N) => {
|
|
832
|
+
N && (p.current?.close(), d.current?.close());
|
|
833
|
+
}), [C, p, d]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
834
|
+
/* @__PURE__ */ e.jsx(se.Spacer, { className: "mb-3" }),
|
|
835
|
+
/* @__PURE__ */ e.jsxs(ie, { className: "", controls: p, children: [
|
|
836
|
+
/* @__PURE__ */ e.jsx(ie.Content, { onClick: A, children: /* @__PURE__ */ e.jsx(
|
|
837
|
+
Je,
|
|
837
838
|
{
|
|
838
839
|
className: "pyrion-navigation-drawer-user-card p-0",
|
|
839
840
|
name: t.user.name,
|
|
@@ -843,17 +844,17 @@ const Ht = (t) => {
|
|
|
843
844
|
avatarSize: "xxs"
|
|
844
845
|
}
|
|
845
846
|
) }),
|
|
846
|
-
/* @__PURE__ */ e.jsxs(
|
|
847
|
+
/* @__PURE__ */ e.jsxs(ie.Options, { className: "min-h-max flex flex-col gap-3 pl-3 mt-3 pt-2", children: [
|
|
847
848
|
r && r.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
848
849
|
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-medium text-neutral-medium-default select-none", children: "Cambiar cuenta" }),
|
|
849
850
|
/* @__PURE__ */ e.jsx(be, { className: "flex flex-col gap-2 max-h-[165px] flex-1", scrollbarProps: { hide: !0 }, children: /* @__PURE__ */ e.jsx(
|
|
850
|
-
|
|
851
|
+
qt,
|
|
851
852
|
{
|
|
852
853
|
sessions: r,
|
|
853
|
-
onSessionClick:
|
|
854
|
+
onSessionClick: c,
|
|
854
855
|
secondarySlot: o,
|
|
855
|
-
subImageUrlAccessor:
|
|
856
|
-
currentSystemId:
|
|
856
|
+
subImageUrlAccessor: i?.sessionCardOptions?.subImageUrlAccessor,
|
|
857
|
+
currentSystemId: m
|
|
857
858
|
}
|
|
858
859
|
) })
|
|
859
860
|
] }),
|
|
@@ -867,7 +868,7 @@ const Ht = (t) => {
|
|
|
867
868
|
animateIcon: !1,
|
|
868
869
|
variant: "text",
|
|
869
870
|
label: "Cerrar sesión",
|
|
870
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
871
|
+
icon: /* @__PURE__ */ e.jsx(Lt, {}),
|
|
871
872
|
size: "small",
|
|
872
873
|
color: "secondary",
|
|
873
874
|
className: "w-full justify-start h-12 max-h-none p-3 "
|
|
@@ -877,27 +878,27 @@ const Ht = (t) => {
|
|
|
877
878
|
] })
|
|
878
879
|
] })
|
|
879
880
|
] });
|
|
880
|
-
},
|
|
881
|
+
}, ut = R($t, (t, r) => {
|
|
881
882
|
const s = Object.keys(t), o = Object.keys(r);
|
|
882
883
|
if (s.length !== o.length)
|
|
883
884
|
return !1;
|
|
884
|
-
for (const
|
|
885
|
-
if (!Object.prototype.hasOwnProperty.call(r,
|
|
885
|
+
for (const c of s) {
|
|
886
|
+
if (!Object.prototype.hasOwnProperty.call(r, c))
|
|
886
887
|
return !1;
|
|
887
|
-
const l = t[
|
|
888
|
-
if (l !==
|
|
888
|
+
const l = t[c], u = r[c];
|
|
889
|
+
if (l !== u)
|
|
889
890
|
return !1;
|
|
890
891
|
}
|
|
891
892
|
return t.currentAppSessions !== r.currentAppSessions || t.options !== r.options || t.currentSystemId !== r.currentSystemId || t.userOptionsControls !== r.userOptionsControls || t.mobileAppSwitcherControls !== r.mobileAppSwitcherControls;
|
|
892
893
|
});
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
/* @__PURE__ */ e.jsx(
|
|
896
|
-
/* @__PURE__ */ e.jsxs(
|
|
894
|
+
ut.displayName = "PyrionNavigationDrawer.Footer";
|
|
895
|
+
const Kt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(ie, { controls: s, children: [
|
|
896
|
+
/* @__PURE__ */ e.jsx(ie.Content, { children: typeof r == "function" ? r() : r }),
|
|
897
|
+
/* @__PURE__ */ e.jsxs(ie.Options, { children: [
|
|
897
898
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col p-2 pl-4 gap-2", children: [
|
|
898
899
|
/* @__PURE__ */ e.jsx("p", { className: " prometeo-fonts-label-medium text-neutral-medium-default", children: "Cambiar módulo" }),
|
|
899
900
|
/* @__PURE__ */ e.jsx(be, { className: "max-h-52", scrollbarProps: { hide: !0 }, children: t?.map((o) => {
|
|
900
|
-
const
|
|
901
|
+
const c = typeof o.thumbnail == "string" ? /* @__PURE__ */ e.jsx(
|
|
901
902
|
"img",
|
|
902
903
|
{
|
|
903
904
|
src: o.thumbnail,
|
|
@@ -909,7 +910,7 @@ const Wt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se,
|
|
|
909
910
|
o.disabled || o.onClick && o.onClick(o.name);
|
|
910
911
|
};
|
|
911
912
|
return /* @__PURE__ */ e.jsxs("div", { onClick: l, className: "flex gap-2 p-2 rounded-lg h-12", children: [
|
|
912
|
-
|
|
913
|
+
c,
|
|
913
914
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center h-full justify-center ", children: [
|
|
914
915
|
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-large text-neutral-default-default line-clamp-1", children: o.name }),
|
|
915
916
|
o.description && /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-medium-default line-clamp-1", children: o.description })
|
|
@@ -919,25 +920,25 @@ const Wt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se,
|
|
|
919
920
|
] }),
|
|
920
921
|
/* @__PURE__ */ e.jsx("div", {})
|
|
921
922
|
] })
|
|
922
|
-
] }),
|
|
923
|
+
] }), Ie = R(({ enabled_systems: t, onClick: r, currentSystemId: s }) => {
|
|
923
924
|
const o = x(() => {
|
|
924
925
|
if (t) {
|
|
925
926
|
if (s) {
|
|
926
|
-
const
|
|
927
|
-
if (
|
|
927
|
+
const i = t.find((m) => m._id === s);
|
|
928
|
+
if (i) return { coverImage: i.coverImage, thumbnail: i.thumbnail };
|
|
928
929
|
}
|
|
929
|
-
const l = window.location.origin,
|
|
930
|
-
if (
|
|
930
|
+
const l = window.location.origin, u = t.find((i) => i.url === l);
|
|
931
|
+
if (u) return { coverImage: u.coverImage, thumbnail: u.thumbnail };
|
|
931
932
|
}
|
|
932
933
|
return { coverImage: "", thumbnail: "" };
|
|
933
|
-
}, [t]),
|
|
934
|
+
}, [t]), c = !!r;
|
|
934
935
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
935
936
|
/* @__PURE__ */ e.jsx(
|
|
936
937
|
"img",
|
|
937
938
|
{
|
|
938
939
|
src: o().coverImage,
|
|
939
940
|
alt: "System Logo",
|
|
940
|
-
className:
|
|
941
|
+
className: T("w-full h-12 rounded object-contain system-cover-image ", c && "cursor-pointer"),
|
|
941
942
|
draggable: !1,
|
|
942
943
|
onClick: r
|
|
943
944
|
}
|
|
@@ -947,136 +948,148 @@ const Wt = ({ tabs: t, content: r, controls: s }) => /* @__PURE__ */ e.jsxs(se,
|
|
|
947
948
|
{
|
|
948
949
|
src: o().thumbnail,
|
|
949
950
|
alt: "System Logo",
|
|
950
|
-
className:
|
|
951
|
+
className: T("w-12 h-12 rounded object-cover system-thumbnail ", c && "cursor-pointer"),
|
|
951
952
|
draggable: !1,
|
|
952
953
|
onClick: r
|
|
953
954
|
}
|
|
954
955
|
)
|
|
955
956
|
] });
|
|
956
957
|
}, (t, r) => t.enabled_systems === r.enabled_systems && t.onClick === r.onClick && t.currentSystemId === r.currentSystemId);
|
|
957
|
-
|
|
958
|
-
const
|
|
959
|
-
const { getIsCollapsed: l } =
|
|
958
|
+
Ie.displayName = "PyrionNavigationDrawer.SystemLogo";
|
|
959
|
+
const ft = R(({ onSystemLogoClick: t, state: r, currentSystemId: s, tabs: o, mobileAppSwitcherControls: c }) => {
|
|
960
|
+
const { getIsCollapsed: l } = ce(), u = Ke(), i = x(() => {
|
|
960
961
|
if (t) {
|
|
961
|
-
const
|
|
962
|
-
t(
|
|
962
|
+
const m = l();
|
|
963
|
+
t(m);
|
|
963
964
|
}
|
|
964
965
|
}, [t, l]);
|
|
965
|
-
return
|
|
966
|
-
|
|
966
|
+
return u ? /* @__PURE__ */ e.jsx(
|
|
967
|
+
Kt,
|
|
967
968
|
{
|
|
968
|
-
controls:
|
|
969
|
+
controls: c,
|
|
969
970
|
tabs: o,
|
|
970
971
|
content: /* @__PURE__ */ e.jsx(
|
|
971
|
-
|
|
972
|
+
Ie,
|
|
972
973
|
{
|
|
973
974
|
enabled_systems: r.enabled_systems,
|
|
974
|
-
onClick:
|
|
975
|
+
onClick: i,
|
|
975
976
|
currentSystemId: s
|
|
976
977
|
}
|
|
977
978
|
)
|
|
978
979
|
}
|
|
979
980
|
) : /* @__PURE__ */ e.jsx(
|
|
980
|
-
|
|
981
|
+
Ie,
|
|
981
982
|
{
|
|
982
983
|
enabled_systems: r.enabled_systems,
|
|
983
|
-
onClick:
|
|
984
|
+
onClick: i,
|
|
984
985
|
currentSystemId: s
|
|
985
986
|
}
|
|
986
987
|
);
|
|
987
988
|
});
|
|
988
|
-
|
|
989
|
-
const
|
|
990
|
-
|
|
989
|
+
ft.displayName = "PyrionNavigationDrawer.Header";
|
|
990
|
+
const $e = ({ type: t }) => {
|
|
991
|
+
if (t === "load_more") return /* @__PURE__ */ e.jsx("p", { className: " prometeo-fonts-body-large text-neutral-medium-default w-full text-center py-4", children: "Cargando más ..." });
|
|
992
|
+
if (t === "skeletons") return /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex flex-col gap-3", children: Array(10)?.fill({})?.map(() => /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(Yt, {}) })) });
|
|
993
|
+
}, Yt = () => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-end gap-1 p-2", children: [
|
|
994
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 w-full", children: [
|
|
995
|
+
/* @__PURE__ */ e.jsx(Ce, { shape: "circle", className: "w-12 h-12 aspect-square!" }),
|
|
996
|
+
/* @__PURE__ */ e.jsx(Ce, { shape: "rounded", className: "w-full h-12 min-h-12" })
|
|
997
|
+
] }),
|
|
998
|
+
/* @__PURE__ */ e.jsx(Ce, { shape: "rounded", className: "w-20 h-3" })
|
|
999
|
+
] }), Xt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s, scrollableControls: o }) => {
|
|
1000
|
+
const [c, l] = G([]), [u, i] = G("NO_LEIDAS"), [m, p] = G({ isLoading: !1, type: "load_more" }), [d, w] = G({ hasError: !1 }), h = O(/* @__PURE__ */ new Set()), C = O(null), A = O(null), N = x((b, M = "top") => {
|
|
991
1001
|
l((B) => {
|
|
992
|
-
const z = Array.isArray(
|
|
1002
|
+
const z = Array.isArray(b) ? M === "bottom" ? [...B, ...b] : [...b, ...B] : M === "bottom" ? [...B, b] : [b, ...B];
|
|
993
1003
|
return queueMicrotask(() => {
|
|
994
|
-
|
|
1004
|
+
h.current.forEach((Z) => Z(z, z.length));
|
|
995
1005
|
}), z;
|
|
996
1006
|
});
|
|
997
|
-
}, []),
|
|
998
|
-
|
|
999
|
-
}), []),
|
|
1000
|
-
l((
|
|
1001
|
-
const B = Array.isArray(
|
|
1007
|
+
}, []), y = x((b) => (h.current.add(b), () => {
|
|
1008
|
+
h.current.delete(b);
|
|
1009
|
+
}), []), D = x((b) => {
|
|
1010
|
+
l((M) => {
|
|
1011
|
+
const B = Array.isArray(b) ? M.filter((z) => !b.includes(z._id)) : M.filter((z) => z._id !== b);
|
|
1002
1012
|
return queueMicrotask(() => {
|
|
1003
|
-
|
|
1013
|
+
h.current.forEach((z) => z(B, B.length));
|
|
1004
1014
|
}), B;
|
|
1005
1015
|
});
|
|
1006
|
-
}, []),
|
|
1016
|
+
}, []), W = x(() => {
|
|
1007
1017
|
l([]), queueMicrotask(() => {
|
|
1008
|
-
|
|
1018
|
+
h.current.forEach((b) => b([], 0));
|
|
1009
1019
|
});
|
|
1010
|
-
}, []),
|
|
1011
|
-
l(
|
|
1012
|
-
|
|
1020
|
+
}, []), q = x((b) => {
|
|
1021
|
+
l(b), queueMicrotask(() => {
|
|
1022
|
+
h.current.forEach((M) => M(b, b.length));
|
|
1013
1023
|
});
|
|
1014
|
-
}, []),
|
|
1015
|
-
|
|
1024
|
+
}, []), j = x((b, M = "load_more") => {
|
|
1025
|
+
p({ isLoading: b, type: M });
|
|
1026
|
+
}, []), U = x((b, M) => {
|
|
1027
|
+
w({ hasError: b, children: M });
|
|
1016
1028
|
}, []);
|
|
1017
|
-
|
|
1018
|
-
addNewNotification:
|
|
1019
|
-
subscribeToUpdates:
|
|
1020
|
-
setNotifications:
|
|
1021
|
-
removeNotification:
|
|
1022
|
-
removeAllNotifications:
|
|
1023
|
-
setLoading:
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
b.current.
|
|
1029
|
+
_e(s, () => ({
|
|
1030
|
+
addNewNotification: N,
|
|
1031
|
+
subscribeToUpdates: y,
|
|
1032
|
+
setNotifications: q,
|
|
1033
|
+
removeNotification: D,
|
|
1034
|
+
removeAllNotifications: W,
|
|
1035
|
+
setLoading: j,
|
|
1036
|
+
setError: U
|
|
1037
|
+
}), [N, y, q, D, W, j, U]);
|
|
1038
|
+
const S = (b) => {
|
|
1039
|
+
i(b);
|
|
1040
|
+
}, $ = c.length > 0;
|
|
1041
|
+
wt(() => {
|
|
1042
|
+
if (C.current && A.current) {
|
|
1043
|
+
const b = C.current.clientHeight;
|
|
1044
|
+
A.current.style.setProperty("height", `calc(100vh - ${b}px - 20px)`);
|
|
1032
1045
|
}
|
|
1033
|
-
}, [
|
|
1034
|
-
const
|
|
1046
|
+
}, [C?.current]);
|
|
1047
|
+
const Q = c.filter((b) => !b.read).length, { isLoading: Y, type: X } = m, { hasError: E, children: _ } = d;
|
|
1035
1048
|
return /* @__PURE__ */ e.jsx(
|
|
1036
1049
|
"section",
|
|
1037
1050
|
{
|
|
1038
1051
|
className: "w-full md:w-[479px] bg-neutral-default-default flex flex-col border-l-0 md:border-l border-neutral-strong-default min-h-full h-full max-h-full overflow-hidden",
|
|
1039
1052
|
children: /* @__PURE__ */ e.jsxs("div", { className: " w-full flex flex-col gap-4 ", children: [
|
|
1040
|
-
/* @__PURE__ */ e.jsxs("div", { ref:
|
|
1053
|
+
/* @__PURE__ */ e.jsxs("div", { ref: C, className: "flex flex-col gap-4", children: [
|
|
1041
1054
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full h-max flex gap-2 items-center justify-between pt-8 pb-2 pr-2 pl-4 border-b border-neutral-strong-default sticky top-0 z-50 bg-neutral-default-default", children: [
|
|
1042
1055
|
/* @__PURE__ */ e.jsxs("span", { className: "flex gap-2 items-center", children: [
|
|
1043
|
-
/* @__PURE__ */ e.jsx(
|
|
1056
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "text-neutral-strong-default", size: 24 }),
|
|
1044
1057
|
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-headline-small text-neutral-strong-default", children: "Notificaciones" })
|
|
1045
1058
|
] }),
|
|
1046
|
-
/* @__PURE__ */ e.jsx(pe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(
|
|
1059
|
+
/* @__PURE__ */ e.jsx(pe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(Me, {}), variant: "text", animate: !1, animateIcon: !1, color: "secondary", className: "size-12" })
|
|
1047
1060
|
] }),
|
|
1048
1061
|
/* @__PURE__ */ e.jsx(
|
|
1049
|
-
|
|
1062
|
+
At,
|
|
1050
1063
|
{
|
|
1051
1064
|
className: "px-4 md:px-2 md:pl-2 pl-2 gap-0 md:gap-0",
|
|
1052
|
-
onTabChange:
|
|
1053
|
-
activeTab:
|
|
1065
|
+
onTabChange: S,
|
|
1066
|
+
activeTab: u,
|
|
1054
1067
|
items: [
|
|
1055
1068
|
{ id: "ALL", title: "Todas" },
|
|
1056
1069
|
{ id: "NO_LEIDAS", title: "Sin leer" }
|
|
1057
1070
|
],
|
|
1058
|
-
renderTab: (
|
|
1071
|
+
renderTab: (b, M, B, z, Z, ae, ee, ge) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1059
1072
|
/* @__PURE__ */ e.jsx(
|
|
1060
|
-
|
|
1073
|
+
Tt,
|
|
1061
1074
|
{
|
|
1062
|
-
id:
|
|
1063
|
-
title:
|
|
1075
|
+
id: b.id,
|
|
1076
|
+
title: b.title,
|
|
1064
1077
|
onClick: B,
|
|
1065
|
-
isActive:
|
|
1078
|
+
isActive: M,
|
|
1066
1079
|
onIconClick: z,
|
|
1067
|
-
onIconHover:
|
|
1068
|
-
iconTooltipProps:
|
|
1069
|
-
iconTooltipTitle:
|
|
1070
|
-
iconSize:
|
|
1080
|
+
onIconHover: Z,
|
|
1081
|
+
iconTooltipProps: ee,
|
|
1082
|
+
iconTooltipTitle: ae,
|
|
1083
|
+
iconSize: ge
|
|
1071
1084
|
}
|
|
1072
1085
|
),
|
|
1073
|
-
|
|
1086
|
+
Q > 0 && b.id === "NO_LEIDAS" && (Y ? /* @__PURE__ */ e.jsx("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ e.jsx(Ce, { className: "size-5.5", shape: "circle" }) }) : /* @__PURE__ */ e.jsx(Xe, { count: Q, className: "absolute top-0 right-0" }))
|
|
1074
1087
|
] })
|
|
1075
1088
|
}
|
|
1076
1089
|
),
|
|
1077
|
-
r &&
|
|
1090
|
+
r && $ && u === "NO_LEIDAS" && !E && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(pe, { disabled: Y, onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
|
|
1078
1091
|
] }),
|
|
1079
|
-
/* @__PURE__ */ e.jsx("div", { ref:
|
|
1092
|
+
E ? /* @__PURE__ */ e.jsx("div", { className: "w-full h-full grid place-items-center", children: typeof _ == "function" ? _() : _ }) : /* @__PURE__ */ e.jsx("div", { ref: A, className: "", children: /* @__PURE__ */ e.jsxs(
|
|
1080
1093
|
be,
|
|
1081
1094
|
{
|
|
1082
1095
|
className: "px-4 md:px-2 py-0 md:py-0 flex flex-col gap-3 h-full",
|
|
@@ -1088,132 +1101,136 @@ const qt = ({ onCloseClick: t, onMarkAllAsRead: r, notificationsListControls: s,
|
|
|
1088
1101
|
scrollTopButton: {
|
|
1089
1102
|
target: "2000px"
|
|
1090
1103
|
},
|
|
1104
|
+
scrollMetadata: {
|
|
1105
|
+
activeTab: u,
|
|
1106
|
+
isLoading: Y
|
|
1107
|
+
},
|
|
1091
1108
|
children: [
|
|
1092
|
-
|
|
1093
|
-
|
|
1109
|
+
Y && X === "skeletons" ? /* @__PURE__ */ e.jsx($e, { type: X }) : $ ? c?.filter((b) => u === "NO_LEIDAS" ? !b.read : b)?.map((b, M) => /* @__PURE__ */ e.jsx(Dt, { ...b, className: " border-b border-neutral-strong-default rounded-b-none last:border-b-0" }, M)) : /* @__PURE__ */ e.jsx("p", { className: "flex-1 grid place-items-center prometeo-fonts-headline-xsmall text-neutral-default-default text-center py-8 text-balance", children: "No tienes notificaciones nuevas por el momento" }),
|
|
1110
|
+
Y && X === "load_more" && /* @__PURE__ */ e.jsx($e, { type: X })
|
|
1094
1111
|
]
|
|
1095
1112
|
}
|
|
1096
1113
|
) })
|
|
1097
1114
|
] })
|
|
1098
1115
|
}
|
|
1099
1116
|
);
|
|
1100
|
-
},
|
|
1117
|
+
}, Jt = ({ onCloseClick: t, children: r, title: s = "Ayuda" }) => /* @__PURE__ */ e.jsxs(
|
|
1101
1118
|
"section",
|
|
1102
1119
|
{
|
|
1103
1120
|
className: "overflow-auto w-full md:w-[479px] bg-neutral-default-default border-l-0 md:border-l border-neutral-strong-default h-full",
|
|
1104
1121
|
children: [
|
|
1105
1122
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full h-max flex gap-2 items-center justify-between pt-8 pb-2 pr-2 pl-4 border-b border-neutral-strong-default sticky top-0 z-50 bg-neutral-default-default", children: [
|
|
1106
1123
|
/* @__PURE__ */ e.jsxs("span", { className: "flex gap-2 items-center", children: [
|
|
1107
|
-
/* @__PURE__ */ e.jsx(
|
|
1124
|
+
/* @__PURE__ */ e.jsx(Qe, { className: "text-neutral-strong-default", size: 24 }),
|
|
1108
1125
|
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-headline-small text-neutral-strong-default", children: s })
|
|
1109
1126
|
] }),
|
|
1110
|
-
/* @__PURE__ */ e.jsx(pe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(
|
|
1127
|
+
/* @__PURE__ */ e.jsx(pe, { onClick: () => t?.(), icon: /* @__PURE__ */ e.jsx(Me, {}), variant: "text", animate: !1, animateIcon: !1, color: "secondary", className: "size-12" })
|
|
1111
1128
|
] }),
|
|
1112
1129
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-8 pt-4 px-4 ", children: r })
|
|
1113
1130
|
]
|
|
1114
1131
|
}
|
|
1115
|
-
),
|
|
1116
|
-
const [
|
|
1117
|
-
|
|
1118
|
-
setActiveSection:
|
|
1132
|
+
), Gt = ({ closeSidebar: t, options: r, helpSection: s, initialSection: o, notificationsListControls: c, scrollableControls: l }, u) => {
|
|
1133
|
+
const [i, m] = G(o ?? "notifications");
|
|
1134
|
+
_e(u, () => ({
|
|
1135
|
+
setActiveSection: m
|
|
1119
1136
|
}));
|
|
1120
|
-
const
|
|
1137
|
+
const p = () => {
|
|
1121
1138
|
t();
|
|
1122
1139
|
};
|
|
1123
1140
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1124
|
-
|
|
1125
|
-
|
|
1141
|
+
i === "notifications" && !r?.notificationsDrawerOptions?.hide && /* @__PURE__ */ e.jsx(
|
|
1142
|
+
Xt,
|
|
1126
1143
|
{
|
|
1127
|
-
onCloseClick:
|
|
1144
|
+
onCloseClick: p,
|
|
1128
1145
|
onMarkAllAsRead: r?.notificationsDrawerOptions?.onMarkAllAsRead,
|
|
1129
|
-
notificationsListControls:
|
|
1146
|
+
notificationsListControls: c,
|
|
1130
1147
|
scrollableControls: l
|
|
1131
1148
|
}
|
|
1132
1149
|
),
|
|
1133
|
-
|
|
1150
|
+
i === "help" && s && !r?.helpSectionDrawerOptions?.hide && /* @__PURE__ */ e.jsx(Jt, { onCloseClick: p, children: typeof s == "function" ? s() : s })
|
|
1134
1151
|
] });
|
|
1135
|
-
},
|
|
1136
|
-
|
|
1137
|
-
const
|
|
1152
|
+
}, mt = he(Gt);
|
|
1153
|
+
mt.displayName = "SidebarContent";
|
|
1154
|
+
const Qt = ({
|
|
1138
1155
|
options: t,
|
|
1139
1156
|
helpSection: r,
|
|
1140
1157
|
sidebarContentRef: s,
|
|
1141
1158
|
initialSectionRef: o,
|
|
1142
|
-
notificationsListControls:
|
|
1159
|
+
notificationsListControls: c,
|
|
1143
1160
|
scrollableControls: l
|
|
1144
1161
|
}) => {
|
|
1145
|
-
const { closeSidebar:
|
|
1162
|
+
const { closeSidebar: u } = ce();
|
|
1146
1163
|
return /* @__PURE__ */ e.jsx(
|
|
1147
|
-
|
|
1164
|
+
mt,
|
|
1148
1165
|
{
|
|
1149
1166
|
ref: s,
|
|
1150
|
-
closeSidebar:
|
|
1167
|
+
closeSidebar: u,
|
|
1151
1168
|
options: t,
|
|
1152
1169
|
helpSection: r,
|
|
1153
1170
|
initialSection: o.current,
|
|
1154
|
-
notificationsListControls:
|
|
1171
|
+
notificationsListControls: c,
|
|
1155
1172
|
scrollableControls: l
|
|
1156
1173
|
}
|
|
1157
1174
|
);
|
|
1158
|
-
},
|
|
1159
|
-
|
|
1160
|
-
const
|
|
1161
|
-
const r =
|
|
1175
|
+
}, pt = R(Qt);
|
|
1176
|
+
pt.displayName = "PyrionNavigationDrawer.Sidebar";
|
|
1177
|
+
const Zt = ({ navigationControlsRef: t }) => {
|
|
1178
|
+
const r = ce();
|
|
1162
1179
|
return t.current.toggleCollapse = r.toggleCollapse, t.current.getIsCollapsed = r.getIsCollapsed, t.current.subscribeToCollapse = r.subscribeToCollapse, t.current.openSidebar = r.openSidebar, t.current.closeSidebar = r.closeSidebar, t.current.toggleSidebar = r.toggleSidebar, t.current.getIsSidebarOpen = r.getIsSidebarOpen, t.current.subscribeToSidebarOpen = r.subscribeToSidebarOpen, t.current.setDrawerDragEnabled = r.setDrawerDragEnabled, t.current.setSidebarDragEnabled = r.setSidebarDragEnabled, null;
|
|
1163
|
-
},
|
|
1164
|
-
const { children: r, currentAppSessions: s, resolveUserSecondarySlot: o, resolveSessionSecondarySlot:
|
|
1165
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1166
|
-
/* @__PURE__ */ e.jsx(
|
|
1167
|
-
/* @__PURE__ */ e.jsx(
|
|
1168
|
-
|
|
1180
|
+
}, er = (t) => {
|
|
1181
|
+
const { children: r, currentAppSessions: s, resolveUserSecondarySlot: o, resolveSessionSecondarySlot: c, handleNavigation: l, allActions: u, tabs: i, navigationControlsRef: m, sidebarContentRef: p, initialSectionRef: d, userOptionsControls: w, mobileAppSwitcherControls: h, notificationsListControls: C, scrollableControls: A, outletRef: N, ...y } = t;
|
|
1182
|
+
return /* @__PURE__ */ e.jsxs(se, { disableDragOpen: y.options?.disableDragOpen, outletRef: N, children: [
|
|
1183
|
+
/* @__PURE__ */ e.jsx(Zt, { navigationControlsRef: m }),
|
|
1184
|
+
/* @__PURE__ */ e.jsx(se.Header, { className: "flex flex-col relative w-full select-none", children: /* @__PURE__ */ e.jsx(
|
|
1185
|
+
ft,
|
|
1169
1186
|
{
|
|
1170
|
-
onSystemLogoClick:
|
|
1171
|
-
state:
|
|
1172
|
-
currentSystemId:
|
|
1173
|
-
tabs:
|
|
1174
|
-
mobileAppSwitcherControls:
|
|
1187
|
+
onSystemLogoClick: y.onSystemLogoClick,
|
|
1188
|
+
state: y.state,
|
|
1189
|
+
currentSystemId: y.currentSystemId,
|
|
1190
|
+
tabs: i,
|
|
1191
|
+
mobileAppSwitcherControls: h
|
|
1175
1192
|
}
|
|
1176
1193
|
) }, "PL-Header"),
|
|
1177
|
-
/* @__PURE__ */ e.jsx(
|
|
1178
|
-
|
|
1194
|
+
/* @__PURE__ */ e.jsx(se.Content, { className: "overflow-hidden flex flex-col relative flex-1 md:w-auto", children: /* @__PURE__ */ e.jsx(
|
|
1195
|
+
dt,
|
|
1179
1196
|
{
|
|
1180
|
-
navlinks:
|
|
1197
|
+
navlinks: y.links,
|
|
1181
1198
|
handleNavigation: l,
|
|
1182
|
-
allActions:
|
|
1183
|
-
activeActionId:
|
|
1184
|
-
onActionClick:
|
|
1199
|
+
allActions: u,
|
|
1200
|
+
activeActionId: y.activeActionId,
|
|
1201
|
+
onActionClick: y.onActionClick
|
|
1185
1202
|
}
|
|
1186
1203
|
) }, "PL-Content"),
|
|
1187
|
-
/* @__PURE__ */ e.jsx(
|
|
1188
|
-
|
|
1204
|
+
/* @__PURE__ */ e.jsx(se.Footer, { className: "md:min-h-max flex flex-col w-full overflow-hidden max-w-full", children: /* @__PURE__ */ e.jsx(
|
|
1205
|
+
ut,
|
|
1189
1206
|
{
|
|
1190
|
-
state:
|
|
1207
|
+
state: y.state,
|
|
1191
1208
|
currentAppSessions: s,
|
|
1192
1209
|
resolveUserSecondarySlot: o,
|
|
1193
|
-
resolveSessionSecondarySlot:
|
|
1194
|
-
onSessionClick:
|
|
1195
|
-
onLogoutClick:
|
|
1196
|
-
options:
|
|
1197
|
-
currentSystemId:
|
|
1198
|
-
userOptionsControls:
|
|
1199
|
-
mobileAppSwitcherControls:
|
|
1200
|
-
onProfileClick:
|
|
1210
|
+
resolveSessionSecondarySlot: c,
|
|
1211
|
+
onSessionClick: y.onSessionClick,
|
|
1212
|
+
onLogoutClick: y.onLogoutClick,
|
|
1213
|
+
options: y.options,
|
|
1214
|
+
currentSystemId: y.currentSystemId,
|
|
1215
|
+
userOptionsControls: w,
|
|
1216
|
+
mobileAppSwitcherControls: h,
|
|
1217
|
+
onProfileClick: y.onProfileClick
|
|
1201
1218
|
}
|
|
1202
1219
|
) }, "PL-Footer"),
|
|
1203
|
-
/* @__PURE__ */ e.jsx(
|
|
1220
|
+
/* @__PURE__ */ e.jsx(se.Outlet, { children: /* @__PURE__ */ e.jsx(bt, { children: r }) }),
|
|
1204
1221
|
/* @__PURE__ */ e.jsx(
|
|
1205
|
-
|
|
1222
|
+
se.Sidebar,
|
|
1206
1223
|
{
|
|
1207
1224
|
className: "bg-neutral-default-default",
|
|
1208
|
-
modal:
|
|
1209
|
-
closeOnOverlayClick:
|
|
1225
|
+
modal: y.options?.sidebarOptions?.modal,
|
|
1226
|
+
closeOnOverlayClick: y.options?.sidebarOptions?.closeOnOverlayClick,
|
|
1210
1227
|
children: /* @__PURE__ */ e.jsx(
|
|
1211
|
-
|
|
1228
|
+
pt,
|
|
1212
1229
|
{
|
|
1213
|
-
options:
|
|
1214
|
-
helpSection:
|
|
1215
|
-
sidebarContentRef:
|
|
1216
|
-
initialSectionRef:
|
|
1230
|
+
options: y.options,
|
|
1231
|
+
helpSection: y.helpSection,
|
|
1232
|
+
sidebarContentRef: p,
|
|
1233
|
+
initialSectionRef: d,
|
|
1217
1234
|
notificationsListControls: C,
|
|
1218
1235
|
scrollableControls: A
|
|
1219
1236
|
}
|
|
@@ -1221,219 +1238,221 @@ const Xt = ({ navigationControlsRef: t }) => {
|
|
|
1221
1238
|
}
|
|
1222
1239
|
)
|
|
1223
1240
|
] });
|
|
1224
|
-
},
|
|
1225
|
-
const { children: s, ...o } = t, { children:
|
|
1226
|
-
if (
|
|
1241
|
+
}, ht = R(er, (t, r) => {
|
|
1242
|
+
const { children: s, ...o } = t, { children: c, ...l } = r, u = Object.keys(o), i = Object.keys(l);
|
|
1243
|
+
if (u.length !== i.length)
|
|
1227
1244
|
return !1;
|
|
1228
|
-
for (const
|
|
1229
|
-
if (!Object.prototype.hasOwnProperty.call(l,
|
|
1245
|
+
for (const m of u) {
|
|
1246
|
+
if (!Object.prototype.hasOwnProperty.call(l, m))
|
|
1230
1247
|
return !1;
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1248
|
+
const p = o[m], d = l[m];
|
|
1249
|
+
if (p !== d)
|
|
1233
1250
|
return !1;
|
|
1234
1251
|
}
|
|
1235
1252
|
return !0;
|
|
1236
1253
|
});
|
|
1237
|
-
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1240
|
-
const
|
|
1241
|
-
const t =
|
|
1254
|
+
ht.displayName = "PyrionNavigationDrawer.LayoutBase";
|
|
1255
|
+
const bt = R(({ children: t }) => /* @__PURE__ */ e.jsx(se.Outlet, { children: t }));
|
|
1256
|
+
bt.displayName = "PyrionNavigationDrawer.IsolatedOutlet";
|
|
1257
|
+
const xt = Ee(null), jr = () => {
|
|
1258
|
+
const t = Nt(xt);
|
|
1242
1259
|
if (!t)
|
|
1243
1260
|
throw new Error("usePyrionLayout debe usarse dentro de PyrionLayout");
|
|
1244
1261
|
return t;
|
|
1245
|
-
},
|
|
1262
|
+
}, kr = ({ children: t, helpSection: r, state: s, links: o, onLinkClick: c, onNavigate: l, onLogoutClick: u, actions: i, activeActionId: m, onActionClick: p, tabsProps: d, currentSystemId: w, onSessionClick: h, onSystemLogoClick: C, onProfileClick: A, ...N }) => {
|
|
1246
1263
|
const D = Object.assign({
|
|
1247
1264
|
closeDrawerOnNavigate: !0,
|
|
1248
1265
|
disableDragOpen: {
|
|
1249
1266
|
sidebar: !0,
|
|
1250
1267
|
drawer: !1
|
|
1251
1268
|
}
|
|
1252
|
-
},
|
|
1253
|
-
if (
|
|
1254
|
-
|
|
1269
|
+
}, N.options), W = St(), q = Ke(), j = O(null), U = O(null), S = O({}), $ = O(null), Q = O("notifications"), Y = O(null), X = O(null), E = O(null), [_, b] = G(0), [M, B] = G(!1), [z, Z] = G(null), ae = x((a) => {
|
|
1270
|
+
if (B(!1), c) {
|
|
1271
|
+
c(a);
|
|
1255
1272
|
return;
|
|
1256
1273
|
}
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1259
|
-
}, [
|
|
1274
|
+
const v = window.location.pathname;
|
|
1275
|
+
W(a), D.closeDrawerOnNavigate && gt() && !S.current?.getIsCollapsed?.() && S.current?.toggleCollapse?.(), l && l(v, a);
|
|
1276
|
+
}, [c, l, W]), ee = (a) => {
|
|
1260
1277
|
a && window.open(a, "_blank");
|
|
1261
|
-
},
|
|
1278
|
+
}, ve = {
|
|
1262
1279
|
system: {
|
|
1263
|
-
mobile:
|
|
1280
|
+
mobile: ee,
|
|
1264
1281
|
desktop: (a) => {
|
|
1265
1282
|
typeof window < "u" && a && (window.location.href = a);
|
|
1266
1283
|
}
|
|
1267
1284
|
},
|
|
1268
1285
|
product: {
|
|
1269
|
-
mobile:
|
|
1270
|
-
desktop:
|
|
1286
|
+
mobile: ee,
|
|
1287
|
+
desktop: ee
|
|
1271
1288
|
}
|
|
1272
|
-
},
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1275
|
-
}, [
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1278
|
-
}, [
|
|
1279
|
-
if (
|
|
1280
|
-
|
|
1289
|
+
}, Le = x((a) => {
|
|
1290
|
+
const v = q ? "mobile" : "desktop", P = s.enabled_systems.find((k) => k.name === a)?.url;
|
|
1291
|
+
ve.system[v](P), d?.onTabClick?.(a);
|
|
1292
|
+
}, [q, s.enabled_systems, d?.onTabClick]), Fe = x((a) => {
|
|
1293
|
+
const v = q ? "mobile" : "desktop", P = s.company.products?.find((k) => k.name === a)?.domain;
|
|
1294
|
+
ve.product[v](P), d?.onTabClick?.(a);
|
|
1295
|
+
}, [q, s.company.products, d?.onTabClick]), de = x((a, v) => {
|
|
1296
|
+
if (v) {
|
|
1297
|
+
v(a), d?.onTabClick?.(a);
|
|
1281
1298
|
return;
|
|
1282
1299
|
} else
|
|
1283
|
-
|
|
1284
|
-
}, [
|
|
1300
|
+
d?.onTabClick?.(a);
|
|
1301
|
+
}, [d?.onTabClick]), ze = x(() => {
|
|
1285
1302
|
const a = {};
|
|
1286
|
-
s.enabled_systems.forEach((
|
|
1287
|
-
a[
|
|
1303
|
+
s.enabled_systems.forEach((P) => {
|
|
1304
|
+
a[P.url] = P.name;
|
|
1288
1305
|
});
|
|
1289
|
-
const
|
|
1290
|
-
for (const [
|
|
1291
|
-
if (
|
|
1292
|
-
return
|
|
1306
|
+
const v = window.location.origin;
|
|
1307
|
+
for (const [P, k] of Object.entries(a))
|
|
1308
|
+
if (v === P)
|
|
1309
|
+
return k;
|
|
1293
1310
|
return "";
|
|
1294
|
-
}, [s.enabled_systems]),
|
|
1311
|
+
}, [s.enabled_systems]), De = d?.currentTabName || ze(), Ae = me(
|
|
1295
1312
|
() => s.sessions || [],
|
|
1296
1313
|
[s.sessions]
|
|
1297
|
-
),
|
|
1314
|
+
), te = (a) => a == null ? null : typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? String(a) : Se(a) ? a : typeof a == "object" ? JSON.stringify(a) : null, ue = x((a, v) => {
|
|
1298
1315
|
if (!a) return null;
|
|
1299
1316
|
if (Array.isArray(a)) {
|
|
1300
|
-
const
|
|
1317
|
+
const P = a?.[0] ? ye(v, a[0]) : null, k = a?.[1] ? ye(v, a[1]) : null, J = te(P), Ue = te(k);
|
|
1301
1318
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1302
|
-
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 min-w-[40%] text-nowrap wrap-break-word overflow-hidden text-ellipsis", children:
|
|
1303
|
-
|
|
1319
|
+
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 min-w-[40%] text-nowrap wrap-break-word overflow-hidden text-ellipsis", children: J }),
|
|
1320
|
+
Ue && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 flex-1 grow shrink-0 min-w-max max-w-2/3 overflow-visible ", children: [
|
|
1304
1321
|
/* @__PURE__ */ e.jsx("span", { className: "size-0.5 bg-[var(--neutral-300)] rounded-full" }),
|
|
1305
|
-
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis", children:
|
|
1322
|
+
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis", children: Ue })
|
|
1306
1323
|
] })
|
|
1307
1324
|
] });
|
|
1308
1325
|
}
|
|
1309
1326
|
if (typeof a == "string") {
|
|
1310
|
-
const
|
|
1311
|
-
return
|
|
1327
|
+
const P = ye(v, a);
|
|
1328
|
+
return te(P);
|
|
1312
1329
|
}
|
|
1313
|
-
return typeof a == "function" ?
|
|
1330
|
+
return typeof a == "function" ? te(a(v)) : null;
|
|
1314
1331
|
}, []), n = x(
|
|
1315
1332
|
(a) => {
|
|
1316
|
-
const
|
|
1317
|
-
if (!
|
|
1318
|
-
const
|
|
1319
|
-
return
|
|
1333
|
+
const v = D?.userCardOptions?.secondarySlot;
|
|
1334
|
+
if (!v) return null;
|
|
1335
|
+
const P = s.enabled_systems?.find((J) => J._id === w), k = { company: s.company, user: s.user, system: P, metadata: a };
|
|
1336
|
+
return ue(v, k);
|
|
1320
1337
|
},
|
|
1321
|
-
[
|
|
1322
|
-
),
|
|
1338
|
+
[w, D?.userCardOptions?.secondarySlot, ue, s.company, s.enabled_systems, s.user]
|
|
1339
|
+
), f = x(
|
|
1323
1340
|
(a) => {
|
|
1324
|
-
const
|
|
1325
|
-
if (!
|
|
1326
|
-
const
|
|
1327
|
-
return
|
|
1341
|
+
const v = D?.sessionCardOptions?.secondarySlot || D?.userCardOptions?.secondarySlot;
|
|
1342
|
+
if (!v) return null;
|
|
1343
|
+
const P = s.enabled_systems?.find((J) => J._id === w), k = { company: s.company, user: a.auth_id, metadata: a?.metadata, system: P };
|
|
1344
|
+
return ue(v, k);
|
|
1328
1345
|
},
|
|
1329
|
-
[
|
|
1330
|
-
),
|
|
1346
|
+
[w, D?.sessionCardOptions?.secondarySlot, D?.userCardOptions?.secondarySlot, ue, s.company]
|
|
1347
|
+
), g = me(() => {
|
|
1331
1348
|
const a = [];
|
|
1332
|
-
return
|
|
1333
|
-
|
|
1334
|
-
},
|
|
1335
|
-
|
|
1349
|
+
return S.current.openNotifications = () => {
|
|
1350
|
+
Q.current = "notifications", S.current.openSidebar?.(), $.current?.setActiveSection("notifications");
|
|
1351
|
+
}, S.current.openHelp = () => {
|
|
1352
|
+
Q.current = "help", S.current.openSidebar?.(), $.current?.setActiveSection("help");
|
|
1336
1353
|
}, !D?.notificationsDrawerOptions?.hideActionButton && !D?.notificationsDrawerOptions?.hide && a.push({
|
|
1337
1354
|
id: "notifications",
|
|
1338
1355
|
title: "Notificaciones",
|
|
1339
|
-
icon:
|
|
1340
|
-
onClick:
|
|
1356
|
+
icon: Ge,
|
|
1357
|
+
onClick: S.current.openNotifications,
|
|
1341
1358
|
count: _
|
|
1342
1359
|
}), !D?.helpSectionDrawerOptions?.hideActionButton && r && !D?.helpSectionDrawerOptions?.hide && a.push({
|
|
1343
1360
|
id: "help",
|
|
1344
1361
|
title: "Ayuda",
|
|
1345
|
-
icon:
|
|
1346
|
-
onClick:
|
|
1362
|
+
icon: Qe,
|
|
1363
|
+
onClick: S.current.openHelp
|
|
1347
1364
|
}), D?.configurationActionOptions?.onClick && !D?.configurationActionOptions?.hideActionButton && a.push({
|
|
1348
1365
|
id: "configuration",
|
|
1349
1366
|
title: "Configuracion",
|
|
1350
|
-
icon:
|
|
1367
|
+
icon: Ot,
|
|
1351
1368
|
onClick: D.configurationActionOptions?.onClick
|
|
1352
1369
|
}), a;
|
|
1353
|
-
}, [D, r,
|
|
1354
|
-
() => [...
|
|
1355
|
-
[
|
|
1356
|
-
),
|
|
1357
|
-
const a = s.enabled_systems.map((
|
|
1358
|
-
name:
|
|
1359
|
-
thumbnail:
|
|
1360
|
-
onClick:
|
|
1361
|
-
id:
|
|
1362
|
-
})) || [],
|
|
1363
|
-
...
|
|
1364
|
-
onClick: () =>
|
|
1365
|
-
})) || [],
|
|
1366
|
-
name:
|
|
1367
|
-
thumbnail:
|
|
1368
|
-
onClick:
|
|
1370
|
+
}, [D, r, p, _]), I = me(
|
|
1371
|
+
() => [...g, ...i || []],
|
|
1372
|
+
[g, i]
|
|
1373
|
+
), H = me(() => {
|
|
1374
|
+
const a = s.enabled_systems.map((k) => ({
|
|
1375
|
+
name: k.name,
|
|
1376
|
+
thumbnail: k.thumbnail,
|
|
1377
|
+
onClick: Le,
|
|
1378
|
+
id: k._id
|
|
1379
|
+
})) || [], v = d?.customTabs?.map((k) => ({
|
|
1380
|
+
...k,
|
|
1381
|
+
onClick: () => de(k.name, k?.onClick)
|
|
1382
|
+
})) || [], P = s.company.products?.map((k) => ({
|
|
1383
|
+
name: k.name,
|
|
1384
|
+
thumbnail: k.thumbnail,
|
|
1385
|
+
onClick: Fe
|
|
1369
1386
|
})) || [];
|
|
1370
|
-
return [...a, ...
|
|
1371
|
-
}, [s.enabled_systems, s.company.products,
|
|
1372
|
-
j.current?.addNewNotification ? j.current.addNewNotification(a,
|
|
1373
|
-
}, []),
|
|
1374
|
-
}), []),
|
|
1387
|
+
return [...a, ...v, ...P];
|
|
1388
|
+
}, [s.enabled_systems, s.company.products, d?.customTabs]), F = x((a, v) => {
|
|
1389
|
+
j.current?.addNewNotification ? j.current.addNewNotification(a, v) : console.warn("Notifications controls not ready yet");
|
|
1390
|
+
}, []), re = x((a) => j.current?.subscribeToUpdates ? j.current.subscribeToUpdates(a) : (console.warn("Notifications controls not ready yet"), () => {
|
|
1391
|
+
}), []), oe = x((a) => {
|
|
1375
1392
|
j.current?.removeNotification ? j.current.removeNotification(a) : console.warn("Notifications controls not ready yet");
|
|
1376
|
-
}, []),
|
|
1393
|
+
}, []), fe = x(() => {
|
|
1377
1394
|
j.current?.removeAllNotifications ? j.current.removeAllNotifications() : console.warn("Notifications controls not ready yet");
|
|
1378
|
-
}, []),
|
|
1395
|
+
}, []), we = x((a) => {
|
|
1379
1396
|
j.current?.setNotifications ? j.current.setNotifications(a) : console.warn("Notifications controls not ready yet");
|
|
1380
|
-
}, []),
|
|
1381
|
-
}), []),
|
|
1382
|
-
j.current?.setLoading ? j.current.setLoading(a) : console.warn("Notifications controls not ready yet");
|
|
1383
|
-
}, []),
|
|
1384
|
-
|
|
1385
|
-
|
|
1397
|
+
}, []), Ne = x((a, v) => U.current?.subscribeToScrollTarget ? U.current.subscribeToScrollTarget(a, v) : (console.warn("Scrollable controls not ready yet"), () => {
|
|
1398
|
+
}), []), L = x((a, v = "load_more") => {
|
|
1399
|
+
j.current?.setLoading ? j.current.setLoading(a, v) : console.warn("Notifications controls not ready yet");
|
|
1400
|
+
}, []), K = x((a, v) => {
|
|
1401
|
+
j.current?.setError ? j.current.setError(a, v) : console.warn("Notifications controls not ready yet");
|
|
1402
|
+
}, []), V = x((a, v, P) => {
|
|
1403
|
+
const k = /* @__PURE__ */ e.jsxs("div", { className: T(" bg-black/60 z-200 inset-0 h-full w-full grid place-items-center text-neutral-default-default", v ? "fixed" : "sticky"), children: [
|
|
1404
|
+
!P && /* @__PURE__ */ e.jsx(pe, { label: "", icon: /* @__PURE__ */ e.jsx(Me, {}), onClick: () => B(!1), variant: "text", className: "absolute top-0 right-0", size: "small", color: "secondary" }),
|
|
1386
1405
|
typeof a == "function" ? a() : a
|
|
1387
1406
|
] });
|
|
1388
|
-
let
|
|
1389
|
-
return
|
|
1390
|
-
}, [
|
|
1391
|
-
|
|
1407
|
+
let J;
|
|
1408
|
+
return v ? J = Ve(k, document.body, `modal-error-${Date.now()}`) : E.current && (J = Ve(k, E.current, `modal-error-${Date.now()}`)), Z(J), B(!0), k;
|
|
1409
|
+
}, [E]), le = x(() => {
|
|
1410
|
+
B(!1);
|
|
1392
1411
|
}, []);
|
|
1393
|
-
return
|
|
1394
|
-
|
|
1395
|
-
|
|
1412
|
+
return S.current.addNewNotification = F, S.current.subscribeToNotificationsUpdates = re, S.current.removeNotification = oe, S.current.removeAllNotifications = fe, S.current.setNotifications = we, S.current.setNotificationsError = K, S.current.setNotificationsLoading = L, S.current.subscribeToNotificationsScroll = Ne, S.current.showErrorModal = V, S.current.closeErrorModal = le, ne(() => {
|
|
1413
|
+
re((a, v) => {
|
|
1414
|
+
b(v);
|
|
1396
1415
|
});
|
|
1397
|
-
}, [
|
|
1398
|
-
|
|
1416
|
+
}, [re]), /* @__PURE__ */ e.jsxs(xt.Provider, { value: S.current, children: [
|
|
1417
|
+
M && z,
|
|
1399
1418
|
/* @__PURE__ */ e.jsxs("div", { className: "flex h-screen", children: [
|
|
1400
|
-
!
|
|
1401
|
-
|
|
1419
|
+
!q && H.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1420
|
+
It,
|
|
1402
1421
|
{
|
|
1403
1422
|
className: "hidden md:flex",
|
|
1404
|
-
tabs:
|
|
1423
|
+
tabs: H,
|
|
1405
1424
|
activeColor: "var(--neutral-900)",
|
|
1406
|
-
currentTabName:
|
|
1407
|
-
currentSystemId:
|
|
1425
|
+
currentTabName: De,
|
|
1426
|
+
currentSystemId: w
|
|
1408
1427
|
}
|
|
1409
1428
|
),
|
|
1410
1429
|
/* @__PURE__ */ e.jsx(
|
|
1411
|
-
|
|
1430
|
+
ht,
|
|
1412
1431
|
{
|
|
1413
1432
|
links: o,
|
|
1414
|
-
handleNavigation:
|
|
1415
|
-
allActions:
|
|
1416
|
-
activeActionId:
|
|
1417
|
-
onActionClick:
|
|
1433
|
+
handleNavigation: ae,
|
|
1434
|
+
allActions: I,
|
|
1435
|
+
activeActionId: m,
|
|
1436
|
+
onActionClick: p,
|
|
1418
1437
|
state: s,
|
|
1419
|
-
currentAppSessions:
|
|
1438
|
+
currentAppSessions: Ae,
|
|
1420
1439
|
resolveUserSecondarySlot: n,
|
|
1421
|
-
resolveSessionSecondarySlot:
|
|
1422
|
-
onSessionClick:
|
|
1423
|
-
onLogoutClick:
|
|
1440
|
+
resolveSessionSecondarySlot: f,
|
|
1441
|
+
onSessionClick: h,
|
|
1442
|
+
onLogoutClick: u,
|
|
1424
1443
|
options: D,
|
|
1425
|
-
currentSystemId:
|
|
1426
|
-
userOptionsControls:
|
|
1427
|
-
mobileAppSwitcherControls:
|
|
1444
|
+
currentSystemId: w,
|
|
1445
|
+
userOptionsControls: Y,
|
|
1446
|
+
mobileAppSwitcherControls: X,
|
|
1428
1447
|
onSystemLogoClick: C,
|
|
1429
|
-
tabs:
|
|
1448
|
+
tabs: H,
|
|
1430
1449
|
helpSection: r,
|
|
1431
|
-
sidebarContentRef:
|
|
1432
|
-
initialSectionRef:
|
|
1433
|
-
navigationControlsRef:
|
|
1450
|
+
sidebarContentRef: $,
|
|
1451
|
+
initialSectionRef: Q,
|
|
1452
|
+
navigationControlsRef: S,
|
|
1434
1453
|
notificationsListControls: j,
|
|
1435
|
-
scrollableControls:
|
|
1436
|
-
outletRef:
|
|
1454
|
+
scrollableControls: U,
|
|
1455
|
+
outletRef: E,
|
|
1437
1456
|
onProfileClick: A,
|
|
1438
1457
|
children: t
|
|
1439
1458
|
}
|
|
@@ -1442,6 +1461,6 @@ const pt = Oe(null), wr = () => {
|
|
|
1442
1461
|
] });
|
|
1443
1462
|
};
|
|
1444
1463
|
export {
|
|
1445
|
-
|
|
1446
|
-
|
|
1464
|
+
kr as default,
|
|
1465
|
+
jr as u
|
|
1447
1466
|
};
|