@owp/core 1.29.0 → 1.30.0
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/{Close-Cm04EulE.js → Close-DnXyQZKh.js} +378 -307
- package/dist/Close-DnXyQZKh.js.map +1 -0
- package/dist/{OwpStoreProvider-CFq963Pl.js → OwpStoreProvider-Bx5p7ooQ.js} +2 -2
- package/dist/{OwpStoreProvider-CFq963Pl.js.map → OwpStoreProvider-Bx5p7ooQ.js.map} +1 -1
- package/dist/{OwpUtils-9lHSCdan.js → OwpUtils-C81bM1Gz.js} +2 -2
- package/dist/{OwpUtils-9lHSCdan.js.map → OwpUtils-C81bM1Gz.js.map} +1 -1
- package/dist/{QuickPanel-DlrhsNXW.js → QuickPanel-CO7Tyc8C.js} +2 -2
- package/dist/{QuickPanel-DlrhsNXW.js.map → QuickPanel-CO7Tyc8C.js.map} +1 -1
- package/dist/colors.js +3 -18
- package/dist/colors.js.map +1 -1
- package/dist/constants.js +19 -21
- package/dist/constants.js.map +1 -1
- package/dist/context.js +65 -38
- package/dist/context.js.map +1 -1
- package/dist/hooks.js +68 -98
- package/dist/hooks.js.map +1 -1
- package/dist/{index-Dn7pPU3W.js → index-KlA5Es4t.js} +7603 -7681
- package/dist/index-KlA5Es4t.js.map +1 -0
- package/dist/index.js +85 -75
- package/dist/{isTypedArray-xp-fB7W4.js → isTypedArray-DPyC49cI.js} +3 -3
- package/dist/{isTypedArray-xp-fB7W4.js.map → isTypedArray-DPyC49cI.js.map} +1 -1
- package/dist/{lazyLoadedSlices-BYAl2fil.js → lazyLoadedSlices-DC7yg4GT.js} +977 -931
- package/dist/lazyLoadedSlices-DC7yg4GT.js.map +1 -0
- package/dist/localStorageKeys-Che0CNci.js +10 -0
- package/dist/localStorageKeys-Che0CNci.js.map +1 -0
- package/dist/owp-app.css +1 -1
- package/dist/owpDark-DAY0F6Ph.js +21 -0
- package/dist/owpDark-DAY0F6Ph.js.map +1 -0
- package/dist/storageKeys-C6xHFiTo.js +42 -0
- package/dist/storageKeys-C6xHFiTo.js.map +1 -0
- package/dist/store.js +32 -33
- package/dist/{toUpper-K8I4frC5.js → toUpper-i_I6Tyuv.js} +2 -2
- package/dist/{toUpper-K8I4frC5.js.map → toUpper-i_I6Tyuv.js.map} +1 -1
- package/dist/treeGrid-DtKg-9uf.js +8 -0
- package/dist/treeGrid-DtKg-9uf.js.map +1 -0
- package/dist/{treeGridUtil-C46Qi5LG.js → treeGridUtil-WTM_djsN.js} +62 -61
- package/dist/{treeGridUtil-C46Qi5LG.js.map → treeGridUtil-WTM_djsN.js.map} +1 -1
- package/dist/types/components/OwpTable/OwpTable.d.ts +1 -1
- package/dist/types/components/OwpTabs/OwpTab.d.ts +1 -1
- package/dist/types/components/OwpTabs/OwpTabs.d.ts +1 -1
- package/dist/types/components/layouts/shared-components/navigation/store/navigationSlice.d.ts +2 -2
- package/dist/types/context/OwpAppProvider.d.ts +4 -3
- package/dist/types/default-settings/OwpDefaultSettings.d.ts +25 -171
- package/dist/types/hooks/useStorage.d.ts +0 -13
- package/dist/types/index.d.ts +1 -0
- package/dist/types/store/owpSettingsSlice.d.ts +1 -456
- package/dist/usePageLockLoading-BUI_3PlR.js +39 -0
- package/dist/usePageLockLoading-BUI_3PlR.js.map +1 -0
- package/dist/useShortcuts-CCf98L8m.js +241 -0
- package/dist/useShortcuts-CCf98L8m.js.map +1 -0
- package/dist/useStorage-CuUmH4fD.js +50 -0
- package/dist/useStorage-CuUmH4fD.js.map +1 -0
- package/dist/useTreeGridExcelExport-N2nOKmkz.js +138 -0
- package/dist/useTreeGridExcelExport-N2nOKmkz.js.map +1 -0
- package/dist/utils.js +294 -293
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/Close-Cm04EulE.js.map +0 -1
- package/dist/index-Dn7pPU3W.js.map +0 -1
- package/dist/lazyLoadedSlices-BYAl2fil.js.map +0 -1
- package/dist/storageKeys-DRzte9LZ.js +0 -15
- package/dist/storageKeys-DRzte9LZ.js.map +0 -1
- package/dist/treeGrid-DRAoPLXh.js +0 -35
- package/dist/treeGrid-DRAoPLXh.js.map +0 -1
- package/dist/useOwpTranslation-CMrtqKkT.js +0 -190
- package/dist/useOwpTranslation-CMrtqKkT.js.map +0 -1
- package/dist/useStorage-BA0D8KA7.js +0 -67
- package/dist/useStorage-BA0D8KA7.js.map +0 -1
- package/dist/useTreeGridExcelExport-DLMecvHS.js +0 -186
- package/dist/useTreeGridExcelExport-DLMecvHS.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickPanel-
|
|
1
|
+
{"version":3,"file":"QuickPanel-CO7Tyc8C.js","sources":["../src/components/layouts/shared-components/quickPanel/QuickPanel.tsx"],"sourcesContent":["import { OwpScrollbars } from '@/components/OwpScrollbars';\nimport { OwpSvgIcon } from '@/components/OwpSvgIcon';\nimport { useAppDispatch, useAppSelector } from '@/store/hooks';\nimport Divider from '@mui/material/Divider';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';\nimport ListItemText from '@mui/material/ListItemText';\nimport ListSubheader from '@mui/material/ListSubheader';\nimport { styled } from '@mui/material/styles';\nimport SwipeableDrawer from '@mui/material/SwipeableDrawer';\nimport Switch from '@mui/material/Switch';\nimport Typography from '@mui/material/Typography';\nimport { format } from 'date-fns/format';\nimport { useState } from 'react';\nimport { selectQuickPanelData, selectQuickPanelOpen, toggleQuickPanel } from './quickPanelSlice';\n\nconst StyledSwipeableDrawer = styled(SwipeableDrawer)(() => ({\n '& .MuiDrawer-paper': {\n width: 280,\n },\n}));\n\n/**\n * The quick panel.\n */\nfunction QuickPanel() {\n const dispatch = useAppDispatch();\n const data = useAppSelector(selectQuickPanelData);\n const open = useAppSelector(selectQuickPanelOpen);\n\n const [checked, setChecked] = useState<string[]>(['notifications']);\n\n const handleToggle = (value: string) => () => {\n const currentIndex = checked.indexOf(value);\n const newChecked = [...checked];\n\n if (currentIndex === -1) {\n newChecked.push(value);\n } else {\n newChecked.splice(currentIndex, 1);\n }\n\n setChecked(newChecked);\n };\n\n return (\n <StyledSwipeableDrawer\n open={open as boolean}\n anchor=\"right\"\n onOpen={() => {}}\n onClose={() => dispatch(toggleQuickPanel())}\n disableSwipeToOpen\n >\n <OwpScrollbars>\n <ListSubheader component=\"div\">Today</ListSubheader>\n\n <div className=\"mb-0 px-24 py-16\">\n <Typography className=\"mb-12 text-5xl\" color=\"text.secondary\">\n {format(new Date(), 'eeee')}\n </Typography>\n <div className=\"flex\">\n <Typography className=\"text-5xl leading-none\" color=\"text.secondary\">\n {format(new Date(), 'dd')}\n </Typography>\n <Typography className=\"text-15 leading-none\" color=\"text.secondary\">\n th\n </Typography>\n <Typography className=\"text-5xl leading-none\" color=\"text.secondary\">\n {format(new Date(), 'MMMM')}\n </Typography>\n </div>\n </div>\n <Divider />\n <List>\n <ListSubheader component=\"div\">Events</ListSubheader>\n {data &&\n (data as any).events.map((event: any) => (\n <ListItem key={event.id}>\n <ListItemText primary={event.title} secondary={event.detail} />\n </ListItem>\n ))}\n </List>\n <Divider />\n <List>\n <ListSubheader component=\"div\">Notes</ListSubheader>\n {data &&\n (data as any).notes.map((note: any) => (\n <ListItem key={note.id}>\n <ListItemText primary={note.title} secondary={note.detail} />\n </ListItem>\n ))}\n </List>\n <Divider />\n <List>\n <ListSubheader component=\"div\">Quick Settings</ListSubheader>\n <ListItem>\n <ListItemIcon className=\"min-w-36\">\n <OwpSvgIcon>material-outline:notifications</OwpSvgIcon>\n </ListItemIcon>\n <ListItemText primary=\"Notifications\" />\n <ListItemSecondaryAction>\n <Switch\n color=\"primary\"\n onChange={handleToggle('notifications')}\n checked={checked.indexOf('notifications') !== -1}\n />\n </ListItemSecondaryAction>\n </ListItem>\n <ListItem>\n <ListItemIcon className=\"min-w-36\">\n <OwpSvgIcon>material-outline:cloud</OwpSvgIcon>\n </ListItemIcon>\n <ListItemText primary=\"Cloud Sync\" />\n <ListItemSecondaryAction>\n <Switch\n color=\"secondary\"\n onChange={handleToggle('cloudSync')}\n checked={checked.indexOf('cloudSync') !== -1}\n />\n </ListItemSecondaryAction>\n </ListItem>\n <ListItem>\n <ListItemIcon className=\"min-w-36\">\n <OwpSvgIcon>material-outline:brightness_high</OwpSvgIcon>\n </ListItemIcon>\n <ListItemText primary=\"Retro Thrusters\" />\n <ListItemSecondaryAction>\n <Switch\n color=\"primary\"\n onChange={handleToggle('retroThrusters')}\n checked={checked.indexOf('retroThrusters') !== -1}\n />\n </ListItemSecondaryAction>\n </ListItem>\n </List>\n </OwpScrollbars>\n </StyledSwipeableDrawer>\n );\n}\n\nexport default QuickPanel;\n"],"names":["StyledSwipeableDrawer","styled","SwipeableDrawer","QuickPanel","dispatch","useAppDispatch","data","useAppSelector","selectQuickPanelData","open","selectQuickPanelOpen","checked","setChecked","useState","handleToggle","__name","value","currentIndex","newChecked","jsx","toggleQuickPanel","OwpScrollbars","ListSubheader","jsxs","Typography","format","Divider","List","event","ListItem","ListItemText","note","ListItemIcon","OwpSvgIcon","ListItemSecondaryAction","Switch"],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAMA,IAAwBC,EAAOC,CAAe,EAAE,OAAO;AAAA,EAC3D,sBAAsB;AAAA,IACpB,OAAO;AAAA,EAAA;AAEX,EAAE;AAKF,SAASC,IAAa;AACpB,QAAMC,IAAWC,EAAA,GACXC,IAAOC,EAAeC,CAAoB,GAC1CC,IAAOF,EAAeG,CAAoB,GAE1C,CAACC,GAASC,CAAU,IAAIC,EAAmB,CAAC,eAAe,CAAC,GAE5DC,IAAe,gBAAAC,EAAA,CAACC,MAAkB,MAAM;AAC5C,UAAMC,IAAeN,EAAQ,QAAQK,CAAK,GACpCE,IAAa,CAAC,GAAGP,CAAO;AAE9B,IAAIM,MAAiB,KACnBC,EAAW,KAAKF,CAAK,IAErBE,EAAW,OAAOD,GAAc,CAAC,GAGnCL,EA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AACa,KAAa,WAAU,YACtB,UAAA,gBAAAb,EAACc,GAAA,EAAW,8CAAgC,EAAA,CAC9C;AAAA,YACA,gBAAAd,EAACW,GAAA,EAAa,SAAQ,kBAAA,CAAkB;AAAA,8BACvCI,GAAA,EACC,UAAA,gBAAAf;AAAA,cAACgB;AAAA,cAAA;AAAA,gBACC,OAAM;AAAA,gBACN,UAAUrB,EAAa,gBAAgB;AAAA,gBACvC,SAASH,EAAQ,QAAQ,gBAAgB,MAAM;AAAA,cAAA;AAAA,YAAA,EACjD,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;AAjHSI,EAAAZ,GAAA;"}
|
package/dist/colors.js
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
|
+
import { o } from "./owpDark-DAY0F6Ph.js";
|
|
1
2
|
const f = {
|
|
2
|
-
50: "#e5e6e8",
|
|
3
|
-
100: "#bec1c5",
|
|
4
|
-
200: "#92979f",
|
|
5
|
-
300: "#666d78",
|
|
6
|
-
400: "#464e5b",
|
|
7
|
-
500: "#252f3e",
|
|
8
|
-
600: "#212a38",
|
|
9
|
-
700: "#1b2330",
|
|
10
|
-
800: "#161d28",
|
|
11
|
-
900: "#0d121b",
|
|
12
|
-
A100: "#5d8eff",
|
|
13
|
-
A200: "#2a6aff",
|
|
14
|
-
A400: "#004af6",
|
|
15
|
-
A700: "#0042dd",
|
|
16
|
-
contrastDefaultColor: "light"
|
|
17
|
-
}, e = {
|
|
18
3
|
50: "#e4fafd",
|
|
19
4
|
100: "#bdf2fa",
|
|
20
5
|
200: "#91e9f7",
|
|
@@ -32,7 +17,7 @@ const f = {
|
|
|
32
17
|
contrastDefaultColor: "dark"
|
|
33
18
|
};
|
|
34
19
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
o as owpDark,
|
|
21
|
+
f as skyBlue
|
|
37
22
|
};
|
|
38
23
|
//# sourceMappingURL=colors.js.map
|
package/dist/colors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sources":["../src/colors/
|
|
1
|
+
{"version":3,"file":"colors.js","sources":["../src/colors/skyBlue.ts"],"sourcesContent":["/**\n * The skyBlue object is a color palette for the Owp application.\n */\nexport const skyBlue = {\n 50: '#e4fafd',\n 100: '#bdf2fa',\n 200: '#91e9f7',\n 300: '#64e0f3',\n 400: '#43daf1',\n 500: '#22d3ee',\n 600: '#1eceec',\n 700: '#19c8e9',\n 800: '#14c2e7',\n 900: '#0cb7e2',\n A100: '#ffffff',\n A200: '#daf7ff',\n A400: '#a7ecff',\n A700: '#8de6ff',\n contrastDefaultColor: 'dark',\n};\n"],"names":["skyBlue"],"mappings":";AAGO,MAAMA,IAAU;AAAA,EACrB,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,sBAAsB;AACxB;"}
|
package/dist/constants.js
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
currentLanguage: "CurrentLanguage"
|
|
6
|
-
}, _ = E.accessToken, T = E.currentLanguage;
|
|
1
|
+
import { e as A, d as T, a as R, c as G, D as a, b as C, S as s } from "./storageKeys-C6xHFiTo.js";
|
|
2
|
+
import { C as D, L as N, S as O } from "./localStorageKeys-Che0CNci.js";
|
|
3
|
+
import { T as U, a as F, b as H, c as o } from "./treeGrid-DtKg-9uf.js";
|
|
4
|
+
const E = ["kr", "en", "lc"];
|
|
7
5
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
D as CURRENT_LANGUAGE,
|
|
7
|
+
A as DEFAULT_CELL_ALIGNMENT,
|
|
8
|
+
T as DEFAULT_HEADER_FILL,
|
|
9
|
+
R as DEFAULT_HEADER_FONT,
|
|
10
|
+
G as DEFAULT_THIN_BORDER,
|
|
11
|
+
a as DEFAULT_VALUE_FONT,
|
|
12
|
+
C as DEFAULT_WRAP_CELL_ALIGNMENT,
|
|
13
|
+
E as FALLBACK_LANGUAGE_LIST,
|
|
14
|
+
N as LOCAL_STORAGE_KEYS,
|
|
15
|
+
O as STORAGE_ACCESS_TOKEN_KEY,
|
|
16
|
+
s as STORAGE_KEYS,
|
|
17
|
+
U as TREEGRID_CELL_HIGHLIGHT_CLASS,
|
|
18
|
+
F as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
19
|
+
H as TREEGRID_INPUT_CELL_COLOR,
|
|
20
|
+
o as TREEGRID_WARNING_CELL_COLOR
|
|
23
21
|
};
|
|
24
22
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../src/constants/language.ts"
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../src/constants/language.ts"],"sourcesContent":["export const FALLBACK_LANGUAGE_LIST = ['kr', 'en', 'lc'];\n"],"names":["FALLBACK_LANGUAGE_LIST"],"mappings":";;;AAAO,MAAMA,IAAyB,CAAC,MAAM,MAAM,IAAI;"}
|
package/dist/context.js
CHANGED
|
@@ -1,29 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { O
|
|
4
|
-
import { a as
|
|
5
|
-
import { j as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { O as
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var s = (i, m) => d(i, "name", { value: m, configurable: !0 });
|
|
3
|
+
import { O, u as S } from "./useShortcuts-CCf98L8m.js";
|
|
4
|
+
import { a as nt } from "./useShortcuts-CCf98L8m.js";
|
|
5
|
+
import { j as o, a as h } from "./emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js";
|
|
6
|
+
import { H as L } from "./lazyLoadedSlices-DC7yg4GT.js";
|
|
7
|
+
import { StyledEngineProvider as w } from "@mui/material/styles";
|
|
8
|
+
import { QueryClient as C, QueryClientProvider as x } from "@tanstack/react-query";
|
|
9
|
+
import { useRef as p } from "react";
|
|
10
|
+
import { O as F } from "./OwpStoreProvider-Bx5p7ooQ.js";
|
|
11
|
+
import { m as f } from "./OwpUtils-C81bM1Gz.js";
|
|
12
|
+
import { O as A, a as y, b as T, C as j } from "./Close-DnXyQZKh.js";
|
|
13
|
+
import { u as z, a as D } from "./usePageLockLoading-BUI_3PlR.js";
|
|
14
|
+
import "@mui/material";
|
|
15
|
+
import { DialogsProvider as H } from "@toolpad/core/useDialogs";
|
|
16
|
+
import "react-i18next";
|
|
17
|
+
import "./useStorage-CuUmH4fD.js";
|
|
18
|
+
import "dayjs";
|
|
19
|
+
import "exceljs";
|
|
20
|
+
import { SnackbarProvider as I, closeSnackbar as N } from "notistack";
|
|
21
|
+
import "./storageKeys-C6xHFiTo.js";
|
|
22
|
+
import R from "@mui/material/IconButton";
|
|
23
|
+
function tt({
|
|
15
24
|
children: i,
|
|
16
25
|
queryClient: m,
|
|
17
26
|
queryClientConfig: t,
|
|
18
|
-
storePreloadedState:
|
|
19
|
-
styledEngineProviderProps:
|
|
20
|
-
...
|
|
27
|
+
storePreloadedState: e,
|
|
28
|
+
styledEngineProviderProps: u = { injectFirst: !0 },
|
|
29
|
+
...r
|
|
21
30
|
}) {
|
|
22
|
-
const n =
|
|
23
|
-
|
|
31
|
+
const c = p(void 0), n = p(void 0), a = m ?? c.current ?? (c.current = new C(t));
|
|
32
|
+
if (!n.current) {
|
|
33
|
+
const g = L(
|
|
34
|
+
r.configs.settingsConfig,
|
|
35
|
+
r.configs.themesConfig
|
|
36
|
+
);
|
|
37
|
+
n.current = f(
|
|
38
|
+
{},
|
|
39
|
+
{
|
|
40
|
+
owpSettings: {
|
|
41
|
+
initial: g,
|
|
42
|
+
defaults: f({}, g),
|
|
43
|
+
current: f({}, g)
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
e
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ o(O, { ...r, children: /* @__PURE__ */ o(F, { preloadedState: n.current, children: /* @__PURE__ */ o(x, { client: a, children: /* @__PURE__ */ o(w, { ...u, children: i }) }) }) });
|
|
24
50
|
}
|
|
25
|
-
|
|
26
|
-
const
|
|
51
|
+
s(tt, "OwpCoreProvider");
|
|
52
|
+
const l = {
|
|
27
53
|
maxSnack: 5,
|
|
28
54
|
autoHideDuration: 3e3,
|
|
29
55
|
anchorOrigin: {
|
|
@@ -37,38 +63,39 @@ const c = {
|
|
|
37
63
|
classes: {
|
|
38
64
|
containerRoot: "bottom-0 right-0 mb-52 md:mb-68 mr-8 lg:mr-80"
|
|
39
65
|
},
|
|
40
|
-
action: /* @__PURE__ */
|
|
66
|
+
action: /* @__PURE__ */ s((i) => /* @__PURE__ */ o(R, { onClick: /* @__PURE__ */ s(() => N(i), "onClick"), children: /* @__PURE__ */ o(j, { fontSize: "small", sx: { color: "#FFFFFF" } }) }), "action")
|
|
41
67
|
};
|
|
42
|
-
function
|
|
68
|
+
function ot({
|
|
43
69
|
children: i,
|
|
44
70
|
dialogsProviderProps: m,
|
|
45
71
|
snackbarProviderProps: t
|
|
46
72
|
}) {
|
|
47
|
-
const { env:
|
|
48
|
-
...
|
|
73
|
+
const { env: e } = S(), u = z(), r = D(), c = {
|
|
74
|
+
...l,
|
|
49
75
|
...t,
|
|
50
76
|
style: {
|
|
51
|
-
...
|
|
77
|
+
...l.style,
|
|
52
78
|
...t == null ? void 0 : t.style
|
|
53
79
|
},
|
|
54
80
|
classes: {
|
|
55
|
-
...
|
|
81
|
+
...l.classes,
|
|
56
82
|
...t == null ? void 0 : t.classes
|
|
57
83
|
},
|
|
58
|
-
action: (t == null ? void 0 : t.action) ??
|
|
59
|
-
},
|
|
60
|
-
return /* @__PURE__ */
|
|
84
|
+
action: (t == null ? void 0 : t.action) ?? l.action
|
|
85
|
+
}, n = Number(e == null ? void 0 : e.autoLogoutTimeout), a = Number.isFinite(n) ? n : void 0;
|
|
86
|
+
return r ? /* @__PURE__ */ o(A, { className: "min-h-screen" }) : /* @__PURE__ */ o(H, { ...m, children: /* @__PURE__ */ h(I, { ...c, children: [
|
|
61
87
|
i,
|
|
62
|
-
|
|
88
|
+
/* @__PURE__ */ o(y, { ...u }),
|
|
89
|
+
(e == null ? void 0 : e.isAutoLogoutEnabled) && /* @__PURE__ */ o(T, { timeout: a })
|
|
63
90
|
] }) });
|
|
64
91
|
}
|
|
65
|
-
|
|
92
|
+
s(ot, "OwpUiProvider");
|
|
66
93
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
94
|
+
nt as OwpAppContext,
|
|
95
|
+
O as OwpAppProvider,
|
|
96
|
+
tt as OwpCoreProvider,
|
|
97
|
+
F as OwpStoreProvider,
|
|
98
|
+
ot as OwpUiProvider,
|
|
99
|
+
S as useOwpAppContext
|
|
73
100
|
};
|
|
74
101
|
//# sourceMappingURL=context.js.map
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../src/context/OwpCoreProvider.tsx","../src/context/OwpUiProvider.tsx"],"sourcesContent":["import { StyledEngineProvider } from '@mui/material/styles';\nimport { QueryClient, QueryClientConfig, QueryClientProvider } from '@tanstack/react-query';\nimport { ComponentProps, useRef } from 'react';\nimport { OwpAppProvider, OwpAppProviderProps } from './OwpAppProvider';\nimport { OwpStoreProvider, OwpStoreProviderProps } from './OwpStoreProvider';\n\ntype OwpStyledEngineProviderProps = Omit<ComponentProps<typeof StyledEngineProvider>, 'children'>;\n\nexport interface OwpCoreProviderProps extends OwpAppProviderProps {\n queryClient?: QueryClient;\n queryClientConfig?: QueryClientConfig;\n storePreloadedState?: OwpStoreProviderProps['preloadedState'];\n styledEngineProviderProps?: OwpStyledEngineProviderProps;\n}\n\n/**\n * App, Redux, React Query provider composition\n * @param queryClient 외부 QueryClient 인스턴스\n * @param queryClientConfig QueryClient 생성 옵션\n * @param storePreloadedState 초기 Redux 상태\n * @param styledEngineProviderProps StyledEngineProvider 옵션\n */\nexport function OwpCoreProvider({\n children,\n queryClient,\n queryClientConfig,\n storePreloadedState,\n styledEngineProviderProps = { injectFirst: true },\n ...appProviderProps\n}: OwpCoreProviderProps) {\n const queryClientRef = useRef<QueryClient | undefined>(undefined);\n const client = queryClient ?? (queryClientRef.current ??= new QueryClient(queryClientConfig));\n\n return (\n <OwpAppProvider {...appProviderProps}>\n <OwpStoreProvider preloadedState={
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../src/context/OwpCoreProvider.tsx","../src/context/OwpUiProvider.tsx"],"sourcesContent":["import { createInitialOwpSettings } from '@/default-settings/OwpDefaultSettings';\nimport { StyledEngineProvider } from '@mui/material/styles';\nimport { QueryClient, QueryClientConfig, QueryClientProvider } from '@tanstack/react-query';\nimport { merge } from 'es-toolkit/compat';\nimport { ComponentProps, useRef } from 'react';\nimport { OwpAppProvider, OwpAppProviderProps } from './OwpAppProvider';\nimport { OwpStoreProvider, OwpStoreProviderProps } from './OwpStoreProvider';\n\ntype OwpStyledEngineProviderProps = Omit<ComponentProps<typeof StyledEngineProvider>, 'children'>;\n\nexport interface OwpCoreProviderProps extends OwpAppProviderProps {\n queryClient?: QueryClient;\n queryClientConfig?: QueryClientConfig;\n storePreloadedState?: OwpStoreProviderProps['preloadedState'];\n styledEngineProviderProps?: OwpStyledEngineProviderProps;\n}\n\n/**\n * App, Redux, React Query provider composition\n * @param queryClient 외부 QueryClient 인스턴스\n * @param queryClientConfig QueryClient 생성 옵션\n * @param storePreloadedState 초기 Redux 상태\n * @param styledEngineProviderProps StyledEngineProvider 옵션\n */\nexport function OwpCoreProvider({\n children,\n queryClient,\n queryClientConfig,\n storePreloadedState,\n styledEngineProviderProps = { injectFirst: true },\n ...appProviderProps\n}: OwpCoreProviderProps) {\n const queryClientRef = useRef<QueryClient | undefined>(undefined);\n const preloadedStateRef = useRef<OwpStoreProviderProps['preloadedState'] | undefined>(undefined);\n const client = queryClient ?? (queryClientRef.current ??= new QueryClient(queryClientConfig));\n\n if (!preloadedStateRef.current) {\n const initialSettings = createInitialOwpSettings(\n appProviderProps.configs.settingsConfig,\n appProviderProps.configs.themesConfig,\n );\n\n preloadedStateRef.current = merge(\n {},\n {\n owpSettings: {\n initial: initialSettings,\n defaults: merge({}, initialSettings),\n current: merge({}, initialSettings),\n },\n },\n storePreloadedState,\n );\n }\n\n return (\n <OwpAppProvider {...appProviderProps}>\n <OwpStoreProvider preloadedState={preloadedStateRef.current}>\n <QueryClientProvider client={client}>\n <StyledEngineProvider {...styledEngineProviderProps}>{children}</StyledEngineProvider>\n </QueryClientProvider>\n </OwpStoreProvider>\n </OwpAppProvider>\n );\n}\n","import { OwpAutoLogoutDialog } from '@/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog';\nimport { OwpLoading } from '@/components/OwpLoading';\nimport { OwpPageLockLoading } from '@/components/OwpPageLockLoading';\nimport { useAccessTokenGuard, useGetPageLockLoading } from '@/hooks';\nimport CloseIcon from '@mui/icons-material/Close';\nimport IconButton from '@mui/material/IconButton';\nimport { DialogsProvider } from '@toolpad/core/useDialogs';\nimport { closeSnackbar, SnackbarKey, SnackbarProvider } from 'notistack';\nimport { ComponentProps, ReactNode } from 'react';\nimport { useOwpAppContext } from './OwpAppProvider';\n\ntype OwpDialogsProviderProps = Omit<ComponentProps<typeof DialogsProvider>, 'children'>;\ntype OwpSnackbarProviderProps = Omit<ComponentProps<typeof SnackbarProvider>, 'children'>;\n\nexport interface OwpUiProviderProps {\n children?: ReactNode;\n dialogsProviderProps?: OwpDialogsProviderProps;\n snackbarProviderProps?: OwpSnackbarProviderProps;\n}\n\nconst defaultSnackbarProviderProps: OwpSnackbarProviderProps = {\n maxSnack: 5,\n autoHideDuration: 3000,\n anchorOrigin: {\n vertical: 'top',\n horizontal: 'center',\n },\n style: {\n fontSize: '1.25rem',\n lineHeight: '1.75rem',\n },\n classes: {\n containerRoot: 'bottom-0 right-0 mb-52 md:mb-68 mr-8 lg:mr-80',\n },\n action: (snackbarKey: SnackbarKey) => (\n <IconButton onClick={() => closeSnackbar(snackbarKey)}>\n <CloseIcon fontSize=\"small\" sx={{ color: '#FFFFFF' }} />\n </IconButton>\n ),\n};\n\n/**\n * Dialog, snackbar provider composition\n * @param dialogsProviderProps DialogsProvider 옵션\n * @param snackbarProviderProps SnackbarProvider 옵션\n */\nexport function OwpUiProvider({\n children,\n dialogsProviderProps,\n snackbarProviderProps,\n}: OwpUiProviderProps) {\n const { env } = useOwpAppContext();\n const pageLockLoadingProps = useGetPageLockLoading();\n const shouldRedirectToLogin = useAccessTokenGuard();\n const resolvedSnackbarProviderProps: OwpSnackbarProviderProps = {\n ...defaultSnackbarProviderProps,\n ...snackbarProviderProps,\n style: {\n ...defaultSnackbarProviderProps.style,\n ...snackbarProviderProps?.style,\n },\n classes: {\n ...defaultSnackbarProviderProps.classes,\n ...snackbarProviderProps?.classes,\n },\n action: snackbarProviderProps?.action ?? defaultSnackbarProviderProps.action,\n };\n const resolvedAutoLogoutTimeout = Number(env?.autoLogoutTimeout);\n const autoLogoutTimeout = Number.isFinite(resolvedAutoLogoutTimeout)\n ? resolvedAutoLogoutTimeout\n : undefined;\n\n if (shouldRedirectToLogin) {\n return <OwpLoading className=\"min-h-screen\" />;\n }\n\n return (\n <DialogsProvider {...dialogsProviderProps}>\n <SnackbarProvider {...resolvedSnackbarProviderProps}>\n {children}\n <OwpPageLockLoading {...pageLockLoadingProps} />\n {env?.isAutoLogoutEnabled && <OwpAutoLogoutDialog timeout={autoLogoutTimeout} />}\n </SnackbarProvider>\n </DialogsProvider>\n );\n}\n"],"names":["OwpCoreProvider","children","queryClient","queryClientConfig","storePreloadedState","styledEngineProviderProps","appProviderProps","queryClientRef","useRef","preloadedStateRef","client","QueryClient","initialSettings","createInitialOwpSettings","merge","OwpAppProvider","jsx","OwpStoreProvider","QueryClientProvider","StyledEngineProvider","__name","defaultSnackbarProviderProps","snackbarKey","IconButton","closeSnackbar","CloseIcon","OwpUiProvider","dialogsProviderProps","snackbarProviderProps","env","useOwpAppContext","pageLockLoadingProps","useGetPageLockLoading","shouldRedirectToLogin","useAccessTokenGuard","resolvedSnackbarProviderProps","resolvedAutoLogoutTimeout","autoLogoutTimeout","OwpLoading","DialogsProvider","jsxs","SnackbarProvider","OwpPageLockLoading","OwpAutoLogoutDialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwBO,SAASA,GAAgB;AAAA,EAC9B,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,2BAAAC,IAA4B,EAAE,aAAa,GAAA;AAAA,EAC3C,GAAGC;AACL,GAAyB;AACvB,QAAMC,IAAiBC,EAAgC,MAAS,GAC1DC,IAAoBD,EAA4D,MAAS,GACzFE,IAASR,KAAgBK,EAAe,YAAfA,EAAe,UAAY,IAAII,EAAYR,CAAiB;AAE3F,MAAI,CAACM,EAAkB,SAAS;AAC9B,UAAMG,IAAkBC;AAAA,MACtBP,EAAiB,QAAQ;AAAA,MACzBA,EAAiB,QAAQ;AAAA,IAAA;AAG3B,IAAAG,EAAkB,UAAUK;AAAA,MAC1B,CAAA;AAAA,MACA;AAAA,QACE,aAAa;AAAA,UACX,SAASF;AAAA,UACT,UAAUE,EAAM,CAAA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;AAAA,IAE5B,SAAQA,KAAA,gBAAAA,EAAuB,WAAUP,EAA6B;AAAA,EAAA,GAElEe,IAA4B,OAAOP,KAAA,gBAAAA,EAAK,iBAAiB,GACzDQ,IAAoB,OAAO,SAASD,CAAyB,IAC/DA,IACA;AAEJ,SAAIH,IACK,gBAAAjB,EAACsB,GAAA,EAAW,WAAU,eAAA,CAAe,sBAI3CC,GAAA,EAAiB,GAAGZ,GACnB,UAAA,gBAAAa,EAACC,GAAA,EAAkB,GAAGN,GACnB,UAAA;AAAA,IAAAlC;AAAA,IACD,gBAAAe,EAAC0B,GAAA,EAAoB,GAAGX,GAAsB;AAAA,KAC7CF,KAAA,gBAAAA,EAAK,wBAAuB,gBAAAb,EAAC2B,GAAA,EAAoB,SAASN,EAAA,CAAmB;AAAA,EAAA,EAAA,CAChF,EAAA,CACF;AAEJ;AAvCgBjB,EAAAM,IAAA;"}
|
package/dist/hooks.js
CHANGED
|
@@ -1,112 +1,82 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const N = "/auth/login", U = "Message.로그인이 필요합니다.", B = /* @__PURE__ */ o(({
|
|
17
|
-
loginPath: e = N,
|
|
18
|
-
isEnabled: t,
|
|
19
|
-
snackbarMessageKey: s = U
|
|
20
|
-
} = {}) => {
|
|
21
|
-
const { env: r } = I(), n = _(), u = M(), a = typeof window > "u" ? null : window.localStorage.getItem(l), c = n.pathname.startsWith(e), C = (t ?? (r == null ? void 0 : r.isAccessTokenGuardEnabled) ?? !0) && !a && !c, E = f(!1);
|
|
22
|
-
return i(() => {
|
|
23
|
-
if (!C) {
|
|
24
|
-
E.current = !1;
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
E.current || (E.current = !0, u(e, {
|
|
28
|
-
replace: !0,
|
|
29
|
-
state: s ? {
|
|
30
|
-
snackbarMessageKey: s
|
|
31
|
-
} : void 0
|
|
32
|
-
}));
|
|
33
|
-
}, [e, u, C, s]), C;
|
|
34
|
-
}, "useAccessTokenGuard"), A = L(
|
|
35
|
-
p.currentUser,
|
|
36
|
-
void 0
|
|
37
|
-
), F = /* @__PURE__ */ o(() => d(A), "useGetCurrentUser"), Y = /* @__PURE__ */ o(() => O(A), "useSetCurrentUser"), D = L(p.currentUserId, ""), j = /* @__PURE__ */ o(() => d(D), "useGetCurrentUserId"), H = /* @__PURE__ */ o(() => O(D), "useSetCurrentUserId"), G = L(
|
|
38
|
-
p.lockLoadingProps,
|
|
39
|
-
{ loading: !1 }
|
|
40
|
-
), W = /* @__PURE__ */ o(() => d(G), "useGetPageLockLoading"), $ = /* @__PURE__ */ o(() => ({ setLoading: O(G) }), "usePageLockLoading");
|
|
41
|
-
function q(e) {
|
|
42
|
-
const t = f();
|
|
43
|
-
return i(() => {
|
|
44
|
-
t.current = e;
|
|
45
|
-
}, [e]), t.current;
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var n = (s, e) => p(s, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { b as O } from "./useShortcuts-CCf98L8m.js";
|
|
4
|
+
import { d, f as P, h as T, j as x, e as _, l as h, o as X, n as k, c as A, g as U, i as b, k as v, m as j, p as l, q as y } from "./useShortcuts-CCf98L8m.js";
|
|
5
|
+
import { a as K, b as $, u as q, d as w, c as z } from "./usePageLockLoading-BUI_3PlR.js";
|
|
6
|
+
import { u as Q, b as H, c as J, a as R, d as V, e as W } from "./useTreeGridExcelExport-N2nOKmkz.js";
|
|
7
|
+
import { useRef as i, useEffect as a } from "react";
|
|
8
|
+
import { g as Z, s as ee, u as se } from "./useStorage-CuUmH4fD.js";
|
|
9
|
+
import { s as E } from "./treeGridUtil-WTM_djsN.js";
|
|
10
|
+
import { FALLBACK_LANGUAGE_LIST as te } from "./constants.js";
|
|
11
|
+
function M(s) {
|
|
12
|
+
const e = i();
|
|
13
|
+
return a(() => {
|
|
14
|
+
e.current = s;
|
|
15
|
+
}, [s]), e.current;
|
|
46
16
|
}
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
!r || !u ||
|
|
17
|
+
n(M, "usePrevious");
|
|
18
|
+
const G = /* @__PURE__ */ n((s, e, o, r) => {
|
|
19
|
+
const t = O(), u = t == null ? void 0 : t[o];
|
|
20
|
+
a(() => {
|
|
21
|
+
!r || !u || E(
|
|
22
|
+
s,
|
|
52
23
|
e,
|
|
53
|
-
t,
|
|
54
24
|
u,
|
|
55
25
|
"IPX_COMMONCODE.CODEID",
|
|
56
26
|
["IPX_COMMONCODE.CODENM", "IPX_COMMONCODE.CODEID"]
|
|
57
27
|
);
|
|
58
|
-
}, [
|
|
59
|
-
}, "useTreeGridCommonCodeEnum"),
|
|
60
|
-
const r =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
!
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
28
|
+
}, [o, e, s, r, u]);
|
|
29
|
+
}, "useTreeGridCommonCodeEnum"), I = /* @__PURE__ */ n((s, e, o) => {
|
|
30
|
+
const r = O(), t = i(e), u = e.map(({ field: C, codeId: m }) => `${C}:${m}`).join("|");
|
|
31
|
+
a(() => {
|
|
32
|
+
t.current = e;
|
|
33
|
+
}, [e]), a(() => {
|
|
34
|
+
!o || !r || t.current.forEach(({ field: C, codeId: m }) => {
|
|
35
|
+
const c = r[m];
|
|
36
|
+
c && E(
|
|
37
|
+
s,
|
|
38
|
+
C,
|
|
39
|
+
c,
|
|
70
40
|
"IPX_COMMONCODE.CODEID",
|
|
71
41
|
["IPX_COMMONCODE.CODENM", "IPX_COMMONCODE.CODEID"]
|
|
72
42
|
);
|
|
73
43
|
});
|
|
74
|
-
}, [r, u,
|
|
44
|
+
}, [r, u, s, o]);
|
|
75
45
|
}, "useTreeGridCommonCodeEnums");
|
|
76
46
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
47
|
+
te as FALLBACK_LANGUAGE_LIST,
|
|
48
|
+
Z as getEnv,
|
|
49
|
+
ee as setEnv,
|
|
50
|
+
K as useAccessTokenGuard,
|
|
51
|
+
d as useConfirm,
|
|
52
|
+
Q as useDebounce,
|
|
53
|
+
H as useDeepCompareEffect,
|
|
54
|
+
J as useDeepCompareEffectNoCheck,
|
|
55
|
+
R as useDeepCompareMemoize,
|
|
56
|
+
O as useGetCommonCodeList,
|
|
57
|
+
P as useGetCurrentLanguage,
|
|
58
|
+
T as useGetCurrentLogoSrc,
|
|
59
|
+
x as useGetCurrentUser,
|
|
60
|
+
$ as useGetCurrentUserId,
|
|
61
|
+
_ as useGetLanguageList,
|
|
62
|
+
h as useGetNavigationList,
|
|
63
|
+
q as useGetPageLockLoading,
|
|
64
|
+
X as useGetShortcuts,
|
|
65
|
+
k as useOwpTranslation,
|
|
66
|
+
w as usePageLockLoading,
|
|
67
|
+
M as usePrevious,
|
|
68
|
+
A as useSetCommonCodeList,
|
|
69
|
+
U as useSetCurrentLanguage,
|
|
70
|
+
b as useSetCurrentLogoSrc,
|
|
71
|
+
v as useSetCurrentUser,
|
|
72
|
+
z as useSetCurrentUserId,
|
|
73
|
+
j as useSetNavigationList,
|
|
74
|
+
l as useSetShortcuts,
|
|
75
|
+
se as useStorage,
|
|
76
|
+
V as useThemeMediaQuery,
|
|
77
|
+
y as useTimeout,
|
|
78
|
+
G as useTreeGridCommonCodeEnum,
|
|
79
|
+
I as useTreeGridCommonCodeEnums,
|
|
80
|
+
W as useTreeGridExcelExport
|
|
111
81
|
};
|
|
112
82
|
//# sourceMappingURL=hooks.js.map
|
package/dist/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":["../src/hooks/usePrevious.ts","../src/hooks/useTreeGridCommonCodeEnum.ts","../src/hooks/useTreeGridCommonCodeEnums.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\n/**\n * The usePrevious function is a custom hook that returns the previous value of a variable.\n * It takes in a value as a parameter and returns the previous value.\n */\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>();\n\n // Store current value in ref\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n","import { useGetCommonCodeList } from '@/hooks/useCommonCodeList';\nimport { setTreeGridColumnEnumOptionsById } from '@/utils/treeGridUtil';\nimport { useEffect } from 'react';\n\n/**\n * TreeGrid 공통코드 Enum 옵션 반영\n * @param id TreeGrid 인스턴스 ID\n * @param field Enum을 반영할 컬럼명\n * @param codeId 공통코드 그룹 ID\n * @param isGridReady TreeGrid 준비 여부\n */\nexport const useTreeGridCommonCodeEnum = (\n id: string,\n field: string,\n codeId: string,\n isGridReady: boolean,\n) => {\n const commonCodeMap = useGetCommonCodeList();\n const options = commonCodeMap?.[codeId];\n\n useEffect(() => {\n if (!isGridReady || !options) {\n return;\n }\n\n setTreeGridColumnEnumOptionsById(\n id,\n field,\n options,\n 'IPX_COMMONCODE.CODEID',\n ['IPX_COMMONCODE.CODENM', 'IPX_COMMONCODE.CODEID'],\n );\n }, [codeId, field, id, isGridReady, options]);\n};\n","import { useGetCommonCodeList } from '@/hooks/useCommonCodeList';\nimport { setTreeGridColumnEnumOptionsById } from '@/utils/treeGridUtil';\nimport { useEffect, useRef } from 'react';\n\n/**\n * TreeGrid 공통코드 Enum 옵션 정보\n * @param field Enum을 반영할 컬럼명\n * @param codeId 공통코드 그룹 ID\n */\nexport interface TreeGridCommonCodeEnumConfig {\n field: string;\n codeId: string;\n}\n\n/**\n * TreeGrid 공통코드 Enum 옵션 일괄 반영\n * @param id TreeGrid 인스턴스 ID\n * @param configs Enum 반영 대상 목록\n * @param isGridReady TreeGrid 준비 여부\n */\nexport const useTreeGridCommonCodeEnums = (\n id: string,\n configs: TreeGridCommonCodeEnumConfig[],\n isGridReady: boolean,\n) => {\n const commonCodeMap = useGetCommonCodeList();\n const configsRef = useRef(configs);\n const configDependencyKey = configs.map(({ field, codeId }) => `${field}:${codeId}`).join('|');\n\n useEffect(() => {\n configsRef.current = configs;\n }, [configs]);\n\n useEffect(() => {\n if (!isGridReady || !commonCodeMap) {\n return;\n }\n\n configsRef.current.forEach(({ field, codeId }) => {\n const options = commonCodeMap[codeId];\n\n if (!options) {\n return;\n }\n\n setTreeGridColumnEnumOptionsById(\n id,\n field,\n options,\n 'IPX_COMMONCODE.CODEID',\n ['IPX_COMMONCODE.CODENM', 'IPX_COMMONCODE.CODEID'],\n );\n });\n }, [commonCodeMap, configDependencyKey, id, isGridReady]);\n};\n"],"names":["usePrevious","value","ref","useRef","useEffect","__name","useTreeGridCommonCodeEnum","id","field","codeId","isGridReady","commonCodeMap","useGetCommonCodeList","options","setTreeGridColumnEnumOptionsById","useTreeGridCommonCodeEnums","configs","configsRef","configDependencyKey"],"mappings":";;;;;;;;;;AAMO,SAASA,EAAeC,GAAyB;AACtD,QAAMC,IAAMC,EAAA;AAGZ,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAI,UAAUD;AAAA,EAChB,GAAG,CAACA,CAAK,CAAC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