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