@smart-factor/gem-ui-components 0.0.82 → 0.0.83

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,5 +1,5 @@
1
1
  import pt, { jsx as x, jsxs as de } from "react/jsx-runtime";
2
- import { a as Z, P as n, _ as f, o as q, C as ft, b as H, e as mt, s as ge, g as ye, h as ht, i as bt, j as vt, k as Ee, l as Y, m as gt, n as yt, p as Q, q as ee, r as L, t as $e, v as te, w as z, x as pe, y as V, z as ne, A as He, B as Ue, D as le, E as ze, F as We, G as Et, H as Ie, I as xt, J as Tt, K as kt, S as ke, L as Pt, M as Rt, N as Nt } from "./Stack-CU3sSZaK.js";
2
+ import { a as Z, P as n, _ as f, o as q, C as ft, b as H, e as mt, s as ge, g as ye, h as ht, i as bt, j as vt, k as Ee, l as Y, m as gt, n as yt, p as Q, q as ee, r as L, t as $e, v as te, w as z, x as pe, y as V, z as ne, A as He, B as Ue, D as le, E as ze, F as We, G as Et, H as Me, I as xt, J as Tt, K as kt, S as ke, L as Pt, M as Rt, N as Nt } from "./Stack-CU3sSZaK.js";
3
3
  import * as u from "react";
4
4
  import * as wt from "react-dom";
5
5
  var be = {};
@@ -88,11 +88,11 @@ function $t(e, t) {
88
88
  return typeof s[a] < "u" && !s[i] ? new Error(`The prop \`${v}\` of \`${e}\` can only be used together with the \`${i}\` prop.`) : null;
89
89
  };
90
90
  }
