@ck-ui/component-library 2.0.0 → 2.0.1

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.
Files changed (70) hide show
  1. package/dist/CalendarGrid-DzsGX04L.js +240 -0
  2. package/dist/ScrollDropdown-B6iVjMy_.js +80 -0
  3. package/dist/assets/DateRangePicker-BJW-EAys.css +1 -0
  4. package/dist/assets/ScrollDropdown-zzvVGbzo.css +1 -0
  5. package/dist/assets/styles-Dz05pjuA.css +1 -0
  6. package/dist/components/DateRangePicker/Calendar/CalendarGrid.d.ts.map +1 -1
  7. package/dist/components/DateRangePicker/Calendar/CalendarGrid.js +2 -2
  8. package/dist/components/DateRangePicker/Calendar/ScrollDropdown.js +1 -1
  9. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  10. package/dist/components/DateRangePicker/DateRangePicker.js +154 -154
  11. package/dist/components/Sidebar/Sidebar.constants.d.ts +5 -0
  12. package/dist/components/Sidebar/Sidebar.constants.d.ts.map +1 -0
  13. package/dist/components/Sidebar/Sidebar.constants.js +7 -0
  14. package/dist/components/Sidebar/Sidebar.d.ts +7 -0
  15. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
  16. package/dist/components/Sidebar/Sidebar.js +46 -0
  17. package/dist/components/Sidebar/Sidebar.types.d.ts +52 -0
  18. package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -0
  19. package/dist/components/Sidebar/Sidebar.types.js +1 -0
  20. package/dist/components/Sidebar/Sidebar.utils.d.ts +7 -0
  21. package/dist/components/Sidebar/Sidebar.utils.d.ts.map +1 -0
  22. package/dist/components/Sidebar/Sidebar.utils.js +48 -0
  23. package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts +12 -0
  24. package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts.map +1 -0
  25. package/dist/components/Sidebar/components/CollapsedTooltip/index.js +35 -0
  26. package/dist/components/Sidebar/components/ContactUsButton/index.d.ts +8 -0
  27. package/dist/components/Sidebar/components/ContactUsButton/index.d.ts.map +1 -0
  28. package/dist/components/Sidebar/components/ContactUsButton/index.js +14 -0
  29. package/dist/components/Sidebar/components/ExploreSection/index.d.ts +11 -0
  30. package/dist/components/Sidebar/components/ExploreSection/index.d.ts.map +1 -0
  31. package/dist/components/Sidebar/components/ExploreSection/index.js +22 -0
  32. package/dist/components/Sidebar/components/GptCard/index.d.ts +14 -0
  33. package/dist/components/Sidebar/components/GptCard/index.d.ts.map +1 -0
  34. package/dist/components/Sidebar/components/GptCard/index.js +22 -0
  35. package/dist/components/Sidebar/components/IconRenderer/index.d.ts +7 -0
  36. package/dist/components/Sidebar/components/IconRenderer/index.d.ts.map +1 -0
  37. package/dist/components/Sidebar/components/IconRenderer/index.js +16 -0
  38. package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts +13 -0
  39. package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts.map +1 -0
  40. package/dist/components/Sidebar/components/MenuItemWrapper/index.js +44 -0
  41. package/dist/components/Sidebar/components/MenuRenderer/index.d.ts +12 -0
  42. package/dist/components/Sidebar/components/MenuRenderer/index.d.ts.map +1 -0
  43. package/dist/components/Sidebar/components/MenuRenderer/index.js +77 -0
  44. package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts +11 -0
  45. package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts.map +1 -0
  46. package/dist/components/Sidebar/components/ModuleSwitchButton/index.js +18 -0
  47. package/dist/components/Sidebar/components/SectionLabel/index.d.ts +5 -0
  48. package/dist/components/Sidebar/components/SectionLabel/index.d.ts.map +1 -0
  49. package/dist/components/Sidebar/components/SectionLabel/index.js +8 -0
  50. package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts +15 -0
  51. package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts.map +1 -0
  52. package/dist/components/Sidebar/components/SubMenuWrapper/index.js +35 -0
  53. package/dist/components/Sidebar/hooks/useActiveDetection.d.ts +11 -0
  54. package/dist/components/Sidebar/hooks/useActiveDetection.d.ts.map +1 -0
  55. package/dist/components/Sidebar/hooks/useActiveDetection.js +15 -0
  56. package/dist/components/Sidebar/hooks/useMenuState.d.ts +9 -0
  57. package/dist/components/Sidebar/hooks/useMenuState.d.ts.map +1 -0
  58. package/dist/components/Sidebar/hooks/useMenuState.js +51 -0
  59. package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts +7 -0
  60. package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts.map +1 -0
  61. package/dist/components/Sidebar/hooks/useModuleSwitch.js +20 -0
  62. package/dist/components/Sidebar/index.d.ts +4 -0
  63. package/dist/components/Sidebar/index.d.ts.map +1 -0
  64. package/dist/components/Sidebar/index.js +5 -0
  65. package/dist/styles.module-BIdwTiuE.js +66 -0
  66. package/package.json +1 -1
  67. package/dist/CalendarGrid-xx9nYA1_.js +0 -237
  68. package/dist/ScrollDropdown-tf6ex2lE.js +0 -80
  69. package/dist/assets/DateRangePicker-DNHTCnqT.css +0 -1
  70. package/dist/assets/ScrollDropdown-CQTxVikn.css +0 -1
@@ -1,62 +1,62 @@
1
1
  import { jsxs as D, jsx as d } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
