@owp/core 1.27.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/colors.d.ts +2 -0
  2. package/constants.d.ts +2 -0
  3. package/context.d.ts +2 -0
  4. package/dist/{Close-DA97hwNx.js → Close-DnXhM4Ms.js} +128 -124
  5. package/dist/Close-DnXhM4Ms.js.map +1 -0
  6. package/dist/{OwpStoreProvider-BKRp9Maw.js → OwpStoreProvider-B7W25pkq.js} +13 -13
  7. package/dist/OwpStoreProvider-B7W25pkq.js.map +1 -0
  8. package/dist/{QuickPanel-EyvjMTxX.js → QuickPanel-BOgEYOAw.js} +2 -2
  9. package/dist/{QuickPanel-EyvjMTxX.js.map → QuickPanel-BOgEYOAw.js.map} +1 -1
  10. package/dist/context.js +4 -3
  11. package/dist/context.js.map +1 -1
  12. package/dist/hooks.js +31 -28
  13. package/dist/hooks.js.map +1 -1
  14. package/dist/{index-CdxKoZlQ.js → index-B8tZAW8i.js} +9743 -10363
  15. package/dist/index-B8tZAW8i.js.map +1 -0
  16. package/dist/index.js +86 -88
  17. package/dist/{lazyLoadedSlices-Bjy1crVY.js → lazyLoadedSlices-BAbcXcEU.js} +33 -35
  18. package/dist/lazyLoadedSlices-BAbcXcEU.js.map +1 -0
  19. package/dist/owp-app.css +1 -1
  20. package/dist/store.js +1 -1
  21. package/dist/types/components/OwpCommonDialog/OwpCommonDialog.d.ts +1 -26
  22. package/dist/types/components/OwpDialog/OwpDialog.d.ts +32 -6
  23. package/dist/types/components/OwpDialog/index.d.ts +1 -4
  24. package/dist/types/components/OwpLanguageSwitcherSelect/index.d.ts +1 -0
  25. package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +7 -3
  26. package/dist/types/components/OwpMrtTable/OwpMrtTableTopToolbar.d.ts +6 -0
  27. package/dist/types/components/OwpNavLinkAdapter/OwpNavLinkAdapter.d.ts +16 -0
  28. package/dist/types/components/OwpNavLinkAdapter/index.d.ts +2 -0
  29. package/dist/types/components/OwpNavigation/horizontal/types/OwpNavHorizontalGroup.d.ts +1 -2
  30. package/dist/types/components/OwpNavigation/horizontal/types/OwpNavHorizontalItem.d.ts +1 -2
  31. package/dist/types/components/OwpNavigation/horizontal/types/OwpNavHorizontalLink.d.ts +1 -2
  32. package/dist/types/components/{shared-components/PageBreadcrumb.d.ts → OwpPageBreadcrumb/OwpPageBreadcrumb.d.ts} +1 -1
  33. package/dist/types/components/OwpPageBreadcrumb/index.d.ts +2 -0
  34. package/dist/types/components/OwpSettings/OwpLayoutConfig.d.ts +1 -1
  35. package/dist/types/components/OwpTable/OwpTable.d.ts +1 -1
  36. package/dist/types/components/{shared-components/tabs → OwpTabs}/OwpTab.d.ts +1 -1
  37. package/dist/types/components/{shared-components/tabs → OwpTabs}/OwpTabs.d.ts +1 -1
  38. package/dist/types/components/OwpTabs/index.d.ts +2 -0
  39. package/dist/types/components/OwpTreeGrid/OwpTreeGridToolbar.d.ts +1 -1
  40. package/dist/types/components/layouts/shared-components/navigation/store/navigationSlice.d.ts +9 -9
  41. package/dist/types/context/OwpCoreProvider.d.ts +1 -1
  42. package/dist/types/{store → context}/OwpStoreProvider.d.ts +1 -1
  43. package/dist/types/context/index.d.ts +1 -0
  44. package/dist/types/hooks/useStorage.d.ts +10 -1
  45. package/dist/types/index.d.ts +4 -8
  46. package/dist/types/store/apiService.d.ts +3 -0
  47. package/dist/types/store/generateReducersFromSlices.d.ts +4 -1
  48. package/dist/types/store/hooks.d.ts +3 -0
  49. package/dist/types/store/index.d.ts +4 -1
  50. package/dist/types/store/lazyLoadedSlices.d.ts +3 -0
  51. package/dist/types/store/middleware.d.ts +3 -0
  52. package/dist/types/store/store.d.ts +3 -0
  53. package/dist/types/store/withSlices.d.ts +2 -2
  54. package/dist/types/utils/createDateRangeSearchParams.d.ts +16 -0
  55. package/dist/types/utils/fetchFile.d.ts +12 -0
  56. package/dist/types/utils/index.d.ts +3 -0
  57. package/dist/types/utils/sanitizeAuthInputValue.d.ts +10 -0
  58. package/dist/useOwpTranslation-BelpX-fd.js +174 -0
  59. package/dist/useOwpTranslation-BelpX-fd.js.map +1 -0
  60. package/dist/useStorage-BA0D8KA7.js +67 -0
  61. package/dist/useStorage-BA0D8KA7.js.map +1 -0
  62. package/dist/{useTreeGridExcelExport-BGh2y8Cg.js → useTreeGridExcelExport-QNcWzx5v.js} +2 -2
  63. package/dist/{useTreeGridExcelExport-BGh2y8Cg.js.map → useTreeGridExcelExport-QNcWzx5v.js.map} +1 -1
  64. package/dist/utils.js +2066 -2026
  65. package/dist/utils.js.map +1 -1
  66. package/hooks.d.ts +2 -0
  67. package/index.d.ts +3 -0
  68. package/package.json +4 -2
  69. package/store.d.ts +2 -0
  70. package/treegrid-global.d.ts +4904 -0
  71. package/utils.d.ts +2 -0
  72. package/dist/Close-DA97hwNx.js.map +0 -1
  73. package/dist/OwpStoreProvider-BKRp9Maw.js.map +0 -1
  74. package/dist/index-CdxKoZlQ.js.map +0 -1
  75. package/dist/lazyLoadedSlices-Bjy1crVY.js.map +0 -1
  76. package/dist/types/auth/authRoles.d.ts +0 -21
  77. package/dist/types/components/NavLinkAdapter/NavLinkAdapter.d.ts +0 -18
  78. package/dist/types/components/NavLinkAdapter/index.d.ts +0 -1
  79. package/dist/types/components/OwpDialog/owpDialogSlice.d.ts +0 -14
  80. package/dist/types/components/OwpMessage/OwpMessage.d.ts +0 -11
  81. package/dist/types/components/OwpMessage/index.d.ts +0 -4
  82. package/dist/types/components/OwpMessage/owpMessageSlice.d.ts +0 -14
  83. package/dist/types/components/layouts/shared-components/AdjustFontSize.d.ts +0 -8
  84. package/dist/types/components/layouts/shared-components/OwpSettingsViewerDialog.d.ts +0 -8
  85. package/dist/types/components/layouts/shared-components/configurator/Configurator.d.ts +0 -9
  86. package/dist/types/components/layouts/shared-components/configurator/SettingsPanel.d.ts +0 -12
  87. package/dist/types/components/layouts/shared-components/configurator/ThemesPanel.d.ts +0 -12
  88. package/dist/types/components/shared-components/LightDarkModeToggle.d.ts +0 -8
  89. package/dist/types/components/shared-components/PageTitle.d.ts +0 -11
  90. package/dist/types/components/shared-components/data-table/DataTable.d.ts +0 -12
  91. package/dist/types/components/shared-components/data-table/DataTableTopToolbar.d.ts +0 -6
  92. package/dist/types/components/shared-components/index.d.ts +0 -7
  93. package/dist/types/components/withRouter/index.d.ts +0 -1
  94. package/dist/types/components/withRouter/withRouter.d.ts +0 -14
  95. package/dist/types/store/withReducer.d.ts +0 -5
  96. package/dist/useOwpTranslation-VarZsCQ4.js +0 -233
  97. package/dist/useOwpTranslation-VarZsCQ4.js.map +0 -1
  98. /package/dist/types/components/{layouts/shared-components → OwpLanguageSwitcherSelect}/OwpLanguageSwitcherSelect.d.ts +0 -0
  99. /package/dist/types/components/{shared-components/data-table → OwpMrtTable}/utils/parseFromValuesOrFunc.d.ts +0 -0
