@ck-ui/component-library 2.0.0 → 2.0.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/CalendarGrid-DzsGX04L.js +240 -0
- package/dist/ScrollDropdown-B6iVjMy_.js +80 -0
- package/dist/assets/DateRangePicker-BJW-EAys.css +1 -0
- package/dist/assets/ScrollDropdown-zzvVGbzo.css +1 -0
- package/dist/assets/Sidebar-D5jVJ-ln.css +1 -0
- package/dist/assets/index-B5N2Zvs1.css +1 -0
- package/dist/assets/index-B8lwBNV9.css +1 -0
- package/dist/assets/index-BD0iilmm.css +1 -0
- package/dist/assets/index-BioJVhpT.css +1 -0
- package/dist/assets/index-C6j9Ze5V.css +1 -0
- package/dist/assets/index-CSofT_ix.css +1 -0
- package/dist/assets/index-C_Tn9jS-.css +1 -0
- package/dist/assets/index-DrxnMAdp.css +1 -0
- package/dist/assets/index-tIl-UucG.css +1 -0
- package/dist/assets/styles-BCYQ4rbx.css +1 -0
- package/dist/components/DateRangePicker/Calendar/CalendarGrid.d.ts.map +1 -1
- package/dist/components/DateRangePicker/Calendar/CalendarGrid.js +2 -2
- package/dist/components/DateRangePicker/Calendar/ScrollDropdown.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +262 -210
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts +5 -3
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts.map +1 -1
- package/dist/components/PopupAndDialogBox/_types/popupAndDialog.types.d.ts +3 -0
- package/dist/components/PopupAndDialogBox/_types/popupAndDialog.types.d.ts.map +1 -1
- package/dist/components/PopupAndDialogBox/components/DialogFooter.d.ts.map +1 -1
- package/dist/components/PopupAndDialogBox/components/DialogFooter.js +36 -29
- package/dist/components/Sidebar/Sidebar.constants.d.ts +5 -0
- package/dist/components/Sidebar/Sidebar.constants.d.ts.map +1 -0
- package/dist/components/Sidebar/Sidebar.constants.js +7 -0
- package/dist/components/Sidebar/Sidebar.d.ts +7 -0
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/components/Sidebar/Sidebar.js +118 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +6 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -0
- package/dist/components/Sidebar/Sidebar.types.js +1 -0
- package/dist/components/Sidebar/Sidebar.utils.d.ts +7 -0
- package/dist/components/Sidebar/Sidebar.utils.d.ts.map +1 -0
- package/dist/components/Sidebar/Sidebar.utils.js +48 -0
- package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts +12 -0
- package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/CollapsedTooltip/index.js +7 -0
- package/dist/components/Sidebar/components/ContactUsButton/index.d.ts +8 -0
- package/dist/components/Sidebar/components/ContactUsButton/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/ContactUsButton/index.js +18 -0
- package/dist/components/Sidebar/components/ExploreSection/index.d.ts +11 -0
- package/dist/components/Sidebar/components/ExploreSection/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/ExploreSection/index.js +28 -0
- package/dist/components/Sidebar/components/GptCard/index.d.ts +14 -0
- package/dist/components/Sidebar/components/GptCard/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/GptCard/index.js +34 -0
- package/dist/components/Sidebar/components/IconRenderer/index.d.ts +7 -0
- package/dist/components/Sidebar/components/IconRenderer/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/IconRenderer/index.js +18 -0
- package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts +13 -0
- package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/MenuItemWrapper/index.js +38 -0
- package/dist/components/Sidebar/components/MenuRenderer/CollapsedMenu.d.ts +11 -0
- package/dist/components/Sidebar/components/MenuRenderer/CollapsedMenu.d.ts.map +1 -0
- package/dist/components/Sidebar/components/MenuRenderer/CollapsedMenu.js +84 -0
- package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.d.ts +12 -0
- package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.d.ts.map +1 -0
- package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.js +42 -0
- package/dist/components/Sidebar/components/MenuRenderer/index.d.ts +12 -0
- package/dist/components/Sidebar/components/MenuRenderer/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/MenuRenderer/index.js +29 -0
- package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts +11 -0
- package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/ModuleSwitchButton/index.js +23 -0
- package/dist/components/Sidebar/components/SectionLabel/index.d.ts +7 -0
- package/dist/components/Sidebar/components/SectionLabel/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/SectionLabel/index.js +10 -0
- package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts +15 -0
- package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/SubMenuWrapper/index.js +47 -0
- package/dist/components/Sidebar/components/index.d.ts +11 -0
- package/dist/components/Sidebar/components/index.d.ts.map +1 -0
- package/dist/components/Sidebar/components/index.js +22 -0
- package/dist/components/Sidebar/hooks/index.d.ts +4 -0
- package/dist/components/Sidebar/hooks/index.d.ts.map +1 -0
- package/dist/components/Sidebar/hooks/index.js +8 -0
- package/dist/components/Sidebar/hooks/useActiveDetection.d.ts +11 -0
- package/dist/components/Sidebar/hooks/useActiveDetection.d.ts.map +1 -0
- package/dist/components/Sidebar/hooks/useActiveDetection.js +15 -0
- package/dist/components/Sidebar/hooks/useMenuState.d.ts +11 -0
- package/dist/components/Sidebar/hooks/useMenuState.d.ts.map +1 -0
- package/dist/components/Sidebar/hooks/useMenuState.js +51 -0
- package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts +9 -0
- package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts.map +1 -0
- package/dist/components/Sidebar/hooks/useModuleSwitch.js +20 -0
- package/dist/components/Sidebar/index.d.ts +19 -0
- package/dist/components/Sidebar/index.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +42 -0
- package/dist/components/Sidebar/types/explore.types.d.ts +8 -0
- package/dist/components/Sidebar/types/explore.types.d.ts.map +1 -0
- package/dist/components/Sidebar/types/explore.types.js +1 -0
- package/dist/components/Sidebar/types/gpt.types.d.ts +9 -0
- package/dist/components/Sidebar/types/gpt.types.d.ts.map +1 -0
- package/dist/components/Sidebar/types/gpt.types.js +1 -0
- package/dist/components/Sidebar/types/index.d.ts +6 -0
- package/dist/components/Sidebar/types/index.d.ts.map +1 -0
- package/dist/components/Sidebar/types/index.js +1 -0
- package/dist/components/Sidebar/types/menu.types.d.ts +12 -0
- package/dist/components/Sidebar/types/menu.types.d.ts.map +1 -0
- package/dist/components/Sidebar/types/menu.types.js +1 -0
- package/dist/components/Sidebar/types/module.types.d.ts +8 -0
- package/dist/components/Sidebar/types/module.types.d.ts.map +1 -0
- package/dist/components/Sidebar/types/module.types.js +1 -0
- package/dist/components/Sidebar/types/sidebar.types.d.ts +48 -0
- package/dist/components/Sidebar/types/sidebar.types.d.ts.map +1 -0
- package/dist/components/Sidebar/types/sidebar.types.js +1 -0
- package/dist/index-DKHB_5Ee.js +52 -0
- package/dist/main.d.ts +6 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +60 -49
- package/dist/styles.module-V3iL6ubH.js +11 -0
- package/package.json +1 -1
- package/dist/CalendarGrid-xx9nYA1_.js +0 -237
- package/dist/ScrollDropdown-tf6ex2lE.js +0 -80
- package/dist/assets/DateRangePicker-DNHTCnqT.css +0 -1
- package/dist/assets/ScrollDropdown-CQTxVikn.css +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as r, jsxs as c, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as h } from "react";
|
|
3
|
+
import { C as m, p as n } from "../../../../index-DKHB_5Ee.js";
|
|
4
|
+
import { IconRenderer as t } from "../IconRenderer/index.js";
|
|
5
|
+
import { addBreakOpportunities as u } from "../../Sidebar.utils.js";
|
|
6
|
+
import { s as v } from "../../../../styles.module-V3iL6ubH.js";
|
|
7
|
+
function $({ menuItems: f, isActive: l, isTreeActive: d, onNavigate: a, onMenuItemClick: s }) {
|
|
8
|
+
const b = h((e, i) => {
|
|
9
|
+
const o = e.dashboardServices && e.dashboardServices.length > 0, p = d(e);
|
|
10
|
+
return o ? /* @__PURE__ */ r(
|
|
11
|
+
m,
|
|
12
|
+
{
|
|
13
|
+
active: p,
|
|
14
|
+
icon: /* @__PURE__ */ r("span", { className: v["menu-icon"], children: /* @__PURE__ */ r(t, { icon: e.icon }) }),
|
|
15
|
+
popupClassName: i <= 1 ? n["single-child-popover"] : "",
|
|
16
|
+
children: /* @__PURE__ */ c("div", { className: n["popover-menu"], children: [
|
|
17
|
+
/* @__PURE__ */ r("div", { className: n["popover-title"], children: e.name }),
|
|
18
|
+
/* @__PURE__ */ r("div", { className: n["popover-children"], children: e.dashboardServices.map((C) => w(C)) })
|
|
19
|
+
] })
|
|
20
|
+
},
|
|
21
|
+
e.name
|
|
22
|
+
) : /* @__PURE__ */ r(
|
|
23
|
+
m,
|
|
24
|
+
{
|
|
25
|
+
active: l(e),
|
|
26
|
+
icon: /* @__PURE__ */ r("span", { className: v["menu-icon"], children: /* @__PURE__ */ r(t, { icon: e.icon }) }),
|
|
27
|
+
onClick: () => {
|
|
28
|
+
e.url && a(e.url), s?.(e);
|
|
29
|
+
},
|
|
30
|
+
children: /* @__PURE__ */ r("div", { className: n["popover-title-single"], children: e.name })
|
|
31
|
+
},
|
|
32
|
+
e.name
|
|
33
|
+
);
|
|
34
|
+
}, [l, d, a, s]), w = h((e) => e.dashboardServices && e.dashboardServices.length > 0 ? /* @__PURE__ */ c("div", { className: n["popover-child-with-sub"], children: [
|
|
35
|
+
/* @__PURE__ */ r(
|
|
36
|
+
m,
|
|
37
|
+
{
|
|
38
|
+
active: d(e),
|
|
39
|
+
icon: null,
|
|
40
|
+
label: e.name,
|
|
41
|
+
popupClassName: n["nested-popover"],
|
|
42
|
+
children: /* @__PURE__ */ c("div", { className: n["popover-menu"], children: [
|
|
43
|
+
/* @__PURE__ */ r("div", { className: n["popover-title"], children: e.name }),
|
|
44
|
+
/* @__PURE__ */ r("div", { className: n["popover-children"], children: e.dashboardServices.map((o) => /* @__PURE__ */ r(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: `${n["popover-child-item"]} ${l(o) ? n.active : ""}`,
|
|
48
|
+
onClick: () => {
|
|
49
|
+
o.url && a(o.url), s?.(o);
|
|
50
|
+
},
|
|
51
|
+
onKeyDown: (p) => {
|
|
52
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), o.url && a(o.url), s?.(o));
|
|
53
|
+
},
|
|
54
|
+
role: "menuitem",
|
|
55
|
+
tabIndex: 0,
|
|
56
|
+
children: u(o.name)
|
|
57
|
+
},
|
|
58
|
+
o.name
|
|
59
|
+
)) })
|
|
60
|
+
] })
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ r("span", { className: n["popover-child-arrow"], children: /* @__PURE__ */ r("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M1 1L5 5L1 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
64
|
+
] }, e.name) : /* @__PURE__ */ r(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: `${n["popover-child-item"]} ${l(e) ? n.active : ""}`,
|
|
68
|
+
onClick: () => {
|
|
69
|
+
e.url && a(e.url), s?.(e);
|
|
70
|
+
},
|
|
71
|
+
onKeyDown: (o) => {
|
|
72
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), e.url && a(e.url), s?.(e));
|
|
73
|
+
},
|
|
74
|
+
role: "menuitem",
|
|
75
|
+
tabIndex: 0,
|
|
76
|
+
children: u(e.name)
|
|
77
|
+
},
|
|
78
|
+
e.name
|
|
79
|
+
), [l, d, a, s]);
|
|
80
|
+
return /* @__PURE__ */ r(N, { children: f.map((e, i) => b(e, i)) });
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
$ as CollapsedMenu
|
|
84
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SidebarMenuItem as MenuItem } from '../../types';
|
|
2
|
+
interface ExpandedMenuProps {
|
|
3
|
+
menuItems: MenuItem[];
|
|
4
|
+
currentPath: string;
|
|
5
|
+
isActive: (item: MenuItem) => boolean;
|
|
6
|
+
isTreeActive: (item: MenuItem) => boolean;
|
|
7
|
+
onNavigate: (path: string) => void;
|
|
8
|
+
onMenuItemClick?: (item: MenuItem) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function ExpandedMenu({ menuItems, currentPath, isActive, isTreeActive, onNavigate, onMenuItemClick }: ExpandedMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ExpandedMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandedMenu.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/MenuRenderer/ExpandedMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAK/D,UAAU,iBAAiB;IACzB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC;IAC1C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE,iBAAiB,2CAkD9H"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as n, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as v, useCallback as L } from "react";
|
|
3
|
+
import { MenuItemWrapper as W } from "../MenuItemWrapper/index.js";
|
|
4
|
+
import { SubMenuWrapper as y } from "../SubMenuWrapper/index.js";
|
|
5
|
+
import { useMenuState as C } from "../../hooks/useMenuState.js";
|
|
6
|
+
function m({ menuItems: e, currentPath: u, isActive: a, isTreeActive: s, onNavigate: d, onMenuItemClick: p }) {
|
|
7
|
+
const { openByLevel: c, toggleMenu: t } = C({ menuItems: e, currentPath: u }), h = v(
|
|
8
|
+
() => e.filter((r) => r.dashboardServices && r.dashboardServices.length > 0),
|
|
9
|
+
[e]
|
|
10
|
+
), l = L((r, o = 0) => {
|
|
11
|
+
const g = r.dashboardServices && r.dashboardServices.length > 0, f = `${o}-${r.name}`, S = !!c[f], b = s(r), i = o === 0 && h.length === 1;
|
|
12
|
+
return g ? /* @__PURE__ */ n(
|
|
13
|
+
y,
|
|
14
|
+
{
|
|
15
|
+
item: r,
|
|
16
|
+
isOpen: S,
|
|
17
|
+
active: b,
|
|
18
|
+
collapsed: !1,
|
|
19
|
+
level: o,
|
|
20
|
+
isSingleTopLevel: i,
|
|
21
|
+
onToggle: () => t(f, o, r),
|
|
22
|
+
children: r.dashboardServices.map((M) => l(M, o + 1))
|
|
23
|
+
},
|
|
24
|
+
r.name
|
|
25
|
+
) : /* @__PURE__ */ n(
|
|
26
|
+
W,
|
|
27
|
+
{
|
|
28
|
+
item: r,
|
|
29
|
+
active: a(r),
|
|
30
|
+
collapsed: !1,
|
|
31
|
+
level: o,
|
|
32
|
+
onNavigate: d,
|
|
33
|
+
onMenuItemClick: p
|
|
34
|
+
},
|
|
35
|
+
r.name
|
|
36
|
+
);
|
|
37
|
+
}, [c, a, s, t, d, p, h]);
|
|
38
|
+
return /* @__PURE__ */ n(x, { children: e.map((r) => l(r, 0)) });
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
m as ExpandedMenu
|
|
42
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SidebarMenuItem as MenuItem } from '../../types';
|
|
2
|
+
interface MenuRendererProps {
|
|
3
|
+
menuItems: MenuItem[];
|
|
4
|
+
currentPath: string;
|
|
5
|
+
collapsed: boolean;
|
|
6
|
+
multicloudExploreList?: unknown[];
|
|
7
|
+
onNavigate: (path: string) => void;
|
|
8
|
+
onMenuItemClick?: (item: MenuItem) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function MenuRenderer({ menuItems, currentPath, collapsed, multicloudExploreList, onNavigate, onMenuItemClick }: MenuRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/MenuRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQ/D,UAAU,iBAAiB;IACzB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,EAAE,CAAC;IAClC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE,iBAAiB,2CAwCxI"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as e, jsxs as _, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { useActiveDetection as v } from "../../hooks/useActiveDetection.js";
|
|
3
|
+
import { SectionLabel as y } from "../SectionLabel/index.js";
|
|
4
|
+
import { MULTICLOUD_VIEW_KEY as S, CHAT_BOT_KEY as A } from "../../Sidebar.constants.js";
|
|
5
|
+
import { CollapsedMenu as f } from "./CollapsedMenu.js";
|
|
6
|
+
import { ExpandedMenu as a } from "./ExpandedMenu.js";
|
|
7
|
+
import '../../../../assets/index-C6j9Ze5V.css';const p = {
|
|
8
|
+
"menu-renderer": "_menu-renderer_w3wyj_1"
|
|
9
|
+
};
|
|
10
|
+
function K({ menuItems: r, currentPath: l, collapsed: t, multicloudExploreList: u, onNavigate: i, onMenuItemClick: n }) {
|
|
11
|
+
const { isActive: m, isTreeActive: s } = v({ currentPath: l, allItems: r });
|
|
12
|
+
if (u && u.length > 0 && r.length > 0) {
|
|
13
|
+
const o = r.filter((d) => d.key === S), b = r.filter((d) => d.key !== S);
|
|
14
|
+
return /* @__PURE__ */ e("nav", { className: p["menu-renderer"], role: "menu", "aria-label": "Sidebar navigation", children: t ? /* @__PURE__ */ _(h, { children: [
|
|
15
|
+
/* @__PURE__ */ e(f, { menuItems: o, isActive: m, isTreeActive: s, onNavigate: i, onMenuItemClick: n }),
|
|
16
|
+
/* @__PURE__ */ e(y, { label: "Services", collapsed: t }),
|
|
17
|
+
/* @__PURE__ */ e(f, { menuItems: b, isActive: m, isTreeActive: s, onNavigate: i, onMenuItemClick: n })
|
|
18
|
+
] }) : /* @__PURE__ */ _(h, { children: [
|
|
19
|
+
/* @__PURE__ */ e(a, { menuItems: o, currentPath: l, isActive: m, isTreeActive: s, onNavigate: i, onMenuItemClick: n }),
|
|
20
|
+
/* @__PURE__ */ e(y, { label: "Services", collapsed: t }),
|
|
21
|
+
/* @__PURE__ */ e(a, { menuItems: b, currentPath: l, isActive: m, isTreeActive: s, onNavigate: i, onMenuItemClick: n })
|
|
22
|
+
] }) });
|
|
23
|
+
}
|
|
24
|
+
const c = t ? r : r.filter((o) => o.key !== A);
|
|
25
|
+
return /* @__PURE__ */ e("nav", { className: p["menu-renderer"], role: "menu", "aria-label": "Sidebar navigation", children: t ? /* @__PURE__ */ e(f, { menuItems: c, isActive: m, isTreeActive: s, onNavigate: i, onMenuItemClick: n }) : /* @__PURE__ */ e(a, { menuItems: c, currentPath: l, isActive: m, isTreeActive: s, onNavigate: i, onMenuItemClick: n }) });
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
K as MenuRenderer
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModuleItem } from '../../types';
|
|
2
|
+
interface ModuleSwitchButtonProps {
|
|
3
|
+
modules: ModuleItem[];
|
|
4
|
+
collapsed: boolean;
|
|
5
|
+
currentModuleId?: string;
|
|
6
|
+
userType?: string;
|
|
7
|
+
onModuleSwitch: (moduleName: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function ModuleSwitchButton({ modules, collapsed, currentModuleId, userType, onModuleSwitch }: ModuleSwitchButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ModuleSwitchButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,UAAU,uBAAuB;IAC/B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,uBAAuB,kDA6B5H"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { capitalizeFirstLetter as u } from "../../Sidebar.utils.js";
|
|
3
|
+
import { Tooltip as w } from "../../../Tooltip/index.js";
|
|
4
|
+
import '../../../../assets/index-CSofT_ix.css';const r = {
|
|
5
|
+
"box-shadow": "_box-shadow_rhe0s_1",
|
|
6
|
+
"switch-module-wrapper": "_switch-module-wrapper_rhe0s_10",
|
|
7
|
+
"switch-module-btn": "_switch-module-btn_rhe0s_17",
|
|
8
|
+
"switch-module-collapsed": "_switch-module-collapsed_rhe0s_42"
|
|
9
|
+
};
|
|
10
|
+
function f({ modules: s, collapsed: i, currentModuleId: d, userType: h, onModuleSwitch: a }) {
|
|
11
|
+
if (h !== "CUSTOMER") return null;
|
|
12
|
+
const l = s.filter((e) => e.feEnabled && e.type === "CUSTOMER" && e.id !== d);
|
|
13
|
+
return l.length === 0 ? null : /* @__PURE__ */ t("div", { className: r["box-shadow"], children: l.map((e) => {
|
|
14
|
+
const o = `Switch to ${u(e.displayName)}`, n = /* @__PURE__ */ c("button", { type: "button", className: `${r["switch-module-btn"]} ${i ? r["switch-module-collapsed"] : ""}`, onClick: () => a(e.name), "aria-label": o, children: [
|
|
15
|
+
!i && /* @__PURE__ */ t("span", { children: o }),
|
|
16
|
+
/* @__PURE__ */ t("svg", { width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", style: { marginLeft: i ? 0 : "8px" }, children: /* @__PURE__ */ t("path", { d: "M1.5 1L6.5 6L1.5 11", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
17
|
+
] });
|
|
18
|
+
return i ? /* @__PURE__ */ t("div", { className: r["switch-module-wrapper"], children: /* @__PURE__ */ t(w, { title: o, placement: "right", arrow: !0, children: /* @__PURE__ */ t("span", { children: n }) }) }, e.id) : /* @__PURE__ */ t("div", { className: r["switch-module-wrapper"], children: n }, e.id);
|
|
19
|
+
}) });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
f as ModuleSwitchButton
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/SectionLabel/index.tsx"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,iBAAiB,kDAGnE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import '../../../../assets/index-tIl-UucG.css';const a = {
|
|
3
|
+
"sidebar-tag": "_sidebar-tag_1wvk7_1"
|
|
4
|
+
};
|
|
5
|
+
function i({ label: e, collapsed: r }) {
|
|
6
|
+
return r ? null : /* @__PURE__ */ t("p", { className: a["sidebar-tag"], children: e });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
i as SectionLabel
|
|
10
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SidebarMenuItem } from '../../types';
|
|
3
|
+
interface SubMenuWrapperProps {
|
|
4
|
+
item: SidebarMenuItem;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
active: boolean;
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
level: number;
|
|
9
|
+
isSingleTopLevel?: boolean;
|
|
10
|
+
onToggle: () => void;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function SubMenuWrapper({ item, isOpen, active, collapsed, level, isSingleTopLevel, onToggle, children }: SubMenuWrapperProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/SubMenuWrapper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAwB,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,mBAAmB,kDAuC3I"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { IconRenderer as b } from "../IconRenderer/index.js";
|
|
3
|
+
import '../../../../assets/index-DrxnMAdp.css';const _ = "_submenu_kaorb_1", h = "_open_kaorb_39", p = "_arrow_kaorb_50", k = "_rotate_kaorb_63", e = {
|
|
4
|
+
submenu: _,
|
|
5
|
+
"with-child": "_with-child_kaorb_4",
|
|
6
|
+
"submenu-children": "_submenu-children_kaorb_13",
|
|
7
|
+
"submenu-children-inner": "_submenu-children-inner_kaorb_16",
|
|
8
|
+
"submenu-label": "_submenu-label_kaorb_24",
|
|
9
|
+
open: h,
|
|
10
|
+
arrow: p,
|
|
11
|
+
rotate: k,
|
|
12
|
+
"menu-icon": "_menu-icon_kaorb_67",
|
|
13
|
+
"menu-content": "_menu-content_kaorb_84"
|
|
14
|
+
};
|
|
15
|
+
function f({ item: s, isOpen: r, active: c, collapsed: u, level: l, isSingleTopLevel: a = !1, onToggle: i, children: d }) {
|
|
16
|
+
if (u) return null;
|
|
17
|
+
const m = !(a && r);
|
|
18
|
+
return /* @__PURE__ */ t("div", { className: `${e.submenu} ${r ? e["with-child"] : ""}`, children: [
|
|
19
|
+
/* @__PURE__ */ t(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: `parent-item ${c || r ? "active" : ""}`,
|
|
23
|
+
onClick: () => {
|
|
24
|
+
a && r || i();
|
|
25
|
+
},
|
|
26
|
+
onKeyDown: (o) => {
|
|
27
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), a && r || i());
|
|
28
|
+
},
|
|
29
|
+
role: "menuitem",
|
|
30
|
+
tabIndex: 0,
|
|
31
|
+
"aria-expanded": r,
|
|
32
|
+
style: { display: "flex", alignItems: "center", padding: "8px 12px", cursor: "pointer", borderRadius: "8px", border: "1px solid transparent" },
|
|
33
|
+
children: [
|
|
34
|
+
l === 0 && /* @__PURE__ */ n("span", { className: e["menu-icon"], children: /* @__PURE__ */ n(b, { icon: s.icon }) }),
|
|
35
|
+
/* @__PURE__ */ n("span", { className: e["menu-content"], children: /* @__PURE__ */ t("span", { className: e["submenu-label"], children: [
|
|
36
|
+
/* @__PURE__ */ n("span", { children: s.name }),
|
|
37
|
+
m && /* @__PURE__ */ n("span", { className: `${e.arrow} ${r ? e.rotate : ""}`, children: /* @__PURE__ */ n("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M1 1L5 5L1 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
38
|
+
] }) })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ n("div", { className: `${e["submenu-children"]} ${r ? e.open : ""}`, children: /* @__PURE__ */ n("div", { className: e["submenu-children-inner"], children: d }) })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
f as SubMenuWrapper
|
|
47
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { MenuRenderer } from './MenuRenderer';
|
|
2
|
+
export { MenuItemWrapper } from './MenuItemWrapper';
|
|
3
|
+
export { SubMenuWrapper } from './SubMenuWrapper';
|
|
4
|
+
export { CollapsedTooltip } from './CollapsedTooltip';
|
|
5
|
+
export { ExploreSection } from './ExploreSection';
|
|
6
|
+
export { ModuleSwitchButton } from './ModuleSwitchButton';
|
|
7
|
+
export { ContactUsButton } from './ContactUsButton';
|
|
8
|
+
export { GptCardWrapper } from './GptCard';
|
|
9
|
+
export { IconRenderer } from './IconRenderer';
|
|
10
|
+
export { SectionLabel } from './SectionLabel';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MenuRenderer as e } from "./MenuRenderer/index.js";
|
|
2
|
+
import { MenuItemWrapper as p } from "./MenuItemWrapper/index.js";
|
|
3
|
+
import { SubMenuWrapper as n } from "./SubMenuWrapper/index.js";
|
|
4
|
+
import { C as f } from "../../../index-DKHB_5Ee.js";
|
|
5
|
+
import { ExploreSection as u } from "./ExploreSection/index.js";
|
|
6
|
+
import { ModuleSwitchButton as c } from "./ModuleSwitchButton/index.js";
|
|
7
|
+
import { ContactUsButton as i } from "./ContactUsButton/index.js";
|
|
8
|
+
import { GptCardWrapper as M } from "./GptCard/index.js";
|
|
9
|
+
import { IconRenderer as s } from "./IconRenderer/index.js";
|
|
10
|
+
import { SectionLabel as b } from "./SectionLabel/index.js";
|
|
11
|
+
export {
|
|
12
|
+
f as CollapsedTooltip,
|
|
13
|
+
i as ContactUsButton,
|
|
14
|
+
u as ExploreSection,
|
|
15
|
+
M as GptCardWrapper,
|
|
16
|
+
s as IconRenderer,
|
|
17
|
+
p as MenuItemWrapper,
|
|
18
|
+
e as MenuRenderer,
|
|
19
|
+
c as ModuleSwitchButton,
|
|
20
|
+
b as SectionLabel,
|
|
21
|
+
n as SubMenuWrapper
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useActiveDetection as o } from "./useActiveDetection.js";
|
|
2
|
+
import { useMenuState as u } from "./useMenuState.js";
|
|
3
|
+
import { useModuleSwitch as f } from "./useModuleSwitch.js";
|
|
4
|
+
export {
|
|
5
|
+
o as useActiveDetection,
|
|
6
|
+
u as useMenuState,
|
|
7
|
+
f as useModuleSwitch
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SidebarMenuItem } from '../types';
|
|
2
|
+
interface UseActiveDetectionOptions {
|
|
3
|
+
currentPath: string;
|
|
4
|
+
allItems: SidebarMenuItem[];
|
|
5
|
+
}
|
|
6
|
+
export declare function useActiveDetection({ currentPath, allItems }: UseActiveDetectionOptions): {
|
|
7
|
+
isActive: (item: SidebarMenuItem) => boolean;
|
|
8
|
+
isTreeActive: (item: SidebarMenuItem) => boolean;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=useActiveDetection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActiveDetection.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/hooks/useActiveDetection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,UAAU,yBAAyB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,yBAAyB;qBAE5E,eAAe;yBAIf,eAAe;EAIzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useCallback as c } from "react";
|
|
2
|
+
import { isItemActive as v, isTreeActive as A } from "../Sidebar.utils.js";
|
|
3
|
+
function n({ currentPath: i, allItems: e }) {
|
|
4
|
+
const t = c(
|
|
5
|
+
(o) => v(o, i, e),
|
|
6
|
+
[i, e]
|
|
7
|
+
), s = c(
|
|
8
|
+
(o) => A(o, i, e),
|
|
9
|
+
[i, e]
|
|
10
|
+
);
|
|
11
|
+
return { isActive: t, isTreeActive: s };
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
n as useActiveDetection
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SidebarMenuItem } from '../types';
|
|
2
|
+
interface UseMenuStateOptions {
|
|
3
|
+
menuItems: SidebarMenuItem[];
|
|
4
|
+
currentPath: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function useMenuState({ menuItems, currentPath }: UseMenuStateOptions): {
|
|
7
|
+
openByLevel: Record<string, boolean>;
|
|
8
|
+
toggleMenu: (key: string, level: number, item: SidebarMenuItem) => void;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=useMenuState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMenuState.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/hooks/useMenuState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,UAAU,mBAAmB;IAC3B,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,mBAAmB;;sBAsClE,MAAM,SAAS,MAAM,QAAQ,eAAe;EA4BrD"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useState as u, useEffect as S, useCallback as g } from "react";
|
|
2
|
+
import { isTreeActive as n } from "../Sidebar.utils.js";
|
|
3
|
+
function p({ menuItems: r, currentPath: c }) {
|
|
4
|
+
const [h, d] = u({});
|
|
5
|
+
S(() => {
|
|
6
|
+
if (!r.length) return;
|
|
7
|
+
const e = {}, s = (i, a = 0) => {
|
|
8
|
+
for (const o of i)
|
|
9
|
+
if (n(o, c, r)) {
|
|
10
|
+
e[`${a}-${o.name}`] = !0, o.dashboardServices && s(o.dashboardServices, a + 1);
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
s(r), d(e);
|
|
15
|
+
}, [r]), S(() => {
|
|
16
|
+
if (!r.length) return;
|
|
17
|
+
const e = {}, s = (i, a = 0) => {
|
|
18
|
+
for (const o of i)
|
|
19
|
+
if (n(o, c, r)) {
|
|
20
|
+
e[`${a}-${o.name}`] = !0, o.dashboardServices && s(o.dashboardServices, a + 1);
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
s(r), d((i) => ({ ...i, ...e }));
|
|
25
|
+
}, [c]);
|
|
26
|
+
const v = g(
|
|
27
|
+
(e, s, i) => {
|
|
28
|
+
d((a) => {
|
|
29
|
+
const o = { ...a };
|
|
30
|
+
if (s === 0 && (Object.keys(o).forEach((f) => {
|
|
31
|
+
f !== e && delete o[f];
|
|
32
|
+
}), !a[e] && i.dashboardServices)) {
|
|
33
|
+
const f = ($, b) => {
|
|
34
|
+
for (const t of $)
|
|
35
|
+
if (n(t, c, r)) {
|
|
36
|
+
o[`${b}-${t.name}`] = !0, t.dashboardServices && f(t.dashboardServices, b + 1);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
f(i.dashboardServices, s + 1);
|
|
41
|
+
}
|
|
42
|
+
return o[e] = !a[e], o;
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
[c, r]
|
|
46
|
+
);
|
|
47
|
+
return { openByLevel: h, toggleMenu: v };
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
p as useMenuState
|
|
51
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface UseModuleSwitchOptions {
|
|
2
|
+
onModuleSwitch?: (moduleName: string) => Promise<void>;
|
|
3
|
+
}
|
|
4
|
+
export declare function useModuleSwitch({ onModuleSwitch }: UseModuleSwitchOptions): {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
handleModuleSwitch: (moduleName: string) => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useModuleSwitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModuleSwitch.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/hooks/useModuleSwitch.ts"],"names":[],"mappings":"AAEA,UAAU,sBAAsB;IAC9B,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,wBAAgB,eAAe,CAAC,EAAE,cAAc,EAAE,EAAE,sBAAsB;;qCAInD,MAAM;EAS5B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useState as r, useCallback as i } from "react";
|
|
2
|
+
function u({ onModuleSwitch: t }) {
|
|
3
|
+
const [a, e] = r(!1), s = i(
|
|
4
|
+
async (n) => {
|
|
5
|
+
if (!(!t || a)) {
|
|
6
|
+
e(!0);
|
|
7
|
+
try {
|
|
8
|
+
await t(n);
|
|
9
|
+
} finally {
|
|
10
|
+
e(!1);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
[t, a]
|
|
15
|
+
);
|
|
16
|
+
return { isLoading: a, handleModuleSwitch: s };
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
u as useModuleSwitch
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { Sidebar } from './Sidebar';
|
|
2
|
+
export { default } from './Sidebar';
|
|
3
|
+
export type { SidebarProps, SidebarMenuItem, ExploreItem, ModuleItem, GptCardProps } from './types';
|
|
4
|
+
export { MenuRenderer } from './components/MenuRenderer';
|
|
5
|
+
export { MenuItemWrapper } from './components/MenuItemWrapper';
|
|
6
|
+
export { SubMenuWrapper } from './components/SubMenuWrapper';
|
|
7
|
+
export { CollapsedTooltip } from './components/CollapsedTooltip';
|
|
8
|
+
export { ExploreSection } from './components/ExploreSection';
|
|
9
|
+
export { ModuleSwitchButton } from './components/ModuleSwitchButton';
|
|
10
|
+
export { ContactUsButton } from './components/ContactUsButton';
|
|
11
|
+
export { GptCardWrapper } from './components/GptCard';
|
|
12
|
+
export { IconRenderer } from './components/IconRenderer';
|
|
13
|
+
export { SectionLabel } from './components/SectionLabel';
|
|
14
|
+
export { useActiveDetection } from './hooks/useActiveDetection';
|
|
15
|
+
export { useMenuState } from './hooks/useMenuState';
|
|
16
|
+
export { useModuleSwitch } from './hooks/useModuleSwitch';
|
|
17
|
+
export { normalizeUrl, isItemActive, isTreeActive, capitalizeFirstLetter, addBreakOpportunities } from './Sidebar.utils';
|
|
18
|
+
export { SIDEBAR_WIDTH_EXPANDED, SIDEBAR_WIDTH_COLLAPSED, CHAT_BOT_KEY, MULTICLOUD_VIEW_KEY } from './Sidebar.constants';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGpG,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGzH,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Sidebar as o, Sidebar as t } from "./Sidebar.js";
|
|
2
|
+
import { MenuRenderer as i } from "./components/MenuRenderer/index.js";
|
|
3
|
+
import { MenuItemWrapper as a } from "./components/MenuItemWrapper/index.js";
|
|
4
|
+
import { SubMenuWrapper as x } from "./components/SubMenuWrapper/index.js";
|
|
5
|
+
import { C as u } from "../../index-DKHB_5Ee.js";
|
|
6
|
+
import { ExploreSection as d } from "./components/ExploreSection/index.js";
|
|
7
|
+
import { ModuleSwitchButton as s } from "./components/ModuleSwitchButton/index.js";
|
|
8
|
+
import { ContactUsButton as D } from "./components/ContactUsButton/index.js";
|
|
9
|
+
import { GptCardWrapper as I } from "./components/GptCard/index.js";
|
|
10
|
+
import { IconRenderer as _ } from "./components/IconRenderer/index.js";
|
|
11
|
+
import { SectionLabel as M } from "./components/SectionLabel/index.js";
|
|
12
|
+
import { useActiveDetection as B } from "./hooks/useActiveDetection.js";
|
|
13
|
+
import { useMenuState as W } from "./hooks/useMenuState.js";
|
|
14
|
+
import { useModuleSwitch as O } from "./hooks/useModuleSwitch.js";
|
|
15
|
+
import { addBreakOpportunities as U, capitalizeFirstLetter as v, isItemActive as H, isTreeActive as h, normalizeUrl as w } from "./Sidebar.utils.js";
|
|
16
|
+
import { CHAT_BOT_KEY as K, MULTICLOUD_VIEW_KEY as P, SIDEBAR_WIDTH_COLLAPSED as Y, SIDEBAR_WIDTH_EXPANDED as k } from "./Sidebar.constants.js";
|
|
17
|
+
export {
|
|
18
|
+
K as CHAT_BOT_KEY,
|
|
19
|
+
u as CollapsedTooltip,
|
|
20
|
+
D as ContactUsButton,
|
|
21
|
+
d as ExploreSection,
|
|
22
|
+
I as GptCardWrapper,
|
|
23
|
+
_ as IconRenderer,
|
|
24
|
+
P as MULTICLOUD_VIEW_KEY,
|
|
25
|
+
a as MenuItemWrapper,
|
|
26
|
+
i as MenuRenderer,
|
|
27
|
+
s as ModuleSwitchButton,
|
|
28
|
+
Y as SIDEBAR_WIDTH_COLLAPSED,
|
|
29
|
+
k as SIDEBAR_WIDTH_EXPANDED,
|
|
30
|
+
M as SectionLabel,
|
|
31
|
+
o as Sidebar,
|
|
32
|
+
x as SubMenuWrapper,
|
|
33
|
+
U as addBreakOpportunities,
|
|
34
|
+
v as capitalizeFirstLetter,
|
|
35
|
+
t as default,
|
|
36
|
+
H as isItemActive,
|
|
37
|
+
h as isTreeActive,
|
|
38
|
+
w as normalizeUrl,
|
|
39
|
+
B as useActiveDetection,
|
|
40
|
+
W as useMenuState,
|
|
41
|
+
O as useModuleSwitch
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explore.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/types/explore.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SidebarMenuItem } from './menu.types';
|
|
2
|
+
export interface GptCardProps {
|
|
3
|
+
item: SidebarMenuItem;
|
|
4
|
+
onNavigate: (path: string) => void;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
open: boolean;
|
|
7
|
+
onToggle: (open: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=gpt.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpt.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/types/gpt.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|