@owp/core 2.5.23 → 2.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/_virtual/index15.js +2 -2
  2. package/dist/_virtual/index5.js +2 -2
  3. package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js +15 -13
  4. package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js.map +1 -1
  5. package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js +21 -19
  6. package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js.map +1 -1
  7. package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js +1 -1
  8. package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js.map +1 -1
  9. package/dist/components/OwpLanguageSwitcherSelect/OwpLanguageSwitcherSelect.js +1 -1
  10. package/dist/components/OwpLanguageSwitcherSelect/OwpLanguageSwitcherSelect.js.map +1 -1
  11. package/dist/components/OwpLoading/OwpLoading.js +1 -1
  12. package/dist/components/OwpLoading/OwpLoading.js.map +1 -1
  13. package/dist/components/OwpMrtTable/OwpMrtTable.js +1 -1
  14. package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
  15. package/dist/components/OwpOptionSelector/OwpOptionSelector.js +14 -12
  16. package/dist/components/OwpOptionSelector/OwpOptionSelector.js.map +1 -1
  17. package/dist/components/OwpPageTitle/OwpPageTitle.js +1 -1
  18. package/dist/components/OwpPageTitle/OwpPageTitle.js.map +1 -1
  19. package/dist/components/OwpPicker/OwpDatePicker.js +81 -82
  20. package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
  21. package/dist/components/OwpPicker/OwpTimePicker.js +82 -83
  22. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  23. package/dist/components/OwpPicker/OwpWeekDatePicker.js +24 -25
  24. package/dist/components/OwpPicker/OwpWeekDatePicker.js.map +1 -1
  25. package/dist/components/OwpSearchFilter/OwpSearchFilter.js +1 -1
  26. package/dist/components/OwpSearchFilter/OwpSearchFilter.js.map +1 -1
  27. package/dist/components/OwpSection/OwpSection.js +1 -1
  28. package/dist/components/OwpSection/OwpSection.js.map +1 -1
  29. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +155 -157
  30. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  31. package/dist/components/OwpSelectorBase/OwpSelectorSelect.js +95 -81
  32. package/dist/components/OwpSelectorBase/OwpSelectorSelect.js.map +1 -1
  33. package/dist/components/OwpSuspense/OwpSuspense.js +43 -43
  34. package/dist/components/OwpSuspense/OwpSuspense.js.map +1 -1
  35. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +2 -2
  36. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  37. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +55 -56
  38. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
  39. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +10 -10
  40. package/dist/contexts/OwpUiProvider.js +5 -5
  41. package/dist/contexts/OwpUiProvider.js.map +1 -1
  42. package/dist/hooks/{useAccessTokenGuard.js → internal/useAccessTokenGuard.js} +2 -2
  43. package/dist/hooks/internal/useAccessTokenGuard.js.map +1 -0
  44. package/dist/hooks/{useCurrentLanguage.js → internal/useCurrentLanguage.js} +2 -2
  45. package/dist/hooks/internal/useCurrentLanguage.js.map +1 -0
  46. package/dist/hooks/internal/useHeaderWrapState.js.map +1 -0
  47. package/dist/hooks/internal/useNavbar.js +24 -0
  48. package/dist/hooks/internal/useNavbar.js.map +1 -0
  49. package/dist/hooks/{useNavigationActiveRouteRemount.js → internal/useNavigationActiveRouteRemount.js} +1 -1
  50. package/dist/hooks/internal/useNavigationActiveRouteRemount.js.map +1 -0
  51. package/dist/hooks/{useShortcuts.js → internal/useShortcuts.js} +3 -3
  52. package/dist/hooks/internal/useShortcuts.js.map +1 -0
  53. package/dist/hooks/internal/useThemeMediaQuery.js.map +1 -0
  54. package/dist/hooks/internal/useTimeout.js.map +1 -0
  55. package/dist/hooks/useInitApp.js.map +1 -1
  56. package/dist/hooks.js +53 -81
  57. package/dist/hooks.js.map +1 -1
  58. package/dist/layout/Layout.js +1 -1
  59. package/dist/layout/Layout.js.map +1 -1
  60. package/dist/layout/components/layouts/NavbarToggleFabLayout.js +2 -2
  61. package/dist/layout/components/layouts/NavbarToggleFabLayout.js.map +1 -1
  62. package/dist/layout/components/layouts/NavbarWrapperLayout.js +2 -2
  63. package/dist/layout/components/layouts/NavbarWrapperLayout.js.map +1 -1
  64. package/dist/layout/components/navbar/NavbarToggleButton.js +2 -2
  65. package/dist/layout/components/navbar/NavbarToggleButton.js.map +1 -1
  66. package/dist/layout/components/navbar/style/NavbarStyle.js +1 -1
  67. package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
  68. package/dist/layout/components/navbar/style/NavbarStyleContent.js +1 -1
  69. package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
  70. package/dist/layout/components/navigation/Navigation.js +2 -2
  71. package/dist/layout/components/navigation/Navigation.js.map +1 -1
  72. package/dist/layout/components/navigation/vertical/types/NavVerticalCollapse.js +1 -1
  73. package/dist/layout/components/navigation/vertical/types/NavVerticalCollapse.js.map +1 -1
  74. package/dist/layout/components/navigation/vertical/types/NavVerticalGroup.js +1 -1
  75. package/dist/layout/components/navigation/vertical/types/NavVerticalGroup.js.map +1 -1
  76. package/dist/layout/components/navigation/vertical/types/NavVerticalItem.js +1 -1
  77. package/dist/layout/components/navigation/vertical/types/NavVerticalItem.js.map +1 -1
  78. package/dist/layout/components/toggles/LanguageSwitcherToggle.js +1 -1
  79. package/dist/layout/components/toggles/LanguageSwitcherToggle.js.map +1 -1
  80. package/dist/layout/components/toggles/NavigationShortcutsToggle.js +1 -1
  81. package/dist/layout/components/toggles/NavigationShortcutsToggle.js.map +1 -1
  82. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  83. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  84. package/dist/owp-app.css +1 -1
  85. package/dist/types/components/OwpCommonCode/OwpCommonCodeQuerySelector.d.ts +5 -3
  86. package/dist/types/components/OwpCommonCode/OwpCommonCodeSelector.d.ts +5 -3
  87. package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +4 -1
  88. package/dist/types/components/OwpSelectorBase/types/index.d.ts +1 -1
  89. package/dist/types/components/OwpSelectorBase/types/types.d.ts +3 -0
  90. package/dist/types/hooks/index.d.ts +0 -10
  91. package/dist/types/hooks/{useNavbar.d.ts → internal/useNavbar.d.ts} +1 -1
  92. package/dist/types/utils/treeGridUtil.d.ts +0 -14
  93. package/dist/utils/{exceljsBrowser.js → internal/exceljsBrowser.js} +1 -1
  94. package/dist/utils/internal/exceljsBrowser.js.map +1 -0
  95. package/dist/utils/internal/jszipBrowser.js.map +1 -0
  96. package/dist/utils/internal/treeGridBodyRowsEvent.js.map +1 -0
  97. package/dist/utils/treeGridExportExcelUtil.js +1 -1
  98. package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
  99. package/dist/utils/treeGridUtil.js +1 -6
  100. package/dist/utils/treeGridUtil.js.map +1 -1
  101. package/dist/utils/zipUtil.js +1 -1
  102. package/dist/utils/zipUtil.js.map +1 -1
  103. package/dist/utils.js +70 -75
  104. package/package.json +1 -1
  105. package/dist/hooks/useAccessTokenGuard.js.map +0 -1
  106. package/dist/hooks/useCurrentLanguage.js.map +0 -1
  107. package/dist/hooks/useDebounce.js +0 -24
  108. package/dist/hooks/useDebounce.js.map +0 -1
  109. package/dist/hooks/useDeepCompareEffect.js +0 -38
  110. package/dist/hooks/useDeepCompareEffect.js.map +0 -1
  111. package/dist/hooks/useHeaderWrapState.js.map +0 -1
  112. package/dist/hooks/useNavbar.js +0 -24
  113. package/dist/hooks/useNavbar.js.map +0 -1
  114. package/dist/hooks/useNavigationActiveRouteRemount.js.map +0 -1
  115. package/dist/hooks/usePrevious.js +0 -14
  116. package/dist/hooks/usePrevious.js.map +0 -1
  117. package/dist/hooks/useShortcuts.js.map +0 -1
  118. package/dist/hooks/useThemeMediaQuery.js.map +0 -1
  119. package/dist/hooks/useTimeout.js.map +0 -1
  120. package/dist/types/hooks/useDebounce.d.ts +0 -7
  121. package/dist/types/hooks/useDeepCompareEffect.d.ts +0 -22
  122. package/dist/types/hooks/usePrevious.d.ts +0 -5
  123. package/dist/types/utils/dayjsBrowser.d.ts +0 -1
  124. package/dist/utils/exceljsBrowser.js.map +0 -1
  125. package/dist/utils/jszipBrowser.js.map +0 -1
  126. package/dist/utils/treeGridBodyRowsEvent.js.map +0 -1
  127. /package/dist/hooks/{useHeaderWrapState.js → internal/useHeaderWrapState.js} +0 -0
  128. /package/dist/hooks/{useThemeMediaQuery.js → internal/useThemeMediaQuery.js} +0 -0
  129. /package/dist/hooks/{useTimeout.js → internal/useTimeout.js} +0 -0
  130. /package/dist/types/hooks/{useAccessTokenGuard.d.ts → internal/useAccessTokenGuard.d.ts} +0 -0
  131. /package/dist/types/hooks/{useCurrentLanguage.d.ts → internal/useCurrentLanguage.d.ts} +0 -0
  132. /package/dist/types/hooks/{useHeaderWrapState.d.ts → internal/useHeaderWrapState.d.ts} +0 -0
  133. /package/dist/types/hooks/{useNavigationActiveRouteRemount.d.ts → internal/useNavigationActiveRouteRemount.d.ts} +0 -0
  134. /package/dist/types/hooks/{useShortcuts.d.ts → internal/useShortcuts.d.ts} +0 -0
  135. /package/dist/types/hooks/{useThemeMediaQuery.d.ts → internal/useThemeMediaQuery.d.ts} +0 -0
  136. /package/dist/types/hooks/{useTimeout.d.ts → internal/useTimeout.d.ts} +0 -0
  137. /package/dist/types/utils/{exceljsBrowser.d.ts → internal/exceljsBrowser.d.ts} +0 -0
  138. /package/dist/types/utils/{jszipBrowser.d.ts → internal/jszipBrowser.d.ts} +0 -0
  139. /package/dist/types/utils/{treeGridBodyRowsEvent.d.ts → internal/treeGridBodyRowsEvent.d.ts} +0 -0
  140. /package/dist/utils/{jszipBrowser.js → internal/jszipBrowser.js} +0 -0
  141. /package/dist/utils/{treeGridBodyRowsEvent.js → internal/treeGridBodyRowsEvent.js} +0 -0
@@ -1,12 +1,12 @@
1
1
  var ne = Object.defineProperty;
2
2
  var c = (e, t) => ne(e, "name", { value: t, configurable: !0 });
3
3
  import { getTreeGridTextResourceUrl as re, TREEGRID_CELL_CHANGED_CLASS as W, TREEGRID_CELL_HIGHLIGHT_COLOR as oe, resolveTreeGridColorNumber as ie } from "../../../constants/treeGrid.js";
4
- import { isTreeGridRowAddedById as A, getTreeGridAddedRowHighlightColumns as v, normalizeTreeGridExternalRows as ue, getTreeGridCellComparableValue as j, clearTreeGridCellHighlightById as ce, removeTreeGridAddedRowHighlightColumn as se, highlightTreeGridCellById as de, appendTreeGridAddedRowHighlightColumn as fe, getTreeGridAddedRowBaselineValue as ae } from "../../../utils/treeGridUtil.js";
4
+ import { isTreeGridRowAddedById as A, getTreeGridAddedRowHighlightColumns as v, getTreeGridCellComparableValue as j, clearTreeGridCellHighlightById as ue, removeTreeGridAddedRowHighlightColumn as ce, highlightTreeGridCellById as se, appendTreeGridAddedRowHighlightColumn as de, getTreeGridAddedRowBaselineValue as fe, normalizeTreeGridExternalRows as ae } from "../../../utils/treeGridUtil.js";
5
5
  import { applyTreeGridLayoutToGrid as Ge } from "./treeGridLayout.js";
