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