@lax-wp/design-system 0.13.28 → 0.13.29

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,119 +1,121 @@
1
- import { jsxs as M, jsx as t, Fragment as Fe } from "react/jsx-runtime";
2
- import { useTheme as Ie } from "../../../../../hooks/useTheme.es.js";
3
- import { formatDate as Y, formatCurrency as se } from "../../../../../utils/formatters.es.js";
4
- import { getTableRowBgClassNamesByStatus as Ke } from "../../../../../constants/table.es.js";
5
- import { useTableConfig as Ae } from "../../../../../providers/design-system-provider/hooks.es.js";
6
- import q from "../../../../tooltip/Tooltip.es.js";
7
- import { Typography as We } from "../../../typography/Typography.es.js";
8
- import { OpenInNewRounded as Ue } from "@mui/icons-material";
1
+ import { jsxs as L, jsx as t, Fragment as Ke } from "react/jsx-runtime";
2
+ import { useTheme as Ae } from "../../../../../hooks/useTheme.es.js";
3
+ import { formatDate as q, formatCurrency as ue } from "../../../../../utils/formatters.es.js";
4
+ import { getTableRowBgClassNamesByStatus as We } from "../../../../../constants/table.es.js";
5
+ import { useTableConfig as Ue } from "../../../../../providers/design-system-provider/hooks.es.js";
6
+ import G from "../../../../tooltip/Tooltip.es.js";
7
+ import { Typography as Be } from "../../../typography/Typography.es.js";
8
+ import { OpenInNewRounded as Ye } from "@mui/icons-material";
9
9
  import x from "../../../../../_virtual/index.es.js";
