@ck-ui/component-library 2.0.1 → 2.0.3
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/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-eZS6kms7.css +1 -0
- package/dist/assets/index-tIl-UucG.css +1 -0
- package/dist/assets/styles-DGlqPkdv.css +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +271 -196
- 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.d.ts +2 -2
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.js +118 -40
- package/dist/components/Sidebar/Sidebar.types.d.ts +5 -51
- package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.utils.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.utils.d.ts.map +1 -1
- package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/CollapsedTooltip/index.js +5 -33
- package/dist/components/Sidebar/components/ContactUsButton/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/ContactUsButton/index.js +11 -7
- package/dist/components/Sidebar/components/ExploreSection/index.d.ts +1 -1
- package/dist/components/Sidebar/components/ExploreSection/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/ExploreSection/index.js +22 -16
- package/dist/components/Sidebar/components/GptCard/index.d.ts +1 -1
- package/dist/components/Sidebar/components/GptCard/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/GptCard/index.js +27 -15
- package/dist/components/Sidebar/components/IconRenderer/index.js +10 -8
- package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts +1 -1
- package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/MenuItemWrapper/index.js +19 -24
- 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 +18 -0
- package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.d.ts.map +1 -0
- package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.js +59 -0
- package/dist/components/Sidebar/components/MenuRenderer/index.d.ts +5 -2
- package/dist/components/Sidebar/components/MenuRenderer/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/MenuRenderer/index.js +25 -73
- package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts +1 -1
- package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/ModuleSwitchButton/index.js +17 -12
- package/dist/components/Sidebar/components/SectionLabel/index.d.ts +4 -2
- package/dist/components/Sidebar/components/SectionLabel/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/SectionLabel/index.js +6 -4
- package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts +3 -2
- package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts.map +1 -1
- package/dist/components/Sidebar/components/SubMenuWrapper/index.js +34 -18
- 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 +1 -1
- package/dist/components/Sidebar/hooks/useActiveDetection.d.ts.map +1 -1
- package/dist/components/Sidebar/hooks/useMenuState.d.ts +9 -3
- package/dist/components/Sidebar/hooks/useMenuState.d.ts.map +1 -1
- package/dist/components/Sidebar/hooks/useMenuState.js +56 -38
- package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts +4 -2
- package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts.map +1 -1
- package/dist/components/Sidebar/index.d.ts +16 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +40 -3
- 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 +51 -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-CSxlVCTW.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-xqgv3wwP.js +12 -0
- package/package.json +1 -1
- package/dist/assets/styles-Dz05pjuA.css +0 -1
- package/dist/styles.module-BIdwTiuE.js +0 -66
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateRangePicker.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/DateRangePicker/_types/dateRangePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE/E,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;AAElF,MAAM,WAAW,oBAAoB;IACnC,
|
|
1
|
+
{"version":3,"file":"dateRangePicker.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/DateRangePicker/_types/dateRangePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE/E,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;AAElF,MAAM,WAAW,oBAAoB;IACnC,0HAA0H;IAC1H,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,iEAAiE;IACjE,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,wDAAwD;IACxD,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;2FACuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -14,11 +14,14 @@ export interface ButtonProps {
|
|
|
14
14
|
label?: string;
|
|
15
15
|
onClick?: () => void;
|
|
16
16
|
size?: ButtonSize;
|
|
17
|
+
disabled?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export type ButtonLayout = (typeof BUTTON_LAYOUT)[keyof typeof BUTTON_LAYOUT];
|
|
20
|
+
export type ButtonAlignment = "left" | "center" | "right";
|
|
19
21
|
export interface FooterProps {
|
|
20
22
|
children?: React.ReactNode;
|
|
21
23
|
buttonLayout?: ButtonLayout;
|
|
24
|
+
buttonAlignment?: ButtonAlignment;
|
|
22
25
|
primaryButtonDetail?: ButtonProps;
|
|
23
26
|
secondaryButtonDetail?: ButtonProps;
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popupAndDialog.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/PopupAndDialogBox/_types/popupAndDialog.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,MAAM,UAAU,GAAE,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"popupAndDialog.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/PopupAndDialogBox/_types/popupAndDialog.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,MAAM,UAAU,GAAE,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,YAAY,GACvB,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,qBAAqB,CAAC,EAAE,WAAW,CAAC;CACrC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogFooter.d.ts","sourceRoot":"","sources":["../../../../lib/components/PopupAndDialogBox/components/DialogFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"DialogFooter.d.ts","sourceRoot":"","sources":["../../../../lib/components/PopupAndDialogBox/components/DialogFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAuD9C,CAAC"}
|
|
@@ -1,49 +1,56 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, jsxs as f, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { s as
|
|
4
|
-
import { BUTTON_LAYOUT as
|
|
5
|
-
import { CKButton as
|
|
6
|
-
const
|
|
7
|
-
children:
|
|
8
|
-
buttonLayout:
|
|
9
|
-
|
|
3
|
+
import { s as b } from "../../../styles.module-yNDMDNO-.js";
|
|
4
|
+
import { BUTTON_LAYOUT as o, noop as m, BUTTON_LABEL as C } from "../constant/popupAndDialog.js";
|
|
5
|
+
import { CKButton as d } from "../../CKButton/index.js";
|
|
6
|
+
const v = ({
|
|
7
|
+
children: r,
|
|
8
|
+
buttonLayout: c = o.DOUBLE,
|
|
9
|
+
buttonAlignment: a = "right",
|
|
10
|
+
primaryButtonDetail: e,
|
|
10
11
|
secondaryButtonDetail: l
|
|
11
12
|
}) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const n = {
|
|
14
|
+
justifyContent: a === "left" ? "flex-start" : a === "center" ? "center" : "flex-end"
|
|
15
|
+
};
|
|
16
|
+
if (r)
|
|
17
|
+
return /* @__PURE__ */ i("div", { className: b["ckds-dialog-footer"], style: n, children: r });
|
|
18
|
+
const s = e || l;
|
|
19
|
+
return /* @__PURE__ */ f("div", { className: `footer-content ${b["ckds-dialog-footer"]}`, style: n, children: [
|
|
20
|
+
c === o.SINGLE && /* @__PURE__ */ i(
|
|
21
|
+
d,
|
|
18
22
|
{
|
|
19
|
-
variant:
|
|
20
|
-
label:
|
|
21
|
-
size:
|
|
22
|
-
onClick:
|
|
23
|
+
variant: e ? "primary" : "secondary",
|
|
24
|
+
label: s?.label,
|
|
25
|
+
size: s?.size,
|
|
26
|
+
onClick: s?.onClick,
|
|
27
|
+
disabled: s?.disabled
|
|
23
28
|
}
|
|
24
29
|
),
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
30
|
+
c === o.DOUBLE && /* @__PURE__ */ f(k, { children: [
|
|
31
|
+
/* @__PURE__ */ i(
|
|
32
|
+
d,
|
|
28
33
|
{
|
|
29
34
|
variant: "secondary",
|
|
30
|
-
label: l?.label ??
|
|
35
|
+
label: l?.label ?? C?.SECONDARY,
|
|
31
36
|
size: l?.size ?? "small",
|
|
32
|
-
onClick: l?.onClick ??
|
|
37
|
+
onClick: l?.onClick ?? m,
|
|
38
|
+
disabled: l?.disabled
|
|
33
39
|
}
|
|
34
40
|
),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
41
|
+
/* @__PURE__ */ i(
|
|
42
|
+
d,
|
|
37
43
|
{
|
|
38
44
|
variant: "primary",
|
|
39
|
-
label:
|
|
40
|
-
size:
|
|
41
|
-
onClick:
|
|
45
|
+
label: e?.label ?? C?.PRIMARY,
|
|
46
|
+
size: e?.size ?? "small",
|
|
47
|
+
onClick: e?.onClick ?? m,
|
|
48
|
+
disabled: e?.disabled
|
|
42
49
|
}
|
|
43
50
|
)
|
|
44
51
|
] })
|
|
45
52
|
] });
|
|
46
53
|
};
|
|
47
54
|
export {
|
|
48
|
-
|
|
55
|
+
v as DialogFooter
|
|
49
56
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SidebarProps } from './
|
|
2
|
-
export declare function Sidebar({ menuItems, currentPath, collapsed, multicloudExploreList, moduleList, currentModuleId, userType, gptCardEnabled, renderGptCard, cloudProviderIcons, onNavigate, onModuleSwitch, onContactUsClick, contactUsUrl, onMenuItemClick, isLoaderVisible, hidden, className, }: SidebarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
import { SidebarProps } from './types';
|
|
2
|
+
export declare function Sidebar({ menuItems, currentPath, collapsed, multicloudExploreList, moduleList, currentModuleId, userType, gptCardEnabled, renderGptCard, cloudProviderIcons, onNavigate, onModuleSwitch, onContactUsClick, contactUsUrl, onMenuItemClick, isLoaderVisible, hidden, className, renderFooter, renderHeader, showChildIcons, maxOpenParents, maxOpenChildren, }: SidebarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export declare namespace Sidebar {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAW5C,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,WAAW,EACX,SAAS,EACT,qBAAqB,EACrB,UAAU,EACV,eAAe,EACf,QAAQ,EACR,cAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,eAAuB,EACvB,MAAc,EACd,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,cAAsB,EACtB,cAAc,EACd,eAAe,GAChB,EAAE,YAAY,kDAqGd;yBA7He,OAAO;;;AAgIvB,eAAe,OAAO,CAAC"}
|
|
@@ -1,46 +1,124 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { CHAT_BOT_KEY as
|
|
4
|
-
import { useModuleSwitch as
|
|
5
|
-
import { MenuRenderer as
|
|
6
|
-
import { ExploreSection as
|
|
7
|
-
import { ModuleSwitchButton as
|
|
8
|
-
import { ContactUsButton as
|
|
9
|
-
import { GptCardWrapper as
|
|
10
|
-
import { Loader as
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as H, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useMemo as b } from "react";
|
|
3
|
+
import { CHAT_BOT_KEY as K } from "./Sidebar.constants.js";
|
|
4
|
+
import { useModuleSwitch as R } from "./hooks/useModuleSwitch.js";
|
|
5
|
+
import { MenuRenderer as U } from "./components/MenuRenderer/index.js";
|
|
6
|
+
import { ExploreSection as V } from "./components/ExploreSection/index.js";
|
|
7
|
+
import { ModuleSwitchButton as W } from "./components/ModuleSwitchButton/index.js";
|
|
8
|
+
import { ContactUsButton as Y } from "./components/ContactUsButton/index.js";
|
|
9
|
+
import { GptCardWrapper as q } from "./components/GptCard/index.js";
|
|
10
|
+
import { Loader as z } from "../Loader/index.js";
|
|
11
|
+
import '../../assets/Sidebar-D5jVJ-ln.css';const D = "_collapseMenu_drvuf_27", o = {
|
|
12
|
+
"custom-sidebar": "_custom-sidebar_drvuf_1",
|
|
13
|
+
"sidebar-V2": "_sidebar-V2_drvuf_12",
|
|
14
|
+
"no-chatbot-padding": "_no-chatbot-padding_drvuf_23",
|
|
15
|
+
collapseMenu: D,
|
|
16
|
+
"sidebar-list-wrapper": "_sidebar-list-wrapper_drvuf_31",
|
|
17
|
+
"chatbot-open": "_chatbot-open_drvuf_36",
|
|
18
|
+
"chatbot-collapse": "_chatbot-collapse_drvuf_43"
|
|
19
|
+
};
|
|
20
|
+
function F({
|
|
21
|
+
menuItems: d,
|
|
22
|
+
currentPath: c,
|
|
15
23
|
collapsed: t,
|
|
16
|
-
multicloudExploreList:
|
|
17
|
-
moduleList:
|
|
18
|
-
currentModuleId:
|
|
19
|
-
userType:
|
|
20
|
-
gptCardEnabled:
|
|
21
|
-
renderGptCard:
|
|
22
|
-
cloudProviderIcons:
|
|
23
|
-
onNavigate:
|
|
24
|
-
onModuleSwitch:
|
|
25
|
-
onContactUsClick:
|
|
26
|
-
contactUsUrl:
|
|
27
|
-
onMenuItemClick:
|
|
28
|
-
isLoaderVisible:
|
|
29
|
-
hidden:
|
|
30
|
-
className:
|
|
24
|
+
multicloudExploreList: r,
|
|
25
|
+
moduleList: n,
|
|
26
|
+
currentModuleId: h,
|
|
27
|
+
userType: f,
|
|
28
|
+
gptCardEnabled: m = !1,
|
|
29
|
+
renderGptCard: l,
|
|
30
|
+
cloudProviderIcons: M,
|
|
31
|
+
onNavigate: u,
|
|
32
|
+
onModuleSwitch: g,
|
|
33
|
+
onContactUsClick: v,
|
|
34
|
+
contactUsUrl: S,
|
|
35
|
+
onMenuItemClick: w,
|
|
36
|
+
isLoaderVisible: s = !1,
|
|
37
|
+
hidden: C = !1,
|
|
38
|
+
className: B,
|
|
39
|
+
renderFooter: j,
|
|
40
|
+
renderHeader: y,
|
|
41
|
+
showChildIcons: G = !1,
|
|
42
|
+
maxOpenParents: O,
|
|
43
|
+
maxOpenChildren: k
|
|
31
44
|
}) {
|
|
32
|
-
const [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
const [_, x] = I(!0), { handleModuleSwitch: N } = R({ onModuleSwitch: g }), i = b(
|
|
46
|
+
() => d.filter((p) => Object.keys(p).length > 0),
|
|
47
|
+
[d]
|
|
48
|
+
), a = b(
|
|
49
|
+
() => i.find((p) => p.key === K),
|
|
50
|
+
[i]
|
|
51
|
+
), T = () => a && !t && m ? _ ? o["chatbot-open"] : o["chatbot-collapse"] : "";
|
|
52
|
+
if (C) return null;
|
|
53
|
+
const A = [
|
|
54
|
+
o["custom-sidebar"],
|
|
55
|
+
o["sidebar-V2"],
|
|
56
|
+
t ? o.collapseMenu : "",
|
|
57
|
+
T(),
|
|
58
|
+
a && !t ? "" : o["no-chatbot-padding"],
|
|
59
|
+
B || ""
|
|
60
|
+
].filter(Boolean).join(" ");
|
|
61
|
+
return /* @__PURE__ */ H("div", { className: A, "data-testid": "sidebar", children: [
|
|
62
|
+
s && /* @__PURE__ */ e(z, { popup: !0 }),
|
|
63
|
+
y?.(),
|
|
64
|
+
n && n.length > 0 && /* @__PURE__ */ e(
|
|
65
|
+
W,
|
|
66
|
+
{
|
|
67
|
+
modules: n,
|
|
68
|
+
collapsed: t,
|
|
69
|
+
currentModuleId: h,
|
|
70
|
+
userType: f,
|
|
71
|
+
onModuleSwitch: N
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ e("div", { className: o["sidebar-list-wrapper"], children: /* @__PURE__ */ e(
|
|
75
|
+
U,
|
|
76
|
+
{
|
|
77
|
+
menuItems: i,
|
|
78
|
+
currentPath: c,
|
|
79
|
+
collapsed: t,
|
|
80
|
+
multicloudExploreList: r,
|
|
81
|
+
onNavigate: u,
|
|
82
|
+
onMenuItemClick: w,
|
|
83
|
+
showChildIcons: G,
|
|
84
|
+
maxOpenParents: O,
|
|
85
|
+
maxOpenChildren: k
|
|
86
|
+
}
|
|
87
|
+
) }),
|
|
88
|
+
r && r.length > 0 && /* @__PURE__ */ e(
|
|
89
|
+
V,
|
|
90
|
+
{
|
|
91
|
+
exploreList: r,
|
|
92
|
+
collapsed: t,
|
|
93
|
+
userType: f,
|
|
94
|
+
cloudProviderIcons: M
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
!s && m && a && /* @__PURE__ */ e(
|
|
98
|
+
q,
|
|
99
|
+
{
|
|
100
|
+
item: a,
|
|
101
|
+
collapsed: t,
|
|
102
|
+
currentPath: c,
|
|
103
|
+
onNavigate: u,
|
|
104
|
+
open: _,
|
|
105
|
+
onToggle: x,
|
|
106
|
+
renderGptCard: l
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
j?.(),
|
|
110
|
+
!s && /* @__PURE__ */ e(
|
|
111
|
+
Y,
|
|
112
|
+
{
|
|
113
|
+
collapsed: t,
|
|
114
|
+
contactUsUrl: S,
|
|
115
|
+
onContactUsClick: v
|
|
116
|
+
}
|
|
117
|
+
)
|
|
40
118
|
] });
|
|
41
119
|
}
|
|
42
|
-
|
|
120
|
+
F.displayName = "Sidebar";
|
|
43
121
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
122
|
+
F as Sidebar,
|
|
123
|
+
F as default
|
|
46
124
|
};
|
|
@@ -1,52 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
key?: string;
|
|
7
|
-
exactMatch?: boolean;
|
|
8
|
-
journey?: string[];
|
|
9
|
-
tooltip?: string[];
|
|
10
|
-
dashboardServices?: SidebarMenuItem[];
|
|
11
|
-
}
|
|
12
|
-
export interface ExploreItem {
|
|
13
|
-
cloudProvider: string;
|
|
14
|
-
displayName: string;
|
|
15
|
-
link: string;
|
|
16
|
-
icon?: string | ReactNode;
|
|
17
|
-
}
|
|
18
|
-
export interface ModuleItem {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
displayName: string;
|
|
22
|
-
feEnabled: boolean;
|
|
23
|
-
type: string;
|
|
24
|
-
}
|
|
25
|
-
export interface GptCardProps {
|
|
26
|
-
item: SidebarMenuItem;
|
|
27
|
-
onNavigate: (path: string) => void;
|
|
28
|
-
disabled: boolean;
|
|
29
|
-
open: boolean;
|
|
30
|
-
onToggle: (open: boolean) => void;
|
|
31
|
-
}
|
|
32
|
-
export interface SidebarProps {
|
|
33
|
-
menuItems: SidebarMenuItem[];
|
|
34
|
-
currentPath: string;
|
|
35
|
-
collapsed: boolean;
|
|
36
|
-
multicloudExploreList?: ExploreItem[];
|
|
37
|
-
moduleList?: ModuleItem[];
|
|
38
|
-
currentModuleId?: string;
|
|
39
|
-
userType?: string;
|
|
40
|
-
gptCardEnabled?: boolean;
|
|
41
|
-
renderGptCard?: (props: GptCardProps) => ReactNode;
|
|
42
|
-
cloudProviderIcons?: Record<string, ReactNode>;
|
|
43
|
-
onNavigate: (path: string) => void;
|
|
44
|
-
onModuleSwitch?: (moduleName: string) => Promise<void>;
|
|
45
|
-
onContactUsClick?: () => void;
|
|
46
|
-
contactUsUrl?: string;
|
|
47
|
-
onMenuItemClick?: (item: SidebarMenuItem) => void;
|
|
48
|
-
isLoaderVisible?: boolean;
|
|
49
|
-
hidden?: boolean;
|
|
50
|
-
className?: string;
|
|
51
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import types from "./types" instead.
|
|
3
|
+
* This file is kept for backwards compatibility.
|
|
4
|
+
*/
|
|
5
|
+
export type { SidebarProps, SidebarMenuItem, ExploreItem, ModuleItem, GptCardProps } from './types';
|
|
52
6
|
//# sourceMappingURL=Sidebar.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.types.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Sidebar.types.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SidebarMenuItem } from './
|
|
1
|
+
import { SidebarMenuItem } from './types';
|
|
2
2
|
export declare function normalizeUrl(url: string | undefined): string;
|
|
3
3
|
export declare function isItemActive(item: SidebarMenuItem, currentPath: string, allItems: SidebarMenuItem[]): boolean;
|
|
4
4
|
export declare function isTreeActive(item: SidebarMenuItem, currentPath: string, allItems: SidebarMenuItem[]): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.utils.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Sidebar.utils.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQ5D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GACtE,OAAO,CAqBT;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GACtE,OAAO,CAGT;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAEtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/CollapsedTooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/CollapsedTooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzD,UAAU,qBAAqB;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAY,EAAE,QAAQ,EAAE,cAAmB,EAAE,OAAO,EAAE,EAAE,qBAAqB,2CA4B7H"}
|
|
@@ -1,35 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const [l, i] = h(!1), N = p(null), o = p(null), c = () => {
|
|
6
|
-
o.current && (clearTimeout(o.current), o.current = null), i(!0);
|
|
7
|
-
}, u = () => {
|
|
8
|
-
o.current = setTimeout(() => i(!1), 80);
|
|
9
|
-
};
|
|
10
|
-
return /* @__PURE__ */ t("div", { className: e["sidebar-popup"], ref: N, onMouseEnter: c, onMouseLeave: u, children: [
|
|
11
|
-
/* @__PURE__ */ t(
|
|
12
|
-
"div",
|
|
13
|
-
{
|
|
14
|
-
className: `${e["sidebar-menu-item"]} ${m || l ? e.active : ""}`,
|
|
15
|
-
onClick: a,
|
|
16
|
-
role: "menuitem",
|
|
17
|
-
tabIndex: 0,
|
|
18
|
-
onKeyDown: (n) => {
|
|
19
|
-
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), a?.());
|
|
20
|
-
},
|
|
21
|
-
children: [
|
|
22
|
-
d,
|
|
23
|
-
r && /* @__PURE__ */ s("span", { className: e["menu-content"], children: r })
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
l && /* @__PURE__ */ t("div", { className: `${e["popover-container"]} ${v}`, onMouseEnter: c, onMouseLeave: u, role: "tooltip", children: [
|
|
28
|
-
/* @__PURE__ */ s("div", { className: e["popover-arrow"] }),
|
|
29
|
-
/* @__PURE__ */ s("div", { className: e["popover-content"], children: f })
|
|
30
|
-
] })
|
|
31
|
-
] });
|
|
32
|
-
}
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../../../styles.module-xqgv3wwP.js";
|
|
4
|
+
import { C as m } from "../../../../index-CSxlVCTW.js";
|
|
33
5
|
export {
|
|
34
|
-
|
|
6
|
+
m as CollapsedTooltip
|
|
35
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ContactUsButton/index.tsx"],"names":[],"mappings":"AAGA,UAAU,oBAAoB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ContactUsButton/index.tsx"],"names":[],"mappings":"AAGA,UAAU,oBAAoB;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAQD,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,EAAE,oBAAoB,2CAyBlG"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { jsx as n, jsxs as s, Fragment as a } from "react/jsx-runtime";
|
|
2
2
|
import { IconRenderer as i } from "../IconRenderer/index.js";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import '../../../../assets/index-B5N2Zvs1.css';const t = {
|
|
4
|
+
"contact-us-btn": "_contact-us-btn_1jr87_1",
|
|
5
|
+
"contact-us-link": "_contact-us-link_1jr87_10",
|
|
6
|
+
"collapsed-link": "_collapsed-link_1jr87_37",
|
|
7
|
+
"menu-icon": "_menu-icon_1jr87_44"
|
|
8
|
+
}, u = /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M13.34 10.903c-.87-.87-1.94-.87-2.8 0l-.7.7c-.06.06-.13.09-.21.09-.08 0-.15-.03-.21-.09-.89-.63-1.7-1.37-2.42-2.19-.72-.82-1.32-1.71-1.78-2.67-.03-.06-.04-.12-.03-.18.01-.06.04-.11.09-.15l.7-.7c.87-.87.87-1.94 0-2.8L4.63 1.49c-.87-.87-1.94-.87-2.8 0l-.7.7C.37 2.95-.1 3.94.02 4.97c.26 2.23 1.21 4.33 2.72 6.03 1.51 1.7 3.47 2.89 5.64 3.42.41.1.83.15 1.25.15 1.05 0 2.06-.4 2.82-1.13l.7-.7c.87-.87.87-1.94 0-2.8l-1.81-1.01z", fill: "currentColor" }) });
|
|
9
|
+
function m({ collapsed: c, contactUsUrl: e, onContactUsClick: l }) {
|
|
10
|
+
const r = /* @__PURE__ */ n("span", { className: t["menu-icon"], children: /* @__PURE__ */ n(i, { icon: u }) }), o = /* @__PURE__ */ s(a, { children: [
|
|
11
|
+
r,
|
|
8
12
|
!c && /* @__PURE__ */ n("span", { children: "Contact Us" })
|
|
9
13
|
] });
|
|
10
|
-
return e && !
|
|
14
|
+
return e && !l ? /* @__PURE__ */ n("div", { className: t["contact-us-btn"], children: /* @__PURE__ */ n("a", { href: e, rel: "noreferrer", className: `${t["contact-us-link"]} ${c ? t["collapsed-link"] : ""}`, "aria-label": "Contact Us", children: o }) }) : /* @__PURE__ */ n("div", { className: t["contact-us-btn"], children: /* @__PURE__ */ n("button", { type: "button", onClick: l, className: `${t["contact-us-link"]} ${c ? t["collapsed-link"] : ""}`, "aria-label": "Contact Us", children: o }) });
|
|
11
15
|
}
|
|
12
16
|
export {
|
|
13
|
-
|
|
17
|
+
m as ContactUsButton
|
|
14
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ExploreSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ExploreSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,UAAU,mBAAmB;IAC3B,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAChD;AAED,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,mBAAmB,kDA6B3G"}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
2
|
-
import { SectionLabel as
|
|
3
|
-
import { IconRenderer as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { SectionLabel as d } from "../SectionLabel/index.js";
|
|
3
|
+
import { IconRenderer as p } from "../IconRenderer/index.js";
|
|
4
|
+
import '../../../../assets/index-BD0iilmm.css';const n = {
|
|
5
|
+
"explore-section": "_explore-section_1wpmc_1",
|
|
6
|
+
"explore-collapsed": "_explore-collapsed_1wpmc_5",
|
|
7
|
+
"explore-links": "_explore-links_1wpmc_8",
|
|
8
|
+
"cursor-not-allowed": "_cursor-not-allowed_1wpmc_41",
|
|
9
|
+
"pointer-events-none": "_pointer-events-none_1wpmc_45"
|
|
10
|
+
};
|
|
11
|
+
function v({ exploreList: l, collapsed: r, userType: t, cloudProviderIcons: a }) {
|
|
6
12
|
if (!l || l.length === 0) return null;
|
|
7
|
-
const
|
|
8
|
-
return /* @__PURE__ */ s("div", { className: `${
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
l.map((
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */ s("div", { className:
|
|
13
|
-
!
|
|
14
|
-
!
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
] },
|
|
13
|
+
const c = t === "CLOUDONOMICS";
|
|
14
|
+
return /* @__PURE__ */ s("div", { className: `${n["explore-section"]} ${r ? n["explore-collapsed"] : ""}`, children: [
|
|
15
|
+
/* @__PURE__ */ e(d, { label: "Explore", collapsed: r }),
|
|
16
|
+
l.map((o) => {
|
|
17
|
+
const i = a?.[o.cloudProvider] || o.icon;
|
|
18
|
+
return /* @__PURE__ */ s("div", { className: n["explore-links"], children: [
|
|
19
|
+
!r && /* @__PURE__ */ e(p, { icon: i }),
|
|
20
|
+
!r && /* @__PURE__ */ e("span", { children: o.displayName }),
|
|
21
|
+
/* @__PURE__ */ e("div", { className: c ? n["cursor-not-allowed"] : "", children: /* @__PURE__ */ e("a", { href: `//${o.link}`, target: "_blank", rel: "noopener noreferrer", className: c ? n["pointer-events-none"] : "", "aria-label": `Open ${o.displayName}`, children: r ? /* @__PURE__ */ e(p, { icon: i }) : /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M11.667 11.667H2.333V2.333H7V1H2.333C1.593 1 1 1.6 1 2.333v9.334C1 12.4 1.593 13 2.333 13h9.334C12.4 13 13 12.4 13 11.667V7h-1.333v4.667zM8.333 1v1.333h2.394L4.08 8.98l.94.94 6.647-6.647v2.394H13V1H8.333z", fill: "currentColor" }) }) }) })
|
|
22
|
+
] }, o.cloudProvider);
|
|
17
23
|
})
|
|
18
24
|
] });
|
|
19
25
|
}
|
|
20
26
|
export {
|
|
21
|
-
|
|
27
|
+
v as ExploreSection
|
|
22
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/GptCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/GptCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,mBAAmB;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,SAAS,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,mBAAmB,kDAuC9H"}
|
|
@@ -1,22 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import '../../../../assets/index-B8lwBNV9.css';const t = {
|
|
3
|
+
"chat-bot-btn": "_chat-bot-btn_mfd85_1",
|
|
4
|
+
"gpt-disabled": "_gpt-disabled_mfd85_11",
|
|
5
|
+
"gpt-container": "_gpt-container_mfd85_16",
|
|
6
|
+
"gpt-header": "_gpt-header_mfd85_28",
|
|
7
|
+
"gpt-new-tag": "_gpt-new-tag_mfd85_34",
|
|
8
|
+
"gpt-toggle-btn": "_gpt-toggle-btn_mfd85_46",
|
|
9
|
+
"gpt-body": "_gpt-body_mfd85_60",
|
|
10
|
+
"gpt-title": "_gpt-title_mfd85_64",
|
|
11
|
+
"gpt-icons-row": "_gpt-icons-row_mfd85_75",
|
|
12
|
+
"gpt-subtitle": "_gpt-subtitle_mfd85_82",
|
|
13
|
+
"gpt-start-btn": "_gpt-start-btn_mfd85_88"
|
|
14
|
+
};
|
|
15
|
+
function h({ item: a, collapsed: o, currentPath: c, onNavigate: n, open: s, onToggle: l, renderGptCard: r }) {
|
|
16
|
+
if (o) return null;
|
|
17
|
+
const i = c.endsWith("ck-gpt"), g = () => {
|
|
18
|
+
a.url ? n(a.url) : a.journey?.length && n(`/dashboard/${a.journey[0]}`);
|
|
7
19
|
};
|
|
8
|
-
return
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
20
|
+
return r ? /* @__PURE__ */ e("div", { className: `${t["chat-bot-btn"]} ${i ? t["gpt-disabled"] : ""}`, children: /* @__PURE__ */ e("div", { className: t["gpt-container"], children: r({ item: a, onNavigate: n, disabled: i, open: s, onToggle: l }) }) }) : /* @__PURE__ */ e("div", { className: `${t["chat-bot-btn"]} ${i ? t["gpt-disabled"] : ""}`, children: /* @__PURE__ */ d("div", { className: t["gpt-container"], children: [
|
|
21
|
+
/* @__PURE__ */ d("div", { className: t["gpt-header"], children: [
|
|
22
|
+
/* @__PURE__ */ e("span", { className: t["gpt-new-tag"], children: "★ New" }),
|
|
23
|
+
/* @__PURE__ */ e("button", { type: "button", className: t["gpt-toggle-btn"], onClick: () => l(!s), "aria-expanded": s, "aria-label": "Toggle GPT card", children: s ? /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 5L7 9L11 5", stroke: "#6B7280", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 9L7 5L11 9", stroke: "#6B7280", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
12
24
|
] }),
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ d("div", { className: t["gpt-body"], style: { maxHeight: s ? "140px" : "0", opacity: s ? 1 : 0, overflow: "hidden", transition: "max-height 300ms ease, opacity 300ms ease" }, children: [
|
|
26
|
+
/* @__PURE__ */ e("p", { className: t["gpt-title"], children: "Lens GPT" }),
|
|
27
|
+
/* @__PURE__ */ e("div", { className: t["gpt-icons-row"], children: /* @__PURE__ */ e("span", { className: t["gpt-subtitle"], children: "AI Powered Insights" }) })
|
|
16
28
|
] }),
|
|
17
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ e("button", { type: "button", className: t["gpt-start-btn"], onClick: g, disabled: i, children: "Start Chat" })
|
|
18
30
|
] }) });
|
|
19
31
|
}
|
|
20
32
|
export {
|
|
21
|
-
|
|
33
|
+
h as GptCardWrapper
|
|
22
34
|
};
|