@@ -1,21 +0,0 @@
1
- /**
2
- * The authRoles object defines the authorization roles for the Owp application.
3
- */
4
- export declare const authRoles: {
5
- /**
6
- * The admin role grants access to users with the 'admin' role.
7
- */
8
- admin: string[];
9
- /**
10
- * The staff role grants access to users with the 'admin' or 'staff' role.
11
- */
12
- staff: string[];
13
- /**
14
- * The user role grants access to users with the 'admin', 'staff', or 'user' role.
15
- */
16
- user: string[];
17
- /**
18
- * The onlyGuest role grants access to unauthenticated users.
19
- */
20
- onlyGuest: any[];
21
- };
@@ -1,18 +0,0 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
- import { NavLinkProps } from 'react-router-dom';
3
- export type NavLinkAdapterPropsType = NavLinkProps & {
4
- activeClassName?: string;
5
- activeStyle?: CSSProperties;
6
- children?: ReactNode;
7
- };
8
- /**
9
- * The NavLinkAdapter component is a wrapper around the React Router NavLink component.
10
- * It adds the ability to navigate programmatically using the useNavigate hook.
11
- * The component is memoized to prevent unnecessary re-renders.
12
- */
13
- declare const NavLinkAdapter: import("react").ForwardRefExoticComponent<NavLinkProps & {
14
- activeClassName?: string;
15
- activeStyle?: CSSProperties;
16
- children?: ReactNode;
17
- } & import("react").RefAttributes<HTMLAnchorElement>>;
18
- export default NavLinkAdapter;
@@ -1 +0,0 @@
1
- export { default } from './NavLinkAdapter';
@@ -1,14 +0,0 @@
1
- import { WithSlice } from '@reduxjs/toolkit';
2
- /**
3
- * The Owp Dialog slice
4
- */
5
- export declare const owpDialogSlice: any;
6
- declare module '@/store/lazyLoadedSlices' {
7
- interface LazyLoadedSlices extends WithSlice<typeof owpDialogSlice> {
8
- }
9
- }
10
- export declare const closeDialog: any, openDialog: any;
11
- export declare const selectOwpDialogState: any, selectOwpDialogProps: any;
12
- export type dialogSliceType = typeof owpDialogSlice;
13
- declare const _default: any;
14
- export default _default;
@@ -1,11 +0,0 @@
1
- export type OwpMessageVariantType = 'success' | 'error' | 'warning' | 'info';
2
- /**
3
- * OwpMessage
4
- * The OwpMessage component holds a snackbar that is capable of displaying message with 4 different variant. It uses the @mui/material React packages to create the components.
5
- */
6
- declare function OwpMessageBase(): import("react/jsx-runtime").JSX.Element;
7
- /**
8
- * @deprecated `notistack` 사용
9
- */
10
- export declare const OwpMessage: import("react").MemoExoticComponent<typeof OwpMessageBase>;
11
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated `notistack` 사용
3
- */
4
- export { OwpMessage } from './OwpMessage';
@@ -1,14 +0,0 @@
1
- import { WithSlice } from '@reduxjs/toolkit';
2
- /**
3
- * The Message slice.
4
- */
5
- export declare const owpMessageSlice: any;
6
- declare module '@/store/lazyLoadedSlices' {
7
- interface LazyLoadedSlices extends WithSlice<typeof owpMessageSlice> {
8
- }
9
- }
10
- export declare const hideMessage: any, showMessage: any;
11
- export declare const selectOwpMessageOptions: any, selectOwpMessageState: any;
12
- export type messageSliceType = typeof owpMessageSlice;
13
- declare const _default: any;
14
- export default _default;
@@ -1,8 +0,0 @@
1
- type AdjustFontSizeProps = {
2
- className?: string;
3
- };
4
- /**
5
- * The adjust font size.
6
- */
7
- declare function AdjustFontSize(props: AdjustFontSizeProps): import("react/jsx-runtime").JSX.Element;
8
- export default AdjustFontSize;
@@ -1,8 +0,0 @@
1
- type OwpSettingsViewerDialogProps = {
2
- className?: string;
3
- };
4
- /**
5
- * The settings viewer dialog.
6
- */
7
- declare function OwpSettingsViewerDialog(props: OwpSettingsViewerDialogProps): import("react/jsx-runtime").JSX.Element;
8
- export { OwpSettingsViewerDialog };
@@ -1,9 +0,0 @@
1
- /**
2
- * The settings panel.
3
- */
4
- declare function Configurator(): import("react/jsx-runtime").JSX.Element;
5
- /**
6
- * ConfiguratorMemo 메모이징 컴포넌트
7
- */
8
- declare const ConfiguratorMemo: import("react").MemoExoticComponent<typeof Configurator>;
9
- export { ConfiguratorMemo as Configurator };
@@ -1,12 +0,0 @@
1
- import { SwipeableHandlers } from 'react-swipeable';
2
- type SettingsPanelProps = {
3
- settingsHandlers: SwipeableHandlers;
4
- onClose: () => void;
5
- open: boolean;
6
- };
7
- /**
8
- * SettingsPanel 컴포넌트
9
- * @param props 컴포넌트 props
10
- */
11
- declare function SettingsPanel(props: SettingsPanelProps): import("react/jsx-runtime").JSX.Element;
12
- export { SettingsPanel };
@@ -1,12 +0,0 @@
1
- import { SwipeableHandlers } from 'react-swipeable';
2
- type ThemesPanelProps = {
3
- schemesHandlers: SwipeableHandlers;
4
- onClose: () => void;
5
- open: boolean;
6
- };
7
- /**
8
- * ThemesPanel 컴포넌트
9
- * @param props 컴포넌트 props
10
- */
11
- declare function ThemesPanel(props: ThemesPanelProps): import("react/jsx-runtime").JSX.Element;
12
- export { ThemesPanel };
@@ -1,8 +0,0 @@
1
- import { OwpThemeOption } from '@/components/OwpThemeSelector/ThemePreview';
2
- type LightDarkModeToggleProps = {
3
- className?: string;
4
- lightTheme: OwpThemeOption;
5
- darkTheme: OwpThemeOption;
6
- };
7
- declare function LightDarkModeToggle(props: LightDarkModeToggleProps): import("react/jsx-runtime").JSX.Element;
8
- export default LightDarkModeToggle;
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type PageTitleProps = {
3
- className?: string;
4
- title?: string;
5
- subtitle?: string;
6
- backUrl?: string;
7
- backTitle?: string;
8
- badgeTitle?: string | ReactNode;
9
- };
10
- declare function PageTitle(props: PageTitleProps): import("react/jsx-runtime").JSX.Element;
11
- export default PageTitle;
@@ -1,12 +0,0 @@
1
- import { type MaterialReactTableProps, type MRT_RowData } from 'material-react-table';
2
- export type DataTableProps<TData extends MRT_RowData> = MaterialReactTableProps<TData> & {
3
- canTotalCountRow?: boolean;
4
- canUseTreeGridStyle?: boolean;
5
- totalCount?: number;
6
- };
7
- /**
8
- * MRT 기반 공통 테이블 컴포넌트
9
- * @param props Material React Table props
10
- */
11
- declare function DataTable<TData extends MRT_RowData>(props: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
12
- export default DataTable;
@@ -1,6 +0,0 @@
1
- import { MRT_RowData, MRT_TableInstance } from 'material-react-table';
2
- export interface MRT_TopToolbarProps<TData extends MRT_RowData> {
3
- table: MRT_TableInstance<TData>;
4
- }
5
- declare function DataTableTopToolbar<TData extends MRT_RowData>({ table }: MRT_TopToolbarProps<TData>): import("react/jsx-runtime").JSX.Element;
6
- export default DataTableTopToolbar;
@@ -1,7 +0,0 @@
1
- export * from './LightDarkModeToggle';
2
- export * from './PageBreadcrumb';
3
- export * from './PageTitle';
4
- export * from './data-table/DataTable';
5
- export * from './data-table/DataTableTopToolbar';
6
- export * from './tabs/OwpTab';
7
- export * from './tabs/OwpTabs';
@@ -1 +0,0 @@
1
- export { default } from './withRouter';
@@ -1,14 +0,0 @@
1
- import { useLocation, useNavigate } from 'react-router-dom';
2
- import { ComponentType } from 'react';
3
- export type WithRouterProps = {
4
- location?: ReturnType<typeof useLocation>;
5
- params?: Record<string, string>;
6
- navigate?: ReturnType<typeof useNavigate>;
7
- };
8
- /**
9
- * The withRouter function is a higher-order component that wraps a component with the useLocation, useParams, and useNavigate hooks from React Router.
10
- * It passes the location, params, and navigate objects as props to the wrapped component.
11
- * The component is memoized to prevent unnecessary re-renders.
12
- */
13
- declare const withRouter: <Props extends WithRouterProps>(Component: ComponentType<Props>) => import("react").NamedExoticComponent<Omit<Props, keyof WithRouterProps>>;
14
- export default withRouter;
@@ -1,5 +0,0 @@
1
- import { Reducer } from '@reduxjs/toolkit';
2
- /**
3
- * A Higher Order Component that injects a reducer into the Redux store.
4
- */
5
- export declare const withReducer: <P extends object>(key: string, reducer: Reducer) => (WrappedComponent: React.FC<P>) => (props: P) => import("react/jsx-runtime").JSX.Element;
@@ -1,233 +0,0 @@
1
- var _ = Object.defineProperty;
2
- var s = (e, r) => _(e, "name", { value: r, configurable: !0 });
3
- import { S as f } from "./storageKeys-DRzte9LZ.js";
4
- import { useCallback as d, useMemo as h } from "react";
5
- import { i as S, a as x } from "./isTypedArray-xp-fB7W4.js";
6
- import { a as b, j as p } from "./emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js";
7
- import { Typography as v, DialogContent as w, DialogActions as V, Button as O, Dialog as I } from "@mui/material";
8
- import { useDialogs as A } from "@toolpad/core/useDialogs";
9
- import { useTranslation as E } from "react-i18next";
10
- function P(e, r) {
11
- if (r === void 0)
12
- return e.trimEnd();
13
- let o = e.length;
14
- switch (typeof r) {
15
- case "string": {
16
- if (r.length !== 1)
17
- throw new Error("The 'chars' parameter should be a single character string.");
18
- for (; o > 0 && e[o - 1] === r; )
19
- o--;
20
- break;
21
- }
22
- case "object":
23
- for (; o > 0 && r.includes(e[o - 1]); )
24
- o--;
25
- }
26
- return e.substring(0, o);
27
- }
28
- s(P, "trimEnd$1");
29
- const B = [
30
- f.currentLanguage,
31
- f.currentShortcuts,
32
- f.currentUserId,
33
- f.currentLogoSrc,
34
- f.owpEnv
35
- ], y = /* @__PURE__ */ s(() => typeof window > "u" ? null : window.localStorage, "getLocalStorage"), K = /* @__PURE__ */ s((e, r) => {
36
- if (!e)
37
- return r;
38
- try {
39
- return JSON.parse(e);
40
- } catch {
41
- return r;
42
- }
43
- }, "safeParseJson"), F = /* @__PURE__ */ s(() => {
44
- const e = d(() => {
45
- const n = y();
46
- if (!n)
47
- return;
48
- const t = B.map((a) => [a, n.getItem(a)]);
49
- n.clear(), t.forEach(([a, l]) => {
50
- l !== null && n.setItem(a, l);
51
- });
52
- }, []), r = d(() => {
53
- const n = y(), t = K(
54
- (n == null ? void 0 : n.getItem(f.currentUser)) ?? null,
55
- null
56
- );
57
- return S(t) ? {
58
- role: ["admin"],
59
- data: {
60
- displayName: t.USERNAME,
61
- email: t.EMAIL,
62
- MES_STARTPAGE: t.MES_STARTPAGE,
63
- STARTPAGE: t.STARTPAGE,
64
- USERSEQ: t.USERSEQ,
65
- photoURL: ""
66
- }
67
- } : null;
68
- }, []), o = d((n) => {
69
- const t = y();
70
- t && t.setItem(f.owpEnv, JSON.stringify(n ?? {}));
71
- }, []), i = d(() => {
72
- const n = y(), t = K((n == null ? void 0 : n.getItem(f.owpEnv)) ?? null, {});
73
- return S(t) ? t : {};
74
- }, []);
75
- return h(
76
- () => ({
77
- resetStorage: e,
78
- getCurrentUser: r,
79
- setEnv: o,
80
- getEnv: i
81
- }),
82
- [r, i, e, o]
83
- );
84
- }, "useStorage");
85
- function R(e, r, o) {
86
- return e == null ? "" : P(e, r.toString().split(""));
87
- }
88
- s(R, "trimEnd");
89
- const u = {
90
- infoTitle: {
91
- primaryKey: "message.would_you_like_to_proceed",
92
- fallbackKey: "Message.처리하시겠습니까",
93
- defaultValue: "처리하시겠습니까?"
94
- },
95
- infoOk: {
96
- primaryKey: "button.ok",
97
- fallbackKey: "Button.확인",
98
- defaultValue: "확인"
99
- },
100
- saveTitle: {
101
- primaryKey: "message.do_you_want_to_save",
102
- fallbackKey: "Message.저장하시겠습니까?",
103
- defaultValue: "저장하시겠습니까?"
104
- },
105
- saveOk: {
106
- primaryKey: "button.save",
107
- fallbackKey: "Button.저장",
108
- defaultValue: "저장"
109
- },
110
- updateTitle: {
111
- primaryKey: "message.would_you_like_to_edit",
112
- fallbackKey: "Message.수정하시겠습니까?",
113
- defaultValue: "수정하시겠습니까?"
114
- },
115
- updateOk: {
116
- primaryKey: "button.edit",
117
- fallbackKey: "Button.수정",
118
- defaultValue: "수정"
119
- },
120
- deleteTitle: {
121
- primaryKey: "message.are_you_sure_you_want_to_delete",
122
- fallbackKey: "Message.삭제하시겠습니까?",
123
- defaultValue: "삭제하시겠습니까?"
124
- },
125
- deleteOk: {
126
- primaryKey: "button.delete",
127
- fallbackKey: "Button.삭제",
128
- defaultValue: "삭제"
129
- },
130
- cancel: {
131
- primaryKey: "button.cancel",
132
- fallbackKey: "Button.취소",
133
- defaultValue: "취소"
134
- }
135
- }, T = /* @__PURE__ */ s((e, r) => e ? {
136
- color: e,
137
- ...r
138
- } : r, "mergeOkButtonProps"), Q = /* @__PURE__ */ s(() => {
139
- const e = A(), { t: r, i18n: o } = E("owp"), i = /* @__PURE__ */ s(({
140
- primaryKey: t,
141
- fallbackKey: a,
142
- defaultValue: l
143
- }) => r(o.exists(t) ? t : a, { defaultValue: l }), "translateConfirmText"), n = /* @__PURE__ */ s((t) => e.open(D, t), "confirmBase");
144
- return {
145
- confirm: n,
146
- confirmInfo: /* @__PURE__ */ s(async ({ title: t, okText: a, severity: l } = {}) => n({
147
- title: t ?? i(u.infoTitle),
148
- okText: a ?? i(u.infoOk),
149
- severity: l ?? "primary",
150
- useInfo: !0
151
- }), "confirmInfo"),
152
- confirmSave: /* @__PURE__ */ s(async ({
153
- title: t,
154
- okText: a,
155
- cancelText: l,
156
- okButtonProps: c
157
- } = {}) => n({
158
- title: t ?? i(u.saveTitle),
159
- okText: a ?? i(u.saveOk),
160
- cancelText: l,
161
- okButtonProps: T("secondary", c)
162
- }), "confirmSave"),
163
- confirmUpdate: /* @__PURE__ */ s(async ({
164
- title: t,
165
- okText: a,
166
- cancelText: l,
167
- okButtonProps: c
168
- } = {}) => n({
169
- title: t ?? i(u.updateTitle),
170
- okText: a ?? i(u.updateOk),
171
- cancelText: l,
172
- okButtonProps: T("secondary", c)
173
- }), "confirmUpdate"),
174
- confirmDelete: /* @__PURE__ */ s(async ({
175
- title: t,
176
- okText: a,
177
- cancelText: l,
178
- okButtonProps: c
179
- } = {}) => n({
180
- title: t ?? i(u.deleteTitle),
181
- okText: a ?? i(u.deleteOk),
182
- cancelText: l,
183
- okButtonProps: T("error", c)
184
- }), "confirmDelete")
185
- };
186
- }, "useConfirm"), D = /* @__PURE__ */ s(({ payload: e, open: r, onClose: o }) => {
187
- const { title: i, okButtonProps: n, cancelButtonProps: t, severity: a, useInfo: l } = e, { t: c, i18n: g } = E("owp"), m = (e == null ? void 0 : e.okText) ?? c(g.exists(u.infoOk.primaryKey) ? "button.ok" : "Button.확인", {
188
- defaultValue: u.infoOk.defaultValue
189
- }), k = (e == null ? void 0 : e.cancelText) ?? c(
190
- g.exists(u.cancel.primaryKey) ? u.cancel.primaryKey : u.cancel.fallbackKey,
191
- { defaultValue: u.cancel.defaultValue }
192
- );
193
- return /* @__PURE__ */ b(I, { fullWidth: !0, maxWidth: "xs", open: r, onClose: /* @__PURE__ */ s(() => o(!1), "onClose"), children: [
194
- /* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(v, { className: "mb-12", variant: "h6", children: i }) }),
195
- /* @__PURE__ */ b(V, { children: [
196
- !l && /* @__PURE__ */ p(O, { ...t, variant: "outlined", onClick: /* @__PURE__ */ s(() => o(!1), "onClick"), children: k }),
197
- /* @__PURE__ */ p(
198
- O,
199
- {
200
- color: a || "primary",
201
- variant: "contained",
202
- ...n,
203
- onClick: /* @__PURE__ */ s(() => o(!0), "onClick"),
204
- children: m
205
- }
206
- )
207
- ] })
208
- ] });
209
- }, "ConfirmDialog"), j = /* @__PURE__ */ s((e) => {
210
- if (!e.includes("."))
211
- return;
212
- const o = R(e, ".").lastIndexOf(".");
213
- return o < 0 ? e : e.slice(o + 1);
214
- }, "getDefaultValueFromKey"), W = /* @__PURE__ */ s(() => {
215
- const { t: e, ...r } = E("owp");
216
- return { t: /* @__PURE__ */ s((...i) => {
217
- const [n, t] = i, a = x(t) ? t : void 0, l = !!a, c = l && Object.prototype.hasOwnProperty.call(a, "defaultValue");
218
- if ((t == null || l) && !c && typeof n == "string") {
219
- const m = j(n);
220
- if (m) {
221
- const k = l ? { ...a, defaultValue: m } : { defaultValue: m };
222
- return e(n, k, ...i.slice(2));
223
- }
224
- }
225
- return e(...i);
226
- }, "t"), ...r };
227
- }, "useOwpTranslation");
228
- export {
229
- W as a,
230
- F as b,
231
- Q as u
232
- };
233
- //# sourceMappingURL=useOwpTranslation-VarZsCQ4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOwpTranslation-VarZsCQ4.js","sources":["../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/string/trimEnd.mjs","../src/hooks/useStorage.ts","../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/string/trimEnd.mjs","../src/hooks/useConfirm.tsx","../src/hooks/useOwpTranslation.ts"],"sourcesContent":["function trimEnd(str, chars) {\n if (chars === undefined) {\n return str.trimEnd();\n }\n let endIndex = str.length;\n switch (typeof chars) {\n case 'string': {\n if (chars.length !== 1) {\n throw new Error(`The 'chars' parameter should be a single character string.`);\n }\n while (endIndex > 0 && str[endIndex - 1] === chars) {\n endIndex--;\n }\n break;\n }\n case 'object': {\n while (endIndex > 0 && chars.includes(str[endIndex - 1])) {\n endIndex--;\n }\n }\n }\n return str.substring(0, endIndex);\n}\n\nexport { trimEnd };\n","import { STORAGE_KEYS } from '@/constants/storageKeys';\nimport { isPlainObject } from 'es-toolkit';\nimport { useCallback, useMemo } from 'react';\n\ntype StorageEnv = { [key: string]: any };\n\ntype StoredCurrentUserRaw = {\n USERNAME?: string;\n EMAIL?: string;\n MES_STARTPAGE?: string;\n STARTPAGE?: string;\n USERSEQ?: any;\n};\n\ntype StoredCurrentUser = {\n role: string[];\n data: {\n displayName?: string;\n email?: string;\n MES_STARTPAGE?: string;\n STARTPAGE?: string;\n USERSEQ?: any;\n photoURL: string;\n };\n};\n\nconst PRESERVED_STORAGE_KEYS = [\n STORAGE_KEYS.currentLanguage,\n STORAGE_KEYS.currentShortcuts,\n STORAGE_KEYS.currentUserId,\n STORAGE_KEYS.currentLogoSrc,\n STORAGE_KEYS.owpEnv,\n] as const;\n\n/**\n * 브라우저 스토리지 조회\n */\nconst getLocalStorage = () => {\n if (typeof window === 'undefined') {\n return null;\n }\n\n return window.localStorage;\n};\n\n/**\n * 스토리지 문자열 안전 파싱\n * @param raw 스토리지 원본 문자열\n * @param fallback 파싱 실패 시 기본값\n */\nconst safeParseJson = <T>(raw: string | null, fallback: T): T => {\n if (!raw) {\n return fallback;\n }\n\n try {\n return JSON.parse(raw) as T;\n } catch {\n return fallback;\n }\n};\n\n/**\n * 스토리지 유틸 훅\n */\nexport const useStorage = () => {\n const resetStorage = useCallback(() => {\n const storage = getLocalStorage();\n\n if (!storage) {\n return;\n }\n\n const preservedEntries = PRESERVED_STORAGE_KEYS.map((key) => [key, storage.getItem(key)] as const);\n\n storage.clear();\n\n preservedEntries.forEach(([key, value]) => {\n if (value === null) {\n return;\n }\n\n storage.setItem(key, value);\n });\n }, []);\n\n const getCurrentUser = useCallback((): StoredCurrentUser | null => {\n const storage = getLocalStorage();\n const userData = safeParseJson<StoredCurrentUserRaw | null>(\n storage?.getItem(STORAGE_KEYS.currentUser) ?? null,\n null,\n );\n\n if (!isPlainObject(userData)) {\n return null;\n }\n\n return {\n role: ['admin'],\n data: {\n displayName: userData.USERNAME,\n email: userData.EMAIL,\n MES_STARTPAGE: userData.MES_STARTPAGE,\n STARTPAGE: userData.STARTPAGE,\n USERSEQ: userData.USERSEQ,\n photoURL: '',\n },\n };\n }, []);\n\n const setEnv = useCallback((env: StorageEnv) => {\n const storage = getLocalStorage();\n\n if (!storage) {\n return;\n }\n\n storage.setItem(STORAGE_KEYS.owpEnv, JSON.stringify(env ?? {}));\n }, []);\n\n const getEnv = useCallback((): StorageEnv => {\n const storage = getLocalStorage();\n const envData = safeParseJson<StorageEnv | null>(storage?.getItem(STORAGE_KEYS.owpEnv) ?? null, {});\n\n return isPlainObject(envData) ? envData : {};\n }, []);\n\n return useMemo(\n () => ({\n resetStorage,\n getCurrentUser,\n setEnv,\n getEnv,\n }),\n [getCurrentUser, getEnv, resetStorage, setEnv],\n );\n};\n","import { trimEnd as trimEnd$1 } from '../../string/trimEnd.mjs';\n\nfunction trimEnd(str, chars, guard) {\n if (str == null) {\n return '';\n }\n if (guard != null || chars == null) {\n return str.toString().trimEnd();\n }\n return trimEnd$1(str, chars.toString().split(''));\n}\n\nexport { trimEnd };\n","import {\n Button,\n ButtonProps,\n Dialog,\n DialogActions,\n DialogContent,\n Typography,\n} from '@mui/material';\nimport { DialogProps, useDialogs } from '@toolpad/core/useDialogs';\nimport { ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ConfirmProps {\n title?: ReactNode | string;\n okText?: string;\n cancelText?: string;\n severity?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';\n useInfo?: boolean;\n okButtonProps?: ButtonProps;\n onClose?: (result: boolean) => Promise<void>;\n}\ninterface ConfirmBaseProps extends ConfirmProps {\n okButtonProps?: ButtonProps;\n cancelButtonProps?: ButtonProps;\n}\n\ninterface ConfirmTranslationConfig {\n primaryKey: string;\n fallbackKey: string;\n defaultValue: string;\n}\n\n/**\n * 확인 대화상자 번역 설정\n */\nconst CONFIRM_TRANSLATIONS = {\n infoTitle: {\n primaryKey: 'message.would_you_like_to_proceed',\n fallbackKey: 'Message.처리하시겠습니까',\n defaultValue: '처리하시겠습니까?',\n },\n infoOk: {\n primaryKey: 'button.ok',\n fallbackKey: 'Button.확인',\n defaultValue: '확인',\n },\n saveTitle: {\n primaryKey: 'message.do_you_want_to_save',\n fallbackKey: 'Message.저장하시겠습니까?',\n defaultValue: '저장하시겠습니까?',\n },\n saveOk: {\n primaryKey: 'button.save',\n fallbackKey: 'Button.저장',\n defaultValue: '저장',\n },\n updateTitle: {\n primaryKey: 'message.would_you_like_to_edit',\n fallbackKey: 'Message.수정하시겠습니까?',\n defaultValue: '수정하시겠습니까?',\n },\n updateOk: {\n primaryKey: 'button.edit',\n fallbackKey: 'Button.수정',\n defaultValue: '수정',\n },\n deleteTitle: {\n primaryKey: 'message.are_you_sure_you_want_to_delete',\n fallbackKey: 'Message.삭제하시겠습니까?',\n defaultValue: '삭제하시겠습니까?',\n },\n deleteOk: {\n primaryKey: 'button.delete',\n fallbackKey: 'Button.삭제',\n defaultValue: '삭제',\n },\n cancel: {\n primaryKey: 'button.cancel',\n fallbackKey: 'Button.취소',\n defaultValue: '취소',\n },\n} as const;\n\n/**\n * 확인 버튼 속성 병합\n * @param defaultColor 기본 버튼 색상\n * @param okButtonProps 사용자 버튼 속성\n */\nconst mergeOkButtonProps = (\n defaultColor: ButtonProps['color'] | undefined,\n okButtonProps?: ButtonProps,\n) => {\n if (!defaultColor) {\n return okButtonProps;\n }\n\n return {\n color: defaultColor,\n ...okButtonProps,\n } as ButtonProps;\n};\n/**\n * 확인 대화상자 훅\n */\nexport const useConfirm = () => {\n const dialogs = useDialogs();\n const { t, i18n } = useTranslation('owp');\n\n const translateConfirmText = ({\n primaryKey,\n fallbackKey,\n defaultValue,\n }: ConfirmTranslationConfig) => {\n return t(i18n.exists(primaryKey) ? primaryKey : fallbackKey, { defaultValue });\n };\n\n const confirmBase = (props: ConfirmBaseProps) => dialogs.open(ConfirmDialog, props);\n\n return {\n confirm: confirmBase,\n confirmInfo: async ({ title, okText, severity }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title:\n title ?? translateConfirmText(CONFIRM_TRANSLATIONS.infoTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.infoOk),\n severity: severity ?? 'primary',\n useInfo: true,\n });\n },\n confirmSave: async ({\n title,\n okText,\n cancelText,\n okButtonProps,\n }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title: title ?? translateConfirmText(CONFIRM_TRANSLATIONS.saveTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.saveOk),\n cancelText,\n okButtonProps: mergeOkButtonProps('secondary', okButtonProps),\n });\n },\n confirmUpdate: async ({\n title,\n okText,\n cancelText,\n okButtonProps,\n }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title: title ?? translateConfirmText(CONFIRM_TRANSLATIONS.updateTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.updateOk),\n cancelText,\n okButtonProps: mergeOkButtonProps('secondary', okButtonProps),\n });\n },\n confirmDelete: async ({\n title,\n okText,\n cancelText,\n okButtonProps,\n }: ConfirmProps | undefined = {}) => {\n return confirmBase({\n title: title ?? translateConfirmText(CONFIRM_TRANSLATIONS.deleteTitle),\n okText: okText ?? translateConfirmText(CONFIRM_TRANSLATIONS.deleteOk),\n cancelText,\n okButtonProps: mergeOkButtonProps('error', okButtonProps),\n });\n },\n };\n};\n\nconst ConfirmDialog = ({ payload, open, onClose }: DialogProps<ConfirmBaseProps, boolean>) => {\n const { title, okButtonProps, cancelButtonProps, severity, useInfo } = payload;\n\n const { t, i18n } = useTranslation('owp');\n\n const okText =\n payload?.okText ??\n t(i18n.exists(CONFIRM_TRANSLATIONS.infoOk.primaryKey) ? 'button.ok' : 'Button.확인', {\n defaultValue: CONFIRM_TRANSLATIONS.infoOk.defaultValue,\n });\n const cancelText =\n payload?.cancelText ??\n t(\n i18n.exists(CONFIRM_TRANSLATIONS.cancel.primaryKey)\n ? CONFIRM_TRANSLATIONS.cancel.primaryKey\n : CONFIRM_TRANSLATIONS.cancel.fallbackKey,\n { defaultValue: CONFIRM_TRANSLATIONS.cancel.defaultValue },\n );\n\n return (\n <Dialog fullWidth maxWidth=\"xs\" open={open} onClose={() => onClose(false)}>\n <DialogContent>\n <Typography className=\"mb-12\" variant=\"h6\">\n {title}\n </Typography>\n </DialogContent>\n <DialogActions>\n {!useInfo && (\n <Button {...cancelButtonProps} variant=\"outlined\" onClick={() => onClose(false)}>\n {cancelText}\n </Button>\n )}\n <Button\n color={severity ? severity : 'primary'}\n variant=\"contained\"\n {...okButtonProps}\n onClick={() => onClose(true)}\n >\n {okText}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","import { isPlainObject, trimEnd } from 'es-toolkit/compat';\nimport { useTranslation } from 'react-i18next';\n\n/**\n * 번역 키 기본 라벨 추출\n * @param key 번역 키\n */\nconst getDefaultValueFromKey = (key: string) => {\n if (!key.includes('.')) {\n return undefined;\n }\n\n const normalizedKey = trimEnd(key, '.');\n const lastSeparatorIndex = normalizedKey.lastIndexOf('.');\n\n if (lastSeparatorIndex < 0) {\n return key;\n }\n\n return key.slice(lastSeparatorIndex + 1);\n};\n\n/**\n * OWP 번역 훅\n */\nexport const useOwpTranslation = () => {\n const { t: i18nT, ...restProps } = useTranslation('owp');\n\n const t: typeof i18nT = ((...args: Parameters<typeof i18nT>) => {\n const [key, options] = args;\n const optionsObject = isPlainObject(options) ? (options as Record<string, unknown>) : undefined;\n const isOptionsObject = Boolean(optionsObject);\n const hasDefaultValue =\n isOptionsObject && Object.prototype.hasOwnProperty.call(optionsObject, 'defaultValue');\n const canInjectDefaultValue = options == null || isOptionsObject;\n\n if (canInjectDefaultValue && !hasDefaultValue && typeof key === 'string') {\n const defaultValue = getDefaultValueFromKey(key);\n\n if (defaultValue) {\n const nextOptions = isOptionsObject ? { ...optionsObject, defaultValue } : { defaultValue };\n\n return i18nT(...([key, nextOptions, ...args.slice(2)] as Parameters<typeof i18nT>));\n }\n }\n\n return i18nT(...args);\n }) as typeof i18nT;\n\n return { t, ...restProps };\n};\n"],"names":["trimEnd","str","chars","endIndex","PRESERVED_STORAGE_KEYS","STORAGE_KEYS","getLocalStorage","__name","safeParseJson","raw","fallback","useStorage","resetStorage","useCallback","storage","preservedEntries","key","value","getCurrentUser","userData","isPlainObject","setEnv","env","getEnv","envData","useMemo","guard","trimEnd$1","CONFIRM_TRANSLATIONS","mergeOkButtonProps","defaultColor","okButtonProps","useConfirm","dialogs","useDialogs","t","i18n","useTranslation","translateConfirmText","primaryKey","fallbackKey","defaultValue","confirmBase","props","ConfirmDialog","title","okText","severity","cancelText","payload","open","onClose","cancelButtonProps","useInfo","jsxs","Dialog","jsx","DialogContent","Typography","DialogActions","Button","getDefaultValueFromKey","lastSeparatorIndex","useOwpTranslation","i18nT","restProps","args","options","optionsObject","isOptionsObject","hasDefaultValue","nextOptions"],"mappings":";;;;;;;;;AAAA,SAASA,EAAQC,GAAKC,GAAO;AACzB,MAAIA,MAAU;AACV,WAAOD,EAAI,QAAO;AAEtB,MAAIE,IAAWF,EAAI;AACnB,UAAQ,OAAOC,GAAK;AAAA,IAChB,KAAK,UAAU;AACX,UAAIA,EAAM,WAAW;AACjB,cAAM,IAAI,MAAM,4DAA4D;AAEhF,aAAOC,IAAW,KAAKF,EAAIE,IAAW,CAAC,MAAMD;AACzC,QAAAC;AAEJ;AAAA,IACJ;AAAA,IACA,KAAK;AACD,aAAOA,IAAW,KAAKD,EAAM,SAASD,EAAIE,IAAW,CAAC,CAAC;AACnD,QAAAA;AAAA,EAGhB;AACI,SAAOF,EAAI,UAAU,GAAGE,CAAQ;AACpC;AAtBSH,EAAAA,GAAAA;AC0BT,MAAMI,IAAyB;AAAA,EAC7BC,EAAa;AAAA,EACbA,EAAa;AAAA,EACbA,EAAa;AAAA,EACbA,EAAa;AAAA,EACbA,EAAa;AACf,GAKMC,IAAkB,gBAAAC,EAAA,MAClB,OAAO,SAAW,MACb,OAGF,OAAO,cALQ,oBAalBC,IAAgB,gBAAAD,EAAA,CAAIE,GAAoBC,MAAmB;AAC/D,MAAI,CAACD;AACH,WAAOC;AAGT,MAAI;AACF,WAAO,KAAK,MAAMD,CAAG;AAAA,EACvB,QAAQ;AACN,WAAOC;AAAA,EACT;AACF,GAVsB,kBAeTC,IAAa,gBAAAJ,EAAA,MAAM;AAC9B,QAAMK,IAAeC,EAAY,MAAM;AACrC,UAAMC,IAAUR,EAAA;AAEhB,QAAI,CAACQ;AACH;AAGF,UAAMC,IAAmBX,EAAuB,IAAI,CAACY,M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