91
- function It(e) {
91
+ function Mt(e) {
92
92
  const t = e.documentElement.clientWidth;
93
93
  return Math.abs(window.innerWidth - t);
94
94
  }
95
- function Mt(e) {
95
+ function It(e) {
96
96
  const t = typeof e;
97
97
  switch (t) {
98
98
  case "number":
@@ -110,7 +110,7 @@ const Ft = Number.isInteger || _t;
110
110
  function Xe(e, t, r, o) {
111
111
  const i = e[t];
112
112
  if (i == null || !Ft(i)) {
113
- const s = Mt(i);
113
+ const s = It(i);
114
114
  return new RangeError(`Invalid ${o} \`${t}\` of type \`${s}\` supplied to \`${r}\`, expected \`integer\`.`);
115
115
  }
116
116
  return null;
@@ -149,9 +149,9 @@ const Ze = process.env.NODE_ENV === "production" ? Te : Je, Bt = {
149
149
  useForkRef: Y,
150
150
  useIsFocusVisible: gt
151
151
  }, Symbol.toStringTag, { value: "Module" })), At = /* @__PURE__ */ yt(jt);
152
- var Me;
152
+ var Ie;
153
153
  function Lt() {
154
- return Me || (Me = 1, function(e) {
154
+ return Ie || (Ie = 1, function(e) {
155
155
  "use client";
156
156
  Object.defineProperty(e, "__esModule", {
157
157
  value: !0
@@ -374,7 +374,7 @@ const Wt = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "
374
374
  const k = T.current;
375
375
  A === void 0 ? P(k) : P(k, A);
376
376
  }
377
- }, E = S(g), M = S((P, A) => {
377
+ }, E = S(g), I = S((P, A) => {
378
378
  Ue(P);
379
379
  const k = le({
380
380
  style: N,
@@ -384,7 +384,7 @@ const Wt = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "
384
384
  mode: "enter"
385
385
  });
386
386
  P.style.webkitTransition = o.transitions.create("opacity", k), P.style.transition = o.transitions.create("opacity", k), m && m(P, A);
387
- }), _ = S(v), D = S(C), I = S((P) => {
387
+ }), _ = S(v), D = S(C), M = S((P) => {
388
388
  const A = le({
389
389
  style: N,
390
390
  timeout: O,
@@ -398,10 +398,10 @@ const Wt = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "
398
398
  appear: a,
399
399
  in: d,
400
400
  nodeRef: T,
401
- onEnter: M,
401
+ onEnter: I,
402
402
  onEntered: _,
403
403
  onEntering: E,
404
- onExit: I,
404
+ onExit: M,
405
405
  onExited: B,
406
406
  onExiting: D,
407
407
  addEndListener: (P) => {
@@ -897,7 +897,7 @@ function cn(e, t) {
897
897
  const r = [], o = e.container;
898
898
  if (!t.disableScrollLock) {
899
899
  if (an(o)) {
900
- const a = It(q(o));
900
+ const a = Mt(q(o));
901
901
  r.push({
902
902
  value: o.style.paddingRight,
903
903
  property: "padding-right",
@@ -1059,11 +1059,11 @@ function ue(e) {
1059
1059
  return;
1060
1060
  if (!y.current)
1061
1061
  return;
1062
- let M = [];
1063
- if ((p.activeElement === d.current || p.activeElement === m.current) && (M = s(b.current)), M.length > 0) {
1062
+ let I = [];
1063
+ if ((p.activeElement === d.current || p.activeElement === m.current) && (I = s(b.current)), I.length > 0) {
1064
1064
  var _, D;
1065
- const I = !!((_ = N.current) != null && _.shiftKey && ((D = N.current) == null ? void 0 : D.key) === "Tab"), B = M[0], j = M[M.length - 1];
1066
- typeof B != "string" && typeof j != "string" && (I ? j.focus() : B.focus());
1065
+ const M = !!((_ = N.current) != null && _.shiftKey && ((D = N.current) == null ? void 0 : D.key) === "Tab"), B = I[0], j = I[I.length - 1];
1066
+ typeof B != "string" && typeof j != "string" && (M ? j.focus() : B.focus());
1067
1067
  } else
1068
1068
  E.focus();
1069
1069
  };
@@ -1185,8 +1185,8 @@ function xn(e) {
1185
1185
  }, E = Ee(() => {
1186
1186
  const k = gn(t) || T().body;
1187
1187
  i.add(w(), k), b.current && S();
1188
- }), M = u.useCallback(() => i.isTopModal(w()), [i]), _ = Ee((k) => {
1189
- y.current = k, k && (m && M() ? S() : b.current && J(b.current, p));
1188
+ }), I = u.useCallback(() => i.isTopModal(w()), [i]), _ = Ee((k) => {
1189
+ y.current = k, k && (m && I() ? S() : b.current && J(b.current, p));
1190
1190
  }), D = u.useCallback(() => {
1191
1191
  i.remove(w(), p);
1192
1192
  }, [p, i]);
@@ -1195,10 +1195,10 @@ function xn(e) {
1195
1195
  }, [D]), u.useEffect(() => {
1196
1196
  m ? E() : (!$ || !s) && D();
1197
1197
  }, [m, D, $, s, E]);
1198
- const I = (k) => (R) => {
1198
+ const M = (k) => (R) => {
1199
1199
  var h;
1200
1200
  (h = k.onKeyDown) == null || h.call(k, R), !(R.key !== "Escape" || R.which === 229 || // Wait until IME is settled.
1201
- !M()) && (r || (R.stopPropagation(), d && d(R, "escapeKeyDown")));
1201
+ !I()) && (r || (R.stopPropagation(), d && d(R, "escapeKeyDown")));
1202
1202
  }, B = (k) => (R) => {
1203
1203
  var h;
1204
1204
  (h = k.onClick) == null || h.call(k, R), R.target === R.currentTarget && d && d(R, "backdropClick");
@@ -1211,7 +1211,7 @@ function xn(e) {
1211
1211
  return f({
1212
1212
  role: "presentation"
1213
1213
  }, h, {
1214
- onKeyDown: I(h),
1214
+ onKeyDown: M(h),
1215
1215
  ref: C
1216
1216
  });
1217
1217
  },
@@ -1237,7 +1237,7 @@ function xn(e) {
1237
1237
  },
1238
1238
  rootRef: C,
1239
1239
  portalRef: _,
1240
- isTopModal: M,
1240
+ isTopModal: I,
1241
1241
  exited: N,
1242
1242
  hasTransition: $
1243
1243
  };
@@ -1303,10 +1303,10 @@ const kn = ["BackdropComponent", "BackdropProps", "classes", "className", "close
1303
1303
  disableEscapeKeyDown: w = !1,
1304
1304
  disablePortal: S = !1,
1305
1305
  disableRestoreFocus: E = !1,
1306
- disableScrollLock: M = !1,
1306
+ disableScrollLock: I = !1,
1307
1307
  hideBackdrop: _ = !1,
1308
1308
  keepMounted: D = !1,
1309
- onBackdropClick: I,
1309
+ onBackdropClick: M,
1310
1310
  open: B,
1311
1311
  slotProps: j,
1312
1312
  slots: P
@@ -1318,7 +1318,7 @@ const kn = ["BackdropComponent", "BackdropProps", "classes", "className", "close
1318
1318
  disableEscapeKeyDown: w,
1319
1319
  disablePortal: S,
1320
1320
  disableRestoreFocus: E,
1321
- disableScrollLock: M,
1321
+ disableScrollLock: I,
1322
1322
  hideBackdrop: _,
1323
1323
  keepMounted: D
1324
1324
  }), {
@@ -1341,7 +1341,7 @@ const kn = ["BackdropComponent", "BackdropProps", "classes", "className", "close
1341
1341
  } = F();
1342
1342
  ie.onEnter = K, ie.onExited = se;
1343
1343
  }
1344
- const Se = (o = (i = P == null ? void 0 : P.root) != null ? i : O.Root) != null ? o : Rn, De = (s = (a = P == null ? void 0 : P.backdrop) != null ? a : O.Backdrop) != null ? s : m, me = (l = j == null ? void 0 : j.root) != null ? l : $.root, he = (c = j == null ? void 0 : j.backdrop) != null ? c : $.backdrop, ut = Ie({
1344
+ const Se = (o = (i = P == null ? void 0 : P.root) != null ? i : O.Root) != null ? o : Rn, De = (s = (a = P == null ? void 0 : P.backdrop) != null ? a : O.Backdrop) != null ? s : m, me = (l = j == null ? void 0 : j.root) != null ? l : $.root, he = (c = j == null ? void 0 : j.backdrop) != null ? c : $.backdrop, ut = Me({
1345
1345
  elementType: Se,
1346
1346
  externalSlotProps: me,
1347
1347
  externalForwardedProps: A,
@@ -1352,13 +1352,13 @@ const kn = ["BackdropComponent", "BackdropProps", "classes", "className", "close
1352
1352
  },
1353
1353
  ownerState: X,
1354
1354
  className: V(g, me == null ? void 0 : me.className, W == null ? void 0 : W.root, !X.open && X.exited && (W == null ? void 0 : W.hidden))
1355
- }), dt = Ie({
1355
+ }), dt = Me({
1356
1356
  elementType: De,
1357
1357
  externalSlotProps: he,
1358
1358
  additionalProps: v,
1359
1359
  getSlotProps: (K) => h(f({}, K, {
1360
1360
  onClick: (se) => {
1361
- I && I(se), K != null && K.onClick && K.onClick(se);
1361
+ M && M(se), K != null && K.onClick && K.onClick(se);
1362
1362
  }
1363
1363
  })),
1364
1364
  className: V(he == null ? void 0 : he.className, v == null ? void 0 : v.className, W == null ? void 0 : W.backdrop),
@@ -1610,11 +1610,11 @@ const rt = /* @__PURE__ */ u.forwardRef(function(t, r) {
1610
1610
  timeout: T = s,
1611
1611
  // eslint-disable-next-line react/prop-types
1612
1612
  TransitionComponent: w = He
1613
- } = t, S = z(t, wn), E = u.useRef(null), M = Y(c.ref, E, r), _ = (h) => (F) => {
1613
+ } = t, S = z(t, wn), E = u.useRef(null), I = Y(c.ref, E, r), _ = (h) => (F) => {
1614
1614
  h && (F === void 0 ? h(E.current) : h(E.current, F));
1615
1615
  }, D = _((h, F) => {
1616
1616
  ae(m, h, d), Ue(h), y && y(h, F);
1617
- }), I = _((h, F) => {
1617
+ }), M = _((h, F) => {
1618
1618
  const re = le({
1619
1619
  timeout: T,
1620
1620
  style: p,
@@ -1654,7 +1654,7 @@ const rt = /* @__PURE__ */ u.forwardRef(function(t, r) {
1654
1654
  nodeRef: E,
1655
1655
  onEnter: D,
1656
1656
  onEntered: B,
1657
- onEntering: I,
1657
+ onEntering: M,
1658
1658
  onExit: P,
1659
1659
  onExited: A,
1660
1660
  onExiting: j,
@@ -1664,7 +1664,7 @@ const rt = /* @__PURE__ */ u.forwardRef(function(t, r) {
1664
1664
  timeout: T
1665
1665
  }, S, {
1666
1666
  children: (h, F) => /* @__PURE__ */ u.cloneElement(c, f({
1667
- ref: M,
1667
+ ref: I,
1668
1668
  style: f({
1669
1669
  visibility: h === "exited" && !g ? "hidden" : void 0
1670
1670
  }, p, c.props.style)
@@ -1794,7 +1794,7 @@ const Sn = ["BackdropProps"], Dn = ["anchor", "BackdropProps", "children", "clas
1794
1794
  paper: ["paper", `paperAnchor${H(r)}`, o !== "temporary" && `paperAnchorDocked${H(r)}`]
1795
1795
  };
1796
1796
  return ne(i, On, t);
1797
- }, In = L(nt, {
1797
+ }, Mn = L(nt, {
1798
1798
  name: "MuiDrawer",
1799
1799
  slot: "Root",
1800
1800
  overridesResolver: it
@@ -1810,7 +1810,7 @@ const Sn = ["BackdropProps"], Dn = ["anchor", "BackdropProps", "children", "clas
1810
1810
  overridesResolver: it
1811
1811
  })({
1812
1812
  flex: "0 0 auto"
1813
- }), Mn = L(Qe, {
1813
+ }), In = L(Qe, {
1814
1814
  name: "MuiDrawer",
1815
1815
  slot: "Paper",
1816
1816
  overridesResolver: (e, t) => {
@@ -1906,24 +1906,24 @@ const at = /* @__PURE__ */ u.forwardRef(function(t, r) {
1906
1906
  u.useEffect(() => {
1907
1907
  E.current = !0;
1908
1908
  }, []);
1909
- const M = Fn({
1909
+ const I = Fn({
1910
1910
  direction: s ? "rtl" : "ltr"
1911
1911
  }, l), D = f({}, o, {
1912
1912
  anchor: l,
1913
1913
  elevation: v,
1914
1914
  open: C,
1915
1915
  variant: T
1916
- }, S), I = $n(D), B = /* @__PURE__ */ x(Mn, f({
1916
+ }, S), M = $n(D), B = /* @__PURE__ */ x(In, f({
1917
1917
  elevation: T === "temporary" ? v : 0,
1918
1918
  square: !0
1919
1919
  }, N, {
1920
- className: V(I.paper, N.className),
1920
+ className: V(M.paper, N.className),
1921
1921
  ownerState: D,
1922
1922
  children: d
1923
1923
  }));
1924
1924
  if (T === "permanent")
1925
1925
  return /* @__PURE__ */ x(qe, f({
1926
- className: V(I.root, I.docked, m),
1926
+ className: V(M.root, M.docked, m),
1927
1927
  ownerState: D,
1928
1928
  ref: r
1929
1929
  }, S, {
@@ -1931,23 +1931,23 @@ const at = /* @__PURE__ */ u.forwardRef(function(t, r) {
1931
1931
  }));
1932
1932
  const j = /* @__PURE__ */ x($, f({
1933
1933
  in: C,
1934
- direction: st[M],
1934
+ direction: st[I],
1935
1935
  timeout: p,
1936
1936
  appear: E.current
1937
1937
  }, O, {
1938
1938
  children: B
1939
1939
  }));
1940
1940
  return T === "persistent" ? /* @__PURE__ */ x(qe, f({
1941
- className: V(I.root, I.docked, m),
1941
+ className: V(M.root, M.docked, m),
1942
1942
  ownerState: D,
1943
1943
  ref: r
1944
1944
  }, S, {
1945
1945
  children: j
1946
- })) : /* @__PURE__ */ x(In, f({
1946
+ })) : /* @__PURE__ */ x(Mn, f({
1947
1947
  BackdropProps: f({}, c, y, {
1948
1948
  transitionDuration: p
1949
1949
  }),
1950
- className: V(I.root, I.modal, m),
1950
+ className: V(M.root, M.modal, m),
1951
1951
  open: C,
1952
1952
  ownerState: D,
1953
1953
  onClose: b,
@@ -2103,7 +2103,7 @@ export {
2103
2103
  Ge as d,
2104
2104
  Ye as e,
2105
2105
  $t as f,
2106
- It as g,
2106
+ Mt as g,
2107
2107
  ue as h,
2108
2108
  Ze as i,
2109
2109
  lt as j,
@@ -17,8 +17,8 @@ var lm = (o, e, t, n) => ({
17
17
  import Hw, { jsx as Ht, jsxs as ga, Fragment as Bf } from "react/jsx-runtime";
18
18
  import * as ra from "react";
19
19
  import { useCallback as Bu, createContext as d3, useContext as h3, useState as zl, useEffect as Sc, useMemo as fg, useRef as p3 } from "react";
20
- import { an as g3, ap as _3, G as i0, m as Es, aq as a0, ar as Xy, as as m3, ac as sL, B as yg, at as Uw, z as xu, au as Ef, al as nf, am as lL, y as f3, ah as rk, aj as y3, a6 as b3, q as v3, f as w3, ae as x3 } from "./theme-D2kKiipg.js";
21
- import { C as cL, r as zw } from "./Drawer-BHtGTSrC.js";
20
+ import { e as g3, g as _3, G as i0, a as Es, b as a0, s as Xy, c as m3, D as sL, B as yg, d as Uw, z as xu, u as Ef, I as nf, A as lL, F as f3, U as rk, f as y3, h as b3, i as v3, j as w3, T as x3 } from "./theme-D1ADSt_L.js";
21
+ import { C as cL, r as zw } from "./Drawer-CldXrceX.js";
22
22
  import "react-router-dom";
23
23
  import "@mui/x-data-grid-pro";
24
24
  import "react-dom";
@@ -2,7 +2,7 @@ import { jsx as w, jsxs as ve } from "react/jsx-runtime";
2
2
  import * as x from "react";
3
3
  import { createElement as Wt } from "react";
4
4
  import { p as fe, q as me, r as U, _ as D, v as nt, O as Jt, A as Gt, w as Le, x as Ht, Q as Yt, l as de, y as Ie, P as r, R as ot, z as ge, D as Qe, U as Qt, I as rt, j as Zt, V as it, b as ue, e as te, t as en, h as tn, k as G, o as nn, J as on, g as rn, H as ce, W as sn, X as st, Y as ie, G as Ze, i as ln, K as an, S as cn, M as dn, N as un } from "./Stack-CU3sSZaK.js";
5
- import { u as pn, a as fn, b as X } from "./useFormControl-DNMBlMLT.js";
5
+ import { u as pn, a as fn, b as X } from "./useFormControl-v82Vw7n0.js";
6
6
  function mn(e) {
7
7
  return fe("MuiCollapse", e);
8
8
  }
@@ -1,4 +1,4 @@
1
- import { D as e } from "../../Drawer-BHtGTSrC.js";
1
+ import { D as e } from "../../Drawer-CldXrceX.js";
2
2
  export {
3
3
  e as Drawer
4
4
  };
@@ -1,4 +1,4 @@
1
- import { T as o } from "../../Tree-COTxbWgl.js";
1
+ import { T as o } from "../../Tree-zB7xEw6c.js";
2
2
  export {
3
3
  o as Tree
4
4
  };
@@ -1,5 +1,6 @@
1
1
  export { useContextMenu } from './useContextMenu';
2
2
  export { useDataGridState } from './useDataGridState';
3
3
  export { useGetFileUrl } from './useGetFileUrl';
4
+ export { useMemoByValue } from './useMemoByValue';
4
5
  export { useScrollPosition } from './useScrollPosition';
5
6
  export { useTableQuery } from './useTableQuery';
@@ -0,0 +1 @@
1
+ export declare function useMemoByValue<T>(value: T): T;
@@ -1,4 +1,4 @@
1
- import { GridFilterModel } from '@smart-factor/gem-ui-components';
1
+ import { GridFilterModel } from '@mui/x-data-grid-pro';
2
2
  import { TabType } from './types';
3
3
 
4
4
  export interface QueryState {
@@ -20,7 +20,7 @@ export declare const useTableQuery: ({ placeholder, tab, entityType, fileNameLab
20
20
  filterModel: GridFilterModel | undefined;
21
21
  onFilterModelChange: (model: GridFilterModel) => void;
22
22
  debouncedSearchTerm: any;
23
- exportDataAsExcel: (gridApiRef: import('react').MutableRefObject<import('@smart-factor/gem-ui-components').GridApiPro>) => Promise<void>;
23
+ exportDataAsExcel: (gridApiRef: import('react').MutableRefObject<import('../../main').GridApiPro>) => Promise<void>;
24
24
  allQueryParams: {
25
25
  query: string;
26
26
  }[];