@owp/core 1.24.3 → 1.26.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/colors.d.ts +1 -0
- package/colors.js +1 -0
- package/context.d.ts +1 -0
- package/context.js +1 -0
- package/dist/OwpAppProvider-F48yHfyI.js +22 -0
- package/dist/OwpAppProvider-F48yHfyI.js.map +1 -0
- package/dist/OwpStoreProvider-CqHkIIUm.js +34 -0
- package/dist/OwpStoreProvider-CqHkIIUm.js.map +1 -0
- package/dist/{OwpUtils-DgBOzRu6.js → OwpUtils-DxEd-Pjo.js} +183 -193
- package/dist/OwpUtils-DxEd-Pjo.js.map +1 -0
- package/dist/{QuickPanel-GgHx7ox9.js → QuickPanel-DNAisp_R.js} +3 -3
- package/dist/{QuickPanel-GgHx7ox9.js.map → QuickPanel-DNAisp_R.js.map} +1 -1
- package/dist/colors.js +38 -0
- package/dist/colors.js.map +1 -0
- package/dist/constants.js +9 -8
- package/dist/constants.js.map +1 -1
- package/dist/context.js +28 -0
- package/dist/context.js.map +1 -0
- package/dist/emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js +1751 -0
- package/dist/emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js.map +1 -0
- package/dist/hooks.js +28 -27
- package/dist/hooks.js.map +1 -1
- package/dist/{index-DP0dZ8Y6.js → index-fDrAKBzK.js} +18170 -20980
- package/dist/index-fDrAKBzK.js.map +1 -0
- package/dist/index.js +127 -134
- package/dist/index.js.map +1 -1
- package/dist/isTypedArray-DPyC49cI.js +411 -0
- package/dist/isTypedArray-DPyC49cI.js.map +1 -0
- package/dist/lazyLoadedSlices-CsgnywgU.js +2815 -0
- package/dist/lazyLoadedSlices-CsgnywgU.js.map +1 -0
- package/dist/owp-app.css +1 -1
- package/dist/storageKeys-DRzte9LZ.js +15 -0
- package/dist/storageKeys-DRzte9LZ.js.map +1 -0
- package/dist/store.js +7 -0
- package/dist/store.js.map +1 -0
- package/dist/toUpper-BhzrnIm3.js +16 -0
- package/dist/toUpper-BhzrnIm3.js.map +1 -0
- package/dist/treeGrid-CjB04cBq.js +35 -0
- package/dist/treeGrid-CjB04cBq.js.map +1 -0
- package/dist/treeGridUtil-DaqTz5v3.js +771 -0
- package/dist/treeGridUtil-DaqTz5v3.js.map +1 -0
- package/dist/types/colors/index.d.ts +2 -0
- package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/types/components/OwpAutoLogoutDialog/index.d.ts +1 -0
- package/dist/types/components/OwpBarcodeInput/OwpBarcodeInput.d.ts +1 -0
- package/dist/types/components/OwpBarcodeInput/index.d.ts +1 -0
- package/dist/types/components/OwpButtonDelete/OwpButtonDelete.d.ts +12 -0
- package/dist/types/components/OwpButtonDelete/index.d.ts +1 -12
- package/dist/types/components/OwpButtonSave/OwpButtonSave.d.ts +12 -0
- package/dist/types/components/OwpButtonSave/index.d.ts +1 -12
- package/dist/types/components/OwpCommonDialog/OwpCommonDialog.d.ts +26 -0
- package/dist/types/components/OwpCommonDialog/index.d.ts +1 -26
- package/dist/types/components/OwpExportExcelButton/index.d.ts +1 -0
- package/dist/types/components/OwpFileUploadButton/index.d.ts +1 -0
- package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +9 -0
- package/dist/types/components/OwpMrtTable/index.d.ts +1 -9
- package/dist/types/components/OwpNumberField/OwpNumberField.d.ts +12 -0
- package/dist/types/components/OwpNumberField/index.d.ts +1 -12
- package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +22 -0
- package/dist/types/components/OwpOptionSelector/index.d.ts +1 -22
- package/dist/types/components/OwpPageContent/OwpPageContent.d.ts +17 -0
- package/dist/types/components/OwpPageContent/index.d.ts +1 -17
- package/dist/types/components/OwpPageLockLoading/OwpPageLockLoading.d.ts +11 -0
- package/dist/types/components/OwpPageLockLoading/index.d.ts +1 -11
- package/dist/types/components/OwpPageTitle/OwpPageTitle.d.ts +15 -0
- package/dist/types/components/OwpPageTitle/index.d.ts +1 -15
- package/dist/types/components/OwpPicker/index.d.ts +5 -0
- package/dist/types/components/OwpSearchFilter/OwpSearchFilter.d.ts +17 -0
- package/dist/types/components/OwpSearchFilter/index.d.ts +1 -17
- package/dist/types/components/OwpSection/OwpSection.d.ts +24 -0
- package/dist/types/components/OwpSection/index.d.ts +1 -24
- package/dist/types/components/OwpTable/index.d.ts +3 -0
- package/dist/types/components/OwpTextField/index.d.ts +1 -0
- package/dist/types/components/OwpTreeGridExcelButton/OwpTreeGridExcelButton.d.ts +12 -0
- package/dist/types/components/OwpTreeGridExcelButton/index.d.ts +1 -12
- package/dist/types/components/OwpTreeView/index.d.ts +1 -0
- package/dist/types/components/OwpYesNoSelector/OwpYesNoSelector.d.ts +16 -0
- package/dist/types/components/OwpYesNoSelector/index.d.ts +1 -16
- package/dist/types/components/OwpZoomImageSlider/index.d.ts +1 -0
- package/dist/types/components/shared-components/tabs/OwpTab.d.ts +1 -1
- package/dist/types/components/shared-components/tabs/OwpTabs.d.ts +1 -1
- package/dist/types/context/OwpCoreProvider.d.ts +21 -0
- package/dist/types/context/index.d.ts +2 -0
- package/dist/types/index.d.ts +2 -6
- package/dist/types/store/OwpStoreProvider.d.ts +12 -0
- package/dist/types/store/index.d.ts +3 -0
- package/dist/useStorage-B4ZrPct1.js +65 -0
- package/dist/useStorage-B4ZrPct1.js.map +1 -0
- package/dist/useTreeGridExcelExport-BjyBdpz1.js +360 -0
- package/dist/useTreeGridExcelExport-BjyBdpz1.js.map +1 -0
- package/dist/utils.js +98 -96
- package/dist/utils.js.map +1 -1
- package/package.json +7 -1
- package/store.d.ts +1 -0
- package/store.js +1 -0
- package/dist/OwpUtils-DgBOzRu6.js.map +0 -1
- package/dist/index-DP0dZ8Y6.js.map +0 -1
- package/dist/treeGrid-4QKOKXZw.js +0 -46
- package/dist/treeGrid-4QKOKXZw.js.map +0 -1
- package/dist/treeGridUtil-CGze1rYA.js +0 -1176
- package/dist/treeGridUtil-CGze1rYA.js.map +0 -1
- package/dist/types/components/layouts/index.d.ts +0 -8
- package/dist/types/components/layouts/layout1/components/RightSideLayout1.d.ts +0 -6
- package/dist/types/components/layouts/shared-components/DemoLayoutFooterContent.d.ts +0 -5
- package/dist/types/components/layouts/shared-components/DocumentationButton.d.ts +0 -8
- package/dist/types/components/layouts/shared-components/PoweredByLinks.d.ts +0 -5
- package/dist/types/components/layouts/shared-components/PurchaseButton.d.ts +0 -8
- package/dist/types/components/layouts/shared-components/UserNavbarHeader.d.ts +0 -5
- package/dist/useTreeGridExcelExport-B_a3dFaL.js +0 -2160
- package/dist/useTreeGridExcelExport-B_a3dFaL.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IconProps } from '@mui/material';
|
|
2
|
+
interface OwpSectionProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
headerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
disableTitleIcon?: boolean;
|
|
6
|
+
usePageTitle?: boolean;
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
|
+
leftSlot?: React.ReactNode;
|
|
10
|
+
centerSlot?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
iconSize?: IconProps['fontSize'];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* OwpSection 컴포넌트
|
|
16
|
+
* @param className CSS 클래스명
|
|
17
|
+
* @param title 제목
|
|
18
|
+
* @param disableTitleIcon disableTitleIcon 값
|
|
19
|
+
* @param headerProps headerProps props
|
|
20
|
+
* @param usePageTitle usePageTitle 값
|
|
21
|
+
* @param actions 액션 영역
|
|
22
|
+
*/
|
|
23
|
+
declare const OwpSection: ({ className, title, disableTitleIcon, headerProps, usePageTitle, actions, leftSlot, centerSlot, children, iconSize, }: OwpSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { OwpSection };
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface OwpSectionProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
headerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
5
|
-
disableTitleIcon?: boolean;
|
|
6
|
-
usePageTitle?: boolean;
|
|
7
|
-
title?: React.ReactNode;
|
|
8
|
-
actions?: React.ReactNode;
|
|
9
|
-
leftSlot?: React.ReactNode;
|
|
10
|
-
centerSlot?: React.ReactNode;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
iconSize?: IconProps['fontSize'];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* OwpSection 컴포넌트
|
|
16
|
-
* @param className CSS 클래스명
|
|
17
|
-
* @param title 제목
|
|
18
|
-
* @param disableTitleIcon disableTitleIcon 값
|
|
19
|
-
* @param headerProps headerProps props
|
|
20
|
-
* @param usePageTitle usePageTitle 값
|
|
21
|
-
* @param actions 액션 영역
|
|
22
|
-
*/
|
|
23
|
-
declare const OwpSection: ({ className, title, disableTitleIcon, headerProps, usePageTitle, actions, leftSlot, centerSlot, children, iconSize, }: OwpSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export { OwpSection };
|
|
1
|
+
export * from './OwpSection';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OwpTextMaskField';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ButtonProps } from '@mui/material';
|
|
2
|
+
export interface OwpTreeGridExcelButtonProps extends ButtonProps {
|
|
3
|
+
gridId: string;
|
|
4
|
+
exportName?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* TreeGrid 엑셀 내보내기 버튼
|
|
8
|
+
* @param gridId TreeGrid 인스턴스 ID
|
|
9
|
+
* @param exportName 다운로드 파일명
|
|
10
|
+
*/
|
|
11
|
+
declare const OwpTreeGridExcelButton: ({ gridId, exportName, children, loading, loadingPosition, onClick, ...buttonProps }: OwpTreeGridExcelButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { OwpTreeGridExcelButton };
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface OwpTreeGridExcelButtonProps extends ButtonProps {
|
|
3
|
-
gridId: string;
|
|
4
|
-
exportName?: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* TreeGrid 엑셀 내보내기 버튼
|
|
8
|
-
* @param gridId TreeGrid 인스턴스 ID
|
|
9
|
-
* @param exportName 다운로드 파일명
|
|
10
|
-
*/
|
|
11
|
-
declare const OwpTreeGridExcelButton: ({ gridId, exportName, children, loading, loadingPosition, onClick, ...buttonProps }: OwpTreeGridExcelButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { OwpTreeGridExcelButton };
|
|
1
|
+
export * from './OwpTreeGridExcelButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OwpSlotTreeView';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type OwpOptionSelectorProps } from '@/components/OwpOptionSelector';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export interface OwpYesNoSelectorProps extends Omit<OwpOptionSelectorProps, 'options'> {
|
|
4
|
+
yesLabel?: ReactNode;
|
|
5
|
+
noLabel?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Y/N 선택 Select
|
|
9
|
+
* @param label 입력 라벨
|
|
10
|
+
* @param disableAllValueItem 전체 옵션 노출 여부
|
|
11
|
+
* @param helperText 하단 안내 문구
|
|
12
|
+
* @param yesLabel Y 항목 라벨
|
|
13
|
+
* @param noLabel N 항목 라벨
|
|
14
|
+
*/
|
|
15
|
+
declare const OwpYesNoSelector: ({ yesLabel, noLabel, ...optionSelectorProps }: OwpYesNoSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { OwpYesNoSelector };
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
3
|
-
export interface OwpYesNoSelectorProps extends Omit<OwpOptionSelectorProps, 'options'> {
|
|
4
|
-
yesLabel?: ReactNode;
|
|
5
|
-
noLabel?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Y/N 선택 Select
|
|
9
|
-
* @param label 입력 라벨
|
|
10
|
-
* @param disableAllValueItem 전체 옵션 노출 여부
|
|
11
|
-
* @param helperText 하단 안내 문구
|
|
12
|
-
* @param yesLabel Y 항목 라벨
|
|
13
|
-
* @param noLabel N 항목 라벨
|
|
14
|
-
*/
|
|
15
|
-
declare const OwpYesNoSelector: ({ yesLabel, noLabel, ...optionSelectorProps }: OwpYesNoSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export { OwpYesNoSelector };
|
|
1
|
+
export * from './OwpYesNoSelector';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OwpZoomImageSlider';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
declare const OwpTab: import("@emotion/styled").StyledComponent<import("@mui/material").TabOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
5
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
6
|
-
}, "children" | "sx" | "icon" | "disabled" | "classes" | "style" | "
|
|
6
|
+
}, "children" | "sx" | "icon" | "disabled" | "classes" | "style" | "value" | "action" | "className" | "label" | "tabIndex" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "iconPosition" | "wrapped"> & {
|
|
7
7
|
component?: React.ElementType;
|
|
8
8
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
9
|
export { OwpTab };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
declare const OwpTabs: import("@emotion/styled").StyledComponent<import("@mui/material").TabsOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
5
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
6
|
-
}, "children" | "sx" | "classes" | "style" | "action" | "className" | "variant" | "aria-label" | "aria-labelledby" | "
|
|
6
|
+
}, "children" | "sx" | "classes" | "style" | "onChange" | "value" | "action" | "className" | "variant" | "aria-label" | "aria-labelledby" | "orientation" | "slots" | "slotProps" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar"> & {
|
|
7
7
|
component?: React.ElementType;
|
|
8
8
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
9
|
export { OwpTabs };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StyledEngineProvider } from '@mui/material/styles';
|
|
2
|
+
import { QueryClient, QueryClientConfig } from '@tanstack/react-query';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
import { OwpStoreProviderProps } from '../store/OwpStoreProvider';
|
|
5
|
+
import { OwpAppProviderProps } from './OwpAppProvider';
|
|
6
|
+
type OwpStyledEngineProviderProps = Omit<ComponentProps<typeof StyledEngineProvider>, 'children'>;
|
|
7
|
+
export interface OwpCoreProviderProps extends OwpAppProviderProps {
|
|
8
|
+
queryClient?: QueryClient;
|
|
9
|
+
queryClientConfig?: QueryClientConfig;
|
|
10
|
+
storePreloadedState?: OwpStoreProviderProps['preloadedState'];
|
|
11
|
+
styledEngineProviderProps?: OwpStyledEngineProviderProps;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* App, Redux, React Query provider composition
|
|
15
|
+
* @param queryClient 외부 QueryClient 인스턴스
|
|
16
|
+
* @param queryClientConfig QueryClient 생성 옵션
|
|
17
|
+
* @param storePreloadedState 초기 Redux 상태
|
|
18
|
+
* @param styledEngineProviderProps StyledEngineProvider 옵션
|
|
19
|
+
*/
|
|
20
|
+
export declare function OwpCoreProvider({ children, queryClient, queryClientConfig, storePreloadedState, styledEngineProviderProps, ...appProviderProps }: OwpCoreProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export * from './auth/authRoles';
|
|
2
|
-
export * from './colors/owpDark';
|
|
3
|
-
export * from './colors/skyBlue';
|
|
4
2
|
export { DialogsProvider } from '@toolpad/core/useDialogs';
|
|
5
|
-
export * from './context/OwpAppProvider';
|
|
6
|
-
export * from './store/store';
|
|
7
3
|
export * from './components/layouts/themeLayouts';
|
|
8
4
|
export * from './components/layouts/shared-components/OwpLanguageSwitcherSelect';
|
|
9
5
|
export * from './components/layouts/shared-components/OwpSettingsViewerDialog';
|
|
@@ -15,8 +11,8 @@ export * from './components/OwpCommonDialog';
|
|
|
15
11
|
export * from './components/OwpCommonCode';
|
|
16
12
|
export * from './components/OwpDialog';
|
|
17
13
|
export * from './components/OwpExportExcelButton/OwpExportExcelButton';
|
|
18
|
-
export
|
|
19
|
-
export
|
|
14
|
+
export { ErrorBoundary as OwpErrorBoundary } from './components/ErrorBoundary';
|
|
15
|
+
export { EventEmitter as OwpEventEmitter } from './components/EventEmitter';
|
|
20
16
|
export * from './components/OwpFileUploadButton/OwpFileUploadButton';
|
|
21
17
|
export * from './components/OwpLayout';
|
|
22
18
|
export * from './components/OwpLoading';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RootState } from './store';
|
|
3
|
+
export interface OwpStoreProviderProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
preloadedState?: Partial<RootState>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Owp Redux store provider
|
|
9
|
+
* @param children 하위 콘텐츠
|
|
10
|
+
* @param preloadedState 초기 Redux 상태
|
|
11
|
+
*/
|
|
12
|
+
export declare function OwpStoreProvider({ children, preloadedState }: OwpStoreProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;"}
|
|
@@ -0,0 +1,360 @@
|
|
|
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
|