@owp/core 2.5.22 → 2.5.24
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/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/index5.js +2 -2
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js +15 -13
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js.map +1 -1
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js +21 -19
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js.map +1 -1
- package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js +1 -1
- package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js.map +1 -1
- package/dist/components/OwpLanguageSwitcherSelect/OwpLanguageSwitcherSelect.js +1 -1
- package/dist/components/OwpLanguageSwitcherSelect/OwpLanguageSwitcherSelect.js.map +1 -1
- package/dist/components/OwpLoading/OwpLoading.js +1 -1
- package/dist/components/OwpLoading/OwpLoading.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +21 -21
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js +14 -12
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js.map +1 -1
- package/dist/components/OwpPageTitle/OwpPageTitle.js +1 -1
- package/dist/components/OwpPageTitle/OwpPageTitle.js.map +1 -1
- package/dist/components/OwpPicker/OwpDatePicker.js +81 -82
- package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpTimePicker.js +82 -83
- package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpWeekDatePicker.js +24 -25
- package/dist/components/OwpPicker/OwpWeekDatePicker.js.map +1 -1
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js +1 -1
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +1 -1
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +155 -157
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js +95 -81
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js.map +1 -1
- package/dist/components/OwpSuspense/OwpSuspense.js +43 -43
- package/dist/components/OwpSuspense/OwpSuspense.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +13 -12
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpFieldTable.js +64 -78
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +56 -55
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/OwpTableBase.js +20 -19
- package/dist/components/OwpTable/internal/OwpTableBase.js.map +1 -1
- package/dist/components/OwpTable/internal/defaultTableStyle.js +6 -7
- package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
- package/dist/components/OwpTable/utils/tableSx.js +16 -6
- package/dist/components/OwpTable/utils/tableSx.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +105 -104
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +55 -56
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +10 -10
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +253 -252
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/constants/table.js +5 -0
- package/dist/constants/table.js.map +1 -0
- package/dist/constants.js +25 -23
- package/dist/constants.js.map +1 -1
- package/dist/contexts/OwpUiProvider.js +5 -5
- package/dist/contexts/OwpUiProvider.js.map +1 -1
- package/dist/hooks/{useAccessTokenGuard.js → internal/useAccessTokenGuard.js} +2 -2
- package/dist/hooks/internal/useAccessTokenGuard.js.map +1 -0
- package/dist/hooks/{useCurrentLanguage.js → internal/useCurrentLanguage.js} +2 -2
- package/dist/hooks/internal/useCurrentLanguage.js.map +1 -0
- package/dist/hooks/internal/useHeaderWrapState.js.map +1 -0
- package/dist/hooks/internal/useNavbar.js +24 -0
- package/dist/hooks/internal/useNavbar.js.map +1 -0
- package/dist/hooks/{useNavigationActiveRouteRemount.js → internal/useNavigationActiveRouteRemount.js} +1 -1
- package/dist/hooks/internal/useNavigationActiveRouteRemount.js.map +1 -0
- package/dist/hooks/{useShortcuts.js → internal/useShortcuts.js} +3 -3
- package/dist/hooks/internal/useShortcuts.js.map +1 -0
- package/dist/hooks/internal/useThemeMediaQuery.js.map +1 -0
- package/dist/hooks/internal/useTimeout.js.map +1 -0
- package/dist/hooks/useInitApp.js.map +1 -1
- package/dist/hooks.js +53 -81
- package/dist/hooks.js.map +1 -1
- package/dist/layout/Layout.js +1 -1
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js +2 -2
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarWrapperLayout.js +2 -2
- package/dist/layout/components/layouts/NavbarWrapperLayout.js.map +1 -1
- package/dist/layout/components/navbar/NavbarToggleButton.js +2 -2
- package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyleContent.js +1 -1
- package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
- package/dist/layout/components/navigation/Navigation.js +2 -2
- package/dist/layout/components/navigation/Navigation.js.map +1 -1
- package/dist/layout/components/navigation/vertical/types/NavVerticalCollapse.js +1 -1
- package/dist/layout/components/navigation/vertical/types/NavVerticalCollapse.js.map +1 -1
- package/dist/layout/components/navigation/vertical/types/NavVerticalGroup.js +1 -1
- package/dist/layout/components/navigation/vertical/types/NavVerticalGroup.js.map +1 -1
- package/dist/layout/components/navigation/vertical/types/NavVerticalItem.js +1 -1
- package/dist/layout/components/navigation/vertical/types/NavVerticalItem.js.map +1 -1
- package/dist/layout/components/toggles/LanguageSwitcherToggle.js +1 -1
- package/dist/layout/components/toggles/LanguageSwitcherToggle.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/layout/components/toggles/NavigationShortcutsToggle.js +1 -1
- package/dist/layout/components/toggles/NavigationShortcutsToggle.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/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/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.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/OwpCommonCode/OwpCommonCodeQuerySelector.d.ts +5 -3
- package/dist/types/components/OwpCommonCode/OwpCommonCodeSelector.d.ts +5 -3
- package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +4 -1
- package/dist/types/components/OwpSelectorBase/types/index.d.ts +1 -1
- package/dist/types/components/OwpSelectorBase/types/types.d.ts +3 -0
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +0 -1
- package/dist/types/components/OwpTable/utils/tableSx.d.ts +15 -0
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/constants/table.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +0 -10
- package/dist/types/hooks/{useNavbar.d.ts → internal/useNavbar.d.ts} +1 -1
- package/dist/types/utils/treeGridUtil.d.ts +0 -14
- package/dist/utils/{exceljsBrowser.js → internal/exceljsBrowser.js} +1 -1
- package/dist/utils/internal/exceljsBrowser.js.map +1 -0
- package/dist/utils/internal/jszipBrowser.js.map +1 -0
- package/dist/utils/internal/treeGridBodyRowsEvent.js.map +1 -0
- package/dist/utils/treeGridExportExcelUtil.js +1 -1
- package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
- package/dist/utils/treeGridUtil.js +1 -6
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/dist/utils/zipUtil.js +1 -1
- package/dist/utils/zipUtil.js.map +1 -1
- package/dist/utils.js +70 -75
- package/package.json +1 -1
- package/dist/hooks/useAccessTokenGuard.js.map +0 -1
- package/dist/hooks/useCurrentLanguage.js.map +0 -1
- package/dist/hooks/useDebounce.js +0 -24
- package/dist/hooks/useDebounce.js.map +0 -1
- package/dist/hooks/useDeepCompareEffect.js +0 -38
- package/dist/hooks/useDeepCompareEffect.js.map +0 -1
- package/dist/hooks/useHeaderWrapState.js.map +0 -1
- package/dist/hooks/useNavbar.js +0 -24
- package/dist/hooks/useNavbar.js.map +0 -1
- package/dist/hooks/useNavigationActiveRouteRemount.js.map +0 -1
- package/dist/hooks/usePrevious.js +0 -14
- package/dist/hooks/usePrevious.js.map +0 -1
- package/dist/hooks/useShortcuts.js.map +0 -1
- package/dist/hooks/useThemeMediaQuery.js.map +0 -1
- package/dist/hooks/useTimeout.js.map +0 -1
- package/dist/types/hooks/useDebounce.d.ts +0 -7
- package/dist/types/hooks/useDeepCompareEffect.d.ts +0 -22
- package/dist/types/hooks/usePrevious.d.ts +0 -5
- package/dist/types/utils/dayjsBrowser.d.ts +0 -1
- package/dist/utils/exceljsBrowser.js.map +0 -1
- package/dist/utils/jszipBrowser.js.map +0 -1
- package/dist/utils/treeGridBodyRowsEvent.js.map +0 -1
- /package/dist/hooks/{useHeaderWrapState.js → internal/useHeaderWrapState.js} +0 -0
- /package/dist/hooks/{useThemeMediaQuery.js → internal/useThemeMediaQuery.js} +0 -0
- /package/dist/hooks/{useTimeout.js → internal/useTimeout.js} +0 -0
- /package/dist/types/hooks/{useAccessTokenGuard.d.ts → internal/useAccessTokenGuard.d.ts} +0 -0
- /package/dist/types/hooks/{useCurrentLanguage.d.ts → internal/useCurrentLanguage.d.ts} +0 -0
- /package/dist/types/hooks/{useHeaderWrapState.d.ts → internal/useHeaderWrapState.d.ts} +0 -0
- /package/dist/types/hooks/{useNavigationActiveRouteRemount.d.ts → internal/useNavigationActiveRouteRemount.d.ts} +0 -0
- /package/dist/types/hooks/{useShortcuts.d.ts → internal/useShortcuts.d.ts} +0 -0
- /package/dist/types/hooks/{useThemeMediaQuery.d.ts → internal/useThemeMediaQuery.d.ts} +0 -0
- /package/dist/types/hooks/{useTimeout.d.ts → internal/useTimeout.d.ts} +0 -0
- /package/dist/types/utils/{exceljsBrowser.d.ts → internal/exceljsBrowser.d.ts} +0 -0
- /package/dist/types/utils/{jszipBrowser.d.ts → internal/jszipBrowser.d.ts} +0 -0
- /package/dist/types/utils/{treeGridBodyRowsEvent.d.ts → internal/treeGridBodyRowsEvent.d.ts} +0 -0
- /package/dist/utils/{jszipBrowser.js → internal/jszipBrowser.js} +0 -0
- /package/dist/utils/{treeGridBodyRowsEvent.js → internal/treeGridBodyRowsEvent.js} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
var G = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var s = (o, a) => G(o, "name", { value: a, configurable: !0 });
|
|
3
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
4
|
import { resolveOwpGridTheme as g } from "../../../constants/gridTheme.js";
|
|
5
5
|
import { resolveOwpTableTheme as I } from "../../../constants/tableTheme.js";
|
|
6
|
+
import { DEFAULT_TABLE_RADIUS as O } from "../../../constants/table.js";
|
|
6
7
|
import { getTreeGridFontFaceStyles as $ } from "../../../constants/treeGrid.js";
|
|
7
8
|
import { useGetCurrentSettings as k } from "../../../hooks/useOwpSettings.js";
|
|
8
|
-
import { styled as
|
|
9
|
+
import { styled as n } from "@mui/material";
|
|
9
10
|
import { clsx as H } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
10
11
|
import j from "@mui/material/GlobalStyles";
|
|
11
12
|
import N from "@mui/material/Paper";
|
|
@@ -13,32 +14,32 @@ import K from "@mui/material/Table";
|
|
|
13
14
|
import S from "@mui/material/TableContainer";
|
|
14
15
|
import V from "@mui/material/TableRow";
|
|
15
16
|
import { useMemo as y } from "react";
|
|
16
|
-
import { TREEGRID_TABLE_BODY_BORDER_COLOR as
|
|
17
|
-
import { defaultStyledTableTheme as
|
|
17
|
+
import { TREEGRID_TABLE_BODY_BORDER_COLOR as _, 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";
|
|
18
|
+
import { defaultStyledTableTheme as D, getDefaultTableCellSx as W, getDefaultTableHeaderCellSx as X, DEFAULT_TABLE_HEADER_BACKGROUND_COLOR as c } from "./defaultTableStyle.js";
|
|
18
19
|
import { mergeSx as P, toTableRadiusCssValue as U } from "../utils/tableSx.js";
|
|
19
20
|
const oo = {
|
|
20
21
|
border: 0,
|
|
21
22
|
borderRadius: 0,
|
|
22
23
|
overflow: "visible"
|
|
23
24
|
}, eo = {
|
|
24
|
-
borderRadius:
|
|
25
|
+
borderRadius: O
|
|
25
26
|
}, ro = {
|
|
26
27
|
borderRadius: 0
|
|
27
28
|
}, E = {
|
|
28
29
|
dark: "rgba(241,245,249,.12)",
|
|
29
30
|
light: "#e2e8f0"
|
|
30
|
-
},
|
|
31
|
+
}, Eo = /* @__PURE__ */ s(({
|
|
31
32
|
canBodyFullHeight: o,
|
|
32
33
|
canTableRadiusZero: a = !1,
|
|
33
34
|
canUseTableRadius: r = !1,
|
|
34
35
|
canUseTreeGridStyle: t,
|
|
35
|
-
children:
|
|
36
|
+
children: m,
|
|
36
37
|
className: i,
|
|
37
38
|
containerProps: l,
|
|
38
39
|
footerSlot: f,
|
|
39
40
|
tableTheme: T,
|
|
40
41
|
tableLayout: u,
|
|
41
|
-
tableBorderRadius: L =
|
|
42
|
+
tableBorderRadius: L = O,
|
|
42
43
|
...v
|
|
43
44
|
}) => {
|
|
44
45
|
var C, M, x;
|
|
@@ -52,13 +53,13 @@ const oo = {
|
|
|
52
53
|
() => {
|
|
53
54
|
var d, b;
|
|
54
55
|
return T ?? I((b = (d = e == null ? void 0 : e.theme) == null ? void 0 : d.main) == null ? void 0 : b.table, {
|
|
55
|
-
...
|
|
56
|
+
...D,
|
|
56
57
|
borderColor: R
|
|
57
58
|
});
|
|
58
59
|
},
|
|
59
60
|
[e, R, T]
|
|
60
61
|
), A = a ? ro : t && r ? {
|
|
61
|
-
border: `1px solid ${
|
|
62
|
+
border: `1px solid ${_}`,
|
|
62
63
|
borderRadius: U(L),
|
|
63
64
|
overflow: "hidden"
|
|
64
65
|
} : t ? void 0 : eo;
|
|
@@ -93,7 +94,7 @@ const oo = {
|
|
|
93
94
|
u === "fixed" ? "table-fixed" : u === "auto" ? "table-auto" : "",
|
|
94
95
|
i
|
|
95
96
|
),
|
|
96
|
-
children:
|
|
97
|
+
children: m
|
|
97
98
|
}
|
|
98
99
|
),
|
|
99
100
|
f
|
|
@@ -101,17 +102,17 @@ const oo = {
|
|
|
101
102
|
}
|
|
102
103
|
)
|
|
103
104
|
] });
|
|
104
|
-
}, "OwpTableBase"), to =
|
|
105
|
-
shouldForwardProp: /* @__PURE__ */
|
|
105
|
+
}, "OwpTableBase"), to = n(K, {
|
|
106
|
+
shouldForwardProp: /* @__PURE__ */ s((o) => o !== "canBodyFullHeight" && o !== "canUseTableRadius" && o !== "canUseTreeGridStyle" && o !== "tableTheme" && o !== "treeGridTheme", "shouldForwardProp")
|
|
106
107
|
})(
|
|
107
108
|
({
|
|
108
109
|
canBodyFullHeight: o,
|
|
109
110
|
canUseTableRadius: a,
|
|
110
111
|
canUseTreeGridStyle: r,
|
|
111
112
|
tableTheme: t,
|
|
112
|
-
treeGridTheme:
|
|
113
|
+
treeGridTheme: m
|
|
113
114
|
}) => {
|
|
114
|
-
const i =
|
|
115
|
+
const i = m ?? g(), l = t ?? D, f = `1px solid ${l.borderColor}`, T = r && a;
|
|
115
116
|
return {
|
|
116
117
|
...o && {
|
|
117
118
|
height: "100%"
|
|
@@ -152,7 +153,7 @@ const oo = {
|
|
|
152
153
|
"& td": r ? {
|
|
153
154
|
...q(i),
|
|
154
155
|
"&:first-of-type": {
|
|
155
|
-
borderLeft: `1px solid ${
|
|
156
|
+
borderLeft: `1px solid ${_}`
|
|
156
157
|
}
|
|
157
158
|
} : {
|
|
158
159
|
...W(l)
|
|
@@ -187,9 +188,9 @@ const oo = {
|
|
|
187
188
|
}
|
|
188
189
|
};
|
|
189
190
|
}
|
|
190
|
-
),
|
|
191
|
+
), go = n(V)({});
|
|
191
192
|
export {
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
Eo as OwpTableBase,
|
|
194
|
+
go as OwpTableBaseRow
|
|
194
195
|
};
|
|
195
196
|
//# sourceMappingURL=OwpTableBase.js.map
|
|
@@ -1 +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,GACMC,KAAuB;AAAA,EAC3B,cAAcC;AAChB,GACMC,KAAoB;AAAA,EACxB,cAAc;AAChB,GACMC,IAAgC;AAAA,EACpC,MAAM;AAAA,EACN,OAAO;AACT,GAsCaC,KAAe,gBAAAC,EAAA,CAAC;AAAA,EAC3B,mBAAAC;AA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D,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;"}
|
|
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 { DEFAULT_TABLE_RADIUS } from '@/constants/table';\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 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;AAC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,GAAIyC,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;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var l = Object.defineProperty;
|
|
2
2
|
var r = (o, e) => l(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
const n = "7px 10px",
|
|
3
|
+
const n = "7px 10px", a = "#f5f5f5", i = {
|
|
4
4
|
borderColor: "#e2e8f0",
|
|
5
5
|
header: {
|
|
6
6
|
backgroundColor: "",
|
|
@@ -17,13 +17,13 @@ const n = "7px 10px", i = "0.5rem", a = "#f5f5f5", d = {
|
|
|
17
17
|
borderBottom: `1px solid ${o.borderColor}`,
|
|
18
18
|
borderLeft: "none",
|
|
19
19
|
borderRight: "none"
|
|
20
|
-
}), "getDefaultTableCellBaseSx"),
|
|
20
|
+
}), "getDefaultTableCellBaseSx"), d = /* @__PURE__ */ r((o) => ({
|
|
21
21
|
...t(o),
|
|
22
22
|
...o.cell.backgroundColor && {
|
|
23
23
|
backgroundColor: o.cell.backgroundColor
|
|
24
24
|
},
|
|
25
25
|
fontSize: o.cell.fontSize
|
|
26
|
-
}), "getDefaultTableCellSx"),
|
|
26
|
+
}), "getDefaultTableCellSx"), f = /* @__PURE__ */ r((o, e = a) => ({
|
|
27
27
|
...t(o),
|
|
28
28
|
backgroundColor: o.header.backgroundColor || e,
|
|
29
29
|
color: o.header.color,
|
|
@@ -49,11 +49,10 @@ const n = "7px 10px", i = "0.5rem", a = "#f5f5f5", d = {
|
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
51
|
a as DEFAULT_TABLE_HEADER_BACKGROUND_COLOR,
|
|
52
|
-
i as
|
|
53
|
-
d as defaultStyledTableTheme,
|
|
52
|
+
i as defaultStyledTableTheme,
|
|
54
53
|
u as defaultTableSortLabelSx,
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
d as getDefaultTableCellSx,
|
|
55
|
+
f as getDefaultTableHeaderCellSx,
|
|
57
56
|
g as getDefaultTableHeaderLabelSx
|
|
58
57
|
};
|
|
59
58
|
//# sourceMappingURL=defaultTableStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultTableStyle.js","sources":["../../../../src/components/OwpTable/internal/defaultTableStyle.ts"],"sourcesContent":["import type { OwpResolvedTableThemeConfigType } from '@/constants/tableTheme';\n\nconst DEFAULT_TABLE_CELL_PADDING = '7px 10px';\n\nexport const
|
|
1
|
+
{"version":3,"file":"defaultTableStyle.js","sources":["../../../../src/components/OwpTable/internal/defaultTableStyle.ts"],"sourcesContent":["import type { OwpResolvedTableThemeConfigType } from '@/constants/tableTheme';\n\nconst DEFAULT_TABLE_CELL_PADDING = '7px 10px';\n\nexport const DEFAULT_TABLE_HEADER_BACKGROUND_COLOR = '#f5f5f5';\n\nexport const defaultStyledTableTheme = {\n borderColor: '#e2e8f0',\n header: {\n backgroundColor: '',\n color: 'inherit',\n fontSize: '1.7rem',\n fontWeight: 600,\n },\n cell: {\n backgroundColor: '',\n fontSize: '1.7rem',\n },\n} satisfies OwpResolvedTableThemeConfigType;\n\n/** 기본 table cell 공통 sx */\nconst getDefaultTableCellBaseSx = (tableTheme: OwpResolvedTableThemeConfigType) =>\n ({\n padding: DEFAULT_TABLE_CELL_PADDING,\n borderBottom: `1px solid ${tableTheme.borderColor}`,\n borderLeft: 'none',\n borderRight: 'none',\n }) as const;\n\n/** 기본 table cell sx */\nexport const getDefaultTableCellSx = (tableTheme: OwpResolvedTableThemeConfigType) =>\n ({\n ...getDefaultTableCellBaseSx(tableTheme),\n ...(tableTheme.cell.backgroundColor && {\n backgroundColor: tableTheme.cell.backgroundColor,\n }),\n fontSize: tableTheme.cell.fontSize,\n }) as const;\n\n/** 기본 table header cell sx */\nexport const getDefaultTableHeaderCellSx = (\n tableTheme: OwpResolvedTableThemeConfigType,\n fallbackBackgroundColor: string = DEFAULT_TABLE_HEADER_BACKGROUND_COLOR,\n) =>\n ({\n ...getDefaultTableCellBaseSx(tableTheme),\n backgroundColor: tableTheme.header.backgroundColor || fallbackBackgroundColor,\n color: tableTheme.header.color,\n fontSize: tableTheme.header.fontSize,\n fontWeight: tableTheme.header.fontWeight,\n }) as const;\n\n/** 기본 table header label sx */\nexport const getDefaultTableHeaderLabelSx = (tableTheme: OwpResolvedTableThemeConfigType) =>\n ({\n color: tableTheme.header.color,\n fontSize: tableTheme.header.fontSize,\n fontWeight: tableTheme.header.fontWeight,\n }) as const;\n\nexport const defaultTableSortLabelSx = {\n '&.MuiTableSortLabel-root': {\n color: 'inherit',\n },\n '&.MuiTableSortLabel-root:hover': {\n color: 'inherit',\n },\n '&.Mui-active': {\n color: 'inherit',\n },\n '& .MuiTableSortLabel-icon': {\n color: 'currentColor !important',\n },\n} as const;\n"],"names":["DEFAULT_TABLE_CELL_PADDING","DEFAULT_TABLE_HEADER_BACKGROUND_COLOR","defaultStyledTableTheme","getDefaultTableCellBaseSx","__name","tableTheme","getDefaultTableCellSx","getDefaultTableHeaderCellSx","fallbackBackgroundColor","getDefaultTableHeaderLabelSx","defaultTableSortLabelSx"],"mappings":";;AAEA,MAAMA,IAA6B,YAEtBC,IAAwC,WAExCC,IAA0B;AAAA,EACrC,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,MAAM;AAAA,IACJ,iBAAiB;AAAA,IACjB,UAAU;AAAA,EAAA;AAEd,GAGMC,IAA4B,gBAAAC,EAAA,CAACC,OAChC;AAAA,EACC,SAASL;AAAA,EACT,cAAc,aAAaK,EAAW,WAAW;AAAA,EACjD,YAAY;AAAA,EACZ,aAAa;AACf,IANgC,8BASrBC,IAAwB,gBAAAF,EAAA,CAACC,OACnC;AAAA,EACC,GAAGF,EAA0BE,CAAU;AAAA,EACvC,GAAIA,EAAW,KAAK,mBAAmB;AAAA,IACrC,iBAAiBA,EAAW,KAAK;AAAA,EAAA;AAAA,EAEnC,UAAUA,EAAW,KAAK;AAC5B,IAPmC,0BAUxBE,IAA8B,gBAAAH,EAAA,CACzCC,GACAG,IAAkCP,OAEjC;AAAA,EACC,GAAGE,EAA0BE,CAAU;AAAA,EACvC,iBAAiBA,EAAW,OAAO,mBAAmBG;AAAA,EACtD,OAAOH,EAAW,OAAO;AAAA,EACzB,UAAUA,EAAW,OAAO;AAAA,EAC5B,YAAYA,EAAW,OAAO;AAChC,IAVyC,gCAa9BI,IAA+B,gBAAAL,EAAA,CAACC,OAC1C;AAAA,EACC,OAAOA,EAAW,OAAO;AAAA,EACzB,UAAUA,EAAW,OAAO;AAAA,EAC5B,YAAYA,EAAW,OAAO;AAChC,IAL0C,iCAO/BK,IAA0B;AAAA,EACrC,4BAA4B;AAAA,IAC1B,OAAO;AAAA,EAAA;AAAA,EAET,kCAAkC;AAAA,IAChC,OAAO;AAAA,EAAA;AAAA,EAET,gBAAgB;AAAA,IACd,OAAO;AAAA,EAAA;AAAA,EAET,6BAA6B;AAAA,IAC3B,OAAO;AAAA,EAAA;AAEX;"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { isArray as
|
|
4
|
-
const
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var t = (r, e) => p(r, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { isArray as i } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
|
|
4
|
+
const n = "calc(0.75rem * 1.66 + 3px)", a = /* @__PURE__ */ t((...r) => r.reduce((e, o) => o ? [...e, ...i(o) ? o : [o]] : e, []), "mergeSx"), s = /* @__PURE__ */ t((r) => typeof r == "number" ? `${r}px` : r, "toTableRadiusCssValue"), u = /* @__PURE__ */ t((r) => ({
|
|
5
|
+
[`&:has(.MuiFormHelperText-root) .${r}::after`]: {
|
|
6
|
+
content: '""',
|
|
7
|
+
display: "block",
|
|
8
|
+
height: n
|
|
9
|
+
},
|
|
10
|
+
[`&:has(.MuiFormHelperText-root) .${r}:has(.MuiFormHelperText-root)::after`]: {
|
|
11
|
+
display: "none"
|
|
12
|
+
}
|
|
13
|
+
}), "getTableHelperTextRowSx");
|
|
5
14
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
15
|
+
u as getTableHelperTextRowSx,
|
|
16
|
+
a as mergeSx,
|
|
17
|
+
s as toTableRadiusCssValue
|
|
8
18
|
};
|
|
9
19
|
//# sourceMappingURL=tableSx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableSx.js","sources":["../../../../src/components/OwpTable/utils/tableSx.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material';\nimport { isArray } from 'es-toolkit/compat';\n\n/**\n * sx 조건부 배열 병합\n * @param styles sx 목록\n */\nexport const 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\n/**\n * table radius CSS 값 변환\n * @param value radius 값\n */\nexport const toTableRadiusCssValue = (value: number | string) => {\n return typeof value === 'number' ? `${value}px` : value;\n};\n"],"names":["mergeSx","__name","styles","acc","style","isArray","toTableRadiusCssValue","value"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tableSx.js","sources":["../../../../src/components/OwpTable/utils/tableSx.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material';\nimport { isArray } from 'es-toolkit/compat';\n\nconst TABLE_HELPER_TEXT_RESERVED_SPACE = 'calc(0.75rem * 1.66 + 3px)';\n\n/**\n * sx 조건부 배열 병합\n * @param styles sx 목록\n */\nexport const 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\n/**\n * table radius CSS 값 변환\n * @param value radius 값\n */\nexport const toTableRadiusCssValue = (value: number | string) => {\n return typeof value === 'number' ? `${value}px` : value;\n};\n\n/**\n * table row helper text 높이 보정 sx\n * @param contentClassName 셀 콘텐츠 className\n */\nexport const getTableHelperTextRowSx = (contentClassName: string) =>\n ({\n [`&:has(.MuiFormHelperText-root) .${contentClassName}::after`]: {\n content: '\"\"',\n display: 'block',\n height: TABLE_HELPER_TEXT_RESERVED_SPACE,\n },\n [`&:has(.MuiFormHelperText-root) .${contentClassName}:has(.MuiFormHelperText-root)::after`]: {\n display: 'none',\n },\n }) as const;\n"],"names":["TABLE_HELPER_TEXT_RESERVED_SPACE","mergeSx","__name","styles","acc","style","isArray","toTableRadiusCssValue","value","getTableHelperTextRowSx","contentClassName"],"mappings":";;;AAGA,MAAMA,IAAmC,8BAM5BC,IAAU,gBAAAC,EAAA,IAAIC,MACzBA,EAAO,OAA2D,CAACC,GAAKC,MACjEA,IAIE,CAAC,GAAGD,GAAK,GAAIE,EAAQD,CAAK,IAAIA,IAAQ,CAACA,CAAK,CAAE,IAH5CD,GAIR,CAAA,CAAE,GAPgB,YAaVG,IAAwB,gBAAAL,EAAA,CAACM,MAC7B,OAAOA,KAAU,WAAW,GAAGA,CAAK,OAAOA,GADf,0BAQxBC,IAA0B,gBAAAP,EAAA,CAACQ,OACrC;AAAA,EACC,CAAC,mCAAmCA,CAAgB,SAAS,GAAG;AAAA,IAC9D,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQV;AAAA,EAAA;AAAA,EAEV,CAAC,mCAAmCU,CAAgB,sCAAsC,GAAG;AAAA,IAC3F,SAAS;AAAA,EAAA;AAEb,IAVqC;"}
|