unifyedx-storybook-new 0.2.16 → 0.2.18

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.
@@ -1,12 +1,12 @@
1
1
  import { jsxs as l, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
- import ae, { useState as B, useMemo as ce, useId as ea, Fragment as Q, useEffect as X, useCallback as K, useRef as ue } from "react";
3
- import { a as J, U as ut, X as ye, P as _, L as mt, C as je, b as Ge, f as Ue, d as va, D as Na, F as ht, e as pt, h as gt, T as Ve, u as yt, i as ft, I as bt, j as vt, k as Nt, l as xt, m as kt, n as wt, S as xa, o as ka, M as Ct, p as St, q as wa, r as Dt, A as Ft, E as $t, s as Tt, t as At, v as Et, w as Rt, x as Ca, y as It, z as Sa, B as Da, G as zt, H as Pt, J as Bt, K as qe, N as aa, O as ta, Q as Lt, R as Ot, V as Fa, W as Mt, Y as sa, Z as Ut, _ as Vt, $ as $a, a0 as qt, a1 as jt, a2 as Gt, a3 as _t, a4 as Wt, a5 as Yt, a6 as Jt, a7 as Qt, a8 as Xt, a9 as Zt, aa as Ht, ab as Kt, ac as er, ad as ar, ae as tr } from "./vendor-zgKTz69B.js";
4
- import { Popover as rr, PopoverButton as nr, PopoverPanel as sr, Transition as oe, Dialog as me, TransitionChild as ge, DialogPanel as Se, DialogTitle as _e, TabGroup as lr, TabList as or, Tab as re, TabPanels as ir, RadioGroup as ze, Listbox as Z, ListboxButton as cr, ListboxOptions as dr, ListboxOption as ur, SwitchGroup as mr, Switch as Ze, Menu as hr, MenuButton as pr, Portal as gr, MenuItems as yr, MenuItem as fr, DialogBackdrop as br } from "@headlessui/react";
5
- import { motion as ne, AnimatePresence as be } from "framer-motion";
2
+ import ae, { useState as B, useMemo as de, useId as ea, Fragment as Q, useEffect as X, useCallback as K, useRef as me } from "react";
3
+ import { a as J, U as ut, X as fe, P as _, L as mt, C as je, b as Ge, f as Ue, d as va, D as Na, F as ht, e as pt, h as gt, T as Ve, u as yt, i as ft, I as bt, j as vt, k as Nt, l as xt, m as kt, n as wt, S as xa, o as ka, M as Ct, p as St, q as wa, r as Dt, A as Ft, E as $t, s as Tt, t as At, v as Et, w as Rt, x as Ca, y as It, z as Sa, B as Da, G as zt, H as Pt, J as Bt, K as qe, N as aa, O as ta, Q as Lt, R as Ot, V as Fa, W as Mt, Y as sa, Z as Ut, _ as Vt, $ as $a, a0 as qt, a1 as jt, a2 as Gt, a3 as _t, a4 as Wt, a5 as Yt, a6 as Jt, a7 as Qt, a8 as Xt, a9 as Zt, aa as Ht, ab as Kt, ac as er, ad as ar, ae as tr } from "./vendor-zgKTz69B.js";
4
+ import { Popover as rr, PopoverButton as nr, PopoverPanel as sr, Transition as ie, Dialog as he, TransitionChild as ye, DialogPanel as Se, DialogTitle as _e, TabGroup as lr, TabList as or, Tab as re, TabPanels as ir, RadioGroup as ze, Listbox as Z, ListboxButton as cr, ListboxOptions as dr, ListboxOption as ur, SwitchGroup as mr, Switch as Ze, Menu as hr, MenuButton as pr, Portal as gr, MenuItems as yr, MenuItem as fr, DialogBackdrop as br } from "@headlessui/react";
5
+ import { motion as se, AnimatePresence as ve } from "framer-motion";
6
6
  import { d as vr } from "./vendor-lodash-BD0xlZyL.js";
7
7
  import { useFloating as Ta, offset as Aa, flip as Ea, shift as Ra, autoUpdate as Ia, useClick as Nr, useDismiss as xr, useInteractions as kr, FloatingPortal as wr } from "@floating-ui/react";
8
8
  import He, { debounce as Cr } from "lodash";
9
- import { toast as le, ToastContainer as Sr, Slide as Dr } from "react-toastify";
9
+ import { toast as oe, ToastContainer as Sr, Slide as Dr } from "react-toastify";
10
10
  import "react-toastify/dist/ReactToastify.css";
11
11
  import { P as Fr, S as $r, F as Tr, G as Ar, a as Er, E as Rr, b as Ir, C as zr, R as Pr, c as Br, d as Lr, e as Or, f as Mr, I as Ur, g as ia } from "./vendor-syncfusion-DGcZfoFG.js";
12
12
  const Vr = (t) => {
@@ -29,7 +29,7 @@ const Vr = (t) => {
29
29
  className: u,
30
30
  ...i
31
31
  }) => {
32
- const [c, y] = B(!1), v = ce(() => qr(r), []), x = t && !c, a = !x && r, k = !x && !r, h = J(
32
+ const [c, y] = B(!1), v = de(() => qr(r), []), x = t && !c, a = !x && r, k = !x && !r, h = J(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  u
@@ -95,7 +95,7 @@ const Vr = (t) => {
95
95
  className: "badge-remove-button",
96
96
  onClick: n,
97
97
  "aria-label": `Remove ${t}`,
98
- children: /* @__PURE__ */ e(ye, { className: "badge-remove-icon" })
98
+ children: /* @__PURE__ */ e(fe, { className: "badge-remove-icon" })
99
99
  }
100
100
  )
101
101
  ] });
@@ -290,7 +290,7 @@ const _r = {
290
290
  onClick: v,
291
291
  className: "datepicker-clear-button",
292
292
  "aria-label": "Clear selected date",
293
- children: /* @__PURE__ */ e(ye, { size: 16 })
293
+ children: /* @__PURE__ */ e(fe, { size: 16 })
294
294
  }
295
295
  )
296
296
  ] }) }),
@@ -354,7 +354,7 @@ const _r = {
354
354
  onClick: a,
355
355
  className: "datepicker-clear-button",
356
356
  "aria-label": "Clear selected date range",
357
- children: /* @__PURE__ */ e(ye, { size: 16 })
357
+ children: /* @__PURE__ */ e(fe, { size: 16 })
358
358
  }
359
359
  )
360
360
  ] }) }),
