@owp/core 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/_virtual/index5.js +2 -2
- package/dist/components/OwpPageBreadcrumb/OwpPageBreadcrumb.js +39 -32
- package/dist/components/OwpPageBreadcrumb/OwpPageBreadcrumb.js.map +1 -1
- package/dist/hooks/useFormDataUploadMutation.js +27 -0
- package/dist/hooks/useFormDataUploadMutation.js.map +1 -0
- package/dist/hooks.js +63 -61
- package/dist/hooks.js.map +1 -1
- package/dist/layout/components/navbar/NavbarToggleButton.js +21 -22
- package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +41 -37
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/layout/components/toolbar/ToolbarLayout.js +57 -69
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useFormDataUploadMutation.d.ts +29 -0
- package/dist/types/utils/createFormDataBody.d.ts +20 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/zipUtil.d.ts +13 -0
- package/dist/utils/createFormDataBody.js +21 -0
- package/dist/utils/createFormDataBody.js.map +1 -0
- package/dist/utils/zipUtil.js +42 -29
- package/dist/utils/zipUtil.js.map +1 -1
- package/dist/utils.js +87 -82
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index12.js
CHANGED
package/dist/_virtual/index13.js
CHANGED
package/dist/_virtual/index14.js
CHANGED
package/dist/_virtual/index15.js
CHANGED
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 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=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 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=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 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=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 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=index19.js.map
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,86 +1,93 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var e = (a, i) => f(a, "name", { value: i, configurable: !0 });
|
|
3
3
|
import { jsxs as d, jsx as n } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
4
|
import { useGetCurrentUser as h } from "../../hooks/useCurrentUser.js";
|
|
5
5
|
import { useGetNavigationList as x } from "../../hooks/useNavigation.js";
|
|
6
6
|
import { useOwpTranslation as g } from "../../hooks/useOwpTranslation.js";
|
|
7
7
|
import { getStartPagePath as b } from "../../utils/getStartPagePath.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import y from "../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/NavigateNext.js";
|
|
9
|
+
import N from "@mui/material/Breadcrumbs";
|
|
10
|
+
import v from "@mui/material/IconButton";
|
|
11
11
|
import B from "@mui/material/Tooltip";
|
|
12
12
|
import I from "@mui/material/Typography";
|
|
13
13
|
import { alpha as P } from "@mui/material/styles";
|
|
14
|
-
import { clsx as
|
|
14
|
+
import { clsx as M } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
15
15
|
import { useMemo as S } from "react";
|
|
16
|
-
import { useMatches as
|
|
17
|
-
import { OwpSvgIcon as
|
|
18
|
-
function
|
|
19
|
-
const l = [],
|
|
20
|
-
for (const t of
|
|
21
|
-
if (l.push(t), t.url ===
|
|
16
|
+
import { useMatches as T, useNavigate as k, Link as w } from "react-router-dom";
|
|
17
|
+
import { OwpSvgIcon as z } from "../OwpSvgIcon/OwpSvgIcon.js";
|
|
18
|
+
function C(a, i) {
|
|
19
|
+
const l = [], o = /* @__PURE__ */ e((c, s) => {
|
|
20
|
+
for (const t of c) {
|
|
21
|
+
if (l.push(t), t.url === s || t.children && t.children.length > 0 && o(t.children, s))
|
|
22
22
|
return !0;
|
|
23
23
|
l.pop();
|
|
24
24
|
}
|
|
25
25
|
return !1;
|
|
26
26
|
}, "findItem");
|
|
27
|
-
return
|
|
27
|
+
return o(a, i), l;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
e(C, "findBreadcrumbPath");
|
|
30
30
|
function V(a) {
|
|
31
|
-
const { className:
|
|
32
|
-
var
|
|
33
|
-
const r = (
|
|
34
|
-
return
|
|
35
|
-
}, [
|
|
31
|
+
const { className: i, ...l } = a, o = T(), c = x(), s = k(), { t } = g(), u = h(), m = S(() => {
|
|
32
|
+
var p;
|
|
33
|
+
const r = (p = o[o.length - 1]) == null ? void 0 : p.pathname;
|
|
34
|
+
return C(c ?? [], r);
|
|
35
|
+
}, [o, c]);
|
|
36
36
|
return /* @__PURE__ */ d("div", { className: "inline-flex items-center gap-12", children: [
|
|
37
37
|
/* @__PURE__ */ n(B, { title: t("Button.홈으로"), placement: "bottom", children: /* @__PURE__ */ n(
|
|
38
|
-
|
|
38
|
+
v,
|
|
39
39
|
{
|
|
40
|
-
sx: /* @__PURE__ */
|
|
40
|
+
sx: /* @__PURE__ */ e((r) => ({
|
|
41
41
|
borderWidth: "1px",
|
|
42
42
|
borderStyle: "solid",
|
|
43
43
|
borderColor: P(r.palette.text.primary, 0.38),
|
|
44
|
-
color: r.palette.
|
|
44
|
+
color: r.palette.text.primary
|
|
45
45
|
}), "sx"),
|
|
46
|
-
onClick: /* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
onClick: /* @__PURE__ */ e(() => {
|
|
47
|
+
s(b(u), { replace: !0 });
|
|
48
48
|
}, "onClick"),
|
|
49
|
-
children: /* @__PURE__ */ n(
|
|
49
|
+
children: /* @__PURE__ */ n(z, { color: "inherit", size: 20, children: "heroicons-outline:home" })
|
|
50
50
|
}
|
|
51
51
|
) }),
|
|
52
52
|
/* @__PURE__ */ n(
|
|
53
|
-
|
|
53
|
+
N,
|
|
54
54
|
{
|
|
55
|
-
separator: /* @__PURE__ */ n(
|
|
56
|
-
className:
|
|
55
|
+
separator: /* @__PURE__ */ n(y, { fontSize: "large" }),
|
|
56
|
+
className: M("flex items-center w-full text-3xl", i),
|
|
57
57
|
"aria-label": "breadcrumb",
|
|
58
|
-
color: "secondary.contrastText",
|
|
59
58
|
sx: {
|
|
59
|
+
color: "text.primary",
|
|
60
60
|
"> .MuiBreadcrumbs-li": {
|
|
61
61
|
display: "inline-flex",
|
|
62
62
|
alignItems: "center"
|
|
63
|
+
},
|
|
64
|
+
"& .MuiTypography-root": {
|
|
65
|
+
color: "inherit"
|
|
66
|
+
},
|
|
67
|
+
"& a": {
|
|
68
|
+
color: "inherit",
|
|
69
|
+
textDecoration: "none"
|
|
63
70
|
}
|
|
64
71
|
},
|
|
65
72
|
...l,
|
|
66
73
|
children: m.map(
|
|
67
|
-
(r,
|
|
74
|
+
(r, p) => (r == null ? void 0 : r.title) !== "" && /* @__PURE__ */ n(
|
|
68
75
|
I,
|
|
69
76
|
{
|
|
70
|
-
component: r != null && r.url ?
|
|
77
|
+
component: r != null && r.url ? w : "span",
|
|
71
78
|
to: r == null ? void 0 : r.url,
|
|
72
79
|
className: "flex text-4xl font-medium tracking-[0.01em] capitalize truncate",
|
|
73
80
|
role: "button",
|
|
74
81
|
children: r == null ? void 0 : r.title
|
|
75
82
|
},
|
|
76
|
-
|
|
83
|
+
p
|
|
77
84
|
)
|
|
78
85
|
)
|
|
79
86
|
}
|
|
80
87
|
)
|
|
81
88
|
] });
|
|
82
89
|
}
|
|
83
|
-
|
|
90
|
+
e(V, "PageBreadcrumb");
|
|
84
91
|
export {
|
|
85
92
|
V as default
|
|
86
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpPageBreadcrumb.js","sources":["../../../src/components/OwpPageBreadcrumb/OwpPageBreadcrumb.tsx"],"sourcesContent":["import { OwpSvgIcon } from '@/components/OwpSvgIcon';\nimport { useGetCurrentUser } from '@/hooks/useCurrentUser';\nimport { useGetNavigationList } from '@/hooks/useNavigation';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport type { OwpNavItemType } from '@/types/OwpNavigationTypes';\nimport { getStartPagePath } from '@/utils/getStartPagePath';\nimport NavigateNextIcon from '@mui/icons-material/NavigateNext';\nimport Breadcrumbs, { BreadcrumbsProps } from '@mui/material/Breadcrumbs';\nimport IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport { alpha } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { Link, useMatches, useNavigate } from 'react-router-dom';\n\nexport type PageBreadcrumbProps = BreadcrumbsProps & {\n className?: string;\n};\n\nfunction findBreadcrumbPath(navigation: OwpNavItemType[], currentPath?: string): OwpNavItemType[] {\n const result: OwpNavItemType[] = [];\n\n const findItem = (items: OwpNavItemType[], path?: string): boolean => {\n for (const item of items) {\n \n result.push(item);\n\n \n if (item.url === path) {\n return true;\n }\n\n \n if (item.children && item.children.length > 0) {\n if (findItem(item.children, path)) {\n return true;\n }\n }\n\n \n result.pop();\n }\n\n return false;\n };\n\n findItem(navigation, currentPath);\n return result;\n}\n\nfunction PageBreadcrumb(props: PageBreadcrumbProps) {\n const { className, ...rest } = props;\n const matches = useMatches();\n\n const navigation = useGetNavigationList();\n const navigate = useNavigate();\n const { t } = useOwpTranslation();\n\n const currentUser = useGetCurrentUser();\n\n const crumbs = useMemo(() => {\n const currentPath = matches[matches.length - 1]?.pathname;\n return findBreadcrumbPath(navigation ?? [], currentPath);\n }, [matches, navigation]);\n\n return (\n <div className=\"inline-flex items-center gap-12\">\n <Tooltip title={t('Button.홈으로')} placement=\"bottom\">\n <IconButton\n sx={(theme) => ({\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: alpha(theme.palette.text.primary, 0.38),\n color: theme.palette.
|
|
1
|
+
{"version":3,"file":"OwpPageBreadcrumb.js","sources":["../../../src/components/OwpPageBreadcrumb/OwpPageBreadcrumb.tsx"],"sourcesContent":["import { OwpSvgIcon } from '@/components/OwpSvgIcon';\nimport { useGetCurrentUser } from '@/hooks/useCurrentUser';\nimport { useGetNavigationList } from '@/hooks/useNavigation';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport type { OwpNavItemType } from '@/types/OwpNavigationTypes';\nimport { getStartPagePath } from '@/utils/getStartPagePath';\nimport NavigateNextIcon from '@mui/icons-material/NavigateNext';\nimport Breadcrumbs, { BreadcrumbsProps } from '@mui/material/Breadcrumbs';\nimport IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport { alpha } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { Link, useMatches, useNavigate } from 'react-router-dom';\n\nexport type PageBreadcrumbProps = BreadcrumbsProps & {\n className?: string;\n};\n\nfunction findBreadcrumbPath(navigation: OwpNavItemType[], currentPath?: string): OwpNavItemType[] {\n const result: OwpNavItemType[] = [];\n\n const findItem = (items: OwpNavItemType[], path?: string): boolean => {\n for (const item of items) {\n \n result.push(item);\n\n \n if (item.url === path) {\n return true;\n }\n\n \n if (item.children && item.children.length > 0) {\n if (findItem(item.children, path)) {\n return true;\n }\n }\n\n \n result.pop();\n }\n\n return false;\n };\n\n findItem(navigation, currentPath);\n return result;\n}\n\nfunction PageBreadcrumb(props: PageBreadcrumbProps) {\n const { className, ...rest } = props;\n const matches = useMatches();\n\n const navigation = useGetNavigationList();\n const navigate = useNavigate();\n const { t } = useOwpTranslation();\n\n const currentUser = useGetCurrentUser();\n\n const crumbs = useMemo(() => {\n const currentPath = matches[matches.length - 1]?.pathname;\n return findBreadcrumbPath(navigation ?? [], currentPath);\n }, [matches, navigation]);\n\n return (\n <div className=\"inline-flex items-center gap-12\">\n <Tooltip title={t('Button.홈으로')} placement=\"bottom\">\n <IconButton\n sx={(theme) => ({\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: alpha(theme.palette.text.primary, 0.38),\n color: theme.palette.text.primary,\n })}\n onClick={() => {\n navigate(getStartPagePath(currentUser), { replace: true });\n }}\n >\n <OwpSvgIcon color=\"inherit\" size={20}>\n heroicons-outline:home\n </OwpSvgIcon>\n </IconButton>\n </Tooltip>\n <Breadcrumbs\n separator={<NavigateNextIcon fontSize=\"large\" />}\n className={clsx('flex items-center w-full text-3xl', className)}\n aria-label=\"breadcrumb\"\n sx={{\n color: 'text.primary',\n '> .MuiBreadcrumbs-li': {\n display: 'inline-flex',\n alignItems: 'center',\n },\n '& .MuiTypography-root': {\n color: 'inherit',\n },\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n },\n }}\n {...rest}\n >\n {crumbs.map(\n (item, index) =>\n item?.title !== '' && (\n <Typography\n component={item?.url ? Link : 'span'}\n to={item?.url}\n key={index}\n className=\"flex text-4xl font-medium tracking-[0.01em] capitalize truncate\"\n role=\"button\"\n >\n {item?.title}\n </Typography>\n ),\n )}\n </Breadcrumbs>\n </div>\n );\n}\n\nexport default PageBreadcrumb;\n"],"names":["findBreadcrumbPath","navigation","currentPath","result","findItem","__name","items","path","item","PageBreadcrumb","props","className","rest","matches","useMatches","useGetNavigationList","navigate","useNavigate","useOwpTranslation","currentUser","useGetCurrentUser","crumbs","useMemo","_a","jsxs","jsx","Tooltip","IconButton","theme","alpha","getStartPagePath","OwpSvgIcon","Breadcrumbs","NavigateNextIcon","clsx","index","Typography","Link"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,SAASA,EAAmBC,GAA8BC,GAAwC;AAChG,QAAMC,IAA2B,CAAA,GAE3BC,IAAW,gBAAAC,EAAA,CAACC,GAAyBC,MAA2B;AACpE,eAAWC,KAAQF,GAAO;AAUxB,UARAH,EAAO,KAAKK,CAAI,GAGZA,EAAK,QAAQD,KAKbC,EAAK,YAAYA,EAAK,SAAS,SAAS,KACtCJ,EAASI,EAAK,UAAUD,CAAI;AAC9B,eAAO;AAKX,MAAAJ,EAAO,IAAA;AAAA,IACT;AAEA,WAAO;AAAA,EACT,GAtBiB;AAwBjB,SAAAC,EAASH,GAAYC,CAAW,GACzBC;AACT;AA7BSE,EAAAL,GAAA;AA+BT,SAASS,EAAeC,GAA4B;AAClD,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAA,IAASF,GACzBG,IAAUC,EAAA,GAEVb,IAAac,EAAA,GACbC,IAAWC,EAAA,GACX,EAAE,EAAA,IAAMC,EAAA,GAERC,IAAcC,EAAA,GAEdC,IAASC,EAAQ,MAAM;;AAC3B,UAAMpB,KAAcqB,IAAAV,EAAQA,EAAQ,SAAS,CAAC,MAA1B,gBAAAU,EAA6B;AACjD,WAAOvB,EAAmBC,KAAc,CAAA,GAAIC,CAAW;AAAA,EACzD,GAAG,CAACW,GAASZ,CAAU,CAAC;AAExB,SACE,gBAAAuB,EAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAQ,OAAO,EAAE,YAAY,GAAG,WAAU,UACzC,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,IAAI,gBAAAtB,EAAA,CAACuB,OAAW;AAAA,UACd,aAAa;AAAA,UACb,aAAa;AAAA,UACb,aAAaC,EAAMD,EAAM,QAAQ,KAAK,SAAS,IAAI;AAAA,UACnD,OAAOA,EAAM,QAAQ,KAAK;AAAA,QAAA,IAJxB;AAAA,QAMJ,SAAS,gBAAAvB,EAAA,MAAM;AACb,UAAAW,EAASc,EAAiBX,CAAW,GAAG,EAAE,SAAS,IAAM;AAAA,QAC3D,GAFS;AAAA,QAIT,4BAACY,GAAA,EAAW,OAAM,WAAU,MAAM,IAAI,UAAA,yBAAA,CAEtC;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,IACA,gBAAAN;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,WAAW,gBAAAP,EAACQ,GAAA,EAAiB,UAAS,QAAA,CAAQ;AAAA,QAC9C,WAAWC,EAAK,qCAAqCvB,CAAS;AAAA,QAC9D,cAAW;AAAA,QACX,IAAI;AAAA,UACF,OAAO;AAAA,UACP,wBAAwB;AAAA,YACtB,SAAS;AAAA,YACT,YAAY;AAAA,UAAA;AAAA,UAEd,yBAAyB;AAAA,YACvB,OAAO;AAAA,UAAA;AAAA,UAET,OAAO;AAAA,YACL,OAAO;AAAA,YACP,gBAAgB;AAAA,UAAA;AAAA,QAClB;AAAA,QAED,GAAGC;AAAA,QAEH,UAAAS,EAAO;AAAA,UACN,CAACb,GAAM2B,OACL3B,KAAA,gBAAAA,EAAM,WAAU,MACd,gBAAAiB;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,WAAW5B,KAAA,QAAAA,EAAM,MAAM6B,IAAO;AAAA,cAC9B,IAAI7B,KAAA,gBAAAA,EAAM;AAAA,cAEV,WAAU;AAAA,cACV,MAAK;AAAA,cAEJ,UAAAA,KAAA,gBAAAA,EAAM;AAAA,YAAA;AAAA,YAJF2B;AAAA,UAAA;AAAA,QAKP;AAAA,MAEN;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;AAvES9B,EAAAI,GAAA;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var r = (a, o) => p(a, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { normalizeFormDataUploadParams as b, createFormDataBody as s } from "../utils/createFormDataBody.js";
|
|
4
|
+
import { useCallback as f } from "react";
|
|
5
|
+
const D = /* @__PURE__ */ r(({
|
|
6
|
+
formData: a
|
|
7
|
+
}) => a, "createDefaultVariables"), z = /* @__PURE__ */ r((a) => {
|
|
8
|
+
const { mutation: o, createVariables: t, fileNameFieldName: e } = a, l = f(
|
|
9
|
+
(i, c) => {
|
|
10
|
+
const m = b(i, { fileNameFieldName: e }), u = s(m), n = {
|
|
11
|
+
body: m,
|
|
12
|
+
formData: u,
|
|
13
|
+
bodySerializer: s
|
|
14
|
+
}, d = (t == null ? void 0 : t(n)) ?? D(n);
|
|
15
|
+
o.mutate(d, c);
|
|
16
|
+
},
|
|
17
|
+
[t, e, o]
|
|
18
|
+
);
|
|
19
|
+
return {
|
|
20
|
+
...o,
|
|
21
|
+
uploadFile: l
|
|
22
|
+
};
|
|
23
|
+
}, "useFormDataUploadMutation");
|
|
24
|
+
export {
|
|
25
|
+
z as useFormDataUploadMutation
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=useFormDataUploadMutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormDataUploadMutation.js","sources":["../../src/hooks/useFormDataUploadMutation.ts"],"sourcesContent":["import {\n createFormDataBody,\n normalizeFormDataUploadParams,\n type FormDataUploadBody,\n type FormDataUploadParams,\n type TAdditionalFields,\n} from '@/utils/createFormDataBody';\nimport { useCallback } from 'react';\n\nexport type {\n FormDataFieldValue,\n FormDataUploadBody,\n FormDataUploadParams,\n TAdditionalFields,\n} from '@/utils/createFormDataBody';\n\ntype FormDataUploadMutationLike = {\n mutate: (variables: unknown, options?: unknown) => void;\n};\n\ntype FormDataUploadMutationVariables<TMutation extends FormDataUploadMutationLike> =\n Parameters<TMutation['mutate']>[0];\n\ntype FormDataUploadMutateOptions<TMutation extends FormDataUploadMutationLike> =\n Parameters<TMutation['mutate']>[1];\n\nexport interface FormDataUploadMutationVariablesArgs<\n TFields extends TAdditionalFields = TAdditionalFields,\n> {\n body: FormDataUploadBody<TFields>;\n formData: FormData;\n bodySerializer: typeof createFormDataBody;\n}\n\ninterface UseFormDataUploadMutationBaseProps<TMutation extends FormDataUploadMutationLike> {\n mutation: TMutation;\n fileNameFieldName?: string;\n}\n\nexport type UseFormDataUploadMutationProps<\n TMutation extends FormDataUploadMutationLike,\n TFields extends TAdditionalFields = TAdditionalFields,\n> = FormDataUploadMutationVariables<TMutation> extends FormData\n ? UseFormDataUploadMutationBaseProps<TMutation> & {\n createVariables?: (\n args: FormDataUploadMutationVariablesArgs<TFields>,\n ) => FormDataUploadMutationVariables<TMutation>;\n }\n : UseFormDataUploadMutationBaseProps<TMutation> & {\n createVariables: (\n args: FormDataUploadMutationVariablesArgs<TFields>,\n ) => FormDataUploadMutationVariables<TMutation>;\n };\n\nexport type UseFormDataUploadMutationResult<\n TMutation extends FormDataUploadMutationLike,\n TFields extends TAdditionalFields = TAdditionalFields,\n> = TMutation & {\n uploadFile: (\n params: FormDataUploadParams<TFields>,\n options?: FormDataUploadMutateOptions<TMutation>,\n ) => void;\n};\n\nconst createDefaultVariables = <TMutation extends FormDataUploadMutationLike>({\n formData,\n}: FormDataUploadMutationVariablesArgs) => {\n return formData as FormDataUploadMutationVariables<TMutation>;\n};\n\n/**\n * FormData 업로드 mutation 어댑터 훅\n * @param props mutation 객체 및 변수 생성기\n */\nexport const useFormDataUploadMutation = <\n TMutation extends FormDataUploadMutationLike,\n TFields extends TAdditionalFields = TAdditionalFields,\n>(\n props: UseFormDataUploadMutationProps<TMutation, TFields>,\n): UseFormDataUploadMutationResult<TMutation, TFields> => {\n const { mutation, createVariables, fileNameFieldName } = props;\n\n const uploadFile = useCallback(\n (\n params: FormDataUploadParams<TFields>,\n options?: FormDataUploadMutateOptions<TMutation>,\n ) => {\n const body = normalizeFormDataUploadParams(params, { fileNameFieldName });\n const formData = createFormDataBody(body);\n const variablesArgs: FormDataUploadMutationVariablesArgs<TFields> = {\n body,\n formData,\n bodySerializer: createFormDataBody,\n };\n const nextVariables =\n createVariables?.(variablesArgs) ?? createDefaultVariables<TMutation>(variablesArgs);\n\n mutation.mutate(nextVariables, options);\n },\n [createVariables, fileNameFieldName, mutation],\n );\n\n return {\n ...mutation,\n uploadFile,\n };\n};\n"],"names":["createDefaultVariables","__name","formData","useFormDataUploadMutation","props","mutation","createVariables","fileNameFieldName","uploadFile","useCallback","params","options","body","normalizeFormDataUploadParams","createFormDataBody","variablesArgs","nextVariables"],"mappings":";;;;AAgEA,MAAMA,IAAyB,gBAAAC,EAAA,CAA+C;AAAA,EAC5E,UAAAC;AACF,MACSA,GAHsB,2BAUlBC,IAA4B,gBAAAF,EAAA,CAIvCG,MACwD;AACxD,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,EAAA,IAAsBH,GAEnDI,IAAaC;AAAA,IACjB,CACEC,GACAC,MACG;AACH,YAAMC,IAAOC,EAA8BH,GAAQ,EAAE,mBAAAH,GAAmB,GAClEL,IAAWY,EAAmBF,CAAI,GAClCG,IAA8D;AAAA,QAClE,MAAAH;AAAA,QACA,UAAAV;AAAA,QACA,gBAAgBY;AAAA,MAAA,GAEZE,KACJV,KAAA,gBAAAA,EAAkBS,OAAkBf,EAAkCe,CAAa;AAErF,MAAAV,EAAS,OAAOW,GAAeL,CAAO;AAAA,IACxC;AAAA,IACA,CAACL,GAAiBC,GAAmBF,CAAQ;AAAA,EAAA;AAG/C,SAAO;AAAA,IACL,GAAGA;AAAA,IACH,YAAAG;AAAA,EAAA;AAEJ,GAhCyC;"}
|
package/dist/hooks.js
CHANGED
|
@@ -1,85 +1,87 @@
|
|
|
1
1
|
import { useGetCommonCodeList as t, useSetCommonCodeList as o } from "./hooks/useCommonCodeList.js";
|
|
2
2
|
import { useAccessTokenGuard as u } from "./hooks/useAccessTokenGuard.js";
|
|
3
3
|
import { useConfirm as n } from "./hooks/useConfirm.js";
|
|
4
|
-
import { useGetCurrentLanguage as
|
|
4
|
+
import { useGetCurrentLanguage as p, useGetLanguageList as f, useSetCurrentLanguage as i } from "./hooks/useCurrentLanguage.js";
|
|
5
5
|
import { useGetLogoSrc as C, useSetLogoSrc as S } from "./hooks/useLogoSrc.js";
|
|
6
6
|
import { useGetCurrentUser as g, useSetCurrentUser as L } from "./hooks/useCurrentUser.js";
|
|
7
|
-
import { useGetCurrentUserId as
|
|
8
|
-
import { useEnsureCurrentUserSeq as h, useGetCurrentUserSeq as l, useSetCurrentUserSeq as
|
|
7
|
+
import { useGetCurrentUserId as c, useSetCurrentUserId as T } from "./hooks/useCurrentUserId.js";
|
|
8
|
+
import { useEnsureCurrentUserSeq as h, useGetCurrentUserSeq as l, useSetCurrentUserSeq as U } from "./hooks/useCurrentUserSeq.js";
|
|
9
9
|
import { useDebounce as b } from "./hooks/useDebounce.js";
|
|
10
|
-
import { useDeepCompareEffect as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
10
|
+
import { useDeepCompareEffect as D, useDeepCompareEffectNoCheck as N, useDeepCompareMemoize as I } from "./hooks/useDeepCompareEffect.js";
|
|
11
|
+
import { useFormDataUploadMutation as M } from "./hooks/useFormDataUploadMutation.js";
|
|
12
|
+
import { useHeaderWrapState as w } from "./hooks/useHeaderWrapState.js";
|
|
13
|
+
import { useInitApp as O } from "./hooks/useInitApp.js";
|
|
14
|
+
import { useInitCommonCodes as y } from "./hooks/useInitCommonCodes.js";
|
|
15
|
+
import { useGetNavbar as z, useNavbarActions as B } from "./hooks/useNavbar.js";
|
|
16
|
+
import { useGetNavigationList as K, useSetNavigationList as Q } from "./hooks/useNavigation.js";
|
|
17
|
+
import { useChangeOwpTheme as W, useGetCurrentLayoutConfig as j, useGetCurrentSettings as J, useGetCustomScrollbarsEnabled as V, useGetDefaultSettings as X, useGetFooterTheme as Y, useGetMainTheme as Z, useGetNavbarTheme as $, useGetOwpSettings as ee, useGetToolbarTheme as re, useResetSettings as te, useSetDefaultSettings as oe, useSetSettings as se } from "./hooks/useOwpSettings.js";
|
|
18
|
+
import { useOwpTranslation as me } from "./hooks/useOwpTranslation.js";
|
|
19
|
+
import { useGetPageLockLoading as ae, usePageLockLoading as pe } from "./hooks/usePageLockLoading.js";
|
|
20
|
+
import { usePrevious as ie } from "./hooks/usePrevious.js";
|
|
21
|
+
import { useGetShortcuts as Ce, useSetShortcuts as Se } from "./hooks/useShortcuts.js";
|
|
22
|
+
import { getEnv as ge, setEnv as Le, useStorage as de } from "./hooks/useStorage.js";
|
|
23
|
+
import { useThemeMediaQuery as Te } from "./hooks/useThemeMediaQuery.js";
|
|
24
|
+
import { useTimeout as he } from "./hooks/useTimeout.js";
|
|
25
|
+
import { useTreeGridCommonCodeEnums as Ue } from "./hooks/useTreeGridCommonCodeEnums.js";
|
|
26
|
+
import { useTreeGridEnums as be } from "./hooks/useTreeGridEnums.js";
|
|
27
|
+
import { useTreeGridExcelExport as De } from "./hooks/useTreeGridExcelExport.js";
|
|
28
|
+
import { FALLBACK_LANGUAGE_LIST as Ie } from "./constants/language.js";
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
Ie as FALLBACK_LANGUAGE_LIST,
|
|
31
|
+
ge as getEnv,
|
|
32
|
+
Le as setEnv,
|
|
32
33
|
u as useAccessTokenGuard,
|
|
33
|
-
|
|
34
|
+
W as useChangeOwpTheme,
|
|
34
35
|
n as useConfirm,
|
|
35
36
|
b as useDebounce,
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
D as useDeepCompareEffect,
|
|
38
|
+
N as useDeepCompareEffectNoCheck,
|
|
38
39
|
I as useDeepCompareMemoize,
|
|
39
40
|
h as useEnsureCurrentUserSeq,
|
|
41
|
+
M as useFormDataUploadMutation,
|
|
40
42
|
t as useGetCommonCodeList,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
p as useGetCurrentLanguage,
|
|
44
|
+
j as useGetCurrentLayoutConfig,
|
|
45
|
+
J as useGetCurrentSettings,
|
|
44
46
|
g as useGetCurrentUser,
|
|
45
|
-
|
|
47
|
+
c as useGetCurrentUserId,
|
|
46
48
|
l as useGetCurrentUserSeq,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
V as useGetCustomScrollbarsEnabled,
|
|
50
|
+
X as useGetDefaultSettings,
|
|
51
|
+
Y as useGetFooterTheme,
|
|
50
52
|
f as useGetLanguageList,
|
|
51
53
|
C as useGetLogoSrc,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
Z as useGetMainTheme,
|
|
55
|
+
z as useGetNavbar,
|
|
56
|
+
$ as useGetNavbarTheme,
|
|
57
|
+
K as useGetNavigationList,
|
|
58
|
+
ee as useGetOwpSettings,
|
|
59
|
+
ae as useGetPageLockLoading,
|
|
60
|
+
Ce as useGetShortcuts,
|
|
61
|
+
re as useGetToolbarTheme,
|
|
62
|
+
w as useHeaderWrapState,
|
|
63
|
+
O as useInitApp,
|
|
64
|
+
y as useInitCommonCodes,
|
|
65
|
+
B as useNavbarActions,
|
|
66
|
+
me as useOwpTranslation,
|
|
67
|
+
pe as usePageLockLoading,
|
|
68
|
+
ie as usePrevious,
|
|
69
|
+
te as useResetSettings,
|
|
68
70
|
o as useSetCommonCodeList,
|
|
69
71
|
i as useSetCurrentLanguage,
|
|
70
72
|
L as useSetCurrentUser,
|
|
71
73
|
T as useSetCurrentUserId,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
U as useSetCurrentUserSeq,
|
|
75
|
+
oe as useSetDefaultSettings,
|
|
74
76
|
S as useSetLogoSrc,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
Q as useSetNavigationList,
|
|
78
|
+
se as useSetSettings,
|
|
79
|
+
Se as useSetShortcuts,
|
|
80
|
+
de as useStorage,
|
|
81
|
+
Te as useThemeMediaQuery,
|
|
82
|
+
he as useTimeout,
|
|
83
|
+
Ue as useTreeGridCommonCodeEnums,
|
|
84
|
+
be as useTreeGridEnums,
|
|
85
|
+
De as useTreeGridExcelExport
|
|
84
86
|
};
|
|
85
87
|
//# sourceMappingURL=hooks.js.map
|
package/dist/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,58 +2,57 @@ var T = Object.defineProperty;
|
|
|
2
2
|
var a = (o, i) => T(o, "name", { value: i, configurable: !0 });
|
|
3
3
|
import { jsx as l } 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 { useNavbarActions as v } from "../../../hooks/useNavbar.js";
|
|
5
|
-
import { useOwpTranslation as
|
|
6
|
-
import { useThemeMediaQuery as
|
|
5
|
+
import { useOwpTranslation as C } from "../../../hooks/useOwpTranslation.js";
|
|
6
|
+
import { useThemeMediaQuery as w } from "../../../hooks/useThemeMediaQuery.js";
|
|
7
7
|
import { useSetDefaultSettings as N, useGetCurrentSettings as A } from "../../../hooks/useOwpSettings.js";
|
|
8
8
|
import B from "@mui/material/IconButton";
|
|
9
9
|
import M from "@mui/material/Tooltip";
|
|
10
|
-
import { alpha as
|
|
10
|
+
import { alpha as r } from "@mui/material/styles";
|
|
11
11
|
import { clsx as h } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
12
12
|
import { OwpSvgIcon as D } from "../../../components/OwpSvgIcon/OwpSvgIcon.js";
|
|
13
13
|
import { set as I } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/set.js";
|
|
14
14
|
const O = /* @__PURE__ */ a((o) => ({
|
|
15
15
|
borderWidth: "1px",
|
|
16
16
|
borderStyle: "solid",
|
|
17
|
-
borderColor:
|
|
18
|
-
backgroundColor:
|
|
19
|
-
boxShadow:
|
|
20
|
-
color:
|
|
21
|
-
transition: o.transitions.create(["background-color", "border-color"
|
|
17
|
+
borderColor: r(o.palette.text.primary, o.palette.mode === "dark" ? 0.18 : 0.12),
|
|
18
|
+
backgroundColor: r(o.palette.text.primary, o.palette.mode === "dark" ? 0.12 : 0.04),
|
|
19
|
+
boxShadow: "none",
|
|
20
|
+
color: r(o.palette.text.primary, o.palette.mode === "dark" ? 0.88 : 0.72),
|
|
21
|
+
transition: o.transitions.create(["background-color", "border-color"], {
|
|
22
22
|
duration: o.transitions.duration.shorter
|
|
23
23
|
}),
|
|
24
24
|
"&:hover": {
|
|
25
|
-
backgroundColor:
|
|
26
|
-
borderColor:
|
|
27
|
-
transform: "translateY(-1px)"
|
|
25
|
+
backgroundColor: r(o.palette.primary.main, o.palette.mode === "dark" ? 0.16 : 0.08),
|
|
26
|
+
borderColor: r(o.palette.primary.main, o.palette.mode === "dark" ? 0.28 : 0.18)
|
|
28
27
|
}
|
|
29
28
|
}), "lightSurfaceButtonSx");
|
|
30
|
-
function
|
|
29
|
+
function P(o) {
|
|
31
30
|
const {
|
|
32
31
|
className: i = "",
|
|
33
|
-
children:
|
|
32
|
+
children: p = /* @__PURE__ */ l(D, { size: 20, color: "action", children: "heroicons-outline:bars-3" }),
|
|
34
33
|
surfaceTone: d = "inherit",
|
|
35
34
|
tooltipTitle: m,
|
|
36
|
-
sx:
|
|
35
|
+
sx: t,
|
|
37
36
|
...u
|
|
38
|
-
} = o, f =
|
|
37
|
+
} = o, f = w((e) => e.breakpoints.down("lg")), { t: b } = C(), { toggleMobile: g } = v(), x = N(), n = A(), y = m ?? b("Title.메뉴"), k = d === "light" ? [O, ...Array.isArray(t) ? t : t ? [t] : []] : t, S = /* @__PURE__ */ l(
|
|
39
38
|
B,
|
|
40
39
|
{
|
|
41
40
|
onClick: /* @__PURE__ */ a(() => {
|
|
42
|
-
var e, s,
|
|
41
|
+
var e, s, c;
|
|
43
42
|
f ? g() : x(
|
|
44
|
-
I({}, "layout.config.navbar.folded", !((
|
|
43
|
+
I({}, "layout.config.navbar.folded", !((c = (s = (e = n == null ? void 0 : n.layout) == null ? void 0 : e.config) == null ? void 0 : s.navbar) != null && c.folded))
|
|
45
44
|
);
|
|
46
45
|
}, "onClick"),
|
|
47
46
|
...u,
|
|
48
|
-
sx:
|
|
47
|
+
sx: k,
|
|
49
48
|
className: h(i),
|
|
50
|
-
children:
|
|
49
|
+
children: p
|
|
51
50
|
}
|
|
52
51
|
);
|
|
53
|
-
return /* @__PURE__ */ l(M, { title:
|
|
52
|
+
return /* @__PURE__ */ l(M, { title: y, placement: "bottom", children: S });
|
|
54
53
|
}
|
|
55
|
-
a(
|
|
54
|
+
a(P, "NavbarToggleButton");
|
|
56
55
|
export {
|
|
57
|
-
|
|
56
|
+
P as default
|
|
58
57
|
};
|
|
59
58
|
//# sourceMappingURL=NavbarToggleButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarToggleButton.js","sources":["../../../../src/layout/components/navbar/NavbarToggleButton.tsx"],"sourcesContent":["import type { OwpSettingsConfigType as SettingsConfigType } from '@/types/OwpSettingsTypes';\nimport { OwpSvgIcon as SvgIcon } from '@/components/OwpSvgIcon';\nimport { useNavbarActions } from '@/hooks/useNavbar';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { useThemeMediaQuery } from '@/hooks/useThemeMediaQuery';\nimport {\n useGetCurrentSettings,\n useSetDefaultSettings,\n} from '@/hooks/useOwpSettings';\nimport IconButton, { type IconButtonProps } from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport { alpha, type SxProps, type Theme } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { set } from 'es-toolkit/compat';\nimport { ReactNode } from 'react';\n\nexport type NavbarToggleButtonProps = IconButtonProps & {\n surfaceTone?: 'inherit' | 'light';\n tooltipTitle?: ReactNode;\n};\n\nconst lightSurfaceButtonSx = (theme: Theme) => ({\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: alpha(theme.palette.text.primary, theme.palette.mode === 'dark' ? 0.
|
|
1
|
+
{"version":3,"file":"NavbarToggleButton.js","sources":["../../../../src/layout/components/navbar/NavbarToggleButton.tsx"],"sourcesContent":["import type { OwpSettingsConfigType as SettingsConfigType } from '@/types/OwpSettingsTypes';\nimport { OwpSvgIcon as SvgIcon } from '@/components/OwpSvgIcon';\nimport { useNavbarActions } from '@/hooks/useNavbar';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { useThemeMediaQuery } from '@/hooks/useThemeMediaQuery';\nimport {\n useGetCurrentSettings,\n useSetDefaultSettings,\n} from '@/hooks/useOwpSettings';\nimport IconButton, { type IconButtonProps } from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport { alpha, type SxProps, type Theme } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { set } from 'es-toolkit/compat';\nimport { ReactNode } from 'react';\n\nexport type NavbarToggleButtonProps = IconButtonProps & {\n surfaceTone?: 'inherit' | 'light';\n tooltipTitle?: ReactNode;\n};\n\nconst lightSurfaceButtonSx = (theme: Theme) => ({\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: alpha(theme.palette.text.primary, theme.palette.mode === 'dark' ? 0.18 : 0.12),\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.mode === 'dark' ? 0.12 : 0.04),\n boxShadow: 'none',\n color: alpha(theme.palette.text.primary, theme.palette.mode === 'dark' ? 0.88 : 0.72),\n transition: theme.transitions.create(['background-color', 'border-color'], {\n duration: theme.transitions.duration.shorter,\n }),\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.mode === 'dark' ? 0.16 : 0.08),\n borderColor: alpha(theme.palette.primary.main, theme.palette.mode === 'dark' ? 0.28 : 0.18),\n },\n});\n\n/**\n * The navbar toggle button.\n */\nfunction NavbarToggleButton(props: NavbarToggleButtonProps) {\n const {\n className = '',\n children = (\n <SvgIcon size={20} color=\"action\">\n heroicons-outline:bars-3\n </SvgIcon>\n ),\n surfaceTone = 'inherit',\n tooltipTitle,\n sx,\n ...rest\n } = props;\n\n const isMobile = useThemeMediaQuery((theme) => theme.breakpoints.down('lg'));\n const { t } = useOwpTranslation();\n const { toggleMobile } = useNavbarActions();\n const setDefaultSettings = useSetDefaultSettings();\n const settings: SettingsConfigType = useGetCurrentSettings();\n const resolvedTooltipTitle = tooltipTitle ?? t('Title.메뉴');\n const resolvedSx: SxProps<Theme> | undefined =\n surfaceTone === 'light'\n ? [lightSurfaceButtonSx, ...(Array.isArray(sx) ? sx : sx ? [sx] : [])]\n : sx;\n\n const button = (\n <IconButton\n onClick={() => {\n if (isMobile) {\n toggleMobile();\n } else {\n setDefaultSettings(\n set({}, 'layout.config.navbar.folded', !settings?.layout?.config?.navbar?.folded),\n );\n }\n }}\n {...rest}\n sx={resolvedSx}\n className={clsx(className)}\n >\n {children}\n </IconButton>\n );\n\n return (\n <Tooltip title={resolvedTooltipTitle} placement=\"bottom\">\n {button}\n </Tooltip>\n );\n}\n\nexport default NavbarToggleButton;\n"],"names":["lightSurfaceButtonSx","__name","theme","alpha","NavbarToggleButton","props","className","children","jsx","SvgIcon","surfaceTone","tooltipTitle","sx","rest","isMobile","useThemeMediaQuery","t","useOwpTranslation","toggleMobile","useNavbarActions","setDefaultSettings","useSetDefaultSettings","settings","useGetCurrentSettings","resolvedTooltipTitle","resolvedSx","button","IconButton","set","_c","_b","_a","clsx","Tooltip"],"mappings":";;;;;;;;;;;;;AAqBA,MAAMA,IAAuB,gBAAAC,EAAA,CAACC,OAAkB;AAAA,EAC9C,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAaC,EAAMD,EAAM,QAAQ,KAAK,SAASA,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,EAC1F,iBAAiBC,EAAMD,EAAM,QAAQ,KAAK,SAASA,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,EAC9F,WAAW;AAAA,EACX,OAAOC,EAAMD,EAAM,QAAQ,KAAK,SAASA,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,EACpF,YAAYA,EAAM,YAAY,OAAO,CAAC,oBAAoB,cAAc,GAAG;AAAA,IACzE,UAAUA,EAAM,YAAY,SAAS;AAAA,EAAA,CACtC;AAAA,EACD,WAAW;AAAA,IACT,iBAAiBC,EAAMD,EAAM,QAAQ,QAAQ,MAAMA,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,IAC9F,aAAaC,EAAMD,EAAM,QAAQ,QAAQ,MAAMA,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,EAAA;AAE9F,IAd6B;AAmB7B,SAASE,EAAmBC,GAAgC;AAC1D,QAAM;AAAA,IACJ,WAAAC,IAAY;AAAA,IACZ,UAAAC,IACE,gBAAAC,EAACC,GAAA,EAAQ,MAAM,IAAI,OAAM,UAAS,UAAA,4BAElC;AAAA,IAEF,aAAAC,IAAc;AAAA,IACd,cAAAC;AAAA,IACA,IAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDR,GAEES,IAAWC,EAAmB,CAACb,MAAUA,EAAM,YAAY,KAAK,IAAI,CAAC,GACrE,EAAE,GAAAc,EAAA,IAAMC,EAAA,GACR,EAAE,cAAAC,EAAA,IAAiBC,EAAA,GACnBC,IAAqBC,EAAA,GACrBC,IAA+BC,EAAA,GAC/BC,IAAuBb,KAAgBK,EAAE,UAAU,GACnDS,IACJf,MAAgB,UACZ,CAACV,GAAsB,GAAI,MAAM,QAAQY,CAAE,IAAIA,IAAKA,IAAK,CAACA,CAAE,IAAI,CAAA,CAAG,IACnEA,GAEAc,IACJ,gBAAAlB;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,SAAS,gBAAA1B,EAAA,MAAM;;AACb,QAAIa,IACFI,EAAA,IAEAE;AAAA,UACEQ,EAAI,CAAA,GAAI,+BAA+B,GAACC,KAAAC,KAAAC,IAAAT,KAAA,gBAAAA,EAAU,WAAV,gBAAAS,EAAkB,WAAlB,gBAAAD,EAA0B,WAA1B,QAAAD,EAAkC,OAAM;AAAA,QAAA;AAAA,MAGtF,GARS;AAAA,MASR,GAAGhB;AAAA,MACJ,IAAIY;AAAA,MACJ,WAAWO,EAAK1B,CAAS;AAAA,MAExB,UAAAC;AAAA,IAAA;AAAA,EAAA;AAIL,2BACG0B,GAAA,EAAQ,OAAOT,GAAsB,WAAU,UAC7C,UAAAE,GACH;AAEJ;AAjDSzB,EAAAG,GAAA;"}
|