@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.
- package/dist/_virtual/index11.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- 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 +346 -336
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js +166 -0
- package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js.map +1 -0
- package/dist/components/OwpTable/OwpDataTable.js +333 -283
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpFieldTable.js +102 -58
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +192 -172
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/treeGridTableStyle.js +77 -0
- package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -0
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +199 -171
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +172 -131
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +462 -0
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -0
- package/dist/components/{OwpTreeGridExcelButton/OwpTreeGridExcelButton.js → OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js} +7 -7
- package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js.map +1 -0
- package/dist/configs/defaultConfig.js +67 -44
- package/dist/configs/defaultConfig.js.map +1 -1
- package/dist/constants/gridTheme.js +78 -0
- package/dist/constants/gridTheme.js.map +1 -0
- package/dist/constants/tableTheme.js +16 -0
- package/dist/constants/tableTheme.js.map +1 -0
- package/dist/constants/treeGrid.js +44 -26
- package/dist/constants/treeGrid.js.map +1 -1
- package/dist/constants.js +21 -20
- package/dist/contexts/OwpUiProvider.js +59 -38
- package/dist/contexts/OwpUiProvider.js.map +1 -1
- package/dist/hooks/useFormDataUploadMutation.js.map +1 -1
- package/dist/index.js +105 -104
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/layout/components/toolbar/ToolbarLayout.js +5 -4
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- 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/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.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/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.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/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.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/OwpSnackbarContent/OwpSnackbarContent.d.ts +2 -0
- package/dist/types/components/OwpTable/OwpTable.d.ts +5 -1
- package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +105 -0
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +5 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +20 -0
- package/dist/types/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.d.ts +12 -0
- package/dist/types/components/OwpTreeGridExportExcelButton/index.d.ts +1 -0
- package/dist/types/configs/defaultConfig.d.ts +22 -0
- package/dist/types/constants/gridTheme.d.ts +88 -0
- package/dist/types/constants/tableTheme.d.ts +18 -0
- package/dist/types/constants/treeGrid.d.ts +5 -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 +48 -0
- package/dist/types/types/OwpSettingsTypes.d.ts +11 -0
- package/dist/types/types/OwpTableThemeTypes.d.ts +16 -0
- package/dist/types/types/index.d.ts +3 -1
- package/dist/types/utils/treeGridUtil.d.ts +1 -0
- package/dist/utils/createFormDataBody.js +19 -14
- package/dist/utils/createFormDataBody.js.map +1 -1
- package/dist/utils/exceljsBrowser.js +45 -48
- package/dist/utils/exceljsBrowser.js.map +1 -1
- package/dist/utils/treeGridUtil.js +66 -66
- package/dist/utils/treeGridUtil.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,85 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import Nt from "@mui/material
|
|
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 {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
},
|
|
30
|
-
borderRight: `1px solid ${
|
|
31
|
-
},
|
|
32
|
-
borderRight: `1px solid ${
|
|
33
|
-
},
|
|
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:
|
|
64
|
+
color: I.A100
|
|
36
65
|
},
|
|
37
66
|
"&.MuiTableSortLabel-root:hover": {
|
|
38
|
-
color:
|
|
67
|
+
color: I.A100
|
|
39
68
|
},
|
|
40
69
|
"&.Mui-active": {
|
|
41
|
-
color:
|
|
70
|
+
color: I.A100
|
|
42
71
|
},
|
|
43
72
|
"& .MuiTableSortLabel-icon": {
|
|
44
|
-
color: `${
|
|
73
|
+
color: `${I.A100} !important`
|
|
45
74
|
}
|
|
46
|
-
},
|
|
75
|
+
}, l = {
|
|
47
76
|
borderRadius: 0
|
|
48
|
-
},
|
|
77
|
+
}, io = {
|
|
49
78
|
"& > th, & > td": {
|
|
50
79
|
borderBottomLeftRadius: 0,
|
|
51
80
|
borderBottomRightRadius: 0
|
|
52
81
|
}
|
|
53
|
-
},
|
|
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
|
-
},
|
|
102
|
-
|
|
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"),
|
|
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"),
|
|
123
|
+
}, "getTableCellAlign"), W = /* @__PURE__ */ s((t, o) => {
|
|
122
124
|
if (o)
|
|
123
125
|
return t == null ? void 0 : t[o];
|
|
124
|
-
}, "getRowValue"),
|
|
125
|
-
if (typeof t == "string" ||
|
|
126
|
+
}, "getRowValue"), wt = /* @__PURE__ */ s((t) => {
|
|
127
|
+
if (typeof t == "string" || T(t))
|
|
126
128
|
return t;
|
|
127
129
|
}, "getComparableValue");
|
|
128
|
-
function
|
|
129
|
-
const
|
|
130
|
-
return
|
|
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
|
-
|
|
133
|
-
function
|
|
134
|
-
return t === "desc" ? (i,
|
|
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
|
-
|
|
137
|
-
const
|
|
138
|
+
s(uo, "getComparator");
|
|
139
|
+
const st = /* @__PURE__ */ s((t, o) => {
|
|
138
140
|
if (o)
|
|
139
|
-
return
|
|
140
|
-
}, "getRowRangeValue"),
|
|
141
|
-
var
|
|
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 =
|
|
145
|
-
return `${(
|
|
146
|
-
}, "getRangeLabel"),
|
|
147
|
-
const i =
|
|
148
|
-
return
|
|
149
|
-
}, "getRowTabIndex"),
|
|
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
|
|
161
|
+
function co(t) {
|
|
156
162
|
const {
|
|
157
163
|
sx: o,
|
|
158
164
|
headCells: i,
|
|
159
|
-
onSelectAllClick:
|
|
160
|
-
order:
|
|
165
|
+
onSelectAllClick: c,
|
|
166
|
+
order: g,
|
|
161
167
|
orderBy: x,
|
|
162
|
-
numSelected:
|
|
163
|
-
rowCount:
|
|
168
|
+
numSelected: A,
|
|
169
|
+
rowCount: H,
|
|
164
170
|
onRequestSort: V,
|
|
165
|
-
canCheckbox:
|
|
166
|
-
canUseOrderBy:
|
|
167
|
-
canTableRadiusZero:
|
|
168
|
-
canUseTreeGridStyle:
|
|
169
|
-
|
|
170
|
-
|
|
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__ */
|
|
173
|
-
|
|
180
|
+
return /* @__PURE__ */ f(Yt, { sx: m(e && l), children: /* @__PURE__ */ M(
|
|
181
|
+
Dt,
|
|
174
182
|
{
|
|
175
|
-
sx:
|
|
183
|
+
sx: m(
|
|
184
|
+
!u && rt,
|
|
185
|
+
u && { height: E.header.height },
|
|
186
|
+
e && l
|
|
187
|
+
),
|
|
176
188
|
children: [
|
|
177
|
-
|
|
178
|
-
|
|
189
|
+
Y && /* @__PURE__ */ f(
|
|
190
|
+
N,
|
|
179
191
|
{
|
|
180
192
|
padding: "checkbox",
|
|
181
|
-
|
|
182
|
-
sx: u(
|
|
193
|
+
sx: m(
|
|
183
194
|
{
|
|
184
|
-
...
|
|
185
|
-
...ut
|
|
195
|
+
...xt(p)
|
|
186
196
|
},
|
|
187
|
-
|
|
188
|
-
|
|
197
|
+
!u && vt,
|
|
198
|
+
!u && rt,
|
|
199
|
+
u && Rt,
|
|
200
|
+
u && pt(E),
|
|
201
|
+
e && l,
|
|
189
202
|
o
|
|
190
203
|
),
|
|
191
|
-
children: /* @__PURE__ */
|
|
192
|
-
|
|
204
|
+
children: /* @__PURE__ */ f(
|
|
205
|
+
$t,
|
|
193
206
|
{
|
|
194
207
|
color: "default",
|
|
195
|
-
sx:
|
|
208
|
+
sx: m(
|
|
196
209
|
{
|
|
197
|
-
[`&, &.${
|
|
198
|
-
color:
|
|
210
|
+
[`&, &.${Vt.checked}`]: {
|
|
211
|
+
color: I[50]
|
|
199
212
|
}
|
|
200
213
|
},
|
|
201
|
-
|
|
214
|
+
u && { p: 0 }
|
|
202
215
|
),
|
|
203
|
-
indeterminate:
|
|
204
|
-
checked:
|
|
205
|
-
onChange:
|
|
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((
|
|
211
|
-
|
|
223
|
+
i.map((n, O) => /* @__PURE__ */ f(
|
|
224
|
+
N,
|
|
212
225
|
{
|
|
213
|
-
className:
|
|
214
|
-
align:
|
|
215
|
-
padding:
|
|
216
|
-
sortDirection: x ===
|
|
217
|
-
sx:
|
|
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
|
-
...
|
|
220
|
-
...i.length - 1 !== R && ut
|
|
232
|
+
...xt(p)
|
|
221
233
|
},
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
240
|
+
u && (n == null ? void 0 : n.sx)
|
|
226
241
|
),
|
|
227
|
-
children:
|
|
228
|
-
|
|
242
|
+
children: h ? /* @__PURE__ */ f(
|
|
243
|
+
Jt,
|
|
229
244
|
{
|
|
230
|
-
sx:
|
|
231
|
-
active: x ===
|
|
232
|
-
direction: x ===
|
|
233
|
-
onClick:
|
|
234
|
-
children:
|
|
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
|
-
) :
|
|
251
|
+
) : u ? n.label : /* @__PURE__ */ f(it, { sx: m(At(p), n == null ? void 0 : n.sx), children: n.label })
|
|
237
252
|
},
|
|
238
|
-
|
|
253
|
+
n.id
|
|
239
254
|
))
|
|
240
255
|
]
|
|
241
256
|
}
|
|
242
257
|
) });
|
|
243
258
|
}
|
|
244
|
-
|
|
245
|
-
function
|
|
259
|
+
s(co, "DataTableHead");
|
|
260
|
+
function Wo({
|
|
246
261
|
className: t,
|
|
247
262
|
sx: o,
|
|
248
263
|
headSx: i,
|
|
249
|
-
headCells:
|
|
250
|
-
rows:
|
|
264
|
+
headCells: c,
|
|
265
|
+
rows: g,
|
|
251
266
|
selected: x,
|
|
252
|
-
canCheckbox:
|
|
253
|
-
canTotalCountRow:
|
|
267
|
+
canCheckbox: A,
|
|
268
|
+
canTotalCountRow: H,
|
|
254
269
|
canSelectingSingle: V,
|
|
255
|
-
canUseOrderBy:
|
|
256
|
-
canTableRadiusZero:
|
|
257
|
-
canUseTreeGridStyle:
|
|
258
|
-
fixedRowCount:
|
|
259
|
-
onSelect:
|
|
260
|
-
onBlur:
|
|
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
|
|
263
|
-
const
|
|
264
|
-
return
|
|
265
|
-
}, [
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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
|
-
|
|
279
|
-
}, "handleSelectAllClick"),
|
|
305
|
+
z([]);
|
|
306
|
+
}, "handleSelectAllClick"), It = /* @__PURE__ */ s((a, d) => {
|
|
280
307
|
if (V) {
|
|
281
|
-
|
|
308
|
+
z([d]);
|
|
282
309
|
return;
|
|
283
310
|
}
|
|
284
|
-
|
|
285
|
-
}, "handleClick"),
|
|
286
|
-
() => [...
|
|
287
|
-
[
|
|
288
|
-
),
|
|
289
|
-
return /* @__PURE__ */
|
|
290
|
-
|
|
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:
|
|
320
|
+
sx: m(
|
|
321
|
+
{ width: "100%" },
|
|
322
|
+
e && G(v),
|
|
323
|
+
h && l
|
|
324
|
+
),
|
|
294
325
|
children: [
|
|
295
|
-
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
|
|
326
|
+
e && /* @__PURE__ */ f(qt, { styles: Ct() }),
|
|
327
|
+
/* @__PURE__ */ f(
|
|
328
|
+
yt,
|
|
298
329
|
{
|
|
299
|
-
sx:
|
|
300
|
-
{ height:
|
|
301
|
-
|
|
302
|
-
|
|
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__ */
|
|
306
|
-
|
|
337
|
+
children: /* @__PURE__ */ M(
|
|
338
|
+
jt,
|
|
307
339
|
{
|
|
308
|
-
stickyHeader: !
|
|
309
|
-
sx:
|
|
340
|
+
stickyHeader: !e,
|
|
341
|
+
sx: m({ minWidth: 200 }, h && l),
|
|
310
342
|
"aria-labelledby": "owp-data-table",
|
|
311
343
|
children: [
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
|
|
344
|
+
/* @__PURE__ */ f(
|
|
345
|
+
co,
|
|
314
346
|
{
|
|
315
347
|
sx: i,
|
|
316
|
-
headCells:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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__ */
|
|
330
|
-
const b =
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
|
|
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:
|
|
336
|
-
"aria-checked":
|
|
369
|
+
role: e ? void 0 : "checkbox",
|
|
370
|
+
"aria-checked": e ? void 0 : b,
|
|
337
371
|
tabIndex: -1,
|
|
338
372
|
selected: b,
|
|
339
|
-
sx:
|
|
340
|
-
{ cursor:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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
|
-
|
|
347
|
-
|
|
384
|
+
dt && /* @__PURE__ */ f(
|
|
385
|
+
N,
|
|
348
386
|
{
|
|
349
387
|
padding: "checkbox",
|
|
350
|
-
onClick: /* @__PURE__ */
|
|
351
|
-
|
|
388
|
+
onClick: /* @__PURE__ */ s((r) => {
|
|
389
|
+
k || It(r, a);
|
|
352
390
|
}, "onClick"),
|
|
353
|
-
sx:
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
391
|
+
sx: m(
|
|
392
|
+
e ? ot : tt,
|
|
393
|
+
!e && et(S),
|
|
394
|
+
e && Z(v),
|
|
395
|
+
h && l
|
|
357
396
|
),
|
|
358
|
-
children: /* @__PURE__ */
|
|
359
|
-
|
|
397
|
+
children: /* @__PURE__ */ f(
|
|
398
|
+
$t,
|
|
360
399
|
{
|
|
361
400
|
color: "default",
|
|
362
401
|
checked: b,
|
|
363
|
-
disabled:
|
|
364
|
-
sx:
|
|
402
|
+
disabled: k,
|
|
403
|
+
sx: m(e && { p: 0 })
|
|
365
404
|
}
|
|
366
405
|
)
|
|
367
406
|
}
|
|
368
407
|
),
|
|
369
|
-
|
|
370
|
-
const
|
|
371
|
-
return
|
|
372
|
-
|
|
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:
|
|
375
|
-
component:
|
|
376
|
-
id:
|
|
377
|
-
scope:
|
|
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:
|
|
380
|
-
align:
|
|
381
|
-
sx:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
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:
|
|
426
|
+
children: y
|
|
387
427
|
},
|
|
388
|
-
|
|
389
|
-
) : /* @__PURE__ */
|
|
390
|
-
|
|
428
|
+
ct
|
|
429
|
+
) : /* @__PURE__ */ f(
|
|
430
|
+
N,
|
|
391
431
|
{
|
|
392
|
-
className:
|
|
393
|
-
role:
|
|
394
|
-
align:
|
|
395
|
-
sx:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
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__ */
|
|
401
|
-
|
|
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:
|
|
446
|
+
label: gt,
|
|
406
447
|
fullWidth: !0,
|
|
407
448
|
size: "small",
|
|
408
|
-
sx:
|
|
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:
|
|
455
|
+
tabIndex: K
|
|
412
456
|
},
|
|
413
457
|
inputLabel: {
|
|
414
458
|
shrink: !0
|
|
415
459
|
}
|
|
416
460
|
},
|
|
417
|
-
isAllowed: /* @__PURE__ */
|
|
418
|
-
var
|
|
419
|
-
const { floatValue:
|
|
420
|
-
return
|
|
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:
|
|
423
|
-
onBlur: /* @__PURE__ */
|
|
424
|
-
var
|
|
425
|
-
const
|
|
426
|
-
|
|
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:
|
|
475
|
+
value: T(B) && $ !== "" ? Number(B > Number($) ? B : $) : $
|
|
432
476
|
}
|
|
433
477
|
},
|
|
434
|
-
|
|
478
|
+
K
|
|
435
479
|
);
|
|
436
480
|
}, "onBlur")
|
|
437
481
|
}
|
|
438
|
-
) : /* @__PURE__ */
|
|
439
|
-
|
|
482
|
+
) : /* @__PURE__ */ f(
|
|
483
|
+
Nt,
|
|
440
484
|
{
|
|
441
485
|
variant: "standard",
|
|
442
|
-
label:
|
|
486
|
+
label: gt,
|
|
443
487
|
fullWidth: !0,
|
|
444
488
|
size: "small",
|
|
445
|
-
sx:
|
|
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:
|
|
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:
|
|
456
|
-
onBlur: /* @__PURE__ */
|
|
502
|
+
defaultValue: y,
|
|
503
|
+
onBlur: /* @__PURE__ */ s((w) => p == null ? void 0 : p(
|
|
457
504
|
{ ...w, target: { ...w.target, value: w.target.value } },
|
|
458
|
-
|
|
505
|
+
K
|
|
459
506
|
), "onBlur")
|
|
460
507
|
}
|
|
461
|
-
) :
|
|
508
|
+
) : y
|
|
462
509
|
},
|
|
463
|
-
|
|
510
|
+
ct
|
|
464
511
|
);
|
|
465
512
|
})
|
|
466
513
|
]
|
|
467
514
|
},
|
|
468
|
-
`${
|
|
515
|
+
`${J}-row-${d}`
|
|
469
516
|
);
|
|
470
517
|
}) })
|
|
471
518
|
]
|
|
@@ -473,16 +520,19 @@ function Ro({
|
|
|
473
520
|
)
|
|
474
521
|
}
|
|
475
522
|
),
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
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:
|
|
529
|
+
sx: m(
|
|
530
|
+
e && G(v),
|
|
531
|
+
h && l
|
|
532
|
+
),
|
|
483
533
|
children: [
|
|
484
534
|
"전체: ",
|
|
485
|
-
|
|
535
|
+
F.length.toLocaleString(),
|
|
486
536
|
" 건"
|
|
487
537
|
]
|
|
488
538
|
}
|
|
@@ -491,8 +541,8 @@ function Ro({
|
|
|
491
541
|
}
|
|
492
542
|
);
|
|
493
543
|
}
|
|
494
|
-
|
|
544
|
+
s(Wo, "OwpDataTable");
|
|
495
545
|
export {
|
|
496
|
-
|
|
546
|
+
Wo as OwpDataTable
|
|
497
547
|
};
|
|
498
548
|
//# sourceMappingURL=OwpDataTable.js.map
|