@@ -581,7 +581,7 @@ const _r = {
581
581
  ROLE: "Role"
582
582
  }, Le = (t) => `https://ui-avatars.com/api/?rounded=true&background=random&name=${encodeURIComponent(
583
583
  t
584
- )}`, se = {
584
+ )}`, le = {
585
585
  DRIVE: "drive",
586
586
  INTEREST: "interest",
587
587
  ARTICLE: "article"
@@ -636,8 +636,8 @@ const _r = {
636
636
  subHeading: g = "Supports PNG, JPG, PDF. Max size: 50MB."
637
637
  }) => {
638
638
  const $ = i.length > 0 || c.length > 0;
639
- return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(
640
- me,
639
+ return /* @__PURE__ */ e(ie, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(
640
+ he,
641
641
  {
642
642
  as: "div",
643
643
  className: "file-upload-dialog",
@@ -645,7 +645,7 @@ const _r = {
645
645
  ...s(),
646
646
  children: [
647
647
  /* @__PURE__ */ e(
648
- ge,
648
+ ye,
649
649
  {
650
650
  as: Q,
651
651
  enter: "ease-out duration-300",
@@ -658,7 +658,7 @@ const _r = {
658
658
  }
659
659
  ),
660
660
  /* @__PURE__ */ e("div", { className: "dialog-positioner", children: /* @__PURE__ */ e(
661
- ge,
661
+ ye,
662
662
  {
663
663
  as: Q,
664
664
  enter: "ease-out duration-300",
@@ -683,7 +683,7 @@ const _r = {
683
683
  type: "button",
684
684
  onClick: r,
685
685
  className: "close-button",
686
- children: /* @__PURE__ */ e(ye, { size: 20 })
686
+ children: /* @__PURE__ */ e(fe, { size: 20 })
687
687
  }
688
688
  )
689
689
  ] }),
@@ -840,7 +840,7 @@ const _r = {
840
840
  }), r();
841
841
  },
842
842
  enableReinitialize: !0
843
- }), k = ce(() => n.reduce((C, T) => {
843
+ }), k = de(() => n.reduce((C, T) => {
844
844
  const I = T.key, E = a.values[I];
845
845
  let V = !1;
846
846
  if (E)
@@ -1068,9 +1068,9 @@ const _r = {
1068
1068
  return null;
1069
1069
  }
1070
1070
  };
1071
- return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(me, { as: "div", className: "relative z-50", onClose: r, children: [
1071
+ return /* @__PURE__ */ e(ie, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(he, { as: "div", className: "relative z-50", onClose: r, children: [
1072
1072
  /* @__PURE__ */ e(
1073
- ge,
1073
+ ye,
1074
1074
  {
1075
1075
  as: Q,
1076
1076
  enter: "ease-out duration-300",
@@ -1083,7 +1083,7 @@ const _r = {
1083
1083
  }
1084
1084
  ),
1085
1085
  /* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(
1086
- ge,
1086
+ ye,
1087
1087
  {
1088
1088
  as: Q,
1089
1089
  enter: "ease-out duration-300",
@@ -1134,7 +1134,7 @@ const _r = {
1134
1134
  {
1135
1135
  className: "filter-tab-panel",
1136
1136
  children: /* @__PURE__ */ e(
1137
- ne.div,
1137
+ se.div,
1138
1138
  {
1139
1139
  initial: { opacity: 0.8, x: 10 },
1140
1140
  animate: { opacity: 1, x: 0 },
@@ -1251,9 +1251,9 @@ const _r = {
1251
1251
  }, h = () => {
1252
1252
  r({ primary: !1, secondary: !0 });
1253
1253
  };
1254
- return /* @__PURE__ */ e(oe, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(me, { as: "div", className: "modal-dialog", onClose: () => r({}), children: [
1254
+ return /* @__PURE__ */ e(ie, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ l(he, { as: "div", className: "modal-dialog", onClose: () => r({}), children: [
1255
1255
  /* @__PURE__ */ e(
1256
- ge,
1256
+ ye,
1257
1257
  {
1258
1258
  as: Q,
1259
1259
  enter: "ease-out duration-300",
@@ -1266,7 +1266,7 @@ const _r = {
1266
1266
  }
1267
1267
  ),
1268
1268
  /* @__PURE__ */ e("div", { className: "modal-positioner", children: /* @__PURE__ */ e(
1269
- ge,
1269
+ ye,
1270
1270
  {
1271
1271
  as: Q,
1272
1272
  enter: "ease-out duration-300",
@@ -1447,7 +1447,7 @@ const _r = {
1447
1447
  }
1448
1448
  ),
1449
1449
  n && /* @__PURE__ */ e("p", { className: "radiogroup-error-message", children: n })
1450
- ] }), he = ({
1450
+ ] }), pe = ({
1451
1451
  value: t = "",
1452
1452
  onDebouncedChange: r,
1453
1453
  debounceDelay: s = 400,
@@ -1523,14 +1523,14 @@ const _r = {
1523
1523
  }
1524
1524
  ),
1525
1525
  /* @__PURE__ */ e(
1526
- oe,
1526
+ ie,
1527
1527
  {
1528
1528
  leave: "transition ease-in duration-100",
1529
1529
  leaveFrom: "opacity-100",
1530
1530
  leaveTo: "opacity-0",
1531
1531
  children: /* @__PURE__ */ l(dr, { className: "select-options", children: [
1532
1532
  y && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1533
- he,
1533
+ pe,
1534
1534
  {
1535
1535
  value: v,
1536
1536
  onDebouncedChange: x,
@@ -1704,7 +1704,7 @@ const _r = {
1704
1704
  onClick: s,
1705
1705
  className: "collapse-button desktop-only",
1706
1706
  "aria-label": r ? "Expand sidebar" : "Collapse sidebar",
1707
- children: r ? /* @__PURE__ */ e(Ct, {}) : /* @__PURE__ */ e(ye, {})
1707
+ children: r ? /* @__PURE__ */ e(Ct, {}) : /* @__PURE__ */ e(fe, {})
1708
1708
  }
1709
1709
  )
1710
1710
  ] }),
@@ -1884,8 +1884,8 @@ const _r = {
1884
1884
  closeOnOverlayClick: v = !0
1885
1885
  }) => {
1886
1886
  const x = s[o], a = Object.keys(s), k = a.indexOf(o), h = (k + 1) / a.length * 100, g = k > 0 && u.onBack;
1887
- return /* @__PURE__ */ e(oe, { show: t, as: Q, children: /* @__PURE__ */ l(
1888
- me,
1887
+ return /* @__PURE__ */ e(ie, { show: t, as: Q, children: /* @__PURE__ */ l(
1888
+ he,
1889
1889
  {
1890
1890
  as: "div",
1891
1891
  className: "wizard-dialog",
@@ -1893,7 +1893,7 @@ const _r = {
1893
1893
  },
1894
1894
  children: [
1895
1895
  /* @__PURE__ */ e(
1896
- ge,
1896
+ ye,
1897
1897
  {
1898
1898
  as: Q,
1899
1899
  enter: "ease-out duration-300",
@@ -1906,7 +1906,7 @@ const _r = {
1906
1906
  }
1907
1907
  ),
1908
1908
  /* @__PURE__ */ e("div", { className: "wizard-container", children: /* @__PURE__ */ e("div", { className: "wizard-positioner", children: /* @__PURE__ */ e(
1909
- ge,
1909
+ ye,
1910
1910
  {
1911
1911
  as: Q,
1912
1912
  enter: "transform transition ease-in-out duration-500",
@@ -1928,8 +1928,8 @@ const _r = {
1928
1928
  }
1929
1929
  ),
1930
1930
  /* @__PURE__ */ l("div", { className: "wizard-header-text", children: [
1931
- /* @__PURE__ */ e(me.Title, { as: "h3", className: "wizard-title", children: i }),
1932
- c && /* @__PURE__ */ e(me.Description, { className: "wizard-description", children: c })
1931
+ /* @__PURE__ */ e(he.Title, { as: "h3", className: "wizard-title", children: i }),
1932
+ c && /* @__PURE__ */ e(he.Description, { className: "wizard-description", children: c })
1933
1933
  ] })
1934
1934
  ] }),
1935
1935
  /* @__PURE__ */ e(
@@ -1938,7 +1938,7 @@ const _r = {
1938
1938
  onClick: r,
1939
1939
  className: "wizard-close-button",
1940
1940
  "aria-label": "Close modal",
1941
- children: /* @__PURE__ */ e(ye, { size: 24 })
1941
+ children: /* @__PURE__ */ e(fe, { size: 24 })
1942
1942
  }
1943
1943
  )
1944
1944
  ] }),
@@ -1950,13 +1950,13 @@ const _r = {
1950
1950
  }
1951
1951
  ) }),
1952
1952
  /* @__PURE__ */ e("div", { className: "wizard-body", children: /* @__PURE__ */ e(
1953
- be,
1953
+ ve,
1954
1954
  {
1955
1955
  initial: !1,
1956
1956
  custom: n,
1957
1957
  mode: "wait",
1958
1958
  children: /* @__PURE__ */ e(
1959
- ne.div,
1959
+ se.div,
1960
1960
  {
1961
1961
  custom: n,
1962
1962
  variants: Kr,
@@ -2065,7 +2065,7 @@ const _r = {
2065
2065
  return /* @__PURE__ */ l(hr, { as: "div", className: "options-menu-wrapper", children: [
2066
2066
  /* @__PURE__ */ e(pr, { ref: o.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
2067
2067
  /* @__PURE__ */ e(gr, { children: /* @__PURE__ */ e(
2068
- oe,
2068
+ ie,
2069
2069
  {
2070
2070
  as: Q,
2071
2071
  enter: "transition ease-out duration-100",
@@ -2193,17 +2193,17 @@ function Ya() {
2193
2193
  return "";
2194
2194
  }
2195
2195
  }
2196
- function ve() {
2196
+ function Ne() {
2197
2197
  return `${We()}${Ya()}`;
2198
2198
  }
2199
2199
  function Ja() {
2200
- return `${ve()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
2200
+ return `${Ne()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
2201
2201
  }
2202
2202
  function Qa() {
2203
- return `${ve()}/unifyedstudioutility/commonutility/groupusers/list?type=All&page=0&size=20&sortkey=name&sorder=1&createdbyme=false`;
2203
+ return `${Ne()}/unifyedstudioutility/commonutility/groupusers/list?type=All&page=0&size=20&sortkey=name&sorder=1&createdbyme=false`;
2204
2204
  }
2205
2205
  function Xa() {
2206
- return `${ve()}/unifyedusergroupprovisioning/api`;
2206
+ return `${Ne()}/unifyedusergroupprovisioning/api`;
2207
2207
  }
2208
2208
  function Za() {
2209
2209
  return `${Xa()}/v2/roles`;
@@ -2212,7 +2212,7 @@ function Ha() {
2212
2212
  return `${Za()}/search`;
2213
2213
  }
2214
2214
  function la() {
2215
- return `${ve()}/unifyed-mydrive/v2`;
2215
+ return `${Ne()}/unifyed-mydrive/v2`;
2216
2216
  }
2217
2217
  function sn() {
2218
2218
  return `${la()}/directory/permissions`;
@@ -2223,7 +2223,7 @@ function ln() {
2223
2223
  function ds() {
2224
2224
  return Object.freeze({
2225
2225
  REACT_APP_BASE_URL: We(),
2226
- GATEWAY_BASE: ve(),
2226
+ GATEWAY_BASE: Ne(),
2227
2227
  USER_SEARCH_BASE: Ja(),
2228
2228
  AD_GROUPS_LIST_SEARCH_API: Qa(),
2229
2229
  PROVISIONING_BASE: Xa(),
@@ -2412,7 +2412,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2412
2412
  }));
2413
2413
  },
2414
2414
  getMembersForGroup: async (t) => {
2415
- const r = `${ve()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await Ee(r);
2415
+ const r = `${Ne()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await Ee(r);
2416
2416
  let o = [];
2417
2417
  if (Array.isArray(s))
2418
2418
  o = s;
@@ -2529,17 +2529,19 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2529
2529
  );
2530
2530
  }, j = async (F) => {
2531
2531
  try {
2532
- if (n === se.DRIVE) {
2533
- const z = {
2532
+ if (n === le.DRIVE) {
2533
+ const z = F.pendingInvites.map((ne) => ({
2534
+ id: ne.id,
2535
+ permission: ne.permission,
2536
+ type: ne.type.toLowerCase()
2537
+ }));
2538
+ i({
2534
2539
  entity: t,
2535
- userGroupRolesObj: F.pendingInvites.map((U) => ({
2536
- id: U.id,
2537
- permission: U.permission,
2538
- type: U.type.toLowerCase()
2539
- }))
2540
- };
2541
- i(z, o);
2542
- } else if (n === se.INTEREST) {
2540
+ userGroupRolesObj: z,
2541
+ existingShares: o
2542
+ // Always send updated existing shares
2543
+ }, o);
2544
+ } else if (n === le.INTEREST) {
2543
2545
  const z = F.pendingInvites.map((U) => ({
2544
2546
  identity: U.id,
2545
2547
  type: U.type.toLowerCase(),
@@ -2550,16 +2552,17 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2550
2552
  interestId: t?.data?.id
2551
2553
  }));
2552
2554
  i(z, o);
2553
- } else if (n === se.ARTICLE) {
2554
- const z = {
2555
+ } else if (n === le.ARTICLE) {
2556
+ const z = F.pendingInvites.map((ne) => ({
2557
+ id: ne.id,
2558
+ permission: ne.permission,
2559
+ type: ne.type.toLowerCase()
2560
+ }));
2561
+ i({
2555
2562
  entity: t,
2556
- userGroupRolesObj: F.pendingInvites.map((U) => ({
2557
- id: U.id,
2558
- permission: U.permission,
2559
- type: U.type.toLowerCase()
2560
- }))
2561
- };
2562
- i(z, o);
2563
+ userGroupRolesObj: z,
2564
+ existingShares: o
2565
+ }, o);
2563
2566
  } else
2564
2567
  i(F, o);
2565
2568
  setTimeout(() => {
@@ -2573,21 +2576,21 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2573
2576
  return z ? `${z.permission}` : "";
2574
2577
  }, A = () => {
2575
2578
  switch (n) {
2576
- case se.DRIVE:
2579
+ case le.DRIVE:
2577
2580
  return "Share with others";
2578
- case se.INTEREST:
2581
+ case le.INTEREST:
2579
2582
  return "Add Audience";
2580
- case se.ARTICLE:
2583
+ case le.ARTICLE:
2581
2584
  return "Add Users, Groups or Roles test";
2582
2585
  default:
2583
2586
  return "Add User, Groups or Roles test";
2584
2587
  }
2585
- }, M = ce(() => (console.log("InviteFlow - isChanged:", c, "pendingInvites.length:", m.length), m.length === 0 && !c), [m.length, c]);
2588
+ }, M = de(() => (console.log("InviteFlow - isChanged:", c, "pendingInvites.length:", m.length), m.length === 0 && !c), [m.length, c]);
2586
2589
  return /* @__PURE__ */ l("div", { className: "flex flex-col h-full bg-white", children: [
2587
2590
  /* @__PURE__ */ l("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2588
- /* @__PURE__ */ e(me.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: A() }),
2591
+ /* @__PURE__ */ e(he.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: A() }),
2589
2592
  /* @__PURE__ */ l("div", { className: "flex items-center gap-4", children: [
2590
- n === se.DRIVE && /* @__PURE__ */ l("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
2593
+ n === le.DRIVE && /* @__PURE__ */ l("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
2591
2594
  /* @__PURE__ */ e(Bt, { className: "h-5 w-5" }),
2592
2595
  " Copy Link"
2593
2596
  ] }),
@@ -2602,7 +2605,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2602
2605
  ] })
2603
2606
  ] }),
2604
2607
  /* @__PURE__ */ l("main", { className: "flex-grow p-4 space-y-6 overflow-y-auto", children: [
2605
- (n === se.DRIVE || u) && /* @__PURE__ */ e(
2608
+ (n === le.DRIVE || u) && /* @__PURE__ */ e(
2606
2609
  gn,
2607
2610
  {
2608
2611
  users: o.users.filter((F) => F.permission !== "remove"),
@@ -2621,7 +2624,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2621
2624
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(aa, { className: "h-5 w-5 text-gray-400" }) })
2622
2625
  ] }),
2623
2626
  /* @__PURE__ */ e(
2624
- oe,
2627
+ ie,
2625
2628
  {
2626
2629
  as: Q,
2627
2630
  leave: "transition ease-in duration-100",
@@ -2657,15 +2660,15 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2657
2660
  )
2658
2661
  ] }) }) }),
2659
2662
  /* @__PURE__ */ e("div", { className: "col-span-2", children: /* @__PURE__ */ e(
2660
- he,
2663
+ pe,
2661
2664
  {
2662
2665
  placeholder: `Search by ${y.name.toLowerCase()}...`,
2663
2666
  onDebouncedChange: (F) => a(F),
2664
2667
  value: x
2665
2668
  }
2666
2669
  ) }),
2667
- /* @__PURE__ */ e(be, { children: (h?.length > 0 || O) && /* @__PURE__ */ e(
2668
- ne.div,
2670
+ /* @__PURE__ */ e(ve, { children: (h?.length > 0 || O) && /* @__PURE__ */ e(
2671
+ se.div,
2669
2672
  {
2670
2673
  initial: { opacity: 0, y: -10 },
2671
2674
  animate: { opacity: 1, y: 0 },
@@ -2732,8 +2735,8 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2732
2735
  }
2733
2736
  ) })
2734
2737
  ] }),
2735
- /* @__PURE__ */ e(be, { children: p.length > 0 && /* @__PURE__ */ l(
2736
- ne.div,
2738
+ /* @__PURE__ */ e(ve, { children: p.length > 0 && /* @__PURE__ */ l(
2739
+ se.div,
2737
2740
  {
2738
2741
  initial: { opacity: 0, y: 20 },
2739
2742
  animate: { opacity: 1, y: 0 },
@@ -2745,7 +2748,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2745
2748
  p.length,
2746
2749
  ")"
2747
2750
  ] }),
2748
- n === se.DRIVE && /* @__PURE__ */ e(
2751
+ n === le.DRIVE && /* @__PURE__ */ e(
2749
2752
  Z,
2750
2753
  {
2751
2754
  value: T,
@@ -2762,7 +2765,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2762
2765
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(aa, { className: "h-5 w-5 text-gray-400" }) })
2763
2766
  ] }),
2764
2767
  /* @__PURE__ */ e(
2765
- oe,
2768
+ ie,
2766
2769
  {
2767
2770
  as: Q,
2768
2771
  leave: "transition ease-in duration-100",
@@ -2807,8 +2810,8 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2807
2810
  }
2808
2811
  )
2809
2812
  ] }),
2810
- /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(be, { children: p.map((F, z) => /* @__PURE__ */ l(
2811
- ne.div,
2813
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(ve, { children: p.map((F, z) => /* @__PURE__ */ l(
2814
+ se.div,
2812
2815
  {
2813
2816
  layout: !0,
2814
2817
  initial: { opacity: 0, x: -5 },
@@ -2828,7 +2831,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2828
2831
  /* @__PURE__ */ e("span", { className: "font-medium text-sm text-gray-800 truncate", children: F.name })
2829
2832
  ] }),
2830
2833
  /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
2831
- n === se.DRIVE && /* @__PURE__ */ l("span", { className: "text-sm text-gray-500", children: [
2834
+ n === le.DRIVE && /* @__PURE__ */ l("span", { className: "text-sm text-gray-500", children: [
2832
2835
  "can ",
2833
2836
  F.permission
2834
2837
  ] }),
@@ -2871,7 +2874,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2871
2874
  onClick: () => V(j)(),
2872
2875
  disabled: N || M,
2873
2876
  className: "px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md shadow-sm hover:bg-blue-700 hover:cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:bg-blue-300 disabled:cursor-not-allowed",
2874
- children: N ? "Inviting..." : n === se.DRIVE ? "Send Invites" : "Add"
2877
+ children: N ? "Inviting..." : n === le.DRIVE ? "Send Invites" : "Add"
2875
2878
  }
2876
2879
  )
2877
2880
  ] })
@@ -2911,7 +2914,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
2911
2914
  }
2912
2915
  ),
2913
2916
  /* @__PURE__ */ e(wr, { children: /* @__PURE__ */ e(
2914
- oe,
2917
+ ie,
2915
2918
  {
2916
2919
  as: Q,
2917
2920
  show: o,
@@ -3037,7 +3040,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3037
3040
  C
3038
3041
  )) }),
3039
3042
  /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
3040
- he,
3043
+ pe,
3041
3044
  {
3042
3045
  onDebouncedChange: a,
3043
3046
  value: x,
@@ -3045,8 +3048,8 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3045
3048
  }
3046
3049
  ) })
3047
3050
  ] }),
3048
- /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto p-4 h-[calc(100vh-330px)]", children: /* @__PURE__ */ e(be, { mode: "wait", children: /* @__PURE__ */ e(
3049
- ne.div,
3051
+ /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto p-4 h-[calc(100vh-330px)]", children: /* @__PURE__ */ e(ve, { mode: "wait", children: /* @__PURE__ */ e(
3052
+ se.div,
3050
3053
  {
3051
3054
  initial: { y: 10, opacity: 0 },
3052
3055
  animate: { y: 0, opacity: 1 },
@@ -3056,8 +3059,8 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3056
3059
  re.Panel,
3057
3060
  {
3058
3061
  className: "space-y-3 focus:outline-none",
3059
- children: /* @__PURE__ */ e(be, { children: h[C].length > 0 ? h[C].map((T) => /* @__PURE__ */ l(
3060
- ne.div,
3062
+ children: /* @__PURE__ */ e(ve, { children: h[C].length > 0 ? h[C].map((T) => /* @__PURE__ */ l(
3063
+ se.div,
3061
3064
  {
3062
3065
  layout: !0,
3063
3066
  initial: { opacity: 0, y: 20 },
@@ -3112,7 +3115,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3112
3115
  )) : (
3113
3116
  // Empty state is unchanged
3114
3117
  /* @__PURE__ */ l(
3115
- ne.div,
3118
+ se.div,
3116
3119
  {
3117
3120
  initial: { opacity: 0 },
3118
3121
  animate: { opacity: 1 },
@@ -3178,7 +3181,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3178
3181
  // Show 5 skeleton items while loading
3179
3182
  /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((h, g) => /* @__PURE__ */ e(Nn, {}, g)) })
3180
3183
  ) : v.length === 0 ? /* @__PURE__ */ l(
3181
- ne.div,
3184
+ se.div,
3182
3185
  {
3183
3186
  initial: { opacity: 0, scale: 0.95 },
3184
3187
  animate: { opacity: 1, scale: 1 },
@@ -3190,14 +3193,14 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3190
3193
  ]
3191
3194
  }
3192
3195
  ) : /* @__PURE__ */ e(
3193
- ne.ul,
3196
+ se.ul,
3194
3197
  {
3195
3198
  variants: x,
3196
3199
  initial: "hidden",
3197
3200
  animate: "visible",
3198
3201
  className: "divide-y divide-gray-200",
3199
- children: /* @__PURE__ */ e(be, { children: v.map((h) => /* @__PURE__ */ l(
3200
- ne.li,
3202
+ children: /* @__PURE__ */ e(ve, { children: v.map((h) => /* @__PURE__ */ l(
3203
+ se.li,
3201
3204
  {
3202
3205
  layout: !0,
3203
3206
  variants: a,
@@ -3251,7 +3254,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3251
3254
  )
3252
3255
  ] }),
3253
3256
  /* @__PURE__ */ e("div", { className: "p-4 border-b border-gray-200 flex-shrink-0", children: /* @__PURE__ */ e(
3254
- he,
3257
+ pe,
3255
3258
  {
3256
3259
  onDebouncedChange: c,
3257
3260
  value: i,
@@ -3260,7 +3263,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3260
3263
  ) }),
3261
3264
  /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: k() })
3262
3265
  ] });
3263
- }, de = {
3266
+ }, ue = {
3264
3267
  INVITE: "invite",
3265
3268
  MANAGE: "manage",
3266
3269
  MEMBERS: "members"
@@ -3281,10 +3284,10 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3281
3284
  allowedPermissions: c = [],
3282
3285
  ...y
3283
3286
  }) => {
3284
- const [v, x] = B(de.INVITE), [a, k] = B(t), [h, g] = B(null), [$, L] = B(!1), [O, C] = B([]), [T, I] = B(de.MANAGE), E = () => {
3285
- x(de.INVITE), g(null), u();
3287
+ const [v, x] = B(ue.INVITE), [a, k] = B(t), [h, g] = B(null), [$, L] = B(!1), [O, C] = B([]), [T, I] = B(ue.MANAGE), E = () => {
3288
+ x(ue.INVITE), g(null), u();
3286
3289
  }, V = () => {
3287
- x(de.MANAGE);
3290
+ x(ue.MANAGE);
3288
3291
  }, q = async ({ id: p, name: f, type: w }) => {
3289
3292
  if (w === "groups") {
3290
3293
  try {
@@ -3294,21 +3297,21 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3294
3297
  }
3295
3298
  C(resp);
3296
3299
  }
3297
- g({ id: p, type: w, name: f }), I(v), x(de.MEMBERS);
3300
+ g({ id: p, type: w, name: f }), I(v), x(ue.MEMBERS);
3298
3301
  }, G = (p) => {
3299
3302
  console.log("changedExistingShares", p), k(p);
3300
3303
  const f = He.mapValues(t, (m) => m.map((b) => ({ id: b.id, permission: b.permission })).sort((b, D) => b.id - D.id)), w = He.mapValues(p, (m) => m.map((b) => ({ id: b.id, permission: b.permission })).sort((b, D) => b.id - D.id));
3301
3304
  console.log("Existing data:", f), console.log("Changed data:", w);
3302
3305
  const d = !He.isEqual(f, w);
3303
- console.log("hasPermissionChanged:", d), L(d), x(v === de.MEMBERS ? T : de.INVITE);
3306
+ console.log("hasPermissionChanged:", d), L(d), x(v === ue.MEMBERS ? T : ue.INVITE);
3304
3307
  };
3305
- return /* @__PURE__ */ e(oe, { appear: !0, show: r, as: Q, children: /* @__PURE__ */ l(me, { as: "div", className: "relative z-50", onClose: E, children: [
3308
+ return /* @__PURE__ */ e(ie, { appear: !0, show: r, as: Q, children: /* @__PURE__ */ l(he, { as: "div", className: "relative z-50", onClose: E, children: [
3306
3309
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
3307
3310
  /* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Se, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
3308
3311
  switch (v) {
3309
- case de.MANAGE:
3312
+ case ue.MANAGE:
3310
3313
  return /* @__PURE__ */ e(
3311
- ne.div,
3314
+ se.div,
3312
3315
  {
3313
3316
  initial: { x: "100%" },
3314
3317
  animate: { x: 0 },
@@ -3330,9 +3333,9 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3330
3333
  },
3331
3334
  "manage"
3332
3335
  );
3333
- case de.MEMBERS:
3336
+ case ue.MEMBERS:
3334
3337
  return /* @__PURE__ */ e(
3335
- ne.div,
3338
+ se.div,
3336
3339
  {
3337
3340
  initial: { x: "100%" },
3338
3341
  animate: { x: 0 },
@@ -3355,7 +3358,7 @@ const De = dn(), Ee = De.axiosGet, un = De.axiosDelete, Re = De.axiosPost, mn =
3355
3358
  );
3356
3359
  default:
3357
3360
  return /* @__PURE__ */ e(
3358
- ne.div,
3361
+ se.div,
3359
3362
  {
3360
3363
  initial: { x: 0 },
3361
3364
  animate: { x: 0 },
@@ -3410,11 +3413,11 @@ function Ye({
3410
3413
  getOptionId: h = ($) => String($.id),
3411
3414
  getOptionLabel: g = ($) => $.name
3412
3415
  }) {
3413
- const $ = ea(), L = ea(), [O, C] = B(""), T = ue(""), I = ce(() => {
3416
+ const $ = ea(), L = ea(), [O, C] = B(""), T = me(""), I = de(() => {
3414
3417
  const p = /* @__PURE__ */ new Map();
3415
3418
  for (const f of r) p.set(h(f), f);
3416
3419
  return p;
3417
- }, [r, h]), E = ce(() => Array.isArray(s) ? s.map((p) => p && typeof p == "object" ? I.get(h(p)) || null : I.get(String(p))).filter(Boolean) : [], [s, I, h]), V = ce(() => {
3420
+ }, [r, h]), E = de(() => Array.isArray(s) ? s.map((p) => p && typeof p == "object" ? I.get(h(p)) || null : I.get(String(p))).filter(Boolean) : [], [s, I, h]), V = de(() => {
3418
3421
  if (!O) return r;
3419
3422
  const p = O.toLowerCase();
3420
3423
  return r.filter((f) => g(f).toLowerCase().includes(p));
@@ -3473,7 +3476,7 @@ function Ye({
3473
3476
  }
3474
3477
  ),
3475
3478
  /* @__PURE__ */ e(
3476
- oe,
3479
+ ie,
3477
3480
  {
3478
3481
  as: Q,
3479
3482
  show: p,
@@ -3482,7 +3485,7 @@ function Ye({
3482
3485
  leaveTo: "opacity-0",
3483
3486
  children: /* @__PURE__ */ l(Z.Options, { className: "absolute z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded-md shadow-lg max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: [
3484
3487
  /* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
3485
- he,
3488
+ pe,
3486
3489
  {
3487
3490
  value: O,
3488
3491
  onDebouncedChange: C,
@@ -3592,7 +3595,7 @@ const hs = ({
3592
3595
  x.stopPropagation();
3593
3596
  };
3594
3597
  return /* @__PURE__ */ l(
3595
- me,
3598
+ he,
3596
3599
  {
3597
3600
  open: t,
3598
3601
  onClose: () => r(!1),
@@ -3614,7 +3617,7 @@ const hs = ({
3614
3617
  /* @__PURE__ */ l("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
3615
3618
  o?.customHeader && o.customHeader,
3616
3619
  o?.title && !o?.customHeader && /* @__PURE__ */ e(_e, { className: "text-lg font-bold", children: o?.title }),
3617
- o?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => r(!1), className: "p-2", children: /* @__PURE__ */ e(ye, { className: "w-5 h-5" }) })
3620
+ o?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => r(!1), className: "p-2", children: /* @__PURE__ */ e(fe, { className: "w-5 h-5" }) })
3618
3621
  ] }),
3619
3622
  /* @__PURE__ */ e(
3620
3623
  "div",
@@ -3691,7 +3694,7 @@ function Cn({
3691
3694
  const { setNodeRef: k, isOver: h } = Ut({ id: x }), { attributes: g, listeners: $, setNodeRef: L, transform: O, isDragging: C } = Vt({ id: v }), T = O ? { transform: `translate3d(${Math.round(O.x)}px, ${Math.round(O.y)}px, 0)` } : void 0, [I, E] = B(!1), [V, q] = B(t.name), G = () => {
3692
3695
  const p = V.trim();
3693
3696
  E(!1), p && p !== t.name ? i?.(t, p) : q(t.name);
3694
- }, N = ce(() => /* @__PURE__ */ e(
3697
+ }, N = de(() => /* @__PURE__ */ e(
3695
3698
  an,
3696
3699
  {
3697
3700
  options: [
@@ -3830,7 +3833,7 @@ function ps({
3830
3833
  // ← allow root moves by default now
3831
3834
  indentUnit: g = 24
3832
3835
  }) {
3833
- const { roots: $ } = ce(() => $n(t) ? An(t, { rootId: r, getId: o, getName: u }) : Tn(
3836
+ const { roots: $ } = de(() => $n(t) ? An(t, { rootId: r, getId: o, getName: u }) : Tn(
3834
3837
  t.map((b) => ({ ...b })),
3835
3838
  { rootId: r, getId: o, getParent: n, getName: u }
3836
3839
  ), [t, r, o, n, u]), [L, O] = B({}), C = K((b) => {
@@ -3851,7 +3854,7 @@ function ps({
3851
3854
  ae.useEffect(() => E(Ae($)), [$]);
3852
3855
  const V = qt(
3853
3856
  jt(Yt, { activationConstraint: { delay: 250, tolerance: 5 } })
3854
- ), q = ue(null), [G, N] = B(null), p = ue(0), f = () => {
3857
+ ), q = me(null), [G, N] = B(null), p = me(0), f = () => {
3855
3858
  }, w = ({ delta: b }) => {
3856
3859
  p.current = b?.x ?? 0;
3857
3860
  }, d = K(
@@ -3863,15 +3866,15 @@ function ps({
3863
3866
  let A = S;
3864
3867
  const M = Math.max(0, Math.floor(-R / g));
3865
3868
  if (M > 0) {
3866
- let ie = S;
3869
+ let ce = S;
3867
3870
  for (let xe = 0; xe < M; xe++) {
3868
- const P = Ka(I, ie, null);
3871
+ const P = Ka(I, ce, null);
3869
3872
  if (!P) break;
3870
3873
  if (!P.parentId) {
3871
3874
  A = r;
3872
3875
  break;
3873
3876
  }
3874
- A = P.parentId, ie = P.parentId;
3877
+ A = P.parentId, ce = P.parentId;
3875
3878
  }
3876
3879
  }
3877
3880
  if (h && A === r) {
@@ -3880,8 +3883,8 @@ function ps({
3880
3883
  }
3881
3884
  const F = Ae(I), { newRoots: z, removed: U } = En(F, j);
3882
3885
  if (!U) return;
3883
- const Ne = Rn(z, A, U);
3884
- E(Ne), a?.({ sourceId: j, destParentId: A, newTree: Ne });
3886
+ const ne = Rn(z, A, U);
3887
+ E(ne), a?.({ sourceId: j, destParentId: A, newTree: ne });
3885
3888
  },
3886
3889
  [I, $, r, h, g, a]
3887
3890
  ), m = K(
@@ -3943,7 +3946,7 @@ function ps({
3943
3946
  )
3944
3947
  ] });
3945
3948
  }
3946
- function fe(...t) {
3949
+ function be(...t) {
3947
3950
  return t.filter(Boolean).join(" ");
3948
3951
  }
3949
3952
  const gs = ({
@@ -3957,19 +3960,19 @@ const gs = ({
3957
3960
  ...c
3958
3961
  // Pass remaining props to Tab.Group
3959
3962
  }) => {
3960
- const y = s === "vertical", v = (k) => fe(
3963
+ const y = s === "vertical", v = (k) => be(
3961
3964
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
3962
3965
  k ? "bg-indigo-50 text-indigo-700" : "text-slate-600 hover:bg-slate-50 hover:text-indigo-700"
3963
- ), x = (k) => fe(
3966
+ ), x = (k) => be(
3964
3967
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
3965
3968
  k ? "border-indigo-600 text-indigo-700" : "border-transparent text-slate-600 hover:text-indigo-700"
3966
3969
  ), a = ({ selected: k }) => i ? typeof i == "function" ? i(k) : i : y ? v(k) : x(k);
3967
- return /* @__PURE__ */ e(re.Group, { vertical: y, ...c, children: y ? /* @__PURE__ */ l("div", { className: fe("flex gap-4", o), children: [
3968
- /* @__PURE__ */ e(re.List, { className: fe("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", n), children: t.map((k) => /* @__PURE__ */ e(re, { className: a, children: k.label }, k.key)) }),
3969
- /* @__PURE__ */ e(re.Panels, { unmount: !r, className: fe("flex-1", u), children: t.map((k) => /* @__PURE__ */ e(re.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: k.content }) }, k.key)) })
3970
+ return /* @__PURE__ */ e(re.Group, { vertical: y, ...c, children: y ? /* @__PURE__ */ l("div", { className: be("flex gap-4", o), children: [
3971
+ /* @__PURE__ */ e(re.List, { className: be("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", n), children: t.map((k) => /* @__PURE__ */ e(re, { className: a, children: k.label }, k.key)) }),
3972
+ /* @__PURE__ */ e(re.Panels, { unmount: !r, className: be("flex-1", u), children: t.map((k) => /* @__PURE__ */ e(re.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: k.content }) }, k.key)) })
3970
3973
  ] }) : /* @__PURE__ */ l(ee, { children: [
3971
- /* @__PURE__ */ e(re.List, { className: fe("flex gap-6 border-b border-gray-300 mb-3", n), children: t.map((k) => /* @__PURE__ */ e(re, { className: a, children: k.label }, k.key)) }),
3972
- /* @__PURE__ */ e(re.Panels, { unmount: !r, className: fe("mt-2", u), children: t.map((k) => /* @__PURE__ */ e(re.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: k.content }) }, k.key)) })
3974
+ /* @__PURE__ */ e(re.List, { className: be("flex gap-6 border-b border-gray-300 mb-3", n), children: t.map((k) => /* @__PURE__ */ e(re, { className: a, children: k.label }, k.key)) }),
3975
+ /* @__PURE__ */ e(re.Panels, { unmount: !r, className: be("mt-2", u), children: t.map((k) => /* @__PURE__ */ e(re.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: k.content }) }, k.key)) })
3973
3976
  ] }) });
3974
3977
  };
3975
3978
  function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
@@ -3977,7 +3980,7 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
3977
3980
  const [n, u] = ae.useState(t), [i, c] = ae.useState(() => {
3978
3981
  const a = r && r[t.key] || {};
3979
3982
  return console.log("Initial Section data for", t.key, a), a;
3980
- }), y = ue(r);
3983
+ }), y = me(r);
3981
3984
  X(() => {
3982
3985
  if (y.current !== r) {
3983
3986
  y.current = r;
@@ -3985,7 +3988,7 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
3985
3988
  console.log("Updated Section data for", t.key, a), c(a);
3986
3989
  }
3987
3990
  }, [r, t.key]), console.log("Section data", i);
3988
- const v = ue(i);
3991
+ const v = me(i);
3989
3992
  X(() => {
3990
3993
  v.current !== i && s && typeof s == "function" && (v.current = i, s(n.key, i));
3991
3994
  }, [n.key, i, s]);
@@ -4304,7 +4307,7 @@ function In({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4304
4307
  ] }),
4305
4308
  a.fieldtype === "search" && /* @__PURE__ */ l("div", { children: [
4306
4309
  /* @__PURE__ */ e(
4307
- he,
4310
+ pe,
4308
4311
  {
4309
4312
  value: i[a.key] || "",
4310
4313
  onChange: (h) => {
@@ -4458,7 +4461,7 @@ function Pn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4458
4461
  const [x, a] = B(() => {
4459
4462
  const N = r && r[n.key] || [], p = N.length > 0 ? N : [{ id: 0 }];
4460
4463
  return console.log(`[DataTableRenderer] ${n.key} - Initial data:`, p), p;
4461
- }), k = ue(r);
4464
+ }), k = me(r);
4462
4465
  X(() => {
4463
4466
  if (console.log(`[DataTableRenderer] ${n.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${n.key} - Previous:`, k.current), console.log(`[DataTableRenderer] ${n.key} - Current:`, r), k.current !== r) {
4464
4467
  k.current = r;
@@ -4466,7 +4469,7 @@ function Pn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4466
4469
  console.log(`[DataTableRenderer] ${n.key} - Setting new data:`, p), a(p);
4467
4470
  }
4468
4471
  }, [r, n.key]);
4469
- const h = ue(x), g = ue(null);
4472
+ const h = me(x), g = me(null);
4470
4473
  X(() => {
4471
4474
  h.current !== x && s && typeof s == "function" && (h.current = x, g.current && clearTimeout(g.current), g.current = setTimeout(() => {
4472
4475
  s(n.key, x);
@@ -4703,7 +4706,7 @@ function Pn({ item: t, data: r, updateHandler: s, validationErrors: o = {} }) {
4703
4706
  );
4704
4707
  case "search":
4705
4708
  return (d, m) => /* @__PURE__ */ e(
4706
- he,
4709
+ pe,
4707
4710
  {
4708
4711
  value: d[N.key] || "",
4709
4712
  onChange: (b) => p(m, b),
@@ -4938,11 +4941,11 @@ const fa = () => {
4938
4941
  }, ba = () => {
4939
4942
  typeof document > "u" || (Me = Math.max(0, Me - 1), Me === 0 && document.body.classList.remove("toast-backdrop"));
4940
4943
  }, ke = {
4941
- success: (t, r) => le.success(t, { ...Te, ...r }),
4942
- info: (t, r) => le.info(t, { ...Te, ...r }),
4943
- warn: (t, r) => le.warn(t, { ...Te, ...r }),
4944
+ success: (t, r) => oe.success(t, { ...Te, ...r }),
4945
+ info: (t, r) => oe.info(t, { ...Te, ...r }),
4946
+ warn: (t, r) => oe.warn(t, { ...Te, ...r }),
4944
4947
  // Error: no autoClose + modal-like behavior via backdrop
4945
- error: (t, r) => le.error(t, {
4948
+ error: (t, r) => oe.error(t, {
4946
4949
  ...Te,
4947
4950
  autoClose: !1,
4948
4951
  closeOnClick: !1,
@@ -4952,7 +4955,7 @@ const fa = () => {
4952
4955
  ...r
4953
4956
  }),
4954
4957
  // Promise helper (error branch inherits the modal behavior)
4955
- promise: (t, r, s) => le.promise(
4958
+ promise: (t, r, s) => oe.promise(
4956
4959
  t,
4957
4960
  {
4958
4961
  pending: r?.pending,
@@ -5002,7 +5005,7 @@ const fa = () => {
5002
5005
  A.sort((M, F) => (M.order ?? 0) - (F.order ?? 0)), g(A), s?.(A);
5003
5006
  }
5004
5007
  } catch (S) {
5005
- console.log("Error loading collections:", S), typeof window < "u" && !window.location.pathname.includes("iframe.html") && le.error("Failed to load collections");
5008
+ console.log("Error loading collections:", S), typeof window < "u" && !window.location.pathname.includes("iframe.html") && oe.error("Failed to load collections");
5006
5009
  }
5007
5010
  };
5008
5011
  X(() => {
@@ -5052,25 +5055,25 @@ const fa = () => {
5052
5055
  (z) => z.id === v ? A && A.id ? { ...z, ...A } : { ...z, categoryName: a.trim() } : z
5053
5056
  );
5054
5057
  return s?.(F), F;
5055
- }), le.success("Collection updated successfully");
5058
+ }), oe.success("Collection updated successfully");
5056
5059
  }
5057
5060
  x(null), k("");
5058
5061
  } catch (A) {
5059
- console.log(A), le.error("Failed to save collection");
5062
+ console.log(A), oe.error("Failed to save collection");
5060
5063
  }
5061
5064
  }, p = async (S) => {
5062
5065
  if (i)
5063
5066
  try {
5064
- await un(`${t.collectionUpdate}/${S.id}`) && (le.success("Deleted successfully", { autoClose: 3e3 }), E());
5067
+ await un(`${t.collectionUpdate}/${S.id}`) && (oe.success("Deleted successfully", { autoClose: 3e3 }), E());
5065
5068
  } catch (A) {
5066
- console.log(A), le.error("Failed to delete collection");
5069
+ console.log(A), oe.error("Failed to delete collection");
5067
5070
  }
5068
5071
  }, f = (S, A, M) => {
5069
5072
  if (!c || !A || !M || A === M) return S;
5070
- const F = S.findIndex((ie) => ie.id === A), z = S.findIndex((ie) => ie.id === M);
5073
+ const F = S.findIndex((ce) => ce.id === A), z = S.findIndex((ce) => ce.id === M);
5071
5074
  if (F === -1 || z === -1) return S;
5072
- const U = [...S], [Ne] = U.splice(F, 1);
5073
- return U.splice(z, 0, Ne), U.map((ie, xe) => ({ ...ie, order: xe + 1 }));
5075
+ const U = [...S], [ne] = U.splice(F, 1);
5076
+ return U.splice(z, 0, ne), U.map((ce, xe) => ({ ...ce, order: xe + 1 }));
5074
5077
  }, w = async (S) => {
5075
5078
  const A = S.map((M) => ({
5076
5079
  id: M.id,
@@ -5080,7 +5083,7 @@ const fa = () => {
5080
5083
  try {
5081
5084
  await Re(t.updateCollection, A);
5082
5085
  } catch (M) {
5083
- console.log(M), le.error("Failed to save order", { autoClose: 2500 });
5086
+ console.log(M), oe.error("Failed to save order", { autoClose: 2500 });
5084
5087
  }
5085
5088
  }, d = (S, A) => {
5086
5089
  c && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(A)), L(A));
@@ -5103,7 +5106,7 @@ const fa = () => {
5103
5106
  return /* @__PURE__ */ l("div", { className: `manage-collection-list ${r}`, children: [
5104
5107
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ l("div", { className: "w-1/2 flex justify-end", children: [
5105
5108
  o && /* @__PURE__ */ e(
5106
- he,
5109
+ pe,
5107
5110
  {
5108
5111
  value: T,
5109
5112
  onDebouncedChange: I,
@@ -5161,7 +5164,7 @@ const fa = () => {
5161
5164
  className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
5162
5165
  onClick: G,
5163
5166
  "aria-label": "Cancel edit",
5164
- children: /* @__PURE__ */ e(ye, { color: "#767676" })
5167
+ children: /* @__PURE__ */ e(fe, { color: "#767676" })
5165
5168
  }
5166
5169
  ),
5167
5170
  /* @__PURE__ */ e(
@@ -5279,7 +5282,7 @@ function Un({
5279
5282
  onCancel: o,
5280
5283
  onSave: n
5281
5284
  }) {
5282
- const [u, i] = ae.useState(r), [c, y] = ae.useState(null), [v, x] = B(!1), [a, k] = B(!1), [h, g] = B({}), $ = `${ve()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, L = $, [O, C] = B(1), T = (f) => {
5285
+ const [u, i] = ae.useState(r), [c, y] = ae.useState(null), [v, x] = B(!1), [a, k] = B(!1), [h, g] = B({}), $ = `${Ne()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, L = $, [O, C] = B(1), T = (f) => {
5283
5286
  if (!r || !r.configuration)
5284
5287
  return f;
5285
5288
  const w = {}, d = f?.configuration || {};
@@ -5811,7 +5814,7 @@ const bs = ({
5811
5814
  ] }),
5812
5815
  /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
5813
5816
  y && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
5814
- he,
5817
+ pe,
5815
5818
  {
5816
5819
  placeholder: L,
5817
5820
  value: V,
@@ -5932,16 +5935,16 @@ function vs(t) {
5932
5935
  onRowDoubleClick: V,
5933
5936
  apiRef: q,
5934
5937
  gridProps: G = {}
5935
- } = t, N = ue(null), {
5938
+ } = t, N = me(null), {
5936
5939
  pageSettings: p,
5937
5940
  sortSettings: f,
5938
5941
  ...w
5939
- } = G || {}, [d, m] = ae.useState(p?.page || 1), [b, D] = ae.useState(f?.pageSize || 20), [R, j] = ae.useState(f?.sortKey || "updatedDate"), [S, A] = ae.useState(f?.direction || "Descending"), M = ce(() => {
5942
+ } = G || {}, [d, m] = ae.useState(p?.page || 1), [b, D] = ae.useState(f?.pageSize || 20), [R, j] = ae.useState(f?.sortKey || "updatedDate"), [S, A] = ae.useState(f?.direction || "Descending"), M = de(() => {
5940
5943
  const P = [Fr];
5941
5944
  return i && P.push($r), c && P.push(Tr), y && P.push(Ar), g && P.push(Er), a && P.push(Rr), k && P.push(Ir), h && P.push(zr), x && P.push(Pr), v && P.push(Br), P.push(Lr), P;
5942
- }, [i, c, y, g, a, k, h, x, v]), F = ce(() => {
5943
- const P = () => N.current, te = (W, pe) => {
5944
- !pe && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
5945
+ }, [i, c, y, g, a, k, h, x, v]), F = de(() => {
5946
+ const P = () => N.current, te = (W, ge) => {
5947
+ !ge && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
5945
5948
  };
5946
5949
  return {
5947
5950
  getInstance: () => P(),
@@ -5960,8 +5963,8 @@ function vs(t) {
5960
5963
  pdfExport: (W) => {
5961
5964
  te("pdfExport()", k), P()?.pdfExport?.(W);
5962
5965
  },
5963
- openColumnChooser: (W, pe) => {
5964
- te("openColumnChooser()", h), P()?.columnChooserModule?.openColumnChooser?.(W, pe);
5966
+ openColumnChooser: (W, ge) => {
5967
+ te("openColumnChooser()", h), P()?.columnChooserModule?.openColumnChooser?.(W, ge);
5965
5968
  }
5966
5969
  };
5967
5970
  }, []);
@@ -5974,12 +5977,12 @@ function vs(t) {
5974
5977
  const te = String(P || "");
5975
5978
  return te === "Ascending" || te === "Descending" ? te : te.toLowerCase() === "ascending" ? "Ascending" : "Descending";
5976
5979
  }, U = (P) => {
5977
- const te = N.current, W = P?.requestType, pe = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Fe = P?.pageSize ?? te?.pageSettings?.pageSize ?? b, Ie = P?.currentPage ?? te?.pageSettings?.currentPage ?? n, Je = P?.columnName && P?.direction ? [{ field: P.columnName, dir: z(P.direction) }] : (te?.sortSettings?.columns || []).map(($e) => ({
5980
+ const te = N.current, W = P?.requestType, ge = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Fe = P?.pageSize ?? te?.pageSettings?.pageSize ?? b, Ie = P?.currentPage ?? te?.pageSettings?.currentPage ?? n, Je = P?.columnName && P?.direction ? [{ field: P.columnName, dir: z(P.direction) }] : (te?.sortSettings?.columns || []).map(($e) => ({
5978
5981
  field: $e.field,
5979
5982
  dir: z($e.direction ?? $e.dir)
5980
5983
  })), Qe = P?.searchString ?? "", Xe = P?.columns ?? te?.filterSettings?.columns ?? [];
5981
5984
  return {
5982
- reason: pe,
5985
+ reason: ge,
5983
5986
  page: { index: Ie, size: Fe, skip: (Ie - 1) * Fe, take: Fe },
5984
5987
  sort: Je,
5985
5988
  // [{ field, dir: 'Ascending'|'Descending' }]
@@ -5987,17 +5990,17 @@ function vs(t) {
5987
5990
  filters: Xe,
5988
5991
  rawEvent: P
5989
5992
  };
5990
- }, Ne = (P) => {
5993
+ }, ne = (P) => {
5991
5994
  setTimeout(() => {
5992
5995
  N?.current?.hideSpinner();
5993
5996
  }, 1e3), P.requestType === "paging" && (m(P.currentPage), D(P.pageSize)), P.requestType === "sorting" && (j(P.columnName || "updatedDate"), A(P.direction === "Ascending" ? "ASC" : "DESC")), T && T(U(P), P);
5994
- }, ie = (P) => {
5997
+ }, ce = (P) => {
5995
5998
  typeof V == "function" && V(P?.rowData, P);
5996
5999
  }, xe = () => {
5997
6000
  const P = [];
5998
6001
  return O && P.push(/* @__PURE__ */ e(ia, { type: "checkbox", width: "50" }, "__checkbox__")), C.forEach((te, W) => {
5999
6002
  const {
6000
- field: pe,
6003
+ field: ge,
6001
6004
  headerText: Fe,
6002
6005
  width: Ie,
6003
6006
  textAlign: Je = "Left",
@@ -6018,7 +6021,7 @@ function vs(t) {
6018
6021
  /* @__PURE__ */ e(
6019
6022
  ia,
6020
6023
  {
6021
- field: pe,
6024
+ field: ge,
6022
6025
  headerText: Fe,
6023
6026
  width: Ie,
6024
6027
  textAlign: Je,
@@ -6035,7 +6038,7 @@ function vs(t) {
6035
6038
  customAttributes: ct,
6036
6039
  ...dt
6037
6040
  },
6038
- pe || `col-${W}`
6041
+ ge || `col-${W}`
6039
6042
  )
6040
6043
  );
6041
6044
  }), P;
@@ -6063,10 +6066,10 @@ function vs(t) {
6063
6066
  columns: [{ field: R, direction: z(S) }],
6064
6067
  allowUnsort: !1
6065
6068
  },
6066
- actionBegin: Ne,
6069
+ actionBegin: ne,
6067
6070
  rowSelected: I,
6068
6071
  rowDeselected: E,
6069
- recordDoubleClick: ie,
6072
+ recordDoubleClick: ce,
6070
6073
  ...w,
6071
6074
  children: [
6072
6075
  /* @__PURE__ */ e(Mr, { children: xe() }),
@@ -6103,7 +6106,7 @@ export {
6103
6106
  os as PageLayout,
6104
6107
  ts as Pagination,
6105
6108
  Ua as RadioGroup,
6106
- he as SearchBar,
6109
+ pe as SearchBar,
6107
6110
  ra as Select,
6108
6111
  rs as Sidebar,
6109
6112
  qa as Spinner,
@@ -6125,7 +6128,7 @@ export {
6125
6128
  sn as directoryPermissionsApi,
6126
6129
  ln as filePermissionsApi,
6127
6130
  Ya as gateWayUrl,
6128
- ve as gatewayBase,
6131
+ Ne as gatewayBase,
6129
6132
  We as getBaseUrl,
6130
6133
  ds as getSnapshot,
6131
6134
  ms as http,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unifyedx-storybook-new",
3
3
  "private": false,
4
- "version": "0.2.16",
4
+ "version": "0.2.18",
5
5
  "type": "module",
6
6
  "main": "dist/unifyedx-storybook-new.es.js",
7
7
  "module": "dist/unifyedx-storybook-new.es.js",