prometeo-design-system 6.3.6 → 6.3.7
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 +121 -121
- package/package.json +1 -1
package/dist/PyrionLayout.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
|
2
2
|
import { u as Tt, g as It } from "./useDevice-vwn4GLwK.js";
|
|
3
3
|
import { c as k } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { g as ye } from "./utils-X4-h3cum.js";
|
|
5
|
-
import je, { forwardRef as de, useState as H, useRef as D, useEffect as V, memo as E, useContext as ze, createContext as Le, useCallback as x, Children as Ot, isValidElement as pe, useMemo as
|
|
5
|
+
import je, { forwardRef as de, useState as H, useRef as D, useEffect as V, memo as E, useContext as ze, createContext as Le, useCallback as x, Children as Ot, isValidElement as pe, useMemo as se, useLayoutEffect as De, 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";
|
|
@@ -26,11 +26,11 @@ 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
28
|
const qt = de((t, r) => {
|
|
29
|
-
const [s, l] = H(t?.currentTabName || t.tabs[0]?.name), d = D(null), { tabs: a = [], className:
|
|
29
|
+
const [s, l] = H(t?.currentTabName || t.tabs[0]?.name), d = D(null), { tabs: a = [], className: i, activeColor: h = "var(--neutral-900)", currentSystemId: u, isLoading: f = !1 } = t;
|
|
30
30
|
V(() => {
|
|
31
31
|
d.current?.style.setProperty("--tab-bg", h);
|
|
32
32
|
}, [h]);
|
|
33
|
-
const
|
|
33
|
+
const c = 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
|
{
|
|
@@ -41,7 +41,7 @@ const qt = de((t, r) => {
|
|
|
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
|
+
i
|
|
45
45
|
),
|
|
46
46
|
children: (f ? Array(3).fill(null) : a).map(
|
|
47
47
|
(m, g) => {
|
|
@@ -65,7 +65,7 @@ const qt = de((t, r) => {
|
|
|
65
65
|
), children: /* @__PURE__ */ e.jsx(ce, { shape: "rounded", className: "w-full h-full" }) })
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
const S = m?.name ===
|
|
68
|
+
const S = m?.name === c?.name, C = 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(
|
|
@@ -95,14 +95,14 @@ const qt = de((t, r) => {
|
|
|
95
95
|
)
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
}), Ke = E(de(({ children: t, className: r, context: s, modal: l = !1, closeOnOverlayClick: d = !1, unmountChildrenOnClose: a = !0 },
|
|
99
|
-
const h = be(t, s), u = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: f } = $t(), { closeSidebar:
|
|
98
|
+
}), Ke = E(de(({ children: t, className: r, context: s, modal: l = !1, closeOnOverlayClick: d = !1, unmountChildrenOnClose: a = !0 }, i) => {
|
|
99
|
+
const h = be(t, s), u = typeof window < "u" && window.matchMedia("(min-width: 768px)").matches, { isSidebarOpen: f } = $t(), { closeSidebar: c } = oe(), [m, g] = H(() => a ? f : !0), [S, C] = H(!1);
|
|
100
100
|
return V(() => {
|
|
101
101
|
a && s?.subscribeToSidebarOpen((p) => {
|
|
102
102
|
p ? (C(!1), g(!0)) : C(!0);
|
|
103
103
|
});
|
|
104
104
|
}, [a]), V(() => {
|
|
105
|
-
const p =
|
|
105
|
+
const p = i && typeof i == "object" && "current" in i ? i.current : null;
|
|
106
106
|
if (!p) return;
|
|
107
107
|
const _ = () => {
|
|
108
108
|
S && (g(!1), C(!1));
|
|
@@ -114,12 +114,12 @@ const qt = de((t, r) => {
|
|
|
114
114
|
{
|
|
115
115
|
className: k("navigation-drawer-sidebar-overlay"),
|
|
116
116
|
onClick: (p) => {
|
|
117
|
-
p.preventDefault(), p.stopPropagation(), d &&
|
|
117
|
+
p.preventDefault(), p.stopPropagation(), d && c?.();
|
|
118
118
|
},
|
|
119
119
|
"aria-hidden": "true"
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
|
-
/* @__PURE__ */ e.jsx("div", { ref:
|
|
122
|
+
/* @__PURE__ */ e.jsx("div", { ref: i, className: k("sidebar collapsed", "h-full overflow-auto", r), "aria-modal": l || void 0, children: /* @__PURE__ */ e.jsxs("div", { className: k("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
|
] }) })
|
|
@@ -148,7 +148,7 @@ 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: d, modal: a = !0, closeOnOutsideClick:
|
|
151
|
+
const { children: r, classNameDrawer: s, classNameSidebar: l, disableDragOpen: d, modal: a = !0, closeOnOutsideClick: i = !0 } = t, h = D(null), u = D(null), f = D(null), c = t.outletRef ?? D(null), m = D(null), g = D(Jt(Kt(), t.defaultCollapsedState ?? Xt)), S = D(!1), C = D("drawer"), p = D(/* @__PURE__ */ new Set()), _ = D(/* @__PURE__ */ new Set()), j = x((o) => {
|
|
152
152
|
const w = f.current;
|
|
153
153
|
w && (w.classList.toggle("collapsed", o), w.classList.toggle("expanded", !o));
|
|
154
154
|
}, []), v = x((o) => {
|
|
@@ -221,7 +221,7 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
221
221
|
openDrawer: (o) => q(o),
|
|
222
222
|
getIsCollapsed: () => {
|
|
223
223
|
if (!window.matchMedia("(min-width: 768px)").matches) {
|
|
224
|
-
const w = h.current, I =
|
|
224
|
+
const w = h.current, I = c.current;
|
|
225
225
|
if (w && I) {
|
|
226
226
|
const M = w.scrollLeft, ee = I.offsetLeft, te = Math.abs(M - ee) < Math.abs(M);
|
|
227
227
|
return te !== g.current && (g.current = te, j(te)), te;
|
|
@@ -324,7 +324,7 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
324
324
|
}
|
|
325
325
|
Q.push(o);
|
|
326
326
|
});
|
|
327
|
-
const re = !!W, ae = W ?? (Q.length ? /* @__PURE__ */ e.jsx(we, { children: Q }) : null), le = re ? Q : [], Z = K ?? (!!K ? /* @__PURE__ */ e.jsx(Ae, { children: J, context: U, modal: a, closeOnOutsideClick:
|
|
327
|
+
const re = !!W, ae = W ?? (Q.length ? /* @__PURE__ */ e.jsx(we, { children: Q }) : null), le = re ? Q : [], Z = K ?? (!!K ? /* @__PURE__ */ e.jsx(Ae, { children: J, context: U, modal: a, closeOnOutsideClick: i }) : null), xe = Y ?? (!!Y ? /* @__PURE__ */ e.jsx(ve, { children: Y }) : null), Ne = !!L, ne = L, me = !!B, ie = se(() => ({
|
|
328
328
|
isCollapsed: g.current,
|
|
329
329
|
isSidebarOpen: !S.current
|
|
330
330
|
}), [g.current, S.current]);
|
|
@@ -369,12 +369,12 @@ const Je = Le(null), Ge = Le(null), $t = () => {
|
|
|
369
369
|
]
|
|
370
370
|
}
|
|
371
371
|
),
|
|
372
|
-
Z && pe(Z) ? je.cloneElement(Z, { ref:
|
|
373
|
-
|
|
372
|
+
Z && pe(Z) ? je.cloneElement(Z, { ref: c, modal: a, closeOnOutsideClick: i }) : Z,
|
|
373
|
+
ne && pe(ne) ? je.cloneElement(ne, {
|
|
374
374
|
ref: m,
|
|
375
|
-
className: k("sidebar",
|
|
375
|
+
className: k("sidebar", ne.props?.className, l),
|
|
376
376
|
context: U
|
|
377
|
-
}) :
|
|
377
|
+
}) : ne
|
|
378
378
|
] }) }) });
|
|
379
379
|
}, Fe = E(Yt), Ye = E(({ onToggleCollapse: t }) => /* @__PURE__ */ e.jsx(
|
|
380
380
|
"button",
|
|
@@ -404,12 +404,12 @@ ve.displayName = "NavigationDrawerFooter";
|
|
|
404
404
|
const Qe = E(({ className: t }) => /* @__PURE__ */ e.jsx("div", { className: k("w-full border-t border-neutral-strong-default ", t) }));
|
|
405
405
|
Qe.displayName = "NavigationDrawerSpacer";
|
|
406
406
|
const Ae = E(de(({ children: t, className: r, context: s, modal: l, closeOnOutsideClick: d }, a) => {
|
|
407
|
-
const
|
|
407
|
+
const i = be(t, s), h = oe(), u = () => {
|
|
408
408
|
d && (h.closeDrawer(), h.closeSidebar());
|
|
409
409
|
};
|
|
410
410
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { id: "navigation-drawer-outlet", ref: a, className: k("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
|
+
i
|
|
413
413
|
] }) });
|
|
414
414
|
}), (t, r) => t.children === r.children && t.className === r.className), X = Object.assign(Fe, {
|
|
415
415
|
Root: Fe,
|
|
@@ -485,17 +485,17 @@ const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
|
485
485
|
count: l,
|
|
486
486
|
className: d,
|
|
487
487
|
isSelected: a = !1,
|
|
488
|
-
hasSublinks:
|
|
488
|
+
hasSublinks: i,
|
|
489
489
|
subLinksCollapsed: h,
|
|
490
490
|
onToggleSublinks: u,
|
|
491
491
|
as: f = "div",
|
|
492
|
-
onClick:
|
|
492
|
+
onClick: c,
|
|
493
493
|
onAuxClick: m,
|
|
494
494
|
disabled: g = !1,
|
|
495
495
|
tooltipText: S,
|
|
496
496
|
selectorCss: C
|
|
497
497
|
} = t, p = (y) => {
|
|
498
|
-
g ||
|
|
498
|
+
g || c?.(y);
|
|
499
499
|
}, _ = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
500
500
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center flex-nowrap", children: [
|
|
501
501
|
s && (S ? /* @__PURE__ */ e.jsx(Pt, { title: S, 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 }) })),
|
|
@@ -503,7 +503,7 @@ const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
|
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
|
+
i && /* @__PURE__ */ e.jsx(
|
|
507
507
|
"div",
|
|
508
508
|
{
|
|
509
509
|
className: k(
|
|
@@ -559,7 +559,7 @@ const Qt = "hover:bg-neutral-medium-hover", Zt = Ie("", {
|
|
|
559
559
|
}, Re = E(tr);
|
|
560
560
|
Re.displayName = "NavigationDrawerItemBase";
|
|
561
561
|
const rr = (t) => {
|
|
562
|
-
const { title: r, icon: s, count: l, className: d, isActive: a, onClick:
|
|
562
|
+
const { title: r, icon: s, count: l, className: d, isActive: a, onClick: i, isView: h = !0, disabled: u, tooltipText: f, selectorCss: c } = t;
|
|
563
563
|
return h ? /* @__PURE__ */ e.jsx(
|
|
564
564
|
Re,
|
|
565
565
|
{
|
|
@@ -569,10 +569,10 @@ const rr = (t) => {
|
|
|
569
569
|
count: l,
|
|
570
570
|
className: d,
|
|
571
571
|
isSelected: a,
|
|
572
|
-
onClick:
|
|
572
|
+
onClick: i,
|
|
573
573
|
disabled: u,
|
|
574
574
|
tooltipText: f,
|
|
575
|
-
selectorCss:
|
|
575
|
+
selectorCss: c
|
|
576
576
|
}
|
|
577
577
|
) : null;
|
|
578
578
|
}, Ze = E(rr);
|
|
@@ -581,15 +581,15 @@ const sr = ({ actions: t, activeActionId: r, onActionClick: s, className: l }) =
|
|
|
581
581
|
top: { type: "shadow", behavior: "scroll-on-hover", show: !0 },
|
|
582
582
|
bottom: { type: "shadow", behavior: "scroll-on-hover", show: !0 }
|
|
583
583
|
}, children: t?.map((d) => {
|
|
584
|
-
const { id: a, onClick:
|
|
585
|
-
s?.(a, u),
|
|
584
|
+
const { id: a, onClick: i, isView: h = !0, payload: u, ...f } = d, c = a === r, m = () => {
|
|
585
|
+
s?.(a, u), i?.();
|
|
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: c,
|
|
593
593
|
onClick: m
|
|
594
594
|
},
|
|
595
595
|
a
|
|
@@ -597,16 +597,16 @@ const sr = ({ actions: t, activeActionId: r, onActionClick: s, className: l }) =
|
|
|
597
597
|
}) }), et = E(sr);
|
|
598
598
|
et.displayName = "NavigationDrawerActions";
|
|
599
599
|
const nr = (t) => {
|
|
600
|
-
const { className: r, title: s, path: l, onClick: d, isSelected: a, parentPath:
|
|
600
|
+
const { className: r, title: s, path: l, onClick: d, isSelected: a, parentPath: i } = t, { pathname: h } = Ue(), u = x(() => {
|
|
601
601
|
d?.(l);
|
|
602
602
|
}, [l]), f = x(() => {
|
|
603
603
|
if (l.startsWith("./")) {
|
|
604
|
-
if (!
|
|
605
|
-
const m =
|
|
604
|
+
if (!i) return;
|
|
605
|
+
const m = i + l.slice(2);
|
|
606
606
|
window.open(m, "_blank");
|
|
607
607
|
} else
|
|
608
608
|
window.open(l, "_blank");
|
|
609
|
-
}, [l]),
|
|
609
|
+
}, [l]), c = a || l === h;
|
|
610
610
|
return /* @__PURE__ */ e.jsx(
|
|
611
611
|
"a",
|
|
612
612
|
{
|
|
@@ -617,20 +617,20 @@ const nr = (t) => {
|
|
|
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
|
+
c && "bg-neutral-medium-selected hover:bg-neutral-medium-hover active:bg-transparent focus:bg-transparent",
|
|
621
621
|
r
|
|
622
622
|
),
|
|
623
623
|
children: /* @__PURE__ */ e.jsx("p", { className: k(
|
|
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
|
+
c && "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
630
|
}, tt = E(nr);
|
|
631
631
|
tt.displayName = "NavItemSecondary";
|
|
632
632
|
const or = de((t, r) => {
|
|
633
|
-
const [s, l] = H(!0), d = D(null), { path: a, title:
|
|
633
|
+
const [s, l] = H(!0), d = D(null), { path: a, title: i, icon: h, count: u, className: f, isSelected: c = !1, onClick: m, sublinks: g, toggleCollapse: S, getIsCollapsed: C, subscribeToCollapse: p, isView: _ = !0, disabled: j, tooltipText: v, selectorCss: y } = t;
|
|
634
634
|
V(() => p ? p((P) => {
|
|
635
635
|
P && l(!0);
|
|
636
636
|
}) : void 0, [p]);
|
|
@@ -685,11 +685,11 @@ const or = de((t, r) => {
|
|
|
685
685
|
Re,
|
|
686
686
|
{
|
|
687
687
|
as: "a",
|
|
688
|
-
title:
|
|
688
|
+
title: i,
|
|
689
689
|
icon: z,
|
|
690
690
|
count: u,
|
|
691
691
|
className: f,
|
|
692
|
-
isSelected:
|
|
692
|
+
isSelected: c,
|
|
693
693
|
hasSublinks: !!g,
|
|
694
694
|
subLinksCollapsed: s,
|
|
695
695
|
onToggleSublinks: J,
|
|
@@ -704,12 +704,12 @@ const or = de((t, r) => {
|
|
|
704
704
|
}), rt = E(or);
|
|
705
705
|
rt.displayName = "NavigationDrawerLinkItem";
|
|
706
706
|
const ar = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: l, toggleCollapse: d, subscribeToCollapse: a }) => {
|
|
707
|
-
const { pathname:
|
|
707
|
+
const { pathname: i } = Ue();
|
|
708
708
|
return /* @__PURE__ */ e.jsx(Oe, { className: k("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 === i || (h.relatedPaths?.some((c) => i.startsWith(c)) ?? !1) || (h.sublinks?.some((c) => c.path === i) ?? !1);
|
|
713
713
|
return /* @__PURE__ */ e.jsx(
|
|
714
714
|
rt,
|
|
715
715
|
{
|
|
@@ -728,14 +728,14 @@ const ar = ({ navlinks: t, handleNavigation: r, className: s, getIsCollapsed: l,
|
|
|
728
728
|
}) });
|
|
729
729
|
}, st = E(ar);
|
|
730
730
|
st.displayName = "NavigationDrawerNavlinks";
|
|
731
|
-
const nt = E(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: l, initialSectionRef: d, navigationControlsRef: a, onActionClick:
|
|
732
|
-
const { getIsCollapsed: h, toggleCollapse: u, subscribeToCollapse: f, subscribeToSidebarOpen:
|
|
731
|
+
const nt = E(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId: l, initialSectionRef: d, navigationControlsRef: a, onActionClick: i }) => {
|
|
732
|
+
const { getIsCollapsed: h, toggleCollapse: u, subscribeToCollapse: f, subscribeToSidebarOpen: c, getIsSidebarOpen: m } = oe(), [g, S] = H(() => m?.() ?? !1), [C, p] = H(() => d?.current ?? "notifications");
|
|
733
733
|
V(() => {
|
|
734
|
-
const v =
|
|
734
|
+
const v = c?.(S), y = a?.current?.subscribeToSection?.(p);
|
|
735
735
|
return () => {
|
|
736
736
|
v?.(), y?.();
|
|
737
737
|
};
|
|
738
|
-
}, [
|
|
738
|
+
}, [c, a]);
|
|
739
739
|
const j = g && (C === "notifications" || C === "help") ? C : l;
|
|
740
740
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
741
741
|
/* @__PURE__ */ e.jsx(X.Spacer, { className: "pb-3" }),
|
|
@@ -756,7 +756,7 @@ const nt = E(({ navlinks: t, handleNavigation: r, allActions: s, activeActionId:
|
|
|
756
756
|
{
|
|
757
757
|
actions: s,
|
|
758
758
|
activeActionId: j,
|
|
759
|
-
onActionClick:
|
|
759
|
+
onActionClick: i,
|
|
760
760
|
className: "max-h-[30dvh]"
|
|
761
761
|
}
|
|
762
762
|
)
|
|
@@ -770,7 +770,7 @@ const lr = (t) => {
|
|
|
770
770
|
return null;
|
|
771
771
|
const a = (u, f) => {
|
|
772
772
|
s && f && s(u, f);
|
|
773
|
-
},
|
|
773
|
+
}, i = (u) => {
|
|
774
774
|
if (!d)
|
|
775
775
|
return;
|
|
776
776
|
const f = ye({ session: u }, d);
|
|
@@ -785,7 +785,7 @@ const lr = (t) => {
|
|
|
785
785
|
name: f.name,
|
|
786
786
|
avatarSize: "xxs",
|
|
787
787
|
secondarySlot: h(u),
|
|
788
|
-
subImageUrl:
|
|
788
|
+
subImageUrl: i(u),
|
|
789
789
|
imageUrl: f.profile_picture,
|
|
790
790
|
className: "pyrion-navigation-drawer-user-card"
|
|
791
791
|
},
|
|
@@ -799,19 +799,19 @@ const lr = (t) => {
|
|
|
799
799
|
resolveSessionSecondarySlot: l,
|
|
800
800
|
onSessionClick: d,
|
|
801
801
|
onLogoutClick: a,
|
|
802
|
-
onProfileClick:
|
|
802
|
+
onProfileClick: i,
|
|
803
803
|
options: h,
|
|
804
804
|
currentSystemId: u,
|
|
805
805
|
userOptionsControls: f,
|
|
806
|
-
mobileAppSwitcherControls:
|
|
806
|
+
mobileAppSwitcherControls: c
|
|
807
807
|
}) => {
|
|
808
808
|
const { getIsCollapsed: m, toggleCollapse: g, subscribeToCollapse: S } = oe(), C = x(() => {
|
|
809
809
|
const p = m();
|
|
810
|
-
p ? (g(), f.current?.open()) :
|
|
811
|
-
}, [m, g, f,
|
|
810
|
+
p ? (g(), f.current?.open()) : i?.(p);
|
|
811
|
+
}, [m, g, f, i]);
|
|
812
812
|
return V(() => S((p) => {
|
|
813
|
-
p && (f.current?.close(),
|
|
814
|
-
}), [S, f,
|
|
813
|
+
p && (f.current?.close(), c.current?.close());
|
|
814
|
+
}), [S, f, c]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
815
815
|
/* @__PURE__ */ e.jsx(X.Spacer, { className: "mb-3" }),
|
|
816
816
|
/* @__PURE__ */ e.jsxs(he, { className: "", controls: f, children: [
|
|
817
817
|
/* @__PURE__ */ e.jsx(he.Content, { onClick: C, className: "max-h-[60px] min-h-[60px] h-[60px] max-w-[70vw] w-[min(285px,70vw)] flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
@@ -880,8 +880,8 @@ const lr = (t) => {
|
|
|
880
880
|
for (const d of s) {
|
|
881
881
|
if (!Object.prototype.hasOwnProperty.call(r, d))
|
|
882
882
|
return !1;
|
|
883
|
-
const a = t[d],
|
|
884
|
-
if (a !==
|
|
883
|
+
const a = t[d], i = r[d];
|
|
884
|
+
if (a !== i)
|
|
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;
|
|
@@ -894,8 +894,8 @@ const at = E(({ enabled_systems: t, onClick: r, currentSystemId: 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, i = t.find((h) => h.url === a);
|
|
898
|
+
if (i) return { coverImage: i.coverImage, thumbnail: i.thumbnail };
|
|
899
899
|
}
|
|
900
900
|
return { coverImage: "", thumbnail: "" };
|
|
901
901
|
}, [t]), d = !!r;
|
|
@@ -981,10 +981,10 @@ function fr({
|
|
|
981
981
|
isHyperDown: l,
|
|
982
982
|
feedback: d,
|
|
983
983
|
showSummaryInSlot: a,
|
|
984
|
-
copyOverrides:
|
|
984
|
+
copyOverrides: i,
|
|
985
985
|
className: h
|
|
986
986
|
}) {
|
|
987
|
-
const u = ur(t,
|
|
987
|
+
const u = ur(t, i), f = !s && d.phase === "empty" && l, c = !s && d.phase === "idle";
|
|
988
988
|
return /* @__PURE__ */ e.jsxs("div", { className: k("grid min-h-11 place-items-center p-4 relative text-center isolate", h), children: [
|
|
989
989
|
/* @__PURE__ */ e.jsx(
|
|
990
990
|
"p",
|
|
@@ -1024,7 +1024,7 @@ function fr({
|
|
|
1024
1024
|
{
|
|
1025
1025
|
className: k(
|
|
1026
1026
|
"relative z-0 prometeo-fonts-label-medium text-neutral-medium-default transition-opacity duration-300 pointer-events-none",
|
|
1027
|
-
|
|
1027
|
+
c ? "opacity-100" : "opacity-0"
|
|
1028
1028
|
),
|
|
1029
1029
|
children: u.idleHint
|
|
1030
1030
|
}
|
|
@@ -1041,7 +1041,7 @@ const mr = ({ type: t }) => {
|
|
|
1041
1041
|
] }),
|
|
1042
1042
|
/* @__PURE__ */ e.jsx(ce, { shape: "rounded", className: "w-20 h-3" })
|
|
1043
1043
|
] }), hr = 2500, br = 400, xr = ({ onCloseClick: t, onMarkAllAsRead: r, loadingState: s, errorState: l, notifications: d, scrollableState: a }) => {
|
|
1044
|
-
const [
|
|
1044
|
+
const [i, h] = H("NO_LEIDAS"), u = D(null), f = D(null), [c, m] = H({ phase: "idle" }), g = D(null), S = D(s.isLoading), C = D(0), p = D(!1), _ = D(0), j = D(0), v = x(() => {
|
|
1045
1045
|
g.current && (clearTimeout(g.current), g.current = null);
|
|
1046
1046
|
}, []), y = x(() => {
|
|
1047
1047
|
v(), g.current = setTimeout(() => {
|
|
@@ -1050,7 +1050,7 @@ const mr = ({ type: t }) => {
|
|
|
1050
1050
|
}, [v]);
|
|
1051
1051
|
V(() => () => v(), [v]), V(() => {
|
|
1052
1052
|
v(), m({ phase: "idle" }), p.current = !1;
|
|
1053
|
-
}, [
|
|
1053
|
+
}, [i, v]), V(() => {
|
|
1054
1054
|
const L = S.current;
|
|
1055
1055
|
if (S.current = s.isLoading, !L && s.isLoading && s.type === "load_more" && (p.current = !0, C.current = d.length, v(), m({ phase: "idle" })), L && !s.isLoading && p.current) {
|
|
1056
1056
|
p.current = !1;
|
|
@@ -1068,7 +1068,7 @@ const mr = ({ type: t }) => {
|
|
|
1068
1068
|
v,
|
|
1069
1069
|
y
|
|
1070
1070
|
]), V(() => {
|
|
1071
|
-
if (!(
|
|
1071
|
+
if (!(c.phase !== "success" && c.phase !== "empty")) {
|
|
1072
1072
|
if (a.state.hyperextensionActive.down) {
|
|
1073
1073
|
v();
|
|
1074
1074
|
return;
|
|
@@ -1076,15 +1076,15 @@ const mr = ({ type: t }) => {
|
|
|
1076
1076
|
y();
|
|
1077
1077
|
}
|
|
1078
1078
|
}, [
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1079
|
+
c.phase,
|
|
1080
|
+
c.phase === "success" ? c.addedCount : 0,
|
|
1081
|
+
c.phase === "success" ? c.bumpId : 0,
|
|
1082
1082
|
a.state.hyperextensionActive.down,
|
|
1083
1083
|
v,
|
|
1084
1084
|
y
|
|
1085
1085
|
]), V(() => {
|
|
1086
|
-
if (
|
|
1087
|
-
const L =
|
|
1086
|
+
if (c.phase !== "success") return;
|
|
1087
|
+
const L = c.bumpId;
|
|
1088
1088
|
if (j.current === L) return;
|
|
1089
1089
|
j.current = L;
|
|
1090
1090
|
let B = 0, re = 0;
|
|
@@ -1098,8 +1098,8 @@ const mr = ({ type: t }) => {
|
|
|
1098
1098
|
cancelAnimationFrame(B), cancelAnimationFrame(re);
|
|
1099
1099
|
};
|
|
1100
1100
|
}, [
|
|
1101
|
-
|
|
1102
|
-
|
|
1101
|
+
c.phase,
|
|
1102
|
+
c.phase === "success" ? c.bumpId : 0,
|
|
1103
1103
|
a.handlers
|
|
1104
1104
|
]);
|
|
1105
1105
|
const A = (L) => {
|
|
@@ -1110,15 +1110,15 @@ const mr = ({ type: t }) => {
|
|
|
1110
1110
|
const L = u.current.clientHeight;
|
|
1111
1111
|
f.current.style.setProperty("height", `calc(100dvh - ${L}px - 20px)`);
|
|
1112
1112
|
}
|
|
1113
|
-
}, [u?.current,
|
|
1114
|
-
const R = d.filter((L) => !L.read).length, { isLoading: z, type: q } = s, $ = z && q === "load_more", { hasError: U, children: J } = l, F =
|
|
1115
|
-
(L) =>
|
|
1116
|
-
), [d,
|
|
1117
|
-
activeTab:
|
|
1113
|
+
}, [u?.current, i]);
|
|
1114
|
+
const R = d.filter((L) => !L.read).length, { isLoading: z, type: q } = s, $ = z && q === "load_more", { hasError: U, children: J } = l, F = se(() => d?.filter(
|
|
1115
|
+
(L) => i === "NO_LEIDAS" ? !L.read : L
|
|
1116
|
+
), [d, i]), P = se(() => ({
|
|
1117
|
+
activeTab: i,
|
|
1118
1118
|
isLoading: z,
|
|
1119
1119
|
notificationsLength: d.length
|
|
1120
1120
|
// Añadir la longitud de las notificaciones como metadata
|
|
1121
|
-
}), [
|
|
1121
|
+
}), [i, z, d.length]), W = se(() => i !== "NO_LEIDAS", [i]), Y = a.state.hyperextensionActive.down, Q = i === "NO_LEIDAS" ? "sync_unread" : "load_more", K = !$ && (c.phase === "success" || c.phase === "empty");
|
|
1122
1122
|
return /* @__PURE__ */ e.jsx(
|
|
1123
1123
|
"section",
|
|
1124
1124
|
{
|
|
@@ -1137,7 +1137,7 @@ const mr = ({ type: t }) => {
|
|
|
1137
1137
|
{
|
|
1138
1138
|
className: "px-4 md:px-2 md:pl-2 pl-2 gap-0 md:gap-0",
|
|
1139
1139
|
onTabChange: A,
|
|
1140
|
-
activeTab:
|
|
1140
|
+
activeTab: i,
|
|
1141
1141
|
items: [
|
|
1142
1142
|
{ id: "ALL", title: "Todas" },
|
|
1143
1143
|
{ id: "NO_LEIDAS", title: "Sin leer" }
|
|
@@ -1161,7 +1161,7 @@ const mr = ({ type: t }) => {
|
|
|
1161
1161
|
] })
|
|
1162
1162
|
}
|
|
1163
1163
|
),
|
|
1164
|
-
r && b &&
|
|
1164
|
+
r && b && i === "NO_LEIDAS" && !U && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end px-4", children: /* @__PURE__ */ e.jsx(Ee, { disabled: z || R === 0, onClick: r, label: "Marcar todas como leidas", variant: "text", animate: !1, animateIcon: !1, size: "small" }) })
|
|
1165
1165
|
] }),
|
|
1166
1166
|
/* @__PURE__ */ e.jsxs(
|
|
1167
1167
|
"div",
|
|
@@ -1187,10 +1187,10 @@ const mr = ({ type: t }) => {
|
|
|
1187
1187
|
fr,
|
|
1188
1188
|
{
|
|
1189
1189
|
action: Q,
|
|
1190
|
-
activeTab:
|
|
1190
|
+
activeTab: i,
|
|
1191
1191
|
isLoadMorePending: $,
|
|
1192
1192
|
isHyperDown: Y,
|
|
1193
|
-
feedback:
|
|
1193
|
+
feedback: c,
|
|
1194
1194
|
showSummaryInSlot: K
|
|
1195
1195
|
}
|
|
1196
1196
|
)
|
|
@@ -1218,7 +1218,7 @@ const mr = ({ type: t }) => {
|
|
|
1218
1218
|
/* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-medium text-neutral-strong-default", children: "Cargando más notificaciones" }),
|
|
1219
1219
|
/* @__PURE__ */ e.jsx(Ht, { variant: "dot", size: "small", color: "var(--neutral-200)", className: "*:size-[3px]", speedMultiplier: 0.9 })
|
|
1220
1220
|
] }),
|
|
1221
|
-
|
|
1221
|
+
c.phase === "empty" && /* @__PURE__ */ e.jsx("p", { className: "prometeo-fonts-label-medium text-neutral-medium-default", children: "No se agregaron notificaciones nuevas" })
|
|
1222
1222
|
]
|
|
1223
1223
|
}
|
|
1224
1224
|
)
|
|
@@ -1229,7 +1229,7 @@ const mr = ({ type: t }) => {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
);
|
|
1231
1231
|
}, gr = (t) => {
|
|
1232
|
-
const { notificationsListControls: r } = t, [s, l] = H([]), [d, a] = H({ isLoading: !1, type: "load_more" }), [
|
|
1232
|
+
const { notificationsListControls: r } = t, [s, l] = H([]), [d, a] = H({ isLoading: !1, type: "load_more" }), [i, h] = H({ hasError: !1 }), [u, f] = H(!0), c = D(/* @__PURE__ */ new Set());
|
|
1233
1233
|
V(() => {
|
|
1234
1234
|
u || setTimeout(() => {
|
|
1235
1235
|
f(!0);
|
|
@@ -1239,26 +1239,26 @@ const mr = ({ type: t }) => {
|
|
|
1239
1239
|
l((A) => {
|
|
1240
1240
|
const b = Array.isArray(v) ? y === "bottom" ? [...A, ...v] : [...v, ...A] : y === "bottom" ? [...A, v] : [v, ...A];
|
|
1241
1241
|
return queueMicrotask(() => {
|
|
1242
|
-
|
|
1242
|
+
c.current.forEach((R) => R(b, { total: b.length, unread: b.filter((z) => !z.read).length }));
|
|
1243
1243
|
}), b;
|
|
1244
1244
|
});
|
|
1245
|
-
}, []), g = x((v) => (
|
|
1246
|
-
|
|
1245
|
+
}, []), g = x((v) => (c.current.add(v), () => {
|
|
1246
|
+
c.current.delete(v);
|
|
1247
1247
|
}), []), S = x((v) => {
|
|
1248
1248
|
l((y) => {
|
|
1249
1249
|
const A = Array.isArray(v) ? y.filter((b) => !v.includes(b._id)) : y.filter((b) => b._id !== v);
|
|
1250
1250
|
return queueMicrotask(() => {
|
|
1251
|
-
|
|
1251
|
+
c.current.forEach((b) => b(A, { total: A.length, unread: A.filter((R) => !R.read).length }));
|
|
1252
1252
|
}), A;
|
|
1253
1253
|
});
|
|
1254
1254
|
}, []), C = x(() => {
|
|
1255
1255
|
l([]), queueMicrotask(() => {
|
|
1256
|
-
|
|
1256
|
+
c.current.forEach((v) => v([], { total: 0, unread: 0 }));
|
|
1257
1257
|
});
|
|
1258
1258
|
}, []), p = x((v) => {
|
|
1259
1259
|
const y = Array.isArray(v) ? v : v(s);
|
|
1260
1260
|
l(y), queueMicrotask(() => {
|
|
1261
|
-
|
|
1261
|
+
c.current.forEach((A) => A(y, { total: y.length, unread: y.filter((b) => !b.read).length }));
|
|
1262
1262
|
});
|
|
1263
1263
|
}, []), _ = x((v, y = "load_more") => {
|
|
1264
1264
|
a({ isLoading: v, type: y });
|
|
@@ -1277,20 +1277,20 @@ const mr = ({ type: t }) => {
|
|
|
1277
1277
|
}), [m, g, p, S, C, _, j, f]), {
|
|
1278
1278
|
notifications: s,
|
|
1279
1279
|
loadingState: d,
|
|
1280
|
-
errorState:
|
|
1280
|
+
errorState: i,
|
|
1281
1281
|
hasNextPage: u
|
|
1282
1282
|
};
|
|
1283
|
-
}, yr = ({ closeSidebar: t, options: r, helpSection: s, initialSection: l, notificationsListControls: d, scrollableControls: a, navigationControls:
|
|
1283
|
+
}, yr = ({ closeSidebar: t, options: r, helpSection: s, initialSection: l, notificationsListControls: d, scrollableControls: a, navigationControls: i }) => {
|
|
1284
1284
|
const [h, u] = H(l ?? "notifications");
|
|
1285
1285
|
V(() => {
|
|
1286
|
-
const C =
|
|
1286
|
+
const C = i?.current?.subscribeToSection?.(u);
|
|
1287
1287
|
return () => {
|
|
1288
1288
|
C?.();
|
|
1289
1289
|
};
|
|
1290
|
-
}, [
|
|
1290
|
+
}, [i]);
|
|
1291
1291
|
const f = () => {
|
|
1292
1292
|
t();
|
|
1293
|
-
}, { notifications:
|
|
1293
|
+
}, { notifications: c, loadingState: m, errorState: g } = gr({ notificationsListControls: d }), S = Ft({ scrollTopButton: { target: "2000px" } });
|
|
1294
1294
|
return Te(a, () => ({
|
|
1295
1295
|
subscribeToScrollTarget: S.handlers.subscribeToScrollTarget,
|
|
1296
1296
|
subscribeToHyperextension: S.handlers.subscribeToHyperextension,
|
|
@@ -1301,7 +1301,7 @@ const mr = ({ type: t }) => {
|
|
|
1301
1301
|
{
|
|
1302
1302
|
onCloseClick: f,
|
|
1303
1303
|
onMarkAllAsRead: r?.notificationsDrawerOptions?.onMarkAllAsRead,
|
|
1304
|
-
notifications:
|
|
1304
|
+
notifications: c,
|
|
1305
1305
|
loadingState: m,
|
|
1306
1306
|
errorState: g,
|
|
1307
1307
|
scrollableState: S
|
|
@@ -1319,11 +1319,11 @@ const wr = ({
|
|
|
1319
1319
|
scrollableControls: d,
|
|
1320
1320
|
navigationControls: a
|
|
1321
1321
|
}) => {
|
|
1322
|
-
const { closeSidebar:
|
|
1322
|
+
const { closeSidebar: i } = oe();
|
|
1323
1323
|
return /* @__PURE__ */ e.jsx(
|
|
1324
1324
|
it,
|
|
1325
1325
|
{
|
|
1326
|
-
closeSidebar:
|
|
1326
|
+
closeSidebar: i,
|
|
1327
1327
|
options: t,
|
|
1328
1328
|
helpSection: r,
|
|
1329
1329
|
initialSection: s.current,
|
|
@@ -1338,7 +1338,7 @@ const vr = ({ navigationControlsRef: t }) => {
|
|
|
1338
1338
|
const r = oe();
|
|
1339
1339
|
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
1340
|
}, Nr = (t) => {
|
|
1341
|
-
const { children: r, currentAppSessions: s, resolveUserSecondarySlot: l, resolveSessionSecondarySlot: d, handleNavigation: a, allActions:
|
|
1341
|
+
const { children: r, currentAppSessions: s, resolveUserSecondarySlot: l, resolveSessionSecondarySlot: d, handleNavigation: a, allActions: i, tabs: h, navigationControlsRef: u, initialSectionRef: f, userOptionsControls: c, mobileAppSwitcherControls: m, notificationsListControls: g, scrollableControls: S, outletRef: C, ...p } = t;
|
|
1342
1342
|
return /* @__PURE__ */ e.jsxs(X, { disableDragOpen: p.options?.disableDragOpen, outletRef: C, defaultCollapsedState: p.options?.defaultCollapsedState, children: [
|
|
1343
1343
|
/* @__PURE__ */ e.jsx(vr, { navigationControlsRef: u }),
|
|
1344
1344
|
/* @__PURE__ */ e.jsx(X.LeftSlot, { children: /* @__PURE__ */ e.jsx(
|
|
@@ -1365,7 +1365,7 @@ const vr = ({ navigationControlsRef: t }) => {
|
|
|
1365
1365
|
{
|
|
1366
1366
|
navlinks: p.links,
|
|
1367
1367
|
handleNavigation: a,
|
|
1368
|
-
allActions:
|
|
1368
|
+
allActions: i,
|
|
1369
1369
|
activeActionId: p.activeActionId,
|
|
1370
1370
|
initialSectionRef: f,
|
|
1371
1371
|
navigationControlsRef: u,
|
|
@@ -1383,7 +1383,7 @@ const vr = ({ navigationControlsRef: t }) => {
|
|
|
1383
1383
|
onLogoutClick: p.onLogoutClick,
|
|
1384
1384
|
options: p.options,
|
|
1385
1385
|
currentSystemId: p.currentSystemId,
|
|
1386
|
-
userOptionsControls:
|
|
1386
|
+
userOptionsControls: c,
|
|
1387
1387
|
mobileAppSwitcherControls: m,
|
|
1388
1388
|
onProfileClick: p.onProfileClick
|
|
1389
1389
|
}
|
|
@@ -1411,14 +1411,14 @@ const vr = ({ navigationControlsRef: t }) => {
|
|
|
1411
1411
|
)
|
|
1412
1412
|
] });
|
|
1413
1413
|
}, dt = E(Nr, (t, r) => {
|
|
1414
|
-
const { children: s, ...l } = t, { children: d, ...a } = r,
|
|
1415
|
-
if (
|
|
1414
|
+
const { children: s, ...l } = t, { children: d, ...a } = r, i = Object.keys(l), h = Object.keys(a);
|
|
1415
|
+
if (i.length !== h.length)
|
|
1416
1416
|
return !1;
|
|
1417
|
-
for (const u of
|
|
1417
|
+
for (const u of i) {
|
|
1418
1418
|
if (!Object.prototype.hasOwnProperty.call(a, u))
|
|
1419
1419
|
return !1;
|
|
1420
|
-
const f = l[u],
|
|
1421
|
-
if (f !==
|
|
1420
|
+
const f = l[u], c = a[u];
|
|
1421
|
+
if (f !== c)
|
|
1422
1422
|
return !1;
|
|
1423
1423
|
}
|
|
1424
1424
|
return !0;
|
|
@@ -1431,7 +1431,7 @@ const ft = Le(null), Xr = () => {
|
|
|
1431
1431
|
if (!t)
|
|
1432
1432
|
throw new Error("usePyrionLayout debe usarse dentro de PyrionLayout");
|
|
1433
1433
|
return t;
|
|
1434
|
-
}, Yr = ({ children: t, helpSection: r, state: s, links: l, onLinkClick: d, onNavigate: a, onLogoutClick:
|
|
1434
|
+
}, Yr = ({ children: t, helpSection: r, state: s, links: l, onLinkClick: d, onNavigate: a, onLogoutClick: i, actions: h, activeActionId: u, onActionClick: f, tabsProps: c, currentSystemId: m, onSessionClick: g, onSystemLogoClick: S, onProfileClick: C, ...p }) => {
|
|
1435
1435
|
const j = Object.assign({
|
|
1436
1436
|
closeDrawerOnNavigate: !0,
|
|
1437
1437
|
disableDragOpen: {
|
|
@@ -1484,17 +1484,17 @@ const ft = Le(null), Xr = () => {
|
|
|
1484
1484
|
internal: ue(O?.url),
|
|
1485
1485
|
external: O?.url
|
|
1486
1486
|
};
|
|
1487
|
-
le.system[N][T](G[T]),
|
|
1488
|
-
}, [m, ue, v, s.enabled_systems,
|
|
1487
|
+
le.system[N][T](G[T]), c?.onTabClick?.(n);
|
|
1488
|
+
}, [m, ue, v, s.enabled_systems, c?.onTabClick]), fe = x((n) => {
|
|
1489
1489
|
const N = v ? "mobile" : "desktop", O = s.company.products?.find((T) => T.name === n)?.domain;
|
|
1490
|
-
le.product[N](O),
|
|
1491
|
-
}, [v, s.company.products,
|
|
1490
|
+
le.product[N](O), c?.onTabClick?.(n);
|
|
1491
|
+
}, [v, s.company.products, c?.onTabClick]), xe = x((n, N) => {
|
|
1492
1492
|
if (N) {
|
|
1493
|
-
N(n),
|
|
1493
|
+
N(n), c?.onTabClick?.(n);
|
|
1494
1494
|
return;
|
|
1495
1495
|
} else
|
|
1496
|
-
|
|
1497
|
-
}, [
|
|
1496
|
+
c?.onTabClick?.(n);
|
|
1497
|
+
}, [c?.onTabClick]), Ne = x(() => {
|
|
1498
1498
|
const n = {};
|
|
1499
1499
|
s.enabled_systems.forEach((O) => {
|
|
1500
1500
|
n[O.url] = O.name;
|
|
@@ -1504,7 +1504,7 @@ const ft = Le(null), Xr = () => {
|
|
|
1504
1504
|
if (N === O)
|
|
1505
1505
|
return T;
|
|
1506
1506
|
return "";
|
|
1507
|
-
}, [s.enabled_systems]),
|
|
1507
|
+
}, [s.enabled_systems]), ne = c?.currentTabName || Ne(), me = se(
|
|
1508
1508
|
() => s.sessions || [],
|
|
1509
1509
|
[s.sessions]
|
|
1510
1510
|
), ie = (n) => n == null ? null : typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? String(n) : pe(n) ? n : typeof n == "object" ? JSON.stringify(n) : null, o = x((n, N) => {
|
|
@@ -1540,7 +1540,7 @@ const ft = Le(null), Xr = () => {
|
|
|
1540
1540
|
return o(N, T);
|
|
1541
1541
|
},
|
|
1542
1542
|
[m, j?.sessionCardOptions?.secondarySlot, j?.userCardOptions?.secondarySlot, o, s.company, s.enabled_systems]
|
|
1543
|
-
), M =
|
|
1543
|
+
), M = se(() => {
|
|
1544
1544
|
const n = [];
|
|
1545
1545
|
return b.current.openNotifications = () => {
|
|
1546
1546
|
R.current = "notifications", z.current.forEach((N) => N("notifications")), b.current.openSidebar?.();
|
|
@@ -1566,16 +1566,16 @@ const ft = Le(null), Xr = () => {
|
|
|
1566
1566
|
onClick: () => j.configurationActionOptions?.onClick?.(b.current),
|
|
1567
1567
|
className: "default-action-configuration"
|
|
1568
1568
|
}), n;
|
|
1569
|
-
}, [j, r, f, J]), ee =
|
|
1569
|
+
}, [j, r, f, J]), ee = se(
|
|
1570
1570
|
() => [...M, ...h || []],
|
|
1571
1571
|
[M, h]
|
|
1572
|
-
), te =
|
|
1572
|
+
), te = se(() => {
|
|
1573
1573
|
const n = s.enabled_systems.map((T) => ({
|
|
1574
1574
|
name: T.name,
|
|
1575
1575
|
thumbnail: T.thumbnail,
|
|
1576
1576
|
onClick: Z,
|
|
1577
1577
|
id: T._id
|
|
1578
|
-
})) || [], N =
|
|
1578
|
+
})) || [], N = c?.customTabs?.map((T) => ({
|
|
1579
1579
|
...T,
|
|
1580
1580
|
onClick: () => xe(T.name, T?.onClick)
|
|
1581
1581
|
})) || [], O = s.company.products?.map((T) => ({
|
|
@@ -1584,7 +1584,7 @@ const ft = Le(null), Xr = () => {
|
|
|
1584
1584
|
onClick: fe
|
|
1585
1585
|
})) || [];
|
|
1586
1586
|
return [...n, ...N, ...O];
|
|
1587
|
-
}, [xe, fe, Z, s.enabled_systems, s.company.products,
|
|
1587
|
+
}, [xe, fe, Z, s.enabled_systems, s.company.products, c?.customTabs]), Se = x((n, N) => {
|
|
1588
1588
|
y.current?.addNewNotification ? y.current.addNewNotification(n, N) : console.warn("Notifications controls not ready yet");
|
|
1589
1589
|
}, []), Ce = x((n) => y.current?.subscribeToUpdates ? y.current.subscribeToUpdates(n) : (console.warn("Notifications controls not ready yet"), () => {
|
|
1590
1590
|
}), []), mt = x((n) => {
|
|
@@ -1617,8 +1617,8 @@ const ft = Le(null), Xr = () => {
|
|
|
1617
1617
|
}, [U]), kt = x(() => {
|
|
1618
1618
|
W(!1);
|
|
1619
1619
|
}, []), Dt = x(() => {
|
|
1620
|
-
|
|
1621
|
-
}, [
|
|
1620
|
+
i?.(b.current);
|
|
1621
|
+
}, [i]), At = x((n) => {
|
|
1622
1622
|
C?.(n, b.current);
|
|
1623
1623
|
}, [C]), Lt = x((n, N) => {
|
|
1624
1624
|
g?.(n, N, b.current);
|
|
@@ -1656,7 +1656,7 @@ const ft = Le(null), Xr = () => {
|
|
|
1656
1656
|
scrollableControls: A,
|
|
1657
1657
|
outletRef: U,
|
|
1658
1658
|
onProfileClick: At,
|
|
1659
|
-
currentTabName:
|
|
1659
|
+
currentTabName: ne,
|
|
1660
1660
|
children: t
|
|
1661
1661
|
}
|
|
1662
1662
|
) })
|