prometeo-design-system 6.3.7 → 6.3.9
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/PyrionLayout.es.js +606 -580
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/styles/base.css +1 -0
package/dist/PyrionLayout.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { u as Tt, g as It } from "./useDevice-vwn4GLwK.js";
|
|
3
|
-
import { c as
|
|
4
|
-
import { g as
|
|
5
|
-
import je, { forwardRef as
|
|
3
|
+
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { g as we } from "./utils-X4-h3cum.js";
|
|
5
|
+
import je, { forwardRef as me, useState as U, useRef as k, useEffect as H, memo as M, useContext as ze, createContext as Ae, useCallback as x, Children as Ot, isValidElement as be, useMemo as ae, useLayoutEffect as Le, useImperativeHandle as Te, use as Et } from "react";
|
|
6
6
|
import { createPortal as Be } from "react-dom";
|
|
7
7
|
import { CloseNavBarDesktop as _t } from "./Icons/CloseNavBarDesktop.es.js";
|
|
8
8
|
import { c as Ie } from "./index-BOQuZ0gG.js";
|
|
@@ -11,11 +11,11 @@ import Pt from "./PlainTooltip.es.js";
|
|
|
11
11
|
import { CrevronLeft as Mt } from "./Icons/CrevronLeft.es.js";
|
|
12
12
|
import { S as Oe, a as Rt } from "./Scrollable-BzvgzSjX.js";
|
|
13
13
|
import { useLocation as Ue } from "react-router";
|
|
14
|
-
import
|
|
14
|
+
import xe from "./TicketCard.es.js";
|
|
15
15
|
import We from "./UserCard.es.js";
|
|
16
16
|
import Ee from "./Button.es.js";
|
|
17
17
|
import { Logout as Bt } from "./Icons/Logout.es.js";
|
|
18
|
-
import
|
|
18
|
+
import fe from "./Skeleton.es.js";
|
|
19
19
|
import { u as Ft } from "./useScrollable-Bj79o803.js";
|
|
20
20
|
import Ve from "./IconButton.es.js";
|
|
21
21
|
import { Help as qe } from "./Icons/Help.es.js";
|
|
@@ -25,30 +25,30 @@ import Ht from "./Spinner.es.js";
|
|
|
25
25
|
import { T as Ut, a as Wt } from "./TabLinks-DnoWdrdk.js";
|
|
26
26
|
import { Notifications as $e } from "./Icons/Notifications.es.js";
|
|
27
27
|
import { Settings as Vt } from "./Icons/Settings.es.js";
|
|
28
|
-
const qt =
|
|
29
|
-
const [s, l] =
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const qt = me((t, r) => {
|
|
29
|
+
const [s, l] = U(t?.currentTabName || t.tabs[0]?.name), i = k(null), { tabs: a = [], className: c, activeColor: h = "var(--neutral-900)", currentSystemId: u, isLoading: f = !1 } = t;
|
|
30
|
+
H(() => {
|
|
31
|
+
i.current?.style.setProperty("--tab-bg", h);
|
|
32
32
|
}, [h]);
|
|
33
|
-
const
|
|
33
|
+
const d = a.find((m) => m?.id === u || m?.name === t?.currentTabName) || a.find((m) => m?.name === s);
|
|
34
34
|
return /* @__PURE__ */ e.jsx(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
ref: r,
|
|
38
|
-
className:
|
|
38
|
+
className: L(
|
|
39
39
|
"select-none",
|
|
40
40
|
"flex flex-col gap-2",
|
|
41
41
|
"bg-neutral-strong-default",
|
|
42
42
|
"h-full w-14 max-w-14 pl-[6px] py-6",
|
|
43
43
|
"border-r border-neutral-default-default",
|
|
44
|
-
|
|
44
|
+
c
|
|
45
45
|
),
|
|
46
46
|
children: (f ? Array(3).fill(null) : a).map(
|
|
47
47
|
(m, g) => {
|
|
48
48
|
if (f) return /* @__PURE__ */ e.jsx(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
|
-
className:
|
|
51
|
+
className: L(
|
|
52
52
|
"bg-[(--tab-bg)]",
|
|
53
53
|
"h-12 w-[50px] z-20",
|
|
54
54
|
"flex items-center pl-[6px] ",
|
|
@@ -56,38 +56,38 @@ const qt = de((t, r) => {
|
|
|
56
56
|
"tabswitch-element relative",
|
|
57
57
|
g === 0 && "active"
|
|
58
58
|
),
|
|
59
|
-
children: /* @__PURE__ */ e.jsx("div", { className:
|
|
59
|
+
children: /* @__PURE__ */ e.jsx("div", { className: L(
|
|
60
60
|
"size-8 rounded-[4px]",
|
|
61
61
|
"grid place-items-center",
|
|
62
62
|
"tab-thumbnail-icon",
|
|
63
63
|
"bg-transparent text-neutral-default-default",
|
|
64
64
|
m?.className
|
|
65
|
-
), children: /* @__PURE__ */ e.jsx(
|
|
65
|
+
), children: /* @__PURE__ */ e.jsx(fe, { shape: "rounded", className: "w-full h-full" }) })
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
const
|
|
68
|
+
const N = m?.name === d?.name, j = typeof m?.thumbnail == "string" ? /* @__PURE__ */ e.jsx("img", { src: m?.thumbnail, alt: m?.description, className: "aspect-square object-contain rounded", draggable: !1 }) : m?.thumbnail, p = () => {
|
|
69
69
|
m.disabled || (l(m?.name), m.onClick && m.onClick(m?.name));
|
|
70
70
|
};
|
|
71
71
|
return /* @__PURE__ */ e.jsx(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
|
-
className:
|
|
74
|
+
className: L(
|
|
75
75
|
"bg-[(--tab-bg)]",
|
|
76
76
|
"h-12 w-[50px] z-20",
|
|
77
77
|
"flex items-center pl-[6px] ",
|
|
78
78
|
"rounded-l-[8px]",
|
|
79
79
|
"tabswitch-element relative",
|
|
80
|
-
|
|
80
|
+
N && "active"
|
|
81
81
|
),
|
|
82
82
|
onClick: p,
|
|
83
|
-
ref:
|
|
84
|
-
children: /* @__PURE__ */ e.jsx("div", { className:
|
|
83
|
+
ref: i,
|
|
84
|
+
children: /* @__PURE__ */ e.jsx("div", { className: L(
|
|
85
85
|
"size-8 rounded-[4px]",
|
|
86
86
|
"grid place-items-center",
|
|
87
87
|
"tab-thumbnail-icon",
|
|
88
88
|
"bg-transparent text-neutral-default-default",
|
|
89
89
|
m?.className
|
|
90
|
-
), children:
|
|
90
|
+
), children: j })
|
|
91
91
|
},
|
|
92
92
|
m?.name
|
|
93
93
|
);
|
|
@@ -95,46 +95,46 @@ const qt = de((t, r) => {
|
|
|
95
95
|
)
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
}), Ke =
|
|
99
|
-
const h =
|
|
100
|
-
return
|
|
98
|
+
}), Ke = M(me(({ children: t, className: r, context: s, modal: l = !1, closeOnOverlayClick: i = !1, unmountChildrenOnClose: a = !0 }, c) => {
|
|
99
|
+
const h = ge(t, s), u = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: f } = $t(), { closeSidebar: d } = ce(), [m, g] = U(() => a ? f : !0), [N, j] = U(!1);
|
|
100
|
+
return H(() => {
|
|
101
101
|
a && s?.subscribeToSidebarOpen((p) => {
|
|
102
|
-
p ? (
|
|
102
|
+
p ? (j(!1), g(!0)) : j(!0);
|
|
103
103
|
});
|
|
104
|
-
}, [a]),
|
|
105
|
-
const p =
|
|
104
|
+
}, [a]), H(() => {
|
|
105
|
+
const p = c && typeof c == "object" && "current" in c ? c.current : null;
|
|
106
106
|
if (!p) return;
|
|
107
|
-
const
|
|
108
|
-
|
|
107
|
+
const I = () => {
|
|
108
|
+
N && (g(!1), j(!1));
|
|
109
109
|
};
|
|
110
|
-
return p.addEventListener("transitionend",
|
|
111
|
-
}, [
|
|
110
|
+
return p.addEventListener("transitionend", I), () => p.removeEventListener("transitionend", I);
|
|
111
|
+
}, [N]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
112
112
|
l && u && /* @__PURE__ */ e.jsx(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
|
-
className:
|
|
115
|
+
className: L("navigation-drawer-sidebar-overlay"),
|
|
116
116
|
onClick: (p) => {
|
|
117
|
-
p.preventDefault(), p.stopPropagation(),
|
|
117
|
+
p.preventDefault(), p.stopPropagation(), i && d?.();
|
|
118
118
|
},
|
|
119
119
|
"aria-hidden": "true"
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
|
-
/* @__PURE__ */ e.jsx("div", { ref:
|
|
122
|
+
/* @__PURE__ */ e.jsx("div", { ref: c, className: L("sidebar collapsed", "h-full overflow-auto", r), "aria-modal": l || void 0, children: /* @__PURE__ */ e.jsxs("div", { className: L("navigation-drawer-sidebar-inner h-full max-h-full! overflow-hidden!"), children: [
|
|
123
123
|
/* @__PURE__ */ e.jsx("div", { className: "secure-click-margin hidden" }),
|
|
124
124
|
m && h
|
|
125
125
|
] }) })
|
|
126
126
|
] });
|
|
127
|
-
})), Pe =
|
|
127
|
+
})), Pe = M(me(({ children: t }, r) => /* @__PURE__ */ e.jsx("div", { ref: r, className: "h-full w-max top-0 left-0 z-50", children: t })));
|
|
128
128
|
Pe.displayName = "LeftSlot";
|
|
129
|
-
const Je =
|
|
129
|
+
const Je = Ae(null), Ge = Ae(null), $t = () => {
|
|
130
130
|
const t = ze(Je);
|
|
131
131
|
if (!t) throw new Error("useDrawerState must be used within NavigationDrawer");
|
|
132
132
|
return t;
|
|
133
|
-
},
|
|
133
|
+
}, ce = () => {
|
|
134
134
|
const t = ze(Ge);
|
|
135
135
|
if (!t) throw new Error("useDrawerActions must be used within NavigationDrawer");
|
|
136
136
|
return t;
|
|
137
|
-
},
|
|
137
|
+
}, ge = (t, r) => typeof t == "function" ? r ? t(r) : null : t, Xe = "navigation-drawer-collapsed", Kt = () => typeof window > "u" || window.matchMedia("(min-width: 768px)").matches ? "desktop" : "mobile", Jt = (t, r) => {
|
|
138
138
|
if (typeof window > "u") return !1;
|
|
139
139
|
const s = sessionStorage.getItem(Xe), l = r[t];
|
|
140
140
|
return s ? JSON.parse(s) : l;
|
|
@@ -148,83 +148,83 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
148
148
|
desktop: !1,
|
|
149
149
|
mobile: !0
|
|
150
150
|
}, Yt = (t) => {
|
|
151
|
-
const { children: r, classNameDrawer: s, classNameSidebar: l, disableDragOpen:
|
|
151
|
+
const { children: r, classNameDrawer: s, classNameSidebar: l, disableDragOpen: i, modal: a = !0, closeOnOutsideClick: c = !0 } = t, h = k(null), u = k(null), f = k(null), d = t.outletRef ?? k(null), m = k(null), g = k(Jt(Kt(), t.defaultCollapsedState ?? Xt)), N = k(!1), j = k("drawer"), p = k(/* @__PURE__ */ new Set()), I = k(/* @__PURE__ */ new Set()), C = x((o) => {
|
|
152
152
|
const w = f.current;
|
|
153
153
|
w && (w.classList.toggle("collapsed", o), w.classList.toggle("expanded", !o));
|
|
154
|
-
}, []),
|
|
154
|
+
}, []), S = x((o) => {
|
|
155
155
|
const w = m.current;
|
|
156
156
|
if (!w) return;
|
|
157
157
|
w.classList.toggle("collapsed", o), w.classList.toggle("expanded", !o);
|
|
158
|
-
const
|
|
159
|
-
|
|
158
|
+
const E = h.current;
|
|
159
|
+
E && (E.classList.toggle("sidebar-collapsed", o), E.classList.toggle("sidebar-expanded", !o));
|
|
160
160
|
}, []), y = x(
|
|
161
161
|
(o, { notify: w = !0 } = {}) => {
|
|
162
|
-
const
|
|
163
|
-
g.current = o, Gt(o),
|
|
162
|
+
const E = g.current !== o;
|
|
163
|
+
g.current = o, Gt(o), C(o), w && E && p.current.forEach((B) => B(o));
|
|
164
164
|
},
|
|
165
|
-
[
|
|
166
|
-
),
|
|
165
|
+
[C]
|
|
166
|
+
), D = x(
|
|
167
167
|
(o, { notify: w = !0 } = {}) => {
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
const
|
|
171
|
-
|
|
168
|
+
const E = N.current !== o;
|
|
169
|
+
if (N.current = o, S(o), w && E) {
|
|
170
|
+
const B = !o;
|
|
171
|
+
I.current.forEach((re) => re(B));
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
|
-
[
|
|
174
|
+
[S]
|
|
175
175
|
), b = x(
|
|
176
176
|
(o, { notify: w = !0 } = {}) => {
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
w &&
|
|
177
|
+
const E = j.current, B = E !== o;
|
|
178
|
+
j.current = o, window.matchMedia("(min-width: 768px)").matches || y(o !== "drawer", { notify: w });
|
|
179
|
+
const re = E === "sidebar", se = o === "sidebar";
|
|
180
|
+
w && B && re !== se && I.current.forEach((Se) => Se(se)), D(o !== "sidebar", { notify: w }), y(o !== "drawer", { notify: w });
|
|
181
181
|
},
|
|
182
|
-
[y,
|
|
183
|
-
),
|
|
182
|
+
[y, D]
|
|
183
|
+
), O = x(() => {
|
|
184
184
|
const o = window.matchMedia("(min-width: 768px)").matches, w = !g.current;
|
|
185
185
|
if (o) {
|
|
186
186
|
y(w);
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
189
|
b(w ? "outlet" : "drawer");
|
|
190
|
-
}, [b, y]),
|
|
190
|
+
}, [b, y]), q = x((o) => {
|
|
191
191
|
const w = {
|
|
192
192
|
closeIfMobile: !0,
|
|
193
193
|
closeIfDesktop: !0
|
|
194
|
-
}, { closeIfMobile:
|
|
194
|
+
}, { closeIfMobile: E, closeIfDesktop: B } = { ...w, ...o };
|
|
195
195
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
196
|
-
|
|
196
|
+
B && y(!0);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
|
-
if (
|
|
199
|
+
if (E) {
|
|
200
200
|
b("outlet");
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
}, [, b, y]),
|
|
203
|
+
}, [, b, y]), F = x((o) => {
|
|
204
204
|
const w = {
|
|
205
205
|
openIfMobile: !0,
|
|
206
206
|
openIfDesktop: !0
|
|
207
|
-
}, { openIfMobile:
|
|
208
|
-
if (window.matchMedia("(min-width: 768px)").matches &&
|
|
209
|
-
|
|
207
|
+
}, { openIfMobile: E, openIfDesktop: B } = { ...w, ...o };
|
|
208
|
+
if (window.matchMedia("(min-width: 768px)").matches && B) {
|
|
209
|
+
B && y(!1);
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
|
-
if (
|
|
212
|
+
if (E) {
|
|
213
213
|
b("drawer");
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
|
-
}, [b, y]),
|
|
217
|
-
|
|
218
|
-
toggleCollapse: () =>
|
|
219
|
-
toggleDrawer: () =>
|
|
220
|
-
closeDrawer: (o) =>
|
|
221
|
-
openDrawer: (o) =>
|
|
216
|
+
}, [b, y]), ee = k(null);
|
|
217
|
+
ee.current || (ee.current = {
|
|
218
|
+
toggleCollapse: () => O(),
|
|
219
|
+
toggleDrawer: () => O(),
|
|
220
|
+
closeDrawer: (o) => q(o),
|
|
221
|
+
openDrawer: (o) => F(o),
|
|
222
222
|
getIsCollapsed: () => {
|
|
223
223
|
if (!window.matchMedia("(min-width: 768px)").matches) {
|
|
224
|
-
const w = h.current,
|
|
225
|
-
if (w &&
|
|
226
|
-
const
|
|
227
|
-
return
|
|
224
|
+
const w = h.current, E = d.current;
|
|
225
|
+
if (w && E) {
|
|
226
|
+
const B = w.scrollLeft, re = E.offsetLeft, se = Math.abs(B - re) < Math.abs(B);
|
|
227
|
+
return se !== g.current && (g.current = se, C(se)), se;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
return g.current;
|
|
@@ -235,7 +235,7 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
235
235
|
openSidebar: () => {
|
|
236
236
|
if (m.current) {
|
|
237
237
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
238
|
-
|
|
238
|
+
D(!1);
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
241
|
b("sidebar");
|
|
@@ -243,7 +243,7 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
243
243
|
},
|
|
244
244
|
closeSidebar: (o) => {
|
|
245
245
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
246
|
-
|
|
246
|
+
D(!0), o?.();
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
b("outlet"), o?.();
|
|
@@ -251,25 +251,25 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
251
251
|
toggleSidebar: (o) => {
|
|
252
252
|
if (!m.current) return;
|
|
253
253
|
if (window.matchMedia("(min-width: 768px)").matches) {
|
|
254
|
-
|
|
254
|
+
D(!N.current);
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
const w =
|
|
258
|
-
b(w), o?.(
|
|
257
|
+
const w = j.current === "sidebar" ? "outlet" : "sidebar";
|
|
258
|
+
b(w), o?.(N.current ? "closed" : "open");
|
|
259
259
|
},
|
|
260
|
-
getIsSidebarOpen: () => m.current ? window.matchMedia("(min-width: 768px)").matches ? !
|
|
261
|
-
subscribeToSidebarOpen: (o) => (
|
|
262
|
-
|
|
260
|
+
getIsSidebarOpen: () => m.current ? window.matchMedia("(min-width: 768px)").matches ? !N.current : j.current === "sidebar" : !1,
|
|
261
|
+
subscribeToSidebarOpen: (o) => (I.current.add(o), () => {
|
|
262
|
+
I.current.delete(o);
|
|
263
263
|
}),
|
|
264
264
|
setDrawerDragEnabled: (o) => {
|
|
265
265
|
const w = h.current;
|
|
266
266
|
if (!w) return;
|
|
267
|
-
const
|
|
267
|
+
const E = w.scrollLeft;
|
|
268
268
|
if (o) {
|
|
269
|
-
const
|
|
269
|
+
const B = w.style.scrollBehavior;
|
|
270
270
|
w.style.scrollBehavior = "auto", w.classList.remove("disabled-dragopen"), requestAnimationFrame(() => {
|
|
271
|
-
w.scrollLeft =
|
|
272
|
-
w.style.scrollBehavior =
|
|
271
|
+
w.scrollLeft = E, requestAnimationFrame(() => {
|
|
272
|
+
w.style.scrollBehavior = B;
|
|
273
273
|
});
|
|
274
274
|
});
|
|
275
275
|
} else
|
|
@@ -279,104 +279,104 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
279
279
|
const w = h.current;
|
|
280
280
|
if (w)
|
|
281
281
|
if (o) {
|
|
282
|
-
const
|
|
282
|
+
const E = w.scrollLeft, B = w.style.scrollBehavior;
|
|
283
283
|
w.style.scrollBehavior = "auto", w.classList.remove("disabled-dragopen-sidebar"), requestAnimationFrame(() => {
|
|
284
|
-
w.scrollLeft =
|
|
285
|
-
w.style.scrollBehavior =
|
|
284
|
+
w.scrollLeft = E, requestAnimationFrame(() => {
|
|
285
|
+
w.style.scrollBehavior = B;
|
|
286
286
|
});
|
|
287
287
|
});
|
|
288
288
|
} else
|
|
289
289
|
w.classList.add("disabled-dragopen-sidebar");
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
|
-
const
|
|
293
|
-
let P = null,
|
|
294
|
-
const
|
|
295
|
-
let
|
|
296
|
-
|
|
297
|
-
if (!
|
|
298
|
-
|
|
292
|
+
const V = ee.current, K = typeof r == "function" ? r(V) : r, R = Ot.toArray(K);
|
|
293
|
+
let P = null, z = null, J = null;
|
|
294
|
+
const G = [];
|
|
295
|
+
let X = null, ne = null, $ = null;
|
|
296
|
+
R.forEach((o) => {
|
|
297
|
+
if (!be(o)) {
|
|
298
|
+
G.push(o);
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
if (o.type === Me && !P) {
|
|
302
302
|
P = o;
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
if (o.type ===
|
|
306
|
-
|
|
305
|
+
if (o.type === ve && !z) {
|
|
306
|
+
z = o;
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
|
-
if (o.type ===
|
|
310
|
-
|
|
309
|
+
if (o.type === Ne && !J) {
|
|
310
|
+
J = o;
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
if (o.type ===
|
|
314
|
-
|
|
313
|
+
if (o.type === De && !X) {
|
|
314
|
+
X = o;
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
|
-
if (o.type === Ke && !
|
|
318
|
-
|
|
317
|
+
if (o.type === Ke && !ne) {
|
|
318
|
+
ne = o;
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
if (o.type === Pe &&
|
|
322
|
-
|
|
321
|
+
if (o.type === Pe && !$) {
|
|
322
|
+
$ = o;
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
|
-
|
|
325
|
+
G.push(o);
|
|
326
326
|
});
|
|
327
|
-
const
|
|
327
|
+
const pe = !!z, de = z ?? (G.length ? /* @__PURE__ */ e.jsx(ve, { children: G }) : null), le = pe ? G : [], W = X ?? (!!X ? /* @__PURE__ */ e.jsx(De, { children: K, context: V, modal: a, closeOnOutsideClick: c }) : null), ue = J ?? (!!J ? /* @__PURE__ */ e.jsx(Ne, { children: J }) : null), he = !!ne, te = ne, ie = !!$, oe = ae(() => ({
|
|
328
328
|
isCollapsed: g.current,
|
|
329
|
-
isSidebarOpen: !
|
|
330
|
-
}), [g.current,
|
|
331
|
-
return
|
|
329
|
+
isSidebarOpen: !N.current
|
|
330
|
+
}), [g.current, N.current]);
|
|
331
|
+
return Le(() => {
|
|
332
332
|
u.current && f.current?.style.setProperty("--left-slot-width", `${u.current?.offsetWidth}px`);
|
|
333
|
-
}, [u.current]),
|
|
333
|
+
}, [u.current]), Le(() => {
|
|
334
334
|
const o = f.current;
|
|
335
335
|
if (!o) return;
|
|
336
336
|
const w = o.style.transition;
|
|
337
337
|
o.style.transition = "none";
|
|
338
|
-
const
|
|
339
|
-
o.className = o.className.replace(/\b(collapsed|expanded|has-left-slot)\b/g, "").trim(), o.classList.add(
|
|
340
|
-
}, [
|
|
338
|
+
const E = g.current;
|
|
339
|
+
o.className = o.className.replace(/\b(collapsed|expanded|has-left-slot)\b/g, "").trim(), o.classList.add(E ? "collapsed" : "expanded"), ie && o.classList.add("has-left-slot"), o.style.transition = w;
|
|
340
|
+
}, [ie]), /* @__PURE__ */ e.jsx(Je.Provider, { value: oe, children: /* @__PURE__ */ e.jsx(Ge.Provider, { value: V, children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-container", ref: h, className: L(
|
|
341
341
|
"w-full h-full max-h-dvh overflow-y-hidden",
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
he ? "navigation-drawer-with-sidebar" : "navigation-drawer",
|
|
343
|
+
i?.drawer ? "disabled-dragopen" : "",
|
|
344
|
+
i?.sidebar ? "disabled-dragopen-sidebar" : ""
|
|
345
345
|
), children: [
|
|
346
346
|
/* @__PURE__ */ e.jsxs(
|
|
347
347
|
"div",
|
|
348
348
|
{
|
|
349
349
|
ref: f,
|
|
350
|
-
className:
|
|
350
|
+
className: L(
|
|
351
351
|
"bg-neutral-default-default border-r border-neutral-strong-default h-dvh md:h-screen p-0 overflow-hidden drawer flex gap-0",
|
|
352
352
|
g.current ? "collapsed" : "expanded",
|
|
353
|
-
|
|
353
|
+
ie ? "has-left-slot" : "",
|
|
354
354
|
s
|
|
355
355
|
),
|
|
356
356
|
children: [
|
|
357
|
-
|
|
357
|
+
$ && be($) ? je.cloneElement($, { ref: u }) : $,
|
|
358
358
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 gap-4 p-4 overflow-hidden", children: [
|
|
359
359
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
360
|
-
/* @__PURE__ */ e.jsx(Ye, { onToggleCollapse:
|
|
360
|
+
/* @__PURE__ */ e.jsx(Ye, { onToggleCollapse: O }),
|
|
361
361
|
P
|
|
362
362
|
] }),
|
|
363
363
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 overflow-hidden relative flex-col", children: [
|
|
364
364
|
le,
|
|
365
|
-
|
|
365
|
+
de
|
|
366
366
|
] }),
|
|
367
|
-
|
|
367
|
+
ue
|
|
368
368
|
] })
|
|
369
369
|
]
|
|
370
370
|
}
|
|
371
371
|
),
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
W && be(W) ? je.cloneElement(W, { ref: d, modal: a, closeOnOutsideClick: c }) : W,
|
|
373
|
+
te && be(te) ? je.cloneElement(te, {
|
|
374
374
|
ref: m,
|
|
375
|
-
className:
|
|
376
|
-
context:
|
|
377
|
-
}) :
|
|
375
|
+
className: L("sidebar", te.props?.className, l),
|
|
376
|
+
context: V
|
|
377
|
+
}) : te
|
|
378
378
|
] }) }) });
|
|
379
|
-
}, Fe =
|
|
379
|
+
}, Fe = M(Yt), Ye = M(({ onToggleCollapse: t }) => /* @__PURE__ */ e.jsx(
|
|
380
380
|
"button",
|
|
381
381
|
{
|
|
382
382
|
type: "button",
|
|
@@ -386,42 +386,42 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
386
386
|
}
|
|
387
387
|
), (t, r) => t.onToggleCollapse === r.onToggleCollapse);
|
|
388
388
|
Ye.displayName = "NavigationDrawerCollapseButton";
|
|
389
|
-
const Me =
|
|
390
|
-
const l =
|
|
391
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
389
|
+
const Me = M(({ children: t, className: r, context: s }) => {
|
|
390
|
+
const l = ge(t, s);
|
|
391
|
+
return /* @__PURE__ */ e.jsx("div", { className: L("flex items-center justify-between", r), children: l });
|
|
392
392
|
});
|
|
393
393
|
Me.displayName = "NavigationDrawerHeader";
|
|
394
|
-
const
|
|
395
|
-
const
|
|
396
|
-
return /* @__PURE__ */ e.jsx("div", { ...l, className:
|
|
394
|
+
const ve = M(({ children: t, className: r, context: s, ...l }) => {
|
|
395
|
+
const i = ge(t, s);
|
|
396
|
+
return /* @__PURE__ */ e.jsx("div", { ...l, className: L("w-full flex-1 drawer-content select-none", r), children: i });
|
|
397
397
|
});
|
|
398
|
-
|
|
399
|
-
const
|
|
400
|
-
const l =
|
|
401
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
398
|
+
ve.displayName = "NavigationDrawerContent";
|
|
399
|
+
const Ne = M(({ children: t, className: r, context: s }) => {
|
|
400
|
+
const l = ge(t, s);
|
|
401
|
+
return /* @__PURE__ */ e.jsx("div", { className: L("flex items-center justify-between", r), children: l });
|
|
402
402
|
});
|
|
403
|
-
|
|
404
|
-
const Qe =
|
|
403
|
+
Ne.displayName = "NavigationDrawerFooter";
|
|
404
|
+
const Qe = M(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: L("w-full border-t border-neutral-strong-default ", t) }));
|
|
405
405
|
Qe.displayName = "NavigationDrawerSpacer";
|
|
406
|
-
const
|
|
407
|
-
const
|
|
408
|
-
|
|
406
|
+
const De = M(me(({ children: t, className: r, context: s, modal: l, closeOnOutsideClick: i }, a) => {
|
|
407
|
+
const c = ge(t, s), h = ce(), u = () => {
|
|
408
|
+
i && (h.closeDrawer(), h.closeSidebar());
|
|
409
409
|
};
|
|
410
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-outlet", ref: a, className:
|
|
410
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-outlet", ref: a, className: L("flex-1 overflow-auto relative h-full max-h-dvh", r), children: [
|
|
411
411
|
l && /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer-backdrop select-none", onClick: u }),
|
|
412
|
-
|
|
412
|
+
c
|
|
413
413
|
] }) });
|
|
414
|
-
}), (t, r) => t.children === r.children && t.className === r.className),
|
|
414
|
+
}), (t, r) => t.children === r.children && t.className === r.className), Z = Object.assign(Fe, {
|
|
415
415
|
Root: Fe,
|
|
416
416
|
Header: Me,
|
|
417
|
-
Content:
|
|
418
|
-
Footer:
|
|
417
|
+
Content: ve,
|
|
418
|
+
Footer: Ne,
|
|
419
419
|
Spacer: Qe,
|
|
420
|
-
Outlet:
|
|
420
|
+
Outlet: De,
|
|
421
421
|
Sidebar: Ke,
|
|
422
422
|
LeftSlot: Pe
|
|
423
423
|
});
|
|
424
|
-
|
|
424
|
+
Z.displayName = "NavigationDrawer";
|
|
425
425
|
const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
426
426
|
variants: {
|
|
427
427
|
isSelected: {
|
|
@@ -434,7 +434,7 @@ const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
}), er = Ie(
|
|
437
|
-
|
|
437
|
+
L(
|
|
438
438
|
"select-none line-clamp-1 min-w-max",
|
|
439
439
|
"prometeo-fonts-label-large transition-colors duration-300 ease-out"
|
|
440
440
|
),
|
|
@@ -457,7 +457,7 @@ const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
|
457
457
|
]
|
|
458
458
|
}
|
|
459
459
|
), ke = Ie(
|
|
460
|
-
|
|
460
|
+
L(
|
|
461
461
|
"transition-colors duration-300 ease-out min-w-max"
|
|
462
462
|
),
|
|
463
463
|
{
|
|
@@ -483,30 +483,30 @@ const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
|
483
483
|
title: r,
|
|
484
484
|
icon: s,
|
|
485
485
|
count: l,
|
|
486
|
-
className:
|
|
486
|
+
className: i,
|
|
487
487
|
isSelected: a = !1,
|
|
488
|
-
hasSublinks:
|
|
488
|
+
hasSublinks: c,
|
|
489
489
|
subLinksCollapsed: h,
|
|
490
490
|
onToggleSublinks: u,
|
|
491
491
|
as: f = "div",
|
|
492
|
-
onClick:
|
|
492
|
+
onClick: d,
|
|
493
493
|
onAuxClick: m,
|
|
494
494
|
disabled: g = !1,
|
|
495
|
-
tooltipText:
|
|
496
|
-
selectorCss:
|
|
495
|
+
tooltipText: N,
|
|
496
|
+
selectorCss: j
|
|
497
497
|
} = t, p = (y) => {
|
|
498
|
-
g ||
|
|
499
|
-
},
|
|
498
|
+
g || d?.(y);
|
|
499
|
+
}, I = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
500
500
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center flex-nowrap", children: [
|
|
501
|
-
s && (
|
|
501
|
+
s && (N ? /* @__PURE__ */ e.jsx(Pt, { title: N, disabled: g, children: /* @__PURE__ */ e.jsx(s, { size: 24, className: ke({ disabled: g, isSelected: a }) }) }) : /* @__PURE__ */ e.jsx(s, { size: 24, className: ke({ disabled: g, isSelected: a }) })),
|
|
502
502
|
/* @__PURE__ */ e.jsx("label", { className: er({ disabled: g, isSelected: a }), children: r })
|
|
503
503
|
] }),
|
|
504
504
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 items-center", children: [
|
|
505
505
|
l && l ? /* @__PURE__ */ e.jsx(He, { count: l, maxCount: 99, className: "badge", disabled: g }) : "",
|
|
506
|
-
|
|
506
|
+
c && /* @__PURE__ */ e.jsx(
|
|
507
507
|
"div",
|
|
508
508
|
{
|
|
509
|
-
className:
|
|
509
|
+
className: L(
|
|
510
510
|
"sublinks-toggle",
|
|
511
511
|
"transition-all duration-200",
|
|
512
512
|
"rounded-full relative grid place-items-center size-6",
|
|
@@ -519,47 +519,47 @@ const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
|
519
519
|
disabled: g,
|
|
520
520
|
type: "button",
|
|
521
521
|
onClick: u,
|
|
522
|
-
className:
|
|
522
|
+
className: L("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", ke({ disabled: g, isSelected: a }), g && "pointer-events-none"),
|
|
523
523
|
children: /* @__PURE__ */ e.jsx(Mt, {})
|
|
524
524
|
}
|
|
525
525
|
)
|
|
526
526
|
}
|
|
527
527
|
)
|
|
528
528
|
] })
|
|
529
|
-
] }),
|
|
529
|
+
] }), C = L(
|
|
530
530
|
"group navitem",
|
|
531
531
|
"h-12 flex-1 flex items-center p-3 rounded-lg justify-between w-full",
|
|
532
532
|
"transition-all duration-300",
|
|
533
533
|
Qt,
|
|
534
534
|
Zt({ isSelected: a, disabled: g }),
|
|
535
|
-
|
|
535
|
+
i
|
|
536
536
|
);
|
|
537
537
|
if (f === "a") {
|
|
538
538
|
const y = {
|
|
539
539
|
onClick: p,
|
|
540
540
|
onAuxClick: m,
|
|
541
|
-
className:
|
|
541
|
+
className: C
|
|
542
542
|
};
|
|
543
|
-
return /* @__PURE__ */ e.jsx("a", { ...y, children:
|
|
543
|
+
return /* @__PURE__ */ e.jsx("a", { ...y, children: I });
|
|
544
544
|
}
|
|
545
545
|
if (f === "button") {
|
|
546
546
|
const y = {
|
|
547
547
|
onClick: p,
|
|
548
548
|
type: "button",
|
|
549
|
-
className:
|
|
550
|
-
id:
|
|
549
|
+
className: C,
|
|
550
|
+
id: j
|
|
551
551
|
};
|
|
552
|
-
return /* @__PURE__ */ e.jsx("button", { ...y, children:
|
|
552
|
+
return /* @__PURE__ */ e.jsx("button", { ...y, children: I });
|
|
553
553
|
}
|
|
554
|
-
const
|
|
554
|
+
const S = {
|
|
555
555
|
onClick: p,
|
|
556
|
-
className:
|
|
556
|
+
className: C
|
|
557
557
|
};
|
|
558
|
-
return /* @__PURE__ */ e.jsx("div", { ...
|
|
559
|
-
}, Re =
|
|
558
|
+
return /* @__PURE__ */ e.jsx("div", { ...S, children: I });
|
|
559
|
+
}, Re = M(tr);
|
|
560
560
|
Re.displayName = "NavigationDrawerItemBase";
|
|
561
561
|
const rr = (t) => {
|
|
562
|
-
const { title: r, icon: s, count: l, className:
|
|
562
|
+
const { title: r, icon: s, count: l, className: i, isActive: a, onClick: c, isView: h = !0, disabled: u, tooltipText: f, selectorCss: d } = t;
|
|
563
563
|
return h ? /* @__PURE__ */ e.jsx(
|
|
564
564
|
Re,
|
|
565
565
|
{
|
|
@@ -567,156 +567,156 @@ const rr = (t) => {
|
|
|
567
567
|
title: r,
|
|
568
568
|
icon: s,
|
|
569
569
|
count: l,
|
|
570
|
-
className:
|
|
570
|
+
className: i,
|
|
571
571
|
isSelected: a,
|
|
572
|
-
onClick:
|
|
572
|
+
onClick: c,
|
|
573
573
|
disabled: u,
|
|
574
574
|
tooltipText: f,
|
|
575
|
-
selectorCss:
|
|
575
|
+
selectorCss: d
|
|
576
576
|
}
|
|
577
577
|
) : null;
|
|
578
|
-
}, Ze =
|
|
578
|
+
}, Ze = M(rr);
|
|
579
579
|
Ze.displayName = "NavigationDrawerActionItem";
|
|
580
|
-
const sr = ({ actions: t, activeActionId: r, onActionClick: s, className: l }) => /* @__PURE__ */ e.jsx(Oe, { className:
|
|
580
|
+
const sr = ({ actions: t, activeActionId: r, onActionClick: s, className: l }) => /* @__PURE__ */ e.jsx(Oe, { className: L("flex flex-col w-full ", l), contentClassName: "space-y-2", scrollbarProps: { hide: !0 }, indicators: {
|
|
581
581
|
top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
|
|
582
582
|
bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
|
|
583
|
-
}, children: t?.map((
|
|
584
|
-
const { id: a, onClick:
|
|
585
|
-
s?.(a, u),
|
|
583
|
+
}, children: t?.map((i) => {
|
|
584
|
+
const { id: a, onClick: c, isView: h = !0, payload: u, ...f } = i, d = a === r, m = () => {
|
|
585
|
+
s?.(a, u), c?.();
|
|
586
586
|
};
|
|
587
587
|
return h ? /* @__PURE__ */ e.jsx(
|
|
588
588
|
Ze,
|
|
589
589
|
{
|
|
590
590
|
...f,
|
|
591
591
|
id: a,
|
|
592
|
-
isActive:
|
|
592
|
+
isActive: d,
|
|
593
593
|
onClick: m
|
|
594
594
|
},
|
|
595
595
|
a
|
|
596
596
|
) : null;
|
|
597
|
-
}) }), et =
|
|
597
|
+
}) }), et = M(sr);
|
|
598
598
|
et.displayName = "NavigationDrawerActions";
|
|
599
599
|
const nr = (t) => {
|
|
600
|
-
const { className: r, title: s, path: l, onClick:
|
|
601
|
-
|
|
600
|
+
const { className: r, title: s, path: l, onClick: i, isSelected: a, parentPath: c } = t, { pathname: h } = Ue(), u = x(() => {
|
|
601
|
+
i?.(l);
|
|
602
602
|
}, [l]), f = x(() => {
|
|
603
603
|
if (l.startsWith("./")) {
|
|
604
|
-
if (!
|
|
605
|
-
const m =
|
|
604
|
+
if (!c) return;
|
|
605
|
+
const m = c + l.slice(2);
|
|
606
606
|
window.open(m, "_blank");
|
|
607
607
|
} else
|
|
608
608
|
window.open(l, "_blank");
|
|
609
|
-
}, [l]),
|
|
609
|
+
}, [l]), d = a || l === h;
|
|
610
610
|
return /* @__PURE__ */ e.jsx(
|
|
611
611
|
"a",
|
|
612
612
|
{
|
|
613
613
|
onClick: u,
|
|
614
614
|
onAuxClick: f,
|
|
615
|
-
className:
|
|
615
|
+
className: L(
|
|
616
616
|
"group",
|
|
617
617
|
"transition-all duration-300 ease-in-out cursor-pointer",
|
|
618
618
|
"h-10 w-full rounded-lg py-[11px] px-3",
|
|
619
619
|
"hover:bg-neutral-medium-hover",
|
|
620
|
-
|
|
620
|
+
d && "bg-neutral-medium-selected hover:bg-neutral-medium-hover active:bg-transparent focus:bg-transparent",
|
|
621
621
|
r
|
|
622
622
|
),
|
|
623
|
-
children: /* @__PURE__ */ e.jsx("p", { className:
|
|
623
|
+
children: /* @__PURE__ */ e.jsx("p", { className: L(
|
|
624
624
|
"prometeo-fonts-label-large text-neutral-medium-default",
|
|
625
625
|
"group-active:text-neutral-default-focused group-focus:text-neutral-default-focused",
|
|
626
|
-
|
|
626
|
+
d && "text-primary-default-default group-hover:text-primary-default-hover group-focus:text-primary-default-focused group-active:text-primary-default-focused"
|
|
627
627
|
), children: s })
|
|
628
628
|
}
|
|
629
629
|
);
|
|
630
|
-
}, tt =
|
|
630
|
+
}, tt = M(nr);
|
|
631
631
|
tt.displayName = "NavItemSecondary";
|
|
632
|
-
const or =
|
|
633
|
-
const [s, l] =
|
|
634
|
-
|
|
632
|
+
const or = me((t, r) => {
|
|
633
|
+
const [s, l] = U(!0), i = k(null), { path: a, title: c, icon: h, count: u, className: f, isSelected: d = !1, onClick: m, sublinks: g, toggleCollapse: N, getIsCollapsed: j, subscribeToCollapse: p, isView: I = !0, disabled: C, tooltipText: S, selectorCss: y } = t;
|
|
634
|
+
H(() => p ? p((P) => {
|
|
635
635
|
P && l(!0);
|
|
636
636
|
}) : void 0, [p]);
|
|
637
|
-
const
|
|
638
|
-
l((
|
|
639
|
-
}, []), b = x((
|
|
640
|
-
l(
|
|
641
|
-
}, []),
|
|
642
|
-
toggle:
|
|
637
|
+
const D = x(() => {
|
|
638
|
+
l((R) => !R);
|
|
639
|
+
}, []), b = x((R) => {
|
|
640
|
+
l(R);
|
|
641
|
+
}, []), O = {
|
|
642
|
+
toggle: D,
|
|
643
643
|
setIsCollapsed: b,
|
|
644
644
|
get isCollapsed() {
|
|
645
645
|
return s;
|
|
646
646
|
},
|
|
647
647
|
get isDrawerCollapsed() {
|
|
648
|
-
return
|
|
648
|
+
return j?.() ?? !1;
|
|
649
649
|
},
|
|
650
|
-
toggleDrawerCollapse:
|
|
650
|
+
toggleDrawerCollapse: N,
|
|
651
651
|
subscribeToCollapse: p
|
|
652
652
|
};
|
|
653
|
-
Te(r, () =>
|
|
654
|
-
const
|
|
655
|
-
const
|
|
656
|
-
if (g && g.length > 0 &&
|
|
657
|
-
b(!1),
|
|
653
|
+
Te(r, () => O, [O, s, j, N]);
|
|
654
|
+
const q = h, F = x(() => {
|
|
655
|
+
const R = j?.() ?? !1;
|
|
656
|
+
if (g && g.length > 0 && R) {
|
|
657
|
+
b(!1), N?.();
|
|
658
658
|
return;
|
|
659
659
|
}
|
|
660
660
|
m?.(a);
|
|
661
|
-
}, [a, m, g,
|
|
661
|
+
}, [a, m, g, N, b, j]), ee = x(() => {
|
|
662
662
|
window.open(a, "_blank");
|
|
663
|
-
}, [a]),
|
|
664
|
-
if (!g ||
|
|
663
|
+
}, [a]), V = () => {
|
|
664
|
+
if (!g || C) return null;
|
|
665
665
|
if (t.subLinksRender && g)
|
|
666
|
-
return t.subLinksRender(g,
|
|
667
|
-
const
|
|
666
|
+
return t.subLinksRender(g, O);
|
|
667
|
+
const R = x((P) => {
|
|
668
668
|
if (P.startsWith("./")) {
|
|
669
|
-
const
|
|
670
|
-
m?.(
|
|
669
|
+
const z = a + P.slice(2);
|
|
670
|
+
m?.(z);
|
|
671
671
|
} else
|
|
672
672
|
m?.(P);
|
|
673
673
|
}, [a]);
|
|
674
|
-
return
|
|
675
|
-
const P =
|
|
674
|
+
return H(() => {
|
|
675
|
+
const P = i.current;
|
|
676
676
|
if (!P) return;
|
|
677
|
-
const
|
|
678
|
-
P.style.setProperty("--sublinks-max-height", `${
|
|
679
|
-
}, []), /* @__PURE__ */ e.jsx("div", { ref:
|
|
680
|
-
},
|
|
681
|
-
|
|
677
|
+
const z = P.scrollHeight;
|
|
678
|
+
P.style.setProperty("--sublinks-max-height", `${z}px`);
|
|
679
|
+
}, []), /* @__PURE__ */ e.jsx("div", { ref: i, className: `sublinks flex flex-col gap-1 ml-8 ${s ? "collapsed" : "expanded"}`, children: g.map((P) => /* @__PURE__ */ e.jsx(tt, { ...P, onClick: R, parentPath: a }, `${P.title}-${P.path}`)) });
|
|
680
|
+
}, K = (R) => {
|
|
681
|
+
R.stopPropagation(), R.preventDefault(), D();
|
|
682
682
|
};
|
|
683
|
-
return
|
|
683
|
+
return I ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 ", id: y, children: [
|
|
684
684
|
/* @__PURE__ */ e.jsx(
|
|
685
685
|
Re,
|
|
686
686
|
{
|
|
687
687
|
as: "a",
|
|
688
|
-
title:
|
|
689
|
-
icon:
|
|
688
|
+
title: c,
|
|
689
|
+
icon: q,
|
|
690
690
|
count: u,
|
|
691
691
|
className: f,
|
|
692
|
-
isSelected:
|
|
692
|
+
isSelected: d,
|
|
693
693
|
hasSublinks: !!g,
|
|
694
694
|
subLinksCollapsed: s,
|
|
695
|
-
onToggleSublinks:
|
|
696
|
-
onClick:
|
|
697
|
-
onAuxClick:
|
|
698
|
-
disabled:
|
|
699
|
-
tooltipText:
|
|
695
|
+
onToggleSublinks: K,
|
|
696
|
+
onClick: F,
|
|
697
|
+
onAuxClick: ee,
|
|
698
|
+
disabled: C,
|
|
699
|
+
tooltipText: S
|
|
700
700
|
}
|
|
701
701
|
),
|
|
702
|
-
|
|
702
|
+
V()
|
|
703
703
|
] }) : null;
|
|
704
|
-
}), rt =
|
|
704
|
+
}), rt = M(or);
|
|
705
705
|
rt.displayName = "NavigationDrawerLinkItem";
|
|
706
|
-
const ar = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: l, toggleCollapse:
|
|
707
|
-
const { pathname:
|
|
708
|
-
return /* @__PURE__ */ e.jsx(Oe, { className:
|
|
706
|
+
const ar = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: l, toggleCollapse: i, subscribeToCollapse: a }) => {
|
|
707
|
+
const { pathname: c } = Ue();
|
|
708
|
+
return /* @__PURE__ */ e.jsx(Oe, { className: L("flex flex-col w-full", s), contentClassName: "space-y-2", axis: "y", scrollbarProps: { hide: !0 }, indicators: {
|
|
709
709
|
top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
|
|
710
710
|
bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
|
|
711
711
|
}, children: t?.map((h, u) => {
|
|
712
|
-
const f = h.isSelected || h.path ===
|
|
712
|
+
const f = h.isSelected || h.path === c || (h.relatedPaths?.some((d) => c.startsWith(d)) ?? !1) || (h.sublinks?.some((d) => d.path === c) ?? !1);
|
|
713
713
|
return /* @__PURE__ */ e.jsx(
|
|
714
714
|
rt,
|
|
715
715
|
{
|
|
716
716
|
...h,
|
|
717
717
|
isSelected: f,
|
|
718
718
|
onClick: r,
|
|
719
|
-
toggleCollapse:
|
|
719
|
+
toggleCollapse: i,
|
|
720
720
|
getIsCollapsed: l,
|
|
721
721
|
subscribeToCollapse: a,
|
|
722
722
|
disabled: h.disabled,
|
|
@@ -726,19 +726,19 @@ const ar = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: l,
|
|
|
726
726
|
u
|
|
727
727
|
);
|
|
728
728
|
}) });
|
|
729
|
-
}, st =
|
|
729
|
+
}, st = M(ar);
|
|
730
730
|
st.displayName = "NavigationDrawerNavlinks";
|
|
731
|
-
const nt =
|
|
732
|
-
const { getIsCollapsed: h, toggleCollapse: u, subscribeToCollapse: f, subscribeToSidebarOpen:
|
|
733
|
-
|
|
734
|
-
const
|
|
731
|
+
const nt = M(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: l, initialSectionRef: i, navigationControlsRef: a, onActionClick: c }) => {
|
|
732
|
+
const { getIsCollapsed: h, toggleCollapse: u, subscribeToCollapse: f, subscribeToSidebarOpen: d, getIsSidebarOpen: m } = ce(), [g, N] = U(() => m?.() ?? !1), [j, p] = U(() => i?.current ?? "notifications");
|
|
733
|
+
H(() => {
|
|
734
|
+
const S = d?.(N), y = a?.current?.subscribeToSection?.(p);
|
|
735
735
|
return () => {
|
|
736
|
-
|
|
736
|
+
S?.(), y?.();
|
|
737
737
|
};
|
|
738
|
-
}, [
|
|
739
|
-
const
|
|
738
|
+
}, [d, a]);
|
|
739
|
+
const C = g && (j === "notifications" || j === "help") ? j : l;
|
|
740
740
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
741
|
-
/* @__PURE__ */ e.jsx(
|
|
741
|
+
/* @__PURE__ */ e.jsx(Z.Spacer, { className: "pb-3" }),
|
|
742
742
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col overflow-hidden h-full gap-4 relative w-full", children: [
|
|
743
743
|
/* @__PURE__ */ e.jsx(
|
|
744
744
|
st,
|
|
@@ -755,8 +755,8 @@ const nt = E(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId:
|
|
|
755
755
|
et,
|
|
756
756
|
{
|
|
757
757
|
actions: s,
|
|
758
|
-
activeActionId:
|
|
759
|
-
onActionClick:
|
|
758
|
+
activeActionId: C,
|
|
759
|
+
onActionClick: c,
|
|
760
760
|
className: "max-h-[30dvh]"
|
|
761
761
|
}
|
|
762
762
|
)
|
|
@@ -765,27 +765,27 @@ const nt = E(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId:
|
|
|
765
765
|
}, (t, r) => t.navlinks === r.navlinks && t.handleNavigation === r.handleNavigation && t.allActions === r.allActions && t.activeActionId === r.activeActionId && t.initialSectionRef === r.initialSectionRef && t.navigationControlsRef === r.navigationControlsRef && t.onActionClick === r.onActionClick);
|
|
766
766
|
nt.displayName = "PyrionLayout.Content";
|
|
767
767
|
const lr = (t) => {
|
|
768
|
-
const { sessions: r, onSessionClick: s, secondarySlot: l, subImageUrlAccessor:
|
|
768
|
+
const { sessions: r, onSessionClick: s, secondarySlot: l, subImageUrlAccessor: i } = t;
|
|
769
769
|
if (!r || r.length === 0)
|
|
770
770
|
return null;
|
|
771
771
|
const a = (u, f) => {
|
|
772
772
|
s && f && s(u, f);
|
|
773
|
-
},
|
|
774
|
-
if (!
|
|
773
|
+
}, c = (u) => {
|
|
774
|
+
if (!i)
|
|
775
775
|
return;
|
|
776
|
-
const f =
|
|
776
|
+
const f = we({ session: u }, i);
|
|
777
777
|
if (f != null)
|
|
778
778
|
return typeof f == "string" ? f : String(f);
|
|
779
779
|
}, h = x((u) => typeof l == "function" ? l(u) : l, [l]);
|
|
780
780
|
return /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex flex-col gap-2", children: r?.map((u) => {
|
|
781
781
|
const { auth_id: f } = u;
|
|
782
|
-
return /* @__PURE__ */ e.jsx(
|
|
782
|
+
return /* @__PURE__ */ e.jsx(xe, { className: " shrink-0 h-max", children: /* @__PURE__ */ e.jsx(xe.Content, { onClick: () => a(u, t.userOptionsControls), className: "p-0 group-data-[expanded=true]/ticketcard:border-none", children: /* @__PURE__ */ e.jsx(
|
|
783
783
|
We,
|
|
784
784
|
{
|
|
785
785
|
name: f.name,
|
|
786
786
|
avatarSize: "xxs",
|
|
787
787
|
secondarySlot: h(u),
|
|
788
|
-
subImageUrl:
|
|
788
|
+
subImageUrl: c(u),
|
|
789
789
|
imageUrl: f.profile_picture,
|
|
790
790
|
className: "pyrion-navigation-drawer-user-card"
|
|
791
791
|
},
|
|
@@ -797,24 +797,24 @@ const lr = (t) => {
|
|
|
797
797
|
currentAppSessions: r,
|
|
798
798
|
resolveUserSecondarySlot: s,
|
|
799
799
|
resolveSessionSecondarySlot: l,
|
|
800
|
-
onSessionClick:
|
|
800
|
+
onSessionClick: i,
|
|
801
801
|
onLogoutClick: a,
|
|
802
|
-
onProfileClick:
|
|
802
|
+
onProfileClick: c,
|
|
803
803
|
options: h,
|
|
804
804
|
currentSystemId: u,
|
|
805
805
|
userOptionsControls: f,
|
|
806
|
-
mobileAppSwitcherControls:
|
|
806
|
+
mobileAppSwitcherControls: d
|
|
807
807
|
}) => {
|
|
808
|
-
const { getIsCollapsed: m, toggleCollapse: g, subscribeToCollapse:
|
|
808
|
+
const { getIsCollapsed: m, toggleCollapse: g, subscribeToCollapse: N } = ce(), j = x(() => {
|
|
809
809
|
const p = m();
|
|
810
|
-
p ? (g(), f.current?.open()) :
|
|
811
|
-
}, [m, g, f,
|
|
812
|
-
return
|
|
813
|
-
p && (f.current?.close(),
|
|
814
|
-
}), [
|
|
815
|
-
/* @__PURE__ */ e.jsx(
|
|
816
|
-
/* @__PURE__ */ e.jsxs(
|
|
817
|
-
/* @__PURE__ */ e.jsx(
|
|
810
|
+
p ? (g(), f.current?.open()) : c?.(p);
|
|
811
|
+
}, [m, g, f, c]);
|
|
812
|
+
return H(() => N((p) => {
|
|
813
|
+
p && (f.current?.close(), d.current?.close());
|
|
814
|
+
}), [N, f, d]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
815
|
+
/* @__PURE__ */ e.jsx(Z.Spacer, { className: "mb-3" }),
|
|
816
|
+
/* @__PURE__ */ e.jsxs(xe, { className: "", controls: f, children: [
|
|
817
|
+
/* @__PURE__ */ e.jsx(xe.Content, { onClick: j, className: "max-h-[60px] min-h-[60px] h-[60px] max-w-[70vw] w-[min(285px,70vw)] flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
818
818
|
We,
|
|
819
819
|
{
|
|
820
820
|
className: "pyrion-navigation-drawer-user-card p-0",
|
|
@@ -826,7 +826,7 @@ const lr = (t) => {
|
|
|
826
826
|
isLoading: !t.user
|
|
827
827
|
}
|
|
828
828
|
) }),
|
|
829
|
-
/* @__PURE__ */ e.jsxs(
|
|
829
|
+
/* @__PURE__ */ e.jsxs(xe.Options, { className: "min-h-max flex flex-col gap-3 pl-3 mt-3 pt-2", children: [
|
|
830
830
|
r && r.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
831
831
|
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-medium text-neutral-medium-default select-none", children: "Cambiar cuenta" }),
|
|
832
832
|
/* @__PURE__ */ e.jsx(
|
|
@@ -843,7 +843,7 @@ const lr = (t) => {
|
|
|
843
843
|
lr,
|
|
844
844
|
{
|
|
845
845
|
sessions: r,
|
|
846
|
-
onSessionClick:
|
|
846
|
+
onSessionClick: i,
|
|
847
847
|
secondarySlot: l,
|
|
848
848
|
subImageUrlAccessor: h?.sessionCardOptions?.subImageUrlAccessor,
|
|
849
849
|
currentSystemId: u,
|
|
@@ -873,59 +873,59 @@ const lr = (t) => {
|
|
|
873
873
|
] })
|
|
874
874
|
] })
|
|
875
875
|
] });
|
|
876
|
-
}, ot =
|
|
876
|
+
}, ot = M(ir, (t, r) => {
|
|
877
877
|
const s = Object.keys(t), l = Object.keys(r);
|
|
878
878
|
if (s.length !== l.length)
|
|
879
879
|
return !1;
|
|
880
|
-
for (const
|
|
881
|
-
if (!Object.prototype.hasOwnProperty.call(r,
|
|
880
|
+
for (const i of s) {
|
|
881
|
+
if (!Object.prototype.hasOwnProperty.call(r, i))
|
|
882
882
|
return !1;
|
|
883
|
-
const a = t[
|
|
884
|
-
if (a !==
|
|
883
|
+
const a = t[i], c = r[i];
|
|
884
|
+
if (a !== c)
|
|
885
885
|
return !1;
|
|
886
886
|
}
|
|
887
887
|
return t.currentAppSessions !== r.currentAppSessions || t.options !== r.options || t.currentSystemId !== r.currentSystemId || t.userOptionsControls !== r.userOptionsControls || t.mobileAppSwitcherControls !== r.mobileAppSwitcherControls;
|
|
888
888
|
});
|
|
889
889
|
ot.displayName = "PyrionNavigationDrawer.Footer";
|
|
890
|
-
const at =
|
|
890
|
+
const at = M(({ enabled_systems: t, onClick: r, currentSystemId: s }) => {
|
|
891
891
|
const l = x(() => {
|
|
892
892
|
if (t) {
|
|
893
893
|
if (s) {
|
|
894
894
|
const h = t.find((u) => u._id === s);
|
|
895
895
|
if (h) return { coverImage: h.coverImage, thumbnail: h.thumbnail };
|
|
896
896
|
}
|
|
897
|
-
const a = window.location.origin,
|
|
898
|
-
if (
|
|
897
|
+
const a = window.location.origin, c = t.find((h) => h.url === a);
|
|
898
|
+
if (c) return { coverImage: c.coverImage, thumbnail: c.thumbnail };
|
|
899
899
|
}
|
|
900
900
|
return { coverImage: "", thumbnail: "" };
|
|
901
|
-
}, [t]),
|
|
901
|
+
}, [t]), i = !!r;
|
|
902
902
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
903
903
|
l().coverImage ? /* @__PURE__ */ e.jsx(
|
|
904
904
|
"img",
|
|
905
905
|
{
|
|
906
906
|
src: l().coverImage,
|
|
907
907
|
alt: "System Logo",
|
|
908
|
-
className:
|
|
908
|
+
className: L("w-full h-12 rounded object-contain system-cover-image ", i && "cursor-pointer"),
|
|
909
909
|
draggable: !1,
|
|
910
910
|
onClick: r
|
|
911
911
|
}
|
|
912
|
-
) : /* @__PURE__ */ e.jsx(
|
|
912
|
+
) : /* @__PURE__ */ e.jsx(fe, { className: "w-full h-12 rounded object-contain system-cover-image " }),
|
|
913
913
|
l().thumbnail ? /* @__PURE__ */ e.jsx(
|
|
914
914
|
"img",
|
|
915
915
|
{
|
|
916
916
|
src: l().thumbnail,
|
|
917
917
|
alt: "System Logo",
|
|
918
|
-
className:
|
|
918
|
+
className: L("w-12 h-12 rounded object-cover system-thumbnail ", i && "cursor-pointer"),
|
|
919
919
|
draggable: !1,
|
|
920
920
|
onClick: r
|
|
921
921
|
}
|
|
922
|
-
) : /* @__PURE__ */ e.jsx(
|
|
922
|
+
) : /* @__PURE__ */ e.jsx(fe, { className: "w-12 h-12 rounded object-cover system-thumbnail " })
|
|
923
923
|
] });
|
|
924
924
|
}, (t, r) => t.enabled_systems === r.enabled_systems && t.onClick === r.onClick && t.currentSystemId === r.currentSystemId);
|
|
925
925
|
at.displayName = "PyrionNavigationDrawer.SystemLogo";
|
|
926
|
-
const lt =
|
|
926
|
+
const lt = M(
|
|
927
927
|
({ onSystemLogoClick: t, state: r, currentSystemId: s }) => {
|
|
928
|
-
const { getIsCollapsed: l } =
|
|
928
|
+
const { getIsCollapsed: l } = ce(), i = x(() => {
|
|
929
929
|
if (t) {
|
|
930
930
|
const a = l();
|
|
931
931
|
t(a);
|
|
@@ -935,7 +935,7 @@ const lt = E(
|
|
|
935
935
|
at,
|
|
936
936
|
{
|
|
937
937
|
enabled_systems: r.enabled_systems,
|
|
938
|
-
onClick:
|
|
938
|
+
onClick: i,
|
|
939
939
|
currentSystemId: s
|
|
940
940
|
}
|
|
941
941
|
);
|
|
@@ -979,17 +979,17 @@ function fr({
|
|
|
979
979
|
activeTab: r,
|
|
980
980
|
isLoadMorePending: s,
|
|
981
981
|
isHyperDown: l,
|
|
982
|
-
feedback:
|
|
982
|
+
feedback: i,
|
|
983
983
|
showSummaryInSlot: a,
|
|
984
|
-
copyOverrides:
|
|
984
|
+
copyOverrides: c,
|
|
985
985
|
className: h
|
|
986
986
|
}) {
|
|
987
|
-
const u = ur(t,
|
|
988
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
987
|
+
const u = ur(t, c), f = !s && i.phase === "empty" && l, d = !s && i.phase === "idle";
|
|
988
|
+
return /* @__PURE__ */ e.jsxs("div", { className: L("grid min-h-11 place-items-center p-4 relative text-center isolate", h), children: [
|
|
989
989
|
/* @__PURE__ */ e.jsx(
|
|
990
990
|
"p",
|
|
991
991
|
{
|
|
992
|
-
className:
|
|
992
|
+
className: L(
|
|
993
993
|
"absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 prometeo-fonts-label-medium text-neutral-medium-default transition-opacity duration-300 pointer-events-none",
|
|
994
994
|
s ? "opacity-100" : "opacity-0"
|
|
995
995
|
),
|
|
@@ -1000,18 +1000,18 @@ function fr({
|
|
|
1000
1000
|
/* @__PURE__ */ e.jsx(
|
|
1001
1001
|
"p",
|
|
1002
1002
|
{
|
|
1003
|
-
className:
|
|
1003
|
+
className: L(
|
|
1004
1004
|
"absolute inset-x-4 top-1/2 z-20 -translate-y-1/2 prometeo-fonts-label-medium text-neutral-strong-default transition-opacity duration-300 pointer-events-none",
|
|
1005
1005
|
a ? "opacity-100" : "opacity-0"
|
|
1006
1006
|
),
|
|
1007
1007
|
"aria-live": "polite",
|
|
1008
|
-
children: u.successOrEmptySummaryInSlot(
|
|
1008
|
+
children: u.successOrEmptySummaryInSlot(i)
|
|
1009
1009
|
}
|
|
1010
1010
|
),
|
|
1011
1011
|
/* @__PURE__ */ e.jsx(
|
|
1012
1012
|
"p",
|
|
1013
1013
|
{
|
|
1014
|
-
className:
|
|
1014
|
+
className: L(
|
|
1015
1015
|
"absolute inset-x-4 top-1/2 z-10 -translate-y-1/2 prometeo-fonts-label-medium text-neutral-medium-default transition-opacity duration-300 pointer-events-none",
|
|
1016
1016
|
f ? "opacity-100" : "opacity-0"
|
|
1017
1017
|
),
|
|
@@ -1022,9 +1022,9 @@ function fr({
|
|
|
1022
1022
|
/* @__PURE__ */ e.jsx(
|
|
1023
1023
|
"p",
|
|
1024
1024
|
{
|
|
1025
|
-
className:
|
|
1025
|
+
className: L(
|
|
1026
1026
|
"relative z-0 prometeo-fonts-label-medium text-neutral-medium-default transition-opacity duration-300 pointer-events-none",
|
|
1027
|
-
|
|
1027
|
+
d ? "opacity-100" : "opacity-0"
|
|
1028
1028
|
),
|
|
1029
1029
|
children: u.idleHint
|
|
1030
1030
|
}
|
|
@@ -1036,89 +1036,115 @@ const mr = ({ type: t }) => {
|
|
|
1036
1036
|
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(pr, {}) })) });
|
|
1037
1037
|
}, pr = () => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-end gap-1 p-2", children: [
|
|
1038
1038
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 w-full", children: [
|
|
1039
|
-
/* @__PURE__ */ e.jsx(
|
|
1040
|
-
/* @__PURE__ */ e.jsx(
|
|
1039
|
+
/* @__PURE__ */ e.jsx(fe, { shape: "circle", className: "w-12 h-12 aspect-square!" }),
|
|
1040
|
+
/* @__PURE__ */ e.jsx(fe, { shape: "rounded", className: "w-full h-12 min-h-12" })
|
|
1041
1041
|
] }),
|
|
1042
|
-
/* @__PURE__ */ e.jsx(
|
|
1043
|
-
] }), hr =
|
|
1044
|
-
const [
|
|
1042
|
+
/* @__PURE__ */ e.jsx(fe, { shape: "rounded", className: "w-20 h-3" })
|
|
1043
|
+
] }), hr = 1500, br = 400, xr = ({ onCloseClick: t, onMarkAllAsRead: r, loadingState: s, errorState: l, notifications: i, scrollableState: a }) => {
|
|
1044
|
+
const [c, h] = U("NO_LEIDAS"), u = k(null), f = k(null), [d, m] = U({ phase: "idle" }), g = k(null), N = k(s.isLoading), j = k(0), p = k(!1), I = k(!1), C = k(null), S = k(0), y = k(0), D = k(i.length);
|
|
1045
|
+
D.current = i.length;
|
|
1046
|
+
const b = k(s.isLoading);
|
|
1047
|
+
b.current = s.isLoading;
|
|
1048
|
+
const O = x(() => {
|
|
1045
1049
|
g.current && (clearTimeout(g.current), g.current = null);
|
|
1046
|
-
}, []),
|
|
1047
|
-
|
|
1050
|
+
}, []), q = x(() => {
|
|
1051
|
+
O(), g.current = setTimeout(() => {
|
|
1048
1052
|
m({ phase: "idle" }), g.current = null;
|
|
1049
1053
|
}, hr);
|
|
1050
|
-
}, [
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1054
|
+
}, [O]);
|
|
1055
|
+
H(() => () => O(), [O]);
|
|
1056
|
+
const F = x(() => {
|
|
1057
|
+
C.current && (clearTimeout(C.current), C.current = null);
|
|
1058
|
+
}, []);
|
|
1059
|
+
H(() => () => F(), [F]), H(() => {
|
|
1060
|
+
O(), F(), m({ phase: "idle" }), p.current = !1, I.current = !1;
|
|
1061
|
+
}, [c, O, F]), H(() => {
|
|
1062
|
+
const A = N.current;
|
|
1063
|
+
N.current = s.isLoading, !A && s.isLoading && s.type === "load_more" && (I.current = !1, F(), p.current = !0, j.current = i.length, O(), m({ phase: "idle" })), A && !s.isLoading && p.current && (p.current = !1, I.current = !0);
|
|
1064
|
+
}, [
|
|
1065
|
+
s.isLoading,
|
|
1066
|
+
s.type,
|
|
1067
|
+
i.length,
|
|
1068
|
+
O,
|
|
1069
|
+
F
|
|
1070
|
+
]), H(() => {
|
|
1071
|
+
if (!I.current || s.isLoading) return;
|
|
1072
|
+
const A = j.current, W = i.length - A;
|
|
1073
|
+
if (W > 0) {
|
|
1074
|
+
F(), I.current = !1, S.current += 1, m({
|
|
1059
1075
|
phase: "success",
|
|
1060
|
-
addedCount:
|
|
1061
|
-
bumpId:
|
|
1062
|
-
})
|
|
1076
|
+
addedCount: W,
|
|
1077
|
+
bumpId: S.current
|
|
1078
|
+
});
|
|
1079
|
+
return;
|
|
1063
1080
|
}
|
|
1081
|
+
return F(), C.current = setTimeout(() => {
|
|
1082
|
+
if (C.current = null, !I.current || b.current) return;
|
|
1083
|
+
I.current = !1;
|
|
1084
|
+
const Y = D.current - A;
|
|
1085
|
+
Y > 0 ? (S.current += 1, m({
|
|
1086
|
+
phase: "success",
|
|
1087
|
+
addedCount: Y,
|
|
1088
|
+
bumpId: S.current
|
|
1089
|
+
})) : m({ phase: "empty" });
|
|
1090
|
+
}, 0), () => F();
|
|
1064
1091
|
}, [
|
|
1092
|
+
i,
|
|
1093
|
+
i.length,
|
|
1065
1094
|
s.isLoading,
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
y
|
|
1070
|
-
]), V(() => {
|
|
1071
|
-
if (!(c.phase !== "success" && c.phase !== "empty")) {
|
|
1095
|
+
F
|
|
1096
|
+
]), H(() => {
|
|
1097
|
+
if (!(d.phase !== "success" && d.phase !== "empty")) {
|
|
1072
1098
|
if (a.state.hyperextensionActive.down) {
|
|
1073
|
-
|
|
1099
|
+
O();
|
|
1074
1100
|
return;
|
|
1075
1101
|
}
|
|
1076
|
-
|
|
1102
|
+
q();
|
|
1077
1103
|
}
|
|
1078
1104
|
}, [
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1105
|
+
d.phase,
|
|
1106
|
+
d.phase === "success" ? d.addedCount : 0,
|
|
1107
|
+
d.phase === "success" ? d.bumpId : 0,
|
|
1082
1108
|
a.state.hyperextensionActive.down,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
]),
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1088
|
-
if (
|
|
1089
|
-
|
|
1090
|
-
let
|
|
1091
|
-
return
|
|
1109
|
+
O,
|
|
1110
|
+
q
|
|
1111
|
+
]), H(() => {
|
|
1112
|
+
if (d.phase !== "success") return;
|
|
1113
|
+
const A = d.bumpId;
|
|
1114
|
+
if (y.current === A) return;
|
|
1115
|
+
y.current = A;
|
|
1116
|
+
let W = 0, Y = 0;
|
|
1117
|
+
return W = requestAnimationFrame(() => {
|
|
1092
1118
|
setTimeout(() => {
|
|
1093
1119
|
a.handlers.releaseHyperextensionOverscroll({ behavior: "smooth" });
|
|
1094
1120
|
}, 600);
|
|
1095
|
-
}),
|
|
1121
|
+
}), Y = requestAnimationFrame(() => {
|
|
1096
1122
|
a.handlers.scrollByAmount("bottom", br, !0);
|
|
1097
1123
|
}), () => {
|
|
1098
|
-
cancelAnimationFrame(
|
|
1124
|
+
cancelAnimationFrame(W), cancelAnimationFrame(Y);
|
|
1099
1125
|
};
|
|
1100
1126
|
}, [
|
|
1101
|
-
|
|
1102
|
-
|
|
1127
|
+
d.phase,
|
|
1128
|
+
d.phase === "success" ? d.bumpId : 0,
|
|
1103
1129
|
a.handlers
|
|
1104
1130
|
]);
|
|
1105
|
-
const
|
|
1106
|
-
h(
|
|
1107
|
-
},
|
|
1108
|
-
|
|
1131
|
+
const ee = (A) => {
|
|
1132
|
+
h(A);
|
|
1133
|
+
}, V = i.length > 0;
|
|
1134
|
+
Le(() => {
|
|
1109
1135
|
if (u.current && f.current) {
|
|
1110
|
-
const
|
|
1111
|
-
f.current.style.setProperty("height", `calc(100dvh - ${
|
|
1136
|
+
const A = u.current.clientHeight;
|
|
1137
|
+
f.current.style.setProperty("height", `calc(100dvh - ${A}px - 20px)`);
|
|
1112
1138
|
}
|
|
1113
|
-
}, [u?.current,
|
|
1114
|
-
const
|
|
1115
|
-
(
|
|
1116
|
-
), [
|
|
1117
|
-
activeTab:
|
|
1118
|
-
isLoading:
|
|
1119
|
-
notificationsLength:
|
|
1139
|
+
}, [u?.current, c]);
|
|
1140
|
+
const K = i.filter((A) => !A.read).length, { isLoading: R, type: P } = s, z = R && P === "load_more", { hasError: J, children: G } = l, X = ae(() => i?.filter(
|
|
1141
|
+
(A) => c === "NO_LEIDAS" ? !A.read : A
|
|
1142
|
+
), [i, c]), ne = ae(() => ({
|
|
1143
|
+
activeTab: c,
|
|
1144
|
+
isLoading: R,
|
|
1145
|
+
notificationsLength: i.length
|
|
1120
1146
|
// Añadir la longitud de las notificaciones como metadata
|
|
1121
|
-
}), [
|
|
1147
|
+
}), [c, R, i.length]), $ = ae(() => c !== "NO_LEIDAS", [c]), pe = a.state.hyperextensionActive.down, de = c === "NO_LEIDAS" ? "sync_unread" : "load_more", le = !z && (d.phase === "success" || d.phase === "empty");
|
|
1122
1148
|
return /* @__PURE__ */ e.jsx(
|
|
1123
1149
|
"section",
|
|
1124
1150
|
{
|
|
@@ -1136,32 +1162,32 @@ const mr = ({ type: t }) => {
|
|
|
1136
1162
|
Ut,
|
|
1137
1163
|
{
|
|
1138
1164
|
className: "px-4 md:px-2 md:pl-2 pl-2 gap-0 md:gap-0",
|
|
1139
|
-
onTabChange:
|
|
1140
|
-
activeTab:
|
|
1165
|
+
onTabChange: ee,
|
|
1166
|
+
activeTab: c,
|
|
1141
1167
|
items: [
|
|
1142
1168
|
{ id: "ALL", title: "Todas" },
|
|
1143
1169
|
{ id: "NO_LEIDAS", title: "Sin leer" }
|
|
1144
1170
|
],
|
|
1145
|
-
renderTab: (
|
|
1171
|
+
renderTab: (A, W, Y, ue, he, te, ie, oe) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1146
1172
|
/* @__PURE__ */ e.jsx(
|
|
1147
1173
|
Wt,
|
|
1148
1174
|
{
|
|
1149
|
-
id:
|
|
1150
|
-
title:
|
|
1151
|
-
onClick:
|
|
1152
|
-
isActive:
|
|
1153
|
-
onIconClick:
|
|
1154
|
-
onIconHover:
|
|
1155
|
-
iconTooltipProps:
|
|
1156
|
-
iconTooltipTitle:
|
|
1157
|
-
iconSize:
|
|
1175
|
+
id: A.id,
|
|
1176
|
+
title: A.title,
|
|
1177
|
+
onClick: Y,
|
|
1178
|
+
isActive: W,
|
|
1179
|
+
onIconClick: ue,
|
|
1180
|
+
onIconHover: he,
|
|
1181
|
+
iconTooltipProps: ie,
|
|
1182
|
+
iconTooltipTitle: te,
|
|
1183
|
+
iconSize: oe
|
|
1158
1184
|
}
|
|
1159
1185
|
),
|
|
1160
|
-
|
|
1186
|
+
K > 0 && A.id === "NO_LEIDAS" && /* @__PURE__ */ e.jsx(He, { count: K, maxCount: 99, className: "absolute top-1 -right-1" })
|
|
1161
1187
|
] })
|
|
1162
1188
|
}
|
|
1163
1189
|
),
|
|
1164
|
-
r &&
|
|
1190
|
+
r && V && c === "NO_LEIDAS" && !J && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(Ee, { disabled: R || K === 0, onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
|
|
1165
1191
|
] }),
|
|
1166
1192
|
/* @__PURE__ */ e.jsxs(
|
|
1167
1193
|
"div",
|
|
@@ -1178,29 +1204,29 @@ const mr = ({ type: t }) => {
|
|
|
1178
1204
|
scrollbarProps: { hide: !0, size: "small" },
|
|
1179
1205
|
axis: "y",
|
|
1180
1206
|
disableMouseScroll: !1,
|
|
1181
|
-
scrollMetadata:
|
|
1207
|
+
scrollMetadata: ne,
|
|
1182
1208
|
scrollTopButton: {
|
|
1183
1209
|
target: "2000px"
|
|
1184
1210
|
},
|
|
1185
|
-
|
|
1211
|
+
...$ ? {
|
|
1186
1212
|
hyperExtensionBottomSlot: () => /* @__PURE__ */ e.jsx(
|
|
1187
1213
|
fr,
|
|
1188
1214
|
{
|
|
1189
|
-
action:
|
|
1190
|
-
activeTab:
|
|
1191
|
-
isLoadMorePending:
|
|
1192
|
-
isHyperDown:
|
|
1193
|
-
feedback:
|
|
1194
|
-
showSummaryInSlot:
|
|
1215
|
+
action: de,
|
|
1216
|
+
activeTab: c,
|
|
1217
|
+
isLoadMorePending: z,
|
|
1218
|
+
isHyperDown: pe,
|
|
1219
|
+
feedback: d,
|
|
1220
|
+
showSummaryInSlot: le
|
|
1195
1221
|
}
|
|
1196
1222
|
)
|
|
1197
1223
|
} : {},
|
|
1198
1224
|
children: [
|
|
1199
|
-
|
|
1200
|
-
!
|
|
1201
|
-
/* @__PURE__ */ e.jsx(zt, { ...
|
|
1225
|
+
J && /* @__PURE__ */ e.jsx("div", { className: "w-full h-full grid place-items-center", children: typeof G == "function" ? G() : G }),
|
|
1226
|
+
!J && R && P === "skeletons" ? /* @__PURE__ */ e.jsx(mr, { type: P }) : V ? X?.map((A) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1227
|
+
/* @__PURE__ */ e.jsx(zt, { ...A, className: "mt-2" }),
|
|
1202
1228
|
/* @__PURE__ */ e.jsx("div", { className: "h-0 mt-2 w-full border-b border-neutral-strong-default" })
|
|
1203
|
-
] },
|
|
1229
|
+
] }, A._id)) : /* @__PURE__ */ e.jsx("p", { className: "flex-0 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" })
|
|
1204
1230
|
]
|
|
1205
1231
|
}
|
|
1206
1232
|
),
|
|
@@ -1208,17 +1234,17 @@ const mr = ({ type: t }) => {
|
|
|
1208
1234
|
"div",
|
|
1209
1235
|
{
|
|
1210
1236
|
role: "status",
|
|
1211
|
-
className:
|
|
1237
|
+
className: L(
|
|
1212
1238
|
"absolute bottom-0 left-px w-[calc(100%-1px)] mx-auto shrink-0 from-(--neutral-800) to-transparent bg-linear-to-t px-4 py-2 text-center z-30",
|
|
1213
1239
|
"transition-opacity duration-300",
|
|
1214
|
-
|
|
1240
|
+
le || z ? "opacity-100" : "opacity-0"
|
|
1215
1241
|
),
|
|
1216
1242
|
children: [
|
|
1217
|
-
|
|
1243
|
+
z && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
|
|
1218
1244
|
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-medium text-neutral-strong-default", children: "Cargando más notificaciones" }),
|
|
1219
1245
|
/* @__PURE__ */ e.jsx(Ht, { variant: "dot", size: "small", color: "var(--neutral-200)", className: "*:size-[3px]", speedMultiplier: 0.9 })
|
|
1220
1246
|
] }),
|
|
1221
|
-
|
|
1247
|
+
d.phase === "empty" && /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-medium text-neutral-medium-default", children: "No se agregaron notificaciones nuevas" })
|
|
1222
1248
|
]
|
|
1223
1249
|
}
|
|
1224
1250
|
)
|
|
@@ -1229,119 +1255,119 @@ const mr = ({ type: t }) => {
|
|
|
1229
1255
|
}
|
|
1230
1256
|
);
|
|
1231
1257
|
}, gr = (t) => {
|
|
1232
|
-
const { notificationsListControls: r } = t, [s, l] =
|
|
1233
|
-
|
|
1258
|
+
const { notificationsListControls: r } = t, [s, l] = U([]), [i, a] = U({ isLoading: !1, type: "load_more" }), [c, h] = U({ hasError: !1 }), [u, f] = U(!0), d = k(/* @__PURE__ */ new Set());
|
|
1259
|
+
H(() => {
|
|
1234
1260
|
u || setTimeout(() => {
|
|
1235
1261
|
f(!0);
|
|
1236
1262
|
}, 4e3);
|
|
1237
1263
|
}, [u]);
|
|
1238
|
-
const m = x((
|
|
1239
|
-
l((
|
|
1240
|
-
const b = Array.isArray(
|
|
1264
|
+
const m = x((S, y = "top") => {
|
|
1265
|
+
l((D) => {
|
|
1266
|
+
const b = Array.isArray(S) ? y === "bottom" ? [...D, ...S] : [...S, ...D] : y === "bottom" ? [...D, S] : [S, ...D];
|
|
1241
1267
|
return queueMicrotask(() => {
|
|
1242
|
-
|
|
1268
|
+
d.current.forEach((O) => O(b, { total: b.length, unread: b.filter((q) => !q.read).length }));
|
|
1243
1269
|
}), b;
|
|
1244
1270
|
});
|
|
1245
|
-
}, []), g = x((
|
|
1246
|
-
|
|
1247
|
-
}), []),
|
|
1271
|
+
}, []), g = x((S) => (d.current.add(S), () => {
|
|
1272
|
+
d.current.delete(S);
|
|
1273
|
+
}), []), N = x((S) => {
|
|
1248
1274
|
l((y) => {
|
|
1249
|
-
const
|
|
1275
|
+
const D = Array.isArray(S) ? y.filter((b) => !S.includes(b._id)) : y.filter((b) => b._id !== S);
|
|
1250
1276
|
return queueMicrotask(() => {
|
|
1251
|
-
|
|
1252
|
-
}),
|
|
1277
|
+
d.current.forEach((b) => b(D, { total: D.length, unread: D.filter((O) => !O.read).length }));
|
|
1278
|
+
}), D;
|
|
1253
1279
|
});
|
|
1254
|
-
}, []),
|
|
1280
|
+
}, []), j = x(() => {
|
|
1255
1281
|
l([]), queueMicrotask(() => {
|
|
1256
|
-
|
|
1282
|
+
d.current.forEach((S) => S([], { total: 0, unread: 0 }));
|
|
1257
1283
|
});
|
|
1258
|
-
}, []), p = x((
|
|
1259
|
-
const y = Array.isArray(
|
|
1284
|
+
}, []), p = x((S) => {
|
|
1285
|
+
const y = Array.isArray(S) ? S : S(s);
|
|
1260
1286
|
l(y), queueMicrotask(() => {
|
|
1261
|
-
|
|
1287
|
+
d.current.forEach((D) => D(y, { total: y.length, unread: y.filter((b) => !b.read).length }));
|
|
1262
1288
|
});
|
|
1263
|
-
}, []),
|
|
1264
|
-
a({ isLoading:
|
|
1265
|
-
}, []),
|
|
1266
|
-
h({ hasError:
|
|
1289
|
+
}, []), I = x((S, y = "load_more") => {
|
|
1290
|
+
a({ isLoading: S, type: y });
|
|
1291
|
+
}, []), C = x((S, y) => {
|
|
1292
|
+
h({ hasError: S, children: y });
|
|
1267
1293
|
}, []);
|
|
1268
1294
|
return Te(r, () => ({
|
|
1269
1295
|
addNewNotification: m,
|
|
1270
1296
|
subscribeToUpdates: g,
|
|
1271
1297
|
setNotifications: p,
|
|
1272
|
-
removeNotification:
|
|
1273
|
-
removeAllNotifications:
|
|
1274
|
-
setLoading:
|
|
1275
|
-
setError:
|
|
1298
|
+
removeNotification: N,
|
|
1299
|
+
removeAllNotifications: j,
|
|
1300
|
+
setLoading: I,
|
|
1301
|
+
setError: C,
|
|
1276
1302
|
setHasNextPage: f
|
|
1277
|
-
}), [m, g, p,
|
|
1303
|
+
}), [m, g, p, N, j, I, C, f]), {
|
|
1278
1304
|
notifications: s,
|
|
1279
|
-
loadingState:
|
|
1280
|
-
errorState:
|
|
1305
|
+
loadingState: i,
|
|
1306
|
+
errorState: c,
|
|
1281
1307
|
hasNextPage: u
|
|
1282
1308
|
};
|
|
1283
|
-
}, yr = ({ closeSidebar: t, options: r, helpSection: s, initialSection: l, notificationsListControls:
|
|
1284
|
-
const [h, u] =
|
|
1285
|
-
|
|
1286
|
-
const
|
|
1309
|
+
}, yr = ({ closeSidebar: t, options: r, helpSection: s, initialSection: l, notificationsListControls: i, scrollableControls: a, navigationControls: c }) => {
|
|
1310
|
+
const [h, u] = U(l ?? "notifications");
|
|
1311
|
+
H(() => {
|
|
1312
|
+
const j = c?.current?.subscribeToSection?.(u);
|
|
1287
1313
|
return () => {
|
|
1288
|
-
|
|
1314
|
+
j?.();
|
|
1289
1315
|
};
|
|
1290
|
-
}, [
|
|
1316
|
+
}, [c]);
|
|
1291
1317
|
const f = () => {
|
|
1292
1318
|
t();
|
|
1293
|
-
}, { notifications:
|
|
1319
|
+
}, { notifications: d, loadingState: m, errorState: g } = gr({ notificationsListControls: i }), N = Ft({ scrollTopButton: { target: "2000px" } });
|
|
1294
1320
|
return Te(a, () => ({
|
|
1295
|
-
subscribeToScrollTarget:
|
|
1296
|
-
subscribeToHyperextension:
|
|
1297
|
-
releaseHyperextensionOverscroll:
|
|
1298
|
-
}), [
|
|
1321
|
+
subscribeToScrollTarget: N.handlers.subscribeToScrollTarget,
|
|
1322
|
+
subscribeToHyperextension: N.handlers.subscribeToHyperextension,
|
|
1323
|
+
releaseHyperextensionOverscroll: N.handlers.releaseHyperextensionOverscroll
|
|
1324
|
+
}), [N]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1299
1325
|
h === "notifications" && !r?.notificationsDrawerOptions?.hide && /* @__PURE__ */ e.jsx(
|
|
1300
1326
|
xr,
|
|
1301
1327
|
{
|
|
1302
1328
|
onCloseClick: f,
|
|
1303
1329
|
onMarkAllAsRead: r?.notificationsDrawerOptions?.onMarkAllAsRead,
|
|
1304
|
-
notifications:
|
|
1330
|
+
notifications: d,
|
|
1305
1331
|
loadingState: m,
|
|
1306
1332
|
errorState: g,
|
|
1307
|
-
scrollableState:
|
|
1333
|
+
scrollableState: N
|
|
1308
1334
|
}
|
|
1309
1335
|
),
|
|
1310
1336
|
h === "help" && s && !r?.helpSectionDrawerOptions?.hide && /* @__PURE__ */ e.jsx(cr, { onCloseClick: f, children: typeof s == "function" ? s() : s })
|
|
1311
1337
|
] });
|
|
1312
|
-
}, it =
|
|
1338
|
+
}, it = me(yr);
|
|
1313
1339
|
it.displayName = "SidebarContent";
|
|
1314
1340
|
const wr = ({
|
|
1315
1341
|
options: t,
|
|
1316
1342
|
helpSection: r,
|
|
1317
1343
|
initialSectionRef: s,
|
|
1318
1344
|
notificationsListControls: l,
|
|
1319
|
-
scrollableControls:
|
|
1345
|
+
scrollableControls: i,
|
|
1320
1346
|
navigationControls: a
|
|
1321
1347
|
}) => {
|
|
1322
|
-
const { closeSidebar:
|
|
1348
|
+
const { closeSidebar: c } = ce();
|
|
1323
1349
|
return /* @__PURE__ */ e.jsx(
|
|
1324
1350
|
it,
|
|
1325
1351
|
{
|
|
1326
|
-
closeSidebar:
|
|
1352
|
+
closeSidebar: c,
|
|
1327
1353
|
options: t,
|
|
1328
1354
|
helpSection: r,
|
|
1329
1355
|
initialSection: s.current,
|
|
1330
1356
|
notificationsListControls: l,
|
|
1331
|
-
scrollableControls:
|
|
1357
|
+
scrollableControls: i,
|
|
1332
1358
|
navigationControls: a
|
|
1333
1359
|
}
|
|
1334
1360
|
);
|
|
1335
|
-
}, ct =
|
|
1361
|
+
}, ct = M(wr);
|
|
1336
1362
|
ct.displayName = "PyrionLayout.Sidebar";
|
|
1337
1363
|
const vr = ({ navigationControlsRef: t }) => {
|
|
1338
|
-
const r =
|
|
1364
|
+
const r = ce();
|
|
1339
1365
|
return t.current.toggleCollapse = r.toggleCollapse, t.current.toggleDrawer = r.toggleDrawer, t.current.closeDrawer = r.closeDrawer, t.current.openDrawer = r.openDrawer, 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;
|
|
1340
1366
|
}, Nr = (t) => {
|
|
1341
|
-
const { children: r, currentAppSessions: s, resolveUserSecondarySlot: l, resolveSessionSecondarySlot:
|
|
1342
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1367
|
+
const { children: r, currentAppSessions: s, resolveUserSecondarySlot: l, resolveSessionSecondarySlot: i, handleNavigation: a, allActions: c, tabs: h, navigationControlsRef: u, initialSectionRef: f, userOptionsControls: d, mobileAppSwitcherControls: m, notificationsListControls: g, scrollableControls: N, outletRef: j, ...p } = t;
|
|
1368
|
+
return /* @__PURE__ */ e.jsxs(Z, { disableDragOpen: p.options?.disableDragOpen, outletRef: j, defaultCollapsedState: p.options?.defaultCollapsedState, children: [
|
|
1343
1369
|
/* @__PURE__ */ e.jsx(vr, { navigationControlsRef: u }),
|
|
1344
|
-
/* @__PURE__ */ e.jsx(
|
|
1370
|
+
/* @__PURE__ */ e.jsx(Z.LeftSlot, { children: /* @__PURE__ */ e.jsx(
|
|
1345
1371
|
qt,
|
|
1346
1372
|
{
|
|
1347
1373
|
className: "",
|
|
@@ -1352,7 +1378,7 @@ const vr = ({ navigationControlsRef: t }) => {
|
|
|
1352
1378
|
isLoading: !p.state.enabled_systems || p.state.enabled_systems.length === 0
|
|
1353
1379
|
}
|
|
1354
1380
|
) }),
|
|
1355
|
-
/* @__PURE__ */ e.jsx(
|
|
1381
|
+
/* @__PURE__ */ e.jsx(Z.Header, { className: "flex flex-col relative w-full select-none", children: /* @__PURE__ */ e.jsx(
|
|
1356
1382
|
lt,
|
|
1357
1383
|
{
|
|
1358
1384
|
onSystemLogoClick: p.onSystemLogoClick,
|
|
@@ -1360,37 +1386,37 @@ const vr = ({ navigationControlsRef: t }) => {
|
|
|
1360
1386
|
currentSystemId: p.currentSystemId
|
|
1361
1387
|
}
|
|
1362
1388
|
) }, "PL-Header"),
|
|
1363
|
-
/* @__PURE__ */ e.jsx(
|
|
1389
|
+
/* @__PURE__ */ e.jsx(Z.Content, { className: "overflow-hidden flex flex-col relative flex-1 md:w-auto", children: /* @__PURE__ */ e.jsx(
|
|
1364
1390
|
nt,
|
|
1365
1391
|
{
|
|
1366
1392
|
navlinks: p.links,
|
|
1367
1393
|
handleNavigation: a,
|
|
1368
|
-
allActions:
|
|
1394
|
+
allActions: c,
|
|
1369
1395
|
activeActionId: p.activeActionId,
|
|
1370
1396
|
initialSectionRef: f,
|
|
1371
1397
|
navigationControlsRef: u,
|
|
1372
1398
|
onActionClick: p.onActionClick
|
|
1373
1399
|
}
|
|
1374
1400
|
) }, "PL-Content"),
|
|
1375
|
-
/* @__PURE__ */ e.jsx(
|
|
1401
|
+
/* @__PURE__ */ e.jsx(Z.Footer, { className: "md:min-h-max flex flex-col w-full overflow-hidden max-w-full", children: /* @__PURE__ */ e.jsx(
|
|
1376
1402
|
ot,
|
|
1377
1403
|
{
|
|
1378
1404
|
state: p.state,
|
|
1379
1405
|
currentAppSessions: s,
|
|
1380
1406
|
resolveUserSecondarySlot: l,
|
|
1381
|
-
resolveSessionSecondarySlot:
|
|
1407
|
+
resolveSessionSecondarySlot: i,
|
|
1382
1408
|
onSessionClick: p.onSessionClick,
|
|
1383
1409
|
onLogoutClick: p.onLogoutClick,
|
|
1384
1410
|
options: p.options,
|
|
1385
1411
|
currentSystemId: p.currentSystemId,
|
|
1386
|
-
userOptionsControls:
|
|
1412
|
+
userOptionsControls: d,
|
|
1387
1413
|
mobileAppSwitcherControls: m,
|
|
1388
1414
|
onProfileClick: p.onProfileClick
|
|
1389
1415
|
}
|
|
1390
1416
|
) }, "PL-Footer"),
|
|
1391
|
-
/* @__PURE__ */ e.jsx(
|
|
1417
|
+
/* @__PURE__ */ e.jsx(Z.Outlet, { className: " *:prometeo-scrollbar-thin!", children: /* @__PURE__ */ e.jsx(ut, { children: r }) }),
|
|
1392
1418
|
/* @__PURE__ */ e.jsx(
|
|
1393
|
-
|
|
1419
|
+
Z.Sidebar,
|
|
1394
1420
|
{
|
|
1395
1421
|
className: "bg-neutral-default-default pyrion-layout-sidebar",
|
|
1396
1422
|
modal: p.options?.sidebarOptions?.modal,
|
|
@@ -1403,189 +1429,189 @@ const vr = ({ navigationControlsRef: t }) => {
|
|
|
1403
1429
|
helpSection: p.helpSection,
|
|
1404
1430
|
initialSectionRef: f,
|
|
1405
1431
|
notificationsListControls: g,
|
|
1406
|
-
scrollableControls:
|
|
1432
|
+
scrollableControls: N,
|
|
1407
1433
|
navigationControls: u
|
|
1408
1434
|
}
|
|
1409
1435
|
)
|
|
1410
1436
|
}
|
|
1411
1437
|
)
|
|
1412
1438
|
] });
|
|
1413
|
-
}, dt =
|
|
1414
|
-
const { children: s, ...l } = t, { children:
|
|
1415
|
-
if (
|
|
1439
|
+
}, dt = M(Nr, (t, r) => {
|
|
1440
|
+
const { children: s, ...l } = t, { children: i, ...a } = r, c = Object.keys(l), h = Object.keys(a);
|
|
1441
|
+
if (c.length !== h.length)
|
|
1416
1442
|
return !1;
|
|
1417
|
-
for (const u of
|
|
1443
|
+
for (const u of c) {
|
|
1418
1444
|
if (!Object.prototype.hasOwnProperty.call(a, u))
|
|
1419
1445
|
return !1;
|
|
1420
|
-
const f = l[u],
|
|
1421
|
-
if (f !==
|
|
1446
|
+
const f = l[u], d = a[u];
|
|
1447
|
+
if (f !== d)
|
|
1422
1448
|
return !1;
|
|
1423
1449
|
}
|
|
1424
1450
|
return !0;
|
|
1425
1451
|
});
|
|
1426
1452
|
dt.displayName = "PyrionNavigationDrawer.LayoutBase";
|
|
1427
|
-
const ut =
|
|
1453
|
+
const ut = M(({ children: t }) => /* @__PURE__ */ e.jsx(Z.Outlet, { children: t }));
|
|
1428
1454
|
ut.displayName = "PyrionNavigationDrawer.IsolatedOutlet";
|
|
1429
|
-
const ft =
|
|
1455
|
+
const ft = Ae(null), Xr = () => {
|
|
1430
1456
|
const t = Et(ft);
|
|
1431
1457
|
if (!t)
|
|
1432
1458
|
throw new Error("usePyrionLayout debe usarse dentro de PyrionLayout");
|
|
1433
1459
|
return t;
|
|
1434
|
-
}, Yr = ({ children: t, helpSection: r, state: s, links: l, onLinkClick:
|
|
1435
|
-
const
|
|
1460
|
+
}, Yr = ({ children: t, helpSection: r, state: s, links: l, onLinkClick: i, onNavigate: a, onLogoutClick: c, actions: h, activeActionId: u, onActionClick: f, tabsProps: d, currentSystemId: m, onSessionClick: g, onSystemLogoClick: N, onProfileClick: j, ...p }) => {
|
|
1461
|
+
const C = Object.assign({
|
|
1436
1462
|
closeDrawerOnNavigate: !0,
|
|
1437
1463
|
disableDragOpen: {
|
|
1438
1464
|
sidebar: !0,
|
|
1439
1465
|
drawer: !1
|
|
1440
1466
|
}
|
|
1441
|
-
}, p.options),
|
|
1467
|
+
}, p.options), S = Tt(), y = k(null), D = k(null), b = k({}), O = k("notifications"), q = k(/* @__PURE__ */ new Set()), F = k(null), ee = k(null), V = k(null), [K, R] = U({ total: 0, unread: 0 }), [P, z] = U(!1), [J, G] = U(null), X = x((n) => {
|
|
1442
1468
|
if (!(!n || typeof window > "u")) {
|
|
1443
|
-
if (
|
|
1444
|
-
|
|
1469
|
+
if (i) {
|
|
1470
|
+
i(n);
|
|
1445
1471
|
return;
|
|
1446
1472
|
}
|
|
1447
1473
|
window.history.pushState({}, "", n), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
1448
1474
|
}
|
|
1449
|
-
}, [
|
|
1450
|
-
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
}, [
|
|
1475
|
+
}, [i]), ne = x((n) => {
|
|
1476
|
+
z(!1);
|
|
1477
|
+
const v = window.location.pathname;
|
|
1478
|
+
X(n), C.closeDrawerOnNavigate && It() && !b.current?.getIsCollapsed?.() && b.current?.toggleCollapse?.(), a && a(v, n);
|
|
1479
|
+
}, [X, a, C.closeDrawerOnNavigate]), $ = (n) => {
|
|
1454
1480
|
n && window.open(n, "_blank");
|
|
1455
|
-
},
|
|
1481
|
+
}, pe = (n) => {
|
|
1456
1482
|
typeof window < "u" && n && (window.location.href = n);
|
|
1457
|
-
},
|
|
1458
|
-
n &&
|
|
1459
|
-
}, [
|
|
1483
|
+
}, de = x((n) => {
|
|
1484
|
+
n && X(n);
|
|
1485
|
+
}, [X]), le = {
|
|
1460
1486
|
system: {
|
|
1461
1487
|
mobile: {
|
|
1462
|
-
internal:
|
|
1463
|
-
external:
|
|
1488
|
+
internal: de,
|
|
1489
|
+
external: pe
|
|
1464
1490
|
},
|
|
1465
1491
|
desktop: {
|
|
1466
|
-
internal:
|
|
1467
|
-
external:
|
|
1492
|
+
internal: de,
|
|
1493
|
+
external: $
|
|
1468
1494
|
}
|
|
1469
1495
|
},
|
|
1470
1496
|
product: {
|
|
1471
|
-
mobile:
|
|
1472
|
-
desktop:
|
|
1497
|
+
mobile: $,
|
|
1498
|
+
desktop: $
|
|
1473
1499
|
}
|
|
1474
|
-
},
|
|
1500
|
+
}, A = x((n) => {
|
|
1475
1501
|
if (n)
|
|
1476
1502
|
try {
|
|
1477
|
-
const
|
|
1478
|
-
return `${
|
|
1503
|
+
const v = typeof window < "u" ? window.location.origin : "http://localhost", _ = new URL(n, v);
|
|
1504
|
+
return `${_.pathname}${_.search}${_.hash}`;
|
|
1479
1505
|
} catch {
|
|
1480
1506
|
return;
|
|
1481
1507
|
}
|
|
1482
|
-
}, []),
|
|
1483
|
-
const
|
|
1484
|
-
internal:
|
|
1485
|
-
external:
|
|
1508
|
+
}, []), W = x((n) => {
|
|
1509
|
+
const v = S ? "mobile" : "desktop", _ = s.enabled_systems.find((ye) => ye.name === n), T = _?._id === m ? "internal" : "external", Q = {
|
|
1510
|
+
internal: A(_?.url),
|
|
1511
|
+
external: _?.url
|
|
1486
1512
|
};
|
|
1487
|
-
le.system[
|
|
1488
|
-
}, [m,
|
|
1489
|
-
const
|
|
1490
|
-
le.product[
|
|
1491
|
-
}, [
|
|
1492
|
-
if (
|
|
1493
|
-
|
|
1513
|
+
le.system[v][T](Q[T]), d?.onTabClick?.(n);
|
|
1514
|
+
}, [m, A, S, s.enabled_systems, d?.onTabClick]), Y = x((n) => {
|
|
1515
|
+
const v = S ? "mobile" : "desktop", _ = s.company.products?.find((T) => T.name === n)?.domain;
|
|
1516
|
+
le.product[v](_), d?.onTabClick?.(n);
|
|
1517
|
+
}, [S, s.company.products, d?.onTabClick]), ue = x((n, v) => {
|
|
1518
|
+
if (v) {
|
|
1519
|
+
v(n), d?.onTabClick?.(n);
|
|
1494
1520
|
return;
|
|
1495
1521
|
} else
|
|
1496
|
-
|
|
1497
|
-
}, [
|
|
1522
|
+
d?.onTabClick?.(n);
|
|
1523
|
+
}, [d?.onTabClick]), he = x(() => {
|
|
1498
1524
|
const n = {};
|
|
1499
|
-
s.enabled_systems.forEach((
|
|
1500
|
-
n[
|
|
1525
|
+
s.enabled_systems.forEach((_) => {
|
|
1526
|
+
n[_.url] = _.name;
|
|
1501
1527
|
});
|
|
1502
|
-
const
|
|
1503
|
-
for (const [
|
|
1504
|
-
if (
|
|
1528
|
+
const v = window.location.origin;
|
|
1529
|
+
for (const [_, T] of Object.entries(n))
|
|
1530
|
+
if (v === _)
|
|
1505
1531
|
return T;
|
|
1506
1532
|
return "";
|
|
1507
|
-
}, [s.enabled_systems]),
|
|
1533
|
+
}, [s.enabled_systems]), te = d?.currentTabName || he(), ie = ae(
|
|
1508
1534
|
() => s.sessions || [],
|
|
1509
1535
|
[s.sessions]
|
|
1510
|
-
),
|
|
1536
|
+
), oe = (n) => n == null ? null : typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? String(n) : be(n) ? n : typeof n == "object" ? JSON.stringify(n) : null, o = x((n, v) => {
|
|
1511
1537
|
if (!n) return null;
|
|
1512
1538
|
if (Array.isArray(n)) {
|
|
1513
|
-
const
|
|
1539
|
+
const _ = n?.[0] ? we(v, n[0]) : null, T = n?.[1] ? we(v, n[1]) : null, Q = oe(_), ye = oe(T);
|
|
1514
1540
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1515
|
-
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default overflow-hidden truncate", children:
|
|
1516
|
-
|
|
1541
|
+
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default overflow-hidden truncate", children: Q }),
|
|
1542
|
+
ye && /* @__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: [
|
|
1517
1543
|
/* @__PURE__ */ e.jsx("span", { className: "size-0.5 bg-(--neutral-300) rounded-full" }),
|
|
1518
|
-
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis", children:
|
|
1544
|
+
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-body-small text-neutral-default-default line-clamp-1 whitespace-pre text-ellipsis", children: ye })
|
|
1519
1545
|
] })
|
|
1520
1546
|
] });
|
|
1521
1547
|
}
|
|
1522
1548
|
if (typeof n == "string") {
|
|
1523
|
-
const
|
|
1524
|
-
return
|
|
1549
|
+
const _ = we(v, n);
|
|
1550
|
+
return oe(_);
|
|
1525
1551
|
}
|
|
1526
|
-
return typeof n == "function" ?
|
|
1552
|
+
return typeof n == "function" ? oe(n(v)) : null;
|
|
1527
1553
|
}, []), w = x(
|
|
1528
1554
|
(n) => {
|
|
1529
|
-
const
|
|
1530
|
-
if (!
|
|
1531
|
-
const
|
|
1532
|
-
return o(
|
|
1555
|
+
const v = C?.userCardOptions?.secondarySlot;
|
|
1556
|
+
if (!v) return null;
|
|
1557
|
+
const _ = s.enabled_systems?.find((Q) => Q._id === m), T = { company: s.company, user: s.user, system: _, metadata: n };
|
|
1558
|
+
return o(v, T);
|
|
1533
1559
|
},
|
|
1534
|
-
[m,
|
|
1535
|
-
),
|
|
1560
|
+
[m, C?.userCardOptions?.secondarySlot, o, s.company, s.enabled_systems, s.user]
|
|
1561
|
+
), E = x(
|
|
1536
1562
|
(n) => {
|
|
1537
|
-
const
|
|
1538
|
-
if (!
|
|
1539
|
-
const
|
|
1540
|
-
return o(
|
|
1563
|
+
const v = C?.sessionCardOptions?.secondarySlot || C?.userCardOptions?.secondarySlot;
|
|
1564
|
+
if (!v) return null;
|
|
1565
|
+
const _ = s.enabled_systems?.find((Q) => Q._id === m), T = { company: s.company, user: n.auth_id, metadata: n?.metadata, system: _ };
|
|
1566
|
+
return o(v, T);
|
|
1541
1567
|
},
|
|
1542
|
-
[m,
|
|
1543
|
-
),
|
|
1568
|
+
[m, C?.sessionCardOptions?.secondarySlot, C?.userCardOptions?.secondarySlot, o, s.company, s.enabled_systems]
|
|
1569
|
+
), B = ae(() => {
|
|
1544
1570
|
const n = [];
|
|
1545
1571
|
return b.current.openNotifications = () => {
|
|
1546
|
-
|
|
1572
|
+
O.current = "notifications", q.current.forEach((v) => v("notifications")), b.current.openSidebar?.();
|
|
1547
1573
|
}, b.current.openHelp = () => {
|
|
1548
|
-
|
|
1549
|
-
}, !
|
|
1574
|
+
O.current = "help", q.current.forEach((v) => v("help")), b.current.openSidebar?.();
|
|
1575
|
+
}, !C?.notificationsDrawerOptions?.hideActionButton && !C?.notificationsDrawerOptions?.hide && n.push({
|
|
1550
1576
|
id: "notifications",
|
|
1551
1577
|
title: "Notificaciones",
|
|
1552
1578
|
icon: $e,
|
|
1553
1579
|
onClick: b.current.openNotifications,
|
|
1554
|
-
count:
|
|
1580
|
+
count: K.unread,
|
|
1555
1581
|
className: "default-action-notifications"
|
|
1556
|
-
}), !
|
|
1582
|
+
}), !C?.helpSectionDrawerOptions?.hideActionButton && r && !C?.helpSectionDrawerOptions?.hide && n.push({
|
|
1557
1583
|
id: "help",
|
|
1558
1584
|
title: "Ayuda",
|
|
1559
1585
|
icon: qe,
|
|
1560
1586
|
onClick: b.current.openHelp,
|
|
1561
1587
|
className: "default-action-help"
|
|
1562
|
-
}),
|
|
1588
|
+
}), C?.configurationActionOptions?.onClick && !C?.configurationActionOptions?.hideActionButton && n.push({
|
|
1563
1589
|
id: "configuration",
|
|
1564
1590
|
title: "Configuracion",
|
|
1565
1591
|
icon: Vt,
|
|
1566
|
-
onClick: () =>
|
|
1592
|
+
onClick: () => C.configurationActionOptions?.onClick?.(b.current),
|
|
1567
1593
|
className: "default-action-configuration"
|
|
1568
1594
|
}), n;
|
|
1569
|
-
}, [
|
|
1570
|
-
() => [...
|
|
1571
|
-
[
|
|
1572
|
-
),
|
|
1595
|
+
}, [C, r, f, K]), re = ae(
|
|
1596
|
+
() => [...B, ...h || []],
|
|
1597
|
+
[B, h]
|
|
1598
|
+
), se = ae(() => {
|
|
1573
1599
|
const n = s.enabled_systems.map((T) => ({
|
|
1574
1600
|
name: T.name,
|
|
1575
1601
|
thumbnail: T.thumbnail,
|
|
1576
|
-
onClick:
|
|
1602
|
+
onClick: W,
|
|
1577
1603
|
id: T._id
|
|
1578
|
-
})) || [],
|
|
1604
|
+
})) || [], v = d?.customTabs?.map((T) => ({
|
|
1579
1605
|
...T,
|
|
1580
|
-
onClick: () =>
|
|
1581
|
-
})) || [],
|
|
1606
|
+
onClick: () => ue(T.name, T?.onClick)
|
|
1607
|
+
})) || [], _ = s.company.products?.map((T) => ({
|
|
1582
1608
|
name: T.name,
|
|
1583
1609
|
thumbnail: T.thumbnail,
|
|
1584
|
-
onClick:
|
|
1610
|
+
onClick: Y
|
|
1585
1611
|
})) || [];
|
|
1586
|
-
return [...n, ...
|
|
1587
|
-
}, [
|
|
1588
|
-
y.current?.addNewNotification ? y.current.addNewNotification(n,
|
|
1612
|
+
return [...n, ...v, ..._];
|
|
1613
|
+
}, [ue, Y, W, s.enabled_systems, s.company.products, d?.customTabs]), Se = x((n, v) => {
|
|
1614
|
+
y.current?.addNewNotification ? y.current.addNewNotification(n, v) : console.warn("Notifications controls not ready yet");
|
|
1589
1615
|
}, []), Ce = x((n) => y.current?.subscribeToUpdates ? y.current.subscribeToUpdates(n) : (console.warn("Notifications controls not ready yet"), () => {
|
|
1590
1616
|
}), []), mt = x((n) => {
|
|
1591
1617
|
y.current?.removeNotification ? y.current.removeNotification(n) : console.warn("Notifications controls not ready yet");
|
|
@@ -1593,70 +1619,70 @@ const ft = Le(null), Xr = () => {
|
|
|
1593
1619
|
y.current?.removeAllNotifications ? y.current.removeAllNotifications() : console.warn("Notifications controls not ready yet");
|
|
1594
1620
|
}, []), ht = x((n) => {
|
|
1595
1621
|
y.current?.setNotifications ? y.current.setNotifications(n) : console.warn("Notifications controls not ready yet");
|
|
1596
|
-
}, []), bt = x((n,
|
|
1597
|
-
}), []), xt = x((n,
|
|
1598
|
-
}), []), gt = x((n) => (
|
|
1599
|
-
y.current?.setLoading ? y.current.setLoading(n,
|
|
1600
|
-
}, []), wt = x((n,
|
|
1601
|
-
y.current?.setError ? y.current.setError(n,
|
|
1622
|
+
}, []), bt = x((n, v) => D.current?.subscribeToScrollTarget ? D.current.subscribeToScrollTarget(n, v) : (console.warn("Scrollable controls not ready yet"), () => {
|
|
1623
|
+
}), []), xt = x((n, v) => D.current?.subscribeToHyperextension ? D.current.subscribeToHyperextension(n, v) : (console.warn("Scrollable hyperextension controls not ready yet"), () => {
|
|
1624
|
+
}), []), gt = x((n) => (q.current.add(n), () => q.current.delete(n)), []), yt = x((n, v = "load_more") => {
|
|
1625
|
+
y.current?.setLoading ? y.current.setLoading(n, v) : console.warn("Notifications controls not ready yet");
|
|
1626
|
+
}, []), wt = x((n, v) => {
|
|
1627
|
+
y.current?.setError ? y.current.setError(n, v) : console.warn("Notifications controls not ready yet");
|
|
1602
1628
|
}, []), vt = x((n) => {
|
|
1603
1629
|
y.current?.setHasNextPage ? y.current.setHasNextPage(n) : console.warn("Notifications controls not ready yet");
|
|
1604
1630
|
}, []), Nt = x(() => {
|
|
1605
|
-
|
|
1631
|
+
F.current?.open();
|
|
1606
1632
|
}, []), St = x(() => {
|
|
1607
|
-
|
|
1633
|
+
F.current?.close();
|
|
1608
1634
|
}, []), Ct = x(() => {
|
|
1609
|
-
|
|
1610
|
-
}, []), jt = x((n,
|
|
1611
|
-
const T = /* @__PURE__ */ e.jsxs("div", { className:
|
|
1612
|
-
!
|
|
1635
|
+
F.current?.toggle();
|
|
1636
|
+
}, []), jt = x((n, v, _) => {
|
|
1637
|
+
const T = /* @__PURE__ */ e.jsxs("div", { className: L(" bg-black/60 z-100 inset-0 h-full w-full grid place-items-center text-neutral-default-default", v ? "fixed" : "sticky"), children: [
|
|
1638
|
+
!_ && /* @__PURE__ */ e.jsx(Ee, { label: "", icon: /* @__PURE__ */ e.jsx(_e, {}), onClick: () => z(!1), variant: "text", className: "absolute top-0 right-0", size: "small", color: "secondary" }),
|
|
1613
1639
|
typeof n == "function" ? n() : n
|
|
1614
1640
|
] });
|
|
1615
|
-
let
|
|
1616
|
-
return
|
|
1617
|
-
}, [
|
|
1618
|
-
|
|
1619
|
-
}, []),
|
|
1620
|
-
|
|
1621
|
-
}, [
|
|
1622
|
-
|
|
1623
|
-
}, [
|
|
1624
|
-
g?.(n,
|
|
1641
|
+
let Q;
|
|
1642
|
+
return v ? Q = Be(T, document.body, `modal-error-${Date.now()}`) : V.current && (Q = Be(T, V.current, `modal-error-${Date.now()}`)), G(Q), z(!0), T;
|
|
1643
|
+
}, [V]), kt = x(() => {
|
|
1644
|
+
z(!1);
|
|
1645
|
+
}, []), Lt = x(() => {
|
|
1646
|
+
c?.(b.current);
|
|
1647
|
+
}, [c]), Dt = x((n) => {
|
|
1648
|
+
j?.(n, b.current);
|
|
1649
|
+
}, [j]), At = x((n, v) => {
|
|
1650
|
+
g?.(n, v, b.current);
|
|
1625
1651
|
}, [g]);
|
|
1626
|
-
return b.current.addNewNotification = Se, b.current.subscribeToNotificationsUpdates = Ce, b.current.removeNotification = mt, b.current.removeAllNotifications = pt, b.current.setNotifications = ht, b.current.setNotificationsError = wt, b.current.setNotificationsLoading = yt, b.current.setHasNextPage = vt, b.current.subscribeToNotificationsScroll = bt, b.current.subscribeToHyperextension = xt, b.current.showErrorModal = jt, b.current.closeErrorModal = kt, b.current.userCardExpand = Nt, b.current.userCardCollapse = St, b.current.userCardToggle = Ct, b.current.subscribeToSection = gt,
|
|
1627
|
-
Ce((n,
|
|
1628
|
-
|
|
1652
|
+
return b.current.addNewNotification = Se, b.current.subscribeToNotificationsUpdates = Ce, b.current.removeNotification = mt, b.current.removeAllNotifications = pt, b.current.setNotifications = ht, b.current.setNotificationsError = wt, b.current.setNotificationsLoading = yt, b.current.setHasNextPage = vt, b.current.subscribeToNotificationsScroll = bt, b.current.subscribeToHyperextension = xt, b.current.showErrorModal = jt, b.current.closeErrorModal = kt, b.current.userCardExpand = Nt, b.current.userCardCollapse = St, b.current.userCardToggle = Ct, b.current.subscribeToSection = gt, H(() => {
|
|
1653
|
+
Ce((n, v) => {
|
|
1654
|
+
R(v);
|
|
1629
1655
|
});
|
|
1630
1656
|
}, [Ce]), /* @__PURE__ */ e.jsxs(ft.Provider, { value: b.current, children: [
|
|
1631
|
-
P &&
|
|
1657
|
+
P && J,
|
|
1632
1658
|
/* @__PURE__ */ e.jsx("div", { className: "flex h-screen", children: /* @__PURE__ */ e.jsx(
|
|
1633
1659
|
dt,
|
|
1634
1660
|
{
|
|
1635
1661
|
links: l,
|
|
1636
|
-
handleNavigation:
|
|
1637
|
-
allActions:
|
|
1662
|
+
handleNavigation: ne,
|
|
1663
|
+
allActions: re,
|
|
1638
1664
|
activeActionId: u,
|
|
1639
1665
|
onActionClick: f,
|
|
1640
1666
|
state: s,
|
|
1641
|
-
currentAppSessions:
|
|
1667
|
+
currentAppSessions: ie,
|
|
1642
1668
|
resolveUserSecondarySlot: w,
|
|
1643
|
-
resolveSessionSecondarySlot:
|
|
1644
|
-
onSessionClick:
|
|
1645
|
-
onLogoutClick:
|
|
1646
|
-
options:
|
|
1669
|
+
resolveSessionSecondarySlot: E,
|
|
1670
|
+
onSessionClick: At,
|
|
1671
|
+
onLogoutClick: Lt,
|
|
1672
|
+
options: C,
|
|
1647
1673
|
currentSystemId: m,
|
|
1648
|
-
userOptionsControls:
|
|
1649
|
-
mobileAppSwitcherControls:
|
|
1650
|
-
onSystemLogoClick:
|
|
1651
|
-
tabs:
|
|
1674
|
+
userOptionsControls: F,
|
|
1675
|
+
mobileAppSwitcherControls: ee,
|
|
1676
|
+
onSystemLogoClick: N,
|
|
1677
|
+
tabs: se,
|
|
1652
1678
|
helpSection: r,
|
|
1653
|
-
initialSectionRef:
|
|
1679
|
+
initialSectionRef: O,
|
|
1654
1680
|
navigationControlsRef: b,
|
|
1655
1681
|
notificationsListControls: y,
|
|
1656
|
-
scrollableControls:
|
|
1657
|
-
outletRef:
|
|
1658
|
-
onProfileClick:
|
|
1659
|
-
currentTabName:
|
|
1682
|
+
scrollableControls: D,
|
|
1683
|
+
outletRef: V,
|
|
1684
|
+
onProfileClick: Dt,
|
|
1685
|
+
currentTabName: te,
|
|
1660
1686
|
children: t
|
|
1661
1687
|
}
|
|
1662
1688
|
) })
|