@owp/core 2.5.20 → 2.5.22
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/dayjs.d.ts +4 -0
- package/dayjs.js +2 -0
- package/dist/_virtual/isBetween.js +8 -0
- package/dist/_virtual/isBetween.js.map +1 -0
- package/dist/_virtual/isBetween2.js +5 -0
- package/dist/_virtual/isBetween2.js.map +1 -0
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js +26 -26
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js.map +1 -1
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js +29 -29
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +144 -141
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js +20 -20
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js.map +1 -1
- package/dist/components/OwpPageContent/OwpPageContent.js +20 -19
- package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
- package/dist/components/OwpPicker/OwpDatePicker.js +216 -235
- package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpDateRangePicker.js +21 -21
- package/dist/components/OwpPicker/OwpDateRangePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpTimePicker.js +310 -340
- package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpWeekDatePicker.js +28 -29
- package/dist/components/OwpPicker/OwpWeekDatePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpYearRangePicker.js +1 -1
- package/dist/components/OwpPicker/OwpYearRangePicker.js.map +1 -1
- package/dist/components/OwpPicker/constants/index.js +21 -6
- package/dist/components/OwpPicker/constants/index.js.map +1 -1
- package/dist/components/OwpPicker/internal/DatePickerInput.js +5 -5
- package/dist/components/OwpPicker/internal/DatePickerInput.js.map +1 -1
- package/dist/components/OwpPicker/utils/index.js +22 -0
- package/dist/components/OwpPicker/utils/index.js.map +1 -0
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js +218 -205
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +118 -111
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +59 -59
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js +88 -85
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js.map +1 -1
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js +93 -93
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +329 -317
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpFieldTable.js +77 -74
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +66 -219
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/OwpTableBase.js +195 -0
- package/dist/components/OwpTable/internal/OwpTableBase.js.map +1 -0
- package/dist/components/OwpTable/internal/OwpTableTotalCount.js +23 -0
- package/dist/components/OwpTable/internal/OwpTableTotalCount.js.map +1 -0
- package/dist/components/OwpTable/internal/defaultTableStyle.js +10 -10
- package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
- package/dist/components/OwpTable/utils/tableSx.js +9 -0
- package/dist/components/OwpTable/utils/tableSx.js.map +1 -0
- package/dist/components/OwpTextField/OwpTextMaskField.js +95 -86
- package/dist/components/OwpTextField/OwpTextMaskField.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +164 -179
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +10 -10
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/components/OwpYesNoSelector/OwpYesNoSelector.js.map +1 -1
- package/dist/dayjs.js +18 -0
- package/dist/dayjs.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewCanvas.js +22 -22
- package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
- package/dist/features/themePreview/configs/table.js +4 -4
- package/dist/features/themePreview/configs/table.js.map +1 -1
- package/dist/features/themePreview/hooks/useThemePreview.js +16 -16
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
- package/dist/hooks/{useInitCommonCodes.js → internal/useInitCommonCodes.js} +6 -6
- package/dist/hooks/internal/useInitCommonCodes.js.map +1 -0
- package/dist/hooks/internal/useMinimumVisibleState.js +31 -0
- package/dist/hooks/internal/useMinimumVisibleState.js.map +1 -0
- package/dist/hooks/useInitApp.js +17 -14
- package/dist/hooks/useInitApp.js.map +1 -1
- package/dist/hooks.js +49 -51
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +91 -94
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/plugin/isBetween.js +23 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/plugin/isBetween.js.map +1 -0
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/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/types/components/OwpCommonCode/OwpCommonCodeQuerySelector.d.ts +3 -3
- package/dist/types/components/OwpCommonCode/OwpCommonCodeSelector.d.ts +3 -3
- package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +1 -0
- package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +2 -2
- package/dist/types/components/OwpPicker/OwpDatePicker.d.ts +1 -1
- package/dist/types/components/OwpPicker/OwpTimePicker.d.ts +2 -2
- package/dist/types/components/OwpPicker/constants/index.d.ts +15 -0
- package/dist/types/components/OwpPicker/utils/index.d.ts +6 -0
- package/dist/types/components/OwpQuerySelector/OwpQuerySelector.d.ts +1 -1
- package/dist/types/components/OwpQuerySelector/types/types.d.ts +1 -0
- package/dist/types/components/OwpSection/OwpSection.d.ts +9 -3
- package/dist/types/components/OwpSelectorBase/hooks/useOwpSelectorBase.d.ts +1 -1
- package/dist/types/components/OwpSelectorBase/types/types.d.ts +1 -1
- package/dist/types/components/OwpTable/OwpDataTable.d.ts +5 -1
- package/dist/types/components/OwpTable/OwpFieldTable.d.ts +7 -1
- package/dist/types/components/OwpTable/OwpTable.d.ts +6 -38
- package/dist/types/components/OwpTable/internal/OwpTableBase.d.ts +34 -0
- package/dist/types/components/OwpTable/internal/OwpTableTotalCount.d.ts +9 -0
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +4 -2
- package/dist/types/components/OwpTable/utils/tableSx.d.ts +11 -0
- package/dist/types/components/OwpTextField/OwpTextMaskField.d.ts +3 -3
- package/dist/types/components/OwpYesNoSelector/OwpYesNoSelector.d.ts +1 -1
- package/dist/types/dayjs.d.ts +18 -0
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/internal/useMinimumVisibleState.d.ts +7 -0
- package/dist/types/utils/dayjsBrowser.d.ts +1 -7
- package/dist/types/utils/formatDateToYmd.d.ts +1 -1
- package/dist/utils/formatDateToYmd.js +3 -3
- package/dist/utils/formatDateToYmd.js.map +1 -1
- package/dist/utils/treeGridExportExcelUtil.js +1 -1
- package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
- package/dist/utils/zipUtil.js +3 -3
- package/dist/utils/zipUtil.js.map +1 -1
- package/package.json +3 -1
- package/dist/hooks/useInitCommonCodes.js.map +0 -1
- package/dist/utils/dayjsBrowser.js +0 -16
- package/dist/utils/dayjsBrowser.js.map +0 -1
- /package/dist/types/hooks/{useInitCommonCodes.d.ts → internal/useInitCommonCodes.d.ts} +0 -0
|
@@ -1,255 +1,102 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
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
|
-
|
|
18
|
-
import { useMemo as w } from "react";
|
|
19
|
-
import { getTreeGridContainerSx as oo, getTreeGridBodyRowSx as eo, TREEGRID_TABLE_BODY_BORDER_COLOR as ro, getTreeGridBodyCellSx as to, TREEGRID_TABLE_HEADER_BORDER_COLOR as lo, getTreeGridHeaderCellSx as io, getTreeGridCellBaseSx as ao } from "./internal/treeGridTableStyle.js";
|
|
20
|
-
import { getDefaultTableHeaderCellSx as N, getDefaultTableCellSx as mo, defaultStyledTableTheme as L } from "./internal/defaultTableStyle.js";
|
|
21
|
-
import { isNumber as bo } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNumber.js";
|
|
22
|
-
import { isArray as $ } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
|
|
23
|
-
import { isEmpty as no } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
24
|
-
const G = /* @__PURE__ */ b((e) => e ? Object.keys(e).filter((o) => !o.includes("Span")) : [], "getTableColumnKeys"), _ = /* @__PURE__ */ b((e, o) => e[`${o}Sx`] ?? {}, "getTableCellSx"), D = /* @__PURE__ */ b((e, o, r) => e[`${o}${r}`] ?? void 0, "getTableCellSpan"), E = /* @__PURE__ */ b((...e) => e.reduce((o, r) => r ? [...o, ...$(r) ? r : [r]] : o, []), "mergeSx"), fo = {
|
|
25
|
-
border: 0,
|
|
26
|
-
borderRadius: 0,
|
|
27
|
-
overflow: "visible"
|
|
28
|
-
}, B = {
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var i = (e, o) => M(e, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { jsxs as U, jsx as n } 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 { resolveOwpTableTheme as k } from "../../constants/tableTheme.js";
|
|
5
|
+
import { useGetCurrentSettings as A } from "../../hooks/useOwpSettings.js";
|
|
6
|
+
import { clsx as E } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
7
|
+
import q from "@mui/material/TableBody";
|
|
8
|
+
import B from "@mui/material/TableCell";
|
|
9
|
+
import z from "@mui/material/TableHead";
|
|
10
|
+
import { useMemo as b } from "react";
|
|
11
|
+
import { getDefaultTableHeaderCellSx as F, defaultStyledTableTheme as I } from "./internal/defaultTableStyle.js";
|
|
12
|
+
import { OwpTableBaseRow as y, OwpTableBase as J } from "./internal/OwpTableBase.js";
|
|
13
|
+
import { OwpTableTotalCount as Q } from "./internal/OwpTableTotalCount.js";
|
|
14
|
+
import { mergeSx as O } from "./utils/tableSx.js";
|
|
15
|
+
import { isArray as v } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
|
|
16
|
+
import { isEmpty as V } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
17
|
+
const R = /* @__PURE__ */ i((e) => e ? Object.keys(e).filter((o) => !o.includes("Span")) : [], "getTableColumnKeys"), j = /* @__PURE__ */ i((e, o) => e[`${o}Sx`] ?? {}, "getTableCellSx"), G = /* @__PURE__ */ i((e, o, c) => e[`${o}${c}`] ?? void 0, "getTableCellSpan"), H = {
|
|
29
18
|
dark: "rgba(241,245,249,.12)",
|
|
30
19
|
light: "#e2e8f0"
|
|
31
20
|
};
|
|
32
|
-
function
|
|
33
|
-
borderColor: e,
|
|
34
|
-
totalCount: o
|
|
35
|
-
}) {
|
|
36
|
-
return /* @__PURE__ */ y(j, { children: [
|
|
37
|
-
/* @__PURE__ */ m(J, { sx: e ? { borderColor: e } : void 0 }),
|
|
38
|
-
/* @__PURE__ */ y(z, { className: "w-full py-8 pr-12", align: "right", children: [
|
|
39
|
-
"전체: ",
|
|
40
|
-
bo(o) ? o.toLocaleString() : 0,
|
|
41
|
-
" 건"
|
|
42
|
-
] })
|
|
43
|
-
] });
|
|
44
|
-
}
|
|
45
|
-
b(po, "OwpTableTotalCount");
|
|
46
|
-
const ho = /* @__PURE__ */ b(({
|
|
47
|
-
canBodyFullHeight: e,
|
|
48
|
-
canUseTreeGridStyle: o,
|
|
49
|
-
children: r,
|
|
50
|
-
className: T,
|
|
51
|
-
containerProps: l,
|
|
52
|
-
footerSlot: t,
|
|
53
|
-
tableTheme: d,
|
|
54
|
-
tableLayout: s,
|
|
55
|
-
...v
|
|
56
|
-
}) => {
|
|
57
|
-
var x, R, g;
|
|
58
|
-
const i = I(), c = ((g = (R = (x = i == null ? void 0 : i.theme) == null ? void 0 : x.main) == null ? void 0 : R.palette) == null ? void 0 : g.mode) === "dark" ? B.dark : B.light, u = w(
|
|
59
|
-
() => {
|
|
60
|
-
var n, f;
|
|
61
|
-
return k((f = (n = i == null ? void 0 : i.theme) == null ? void 0 : n.main) == null ? void 0 : f.grid);
|
|
62
|
-
},
|
|
63
|
-
[i]
|
|
64
|
-
), C = w(
|
|
65
|
-
() => {
|
|
66
|
-
var n, f;
|
|
67
|
-
return d ?? H((f = (n = i == null ? void 0 : i.theme) == null ? void 0 : n.main) == null ? void 0 : f.table, {
|
|
68
|
-
...L,
|
|
69
|
-
borderColor: c
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
[i, c, d]
|
|
73
|
-
);
|
|
74
|
-
return /* @__PURE__ */ y(j, { children: [
|
|
75
|
-
o && /* @__PURE__ */ m(Q, { styles: q() }),
|
|
76
|
-
/* @__PURE__ */ y(
|
|
77
|
-
Z,
|
|
78
|
-
{
|
|
79
|
-
component: V,
|
|
80
|
-
variant: "outlined",
|
|
81
|
-
...l,
|
|
82
|
-
sx: E(
|
|
83
|
-
!o && { borderColor: C.borderColor },
|
|
84
|
-
o && fo,
|
|
85
|
-
o && oo(u),
|
|
86
|
-
e && { height: "100%" },
|
|
87
|
-
l == null ? void 0 : l.sx
|
|
88
|
-
),
|
|
89
|
-
children: [
|
|
90
|
-
/* @__PURE__ */ m(
|
|
91
|
-
To,
|
|
92
|
-
{
|
|
93
|
-
...v,
|
|
94
|
-
canBodyFullHeight: e,
|
|
95
|
-
canUseTreeGridStyle: o,
|
|
96
|
-
tableTheme: C,
|
|
97
|
-
treeGridTheme: u,
|
|
98
|
-
className: K(
|
|
99
|
-
e && "h-full",
|
|
100
|
-
s === "fixed" ? "table-fixed" : s === "auto" ? "table-auto" : "",
|
|
101
|
-
T
|
|
102
|
-
),
|
|
103
|
-
children: r
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
t
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
] });
|
|
111
|
-
}, "StyledTable"), To = F(W, {
|
|
112
|
-
shouldForwardProp: /* @__PURE__ */ b((e) => e !== "canBodyFullHeight" && e !== "canUseTreeGridStyle" && e !== "tableTheme" && e !== "treeGridTheme", "shouldForwardProp")
|
|
113
|
-
})(
|
|
114
|
-
({ theme: e, canBodyFullHeight: o, canUseTreeGridStyle: r, tableTheme: T, treeGridTheme: l }) => {
|
|
115
|
-
const t = l ?? k(), d = T ?? L;
|
|
116
|
-
return {
|
|
117
|
-
...o && {
|
|
118
|
-
height: "100%"
|
|
119
|
-
},
|
|
120
|
-
...o && {
|
|
121
|
-
"& .MuiTableBody-root": {
|
|
122
|
-
height: "100%"
|
|
123
|
-
},
|
|
124
|
-
"& .MuiTableBody-root > .MuiTableRow-root": {
|
|
125
|
-
height: "100%"
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"& .MuiTableCell-root": r ? {
|
|
129
|
-
...ao(t)
|
|
130
|
-
} : void 0,
|
|
131
|
-
...!r && {
|
|
132
|
-
"& .MuiTableRow-root > .MuiTableCell-root + .MuiTableCell-root": {
|
|
133
|
-
borderLeft: `1px solid ${d.borderColor}`
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
"& th": r ? {
|
|
137
|
-
...io(t),
|
|
138
|
-
"&:first-of-type": {
|
|
139
|
-
borderLeft: `1px solid ${lo}`
|
|
140
|
-
}
|
|
141
|
-
} : {
|
|
142
|
-
...N(d, e.palette.grey[200])
|
|
143
|
-
},
|
|
144
|
-
"& td": r ? {
|
|
145
|
-
...to(t),
|
|
146
|
-
"&:first-of-type": {
|
|
147
|
-
borderLeft: `1px solid ${ro}`
|
|
148
|
-
}
|
|
149
|
-
} : {
|
|
150
|
-
...mo(d)
|
|
151
|
-
},
|
|
152
|
-
...r && {
|
|
153
|
-
"& tbody > .MuiTableRow-root": eo(t)
|
|
154
|
-
},
|
|
155
|
-
...r && {
|
|
156
|
-
"& tbody > tr:first-of-type > th:first-of-type": {
|
|
157
|
-
borderTopLeftRadius: "inherit"
|
|
158
|
-
},
|
|
159
|
-
"& tbody > tr:first-of-type > td:last-of-type": {
|
|
160
|
-
borderTopRightRadius: "inherit"
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
), A = F(P)`
|
|
166
|
-
/* &:last-child th,
|
|
167
|
-
&:last-child td {
|
|
168
|
-
border-bottom: 0;
|
|
169
|
-
} */
|
|
170
|
-
`;
|
|
171
|
-
function ko({
|
|
21
|
+
function no({
|
|
172
22
|
canTotalCountRow: e = !1,
|
|
173
23
|
headers: o,
|
|
174
|
-
rows:
|
|
175
|
-
totalCount:
|
|
176
|
-
...
|
|
24
|
+
rows: c,
|
|
25
|
+
totalCount: d,
|
|
26
|
+
...t
|
|
177
27
|
}) {
|
|
178
|
-
var
|
|
179
|
-
const
|
|
28
|
+
var w, C, T, h, g, x, S, $;
|
|
29
|
+
const l = A(), s = ((T = (C = (w = l == null ? void 0 : l.theme) == null ? void 0 : w.main) == null ? void 0 : C.palette) == null ? void 0 : T.mode) === "dark" ? H.dark : H.light, p = b(
|
|
180
30
|
() => {
|
|
181
|
-
var
|
|
182
|
-
return
|
|
183
|
-
...
|
|
184
|
-
borderColor:
|
|
31
|
+
var r, a;
|
|
32
|
+
return t.tableTheme ?? k((a = (r = l == null ? void 0 : l.theme) == null ? void 0 : r.main) == null ? void 0 : a.table, {
|
|
33
|
+
...I,
|
|
34
|
+
borderColor: s
|
|
185
35
|
});
|
|
186
36
|
},
|
|
187
|
-
[
|
|
188
|
-
),
|
|
189
|
-
() =>
|
|
37
|
+
[l, s, t.tableTheme]
|
|
38
|
+
), K = b(
|
|
39
|
+
() => v(o) ? o : V(o) ? [] : [o],
|
|
190
40
|
[o]
|
|
191
|
-
),
|
|
192
|
-
() =>
|
|
41
|
+
), L = b(
|
|
42
|
+
() => R(v(o) ? o[0] : o),
|
|
193
43
|
[o]
|
|
194
|
-
),
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
|
|
44
|
+
), u = (S = (x = (g = (h = l == null ? void 0 : l.theme) == null ? void 0 : h.main) == null ? void 0 : g.table) == null ? void 0 : x.row) == null ? void 0 : S.backgroundColor;
|
|
45
|
+
return /* @__PURE__ */ U(
|
|
46
|
+
J,
|
|
197
47
|
{
|
|
198
|
-
...
|
|
48
|
+
...t,
|
|
199
49
|
containerProps: {
|
|
200
|
-
...
|
|
201
|
-
sx:
|
|
202
|
-
!
|
|
203
|
-
(
|
|
50
|
+
...t.containerProps,
|
|
51
|
+
sx: O(
|
|
52
|
+
!t.canUseTreeGridStyle && u && { backgroundColor: u },
|
|
53
|
+
($ = t.containerProps) == null ? void 0 : $.sx
|
|
204
54
|
)
|
|
205
55
|
},
|
|
206
|
-
footerSlot: e ? /* @__PURE__ */
|
|
207
|
-
|
|
56
|
+
footerSlot: e ? /* @__PURE__ */ n(
|
|
57
|
+
Q,
|
|
208
58
|
{
|
|
209
|
-
borderColor:
|
|
210
|
-
totalCount: typeof
|
|
59
|
+
borderColor: p.borderColor,
|
|
60
|
+
totalCount: typeof d > "u" ? c.length : d
|
|
211
61
|
}
|
|
212
62
|
) : void 0,
|
|
213
|
-
className:
|
|
214
|
-
tableTheme:
|
|
63
|
+
className: E(t.tableLayout && "w-full", t.className),
|
|
64
|
+
tableTheme: p,
|
|
215
65
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
|
|
66
|
+
/* @__PURE__ */ n(z, { children: K.map((r, a) => /* @__PURE__ */ n(y, { children: R(r).map((m) => /* @__PURE__ */ n(
|
|
67
|
+
B,
|
|
218
68
|
{
|
|
219
69
|
className: "whitespace-pre-wrap",
|
|
220
|
-
sx:
|
|
221
|
-
!
|
|
222
|
-
|
|
70
|
+
sx: O(
|
|
71
|
+
!t.canUseTreeGridStyle && F(p),
|
|
72
|
+
j(r, m)
|
|
223
73
|
),
|
|
224
|
-
colSpan:
|
|
225
|
-
rowSpan:
|
|
74
|
+
colSpan: G(r, m, "ColSpan"),
|
|
75
|
+
rowSpan: G(r, m, "RowSpan"),
|
|
226
76
|
align: "center",
|
|
227
|
-
children:
|
|
77
|
+
children: r[m]
|
|
228
78
|
},
|
|
229
|
-
`table-header-${
|
|
230
|
-
)) }, `table-header-${
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
const
|
|
233
|
-
return /* @__PURE__ */
|
|
234
|
-
|
|
79
|
+
`table-header-${a}-${m}`
|
|
80
|
+
)) }, `table-header-${a}`)) }),
|
|
81
|
+
/* @__PURE__ */ n(q, { children: c.map((r, a) => {
|
|
82
|
+
const m = r;
|
|
83
|
+
return /* @__PURE__ */ n(y, { children: L.map((f) => /* @__PURE__ */ n(
|
|
84
|
+
B,
|
|
235
85
|
{
|
|
236
86
|
className: "whitespace-pre-wrap h-64",
|
|
237
|
-
sx:
|
|
87
|
+
sx: j(m, f),
|
|
238
88
|
align: "center",
|
|
239
|
-
children:
|
|
89
|
+
children: m[f]
|
|
240
90
|
},
|
|
241
|
-
`table-row-cell-${
|
|
242
|
-
)) }, `table-row-${
|
|
91
|
+
`table-row-cell-${a}-${f}`
|
|
92
|
+
)) }, `table-row-${a}`);
|
|
243
93
|
}) })
|
|
244
94
|
]
|
|
245
95
|
}
|
|
246
96
|
);
|
|
247
97
|
}
|
|
248
|
-
|
|
98
|
+
i(no, "OwpTable");
|
|
249
99
|
export {
|
|
250
|
-
|
|
251
|
-
po as OwpTableTotalCount,
|
|
252
|
-
ho as StyledTable,
|
|
253
|
-
A as StyledTableRow
|
|
100
|
+
no as OwpTable
|
|
254
101
|
};
|
|
255
102
|
//# sourceMappingURL=OwpTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpTable.js","sources":["../../../src/components/OwpTable/OwpTable.tsx"],"sourcesContent":["import {\n resolveOwpGridTheme,\n type OwpResolvedGridThemeConfigType,\n} from '@/constants/gridTheme';\nimport {\n resolveOwpTableTheme,\n type OwpResolvedTableThemeConfigType,\n} from '@/constants/tableTheme';\nimport { getTreeGridFontFaceStyles } from '@/constants/treeGrid';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport { Divider, styled, Typography, type SxProps, type Theme } from '@mui/material';\nimport clsx from 'clsx';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport Paper from '@mui/material/Paper';\nimport Table, { type TableProps } from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer, { type TableContainerProps } from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport { isArray, isEmpty, isNumber } from 'es-toolkit/compat';\nimport { type ReactNode, useMemo } from 'react';\nimport {\n getTreeGridBodyCellSx,\n getTreeGridBodyRowSx,\n getTreeGridCellBaseSx,\n getTreeGridContainerSx,\n getTreeGridHeaderCellSx,\n TREEGRID_TABLE_BODY_BORDER_COLOR,\n TREEGRID_TABLE_HEADER_BORDER_COLOR,\n} from './internal/treeGridTableStyle';\nimport {\n defaultStyledTableTheme,\n getDefaultTableCellSx,\n getDefaultTableHeaderCellSx,\n} from './internal/defaultTableStyle';\n\ntype OwpTableCellValue = string | number;\ntype OwpTableHeaderRow = Record<string, OwpTableCellValue>;\ntype OwpTableRowData = Record<string, unknown>;\n\nconst getTableColumnKeys = (row?: Record<string, unknown>) => {\n if (!row) {\n return [];\n }\n\n return Object.keys(row).filter((keyName) => !keyName.includes('Span'));\n};\n\nconst getTableCellSx = (row: Record<string, unknown>, keyName: string) => {\n return (row[`${keyName}Sx`] as SxProps<Theme>) ?? {};\n};\n\nconst getTableCellSpan = (\n row: Record<string, unknown>,\n keyName: string,\n spanType: 'ColSpan' | 'RowSpan',\n) => {\n return (row[`${keyName}${spanType}`] as number | undefined) ?? undefined;\n};\n\nconst mergeSx = (...styles: Array<SxProps<Theme> | undefined | false>): SxProps<Theme> =>\n styles.reduce<Array<Exclude<SxProps<Theme>, readonly unknown[]>>>((acc, style) => {\n if (!style) {\n return acc;\n }\n\n return [...acc, ...(isArray(style) ? style : [style])];\n }, []) as SxProps<Theme>;\n\nconst treeGridContainerSx = {\n border: 0,\n borderRadius: 0,\n overflow: 'visible',\n} as const;\nconst defaultTableBorderColorByMode = {\n dark: 'rgba(241,245,249,.12)',\n light: '#e2e8f0',\n} as const;\n\ninterface StyledTableProps extends TableProps {\n canBodyFullHeight?: boolean;\n canUseTreeGridStyle?: boolean;\n containerProps?: TableContainerProps;\n footerSlot?: ReactNode;\n tableTheme?: OwpResolvedTableThemeConfigType;\n tableLayout?: 'auto' | 'fixed';\n treeGridTheme?: OwpResolvedGridThemeConfigType;\n title?: string;\n children: ReactNode;\n}\n\ntype StyledTableInnerProps = Pick<\n StyledTableProps,\n 'canBodyFullHeight' | 'canUseTreeGridStyle' | 'tableTheme' | 'treeGridTheme'\n>;\n\n/**\n * 총 row 수 표시 영역\n * @param borderColor 경계선 색상\n * @param totalCount 전체 row 수\n */\nexport function OwpTableTotalCount({\n borderColor,\n totalCount,\n}: {\n borderColor?: string;\n totalCount?: number;\n}) {\n return (\n <>\n <Divider sx={borderColor ? { borderColor } : undefined} />\n <Typography className=\"w-full py-8 pr-12\" align=\"right\">\n 전체: {isNumber(totalCount) ? totalCount.toLocaleString() : 0} 건\n </Typography>\n </>\n );\n}\n\n/**\n * StyledTable 스타일 컴포넌트\n * @param canBodyFullHeight body full height 사용 여부\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n * @param children 하위 콘텐츠\n * @param containerProps containerProps props\n * @param footerSlot footer 영역\n * @param tableLayout tableLayout 값\n */\nexport const StyledTable = ({\n canBodyFullHeight,\n canUseTreeGridStyle,\n children,\n className,\n containerProps,\n footerSlot,\n tableTheme: tableThemeProp,\n tableLayout,\n ...tableProps\n}: StyledTableProps) => {\n const currentSettings = useGetCurrentSettings();\n const defaultTableBorderColor =\n currentSettings?.theme?.main?.palette?.mode === 'dark'\n ? defaultTableBorderColorByMode.dark\n : defaultTableBorderColorByMode.light;\n const treeGridTheme = useMemo(\n () => resolveOwpGridTheme(currentSettings?.theme?.main?.grid),\n [currentSettings],\n );\n const tableTheme = useMemo(\n () =>\n tableThemeProp ??\n resolveOwpTableTheme(currentSettings?.theme?.main?.table, {\n ...defaultStyledTableTheme,\n borderColor: defaultTableBorderColor,\n }),\n [currentSettings, defaultTableBorderColor, tableThemeProp],\n );\n\n return (\n <>\n {canUseTreeGridStyle && <GlobalStyles styles={getTreeGridFontFaceStyles()} />}\n <TableContainer\n component={Paper}\n variant=\"outlined\"\n {...containerProps}\n sx={mergeSx(\n !canUseTreeGridStyle && { borderColor: tableTheme.borderColor },\n canUseTreeGridStyle && treeGridContainerSx,\n canUseTreeGridStyle && getTreeGridContainerSx(treeGridTheme),\n canBodyFullHeight && { height: '100%' },\n containerProps?.sx,\n )}\n >\n <StyledTableInner\n {...tableProps}\n canBodyFullHeight={canBodyFullHeight}\n canUseTreeGridStyle={canUseTreeGridStyle}\n tableTheme={tableTheme}\n treeGridTheme={treeGridTheme}\n className={clsx(\n canBodyFullHeight && 'h-full',\n tableLayout === 'fixed' ? 'table-fixed' : tableLayout === 'auto' ? 'table-auto' : '',\n className,\n )}\n >\n {children}\n </StyledTableInner>\n {footerSlot}\n </TableContainer>\n </>\n );\n};\n\nconst StyledTableInner = styled(Table, {\n shouldForwardProp: (prop) =>\n prop !== 'canBodyFullHeight' &&\n prop !== 'canUseTreeGridStyle' &&\n prop !== 'tableTheme' &&\n prop !== 'treeGridTheme',\n})<StyledTableInnerProps>(\n ({ theme, canBodyFullHeight, canUseTreeGridStyle, tableTheme, treeGridTheme }) => {\n const resolvedTreeGridTheme = treeGridTheme ?? resolveOwpGridTheme();\n const resolvedTableTheme = tableTheme ?? defaultStyledTableTheme;\n\n return {\n ...(canBodyFullHeight && {\n height: '100%',\n }),\n ...(canBodyFullHeight && {\n '& .MuiTableBody-root': {\n height: '100%',\n },\n '& .MuiTableBody-root > .MuiTableRow-root': {\n height: '100%',\n },\n }),\n '& .MuiTableCell-root': canUseTreeGridStyle\n ? {\n ...getTreeGridCellBaseSx(resolvedTreeGridTheme),\n }\n : undefined,\n ...(!canUseTreeGridStyle && {\n '& .MuiTableRow-root > .MuiTableCell-root + .MuiTableCell-root': {\n borderLeft: `1px solid ${resolvedTableTheme.borderColor}`,\n },\n }),\n '& th': canUseTreeGridStyle\n ? {\n ...getTreeGridHeaderCellSx(resolvedTreeGridTheme),\n '&:first-of-type': {\n borderLeft: `1px solid ${TREEGRID_TABLE_HEADER_BORDER_COLOR}`,\n },\n }\n : {\n ...getDefaultTableHeaderCellSx(resolvedTableTheme, theme.palette.grey[200]),\n },\n '& td': canUseTreeGridStyle\n ? {\n ...getTreeGridBodyCellSx(resolvedTreeGridTheme),\n '&:first-of-type': {\n borderLeft: `1px solid ${TREEGRID_TABLE_BODY_BORDER_COLOR}`,\n },\n }\n : {\n ...getDefaultTableCellSx(resolvedTableTheme),\n },\n ...(canUseTreeGridStyle && {\n '& tbody > .MuiTableRow-root': getTreeGridBodyRowSx(resolvedTreeGridTheme),\n }),\n ...(canUseTreeGridStyle && {\n '& tbody > tr:first-of-type > th:first-of-type': {\n borderTopLeftRadius: 'inherit',\n },\n '& tbody > tr:first-of-type > td:last-of-type': {\n borderTopRightRadius: 'inherit',\n },\n }),\n };\n },\n);\n\nexport const StyledTableRow = styled(TableRow)`\n /* &:last-child th,\n &:last-child td {\n border-bottom: 0;\n } */\n`;\n\ninterface OwpTableProps<T> extends Omit<StyledTableProps, 'children'> {\n canTotalCountRow?: boolean;\n headers: OwpTableHeaderRow | OwpTableHeaderRow[];\n rows: T[];\n totalCount?: number;\n}\n\n/**\n * OwpTable 컴포넌트\n * @param canTotalCountRow 전체 row 수 표시 여부\n * @param headers headers 값\n * @param rows 행 데이터 목록\n * @param totalCount 전체 row 수\n */\nexport function OwpTable<T>({\n canTotalCountRow = false,\n headers,\n rows,\n totalCount,\n ...restTableProps\n}: OwpTableProps<T>) {\n const currentSettings = useGetCurrentSettings();\n const defaultTableBorderColor =\n currentSettings?.theme?.main?.palette?.mode === 'dark'\n ? defaultTableBorderColorByMode.dark\n : defaultTableBorderColorByMode.light;\n const tableTheme = useMemo(\n () =>\n restTableProps.tableTheme ??\n resolveOwpTableTheme(currentSettings?.theme?.main?.table, {\n ...defaultStyledTableTheme,\n borderColor: defaultTableBorderColor,\n }),\n [currentSettings, defaultTableBorderColor, restTableProps.tableTheme],\n );\n const resolvedHeaderRows = useMemo(\n () => (isArray(headers) ? headers : isEmpty(headers) ? [] : [headers]),\n [headers],\n );\n const commonKeyListData = useMemo(\n () => getTableColumnKeys(isArray(headers) ? headers[0] : headers),\n [headers],\n );\n const tableBackgroundColor = currentSettings?.theme?.main?.table?.row?.backgroundColor;\n\n return (\n <StyledTable\n {...restTableProps}\n containerProps={{\n ...restTableProps.containerProps,\n sx: mergeSx(\n !restTableProps.canUseTreeGridStyle &&\n tableBackgroundColor && { backgroundColor: tableBackgroundColor },\n restTableProps.containerProps?.sx,\n ),\n }}\n footerSlot={\n canTotalCountRow ? (\n <OwpTableTotalCount\n borderColor={tableTheme.borderColor}\n totalCount={typeof totalCount === 'undefined' ? rows.length : totalCount}\n />\n ) : undefined\n }\n className={clsx(restTableProps.tableLayout && 'w-full', restTableProps.className)}\n tableTheme={tableTheme}\n >\n <TableHead>\n {resolvedHeaderRows.map((headerData, index) => (\n <StyledTableRow key={`table-header-${index}`}>\n {getTableColumnKeys(headerData).map((keyName) => (\n <TableCell\n key={`table-header-${index}-${keyName}`}\n className=\"whitespace-pre-wrap\"\n sx={mergeSx(\n !restTableProps.canUseTreeGridStyle && getDefaultTableHeaderCellSx(tableTheme),\n getTableCellSx(headerData, keyName),\n )}\n colSpan={getTableCellSpan(headerData, keyName, 'ColSpan')}\n rowSpan={getTableCellSpan(headerData, keyName, 'RowSpan')}\n align=\"center\"\n >\n {headerData[keyName]}\n </TableCell>\n ))}\n </StyledTableRow>\n ))}\n </TableHead>\n <TableBody>\n {rows.map((row, index) => {\n const currentRow = row as OwpTableRowData;\n\n return (\n <StyledTableRow key={`table-row-${index}`}>\n {commonKeyListData.map((keyName) => (\n <TableCell\n key={`table-row-cell-${index}-${keyName}`}\n className=\"whitespace-pre-wrap h-64\"\n sx={getTableCellSx(currentRow, keyName)}\n align=\"center\"\n >\n {currentRow[keyName] as ReactNode}\n </TableCell>\n ))}\n </StyledTableRow>\n );\n })}\n </TableBody>\n </StyledTable>\n );\n}\n"],"names":["getTableColumnKeys","__name","row","keyName","getTableCellSx","getTableCellSpan","spanType","mergeSx","styles","acc","style","isArray","treeGridContainerSx","defaultTableBorderColorByMode","OwpTableTotalCount","borderColor","totalCount","jsxs","Fragment","jsx","Divider","Typography","isNumber","StyledTable","canBodyFullHeight","canUseTreeGridStyle","children","className","containerProps","footerSlot","tableThemeProp","tableLayout","tableProps","currentSettings","useGetCurrentSettings","defaultTableBorderColor","_c","_b","_a","treeGridTheme","useMemo","resolveOwpGridTheme","tableTheme","resolveOwpTableTheme","defaultStyledTableTheme","GlobalStyles","getTreeGridFontFaceStyles","TableContainer","Paper","getTreeGridContainerSx","StyledTableInner","clsx","styled","Table","prop","theme","resolvedTreeGridTheme","resolvedTableTheme","getTreeGridCellBaseSx","getTreeGridHeaderCellSx","TREEGRID_TABLE_HEADER_BORDER_COLOR","getDefaultTableHeaderCellSx","getTreeGridBodyCellSx","TREEGRID_TABLE_BODY_BORDER_COLOR","getDefaultTableCellSx","getTreeGridBodyRowSx","StyledTableRow","TableRow","OwpTable","canTotalCountRow","headers","rows","restTableProps","resolvedHeaderRows","isEmpty","commonKeyListData","tableBackgroundColor","_g","_f","_e","_d","_h","TableHead","headerData","index","TableCell","TableBody","currentRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAMA,IAAqB,gBAAAC,EAAA,CAACC,MACrBA,IAIE,OAAO,KAAKA,CAAG,EAAE,OAAO,CAACC,MAAY,CAACA,EAAQ,SAAS,MAAM,CAAC,IAH5D,CAAA,GAFgB,uBAQrBC,IAAiB,gBAAAH,EAAA,CAACC,GAA8BC,MAC5CD,EAAI,GAAGC,CAAO,IAAI,KAAwB,CAAA,GAD7B,mBAIjBE,IAAmB,gBAAAJ,EAAA,CACvBC,GACAC,GACAG,MAEQJ,EAAI,GAAGC,CAAO,GAAGG,CAAQ,EAAE,KAA4B,QALxC,qBAQnBC,IAAU,gBAAAN,EAAA,IAAIO,MAClBA,EAAO,OAA2D,CAACC,GAAKC,MACjE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B,gBAAAgB;AAAA,YAACkE;AAAA,YAAA;AAAA,cAEC,WAAU;AAAA,cACV,IAAIjF,EAAemF,GAAYpF,CAAO;AAAA,cACtC,OAAM;AAAA,cAEL,YAAWA,CAAO;AAAA,YAAA;AAAA,YALd,kBAAkBiF,CAAK,IAAIjF,CAAO;AAAA,UAAA,CAO1C,KAVkB,aAAaiF,CAAK,EAWvC;AAAA,QAEJ,CAAC,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAhGgBnF,EAAAmE,IAAA;"}
|
|
1
|
+
{"version":3,"file":"OwpTable.js","sources":["../../../src/components/OwpTable/OwpTable.tsx"],"sourcesContent":["import { resolveOwpTableTheme } from '@/constants/tableTheme';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport type { SxProps, Theme } from '@mui/material';\nimport clsx from 'clsx';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport { isArray, isEmpty } from 'es-toolkit/compat';\nimport { type ReactNode, useMemo } from 'react';\nimport {\n defaultStyledTableTheme,\n getDefaultTableHeaderCellSx,\n} from './internal/defaultTableStyle';\nimport {\n OwpTableBase,\n type OwpTableBaseProps,\n OwpTableBaseRow,\n} from './internal/OwpTableBase';\nimport { OwpTableTotalCount } from './internal/OwpTableTotalCount';\nimport { mergeSx } from './utils/tableSx';\n\ntype OwpTableCellValue = string | number;\ntype OwpTableHeaderRow = Record<string, OwpTableCellValue>;\ntype OwpTableRowData = Record<string, unknown>;\n\nconst getTableColumnKeys = (row?: Record<string, unknown>) => {\n if (!row) {\n return [];\n }\n\n return Object.keys(row).filter((keyName) => !keyName.includes('Span'));\n};\n\nconst getTableCellSx = (row: Record<string, unknown>, keyName: string) => {\n return (row[`${keyName}Sx`] as SxProps<Theme>) ?? {};\n};\n\nconst getTableCellSpan = (\n row: Record<string, unknown>,\n keyName: string,\n spanType: 'ColSpan' | 'RowSpan',\n) => {\n return (row[`${keyName}${spanType}`] as number | undefined) ?? undefined;\n};\n\nconst defaultTableBorderColorByMode = {\n dark: 'rgba(241,245,249,.12)',\n light: '#e2e8f0',\n} as const;\n\ninterface OwpTableProps<T> extends Omit<OwpTableBaseProps, 'children'> {\n canTotalCountRow?: boolean;\n headers: OwpTableHeaderRow | OwpTableHeaderRow[];\n rows: T[];\n totalCount?: number;\n}\n\n/**\n * OwpTable 컴포넌트\n * @param canTotalCountRow 전체 row 수 표시 여부\n * @param canTableRadiusZero 테이블 radius 0 사용 여부\n * @param canUseTableRadius 테이블 radius 사용 여부\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n * @param headers headers 값\n * @param rows 행 데이터 목록\n * @param tableBorderRadius 테이블 radius 값\n * @param totalCount 전체 row 수\n */\nexport function OwpTable<T>({\n canTotalCountRow = false,\n headers,\n rows,\n totalCount,\n ...restTableProps\n}: OwpTableProps<T>) {\n const currentSettings = useGetCurrentSettings();\n const defaultTableBorderColor =\n currentSettings?.theme?.main?.palette?.mode === 'dark'\n ? defaultTableBorderColorByMode.dark\n : defaultTableBorderColorByMode.light;\n const tableTheme = useMemo(\n () =>\n restTableProps.tableTheme ??\n resolveOwpTableTheme(currentSettings?.theme?.main?.table, {\n ...defaultStyledTableTheme,\n borderColor: defaultTableBorderColor,\n }),\n [currentSettings, defaultTableBorderColor, restTableProps.tableTheme],\n );\n const resolvedHeaderRows = useMemo(\n () => (isArray(headers) ? headers : isEmpty(headers) ? [] : [headers]),\n [headers],\n );\n const commonKeyListData = useMemo(\n () => getTableColumnKeys(isArray(headers) ? headers[0] : headers),\n [headers],\n );\n const tableBackgroundColor = currentSettings?.theme?.main?.table?.row?.backgroundColor;\n\n return (\n <OwpTableBase\n {...restTableProps}\n containerProps={{\n ...restTableProps.containerProps,\n sx: mergeSx(\n !restTableProps.canUseTreeGridStyle &&\n tableBackgroundColor && { backgroundColor: tableBackgroundColor },\n restTableProps.containerProps?.sx,\n ),\n }}\n footerSlot={\n canTotalCountRow ? (\n <OwpTableTotalCount\n borderColor={tableTheme.borderColor}\n totalCount={typeof totalCount === 'undefined' ? rows.length : totalCount}\n />\n ) : undefined\n }\n className={clsx(restTableProps.tableLayout && 'w-full', restTableProps.className)}\n tableTheme={tableTheme}\n >\n <TableHead>\n {resolvedHeaderRows.map((headerData, index) => (\n <OwpTableBaseRow key={`table-header-${index}`}>\n {getTableColumnKeys(headerData).map((keyName) => (\n <TableCell\n key={`table-header-${index}-${keyName}`}\n className=\"whitespace-pre-wrap\"\n sx={mergeSx(\n !restTableProps.canUseTreeGridStyle && getDefaultTableHeaderCellSx(tableTheme),\n getTableCellSx(headerData, keyName),\n )}\n colSpan={getTableCellSpan(headerData, keyName, 'ColSpan')}\n rowSpan={getTableCellSpan(headerData, keyName, 'RowSpan')}\n align=\"center\"\n >\n {headerData[keyName]}\n </TableCell>\n ))}\n </OwpTableBaseRow>\n ))}\n </TableHead>\n <TableBody>\n {rows.map((row, index) => {\n const currentRow = row as OwpTableRowData;\n\n return (\n <OwpTableBaseRow key={`table-row-${index}`}>\n {commonKeyListData.map((keyName) => (\n <TableCell\n key={`table-row-cell-${index}-${keyName}`}\n className=\"whitespace-pre-wrap h-64\"\n sx={getTableCellSx(currentRow, keyName)}\n align=\"center\"\n >\n {currentRow[keyName] as ReactNode}\n </TableCell>\n ))}\n </OwpTableBaseRow>\n );\n })}\n </TableBody>\n </OwpTableBase>\n );\n}\n"],"names":["getTableColumnKeys","__name","row","keyName","getTableCellSx","getTableCellSpan","spanType","defaultTableBorderColorByMode","OwpTable","canTotalCountRow","headers","rows","totalCount","restTableProps","currentSettings","useGetCurrentSettings","defaultTableBorderColor","_c","_b","_a","tableTheme","useMemo","resolveOwpTableTheme","defaultStyledTableTheme","resolvedHeaderRows","isArray","isEmpty","commonKeyListData","tableBackgroundColor","_g","_f","_e","_d","jsxs","OwpTableBase","mergeSx","_h","jsx","OwpTableTotalCount","clsx","TableHead","headerData","index","OwpTableBaseRow","TableCell","getDefaultTableHeader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A,YAEL,YAAWA,CAAO;AAAA,UAAA;AAAA,UAVd,gBAAgBuC,CAAK,IAAIvC,CAAO;AAAA,QAAA,CAYxC,EAAA,GAfmB,gBAAgBuC,CAAK,EAgB3C,CACD,EAAA,CACH;AAAA,0BACCI,GAAA,EACE,UAAAnC,EAAK,IAAI,CAACT,GAAKwC,MAAU;AACxB,gBAAMK,IAAa7C;AAEnB,iBACE,gBAAAmC,EAACM,GAAA,EACE,UAAAhB,EAAkB,IAAI,CAACxB,MACtB,gBAAAkC;AAAA,YAACO;AAAA,YAAA;AAAA,cAEC,WAAU;AAAA,cACV,IAAIxC,EAAe2C,GAAY5C,CAAO;AAAA,cACtC,OAAM;AAAA,cAEL,YAAWA,CAAO;AAAA,YAAA;AAAA,YALd,kBAAkBuC,CAAK,IAAIvC,CAAO;AAAA,UAAA,CAO1C,KAVmB,aAAauC,CAAK,EAWxC;AAAA,QAEJ,CAAC,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAhGgBzC,EAAAO,IAAA;"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
var G = Object.defineProperty;
|
|
2
|
+
var m = (o, a) => G(o, "name", { value: a, configurable: !0 });
|
|
3
|
+
import { jsxs as B, jsx as w, Fragment 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 g } from "../../../constants/gridTheme.js";
|
|
5
|
+
import { resolveOwpTableTheme as I } from "../../../constants/tableTheme.js";
|
|
6
|
+
import { getTreeGridFontFaceStyles as $ } from "../../../constants/treeGrid.js";
|
|
7
|
+
import { useGetCurrentSettings as k } from "../../../hooks/useOwpSettings.js";
|
|
8
|
+
import { styled as O } from "@mui/material";
|
|
9
|
+
import { clsx as H } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
10
|
+
import j from "@mui/material/GlobalStyles";
|
|
11
|
+
import N from "@mui/material/Paper";
|
|
12
|
+
import K from "@mui/material/Table";
|
|
13
|
+
import S from "@mui/material/TableContainer";
|
|
14
|
+
import V from "@mui/material/TableRow";
|
|
15
|
+
import { useMemo as y } from "react";
|
|
16
|
+
import { TREEGRID_TABLE_BODY_BORDER_COLOR as n, getTreeGridContainerSx as Y, getTreeGridBodyRowSx as Z, getTreeGridBodyCellSx as q, TREEGRID_TABLE_HEADER_BORDER_COLOR as z, getTreeGridHeaderCellSx as J, getTreeGridCellBaseSx as Q } from "./treeGridTableStyle.js";
|
|
17
|
+
import { defaultStyledTableTheme as _, DEFAULT_TABLE_RADIUS as D, getDefaultTableCellSx as W, getDefaultTableHeaderCellSx as X, DEFAULT_TABLE_HEADER_BACKGROUND_COLOR as c } from "./defaultTableStyle.js";
|
|
18
|
+
import { mergeSx as P, toTableRadiusCssValue as U } from "../utils/tableSx.js";
|
|
19
|
+
const oo = {
|
|
20
|
+
border: 0,
|
|
21
|
+
borderRadius: 0,
|
|
22
|
+
overflow: "visible"
|
|
23
|
+
}, eo = {
|
|
24
|
+
borderRadius: D
|
|
25
|
+
}, ro = {
|
|
26
|
+
borderRadius: 0
|
|
27
|
+
}, E = {
|
|
28
|
+
dark: "rgba(241,245,249,.12)",
|
|
29
|
+
light: "#e2e8f0"
|
|
30
|
+
}, yo = /* @__PURE__ */ m(({
|
|
31
|
+
canBodyFullHeight: o,
|
|
32
|
+
canTableRadiusZero: a = !1,
|
|
33
|
+
canUseTableRadius: r = !1,
|
|
34
|
+
canUseTreeGridStyle: t,
|
|
35
|
+
children: s,
|
|
36
|
+
className: i,
|
|
37
|
+
containerProps: l,
|
|
38
|
+
footerSlot: f,
|
|
39
|
+
tableTheme: T,
|
|
40
|
+
tableLayout: u,
|
|
41
|
+
tableBorderRadius: L = D,
|
|
42
|
+
...v
|
|
43
|
+
}) => {
|
|
44
|
+
var C, M, x;
|
|
45
|
+
const e = k(), R = ((x = (M = (C = e == null ? void 0 : e.theme) == null ? void 0 : C.main) == null ? void 0 : M.palette) == null ? void 0 : x.mode) === "dark" ? E.dark : E.light, p = y(
|
|
46
|
+
() => {
|
|
47
|
+
var d, b;
|
|
48
|
+
return g((b = (d = e == null ? void 0 : e.theme) == null ? void 0 : d.main) == null ? void 0 : b.grid);
|
|
49
|
+
},
|
|
50
|
+
[e]
|
|
51
|
+
), h = y(
|
|
52
|
+
() => {
|
|
53
|
+
var d, b;
|
|
54
|
+
return T ?? I((b = (d = e == null ? void 0 : e.theme) == null ? void 0 : d.main) == null ? void 0 : b.table, {
|
|
55
|
+
..._,
|
|
56
|
+
borderColor: R
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
[e, R, T]
|
|
60
|
+
), A = a ? ro : t && r ? {
|
|
61
|
+
border: `1px solid ${n}`,
|
|
62
|
+
borderRadius: U(L),
|
|
63
|
+
overflow: "hidden"
|
|
64
|
+
} : t ? void 0 : eo;
|
|
65
|
+
return /* @__PURE__ */ B(F, { children: [
|
|
66
|
+
t && /* @__PURE__ */ w(j, { styles: $() }),
|
|
67
|
+
/* @__PURE__ */ B(
|
|
68
|
+
S,
|
|
69
|
+
{
|
|
70
|
+
component: N,
|
|
71
|
+
variant: "outlined",
|
|
72
|
+
...l,
|
|
73
|
+
sx: P(
|
|
74
|
+
!t && { borderColor: h.borderColor },
|
|
75
|
+
t && oo,
|
|
76
|
+
t && Y(p),
|
|
77
|
+
A,
|
|
78
|
+
o && { height: "100%" },
|
|
79
|
+
l == null ? void 0 : l.sx
|
|
80
|
+
),
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ w(
|
|
83
|
+
to,
|
|
84
|
+
{
|
|
85
|
+
...v,
|
|
86
|
+
canBodyFullHeight: o,
|
|
87
|
+
canUseTableRadius: r,
|
|
88
|
+
canUseTreeGridStyle: t,
|
|
89
|
+
tableTheme: h,
|
|
90
|
+
treeGridTheme: p,
|
|
91
|
+
className: H(
|
|
92
|
+
o && "h-full",
|
|
93
|
+
u === "fixed" ? "table-fixed" : u === "auto" ? "table-auto" : "",
|
|
94
|
+
i
|
|
95
|
+
),
|
|
96
|
+
children: s
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
f
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] });
|
|
104
|
+
}, "OwpTableBase"), to = O(K, {
|
|
105
|
+
shouldForwardProp: /* @__PURE__ */ m((o) => o !== "canBodyFullHeight" && o !== "canUseTableRadius" && o !== "canUseTreeGridStyle" && o !== "tableTheme" && o !== "treeGridTheme", "shouldForwardProp")
|
|
106
|
+
})(
|
|
107
|
+
({
|
|
108
|
+
canBodyFullHeight: o,
|
|
109
|
+
canUseTableRadius: a,
|
|
110
|
+
canUseTreeGridStyle: r,
|
|
111
|
+
tableTheme: t,
|
|
112
|
+
treeGridTheme: s
|
|
113
|
+
}) => {
|
|
114
|
+
const i = s ?? g(), l = t ?? _, f = `1px solid ${l.borderColor}`, T = r && a;
|
|
115
|
+
return {
|
|
116
|
+
...o && {
|
|
117
|
+
height: "100%"
|
|
118
|
+
},
|
|
119
|
+
...o && {
|
|
120
|
+
"& .MuiTableBody-root": {
|
|
121
|
+
height: "100%"
|
|
122
|
+
},
|
|
123
|
+
"& .MuiTableBody-root > .MuiTableRow-root": {
|
|
124
|
+
height: "100%"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"& .MuiTableCell-root": r ? {
|
|
128
|
+
...Q(i)
|
|
129
|
+
} : void 0,
|
|
130
|
+
...!r && {
|
|
131
|
+
"& .MuiTableRow-root > .MuiTableCell-root + .MuiTableCell-root": {
|
|
132
|
+
borderLeft: f
|
|
133
|
+
},
|
|
134
|
+
"& .MuiTableRow-root > .MuiTableCell-root:not(:last-of-type)": {
|
|
135
|
+
borderRight: f
|
|
136
|
+
},
|
|
137
|
+
"& tbody > .MuiTableRow-root:last-of-type > .MuiTableCell-root": {
|
|
138
|
+
borderBottom: "none"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"& th": r ? {
|
|
142
|
+
...J(i),
|
|
143
|
+
"&:first-of-type": {
|
|
144
|
+
borderLeft: `1px solid ${z}`
|
|
145
|
+
}
|
|
146
|
+
} : {
|
|
147
|
+
...X(
|
|
148
|
+
l,
|
|
149
|
+
c
|
|
150
|
+
)
|
|
151
|
+
},
|
|
152
|
+
"& td": r ? {
|
|
153
|
+
...q(i),
|
|
154
|
+
"&:first-of-type": {
|
|
155
|
+
borderLeft: `1px solid ${n}`
|
|
156
|
+
}
|
|
157
|
+
} : {
|
|
158
|
+
...W(l)
|
|
159
|
+
},
|
|
160
|
+
...r && {
|
|
161
|
+
"& tbody > .MuiTableRow-root": Z(i)
|
|
162
|
+
},
|
|
163
|
+
...r && {
|
|
164
|
+
"& tbody > tr:first-of-type > th:first-of-type": {
|
|
165
|
+
borderTopLeftRadius: "inherit"
|
|
166
|
+
},
|
|
167
|
+
"& tbody > tr:first-of-type > td:last-of-type": {
|
|
168
|
+
borderTopRightRadius: "inherit"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
...T && {
|
|
172
|
+
"& .MuiTableHead-root:first-of-type > .MuiTableRow-root:first-of-type > .MuiTableCell-root": {
|
|
173
|
+
borderTop: 0
|
|
174
|
+
},
|
|
175
|
+
"& .MuiTableBody-root:first-of-type > .MuiTableRow-root:first-of-type > .MuiTableCell-root": {
|
|
176
|
+
borderTop: 0
|
|
177
|
+
},
|
|
178
|
+
"& .MuiTableRow-root > .MuiTableCell-root:first-of-type": {
|
|
179
|
+
borderLeft: 0
|
|
180
|
+
},
|
|
181
|
+
"& .MuiTableRow-root > .MuiTableCell-root:last-of-type": {
|
|
182
|
+
borderRight: 0
|
|
183
|
+
},
|
|
184
|
+
"& .MuiTableBody-root > .MuiTableRow-root:last-of-type > .MuiTableCell-root": {
|
|
185
|
+
borderBottom: 0
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
), Eo = O(V)({});
|
|
191
|
+
export {
|
|
192
|
+
yo as OwpTableBase,
|
|
193
|
+
Eo as OwpTableBaseRow
|
|
194
|
+
};
|
|
195
|
+
//# sourceMappingURL=OwpTableBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwpTableBase.js","sources":["../../../../src/components/OwpTable/internal/OwpTableBase.tsx"],"sourcesContent":["import {\n resolveOwpGridTheme,\n type OwpResolvedGridThemeConfigType,\n} from '@/constants/gridTheme';\nimport {\n resolveOwpTableTheme,\n type OwpResolvedTableThemeConfigType,\n} from '@/constants/tableTheme';\nimport { getTreeGridFontFaceStyles } from '@/constants/treeGrid';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport { styled } from '@mui/material';\nimport clsx from 'clsx';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport Paper from '@mui/material/Paper';\nimport Table, { type TableProps } from '@mui/material/Table';\nimport TableContainer, { type TableContainerProps } from '@mui/material/TableContainer';\nimport TableRow from '@mui/material/TableRow';\nimport { type ReactNode, useMemo } from 'react';\nimport {\n getTreeGridBodyCellSx,\n getTreeGridBodyRowSx,\n getTreeGridCellBaseSx,\n getTreeGridContainerSx,\n getTreeGridHeaderCellSx,\n TREEGRID_TABLE_BODY_BORDER_COLOR,\n TREEGRID_TABLE_HEADER_BORDER_COLOR,\n} from './treeGridTableStyle';\nimport {\n DEFAULT_TABLE_HEADER_BACKGROUND_COLOR,\n DEFAULT_TABLE_RADIUS,\n defaultStyledTableTheme,\n getDefaultTableCellSx,\n getDefaultTableHeaderCellSx,\n} from './defaultTableStyle';\nimport { mergeSx, toTableRadiusCssValue } from '../utils/tableSx';\n\nconst treeGridContainerSx = {\n border: 0,\n borderRadius: 0,\n overflow: 'visible',\n} as const;\nconst defaultTableRadiusSx = {\n borderRadius: DEFAULT_TABLE_RADIUS,\n} as const;\nconst tableRadiusZeroSx = {\n borderRadius: 0,\n} as const;\nconst defaultTableBorderColorByMode = {\n dark: 'rgba(241,245,249,.12)',\n light: '#e2e8f0',\n} as const;\n\nexport interface OwpTableBaseProps extends TableProps {\n canBodyFullHeight?: boolean;\n canTableRadiusZero?: boolean;\n canUseTableRadius?: boolean;\n canUseTreeGridStyle?: boolean;\n containerProps?: TableContainerProps;\n footerSlot?: ReactNode;\n tableTheme?: OwpResolvedTableThemeConfigType;\n tableLayout?: 'auto' | 'fixed';\n tableBorderRadius?: string | number;\n treeGridTheme?: OwpResolvedGridThemeConfigType;\n title?: string;\n children: ReactNode;\n}\n\ntype OwpTableBaseInnerProps = Pick<\n OwpTableBaseProps,\n | 'canBodyFullHeight'\n | 'canUseTableRadius'\n | 'canUseTreeGridStyle'\n | 'tableTheme'\n | 'treeGridTheme'\n>;\n\n/**\n * OWP Table 기반 컨테이너\n * @param canBodyFullHeight body full height 사용 여부\n * @param canTableRadiusZero 테이블 radius 0 사용 여부\n * @param canUseTableRadius 테이블 radius 사용 여부\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n * @param children 하위 콘텐츠\n * @param containerProps containerProps props\n * @param footerSlot footer 영역\n * @param tableLayout tableLayout 값\n * @param tableBorderRadius 테이블 radius 값\n */\nexport const OwpTableBase = ({\n canBodyFullHeight,\n canTableRadiusZero = false,\n canUseTableRadius = false,\n canUseTreeGridStyle,\n children,\n className,\n containerProps,\n footerSlot,\n tableTheme: tableThemeProp,\n tableLayout,\n tableBorderRadius = DEFAULT_TABLE_RADIUS,\n ...tableProps\n}: OwpTableBaseProps) => {\n const currentSettings = useGetCurrentSettings();\n const defaultTableBorderColor =\n currentSettings?.theme?.main?.palette?.mode === 'dark'\n ? defaultTableBorderColorByMode.dark\n : defaultTableBorderColorByMode.light;\n const treeGridTheme = useMemo(\n () => resolveOwpGridTheme(currentSettings?.theme?.main?.grid),\n [currentSettings],\n );\n const tableTheme = useMemo(\n () =>\n tableThemeProp ??\n resolveOwpTableTheme(currentSettings?.theme?.main?.table, {\n ...defaultStyledTableTheme,\n borderColor: defaultTableBorderColor,\n }),\n [currentSettings, defaultTableBorderColor, tableThemeProp],\n );\n const tableContainerRadiusSx = canTableRadiusZero\n ? tableRadiusZeroSx\n : canUseTreeGridStyle && canUseTableRadius\n ? {\n border: `1px solid ${TREEGRID_TABLE_BODY_BORDER_COLOR}`,\n borderRadius: toTableRadiusCssValue(tableBorderRadius),\n overflow: 'hidden',\n }\n : !canUseTreeGridStyle\n ? defaultTableRadiusSx\n : undefined;\n\n return (\n <>\n {canUseTreeGridStyle && <GlobalStyles styles={getTreeGridFontFaceStyles()} />}\n <TableContainer\n component={Paper}\n variant=\"outlined\"\n {...containerProps}\n sx={mergeSx(\n !canUseTreeGridStyle && { borderColor: tableTheme.borderColor },\n canUseTreeGridStyle && treeGridContainerSx,\n canUseTreeGridStyle && getTreeGridContainerSx(treeGridTheme),\n tableContainerRadiusSx,\n canBodyFullHeight && { height: '100%' },\n containerProps?.sx,\n )}\n >\n <OwpTableBaseInner\n {...tableProps}\n canBodyFullHeight={canBodyFullHeight}\n canUseTableRadius={canUseTableRadius}\n canUseTreeGridStyle={canUseTreeGridStyle}\n tableTheme={tableTheme}\n treeGridTheme={treeGridTheme}\n className={clsx(\n canBodyFullHeight && 'h-full',\n tableLayout === 'fixed' ? 'table-fixed' : tableLayout === 'auto' ? 'table-auto' : '',\n className,\n )}\n >\n {children}\n </OwpTableBaseInner>\n {footerSlot}\n </TableContainer>\n </>\n );\n};\n\n/** OWP Table 기반 table element */\nconst OwpTableBaseInner = styled(Table, {\n shouldForwardProp: (prop) =>\n prop !== 'canBodyFullHeight' &&\n prop !== 'canUseTableRadius' &&\n prop !== 'canUseTreeGridStyle' &&\n prop !== 'tableTheme' &&\n prop !== 'treeGridTheme',\n})<OwpTableBaseInnerProps>(\n ({\n canBodyFullHeight,\n canUseTableRadius,\n canUseTreeGridStyle,\n tableTheme,\n treeGridTheme,\n }) => {\n const resolvedTreeGridTheme = treeGridTheme ?? resolveOwpGridTheme();\n const resolvedTableTheme = tableTheme ?? defaultStyledTableTheme;\n const defaultTableBorder = `1px solid ${resolvedTableTheme.borderColor}`;\n const shouldUseTreeGridRadius = canUseTreeGridStyle && canUseTableRadius;\n\n return {\n ...(canBodyFullHeight && {\n height: '100%',\n }),\n ...(canBodyFullHeight && {\n '& .MuiTableBody-root': {\n height: '100%',\n },\n '& .MuiTableBody-root > .MuiTableRow-root': {\n height: '100%',\n },\n }),\n '& .MuiTableCell-root': canUseTreeGridStyle\n ? {\n ...getTreeGridCellBaseSx(resolvedTreeGridTheme),\n }\n : undefined,\n ...(!canUseTreeGridStyle && {\n '& .MuiTableRow-root > .MuiTableCell-root + .MuiTableCell-root': {\n borderLeft: defaultTableBorder,\n },\n '& .MuiTableRow-root > .MuiTableCell-root:not(:last-of-type)': {\n borderRight: defaultTableBorder,\n },\n '& tbody > .MuiTableRow-root:last-of-type > .MuiTableCell-root': {\n borderBottom: 'none',\n },\n }),\n '& th': canUseTreeGridStyle\n ? {\n ...getTreeGridHeaderCellSx(resolvedTreeGridTheme),\n '&:first-of-type': {\n borderLeft: `1px solid ${TREEGRID_TABLE_HEADER_BORDER_COLOR}`,\n },\n }\n : {\n ...getDefaultTableHeaderCellSx(\n resolvedTableTheme,\n DEFAULT_TABLE_HEADER_BACKGROUND_COLOR,\n ),\n },\n '& td': canUseTreeGridStyle\n ? {\n ...getTreeGridBodyCellSx(resolvedTreeGridTheme),\n '&:first-of-type': {\n borderLeft: `1px solid ${TREEGRID_TABLE_BODY_BORDER_COLOR}`,\n },\n }\n : {\n ...getDefaultTableCellSx(resolvedTableTheme),\n },\n ...(canUseTreeGridStyle && {\n '& tbody > .MuiTableRow-root': getTreeGridBodyRowSx(resolvedTreeGridTheme),\n }),\n ...(canUseTreeGridStyle && {\n '& tbody > tr:first-of-type > th:first-of-type': {\n borderTopLeftRadius: 'inherit',\n },\n '& tbody > tr:first-of-type > td:last-of-type': {\n borderTopRightRadius: 'inherit',\n },\n }),\n ...(shouldUseTreeGridRadius && {\n '& .MuiTableHead-root:first-of-type > .MuiTableRow-root:first-of-type > .MuiTableCell-root':\n {\n borderTop: 0,\n },\n '& .MuiTableBody-root:first-of-type > .MuiTableRow-root:first-of-type > .MuiTableCell-root':\n {\n borderTop: 0,\n },\n '& .MuiTableRow-root > .MuiTableCell-root:first-of-type': {\n borderLeft: 0,\n },\n '& .MuiTableRow-root > .MuiTableCell-root:last-of-type': {\n borderRight: 0,\n },\n '& .MuiTableBody-root > .MuiTableRow-root:last-of-type > .MuiTableCell-root': {\n borderBottom: 0,\n },\n }),\n };\n },\n);\n\n/** OWP Table 기반 row */\nexport const OwpTableBaseRow = styled(TableRow)({});\n"],"names":["treeGridContainerSx","defaultTableRadiusSx","DEFAULT_TABLE_RADIUS","tableRadiusZeroSx","defaultTableBorderColorByMode","OwpTableBase","__name","canBodyFullHeight","canTableRadiusZero","canUseTableRadius","canUseTreeGridStyle","children","className","containerProps","footerSlot","tableThemeProp","tableLayout","tableBorderRadius","tableProps","currentSettings","useGetCurrentSettings","defaultTableBorderColor","_c","_b","_a","treeGridTheme","useMemo","resolveOwpGridTheme","tableTheme","resolveOwpTableTheme","defaultStyledTableTheme","tableContainerRadiusSx","TREEGRID_TABLE_BODY_BORDER_COLOR","toTableRadiusCssValue","jsxs","Fragment","jsx","GlobalStyles","getTreeGridFontFaceStyles","TableContainer","Paper","mergeSx","getTreeGridContainerSx","OwpTableBaseInner","clsx","styled","Table","prop","resolvedTreeGridTheme","resolvedTableTheme","defaultTableBorder","shouldUseTreeGridRadius","getTreeGridCellBaseSx","getTreeGridHeaderCellSx","TREEGRID_TABLE_HEADER_BORDER_COLOR","getDefaultTableHeaderCellSx","DEFAULT_TABLE_HEADER_BACKGROUND_COLOR","getTreeGridBodyCellSx","getDefaultTableCellSx","getTreeGridBodyRowSx","OwpTableBaseRow","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,MAAMA,KAAsB;AAAA,EAC1B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AACZ,GAC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yC,KAA2B;AAAA,QAC7B,6FACE;AAAA,UACE,WAAW;AAAA,QAAA;AAAA,QAEf,6FACE;AAAA,UACE,WAAW;AAAA,QAAA;AAAA,QAEf,0DAA0D;AAAA,UACxD,YAAY;AAAA,QAAA;AAAA,QAEd,yDAAyD;AAAA,UACvD,aAAa;AAAA,QAAA;AAAA,QAEf,8EAA8E;AAAA,UAC5E,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,EAEJ;AACF,GAGaS,KAAkBf,EAAOgB,CAAQ,EAAE,CAAA,CAAE;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var e = (r, i) => o(r, "name", { value: i, configurable: !0 });
|
|
3
|
+
import { jsxs as m, jsx as p, Fragment as t } 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 { Divider as n, Typography as a } from "@mui/material";
|
|
5
|
+
import { isNumber as l } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNumber.js";
|
|
6
|
+
function h({
|
|
7
|
+
borderColor: r,
|
|
8
|
+
totalCount: i
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ m(t, { children: [
|
|
11
|
+
/* @__PURE__ */ p(n, { sx: r ? { borderColor: r } : void 0 }),
|
|
12
|
+
/* @__PURE__ */ m(a, { className: "w-full py-8 pr-12", align: "right", children: [
|
|
13
|
+
"전체: ",
|
|
14
|
+
l(i) ? i.toLocaleString() : 0,
|
|
15
|
+
" 건"
|
|
16
|
+
] })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
e(h, "OwpTableTotalCount");
|
|
20
|
+
export {
|
|
21
|
+
h as OwpTableTotalCount
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=OwpTableTotalCount.js.map
|