@owp/core 2.5.2 → 2.5.4

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