@owp/core 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Close-DA97hwNx.js +914 -0
- package/dist/Close-DA97hwNx.js.map +1 -0
- package/dist/{OwpStoreProvider-CqHkIIUm.js → OwpStoreProvider-BKRp9Maw.js} +2 -2
- package/dist/{OwpStoreProvider-CqHkIIUm.js.map → OwpStoreProvider-BKRp9Maw.js.map} +1 -1
- package/dist/{OwpUtils-DxEd-Pjo.js → OwpUtils-9lHSCdan.js} +10 -17
- package/dist/OwpUtils-9lHSCdan.js.map +1 -0
- package/dist/{QuickPanel-DNAisp_R.js → QuickPanel-EyvjMTxX.js} +2 -2
- package/dist/{QuickPanel-DNAisp_R.js.map → QuickPanel-EyvjMTxX.js.map} +1 -1
- package/dist/context.js +66 -22
- package/dist/context.js.map +1 -1
- package/dist/hooks.js +36 -36
- package/dist/{index-fDrAKBzK.js → index-CdxKoZlQ.js} +11866 -13172
- package/dist/index-CdxKoZlQ.js.map +1 -0
- package/dist/index.js +121 -127
- package/dist/index.js.map +1 -1
- package/dist/{isTypedArray-DPyC49cI.js → isTypedArray-xp-fB7W4.js} +3 -3
- package/dist/{isTypedArray-DPyC49cI.js.map → isTypedArray-xp-fB7W4.js.map} +1 -1
- package/dist/{lazyLoadedSlices-CsgnywgU.js → lazyLoadedSlices-Bjy1crVY.js} +679 -700
- package/dist/{lazyLoadedSlices-CsgnywgU.js.map → lazyLoadedSlices-Bjy1crVY.js.map} +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/store.js +1 -1
- package/dist/{toUpper-BhzrnIm3.js → toUpper-CilZrxEa.js} +2 -2
- package/dist/{toUpper-BhzrnIm3.js.map → toUpper-CilZrxEa.js.map} +1 -1
- package/dist/{treeGridUtil-DaqTz5v3.js → treeGridUtil-_FDvRzzt.js} +2 -2
- package/dist/{treeGridUtil-DaqTz5v3.js.map → treeGridUtil-_FDvRzzt.js.map} +1 -1
- package/dist/types/components/{ErrorBoundary/ErrorBoundary.d.ts → OwpErrorBoundary/OwpErrorBoundary.d.ts} +5 -5
- package/dist/types/components/OwpErrorBoundary/index.d.ts +1 -0
- package/dist/types/components/OwpEventEmitter/OwpEventEmitter.d.ts +27 -0
- package/dist/types/components/OwpEventEmitter/index.d.ts +1 -0
- package/dist/types/components/OwpStyleProvider/OwpStyleProvider.d.ts +18 -0
- package/dist/types/components/OwpStyleProvider/index.d.ts +2 -0
- package/dist/types/context/OwpAppProvider.d.ts +5 -3
- package/dist/types/context/OwpUiProvider.d.ts +17 -0
- package/dist/types/context/index.d.ts +1 -0
- package/dist/types/index.d.ts +3 -9
- package/dist/types/utils/common/OwpUtils.d.ts +3 -4
- package/dist/types/utils/getTrimmedValue.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/useOwpTranslation-VarZsCQ4.js +233 -0
- package/dist/useOwpTranslation-VarZsCQ4.js.map +1 -0
- package/dist/useTreeGridExcelExport-BGh2y8Cg.js +195 -0
- package/dist/useTreeGridExcelExport-BGh2y8Cg.js.map +1 -0
- package/dist/utils.js +717 -712
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/OwpAppProvider-F48yHfyI.js +0 -22
- package/dist/OwpAppProvider-F48yHfyI.js.map +0 -1
- package/dist/OwpUtils-DxEd-Pjo.js.map +0 -1
- package/dist/index-fDrAKBzK.js.map +0 -1
- package/dist/types/components/ErrorBoundary/index.d.ts +0 -1
- package/dist/types/components/EventEmitter/EventEmitter.d.ts +0 -34
- package/dist/types/components/EventEmitter/index.d.ts +0 -1
- package/dist/types/components/OwpButtonDelete/OwpButtonDelete.d.ts +0 -12
- package/dist/types/components/OwpButtonDelete/index.d.ts +0 -1
- package/dist/types/components/OwpButtonSave/OwpButtonSave.d.ts +0 -12
- package/dist/types/components/OwpButtonSave/index.d.ts +0 -1
- package/dist/types/components/OwpPageSimple/OwpPageSimple.d.ts +0 -55
- package/dist/types/components/OwpPageSimple/OwpPageSimpleHeader.d.ts +0 -14
- package/dist/types/components/OwpPageSimple/OwpPageSimpleSidebar.d.ts +0 -19
- package/dist/types/components/OwpPageSimple/OwpPageSimpleSidebarContent.d.ts +0 -13
- package/dist/types/components/OwpPageSimple/index.d.ts +0 -1
- package/dist/types/components/OwpTreeView/OwpSlotTreeView.d.ts +0 -27
- package/dist/types/components/OwpTreeView/index.d.ts +0 -1
- package/dist/types/components/withRouterAndRef/index.d.ts +0 -1
- package/dist/types/components/withRouterAndRef/withRouterAndRef.d.ts +0 -14
- package/dist/useStorage-B4ZrPct1.js +0 -65
- package/dist/useStorage-B4ZrPct1.js.map +0 -1
- package/dist/useTreeGridExcelExport-BjyBdpz1.js +0 -360
- package/dist/useTreeGridExcelExport-BjyBdpz1.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ErrorBoundary } from './ErrorBoundary';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The EventEmitter class is a custom implementation of an event emitter.
|
|
3
|
-
* It provides methods for registering and emitting events.
|
|
4
|
-
*/
|
|
5
|
-
export declare class EventEmitter {
|
|
6
|
-
private events;
|
|
7
|
-
constructor();
|
|
8
|
-
/**
|
|
9
|
-
* The _getEventListByName method returns the event list for a given event name.
|
|
10
|
-
* If the event list does not exist, it creates a new one.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
private _getEventListByName;
|
|
14
|
-
/**
|
|
15
|
-
* The on method registers a callback function for a given event name.
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
on<T extends unknown[]>(eventName: string, fn: (...args: T) => void): void;
|
|
19
|
-
/**
|
|
20
|
-
* The once method registers a callback function for a given event name that will only be called once.
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
once(eventName: string, fn: (...args: unknown[]) => void): void;
|
|
24
|
-
/**
|
|
25
|
-
* The emit method triggers all registered callback functions for a given event name.
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
emit(eventName: string, ...args: unknown[]): void;
|
|
29
|
-
/**
|
|
30
|
-
* The removeListener method removes a registered callback function for a given event name.
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
removeListener(eventName: string, fn: (...args: unknown[]) => void): void;
|
|
34
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EventEmitter } from './EventEmitter';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ConfirmProps } from '@/hooks/useConfirm';
|
|
2
|
-
import { ButtonProps } from '@mui/material';
|
|
3
|
-
export interface OwpButtonDeleteProps extends ButtonProps {
|
|
4
|
-
confirmProps?: ConfirmProps;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* OwpButtonDelete 컴포넌트
|
|
8
|
-
* @param confirmProps 확인 대화상자 옵션
|
|
9
|
-
* @param children 하위 콘텐츠
|
|
10
|
-
*/
|
|
11
|
-
declare const OwpButtonDelete: ({ confirmProps, children, ...buttonProps }: OwpButtonDeleteProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { OwpButtonDelete };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './OwpButtonDelete';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ConfirmProps } from '@/hooks/useConfirm';
|
|
2
|
-
import { ButtonProps } from '@mui/material';
|
|
3
|
-
export interface OwpButtonSaveProps extends ButtonProps {
|
|
4
|
-
confirmProps?: ConfirmProps;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* OwpButtonSave 컴포넌트
|
|
8
|
-
* @param confirmProps 확인 대화상자 옵션
|
|
9
|
-
* @param children 하위 콘텐츠
|
|
10
|
-
*/
|
|
11
|
-
declare const OwpButtonSave: ({ confirmProps, children, ...buttonProps }: OwpButtonSaveProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { OwpButtonSave };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './OwpButtonSave';
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@mui/system';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* OwpPageSimple 컴포넌트
|
|
5
|
-
*/
|
|
6
|
-
declare const OwpPageSimple: import("react").NamedExoticComponent<((((import("@mui/system").SystemCssProperties<Theme> & {
|
|
7
|
-
className?: string;
|
|
8
|
-
leftSidebarContent?: ReactNode;
|
|
9
|
-
leftSidebarVariant?: "permanent" | "persistent" | "temporary";
|
|
10
|
-
rightSidebarContent?: ReactNode;
|
|
11
|
-
rightSidebarVariant?: "permanent" | "persistent" | "temporary";
|
|
12
|
-
header?: ReactNode;
|
|
13
|
-
content?: ReactNode;
|
|
14
|
-
scroll?: "normal" | "page" | "content";
|
|
15
|
-
leftSidebarOpen?: boolean;
|
|
16
|
-
rightSidebarOpen?: boolean;
|
|
17
|
-
leftSidebarWidth?: number;
|
|
18
|
-
rightSidebarWidth?: number;
|
|
19
|
-
rightSidebarOnClose?: () => void;
|
|
20
|
-
leftSidebarOnClose?: () => void;
|
|
21
|
-
}) | (import("@mui/system").CSSPseudoSelectorProps<Theme> & {
|
|
22
|
-
className?: string;
|
|
23
|
-
leftSidebarContent?: ReactNode;
|
|
24
|
-
leftSidebarVariant?: "permanent" | "persistent" | "temporary";
|
|
25
|
-
rightSidebarContent?: ReactNode;
|
|
26
|
-
rightSidebarVariant?: "permanent" | "persistent" | "temporary";
|
|
27
|
-
header?: ReactNode;
|
|
28
|
-
content?: ReactNode;
|
|
29
|
-
scroll?: "normal" | "page" | "content";
|
|
30
|
-
leftSidebarOpen?: boolean;
|
|
31
|
-
rightSidebarOpen?: boolean;
|
|
32
|
-
leftSidebarWidth?: number;
|
|
33
|
-
rightSidebarWidth?: number;
|
|
34
|
-
rightSidebarOnClose?: () => void;
|
|
35
|
-
leftSidebarOnClose?: () => void;
|
|
36
|
-
}) | Omit<import("@mui/system").CSSSelectorObjectOrCssVariables<Theme> & {
|
|
37
|
-
className?: string;
|
|
38
|
-
leftSidebarContent?: ReactNode;
|
|
39
|
-
leftSidebarVariant?: "permanent" | "persistent" | "temporary";
|
|
40
|
-
rightSidebarContent?: ReactNode;
|
|
41
|
-
rightSidebarVariant?: "permanent" | "persistent" | "temporary";
|
|
42
|
-
header?: ReactNode;
|
|
43
|
-
content?: ReactNode;
|
|
44
|
-
scroll?: "normal" | "page" | "content";
|
|
45
|
-
leftSidebarOpen?: boolean;
|
|
46
|
-
rightSidebarOpen?: boolean;
|
|
47
|
-
leftSidebarWidth?: number;
|
|
48
|
-
rightSidebarWidth?: number;
|
|
49
|
-
rightSidebarOnClose?: () => void;
|
|
50
|
-
leftSidebarOnClose?: () => void;
|
|
51
|
-
}, "ref">) & import("react").RefAttributes<{
|
|
52
|
-
toggleLeftSidebar: (T: boolean) => void;
|
|
53
|
-
toggleRightSidebar: (T: boolean) => void;
|
|
54
|
-
}>) & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>) & {}>;
|
|
55
|
-
export { OwpPageSimple };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the OwpPageSimpleHeader component.
|
|
4
|
-
*/
|
|
5
|
-
type OwpPageSimpleHeaderProps = {
|
|
6
|
-
className?: string;
|
|
7
|
-
header?: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* The OwpPageSimpleHeader component is a sub-component of the OwpPageSimple layout component.
|
|
11
|
-
* It provides a header area for the layout.
|
|
12
|
-
*/
|
|
13
|
-
declare function OwpPageSimpleHeader(props: OwpPageSimpleHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export { OwpPageSimpleHeader };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SwipeableDrawerProps } from '@mui/material/SwipeableDrawer/SwipeableDrawer';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* Props for the OwpPageSimpleSidebar component.
|
|
5
|
-
*/
|
|
6
|
-
type OwpPageSimpleSidebarProps = {
|
|
7
|
-
open?: boolean;
|
|
8
|
-
position?: SwipeableDrawerProps['anchor'];
|
|
9
|
-
variant?: SwipeableDrawerProps['variant'];
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* The OwpPageSimpleSidebar component.
|
|
15
|
-
*/
|
|
16
|
-
declare const OwpPageSimpleSidebar: import("react").ForwardRefExoticComponent<OwpPageSimpleSidebarProps & import("react").RefAttributes<{
|
|
17
|
-
toggleSidebar: (T: boolean) => void;
|
|
18
|
-
}>>;
|
|
19
|
-
export { OwpPageSimpleSidebar };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the OwpPageSimpleSidebarContent component.
|
|
4
|
-
*/
|
|
5
|
-
type OwpPageSimpleSidebarContentProps = {
|
|
6
|
-
innerScroll?: boolean;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* The OwpPageSimpleSidebarContent component is a content container for the OwpPageSimpleSidebar component.
|
|
11
|
-
*/
|
|
12
|
-
declare function OwpPageSimpleSidebarContent(props: OwpPageSimpleSidebarContentProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export { OwpPageSimpleSidebarContent };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { OwpPageSimple } from './OwpPageSimple';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { type TreeViewBaseItem } from '@mui/x-tree-view/models';
|
|
2
|
-
import { type RichTreeViewPropsBase } from '@mui/x-tree-view/RichTreeView';
|
|
3
|
-
type OwpSlotTreeViewProps<T extends TreeViewBaseItem> = {
|
|
4
|
-
expanded: boolean;
|
|
5
|
-
data: T[];
|
|
6
|
-
} & RichTreeViewPropsBase;
|
|
7
|
-
type TreeViewTransformValue = string | number | null | undefined;
|
|
8
|
-
type TreeViewTransformItem = Record<string, TreeViewTransformValue>;
|
|
9
|
-
type TreeViewTransformKeyProps<T extends TreeViewTransformItem> = {
|
|
10
|
-
id: keyof T & string;
|
|
11
|
-
parent: keyof T & string;
|
|
12
|
-
label: keyof T & string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* OwpSlotTreeView 컴포넌트
|
|
16
|
-
* @param expanded expanded 값
|
|
17
|
-
* @param data 데이터
|
|
18
|
-
*/
|
|
19
|
-
export declare function OwpSlotTreeView<T extends TreeViewBaseItem>({ expanded, data, ...restProps }: OwpSlotTreeViewProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
/**
|
|
21
|
-
* transformTreeViewListData 변환 함수
|
|
22
|
-
* @param id 식별자
|
|
23
|
-
* @param data 데이터
|
|
24
|
-
* @param keyProps keyProps props
|
|
25
|
-
*/
|
|
26
|
-
export declare const transformTreeViewListData: <T extends TreeViewTransformItem>(id: T[keyof T], data: T[], keyProps: TreeViewTransformKeyProps<T>) => TreeViewBaseItem[];
|
|
27
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './OwpSlotTreeView';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './withRouterAndRef';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { useLocation, useNavigate } from 'react-router-dom';
|
|
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 withRouterAndRef: <Props extends WithRouterProps>(Component: ComponentType<Props>) => () => import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
14
|
-
export default withRouterAndRef;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var g = Object.defineProperty;
|
|
2
|
-
var u = (n, o) => g(n, "name", { value: o, configurable: !0 });
|
|
3
|
-
import { S as e } from "./storageKeys-DRzte9LZ.js";
|
|
4
|
-
import { useCallback as c, useMemo as f } from "react";
|
|
5
|
-
import { i as l } from "./isTypedArray-DPyC49cI.js";
|
|
6
|
-
const p = [
|
|
7
|
-
e.currentLanguage,
|
|
8
|
-
e.currentShortcuts,
|
|
9
|
-
e.currentUserId,
|
|
10
|
-
e.currentLogoSrc,
|
|
11
|
-
e.owpEnv
|
|
12
|
-
], a = /* @__PURE__ */ u(() => typeof window > "u" ? null : window.localStorage, "getLocalStorage"), m = /* @__PURE__ */ u((n, o) => {
|
|
13
|
-
if (!n)
|
|
14
|
-
return o;
|
|
15
|
-
try {
|
|
16
|
-
return JSON.parse(n);
|
|
17
|
-
} catch {
|
|
18
|
-
return o;
|
|
19
|
-
}
|
|
20
|
-
}, "safeParseJson"), I = /* @__PURE__ */ u(() => {
|
|
21
|
-
const n = c(() => {
|
|
22
|
-
const t = a();
|
|
23
|
-
if (!t)
|
|
24
|
-
return;
|
|
25
|
-
const r = p.map((s) => [s, t.getItem(s)]);
|
|
26
|
-
t.clear(), r.forEach(([s, i]) => {
|
|
27
|
-
i !== null && t.setItem(s, i);
|
|
28
|
-
});
|
|
29
|
-
}, []), o = c(() => {
|
|
30
|
-
const t = a(), r = m(
|
|
31
|
-
(t == null ? void 0 : t.getItem(e.currentUser)) ?? null,
|
|
32
|
-
null
|
|
33
|
-
);
|
|
34
|
-
return l(r) ? {
|
|
35
|
-
role: ["admin"],
|
|
36
|
-
data: {
|
|
37
|
-
displayName: r.USERNAME,
|
|
38
|
-
email: r.EMAIL,
|
|
39
|
-
MES_STARTPAGE: r.MES_STARTPAGE,
|
|
40
|
-
STARTPAGE: r.STARTPAGE,
|
|
41
|
-
USERSEQ: r.USERSEQ,
|
|
42
|
-
photoURL: ""
|
|
43
|
-
}
|
|
44
|
-
} : null;
|
|
45
|
-
}, []), E = c((t) => {
|
|
46
|
-
const r = a();
|
|
47
|
-
r && r.setItem(e.owpEnv, JSON.stringify(t ?? {}));
|
|
48
|
-
}, []), S = c(() => {
|
|
49
|
-
const t = a(), r = m((t == null ? void 0 : t.getItem(e.owpEnv)) ?? null, {});
|
|
50
|
-
return l(r) ? r : {};
|
|
51
|
-
}, []);
|
|
52
|
-
return f(
|
|
53
|
-
() => ({
|
|
54
|
-
resetStorage: n,
|
|
55
|
-
getCurrentUser: o,
|
|
56
|
-
setEnv: E,
|
|
57
|
-
getEnv: S
|
|
58
|
-
}),
|
|
59
|
-
[o, S, n, E]
|
|
60
|
-
);
|
|
61
|
-
}, "useStorage");
|
|
62
|
-
export {
|
|
63
|
-
I as u
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=useStorage-B4ZrPct1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useStorage-B4ZrPct1.js","sources":["../src/hooks/useStorage.ts"],"sourcesContent":["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"],"names":["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"],"mappings":";;;;;AA0BA,MAAMA,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,MAAQ,CAACA,GAAKF,EAAQ,QAAQE,CAAG,CAAC,CAAU;AAEjG,IAAAF,EAAQ,MAAA,GAERC,EAAiB,QAAQ,CAAC,CAACC,GAAKC,CAAK,MAAM;AACzC,MAAIA,MAAU,QAIdH,EAAQ,QAAQE,GAAKC,CAAK;AAAA,IAC5B,CAAC;AAAA,EACH,GAAG,CAAA,CAAE,GAECC,IAAiBL,EAAY,MAAgC;AACjE,UAAMC,IAAUR,EAAA,GACVa,IAAWX;AAAA,OACfM,KAAA,gBAAAA,EAAS,QAAQT,EAAa,iBAAgB;AAAA,MAC9C;AAAA,IAAA;AAGF,WAAKe,EAAcD,CAAQ,IAIpB;AAAA,MACL,MAAM,CAAC,OAAO;AAAA,MACd,MAAM;AAAA,QACJ,aAAaA,EAAS;AAAA,QACtB,OAAOA,EAAS;AAAA,QAChB,eAAeA,EAAS;AAAA,QACxB,WAAWA,EAAS;AAAA,QACpB,SAASA,EAAS;AAAA,QAClB,UAAU;AAAA,MAAA;AAAA,IACZ,IAZO;AAAA,EAcX,GAAG,CAAA,CAAE,GAECE,IAASR,EAAY,CAACS,MAAoB;AAC9C,UAAMR,IAAUR,EAAA;AAEhB,IAAKQ,KAILA,EAAQ,QAAQT,EAAa,QAAQ,KAAK,UAAUiB,KAAO,CAAA,CAAE,CAAC;AAAA,EAChE,GAAG,CAAA,CAAE,GAECC,IAASV,EAAY,MAAkB;AAC3C,UAAMC,IAAUR,EAAA,GACVkB,IAAUhB,GAAiCM,KAAA,gBAAAA,EAAS,QAAQT,EAAa,YAAW,MAAM,EAAE;AAElG,WAAOe,EAAcI,CAAO,IAAIA,IAAU,CAAA;AAAA,EAC5C,GAAG,CAAA,CAAE;AAEL,SAAOC;AAAA,IACL,OAAO;AAAA,MACL,cAAAb;AAAA,MACA,gBAAAM;AAAA,MACA,QAAAG;AAAA,MACA,QAAAE;AAAA,IAAA;AAAA,IAEF,CAACL,GAAgBK,GAAQX,GAAcS,CAAM;AAAA,EAAA;AAEjD,GAvE0B;"}
|
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
var N = Object.defineProperty;
|
|
2
|
-
var t = (e, n) => N(e, "name", { value: n, configurable: !0 });
|
|
3
|
-
import { S as y } from "./storageKeys-DRzte9LZ.js";
|
|
4
|
-
import { useAtomValue as T, useSetAtom as b } from "jotai";
|
|
5
|
-
import { atomWithStorage as k } from "jotai/utils";
|
|
6
|
-
import { a as O, j as x } from "./emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js";
|
|
7
|
-
import { Typography as P, DialogContent as F, DialogActions as W, Button as S, Dialog as q } from "@mui/material";
|
|
8
|
-
import { useDialogs as z } from "@toolpad/core/useDialogs";
|
|
9
|
-
import { useTranslation as w } from "react-i18next";
|
|
10
|
-
import h, { useRef as v, useEffect as g, useCallback as U, useState as _ } from "react";
|
|
11
|
-
import { a as Q, b as $ } from "./isTypedArray-DPyC49cI.js";
|
|
12
|
-
import { useTheme as Y } from "@mui/material/styles";
|
|
13
|
-
import { g as H, e as V } from "./treeGridUtil-DaqTz5v3.js";
|
|
14
|
-
function J(e, n, { signal: r, edges: o } = {}) {
|
|
15
|
-
let a, u = null;
|
|
16
|
-
const s = o != null && o.includes("leading"), i = o == null || o.includes("trailing"), c = /* @__PURE__ */ t(() => {
|
|
17
|
-
u !== null && (e.apply(a, u), a = void 0, u = null);
|
|
18
|
-
}, "invoke"), d = /* @__PURE__ */ t(() => {
|
|
19
|
-
i && c(), C();
|
|
20
|
-
}, "onTimerEnd");
|
|
21
|
-
let l = null;
|
|
22
|
-
const m = /* @__PURE__ */ t(() => {
|
|
23
|
-
l != null && clearTimeout(l), l = setTimeout(() => {
|
|
24
|
-
l = null, d();
|
|
25
|
-
}, n);
|
|
26
|
-
}, "schedule"), p = /* @__PURE__ */ t(() => {
|
|
27
|
-
l !== null && (clearTimeout(l), l = null);
|
|
28
|
-
}, "cancelTimer"), C = /* @__PURE__ */ t(() => {
|
|
29
|
-
p(), a = void 0, u = null;
|
|
30
|
-
}, "cancel"), j = /* @__PURE__ */ t(() => {
|
|
31
|
-
c();
|
|
32
|
-
}, "flush"), E = /* @__PURE__ */ t(function(...G) {
|
|
33
|
-
if (r != null && r.aborted)
|
|
34
|
-
return;
|
|
35
|
-
a = this, u = G;
|
|
36
|
-
const M = l == null;
|
|
37
|
-
m(), s && M && c();
|
|
38
|
-
}, "debounced");
|
|
39
|
-
return E.schedule = m, E.cancel = C, E.flush = j, r == null || r.addEventListener("abort", C, { once: !0 }), E;
|
|
40
|
-
}
|
|
41
|
-
t(J, "debounce$1");
|
|
42
|
-
function X(e, n) {
|
|
43
|
-
if (n === void 0)
|
|
44
|
-
return e.trimEnd();
|
|
45
|
-
let r = e.length;
|
|
46
|
-
switch (typeof n) {
|
|
47
|
-
case "string": {
|
|
48
|
-
if (n.length !== 1)
|
|
49
|
-
throw new Error("The 'chars' parameter should be a single character string.");
|
|
50
|
-
for (; r > 0 && e[r - 1] === n; )
|
|
51
|
-
r--;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
case "object":
|
|
55
|
-
for (; r > 0 && n.includes(e[r - 1]); )
|
|
56
|
-
r--;
|
|
57
|
-
}
|
|
58
|
-
return e.substring(0, r);
|
|
59
|
-
}
|
|
60
|
-
t(X, "trimEnd$1");
|
|
61
|
-
function Z(e, n = 0, r = {}) {
|
|
62
|
-
typeof r != "object" && (r = {});
|
|
63
|
-
const { leading: o = !1, trailing: a = !0, maxWait: u } = r, s = Array(2);
|
|
64
|
-
o && (s[0] = "leading"), a && (s[1] = "trailing");
|
|
65
|
-
let i, c = null;
|
|
66
|
-
const d = J(function(...p) {
|
|
67
|
-
i = e.apply(this, p), c = null;
|
|
68
|
-
}, n, { edges: s }), l = /* @__PURE__ */ t(function(...p) {
|
|
69
|
-
return u != null && (c === null && (c = Date.now()), Date.now() - c >= u) ? (i = e.apply(this, p), c = Date.now(), d.cancel(), d.schedule(), i) : (d.apply(this, p), i);
|
|
70
|
-
}, "debounced"), m = /* @__PURE__ */ t(() => (d.flush(), i), "flush");
|
|
71
|
-
return l.cancel = d.cancel, l.flush = m, l;
|
|
72
|
-
}
|
|
73
|
-
t(Z, "debounce");
|
|
74
|
-
function ee(e, n, r) {
|
|
75
|
-
return e == null ? "" : X(e, n.toString().split(""));
|
|
76
|
-
}
|
|
77
|
-
t(ee, "trimEnd");
|
|
78
|
-
const D = k(y.commonCodeList, void 0), Te = /* @__PURE__ */ t(() => T(D), "useGetCommonCodeList"), be = /* @__PURE__ */ t(() => b(D), "useSetCommonCodeList"), f = {
|
|
79
|
-
infoTitle: {
|
|
80
|
-
primaryKey: "message.would_you_like_to_proceed",
|
|
81
|
-
fallbackKey: "Message.처리하시겠습니까",
|
|
82
|
-
defaultValue: "처리하시겠습니까?"
|
|
83
|
-
},
|
|
84
|
-
infoOk: {
|
|
85
|
-
primaryKey: "button.ok",
|
|
86
|
-
fallbackKey: "Button.확인",
|
|
87
|
-
defaultValue: "확인"
|
|
88
|
-
},
|
|
89
|
-
saveTitle: {
|
|
90
|
-
primaryKey: "message.do_you_want_to_save",
|
|
91
|
-
fallbackKey: "Message.저장하시겠습니까?",
|
|
92
|
-
defaultValue: "저장하시겠습니까?"
|
|
93
|
-
},
|
|
94
|
-
saveOk: {
|
|
95
|
-
primaryKey: "button.save",
|
|
96
|
-
fallbackKey: "Button.저장",
|
|
97
|
-
defaultValue: "저장"
|
|
98
|
-
},
|
|
99
|
-
updateTitle: {
|
|
100
|
-
primaryKey: "message.would_you_like_to_edit",
|
|
101
|
-
fallbackKey: "Message.수정하시겠습니까?",
|
|
102
|
-
defaultValue: "수정하시겠습니까?"
|
|
103
|
-
},
|
|
104
|
-
updateOk: {
|
|
105
|
-
primaryKey: "button.edit",
|
|
106
|
-
fallbackKey: "Button.수정",
|
|
107
|
-
defaultValue: "수정"
|
|
108
|
-
},
|
|
109
|
-
deleteTitle: {
|
|
110
|
-
primaryKey: "message.are_you_sure_you_want_to_delete",
|
|
111
|
-
fallbackKey: "Message.삭제하시겠습니까?",
|
|
112
|
-
defaultValue: "삭제하시겠습니까?"
|
|
113
|
-
},
|
|
114
|
-
deleteOk: {
|
|
115
|
-
primaryKey: "button.delete",
|
|
116
|
-
fallbackKey: "Button.삭제",
|
|
117
|
-
defaultValue: "삭제"
|
|
118
|
-
},
|
|
119
|
-
cancel: {
|
|
120
|
-
primaryKey: "button.cancel",
|
|
121
|
-
fallbackKey: "Button.취소",
|
|
122
|
-
defaultValue: "취소"
|
|
123
|
-
}
|
|
124
|
-
}, K = /* @__PURE__ */ t((e, n) => e ? {
|
|
125
|
-
color: e,
|
|
126
|
-
...n
|
|
127
|
-
} : n, "mergeOkButtonProps"), ke = /* @__PURE__ */ t(() => {
|
|
128
|
-
const e = z(), { t: n, i18n: r } = w("owp"), o = /* @__PURE__ */ t(({
|
|
129
|
-
primaryKey: u,
|
|
130
|
-
fallbackKey: s,
|
|
131
|
-
defaultValue: i
|
|
132
|
-
}) => n(r.exists(u) ? u : s, { defaultValue: i }), "translateConfirmText"), a = /* @__PURE__ */ t((u) => e.open(te, u), "confirmBase");
|
|
133
|
-
return {
|
|
134
|
-
confirm: a,
|
|
135
|
-
confirmInfo: /* @__PURE__ */ t(async ({ title: u, okText: s, severity: i } = {}) => a({
|
|
136
|
-
title: u ?? o(f.infoTitle),
|
|
137
|
-
okText: s ?? o(f.infoOk),
|
|
138
|
-
severity: i ?? "primary",
|
|
139
|
-
useInfo: !0
|
|
140
|
-
}), "confirmInfo"),
|
|
141
|
-
confirmSave: /* @__PURE__ */ t(async ({
|
|
142
|
-
title: u,
|
|
143
|
-
okText: s,
|
|
144
|
-
cancelText: i,
|
|
145
|
-
okButtonProps: c
|
|
146
|
-
} = {}) => a({
|
|
147
|
-
title: u ?? o(f.saveTitle),
|
|
148
|
-
okText: s ?? o(f.saveOk),
|
|
149
|
-
cancelText: i,
|
|
150
|
-
okButtonProps: K("secondary", c)
|
|
151
|
-
}), "confirmSave"),
|
|
152
|
-
confirmUpdate: /* @__PURE__ */ t(async ({
|
|
153
|
-
title: u,
|
|
154
|
-
okText: s,
|
|
155
|
-
cancelText: i,
|
|
156
|
-
okButtonProps: c
|
|
157
|
-
} = {}) => a({
|
|
158
|
-
title: u ?? o(f.updateTitle),
|
|
159
|
-
okText: s ?? o(f.updateOk),
|
|
160
|
-
cancelText: i,
|
|
161
|
-
okButtonProps: K("secondary", c)
|
|
162
|
-
}), "confirmUpdate"),
|
|
163
|
-
confirmDelete: /* @__PURE__ */ t(async ({
|
|
164
|
-
title: u,
|
|
165
|
-
okText: s,
|
|
166
|
-
cancelText: i,
|
|
167
|
-
okButtonProps: c
|
|
168
|
-
} = {}) => a({
|
|
169
|
-
title: u ?? o(f.deleteTitle),
|
|
170
|
-
okText: s ?? o(f.deleteOk),
|
|
171
|
-
cancelText: i,
|
|
172
|
-
okButtonProps: K("error", c)
|
|
173
|
-
}), "confirmDelete")
|
|
174
|
-
};
|
|
175
|
-
}, "useConfirm"), te = /* @__PURE__ */ t(({ payload: e, open: n, onClose: r }) => {
|
|
176
|
-
const { title: o, okButtonProps: a, cancelButtonProps: u, severity: s, useInfo: i } = e, { t: c, i18n: d } = w("owp"), l = (e == null ? void 0 : e.okText) ?? c(d.exists(f.infoOk.primaryKey) ? "button.ok" : "Button.확인", {
|
|
177
|
-
defaultValue: f.infoOk.defaultValue
|
|
178
|
-
}), m = (e == null ? void 0 : e.cancelText) ?? c(
|
|
179
|
-
d.exists(f.cancel.primaryKey) ? f.cancel.primaryKey : f.cancel.fallbackKey,
|
|
180
|
-
{ defaultValue: f.cancel.defaultValue }
|
|
181
|
-
);
|
|
182
|
-
return /* @__PURE__ */ O(q, { fullWidth: !0, maxWidth: "xs", open: n, onClose: /* @__PURE__ */ t(() => r(!1), "onClose"), children: [
|
|
183
|
-
/* @__PURE__ */ x(F, { children: /* @__PURE__ */ x(P, { className: "mb-12", variant: "h6", children: o }) }),
|
|
184
|
-
/* @__PURE__ */ O(W, { children: [
|
|
185
|
-
!i && /* @__PURE__ */ x(S, { ...u, variant: "outlined", onClick: /* @__PURE__ */ t(() => r(!1), "onClick"), children: m }),
|
|
186
|
-
/* @__PURE__ */ x(
|
|
187
|
-
S,
|
|
188
|
-
{
|
|
189
|
-
color: s || "primary",
|
|
190
|
-
variant: "contained",
|
|
191
|
-
...a,
|
|
192
|
-
onClick: /* @__PURE__ */ t(() => r(!0), "onClick"),
|
|
193
|
-
children: l
|
|
194
|
-
}
|
|
195
|
-
)
|
|
196
|
-
] })
|
|
197
|
-
] });
|
|
198
|
-
}, "ConfirmDialog"), L = k(y.currentLanguage, {
|
|
199
|
-
id: "kr",
|
|
200
|
-
title: "한국어",
|
|
201
|
-
flag: "KR"
|
|
202
|
-
}), Ee = /* @__PURE__ */ t(() => {
|
|
203
|
-
const { t: e } = w("owp");
|
|
204
|
-
return [
|
|
205
|
-
{ id: "kr", title: e("Common.한국어", { defaultValue: "한국어" }), flag: "KR" },
|
|
206
|
-
{
|
|
207
|
-
id: "en",
|
|
208
|
-
title: e("Common.English", { defaultValue: "English" }),
|
|
209
|
-
flag: "EN"
|
|
210
|
-
},
|
|
211
|
-
{ id: "lc", title: e("Common.Etc", { defaultValue: "Etc" }), flag: "LC" }
|
|
212
|
-
];
|
|
213
|
-
}, "useGetLanguageList"), xe = /* @__PURE__ */ t(() => T(L), "useGetCurrentLanguage"), we = /* @__PURE__ */ t(() => b(L), "useSetCurrentLanguage"), B = k(
|
|
214
|
-
y.currentLogoSrc,
|
|
215
|
-
"assets/images/logo/daedong-door-logo-b.png"
|
|
216
|
-
), ve = /* @__PURE__ */ t(() => T(B), "useGetCurrentLogoSrc"), Ce = /* @__PURE__ */ t(() => b(B), "useSetCurrentLogoSrc");
|
|
217
|
-
function Ke(e, n) {
|
|
218
|
-
const r = v(e);
|
|
219
|
-
g(() => {
|
|
220
|
-
r.current = e;
|
|
221
|
-
}, [e]);
|
|
222
|
-
const o = U(
|
|
223
|
-
Z((...a) => {
|
|
224
|
-
r.current(...a);
|
|
225
|
-
}, n),
|
|
226
|
-
[n]
|
|
227
|
-
);
|
|
228
|
-
return g(() => () => {
|
|
229
|
-
o.cancel();
|
|
230
|
-
}, [o]), o;
|
|
231
|
-
}
|
|
232
|
-
t(Ke, "useDebounce");
|
|
233
|
-
function ne(e) {
|
|
234
|
-
if (!e || !e.length)
|
|
235
|
-
throw new Error(
|
|
236
|
-
"useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead."
|
|
237
|
-
);
|
|
238
|
-
if (e.every(re))
|
|
239
|
-
throw new Error(
|
|
240
|
-
"useDeepCompareEffect should not be used with dependencies that are all primitive values. Use React.useEffect instead."
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
t(ne, "checkDeps");
|
|
244
|
-
function re(e) {
|
|
245
|
-
return e == null || /^[sbn]/.test(typeof e);
|
|
246
|
-
}
|
|
247
|
-
t(re, "isPrimitive");
|
|
248
|
-
function R(e) {
|
|
249
|
-
const n = h.useRef(e), r = h.useRef(0);
|
|
250
|
-
return Q(e, n.current) || (n.current = e, r.current += 1), h.useMemo(() => n.current, [r.current]);
|
|
251
|
-
}
|
|
252
|
-
t(R, "useDeepCompareMemoize");
|
|
253
|
-
function Oe(e, n) {
|
|
254
|
-
return process.env.NODE_ENV !== "production" && ne(n), h.useEffect(e, R(n));
|
|
255
|
-
}
|
|
256
|
-
t(Oe, "useDeepCompareEffect");
|
|
257
|
-
function Se(e, n) {
|
|
258
|
-
return h.useEffect(e, R(n));
|
|
259
|
-
}
|
|
260
|
-
t(Se, "useDeepCompareEffectNoCheck");
|
|
261
|
-
const A = k(y.navigationList, void 0), Ve = /* @__PURE__ */ t(() => T(A), "useGetNavigationList"), _e = /* @__PURE__ */ t(() => b(A), "useSetNavigationList"), oe = /* @__PURE__ */ t((e) => {
|
|
262
|
-
if (!e.includes("."))
|
|
263
|
-
return;
|
|
264
|
-
const r = ee(e, ".").lastIndexOf(".");
|
|
265
|
-
return r < 0 ? e : e.slice(r + 1);
|
|
266
|
-
}, "getDefaultValueFromKey"), ue = /* @__PURE__ */ t(() => {
|
|
267
|
-
const { t: e, ...n } = w("owp");
|
|
268
|
-
return { t: /* @__PURE__ */ t((...o) => {
|
|
269
|
-
const [a, u] = o, s = $(u) ? u : void 0, i = !!s, c = i && Object.prototype.hasOwnProperty.call(s, "defaultValue");
|
|
270
|
-
if ((u == null || i) && !c && typeof a == "string") {
|
|
271
|
-
const l = oe(a);
|
|
272
|
-
if (l) {
|
|
273
|
-
const m = i ? { ...s, defaultValue: l } : { defaultValue: l };
|
|
274
|
-
return e(a, m, ...o.slice(2));
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
return e(...o);
|
|
278
|
-
}, "t"), ...n };
|
|
279
|
-
}, "useOwpTranslation");
|
|
280
|
-
function De(e) {
|
|
281
|
-
const n = v();
|
|
282
|
-
return g(() => {
|
|
283
|
-
n.current = e;
|
|
284
|
-
}, [e]), n.current;
|
|
285
|
-
}
|
|
286
|
-
t(De, "usePrevious");
|
|
287
|
-
const I = k(y.currentShortcuts, []), Le = /* @__PURE__ */ t(() => T(I), "useGetShortcuts"), Be = /* @__PURE__ */ t(() => b(I), "useSetShortcuts");
|
|
288
|
-
function Re(e) {
|
|
289
|
-
const n = Y(), r = e(n).replace("@media ", "");
|
|
290
|
-
function o(s) {
|
|
291
|
-
return window.matchMedia(s).matches;
|
|
292
|
-
}
|
|
293
|
-
t(o, "getMatches");
|
|
294
|
-
const [a, u] = _(o(r));
|
|
295
|
-
return g(
|
|
296
|
-
() => {
|
|
297
|
-
const s = window.matchMedia(r);
|
|
298
|
-
u(o(r));
|
|
299
|
-
const i = /* @__PURE__ */ t((c) => u(c.matches), "handler");
|
|
300
|
-
return s.addEventListener("change", i), () => s.removeEventListener("change", i);
|
|
301
|
-
},
|
|
302
|
-
[r]
|
|
303
|
-
// Empty array ensures effect is only run on mount and unmount
|
|
304
|
-
), a;
|
|
305
|
-
}
|
|
306
|
-
t(Re, "useThemeMediaQuery");
|
|
307
|
-
function Ae(e, n) {
|
|
308
|
-
const r = v(e);
|
|
309
|
-
g(() => {
|
|
310
|
-
r.current = e;
|
|
311
|
-
}, [e]), g(() => {
|
|
312
|
-
let o;
|
|
313
|
-
return n !== null && e && typeof e == "function" && (o = setTimeout(r.current, n)), () => {
|
|
314
|
-
o && clearTimeout(o);
|
|
315
|
-
};
|
|
316
|
-
}, [e, n]);
|
|
317
|
-
}
|
|
318
|
-
t(Ae, "useTimeout");
|
|
319
|
-
const Ie = /* @__PURE__ */ t((e) => {
|
|
320
|
-
const { t: n } = ue(), r = v(!1), [o, a] = _(!1);
|
|
321
|
-
return { exportByTreeGrid: /* @__PURE__ */ t(async (s) => {
|
|
322
|
-
if (r.current)
|
|
323
|
-
return;
|
|
324
|
-
r.current = !0, a(!0);
|
|
325
|
-
const i = H(e);
|
|
326
|
-
try {
|
|
327
|
-
return typeof s == "string" ? await V(i, { exportName: s, t: n }) : await V(i, {
|
|
328
|
-
...s,
|
|
329
|
-
t: n
|
|
330
|
-
});
|
|
331
|
-
} finally {
|
|
332
|
-
r.current = !1, a(!1);
|
|
333
|
-
}
|
|
334
|
-
}, "exportByTreeGrid"), isExporting: o };
|
|
335
|
-
}, "useTreeGridExcelExport");
|
|
336
|
-
export {
|
|
337
|
-
be as a,
|
|
338
|
-
ke as b,
|
|
339
|
-
Ee as c,
|
|
340
|
-
xe as d,
|
|
341
|
-
we as e,
|
|
342
|
-
ve as f,
|
|
343
|
-
Ce as g,
|
|
344
|
-
Ke as h,
|
|
345
|
-
R as i,
|
|
346
|
-
Oe as j,
|
|
347
|
-
Se as k,
|
|
348
|
-
Ve as l,
|
|
349
|
-
_e as m,
|
|
350
|
-
ue as n,
|
|
351
|
-
De as o,
|
|
352
|
-
Le as p,
|
|
353
|
-
Be as q,
|
|
354
|
-
Re as r,
|
|
355
|
-
Ae as s,
|
|
356
|
-
Ie as t,
|
|
357
|
-
Te as u,
|
|
358
|
-
Z as v
|
|
359
|
-
};
|
|
360
|
-
//# sourceMappingURL=useTreeGridExcelExport-BjyBdpz1.js.map
|