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