@owp/core 2.5.3 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/_virtual/index5.js +2 -2
- package/dist/components/OwpMrtTable/OwpMrtTable.js +250 -258
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpPageSkeleton/OwpPageSkeleton.js +4 -4
- package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js +166 -0
- package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js.map +1 -0
- package/dist/components/OwpTable/OwpDataTable.js +321 -327
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpFieldTable.js +102 -58
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +158 -174
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/defaultTableStyle.js +50 -0
- package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -0
- package/dist/components/OwpTable/internal/treeGridTableStyle.js +77 -0
- package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -0
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +200 -253
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +183 -124
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +462 -0
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -0
- package/dist/configs/defaultConfig.js +67 -44
- package/dist/configs/defaultConfig.js.map +1 -1
- package/dist/constants/gridTheme.js +60 -10
- package/dist/constants/gridTheme.js.map +1 -1
- package/dist/constants/tableTheme.js +16 -0
- package/dist/constants/tableTheme.js.map +1 -0
- package/dist/constants/treeGrid.js +44 -26
- package/dist/constants/treeGrid.js.map +1 -1
- package/dist/constants.js +21 -20
- package/dist/contexts/OwpAppProvider.js.map +1 -1
- package/dist/contexts/OwpUiProvider.js +59 -38
- package/dist/contexts/OwpUiProvider.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvas.js +492 -0
- package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +678 -0
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewColorField.js +301 -0
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewControls.js +306 -0
- package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -0
- package/dist/features/themePreview/components/themePreviewCanvas.icons.js +17 -0
- package/dist/features/themePreview/components/themePreviewCanvas.icons.js.map +1 -0
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js +296 -0
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -0
- package/dist/features/themePreview/configs/grid.js +45 -0
- package/dist/features/themePreview/configs/grid.js.map +1 -0
- package/dist/features/themePreview/configs/presets.js +1106 -0
- package/dist/features/themePreview/configs/presets.js.map +1 -0
- package/dist/features/themePreview/configs/previewStorage.js +93 -0
- package/dist/features/themePreview/configs/previewStorage.js.map +1 -0
- package/dist/features/themePreview/configs/settings.js +148 -0
- package/dist/features/themePreview/configs/settings.js.map +1 -0
- package/dist/features/themePreview/configs/snackbar.js +39 -0
- package/dist/features/themePreview/configs/snackbar.js.map +1 -0
- package/dist/features/themePreview/configs/surface.js +10 -0
- package/dist/features/themePreview/configs/surface.js.map +1 -0
- package/dist/features/themePreview/configs/table.js +30 -0
- package/dist/features/themePreview/configs/table.js.map +1 -0
- package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js +43 -0
- package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js.map +1 -0
- package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js +43 -0
- package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js.map +1 -0
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +429 -0
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -0
- package/dist/features/themePreview/hooks/useThemePreview.js +235 -0
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -0
- package/dist/features/themePreview/utils/color.js +79 -0
- package/dist/features/themePreview/utils/color.js.map +1 -0
- package/dist/features/themePreview/utils/themePreviewDefinitions.js +526 -0
- package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -0
- package/dist/features/themePreview/utils/themePreviewExport.js +111 -0
- package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -0
- package/dist/features/themePreview/utils/themePreviewSettings.js +211 -0
- package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -0
- package/dist/features/themePreview.js +75 -0
- package/dist/features/themePreview.js.map +1 -0
- package/dist/index.js +111 -110
- package/dist/layout/components/logo/Logo.js +49 -45
- package/dist/layout/components/logo/Logo.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/layout/components/toggles/ThemePreviewToggle.js +51 -0
- package/dist/layout/components/toggles/ThemePreviewToggle.js.map +1 -0
- package/dist/layout/components/toolbar/ToolbarLayout.js +13 -10
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/CheckCircleOutline.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/CheckCircleOutline.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DownloadOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DownloadOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ErrorOutline.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ErrorOutline.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/InfoOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/InfoOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/KeyboardArrowUpRounded.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/KeyboardArrowUpRounded.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/MenuRounded.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/MenuRounded.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/NotificationsNoneOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/NotificationsNoneOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/PaletteOutlined.js +25 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/PaletteOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestoreOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestoreOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SaveOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SaveOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SpaceDashboardOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SpaceDashboardOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UploadFileOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UploadFileOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/WarningAmberRounded.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/WarningAmberRounded.js.map +1 -0
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpSnackbarContent/OwpSnackbarContent.d.ts +2 -0
- package/dist/types/components/OwpTable/OwpTable.d.ts +3 -1
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +49 -0
- package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +105 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +2 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +11 -2
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +20 -0
- package/dist/types/configs/defaultConfig.d.ts +22 -0
- package/dist/types/constants/gridTheme.d.ts +58 -0
- package/dist/types/constants/tableTheme.d.ts +18 -0
- package/dist/types/constants/treeGrid.d.ts +5 -0
- package/dist/types/contexts/OwpAppProvider.d.ts +2 -0
- package/dist/types/features/themePreview/components/ThemePreviewCanvas.d.ts +8 -0
- package/dist/types/features/themePreview/components/ThemePreviewCanvasSections.d.ts +82 -0
- package/dist/types/features/themePreview/components/ThemePreviewColorField.d.ts +10 -0
- package/dist/types/features/themePreview/components/ThemePreviewControls.d.ts +18 -0
- package/dist/types/features/themePreview/components/index.d.ts +3 -0
- package/dist/types/features/themePreview/components/themePreviewCanvas.icons.d.ts +3 -0
- package/dist/types/features/themePreview/components/themePreviewCanvas.shared.d.ts +121 -0
- package/dist/types/features/themePreview/configs/grid.d.ts +41 -0
- package/dist/types/features/themePreview/configs/index.d.ts +7 -0
- package/dist/types/features/themePreview/configs/presets.d.ts +1153 -0
- package/dist/types/features/themePreview/configs/previewStorage.d.ts +34 -0
- package/dist/types/features/themePreview/configs/settings.d.ts +271 -0
- package/dist/types/features/themePreview/configs/snackbar.d.ts +43 -0
- package/dist/types/features/themePreview/configs/surface.d.ts +6 -0
- package/dist/types/features/themePreview/configs/table.d.ts +47 -0
- package/dist/types/features/themePreview/dialogs/ThemePreviewDialog.d.ts +3 -0
- package/dist/types/features/themePreview/dialogs/index.d.ts +1 -0
- package/dist/types/features/themePreview/hooks/index.d.ts +1 -0
- package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +60 -0
- package/dist/types/features/themePreview/index.d.ts +6 -0
- package/dist/types/features/themePreview/types/index.d.ts +1 -0
- package/dist/types/features/themePreview/types/themePreview.d.ts +44 -0
- package/dist/types/features/themePreview/utils/color.d.ts +14 -0
- package/dist/types/features/themePreview/utils/index.d.ts +4 -0
- package/dist/types/features/themePreview/utils/themePreviewDefinitions.d.ts +10 -0
- package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +1091 -0
- package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +54 -0
- package/dist/types/layout/components/toggles/ThemePreviewToggle.d.ts +5 -0
- package/dist/types/types/OwpGridThemeTypes.d.ts +34 -0
- package/dist/types/types/OwpSettingsTypes.d.ts +9 -0
- package/dist/types/types/OwpTableThemeTypes.d.ts +16 -0
- package/dist/types/types/index.d.ts +3 -2
- package/dist/types/utils/treeGridUtil.d.ts +1 -0
- package/dist/utils/exceljsBrowser.js +45 -48
- package/dist/utils/exceljsBrowser.js.map +1 -1
- package/dist/utils/treeGridUtil.js +66 -66
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/features/themePreview.d.ts +3 -0
- package/features/themePreview.js +1 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeGrid.js","sources":["../../src/constants/treeGrid.ts"],"sourcesContent":["const TREEGRID_DEFAULT_ASSET_BASE_PATH = '/assets/vendors/Grid';\nconst TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY = '__OWP_TREE_GRID_ASSET_BASE_PATH__';\nconst TREEGRID_FONT_PATH = 'Styles/Roboto-Light.ttf';\nlet cachedTreeGridFontFaceStyles: { '@font-face': Record<string, string> } | undefined;\nlet cachedTreeGridFontUrl: string | undefined;\n\nexport const TREEGRID_WARNING_CELL_COLOR = '#f44336';\nexport const TREEGRID_INPUT_CELL_COLOR = '#ffd6a8';\n\nexport const TREEGRID_CELL_HIGHLIGHT_CLASS = 'text-white text-xl font-semibold';\nexport const TREEGRID_CELL_HIGHLIGHT_COLOR = '#ff8904';\nexport const TREEGRID_FONT_FAMILY = 'RobotoLight';\nexport const TREEGRID_FONT_FAMILY_STACK = `${TREEGRID_FONT_FAMILY}, sans-serif`;\n\n/** TreeGrid 자산 base path 정규화 */\nconst normalizeTreeGridAssetBasePath = (assetBasePath: string) => {\n const trimmedPath = assetBasePath.trim();\n const normalizedPath = trimmedPath.startsWith('/') ? trimmedPath : `/${trimmedPath}`;\n\n return normalizedPath.replace(/\\/+$/, '');\n};\n\n/** TreeGrid 자산 base path 조회 */\nexport const getTreeGridAssetBasePath = () => {\n const runtimeWindow =\n typeof window === 'undefined'\n ? undefined\n : (window as Window & {\n [TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY]?: string;\n });\n const runtimeAssetBasePath = runtimeWindow?.[TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY];\n\n return normalizeTreeGridAssetBasePath(\n runtimeAssetBasePath || TREEGRID_DEFAULT_ASSET_BASE_PATH,\n );\n};\n\n/** TreeGrid 자산 URL 생성 */\nexport const resolveTreeGridAssetUrl = (assetPath: string) => {\n const normalizedAssetPath = assetPath.replace(/^\\/+/, '');\n\n return `${getTreeGridAssetBasePath()}/${normalizedAssetPath}`;\n};\n\n/** TreeGrid 다국어 리소스 URL 조회 */\nexport const getTreeGridTextResourceUrl = (languageId: string) => {\n return resolveTreeGridAssetUrl(languageId === 'kr' ? 'TextKR.xml' : 'TextEN.xml');\n};\n\n/** TreeGrid 폰트 face 스타일 조회 */\nexport const getTreeGridFontFaceStyles = () => {\n const fontUrl = resolveTreeGridAssetUrl(TREEGRID_FONT_PATH);\n\n if (cachedTreeGridFontFaceStyles && cachedTreeGridFontUrl === fontUrl) {\n return cachedTreeGridFontFaceStyles;\n }\n\n cachedTreeGridFontUrl = fontUrl;\n cachedTreeGridFontFaceStyles = {\n '@font-face': {\n fontFamily: TREEGRID_FONT_FAMILY,\n fontStyle: 'normal',\n fontWeight: 'normal',\n src: `url('${fontUrl}') format('truetype')`,\n },\n };\n\n return cachedTreeGridFontFaceStyles;\n};\n"],"names":["TREEGRID_DEFAULT_ASSET_BASE_PATH","TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY","TREEGRID_FONT_PATH","cachedTreeGridFontFaceStyles","cachedTreeGridFontUrl","TREEGRID_WARNING_CELL_COLOR","TREEGRID_INPUT_CELL_COLOR","TREEGRID_CELL_HIGHLIGHT_CLASS","TREEGRID_CELL_HIGHLIGHT_COLOR","TREEGRID_FONT_FAMILY","TREEGRID_FONT_FAMILY_STACK","normalizeTreeGridAssetBasePath","__name","assetBasePath","trimmedPath","getTreeGridAssetBasePath","runtimeWindow","runtimeAssetBasePath","resolveTreeGridAssetUrl","assetPath","normalizedAssetPath","getTreeGridTextResourceUrl","languageId","getTreeGridFontFaceStyles","fontUrl"],"mappings":";;AAAA,MAAMA,IAAmC,wBACnCC,IAAsC,qCACtCC,IAAqB;AAC3B,IAAIC,GACAC;AAEG,MAAMC,IAA8B,WAC9BC,IAA4B,WAE5BC,IAAgC,oCAChCC,IAAgC,WAChCC,IAAuB,eACvBC,IAA6B,GAAGD,CAAoB,
|
|
1
|
+
{"version":3,"file":"treeGrid.js","sources":["../../src/constants/treeGrid.ts"],"sourcesContent":["const TREEGRID_DEFAULT_ASSET_BASE_PATH = '/assets/vendors/Grid';\nconst TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY = '__OWP_TREE_GRID_ASSET_BASE_PATH__';\nconst TREEGRID_FONT_PATH = 'Styles/Roboto-Light.ttf';\nlet cachedTreeGridFontFaceStyles: { '@font-face': Record<string, string> } | undefined;\nlet cachedTreeGridFontUrl: string | undefined;\n\nexport const TREEGRID_WARNING_CELL_COLOR = '#f44336';\nexport const TREEGRID_INPUT_CELL_COLOR = '#ffd6a8';\n\nexport const TREEGRID_CELL_HIGHLIGHT_CLASS = 'text-white text-xl font-semibold';\nexport const TREEGRID_CELL_HIGHLIGHT_COLOR = '#ff8904';\nexport const TREEGRID_FONT_FAMILY = 'RobotoLight';\nexport const TREEGRID_FONT_FAMILY_STACK = `${TREEGRID_FONT_FAMILY}, sans-serif`;\nconst TREEGRID_HEX_COLOR_PATTERN = /^#?(?<hex>[0-9a-f]{3}|[0-9a-f]{6})$/i;\nconst TREEGRID_RGB_COLOR_PATTERN =\n /^rgba?\\(\\s*(?<r>\\d{1,3})\\s*,\\s*(?<g>\\d{1,3})\\s*,\\s*(?<b>\\d{1,3})(?:\\s*,\\s*(?<a>[\\d.]+))?\\s*\\)$/i;\n\n/** TreeGrid 자산 base path 정규화 */\nconst normalizeTreeGridAssetBasePath = (assetBasePath: string) => {\n const trimmedPath = assetBasePath.trim();\n const normalizedPath = trimmedPath.startsWith('/') ? trimmedPath : `/${trimmedPath}`;\n\n return normalizedPath.replace(/\\/+$/, '');\n};\n\n/** TreeGrid 자산 base path 조회 */\nexport const getTreeGridAssetBasePath = () => {\n const runtimeWindow =\n typeof window === 'undefined'\n ? undefined\n : (window as Window & {\n [TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY]?: string;\n });\n const runtimeAssetBasePath = runtimeWindow?.[TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY];\n\n return normalizeTreeGridAssetBasePath(\n runtimeAssetBasePath || TREEGRID_DEFAULT_ASSET_BASE_PATH,\n );\n};\n\n/** TreeGrid 자산 URL 생성 */\nexport const resolveTreeGridAssetUrl = (assetPath: string) => {\n const normalizedAssetPath = assetPath.replace(/^\\/+/, '');\n\n return `${getTreeGridAssetBasePath()}/${normalizedAssetPath}`;\n};\n\n/** TreeGrid 다국어 리소스 URL 조회 */\nexport const getTreeGridTextResourceUrl = (languageId: string) => {\n return resolveTreeGridAssetUrl(languageId === 'kr' ? 'TextKR.xml' : 'TextEN.xml');\n};\n\n/**\n * TreeGrid 색상 문자열 숫자 변환\n * @param color CSS 색상 문자열\n */\nexport const resolveTreeGridColorNumber = (color?: string | null) => {\n if (!color) {\n return undefined;\n }\n\n const trimmedColor = color.trim();\n const hexMatch = trimmedColor.match(TREEGRID_HEX_COLOR_PATTERN);\n\n if (hexMatch?.groups?.hex) {\n const normalizedHex =\n hexMatch.groups.hex.length === 3\n ? hexMatch.groups.hex\n .split('')\n .map((value) => `${value}${value}`)\n .join('')\n : hexMatch.groups.hex;\n\n return Number.parseInt(normalizedHex, 16);\n }\n\n const rgbMatch = trimmedColor.match(TREEGRID_RGB_COLOR_PATTERN);\n\n if (!rgbMatch?.groups) {\n return undefined;\n }\n\n const channels = [rgbMatch.groups.r, rgbMatch.groups.g, rgbMatch.groups.b].map((value) =>\n Number.parseInt(value, 10),\n );\n\n if (channels.some((value) => Number.isNaN(value) || value < 0 || value > 255)) {\n return undefined;\n }\n\n return (channels[0] << 16) + (channels[1] << 8) + channels[2];\n};\n\n/** TreeGrid 폰트 face 스타일 조회 */\nexport const getTreeGridFontFaceStyles = () => {\n const fontUrl = resolveTreeGridAssetUrl(TREEGRID_FONT_PATH);\n\n if (cachedTreeGridFontFaceStyles && cachedTreeGridFontUrl === fontUrl) {\n return cachedTreeGridFontFaceStyles;\n }\n\n cachedTreeGridFontUrl = fontUrl;\n cachedTreeGridFontFaceStyles = {\n '@font-face': {\n fontFamily: TREEGRID_FONT_FAMILY,\n fontStyle: 'normal',\n fontWeight: 'normal',\n src: `url('${fontUrl}') format('truetype')`,\n },\n };\n\n return cachedTreeGridFontFaceStyles;\n};\n"],"names":["TREEGRID_DEFAULT_ASSET_BASE_PATH","TREEGRID_ASSET_BASE_PATH_GLOBAL_KEY","TREEGRID_FONT_PATH","cachedTreeGridFontFaceStyles","cachedTreeGridFontUrl","TREEGRID_WARNING_CELL_COLOR","TREEGRID_INPUT_CELL_COLOR","TREEGRID_CELL_HIGHLIGHT_CLASS","TREEGRID_CELL_HIGHLIGHT_COLOR","TREEGRID_FONT_FAMILY","TREEGRID_FONT_FAMILY_STACK","TREEGRID_HEX_COLOR_PATTERN","TREEGRID_RGB_COLOR_PATTERN","normalizeTreeGridAssetBasePath","__name","assetBasePath","trimmedPath","getTreeGridAssetBasePath","runtimeWindow","runtimeAssetBasePath","resolveTreeGridAssetUrl","assetPath","normalizedAssetPath","getTreeGridTextResourceUrl","languageId","resolveTreeGridColorNumber","color","_a","trimmedColor","hexMatch","normalizedHex","value","rgbMatch","channels","getTreeGridFontFaceStyles","fontUrl"],"mappings":";;AAAA,MAAMA,IAAmC,wBACnCC,IAAsC,qCACtCC,IAAqB;AAC3B,IAAIC,GACAC;AAEG,MAAMC,IAA8B,WAC9BC,IAA4B,WAE5BC,IAAgC,oCAChCC,IAAgC,WAChCC,IAAuB,eACvBC,IAA6B,GAAGD,CAAoB,gBAC3DE,IAA6B,wCAC7BC,IACJ,mGAGIC,IAAiC,gBAAAC,EAAA,CAACC,MAA0B;AAChE,QAAMC,IAAcD,EAAc,KAAA;AAGlC,UAFuBC,EAAY,WAAW,GAAG,IAAIA,IAAc,IAAIA,CAAW,IAE5D,QAAQ,QAAQ,EAAE;AAC1C,GALuC,mCAQ1BC,IAA2B,gBAAAH,EAAA,MAAM;AAC5C,QAAMI,IACJ,OAAO,SAAW,MACd,SACC,QAGDC,IAAuBD,KAAA,gBAAAA,EAAgBjB;AAE7C,SAAOY;AAAA,IACLM,KAAwBnB;AAAA,EAAA;AAE5B,GAZwC,6BAe3BoB,IAA0B,gBAAAN,EAAA,CAACO,MAAsB;AAC5D,QAAMC,IAAsBD,EAAU,QAAQ,QAAQ,EAAE;AAExD,SAAO,GAAGJ,EAAA,CAA0B,IAAIK,CAAmB;AAC7D,GAJuC,4BAO1BC,IAA6B,gBAAAT,EAAA,CAACU,MAClCJ,EAAwBI,MAAe,OAAO,eAAe,YAAY,GADxC,+BAQ7BC,IAA6B,gBAAAX,EAAA,CAACY,MAA0B;AAxDrE,MAAAC;AAyDE,MAAI,CAACD;AACH;AAGF,QAAME,IAAeF,EAAM,KAAA,GACrBG,IAAWD,EAAa,MAAMjB,CAA0B;AAE9D,OAAIgB,IAAAE,KAAA,gBAAAA,EAAU,WAAV,QAAAF,EAAkB,KAAK;AACzB,UAAMG,IACJD,EAAS,OAAO,IAAI,WAAW,IAC3BA,EAAS,OAAO,IACb,MAAM,EAAE,EACR,IAAI,CAACE,MAAU,GAAGA,CAAK,GAAGA,CAAK,EAAE,EACjC,KAAK,EAAE,IACVF,EAAS,OAAO;AAEtB,WAAO,OAAO,SAASC,GAAe,EAAE;AAAA,EAC1C;AAEA,QAAME,IAAWJ,EAAa,MAAMhB,CAA0B;AAE9D,MAAI,EAACoB,KAAA,QAAAA,EAAU;AACb;AAGF,QAAMC,IAAW,CAACD,EAAS,OAAO,GAAGA,EAAS,OAAO,GAAGA,EAAS,OAAO,CAAC,EAAE;AAAA,IAAI,CAACD,MAC9E,OAAO,SAASA,GAAO,EAAE;AAAA,EAAA;AAG3B,MAAI,CAAAE,EAAS,KAAK,CAACF,MAAU,OAAO,MAAMA,CAAK,KAAKA,IAAQ,KAAKA,IAAQ,GAAG;AAI5E,YAAQE,EAAS,CAAC,KAAK,OAAOA,EAAS,CAAC,KAAK,KAAKA,EAAS,CAAC;AAC9D,GAnC0C,+BAsC7BC,IAA4B,gBAAApB,EAAA,MAAM;AAC7C,QAAMqB,IAAUf,EAAwBlB,CAAkB;AAE1D,SAAIC,KAAgCC,MAA0B+B,MAI9D/B,IAAwB+B,GACxBhC,IAA+B;AAAA,IAC7B,cAAc;AAAA,MACZ,YAAYM;AAAA,MACZ,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,KAAK,QAAQ0B,CAAO;AAAA,IAAA;AAAA,EACtB,IAGKhC;AACT,GAlByC;"}
|
package/dist/constants.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { DEFAULT_CELL_ALIGNMENT as L, DEFAULT_HEADER_FILL as T, DEFAULT_HEADER_FONT as
|
|
1
|
+
import { DEFAULT_CELL_ALIGNMENT as L, DEFAULT_HEADER_FILL as T, DEFAULT_HEADER_FONT as e, DEFAULT_THIN_BORDER as A, DEFAULT_VALUE_FONT as r, DEFAULT_WRAP_CELL_ALIGNMENT as R } from "./constants/excel.js";
|
|
2
2
|
import { FALLBACK_LANGUAGE_LIST as I } from "./constants/language.js";
|
|
3
|
-
import { CURRENT_LANGUAGE as
|
|
4
|
-
import { STORAGE_KEYS as
|
|
5
|
-
import { TREEGRID_CELL_HIGHLIGHT_CLASS as U, TREEGRID_CELL_HIGHLIGHT_COLOR as S, TREEGRID_FONT_FAMILY as
|
|
3
|
+
import { CURRENT_LANGUAGE as N, LOCAL_STORAGE_KEYS as o, STORAGE_ACCESS_TOKEN_KEY as F } from "./constants/localStorageKeys.js";
|
|
4
|
+
import { STORAGE_KEYS as D } from "./constants/storageKeys.js";
|
|
5
|
+
import { TREEGRID_CELL_HIGHLIGHT_CLASS as U, TREEGRID_CELL_HIGHLIGHT_COLOR as S, TREEGRID_FONT_FAMILY as s, TREEGRID_FONT_FAMILY_STACK as H, TREEGRID_INPUT_CELL_COLOR as l, TREEGRID_WARNING_CELL_COLOR as m, getTreeGridAssetBasePath as x, getTreeGridFontFaceStyles as K, getTreeGridTextResourceUrl as d, resolveTreeGridAssetUrl as f, resolveTreeGridColorNumber as i } from "./constants/treeGrid.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
N as CURRENT_LANGUAGE,
|
|
8
8
|
L as DEFAULT_CELL_ALIGNMENT,
|
|
9
9
|
T as DEFAULT_HEADER_FILL,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
e as DEFAULT_HEADER_FONT,
|
|
11
|
+
A as DEFAULT_THIN_BORDER,
|
|
12
|
+
r as DEFAULT_VALUE_FONT,
|
|
13
|
+
R as DEFAULT_WRAP_CELL_ALIGNMENT,
|
|
14
14
|
I as FALLBACK_LANGUAGE_LIST,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
o as LOCAL_STORAGE_KEYS,
|
|
16
|
+
F as STORAGE_ACCESS_TOKEN_KEY,
|
|
17
|
+
D as STORAGE_KEYS,
|
|
18
18
|
U as TREEGRID_CELL_HIGHLIGHT_CLASS,
|
|
19
19
|
S as TREEGRID_CELL_HIGHLIGHT_COLOR,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
s as TREEGRID_FONT_FAMILY,
|
|
21
|
+
H as TREEGRID_FONT_FAMILY_STACK,
|
|
22
|
+
l as TREEGRID_INPUT_CELL_COLOR,
|
|
23
|
+
m as TREEGRID_WARNING_CELL_COLOR,
|
|
24
|
+
x as getTreeGridAssetBasePath,
|
|
25
|
+
K as getTreeGridFontFaceStyles,
|
|
26
|
+
d as getTreeGridTextResourceUrl,
|
|
27
|
+
f as resolveTreeGridAssetUrl,
|
|
28
|
+
i as resolveTreeGridColorNumber
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpAppProvider.js","sources":["../../src/contexts/OwpAppProvider.tsx"],"sourcesContent":["import type { OwpSettingsConfigType, OwpThemesType } from '@/types/OwpSettingsTypes';\nimport type { OwpNavItemType } from '@/types/OwpNavigationTypes';\nimport { useStorage } from '@/hooks/useStorage';\nimport type { OwpLoadingProps } from '@/components/OwpLoading/OwpLoading';\nimport {\n CSSProperties,\n ComponentType,\n createContext,\n ReactNode,\n useContext,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport { PartialDeep } from 'type-fest';\n\n/**\n * Logo slot props\n */\nexport interface OwpLogoSlotProps {\n className?: string;\n style?: CSSProperties;\n}\n\nexport type OwpPageSkeletonItemType =\n | 'search-header'\n | 'table'\n | 'grid'\n | 'card'\n | 'chart'\n | 'stat';\n\nexport interface OwpPageSkeletonItem {\n type: OwpPageSkeletonItemType;\n colSpan?: number;\n rowSpan?: number;\n colStart?: number;\n rowStart?: number;\n}\n\nexport interface OwpPageSkeletonSpec {\n columns?: number;\n rowHeight?: number;\n fullscreen?: boolean;\n fillContentHeight?: boolean;\n items: OwpPageSkeletonItem[];\n}\n\nexport interface OwpRouteLoadingSlotProps extends OwpLoadingProps {\n pathname: string;\n isFirstRouteLoading: boolean;\n}\n\nexport interface OwpRouteLoadingConfig extends OwpLoadingProps {\n getSkeletonSpec?: (pathname: string) => OwpPageSkeletonSpec | undefined;\n /** Click-to-release test toggle. Default false */\n releaseOnClick?: boolean;\n}\n\nexport interface OwpAppConfigs {\n routesConfig: any;\n settingsConfig?: PartialDeep<OwpSettingsConfigType>;\n themesConfig?: PartialDeep<OwpThemesType>;\n navigationConfig: OwpNavItemType[];\n}\n\n/**\n * App slots\n */\nexport interface OwpAppSlots {\n logo?: ComponentType<OwpLogoSlotProps>;\n routeLoading?: ComponentType<OwpRouteLoadingSlotProps>;\n}\n\nexport interface OwpAppSlotProps {\n logo?: OwpLogoSlotProps;\n routeLoading?: Omit<\n Partial<OwpRouteLoadingSlotProps>,\n 'pathname' | 'isFirstRouteLoading'\n > &\n OwpRouteLoadingConfig;\n}\n\nexport interface OwpAppEnv {\n apiBaseUrl?: string;\n isAccessTokenGuardEnabled?: boolean;\n isAutoLogoutEnabled?: boolean;\n autoLogoutIdleTimeoutMs?: number;\n isBackendNavigationEnabled?: boolean;\n isErrorMessageEnabled?: boolean;\n isI18nEnabled?: boolean;\n isI18nLanguageSwitcherEnabled?: boolean;\n isNavigationActiveRouteRemountEnabled?: boolean;\n isPasswordChangeEnabled?: boolean;\n isRequestLogPayloadEnabled?: boolean;\n [key: string]: unknown;\n}\n\nexport interface OwpAppContextValue extends OwpAppConfigs {\n env?: OwpAppEnv;\n slots?: OwpAppSlots;\n slotProps?: OwpAppSlotProps;\n}\n\nexport const OwpAppContext = createContext<OwpAppContextValue | undefined>(undefined);\n\nexport interface OwpAppProviderProps {\n configs: OwpAppConfigs;\n slots?: OwpAppSlots;\n slotProps?: OwpAppSlotProps;\n children?: ReactNode;\n env?: OwpAppEnv;\n}\n\nexport const OwpAppProvider = ({\n configs,\n slots,\n slotProps,\n children,\n env,\n}: OwpAppProviderProps) => {\n const value = useRef<OwpAppContextValue>({ ...configs, env, slots, slotProps });\n const { setEnv } = useStorage();\n\n useLayoutEffect(() => {\n setEnv(env ?? {});\n }, [env, setEnv]);\n\n return <OwpAppContext.Provider value={value.current}>{children}</OwpAppContext.Provider>;\n};\n\nexport const useOwpAppContext = () => {\n const context = useContext(OwpAppContext);\n\n if (context === undefined) {\n throw new Error('useOwpAppContext must be used within a OwpAppProvider');\n }\n\n return context;\n};\n"],"names":["OwpAppContext","createContext","OwpAppProvider","__name","configs","slots","slotProps","children","env","value","useRef","setEnv","useStorage","useLayoutEffect","useOwpAppContext","context","useContext"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"OwpAppProvider.js","sources":["../../src/contexts/OwpAppProvider.tsx"],"sourcesContent":["import type { OwpSettingsConfigType, OwpThemesType } from '@/types/OwpSettingsTypes';\nimport type { OwpNavItemType } from '@/types/OwpNavigationTypes';\nimport { useStorage } from '@/hooks/useStorage';\nimport type { OwpLoadingProps } from '@/components/OwpLoading/OwpLoading';\nimport {\n CSSProperties,\n ComponentType,\n createContext,\n ReactNode,\n useContext,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport { PartialDeep } from 'type-fest';\n\n/**\n * Logo slot props\n */\nexport interface OwpLogoSlotProps {\n className?: string;\n style?: CSSProperties;\n}\n\nexport type OwpPageSkeletonItemType =\n | 'search-header'\n | 'table'\n | 'grid'\n | 'card'\n | 'chart'\n | 'stat';\n\nexport interface OwpPageSkeletonItem {\n type: OwpPageSkeletonItemType;\n colSpan?: number;\n rowSpan?: number;\n colStart?: number;\n rowStart?: number;\n}\n\nexport interface OwpPageSkeletonSpec {\n columns?: number;\n rowHeight?: number;\n fullscreen?: boolean;\n fillContentHeight?: boolean;\n items: OwpPageSkeletonItem[];\n}\n\nexport interface OwpRouteLoadingSlotProps extends OwpLoadingProps {\n pathname: string;\n isFirstRouteLoading: boolean;\n}\n\nexport interface OwpRouteLoadingConfig extends OwpLoadingProps {\n getSkeletonSpec?: (pathname: string) => OwpPageSkeletonSpec | undefined;\n /** Click-to-release test toggle. Default false */\n releaseOnClick?: boolean;\n}\n\nexport interface OwpAppConfigs {\n routesConfig: any;\n settingsConfig?: PartialDeep<OwpSettingsConfigType>;\n themesConfig?: PartialDeep<OwpThemesType>;\n navigationConfig: OwpNavItemType[];\n}\n\n/**\n * App slots\n */\nexport interface OwpAppSlots {\n logo?: ComponentType<OwpLogoSlotProps>;\n routeLoading?: ComponentType<OwpRouteLoadingSlotProps>;\n}\n\nexport interface OwpAppSlotProps {\n logo?: OwpLogoSlotProps;\n routeLoading?: Omit<\n Partial<OwpRouteLoadingSlotProps>,\n 'pathname' | 'isFirstRouteLoading'\n > &\n OwpRouteLoadingConfig;\n}\n\nexport interface OwpAppEnv {\n apiBaseUrl?: string;\n isAccessTokenGuardEnabled?: boolean;\n isAutoLogoutEnabled?: boolean;\n autoLogoutIdleTimeoutMs?: number;\n isBackendNavigationEnabled?: boolean;\n isErrorMessageEnabled?: boolean;\n isI18nEnabled?: boolean;\n isI18nLanguageSwitcherEnabled?: boolean;\n isNavigationActiveRouteRemountEnabled?: boolean;\n isPasswordChangeEnabled?: boolean;\n isRequestLogPayloadEnabled?: boolean;\n isThemePreviewEnabled?: boolean;\n themePreviewDialogLoader?: () => Promise<unknown>;\n [key: string]: unknown;\n}\n\nexport interface OwpAppContextValue extends OwpAppConfigs {\n env?: OwpAppEnv;\n slots?: OwpAppSlots;\n slotProps?: OwpAppSlotProps;\n}\n\nexport const OwpAppContext = createContext<OwpAppContextValue | undefined>(undefined);\n\nexport interface OwpAppProviderProps {\n configs: OwpAppConfigs;\n slots?: OwpAppSlots;\n slotProps?: OwpAppSlotProps;\n children?: ReactNode;\n env?: OwpAppEnv;\n}\n\nexport const OwpAppProvider = ({\n configs,\n slots,\n slotProps,\n children,\n env,\n}: OwpAppProviderProps) => {\n const value = useRef<OwpAppContextValue>({ ...configs, env, slots, slotProps });\n const { setEnv } = useStorage();\n\n useLayoutEffect(() => {\n setEnv(env ?? {});\n }, [env, setEnv]);\n\n return <OwpAppContext.Provider value={value.current}>{children}</OwpAppContext.Provider>;\n};\n\nexport const useOwpAppContext = () => {\n const context = useContext(OwpAppContext);\n\n if (context === undefined) {\n throw new Error('useOwpAppContext must be used within a OwpAppProvider');\n }\n\n return context;\n};\n"],"names":["OwpAppContext","createContext","OwpAppProvider","__name","configs","slots","slotProps","children","env","value","useRef","setEnv","useStorage","useLayoutEffect","useOwpAppContext","context","useContext"],"mappings":";;;;;AAyGO,MAAMA,IAAgBC,EAA8C,MAAS,GAUvEC,IAAiB,gBAAAC,EAAA,CAAC;AAAA,EAC7B,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,KAAAC;AACF,MAA2B;AACzB,QAAMC,IAAQC,EAA2B,EAAE,GAAGN,GAAS,KAAAI,GAAK,OAAAH,GAAO,WAAAC,GAAW,GACxE,EAAE,QAAAK,EAAA,IAAWC,EAAA;AAEnB,SAAAC,EAAgB,MAAM;AACpB,IAAAF,EAAOH,KAAO,EAAE;AAAA,EAClB,GAAG,CAACA,GAAKG,CAAM,CAAC,qBAERX,EAAc,UAAd,EAAuB,OAAOS,EAAM,SAAU,UAAAF,GAAS;AACjE,GAf8B,mBAiBjBO,IAAmB,gBAAAX,EAAA,MAAM;AACpC,QAAMY,IAAUC,EAAWhB,CAAa;AAExC,MAAIe,MAAY;AACd,UAAM,IAAI,MAAM,uDAAuD;AAGzE,SAAOA;AACT,GARgC;"}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as e, jsxs as
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var u = (n, l) => r(n, "name", { value: l, configurable: !0 });
|
|
3
|
+
import { jsx as e, jsxs as C } from "../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
4
|
import { OwpAutoLogoutDialog as d } from "../components/OwpAutoLogoutDialog/OwpAutoLogoutDialog.js";
|
|
5
|
+
import { OwpSnackbarContent as m } from "../components/OwpSnackbarContent/OwpSnackbarContent.js";
|
|
5
6
|
import { useAccessTokenGuard as h } from "../hooks/useAccessTokenGuard.js";
|
|
6
|
-
import { useGetCurrentLanguage as
|
|
7
|
-
import { useOwpTranslation as
|
|
8
|
-
import { useGetPageLockLoading as
|
|
9
|
-
import { getI18nextLanguageCode as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { DialogsProvider as
|
|
13
|
-
import { SnackbarProvider as
|
|
14
|
-
import { useEffect as
|
|
15
|
-
import { useOwpAppContext as
|
|
16
|
-
import { OwpPageLockLoading as
|
|
17
|
-
import { OwpLoading as
|
|
18
|
-
const
|
|
7
|
+
import { useGetCurrentLanguage as S } from "../hooks/useCurrentLanguage.js";
|
|
8
|
+
import { useOwpTranslation as w } from "../hooks/useOwpTranslation.js";
|
|
9
|
+
import { useGetPageLockLoading as O } from "../hooks/usePageLockLoading.js";
|
|
10
|
+
import { getI18nextLanguageCode as x } from "../utils/language.js";
|
|
11
|
+
import I from "../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Close.js";
|
|
12
|
+
import T from "@mui/material/IconButton";
|
|
13
|
+
import { DialogsProvider as A } from "@toolpad/core/useDialogs";
|
|
14
|
+
import { SnackbarProvider as y, closeSnackbar as z } from "notistack";
|
|
15
|
+
import { useEffect as D } from "react";
|
|
16
|
+
import { useOwpAppContext as E } from "./OwpAppProvider.js";
|
|
17
|
+
import { OwpPageLockLoading as G } from "../components/OwpPageLockLoading/OwpPageLockLoading.js";
|
|
18
|
+
import { OwpLoading as M } from "../components/OwpLoading/OwpLoading.js";
|
|
19
|
+
const j = {
|
|
20
|
+
default: m,
|
|
21
|
+
success: m,
|
|
22
|
+
info: m,
|
|
23
|
+
warning: m,
|
|
24
|
+
error: m
|
|
25
|
+
}, i = {
|
|
19
26
|
maxSnack: 5,
|
|
20
27
|
autoHideDuration: 3e3,
|
|
21
28
|
anchorOrigin: {
|
|
@@ -29,36 +36,50 @@ const n = {
|
|
|
29
36
|
classes: {
|
|
30
37
|
containerRoot: "bottom-0 right-0 mb-52 md:mb-68 mr-8 lg:mr-80"
|
|
31
38
|
},
|
|
32
|
-
|
|
39
|
+
Components: j,
|
|
40
|
+
action: /* @__PURE__ */ u((n) => /* @__PURE__ */ e(
|
|
41
|
+
T,
|
|
42
|
+
{
|
|
43
|
+
"aria-label": "close",
|
|
44
|
+
onClick: /* @__PURE__ */ u(() => z(n), "onClick"),
|
|
45
|
+
size: "small",
|
|
46
|
+
sx: { color: "inherit" },
|
|
47
|
+
children: /* @__PURE__ */ e(I, { fontSize: "small" })
|
|
48
|
+
}
|
|
49
|
+
), "action")
|
|
33
50
|
};
|
|
34
|
-
function
|
|
35
|
-
children:
|
|
36
|
-
dialogsProviderProps:
|
|
37
|
-
snackbarProviderProps:
|
|
51
|
+
function b({
|
|
52
|
+
children: n,
|
|
53
|
+
dialogsProviderProps: l,
|
|
54
|
+
snackbarProviderProps: t
|
|
38
55
|
}) {
|
|
39
|
-
const { env:
|
|
40
|
-
...
|
|
41
|
-
...
|
|
56
|
+
const { env: o } = E(), f = S(), { i18n: c } = w(), s = O(), a = h(), L = {
|
|
57
|
+
...i,
|
|
58
|
+
...t,
|
|
42
59
|
style: {
|
|
43
|
-
...
|
|
44
|
-
...
|
|
60
|
+
...i.style,
|
|
61
|
+
...t == null ? void 0 : t.style
|
|
45
62
|
},
|
|
46
63
|
classes: {
|
|
47
|
-
...
|
|
48
|
-
...
|
|
64
|
+
...i.classes,
|
|
65
|
+
...t == null ? void 0 : t.classes
|
|
49
66
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
Components: {
|
|
68
|
+
...i.Components,
|
|
69
|
+
...t == null ? void 0 : t.Components
|
|
70
|
+
},
|
|
71
|
+
action: (t == null ? void 0 : t.action) ?? i.action
|
|
72
|
+
}, g = Number(o == null ? void 0 : o.autoLogoutIdleTimeoutMs), p = Number.isFinite(g) ? g : void 0;
|
|
73
|
+
return D(() => {
|
|
74
|
+
o != null && o.isI18nEnabled && c.changeLanguage(x());
|
|
75
|
+
}, [f, o, c]), a ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(A, { ...l, children: /* @__PURE__ */ C(y, { ...L, children: [
|
|
76
|
+
n,
|
|
77
|
+
/* @__PURE__ */ e(G, { ...s }),
|
|
78
|
+
(o == null ? void 0 : o.isAutoLogoutEnabled) && /* @__PURE__ */ e(d, { timeout: p })
|
|
58
79
|
] }) });
|
|
59
80
|
}
|
|
60
|
-
|
|
81
|
+
u(b, "OwpUiProvider");
|
|
61
82
|
export {
|
|
62
|
-
|
|
83
|
+
b as OwpUiProvider
|
|
63
84
|
};
|
|
64
85
|
//# sourceMappingURL=OwpUiProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwpUiProvider.js","sources":["../../src/contexts/OwpUiProvider.tsx"],"sourcesContent":["import { OwpAutoLogoutDialog } from '@/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog';\nimport { OwpLoading } from '@/components/OwpLoading';\nimport { OwpPageLockLoading } from '@/components/OwpPageLockLoading';\nimport {\n useAccessTokenGuard,\n useGetCurrentLanguage,\n useGetPageLockLoading,\n useOwpTranslation,\n} from '@/hooks';\nimport { getI18nextLanguageCode } from '@/utils/language';\nimport CloseIcon from '@mui/icons-material/Close';\nimport IconButton from '@mui/material/IconButton';\nimport { DialogsProvider } from '@toolpad/core/useDialogs';\nimport { closeSnackbar, SnackbarKey, SnackbarProvider } from 'notistack';\nimport { ComponentProps, ReactNode, useEffect } from 'react';\nimport { useOwpAppContext } from './OwpAppProvider';\n\ntype OwpDialogsProviderProps = Omit<ComponentProps<typeof DialogsProvider>, 'children'>;\ntype OwpSnackbarProviderProps = Omit<ComponentProps<typeof SnackbarProvider>, 'children'>;\n\nexport interface OwpUiProviderProps {\n children?: ReactNode;\n dialogsProviderProps?: OwpDialogsProviderProps;\n snackbarProviderProps?: OwpSnackbarProviderProps;\n}\n\nconst defaultSnackbarProviderProps: OwpSnackbarProviderProps = {\n maxSnack: 5,\n autoHideDuration: 3000,\n anchorOrigin: {\n vertical: 'top',\n horizontal: 'center',\n },\n style: {\n fontSize: '1.25rem',\n lineHeight: '1.75rem',\n },\n classes: {\n containerRoot: 'bottom-0 right-0 mb-52 md:mb-68 mr-8 lg:mr-80',\n },\n action: (snackbarKey: SnackbarKey) => (\n <IconButton
|
|
1
|
+
{"version":3,"file":"OwpUiProvider.js","sources":["../../src/contexts/OwpUiProvider.tsx"],"sourcesContent":["import { OwpAutoLogoutDialog } from '@/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog';\nimport { OwpLoading } from '@/components/OwpLoading';\nimport { OwpPageLockLoading } from '@/components/OwpPageLockLoading';\nimport { OwpSnackbarContent } from '@/components/OwpSnackbarContent/OwpSnackbarContent';\nimport {\n useAccessTokenGuard,\n useGetCurrentLanguage,\n useGetPageLockLoading,\n useOwpTranslation,\n} from '@/hooks';\nimport { getI18nextLanguageCode } from '@/utils/language';\nimport CloseIcon from '@mui/icons-material/Close';\nimport IconButton from '@mui/material/IconButton';\nimport { DialogsProvider } from '@toolpad/core/useDialogs';\nimport { closeSnackbar, SnackbarKey, SnackbarProvider } from 'notistack';\nimport { ComponentProps, ReactNode, useEffect } from 'react';\nimport { useOwpAppContext } from './OwpAppProvider';\n\ntype OwpDialogsProviderProps = Omit<ComponentProps<typeof DialogsProvider>, 'children'>;\ntype OwpSnackbarProviderProps = Omit<ComponentProps<typeof SnackbarProvider>, 'children'>;\n\nconst defaultSnackbarComponents = {\n default: OwpSnackbarContent,\n success: OwpSnackbarContent,\n info: OwpSnackbarContent,\n warning: OwpSnackbarContent,\n error: OwpSnackbarContent,\n} satisfies NonNullable<OwpSnackbarProviderProps['Components']>;\n\nexport interface OwpUiProviderProps {\n children?: ReactNode;\n dialogsProviderProps?: OwpDialogsProviderProps;\n snackbarProviderProps?: OwpSnackbarProviderProps;\n}\n\nconst defaultSnackbarProviderProps: OwpSnackbarProviderProps = {\n maxSnack: 5,\n autoHideDuration: 3000,\n anchorOrigin: {\n vertical: 'top',\n horizontal: 'center',\n },\n style: {\n fontSize: '1.25rem',\n lineHeight: '1.75rem',\n },\n classes: {\n containerRoot: 'bottom-0 right-0 mb-52 md:mb-68 mr-8 lg:mr-80',\n },\n Components: defaultSnackbarComponents,\n action: (snackbarKey: SnackbarKey) => (\n <IconButton\n aria-label=\"close\"\n onClick={() => closeSnackbar(snackbarKey)}\n size=\"small\"\n sx={{ color: 'inherit' }}\n >\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n ),\n};\n\n/**\n * Dialog, snackbar provider composition\n * @param dialogsProviderProps DialogsProvider 옵션\n * @param snackbarProviderProps SnackbarProvider 옵션\n */\nexport function OwpUiProvider({\n children,\n dialogsProviderProps,\n snackbarProviderProps,\n}: OwpUiProviderProps) {\n const { env } = useOwpAppContext();\n const currentLanguage = useGetCurrentLanguage();\n const { i18n } = useOwpTranslation();\n const pageLockLoadingProps = useGetPageLockLoading();\n const shouldRedirectToLogin = useAccessTokenGuard();\n const resolvedSnackbarProviderProps: OwpSnackbarProviderProps = {\n ...defaultSnackbarProviderProps,\n ...snackbarProviderProps,\n style: {\n ...defaultSnackbarProviderProps.style,\n ...snackbarProviderProps?.style,\n },\n classes: {\n ...defaultSnackbarProviderProps.classes,\n ...snackbarProviderProps?.classes,\n },\n Components: {\n ...defaultSnackbarProviderProps.Components,\n ...snackbarProviderProps?.Components,\n },\n action: snackbarProviderProps?.action ?? defaultSnackbarProviderProps.action,\n };\n const resolvedAutoLogoutIdleTimeoutMs = Number(env?.autoLogoutIdleTimeoutMs);\n const autoLogoutIdleTimeoutMs = Number.isFinite(resolvedAutoLogoutIdleTimeoutMs)\n ? resolvedAutoLogoutIdleTimeoutMs\n : undefined;\n\n useEffect(() => {\n if (!env?.isI18nEnabled) {\n return;\n }\n\n void i18n.changeLanguage(getI18nextLanguageCode());\n }, [currentLanguage, env, i18n]);\n\n if (shouldRedirectToLogin) {\n return <OwpLoading />;\n }\n\n return (\n <DialogsProvider {...dialogsProviderProps}>\n <SnackbarProvider {...resolvedSnackbarProviderProps}>\n {children}\n <OwpPageLockLoading {...pageLockLoadingProps} />\n {env?.isAutoLogoutEnabled && <OwpAutoLogoutDialog timeout={autoLogoutIdleTimeoutMs} />}\n </SnackbarProvider>\n </DialogsProvider>\n );\n}\n"],"names":["defaultSnackbarComponents","OwpSnackbarContent","defaultSnackbarProviderProps","__name","snackbarKey","jsx","IconButton","closeSnackbar","CloseIcon","OwpUiProvider","children","dialogsProviderProps","snackbarProviderProps","env","useOwpAppContext","currentLanguage","useGetCurrentLanguage","i18n","useOwpTranslation","pageLockLoadingProps","useGetPageLockLoading","shouldRedirectToLogin","useAccessTokenGuard","resolvedSnackbarProviderProps","resolvedAutoLogoutIdleTimeoutMs","autoLogoutIdleTimeoutMs","useEffect","getI18nextLanguageCode","OwpLoading","DialogsProvider","jsxs","SnackbarProvider","OwpPageLockLoading","OwpAutoLogoutDialog"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,IAA4B;AAAA,EAChC,SAASC;AAAA,EACT,SAASA;AAAA,EACT,MAAMA;AAAA,EACN,SAASA;AAAA,EACT,OAAOA;AACT,GAQMC,IAAyD;AAAA,EAC7D,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,OAAO;AAAA,IACL,UAAU;AAAA,IACV,YAAY;AAAA,EAAA;AAAA,EAEd,SAAS;AAAA,IACP,eAAe;AAAA,EAAA;AAAA,EAEjB,YAAYF;AAAA,EACZ,QAAQ,gBAAAG,EAAA,CAACC,MACP,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,SAAS,gBAAAH,EAAA,MAAMI,EAAcH,CAAW,GAA/B;AAAA,MACT,MAAK;AAAA,MACL,IAAI,EAAE,OAAO,UAAA;AAAA,MAEb,UAAA,gBAAAC,EAACG,GAAA,EAAU,UAAS,QAAA,CAAQ;AAAA,IAAA;AAAA,EAAA,GAPxB;AAUV;AAOO,SAASC,EAAc;AAAA,EAC5B,UAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,uBAAAC;AACF,GAAuB;AACrB,QAAM,EAAE,KAAAC,EAAA,IAAQC,EAAA,GACVC,IAAkBC,EAAA,GAClB,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAuBC,EAAA,GACvBC,IAAwBC,EAAA,GACxBC,IAA0D;AAAA,IAC9D,GAAGrB;AAAA,IACH,GAAGU;AAAA,IACH,OAAO;AAAA,MACL,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,SAAS;AAAA,MACP,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,YAAY;AAAA,MACV,GAAGV,EAA6B;AAAA,MAChC,GAAGU,KAAA,gBAAAA,EAAuB;AAAA,IAAA;AAAA,IAE5B,SAAQA,KAAA,gBAAAA,EAAuB,WAAUV,EAA6B;AAAA,EAAA,GAElEsB,IAAkC,OAAOX,KAAA,gBAAAA,EAAK,uBAAuB,GACrEY,IAA0B,OAAO,SAASD,CAA+B,IAC3EA,IACA;AAUJ,SARAE,EAAU,MAAM;AACd,IAAKb,KAAA,QAAAA,EAAK,iBAILI,EAAK,eAAeU,GAAwB;AAAA,EACnD,GAAG,CAACZ,GAAiBF,GAAKI,CAAI,CAAC,GAE3BI,sBACMO,GAAA,EAAW,sBAIlBC,GAAA,EAAiB,GAAGlB,GACnB,UAAA,gBAAAmB,EAACC,GAAA,EAAkB,GAAGR,GACnB,UAAA;AAAA,IAAAb;AAAA,IACD,gBAAAL,EAAC2B,GAAA,EAAoB,GAAGb,GAAsB;AAAA,KAC7CN,KAAA,gBAAAA,EAAK,wBAAuB,gBAAAR,EAAC4B,GAAA,EAAoB,SAASR,EAAA,CAAyB;AAAA,EAAA,EAAA,CACtF,EAAA,CACF;AAEJ;AArDgBtB,EAAAM,GAAA;"}
|