@owp/core 2.5.36 → 2.5.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index12.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index15.js +2 -2
  6. package/dist/_virtual/index5.js +2 -2
  7. package/dist/components/OwpTable/OwpDataTable.js +187 -183
  8. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  9. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +279 -311
  10. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  11. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +567 -486
  12. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  13. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +284 -243
  14. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  15. package/dist/configs/defaultConfig.js +7 -7
  16. package/dist/configs/defaultConfig.js.map +1 -1
  17. package/dist/constants/treeGrid.js +17 -16
  18. package/dist/constants/treeGrid.js.map +1 -1
  19. package/dist/constants.js +24 -23
  20. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  21. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  22. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  23. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  24. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  25. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  30. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  31. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  32. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  33. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +4 -1
  34. package/dist/types/configs/defaultConfig.d.ts +7 -7
  35. package/dist/types/constants/treeGrid.d.ts +1 -0
  36. package/package.json +1 -1
  37. package/treegrid/Defaults.xml +1 -1
@@ -1,67 +1,70 @@
1
1
  var Uo = Object.defineProperty;
2
- var a = (t, r) => Uo(t, "name", { value: r, configurable: !0 });
3
- import { jsxs as Y, jsx as l } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
2
+ var n = (t, r) => Uo(t, "name", { value: r, configurable: !0 });
3
+ import { jsxs as Y, jsx as b } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
4
  import { resolveOwpGridTheme as ot } from "../../constants/gridTheme.js";
5
5
  import { resolveOwpTableTheme as tt } from "../../constants/tableTheme.js";
6
- import { DEFAULT_TABLE_RADIUS as Po } from "../../constants/table.js";
6
+ import { DEFAULT_TABLE_RADIUS as qo } from "../../constants/table.js";
7
7
  import { getTreeGridFontFaceStyles as rt } from "../../constants/treeGrid.js";
8
8
  import { useGetCurrentSettings as et } from "../../hooks/useOwpSettings.js";
9
9
  import { TextField as it, Typography as Eo } from "@mui/material";
10
- import So, { checkboxClasses as nt } from "@mui/material/Checkbox";
10
+ import Po, { checkboxClasses as nt } from "@mui/material/Checkbox";
11
11
  import { grey as at } from "@mui/material/colors";
12
12
  import st from "@mui/material/GlobalStyles";
13
13
  import dt from "@mui/material/Paper";
14
14
  import ut from "@mui/material/Table";
15
- import lt from "@mui/material/TableBody";
15
+ import bt from "@mui/material/TableBody";
16
16
  import z from "@mui/material/TableCell";
17
- import mt from "@mui/material/TableContainer";
18
- import bt from "@mui/material/TableHead";
17
+ import lt from "@mui/material/TableContainer";
18
+ import mt from "@mui/material/TableHead";
19
19
  import Zo from "@mui/material/TableRow";
20
- import ct from "@mui/material/TableSortLabel";
21
- import { useState as U, useRef as ft, useMemo as B, useEffect as $o } from "react";
20
+ import ft from "@mui/material/TableSortLabel";
21
+ import { useState as U, useRef as ct, useMemo as B, useEffect as $o } from "react";
22
22
  import { TREEGRID_TABLE_BODY_BORDER_COLOR as jo, getTreeGridBodyCellSx as oo, getTreeGridBodyRowSx as gt, getTreeGridContainerSx as to, getTreeGridHeaderCellSx as Oo, TREEGRID_TABLE_HEADER_BORDER_COLOR as ht } from "./internal/treeGridTableStyle.js";
23
23
  import { getDefaultTableCellSx as pt, getDefaultTableHeaderCellSx as xt, defaultTableSortLabelSx as Rt, getDefaultTableHeaderLabelSx as _o, defaultStyledTableTheme as vt, DEFAULT_TABLE_HEADER_BACKGROUND_COLOR as Ho } from "./internal/defaultTableStyle.js";
24
24
  import { OwpTableTotalCount as wt } from "./internal/OwpTableTotalCount.js";
25
25
  import { toTableRadiusCssValue as kt } from "./utils/tableSx.js";