6
6
  import { countTreeGridPerf as z, logTreeGridPerf as Te, measureTreeGridPerf as Y } from "./utils/perf.js";
7
7
  import { debounce as m } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
8
- import { get as le } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
9
- import { isEmpty as Ee } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
8
+ import { isEmpty as le } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
9
+ import { get as Ee } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
10
10
  const ut = 300, Ce = 3, he = {
11
11
  1: {
12
12
  onEnter: "TabDownEdit",
@@ -81,7 +81,7 @@ const ut = 300, Ce = 3, he = {
81
81
  }
82
82
  e.DeleteRowT(t, 3);
83
83
  }
84
- }, "applyTreeGridBeforeRowUndeleteAction"), Be = /* @__PURE__ */ c((e, t, n) => e ? { Url: Oe(t) } : { Data: { Body: [Ee(n) ? [] : n] } }, "buildTreeGridDataSource"), ct = /* @__PURE__ */ c(({
84
+ }, "applyTreeGridBeforeRowUndeleteAction"), Be = /* @__PURE__ */ c((e, t, n) => e ? { Url: Oe(t) } : { Data: { Body: [le(n) ? [] : n] } }, "buildTreeGridDataSource"), ct = /* @__PURE__ */ c(({
85
85
  id: e,
86
86
  layoutUrl: t,
87
87
  layoutData: n,
@@ -101,7 +101,7 @@ const ut = 300, Ce = 3, he = {
101
101
  width: E,
102
102
  height: h,
103
103
  Debug: "Error"
104
- }), "buildTreeGridInitializationOptions"), x = /* @__PURE__ */ c((e) => le(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), M = /* @__PURE__ */ c((e) => {
104
+ }), "buildTreeGridInitializationOptions"), x = /* @__PURE__ */ c((e) => Ee(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), M = /* @__PURE__ */ c((e) => {
105
105
  if (typeof e == "number")
106
106
  return Number.isFinite(e) && e > 0 ? e : void 0;
107
107
  if (typeof e != "string")
@@ -176,7 +176,7 @@ const ut = 300, Ce = 3, he = {
176
176
  if (r != null && r.has(n))
177
177
  return r.get(n);
178
178
  if (A(t))
179
- return ae(t, n) ?? "";
179
+ return fe(t, n) ?? "";
180
180
  }, "resolveTreeGridCellBaselineValue"), Me = /* @__PURE__ */ c(({
181
181
  gridId: e,
182
182
  grid: t,
@@ -189,14 +189,14 @@ const ut = 300, Ce = 3, he = {
189
189
  return;
190
190
  const E = xe(G, n, r), h = j(t, n, r);
191
191
  if (E !== void 0 && h === E) {
192
- ce(e, { row: n, col: r }), Ve(t, n, r), A(n) && se(n, r);
192
+ ue(e, { row: n, col: r }), Ve(t, n, r), A(n) && ce(n, r);
193
193
  return;
194
194
  }
195
- de(e, {
195
+ se(e, {
196
196
  row: n,
197
197
  col: r,
198
198
  backgroundColor: s
199
- }), A(n) && fe(n, r);
199
+ }), A(n) && de(n, r);
200
200
  }, "syncTreeGridChangedCellHighlight"), $e = /* @__PURE__ */ c((e, t, n) => !t || !n || !_(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), Pe = /* @__PURE__ */ c((e, t, n) => {
201
201
  const r = e.GetAttribute(t, n, "Color");
202
202
  return r != null && r !== "";
@@ -472,7 +472,7 @@ const ut = 300, Ce = 3, he = {
472
472
  const i = o.GetSelRows() ?? [];
473
473
  (d = (u = t.current) == null ? void 0 : u.onSelect) == null || d.call(
474
474
  u,
475
- ue(o, i)
475
+ ae(o, i)
476
476
  );
477
477
  }, 100)
478
478
  ), typeof (T == null ? void 0 : T.onSave) == "function" && window.TGSetEvent("OnSave", e, (o, i, u) => {
@@ -3,10 +3,10 @@ var u = (n, l) => r(n, "name", { value: l, configurable: !0 });
3
3
  import { jsx as e, jsxs as C } 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 { OwpAutoLogoutDialog as d } from "../components/OwpAutoLogoutDialog/OwpAutoLogoutDialog.js";
5
5
  import { OwpSnackbarContent as m } from "../components/OwpSnackbarContent/OwpSnackbarContent.js";
6
- import { useAccessTokenGuard as h } from "../hooks/useAccessTokenGuard.js";
7
- import { useGetCurrentLanguage as S } from "../hooks/useCurrentLanguage.js";
8
- import { useOwpTranslation as w } from "../hooks/useOwpTranslation.js";
9
- import { useGetPageLockLoading as O } from "../hooks/usePageLockLoading.js";
6
+ import { useAccessTokenGuard as h } from "../hooks/internal/useAccessTokenGuard.js";
7
+ import { useGetCurrentLanguage as S } from "../hooks/internal/useCurrentLanguage.js";
8
+ import { useGetPageLockLoading as w } from "../hooks/usePageLockLoading.js";
9
+ import { useOwpTranslation as O } from "../hooks/useOwpTranslation.js";
10
10
  import { getI18nextLanguageCode as x } from "../utils/language.js";
11
11
  import I 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/Close.js";
12
12
  import T from "@mui/material/IconButton";
@@ -53,7 +53,7 @@ function b({
53
53
  dialogsProviderProps: l,
54
54
  snackbarProviderProps: t
55
55
  }) {
56
- const { env: o } = E(), f = S(), { i18n: c } = w(), s = O(), a = h(), L = {
56
+ const { env: o } = E(), f = S(), { i18n: c } = O(), s = w(), a = h(), L = {
57
57
  ...i,
58
58
  ...t,
59
59
  style: {
@@ -1 +1 @@
1
- {"version":3,"file":"OwpUiProvider.js","sources":["../../src/contexts/OwpUiProvider.tsx"],"sourcesContent":["import { OwpAutoLogoutDialog } from '@/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog';\nimport { OwpLoading } from '@/components/OwpLoading';\nimport { OwpPageLockLoading } from '@/components/OwpPageLockLoading';\nimport { OwpSnackbarContent } from '@/components/OwpSnackbarContent/OwpSnackbarContent';\nimport {\n useAccessTokenGuard,\n useGetCurrentLanguage,\n useGetPageLockLoading,\n useOwpTranslation,\n} from '@/hooks';\nimport { getI18nextLanguageCode } from '@/utils/language';\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, useEffect } from 'react';\nimport { useOwpAppContext } from './OwpAppProvider';\n\ntype OwpDialogsProviderProps = Omit<ComponentProps<typeof DialogsProvider>, 'children'>;\ntype OwpSnackbarProviderProps = Omit<ComponentProps<typeof SnackbarProvider>, 'children'>;\n\nconst defaultSnackbarComponents = {\n default: OwpSnackbarContent,\n success: OwpSnackbarContent,\n info: OwpSnackbarContent,\n warning: OwpSnackbarContent,\n error: OwpSnackbarContent,\n} satisfies NonNullable<OwpSnackbarProviderProps['Components']>;\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 Components: defaultSnackbarComponents,\n action: (snackbarKey: SnackbarKey) => (\n <IconButton\n aria-label=\"close\"\n onClick={() => closeSnackbar(snackbarKey)}\n size=\"small\"\n sx={{ color: 'inherit' }}\n >\n <CloseIcon fontSize=\"small\" />\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 currentLanguage = useGetCurrentLanguage();\n const { i18n } = useOwpTranslation();\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 Components: {\n ...defaultSnackbarProviderProps.Components,\n ...snackbarProviderProps?.Components,\n },\n action: snackbarProviderProps?.action ?? defaultSnackbarProviderProps.action,\n };\n const resolvedAutoLogoutIdleTimeoutMs = Number(env?.autoLogoutIdleTimeoutMs);\n const autoLogoutIdleTimeoutMs = Number.isFinite(resolvedAutoLogoutIdleTimeoutMs)\n ? resolvedAutoLogoutIdleTimeoutMs\n : undefined;\n\n useEffect(() => {\n if (!env?.isI18nEnabled) {\n return;\n }\n\n void i18n.changeLanguage(getI18nextLanguageCode());\n }, [currentLanguage, env, i18n]);\n\n if (shouldRedirectToLogin) {\n return <OwpLoading />;\n }\n\n return (\n <DialogsProvider {...dialogsProviderProps}>\n <SnackbarProvider {...resolvedSnackbarProviderProps}>\n {children}\n <OwpPageLockLoading {...pageLockLoadingProps} />\n {env?.isAutoLogoutEnabled && <OwpAutoLogoutDialog timeout={autoLogoutIdleTimeoutMs} />}\n </SnackbarProvider>\n </DialogsProvider>\n );\n}\n"],"names":["defaultSnackbarComponents","OwpSnackbarContent","defaultSnackbarProviderProps","__name","snackbarKey","jsx","IconButton","closeSnackbar","CloseIcon","OwpUiProvider","children","dialogsProviderProps","snackbarProviderProps","env","useOwpAppContext","currentLanguage","useGetCurrentLanguage","i18n","useOwpTranslation","pageLockLoadingProps","useGetPageLockLoading","shouldRedirectToLogin","useAccessTokenGuard","resolvedSnackbarProviderProps","resolvedAutoLogoutIdleTimeoutMs","autoLogoutIdleTimeoutMs","useEffect","getI18nextLanguageCode","OwpLoading","DialogsProvider","jsxs","SnackbarProvider","OwpPageLockLoading","OwpAutoLogoutDialog"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,IAA4B;AAAA,EAChC,SAASC;AAAA,EACT,SAASA;AAAA,EACT,MAAMA;AAAA,EACN,SAASA;AAAA,EACT,OAAOA;AACT,GAQMC,IAAyD;AAAA,EAC7D,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,OAAO;AAAA,IACL,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,SAAS;AAAA,IACP,eAAe;AAAA,EAAA;AAAA,EAEjB,YAAYF;AAAA,EACZ,QAAQ,gBAAAG,EAAA,CAACC,MACP,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,SAAS,gBAAAH,EAAA,MAAMI,EAAcH,CAAW,GAA/B;AAAA,MACT,MAAK;AAAA,MACL,IAAI,EAAE,OAAO,UAAA;AAAA,MAEb,UAAA,gBAAAC,EAACG,GAAA,EAAU,UAAS,QAAA,CAAQ;AAAA,IAAA;AAAA,EAAA,GAPxB;AAUV;AAOO,SAASC,EAAc;AAAA,EAC5B,UAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,uBAAAC;AACF,GAAuB;AACrB,QAAM,EAAE,KAAAC,EAAA,IAAQC,EAAA,GACVC,IAAkBC,EAAA,GAClB,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAuBC,EAAA,GACvBC,IAAwBC,EAAA,GACxBC,IAA0D;AAAA,IAC9D,GAAGrB;AAAA,IACH,GAAGU;AAAA,IACH,OAAO;AAAA,MACL,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,SAAS;AAAA,MACP,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,YAAY;AAAA,MACV,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,SAAQA,KAAA,gBAAAA,EAAuB,WAAUV,EAA6B;AAAA,EAAA,GAElEsB,IAAkC,OAAOX,KAAA,gBAAAA,EAAK,uBAAuB,GACrEY,IAA0B,OAAO,SAASD,CAA+B,IAC3EA,IACA;AAUJ,SARAE,EAAU,MAAM;AACd,IAAKb,KAAA,QAAAA,EAAK,iBAILI,EAAK,eAAeU,GAAwB;AAAA,EACnD,GAAG,CAACZ,GAAiBF,GAAKI,CAAI,CAAC,GAE3BI,sBACMO,GAAA,EAAW,sBAIlBC,GAAA,EAAiB,GAAGlB,GACnB,UAAA,gBAAAmB,EAACC,GAAA,EAAkB,GAAGR,GACnB,UAAA;AAAA,IAAAb;AAAA,IACD,gBAAAL,EAAC2B,GAAA,EAAoB,GAAGb,GAAsB;AAAA,KAC7CN,KAAA,gBAAAA,EAAK,wBAAuB,gBAAAR,EAAC4B,GAAA,EAAoB,SAASR,EAAA,CAAyB;AAAA,EAAA,EAAA,CACtF,EAAA,CACF;AAEJ;AArDgBtB,EAAAM,GAAA;"}
1
+ {"version":3,"file":"OwpUiProvider.js","sources":["../../src/contexts/OwpUiProvider.tsx"],"sourcesContent":["import { OwpAutoLogoutDialog } from '@/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog';\nimport { OwpLoading } from '@/components/OwpLoading';\nimport { OwpPageLockLoading } from '@/components/OwpPageLockLoading';\nimport { OwpSnackbarContent } from '@/components/OwpSnackbarContent/OwpSnackbarContent';\nimport { useAccessTokenGuard } from '@/hooks/internal/useAccessTokenGuard';\nimport { useGetCurrentLanguage } from '@/hooks/internal/useCurrentLanguage';\nimport { useGetPageLockLoading } from '@/hooks/usePageLockLoading';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { getI18nextLanguageCode } from '@/utils/language';\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, useEffect } from 'react';\nimport { useOwpAppContext } from './OwpAppProvider';\n\ntype OwpDialogsProviderProps = Omit<ComponentProps<typeof DialogsProvider>, 'children'>;\ntype OwpSnackbarProviderProps = Omit<ComponentProps<typeof SnackbarProvider>, 'children'>;\n\nconst defaultSnackbarComponents = {\n default: OwpSnackbarContent,\n success: OwpSnackbarContent,\n info: OwpSnackbarContent,\n warning: OwpSnackbarContent,\n error: OwpSnackbarContent,\n} satisfies NonNullable<OwpSnackbarProviderProps['Components']>;\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 Components: defaultSnackbarComponents,\n action: (snackbarKey: SnackbarKey) => (\n <IconButton\n aria-label=\"close\"\n onClick={() => closeSnackbar(snackbarKey)}\n size=\"small\"\n sx={{ color: 'inherit' }}\n >\n <CloseIcon fontSize=\"small\" />\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 currentLanguage = useGetCurrentLanguage();\n const { i18n } = useOwpTranslation();\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 Components: {\n ...defaultSnackbarProviderProps.Components,\n ...snackbarProviderProps?.Components,\n },\n action: snackbarProviderProps?.action ?? defaultSnackbarProviderProps.action,\n };\n const resolvedAutoLogoutIdleTimeoutMs = Number(env?.autoLogoutIdleTimeoutMs);\n const autoLogoutIdleTimeoutMs = Number.isFinite(resolvedAutoLogoutIdleTimeoutMs)\n ? resolvedAutoLogoutIdleTimeoutMs\n : undefined;\n\n useEffect(() => {\n if (!env?.isI18nEnabled) {\n return;\n }\n\n void i18n.changeLanguage(getI18nextLanguageCode());\n }, [currentLanguage, env, i18n]);\n\n if (shouldRedirectToLogin) {\n return <OwpLoading />;\n }\n\n return (\n <DialogsProvider {...dialogsProviderProps}>\n <SnackbarProvider {...resolvedSnackbarProviderProps}>\n {children}\n <OwpPageLockLoading {...pageLockLoadingProps} />\n {env?.isAutoLogoutEnabled && <OwpAutoLogoutDialog timeout={autoLogoutIdleTimeoutMs} />}\n </SnackbarProvider>\n </DialogsProvider>\n );\n}\n"],"names":["defaultSnackbarComponents","OwpSnackbarContent","defaultSnackbarProviderProps","__name","snackbarKey","jsx","IconButton","closeSnackbar","CloseIcon","OwpUiProvider","children","dialogsProviderProps","snackbarProviderProps","env","useOwpAppContext","currentLanguage","useGetCurrentLanguage","i18n","useOwpTranslation","pageLockLoadingProps","useGetPageLockLoading","shouldRedirectToLogin","useAccessTokenGuard","resolvedSnackbarProviderProps","resolvedAutoLogoutIdleTimeoutMs","autoLogoutIdleTimeoutMs","useEffect","getI18nextLanguageCode","OwpLoading","DialogsProvider","jsxs","SnackbarProvider","OwpPageLockLoading","OwpAutoLogoutDialog"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAMA,IAA4B;AAAA,EAChC,SAASC;AAAA,EACT,SAASA;AAAA,EACT,MAAMA;AAAA,EACN,SAASA;AAAA,EACT,OAAOA;AACT,GAQMC,IAAyD;AAAA,EAC7D,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,OAAO;AAAA,IACL,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,SAAS;AAAA,IACP,eAAe;AAAA,EAAA;AAAA,EAEjB,YAAYF;AAAA,EACZ,QAAQ,gBAAAG,EAAA,CAACC,MACP,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,SAAS,gBAAAH,EAAA,MAAMI,EAAcH,CAAW,GAA/B;AAAA,MACT,MAAK;AAAA,MACL,IAAI,EAAE,OAAO,UAAA;AAAA,MAEb,UAAA,gBAAAC,EAACG,GAAA,EAAU,UAAS,QAAA,CAAQ;AAAA,IAAA;AAAA,EAAA,GAPxB;AAUV;AAOO,SAASC,EAAc;AAAA,EAC5B,UAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,uBAAAC;AACF,GAAuB;AACrB,QAAM,EAAE,KAAAC,EAAA,IAAQC,EAAA,GACVC,IAAkBC,EAAA,GAClB,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAuBC,EAAA,GACvBC,IAAwBC,EAAA,GACxBC,IAA0D;AAAA,IAC9D,GAAGrB;AAAA,IACH,GAAGU;AAAA,IACH,OAAO;AAAA,MACL,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,SAAS;AAAA,MACP,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,YAAY;AAAA,MACV,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,SAAQA,KAAA,gBAAAA,EAAuB,WAAUV,EAA6B;AAAA,EAAA,GAElEsB,IAAkC,OAAOX,KAAA,gBAAAA,EAAK,uBAAuB,GACrEY,IAA0B,OAAO,SAASD,CAA+B,IAC3EA,IACA;AAUJ,SARAE,EAAU,MAAM;AACd,IAAKb,KAAA,QAAAA,EAAK,iBAILI,EAAK,eAAeU,GAAwB;AAAA,EACnD,GAAG,CAACZ,GAAiBF,GAAKI,CAAI,CAAC,GAE3BI,sBACMO,GAAA,EAAW,sBAIlBC,GAAA,EAAiB,GAAGlB,GACnB,UAAA,gBAAAmB,EAACC,GAAA,EAAkB,GAAGR,GACnB,UAAA;AAAA,IAAAb;AAAA,IACD,gBAAAL,EAAC2B,GAAA,EAAoB,GAAGb,GAAsB;AAAA,KAC7CN,KAAA,gBAAAA,EAAK,wBAAuB,gBAAAR,EAAC4B,GAAA,EAAoB,SAASR,EAAA,CAAyB;AAAA,EAAA,EAAA,CACtF,EAAA,CACF;AAEJ;AArDgBtB,EAAAM,GAAA;"}
@@ -1,7 +1,7 @@
1
1
  var f = Object.defineProperty;
2
2
  var u = (e, t) => f(e, "name", { value: t, configurable: !0 });
3
- import { STORAGE_ACCESS_TOKEN_KEY as A } from "../constants/localStorageKeys.js";
4
- import { useOwpAppContext as E } from "../contexts/OwpAppProvider.js";
3
+ import { STORAGE_ACCESS_TOKEN_KEY as A } from "../../constants/localStorageKeys.js";
4
+ import { useOwpAppContext as E } from "../../contexts/OwpAppProvider.js";
5
5
  import { useRef as l, useEffect as p } from "react";
6
6
  import { useLocation as T, useNavigate as m } from "react-router-dom";
7
7
  const _ = "/auth/login", G = "Message.로그인이 필요합니다.", N = /* @__PURE__ */ u(({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAccessTokenGuard.js","sources":["../../../src/hooks/internal/useAccessTokenGuard.ts"],"sourcesContent":["import { STORAGE_ACCESS_TOKEN_KEY } from '@/constants/localStorageKeys';\nimport { useOwpAppContext } from '@/contexts/OwpAppProvider';\nimport { useEffect, useRef } from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\n\nexport interface UseAccessTokenGuardOptions {\n loginPath?: string;\n isEnabled?: boolean;\n snackbarMessageKey?: string;\n}\n\nconst DEFAULT_LOGIN_PATH = '/auth/login';\nconst DEFAULT_SNACKBAR_MESSAGE_KEY = 'Message.로그인이 필요합니다.';\n\n/**\n * 액세스 토큰 기반 로그인 가드\n * @param loginPath 로그인 라우트 경로\n * @param isEnabled 가드 활성화 여부\n * @param snackbarMessageKey 로그인 필요 안내 메시지 키\n */\nexport const useAccessTokenGuard = ({\n loginPath = DEFAULT_LOGIN_PATH,\n isEnabled,\n snackbarMessageKey = DEFAULT_SNACKBAR_MESSAGE_KEY,\n}: UseAccessTokenGuardOptions = {}) => {\n const { env } = useOwpAppContext();\n const location = useLocation();\n const navigate = useNavigate();\n const accessToken =\n typeof window === 'undefined' ? null : window.localStorage.getItem(STORAGE_ACCESS_TOKEN_KEY);\n const isLoginRoute = location.pathname.startsWith(loginPath);\n const isAccessTokenGuardEnabled = isEnabled ?? env?.isAccessTokenGuardEnabled ?? true;\n const shouldRedirectToLogin = isAccessTokenGuardEnabled && !accessToken && !isLoginRoute;\n const hasHandledRedirectRef = useRef(false);\n\n useEffect(() => {\n if (!shouldRedirectToLogin) {\n hasHandledRedirectRef.current = false;\n return;\n }\n\n if (hasHandledRedirectRef.current) {\n return;\n }\n\n hasHandledRedirectRef.current = true;\n\n navigate(loginPath, {\n replace: true,\n state: snackbarMessageKey\n ? {\n snackbarMessageKey,\n }\n : undefined,\n });\n }, [loginPath, navigate, shouldRedirectToLogin, snackbarMessageKey]);\n\n return shouldRedirectToLogin;\n};\n"],"names":["DEFAULT_LOGIN_PATH","DEFAULT_SNACKBAR_MESSAGE_KEY","useAccessTokenGuard","__name","loginPath","isEnabled","snackbarMessageKey","env","useOwpAppContext","location","useLocation","navigate","useNavigate","accessToken","STORAGE_ACCESS_TOKEN_KEY","isLoginRoute","shouldRedirectToLogin","hasHandledRedirectRef","useRef","useEffect"],"mappings":";;;;;;AAWA,MAAMA,IAAqB,eACrBC,IAA+B,uBAQxBC,IAAsB,gBAAAC,EAAA,CAAC;AAAA,EAClC,WAAAC,IAAYJ;AAAA,EACZ,WAAAK;AAAA,EACA,oBAAAC,IAAqBL;AACvB,IAAgC,OAAO;AACrC,QAAM,EAAE,KAAAM,EAAA,IAAQC,EAAA,GACVC,IAAWC,EAAA,GACXC,IAAWC,EAAA,GACXC,IACJ,OAAO,SAAW,MAAc,OAAO,OAAO,aAAa,QAAQC,CAAwB,GACvFC,IAAeN,EAAS,SAAS,WAAWL,CAAS,GAErDY,KAD4BX,MAAaE,KAAA,gBAAAA,EAAK,8BAA6B,OACtB,CAACM,KAAe,CAACE,GACtEE,IAAwBC,EAAO,EAAK;AAE1C,SAAAC,EAAU,MAAM;AACd,QAAI,CAACH,GAAuB;AAC1B,MAAAC,EAAsB,UAAU;AAChC;AAAA,IACF;AAEA,IAAIA,EAAsB,YAI1BA,EAAsB,UAAU,IAEhCN,EAASP,GAAW;AAAA,MAClB,SAAS;AAAA,MACT,OAAOE,IACH;AAAA,QACE,oBAAAA;AAAA,MAAA,IAEF;AAAA,IAAA,CACL;AAAA,EACH,GAAG,CAACF,GAAWO,GAAUK,GAAuBV,CAAkB,CAAC,GAE5DU;AACT,GAtCmC;"}
@@ -1,7 +1,7 @@
1
1
  var n = Object.defineProperty;
2
2
  var e = (t, o) => n(t, "name", { value: o, configurable: !0 });
3
- import { STORAGE_KEYS as a } from "../constants/storageKeys.js";
4
- import { useOwpTranslation as u } from "./useOwpTranslation.js";
3
+ import { STORAGE_KEYS as a } from "../../constants/storageKeys.js";
4
+ import { useOwpTranslation as u } from "../useOwpTranslation.js";
5
5
  import { useAtomValue as m, useSetAtom as g } from "jotai";
6
6
  import { atomWithStorage as i } from "jotai/utils";
7
7
  const r = i(a.currentLanguage, {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCurrentLanguage.js","sources":["../../../src/hooks/internal/useCurrentLanguage.ts"],"sourcesContent":["export { FALLBACK_LANGUAGE_LIST } from '@/constants/language';\nimport { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\nexport type CurrentLanguage = { id: 'en' | 'kr' | 'lc'; title: string; flag: string };\n\nconst currentLanguageAtom = atomWithStorage<CurrentLanguage>(STORAGE_KEYS.currentLanguage, {\n id: 'kr',\n title: '한국어',\n flag: 'KR',\n});\n\n/**\n * 언어 목록 조회 훅\n */\nexport const useGetLanguageList = (): CurrentLanguage[] => {\n const { t } = useOwpTranslation();\n return [\n { id: 'kr', title: t('Common.한국어'), flag: 'KR' },\n {\n id: 'en',\n title: t('Common.English'),\n flag: 'EN',\n },\n { id: 'lc', title: t('Common.Etc'), flag: 'LC' },\n ];\n};\n\n/**\n * 현재 언어 조회 훅\n */\nexport const useGetCurrentLanguage = () => {\n return useAtomValue(currentLanguageAtom);\n};\n\n/**\n * 현재 언어 설정 훅\n */\nexport const useSetCurrentLanguage = () => {\n return useSetAtom(currentLanguageAtom);\n};\n"],"names":["currentLanguageAtom","atomWithStorage","STORAGE_KEYS","useGetLanguageList","__name","useOwpTranslation","useGetCurrentLanguage","useAtomValue","useSetCurrentLanguage","useSetAtom"],"mappings":";;;;;;AAQA,MAAMA,IAAsBC,EAAiCC,EAAa,iBAAiB;AAAA,EACzF,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,MAAM;AACR,CAAC,GAKYC,IAAqB,gBAAAC,EAAA,MAAyB;AACzD,QAAM,EAAE,EAAA,IAAMC,EAAA;AACd,SAAO;AAAA,IACL,EAAE,IAAI,MAAM,OAAO,EAAE,YAAY,GAAG,MAAM,KAAA;AAAA,IAC1C;AAAA,MACE,IAAI;AAAA,MACJ,OAAO,EAAE,gBAAgB;AAAA,MACzB,MAAM;AAAA,IAAA;AAAA,IAER,EAAE,IAAI,MAAM,OAAO,EAAE,YAAY,GAAG,MAAM,KAAA;AAAA,EAAK;AAEnD,GAXkC,uBAgBrBC,IAAwB,gBAAAF,EAAA,MAC5BG,EAAaP,CAAmB,GADJ,0BAOxBQ,IAAwB,gBAAAJ,EAAA,MAC5BK,EAAWT,CAAmB,GADF;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHeaderWrapState.js","sources":["../../../src/hooks/internal/useHeaderWrapState.ts"],"sourcesContent":["import { useLayoutEffect, useRef, useState, type RefObject } from 'react';\n\ntype HeaderWrapState = {\n containerRef: RefObject<HTMLDivElement | null>;\n titleRef: RefObject<HTMLDivElement | null>;\n slotsRef: RefObject<HTMLDivElement | null>;\n actionsRef: RefObject<HTMLDivElement | null>;\n isWrapped: boolean;\n};\n\nconst getVisibleElementWidth = (element: HTMLElement | null) => {\n if (!element || element.getClientRects().length === 0) {\n return 0;\n }\n\n return element.offsetWidth;\n};\n\nconst getGroupContentWidth = (element: HTMLElement | null) => {\n if (!element || element.getClientRects().length === 0) {\n return 0;\n }\n\n const visibleChildren = Array.from(element.children).filter(\n (child) => (child as HTMLElement).getClientRects().length > 0,\n ) as HTMLElement[];\n\n if (visibleChildren.length === 0) {\n return element.offsetWidth;\n }\n\n const computedStyle = window.getComputedStyle(element);\n const gap = Number.parseFloat(computedStyle.columnGap || computedStyle.gap || '0') || 0;\n\n return (\n visibleChildren.reduce((totalWidth, child) => totalWidth + child.offsetWidth, 0) +\n gap * Math.max(visibleChildren.length - 1, 0)\n );\n};\n\n/**\n * 헤더 한 줄 배치 가능 여부 계산 훅\n * @param deps 측정 재실행 의존성\n */\nconst useHeaderWrapState = (deps: unknown[] = []): HeaderWrapState => {\n const containerRef = useRef<HTMLDivElement>(null);\n const titleRef = useRef<HTMLDivElement>(null);\n const slotsRef = useRef<HTMLDivElement>(null);\n const actionsRef = useRef<HTMLDivElement>(null);\n const [isWrapped, setIsWrapped] = useState(false);\n\n useLayoutEffect(() => {\n const containerElement = containerRef.current;\n\n if (!containerElement) {\n return undefined;\n }\n\n const updateWrapState = () => {\n const containerStyle = window.getComputedStyle(containerElement);\n const columnGap =\n Number.parseFloat(containerStyle.columnGap || containerStyle.gap || '0') || 0;\n const groupWidths = [\n getVisibleElementWidth(titleRef.current),\n getGroupContentWidth(slotsRef.current),\n getGroupContentWidth(actionsRef.current),\n ].filter((width) => width > 0);\n const requiredWidth =\n groupWidths.reduce((totalWidth, width) => totalWidth + width, 0) +\n columnGap * Math.max(groupWidths.length - 1, 0);\n\n setIsWrapped(requiredWidth > containerElement.clientWidth);\n };\n\n updateWrapState();\n\n const resizeObserver = new ResizeObserver(() => {\n updateWrapState();\n });\n\n [containerElement, titleRef.current, slotsRef.current, actionsRef.current]\n .filter(Boolean)\n .forEach((element) => {\n resizeObserver.observe(element as HTMLElement);\n });\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [deps]);\n\n return {\n containerRef,\n titleRef,\n slotsRef,\n actionsRef,\n isWrapped,\n };\n};\n\nexport { useHeaderWrapState };\n"],"names":["getVisibleElementWidth","__name","element","getGroupContentWidth","visibleChildren","child","computedStyle","gap","totalWidth","useHeaderWrapState","deps","containerRef","useRef","titleRef","slotsRef","actionsRef","isWrapped","setIsWrapped","useState","useLayoutEffect","containerElement","updateWrapState","containerStyle","columnGap","groupWidths","width","requiredWidth","resizeObserver"],"mappings":";;;AAUA,MAAMA,IAAyB,gBAAAC,EAAA,CAACC,MAC1B,CAACA,KAAWA,EAAQ,eAAA,EAAiB,WAAW,IAC3C,IAGFA,EAAQ,aALc,2BAQzBC,IAAuB,gBAAAF,EAAA,CAACC,MAAgC;AAC5D,MAAI,CAACA,KAAWA,EAAQ,eAAA,EAAiB,WAAW;AAClD,WAAO;AAGT,QAAME,IAAkB,MAAM,KAAKF,EAAQ,QAAQ,EAAE;AAAA,IACnD,CAACG,MAAWA,EAAsB,eAAA,EAAiB,SAAS;AAAA,EAAA;AAG9D,MAAID,EAAgB,WAAW;AAC7B,WAAOF,EAAQ;AAGjB,QAAMI,IAAgB,OAAO,iBAAiBJ,CAAO,GAC/CK,IAAM,OAAO,WAAWD,EAAc,aAAaA,EAAc,OAAO,GAAG,KAAK;AAEtF,SACEF,EAAgB,OAAO,CAACI,GAAYH,MAAUG,IAAaH,EAAM,aAAa,CAAC,IAC/EE,IAAM,KAAK,IAAIH,EAAgB,SAAS,GAAG,CAAC;AAEhD,GApB6B,yBA0BvBK,IAAqB,gBAAAR,EAAA,CAACS,IAAkB,OAAwB;AACpE,QAAMC,IAAeC,EAAuB,IAAI,GAC1CC,IAAWD,EAAuB,IAAI,GACtCE,IAAWF,EAAuB,IAAI,GACtCG,IAAaH,EAAuB,IAAI,GACxC,CAACI,GAAWC,CAAY,IAAIC,EAAS,EAAK;AAEhD,SAAAC,EAAgB,MAAM;AACpB,UAAMC,IAAmBT,EAAa;AAEtC,QAAI,CAACS;AACH;AAGF,UAAMC,IAAkB,gBAAApB,EAAA,MAAM;AAC5B,YAAMqB,IAAiB,OAAO,iBAAiBF,CAAgB,GACzDG,IACJ,OAAO,WAAWD,EAAe,aAAaA,EAAe,OAAO,GAAG,KAAK,GACxEE,IAAc;AAAA,QAClBxB,EAAuBa,EAAS,OAAO;AAAA,QACvCV,EAAqBW,EAAS,OAAO;AAAA,QACrCX,EAAqBY,EAAW,OAAO;AAAA,MAAA,EACvC,OAAO,CAACU,MAAUA,IAAQ,CAAC,GACvBC,IACJF,EAAY,OAAO,CAAChB,GAAYiB,MAAUjB,IAAaiB,GAAO,CAAC,IAC/DF,IAAY,KAAK,IAAIC,EAAY,SAAS,GAAG,CAAC;AAEhD,MAAAP,EAAaS,IAAgBN,EAAiB,WAAW;AAAA,IAC3D,GAdwB;AAgBxB,IAAAC,EAAA;AAEA,UAAMM,IAAiB,IAAI,eAAe,MAAM;AAC9C,MAAAN,EAAA;AAAA,IACF,CAAC;AAED,YAACD,GAAkBP,EAAS,SAASC,EAAS,SAASC,EAAW,OAAO,EACtE,OAAO,OAAO,EACd,QAAQ,CAACb,MAAY;AACpB,MAAAyB,EAAe,QAAQzB,CAAsB;AAAA,IAC/C,CAAC,GAEI,MAAM;AACX,MAAAyB,EAAe,WAAA;AAAA,IACjB;AAAA,EACF,GAAG,CAACjB,CAAI,CAAC,GAEF;AAAA,IACL,cAAAC;AAAA,IACA,UAAAE;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,EAAA;AAEJ,GAtD2B;"}
@@ -0,0 +1,24 @@
1
+ var v = Object.defineProperty;
2
+ var n = (e, t) => v(e, "name", { value: t, configurable: !0 });
3
+ import { useSetAtom as o, useAtomValue as d } from "jotai";
4
+ import { navbarToggleFoldedAtom as g, navbarOpenFoldedAtom as i, navbarCloseFoldedAtom as p, navbarToggleMobileAtom as u, navbarOpenMobileAtom as F, navbarCloseMobileAtom as M, navbarOpenAtom as C, navbarCloseAtom as N, navbarToggleAtom as O, resetNavbarAtom as T, navbarStateAtom as f } from "../../store/atoms/navbarAtoms.js";
5
+ const V = /* @__PURE__ */ n(() => d(f), "useGetNavbar"), h = /* @__PURE__ */ n(() => {
6
+ const e = o(g), t = o(i), a = o(p), l = o(u), s = o(F), r = o(M), b = o(C), m = o(N), c = o(O), A = o(T);
7
+ return {
8
+ toggleFolded: e,
9
+ openFolded: t,
10
+ closeFolded: a,
11
+ toggleMobile: l,
12
+ openMobile: s,
13
+ closeMobile: r,
14
+ open: b,
15
+ close: m,
16
+ toggle: c,
17
+ reset: A
18
+ };
19
+ }, "useNavbarActions");
20
+ export {
21
+ V as useGetNavbar,
22
+ h as useNavbarActions
23
+ };
24
+ //# sourceMappingURL=useNavbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavbar.js","sources":["../../../src/hooks/internal/useNavbar.ts"],"sourcesContent":["import {\n navbarCloseAtom,\n navbarCloseFoldedAtom,\n navbarCloseMobileAtom,\n navbarOpenAtom,\n navbarOpenFoldedAtom,\n navbarOpenMobileAtom,\n navbarStateAtom,\n navbarToggleAtom,\n navbarToggleFoldedAtom,\n navbarToggleMobileAtom,\n resetNavbarAtom,\n} from '@/store/atoms';\nimport { useAtomValue, useSetAtom } from 'jotai';\n\n/**\n * Navbar 상태 조회 훅\n */\nexport const useGetNavbar = () => {\n return useAtomValue(navbarStateAtom);\n};\n\n/**\n * Navbar 액션 훅\n */\nexport const useNavbarActions = () => {\n const toggleFolded = useSetAtom(navbarToggleFoldedAtom);\n const openFolded = useSetAtom(navbarOpenFoldedAtom);\n const closeFolded = useSetAtom(navbarCloseFoldedAtom);\n const toggleMobile = useSetAtom(navbarToggleMobileAtom);\n const openMobile = useSetAtom(navbarOpenMobileAtom);\n const closeMobile = useSetAtom(navbarCloseMobileAtom);\n const open = useSetAtom(navbarOpenAtom);\n const close = useSetAtom(navbarCloseAtom);\n const toggle = useSetAtom(navbarToggleAtom);\n const reset = useSetAtom(resetNavbarAtom);\n\n return {\n toggleFolded,\n openFolded,\n closeFolded,\n toggleMobile,\n openMobile,\n closeMobile,\n open,\n close,\n toggle,\n reset,\n };\n};\n"],"names":["useGetNavbar","__name","useAtomValue","navbarStateAtom","useNavbarActions","toggleFolded","useSetAtom","navbarToggleFoldedAtom","openFolded","navbarOpenFoldedAtom","closeFolded","navbarCloseFoldedAtom","toggleMobile","navbarToggleMobileAtom","openMobile","navbarOpenMobileAtom","closeMobile","navbarCloseMobileAtom","open","navbarOpenAtom","close","navbarCloseAtom","toggle","navbarToggleAtom","reset","resetNavbarAtom"],"mappings":";;;;AAkBO,MAAMA,IAAe,gBAAAC,EAAA,MACnBC,EAAaC,CAAe,GADT,iBAOfC,IAAmB,gBAAAH,EAAA,MAAM;AACpC,QAAMI,IAAeC,EAAWC,CAAsB,GAChDC,IAAaF,EAAWG,CAAoB,GAC5CC,IAAcJ,EAAWK,CAAqB,GAC9CC,IAAeN,EAAWO,CAAsB,GAChDC,IAAaR,EAAWS,CAAoB,GAC5CC,IAAcV,EAAWW,CAAqB,GAC9CC,IAAOZ,EAAWa,CAAc,GAChCC,IAAQd,EAAWe,CAAe,GAClCC,IAAShB,EAAWiB,CAAgB,GACpCC,IAAQlB,EAAWmB,CAAe;AAExC,SAAO;AAAA,IACL,cAAApB;AAAA,IACA,YAAAG;AAAA,IACA,aAAAE;AAAA,IACA,cAAAE;AAAA,IACA,YAAAE;AAAA,IACA,aAAAE;AAAA,IACA,MAAAE;AAAA,IACA,OAAAE;AAAA,IACA,QAAAE;AAAA,IACA,OAAAE;AAAA,EAAA;AAEJ,GAxBgC;"}
@@ -1,6 +1,6 @@
1
1
  var h = Object.defineProperty;
2
2
  var a = (e, o) => h(e, "name", { value: o, configurable: !0 });
3
- import { useOwpAppContext as R } from "../contexts/OwpAppProvider.js";
3
+ import { useOwpAppContext as R } from "../../contexts/OwpAppProvider.js";
4
4
  import { useAtomValue as p, atom as v, useSetAtom as A } from "jotai";
5
5
  import { useMemo as l } from "react";
6
6
  import { useLocation as f, useResolvedPath as g, createPath as u } from "react-router-dom";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationActiveRouteRemount.js","sources":["../../../src/hooks/internal/useNavigationActiveRouteRemount.ts"],"sourcesContent":["import { useOwpAppContext } from '@/contexts/OwpAppProvider';\nimport { atom, useAtomValue, useSetAtom } from 'jotai';\nimport { useMemo } from 'react';\nimport { createPath, type To, useLocation, useResolvedPath } from 'react-router-dom';\n\nconst navigationActiveRouteRemountKeyAtom = atom(0);\n\n/**\n * 네비게이션 active route remount key 조회\n */\nexport const useNavigationActiveRouteRemountKey = () =>\n useAtomValue(navigationActiveRouteRemountKeyAtom);\n\n/**\n * 네비게이션 active route remount 제어값 조회\n * @param to 이동 대상 경로\n */\nexport const useNavigationActiveRouteRemount = (to?: To) => {\n const { env } = useOwpAppContext();\n const location = useLocation();\n const setNavigationActiveRouteRemountKey = useSetAtom(navigationActiveRouteRemountKeyAtom);\n const resolvedTo = useResolvedPath(\n to ?? {\n pathname: location.pathname,\n search: location.search,\n hash: location.hash,\n },\n );\n\n const isNavigationActiveRouteRemountEnabled =\n env?.isNavigationActiveRouteRemountEnabled ?? true;\n\n const shouldRemountRouteOnClick = useMemo(() => {\n if (!to || !isNavigationActiveRouteRemountEnabled) {\n return false;\n }\n\n return (\n createPath(resolvedTo) ===\n createPath({\n pathname: location.pathname,\n search: location.search,\n hash: location.hash,\n })\n );\n }, [\n isNavigationActiveRouteRemountEnabled,\n location.hash,\n location.pathname,\n location.search,\n resolvedTo,\n to,\n ]);\n\n const remountRoute = () => {\n setNavigationActiveRouteRemountKey((previousValue) => previousValue + 1);\n };\n\n return {\n isNavigationActiveRouteRemountEnabled,\n shouldRemountRouteOnClick,\n remountRoute,\n };\n};\n"],"names":["navigationActiveRouteRemountKeyAtom","atom","useNavigationActiveRouteRemountKey","__name","useAtomValue","useNavigationActiveRouteRemount","to","env","useOwpAppContext","location","useLocation","setNavigationActiveRouteRemountKey","useSetAtom","resolvedTo","useResolvedPath","isNavigationActiveRouteRemountEnabled","shouldRemountRouteOnClick","useMemo","createPath","previousValue"],"mappings":";;;;;;AAKA,MAAMA,IAAsCC,EAAK,CAAC,GAKrCC,IAAqC,gBAAAC,EAAA,MAChDC,EAAaJ,CAAmC,GADA,uCAOrCK,IAAkC,gBAAAF,EAAA,CAACG,MAAY;AAC1D,QAAM,EAAE,KAAAC,EAAA,IAAQC,EAAA,GACVC,IAAWC,EAAA,GACXC,IAAqCC,EAAWZ,CAAmC,GACnFa,IAAaC;AAAA,IACjBR,KAAM;AAAA,MACJ,UAAUG,EAAS;AAAA,MACnB,QAAQA,EAAS;AAAA,MACjB,MAAMA,EAAS;AAAA,IAAA;AAAA,EACjB,GAGIM,KACJR,KAAA,gBAAAA,EAAK,0CAAyC,IAE1CS,IAA4BC,EAAQ,MACpC,CAACX,KAAM,CAACS,IACH,KAIPG,EAAWL,CAAU,MACrBK,EAAW;AAAA,IACT,UAAUT,EAAS;AAAA,IACnB,QAAQA,EAAS;AAAA,IACjB,MAAMA,EAAS;AAAA,EAAA,CAChB,GAEF;AAAA,IACDM;AAAA,IACAN,EAAS;AAAA,IACTA,EAAS;AAAA,IACTA,EAAS;AAAA,IACTI;AAAA,IACAP;AAAA,EAAA,CACD;AAMD,SAAO;AAAA,IACL,uCAAAS;AAAA,IACA,2BAAAC;AAAA,IACA,cAPmB,gBAAAb,EAAA,MAAM;AACzB,MAAAQ,EAAmC,CAACQ,MAAkBA,IAAgB,CAAC;AAAA,IACzE,GAFqB;AAAA,EAOnB;AAEJ,GA9C+C;"}
@@ -1,9 +1,9 @@
1
1
  var u = Object.defineProperty;
2
2
  var t = (o, e) => u(o, "name", { value: e, configurable: !0 });
3
- import { STORAGE_KEYS as s } from "../constants/storageKeys.js";
4
- import { useAtomValue as m, useSetAtom as c } from "jotai";
3
+ import { STORAGE_KEYS as s } from "../../constants/storageKeys.js";
4
+ import { useSetAtom as m, useAtomValue as c } from "jotai";
5
5
  import { atomWithStorage as S } from "jotai/utils";
6
- const r = S(s.currentShortcuts, []), A = /* @__PURE__ */ t(() => m(r), "useGetShortcuts"), a = /* @__PURE__ */ t(() => c(r), "useSetShortcuts");
6
+ const r = S(s.currentShortcuts, []), A = /* @__PURE__ */ t(() => c(r), "useGetShortcuts"), a = /* @__PURE__ */ t(() => m(r), "useSetShortcuts");
7
7
  export {
8
8
  A as useGetShortcuts,
9
9
  a as useSetShortcuts
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShortcuts.js","sources":["../../../src/hooks/internal/useShortcuts.ts"],"sourcesContent":["import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { useAtomValue, useSetAtom } from 'jotai';\nimport { atomWithStorage } from 'jotai/utils';\n\nconst currentShortcutsAtom = atomWithStorage<Array<string> | []>(STORAGE_KEYS.currentShortcuts, []);\n\n/**\n * 바로가기 목록 조회 훅\n */\nexport const useGetShortcuts = () => {\n return useAtomValue(currentShortcutsAtom);\n};\n\n/**\n * 바로가기 목록 설정 훅\n */\nexport const useSetShortcuts = () => {\n return useSetAtom(currentShortcutsAtom);\n};\n"],"names":["currentShortcutsAtom","atomWithStorage","STORAGE_KEYS","useGetShortcuts","__name","useAtomValue","useSetShortcuts","useSetAtom"],"mappings":";;;;;AAIA,MAAMA,IAAuBC,EAAoCC,EAAa,kBAAkB,CAAA,CAAE,GAKrFC,IAAkB,gBAAAC,EAAA,MACtBC,EAAaL,CAAoB,GADX,oBAOlBM,IAAkB,gBAAAF,EAAA,MACtBG,EAAWP,CAAoB,GADT;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemeMediaQuery.js","sources":["../../../src/hooks/internal/useThemeMediaQuery.ts"],"sourcesContent":["import { useTheme, type Theme } from '@mui/material/styles';\nimport { useEffect, useState } from 'react';\n\n/**\n * The useThemeMediaQuery function is a custom hook that returns a boolean indicating whether the current screen matches the specified media query.\n * It takes in a themeCallbackFunc as a parameter, which is a function that returns a string representing the media query to match.\n * It returns a boolean indicating whether the current screen matches the specified media query.\n */\nexport function useThemeMediaQuery(themeCallbackFunc: (theme: Theme) => string) {\n const theme = useTheme();\n\n const query = themeCallbackFunc(theme).replace('@media ', '');\n\n \n function getMatches(q: string) {\n return window.matchMedia(q).matches;\n }\n\n const [matches, setMatches] = useState(getMatches(query));\n\n useEffect(\n () => {\n const mediaQuery = window.matchMedia(query);\n\n \n setMatches(getMatches(query));\n\n \n const handler = (event: MediaQueryListEvent) => setMatches(event.matches);\n\n \n mediaQuery.addEventListener('change', handler);\n\n \n return () => mediaQuery.removeEventListener('change', handler);\n },\n [query], \n );\n\n return matches;\n}\n"],"names":["useThemeMediaQuery","themeCallbackFunc","theme","useTheme","query","getMatches","q","__name","matches","setMatches","useState","useEffect","mediaQuery","handler","event"],"mappings":";;;;AAQO,SAASA,EAAmBC,GAA6C;AAC9E,QAAMC,IAAQC,EAAA,GAERC,IAAQH,EAAkBC,CAAK,EAAE,QAAQ,WAAW,EAAE;AAG5D,WAASG,EAAWC,GAAW;AAC7B,WAAO,OAAO,WAAWA,CAAC,EAAE;AAAA,EAC9B;AAFS,EAAAC,EAAAF,GAAA;AAIT,QAAM,CAACG,GAASC,CAAU,IAAIC,EAASL,EAAWD,CAAK,CAAC;AAExD,SAAAO;AAAA,IACE,MAAM;AACJ,YAAMC,IAAa,OAAO,WAAWR,CAAK;AAG1C,MAAAK,EAAWJ,EAAWD,CAAK,CAAC;AAG5B,YAAMS,IAAU,gBAAAN,EAAA,CAACO,MAA+BL,EAAWK,EAAM,OAAO,GAAxD;AAGhB,aAAAF,EAAW,iBAAiB,UAAUC,CAAO,GAGtC,MAAMD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,IAC/D;AAAA,IACA,CAACT,CAAK;AAAA,EAAA,GAGDI;AACT;AAhCgBD,EAAAP,GAAA;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTimeout.js","sources":["../../../src/hooks/internal/useTimeout.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\n/**\n * The useTimeout function is a custom hook that sets a timeout for a given callback function.\n * It takes in a callback function and a delay time in milliseconds as parameters.\n * It returns nothing.\n */\nexport function useTimeout(callback: () => void, delay: number) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n useEffect(() => {\n let timer: NodeJS.Timeout | undefined;\n\n if (delay !== null && callback && typeof callback === 'function') {\n timer = setTimeout(callbackRef.current, delay);\n }\n\n return () => {\n if (timer) {\n clearTimeout(timer);\n }\n };\n }, [callback, delay]);\n}\n"],"names":["useTimeout","callback","delay","callbackRef","useRef","useEffect","timer","__name"],"mappings":";;;AAOO,SAASA,EAAWC,GAAsBC,GAAe;AAC9D,QAAMC,IAAcC,EAAOH,CAAQ;AAEnC,EAAAI,EAAU,MAAM;AACd,IAAAF,EAAY,UAAUF;AAAA,EACxB,GAAG,CAACA,CAAQ,CAAC,GAEbI,EAAU,MAAM;AACd,QAAIC;AAEJ,WAAIJ,MAAU,QAAQD,KAAY,OAAOA,KAAa,eACpDK,IAAQ,WAAWH,EAAY,SAASD,CAAK,IAGxC,MAAM;AACX,MAAII,KACF,aAAaA,CAAK;AAAA,IAEtB;AAAA,EACF,GAAG,CAACL,GAAUC,CAAK,CAAC;AACtB;AApBgBK,EAAAP,GAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useInitApp.js","sources":["../../src/hooks/useInitApp.ts"],"sourcesContent":["import { useOwpAppContext } from '@/contexts/OwpAppProvider';\nimport { ensureDayjsBrowserSetup } from '@/utils/dayjsBrowser';\nimport { useEffect, useRef } from 'react';\nimport { useInitCommonCodes } from './internal/useInitCommonCodes';\nimport { usePageLockLoading } from './usePageLockLoading';\nimport { useSetLogoSrc } from './useLogoSrc';\nimport { useSetNavigationList } from './useNavigation';\n\nexport interface UseInitAppOptions {\n logoSrc: string;\n title?: string;\n}\n\nensureDayjsBrowserSetup();\n\n/**\n * 앱 기본 상태 초기화 훅\n * @param logoSrc 초기 로고 경로\n * @param title 문서 제목\n */\nexport const useInitApp = ({ logoSrc, title }: UseInitAppOptions) => {\n const initialLogoSrc = useRef(logoSrc);\n const initialTitle = useRef(title);\n const { env, navigationConfig } = useOwpAppContext();\n const setLogoSrc = useSetLogoSrc();\n const setNavigationList = useSetNavigationList();\n const { setLoading } = usePageLockLoading();\n\n useInitCommonCodes();\n\n useEffect(() => {\n setLogoSrc(initialLogoSrc.current);\n\n if (initialTitle.current) {\n document.title = initialTitle.current;\n }\n\n setLoading({\n loading: false,\n });\n\n if (!env?.isBackendNavigationEnabled) {\n setNavigationList(navigationConfig);\n }\n }, [env, navigationConfig, setLoading, setLogoSrc, setNavigationList]);\n};\n"],"names":["ensureDayjsBrowserSetup","useInitApp","__name","logoSrc","title","initialLogoSrc","useRef","initialTitle","env","navigationConfig","useOwpAppContext","setLogoSrc","useSetLogoSrc","setNavigationList","useSetNavigationList","setLoading","usePageLockLoading","useInitCommonCodes","useEffect"],"mappings":";;;;;;;;;AAaAA,EAAA;AAOO,MAAMC,IAAa,gBAAAC,EAAA,CAAC,EAAE,SAAAC,GAAS,OAAAC,QAA+B;AACnE,QAAMC,IAAiBC,EAAOH,CAAO,GAC/BI,IAAeD,EAAOF,CAAK,GAC3B,EAAE,KAAAI,GAAK,kBAAAC,EAAA,IAAqBC,EAAA,GAC5BC,IAAaC,EAAA,GACbC,IAAoBC,EAAA,GACpB,EAAE,YAAAC,EAAA,IAAeC,EAAA;AAEvB,EAAAC,EAAA,GAEAC,EAAU,MAAM;AACd,IAAAP,EAAWN,EAAe,OAAO,GAE7BE,EAAa,YACf,SAAS,QAAQA,EAAa,UAGhCQ,EAAW;AAAA,MACT,SAAS;AAAA,IAAA,CACV,GAEIP,KAAA,QAAAA,EAAK,8BACRK,EAAkBJ,CAAgB;AAAA,EAEtC,GAAG,CAACD,GAAKC,GAAkBM,GAAYJ,GAAYE,CAAiB,CAAC;AACvE,GAzB0B;"}
1
+ {"version":3,"file":"useInitApp.js","sources":["../../src/hooks/useInitApp.ts"],"sourcesContent":["import { useOwpAppContext } from '@/contexts/OwpAppProvider';\nimport { ensureDayjsBrowserSetup } from '@/dayjs';\nimport { useEffect, useRef } from 'react';\nimport { useInitCommonCodes } from './internal/useInitCommonCodes';\nimport { usePageLockLoading } from './usePageLockLoading';\nimport { useSetLogoSrc } from './useLogoSrc';\nimport { useSetNavigationList } from './useNavigation';\n\nexport interface UseInitAppOptions {\n logoSrc: string;\n title?: string;\n}\n\nensureDayjsBrowserSetup();\n\n/**\n * 앱 기본 상태 초기화 훅\n * @param logoSrc 초기 로고 경로\n * @param title 문서 제목\n */\nexport const useInitApp = ({ logoSrc, title }: UseInitAppOptions) => {\n const initialLogoSrc = useRef(logoSrc);\n const initialTitle = useRef(title);\n const { env, navigationConfig } = useOwpAppContext();\n const setLogoSrc = useSetLogoSrc();\n const setNavigationList = useSetNavigationList();\n const { setLoading } = usePageLockLoading();\n\n useInitCommonCodes();\n\n useEffect(() => {\n setLogoSrc(initialLogoSrc.current);\n\n if (initialTitle.current) {\n document.title = initialTitle.current;\n }\n\n setLoading({\n loading: false,\n });\n\n if (!env?.isBackendNavigationEnabled) {\n setNavigationList(navigationConfig);\n }\n }, [env, navigationConfig, setLoading, setLogoSrc, setNavigationList]);\n};\n"],"names":["ensureDayjsBrowserSetup","useInitApp","__name","logoSrc","title","initialLogoSrc","useRef","initialTitle","env","navigationConfig","useOwpAppContext","setLogoSrc","useSetLogoSrc","setNavigationList","useSetNavigationList","setLoading","usePageLockLoading","useInitCommonCodes","useEffect"],"mappings":";;;;;;;;;AAaAA,EAAA;AAOO,MAAMC,IAAa,gBAAAC,EAAA,CAAC,EAAE,SAAAC,GAAS,OAAAC,QAA+B;AACnE,QAAMC,IAAiBC,EAAOH,CAAO,GAC/BI,IAAeD,EAAOF,CAAK,GAC3B,EAAE,KAAAI,GAAK,kBAAAC,EAAA,IAAqBC,EAAA,GAC5BC,IAAaC,EAAA,GACbC,IAAoBC,EAAA,GACpB,EAAE,YAAAC,EAAA,IAAeC,EAAA;AAEvB,EAAAC,EAAA,GAEAC,EAAU,MAAM;AACd,IAAAP,EAAWN,EAAe,OAAO,GAE7BE,EAAa,YACf,SAAS,QAAQA,EAAa,UAGhCQ,EAAW;AAAA,MACT,SAAS;AAAA,IAAA,CACV,GAEIP,KAAA,QAAAA,EAAK,8BACRK,EAAkBJ,CAAgB;AAAA,EAEtC,GAAG,CAACD,GAAKC,GAAkBM,GAAYJ,GAAYE,CAAiB,CAAC;AACvE,GAzB0B;"}
package/dist/hooks.js CHANGED
@@ -1,86 +1,58 @@
1
- import { useFilteredCommonCodeList as t, useGetCommonCodeList as o, useSetCommonCodeList as s } from "./hooks/useCommonCodeList.js";
2
- import { useAccessTokenGuard as m } from "./hooks/useAccessTokenGuard.js";
3
- import { useConfirm as a } from "./hooks/useConfirm.js";
4
- import { useGetCurrentLanguage as f, useGetLanguageList as i, useSetCurrentLanguage as x } from "./hooks/useCurrentLanguage.js";
5
- import { useGetLogoSrc as S, useSetLogoSrc as G } from "./hooks/useLogoSrc.js";
6
- import { useGetCurrentUser as L, useSetCurrentUser as d } from "./hooks/useCurrentUser.js";
7
- import { useGetCurrentUserId as T, useSetCurrentUserId as E } from "./hooks/useCurrentUserId.js";
8
- import { useEnsureCurrentUserSeq as l, useGetCurrentUserSeq as U, useSetCurrentUserSeq as v } from "./hooks/useCurrentUserSeq.js";
9
- import { useDebounce as A } from "./hooks/useDebounce.js";
10
- import { useDeepCompareEffect as N, useDeepCompareEffectNoCheck as k, useDeepCompareMemoize as F } 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 P } from "./hooks/useInitApp.js";
14
- import { useGetNavbar as _, useNavbarActions as z } from "./hooks/useNavbar.js";
15
- import { useGetNavigationList as H, useSetNavigationList as K } from "./hooks/useNavigation.js";
16
- import { useChangeOwpTheme as R, useGetCurrentLayoutConfig as W, useGetCurrentSettings as j, useGetCustomScrollbarsEnabled as J, useGetDefaultSettings as V, useGetFooterTheme as X, useGetMainTheme as Y, useGetNavbarTheme as Z, useGetOwpSettings as $, useGetToolbarTheme as ee, useResetSettings as re, useSetDefaultSettings as te, useSetSettings as oe } from "./hooks/useOwpSettings.js";
17
- import { useOwpTranslation as ue } from "./hooks/useOwpTranslation.js";
18
- import { useGetPageLockLoading as ne, usePageLockLoading as ae } from "./hooks/usePageLockLoading.js";
19
- import { usePrevious as fe } from "./hooks/usePrevious.js";
20
- import { useGetShortcuts as xe, useSetShortcuts as Ce } from "./hooks/useShortcuts.js";
21
- import { getEnv as Ge, setEnv as ge, useStorage as Le } from "./hooks/useStorage.js";
22
- import { useThemeMediaQuery as ce } from "./hooks/useThemeMediaQuery.js";
23
- import { useTimeout as Ee } from "./hooks/useTimeout.js";
24
- import { useTreeGridCommonCodeEnums as le } from "./hooks/useTreeGridCommonCodeEnums.js";
25
- import { useTreeGridEnums as ve } from "./hooks/useTreeGridEnums.js";
26
- import { useTreeGridExcelExport as Ae } from "./hooks/useTreeGridExcelExport.js";
27
- import { FALLBACK_LANGUAGE_LIST as Ne } from "./constants/language.js";
1
+ import { useFilteredCommonCodeList as r, useGetCommonCodeList as o, useSetCommonCodeList as s } from "./hooks/useCommonCodeList.js";
2
+ import { useConfirm as n } from "./hooks/useConfirm.js";
3
+ import { useGetLogoSrc as i, useSetLogoSrc as a } from "./hooks/useLogoSrc.js";
4
+ import { useGetCurrentUser as C, useSetCurrentUser as S } from "./hooks/useCurrentUser.js";
5
+ import { useGetCurrentUserId as G, useSetCurrentUserId as g } from "./hooks/useCurrentUserId.js";
6
+ import { useEnsureCurrentUserSeq as d, useGetCurrentUserSeq as L, useSetCurrentUserSeq as l } from "./hooks/useCurrentUserSeq.js";
7
+ import { useFormDataUploadMutation as E } from "./hooks/useFormDataUploadMutation.js";
8
+ import { useInitApp as c } from "./hooks/useInitApp.js";
9
+ import { useGetNavigationList as v, useSetNavigationList as b } from "./hooks/useNavigation.js";
10
+ import { useChangeOwpTheme as w, useGetCurrentLayoutConfig as D, useGetCurrentSettings as F, useGetCustomScrollbarsEnabled as I, useGetDefaultSettings as N, useGetFooterTheme as O, useGetMainTheme as k, useGetNavbarTheme as M, useGetOwpSettings as P, useGetToolbarTheme as y, useResetSettings as A, useSetDefaultSettings as R, useSetSettings as j } from "./hooks/useOwpSettings.js";
11
+ import { useOwpTranslation as B } from "./hooks/useOwpTranslation.js";
12
+ import { useGetPageLockLoading as J, usePageLockLoading as K } from "./hooks/usePageLockLoading.js";
13
+ import { getEnv as V, setEnv as W, useStorage as X } from "./hooks/useStorage.js";
14
+ import { useTreeGridCommonCodeEnums as Z } from "./hooks/useTreeGridCommonCodeEnums.js";
15
+ import { useTreeGridEnums as $ } from "./hooks/useTreeGridEnums.js";
16
+ import { useTreeGridExcelExport as te } from "./hooks/useTreeGridExcelExport.js";
28
17
  export {
29
- Ne as FALLBACK_LANGUAGE_LIST,
30
- Ge as getEnv,
31
- ge as setEnv,
32
- m as useAccessTokenGuard,
33
- R as useChangeOwpTheme,
34
- a as useConfirm,
35
- A as useDebounce,
36
- N as useDeepCompareEffect,
37
- k as useDeepCompareEffectNoCheck,
38
- F as useDeepCompareMemoize,
39
- l as useEnsureCurrentUserSeq,
40
- t as useFilteredCommonCodeList,
41
- M as useFormDataUploadMutation,
18
+ V as getEnv,
19
+ W as setEnv,
20
+ w as useChangeOwpTheme,
21
+ n as useConfirm,
22
+ d as useEnsureCurrentUserSeq,
23
+ r as useFilteredCommonCodeList,
24
+ E as useFormDataUploadMutation,
42
25
  o as useGetCommonCodeList,
43
- f as useGetCurrentLanguage,
44
- W as useGetCurrentLayoutConfig,
45
- j as useGetCurrentSettings,
46
- L as useGetCurrentUser,
47
- T as useGetCurrentUserId,
48
- U as useGetCurrentUserSeq,
49
- J as useGetCustomScrollbarsEnabled,
50
- V as useGetDefaultSettings,
51
- X as useGetFooterTheme,
52
- i as useGetLanguageList,
53
- S as useGetLogoSrc,
54
- Y as useGetMainTheme,
55
- _ as useGetNavbar,
56
- Z as useGetNavbarTheme,
57
- H as useGetNavigationList,
58
- $ as useGetOwpSettings,
59
- ne as useGetPageLockLoading,
60
- xe as useGetShortcuts,
61
- ee as useGetToolbarTheme,
62
- w as useHeaderWrapState,
63
- P as useInitApp,
64
- z as useNavbarActions,
65
- ue as useOwpTranslation,
66
- ae as usePageLockLoading,
67
- fe as usePrevious,
68
- re as useResetSettings,
26
+ D as useGetCurrentLayoutConfig,
27
+ F as useGetCurrentSettings,
28
+ C as useGetCurrentUser,
29
+ G as useGetCurrentUserId,
30
+ L as useGetCurrentUserSeq,
31
+ I as useGetCustomScrollbarsEnabled,
32
+ N as useGetDefaultSettings,
33
+ O as useGetFooterTheme,
34
+ i as useGetLogoSrc,
35
+ k as useGetMainTheme,
36
+ M as useGetNavbarTheme,
37
+ v as useGetNavigationList,
38
+ P as useGetOwpSettings,
39
+ J as useGetPageLockLoading,
40
+ y as useGetToolbarTheme,
41
+ c as useInitApp,
42
+ B as useOwpTranslation,
43
+ K as usePageLockLoading,
44
+ A as useResetSettings,
69
45
  s as useSetCommonCodeList,
70
- x as useSetCurrentLanguage,
71
- d as useSetCurrentUser,
72
- E as useSetCurrentUserId,
73
- v as useSetCurrentUserSeq,
74
- te as useSetDefaultSettings,
75
- G as useSetLogoSrc,
76
- K as useSetNavigationList,
77
- oe as useSetSettings,
78
- Ce as useSetShortcuts,
79
- Le as useStorage,
80
- ce as useThemeMediaQuery,
81
- Ee as useTimeout,
82
- le as useTreeGridCommonCodeEnums,
83
- ve as useTreeGridEnums,
84
- Ae as useTreeGridExcelExport
46
+ S as useSetCurrentUser,
47
+ g as useSetCurrentUserId,
48
+ l as useSetCurrentUserSeq,
49
+ R as useSetDefaultSettings,
50
+ a as useSetLogoSrc,
51
+ b as useSetNavigationList,
52
+ j as useSetSettings,
53
+ X as useStorage,
54
+ Z as useTreeGridCommonCodeEnums,
55
+ $ as useTreeGridEnums,
56
+ te as useTreeGridExcelExport
85
57
  };
86
58
  //# 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":";;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  var u = Object.defineProperty;
2
2
  var r = (i, a) => u(i, "name", { value: a, configurable: !0 });
3
3
  import { jsxs as e, 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 { useNavigationActiveRouteRemountKey as p } from "../hooks/useNavigationActiveRouteRemount.js";
4
+ import { useNavigationActiveRouteRemountKey as p } from "../hooks/internal/useNavigationActiveRouteRemount.js";
5
5
  import { useGetCurrentLayoutConfig as d } from "../hooks/useOwpSettings.js";
6
6
  import { LinearProgress as x } from "@mui/material";
7
7
  import { styled as y } from "@mui/material/styles";
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.js","sources":["../../src/layout/Layout.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport { OwpSuspense } from '@/components/OwpSuspense';\nimport { useNavigationActiveRouteRemountKey } from '@/hooks/useNavigationActiveRouteRemount';\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 layoutConfig?: LayoutConfigDefaultsType;\n children?: ReactNode;\n};\n\n/**\n * The layout.\n */\nfunction Layout(props: LayoutProps) {\n const { children, layoutConfig } = props;\n const currentLayoutConfig = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const navigationActiveRouteRemountKey = useNavigationActiveRouteRemountKey();\n const config = layoutConfig ?? currentLayoutConfig;\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 key={navigationActiveRouteRemountKey} />\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","layoutConfig","currentLayoutConfig","useGetCurrentLayoutConfig","navigationActiveRouteRemountKey","useNavigationActiveRouteRemountKey","isFetching","useIsFetching","isMutating","useIsMutating","jsx","LeftSideLayout","jsxs","NavbarWrapperLayout","ToolbarLayout","LinearProgress","OwpSuspense","Outlet","FooterLayout","__name","Layout$1","memo"],"mappings":";;;;;;;;;;;;;;;AAcA,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;AAUF,SAASC,EAAOC,GAAoB;AAClC,QAAM,EAAE,UAAAC,GAAU,cAAAC,EAAA,IAAiBF,GAC7BG,IAAsBC,EAAA,GACtBC,IAAkCC,EAAA,GAClCR,IAASI,KAAgBC,GACzBI,IAAaC,EAAA,GACbC,IAAaC,EAAA;AAEnB,2BACGd,GAAA,EAAK,IAAG,cAAa,QAAAE,GAAgB,WAAU,eAC7C,UAAA;AAAA,IAAAA,EAAO,cAAc,WAAW,gBAAAa,EAACC,GAAA,CAAA,CAAe;AAAA,IAEjD,gBAAAC,EAAC,OAAA,EAAI,WAAU,0BACZ,UAAA;AAAA,MAAAf,EAAO,OAAO,WAAWA,EAAO,OAAO,aAAa,4BAAWgB,GAAA,EAAoB;AAAA,MAEpF,gBAAAD,EAAC,QAAA,EAAK,IAAG,YAAW,WAAU,4DAC3B,UAAA;AAAA,QAAAf,EAAO,QAAQ,WACd,gBAAAa,EAACI,GAAA,EAAc,WAAWjB,EAAO,QAAQ,UAAU,UAAU,iBAAiB,GAAA,CAAI;AAAA,QAEnF,GAAQS,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,GAAYb,CAAiC,GAChD;AAAA,UACCJ;AAAA,QAAA,GACH;AAAA,QAECH,EAAO,OAAO,WACb,gBAAAa,EAACQ,GAAA,EAAa,WAAWrB,EAAO,OAAO,UAAU,UAAU,oBAAoB,GAAA,CAAI;AAAA,MAAA,GAEvF;AAAA,MAECA,EAAO,OAAO,WAAWA,EAAO,OAAO,aAAa,6BAAYgB,GAAA,CAAA,CAAoB;AAAA,IAAA,EAAA,CACvF;AAAA,EAAA,GACF;AAEJ;AAzCSM,EAAArB,GAAA;AA2CT,MAAAsB,IAAeC,EAAKvB,CAAM;"}
1
+ {"version":3,"file":"Layout.js","sources":["../../src/layout/Layout.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport { OwpSuspense } from '@/components/OwpSuspense';\nimport { useNavigationActiveRouteRemountKey } from '@/hooks/internal/useNavigationActiveRouteRemount';\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 layoutConfig?: LayoutConfigDefaultsType;\n children?: ReactNode;\n};\n\n/**\n * The layout.\n */\nfunction Layout(props: LayoutProps) {\n const { children, layoutConfig } = props;\n const currentLayoutConfig = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const navigationActiveRouteRemountKey = useNavigationActiveRouteRemountKey();\n const config = layoutConfig ?? currentLayoutConfig;\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 key={navigationActiveRouteRemountKey} />\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","layoutConfig","currentLayoutConfig","useGetCurrentLayoutConfig","navigationActiveRouteRemountKey","useNavigationActiveRouteRemountKey","isFetching","useIsFetching","isMutating","useIsMutating","jsx","LeftSideLayout","jsxs","NavbarWrapperLayout","ToolbarLayout","LinearProgress","OwpSuspense","Outlet","FooterLayout","__name","Layout$1","memo"],"mappings":";;;;;;;;;;;;;;;AAcA,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;AAUF,SAASC,EAAOC,GAAoB;AAClC,QAAM,EAAE,UAAAC,GAAU,cAAAC,EAAA,IAAiBF,GAC7BG,IAAsBC,EAAA,GACtBC,IAAkCC,EAAA,GAClCR,IAASI,KAAgBC,GACzBI,IAAaC,EAAA,GACbC,IAAaC,EAAA;AAEnB,2BACGd,GAAA,EAAK,IAAG,cAAa,QAAAE,GAAgB,WAAU,eAC7C,UAAA;AAAA,IAAAA,EAAO,cAAc,WAAW,gBAAAa,EAACC,GAAA,CAAA,CAAe;AAAA,IAEjD,gBAAAC,EAAC,OAAA,EAAI,WAAU,0BACZ,UAAA;AAAA,MAAAf,EAAO,OAAO,WAAWA,EAAO,OAAO,aAAa,4BAAWgB,GAAA,EAAoB;AAAA,MAEpF,gBAAAD,EAAC,QAAA,EAAK,IAAG,YAAW,WAAU,4DAC3B,UAAA;AAAA,QAAAf,EAAO,QAAQ,WACd,gBAAAa,EAACI,GAAA,EAAc,WAAWjB,EAAO,QAAQ,UAAU,UAAU,iBAAiB,GAAA,CAAI;AAAA,QAEnF,GAAQS,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,GAAYb,CAAiC,GAChD;AAAA,UACCJ;AAAA,QAAA,GACH;AAAA,QAECH,EAAO,OAAO,WACb,gBAAAa,EAACQ,GAAA,EAAa,WAAWrB,EAAO,OAAO,UAAU,UAAU,oBAAoB,GAAA,CAAI;AAAA,MAAA,GAEvF;AAAA,MAECA,EAAO,OAAO,WAAWA,EAAO,OAAO,aAAa,6BAAYgB,GAAA,CAAA,CAAoB;AAAA,IAAA,EAAA,CACvF;AAAA,EAAA,GACF;AAEJ;AAzCSM,EAAArB,GAAA;AA2CT,MAAAsB,IAAeC,EAAKvB,CAAM;"}
@@ -2,8 +2,8 @@ var m = Object.defineProperty;
2
2
  var r = (o, t) => m(o, "name", { value: t, configurable: !0 });
3
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
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";
5
+ import { useNavbarActions as f } from "../../../hooks/internal/useNavbar.js";
6
+ import { useThemeMediaQuery as l } from "../../../hooks/internal/useThemeMediaQuery.js";
7
7
  import { useGetCurrentLayoutConfig as b } from "../../../hooks/useOwpSettings.js";
8
8
  function C(o) {
9
9
  const { className: t } = o, e = l((s) => s.breakpoints.down("lg")), i = b(), { toggle: a, toggleMobile: n } = f();
@@ -1 +1 @@
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
+ {"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/internal/useNavbar';\nimport { useThemeMediaQuery } from '@/hooks/internal/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;"}
@@ -3,8 +3,8 @@ var i = (o, r) => c(o, "name", { value: r, configurable: !0 });
3
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
4
  import { useGetCurrentLayoutConfig as b, useGetNavbarTheme as l } from "../../../hooks/useOwpSettings.js";
5
5
  import v from "./NavbarToggleFabLayout.js";
6
- import { useGetNavbar as d, useNavbarActions as h } from "../../../hooks/useNavbar.js";
7
- import { useThemeMediaQuery as y } from "../../../hooks/useThemeMediaQuery.js";
6
+ import { useGetNavbar as d, useNavbarActions as h } from "../../../hooks/internal/useNavbar.js";
7
+ import { useThemeMediaQuery as y } from "../../../hooks/internal/useThemeMediaQuery.js";
8
8
  import { ThemeProvider as g } from "@mui/material/styles";
9
9
  import { useEffect as N } from "react";
10
10
  import { useLocation as T } from "react-router-dom";
@@ -1 +1 @@
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;"}
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/internal/useNavbar';\nimport { useThemeMediaQuery } from '@/hooks/internal/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;"}
@@ -1,9 +1,9 @@
1
1
  var T = Object.defineProperty;
2
2
  var i = (o, r) => T(o, "name", { value: r, configurable: !0 });
3
3
  import { jsx as s } 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 { useNavbarActions as y } from "../../../hooks/useNavbar.js";
4
+ import { useNavbarActions as y } from "../../../hooks/internal/useNavbar.js";
5
5
  import { useOwpTranslation as C } from "../../../hooks/useOwpTranslation.js";
6
- import { useThemeMediaQuery as h } from "../../../hooks/useThemeMediaQuery.js";
6
+ import { useThemeMediaQuery as h } from "../../../hooks/internal/useThemeMediaQuery.js";
7
7
  import { useSetDefaultSettings as w, useGetCurrentSettings as N } from "../../../hooks/useOwpSettings.js";
8
8
  import A from "@mui/material/IconButton";
9
9
  import B from "@mui/material/Tooltip";
@@ -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 const accentColor = theme.palette.secondary.main;\n const accentHoverColor = theme.palette.secondary.dark || accentColor;\n\n return {\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: alpha(accentColor, theme.palette.mode === 'dark' ? 0.42 : 0.28),\n backgroundColor: alpha(accentColor, theme.palette.mode === 'dark' ? 0.16 : 0.08),\n boxShadow: 'none',\n color: accentColor,\n transition: theme.transitions.create(['background-color', 'border-color', 'color'], {\n duration: theme.transitions.duration.shorter,\n }),\n '&:hover, &:focus-visible': {\n backgroundColor: alpha(accentHoverColor, theme.palette.mode === 'dark' ? 0.22 : 0.14),\n borderColor: alpha(accentHoverColor, theme.palette.mode === 'dark' ? 0.56 : 0.36),\n color: accentHoverColor,\n },\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=\"inherit\">\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","accentColor","accentHoverColor","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,MAAiB;AAC7C,QAAMC,IAAcD,EAAM,QAAQ,UAAU,MACtCE,IAAmBF,EAAM,QAAQ,UAAU,QAAQC;AAEzD,SAAO;AAAA,IACL,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAaE,EAAMF,GAAaD,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,IAC3E,iBAAiBG,EAAMF,GAAaD,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,IAC/E,WAAW;AAAA,IACX,OAAOC;AAAA,IACP,YAAYD,EAAM,YAAY,OAAO,CAAC,oBAAoB,gBAAgB,OAAO,GAAG;AAAA,MAClF,UAAUA,EAAM,YAAY,SAAS;AAAA,IAAA,CACtC;AAAA,IACD,4BAA4B;AAAA,MAC1B,iBAAiBG,EAAMD,GAAkBF,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,MACpF,aAAaG,EAAMD,GAAkBF,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,MAChF,OAAOE;AAAA,IAAA;AAAA,EACT;AAEJ,GApB6B;AAyB7B,SAASE,EAAmBC,GAAgC;AAC1D,QAAM;AAAA,IACJ,WAAAC,IAAY;AAAA,IACZ,UAAAC,IACE,gBAAAC,EAACC,GAAA,EAAQ,MAAM,IAAI,OAAM,WAAU,UAAA,4BAEnC;AAAA,IAEF,aAAAC,IAAc;AAAA,IACd,cAAAC;AAAA,IACA,IAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDR,GAEES,IAAWC,EAAmB,CAACf,MAAUA,EAAM,YAAY,KAAK,IAAI,CAAC,GACrE,EAAE,GAAAgB,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,CAACZ,GAAsB,GAAI,MAAM,QAAQc,CAAE,IAAIA,IAAKA,IAAK,CAACA,CAAE,IAAI,CAAA,CAAG,IACnEA,GAEAc,IACJ,gBAAAlB;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,SAAS,gBAAA5B,EAAA,MAAM;;AACb,QAAIe,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;AAjDS3B,EAAAK,GAAA;"}
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/internal/useNavbar';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { useThemeMediaQuery } from '@/hooks/internal/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 const accentColor = theme.palette.secondary.main;\n const accentHoverColor = theme.palette.secondary.dark || accentColor;\n\n return {\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: alpha(accentColor, theme.palette.mode === 'dark' ? 0.42 : 0.28),\n backgroundColor: alpha(accentColor, theme.palette.mode === 'dark' ? 0.16 : 0.08),\n boxShadow: 'none',\n color: accentColor,\n transition: theme.transitions.create(['background-color', 'border-color', 'color'], {\n duration: theme.transitions.duration.shorter,\n }),\n '&:hover, &:focus-visible': {\n backgroundColor: alpha(accentHoverColor, theme.palette.mode === 'dark' ? 0.22 : 0.14),\n borderColor: alpha(accentHoverColor, theme.palette.mode === 'dark' ? 0.56 : 0.36),\n color: accentHoverColor,\n },\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=\"inherit\">\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","accentColor","accentHoverColor","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,MAAiB;AAC7C,QAAMC,IAAcD,EAAM,QAAQ,UAAU,MACtCE,IAAmBF,EAAM,QAAQ,UAAU,QAAQC;AAEzD,SAAO;AAAA,IACL,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAaE,EAAMF,GAAaD,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,IAC3E,iBAAiBG,EAAMF,GAAaD,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,IAC/E,WAAW;AAAA,IACX,OAAOC;AAAA,IACP,YAAYD,EAAM,YAAY,OAAO,CAAC,oBAAoB,gBAAgB,OAAO,GAAG;AAAA,MAClF,UAAUA,EAAM,YAAY,SAAS;AAAA,IAAA,CACtC;AAAA,IACD,4BAA4B;AAAA,MAC1B,iBAAiBG,EAAMD,GAAkBF,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,MACpF,aAAaG,EAAMD,GAAkBF,EAAM,QAAQ,SAAS,SAAS,OAAO,IAAI;AAAA,MAChF,OAAOE;AAAA,IAAA;AAAA,EACT;AAEJ,GApB6B;AAyB7B,SAASE,EAAmBC,GAAgC;AAC1D,QAAM;AAAA,IACJ,WAAAC,IAAY;AAAA,IACZ,UAAAC,IACE,gBAAAC,EAACC,GAAA,EAAQ,MAAM,IAAI,OAAM,WAAU,UAAA,4BAEnC;AAAA,IAEF,aAAAC,IAAc;AAAA,IACd,cAAAC;AAAA,IACA,IAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDR,GAEES,IAAWC,EAAmB,CAACf,MAAUA,EAAM,YAAY,KAAK,IAAI,CAAC,GACrE,EAAE,GAAAgB,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,CAACZ,GAAsB,GAAI,MAAM,QAAQc,CAAE,IAAIA,IAAKA,IAAK,CAACA,CAAE,IAAI,CAAA,CAAG,IACnEA,GAEAc,IACJ,gBAAAlB;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,SAAS,gBAAA5B,EAAA,MAAM;;AACb,QAAIe,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;AAjDS3B,EAAAK,GAAA;"}