@owp/core 2.5.8 → 2.5.9

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 (78) 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/index16.js +4 -4
  7. package/dist/_virtual/index17.js +4 -4
  8. package/dist/_virtual/index18.js +4 -4
  9. package/dist/_virtual/index19.js +4 -4
  10. package/dist/_virtual/index20.js +2 -2
  11. package/dist/_virtual/index21.js +2 -2
  12. package/dist/_virtual/index22.js +2 -2
  13. package/dist/_virtual/index5.js +2 -2
  14. package/dist/components/OwpDialog/OwpDialog.js +67 -46
  15. package/dist/components/OwpDialog/OwpDialog.js.map +1 -1
  16. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +162 -153
  17. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  18. package/dist/components/OwpTable/OwpDataTable.js +297 -283
  19. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  20. package/dist/components/OwpTable/OwpFieldTable.js +98 -86
  21. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
  22. package/dist/components/OwpTable/OwpTable.js +145 -127
  23. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  24. package/dist/components/OwpTable/internal/defaultTableStyle.js +21 -15
  25. package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
  26. package/dist/constants/tableTheme.js.map +1 -1
  27. package/dist/features/themePreview/components/ThemePreviewCanvas.js +300 -263
  28. package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
  29. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +148 -141
  30. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
  31. package/dist/features/themePreview/components/ThemePreviewColorField.js +169 -138
  32. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
  33. package/dist/features/themePreview/components/ThemePreviewControls.js +370 -212
  34. package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
  35. package/dist/features/themePreview/components/themePreviewCanvas.shared.js +145 -125
  36. package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -1
  37. package/dist/features/themePreview/configs/table.js +4 -2
  38. package/dist/features/themePreview/configs/table.js.map +1 -1
  39. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +124 -118
  40. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -1
  41. package/dist/features/themePreview/hooks/useThemePreview.js +257 -190
  42. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
  43. package/dist/features/themePreview/utils/themePreviewDefinitions.js +8 -0
  44. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  45. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  46. package/dist/layout/components/toolbar/ToolbarLayout.js +36 -35
  47. package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
  48. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js +9 -0
  49. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js.map +1 -0
  50. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  51. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  52. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  53. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  54. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  55. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  56. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  57. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  58. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  59. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  60. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  61. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  62. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  63. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  64. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  65. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  66. package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
  67. package/dist/owp-app.css +1 -1
  68. package/dist/types/components/OwpDialog/OwpDialog.d.ts +2 -0
  69. package/dist/types/components/OwpTable/OwpFieldTable.d.ts +3 -2
  70. package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +2 -0
  71. package/dist/types/constants/tableTheme.d.ts +1 -0
  72. package/dist/types/features/themePreview/components/ThemePreviewColorField.d.ts +3 -1
  73. package/dist/types/features/themePreview/components/ThemePreviewControls.d.ts +4 -1
  74. package/dist/types/features/themePreview/configs/settings.d.ts +2 -0
  75. package/dist/types/features/themePreview/configs/table.d.ts +2 -0
  76. package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +3 -0
  77. package/dist/types/types/OwpTableThemeTypes.d.ts +8 -0
  78. package/package.json +1 -1
