@owp/core 2.5.6 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/components/OwpOptionSelector/OwpOptionSelector.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/internal/treeGridTableStyle.js +16 -10
- package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -1
- package/dist/constants.js +23 -20
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useCommonCodeList.js +31 -8
- package/dist/hooks/useCommonCodeList.js.map +1 -1
- package/dist/hooks.js +81 -80
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/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/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +1 -1
- package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +1 -0
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/hooks/useCommonCodeList.d.ts +18 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/treeGridYnUtils.d.ts +15 -0
- package/dist/utils/treeGridYnUtils.js +9 -0
- package/dist/utils/treeGridYnUtils.js.map +1 -0
- package/dist/utils.js +59 -55
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/_virtual/index16.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js";
|
|
3
|
+
var p = /* @__PURE__ */ o();
|
|
4
|
+
const s = /* @__PURE__ */ r(p);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index16.js.map
|
package/dist/_virtual/index17.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var o =
|
|
4
|
-
const
|
|
2
|
+
import { __require as t } from "../node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js";
|
|
3
|
+
var o = t();
|
|
4
|
+
const m = /* @__PURE__ */ r(o);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index17.js.map
|
package/dist/_virtual/index18.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var o =
|
|
4
|
-
const
|
|
2
|
+
import { __require as e } from "../node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js";
|
|
3
|
+
var o = e();
|
|
4
|
+
const s = /* @__PURE__ */ r(o);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index18.js.map
|
package/dist/_virtual/index19.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as t } from "../node_modules/.pnpm/react-autosuggest@10.1.0_react@19.2.4/node_modules/react-autosuggest/dist/index.js";
|
|
3
|
+
var o = t();
|
|
4
|
+
const i = /* @__PURE__ */ r(o);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index19.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpOptionSelector.js","sources":["../../../src/components/OwpOptionSelector/OwpOptionSelector.tsx"],"sourcesContent":["import { OwpSelectorBase } from '@/components/OwpSelectorBase/OwpSelectorBase';\nimport { type SelectChangeEvent, type SelectProps } from '@mui/material';\nimport { type ReactNode, useMemo } from 'react';\n\nexport interface OwpOptionSelectorOption {\n value: string;\n label: ReactNode;\n disabled?: boolean;\n}\n\nexport interface OwpOptionSelectorProps extends Omit<\n SelectProps<string>,\n 'defaultValue' | 'multiple' | 'onChange' | 'renderValue' | 'value'
|
|
1
|
+
{"version":3,"file":"OwpOptionSelector.js","sources":["../../../src/components/OwpOptionSelector/OwpOptionSelector.tsx"],"sourcesContent":["import { OwpSelectorBase } from '@/components/OwpSelectorBase/OwpSelectorBase';\nimport { type SelectChangeEvent, type SelectProps } from '@mui/material';\nimport { type ReactNode, useMemo } from 'react';\n\nexport interface OwpOptionSelectorOption {\n value: string;\n label: ReactNode;\n disabled?: boolean;\n}\n\nexport interface OwpOptionSelectorProps extends Omit<\n SelectProps<string>,\n 'defaultValue' | 'multiple' | 'onChange' | 'renderValue' | 'value'\n> {\n label?: string;\n defaultValue?: string;\n disableAllValueItem?: boolean;\n helperText?: string;\n multiple?: boolean;\n onChange?: (event: SelectChangeEvent<string>, child: ReactNode) => void;\n options: OwpOptionSelectorOption[];\n value?: string;\n}\n\n/**\n * 옵션 선택기\n * @param props 옵션 선택기 props\n */\nconst OwpOptionSelector = ({\n className,\n defaultValue,\n disableAllValueItem,\n error,\n fullWidth,\n helperText,\n label,\n multiple,\n onChange,\n options,\n required,\n value,\n ...selectProps\n}: OwpOptionSelectorProps) => {\n const selectorOptions = useMemo(\n () =>\n options.map((option) => ({\n disabled: option.disabled,\n label: option.label,\n value: option.value,\n })),\n [options],\n );\n\n return (\n <OwpSelectorBase\n className={className}\n defaultValue={defaultValue}\n disableAllValueItem={disableAllValueItem}\n disabled={selectProps.disabled}\n error={error}\n fullWidth={fullWidth}\n helperText={helperText}\n label={label}\n multiple={multiple}\n name={selectProps.name}\n onChange={(event) => {\n onChange?.(event as SelectChangeEvent<string>, null);\n }}\n options={selectorOptions}\n required={required}\n selectProps={{\n ...selectProps,\n }}\n selectorType=\"select\"\n value={value}\n />\n );\n};\n\nexport { OwpOptionSelector };\n"],"names":["OwpOptionSelector","__name","className","defaultValue","disableAllValueItem","error","fullWidth","helperText","label","multiple","onChange","options","required","value","selectProps","selectorOptions","useMemo","option","jsx","OwpSelectorBase","event"],"mappings":";;;;;AA4BA,MAAMA,IAAoB,gBAAAC,EAAA,CAAC;AAAA,EACzB,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAA8B;AAC5B,QAAMC,IAAkBC;AAAA,IACtB,MACEL,EAAQ,IAAI,CAACM,OAAY;AAAA,MACvB,UAAUA,EAAO;AAAA,MACjB,OAAOA,EAAO;AAAA,MACd,OAAOA,EAAO;AAAA,IAAA,EACd;AAAA,IACJ,CAACN,CAAO;AAAA,EAAA;AAGV,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAAjB;AAAA,MACA,cAAAC;AAAA,MACA,qBAAAC;AAAA,MACA,UAAUU,EAAY;AAAA,MACtB,OAAAT;AAAA,MACA,WAAAC;AAAA,MACA,YAAAC;AAAA,MACA,OAAAC;AAAA,MACA,UAAAC;AAAA,MACA,MAAMK,EAAY;AAAA,MAClB,UAAU,gBAAAb,EAAA,CAACmB,MAAU;AACnB,QAAAV,KAAA,QAAAA,EAAWU,GAAoC;AAAA,MACjD,GAFU;AAAA,MAGV,SAASL;AAAA,MACT,UAAAH;AAAA,MACA,aAAa;AAAA,QACX,GAAGE;AAAA,MAAA;AAAA,MAEL,cAAa;AAAA,MACb,OAAAD;AAAA,IAAA;AAAA,EAAA;AAGN,GAjD0B;"}
|
|
@@ -1,30 +1,37 @@
|
|
|
1
1
|
var x = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
import { jsxs as
|
|
2
|
+
var o = (e, t) => x(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { jsxs as u, jsx as d, Fragment as M } 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 { resolveOwpTableTheme as b } from "../../constants/tableTheme.js";
|
|
5
5
|
import { useGetCurrentSettings as N } from "../../hooks/useOwpSettings.js";
|
|
6
|
-
import { TableCell as
|
|
7
|
-
import { clsx as
|
|
8
|
-
import
|
|
9
|
-
import { useMemo as S, Fragment as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
6
|
+
import { TableCell as T, TableBody as k, Checkbox as A } from "@mui/material";
|
|
7
|
+
import { clsx as E } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
8
|
+
import H from "dayjs";
|
|
9
|
+
import { useMemo as S, Fragment as _ } from "react";
|
|
10
|
+
import { TREEGRID_TABLE_FONT_FAMILY_STACK as O } from "./internal/treeGridTableStyle.js";
|
|
11
|
+
import { StyledTableRow as R, StyledTable as W } from "./OwpTable.js";
|
|
12
|
+
import { isNaN as y } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isNaN.js";
|
|
13
|
+
import { toNumber as B } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/util/toNumber.js";
|
|
14
|
+
const L = 28, $ = {
|
|
14
15
|
"&&": {
|
|
15
|
-
fontFamily:
|
|
16
|
+
fontFamily: O,
|
|
16
17
|
fontSize: "1.7rem",
|
|
17
18
|
fontWeight: 600,
|
|
18
19
|
lineHeight: "normal",
|
|
19
20
|
minHeight: "unset",
|
|
20
21
|
padding: "7px 10px"
|
|
21
22
|
}
|
|
22
|
-
},
|
|
23
|
+
}, j = {
|
|
23
24
|
borderRadius: 0,
|
|
24
25
|
overflow: "visible"
|
|
25
|
-
},
|
|
26
|
+
}, g = {
|
|
26
27
|
borderTop: "1px solid #CDD8E4"
|
|
27
|
-
},
|
|
28
|
+
}, G = /* @__PURE__ */ o((e) => e ? (Array.isArray(e) ? e : [e]).filter(Boolean) : [], "normalizeTableCellSx"), C = /* @__PURE__ */ o((...e) => e.flatMap(G).map(
|
|
29
|
+
(t) => typeof t == "function" ? (a) => ({
|
|
30
|
+
"&&&": t(a)
|
|
31
|
+
}) : {
|
|
32
|
+
"&&&": t
|
|
33
|
+
}
|
|
34
|
+
), "getTreeGridCellOverrideSx"), s = {
|
|
28
35
|
header: {
|
|
29
36
|
fontSize: "1.7rem",
|
|
30
37
|
fontWeight: 600
|
|
@@ -32,35 +39,35 @@ const j = 28, B = {
|
|
|
32
39
|
cell: {
|
|
33
40
|
fontSize: "1.7rem"
|
|
34
41
|
}
|
|
35
|
-
},
|
|
42
|
+
}, q = /* @__PURE__ */ o((e) => /* @__PURE__ */ u(M, { children: [
|
|
36
43
|
e,
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
] }), "getRequiredTitle"),
|
|
39
|
-
const i =
|
|
40
|
-
return typeof e.render == "function" ? e.render() : e.useCheckbox ? /* @__PURE__ */
|
|
41
|
-
|
|
44
|
+
/* @__PURE__ */ d("span", { className: "ml-4 text-red-600", children: "*" })
|
|
45
|
+
] }), "getRequiredTitle"), v = /* @__PURE__ */ o((e, t) => e == null ? void 0 : e[t], "getFieldTableValue"), K = /* @__PURE__ */ o((e, t) => typeof t == "function" ? t(e) : y(B(e)) ? e === "Y" : !!Number(e), "getCheckboxChecked"), V = /* @__PURE__ */ o((e) => e.withTime ? "YYYY-MM-DD HH:mm" : e.withTimeAndSec ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD", "getDateFormat"), I = /* @__PURE__ */ o((e, t, a) => {
|
|
46
|
+
const i = v(t, e.key);
|
|
47
|
+
return typeof e.render == "function" ? e.render() : e.useCheckbox ? /* @__PURE__ */ d(
|
|
48
|
+
A,
|
|
42
49
|
{
|
|
43
|
-
checked:
|
|
44
|
-
sx: { "& .MuiSvgIcon-root": { fontSize: (
|
|
50
|
+
checked: K(i, e.validate),
|
|
51
|
+
sx: { "& .MuiSvgIcon-root": { fontSize: (a == null ? void 0 : a.fontSize) ?? L } }
|
|
45
52
|
}
|
|
46
|
-
) : e.useDate ? i &&
|
|
53
|
+
) : e.useDate ? i && H(i).format(V(e)) : e.disableLocaleString ? i : i == null ? void 0 : i.toLocaleString();
|
|
47
54
|
}, "renderFieldTableCellValue");
|
|
48
|
-
function
|
|
55
|
+
function ae({
|
|
49
56
|
layout: e,
|
|
50
|
-
titleWidth:
|
|
51
|
-
titleSx:
|
|
57
|
+
titleWidth: t,
|
|
58
|
+
titleSx: a,
|
|
52
59
|
treeGridTitleCellSx: i,
|
|
53
|
-
cellSx:
|
|
54
|
-
data:
|
|
55
|
-
colGroupSlot:
|
|
60
|
+
cellSx: h,
|
|
61
|
+
data: c,
|
|
62
|
+
colGroupSlot: w,
|
|
56
63
|
className: z,
|
|
57
|
-
tableLayout:
|
|
58
|
-
canUseTreeGridStyle:
|
|
64
|
+
tableLayout: F = "fixed",
|
|
65
|
+
canUseTreeGridStyle: p = !1
|
|
59
66
|
}) {
|
|
60
|
-
const
|
|
67
|
+
const m = N(), l = S(
|
|
61
68
|
() => {
|
|
62
|
-
var
|
|
63
|
-
return b((n = (
|
|
69
|
+
var f, n;
|
|
70
|
+
return b((n = (f = m == null ? void 0 : m.theme) == null ? void 0 : f.main) == null ? void 0 : n.table, {
|
|
64
71
|
header: {
|
|
65
72
|
backgroundColor: "",
|
|
66
73
|
color: "inherit",
|
|
@@ -72,72 +79,68 @@ function re({
|
|
|
72
79
|
}
|
|
73
80
|
});
|
|
74
81
|
},
|
|
75
|
-
[
|
|
76
|
-
),
|
|
82
|
+
[m]
|
|
83
|
+
), Y = S(
|
|
77
84
|
() => {
|
|
78
|
-
var
|
|
79
|
-
return b((
|
|
85
|
+
var f, n, r;
|
|
86
|
+
return b((r = (n = (f = m == null ? void 0 : m.theme) == null ? void 0 : f.main) == null ? void 0 : n.table) == null ? void 0 : r.field, {
|
|
80
87
|
header: {
|
|
81
|
-
...
|
|
88
|
+
...l.header,
|
|
82
89
|
fontSize: s.header.fontSize,
|
|
83
90
|
fontWeight: s.header.fontWeight
|
|
84
91
|
},
|
|
85
92
|
cell: {
|
|
86
|
-
...
|
|
93
|
+
...l.cell,
|
|
87
94
|
fontSize: s.cell.fontSize
|
|
88
95
|
}
|
|
89
96
|
});
|
|
90
97
|
},
|
|
91
|
-
[
|
|
98
|
+
[l, m]
|
|
92
99
|
);
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
|
|
100
|
+
return /* @__PURE__ */ u(
|
|
101
|
+
W,
|
|
95
102
|
{
|
|
96
|
-
canUseTreeGridStyle:
|
|
97
|
-
className:
|
|
98
|
-
containerProps: { sx:
|
|
99
|
-
tableTheme:
|
|
100
|
-
tableLayout:
|
|
103
|
+
canUseTreeGridStyle: p,
|
|
104
|
+
className: E("w-full", z),
|
|
105
|
+
containerProps: { sx: p ? j : void 0 },
|
|
106
|
+
tableTheme: Y,
|
|
107
|
+
tableLayout: F,
|
|
101
108
|
children: [
|
|
102
|
-
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
109
|
+
w,
|
|
110
|
+
/* @__PURE__ */ d(k, { children: e.map((f, n) => /* @__PURE__ */ d(R, { children: f.map((r, D) => /* @__PURE__ */ u(_, { children: [
|
|
111
|
+
/* @__PURE__ */ d(
|
|
112
|
+
T,
|
|
106
113
|
{
|
|
107
114
|
component: "th",
|
|
108
115
|
className: "whitespace-pre-wrap",
|
|
109
|
-
width:
|
|
110
|
-
sx:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
...
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
children: t.required ? _(t.title) : t.title
|
|
116
|
+
width: t ?? 200,
|
|
117
|
+
sx: p ? [
|
|
118
|
+
$,
|
|
119
|
+
n === 0 && g,
|
|
120
|
+
...C(i, a)
|
|
121
|
+
] : a,
|
|
122
|
+
rowSpan: r == null ? void 0 : r.rowSpan,
|
|
123
|
+
children: r.required ? q(r.title) : r.title
|
|
118
124
|
}
|
|
119
125
|
),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
126
|
+
/* @__PURE__ */ d(
|
|
127
|
+
T,
|
|
122
128
|
{
|
|
123
129
|
className: "whitespace-pre-wrap",
|
|
124
|
-
sx:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
colSpan: t == null ? void 0 : t.colSpan,
|
|
130
|
-
rowSpan: t == null ? void 0 : t.rowSpan,
|
|
131
|
-
children: v(t, w, u)
|
|
130
|
+
sx: p ? [n === 0 && g, ...C(h)] : h,
|
|
131
|
+
style: (r == null ? void 0 : r.style) ?? {},
|
|
132
|
+
colSpan: r == null ? void 0 : r.colSpan,
|
|
133
|
+
rowSpan: r == null ? void 0 : r.rowSpan,
|
|
134
|
+
children: I(r, c, h)
|
|
132
135
|
}
|
|
133
136
|
)
|
|
134
|
-
] }, `owp-field-cell-${n}-${
|
|
137
|
+
] }, `owp-field-cell-${n}-${D}`)) }, `owp-field-col-${n}`)) })
|
|
135
138
|
]
|
|
136
139
|
}
|
|
137
140
|
);
|
|
138
141
|
}
|
|
139
|
-
|
|
142
|
+
o(ae, "OwpFieldTable");
|
|
140
143
|
export {
|
|
141
|
-
|
|
144
|
+
ae as OwpFieldTable
|
|
142
145
|
};
|
|
143
146
|
//# sourceMappingURL=OwpFieldTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpFieldTable.js","sources":["../../../src/components/OwpTable/OwpFieldTable.tsx"],"sourcesContent":["import {\n resolveOwpTableTheme,\n} from '@/constants/tableTheme';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport type { OwpTableVariantThemeConfigType } from '@/types/OwpTableThemeTypes';\nimport { Checkbox, TableBody, TableCell, type TableCellProps } from '@mui/material';\nimport clsx from 'clsx';\nimport dayjs from 'dayjs';\nimport { isNaN, toNumber } from 'es-toolkit/compat';\nimport { Fragment, type CSSProperties, type ReactNode, useMemo } from 'react';\nimport { StyledTable, StyledTableRow } from './OwpTable';\n\ntype OwpFieldTableCell = {\n title: string;\n key: string;\n required?: boolean;\n disableLocaleString?: boolean;\n useDate?: boolean;\n withTime?: boolean;\n withTimeAndSec?: boolean;\n useCheckbox?: boolean;\n colSpan?: number;\n rowSpan?: number;\n style?: CSSProperties;\n render?: () => ReactNode;\n validate?: (v?: number | string) => boolean;\n};\n\ntype OwpFieldTableValue = string | number | '';\ntype OwpFieldTableDataRecord = Record<string, OwpFieldTableValue | undefined>;\n\ninterface OwpFieldTableProps {\n layout: OwpFieldTableCell[][];\n data?: OwpFieldTableDataRecord;\n titleSx?: TableCellProps['sx'];\n treeGridTitleCellSx?: TableCellProps['sx'] & CSSProperties;\n cellSx?: TableCellProps['sx'] & CSSProperties;\n titleWidth?: number | string;\n colGroupSlot?: ReactNode;\n className?: string;\n tableLayout?: 'auto' | 'fixed';\n canUseTreeGridStyle?: boolean;\n}\n\nconst DEFAULT_CHECKBOX_FONT_SIZE = 28;\n\nconst defaultTreeGridTitleCellSx = {\n '&&': {\n fontFamily: 'inherit',\n fontSize: '1.7rem',\n fontWeight: 600,\n lineHeight: 'normal',\n minHeight: 'unset',\n padding: '7px 10px',\n },\n} as const;\n\nconst treeGridContainerSx = {\n borderRadius: 0,\n overflow: 'visible',\n} as const;\n\nconst treeGridFirstRowCellSx = {\n borderTop: '1px solid #CDD8E4',\n} as const;\n\nconst defaultFieldTableTheme = {\n header: {\n fontSize: '1.7rem',\n fontWeight: 600,\n },\n cell: {\n fontSize: '1.7rem',\n },\n} satisfies OwpTableVariantThemeConfigType;\n\n/** 필수 헤더 타이틀 */\nconst getRequiredTitle = (title: string) => (\n <>\n {title}\n <span className=\"ml-4 text-red-600\">*</span>\n </>\n);\n\nconst getFieldTableValue = (data: OwpFieldTableProps['data'], key: string) => {\n return data?.[key];\n};\n\nconst getCheckboxChecked = (\n value: OwpFieldTableValue | undefined,\n validate?: OwpFieldTableCell['validate'],\n) => {\n if (typeof validate === 'function') {\n return validate(value);\n }\n\n if (isNaN(toNumber(value))) {\n return value === 'Y';\n }\n\n return Boolean(Number(value));\n};\n\nconst getDateFormat = (cell: OwpFieldTableCell) => {\n if (cell.withTime) {\n return 'YYYY-MM-DD HH:mm';\n }\n\n if (cell.withTimeAndSec) {\n return 'YYYY-MM-DD HH:mm:ss';\n }\n\n return 'YYYY-MM-DD';\n};\n\nconst renderFieldTableCellValue = (\n cell: OwpFieldTableCell,\n data: OwpFieldTableProps['data'],\n cellSx?: OwpFieldTableProps['cellSx'],\n): ReactNode => {\n const value = getFieldTableValue(data, cell.key);\n\n if (typeof cell.render === 'function') {\n return cell.render();\n }\n\n if (cell.useCheckbox) {\n return (\n <Checkbox\n checked={getCheckboxChecked(value, cell.validate)}\n sx={{ '& .MuiSvgIcon-root': { fontSize: cellSx?.fontSize ?? DEFAULT_CHECKBOX_FONT_SIZE } }}\n />\n );\n }\n\n if (cell.useDate) {\n return value ? dayjs(value).format(getDateFormat(cell)) : value;\n }\n\n if (cell.disableLocaleString) {\n return value;\n }\n\n return value?.toLocaleString();\n};\n\n/**\n * OwpFieldTable 컴포넌트\n * @param layout layout 값\n * @param titleWidth titleWidth 값\n * @param titleSx titleSx 값\n * @param treeGridTitleCellSx TreeGrid title cell sx 값\n * @param cellSx cellSx 값\n * @param data 데이터\n * @param colGroupSlot colGroupSlot 값\n * @param className className 값\n * @param tableLayout tableLayout 값\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n */\nexport function OwpFieldTable({\n layout,\n titleWidth,\n titleSx,\n treeGridTitleCellSx,\n cellSx,\n data,\n colGroupSlot,\n className,\n tableLayout = 'fixed',\n canUseTreeGridStyle = false,\n}: OwpFieldTableProps) {\n const currentSettings = useGetCurrentSettings();\n const baseTableTheme = useMemo(\n () =>\n resolveOwpTableTheme(currentSettings?.theme?.main?.table, {\n header: {\n backgroundColor: '',\n color: 'inherit',\n fontSize: defaultFieldTableTheme.header.fontSize,\n fontWeight: defaultFieldTableTheme.header.fontWeight,\n },\n cell: {\n fontSize: defaultFieldTableTheme.cell.fontSize,\n },\n }),\n [currentSettings],\n );\n const tableTheme = useMemo(\n () =>\n resolveOwpTableTheme(currentSettings?.theme?.main?.table?.field, {\n header: {\n ...baseTableTheme.header,\n fontSize: defaultFieldTableTheme.header.fontSize,\n fontWeight: defaultFieldTableTheme.header.fontWeight,\n },\n cell: {\n ...baseTableTheme.cell,\n fontSize: defaultFieldTableTheme.cell.fontSize,\n },\n }),\n [baseTableTheme, currentSettings],\n );\n\n return (\n <StyledTable\n canUseTreeGridStyle={canUseTreeGridStyle}\n className={clsx('w-full', className)}\n containerProps={{ sx: canUseTreeGridStyle ? treeGridContainerSx : undefined }}\n tableTheme={tableTheme}\n tableLayout={tableLayout}\n >\n {colGroupSlot}\n <TableBody>\n {layout.map((cols, rowIndex) => (\n <StyledTableRow key={`owp-field-col-${rowIndex}`}>\n {cols.map((col, colIndex) => (\n <Fragment key={`owp-field-cell-${rowIndex}-${colIndex}`}>\n <TableCell\n component=\"th\"\n className=\"whitespace-pre-wrap\"\n width={titleWidth ?? 200}\n sx={{\n ...(canUseTreeGridStyle ? defaultTreeGridTitleCellSx : {}),\n ...(canUseTreeGridStyle ? (treeGridTitleCellSx ?? {}) : {}),\n ...(canUseTreeGridStyle && rowIndex === 0 ? treeGridFirstRowCellSx : {}),\n ...(titleSx ?? {}),\n }}\n rowSpan={col?.rowSpan}\n >\n {col.required ? getRequiredTitle(col.title) : col.title}\n </TableCell>\n <TableCell\n className=\"whitespace-pre-wrap\"\n sx={{\n ...(canUseTreeGridStyle && rowIndex === 0 ? treeGridFirstRowCellSx : {}),\n ...(cellSx ?? {}),\n }}\n style={col?.style ?? {}}\n colSpan={col?.colSpan}\n rowSpan={col?.rowSpan}\n >\n {renderFieldTableCellValue(col, data, cellSx)}\n </TableCell>\n </Fragment>\n ))}\n </StyledTableRow>\n ))}\n </TableBody>\n </StyledTable>\n );\n}\n"],"names":["DEFAULT_CHECKBOX_FONT_SIZE","defaultTreeGridTitleCellSx","treeGridContainerSx","treeGridFirstRowCellSx","defaultFieldTableTheme","getRequiredTitle","__name","title","jsxs","Fragment","jsx","getFieldTableValue","data","key","getCheckboxChecked","value","validate","isNaN","toNumber","getDateFormat","cell","renderFieldTableCellValue","cellSx","Checkbox","dayjs","OwpFieldTable","layout","titleWidth","titleSx","treeGridTitleCellSx","colGroupSlot","className","tableLayout","canUseTreeGridStyle","currentSettings","useGetCurrentSettings","baseTableTheme","useMemo","resolveOwpTableTheme","_b","_a","tableTheme","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AASA,KAAA,gBAAAA,EAAK;AAAA,cACd,SAASA,KAAA,gBAAAA,EAAK;AAAA,cAEb,UAAA5B,EAA0B4B,GAAKrC,GAAMU,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,QAC9C,EAAA,GA1Ba,kBAAkByB,CAAQ,IAAIG,CAAQ,EA2BrD,CACD,EAAA,GA9BkB,iBAAiBH,CAAQ,EA+B9C,CACD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AA3FgBzC,EAAAmB,IAAA;"}
|
|
1
|
+
{"version":3,"file":"OwpFieldTable.js","sources":["../../../src/components/OwpTable/OwpFieldTable.tsx"],"sourcesContent":["import {\n resolveOwpTableTheme,\n} from '@/constants/tableTheme';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport type { OwpTableVariantThemeConfigType } from '@/types/OwpTableThemeTypes';\nimport { Checkbox, TableBody, TableCell, type TableCellProps } from '@mui/material';\nimport type { SxProps, Theme } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport dayjs from 'dayjs';\nimport { isNaN, toNumber } from 'es-toolkit/compat';\nimport { Fragment, type CSSProperties, type ReactNode, useMemo } from 'react';\nimport { TREEGRID_TABLE_FONT_FAMILY_STACK } from './internal/treeGridTableStyle';\nimport { StyledTable, StyledTableRow } from './OwpTable';\n\ntype OwpFieldTableCell = {\n title: string;\n key: string;\n required?: boolean;\n disableLocaleString?: boolean;\n useDate?: boolean;\n withTime?: boolean;\n withTimeAndSec?: boolean;\n useCheckbox?: boolean;\n colSpan?: number;\n rowSpan?: number;\n style?: CSSProperties;\n render?: () => ReactNode;\n validate?: (v?: number | string) => boolean;\n};\n\ntype OwpFieldTableValue = string | number | '';\ntype OwpFieldTableDataRecord = Record<string, OwpFieldTableValue | undefined>;\n\ninterface OwpFieldTableProps {\n layout: OwpFieldTableCell[][];\n data?: OwpFieldTableDataRecord;\n titleSx?: TableCellProps['sx'];\n treeGridTitleCellSx?: TableCellProps['sx'] & CSSProperties;\n cellSx?: TableCellProps['sx'] & CSSProperties;\n titleWidth?: number | string;\n colGroupSlot?: ReactNode;\n className?: string;\n tableLayout?: 'auto' | 'fixed';\n canUseTreeGridStyle?: boolean;\n}\n\nconst DEFAULT_CHECKBOX_FONT_SIZE = 28;\n\nconst defaultTreeGridTitleCellSx = {\n '&&': {\n fontFamily: TREEGRID_TABLE_FONT_FAMILY_STACK,\n fontSize: '1.7rem',\n fontWeight: 600,\n lineHeight: 'normal',\n minHeight: 'unset',\n padding: '7px 10px',\n },\n} as const;\n\nconst treeGridContainerSx = {\n borderRadius: 0,\n overflow: 'visible',\n} as const;\n\nconst treeGridFirstRowCellSx = {\n borderTop: '1px solid #CDD8E4',\n} as const;\n\ntype TableCellSxItem = Exclude<SxProps<Theme>, readonly unknown[] | false | null | undefined>;\n\nconst normalizeTableCellSx = (\n style?: TableCellProps['sx'],\n): TableCellSxItem[] => {\n if (!style) {\n return [];\n }\n\n return (Array.isArray(style) ? style : [style]).filter(Boolean) as TableCellSxItem[];\n};\n\nconst getTreeGridCellOverrideSx = (\n ...styles: Array<TableCellProps['sx'] | undefined>\n): TableCellSxItem[] =>\n styles.flatMap(normalizeTableCellSx).map((style) =>\n typeof style === 'function'\n ? (theme: Theme) => ({\n '&&&': style(theme),\n })\n : {\n '&&&': style,\n },\n );\n\nconst defaultFieldTableTheme = {\n header: {\n fontSize: '1.7rem',\n fontWeight: 600,\n },\n cell: {\n fontSize: '1.7rem',\n },\n} satisfies OwpTableVariantThemeConfigType;\n\n/** 필수 헤더 타이틀 */\nconst getRequiredTitle = (title: string) => (\n <>\n {title}\n <span className=\"ml-4 text-red-600\">*</span>\n </>\n);\n\nconst getFieldTableValue = (data: OwpFieldTableProps['data'], key: string) => {\n return data?.[key];\n};\n\nconst getCheckboxChecked = (\n value: OwpFieldTableValue | undefined,\n validate?: OwpFieldTableCell['validate'],\n) => {\n if (typeof validate === 'function') {\n return validate(value);\n }\n\n if (isNaN(toNumber(value))) {\n return value === 'Y';\n }\n\n return Boolean(Number(value));\n};\n\nconst getDateFormat = (cell: OwpFieldTableCell) => {\n if (cell.withTime) {\n return 'YYYY-MM-DD HH:mm';\n }\n\n if (cell.withTimeAndSec) {\n return 'YYYY-MM-DD HH:mm:ss';\n }\n\n return 'YYYY-MM-DD';\n};\n\nconst renderFieldTableCellValue = (\n cell: OwpFieldTableCell,\n data: OwpFieldTableProps['data'],\n cellSx?: OwpFieldTableProps['cellSx'],\n): ReactNode => {\n const value = getFieldTableValue(data, cell.key);\n\n if (typeof cell.render === 'function') {\n return cell.render();\n }\n\n if (cell.useCheckbox) {\n return (\n <Checkbox\n checked={getCheckboxChecked(value, cell.validate)}\n sx={{ '& .MuiSvgIcon-root': { fontSize: cellSx?.fontSize ?? DEFAULT_CHECKBOX_FONT_SIZE } }}\n />\n );\n }\n\n if (cell.useDate) {\n return value ? dayjs(value).format(getDateFormat(cell)) : value;\n }\n\n if (cell.disableLocaleString) {\n return value;\n }\n\n return value?.toLocaleString();\n};\n\n/**\n * OwpFieldTable 컴포넌트\n * @param layout layout 값\n * @param titleWidth titleWidth 값\n * @param titleSx titleSx 값\n * @param treeGridTitleCellSx TreeGrid title cell sx 값\n * @param cellSx cellSx 값\n * @param data 데이터\n * @param colGroupSlot colGroupSlot 값\n * @param className className 값\n * @param tableLayout tableLayout 값\n * @param canUseTreeGridStyle TreeGrid 스타일 사용 여부\n */\nexport function OwpFieldTable({\n layout,\n titleWidth,\n titleSx,\n treeGridTitleCellSx,\n cellSx,\n data,\n colGroupSlot,\n className,\n tableLayout = 'fixed',\n canUseTreeGridStyle = false,\n}: OwpFieldTableProps) {\n const currentSettings = useGetCurrentSettings();\n const baseTableTheme = useMemo(\n () =>\n resolveOwpTableTheme(currentSettings?.theme?.main?.table, {\n header: {\n backgroundColor: '',\n color: 'inherit',\n fontSize: defaultFieldTableTheme.header.fontSize,\n fontWeight: defaultFieldTableTheme.header.fontWeight,\n },\n cell: {\n fontSize: defaultFieldTableTheme.cell.fontSize,\n },\n }),\n [currentSettings],\n );\n const tableTheme = useMemo(\n () =>\n resolveOwpTableTheme(currentSettings?.theme?.main?.table?.field, {\n header: {\n ...baseTableTheme.header,\n fontSize: defaultFieldTableTheme.header.fontSize,\n fontWeight: defaultFieldTableTheme.header.fontWeight,\n },\n cell: {\n ...baseTableTheme.cell,\n fontSize: defaultFieldTableTheme.cell.fontSize,\n },\n }),\n [baseTableTheme, currentSettings],\n );\n\n return (\n <StyledTable\n canUseTreeGridStyle={canUseTreeGridStyle}\n className={clsx('w-full', className)}\n containerProps={{ sx: canUseTreeGridStyle ? treeGridContainerSx : undefined }}\n tableTheme={tableTheme}\n tableLayout={tableLayout}\n >\n {colGroupSlot}\n <TableBody>\n {layout.map((cols, rowIndex) => (\n <StyledTableRow key={`owp-field-col-${rowIndex}`}>\n {cols.map((col, colIndex) => (\n <Fragment key={`owp-field-cell-${rowIndex}-${colIndex}`}>\n <TableCell\n component=\"th\"\n className=\"whitespace-pre-wrap\"\n width={titleWidth ?? 200}\n sx={\n canUseTreeGridStyle\n ? [\n defaultTreeGridTitleCellSx,\n rowIndex === 0 && treeGridFirstRowCellSx,\n ...getTreeGridCellOverrideSx(treeGridTitleCellSx, titleSx),\n ]\n : titleSx\n }\n rowSpan={col?.rowSpan}\n >\n {col.required ? getRequiredTitle(col.title) : col.title}\n </TableCell>\n <TableCell\n className=\"whitespace-pre-wrap\"\n sx={\n canUseTreeGridStyle\n ? [rowIndex === 0 && treeGridFirstRowCellSx, ...getTreeGridCellOverrideSx(cellSx)]\n : cellSx\n }\n style={col?.style ?? {}}\n colSpan={col?.colSpan}\n rowSpan={col?.rowSpan}\n >\n {renderFieldTableCellValue(col, data, cellSx)}\n </TableCell>\n </Fragment>\n ))}\n </StyledTableRow>\n ))}\n </TableBody>\n </StyledTable>\n );\n}\n"],"names":["DEFAULT_CHECKBOX_FONT_SIZE","defaultTreeGridTitleCellSx","TREEGRID_TABLE_FONT_FAMILY_STACK","treeGridContainerSx","treeGridFirstRowCellSx","normalizeTableCellSx","__name","style","getTreeGridCellOverrideSx","styles","theme","defaultFieldTableTheme","getRequiredTitle","title","jsxs","Fragment","jsx","getFieldTableValue","data","key","getCheckboxChecked","value","validate","isNaN","toNumber","getDateFormat","cell","renderFieldTableCellValue","cellSx","Checkbox","dayjs","OwpFieldTable","layout","titleWidth","titleSx","treeGridTitleCellSx","colGroupSlot","className","tableLayout","canUseTreeGridStyle","currentSettings","useGetCurrentSettings","baseTableTheme","useMemo","resolveOwpTableTheme","_b","_a","tableTheme","_c","StyledTable","clsx","TableBody","cols","rowIndex","StyledTableRow","col","colIndex","TableCell"],"mappings":";;;;;;;;;;;;;AA8CA,MAAMA,IAA6B,IAE7BC,IAA6B;AAAA,EACjC,MAAM;AAAA,IACJ,YAAYC;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,EAAA;AAEb,GAEMC,IAAsB;AAAA,EAC1B,cAAc;AAAA,EACd,UAAU;AACZ,GAEMC,IAAyB;AAAA,EAC7B,WAAW;AACb,GAIMC,IAAuB,gBAAAC,EAAA,CAC3BC,MAEKA,KAIG,MAAM,QAAQA,CAAK,IAAIA,IAAQ,CAACA,CAAK,GAAG,OAAO,OAAO,IAHrD,CAAA,GAJkB,yBAUvBC,IAA4B,gBAAAF,EAAA,IAC7BG,MAEHA,EAAO,QAAQJ,CAAoB,EAAE;AAAA,EAAI,CAACE,MACxC,OAAOA,KAAU,aACb,CAACG,OAAkB;AAAA,IACjB,OAAOH,EAAMG,CAAK;AAAA,EAAA,KAEpB;AAAA,IACE,OAAOH;AAAA,EAAA;AAEf,GAXgC,8BAa5BI,IAAyB;AAAA,EAC7B,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,MAAM;AAAA,IACJ,UAAU;AAAA,EAAA;AAEd,GAGMC,IAAmB,gBAAAN,EAAA,CAACO,MACxB,gBAAAC,EAAAC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A,UAAA,gBAAAC;AAAA,YAACyC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,WAAU;AAAA,cACV,OAAOxB,KAAc;AAAA,cACrB,IACEM,IACI;AAAA,gBACEtC;AAAA,gBACAoD,MAAa,KAAKjD;AAAA,gBAClB,GAAGI,EAA0B2B,GAAqBD,CAAO;AAAA,cAAA,IAE3DA;AAAA,cAEN,SAASqB,KAAA,gBAAAA,EAAK;AAAA,cAEb,YAAI,WAAW3C,EAAiB2C,EAAI,KAAK,IAAIA,EAAI;AAAA,YAAA;AAAA,UAAA;AAAA,UAEpD,gBAAAvC;AAAA,YAACyC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,IACElB,IACI,CAACc,MAAa,KAAKjD,GAAwB,GAAGI,EAA0BoB,CAAM,CAAC,IAC/EA;AAAA,cAEN,QAAO2B,KAAA,gBAAAA,EAAK,UAAS,CAAA;AAAA,cACrB,SAASA,KAAA,gBAAAA,EAAK;AAAA,cACd,SAASA,KAAA,gBAAAA,EAAK;AAAA,cAEb,UAAA5B,EAA0B4B,GAAKrC,GAAMU,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,QAC9C,EAAA,GA9Ba,kBAAkByB,CAAQ,IAAIG,CAAQ,EA+BrD,CACD,EAAA,GAlCkB,iBAAiBH,CAAQ,EAmC9C,CACD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AA/FgB/C,EAAAyB,IAAA;"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var l = (o, r) =>
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var l = (o, r) => n(o, "name", { value: r, configurable: !0 });
|
|
3
|
+
const d = "#6F7F94", c = "#CDD8E4", g = [
|
|
4
|
+
"Pretendard",
|
|
5
|
+
"Roboto",
|
|
6
|
+
'"Helvetica"',
|
|
7
|
+
"Arial",
|
|
8
|
+
"sans-serif"
|
|
9
|
+
].join(", "), b = /* @__PURE__ */ l((o) => ({
|
|
5
10
|
backgroundColor: o.body.backgroundColor,
|
|
6
11
|
color: o.body.color
|
|
7
12
|
}), "getTreeGridContainerSx"), a = /* @__PURE__ */ l((o, r = "normal") => ({
|
|
8
|
-
fontFamily:
|
|
13
|
+
fontFamily: g,
|
|
9
14
|
fontSize: o,
|
|
10
15
|
fontWeight: r,
|
|
11
16
|
lineHeight: "16px"
|
|
@@ -16,7 +21,7 @@ const d = "#6F7F94", c = "#CDD8E4", s = /* @__PURE__ */ l((o) => ({
|
|
|
16
21
|
textOverflow: "ellipsis",
|
|
17
22
|
verticalAlign: "middle",
|
|
18
23
|
whiteSpace: "nowrap"
|
|
19
|
-
}), "getTreeGridCellBaseSx"),
|
|
24
|
+
}), "getTreeGridCellBaseSx"), s = /* @__PURE__ */ l((o) => ({
|
|
20
25
|
...a(
|
|
21
26
|
o.header.fontSize,
|
|
22
27
|
o.header.fontWeight
|
|
@@ -30,7 +35,7 @@ const d = "#6F7F94", c = "#CDD8E4", s = /* @__PURE__ */ l((o) => ({
|
|
|
30
35
|
height: o.header.height,
|
|
31
36
|
minHeight: o.header.height,
|
|
32
37
|
padding: "7px 2px 6px 10px"
|
|
33
|
-
}), "getTreeGridHeaderCellSx"),
|
|
38
|
+
}), "getTreeGridHeaderCellSx"), x = /* @__PURE__ */ l((o) => ({
|
|
34
39
|
...C(o),
|
|
35
40
|
backgroundColor: o.row.backgroundColor,
|
|
36
41
|
borderBottom: `1px solid ${c}`,
|
|
@@ -66,12 +71,13 @@ const d = "#6F7F94", c = "#CDD8E4", s = /* @__PURE__ */ l((o) => ({
|
|
|
66
71
|
}, "getTreeGridBodyRowSx");
|
|
67
72
|
export {
|
|
68
73
|
c as TREEGRID_TABLE_BODY_BORDER_COLOR,
|
|
74
|
+
g as TREEGRID_TABLE_FONT_FAMILY_STACK,
|
|
69
75
|
d as TREEGRID_TABLE_HEADER_BORDER_COLOR,
|
|
70
|
-
|
|
76
|
+
x as getTreeGridBodyCellSx,
|
|
71
77
|
R as getTreeGridBodyRowSx,
|
|
72
78
|
C as getTreeGridCellBaseSx,
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
b as getTreeGridContainerSx,
|
|
80
|
+
s as getTreeGridHeaderCellSx,
|
|
75
81
|
a as getTreeGridTypographySx
|
|
76
82
|
};
|
|
77
83
|
//# sourceMappingURL=treeGridTableStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeGridTableStyle.js","sources":["../../../../src/components/OwpTable/internal/treeGridTableStyle.ts"],"sourcesContent":["import type { OwpResolvedGridThemeConfigType } from '@/constants/gridTheme';\
|
|
1
|
+
{"version":3,"file":"treeGridTableStyle.js","sources":["../../../../src/components/OwpTable/internal/treeGridTableStyle.ts"],"sourcesContent":["import type { OwpResolvedGridThemeConfigType } from '@/constants/gridTheme';\n\nexport const TREEGRID_TABLE_HEADER_BORDER_COLOR = '#6F7F94';\nexport const TREEGRID_TABLE_BODY_BORDER_COLOR = '#CDD8E4';\nexport const TREEGRID_TABLE_FONT_FAMILY_STACK = [\n 'Pretendard',\n 'Roboto',\n '\"Helvetica\"',\n 'Arial',\n 'sans-serif',\n].join(', ');\n\n/**\n * TreeGrid 컨테이너 색상 매핑\n * @param treeGridTheme Grid theme 값\n */\nexport const getTreeGridContainerSx = (\n treeGridTheme: OwpResolvedGridThemeConfigType,\n) => ({\n backgroundColor: treeGridTheme.body.backgroundColor,\n color: treeGridTheme.body.color,\n});\n\n/**\n * TreeGrid 타이포그래피 매핑\n * @param fontSize 폰트 크기\n * @param fontWeight 폰트 두께\n */\nexport const getTreeGridTypographySx = (\n fontSize: number | string,\n fontWeight: number | string = 'normal',\n) => ({\n fontFamily: TREEGRID_TABLE_FONT_FAMILY_STACK,\n fontSize,\n fontWeight,\n lineHeight: '16px',\n});\n\n/**\n * TreeGrid 공통 셀 스타일 매핑\n * @param treeGridTheme Grid theme 값\n */\nexport const getTreeGridCellBaseSx = (treeGridTheme: OwpResolvedGridThemeConfigType) => ({\n ...getTreeGridTypographySx(treeGridTheme.cell.fontSize),\n boxSizing: 'border-box',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n verticalAlign: 'middle',\n whiteSpace: 'nowrap',\n});\n\n/**\n * TreeGrid header 셀 스타일 매핑\n * @param treeGridTheme Grid theme 값\n */\nexport const getTreeGridHeaderCellSx = (\n treeGridTheme: OwpResolvedGridThemeConfigType,\n) => ({\n ...getTreeGridTypographySx(\n treeGridTheme.header.fontSize,\n treeGridTheme.header.fontWeight,\n ),\n backgroundColor: treeGridTheme.header.backgroundColor,\n borderTop: `1px solid ${TREEGRID_TABLE_HEADER_BORDER_COLOR}`,\n borderBottom: `1px solid ${TREEGRID_TABLE_HEADER_BORDER_COLOR}`,\n borderLeft: 0,\n borderRight: `1px solid ${TREEGRID_TABLE_HEADER_BORDER_COLOR}`,\n color: treeGridTheme.header.color,\n height: treeGridTheme.header.height,\n minHeight: treeGridTheme.header.height,\n padding: '7px 2px 6px 10px',\n});\n\n/**\n * TreeGrid body 셀 스타일 매핑\n * @param treeGridTheme Grid theme 값\n */\nexport const getTreeGridBodyCellSx = (\n treeGridTheme: OwpResolvedGridThemeConfigType,\n) => ({\n ...getTreeGridCellBaseSx(treeGridTheme),\n backgroundColor: treeGridTheme.row.backgroundColor,\n borderBottom: `1px solid ${TREEGRID_TABLE_BODY_BORDER_COLOR}`,\n borderLeft: 0,\n borderRight: `1px solid ${TREEGRID_TABLE_BODY_BORDER_COLOR}`,\n color: treeGridTheme.body.color,\n fontSize: treeGridTheme.cell.fontSize,\n padding: '7px 10px 6px',\n});\n\n/**\n * TreeGrid body row 상태 스타일 매핑\n * @param treeGridTheme Grid theme 값\n * @param options hover, selected 여부\n */\nexport const getTreeGridBodyRowSx = (\n treeGridTheme: OwpResolvedGridThemeConfigType,\n options?: {\n canHover?: boolean;\n selected?: boolean;\n },\n) => {\n const defaultBackgroundColor = options?.selected\n ? treeGridTheme.state.selectedRowBackgroundColor\n : treeGridTheme.row.backgroundColor;\n const hoverBackgroundColor = options?.selected\n ? treeGridTheme.state.selectedRowBackgroundColor\n : treeGridTheme.state.hoverRowBackgroundColor;\n\n return {\n '& > td': {\n backgroundColor: defaultBackgroundColor,\n },\n ...(options?.canHover && {\n '&:hover > td': {\n backgroundColor: hoverBackgroundColor,\n },\n }),\n '&.Mui-selected > td': {\n backgroundColor: treeGridTheme.state.selectedRowBackgroundColor,\n },\n '&.Mui-selected:hover > td': {\n backgroundColor: treeGridTheme.state.selectedRowBackgroundColor,\n },\n '&:focus-within > td': {\n backgroundColor: treeGridTheme.state.focusedRowBackgroundColor,\n },\n '& > td:focus-within': {\n backgroundColor: treeGridTheme.state.focusedCellBackgroundColor,\n },\n };\n};\n"],"names":["TREEGRID_TABLE_HEADER_BORDER_COLOR","TREEGRID_TABLE_BODY_BORDER_COLOR","TREEGRID_TABLE_FONT_FAMILY_STACK","getTreeGridContainerSx","__name","treeGridTheme","getTreeGridTypographySx","fontSize","fontWeight","getTreeGridCellBaseSx","getTreeGridHeaderCellSx","getTreeGridBodyCellSx","getTreeGridBodyRowSx","options","defaultBackgroundColor","hoverBackgroundColor"],"mappings":";;AAEO,MAAMA,IAAqC,WACrCC,IAAmC,WACnCC,IAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,IAAI,GAMEC,IAAyB,gBAAAC,EAAA,CACpCC,OACI;AAAA,EACJ,iBAAiBA,EAAc,KAAK;AAAA,EACpC,OAAOA,EAAc,KAAK;AAC5B,IALsC,2BAYzBC,IAA0B,gBAAAF,EAAA,CACrCG,GACAC,IAA8B,cAC1B;AAAA,EACJ,YAAYN;AAAA,EACZ,UAAAK;AAAA,EACA,YAAAC;AAAA,EACA,YAAY;AACd,IARuC,4BAc1BC,IAAwB,gBAAAL,EAAA,CAACC,OAAmD;AAAA,EACvF,GAAGC,EAAwBD,EAAc,KAAK,QAAQ;AAAA,EACtD,WAAW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,IAEvC,6BAA6B;AAAA,MAC3B,iBAAiBA,EAAc,MAAM;AAAA,IAAA;AAAA,IAEvC,uBAAuB;AAAA,MACrB,iBAAiBA,EAAc,MAAM;AAAA,IAAA;AAAA,IAEvC,uBAAuB;AAAA,MACrB,iBAAiBA,EAAc,MAAM;AAAA,IAAA;AAAA,EACvC;AAEJ,GApCoC;"}
|
package/dist/constants.js
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { DEFAULT_CELL_ALIGNMENT as L, DEFAULT_HEADER_FILL as T, DEFAULT_HEADER_FONT as
|
|
2
|
-
import { FALLBACK_LANGUAGE_LIST as
|
|
3
|
-
import { CURRENT_LANGUAGE as
|
|
4
|
-
import { STORAGE_KEYS as
|
|
5
|
-
import { TREEGRID_CELL_HIGHLIGHT_CLASS as U, TREEGRID_CELL_HIGHLIGHT_COLOR as S, TREEGRID_FONT_FAMILY as
|
|
1
|
+
import { DEFAULT_CELL_ALIGNMENT as L, DEFAULT_HEADER_FILL as T, DEFAULT_HEADER_FONT as R, DEFAULT_THIN_BORDER as A, DEFAULT_VALUE_FONT as e, DEFAULT_WRAP_CELL_ALIGNMENT as r } from "./constants/excel.js";
|
|
2
|
+
import { FALLBACK_LANGUAGE_LIST as O } from "./constants/language.js";
|
|
3
|
+
import { CURRENT_LANGUAGE as I, LOCAL_STORAGE_KEYS as C, STORAGE_ACCESS_TOKEN_KEY as o } from "./constants/localStorageKeys.js";
|
|
4
|
+
import { STORAGE_KEYS as F } from "./constants/storageKeys.js";
|
|
5
|
+
import { TREEGRID_CELL_HIGHLIGHT_CLASS as U, TREEGRID_CELL_HIGHLIGHT_COLOR as S, TREEGRID_FONT_FAMILY as H, TREEGRID_FONT_FAMILY_STACK as s, TREEGRID_INPUT_CELL_COLOR as B, TREEGRID_WARNING_CELL_COLOR as m, getTreeGridAssetBasePath as x, getTreeGridFontFaceStyles as f, getTreeGridTextResourceUrl as l, resolveTreeGridAssetUrl as p, resolveTreeGridColorNumber as K } from "./constants/treeGrid.js";
|
|
6
|
+
import { TREEGRID_TABLE_BODY_BORDER_COLOR as d, TREEGRID_TABLE_HEADER_BORDER_COLOR as i } from "./components/OwpTable/internal/treeGridTableStyle.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
I as CURRENT_LANGUAGE,
|
|
8
9
|
L as DEFAULT_CELL_ALIGNMENT,
|
|
9
10
|
T as DEFAULT_HEADER_FILL,
|
|
10
|
-
|
|
11
|
+
R as DEFAULT_HEADER_FONT,
|
|
11
12
|
A as DEFAULT_THIN_BORDER,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
e as DEFAULT_VALUE_FONT,
|
|
14
|
+
r as DEFAULT_WRAP_CELL_ALIGNMENT,
|
|
15
|
+
O as FALLBACK_LANGUAGE_LIST,
|
|
16
|
+
C as LOCAL_STORAGE_KEYS,
|
|
17
|
+
o as STORAGE_ACCESS_TOKEN_KEY,
|
|
18
|
+
F as STORAGE_KEYS,
|
|
18
19
|
U as TREEGRID_CELL_HIGHLIGHT_CLASS,
|
|
19
20
|
S as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
H as TREEGRID_FONT_FAMILY,
|
|
22
|
+
s as TREEGRID_FONT_FAMILY_STACK,
|
|
23
|
+
B as TREEGRID_INPUT_CELL_COLOR,
|
|
24
|
+
d as TREEGRID_TABLE_BODY_BORDER_COLOR,
|
|
25
|
+
i as TREEGRID_TABLE_HEADER_BORDER_COLOR,
|
|
23
26
|
m as TREEGRID_WARNING_CELL_COLOR,
|
|
24
27
|
x as getTreeGridAssetBasePath,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
f as getTreeGridFontFaceStyles,
|
|
29
|
+
l as getTreeGridTextResourceUrl,
|
|
30
|
+
p as resolveTreeGridAssetUrl,
|
|
31
|
+
K as resolveTreeGridColorNumber
|
|
29
32
|
};
|
|
30
33
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { STORAGE_KEYS as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var C = (t, n) => E(t, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { STORAGE_KEYS as P } from "../constants/storageKeys.js";
|
|
4
|
+
import { useMemo as i } from "react";
|
|
5
|
+
import { useAtomValue as L, useSetAtom as f } from "jotai";
|
|
6
|
+
import { atomWithStorage as p } from "jotai/utils";
|
|
7
|
+
const d = p(P.commonCodeList, void 0), N = /* @__PURE__ */ C(() => L(d), "useGetCommonCodeList"), l = /* @__PURE__ */ C(({
|
|
8
|
+
query: t = {},
|
|
9
|
+
enabled: n = !0
|
|
10
|
+
} = {}) => {
|
|
11
|
+
const r = N(), c = t["IPX_COMMONCODE.CODEID"], s = t["IPX_COMMONCODE.GROUPID"], u = t["IPX_COMMONCODE.DESCRIPTION"], I = t["IPX_COMMONCODE.FLAG"], O = i(
|
|
12
|
+
() => [
|
|
13
|
+
["IPX_COMMONCODE.CODEID", c],
|
|
14
|
+
["IPX_COMMONCODE.GROUPID", s],
|
|
15
|
+
["IPX_COMMONCODE.DESCRIPTION", u],
|
|
16
|
+
["IPX_COMMONCODE.FLAG", I]
|
|
17
|
+
].flatMap(
|
|
18
|
+
([e, o]) => o != null && o !== "" ? [[e, o]] : []
|
|
19
|
+
),
|
|
20
|
+
[c, u, I, s]
|
|
21
|
+
), m = O.length > 0, M = i(() => r ? s ? r[s] ?? [] : Object.values(r).reduce((e, o) => (e.push(...o), e), []) : [], [r, s]);
|
|
22
|
+
return {
|
|
23
|
+
commonCodeList: i(() => !n || !m ? [] : M.filter(
|
|
24
|
+
(e) => O.every(([o, D]) => e[o] === D)
|
|
25
|
+
), [O, n, m, M]),
|
|
26
|
+
isLoading: n && m && !r
|
|
27
|
+
};
|
|
28
|
+
}, "useFilteredCommonCodeList"), R = /* @__PURE__ */ C(() => f(d), "useSetCommonCodeList");
|
|
7
29
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
30
|
+
l as useFilteredCommonCodeList,
|
|
31
|
+
N as useGetCommonCodeList,
|
|
32
|
+
R as useSetCommonCodeList
|
|
10
33
|
};
|
|
11
34
|
//# sourceMappingURL=useCommonCodeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommonCodeList.js","sources":["../../src/hooks/useCommonCodeList.ts"],"sourcesContent":["import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { CommonCode } from '@/utils/commonCodeUtils';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\nconst commonCodeAtom = atomWithStorage<\n | {\n [codeId: string]: Array<CommonCode>;\n }\n | undefined\n>(STORAGE_KEYS.commonCodeList, undefined);\n\n/**\n * 공통코드 목록 조회 훅\n */\nexport const useGetCommonCodeList = () => {\n return useAtomValue(commonCodeAtom);\n};\n\n/**\n * 공통코드 목록 설정 훅\n */\nexport const useSetCommonCodeList = () => {\n return useSetAtom(commonCodeAtom);\n};\n"],"names":["commonCodeAtom","atomWithStorage","STORAGE_KEYS","useGetCommonCodeList","__name","useAtomValue","useSetCommonCodeList","useSetAtom"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCommonCodeList.js","sources":["../../src/hooks/useCommonCodeList.ts"],"sourcesContent":["import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport type { CommonCode } from '@/utils/commonCodeUtils';\nimport { useMemo } from 'react';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\nconst commonCodeAtom = atomWithStorage<\n | {\n [codeId: string]: Array<CommonCode>;\n }\n | undefined\n>(STORAGE_KEYS.commonCodeList, undefined);\n\ntype CommonCodeQueryKey =\n | 'IPX_COMMONCODE.CODEID'\n | 'IPX_COMMONCODE.GROUPID'\n | 'IPX_COMMONCODE.DESCRIPTION'\n | 'IPX_COMMONCODE.FLAG';\n\nexport type CommonCodeQuery = Partial<Pick<CommonCode, CommonCodeQueryKey>>;\n\nexport interface UseFilteredCommonCodeListProps {\n query?: CommonCodeQuery;\n enabled?: boolean;\n}\n\n/**\n * 공통코드 목록 조회 훅\n */\nexport const useGetCommonCodeList = () => {\n return useAtomValue(commonCodeAtom);\n};\n\n/**\n * 조건 기반 공통코드 목록 조회 훅\n * @param props 조회 옵션\n * @param props.query 공통코드 필터 조건\n * @param props.enabled 조회 활성화 여부\n */\nexport const useFilteredCommonCodeList = ({\n query = {},\n enabled = true,\n}: UseFilteredCommonCodeListProps = {}) => {\n const commonCodeByGroupId = useGetCommonCodeList();\n const codeId = query['IPX_COMMONCODE.CODEID'];\n const groupId = query['IPX_COMMONCODE.GROUPID'];\n const description = query['IPX_COMMONCODE.DESCRIPTION'];\n const flag = query['IPX_COMMONCODE.FLAG'];\n const activeQueryEntries = useMemo(\n () =>\n [\n ['IPX_COMMONCODE.CODEID', codeId],\n ['IPX_COMMONCODE.GROUPID', groupId],\n ['IPX_COMMONCODE.DESCRIPTION', description],\n ['IPX_COMMONCODE.FLAG', flag],\n ].flatMap(([queryKey, queryValue]) =>\n queryValue != null && queryValue !== '' ? [[queryKey, queryValue] as const] : [],\n ),\n [codeId, description, flag, groupId],\n );\n const hasQuery = activeQueryEntries.length > 0;\n const sourceCommonCodeList = useMemo(() => {\n if (!commonCodeByGroupId) {\n return [];\n }\n\n if (groupId) {\n return commonCodeByGroupId[groupId] ?? [];\n }\n\n return Object.values(commonCodeByGroupId).reduce<CommonCode[]>((acc, currentCommonCodeList) => {\n acc.push(...currentCommonCodeList);\n\n return acc;\n }, []);\n }, [commonCodeByGroupId, groupId]);\n const commonCodeList = useMemo(() => {\n if (!enabled || !hasQuery) {\n return [];\n }\n\n return sourceCommonCodeList.filter((commonCode) =>\n activeQueryEntries.every(([queryKey, queryValue]) => commonCode[queryKey] === queryValue),\n );\n }, [activeQueryEntries, enabled, hasQuery, sourceCommonCodeList]);\n const isLoading = enabled && hasQuery && !commonCodeByGroupId;\n\n return {\n commonCodeList,\n isLoading,\n };\n};\n\n/**\n * 공통코드 목록 설정 훅\n */\nexport const useSetCommonCodeList = () => {\n return useSetAtom(commonCodeAtom);\n};\n"],"names":["commonCodeAtom","atomWithStorage","STORAGE_KEYS","useGetCommonCodeList","__name","useAtomValue","useFilteredCommonCodeList","query","enabled","commonCodeByGroupId","codeId","groupId","description","flag","activeQueryEntries","useMemo","queryKey","queryValue","hasQuery","sourceCommonCodeList","acc","currentCommonCodeList","commonCode","useSetCommonCodeList","useSetAtom"],"mappings":";;;;;;AAMA,MAAMA,IAAiBC,EAKrBC,EAAa,gBAAgB,MAAS,GAkB3BC,IAAuB,gBAAAC,EAAA,MAC3BC,EAAaL,CAAc,GADA,yBAUvBM,IAA4B,gBAAAF,EAAA,CAAC;AAAA,EACxC,OAAAG,IAAQ,CAAA;AAAA,EACR,SAAAC,IAAU;AACZ,IAAoC,OAAO;AACzC,QAAMC,IAAsBN,EAAA,GACtBO,IAASH,EAAM,uBAAuB,GACtCI,IAAUJ,EAAM,wBAAwB,GACxCK,IAAcL,EAAM,4BAA4B,GAChDM,IAAON,EAAM,qBAAqB,GAClCO,IAAqBC;AAAA,IACzB,MACE;AAAA,MACE,CAAC,yBAAyBL,CAAM;AAAA,MAChC,CAAC,0BAA0BC,CAAO;AAAA,MAClC,CAAC,8BAA8BC,CAAW;AAAA,MAC1C,CAAC,uBAAuBC,CAAI;AAAA,IAAA,EAC5B;AAAA,MAAQ,CAAC,CAACG,GAAUC,CAAU,MAC9BA,KAAc,QAAQA,MAAe,KAAK,CAAC,CAACD,GAAUC,CAAU,CAAU,IAAI,CAAA;AAAA,IAAC;AAAA,IAEnF,CAACP,GAAQE,GAAaC,GAAMF,CAAO;AAAA,EAAA,GAE/BO,IAAWJ,EAAmB,SAAS,GACvCK,IAAuBJ,EAAQ,MAC9BN,IAIDE,IACKF,EAAoBE,CAAO,KAAK,CAAA,IAGlC,OAAO,OAAOF,CAAmB,EAAE,OAAqB,CAACW,GAAKC,OACnED,EAAI,KAAK,GAAGC,CAAqB,GAE1BD,IACN,CAAA,CAAE,IAXI,CAAA,GAYR,CAACX,GAAqBE,CAAO,CAAC;AAYjC,SAAO;AAAA,IACL,gBAZqBI,EAAQ,MACzB,CAACP,KAAW,CAACU,IACR,CAAA,IAGFC,EAAqB;AAAA,MAAO,CAACG,MAClCR,EAAmB,MAAM,CAAC,CAACE,GAAUC,CAAU,MAAMK,EAAWN,CAAQ,MAAMC,CAAU;AAAA,IAAA,GAEzF,CAACH,GAAoBN,GAASU,GAAUC,CAAoB,CAAC;AAAA,IAK9D,WAJgBX,KAAWU,KAAY,CAACT;AAAA,EAIxC;AAEJ,GApDyC,8BAyD5Bc,IAAuB,gBAAAnB,EAAA,MAC3BoB,EAAWxB,CAAc,GADE;"}
|
package/dist/hooks.js
CHANGED
|
@@ -1,87 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useAccessTokenGuard as
|
|
3
|
-
import { useConfirm as
|
|
4
|
-
import { useGetCurrentLanguage as
|
|
5
|
-
import { useGetLogoSrc as
|
|
6
|
-
import { useGetCurrentUser as
|
|
7
|
-
import { useGetCurrentUserId as
|
|
8
|
-
import { useEnsureCurrentUserSeq as
|
|
9
|
-
import { useDebounce as
|
|
10
|
-
import { useDeepCompareEffect as
|
|
1
|
+
import { useFilteredCommonCodeList as t, useGetCommonCodeList as o, useSetCommonCodeList as s } from "./hooks/useCommonCodeList.js";
|
|
2
|
+
import { useAccessTokenGuard as m } from "./hooks/useAccessTokenGuard.js";
|
|
3
|
+
import { useConfirm as a } from "./hooks/useConfirm.js";
|
|
4
|
+
import { useGetCurrentLanguage as f, useGetLanguageList as i, useSetCurrentLanguage as x } from "./hooks/useCurrentLanguage.js";
|
|
5
|
+
import { useGetLogoSrc as S, useSetLogoSrc as G } from "./hooks/useLogoSrc.js";
|
|
6
|
+
import { useGetCurrentUser as L, useSetCurrentUser as d } from "./hooks/useCurrentUser.js";
|
|
7
|
+
import { useGetCurrentUserId as T, useSetCurrentUserId as E } from "./hooks/useCurrentUserId.js";
|
|
8
|
+
import { useEnsureCurrentUserSeq as l, useGetCurrentUserSeq as U, useSetCurrentUserSeq as v } from "./hooks/useCurrentUserSeq.js";
|
|
9
|
+
import { useDebounce as A } from "./hooks/useDebounce.js";
|
|
10
|
+
import { useDeepCompareEffect as N, useDeepCompareEffectNoCheck as I, useDeepCompareMemoize as k } from "./hooks/useDeepCompareEffect.js";
|
|
11
11
|
import { useFormDataUploadMutation as M } from "./hooks/useFormDataUploadMutation.js";
|
|
12
12
|
import { useHeaderWrapState as w } from "./hooks/useHeaderWrapState.js";
|
|
13
|
-
import { useInitApp as
|
|
14
|
-
import { useInitCommonCodes as
|
|
15
|
-
import { useGetNavbar as
|
|
16
|
-
import { useGetNavigationList as
|
|
17
|
-
import { useChangeOwpTheme as
|
|
18
|
-
import { useOwpTranslation as
|
|
19
|
-
import { useGetPageLockLoading as
|
|
20
|
-
import { usePrevious as
|
|
21
|
-
import { useGetShortcuts as
|
|
22
|
-
import { getEnv as
|
|
23
|
-
import { useThemeMediaQuery as
|
|
24
|
-
import { useTimeout as
|
|
25
|
-
import { useTreeGridCommonCodeEnums as
|
|
26
|
-
import { useTreeGridEnums as
|
|
27
|
-
import { useTreeGridExcelExport as
|
|
28
|
-
import { FALLBACK_LANGUAGE_LIST as
|
|
13
|
+
import { useInitApp as P } from "./hooks/useInitApp.js";
|
|
14
|
+
import { useInitCommonCodes as _ } from "./hooks/useInitCommonCodes.js";
|
|
15
|
+
import { useGetNavbar as B, useNavbarActions as H } from "./hooks/useNavbar.js";
|
|
16
|
+
import { useGetNavigationList as Q, useSetNavigationList as R } from "./hooks/useNavigation.js";
|
|
17
|
+
import { useChangeOwpTheme as j, useGetCurrentLayoutConfig as J, useGetCurrentSettings as V, useGetCustomScrollbarsEnabled as X, useGetDefaultSettings as Y, useGetFooterTheme as Z, useGetMainTheme as $, useGetNavbarTheme as ee, useGetOwpSettings as re, useGetToolbarTheme as te, useResetSettings as oe, useSetDefaultSettings as se, useSetSettings as ue } from "./hooks/useOwpSettings.js";
|
|
18
|
+
import { useOwpTranslation as ne } from "./hooks/useOwpTranslation.js";
|
|
19
|
+
import { useGetPageLockLoading as pe, usePageLockLoading as fe } from "./hooks/usePageLockLoading.js";
|
|
20
|
+
import { usePrevious as xe } from "./hooks/usePrevious.js";
|
|
21
|
+
import { useGetShortcuts as Se, useSetShortcuts as Ge } from "./hooks/useShortcuts.js";
|
|
22
|
+
import { getEnv as Le, setEnv as de, useStorage as ce } from "./hooks/useStorage.js";
|
|
23
|
+
import { useThemeMediaQuery as Ee } from "./hooks/useThemeMediaQuery.js";
|
|
24
|
+
import { useTimeout as le } from "./hooks/useTimeout.js";
|
|
25
|
+
import { useTreeGridCommonCodeEnums as ve } from "./hooks/useTreeGridCommonCodeEnums.js";
|
|
26
|
+
import { useTreeGridEnums as Ae } from "./hooks/useTreeGridEnums.js";
|
|
27
|
+
import { useTreeGridExcelExport as Ne } from "./hooks/useTreeGridExcelExport.js";
|
|
28
|
+
import { FALLBACK_LANGUAGE_LIST as ke } from "./constants/language.js";
|
|
29
29
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
ke as FALLBACK_LANGUAGE_LIST,
|
|
31
|
+
Le as getEnv,
|
|
32
|
+
de as setEnv,
|
|
33
|
+
m as useAccessTokenGuard,
|
|
34
|
+
j as useChangeOwpTheme,
|
|
35
|
+
a as useConfirm,
|
|
36
|
+
A as useDebounce,
|
|
37
|
+
N as useDeepCompareEffect,
|
|
38
|
+
I as useDeepCompareEffectNoCheck,
|
|
39
|
+
k as useDeepCompareMemoize,
|
|
40
|
+
l as useEnsureCurrentUserSeq,
|
|
41
|
+
t as useFilteredCommonCodeList,
|
|
41
42
|
M as useFormDataUploadMutation,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
43
|
+
o as useGetCommonCodeList,
|
|
44
|
+
f as useGetCurrentLanguage,
|
|
45
|
+
J as useGetCurrentLayoutConfig,
|
|
46
|
+
V as useGetCurrentSettings,
|
|
47
|
+
L as useGetCurrentUser,
|
|
48
|
+
T as useGetCurrentUserId,
|
|
49
|
+
U as useGetCurrentUserSeq,
|
|
50
|
+
X as useGetCustomScrollbarsEnabled,
|
|
51
|
+
Y as useGetDefaultSettings,
|
|
52
|
+
Z as useGetFooterTheme,
|
|
53
|
+
i as useGetLanguageList,
|
|
54
|
+
S as useGetLogoSrc,
|
|
55
|
+
$ as useGetMainTheme,
|
|
56
|
+
B as useGetNavbar,
|
|
57
|
+
ee as useGetNavbarTheme,
|
|
58
|
+
Q as useGetNavigationList,
|
|
59
|
+
re as useGetOwpSettings,
|
|
60
|
+
pe as useGetPageLockLoading,
|
|
61
|
+
Se as useGetShortcuts,
|
|
62
|
+
te as useGetToolbarTheme,
|
|
62
63
|
w as useHeaderWrapState,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
64
|
+
P as useInitApp,
|
|
65
|
+
_ as useInitCommonCodes,
|
|
66
|
+
H as useNavbarActions,
|
|
67
|
+
ne as useOwpTranslation,
|
|
68
|
+
fe as usePageLockLoading,
|
|
69
|
+
xe as usePrevious,
|
|
70
|
+
oe as useResetSettings,
|
|
71
|
+
s as useSetCommonCodeList,
|
|
72
|
+
x as useSetCurrentLanguage,
|
|
73
|
+
d as useSetCurrentUser,
|
|
74
|
+
E as useSetCurrentUserId,
|
|
75
|
+
v as useSetCurrentUserSeq,
|
|
76
|
+
se as useSetDefaultSettings,
|
|
77
|
+
G as useSetLogoSrc,
|
|
78
|
+
R as useSetNavigationList,
|
|
79
|
+
ue as useSetSettings,
|
|
80
|
+
Ge as useSetShortcuts,
|
|
81
|
+
ce as useStorage,
|
|
82
|
+
Ee as useThemeMediaQuery,
|
|
83
|
+
le as useTimeout,
|
|
84
|
+
ve as useTreeGridCommonCodeEnums,
|
|
85
|
+
Ae as useTreeGridEnums,
|
|
86
|
+
Ne as useTreeGridExcelExport
|
|
86
87
|
};
|
|
87
88
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -18,11 +18,11 @@ import { styled as te } from "@mui/material/styles";
|
|
|
18
18
|
import z from "@mui/material/TextField";
|
|
19
19
|
import ne from "@mui/material/Tooltip";
|
|
20
20
|
import E from "@mui/material/Typography";
|
|
21
|
-
import D from "../../../_virtual/
|
|
22
|
-
import re from "../../../_virtual/
|
|
21
|
+
import D from "../../../_virtual/index17.js";
|
|
22
|
+
import re from "../../../_virtual/index18.js";
|
|
23
23
|
import { clsx as B } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
24
24
|
import { useMemo as oe, useReducer as ie, useRef as T, useEffect as se } from "react";
|
|
25
|
-
import W from "../../../_virtual/
|
|
25
|
+
import W from "../../../_virtual/index19.js";
|
|
26
26
|
import { useNavigate as ae } from "react-router-dom";
|
|
27
27
|
import { toolbarToggleSx as le } from "./toggleStyles.js";
|
|
28
28
|
import { OwpSvgIcon as w } from "../../../components/OwpSvgIcon/OwpSvgIcon.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
2
|
var t = (e, _) => f(e, "name", { value: _, configurable: !0 });
|
|
3
|
-
import { __exports as r } from "../../../../../../../../_virtual/
|
|
3
|
+
import { __exports as r } from "../../../../../../../../_virtual/constants.js";
|
|
4
4
|
var i;
|
|
5
5
|
function E() {
|
|
6
6
|
if (i) return r;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var n = Object.defineProperty;
|
|
2
2
|
var $ = (r, t) => n(r, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { __exports as x } from "../../../../../../../../_virtual/
|
|
3
|
+
import { __exports as x } from "../../../../../../../../_virtual/constants4.js";
|
|
4
4
|
var e;
|
|
5
5
|
function o() {
|
|
6
6
|
return e ? x : (e = 1, Object.defineProperty(x, "__esModule", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var n = Object.defineProperty;
|
|
2
2
|
var G = (r, t) => n(r, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { __exports as L } from "../../../../../../../../_virtual/
|
|
3
|
+
import { __exports as L } from "../../../../../../../../_virtual/constants2.js";
|
|
4
4
|
var e;
|
|
5
5
|
function o() {
|
|
6
6
|
return e ? L : (e = 1, Object.defineProperty(L, "__esModule", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var o = Object.defineProperty;
|
|
2
2
|
var r = (n, s) => o(n, "name", { value: s, configurable: !0 });
|
|
3
|
-
import { __exports as e } from "../../../../../../../../_virtual/
|
|
3
|
+
import { __exports as e } from "../../../../../../../../_virtual/constants3.js";
|
|
4
4
|
var t;
|
|
5
5
|
function _() {
|
|
6
6
|
return t ? e : (t = 1, Object.defineProperty(e, "__esModule", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var S = Object.defineProperty;
|
|
2
2
|
var e = (r, i) => S(r, "name", { value: i, configurable: !0 });
|
|
3
|
-
import { __exports as n } from "../../../../../../../_virtual/
|
|
3
|
+
import { __exports as n } from "../../../../../../../_virtual/utils.js";
|
|
4
4
|
var u;
|
|
5
5
|
function c() {
|
|
6
6
|
if (u) return n;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var M = Object.defineProperty;
|
|
2
2
|
var a = (l, h) => M(l, "name", { value: h, configurable: !0 });
|
|
3
|
-
import { __exports as s } from "../../../../../../../_virtual/
|
|
3
|
+
import { __exports as s } from "../../../../../../../_virtual/utils2.js";
|
|
4
4
|
var w;
|
|
5
5
|
function _() {
|
|
6
6
|
return w ? s : (w = 1, (function(l) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
2
|
var a = (r, e) => c(r, "name", { value: e, configurable: !0 });
|
|
3
|
-
import n from "../../../../../../_virtual/
|
|
3
|
+
import n from "../../../../../../_virtual/index16.js";
|
|
4
4
|
import m from "react-dom";
|
|
5
5
|
import t from "react";
|
|
6
6
|
import u from "./useWaitForDOMRef.js";
|
|
@@ -5,7 +5,7 @@ export interface OwpOptionSelectorOption {
|
|
|
5
5
|
label: ReactNode;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export interface OwpOptionSelectorProps extends Omit<SelectProps<string>, 'defaultValue' | 'multiple' | 'onChange' | 'renderValue' | 'value'
|
|
8
|
+
export interface OwpOptionSelectorProps extends Omit<SelectProps<string>, 'defaultValue' | 'multiple' | 'onChange' | 'renderValue' | 'value'> {
|
|
9
9
|
label?: string;
|
|
10
10
|
defaultValue?: string;
|
|
11
11
|
disableAllValueItem?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { OwpResolvedGridThemeConfigType } from '@/constants/gridTheme';
|
|
2
2
|
export declare const TREEGRID_TABLE_HEADER_BORDER_COLOR = "#6F7F94";
|
|
3
3
|
export declare const TREEGRID_TABLE_BODY_BORDER_COLOR = "#CDD8E4";
|
|
4
|
+
export declare const TREEGRID_TABLE_FONT_FAMILY_STACK: string;
|
|
4
5
|
/**
|
|
5
6
|
* TreeGrid 컨테이너 색상 매핑
|
|
6
7
|
* @param treeGridTheme Grid theme 값
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
import { CommonCode } from '@/utils/commonCodeUtils';
|
|
1
|
+
import type { CommonCode } from '@/utils/commonCodeUtils';
|
|
2
|
+
type CommonCodeQueryKey = 'IPX_COMMONCODE.CODEID' | 'IPX_COMMONCODE.GROUPID' | 'IPX_COMMONCODE.DESCRIPTION' | 'IPX_COMMONCODE.FLAG';
|
|
3
|
+
export type CommonCodeQuery = Partial<Pick<CommonCode, CommonCodeQueryKey>>;
|
|
4
|
+
export interface UseFilteredCommonCodeListProps {
|
|
5
|
+
query?: CommonCodeQuery;
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
}
|
|
2
8
|
/**
|
|
3
9
|
* 공통코드 목록 조회 훅
|
|
4
10
|
*/
|
|
5
11
|
export declare const useGetCommonCodeList: () => {
|
|
6
12
|
[codeId: string]: CommonCode[];
|
|
7
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* 조건 기반 공통코드 목록 조회 훅
|
|
16
|
+
* @param props 조회 옵션
|
|
17
|
+
* @param props.query 공통코드 필터 조건
|
|
18
|
+
* @param props.enabled 조회 활성화 여부
|
|
19
|
+
*/
|
|
20
|
+
export declare const useFilteredCommonCodeList: ({ query, enabled, }?: UseFilteredCommonCodeListProps) => {
|
|
21
|
+
commonCodeList: CommonCode[];
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
};
|
|
8
24
|
/**
|
|
9
25
|
* 공통코드 목록 설정 훅
|
|
10
26
|
*/
|
|
@@ -15,3 +31,4 @@ export declare const useSetCommonCodeList: () => (args_0: typeof import("jotai/u
|
|
|
15
31
|
}) => typeof import("jotai/utils").RESET | {
|
|
16
32
|
[codeId: string]: CommonCode[];
|
|
17
33
|
})) => void;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TreeGrid 체크 값 판별
|
|
3
|
+
* @param value 원본 값
|
|
4
|
+
*/
|
|
5
|
+
export declare const isTreeGridCheckedValue: (value: number | string | undefined) => value is 1 | "Y" | "1";
|
|
6
|
+
/**
|
|
7
|
+
* TreeGrid 숫자 불리언 값 변환
|
|
8
|
+
* @param value 원본 값
|
|
9
|
+
*/
|
|
10
|
+
export declare const toTreeGridBoolValue: (value: number | string | undefined) => 0 | 1;
|
|
11
|
+
/**
|
|
12
|
+
* TreeGrid Y/N 값 변환
|
|
13
|
+
* @param value 원본 값
|
|
14
|
+
*/
|
|
15
|
+
export declare const toTreeGridYnValue: (value: number | string | undefined) => "Y" | "N";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var o = (e, t) => c(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
const r = /* @__PURE__ */ o((e) => e === 1 || e === "1" || e === "Y", "isTreeGridCheckedValue"), i = /* @__PURE__ */ o((e) => r(e) ? 1 : 0, "toTreeGridBoolValue"), n = /* @__PURE__ */ o((e) => r(e) ? "Y" : "N", "toTreeGridYnValue");
|
|
4
|
+
export {
|
|
5
|
+
r as isTreeGridCheckedValue,
|
|
6
|
+
i as toTreeGridBoolValue,
|
|
7
|
+
n as toTreeGridYnValue
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=treeGridYnUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeGridYnUtils.js","sources":["../../src/utils/treeGridYnUtils.ts"],"sourcesContent":["/**\n * TreeGrid 체크 값 판별\n * @param value 원본 값\n */\nexport const isTreeGridCheckedValue = (value: number | string | undefined) =>\n value === 1 || value === '1' || value === 'Y';\n\n/**\n * TreeGrid 숫자 불리언 값 변환\n * @param value 원본 값\n */\nexport const toTreeGridBoolValue = (value: number | string | undefined) =>\n isTreeGridCheckedValue(value) ? 1 : 0;\n\n/**\n * TreeGrid Y/N 값 변환\n * @param value 원본 값\n */\nexport const toTreeGridYnValue = (value: number | string | undefined) =>\n isTreeGridCheckedValue(value) ? 'Y' : 'N';\n"],"names":["isTreeGridCheckedValue","__name","value","toTreeGridBoolValue","toTreeGridYnValue"],"mappings":";;AAIO,MAAMA,IAAyB,gBAAAC,EAAA,CAACC,MACrCA,MAAU,KAAKA,MAAU,OAAOA,MAAU,KADN,2BAOzBC,IAAsB,gBAAAF,EAAA,CAACC,MAClCF,EAAuBE,CAAK,IAAI,IAAI,GADH,wBAOtBE,IAAoB,gBAAAH,EAAA,CAACC,MAChCF,EAAuBE,CAAK,IAAI,MAAM,KADP;"}
|
package/dist/utils.js
CHANGED
|
@@ -1,92 +1,96 @@
|
|
|
1
1
|
import { generateBarcodeUrl as o } from "./utils/barcodeUtil.js";
|
|
2
2
|
import { buildTreeGridEnumAttributesByCommonCodeList as d, transformCommonCodeBasedOnGroupId as a, transformGridEnumByCommonCodeList as m } from "./utils/commonCodeUtils.js";
|
|
3
|
-
import { createDateRangeSearchParams as
|
|
4
|
-
import { createFormDataBody as
|
|
3
|
+
import { createDateRangeSearchParams as T } from "./utils/createDateRangeSearchParams.js";
|
|
4
|
+
import { createFormDataBody as l, normalizeFormDataUploadParams as p } from "./utils/createFormDataBody.js";
|
|
5
5
|
import { createJsonBody as x } from "./utils/createJsonBody.js";
|
|
6
6
|
import { createJsonString as f } from "./utils/createJsonString.js";
|
|
7
|
-
import { exportExcelByBuffer as L, getIndexByLetters as
|
|
7
|
+
import { exportExcelByBuffer as L, getIndexByLetters as G, getLettersByIndex as g, setCellValue as u, setMergeCells as C } from "./utils/excelUtil.js";
|
|
8
8
|
import { fetchFile as B } from "./utils/fetchFile.js";
|
|
9
9
|
import { formatDateToYmd as R, getTodayYmd as D } from "./utils/formatDateToYmd.js";
|
|
10
|
-
import { formatNumber as
|
|
10
|
+
import { formatNumber as c } from "./utils/formatNumber.js";
|
|
11
11
|
import { getDisplayValue as O } from "./utils/getDisplayValue.js";
|
|
12
|
-
import { getEstimatedTextCellWidth as
|
|
13
|
-
import { getFormDefaultValues as
|
|
12
|
+
import { getEstimatedTextCellWidth as V } from "./utils/getEstimatedTextCellWidth.js";
|
|
13
|
+
import { getFormDefaultValues as H } from "./utils/getFormDefaultValues.js";
|
|
14
14
|
import { getStartPagePath as S } from "./utils/getStartPagePath.js";
|
|
15
15
|
import { getTrimmedValue as w } from "./utils/getTrimmedValue.js";
|
|
16
16
|
import { isEnterKeyEvent as M } from "./utils/isEnterKeyEvent.js";
|
|
17
17
|
import { getApiLanguageCode as J, getI18nextLanguageCode as W } from "./utils/language.js";
|
|
18
|
-
import { formatTimeInputToHourMinute as
|
|
19
|
-
import { preloadOnIdle as
|
|
20
|
-
import { generateQrCodeUrl as
|
|
18
|
+
import { formatTimeInputToHourMinute as Z, normalizeTimeToHourMinute as v } from "./utils/normalizeTimeToHourMinute.js";
|
|
19
|
+
import { preloadOnIdle as K } from "./utils/preloadOnIdle.js";
|
|
20
|
+
import { generateQrCodeUrl as j } from "./utils/qrCodeUtil.js";
|
|
21
21
|
import { rebuildValue as X } from "./utils/rebuildValue.js";
|
|
22
22
|
import { sanitizePasswordValue as ee, sanitizeUserIdValue as re } from "./utils/sanitizeAuthInputValue.js";
|
|
23
23
|
import { exportTreeGridExcel as te } from "./utils/treeGridExportExcelUtil.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
24
|
+
import { isTreeGridCheckedValue as ae, toTreeGridBoolValue as me, toTreeGridYnValue as ie } from "./utils/treeGridYnUtils.js";
|
|
25
|
+
import { addTreeGridRowById as se, exportTreeGridToExcelById as le, getTreeGridById as pe, getTreeGridDataRowsById as ne, getTreeGridRowChangesById as xe, getTreeGridSelectedRowsById as Ee, highlightTreeGridCellById as fe, reloadTreeGridBodyById as Ie, resetTreeGridChangesById as Le, resetTreeGridChangesByIds as Ge, resetTreeGridSelectionById as ge, resetTreeGridSelectionsByIds as ue, setTreeGridColumnEnumOptionsById as Ce, setTreeGridColumnVisibilityById as ye } from "./utils/treeGridUtil.js";
|
|
26
|
+
import { readZipEntryJson as _e, readZipEntryText as Re, saveAsZipFile as De } from "./utils/zipUtil.js";
|
|
27
|
+
import { OwpUtils as ce } from "./utils/common/OwpUtils.js";
|
|
28
|
+
import { DEFAULT_CELL_ALIGNMENT as Oe, DEFAULT_HEADER_FILL as Ue, DEFAULT_HEADER_FONT as Ve, DEFAULT_THIN_BORDER as he, DEFAULT_VALUE_FONT as He, DEFAULT_WRAP_CELL_ALIGNMENT as Ne } from "./constants/excel.js";
|
|
29
|
+
import { TREEGRID_CELL_HIGHLIGHT_CLASS as Pe, TREEGRID_CELL_HIGHLIGHT_COLOR as we, TREEGRID_INPUT_CELL_COLOR as be, TREEGRID_WARNING_CELL_COLOR as Me } from "./constants/treeGrid.js";
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
Oe as DEFAULT_CELL_ALIGNMENT,
|
|
32
|
+
Ue as DEFAULT_HEADER_FILL,
|
|
33
|
+
Ve as DEFAULT_HEADER_FONT,
|
|
34
|
+
he as DEFAULT_THIN_BORDER,
|
|
35
|
+
He as DEFAULT_VALUE_FONT,
|
|
36
|
+
Ne as DEFAULT_WRAP_CELL_ALIGNMENT,
|
|
37
|
+
ce as OwpUtils,
|
|
38
|
+
Pe as TREEGRID_CELL_HIGHLIGHT_CLASS,
|
|
39
|
+
we as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
40
|
+
be as TREEGRID_INPUT_CELL_COLOR,
|
|
41
|
+
Me as TREEGRID_WARNING_CELL_COLOR,
|
|
42
|
+
se as addTreeGridRowById,
|
|
42
43
|
d as buildTreeGridEnumAttributesByCommonCodeList,
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
T as createDateRangeSearchParams,
|
|
45
|
+
l as createFormDataBody,
|
|
45
46
|
x as createJsonBody,
|
|
46
47
|
f as createJsonString,
|
|
47
48
|
L as exportExcelByBuffer,
|
|
48
49
|
te as exportTreeGridExcel,
|
|
49
|
-
|
|
50
|
+
le as exportTreeGridToExcelById,
|
|
50
51
|
B as fetchFile,
|
|
51
52
|
R as formatDateToYmd,
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
c as formatNumber,
|
|
54
|
+
Z as formatTimeInputToHourMinute,
|
|
54
55
|
o as generateBarcodeUrl,
|
|
55
|
-
|
|
56
|
+
j as generateQrCodeUrl,
|
|
56
57
|
J as getApiLanguageCode,
|
|
57
58
|
O as getDisplayValue,
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
V as getEstimatedTextCellWidth,
|
|
60
|
+
H as getFormDefaultValues,
|
|
60
61
|
W as getI18nextLanguageCode,
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
G as getIndexByLetters,
|
|
63
|
+
g as getLettersByIndex,
|
|
63
64
|
S as getStartPagePath,
|
|
64
65
|
D as getTodayYmd,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
pe as getTreeGridById,
|
|
67
|
+
ne as getTreeGridDataRowsById,
|
|
68
|
+
xe as getTreeGridRowChangesById,
|
|
69
|
+
Ee as getTreeGridSelectedRowsById,
|
|
69
70
|
w as getTrimmedValue,
|
|
70
|
-
|
|
71
|
+
fe as highlightTreeGridCellById,
|
|
71
72
|
M as isEnterKeyEvent,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
ae as isTreeGridCheckedValue,
|
|
74
|
+
p as normalizeFormDataUploadParams,
|
|
75
|
+
v as normalizeTimeToHourMinute,
|
|
76
|
+
K as preloadOnIdle,
|
|
77
|
+
_e as readZipEntryJson,
|
|
78
|
+
Re as readZipEntryText,
|
|
77
79
|
X as rebuildValue,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
Ie as reloadTreeGridBodyById,
|
|
81
|
+
Le as resetTreeGridChangesById,
|
|
82
|
+
Ge as resetTreeGridChangesByIds,
|
|
83
|
+
ge as resetTreeGridSelectionById,
|
|
84
|
+
ue as resetTreeGridSelectionsByIds,
|
|
83
85
|
ee as sanitizePasswordValue,
|
|
84
86
|
re as sanitizeUserIdValue,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
De as saveAsZipFile,
|
|
88
|
+
u as setCellValue,
|
|
87
89
|
C as setMergeCells,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
Ce as setTreeGridColumnEnumOptionsById,
|
|
91
|
+
ye as setTreeGridColumnVisibilityById,
|
|
92
|
+
me as toTreeGridBoolValue,
|
|
93
|
+
ie as toTreeGridYnValue,
|
|
90
94
|
a as transformCommonCodeBasedOnGroupId,
|
|
91
95
|
m as transformGridEnumByCommonCodeList
|
|
92
96
|
};
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|