@owp/core 2.2.6 → 2.3.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/_virtual/index11.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/index16.js +5 -2
- package/dist/_virtual/index16.js.map +1 -1
- package/dist/_virtual/index17.js +2 -2
- package/dist/_virtual/index6.js +2 -5
- package/dist/_virtual/index6.js.map +1 -1
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/OwpLayout/OwpLayout.js +29 -30
- package/dist/components/OwpLayout/OwpLayout.js.map +1 -1
- package/dist/components/OwpScrollbars/OwpScrollbars.js +16 -17
- package/dist/components/OwpScrollbars/OwpScrollbars.js.map +1 -1
- package/dist/components/OwpStyleProvider/OwpStyleProvider.js +28 -29
- package/dist/components/OwpStyleProvider/OwpStyleProvider.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +80 -74
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/contexts/OwpCoreProvider.js +22 -36
- package/dist/contexts/OwpCoreProvider.js.map +1 -1
- package/dist/contexts/OwpStoreProvider.js +9 -9
- package/dist/contexts/OwpStoreProvider.js.map +1 -1
- package/dist/hooks/useNavbar.js +24 -0
- package/dist/hooks/useNavbar.js.map +1 -0
- package/dist/hooks/useOwpSettings.js +21 -0
- package/dist/hooks/useOwpSettings.js.map +1 -0
- package/dist/hooks.js +75 -62
- package/dist/hooks.js.map +1 -1
- package/dist/layout/Layout.js +28 -29
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/components/layouts/FooterLayout.js +15 -16
- package/dist/layout/components/layouts/FooterLayout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js +21 -18
- package/dist/layout/components/layouts/NavbarToggleFabLayout.js.map +1 -1
- package/dist/layout/components/layouts/NavbarWrapperLayout.js +20 -21
- package/dist/layout/components/layouts/NavbarWrapperLayout.js.map +1 -1
- package/dist/layout/components/navbar/NavbarPinToggleButton.js +10 -11
- package/dist/layout/components/navbar/NavbarPinToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/NavbarToggleButton.js +31 -32
- package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +36 -37
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyleContent.js +29 -30
- package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
- package/dist/layout/components/navigation/Navigation.js +18 -22
- package/dist/layout/components/navigation/Navigation.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +55 -60
- package/dist/layout/components/toggles/NavigationSearchToggle.js.map +1 -1
- package/dist/layout/components/toggles/NavigationShortcutsToggle.js +44 -49
- package/dist/layout/components/toggles/NavigationShortcutsToggle.js.map +1 -1
- package/dist/layout/components/toolbar/ToolbarLayout.js +26 -27
- 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/constants.js +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/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/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.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/store/atoms/navbarAtoms.js +84 -0
- package/dist/store/atoms/navbarAtoms.js.map +1 -0
- package/dist/store/atoms/owpSettingsAtoms.js +140 -0
- package/dist/store/atoms/owpSettingsAtoms.js.map +1 -0
- package/dist/store/atoms/owpStore.js +29 -0
- package/dist/store/atoms/owpStore.js.map +1 -0
- package/dist/store.js +44 -39
- package/dist/store.js.map +1 -1
- package/dist/types/components/OwpPicker/internal/DatePickerInput.d.ts +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/contexts/OwpCoreProvider.d.ts +2 -2
- package/dist/types/contexts/OwpStoreProvider.d.ts +4 -4
- package/dist/types/hooks/index.d.ts +2 -1
- package/dist/types/hooks/useNavbar.d.ts +19 -0
- package/dist/types/hooks/useOwpSettings.d.ts +79 -0
- package/dist/types/layout/components/navigation/Navigation.d.ts +6 -2
- package/dist/types/layout/components/toggles/NavigationSearchToggle.d.ts +5 -2
- package/dist/types/layout/components/toggles/NavigationShortcutsToggle.d.ts +5 -2
- package/dist/types/store/atoms/index.d.ts +3 -0
- package/dist/types/store/atoms/internal/types.d.ts +29 -0
- package/dist/types/store/atoms/navbarAtoms.d.ts +48 -0
- package/dist/types/store/atoms/owpSettingsAtoms.d.ts +89 -0
- package/dist/types/store/atoms/owpStore.d.ts +13 -0
- package/dist/types/store/index.d.ts +1 -3
- package/package.json +2 -6
- package/dist/hooks/useAppStore.js +0 -8
- package/dist/hooks/useAppStore.js.map +0 -1
- package/dist/store/generateReducersFromSlices.js +0 -18
- package/dist/store/generateReducersFromSlices.js.map +0 -1
- package/dist/store/lazyLoadedSlices.js +0 -16
- package/dist/store/lazyLoadedSlices.js.map +0 -1
- package/dist/store/middleware.js +0 -9
- package/dist/store/middleware.js.map +0 -1
- package/dist/store/navbarSlice.js +0 -71
- package/dist/store/navbarSlice.js.map +0 -1
- package/dist/store/navigationSlice.js +0 -46
- package/dist/store/navigationSlice.js.map +0 -1
- package/dist/store/owpSettingsSlice.js +0 -195
- package/dist/store/owpSettingsSlice.js.map +0 -1
- package/dist/store/store.js +0 -17
- package/dist/store/store.js.map +0 -1
- package/dist/store/withSlices.js +0 -27
- package/dist/store/withSlices.js.map +0 -1
- package/dist/types/hooks/useAppStore.d.ts +0 -7
- package/dist/types/store/generateReducersFromSlices.d.ts +0 -6
- package/dist/types/store/lazyLoadedSlices.d.ts +0 -9
- package/dist/types/store/middleware.d.ts +0 -17
- package/dist/types/store/navbarSlice.d.ts +0 -22
- package/dist/types/store/navigationSlice.d.ts +0 -93
- package/dist/types/store/owpSettingsSlice.d.ts +0 -112
- package/dist/types/store/store.d.ts +0 -13
- package/dist/types/store/withSlices.d.ts +0 -11
package/dist/hooks.js
CHANGED
|
@@ -1,68 +1,81 @@
|
|
|
1
|
-
import { useGetCommonCodeList as
|
|
1
|
+
import { useGetCommonCodeList as r, useSetCommonCodeList as o } from "./hooks/useCommonCodeList.js";
|
|
2
2
|
import { useAccessTokenGuard as u } from "./hooks/useAccessTokenGuard.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useGetNavigationList as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
3
|
+
import { useConfirm as n } from "./hooks/useConfirm.js";
|
|
4
|
+
import { useGetCurrentLanguage as p, useGetLanguageList as f, useSetCurrentLanguage as i } from "./hooks/useCurrentLanguage.js";
|
|
5
|
+
import { useGetLogoSrc as C, useSetLogoSrc as G } from "./hooks/useLogoSrc.js";
|
|
6
|
+
import { useGetCurrentUser as S, useSetCurrentUser as L } from "./hooks/useCurrentUser.js";
|
|
7
|
+
import { useGetCurrentUserId as d, useSetCurrentUserId as T } from "./hooks/useCurrentUserId.js";
|
|
8
|
+
import { useDebounce as E } from "./hooks/useDebounce.js";
|
|
9
|
+
import { useDeepCompareEffect as v, useDeepCompareEffectNoCheck as b, useDeepCompareMemoize as A } from "./hooks/useDeepCompareEffect.js";
|
|
10
|
+
import { useHeaderWrapState as D } from "./hooks/useHeaderWrapState.js";
|
|
11
|
+
import { useInitApp as U } from "./hooks/useInitApp.js";
|
|
12
|
+
import { useInitCommonCodes as w } from "./hooks/useInitCommonCodes.js";
|
|
13
|
+
import { useGetNavbar as O, useNavbarActions as P } from "./hooks/useNavbar.js";
|
|
14
|
+
import { useGetNavigationList as F, useSetNavigationList as _ } from "./hooks/useNavigation.js";
|
|
15
|
+
import { useChangeOwpTheme as B, useGetCurrentLayoutConfig as H, useGetCurrentSettings as K, useGetCustomScrollbarsEnabled as Q, useGetDefaultSettings as R, useGetFooterTheme as W, useGetMainTheme as j, useGetNavbarTheme as q, useGetOwpSettings as J, useGetToolbarTheme as V, useResetSettings as X, useSetDefaultSettings as Y, useSetSettings as Z } from "./hooks/useOwpSettings.js";
|
|
16
|
+
import { useOwpTranslation as ee } from "./hooks/useOwpTranslation.js";
|
|
17
|
+
import { useGetPageLockLoading as re, usePageLockLoading as oe } from "./hooks/usePageLockLoading.js";
|
|
18
|
+
import { usePrevious as ue } from "./hooks/usePrevious.js";
|
|
19
|
+
import { useGetShortcuts as ne, useSetShortcuts as ae } from "./hooks/useShortcuts.js";
|
|
20
|
+
import { getEnv as fe, setEnv as ie, useStorage as xe } from "./hooks/useStorage.js";
|
|
21
|
+
import { useThemeMediaQuery as Ge } from "./hooks/useThemeMediaQuery.js";
|
|
22
|
+
import { useTimeout as Se } from "./hooks/useTimeout.js";
|
|
23
|
+
import { useTreeGridCommonCodeEnums as ce } from "./hooks/useTreeGridCommonCodeEnums.js";
|
|
24
|
+
import { useTreeGridEnums as Te } from "./hooks/useTreeGridEnums.js";
|
|
25
|
+
import { useTreeGridExcelExport as Ee } from "./hooks/useTreeGridExcelExport.js";
|
|
26
|
+
import { FALLBACK_LANGUAGE_LIST as ve } from "./constants/language.js";
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
ve as FALLBACK_LANGUAGE_LIST,
|
|
29
|
+
fe as getEnv,
|
|
30
|
+
ie as setEnv,
|
|
30
31
|
u as useAccessTokenGuard,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
32
|
+
B as useChangeOwpTheme,
|
|
33
|
+
n as useConfirm,
|
|
34
|
+
E as useDebounce,
|
|
35
|
+
v as useDeepCompareEffect,
|
|
36
|
+
b as useDeepCompareEffectNoCheck,
|
|
37
|
+
A as useDeepCompareMemoize,
|
|
38
|
+
r as useGetCommonCodeList,
|
|
39
|
+
p as useGetCurrentLanguage,
|
|
40
|
+
H as useGetCurrentLayoutConfig,
|
|
41
|
+
K as useGetCurrentSettings,
|
|
42
|
+
S as useGetCurrentUser,
|
|
43
|
+
d as useGetCurrentUserId,
|
|
44
|
+
Q as useGetCustomScrollbarsEnabled,
|
|
45
|
+
R as useGetDefaultSettings,
|
|
46
|
+
W as useGetFooterTheme,
|
|
47
|
+
f as useGetLanguageList,
|
|
48
|
+
C as useGetLogoSrc,
|
|
49
|
+
j as useGetMainTheme,
|
|
50
|
+
O as useGetNavbar,
|
|
51
|
+
q as useGetNavbarTheme,
|
|
52
|
+
F as useGetNavigationList,
|
|
53
|
+
J as useGetOwpSettings,
|
|
54
|
+
re as useGetPageLockLoading,
|
|
55
|
+
ne as useGetShortcuts,
|
|
56
|
+
V as useGetToolbarTheme,
|
|
57
|
+
D as useHeaderWrapState,
|
|
58
|
+
U as useInitApp,
|
|
59
|
+
w as useInitCommonCodes,
|
|
60
|
+
P as useNavbarActions,
|
|
61
|
+
ee as useOwpTranslation,
|
|
62
|
+
oe as usePageLockLoading,
|
|
63
|
+
ue as usePrevious,
|
|
64
|
+
X as useResetSettings,
|
|
65
|
+
o as useSetCommonCodeList,
|
|
66
|
+
i as useSetCurrentLanguage,
|
|
67
|
+
L as useSetCurrentUser,
|
|
68
|
+
T as useSetCurrentUserId,
|
|
69
|
+
Y as useSetDefaultSettings,
|
|
58
70
|
G as useSetLogoSrc,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
_ as useSetNavigationList,
|
|
72
|
+
Z as useSetSettings,
|
|
73
|
+
ae as useSetShortcuts,
|
|
74
|
+
xe as useStorage,
|
|
75
|
+
Ge as useThemeMediaQuery,
|
|
76
|
+
Se as useTimeout,
|
|
77
|
+
ce as useTreeGridCommonCodeEnums,
|
|
78
|
+
Te as useTreeGridEnums,
|
|
79
|
+
Ee as useTreeGridExcelExport
|
|
67
80
|
};
|
|
68
81
|
//# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/layout/Layout.js
CHANGED
|
@@ -1,57 +1,56 @@
|
|
|
1
|
-
var
|
|
2
|
-
var r = (
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var r = (a, e) => m(a, "name", { value: e, configurable: !0 });
|
|
3
3
|
import { jsxs as i, jsx as t } from "../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useAppSelector as f } from "../hooks/useAppStore.js";
|
|
4
|
+
import { useGetCurrentLayoutConfig as f } from "../hooks/useOwpSettings.js";
|
|
6
5
|
import { LinearProgress as d } from "@mui/material";
|
|
7
|
-
import { styled as
|
|
8
|
-
import { useIsFetching as
|
|
9
|
-
import { memo as
|
|
10
|
-
import { Outlet as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
6
|
+
import { styled as p } from "@mui/material/styles";
|
|
7
|
+
import { useIsFetching as c, useIsMutating as u } from "@tanstack/react-query";
|
|
8
|
+
import { memo as x } from "react";
|
|
9
|
+
import { Outlet as h } from "react-router-dom";
|
|
10
|
+
import y from "./components/layouts/FooterLayout.js";
|
|
11
|
+
import b from "./components/layouts/LeftSideLayout.js";
|
|
13
12
|
import l from "./components/layouts/NavbarWrapperLayout.js";
|
|
14
|
-
import
|
|
15
|
-
import { OwpSuspense as
|
|
16
|
-
const
|
|
17
|
-
...
|
|
13
|
+
import g from "./components/toolbar/ToolbarLayout.js";
|
|
14
|
+
import { OwpSuspense as v } from "../components/OwpSuspense/OwpSuspense.js";
|
|
15
|
+
const L = p("div")(({ config: a }) => ({
|
|
16
|
+
...a.mode === "boxed" && {
|
|
18
17
|
clipPath: "inset(0)",
|
|
19
|
-
maxWidth:
|
|
18
|
+
maxWidth: a.containerWidth,
|
|
20
19
|
marginLeft: "auto",
|
|
21
20
|
marginRight: "auto",
|
|
22
21
|
boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"
|
|
23
22
|
},
|
|
24
|
-
...
|
|
23
|
+
...a.mode === "container" && {
|
|
25
24
|
"& .container": {
|
|
26
|
-
maxWidth:
|
|
25
|
+
maxWidth: a.containerWidth,
|
|
27
26
|
width: "100%",
|
|
28
27
|
marginLeft: "auto",
|
|
29
28
|
marginRight: "auto"
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
}));
|
|
33
|
-
function
|
|
34
|
-
const { children:
|
|
35
|
-
return /* @__PURE__ */ i(
|
|
36
|
-
o.leftSidePanel.display && /* @__PURE__ */ t(
|
|
32
|
+
function w(a) {
|
|
33
|
+
const { children: e } = a, o = f(), n = c(), s = u();
|
|
34
|
+
return /* @__PURE__ */ i(L, { id: "owp-layout", config: o, className: "flex w-full", children: [
|
|
35
|
+
o.leftSidePanel.display && /* @__PURE__ */ t(b, {}),
|
|
37
36
|
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-auto", children: [
|
|
38
37
|
o.navbar.display && o.navbar.position === "left" && /* @__PURE__ */ t(l, {}),
|
|
39
38
|
/* @__PURE__ */ i("main", { id: "owp-main", className: "relative z-10 flex min-h-full min-w-0 flex-auto flex-col", children: [
|
|
40
|
-
o.toolbar.display && /* @__PURE__ */ t(
|
|
41
|
-
!!(
|
|
39
|
+
o.toolbar.display && /* @__PURE__ */ t(g, { className: o.toolbar.style === "fixed" ? "sticky top-0" : "" }),
|
|
40
|
+
!!(n || s) && /* @__PURE__ */ t("div", { className: "fixed top-0 left-0 z-30 w-full", children: /* @__PURE__ */ t(d, { color: "secondary" }) }),
|
|
42
41
|
/* @__PURE__ */ i("div", { className: "relative z-10 flex min-h-0 flex-auto flex-col", children: [
|
|
43
|
-
/* @__PURE__ */ t(
|
|
44
|
-
|
|
42
|
+
/* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(h, {}) }),
|
|
43
|
+
e
|
|
45
44
|
] }),
|
|
46
|
-
o.footer.display && /* @__PURE__ */ t(
|
|
45
|
+
o.footer.display && /* @__PURE__ */ t(y, { className: o.footer.style === "fixed" ? "sticky bottom-0" : "" })
|
|
47
46
|
] }),
|
|
48
47
|
o.navbar.display && o.navbar.position === "right" && /* @__PURE__ */ t(l, {})
|
|
49
48
|
] })
|
|
50
49
|
] });
|
|
51
50
|
}
|
|
52
|
-
r(
|
|
53
|
-
const
|
|
51
|
+
r(w, "Layout");
|
|
52
|
+
const B = x(w);
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
B as default
|
|
56
55
|
};
|
|
57
56
|
//# sourceMappingURL=Layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sources":["../../src/layout/Layout.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport {
|
|
1
|
+
{"version":3,"file":"Layout.js","sources":["../../src/layout/Layout.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport { OwpSuspense } from '@/components/OwpSuspense';\nimport { useGetCurrentLayoutConfig } from '@/hooks/useOwpSettings';\nimport { LinearProgress } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport { useIsFetching, useIsMutating } from '@tanstack/react-query';\nimport { memo, ReactNode } from 'react';\nimport { Outlet } from 'react-router-dom';\nimport FooterLayout from './components/layouts/FooterLayout';\nimport LeftSideLayout from './components/layouts/LeftSideLayout';\nimport NavbarWrapperLayout from './components/layouts/NavbarWrapperLayout';\nimport ToolbarLayout from './components/toolbar/ToolbarLayout';\n\nconst Root = styled('div')(({ config }: { config: LayoutConfigDefaultsType }) => ({\n ...(config.mode === 'boxed' && {\n clipPath: 'inset(0)',\n maxWidth: config.containerWidth,\n marginLeft: 'auto',\n marginRight: 'auto',\n boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',\n }),\n ...(config.mode === 'container' && {\n '& .container': {\n maxWidth: config.containerWidth,\n width: '100%',\n marginLeft: 'auto',\n marginRight: 'auto',\n },\n }),\n}));\n\ntype LayoutProps = {\n children?: ReactNode;\n};\n\n/**\n * The layout.\n */\nfunction Layout(props: LayoutProps) {\n const { children } = props;\n const config = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const isFetching = useIsFetching();\n const isMutating = useIsMutating();\n\n return (\n <Root id=\"owp-layout\" config={config} className=\"flex w-full\">\n {config.leftSidePanel.display && <LeftSideLayout />}\n\n <div className=\"flex min-w-0 flex-auto\">\n {config.navbar.display && config.navbar.position === 'left' && <NavbarWrapperLayout />}\n\n <main id=\"owp-main\" className=\"relative z-10 flex min-h-full min-w-0 flex-auto flex-col\">\n {config.toolbar.display && (\n <ToolbarLayout className={config.toolbar.style === 'fixed' ? 'sticky top-0' : ''} />\n )}\n {Boolean(isFetching || isMutating) && (\n <div className=\"fixed top-0 left-0 z-30 w-full\">\n <LinearProgress color=\"secondary\" />\n </div>\n )}\n\n <div className=\"relative z-10 flex min-h-0 flex-auto flex-col\">\n <OwpSuspense>\n <Outlet />\n </OwpSuspense>\n {children}\n </div>\n\n {config.footer.display && (\n <FooterLayout className={config.footer.style === 'fixed' ? 'sticky bottom-0' : ''} />\n )}\n </main>\n\n {config.navbar.display && config.navbar.position === 'right' && <NavbarWrapperLayout />}\n </div>\n </Root>\n );\n}\n\nexport default memo(Layout);\n"],"names":["Root","styled","config","Layout","props","children","useGetCurrentLayoutConfig","isFetching","useIsFetching","isMutating","useIsMutating","jsx","LeftSideLayout","jsxs","NavbarWrapperLayout","ToolbarLayout","LinearProgress","OwpSuspense","Outlet","FooterLayout","__name","Layout$1","memo"],"mappings":";;;;;;;;;;;;;;AAaA,MAAMA,IAAOC,EAAO,KAAK,EAAE,CAAC,EAAE,QAAAC,SAAoD;AAAA,EAChF,GAAIA,EAAO,SAAS,WAAW;AAAA,IAC7B,UAAU;AAAA,IACV,UAAUA,EAAO;AAAA,IACjB,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,WAAW;AAAA,EAAA;AAAA,EAEb,GAAIA,EAAO,SAAS,eAAe;AAAA,IACjC,gBAAgB;AAAA,MACd,UAAUA,EAAO;AAAA,MACjB,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,EAAE;AASF,SAASC,EAAOC,GAAoB;AAClC,QAAM,EAAE,UAAAC,MAAaD,GACfF,IAASI,EAAA,GACTC,IAAaC,EAAA,GACbC,IAAaC,EAAA;AAEnB,2BACGV,GAAA,EAAK,IAAG,cAAa,QAAAE,GAAgB,WAAU,eAC7C,UAAA;AAAA,IAAAA,EAAO,cAAc,WAAW,gBAAAS,EAACC,GAAA,CAAA,CAAe;AAAA,IAEjD,gBAAAC,EAAC,OAAA,EAAI,WAAU,0BACZ,UAAA;AAAA,MAAAX,EAAO,OAAO,WAAWA,EAAO,OAAO,aAAa,4BAAWY,GAAA,EAAoB;AAAA,MAEpF,gBAAAD,EAAC,QAAA,EAAK,IAAG,YAAW,WAAU,4DAC3B,UAAA;AAAA,QAAAX,EAAO,QAAQ,WACd,gBAAAS,EAACI,GAAA,EAAc,WAAWb,EAAO,QAAQ,UAAU,UAAU,iBAAiB,GAAA,CAAI;AAAA,QAEnF,GAAQK,KAAcE,MACrB,gBAAAE,EAAC,OAAA,EAAI,WAAU,kCACb,UAAA,gBAAAA,EAACK,GAAA,EAAe,OAAM,YAAA,CAAY,GACpC;AAAA,QAGF,gBAAAH,EAAC,OAAA,EAAI,WAAU,iDACb,UAAA;AAAA,UAAA,gBAAAF,EAACM,GAAA,EACC,UAAA,gBAAAN,EAACO,GAAA,CAAA,CAAO,GACV;AAAA,UACCb;AAAA,QAAA,GACH;AAAA,QAECH,EAAO,OAAO,WACb,gBAAAS,EAACQ,GAAA,EAAa,WAAWjB,EAAO,OAAO,UAAU,UAAU,oBAAoB,GAAA,CAAI;AAAA,MAAA,GAEvF;AAAA,MAECA,EAAO,OAAO,WAAWA,EAAO,OAAO,aAAa,6BAAYY,GAAA,CAAA,CAAoB;AAAA,IAAA,EAAA,CACvF;AAAA,EAAA,GACF;AAEJ;AAvCSM,EAAAjB,GAAA;AAyCT,MAAAkB,IAAeC,EAAKnB,CAAM;"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
var l = Object.defineProperty;
|
|
2
2
|
var t = (e, o) => l(e, "name", { value: o, configurable: !0 });
|
|
3
3
|
import { jsx as a } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import f from "@mui/material/
|
|
7
|
-
import
|
|
8
|
-
import d from "@
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
f,
|
|
4
|
+
import { useGetFooterTheme as p } from "../../../hooks/useOwpSettings.js";
|
|
5
|
+
import c from "@mui/material/AppBar";
|
|
6
|
+
import { ThemeProvider as f } from "@mui/material/styles";
|
|
7
|
+
import n from "@mui/material/Toolbar";
|
|
8
|
+
import { clsx as d } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
9
|
+
import { memo as i } from "react";
|
|
10
|
+
function u(e) {
|
|
11
|
+
const { className: o } = e, r = p();
|
|
12
|
+
return /* @__PURE__ */ a(f, { theme: r, children: /* @__PURE__ */ a(
|
|
13
|
+
c,
|
|
15
14
|
{
|
|
16
15
|
id: "owp-footer",
|
|
17
|
-
className:
|
|
16
|
+
className: d("relative z-20 border-t", o),
|
|
18
17
|
color: "default",
|
|
19
18
|
sx: /* @__PURE__ */ t((m) => ({
|
|
20
19
|
backgroundColor: "var(--default-background-footerTheme-palette)",
|
|
@@ -25,13 +24,13 @@ function s(e) {
|
|
|
25
24
|
"--default-background-footerTheme-palette": r.palette.background.default
|
|
26
25
|
}), "sx"),
|
|
27
26
|
elevation: 0,
|
|
28
|
-
children: /* @__PURE__ */ a(
|
|
27
|
+
children: /* @__PURE__ */ a(n, { className: "min-h-48 md:min-h-64 px-8 sm:px-12 py-0 flex items-center overflow-x-auto", children: "Footer" })
|
|
29
28
|
}
|
|
30
29
|
) });
|
|
31
30
|
}
|
|
32
|
-
t(
|
|
33
|
-
const
|
|
31
|
+
t(u, "FooterLayout");
|
|
32
|
+
const y = i(u);
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
y as default
|
|
36
35
|
};
|
|
37
36
|
//# sourceMappingURL=FooterLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FooterLayout.js","sources":["../../../../src/layout/components/layouts/FooterLayout.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"FooterLayout.js","sources":["../../../../src/layout/components/layouts/FooterLayout.tsx"],"sourcesContent":["import { useGetFooterTheme } from '@/hooks/useOwpSettings';\nimport AppBar from '@mui/material/AppBar';\nimport { ThemeProvider } from '@mui/material/styles';\nimport Toolbar from '@mui/material/Toolbar';\nimport clsx from 'clsx';\nimport { memo } from 'react';\n\ntype FooterLayoutProps = { className?: string };\n\n/**\n * The footer layout.\n */\nfunction FooterLayout(props: FooterLayoutProps) {\n const { className } = props;\n\n const footerTheme = useGetFooterTheme();\n\n return (\n <ThemeProvider theme={footerTheme}>\n <AppBar\n id=\"owp-footer\"\n className={clsx('relative z-20 border-t', className)}\n color=\"default\"\n sx={(theme) => ({\n backgroundColor: 'var(--default-background-footerTheme-palette)',\n ...theme.applyStyles('light', {\n backgroundColor: 'var(--paper-background-footerTheme-palette)',\n }),\n '--paper-background-footerTheme-palette': (footerTheme as any).palette.background.paper,\n '--default-background-footerTheme-palette': (footerTheme as any).palette.background\n .default,\n })}\n elevation={0}\n >\n <Toolbar className=\"min-h-48 md:min-h-64 px-8 sm:px-12 py-0 flex items-center overflow-x-auto\">\n Footer\n </Toolbar>\n </AppBar>\n </ThemeProvider>\n );\n}\n\nexport default memo(FooterLayout);\n"],"names":["FooterLayout","props","className","footerTheme","useGetFooterTheme","jsx","ThemeProvider","AppBar","clsx","__name","theme","Toolbar","FooterLayout$1","memo"],"mappings":";;;;;;;;;AAYA,SAASA,EAAaC,GAA0B;AAC9C,QAAM,EAAE,WAAAC,MAAcD,GAEhBE,IAAcC,EAAA;AAEpB,SACE,gBAAAC,EAACC,GAAA,EAAc,OAAOH,GACpB,UAAA,gBAAAE;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,WAAWC,EAAK,0BAA0BN,CAAS;AAAA,MACnD,OAAM;AAAA,MACN,IAAI,gBAAAO,EAAA,CAACC,OAAW;AAAA,QACd,iBAAiB;AAAA,QACjB,GAAGA,EAAM,YAAY,SAAS;AAAA,UAC5B,iBAAiB;AAAA,QAAA,CAClB;AAAA,QACD,0CAA2CP,EAAoB,QAAQ,WAAW;AAAA,QAClF,4CAA6CA,EAAoB,QAAQ,WACtE;AAAA,MAAA,IAPD;AAAA,MASJ,WAAW;AAAA,MAEX,UAAA,gBAAAE,EAACM,GAAA,EAAQ,WAAU,6EAA4E,UAAA,SAAA,CAE/F;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AA5BSF,EAAAT,GAAA;AA8BT,MAAAY,IAAeC,EAAKb,CAAY;"}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
l,
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var r = (o, t) => m(o, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { jsx as g } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import u from "../navbar/NavbarToggleFab.js";
|
|
5
|
+
import { useNavbarActions as f } from "../../../hooks/useNavbar.js";
|
|
6
|
+
import { useThemeMediaQuery as l } from "../../../hooks/useThemeMediaQuery.js";
|
|
7
|
+
import { useGetCurrentLayoutConfig as b } from "../../../hooks/useOwpSettings.js";
|
|
8
|
+
function C(o) {
|
|
9
|
+
const { className: t } = o, e = l((s) => s.breakpoints.down("lg")), i = b(), { toggle: a, toggleMobile: n } = f();
|
|
10
|
+
return /* @__PURE__ */ g(
|
|
11
|
+
u,
|
|
13
12
|
{
|
|
14
|
-
className:
|
|
15
|
-
onClick: /* @__PURE__ */
|
|
16
|
-
|
|
13
|
+
className: t,
|
|
14
|
+
onClick: /* @__PURE__ */ r(() => {
|
|
15
|
+
if (e) {
|
|
16
|
+
n();
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
a();
|
|
17
20
|
}, "onClick"),
|
|
18
|
-
position:
|
|
21
|
+
position: i.navbar.position
|
|
19
22
|
}
|
|
20
23
|
);
|
|
21
24
|
}
|
|
22
|
-
|
|
25
|
+
r(C, "NavbarToggleFabLayout");
|
|
23
26
|
export {
|
|
24
|
-
|
|
27
|
+
C as default
|
|
25
28
|
};
|
|
26
29
|
//# sourceMappingURL=NavbarToggleFabLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarToggleFabLayout.js","sources":["../../../../src/layout/components/layouts/NavbarToggleFabLayout.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport
|
|
1
|
+
{"version":3,"file":"NavbarToggleFabLayout.js","sources":["../../../../src/layout/components/layouts/NavbarToggleFabLayout.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport NavbarToggleFab from '@/layout/components/navbar/NavbarToggleFab';\nimport { useNavbarActions } from '@/hooks/useNavbar';\nimport { useThemeMediaQuery } from '@/hooks/useThemeMediaQuery';\nimport { useGetCurrentLayoutConfig } from '@/hooks/useOwpSettings';\n\ntype NavbarToggleFabLayoutProps = {\n className?: string;\n};\n\n/**\n * The navbar toggle fab layout.\n */\nfunction NavbarToggleFabLayout(props: NavbarToggleFabLayoutProps) {\n const { className } = props;\n\n const isMobile = useThemeMediaQuery((theme) => theme.breakpoints.down('lg'));\n\n const config = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const { toggle, toggleMobile } = useNavbarActions();\n\n return (\n <NavbarToggleFab\n className={className}\n onClick={() => {\n if (isMobile) {\n toggleMobile();\n return;\n }\n\n toggle();\n }}\n position={config.navbar.position}\n />\n );\n}\n\nexport default NavbarToggleFabLayout;\n"],"names":["NavbarToggleFabLayout","props","className","isMobile","useThemeMediaQuery","theme","config","useGetCurrentLayoutConfig","toggle","toggleMobile","useNavbarActions","jsx","NavbarToggleFab","__name"],"mappings":";;;;;;;AAaA,SAASA,EAAsBC,GAAmC;AAChE,QAAM,EAAE,WAAAC,MAAcD,GAEhBE,IAAWC,EAAmB,CAACC,MAAUA,EAAM,YAAY,KAAK,IAAI,CAAC,GAErEC,IAASC,EAAA,GACT,EAAE,QAAAC,GAAQ,cAAAC,EAAA,IAAiBC,EAAA;AAEjC,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAAV;AAAA,MACA,SAAS,gBAAAW,EAAA,MAAM;AACb,YAAIV,GAAU;AACZ,UAAAM,EAAA;AACA;AAAA,QACF;AAEA,QAAAD,EAAA;AAAA,MACF,GAPS;AAAA,MAQT,UAAUF,EAAO,OAAO;AAAA,IAAA;AAAA,EAAA;AAG9B;AAtBSO,EAAAb,GAAA;"}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var i = (o, r) =>
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import {
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var i = (o, r) => c(o, "name", { value: r, configurable: !0 });
|
|
3
|
+
import { jsxs as f, jsx as e, Fragment as u } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { useGetCurrentLayoutConfig as b, useGetNavbarTheme as l } from "../../../hooks/useOwpSettings.js";
|
|
5
5
|
import v from "./NavbarToggleFabLayout.js";
|
|
6
|
-
import {
|
|
7
|
-
import { useThemeMediaQuery as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */ e(T, { theme: s, children: /* @__PURE__ */ e(x, {}) }),
|
|
6
|
+
import { useGetNavbar as d, useNavbarActions as h } from "../../../hooks/useNavbar.js";
|
|
7
|
+
import { useThemeMediaQuery as y } from "../../../hooks/useThemeMediaQuery.js";
|
|
8
|
+
import { ThemeProvider as g } from "@mui/material/styles";
|
|
9
|
+
import { useEffect as N } from "react";
|
|
10
|
+
import { useLocation as T } from "react-router-dom";
|
|
11
|
+
import L from "../navbar/style/NavbarStyle.js";
|
|
12
|
+
function P() {
|
|
13
|
+
const o = b(), r = d(), n = T(), t = y((p) => p.breakpoints.down("lg")), { pathname: m } = n, { closeMobile: a } = h();
|
|
14
|
+
N(() => {
|
|
15
|
+
t && a();
|
|
16
|
+
}, [a, m, t]);
|
|
17
|
+
const s = l();
|
|
18
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
19
|
+
/* @__PURE__ */ e(g, { theme: s, children: /* @__PURE__ */ e(L, {}) }),
|
|
21
20
|
o.navbar.display && !o.toolbar.display && !r.open && /* @__PURE__ */ e(v, {})
|
|
22
21
|
] });
|
|
23
22
|
}
|
|
24
|
-
i(
|
|
23
|
+
i(P, "NavbarWrapperLayout");
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
P as default
|
|
27
26
|
};
|
|
28
27
|
//# sourceMappingURL=NavbarWrapperLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarWrapperLayout.js","sources":["../../../../src/layout/components/layouts/NavbarWrapperLayout.tsx"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"NavbarWrapperLayout.js","sources":["../../../../src/layout/components/layouts/NavbarWrapperLayout.tsx"],"sourcesContent":["import {\n useGetCurrentLayoutConfig,\n useGetNavbarTheme,\n} from '@/hooks/useOwpSettings';\nimport { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport NavbarToggleFabLayout from '@/layout/components/layouts/NavbarToggleFabLayout';\nimport { useGetNavbar, useNavbarActions } from '@/hooks/useNavbar';\nimport { useThemeMediaQuery } from '@/hooks/useThemeMediaQuery';\nimport { ThemeProvider } from '@mui/material/styles';\nimport { useEffect } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport NavbarStyle from '../navbar/style/NavbarStyle';\n\n/**\n * The navbar wrapper layout.\n */\nfunction NavbarWrapperLayout() {\n const config = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const navbar = useGetNavbar();\n const location = useLocation();\n const isMobile = useThemeMediaQuery((theme) => theme.breakpoints.down('lg'));\n const { pathname } = location;\n const { closeMobile } = useNavbarActions();\n\n useEffect(() => {\n if (isMobile) {\n closeMobile();\n }\n }, [closeMobile, pathname, isMobile]);\n\n const navbarTheme = useGetNavbarTheme();\n\n return (\n <>\n <ThemeProvider theme={navbarTheme}>\n <NavbarStyle />\n </ThemeProvider>\n {config.navbar.display && !config.toolbar.display && !navbar.open && (\n <NavbarToggleFabLayout />\n )}\n </>\n );\n}\n\nexport default NavbarWrapperLayout;\n"],"names":["NavbarWrapperLayout","config","useGetCurrentLayoutConfig","navbar","useGetNavbar","location","useLocation","isMobile","useThemeMediaQuery","theme","pathname","closeMobile","useNavbarActions","useEffect","navbarTheme","useGetNavbarTheme","jsxs","Fragment","jsx","ThemeProvider","NavbarStyle","NavbarToggleFabLayout","__name"],"mappings":";;;;;;;;;;;AAgBA,SAASA,IAAsB;AAC7B,QAAMC,IAASC,EAAA,GACTC,IAASC,EAAA,GACTC,IAAWC,EAAA,GACXC,IAAWC,EAAmB,CAACC,MAAUA,EAAM,YAAY,KAAK,IAAI,CAAC,GACrE,EAAE,UAAAC,MAAaL,GACf,EAAE,aAAAM,EAAA,IAAgBC,EAAA;AAExB,EAAAC,EAAU,MAAM;AACd,IAAIN,KACFI,EAAA;AAAA,EAEJ,GAAG,CAACA,GAAaD,GAAUH,CAAQ,CAAC;AAEpC,QAAMO,IAAcC,EAAA;AAEpB,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAc,OAAOL,GACpB,UAAA,gBAAAI,EAACE,KAAY,GACf;AAAA,IACCnB,EAAO,OAAO,WAAW,CAACA,EAAO,QAAQ,WAAW,CAACE,EAAO,QAC3D,gBAAAe,EAACG,GAAA,CAAA,CAAsB;AAAA,EAAA,GAE3B;AAEJ;AA1BSC,EAAAtB,GAAA;"}
|
|
@@ -2,12 +2,11 @@ var u = Object.defineProperty;
|
|
|
2
2
|
var r = (o, n) => u(o, "name", { value: n, configurable: !0 });
|
|
3
3
|
import { jsx as t } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
4
|
import d from "./NavbarToggleButton.js";
|
|
5
|
-
import { useOwpTranslation as
|
|
6
|
-
import {
|
|
7
|
-
import { selectOwpCurrentSettings as m } from "../../../store/owpSettingsSlice.js";
|
|
5
|
+
import { useOwpTranslation as h } from "../../../hooks/useOwpTranslation.js";
|
|
6
|
+
import { useGetCurrentSettings as p } from "../../../hooks/useOwpSettings.js";
|
|
8
7
|
import l from "@mui/material/SvgIcon";
|
|
9
|
-
import { clsx as
|
|
10
|
-
function
|
|
8
|
+
import { clsx as m } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
9
|
+
function g(o) {
|
|
11
10
|
return /* @__PURE__ */ t(l, { ...o, viewBox: "0 0 24 24", children: /* @__PURE__ */ t(
|
|
12
11
|
"path",
|
|
13
12
|
{
|
|
@@ -21,8 +20,8 @@ function k(o) {
|
|
|
21
20
|
}
|
|
22
21
|
) });
|
|
23
22
|
}
|
|
24
|
-
r(
|
|
25
|
-
function
|
|
23
|
+
r(g, "NavbarAutoHideIcon");
|
|
24
|
+
function k(o) {
|
|
26
25
|
return /* @__PURE__ */ t(l, { ...o, viewBox: "0 0 24 24", children: /* @__PURE__ */ t(
|
|
27
26
|
"path",
|
|
28
27
|
{
|
|
@@ -36,18 +35,18 @@ function v(o) {
|
|
|
36
35
|
}
|
|
37
36
|
) });
|
|
38
37
|
}
|
|
39
|
-
r(
|
|
38
|
+
r(k, "NavbarPinnedIcon");
|
|
40
39
|
function L(o) {
|
|
41
40
|
var s;
|
|
42
|
-
const { children: n, ...e } = o, a =
|
|
41
|
+
const { children: n, ...e } = o, a = p(), { config: f } = a.layout, i = (s = f.navbar) == null ? void 0 : s.folded, { t: c } = h();
|
|
43
42
|
return /* @__PURE__ */ t(
|
|
44
43
|
d,
|
|
45
44
|
{
|
|
46
45
|
...e,
|
|
47
46
|
color: e.color ?? "inherit",
|
|
48
47
|
tooltipTitle: c(i ? "Title.네비게이션 고정" : "Title.네비게이션 자동 숨김"),
|
|
49
|
-
className:
|
|
50
|
-
children: n ?? (i ? /* @__PURE__ */ t(
|
|
48
|
+
className: m(i ? "opacity-100" : "opacity-70", e.className),
|
|
49
|
+
children: n ?? (i ? /* @__PURE__ */ t(k, { color: "inherit", sx: { fontSize: 24 } }) : /* @__PURE__ */ t(g, { color: "inherit", sx: { fontSize: 24 } }))
|
|
51
50
|
}
|
|
52
51
|
);
|
|
53
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarPinToggleButton.js","sources":["../../../../src/layout/components/navbar/NavbarPinToggleButton.tsx"],"sourcesContent":["import NavbarToggleButton, {\n NavbarToggleButtonProps,\n} from '@/layout/components/navbar/NavbarToggleButton';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport {
|
|
1
|
+
{"version":3,"file":"NavbarPinToggleButton.js","sources":["../../../../src/layout/components/navbar/NavbarPinToggleButton.tsx"],"sourcesContent":["import NavbarToggleButton, {\n NavbarToggleButtonProps,\n} from '@/layout/components/navbar/NavbarToggleButton';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport type { OwpSettingsConfigType as SettingsConfigType } from '@/types/OwpSettingsTypes';\nimport SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon';\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\ntype NavbarPinToggleButtonProps = NavbarToggleButtonProps & {\n className?: string;\n children?: ReactNode;\n};\n\n/**\n * Navbar auto-hide state icon.\n */\nfunction NavbarAutoHideIcon(props: SvgIconProps) {\n return (\n <SvgIcon {...props} viewBox=\"0 0 24 24\">\n <path\n d=\"M4 6.5h16M4 12h16M4 17.5h16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1}\n vectorEffect=\"non-scaling-stroke\"\n />\n </SvgIcon>\n );\n}\n\n/**\n * Navbar pinned state icon.\n */\nfunction NavbarPinnedIcon(props: SvgIconProps) {\n return (\n <SvgIcon {...props} viewBox=\"0 0 24 24\">\n <path\n d=\"M4 6.5h11.5M4 12h8.5M4 17.5h11.5M18.75 8.5 15.25 12l3.5 3.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1}\n vectorEffect=\"non-scaling-stroke\"\n />\n </SvgIcon>\n );\n}\n\n/**\n * Navbar pin toggle button.\n */\nfunction NavbarPinToggleButton(props: NavbarPinToggleButtonProps) {\n const { children, ...rest } = props;\n const settings: SettingsConfigType = useGetCurrentSettings();\n const { config } = settings.layout;\n const folded = config.navbar?.folded;\n const { t } = useOwpTranslation();\n\n return (\n <NavbarToggleButton\n {...rest}\n color={rest.color ?? 'inherit'}\n tooltipTitle={\n folded ? t('Title.네비게이션 고정') : t('Title.네비게이션 자동 숨김')\n }\n className={clsx(folded ? 'opacity-100' : 'opacity-70', rest.className)}\n >\n {children ??\n (folded ? (\n <NavbarPinnedIcon color=\"inherit\" sx={{ fontSize: 24 }} />\n ) : (\n <NavbarAutoHideIcon color=\"inherit\" sx={{ fontSize: 24 }} />\n ))}\n </NavbarToggleButton>\n );\n}\n\nexport default NavbarPinToggleButton;\n"],"names":["NavbarAutoHideIcon","props","jsx","SvgIcon","__name","NavbarPinnedIcon","NavbarPinToggleButton","children","rest","settings","useGetCurrentSettings","config","folded","_a","t","useOwpTranslation","NavbarToggleButton","clsx"],"mappings":";;;;;;;;AAkBA,SAASA,EAAmBC,GAAqB;AAC/C,SACE,gBAAAC,EAACC,GAAA,EAAS,GAAGF,GAAO,SAAQ,aAC1B,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA,MACL,QAAO;AAAA,MACP,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAa;AAAA,IAAA;AAAA,EAAA,GAEjB;AAEJ;AAdSE,EAAAJ,GAAA;AAmBT,SAASK,EAAiBJ,GAAqB;AAC7C,SACE,gBAAAC,EAACC,GAAA,EAAS,GAAGF,GAAO,SAAQ,aAC1B,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA,MACL,QAAO;AAAA,MACP,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAa;AAAA,IAAA;AAAA,EAAA,GAEjB;AAEJ;AAdSE,EAAAC,GAAA;AAmBT,SAASC,EAAsBL,GAAmC;;AAChE,QAAM,EAAE,UAAAM,GAAU,GAAGC,EAAA,IAASP,GACxBQ,IAA+BC,EAAA,GAC/B,EAAE,QAAAC,MAAWF,EAAS,QACtBG,KAASC,IAAAF,EAAO,WAAP,gBAAAE,EAAe,QACxB,EAAE,GAAAC,EAAA,IAAMC,EAAA;AAEd,SACE,gBAAAb;AAAA,IAACc;AAAA,IAAA;AAAA,MACE,GAAGR;AAAA,MACJ,OAAOA,EAAK,SAAS;AAAA,MACrB,cACWM,EAATF,IAAW,mBAAsB,mBAAN;AAAA,MAE7B,WAAWK,EAAKL,IAAS,gBAAgB,cAAcJ,EAAK,SAAS;AAAA,MAEpE,UAAAD,MACEK,IACC,gBAAAV,EAACG,GAAA,EAAiB,OAAM,WAAU,IAAI,EAAE,UAAU,GAAA,GAAM,IAExD,gBAAAH,EAACF,KAAmB,OAAM,WAAU,IAAI,EAAE,UAAU,MAAM;AAAA,IAAA;AAAA,EAAA;AAIpE;AAxBSI,EAAAE,GAAA;"}
|