@@ -1,56 +1,56 @@
1
- var It = Object.defineProperty;
2
- var n = (t, e) => It(t, "name", { value: e, configurable: !0 });
3
- import { jsxs as M, 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";
4
- import { resolveOwpGridTheme as Ft } from "../../constants/gridTheme.js";
5
- import { resolveOwpTableTheme as St } from "../../constants/tableTheme.js";
6
- import { getTreeGridFontFaceStyles as Ct } from "../../constants/treeGrid.js";
7
- import { useGetCurrentSettings as Nt } from "../../hooks/useOwpSettings.js";
8
- import { TextField as zt, Divider as Mt, Typography as rt } from "@mui/material";
9
- import kt, { checkboxClasses as Vt } from "@mui/material/Checkbox";
10
- import { grey as At } from "@mui/material/colors";
11
- import qt from "@mui/material/GlobalStyles";
12
- import Pt from "@mui/material/Paper";
13
- import jt from "@mui/material/Table";
14
- import Wt from "@mui/material/TableBody";
15
- import V from "@mui/material/TableCell";
16
- import Zt from "@mui/material/TableContainer";
17
- import yt from "@mui/material/TableHead";
18
- import $t from "@mui/material/TableRow";
19
- import Kt from "@mui/material/TableSortLabel";
20
- import { useTheme as Yt } from "@mui/material/styles";
21
- import { useState as Q, useRef as Jt, useMemo as O, useEffect as bt } from "react";
22
- import { TREEGRID_TABLE_BODY_BORDER_COLOR as Qt, getTreeGridBodyCellSx as X, getTreeGridBodyRowSx as Xt, getTreeGridContainerSx as G, getTreeGridHeaderCellSx as gt, TREEGRID_TABLE_HEADER_BORDER_COLOR as Gt } from "./internal/treeGridTableStyle.js";
23
- import { getDefaultTableCellSx as Ut, getDefaultTableHeaderCellSx as te, defaultTableSortLabelSx as ee, getDefaultTableHeaderLabelSx as ht, defaultStyledTableTheme as oe } from "./internal/defaultTableStyle.js";
24
- import { uniqueId as re } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/uniqueId.js";
25
- import { isEmpty as ie } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
26
- import { isEqual as U } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
27
- import { OwpNumberField as ne } from "../OwpNumberField/OwpNumberField.js";
28
- import { isNumber as S } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNumber.js";
29
- import { isArray as Et } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
30
- import { isBoolean as pt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isBoolean.js";
31
- const xt = /* @__PURE__ */ n((t, e) => ({
32
- ...te(t, e),
1
+ var Qt = Object.defineProperty;
2
+ var n = (t, o) => Qt(t, "name", { value: o, configurable: !0 });
3
+ import { jsxs as q, 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
+ import { resolveOwpGridTheme as St } from "../../constants/gridTheme.js";
5
+ import { resolveOwpTableTheme as Xt } from "../../constants/tableTheme.js";
6
+ import { getTreeGridFontFaceStyles as yt } from "../../constants/treeGrid.js";
7
+ import { useGetCurrentSettings as Gt } from "../../hooks/useOwpSettings.js";
8
+ import { TextField as Ut, Divider as to, Typography as it } from "@mui/material";
9
+ import Vt, { checkboxClasses as oo } from "@mui/material/Checkbox";
10
+ import { grey as qt } from "@mui/material/colors";
11
+ import eo from "@mui/material/GlobalStyles";
12
+ import ro from "@mui/material/Paper";
13
+ import io from "@mui/material/Table";
14
+ import no from "@mui/material/TableBody";
15
+ import P from "@mui/material/TableCell";
16
+ import ao from "@mui/material/TableContainer";
17
+ import so from "@mui/material/TableHead";
18
+ import Pt from "@mui/material/TableRow";
19
+ import uo from "@mui/material/TableSortLabel";
20
+ import { useTheme as lo } from "@mui/material/styles";
21
+ import { useState as y, useRef as mo, useMemo as $, useEffect as Et } from "react";
22
+ import { TREEGRID_TABLE_BODY_BORDER_COLOR as bo, getTreeGridBodyCellSx as G, getTreeGridBodyRowSx as co, getTreeGridContainerSx as U, getTreeGridHeaderCellSx as Ot, TREEGRID_TABLE_HEADER_BORDER_COLOR as fo } from "./internal/treeGridTableStyle.js";
23
+ import { getDefaultTableCellSx as go, getDefaultTableHeaderCellSx as ho, defaultTableSortLabelSx as po, getDefaultTableHeaderLabelSx as Dt, defaultStyledTableTheme as xo } from "./internal/defaultTableStyle.js";
24
+ import { uniqueId as Ro } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/uniqueId.js";
25
+ import { isEmpty as ko } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
26
+ import { isEqual as tt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/predicate/isEqual.js";
27
+ import { OwpNumberField as vo } from "../OwpNumberField/OwpNumberField.js";
28
+ import { isNumber as M } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNumber.js";
29
+ import { isArray as jt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
30
+ import { isBoolean as Ht } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isBoolean.js";
31
+ const _t = /* @__PURE__ */ n((t, o) => ({
32
+ ...ho(t, o),
33
33
  borderBottom: `1px solid ${st}`,
34
34
  borderTopLeftRadius: "inherit",
35
35
  borderTopRightRadius: "inherit"
36
- }), "defaultHeadCellsSx"), Rt = {
37
- borderRight: `1px solid ${Gt}`
38
- }, st = At[400], tt = {
36
+ }), "defaultHeadCellsSx"), It = {
37
+ borderRight: `1px solid ${fo}`
38
+ }, st = qt[400], ot = {
39
39
  borderRight: `1px solid ${st}`
40
40
  }, et = {
41
- borderRight: `1px solid ${Qt}`
42
- }, ot = /* @__PURE__ */ n((t) => ({
43
- ...Ut(t)
44
- }), "getDefaultTableBodyCellSx"), vt = {
41
+ borderRight: `1px solid ${bo}`
42
+ }, rt = /* @__PURE__ */ n((t) => ({
43
+ ...go(t)
44
+ }), "getDefaultTableBodyCellSx"), Ft = {
45
45
  borderRight: `1px solid ${st}`
46
- }, f = {
46
+ }, g = {
47
47
  borderRadius: 0
48
- }, se = {
48
+ }, wo = {
49
49
  "& > th, & > td": {
50
50
  borderBottomLeftRadius: 0,
51
51
  borderBottomRightRadius: 0
52
52
  }
53
- }, ae = {
53
+ }, Lo = {
54
54
  "&.MuiTableSortLabel-root": {
55
55
  color: "inherit",
56
56
  display: "flex",
@@ -77,10 +77,10 @@ const xt = /* @__PURE__ */ n((t, e) => ({
77
77
  position: "absolute",
78
78
  right: 0
79
79
  }
80
- }, c = /* @__PURE__ */ n((...t) => t.reduce((e, i) => i ? [...e, ...Et(i) ? i : [i]] : e, []), "mergeSx"), de = /* @__PURE__ */ n((t) => {
81
- if (!(!S(t) || t < 1))
80
+ }, c = /* @__PURE__ */ n((...t) => t.reduce((o, i) => i ? [...o, ...jt(i) ? i : [i]] : o, []), "mergeSx"), Bo = /* @__PURE__ */ n((t) => {
81
+ if (!(!M(t) || t < 1))
82
82
  return t;
83
- }, "getFixedRowCount"), ue = /* @__PURE__ */ n((t) => Array.from({ length: t }, () => ({})), "createEmptyRows"), it = /* @__PURE__ */ n((t, e) => {
83
+ }, "getFixedRowCount"), Co = /* @__PURE__ */ n((t) => Array.from({ length: t }, () => ({})), "createEmptyRows"), nt = /* @__PURE__ */ n((t, o) => {
84
84
  switch (t) {
85
85
  case "center":
86
86
  case "right":
@@ -89,396 +89,410 @@ const xt = /* @__PURE__ */ n((t, e) => ({
89
89
  case "justify":
90
90
  return t;
91
91
  default:
92
- return e;
92
+ return o;
93
93
  }
94
- }, "getTableCellAlign"), q = /* @__PURE__ */ n((t, e) => {
95
- if (e)
96
- return t == null ? void 0 : t[e];
97
- }, "getRowValue"), Lt = /* @__PURE__ */ n((t) => {
98
- if (typeof t == "string" || S(t))
94
+ }, "getTableCellAlign"), j = /* @__PURE__ */ n((t, o) => {
95
+ if (o)
96
+ return t == null ? void 0 : t[o];
97
+ }, "getRowValue"), Mt = /* @__PURE__ */ n((t) => {
98
+ if (typeof t == "string" || M(t))
99
99
  return t;
100
100
  }, "getComparableValue");
101
- function wt(t, e, i) {
102
- const u = Lt(q(t, i)), b = Lt(q(e, i));
103
- return b == null && u == null ? 0 : b == null ? -1 : u == null ? 1 : b < u ? -1 : b > u ? 1 : 0;
101
+ function Nt(t, o, i) {
102
+ const l = Mt(j(t, i)), h = Mt(j(o, i));
103
+ return h == null && l == null ? 0 : h == null ? -1 : l == null ? 1 : h < l ? -1 : h > l ? 1 : 0;
104
104
  }
105
- n(wt, "descendingComparator");
106
- function me(t, e) {
107
- return t === "desc" ? (i, u) => wt(i, u, e) : (i, u) => -wt(i, u, e);
105
+ n(Nt, "descendingComparator");
106
+ function To(t, o) {
107
+ return t === "desc" ? (i, l) => Nt(i, l, o) : (i, l) => -Nt(i, l, o);
108
108
  }
109
- n(me, "getComparator");
110
- const nt = /* @__PURE__ */ n((t, e) => {
111
- if (e)
112
- return q(t, e);
113
- }, "getRowRangeValue"), le = /* @__PURE__ */ n((t, e) => {
114
- var u, b, L, w;
115
- if (!(e.inputLabel ?? e.rangeKey))
109
+ n(To, "getComparator");
110
+ const at = /* @__PURE__ */ n((t, o) => {
111
+ if (o)
112
+ return j(t, o);
113
+ }, "getRowRangeValue"), Ao = /* @__PURE__ */ n((t, o) => {
114
+ var l, h, v, w;
115
+ if (!(o.inputLabel ?? o.rangeKey))
116
116
  return "";
117
- const i = nt(t, e.rangeKey);
118
- return `${(u = e.rangeLabel) != null && u.start ? `${(b = e.rangeLabel) == null ? void 0 : b.start}: ` : ""}${i == null ? void 0 : i.start} ~ ${(L = e.rangeLabel) != null && L.end ? `${(w = e.rangeLabel) == null ? void 0 : w.end}: ` : ""}${i == null ? void 0 : i.end}`;
119
- }, "getRangeLabel"), ce = /* @__PURE__ */ n((t, e) => {
120
- const i = q(t, "index");
121
- return S(i) ? i : e;
122
- }, "getRowTabIndex"), Tt = /* @__PURE__ */ n((t, e) => ({
117
+ const i = at(t, o.rangeKey);
118
+ return `${(l = o.rangeLabel) != null && l.start ? `${(h = o.rangeLabel) == null ? void 0 : h.start}: ` : ""}${i == null ? void 0 : i.start} ~ ${(v = o.rangeLabel) != null && v.end ? `${(w = o.rangeLabel) == null ? void 0 : w.end}: ` : ""}${i == null ? void 0 : i.end}`;
119
+ }, "getRangeLabel"), $o = /* @__PURE__ */ n((t, o) => {
120
+ const i = j(t, "index");
121
+ return M(i) ? i : o;
122
+ }, "getRowTabIndex"), zt = /* @__PURE__ */ n((t, o) => ({
123
123
  "& input": {
124
- fontSize: e,
124
+ fontSize: o,
125
125
  textAlign: t ?? "center"
126
126
  },
127
127
  "& .MuiInputBase-input": {
128
- fontSize: e
128
+ fontSize: o
129
129
  },
130
130
  height: 34
131
131
  }), "getEditableCellSx");
132
- function fe(t) {
133
- const e = Yt(), {
132
+ function Eo(t) {
133
+ const o = lo(), {
134
134
  sx: i,
135
- headCells: u,
136
- onSelectAllClick: b,
137
- order: L,
135
+ headCells: l,
136
+ onSelectAllClick: h,
137
+ order: v,
138
138
  orderBy: w,
139
- numSelected: D,
140
- rowCount: B,
141
- onRequestSort: K,
142
- canCheckbox: P,
143
- canUseOrderBy: o = !0,
144
- canTableRadiusZero: $,
139
+ numSelected: E,
140
+ rowCount: O,
141
+ onRequestSort: Q,
142
+ canCheckbox: W,
143
+ canUseOrderBy: e = !0,
144
+ canTableRadiusZero: T,
145
145
  canUseTreeGridStyle: m,
146
146
  gridTheme: x,
147
- tableTheme: g
148
- } = t, _ = /* @__PURE__ */ n((s) => (T) => {
149
- K(T, s);
147
+ tableTheme: s
148
+ } = t, D = /* @__PURE__ */ n((a) => (L) => {
149
+ Q(L, a);
150
150
  }, "createSortHandler");
151
- return /* @__PURE__ */ l(yt, { sx: c($ && f), children: /* @__PURE__ */ M(
152
- $t,
151
+ return /* @__PURE__ */ b(so, { sx: c(T && g), children: /* @__PURE__ */ q(
152
+ Pt,
153
153
  {
154
154
  sx: c(
155
155
  m && { height: x.header.height },
156
- $ && f
156
+ T && g
157
157
  ),
158
158
  children: [
159
- P && /* @__PURE__ */ l(
160
- V,
159
+ W && /* @__PURE__ */ b(
160
+ P,
161
161
  {
162
162
  padding: "checkbox",
163
163
  sx: c(
164
164
  {
165
- ...xt(g, e.palette.grey[200])
165
+ ..._t(s, o.palette.grey[200])
166
166
  },
167
- !m && vt,
168
- m && Rt,
169
- m && gt(x),
170
- $ && f,
167
+ !m && Ft,
168
+ m && It,
169
+ m && Ot(x),
170
+ T && g,
171
171
  i
172
172
  ),
173
- children: /* @__PURE__ */ l(
174
- kt,
173
+ children: /* @__PURE__ */ b(
174
+ Vt,
175
175
  {
176
176
  color: "default",
177
177
  sx: c(
178
178
  {
179
- [`&, &.${Vt.checked}`]: m ? { color: At[50] } : { color: "inherit" }
179
+ [`&, &.${oo.checked}`]: m ? { color: qt[50] } : { color: "inherit" }
180
180
  },
181
181
  m && { p: 0 }
182
182
  ),
183
- indeterminate: D > 0 && D < B,
184
- checked: B > 0 && D === B,
185
- onChange: b
183
+ indeterminate: E > 0 && E < O,
184
+ checked: O > 0 && E === O,
185
+ onChange: h
186
186
  }
187
187
  )
188
188
  }
189
189
  ),
190
- u.map((s, T) => /* @__PURE__ */ l(
191
- V,
190
+ l.map((a, L) => /* @__PURE__ */ b(
191
+ P,
192
192
  {
193
193
  className: m ? void 0 : "pl-20",
194
- align: it(s.align, "center"),
195
- padding: s.enablePadding ? "normal" : "none",
196
- sortDirection: w === s.id ? L : !1,
194
+ align: nt(a.align, "center"),
195
+ padding: a.enablePadding ? "normal" : "none",
196
+ sortDirection: w === a.id ? v : !1,
197
197
  sx: c(
198
198
  {
199
- ...xt(g, e.palette.grey[200])
199
+ ..._t(s, o.palette.grey[200])
200
200
  },
201
- !m && u.length - 1 !== T && vt,
202
- m && u.length - 1 !== T && Rt,
203
- m && gt(x),
204
- $ && f,
201
+ !m && l.length - 1 !== L && Ft,
202
+ m && l.length - 1 !== L && It,
203
+ m && Ot(x),
204
+ T && g,
205
205
  i,
206
- m && (s == null ? void 0 : s.sx)
206
+ m && (a == null ? void 0 : a.sx)
207
207
  ),
208
- children: o ? /* @__PURE__ */ l(
209
- Kt,
208
+ children: e ? /* @__PURE__ */ b(
209
+ uo,
210
210
  {
211
- sx: m ? ae : ee,
212
- active: w === s.id,
213
- direction: w === s.id ? L : "asc",
214
- onClick: _(s.id),
215
- children: m ? s.label : /* @__PURE__ */ l(rt, { sx: c(ht(g), s == null ? void 0 : s.sx), children: s.label })
211
+ sx: m ? Lo : po,
212
+ active: w === a.id,
213
+ direction: w === a.id ? v : "asc",
214
+ onClick: D(a.id),
215
+ children: m ? a.label : /* @__PURE__ */ b(it, { sx: c(Dt(s), a == null ? void 0 : a.sx), children: a.label })
216
216
  }
217
- ) : m ? s.label : /* @__PURE__ */ l(rt, { sx: c(ht(g), s == null ? void 0 : s.sx), children: s.label })
217
+ ) : m ? a.label : /* @__PURE__ */ b(it, { sx: c(Dt(s), a == null ? void 0 : a.sx), children: a.label })
218
218
  },
219
- s.id
219
+ a.id
220
220
  ))
221
221
  ]
222
222
  }
223
223
  ) });
224
224
  }
225
- n(fe, "DataTableHead");
226
- function je({
225
+ n(Eo, "DataTableHead");
226
+ function ne({
227
227
  className: t,
228
- sx: e,
228
+ sx: o,
229
229
  headSx: i,
230
- headCells: u,
231
- rows: b,
232
- selected: L,
230
+ headCells: l,
231
+ rows: h,
232
+ selected: v,
233
233
  canCheckbox: w,
234
- canTotalCountRow: D,
235
- canSelectingSingle: B,
236
- canUseOrderBy: K = !0,
237
- canTableRadiusZero: P,
238
- canUseTreeGridStyle: o = !1,
239
- fixedRowCount: $,
234
+ canTotalCountRow: E,
235
+ canSelectingSingle: O,
236
+ canUseOrderBy: Q = !0,
237
+ canTableRadiusZero: W,
238
+ canUseTreeGridStyle: e = !1,
239
+ fixedRowCount: T,
240
240
  onSelect: m,
241
241
  onBlur: x
242
242
  }) {
243
- const g = Nt(), [_, s] = Q("asc"), [T, Ot] = Q(""), [j, C] = Q([]), Dt = Jt(re("owp-data-table")), R = O(() => de($), [$]), N = O(() => {
244
- const a = Et(b) ? b : [];
245
- return R ? a.slice(0, R) : a;
246
- }, [b, R]), W = O(() => u ?? [], [u]), v = O(
243
+ var ct, ft, gt, ht, pt, xt, Rt, kt, vt, wt, Lt, Bt;
244
+ const s = Gt(), [D, a] = y("asc"), [L, Wt] = y(""), [Z, N] = y([]), Zt = mo(Ro("owp-data-table")), R = $(() => Bo(T), [T]), z = $(() => {
245
+ const d = jt(h) ? h : [];
246
+ return R ? d.slice(0, R) : d;
247
+ }, [h, R]), K = $(() => l ?? [], [l]), k = $(
247
248
  () => {
248
- var a, d;
249
- return Ft((d = (a = g == null ? void 0 : g.theme) == null ? void 0 : a.main) == null ? void 0 : d.grid);
249
+ var d, u;
250
+ return St((u = (d = s == null ? void 0 : s.theme) == null ? void 0 : d.main) == null ? void 0 : u.grid);
250
251
  },
251
- [g]
252
- ), H = O(
252
+ [s]
253
+ ), H = $(
253
254
  () => {
254
- var a, d;
255
- return St((d = (a = g == null ? void 0 : g.theme) == null ? void 0 : a.main) == null ? void 0 : d.table, oe);
255
+ var d, u;
256
+ return Xt((u = (d = s == null ? void 0 : s.theme) == null ? void 0 : d.main) == null ? void 0 : u.table, xo);
256
257
  },
257
- [g]
258
- ), h = o ? P !== !1 : !!P, at = pt(w) ? w : !0, dt = pt(D) ? D : !0;
259
- bt(() => {
260
- ie(L) || C(L);
261
- }, [L]), bt(() => {
262
- m == null || m(j);
263
- }, [j]);
264
- const Bt = /* @__PURE__ */ n((a, d) => {
265
- s(T === d && _ === "asc" ? "desc" : "asc"), Ot(d);
266
- }, "handleRequestSort"), _t = /* @__PURE__ */ n((a) => {
267
- if (a.target.checked) {
268
- C(N);
258
+ [s]
259
+ ), _ = (ht = (gt = (ft = (ct = s == null ? void 0 : s.theme) == null ? void 0 : ct.main) == null ? void 0 : ft.table) == null ? void 0 : gt.row) == null ? void 0 : ht.backgroundColor, dt = (kt = (Rt = (xt = (pt = s == null ? void 0 : s.theme) == null ? void 0 : pt.main) == null ? void 0 : xt.table) == null ? void 0 : Rt.row) == null ? void 0 : kt.hoverBackgroundColor, ut = (Bt = (Lt = (wt = (vt = s == null ? void 0 : s.theme) == null ? void 0 : vt.main) == null ? void 0 : wt.table) == null ? void 0 : Lt.row) == null ? void 0 : Bt.selectedBackgroundColor, p = e ? W !== !1 : !!W, lt = Ht(w) ? w : !0, mt = Ht(E) ? E : !0;
260
+ Et(() => {
261
+ ko(v) || N(v);
262
+ }, [v]), Et(() => {
263
+ m == null || m(Z);
264
+ }, [Z]);
265
+ const Kt = /* @__PURE__ */ n((d, u) => {
266
+ a(L === u && D === "asc" ? "desc" : "asc"), Wt(u);
267
+ }, "handleRequestSort"), Yt = /* @__PURE__ */ n((d) => {
268
+ if (d.target.checked) {
269
+ N(z);
269
270
  return;
270
271
  }
271
- C([]);
272
- }, "handleSelectAllClick"), Ht = /* @__PURE__ */ n((a, d) => {
273
- if (B) {
274
- C([d]);
272
+ N([]);
273
+ }, "handleSelectAllClick"), Jt = /* @__PURE__ */ n((d, u) => {
274
+ if (O) {
275
+ N([u]);
275
276
  return;
276
277
  }
277
- C((p) => !!p.find((A) => U(A, d)) ? p == null ? void 0 : p.filter((A) => !U(A, d)) : [...p, d]);
278
- }, "handleClick"), I = O(
279
- () => [...N].sort(me(_, T)),
280
- [_, T, N]
281
- ), ut = O(() => !R || I.length >= R ? I : [...I, ...ue(R - I.length)], [R, I]);
282
- return /* @__PURE__ */ M(
283
- Pt,
278
+ N((f) => !!f.find((B) => tt(B, u)) ? f == null ? void 0 : f.filter((B) => !tt(B, u)) : [...f, u]);
279
+ }, "handleClick"), I = $(
280
+ () => [...z].sort(To(D, L)),
281
+ [D, L, z]
282
+ ), bt = $(() => !R || I.length >= R ? I : [...I, ...Co(R - I.length)], [R, I]);
283
+ return /* @__PURE__ */ q(
284
+ ro,
284
285
  {
285
286
  className: t,
286
287
  sx: c(
287
288
  { width: "100%" },
288
- o && G(v),
289
- h && f
289
+ !e && _ && { backgroundColor: _ },
290
+ e && U(k),
291
+ p && g
290
292
  ),
291
293
  children: [
292
- o && /* @__PURE__ */ l(qt, { styles: Ct() }),
293
- /* @__PURE__ */ l(
294
- Zt,
294
+ e && /* @__PURE__ */ b(eo, { styles: yt() }),
295
+ /* @__PURE__ */ b(
296
+ ao,
295
297
  {
296
298
  sx: c(
297
299
  { height: R ? "auto" : 500, borderRadius: 2 },
298
- o && G(v),
300
+ !e && _ && { backgroundColor: _ },
301
+ e && U(k),
299
302
  R && { overflowY: "hidden" },
300
- h && f,
301
- e
303
+ p && g,
304
+ o
302
305
  ),
303
- children: /* @__PURE__ */ M(
304
- jt,
306
+ children: /* @__PURE__ */ q(
307
+ io,
305
308
  {
306
- stickyHeader: !o,
307
- sx: c({ minWidth: 200 }, h && f),
309
+ stickyHeader: !e,
310
+ sx: c({ minWidth: 200 }, p && g),
308
311
  "aria-labelledby": "owp-data-table",
309
312
  children: [
310
- /* @__PURE__ */ l(
311
- fe,
313
+ /* @__PURE__ */ b(
314
+ Eo,
312
315
  {
313
316
  sx: i,
314
- headCells: W,
315
- gridTheme: v,
317
+ headCells: K,
318
+ gridTheme: k,
316
319
  tableTheme: H,
317
- numSelected: j.length,
318
- order: _,
319
- orderBy: T,
320
- onSelectAllClick: _t,
321
- canCheckbox: !B && at,
322
- canUseOrderBy: K,
323
- canTableRadiusZero: h,
324
- canUseTreeGridStyle: o,
325
- onRequestSort: Bt,
326
- rowCount: N.length
320
+ numSelected: Z.length,
321
+ order: D,
322
+ orderBy: L,
323
+ onSelectAllClick: Yt,
324
+ canCheckbox: !O && lt,
325
+ canUseOrderBy: Q,
326
+ canTableRadiusZero: p,
327
+ canUseTreeGridStyle: e,
328
+ onRequestSort: Kt,
329
+ rowCount: z.length
327
330
  }
328
331
  ),
329
- /* @__PURE__ */ l(Wt, { sx: c(h && f), children: ut.map((a, d) => {
330
- const p = j.some((r) => U(r, a)), mt = ut.length - 1 === d, A = R ? d >= I.length : !1, Y = `${Dt.current}-${d}`;
331
- return /* @__PURE__ */ M(
332
- $t,
332
+ /* @__PURE__ */ b(no, { sx: c(p && g), children: bt.map((d, u) => {
333
+ const f = Z.some((r) => tt(r, d)), Ct = bt.length - 1 === u, B = R ? u >= I.length : !1, S = `${Zt.current}-${u}`;
334
+ return /* @__PURE__ */ q(
335
+ Pt,
333
336
  {
334
337
  hover: !0,
335
- role: o ? void 0 : "checkbox",
336
- "aria-checked": o ? void 0 : p,
338
+ role: e ? void 0 : "checkbox",
339
+ "aria-checked": e ? void 0 : f,
337
340
  tabIndex: -1,
338
- selected: p,
341
+ selected: f,
339
342
  sx: c(
340
- { cursor: A ? "default" : "pointer" },
341
- o && Xt(v, {
342
- canHover: !A,
343
- selected: p
343
+ { cursor: B ? "default" : "pointer" },
344
+ !e && _ && !f && { backgroundColor: _ },
345
+ !e && dt && !B && !f && {
346
+ "&.MuiTableRow-hover:hover": {
347
+ backgroundColor: dt
348
+ }
349
+ },
350
+ !e && ut && f && {
351
+ "&.Mui-selected, &.Mui-selected:hover": {
352
+ backgroundColor: ut
353
+ }
354
+ },
355
+ e && co(k, {
356
+ canHover: !B,
357
+ selected: f
344
358
  }),
345
- o && { height: 30 },
346
- h && f,
347
- h && mt && se
359
+ e && { height: 30 },
360
+ p && g,
361
+ p && Ct && wo
348
362
  ),
349
363
  children: [
350
- at && /* @__PURE__ */ l(
351
- V,
364
+ lt && /* @__PURE__ */ b(
365
+ P,
352
366
  {
353
367
  padding: "checkbox",
354
368
  onClick: /* @__PURE__ */ n((r) => {
355
- A || Ht(r, a);
369
+ B || Jt(r, d);
356
370
  }, "onClick"),
357
371
  sx: c(
358
- !o && ot(H),
359
- o && X(v),
360
- o ? et : tt,
361
- h && f
372
+ !e && rt(H),
373
+ e && G(k),
374
+ e ? et : ot,
375
+ p && g
362
376
  ),
363
- children: /* @__PURE__ */ l(
364
- kt,
377
+ children: /* @__PURE__ */ b(
378
+ Vt,
365
379
  {
366
380
  color: "default",
367
- checked: p,
368
- disabled: A,
369
- sx: c(o && { p: 0 })
381
+ checked: f,
382
+ disabled: B,
383
+ sx: c(e && { p: 0 })
370
384
  }
371
385
  )
372
386
  }
373
387
  ),
374
- W.map((r, J) => {
375
- const lt = `${Y}-row-${d}-cell-${J}`, ct = le(a, r), Z = ce(a, d), y = q(a, String(r == null ? void 0 : r.id));
376
- return J === 0 ? /* @__PURE__ */ l(
377
- V,
388
+ K.map((r, X) => {
389
+ const Tt = `${S}-row-${u}-cell-${X}`, At = Ao(d, r), Y = $o(d, u), J = j(d, String(r == null ? void 0 : r.id));
390
+ return X === 0 ? /* @__PURE__ */ b(
391
+ P,
378
392
  {
379
- className: o ? void 0 : "px-4",
380
- component: o ? "td" : "th",
381
- id: Y,
382
- scope: o ? void 0 : "row",
393
+ className: e ? void 0 : "px-4",
394
+ component: e ? "td" : "th",
395
+ id: S,
396
+ scope: e ? void 0 : "row",
383
397
  padding: "none",
384
- role: o ? "cell" : void 0,
385
- align: it(r.valueAlign, "left"),
398
+ role: e ? "cell" : void 0,
399
+ align: nt(r.valueAlign, "left"),
386
400
  sx: c(
387
- !o && ot(H),
388
- o && X(v),
389
- W.length > 1 && (o ? et : tt),
390
- h && f
401
+ !e && rt(H),
402
+ e && G(k),
403
+ K.length > 1 && (e ? et : ot),
404
+ p && g
391
405
  ),
392
- children: y
406
+ children: J
393
407
  },
394
- lt
395
- ) : /* @__PURE__ */ l(
396
- V,
408
+ Tt
409
+ ) : /* @__PURE__ */ b(
410
+ P,
397
411
  {
398
- className: o ? void 0 : "px-4",
399
- role: o ? "cell" : void 0,
400
- align: it(r.valueAlign, "left"),
412
+ className: e ? void 0 : "px-4",
413
+ role: e ? "cell" : void 0,
414
+ align: nt(r.valueAlign, "left"),
401
415
  sx: c(
402
- !o && ot(H),
403
- o && X(v),
404
- W.length - 1 !== J && (o ? et : tt),
405
- h && f
416
+ !e && rt(H),
417
+ e && G(k),
418
+ K.length - 1 !== X && (e ? et : ot),
419
+ p && g
406
420
  ),
407
- children: r != null && r.canTextField ? (r == null ? void 0 : r.textFieldType) === "number" ? /* @__PURE__ */ l(
408
- ne,
421
+ children: r != null && r.canTextField ? (r == null ? void 0 : r.textFieldType) === "number" ? /* @__PURE__ */ b(
422
+ vo,
409
423
  {
410
424
  variant: "standard",
411
425
  decimalScale: 2,
412
- label: ct,
426
+ label: At,
413
427
  fullWidth: !0,
414
428
  size: "small",
415
- sx: Tt(
429
+ sx: zt(
416
430
  r == null ? void 0 : r.valueAlign,
417
- o ? v.cell.fontSize : H.cell.fontSize
431
+ e ? k.cell.fontSize : H.cell.fontSize
418
432
  ),
419
433
  slotProps: {
420
434
  input: {
421
- tabIndex: Z
435
+ tabIndex: Y
422
436
  },
423
437
  inputLabel: {
424
438
  shrink: !0
425
439
  }
426
440
  },
427
- isAllowed: /* @__PURE__ */ n((k) => {
428
- var z;
429
- const { floatValue: F } = k, E = (z = nt(a, r == null ? void 0 : r.rangeKey)) == null ? void 0 : z.end;
430
- return S(F) && S(E) ? F <= E : !0;
441
+ isAllowed: /* @__PURE__ */ n((C) => {
442
+ var V;
443
+ const { floatValue: F } = C, A = (V = at(d, r == null ? void 0 : r.rangeKey)) == null ? void 0 : V.end;
444
+ return M(F) && M(A) ? F <= A : !0;
431
445
  }, "isAllowed"),
432
- value: y,
433
- onBlur: /* @__PURE__ */ n((k) => {
434
- var z, ft;
435
- const F = (z = nt(a, r == null ? void 0 : r.rangeKey)) == null ? void 0 : z.start, E = (ft = k.target.value) == null ? void 0 : ft.replace(/,/g, "");
446
+ value: J,
447
+ onBlur: /* @__PURE__ */ n((C) => {
448
+ var V, $t;
449
+ const F = (V = at(d, r == null ? void 0 : r.rangeKey)) == null ? void 0 : V.start, A = ($t = C.target.value) == null ? void 0 : $t.replace(/,/g, "");
436
450
  x == null || x(
437
451
  {
438
- ...k,
452
+ ...C,
439
453
  target: {
440
- ...k.target,
441
- value: S(F) && E !== "" ? Number(F > Number(E) ? F : E) : E
454
+ ...C.target,
455
+ value: M(F) && A !== "" ? Number(F > Number(A) ? F : A) : A
442
456
  }
443
457
  },
444
- Z
458
+ Y
445
459
  );
446
460
  }, "onBlur")
447
461
  }
448
- ) : /* @__PURE__ */ l(
449
- zt,
462
+ ) : /* @__PURE__ */ b(
463
+ Ut,
450
464
  {
451
465
  variant: "standard",
452
- label: ct,
466
+ label: At,
453
467
  fullWidth: !0,
454
468
  size: "small",
455
- sx: Tt(
469
+ sx: zt(
456
470
  r == null ? void 0 : r.valueAlign,
457
- o ? v.cell.fontSize : H.cell.fontSize
471
+ e ? k.cell.fontSize : H.cell.fontSize
458
472
  ),
459
473
  slotProps: {
460
474
  input: {
461
- tabIndex: Z
475
+ tabIndex: Y
462
476
  },
463
477
  inputLabel: {
464
478
  shrink: !0
465
479
  }
466
480
  },
467
481
  type: (r == null ? void 0 : r.textFieldType) ?? "text",
468
- defaultValue: y,
469
- onBlur: /* @__PURE__ */ n((k) => x == null ? void 0 : x(
470
- { ...k, target: { ...k.target, value: k.target.value } },
471
- Z
482
+ defaultValue: J,
483
+ onBlur: /* @__PURE__ */ n((C) => x == null ? void 0 : x(
484
+ { ...C, target: { ...C.target, value: C.target.value } },
485
+ Y
472
486
  ), "onBlur")
473
487
  }
474
- ) : y
488
+ ) : J
475
489
  },
476
- lt
490
+ Tt
477
491
  );
478
492
  })
479
493
  ]
480
494
  },
481
- `${Y}-row-${d}`
495
+ `${S}-row-${u}`
482
496
  );
483
497
  }) })
484
498
  ]
@@ -486,19 +500,19 @@ function je({
486
500
  )
487
501
  }
488
502
  ),
489
- dt && /* @__PURE__ */ l(Mt, { sx: c(h && f) }),
490
- dt && /* @__PURE__ */ M(
491
- rt,
503
+ mt && /* @__PURE__ */ b(to, { sx: c(p && g) }),
504
+ mt && /* @__PURE__ */ q(
505
+ it,
492
506
  {
493
507
  className: "w-full py-8 pr-12",
494
508
  align: "right",
495
509
  sx: c(
496
- o && G(v),
497
- h && f
510
+ e && U(k),
511
+ p && g
498
512
  ),
499
513
  children: [
500
514
  "전체: ",
501
- N.length.toLocaleString(),
515
+ z.length.toLocaleString(),
502
516
  " 건"
503
517
  ]
504
518
  }
@@ -507,8 +521,8 @@ function je({
507
521
  }
508
522
  );
509
523
  }
510
- n(je, "OwpDataTable");
524
+ n(ne, "OwpDataTable");
511
525
  export {
512
- je as OwpDataTable
526
+ ne as OwpDataTable
513
527
  };
514
528
  //# sourceMappingURL=OwpDataTable.js.map