- import { useState as b, useRef as se, useMemo as M, useEffect as F, useCallback as O, useLayoutEffect as be } from "react";
4
- import { CKButton as B } from "../CKButton/index.js";
5
- import { CKTag as ie } from "../CKTag/index.js";
3
+ import { useState as b, useRef as re, useMemo as M, useEffect as Y, useCallback as O, useLayoutEffect as be } from "react";
4
+ import { CKButton as y } from "../CKButton/index.js";
5
+ import { CKTag as se } from "../CKTag/index.js";
6
6
  import { Tooltip as Me } from "../Tooltip/index.js";
7
- import { S as ye, C as ve } from "../../CalendarGrid-xx9nYA1_.js";
8
- import { getPresetStartDate as C, isSameDay as Z, normalizeDefinedRanges as ce, getDefaultDefinedRanges as Te, normalizeDateForMUI as j, detectMatchingDefinedRange as Ce, detectMatchingPreset as Ee, clampDefinedRange as Le, getEffectiveEnd as Re, formatWithPattern as Se, formatToMonthDayYear as Ne } from "./_utils/util.js";
9
- import { useDropdownDirection as Be } from "../MultiSelect/_utils/useDropdownDirection.js";
10
- import '../../assets/DateRangePicker-DNHTCnqT.css';const Pe = (_) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ..._ }, /* @__PURE__ */ o.createElement("path", { d: "M10.6668 1.3335V4.00016M5.3335 1.3335V4.00016", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M8.66667 2.6665H7.33333C4.81917 2.6665 3.5621 2.6665 2.78105 3.44755C2 4.2286 2 5.48568 2 7.99984V9.33317C2 11.8473 2 13.1044 2.78105 13.8854C3.5621 14.6665 4.81917 14.6665 7.33333 14.6665H8.66667C11.1808 14.6665 12.4379 14.6665 13.2189 13.8854C14 13.1044 14 11.8473 14 9.33317V7.99984C14 5.48568 14 4.2286 13.2189 3.44755C12.4379 2.6665 11.1808 2.6665 8.66667 2.6665Z", stroke: "#2B2B2B", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M2 6.6665H14", stroke: "#2B2B2B", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M7.99716 9.3335H8.00316M7.99716 12.0002H8.00316M10.6608 9.3335H10.6668M5.3335 9.3335H5.33948M5.3335 12.0002H5.33948", stroke: "#2B2B2B", strokeWidth: 0.666667, strokeLinecap: "round", strokeLinejoin: "round" })), xe = (_) => /* @__PURE__ */ o.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ..._ }, /* @__PURE__ */ o.createElement("g", { clipPath: "url(#clip0_7800_479)" }, /* @__PURE__ */ o.createElement("path", { d: "M11 6C11 8.76 8.76 11 6 11C3.24 11 1.555 8.22 1.555 8.22M1.555 10.72V8.22H3.815M1 6C1 3.24 3.22 1 6 1C9.335 1 11 3.78 11 3.78M8.78 3.78H11V1.28", stroke: "#737373", strokeWidth: 0.57, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ o.createElement("defs", null, /* @__PURE__ */ o.createElement("clipPath", { id: "clip0_7800_479" }, /* @__PURE__ */ o.createElement("rect", { width: 12, height: 12, fill: "white" })))), Ae = (_) => /* @__PURE__ */ o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", ..._ }, /* @__PURE__ */ o.createElement("path", { d: "M9.61984 3.95312L13.6665 7.9998L9.61984 12.0465", stroke: "#2B2B2B", strokeMiterlimit: 10, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M2.33324 8H13.5532", stroke: "#2B2B2B", strokeMiterlimit: 10, strokeLinecap: "round", strokeLinejoin: "round" })), i = {
11
- "ckds-date-range-picker": "_ckds-date-range-picker_7m6sy_2",
12
- "ckds-date-range-picker--open": "_ckds-date-range-picker--open_7m6sy_26",
13
- "ckds-date-range-picker__body": "_ckds-date-range-picker__body_7m6sy_39",
14
- "ckds-date-range-picker__sidebar": "_ckds-date-range-picker__sidebar_7m6sy_47",
15
- "ckds-date-range-picker__sidebar-item": "_ckds-date-range-picker__sidebar-item_7m6sy_58",
16
- "ckds-date-range-picker__sidebar-item--active": "_ckds-date-range-picker__sidebar-item--active_7m6sy_99",
17
- "ckds-date-range-picker__calendar": "_ckds-date-range-picker__calendar_7m6sy_113",
18
- "ckds-date-range-picker__calendar--align-left": "_ckds-date-range-picker__calendar--align-left_7m6sy_127",
19
- "ckds-date-range-picker__calendar--align-right": "_ckds-date-range-picker__calendar--align-right_7m6sy_130",
20
- "ckds-date-range-picker__calendar--enter": "_ckds-date-range-picker__calendar--enter_7m6sy_133",
21
- "ckds-date-range-picker__main": "_ckds-date-range-picker__main_7m6sy_138",
22
- "ckds-date-range-picker__footer": "_ckds-date-range-picker__footer_7m6sy_146",
23
- "ckds-date-range-picker__date-inputs": "_ckds-date-range-picker__date-inputs_7m6sy_155",
24
- "ckds-date-range-picker__date-field": "_ckds-date-range-picker__date-field_7m6sy_161",
25
- "ckds-date-range-picker__date-label": "_ckds-date-range-picker__date-label_7m6sy_167",
26
- "ckds-date-range-picker__required-asterisk": "_ckds-date-range-picker__required-asterisk_7m6sy_175",
27
- "ckds-date-range-picker__date-tag": "_ckds-date-range-picker__date-tag_7m6sy_186",
28
- "ckds-date-range-picker__date-arrow": "_ckds-date-range-picker__date-arrow_7m6sy_199",
29
- "ckds-date-range-picker__reset-btn": "_ckds-date-range-picker__reset-btn_7m6sy_206",
30
- "ckds-date-range-picker__actions": "_ckds-date-range-picker__actions_7m6sy_217"
7
+ import { S as ve, C as Ce } from "../../CalendarGrid-DzsGX04L.js";
8
+ import { getPresetStartDate as E, isSameDay as Z, normalizeDefinedRanges as ie, getDefaultDefinedRanges as Te, normalizeDateForMUI as $, detectMatchingDefinedRange as Ee, detectMatchingPreset as Le, clampDefinedRange as Re, getEffectiveEnd as je, formatWithPattern as ye, formatToMonthDayYear as Se } from "./_utils/util.js";
9
+ import { useDropdownDirection as Ne } from "../MultiSelect/_utils/useDropdownDirection.js";
10
+ import '../../assets/DateRangePicker-BJW-EAys.css';const Be = (k) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...k }, /* @__PURE__ */ o.createElement("path", { d: "M10.6668 1.3335V4.00016M5.3335 1.3335V4.00016", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M8.66667 2.6665H7.33333C4.81917 2.6665 3.5621 2.6665 2.78105 3.44755C2 4.2286 2 5.48568 2 7.99984V9.33317C2 11.8473 2 13.1044 2.78105 13.8854C3.5621 14.6665 4.81917 14.6665 7.33333 14.6665H8.66667C11.1808 14.6665 12.4379 14.6665 13.2189 13.8854C14 13.1044 14 11.8473 14 9.33317V7.99984C14 5.48568 14 4.2286 13.2189 3.44755C12.4379 2.6665 11.1808 2.6665 8.66667 2.6665Z", stroke: "#2B2B2B", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M2 6.6665H14", stroke: "#2B2B2B", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M7.99716 9.3335H8.00316M7.99716 12.0002H8.00316M10.6608 9.3335H10.6668M5.3335 9.3335H5.33948M5.3335 12.0002H5.33948", stroke: "#2B2B2B", strokeWidth: 0.666667, strokeLinecap: "round", strokeLinejoin: "round" })), Pe = (k) => /* @__PURE__ */ o.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...k }, /* @__PURE__ */ o.createElement("g", { clipPath: "url(#clip0_7800_479)" }, /* @__PURE__ */ o.createElement("path", { d: "M11 6C11 8.76 8.76 11 6 11C3.24 11 1.555 8.22 1.555 8.22M1.555 10.72V8.22H3.815M1 6C1 3.24 3.22 1 6 1C9.335 1 11 3.78 11 3.78M8.78 3.78H11V1.28", stroke: "#737373", strokeWidth: 0.57, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ o.createElement("defs", null, /* @__PURE__ */ o.createElement("clipPath", { id: "clip0_7800_479" }, /* @__PURE__ */ o.createElement("rect", { width: 12, height: 12, fill: "white" })))), xe = (k) => /* @__PURE__ */ o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", ...k }, /* @__PURE__ */ o.createElement("path", { d: "M9.61984 3.95312L13.6665 7.9998L9.61984 12.0465", stroke: "#2B2B2B", strokeMiterlimit: 10, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ o.createElement("path", { d: "M2.33324 8H13.5532", stroke: "#2B2B2B", strokeMiterlimit: 10, strokeLinecap: "round", strokeLinejoin: "round" })), s = {
11
+ "ckds-date-range-picker": "_ckds-date-range-picker_1jemp_2",
12
+ "ckds-date-range-picker--open": "_ckds-date-range-picker--open_1jemp_27",
13
+ "ckds-date-range-picker__body": "_ckds-date-range-picker__body_1jemp_40",
14
+ "ckds-date-range-picker__sidebar": "_ckds-date-range-picker__sidebar_1jemp_48",
15
+ "ckds-date-range-picker__sidebar-item": "_ckds-date-range-picker__sidebar-item_1jemp_59",
16
+ "ckds-date-range-picker__sidebar-item--active": "_ckds-date-range-picker__sidebar-item--active_1jemp_100",
17
+ "ckds-date-range-picker__calendar": "_ckds-date-range-picker__calendar_1jemp_114",
18
+ "ckds-date-range-picker__calendar--align-left": "_ckds-date-range-picker__calendar--align-left_1jemp_128",
19
+ "ckds-date-range-picker__calendar--align-right": "_ckds-date-range-picker__calendar--align-right_1jemp_131",
20
+ "ckds-date-range-picker__calendar--enter": "_ckds-date-range-picker__calendar--enter_1jemp_134",
21
+ "ckds-date-range-picker__main": "_ckds-date-range-picker__main_1jemp_139",
22
+ "ckds-date-range-picker__footer": "_ckds-date-range-picker__footer_1jemp_147",
23
+ "ckds-date-range-picker__date-inputs": "_ckds-date-range-picker__date-inputs_1jemp_156",
24
+ "ckds-date-range-picker__date-field": "_ckds-date-range-picker__date-field_1jemp_162",
25
+ "ckds-date-range-picker__date-label": "_ckds-date-range-picker__date-label_1jemp_168",
26
+ "ckds-date-range-picker__required-asterisk": "_ckds-date-range-picker__required-asterisk_1jemp_176",
27
+ "ckds-date-range-picker__date-tag": "_ckds-date-range-picker__date-tag_1jemp_187",
28
+ "ckds-date-range-picker__date-arrow": "_ckds-date-range-picker__date-arrow_1jemp_200",
29
+ "ckds-date-range-picker__reset-btn": "_ckds-date-range-picker__reset-btn_1jemp_207",
30
+ "ckds-date-range-picker__actions": "_ckds-date-range-picker__actions_1jemp_218"
31
31
  };
32
- function ze(_) {
33
- return Ne(_);
32
+ function Ae(k) {
33
+ return Se(k);
34
34
  }
35
- const Ye = ({ ranges: _, activeLabel: U, onSelect: c }) => /* @__PURE__ */ d("div", { className: i["ckds-date-range-picker__sidebar"], children: _.map((f) => /* @__PURE__ */ d(
36
- B,
35
+ const ze = ({ ranges: k, activeLabel: H, onSelect: c }) => /* @__PURE__ */ d("div", { className: s["ckds-date-range-picker__sidebar"], children: k.map((f) => /* @__PURE__ */ d(
36
+ y,
37
37
  {
38
38
  type: "button",
39
- className: `${i["ckds-date-range-picker__sidebar-item"]} ${U === f.label ? i["ckds-date-range-picker__sidebar-item--active"] : ""}`,
39
+ className: `${s["ckds-date-range-picker__sidebar-item"]} ${H === f.label ? s["ckds-date-range-picker__sidebar-item--active"] : ""}`,
40
40
  onClick: () => c(f),
41
41
  label: f.label,
42
42
  "aria-label": f.label
43
43
  },
44
44
  f.label
45
45
  )) }), qe = ({
46
- onChange: _,
47
- onClear: U,
46
+ onChange: k,
47
+ onClear: H,
48
48
  value: c,
49
49
  label: f = "Select date range",
50
- minDate: E,
51
- maxDate: y,
52
- startDate: V,
53
- endDate: I,
54
- className: de = "",
50
+ minDate: L,
51
+ maxDate: v,
52
+ startDate: F,
53
+ endDate: U,
54
+ className: ce = "",
55
55
  disabled: J = !1,
56
- error: oe = !1,
57
- definedRanges: P,
58
- size: le = "medium",
59
- dateFormat: K,
56
+ error: de = !1,
57
+ definedRanges: S,
58
+ size: oe = "medium",
59
+ dateFormat: V,
60
60
  resetDisabled: Q,
61
61
  defaultRange: X
62
62
  }) => {
@@ -67,22 +67,22 @@ const Ye = ({ ranges: _, activeLabel: U, onSelect: c }) => /* @__PURE__ */ d("di
67
67
  "1y": "1 Year",
68
68
  mtd: "Month to Date",
69
69
  ytd: "Year to Date"
70
- }[X.toLowerCase()] ?? null : null, L = (() => {
70
+ }[X.toLowerCase()] ?? null : null, I = (() => {
71
71
  if (g) return g;
72
- if (!c?.startDate && !c?.endDate && !V && !I && (E || y)) {
73
- const e = y ? new Date(y).getTime() < Date.now() ? new Date(y) : /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(), t = E ? new Date(E) : void 0, s = C("6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate()), r = t && s.getTime() < t.getTime() ? t : s, w = ["6 Months", "3 Months", "Month to Date", "7 Days"];
74
- for (const re of w) {
75
- const ne = C(re, e);
76
- if (ne && Z(ne, r)) return re;
72
+ if (!c?.startDate && !c?.endDate && !F && !U && (L || v)) {
73
+ const e = v ? new Date(v).getTime() < Date.now() ? new Date(v) : /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(), t = L ? new Date(L) : void 0, i = E("6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate()), n = t && i.getTime() < t.getTime() ? t : i, w = ["6 Months", "3 Months", "Month to Date", "7 Days"];
74
+ for (const ae of w) {
75
+ const ne = E(ae, e);
76
+ if (ne && Z(ne, n)) return ae;
77
77
  }
78
78
  return "Custom";
79
79
  }
80
80
  return "Custom";
81
- })(), [u, R] = b(!1), [ee, S] = b(L), [_e, N] = b(0), [ge, x] = b(c), [ke, v] = b(!1), [A, te] = b(L), z = se(null), W = se(null), { horizontal: pe } = Be(z, u, 400, 820), T = M(
81
+ })(), [u, N] = b(!1), [ee, R] = b(I), [le, j] = b(0), [ge, K] = b(c), [_e, C] = b(!1), [B, ke] = b(I), P = re(null), W = re(null), { horizontal: pe } = Ne(P, u, 400, 820), T = M(
82
82
  () => {
83
- const e = ce(P);
83
+ const e = ie(S);
84
84
  if (e && e.length > 0) {
85
- if (e.some((s) => s.label === "Custom")) return e;
85
+ if (e.some((i) => i.label === "Custom")) return e;
86
86
  const t = /* @__PURE__ */ new Date();
87
87
  return [
88
88
  { label: "Custom", startDate: t, endDate: t },
@@ -91,132 +91,132 @@ const Ye = ({ ranges: _, activeLabel: U, onSelect: c }) => /* @__PURE__ */ d("di
91
91
  }
92
92
  return Te();
93
93
  },
94
- [P]
95
- ), Y = M(() => {
96
- const e = ce(P);
94
+ [S]
95
+ ), x = M(() => {
96
+ const e = ie(S);
97
97
  return !!(e && e.length > 0);
98
- }, [P]), a = M(() => j(E), [E]), n = M(() => j(y), [y]), p = M(() => j(V), [V]), m = M(() => j(I), [I]), k = M(() => {
98
+ }, [S]), a = M(() => $(L), [L]), r = M(() => $(v), [v]), p = M(() => $(F), [F]), m = M(() => $(U), [U]), _ = M(() => {
99
99
  if (p && m) {
100
100
  let e = p.getTime() <= m.getTime() ? new Date(p) : new Date(m), t = p.getTime() <= m.getTime() ? new Date(m) : new Date(p);
101
- return a && e.getTime() < a.getTime() && (e = new Date(a)), n && t.getTime() > n.getTime() && (t = new Date(n)), { startDate: e, endDate: t };
101
+ return a && e.getTime() < a.getTime() && (e = new Date(a)), r && t.getTime() > r.getTime() && (t = new Date(r)), { startDate: e, endDate: t };
102
102
  }
103
103
  if (c?.startDate || c?.endDate) return c;
104
- if (a || n) {
105
- const e = n && n.getTime() < Date.now() ? new Date(n) : /* @__PURE__ */ new Date();
106
- let r = C(g ?? "6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate());
107
- return a && r.getTime() < a.getTime() && (r = new Date(a)), { startDate: r, endDate: e };
104
+ if (a || r) {
105
+ const e = r && r.getTime() < Date.now() ? new Date(r) : /* @__PURE__ */ new Date();
106
+ let n = E(g ?? "6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate());
107
+ return a && n.getTime() < a.getTime() && (n = new Date(a)), { startDate: n, endDate: e };
108
108
  }
109
- }, [c, p, m, a, n, g]), [l, h] = b(k), ae = k ? `${k.startDate?.getTime()}_${k.endDate?.getTime()}` : "";
110
- F(() => {
111
- k?.startDate && k?.endDate && (h({
112
- startDate: new Date(k.startDate),
113
- endDate: new Date(k.endDate)
114
- }), N((e) => e + 1));
115
- }, [ae]), F(() => {
116
- if (!g || k?.startDate) return;
109
+ }, [c, p, m, a, r, g]), [l, h] = b(_), te = _ ? `${_.startDate?.getTime()}_${_.endDate?.getTime()}` : "";
110
+ Y(() => {
111
+ _?.startDate && _?.endDate && (h({
112
+ startDate: new Date(_.startDate),
113
+ endDate: new Date(_.endDate)
114
+ }), j((e) => e + 1));
115
+ }, [te]), Y(() => {
116
+ if (!g || _?.startDate) return;
117
117
  const e = T.find((t) => t.label === g);
118
118
  if (e && e.label !== "Custom") {
119
- const t = $(e);
120
- h(t), x(t), N((s) => s + 1);
119
+ const t = A(e);
120
+ h(t), K(t), j((i) => i + 1);
121
121
  }
122
122
  }, []), be(() => {
123
123
  if (!u) return;
124
- const e = g ? T.find((r) => r.label === g) : void 0, t = k ?? (e ? $(e) : void 0);
124
+ const e = g ? T.find((n) => n.label === g) : void 0, t = _ ?? (e ? A(e) : void 0);
125
125
  h(t);
126
- const s = A !== "Custom" ? A : t?.startDate ? q(t) ?? L : L;
127
- S(s), N((r) => r + 1);
128
- }, [u, ae]), F(() => {
129
- c?.startDate && c?.endDate && x(c);
130
- }, [c]), F(() => {
126
+ const i = B !== "Custom" ? B : t?.startDate ? q(t) ?? "Custom" : "Custom";
127
+ R(i), j((n) => n + 1);
128
+ }, [u, te]), Y(() => {
129
+ c?.startDate && c?.endDate && K(c);
130
+ }, [c]), Y(() => {
131
131
  if (!u) return;
132
132
  const e = (t) => {
133
- W.current && !W.current.contains(t.target) && z.current && !z.current.contains(t.target) && R(!1);
133
+ W.current && !W.current.contains(t.target) && P.current && !P.current.contains(t.target) && N(!1);
134
134
  };
135
135
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
136
136
  }, [u]);
137
137
  const me = () => {
138
- J || (u || v(!1), R((e) => !e));
138
+ J || (u || C(!1), N((e) => !e));
139
139
  }, De = () => {
140
- l && (x(l), te(ee), _(l)), R(!1);
140
+ l && (K(l), ke(ee), k(l)), N(!1);
141
141
  }, fe = () => {
142
- h(ge ?? c), R(!1);
142
+ h(ge ?? c), N(!1);
143
143
  }, q = O(
144
- (e) => Y ? Ce(
144
+ (e) => x ? Ee(
145
145
  e,
146
146
  T,
147
147
  a,
148
- n
149
- ) : Ee(e, a, n),
150
- [Y, T, n, a]
151
- ), $ = O((e) => {
152
- let t, s;
153
- if (Y)
154
- ({ startDate: t, endDate: s } = Le(e, a, n));
148
+ r
149
+ ) : Le(e, a, r),
150
+ [x, T, r, a]
151
+ ), A = O((e) => {
152
+ let t, i;
153
+ if (x)
154
+ ({ startDate: t, endDate: i } = Re(e, a, r));
155
155
  else {
156
- const r = Re(n);
157
- s = r, t = C(e.label, r) ?? new Date(e.startDate), a && t.getTime() < a.getTime() && (t = new Date(a));
156
+ const n = je(r);
157
+ i = n, t = E(e.label, n) ?? new Date(e.startDate), a && t.getTime() < a.getTime() && (t = new Date(a));
158
158
  }
159
- return { startDate: t, endDate: s };
160
- }, [Y, a, n]), he = (e) => {
161
- if (S(e.label), e.label === "Custom") return;
162
- const t = $(e);
163
- h(t), v(e.label !== A), N((s) => s + 1);
159
+ return { startDate: t, endDate: i };
160
+ }, [x, a, r]), he = (e) => {
161
+ if (R(e.label), e.label === "Custom") return;
162
+ const t = A(e);
163
+ h(t), C(e.label !== B), j((i) => i + 1);
164
164
  }, ue = () => {
165
- const e = n && n.getTime() < Date.now() ? new Date(n) : /* @__PURE__ */ new Date();
165
+ const e = r && r.getTime() < Date.now() ? new Date(r) : /* @__PURE__ */ new Date();
166
166
  let t;
167
167
  if (g) {
168
- const r = T.find((w) => w.label === g);
169
- t = r ? $(r) : { startDate: e, endDate: e };
168
+ const n = T.find((w) => w.label === g);
169
+ t = n ? A(n) : { startDate: e, endDate: e };
170
170
  } else if (p && m)
171
- t = k ?? { startDate: new Date(p), endDate: new Date(m) };
171
+ t = _ ?? { startDate: new Date(p), endDate: new Date(m) };
172
172
  else {
173
- const r = C("6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate());
174
- t = { startDate: a && r.getTime() < a.getTime() ? new Date(a) : r, endDate: e };
173
+ const n = E("6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate());
174
+ t = { startDate: a && n.getTime() < a.getTime() ? new Date(a) : n, endDate: e };
175
175
  }
176
- h(t), x(t);
177
- const s = q(t) ?? L;
178
- S(s), te(s), v(!1), N((r) => r + 1), _(t), U?.(), R(!1);
176
+ h(t);
177
+ const i = q(t) ?? I;
178
+ R(i), C(!0), j((n) => n + 1), H?.();
179
179
  }, we = (() => {
180
180
  if (Q !== void 0) return Q;
181
- if (g) return A === g;
182
- const e = n && n.getTime() < Date.now() ? new Date(n) : /* @__PURE__ */ new Date();
183
- let t, s = e;
181
+ if (g) return B === g;
182
+ const e = r && r.getTime() < Date.now() ? new Date(r) : /* @__PURE__ */ new Date();
183
+ let t, i = e;
184
184
  if (p && m)
185
- t = a && p.getTime() < a.getTime() ? new Date(a) : new Date(p), s = n && m.getTime() > n.getTime() ? new Date(n) : new Date(m);
185
+ t = a && p.getTime() < a.getTime() ? new Date(a) : new Date(p), i = r && m.getTime() > r.getTime() ? new Date(r) : new Date(m);
186
186
  else {
187
- if (!a && !n)
187
+ if (!a && !r)
188
188
  return !1;
189
189
  {
190
- const w = C("6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate());
190
+ const w = E("6 Months", e) ?? new Date(e.getFullYear(), e.getMonth() - 6, e.getDate());
191
191
  t = a && w.getTime() < a.getTime() ? new Date(a) : w;
192
192
  }
193
193
  }
194
- const r = c?.startDate && c?.endDate ? c : k;
195
- return !r?.startDate || !r?.endDate ? !0 : Z(r.startDate, t) && Z(r.endDate, s);
196
- })(), H = O(
197
- (e) => e ? K ? Se(e, K) : ze(e) : "",
198
- [K]
199
- ), G = c?.startDate && c?.endDate ? `${H(c.startDate)} – ${H(c.endDate)}` : f;
194
+ const n = c?.startDate && c?.endDate ? c : _;
195
+ return !n?.startDate || !n?.endDate ? !0 : Z(n.startDate, t) && Z(n.endDate, i);
196
+ })(), z = O(
197
+ (e) => e ? V ? ye(e, V) : Ae(e) : "",
198
+ [V]
199
+ ), G = c?.startDate && c?.endDate ? `${z(c.startDate)} – ${z(c.endDate)}` : f;
200
200
  return /* @__PURE__ */ D(
201
201
  "div",
202
202
  {
203
203
  "data-testid": "date-range-picker",
204
- className: `${i["ckds-date-range-picker"]} ${u ? i["ckds-date-range-picker--open"] : ""} ${de}`,
205
- ref: z,
204
+ className: `${s["ckds-date-range-picker"]} ${u ? s["ckds-date-range-picker--open"] : ""} ${ce}`,
205
+ ref: P,
206
206
  children: [
207
207
  /* @__PURE__ */ d(
208
- B,
208
+ y,
209
209
  {
210
210
  variant: "secondary",
211
- error: oe,
211
+ error: de,
212
212
  disabled: J,
213
213
  onClick: me,
214
214
  "aria-label": G === f ? f : `Date range: ${G}`,
215
- size: le,
215
+ size: oe,
216
216
  label: G,
217
217
  icons: {
218
- left: /* @__PURE__ */ d(Pe, { width: 16, height: 16 }),
219
- right: /* @__PURE__ */ d(ye, { width: 16, height: 16 })
218
+ left: /* @__PURE__ */ d(Be, { width: 16, height: 16 }),
219
+ right: /* @__PURE__ */ d(ve, { width: 16, height: 16 })
220
220
  },
221
221
  style: { background: "white" }
222
222
  }
@@ -225,59 +225,59 @@ const Ye = ({ ranges: _, activeLabel: U, onSelect: c }) => /* @__PURE__ */ d("di
225
225
  "div",
226
226
  {
227
227
  ref: W,
228
- className: `${i["ckds-date-range-picker__calendar"]} ${i["ckds-date-range-picker__calendar--enter"]} ${pe === "right" ? i["ckds-date-range-picker__calendar--align-right"] : i["ckds-date-range-picker__calendar--align-left"]}`,
228
+ className: `${s["ckds-date-range-picker__calendar"]} ${s["ckds-date-range-picker__calendar--enter"]} ${pe === "right" ? s["ckds-date-range-picker__calendar--align-right"] : s["ckds-date-range-picker__calendar--align-left"]}`,
229
229
  children: [
230
- /* @__PURE__ */ D("div", { className: i["ckds-date-range-picker__body"], children: [
230
+ /* @__PURE__ */ D("div", { className: s["ckds-date-range-picker__body"], children: [
231
231
  /* @__PURE__ */ d(
232
- Ye,
232
+ ze,
233
233
  {
234
234
  ranges: T,
235
235
  activeLabel: ee,
236
236
  onSelect: he
237
237
  }
238
238
  ),
239
- /* @__PURE__ */ d("div", { className: i["ckds-date-range-picker__main"], children: /* @__PURE__ */ d(
240
- ve,
239
+ /* @__PURE__ */ d("div", { className: s["ckds-date-range-picker__main"], children: /* @__PURE__ */ d(
240
+ Ce,
241
241
  {
242
242
  startDate: l?.startDate,
243
243
  endDate: l?.endDate,
244
244
  onDateClick: (e) => {
245
245
  if (!l?.startDate || l.startDate && l.endDate)
246
- h({ startDate: e, endDate: void 0 }), S("Custom"), v(!1);
246
+ h({ startDate: e, endDate: void 0 }), R("Custom"), C(!1);
247
247
  else {
248
248
  const t = l.startDate;
249
249
  if (e.getTime() < t.getTime())
250
- h({ startDate: e, endDate: void 0 }), v(!1);
250
+ h({ startDate: e, endDate: void 0 }), C(!1);
251
251
  else {
252
- const s = { startDate: t, endDate: e };
253
- h(s);
254
- const r = q(s);
255
- S(r ?? "Custom"), v(!0);
252
+ const i = { startDate: t, endDate: e };
253
+ h(i);
254
+ const n = q(i);
255
+ R(n ?? "Custom"), C(!0);
256
256
  }
257
257
  }
258
258
  },
259
259
  minDate: a,
260
- maxDate: n
260
+ maxDate: r
261
261
  },
262
- _e
262
+ le
263
263
  ) })
264
264
  ] }),
265
- /* @__PURE__ */ D("div", { className: i["ckds-date-range-picker__footer"], children: [
266
- /* @__PURE__ */ D("div", { className: i["ckds-date-range-picker__date-inputs"], children: [
267
- /* @__PURE__ */ D("div", { className: i["ckds-date-range-picker__date-field"], children: [
268
- /* @__PURE__ */ D("span", { className: i["ckds-date-range-picker__date-label"], children: [
265
+ /* @__PURE__ */ D("div", { className: s["ckds-date-range-picker__footer"], children: [
266
+ /* @__PURE__ */ D("div", { className: s["ckds-date-range-picker__date-inputs"], children: [
267
+ /* @__PURE__ */ D("div", { className: s["ckds-date-range-picker__date-field"], children: [
268
+ /* @__PURE__ */ D("span", { className: s["ckds-date-range-picker__date-label"], children: [
269
269
  "Start Date",
270
- /* @__PURE__ */ d("span", { className: i["ckds-date-range-picker__required-asterisk"], children: "*" })
270
+ /* @__PURE__ */ d("span", { className: s["ckds-date-range-picker__required-asterisk"], children: "*" })
271
271
  ] }),
272
- /* @__PURE__ */ d(ie, { size: "small", variation: "NEUTRAL", shape: "pill", fill: "outline", className: i["ckds-date-range-picker__date-tag"], children: H(l?.startDate) || "MM-DD-YYYY" })
272
+ /* @__PURE__ */ d(se, { size: "small", variation: "NEUTRAL", shape: "pill", fill: "outline", className: s["ckds-date-range-picker__date-tag"], children: z(l?.startDate) || "MM-DD-YYYY" })
273
273
  ] }),
274
- /* @__PURE__ */ d("span", { className: i["ckds-date-range-picker__date-arrow"], children: /* @__PURE__ */ d(Ae, {}) }),
275
- /* @__PURE__ */ D("div", { className: i["ckds-date-range-picker__date-field"], children: [
276
- /* @__PURE__ */ D("span", { className: i["ckds-date-range-picker__date-label"], children: [
274
+ /* @__PURE__ */ d("span", { className: s["ckds-date-range-picker__date-arrow"], children: /* @__PURE__ */ d(xe, {}) }),
275
+ /* @__PURE__ */ D("div", { className: s["ckds-date-range-picker__date-field"], children: [
276
+ /* @__PURE__ */ D("span", { className: s["ckds-date-range-picker__date-label"], children: [
277
277
  "End Date",
278
- /* @__PURE__ */ d("span", { className: i["ckds-date-range-picker__required-asterisk"], children: "*" })
278
+ /* @__PURE__ */ d("span", { className: s["ckds-date-range-picker__required-asterisk"], children: "*" })
279
279
  ] }),
280
- /* @__PURE__ */ d(ie, { size: "small", variation: "NEUTRAL", shape: "pill", fill: "outline", className: i["ckds-date-range-picker__date-tag"], children: H(l?.endDate) || "MM-DD-YYYY" })
280
+ /* @__PURE__ */ d(se, { size: "small", variation: "NEUTRAL", shape: "pill", fill: "outline", className: s["ckds-date-range-picker__date-tag"], children: z(l?.endDate) || "MM-DD-YYYY" })
281
281
  ] }),
282
282
  /* @__PURE__ */ d(
283
283
  Me,
@@ -307,23 +307,23 @@ const Ye = ({ ranges: _, activeLabel: U, onSelect: c }) => /* @__PURE__ */ d("di
307
307
  }
308
308
  },
309
309
  children: /* @__PURE__ */ d(
310
- B,
310
+ y,
311
311
  {
312
312
  variant: "secondary",
313
313
  size: "medium",
314
314
  onClick: ue,
315
315
  disabled: we,
316
316
  "aria-label": "Reset selection and navigation to default",
317
- className: i["ckds-date-range-picker__reset-btn"],
318
- icons: { left: /* @__PURE__ */ d(xe, {}) }
317
+ className: s["ckds-date-range-picker__reset-btn"],
318
+ icons: { left: /* @__PURE__ */ d(Pe, {}) }
319
319
  }
320
320
  )
321
321
  }
322
322
  )
323
323
  ] }),
324
- /* @__PURE__ */ D("div", { className: i["ckds-date-range-picker__actions"], children: [
325
- /* @__PURE__ */ d(B, { variant: "secondary", label: "Cancel", size: "medium", onClick: fe }),
326
- /* @__PURE__ */ d(B, { variant: "primary", label: "Apply", size: "medium", onClick: De, disabled: !ke || !l?.startDate || !l?.endDate })
324
+ /* @__PURE__ */ D("div", { className: s["ckds-date-range-picker__actions"], children: [
325
+ /* @__PURE__ */ d(y, { variant: "secondary", label: "Cancel", size: "medium", onClick: fe }),
326
+ /* @__PURE__ */ d(y, { variant: "primary", label: "Apply", size: "medium", onClick: De, disabled: !_e || !l?.startDate || !l?.endDate })
327
327
  ] })
328
328
  ] })
329
329
  ]
@@ -0,0 +1,5 @@
1
+ export declare const SIDEBAR_WIDTH_EXPANDED = 243;
2
+ export declare const SIDEBAR_WIDTH_COLLAPSED = 59;
3
+ export declare const CHAT_BOT_KEY = "CHAT_BOT_CK";
4
+ export declare const MULTICLOUD_VIEW_KEY = "MULTICLOUDVIEW";
5
+ //# sourceMappingURL=Sidebar.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.constants.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,eAAO,MAAM,mBAAmB,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ const _ = 243, D = 59, E = "CHAT_BOT_CK", I = "MULTICLOUDVIEW";
2
+ export {
3
+ E as CHAT_BOT_KEY,
4
+ I as MULTICLOUD_VIEW_KEY,
5
+ D as SIDEBAR_WIDTH_COLLAPSED,
6
+ _ as SIDEBAR_WIDTH_EXPANDED
7
+ };
@@ -0,0 +1,7 @@
1
+ import { SidebarProps } from './Sidebar.types';
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;
3
+ export declare namespace Sidebar {
4
+ var displayName: string;
5
+ }
6
+ export default Sidebar;
7
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAWpD,wBAAgB,OAAO,CAAC,EACtB,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,eAAe,EACrF,QAAQ,EAAE,cAAsB,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAC/E,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAC/D,eAAuB,EAAE,MAAc,EAAE,SAAS,GACnD,EAAE,YAAY,kDA0Bd;yBA/Be,OAAO;;;AAkCvB,eAAe,OAAO,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { jsxs as k, jsx as e } from "react/jsx-runtime";
2
+ import { useState as x, useMemo as S } from "react";
3
+ import { CHAT_BOT_KEY as N } from "./Sidebar.constants.js";
4
+ import { useModuleSwitch as T } from "./hooks/useModuleSwitch.js";
5
+ import { MenuRenderer as _ } from "./components/MenuRenderer/index.js";
6
+ import { ExploreSection as v } from "./components/ExploreSection/index.js";
7
+ import { ModuleSwitchButton as A } from "./components/ModuleSwitchButton/index.js";
8
+ import { ContactUsButton as H } from "./components/ContactUsButton/index.js";
9
+ import { GptCardWrapper as I } from "./components/GptCard/index.js";
10
+ import { Loader as K } from "../Loader/index.js";
11
+ import { s as r } from "../../styles.module-BIdwTiuE.js";
12
+ function R({
13
+ menuItems: f,
14
+ currentPath: p,
15
+ collapsed: t,
16
+ multicloudExploreList: o,
17
+ moduleList: m,
18
+ currentModuleId: b,
19
+ userType: d,
20
+ gptCardEnabled: u = !1,
21
+ renderGptCard: M,
22
+ cloudProviderIcons: g,
23
+ onNavigate: c,
24
+ onModuleSwitch: $,
25
+ onContactUsClick: w,
26
+ contactUsUrl: C,
27
+ onMenuItemClick: B,
28
+ isLoaderVisible: a = !1,
29
+ hidden: j = !1,
30
+ className: l
31
+ }) {
32
+ const [h, y] = x(!0), { handleModuleSwitch: G } = T({ onModuleSwitch: $ }), i = S(() => f.filter((s) => Object.keys(s).length > 0), [f]), n = S(() => i.find((s) => s.key === N), [i]), O = () => n && !t && u ? h ? r["chatbot-open"] : r["chatbot-collapse"] : "";
33
+ return j ? null : /* @__PURE__ */ k("div", { className: `${r["custom-sidebar"]} ${r["sidebar-V2"]} ${t ? r.collapseMenu : ""} ${O()} ${n && !t ? "" : r["no-chatbot-padding"]} ${l || ""}`, "data-testid": "sidebar", children: [
34
+ a && /* @__PURE__ */ e(K, { popup: !0 }),
35
+ m && m.length > 0 && /* @__PURE__ */ e(A, { modules: m, collapsed: t, currentModuleId: b, userType: d, onModuleSwitch: G }),
36
+ /* @__PURE__ */ e("div", { className: r["sidebar-list-wrapper"], children: /* @__PURE__ */ e(_, { menuItems: i, currentPath: p, collapsed: t, multicloudExploreList: o, onNavigate: c, onMenuItemClick: B }) }),
37
+ o && o.length > 0 && /* @__PURE__ */ e(v, { exploreList: o, collapsed: t, userType: d, cloudProviderIcons: g }),
38
+ !a && u && n && /* @__PURE__ */ e(I, { item: n, collapsed: t, currentPath: p, onNavigate: c, open: h, onToggle: y, renderGptCard: M }),
39
+ !a && /* @__PURE__ */ e(H, { collapsed: t, contactUsUrl: C, onContactUsClick: w })
40
+ ] });
41
+ }
42
+ R.displayName = "Sidebar";
43
+ export {
44
+ R as Sidebar,
45
+ R as default
46
+ };
@@ -0,0 +1,52 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SidebarMenuItem {
3
+ name: string;
4
+ url?: string;
5
+ icon?: string | ReactNode;
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
+ }
52
+ //# sourceMappingURL=Sidebar.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.types.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,eAAe,EAAE,CAAC;CACvC;AAED,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;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,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;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,WAAW,EAAE,CAAC;IACtC,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,SAAS,CAAC;IACnD,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}