26
- import { uniqueId as Lt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/uniqueId.js";
27
- import { isEmpty as Ct } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
26
+ import { uniqueId as Ct } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/uniqueId.js";
27
+ import { isEmpty as Lt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
28
28
  import { isEqual as ro } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
29
29
  import { OwpNumberField as At } from "../OwpNumberField/OwpNumberField.js";
30
30
  import { isNumber as _ } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNumber.js";
31
31
  import { isArray as Ko } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
32
- import { isBoolean as Io } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isBoolean.js";
33
- const Fo = /* @__PURE__ */ a((t, r) => ({
32
+ import { isBoolean as Fo } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isBoolean.js";
33
+ const Io = /* @__PURE__ */ n((t, r) => ({
34
34
  ...xt(t, r),
35
35
  borderBottom: `1px solid ${t.borderColor}`,
36
36
  borderTopLeftRadius: "inherit",
37
37
  borderTopRightRadius: "inherit"
38
38
  }), "defaultHeadCellsSx"), Mo = {
39
39
  borderRight: `1px solid ${ht}`
40
- }, eo = /* @__PURE__ */ a((t) => ({
40
+ }, eo = /* @__PURE__ */ n((t) => ({
41
41
  borderRight: `1px solid ${t.borderColor}`
42
42
  }), "getDefaultRowBorderRightSx"), io = {
43
43
  borderRight: `1px solid ${jo}`
44
44
  }, Bt = {
45
45
  borderLeft: `1px solid ${jo}`,
46
46
  boxSizing: "border-box"
47
- }, no = /* @__PURE__ */ a((t) => ({
47
+ }, no = /* @__PURE__ */ n((t) => ({
48
48
  ...pt(t)
49
- }), "getDefaultTableBodyCellSx"), No = /* @__PURE__ */ a((t) => ({
49
+ }), "getDefaultTableBodyCellSx"), Dt = /* @__PURE__ */ n((t) => ({
50
+ border: `1px solid ${t.borderColor}`,
51
+ boxSizing: "border-box"
52
+ }), "getDefaultTableContainerFrameSx"), No = /* @__PURE__ */ n((t) => ({
50
53
  borderRight: `1px solid ${t.borderColor}`
51
54
  }), "getDefaultHeaderDividerSx"), g = {
52
55
  borderRadius: 0
53
56
  }, Tt = {
54
- borderRadius: Po
55
- }, Dt = {
57
+ borderRadius: qo
58
+ }, Et = {
56
59
  "& > th, & > td": {
57
60
  borderBottomLeftRadius: 0,
58
61
  borderBottomRightRadius: 0
59
62
  }
60
- }, Et = {
63
+ }, $t = {
61
64
  "& > th, & > td": {
62
65
  borderBottom: "none"
63
66
  }
64
- }, $t = {
67
+ }, Ot = {
65
68
  "&.MuiTableSortLabel-root": {
66
69
  color: "inherit",
67
70
  display: "flex",
@@ -88,10 +91,10 @@ const Fo = /* @__PURE__ */ a((t, r) => ({
88
91
  position: "absolute",
89
92
  right: 0
90
93
  }
91
- }, m = /* @__PURE__ */ a((...t) => t.reduce((r, n) => n ? [...r, ...Ko(n) ? n : [n]] : r, []), "mergeSx"), Ot = /* @__PURE__ */ a((t) => {
94
+ }, l = /* @__PURE__ */ n((...t) => t.reduce((r, a) => a ? [...r, ...Ko(a) ? a : [a]] : r, []), "mergeSx"), _t = /* @__PURE__ */ n((t) => {
92
95
  if (!(!_(t) || t < 1))
93
96
  return t;
94
- }, "getFixedRowCount"), _t = /* @__PURE__ */ a((t) => Array.from({ length: t }, () => ({})), "createEmptyRows"), ao = /* @__PURE__ */ a((t, r) => {
97
+ }, "getFixedRowCount"), Ht = /* @__PURE__ */ n((t) => Array.from({ length: t }, () => ({})), "createEmptyRows"), ao = /* @__PURE__ */ n((t, r) => {
95
98
  switch (t) {
96
99
  case "center":
97
100
  case "right":
@@ -102,35 +105,35 @@ const Fo = /* @__PURE__ */ a((t, r) => ({
102
105
  default:
103
106
  return r;
104
107
  }
105
- }, "getTableCellAlign"), V = /* @__PURE__ */ a((t, r) => {
108
+ }, "getTableCellAlign"), V = /* @__PURE__ */ n((t, r) => {
106
109
  if (r)
107
110
  return t == null ? void 0 : t[r];
108
- }, "getRowValue"), zo = /* @__PURE__ */ a((t) => {
111
+ }, "getRowValue"), zo = /* @__PURE__ */ n((t) => {
109
112
  if (typeof t == "string" || _(t))
110
113
  return t;
111
114
  }, "getComparableValue");
112
- function Vo(t, r, n) {
113
- const b = zo(V(t, n)), c = zo(V(r, n));
114
- return c == null && b == null ? 0 : c == null ? -1 : b == null ? 1 : c < b ? -1 : c > b ? 1 : 0;
115
+ function Vo(t, r, a) {
116
+ const m = zo(V(t, a)), f = zo(V(r, a));
117
+ return f == null && m == null ? 0 : f == null ? -1 : m == null ? 1 : f < m ? -1 : f > m ? 1 : 0;
115
118
  }
116
- a(Vo, "descendingComparator");
117
- function Ht(t, r) {
118
- return t === "desc" ? (n, b) => Vo(n, b, r) : (n, b) => -Vo(n, b, r);
119
+ n(Vo, "descendingComparator");
120
+ function Ft(t, r) {
121
+ return t === "desc" ? (a, m) => Vo(a, m, r) : (a, m) => -Vo(a, m, r);
119
122
  }
120
- a(Ht, "getComparator");
121
- const so = /* @__PURE__ */ a((t, r) => {
123
+ n(Ft, "getComparator");
124
+ const so = /* @__PURE__ */ n((t, r) => {
122
125
  if (r)
123
126
  return V(t, r);
124
- }, "getRowRangeValue"), It = /* @__PURE__ */ a((t, r) => {
125
- var b, c, p, v;
127
+ }, "getRowRangeValue"), It = /* @__PURE__ */ n((t, r) => {
128
+ var m, f, p, w;
126
129
  if (!(r.inputLabel ?? r.rangeKey))
127
130
  return "";
128
- const n = so(t, r.rangeKey);
129
- return `${(b = r.rangeLabel) != null && b.start ? `${(c = r.rangeLabel) == null ? void 0 : c.start}: ` : ""}${n == null ? void 0 : n.start} ~ ${(p = r.rangeLabel) != null && p.end ? `${(v = r.rangeLabel) == null ? void 0 : v.end}: ` : ""}${n == null ? void 0 : n.end}`;
130
- }, "getRangeLabel"), Ft = /* @__PURE__ */ a((t, r) => {
131
- const n = V(t, "index");
132
- return _(n) ? n : r;
133
- }, "getRowTabIndex"), qo = /* @__PURE__ */ a((t, r) => ({
131
+ const a = so(t, r.rangeKey);
132
+ return `${(m = r.rangeLabel) != null && m.start ? `${(f = r.rangeLabel) == null ? void 0 : f.start}: ` : ""}${a == null ? void 0 : a.start} ~ ${(p = r.rangeLabel) != null && p.end ? `${(w = r.rangeLabel) == null ? void 0 : w.end}: ` : ""}${a == null ? void 0 : a.end}`;
133
+ }, "getRangeLabel"), Mt = /* @__PURE__ */ n((t, r) => {
134
+ const a = V(t, "index");
135
+ return _(a) ? a : r;
136
+ }, "getRowTabIndex"), So = /* @__PURE__ */ n((t, r) => ({
134
137
  "& input": {
135
138
  fontSize: r,
136
139
  textAlign: t ?? "center"
@@ -140,92 +143,92 @@ const so = /* @__PURE__ */ a((t, r) => {
140
143
  },
141
144
  height: 34
142
145
  }), "getEditableCellSx");
143
- function Mt(t) {
146
+ function Nt(t) {
144
147
  const {
145
148
  sx: r,
146
- headCells: n,
147
- onSelectAllClick: b,
148
- order: c,
149
+ headCells: a,
150
+ onSelectAllClick: m,
151
+ order: f,
149
152
  orderBy: p,
150
- numSelected: v,
151
- rowCount: T,
152
- onRequestSort: q,
153
+ numSelected: w,
154
+ rowCount: D,
155
+ onRequestSort: S,
153
156
  canCheckbox: J,
154
157
  canUseOrderBy: Q = !0,
155
- canTableRadiusZero: D,
158
+ canTableRadiusZero: T,
156
159
  canUseTreeGridStyle: o,
157
160
  gridTheme: H,
158
- tableTheme: w
159
- } = t, I = /* @__PURE__ */ a((i) => (s) => {
160
- q(s, i);
161
+ tableTheme: k
162
+ } = t, F = /* @__PURE__ */ n((i) => (s) => {
163
+ S(s, i);
161
164
  }, "createSortHandler");
162
- return /* @__PURE__ */ l(bt, { sx: m(D && g), children: /* @__PURE__ */ Y(
165
+ return /* @__PURE__ */ b(mt, { sx: l(T && g), children: /* @__PURE__ */ Y(
163
166
  Zo,
164
167
  {
165
- sx: m(
168
+ sx: l(
166
169
  o && { height: H.header.height },
167
- D && g
170
+ T && g
168
171
  ),
169
172
  children: [
170
- J && /* @__PURE__ */ l(
173
+ J && /* @__PURE__ */ b(
171
174
  z,
172
175
  {
173
176
  padding: "checkbox",
174
- sx: m(
177
+ sx: l(
175
178
  {
176
- ...Fo(w, Ho)
179
+ ...Io(k, Ho)
177
180
  },
178
- !o && No(w),
181
+ !o && No(k),
179
182
  o && Mo,
180
183
  o && Oo(H),
181
- D && g,
184
+ T && g,
182
185
  r
183
186
  ),
184
- children: /* @__PURE__ */ l(
185
- So,
187
+ children: /* @__PURE__ */ b(
188
+ Po,
186
189
  {
187
190
  color: "default",
188
- sx: m(
191
+ sx: l(
189
192
  {
190
193
  [`&, &.${nt.checked}`]: o ? { color: at[50] } : { color: "inherit" }
191
194
  },
192
195
  o && { p: 0 }
193
196
  ),
194
- indeterminate: v > 0 && v < T,
195
- checked: T > 0 && v === T,
196
- onChange: b
197
+ indeterminate: w > 0 && w < D,
198
+ checked: D > 0 && w === D,
199
+ onChange: m
197
200
  }
198
201
  )
199
202
  }
200
203
  ),
201
- n.map((i, s) => /* @__PURE__ */ l(
204
+ a.map((i, s) => /* @__PURE__ */ b(
202
205
  z,
203
206
  {
204
207
  className: o ? void 0 : "pl-20",
205
208
  align: ao(i.align, "center"),
206
209
  padding: i.enablePadding ? "normal" : "none",
207
- sortDirection: p === i.id ? c : !1,
208
- sx: m(
210
+ sortDirection: p === i.id ? f : !1,
211
+ sx: l(
209
212
  {
210
- ...Fo(w, Ho)
213
+ ...Io(k, Ho)
211
214
  },
212
- !o && n.length - 1 !== s && No(w),
213
- o && n.length - 1 !== s && Mo,
215
+ !o && a.length - 1 !== s && No(k),
216
+ o && a.length - 1 !== s && Mo,
214
217
  o && Oo(H),
215
- D && g,
218
+ T && g,
216
219
  r,
217
220
  o && (i == null ? void 0 : i.sx)
218
221
  ),
219
- children: Q ? /* @__PURE__ */ l(
220
- ct,
222
+ children: Q ? /* @__PURE__ */ b(
223
+ ft,
221
224
  {
222
- sx: o ? $t : Rt,
225
+ sx: o ? Ot : Rt,
223
226
  active: p === i.id,
224
- direction: p === i.id ? c : "asc",
225
- onClick: I(i.id),
226
- children: o ? i.label : /* @__PURE__ */ l(Eo, { sx: m(_o(w), i == null ? void 0 : i.sx), children: i.label })
227
+ direction: p === i.id ? f : "asc",
228
+ onClick: F(i.id),
229
+ children: o ? i.label : /* @__PURE__ */ b(Eo, { sx: l(_o(k), i == null ? void 0 : i.sx), children: i.label })
227
230
  }
228
- ) : o ? i.label : /* @__PURE__ */ l(Eo, { sx: m(_o(w), i == null ? void 0 : i.sx), children: i.label })
231
+ ) : o ? i.label : /* @__PURE__ */ b(Eo, { sx: l(_o(k), i == null ? void 0 : i.sx), children: i.label })
229
232
  },
230
233
  i.id
231
234
  ))
@@ -233,113 +236,114 @@ function Mt(t) {
233
236
  }
234
237
  ) });
235
238
  }
236
- a(Mt, "DataTableHead");
237
- function fr({
239
+ n(Nt, "DataTableHead");
240
+ function gr({
238
241
  className: t,
239
242
  sx: r,
240
- headSx: n,
241
- headCells: b,
242
- rows: c,
243
+ headSx: a,
244
+ headCells: m,
245
+ rows: f,
243
246
  selected: p,
244
- canCheckbox: v,
245
- canTotalCountRow: T,
246
- canSelectingSingle: q,
247
+ canCheckbox: w,
248
+ canTotalCountRow: D,
249
+ canSelectingSingle: S,
247
250
  canUseOrderBy: J = !0,
248
251
  canTableRadiusZero: Q,
249
- canUseTableRadius: D = !1,
252
+ canUseTableRadius: T = !1,
250
253
  canUseTreeGridStyle: o = !1,
251
- tableBorderRadius: H = Po,
252
- fixedRowCount: w,
253
- onSelect: I,
254
+ tableBorderRadius: H = qo,
255
+ fixedRowCount: k,
256
+ onSelect: F,
254
257
  onBlur: i
255
258
  }) {
256
- var fo, go, ho, po, xo, Ro, vo, wo, ko, Lo, Co, Ao;
257
- const s = et(), [P, Wo] = U("asc"), [S, Yo] = U(""), [Z, F] = U([]), Jo = ft(Lt("owp-data-table")), x = B(() => Ot(w), [w]), M = B(() => {
258
- const d = Ko(c) ? c : [];
259
+ var co, go, ho, po, xo, Ro, vo, wo, ko, Co, Lo, Ao;
260
+ const s = et(), [q, Wo] = U("asc"), [P, Yo] = U(""), [Z, I] = U([]), Jo = ct(Ct("owp-data-table")), x = B(() => _t(k), [k]), M = B(() => {
261
+ const d = Ko(f) ? f : [];
259
262
  return x ? d.slice(0, x) : d;
260
- }, [c, x]), j = B(() => b ?? [], [b]), R = B(
263
+ }, [f, x]), j = B(() => m ?? [], [m]), R = B(
261
264
  () => {
262
265
  var d, u;
263
266
  return ot((u = (d = s == null ? void 0 : s.theme) == null ? void 0 : d.main) == null ? void 0 : u.grid);
264
267
  },
265
268
  [s]
266
- ), k = B(
269
+ ), v = B(
267
270
  () => {
268
271
  var d, u;
269
272
  return tt((u = (d = s == null ? void 0 : s.theme) == null ? void 0 : d.main) == null ? void 0 : u.table, vt);
270
273
  },
271
274
  [s]
272
- ), E = (po = (ho = (go = (fo = s == null ? void 0 : s.theme) == null ? void 0 : fo.main) == null ? void 0 : go.table) == null ? void 0 : ho.row) == null ? void 0 : po.backgroundColor, uo = (wo = (vo = (Ro = (xo = s == null ? void 0 : s.theme) == null ? void 0 : xo.main) == null ? void 0 : Ro.table) == null ? void 0 : vo.row) == null ? void 0 : wo.hoverBackgroundColor, lo = (Ao = (Co = (Lo = (ko = s == null ? void 0 : s.theme) == null ? void 0 : ko.main) == null ? void 0 : Lo.table) == null ? void 0 : Co.row) == null ? void 0 : Ao.selectedBackgroundColor, h = !!Q, mo = h ? g : o && D ? {
275
+ ), E = (po = (ho = (go = (co = s == null ? void 0 : s.theme) == null ? void 0 : co.main) == null ? void 0 : go.table) == null ? void 0 : ho.row) == null ? void 0 : po.backgroundColor, uo = (wo = (vo = (Ro = (xo = s == null ? void 0 : s.theme) == null ? void 0 : xo.main) == null ? void 0 : Ro.table) == null ? void 0 : vo.row) == null ? void 0 : wo.hoverBackgroundColor, bo = (Ao = (Lo = (Co = (ko = s == null ? void 0 : s.theme) == null ? void 0 : ko.main) == null ? void 0 : Co.table) == null ? void 0 : Lo.row) == null ? void 0 : Ao.selectedBackgroundColor, h = !!Q, lo = h ? g : o && T ? {
273
276
  borderRadius: kt(H),
274
277
  overflow: "hidden"
275
- } : o ? void 0 : Tt, bo = Io(v) ? v : !0, Qo = Io(T) ? T : !0;
278
+ } : o ? void 0 : Tt, mo = Fo(w) ? w : !0, Qo = Fo(D) ? D : !0;
276
279
  $o(() => {
277
- Ct(p) || F(p);
280
+ Lt(p) || I(p);
278
281
  }, [p]), $o(() => {
279
- I == null || I(Z);
282
+ F == null || F(Z);
280
283
  }, [Z]);
281
- const Xo = /* @__PURE__ */ a((d, u) => {
282
- Wo(S === u && P === "asc" ? "desc" : "asc"), Yo(u);
283
- }, "handleRequestSort"), yo = /* @__PURE__ */ a((d) => {
284
+ const Xo = /* @__PURE__ */ n((d, u) => {
285
+ Wo(P === u && q === "asc" ? "desc" : "asc"), Yo(u);
286
+ }, "handleRequestSort"), yo = /* @__PURE__ */ n((d) => {
284
287
  if (d.target.checked) {
285
- F(M);
288
+ I(M);
286
289
  return;
287
290
  }
288
- F([]);
289
- }, "handleSelectAllClick"), Go = /* @__PURE__ */ a((d, u) => {
290
- if (q) {
291
- F([u]);
291
+ I([]);
292
+ }, "handleSelectAllClick"), Go = /* @__PURE__ */ n((d, u) => {
293
+ if (S) {
294
+ I([u]);
292
295
  return;
293
296
  }
294
- F((f) => !!f.find((L) => ro(L, u)) ? f == null ? void 0 : f.filter((L) => !ro(L, u)) : [...f, u]);
297
+ I((c) => !!c.find((C) => ro(C, u)) ? c == null ? void 0 : c.filter((C) => !ro(C, u)) : [...c, u]);
295
298
  }, "handleClick"), $ = B(
296
- () => [...M].sort(Ht(P, S)),
297
- [P, S, M]
298
- ), co = B(() => !x || $.length >= x ? $ : [...$, ..._t(x - $.length)], [x, $]);
299
+ () => [...M].sort(Ft(q, P)),
300
+ [q, P, M]
301
+ ), fo = B(() => !x || $.length >= x ? $ : [...$, ...Ht(x - $.length)], [x, $]);
299
302
  return /* @__PURE__ */ Y(
300
303
  dt,
301
304
  {
302
305
  className: t,
303
306
  elevation: 0,
304
- sx: m(
307
+ sx: l(
305
308
  { width: "100%" },
306
309
  !o && E && { backgroundColor: E },
307
310
  o && to(R),
308
- mo
311
+ lo
309
312
  ),
310
313
  children: [
311
- o && /* @__PURE__ */ l(st, { styles: rt() }),
312
- /* @__PURE__ */ l(
313
- mt,
314
+ o && /* @__PURE__ */ b(st, { styles: rt() }),
315
+ /* @__PURE__ */ b(
316
+ lt,
314
317
  {
315
- sx: m(
318
+ sx: l(
316
319
  { height: x ? "auto" : 500 },
317
320
  !o && E && { backgroundColor: E },
321
+ !o && Dt(v),
318
322
  o && to(R),
319
323
  o && Bt,
320
324
  x && { overflowY: "hidden" },
321
- mo,
325
+ lo,
322
326
  r
323
327
  ),
324
328
  children: /* @__PURE__ */ Y(
325
329
  ut,
326
330
  {
327
331
  stickyHeader: !o,
328
- sx: m({ minWidth: 200 }, h && g),
332
+ sx: l({ minWidth: 200 }, h && g),
329
333
  "aria-labelledby": "owp-data-table",
330
334
  children: [
331
- /* @__PURE__ */ l(
332
- Mt,
335
+ /* @__PURE__ */ b(
336
+ Nt,
333
337
  {
334
- sx: n,
338
+ sx: a,
335
339
  headCells: j,
336
340
  gridTheme: R,
337
- tableTheme: k,
341
+ tableTheme: v,
338
342
  numSelected: Z.length,
339
- order: P,
340
- orderBy: S,
343
+ order: q,
344
+ orderBy: P,
341
345
  onSelectAllClick: yo,
342
- canCheckbox: !q && bo,
346
+ canCheckbox: !S && mo,
343
347
  canUseOrderBy: J,
344
348
  canTableRadiusZero: h,
345
349
  canUseTreeGridStyle: o,
@@ -347,66 +351,66 @@ function fr({
347
351
  rowCount: M.length
348
352
  }
349
353
  ),
350
- /* @__PURE__ */ l(lt, { sx: m(h && g), children: co.map((d, u) => {
351
- const f = Z.some((e) => ro(e, d)), X = co.length - 1 === u, L = x ? u >= $.length : !1, y = `${Jo.current}-${u}`;
354
+ /* @__PURE__ */ b(bt, { sx: l(h && g), children: fo.map((d, u) => {
355
+ const c = Z.some((e) => ro(e, d)), X = fo.length - 1 === u, C = x ? u >= $.length : !1, y = `${Jo.current}-${u}`;
352
356
  return /* @__PURE__ */ Y(
353
357
  Zo,
354
358
  {
355
359
  hover: !0,
356
360
  role: o ? void 0 : "checkbox",
357
- "aria-checked": o ? void 0 : f,
361
+ "aria-checked": o ? void 0 : c,
358
362
  tabIndex: -1,
359
- selected: f,
360
- sx: m(
361
- { cursor: L ? "default" : "pointer" },
362
- !o && E && !f && { backgroundColor: E },
363
- !o && uo && !L && !f && {
363
+ selected: c,
364
+ sx: l(
365
+ { cursor: C ? "default" : "pointer" },
366
+ !o && E && !c && { backgroundColor: E },
367
+ !o && uo && !C && !c && {
364
368
  "&.MuiTableRow-hover:hover": {
365
369
  backgroundColor: uo
366
370
  }
367
371
  },
368
- !o && lo && f && {
372
+ !o && bo && c && {
369
373
  "&.Mui-selected, &.Mui-selected:hover": {
370
- backgroundColor: lo
374
+ backgroundColor: bo
371
375
  }
372
376
  },
373
377
  o && gt(R, {
374
- canHover: !L,
375
- selected: f
378
+ canHover: !C,
379
+ selected: c
376
380
  }),
377
- !o && X && Et,
381
+ !o && X && $t,
378
382
  o && { height: 30 },
379
383
  h && g,
380
- h && X && Dt
384
+ h && X && Et
381
385
  ),
382
386
  children: [
383
- bo && /* @__PURE__ */ l(
387
+ mo && /* @__PURE__ */ b(
384
388
  z,
385
389
  {
386
390
  padding: "checkbox",
387
- onClick: /* @__PURE__ */ a((e) => {
388
- L || Go(e, d);
391
+ onClick: /* @__PURE__ */ n((e) => {
392
+ C || Go(e, d);
389
393
  }, "onClick"),
390
- sx: m(
391
- !o && no(k),
394
+ sx: l(
395
+ !o && no(v),
392
396
  o && oo(R),
393
- o ? io : eo(k),
397
+ o ? io : eo(v),
394
398
  h && g
395
399
  ),
396
- children: /* @__PURE__ */ l(
397
- So,
400
+ children: /* @__PURE__ */ b(
401
+ Po,
398
402
  {
399
403
  color: "default",
400
- checked: f,
401
- disabled: L,
402
- sx: m(o && { p: 0 })
404
+ checked: c,
405
+ disabled: C,
406
+ sx: l(o && { p: 0 })
403
407
  }
404
408
  )
405
409
  }
406
410
  ),
407
411
  j.map((e, G) => {
408
- const Bo = `${y}-row-${u}-cell-${G}`, To = It(d, e), K = Ft(d, u), W = V(d, String(e == null ? void 0 : e.id));
409
- return G === 0 ? /* @__PURE__ */ l(
412
+ const Bo = `${y}-row-${u}-cell-${G}`, Do = It(d, e), K = Mt(d, u), W = V(d, String(e == null ? void 0 : e.id));
413
+ return G === 0 ? /* @__PURE__ */ b(
410
414
  z,
411
415
  {
412
416
  className: o ? void 0 : "px-4",
@@ -416,38 +420,38 @@ function fr({
416
420
  padding: "none",
417
421
  role: o ? "cell" : void 0,
418
422
  align: ao(e.valueAlign, "left"),
419
- sx: m(
420
- !o && no(k),
423
+ sx: l(
424
+ !o && no(v),
421
425
  o && oo(R),
422
- j.length > 1 && (o ? io : eo(k)),
426
+ j.length > 1 && (o ? io : eo(v)),
423
427
  h && g
424
428
  ),
425
429
  children: W
426
430
  },
427
431
  Bo
428
- ) : /* @__PURE__ */ l(
432
+ ) : /* @__PURE__ */ b(
429
433
  z,
430
434
  {
431
435
  className: o ? void 0 : "px-4",
432
436
  role: o ? "cell" : void 0,
433
437
  align: ao(e.valueAlign, "left"),
434
- sx: m(
435
- !o && no(k),
438
+ sx: l(
439
+ !o && no(v),
436
440
  o && oo(R),
437
- j.length - 1 !== G && (o ? io : eo(k)),
441
+ j.length - 1 !== G && (o ? io : eo(v)),
438
442
  h && g
439
443
  ),
440
- children: e != null && e.canTextField ? (e == null ? void 0 : e.textFieldType) === "number" ? /* @__PURE__ */ l(
444
+ children: e != null && e.canTextField ? (e == null ? void 0 : e.textFieldType) === "number" ? /* @__PURE__ */ b(
441
445
  At,
442
446
  {
443
447
  variant: "standard",
444
448
  decimalScale: 2,
445
- label: To,
449
+ label: Do,
446
450
  fullWidth: !0,
447
451
  size: "small",
448
- sx: qo(
452
+ sx: So(
449
453
  e == null ? void 0 : e.valueAlign,
450
- o ? R.cell.fontSize : k.cell.fontSize
454
+ o ? R.cell.fontSize : v.cell.fontSize
451
455
  ),
452
456
  slotProps: {
453
457
  input: {
@@ -457,20 +461,20 @@ function fr({
457
461
  shrink: !0
458
462
  }
459
463
  },
460
- isAllowed: /* @__PURE__ */ a((C) => {
464
+ isAllowed: /* @__PURE__ */ n((L) => {
461
465
  var N;
462
- const { floatValue: O } = C, A = (N = so(d, e == null ? void 0 : e.rangeKey)) == null ? void 0 : N.end;
466
+ const { floatValue: O } = L, A = (N = so(d, e == null ? void 0 : e.rangeKey)) == null ? void 0 : N.end;
463
467
  return _(O) && _(A) ? O <= A : !0;
464
468
  }, "isAllowed"),
465
469
  value: W,
466
- onBlur: /* @__PURE__ */ a((C) => {
467
- var N, Do;
468
- const O = (N = so(d, e == null ? void 0 : e.rangeKey)) == null ? void 0 : N.start, A = (Do = C.target.value) == null ? void 0 : Do.replace(/,/g, "");
470
+ onBlur: /* @__PURE__ */ n((L) => {
471
+ var N, To;
472
+ const O = (N = so(d, e == null ? void 0 : e.rangeKey)) == null ? void 0 : N.start, A = (To = L.target.value) == null ? void 0 : To.replace(/,/g, "");
469
473
  i == null || i(
470
474
  {
471
- ...C,
475
+ ...L,
472
476
  target: {
473
- ...C.target,
477
+ ...L.target,
474
478
  value: _(O) && A !== "" ? Number(O > Number(A) ? O : A) : A
475
479
  }
476
480
  },
@@ -478,16 +482,16 @@ function fr({
478
482
  );
479
483
  }, "onBlur")
480
484
  }
481
- ) : /* @__PURE__ */ l(
485
+ ) : /* @__PURE__ */ b(
482
486
  it,
483
487
  {
484
488
  variant: "standard",
485
- label: To,
489
+ label: Do,
486
490
  fullWidth: !0,
487
491
  size: "small",
488
- sx: qo(
492
+ sx: So(
489
493
  e == null ? void 0 : e.valueAlign,
490
- o ? R.cell.fontSize : k.cell.fontSize
494
+ o ? R.cell.fontSize : v.cell.fontSize
491
495
  ),
492
496
  slotProps: {
493
497
  input: {
@@ -499,8 +503,8 @@ function fr({
499
503
  },
500
504
  type: (e == null ? void 0 : e.textFieldType) ?? "text",
501
505
  defaultValue: W,
502
- onBlur: /* @__PURE__ */ a((C) => i == null ? void 0 : i(
503
- { ...C, target: { ...C.target, value: C.target.value } },
506
+ onBlur: /* @__PURE__ */ n((L) => i == null ? void 0 : i(
507
+ { ...L, target: { ...L.target, value: L.target.value } },
504
508
  K
505
509
  ), "onBlur")
506
510
  }
@@ -519,12 +523,12 @@ function fr({
519
523
  )
520
524
  }
521
525
  ),
522
- Qo && /* @__PURE__ */ l(
526
+ Qo && /* @__PURE__ */ b(
523
527
  wt,
524
528
  {
525
- dividerSx: m(h && g),
529
+ dividerSx: l(h && g),
526
530
  totalCount: M.length,
527
- typographySx: m(
531
+ typographySx: l(
528
532
  o && to(R),
529
533
  h && g
530
534
  )
@@ -534,8 +538,8 @@ function fr({
534
538
  }
535
539
  );
536
540
  }
537
- a(fr, "OwpDataTable");
541
+ n(gr, "OwpDataTable");
538
542
  export {
539
- fr as OwpDataTable
543
+ gr as OwpDataTable
540
544
  };
541
545
  //# sourceMappingURL=OwpDataTable.js.map