10
- import g, { useContext as Be, useCallback as L, useState as D, useRef as G, useEffect as y } from "react";
11
- import { Link as Ye } from "react-router-dom";
12
- import { TableContext as qe } from "../../context.es.js";
13
- import { InlineEditField as Ge } from "./InlineEditField.es.js";
14
- import { LoadingSpinnerIcon as J, KeyboardArrowDownIcon as Je, KeyboardArrowRightFilledIcon as Qe, LinkIcon as Xe } from "../../../../icon/icons.generated.es.js";
15
- let Q;
10
+ import g, { useContext as qe, useCallback as S, useState as D, useRef as J, useEffect as y } from "react";
11
+ import { Link as Ge } from "react-router-dom";
12
+ import { TableContext as Je } from "../../context.es.js";
13
+ import { InlineEditField as Qe } from "./InlineEditField.es.js";
14
+ import { LoadingSpinnerIcon as Q, KeyboardArrowDownIcon as Xe, KeyboardArrowRightFilledIcon as Ze, LinkIcon as He } from "../../../../icon/icons.generated.es.js";
15
+ let X;
16
16
  const ie = (e) => {
17
17
  const o = Number(e);
18
18
  if (Number.isNaN(o) || e === null || e === void 0)
19
19
  return "0ms";
20
20
  if (o >= 864e5) {
21
- const p = Math.floor(o / 864e5), m = Math.floor(o % 864e5 / 36e5), i = Math.floor(o % 36e5 / 6e4), h = Math.floor(o % 6e4 / 1e3);
22
- return `${p}d ${m}h ${i}m ${h}s`;
21
+ const p = Math.floor(o / 864e5), d = Math.floor(o % 864e5 / 36e5), u = Math.floor(o % 36e5 / 6e4), h = Math.floor(o % 6e4 / 1e3);
22
+ return `${p}d ${d}h ${u}m ${h}s`;
23
23
  }
24
24
  if (o >= 36e5) {
25
- const p = Math.floor(o / 36e5), m = Math.floor(o % 36e5 / 6e4), i = Math.floor(o % 6e4 / 1e3);
26
- return `${p}h ${m}m ${i}s`;
25
+ const p = Math.floor(o / 36e5), d = Math.floor(o % 36e5 / 6e4), u = Math.floor(o % 6e4 / 1e3);
26
+ return `${p}h ${d}m ${u}s`;
27
27
  }
28
28
  if (o >= 6e4) {
29
- const p = Math.floor(o / 6e4), m = Math.floor(o % 6e4 / 1e3);
30
- return `${p}m ${m}s`;
29
+ const p = Math.floor(o / 6e4), d = Math.floor(o % 6e4 / 1e3);
30
+ return `${p}m ${d}s`;
31
31
  }
32
32
  return o >= 1e3 ? `${(o / 1e3).toFixed(2)}s` : `${o}ms`;
33
- }, Ze = ({ children: e, withLink: o, linkTo: p, rowData: m, disableRowClick: i }) => o && !i ? /* @__PURE__ */ t(Ye, { to: p?.(m?.id, m) || "", children: e }) : e, He = ({
33
+ }, Pe = ({ children: e, withLink: o, linkTo: p, rowData: d, disableRowClick: u }) => o && !u ? /* @__PURE__ */ t(Ge, { to: p?.(d?.id, d) || "", children: e }) : e, Ee = ({
34
34
  cell: e,
35
35
  id: o,
36
36
  nextWidthSum: p,
37
- isLastCell: m,
38
- rowHovering: i,
37
+ isLastCell: d,
38
+ rowHovering: u,
39
39
  index: h,
40
- isFirstStickyCell: ue,
41
- handleCellClick: le,
40
+ isFirstStickyCell: le,
41
+ handleCellClick: ce,
42
42
  currentData: v,
43
- highlightSubstring: S,
44
- is_read: ce,
45
- is_modified: me,
46
- is_row_modified: de,
43
+ highlightSubstring: O,
44
+ is_read: me,
45
+ is_modified: de,
46
+ is_row_modified: fe,
47
47
  is_deleted: z,
48
- is_added: j,
48
+ is_added: R,
49
49
  level: b,
50
50
  inlineEditing: k,
51
- isInlineEditing: d,
52
- setRowHovering: O,
53
- handleCellValueChange: fe,
54
- cellRef: pe,
55
- handleUpdateCellData: we,
56
- registerValidation: he,
57
- loadingExpand: be,
58
- toggleRowExpand: X,
59
- isDraggingOver: ye,
60
- isLoading: V,
61
- is_incomplete: Z,
51
+ isInlineEditing: l,
52
+ setRowHovering: V,
53
+ handleCellValueChange: pe,
54
+ cellRef: we,
55
+ handleUpdateCellData: he,
56
+ registerValidation: be,
57
+ loadingExpand: ye,
58
+ toggleRowExpand: Z,
59
+ isDraggingOver: ve,
60
+ isLoading: C,
61
+ is_incomplete: H,
62
62
  pendingEdit: a,
63
- hasPendingEdit: u,
64
- pendingValidationError: ve
63
+ hasPendingEdit: i,
64
+ pendingValidationError: ke
65
65
  }) => {
66
66
  const {
67
- cascadingTableConfig: H,
68
- originalsOnly: ke,
69
- maxLevel: xe,
70
- showNewItem: Te,
71
- expandedRows: ge,
72
- rowLinkConfig: R,
73
- multiSelectConfig: Ce,
67
+ cascadingTableConfig: P,
68
+ originalsOnly: xe,
69
+ maxLevel: Te,
70
+ showNewItem: ge,
71
+ expandedRows: Ce,
72
+ rowLinkConfig: j,
73
+ multiSelectConfig: Ne,
74
74
  cellEditing: F,
75
75
  cellEditingValue: I,
76
- allowInlineEdit: P,
77
- fieldOperationLoading: Ne,
78
- pendingEdits: _e
79
- } = Be(qe), $e = Ae(), K = (e?.column?.key ? e?.row?.original?.__cellMetadata?.[e.column.key] : void 0)?.is_locked ?? e?.column?.is_locked, A = (e?.column?.key ? _e?.[o]?.[e.column.key]?.validationError : null) || ve || null, E = k === e.column.key && e?.column?.canEdit && !K && !e?.column?.is_disabled, Me = Ne === `${o}-${e?.column?.id}`, { theme: Le } = Ie(), De = Le === "dark", Se = L(() => O(o), [O, o]), Oe = L(() => O(null), [O]), C = $e?.formatDuration, [n, f] = D(
80
- e?.column?.dataType === "duration" && e?.value ? C ? C(e.value) : ie(e.value) : e.value
81
- ), [w, ee] = D(null), [W, Ve] = D(!1), [ze, oe] = D(!1), [je, te] = D(!1), N = G(null), _ = G(), $ = G(), { selectedColumnIds: re = [] } = Ce || {}, ae = !Object.prototype.hasOwnProperty.call(e?.column?.meta ?? {}, "shouldHighlight") || e?.column?.meta?.shouldHighlight, ne = L(() => {
82
- N.current && Ve(N.current.scrollWidth > N.current.clientWidth);
83
- }, []), U = L((r) => {
84
- _.current && clearTimeout(_.current), r ? oe(!0) : _.current = setTimeout(() => oe(!1), 200);
85
- }, []), B = L((r) => {
76
+ allowInlineEdit: E,
77
+ fieldOperationLoading: _e,
78
+ pendingEdits: $e,
79
+ selectedRowId: K
80
+ } = qe(Je), Me = K != null && String(K) === String(o), Le = Ue(), A = (e?.column?.key ? e?.row?.original?.__cellMetadata?.[e.column.key] : void 0)?.is_locked ?? e?.column?.is_locked, W = (e?.column?.key ? $e?.[o]?.[e.column.key]?.validationError : null) || ke || null, ee = k === e.column.key && e?.column?.canEdit && !A && !e?.column?.is_disabled, Se = _e === `${o}-${e?.column?.id}`, { theme: De } = Ae(), Oe = De === "dark", Ve = S(() => V(o), [V, o]), ze = S(() => V(null), [V]), N = Le?.formatDuration, [n, f] = D(
81
+ e?.column?.dataType === "duration" && e?.value ? N ? N(e.value) : ie(e.value) : e.value
82
+ ), [w, oe] = D(null), [U, Re] = D(!1), [je, te] = D(!1), [Fe, re] = D(!1), _ = J(null), $ = J(), M = J(), { selectedColumnIds: ae = [] } = Ne || {}, ne = !Object.prototype.hasOwnProperty.call(e?.column?.meta ?? {}, "shouldHighlight") || e?.column?.meta?.shouldHighlight, se = S(() => {
83
+ _.current && Re(_.current.scrollWidth > _.current.clientWidth);
84
+ }, []), B = S((r) => {
86
85
  $.current && clearTimeout($.current), r ? te(!0) : $.current = setTimeout(() => te(!1), 200);
86
+ }, []), Y = S((r) => {
87
+ M.current && clearTimeout(M.current), r ? re(!0) : M.current = setTimeout(() => re(!1), 200);
87
88
  }, []), T = x({
88
- "bg-amber-100 dark:bg-amber-900/30": u,
89
- "bg-neutral-100 dark:bg-black-600": i === o && !d && !u && !(z || v?.is_deleted) && !(j || v?.is_added),
90
- "bg-error-200 dark:bg-error-900": i === o && !d && !u && (z || v?.is_deleted),
91
- "bg-success-100 dark:bg-success-800": i === o && !d && !u && (j || v?.is_added),
92
- "bg-primary-50 dark:bg-black-700": !Z && !ce && Te && !V && i !== o && !d && !u,
93
- "bg-warning-50 dark:bg-black-500": (Z || me || de || v?.is_row_modified) && !V && i !== o && !d && !u,
94
- "bg-error-100 dark:bg-error-975": (z || v?.is_deleted) && !V && i !== o && !d && !u,
95
- "bg-success-50 dark:bg-success-900": (j || v?.is_added) && !V && i !== o && !d && !u,
96
- "bg-primary-50 dark:bg-primary-900": (ye || d) && !u,
97
- "bg-primary-50 dark:bg-primary-800": re?.includes(e.column.id) && !d && !u,
98
- [Ke[e?.row?.original?.__rowBgStatus]]: e?.row?.original?.__rowBgStatus && !d && !u
99
- }), Re = (r) => {
100
- e.column?.disableRowClick || le(r);
89
+ "bg-amber-100 dark:bg-amber-900/30": i,
90
+ "bg-neutral-100 dark:bg-black-600": u === o && !l && !i && !(z || v?.is_deleted) && !(R || v?.is_added),
91
+ "bg-error-200 dark:bg-error-900": u === o && !l && !i && (z || v?.is_deleted),
92
+ "bg-success-100 dark:bg-success-800": u === o && !l && !i && (R || v?.is_added),
93
+ "bg-primary-50 dark:bg-black-700": !H && !me && ge && !C && u !== o && !l && !i,
94
+ "bg-warning-50 dark:bg-black-500": (H || de || fe || v?.is_row_modified) && !C && u !== o && !l && !i,
95
+ "bg-error-100 dark:bg-error-975": (z || v?.is_deleted) && !C && u !== o && !l && !i,
96
+ "bg-success-50 dark:bg-success-900": (R || v?.is_added) && !C && u !== o && !l && !i,
97
+ "bg-primary-50 dark:bg-primary-900": (ve || l) && !i,
98
+ "bg-primary-50 dark:bg-primary-800": ae?.includes(e.column.id) && !l && !i,
99
+ "bg-primary-100 dark:bg-primary-950": Me && u !== o && !l && !i && !C,
100
+ [We[e?.row?.original?.__rowBgStatus]]: e?.row?.original?.__rowBgStatus && !l && !i
101
+ }), Ie = (r) => {
102
+ e.column?.disableRowClick || ce(r);
101
103
  };
102
- y(() => (e?.row?.original?.status === "running" && e.column?.dataType === "duration" && (Q = setInterval(() => {
103
- const s = new Date(Y(e?.row?.original?.created_at || e?.row?.original?.executed_on, { withTime: !0, format: "yyyy-MM-dd HH:mm:ss" })), c = Math.abs((/* @__PURE__ */ new Date()).getTime() - new Date(s).getTime());
104
- f(C ? C(c) : ie(c));
104
+ y(() => (e?.row?.original?.status === "running" && e.column?.dataType === "duration" && (X = setInterval(() => {
105
+ const s = new Date(q(e?.row?.original?.created_at || e?.row?.original?.executed_on, { withTime: !0, format: "yyyy-MM-dd HH:mm:ss" })), m = Math.abs((/* @__PURE__ */ new Date()).getTime() - new Date(s).getTime());
106
+ f(N ? N(m) : ie(m));
105
107
  }, 500)), () => {
106
- Q && clearInterval(Q);
107
- }), [n, e.value, e?.row?.original?.created_at, e?.row?.original?.executed_on, e?.row?.original?.status, e.column?.dataType, C]), y(() => {
108
- (e?.column?.tooltipCellKey || e?.column?.type?.toLowerCase() === "url") && (e?.column?.type?.toLowerCase() === "url" ? ee(e?.value) : ee(e?.row?.original?.[String(e?.column?.tooltipCellKey)]));
108
+ X && clearInterval(X);
109
+ }), [n, e.value, e?.row?.original?.created_at, e?.row?.original?.executed_on, e?.row?.original?.status, e.column?.dataType, N]), y(() => {
110
+ (e?.column?.tooltipCellKey || e?.column?.type?.toLowerCase() === "url") && (e?.column?.type?.toLowerCase() === "url" ? oe(e?.value) : oe(e?.row?.original?.[String(e?.column?.tooltipCellKey)]));
109
111
  }, [e?.column?.tooltipCellKey, e?.row?.original, e?.column?.type, e?.value]), y(() => {
110
112
  if (e?.column?.type?.toLowerCase() === "currency")
111
113
  if (a?.value !== void 0) {
112
- const r = e?.row?.original?.__rawData, s = e?.column?.Header, c = a?.meta?.currency_code || r?.[s]?.currency_code || "USD";
113
- f(se(a.value, c));
114
+ const r = e?.row?.original?.__rawData, s = e?.column?.Header, m = a?.meta?.currency_code || r?.[s]?.currency_code || "USD";
115
+ f(ue(a.value, m));
114
116
  } else {
115
117
  const r = e?.row?.original?.__rawData, s = e?.column?.Header;
116
- f(se(e?.value, r?.[s]?.currency_code || "USD"));
118
+ f(ue(e?.value, r?.[s]?.currency_code || "USD"));
117
119
  }
118
120
  }, [e?.value, e?.column?.type, e?.column?.Header, e?.row?.original?.__rawData, a?.value, a?.meta?.currency_code]), y(() => {
119
121
  e?.column?.type?.toLowerCase() === "percentage" && (a?.value !== void 0 ? f(a.value?.toString() + "%" || "") : f(e?.value?.toString() + "%" || ""));
@@ -121,94 +123,94 @@ const ie = (e) => {
121
123
  const r = e?.column?.type?.toLowerCase() || "";
122
124
  if (["date", "datetime"].includes(r))
123
125
  if (a?.value !== void 0) {
124
- const s = r === "datetime", c = Y(a.value, { withTime: s, skipTimezone: !0 });
125
- f(c || a.value);
126
+ const s = r === "datetime", m = q(a.value, { withTime: s, skipTimezone: !0 });
127
+ f(m || a.value);
126
128
  } else f(e.value);
127
129
  }, [e?.value, e?.column?.type, a?.value]), y(() => {
128
130
  const r = e?.column?.type?.toLowerCase() || "";
129
131
  ["currency", "percentage", "duration", "boolean", "date", "datetime"].includes(r) || (a?.value !== void 0 ? f(a.value) : e?.column?.dataType !== "duration" && f(e.value));
130
132
  }, [e?.value, e?.column?.type, e?.column?.dataType, a?.value]), y(() => {
131
- if (e?.column?.type?.toLowerCase() === "boolean" && P) {
133
+ if (e?.column?.type?.toLowerCase() === "boolean" && E) {
132
134
  const r = a?.value !== void 0 ? a.value : e?.value;
133
135
  f(r === !0 || r === "true" || r === "True" || r === "Yes" || r === 1 ? "Yes" : "No");
134
136
  }
135
- }, [e?.value, e?.column?.type, P, a?.value]), y(() => () => {
136
- _.current && clearTimeout(_.current), $.current && clearTimeout($.current);
137
+ }, [e?.value, e?.column?.type, E, a?.value]), y(() => () => {
138
+ $.current && clearTimeout($.current), M.current && clearTimeout(M.current);
137
139
  }, []);
138
- const l = g.isValidElement(n);
139
- return /* @__PURE__ */ M(
140
+ const c = g.isValidElement(n);
141
+ return /* @__PURE__ */ L(
140
142
  "td",
141
143
  {
142
144
  id: e.value,
143
145
  "data-column-key": e?.column?.key,
144
146
  ...e.getCellProps(),
145
- onClick: R?.isEnabled ? void 0 : Re,
147
+ onClick: j?.isEnabled ? void 0 : Ie,
146
148
  className: x(
147
149
  "h-row",
148
150
  {
149
151
  "sticky left-0": e?.column?.sticky,
150
152
  relative: !e?.column?.sticky,
151
- "w-full": m,
153
+ "w-full": d,
152
154
  "overflow-visible": k === e.column.key,
153
155
  /** Chips/badges: avoid vertical clip from overflow-x-hidden + truncate (see isUiElementCell branch below) */
154
- "overflow-x-hidden overflow-y-visible": k !== e.column.key && l,
155
- "overflow-hidden": k !== e.column.key && !l
156
+ "overflow-x-hidden overflow-y-visible": k !== e.column.key && c,
157
+ "overflow-hidden": k !== e.column.key && !c
156
158
  },
157
- A && !E ? "outline outline-2 outline-error-500 -outline-offset-2 z-[5]" : "",
159
+ W && !ee ? "outline outline-2 outline-error-500 -outline-offset-2 z-[5]" : "",
158
160
  `${T || "bg-white dark:bg-black-800"}`
159
161
  ),
160
162
  style: { minWidth: `${e.column.width}px`, maxWidth: `${e.column.width}px`, right: e?.column?.sticky ? `${p}px` : "0px", paddingLeft: b > 0 && h === 0 ? `${b * 16}px` : void 0 },
161
- onMouseEnter: Se,
162
- onMouseLeave: Oe,
163
+ onMouseEnter: Ve,
164
+ onMouseLeave: ze,
163
165
  children: [
164
- /* @__PURE__ */ t(Ze, { withLink: R?.isEnabled, linkTo: R?.linkTo || void 0, rowData: e?.row?.original, disableRowClick: e?.column?.disableRowClick, children: (Array.isArray(F) ? F.includes(`${o}-${e?.column?.id}`) : F === `${o}-${e?.column?.id}`) ? /* @__PURE__ */ M("div", { className: "h-row top-0 font-medium font-inter w-full absolute flex items-center px-4", children: [
166
+ /* @__PURE__ */ t(Pe, { withLink: j?.isEnabled, linkTo: j?.linkTo || void 0, rowData: e?.row?.original, disableRowClick: e?.column?.disableRowClick, children: (Array.isArray(F) ? F.includes(`${o}-${e?.column?.id}`) : F === `${o}-${e?.column?.id}`) ? /* @__PURE__ */ L("div", { className: "h-row top-0 font-medium font-inter w-full absolute flex items-center px-4", children: [
165
167
  /* @__PURE__ */ t("span", { className: "text-neutral-400 dark:text-black-400 truncate", children: (() => {
166
- const r = `${o}-${e?.column?.id}`, s = typeof I == "object" ? I?.[r] : I, c = e?.column?.type?.toLowerCase();
167
- return c === "boolean" ? s === !0 || s === "true" || s === "True" ? "Yes" : "No" : (c === "date" || c === "datetime") && s ? Y(s, { withTime: c === "datetime", skipTimezone: !0 }) || String(s) : s != null ? String(s) : n;
168
+ const r = `${o}-${e?.column?.id}`, s = typeof I == "object" ? I?.[r] : I, m = e?.column?.type?.toLowerCase();
169
+ return m === "boolean" ? s === !0 || s === "true" || s === "True" ? "Yes" : "No" : (m === "date" || m === "datetime") && s ? q(s, { withTime: m === "datetime", skipTimezone: !0 }) || String(s) : s != null ? String(s) : n;
168
170
  })() }),
169
- /* @__PURE__ */ t("div", { className: "ml-2 flex items-center gap-1.5", children: /* @__PURE__ */ t(J, { className: "spinner text-neutral-600 dark:text-white", size: 12 }) })
170
- ] }) : k === e.column.key && e?.column?.canEdit && !K && !e?.column?.is_disabled ? /* @__PURE__ */ t("div", { className: "h-row w-full absolute top-0 left-0 flex items-center", style: { marginLeft: b > 0 && h === 0 ? `-${b * 16}px` : void 0, width: b > 0 && h === 0 ? `calc(100% + ${b * 16}px)` : "100%" }, children: /* @__PURE__ */ t(Ge, { cell: e, id: o, inlineEditing: k, cellRef: pe, handleCellValueChange: fe, handleUpdateCellData: we, registerValidation: he }) }) : /* @__PURE__ */ M(Fe, { children: [
171
+ /* @__PURE__ */ t("div", { className: "ml-2 flex items-center gap-1.5", children: /* @__PURE__ */ t(Q, { className: "spinner text-neutral-600 dark:text-white", size: 12 }) })
172
+ ] }) : k === e.column.key && e?.column?.canEdit && !A && !e?.column?.is_disabled ? /* @__PURE__ */ t("div", { className: "h-row w-full absolute top-0 left-0 flex items-center", style: { marginLeft: b > 0 && h === 0 ? `-${b * 16}px` : void 0, width: b > 0 && h === 0 ? `calc(100% + ${b * 16}px)` : "100%" }, children: /* @__PURE__ */ t(Qe, { cell: e, id: o, inlineEditing: k, cellRef: we, handleCellValueChange: pe, handleUpdateCellData: he, registerValidation: be }) }) : /* @__PURE__ */ L(Ke, { children: [
171
173
  b > 0 && h === 0 && /* @__PURE__ */ t("div", { className: "h-row border-l border-neutral-300 dark:border-black-600 ml-2" }),
172
174
  /* @__PURE__ */ t("div", { className: "min-h-6", children: /* @__PURE__ */ t(
173
- q,
175
+ G,
174
176
  {
175
177
  title: w && e?.column?.type?.toLowerCase() !== "url" ? w : void 0,
176
178
  hideTooltip: !w || e?.column?.type?.toLowerCase() === "url",
177
179
  delayShow: !0,
178
180
  placement: "top",
179
- children: /* @__PURE__ */ M(
181
+ children: /* @__PURE__ */ L(
180
182
  "div",
181
183
  {
182
- className: x(`h-row top-0 font-medium font-inter overflow-index-auto whitespace-nowrap text-ellipsis dark:text-black-200 w-full absolute flex items-center ${T || "bg-white dark:bg-black-800"}`, l ? "overflow-x-hidden overflow-y-visible" : "overflow-x-hidden", { "border border-b-0 border-t-0 border-primary-600 dark:border-blue-800": re?.includes(e.column.id) }),
183
- style: e?.column?.sticky && ue ? { boxShadow: `${De ? "-8px 0px 8px 0px rgba(255, 255, 255, 0.01)" : "-8px 0px 8px 0px rgba(0, 0, 0, 0.02)"}` } : {},
184
+ className: x(`h-row top-0 font-medium font-inter overflow-index-auto whitespace-nowrap text-ellipsis dark:text-black-200 w-full absolute flex items-center ${T || "bg-white dark:bg-black-800"}`, c ? "overflow-x-hidden overflow-y-visible" : "overflow-x-hidden", { "border border-b-0 border-t-0 border-primary-600 dark:border-blue-800": ae?.includes(e.column.id) }),
185
+ style: e?.column?.sticky && le ? { boxShadow: `${Oe ? "-8px 0px 8px 0px rgba(255, 255, 255, 0.01)" : "-8px 0px 8px 0px rgba(0, 0, 0, 0.02)"}` } : {},
184
186
  children: [
185
- H?.isCascading && !ke && h === 0 && /* @__PURE__ */ t("div", { className: x("w-[22px] h-row flex items-center px-4", `${T || "bg-white dark:bg-black-800"}`), id: "cascading", children: xe > b && (e?.row?.original?.__has_children || H?.showAllDropdown) && /* @__PURE__ */ t("div", { children: be ? /* @__PURE__ */ t(J, { className: "text-neutral-600 dark:text-white", size: 8 }) : /* @__PURE__ */ t("div", { children: ge?.[o]?.isOpen ? /* @__PURE__ */ t(Je, { size: 20, className: "text-neutral-400 dark:text-neutral-400", onClick: (r) => {
186
- X(), r.stopPropagation();
187
- } }) : /* @__PURE__ */ t(Qe, { size: 20, className: "text-neutral-400 dark:text-neutral-400", onClick: (r) => {
188
- X(), r.stopPropagation();
187
+ P?.isCascading && !xe && h === 0 && /* @__PURE__ */ t("div", { className: x("w-[22px] h-row flex items-center px-4", `${T || "bg-white dark:bg-black-800"}`), id: "cascading", children: Te > b && (e?.row?.original?.__has_children || P?.showAllDropdown) && /* @__PURE__ */ t("div", { children: ye ? /* @__PURE__ */ t(Q, { className: "text-neutral-600 dark:text-white", size: 8 }) : /* @__PURE__ */ t("div", { children: Ce?.[o]?.isOpen ? /* @__PURE__ */ t(Xe, { size: 20, className: "text-neutral-400 dark:text-neutral-400", onClick: (r) => {
188
+ Z(), r.stopPropagation();
189
+ } }) : /* @__PURE__ */ t(Ze, { size: 20, className: "text-neutral-400 dark:text-neutral-400", onClick: (r) => {
190
+ Z(), r.stopPropagation();
189
191
  } }) }) }) }),
190
192
  e?.column?.type?.toLowerCase() === "url" && w ? /* @__PURE__ */ t(
191
- q,
193
+ G,
192
194
  {
193
- title: /* @__PURE__ */ t("div", { onMouseEnter: () => U(!0), onMouseLeave: () => U(!1), children: /* @__PURE__ */ t("a", { href: w, target: "_blank", rel: "noopener noreferrer", onClick: (r) => r.stopPropagation(), children: /* @__PURE__ */ M("div", { className: "flex gap-1 items-center w-full", children: [
194
- /* @__PURE__ */ t("div", { className: "w-4 h-4", children: /* @__PURE__ */ t(Xe, { height: 16, width: 16 }) }),
195
- /* @__PURE__ */ t(We, { variant: "medium", size: "small", className: "truncate", appearance: "custom", children: w }),
196
- /* @__PURE__ */ t(Ue, { sx: { height: "16px", width: "16px", color: "#016DCF" } })
195
+ title: /* @__PURE__ */ t("div", { onMouseEnter: () => B(!0), onMouseLeave: () => B(!1), children: /* @__PURE__ */ t("a", { href: w, target: "_blank", rel: "noopener noreferrer", onClick: (r) => r.stopPropagation(), children: /* @__PURE__ */ L("div", { className: "flex gap-1 items-center w-full", children: [
196
+ /* @__PURE__ */ t("div", { className: "w-4 h-4", children: /* @__PURE__ */ t(He, { height: 16, width: 16 }) }),
197
+ /* @__PURE__ */ t(Be, { variant: "medium", size: "small", className: "truncate", appearance: "custom", children: w }),
198
+ /* @__PURE__ */ t(Ye, { sx: { height: "16px", width: "16px", color: "#016DCF" } })
197
199
  ] }) }) }),
198
200
  placement: "top",
199
- open: ze,
200
- onOpenChange: U,
201
+ open: je,
202
+ onOpenChange: B,
201
203
  className: "block w-full min-w-0 overflow-hidden",
202
- children: /* @__PURE__ */ t("div", { className: "w-full h-full flex items-center px-4 min-w-0 overflow-hidden text-primary-400", children: /* @__PURE__ */ t("span", { ref: N, onMouseEnter: ne, className: "truncate w-full", children: S && ae && !g.isValidElement(n) && typeof n != "object" ? S(n) : n }) })
204
+ children: /* @__PURE__ */ t("div", { className: "w-full h-full flex items-center px-4 min-w-0 overflow-hidden text-primary-400", children: /* @__PURE__ */ t("span", { ref: _, onMouseEnter: se, className: "truncate w-full", children: O && ne && !g.isValidElement(n) && typeof n != "object" ? O(n) : n }) })
203
205
  }
204
206
  ) : /* @__PURE__ */ t(
205
- q,
207
+ G,
206
208
  {
207
- title: W && n && !l ? /* @__PURE__ */ t(
209
+ title: U && n && !c ? /* @__PURE__ */ t(
208
210
  "div",
209
211
  {
210
- onMouseEnter: () => B(!0),
211
- onMouseLeave: () => B(!1),
212
+ onMouseEnter: () => Y(!0),
213
+ onMouseLeave: () => Y(!1),
212
214
  className: "max-h-96 overflow-y-auto whitespace-pre-wrap break-words no-scroll",
213
215
  children: String(n)
214
216
  }
@@ -216,16 +218,16 @@ const ie = (e) => {
216
218
  placement: "top",
217
219
  delayShow: !0,
218
220
  hideTooltip: !!w,
219
- open: W && !w && !l ? je : void 0,
220
- onOpenChange: W && !w && !l ? B : void 0,
221
- className: x("block w-full min-w-0", l ? "overflow-x-hidden overflow-y-visible" : "overflow-hidden"),
222
- children: /* @__PURE__ */ t("div", { className: x("w-full h-full flex items-center px-4 min-w-0", l ? "overflow-x-hidden overflow-y-visible" : "overflow-hidden"), children: /* @__PURE__ */ t(
221
+ open: U && !w && !c ? Fe : void 0,
222
+ onOpenChange: U && !w && !c ? Y : void 0,
223
+ className: x("block w-full min-w-0", c ? "overflow-x-hidden overflow-y-visible" : "overflow-hidden"),
224
+ children: /* @__PURE__ */ t("div", { className: x("w-full h-full flex items-center px-4 min-w-0", c ? "overflow-x-hidden overflow-y-visible" : "overflow-hidden"), children: /* @__PURE__ */ t(
223
225
  "span",
224
226
  {
225
- ref: l ? void 0 : N,
226
- onMouseEnter: l ? void 0 : ne,
227
- className: x(l ? "flex min-w-0 max-w-full items-center justify-start gap-1" : "truncate w-full"),
228
- children: S && ae && !g.isValidElement(n) && typeof n != "object" ? S(n) : g.isValidElement(n) ? typeof n.type == "string" ? n : g.cloneElement(n, {
227
+ ref: c ? void 0 : _,
228
+ onMouseEnter: c ? void 0 : se,
229
+ className: x(c ? "flex min-w-0 max-w-full items-center justify-start gap-1" : "truncate w-full"),
230
+ children: O && ne && !g.isValidElement(n) && typeof n != "object" ? O(n) : g.isValidElement(n) ? typeof n.type == "string" ? n : g.cloneElement(n, {
229
231
  ...n.props,
230
232
  containerWidth: e.column.width
231
233
  }) : n
@@ -239,14 +241,14 @@ const ie = (e) => {
239
241
  }
240
242
  ) })
241
243
  ] }) }),
242
- A && !E && /* @__PURE__ */ t("div", { className: "absolute bottom-0 left-0 right-0 h-row flex items-end pointer-events-none z-[5]", children: /* @__PURE__ */ t("div", { className: "w-full bg-error-50 dark:bg-error-975 px-1.5 py-0.5 truncate", children: /* @__PURE__ */ t("span", { className: "text-error-600 text-[10px] font-medium leading-none", children: A }) }) }),
243
- Me && !(k === e.column.key && e?.column?.canEdit && !K && !e?.column?.is_disabled) && /* @__PURE__ */ t("div", { className: "absolute top-0 right-0 bg-white dark:bg-black-800 rounded-full w-5 h-5 flex items-center justify-center border border-primary-300 dark:border-primary-600 shadow-sm z-10", children: /* @__PURE__ */ t(J, { className: "text-primary-600 dark:text-white", size: 8 }) })
244
+ W && !ee && /* @__PURE__ */ t("div", { className: "absolute bottom-0 left-0 right-0 h-row flex items-end pointer-events-none z-[5]", children: /* @__PURE__ */ t("div", { className: "w-full bg-error-50 dark:bg-error-975 px-1.5 py-0.5 truncate", children: /* @__PURE__ */ t("span", { className: "text-error-600 text-[10px] font-medium leading-none", children: W }) }) }),
245
+ Se && !(k === e.column.key && e?.column?.canEdit && !A && !e?.column?.is_disabled) && /* @__PURE__ */ t("div", { className: "absolute top-0 right-0 bg-white dark:bg-black-800 rounded-full w-5 h-5 flex items-center justify-center border border-primary-300 dark:border-primary-600 shadow-sm z-10", children: /* @__PURE__ */ t(Q, { className: "text-primary-600 dark:text-white", size: 8 }) })
244
246
  ]
245
247
  },
246
248
  h
247
249
  );
248
- }, wo = g.memo(He);
250
+ }, bo = g.memo(Ee);
249
251
  export {
250
- wo as DataCell
252
+ bo as DataCell
251
253
  };
252
254
  //# sourceMappingURL=DataCell.es.js.map