@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.
Files changed (188) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index12.js +2 -2
  3. package/dist/_virtual/index13.js +2 -2
  4. package/dist/_virtual/index14.js +2 -2
  5. package/dist/_virtual/index15.js +2 -2
  6. package/dist/_virtual/index16.js +4 -4
  7. package/dist/_virtual/index17.js +4 -4
  8. package/dist/_virtual/index18.js +4 -4
  9. package/dist/_virtual/index19.js +4 -4
  10. package/dist/_virtual/index5.js +2 -2
  11. package/dist/components/OwpMrtTable/OwpMrtTable.js +250 -258
  12. package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
  13. package/dist/components/OwpPageSkeleton/OwpPageSkeleton.js +4 -4
  14. package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js +166 -0
  15. package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js.map +1 -0
  16. package/dist/components/OwpTable/OwpDataTable.js +321 -327
  17. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  18. package/dist/components/OwpTable/OwpFieldTable.js +102 -58
  19. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
  20. package/dist/components/OwpTable/OwpTable.js +158 -174
  21. package/dist/components/OwpTable/OwpTable.js.map +1 -1
  22. package/dist/components/OwpTable/internal/defaultTableStyle.js +50 -0
  23. package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -0
  24. package/dist/components/OwpTable/internal/treeGridTableStyle.js +77 -0
  25. package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -0
  26. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +200 -253
  27. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  28. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +183 -124
  29. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  30. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +462 -0
  31. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -0
  32. package/dist/configs/defaultConfig.js +67 -44
  33. package/dist/configs/defaultConfig.js.map +1 -1
  34. package/dist/constants/gridTheme.js +60 -10
  35. package/dist/constants/gridTheme.js.map +1 -1
  36. package/dist/constants/tableTheme.js +16 -0
  37. package/dist/constants/tableTheme.js.map +1 -0
  38. package/dist/constants/treeGrid.js +44 -26
  39. package/dist/constants/treeGrid.js.map +1 -1
  40. package/dist/constants.js +21 -20
  41. package/dist/contexts/OwpAppProvider.js.map +1 -1
  42. package/dist/contexts/OwpUiProvider.js +59 -38
  43. package/dist/contexts/OwpUiProvider.js.map +1 -1
  44. package/dist/features/themePreview/components/ThemePreviewCanvas.js +492 -0
  45. package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -0
  46. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +678 -0
  47. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -0
  48. package/dist/features/themePreview/components/ThemePreviewColorField.js +301 -0
  49. package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -0
  50. package/dist/features/themePreview/components/ThemePreviewControls.js +306 -0
  51. package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -0
  52. package/dist/features/themePreview/components/themePreviewCanvas.icons.js +17 -0
  53. package/dist/features/themePreview/components/themePreviewCanvas.icons.js.map +1 -0
  54. package/dist/features/themePreview/components/themePreviewCanvas.shared.js +296 -0
  55. package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -0
  56. package/dist/features/themePreview/configs/grid.js +45 -0
  57. package/dist/features/themePreview/configs/grid.js.map +1 -0
  58. package/dist/features/themePreview/configs/presets.js +1106 -0
  59. package/dist/features/themePreview/configs/presets.js.map +1 -0
  60. package/dist/features/themePreview/configs/previewStorage.js +93 -0
  61. package/dist/features/themePreview/configs/previewStorage.js.map +1 -0
  62. package/dist/features/themePreview/configs/settings.js +148 -0
  63. package/dist/features/themePreview/configs/settings.js.map +1 -0
  64. package/dist/features/themePreview/configs/snackbar.js +39 -0
  65. package/dist/features/themePreview/configs/snackbar.js.map +1 -0
  66. package/dist/features/themePreview/configs/surface.js +10 -0
  67. package/dist/features/themePreview/configs/surface.js.map +1 -0
  68. package/dist/features/themePreview/configs/table.js +30 -0
  69. package/dist/features/themePreview/configs/table.js.map +1 -0
  70. package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js +43 -0
  71. package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js.map +1 -0
  72. package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js +43 -0
  73. package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js.map +1 -0
  74. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +429 -0
  75. package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -0
  76. package/dist/features/themePreview/hooks/useThemePreview.js +235 -0
  77. package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -0
  78. package/dist/features/themePreview/utils/color.js +79 -0
  79. package/dist/features/themePreview/utils/color.js.map +1 -0
  80. package/dist/features/themePreview/utils/themePreviewDefinitions.js +526 -0
  81. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -0
  82. package/dist/features/themePreview/utils/themePreviewExport.js +111 -0
  83. package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -0
  84. package/dist/features/themePreview/utils/themePreviewSettings.js +211 -0
  85. package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -0
  86. package/dist/features/themePreview.js +75 -0
  87. package/dist/features/themePreview.js.map +1 -0
  88. package/dist/index.js +111 -110
  89. package/dist/layout/components/logo/Logo.js +49 -45
  90. package/dist/layout/components/logo/Logo.js.map +1 -1
  91. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  92. package/dist/layout/components/toggles/ThemePreviewToggle.js +51 -0
  93. package/dist/layout/components/toggles/ThemePreviewToggle.js.map +1 -0
  94. package/dist/layout/components/toolbar/ToolbarLayout.js +13 -10
  95. package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. 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
  108. 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
  109. 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
  110. 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
  111. 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
  112. 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
  113. 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
  114. 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
  115. 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
  116. 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
  117. 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
  118. 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
  119. 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
  120. 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
  121. 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
  122. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  123. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  124. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  125. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  126. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  127. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  128. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  129. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  130. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  131. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  132. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  133. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  134. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
  135. 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
  136. package/dist/owp-app.css +1 -1
  137. package/dist/types/components/OwpSnackbarContent/OwpSnackbarContent.d.ts +2 -0
  138. package/dist/types/components/OwpTable/OwpTable.d.ts +3 -1
  139. package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +49 -0
  140. package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +105 -0
  141. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +2 -1
  142. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +11 -2
  143. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +20 -0
  144. package/dist/types/configs/defaultConfig.d.ts +22 -0
  145. package/dist/types/constants/gridTheme.d.ts +58 -0
  146. package/dist/types/constants/tableTheme.d.ts +18 -0
  147. package/dist/types/constants/treeGrid.d.ts +5 -0
  148. package/dist/types/contexts/OwpAppProvider.d.ts +2 -0
  149. package/dist/types/features/themePreview/components/ThemePreviewCanvas.d.ts +8 -0
  150. package/dist/types/features/themePreview/components/ThemePreviewCanvasSections.d.ts +82 -0
  151. package/dist/types/features/themePreview/components/ThemePreviewColorField.d.ts +10 -0
  152. package/dist/types/features/themePreview/components/ThemePreviewControls.d.ts +18 -0
  153. package/dist/types/features/themePreview/components/index.d.ts +3 -0
  154. package/dist/types/features/themePreview/components/themePreviewCanvas.icons.d.ts +3 -0
  155. package/dist/types/features/themePreview/components/themePreviewCanvas.shared.d.ts +121 -0
  156. package/dist/types/features/themePreview/configs/grid.d.ts +41 -0
  157. package/dist/types/features/themePreview/configs/index.d.ts +7 -0
  158. package/dist/types/features/themePreview/configs/presets.d.ts +1153 -0
  159. package/dist/types/features/themePreview/configs/previewStorage.d.ts +34 -0
  160. package/dist/types/features/themePreview/configs/settings.d.ts +271 -0
  161. package/dist/types/features/themePreview/configs/snackbar.d.ts +43 -0
  162. package/dist/types/features/themePreview/configs/surface.d.ts +6 -0
  163. package/dist/types/features/themePreview/configs/table.d.ts +47 -0
  164. package/dist/types/features/themePreview/dialogs/ThemePreviewDialog.d.ts +3 -0
  165. package/dist/types/features/themePreview/dialogs/index.d.ts +1 -0
  166. package/dist/types/features/themePreview/hooks/index.d.ts +1 -0
  167. package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +60 -0
  168. package/dist/types/features/themePreview/index.d.ts +6 -0
  169. package/dist/types/features/themePreview/types/index.d.ts +1 -0
  170. package/dist/types/features/themePreview/types/themePreview.d.ts +44 -0
  171. package/dist/types/features/themePreview/utils/color.d.ts +14 -0
  172. package/dist/types/features/themePreview/utils/index.d.ts +4 -0
  173. package/dist/types/features/themePreview/utils/themePreviewDefinitions.d.ts +10 -0
  174. package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +1091 -0
  175. package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +54 -0
  176. package/dist/types/layout/components/toggles/ThemePreviewToggle.d.ts +5 -0
  177. package/dist/types/types/OwpGridThemeTypes.d.ts +34 -0
  178. package/dist/types/types/OwpSettingsTypes.d.ts +9 -0
  179. package/dist/types/types/OwpTableThemeTypes.d.ts +16 -0
  180. package/dist/types/types/index.d.ts +3 -2
  181. package/dist/types/utils/treeGridUtil.d.ts +1 -0
  182. package/dist/utils/exceljsBrowser.js +45 -48
  183. package/dist/utils/exceljsBrowser.js.map +1 -1
  184. package/dist/utils/treeGridUtil.js +66 -66
  185. package/dist/utils/treeGridUtil.js.map +1 -1
  186. package/features/themePreview.d.ts +3 -0
  187. package/features/themePreview.js +1 -0
  188. 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,gBAG3DE,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,EAAgBf;AAE7C,SAAOU;AAAA,IACLM,KAAwBjB;AAAA,EAAA;AAE5B,GAZwC,6BAe3BkB,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,+BAK7BC,IAA4B,gBAAAX,EAAA,MAAM;AAC7C,QAAMY,IAAUN,EAAwBhB,CAAkB;AAE1D,SAAIC,KAAgCC,MAA0BoB,MAI9DpB,IAAwBoB,GACxBrB,IAA+B;AAAA,IAC7B,cAAc;AAAA,MACZ,YAAYM;AAAA,MACZ,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,KAAK,QAAQe,CAAO;AAAA,IAAA;AAAA,EACtB,IAGKrB;AACT,GAlByC;"}
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 A, DEFAULT_THIN_BORDER as R, DEFAULT_VALUE_FONT as e, DEFAULT_WRAP_CELL_ALIGNMENT as G } from "./constants/excel.js";
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 F, LOCAL_STORAGE_KEYS as N, STORAGE_ACCESS_TOKEN_KEY as O } from "./constants/localStorageKeys.js";
4
- import { STORAGE_KEYS as t } from "./constants/storageKeys.js";
5
- import { TREEGRID_CELL_HIGHLIGHT_CLASS as U, TREEGRID_CELL_HIGHLIGHT_COLOR as S, TREEGRID_FONT_FAMILY as H, TREEGRID_FONT_FAMILY_STACK as s, TREEGRID_INPUT_CELL_COLOR as x, TREEGRID_WARNING_CELL_COLOR as K, getTreeGridAssetBasePath as f, getTreeGridFontFaceStyles as m, getTreeGridTextResourceUrl as p, resolveTreeGridAssetUrl as Y } from "./constants/treeGrid.js";
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
- F as CURRENT_LANGUAGE,
7
+ N as CURRENT_LANGUAGE,
8
8
  L as DEFAULT_CELL_ALIGNMENT,
9
9
  T as DEFAULT_HEADER_FILL,
10
- A as DEFAULT_HEADER_FONT,
11
- R as DEFAULT_THIN_BORDER,
12
- e as DEFAULT_VALUE_FONT,
13
- G as DEFAULT_WRAP_CELL_ALIGNMENT,
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
- N as LOCAL_STORAGE_KEYS,
16
- O as STORAGE_ACCESS_TOKEN_KEY,
17
- t as STORAGE_KEYS,
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
- H as TREEGRID_FONT_FAMILY,
21
- s as TREEGRID_FONT_FAMILY_STACK,
22
- x as TREEGRID_INPUT_CELL_COLOR,
23
- K as TREEGRID_WARNING_CELL_COLOR,
24
- f as getTreeGridAssetBasePath,
25
- m as getTreeGridFontFaceStyles,
26
- p as getTreeGridTextResourceUrl,
27
- Y as resolveTreeGridAssetUrl
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":";;;;;AAuGO,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
+ {"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 L = Object.defineProperty;
2
- var m = (i, u) => L(i, "name", { value: u, configurable: !0 });
3
- import { jsx as e, jsxs as p } 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";
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 x } from "../hooks/useCurrentLanguage.js";
7
- import { useOwpTranslation as F } from "../hooks/useOwpTranslation.js";
8
- import { useGetPageLockLoading as I } from "../hooks/usePageLockLoading.js";
9
- import { getI18nextLanguageCode as O } from "../utils/language.js";
10
- import S 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";
11
- import w from "@mui/material/IconButton";
12
- import { DialogsProvider as T } from "@toolpad/core/useDialogs";
13
- import { SnackbarProvider as A, closeSnackbar as C } from "notistack";
14
- import { useEffect as y } from "react";
15
- import { useOwpAppContext as z } from "./OwpAppProvider.js";
16
- import { OwpPageLockLoading as D } from "../components/OwpPageLockLoading/OwpPageLockLoading.js";
17
- import { OwpLoading as E } from "../components/OwpLoading/OwpLoading.js";
18
- const n = {
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
- action: /* @__PURE__ */ m((i) => /* @__PURE__ */ e(w, { onClick: /* @__PURE__ */ m(() => C(i), "onClick"), children: /* @__PURE__ */ e(S, { fontSize: "small", sx: { color: "#FFFFFF" } }) }), "action")
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 Z({
35
- children: i,
36
- dialogsProviderProps: u,
37
- snackbarProviderProps: o
51
+ function b({
52
+ children: n,
53
+ dialogsProviderProps: l,
54
+ snackbarProviderProps: t
38
55
  }) {
39
- const { env: t } = z(), g = x(), { i18n: l } = F(), s = I(), f = h(), a = {
40
- ...n,
41
- ...o,
56
+ const { env: o } = E(), f = S(), { i18n: c } = w(), s = O(), a = h(), L = {
57
+ ...i,
58
+ ...t,
42
59
  style: {
43
- ...n.style,
44
- ...o == null ? void 0 : o.style
60
+ ...i.style,
61
+ ...t == null ? void 0 : t.style
45
62
  },
46
63
  classes: {
47
- ...n.classes,
48
- ...o == null ? void 0 : o.classes
64
+ ...i.classes,
65
+ ...t == null ? void 0 : t.classes
49
66
  },
50
- action: (o == null ? void 0 : o.action) ?? n.action
51
- }, c = Number(t == null ? void 0 : t.autoLogoutIdleTimeoutMs), r = Number.isFinite(c) ? c : void 0;
52
- return y(() => {
53
- t != null && t.isI18nEnabled && l.changeLanguage(O());
54
- }, [g, t, l]), f ? /* @__PURE__ */ e(E, {}) : /* @__PURE__ */ e(T, { ...u, children: /* @__PURE__ */ p(A, { ...a, children: [
55
- i,
56
- /* @__PURE__ */ e(D, { ...s }),
57
- (t == null ? void 0 : t.isAutoLogoutEnabled) && /* @__PURE__ */ e(d, { timeout: r })
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
- m(Z, "OwpUiProvider");
81
+ u(b, "OwpUiProvider");
61
82
  export {
62
- Z as OwpUiProvider
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 onClick={() => closeSnackbar(snackbarKey)}>\n <CloseIcon fontSize=\"small\" sx={{ color: '#FFFFFF' }} />\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 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":["defaultSnackbarProviderProps","__name","snackbarKey","IconButton","closeSnackbar","jsx","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":";;;;;;;;;;;;;;;;;AA0BA,MAAMA,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,QAAQ,gBAAAC,EAAA,CAACC,wBACNC,GAAA,EAAW,SAAS,gBAAAF,EAAA,MAAMG,EAAcF,CAAW,GAA/B,YACnB,UAAA,gBAAAG,EAACC,GAAA,EAAU,UAAS,SAAQ,IAAI,EAAE,OAAO,UAAA,GAAa,EAAA,CACxD,GAHM;AAKV;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,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,gBAAAH,EAACyB,GAAA,EAAoB,GAAGb,GAAsB;AAAA,KAC7CN,KAAA,gBAAAA,EAAK,wBAAuB,gBAAAN,EAAC0B,GAAA,EAAoB,SAASR,EAAA,CAAyB;AAAA,EAAA,EAAA,CACtF,EAAA,CACF;AAEJ;AAjDgBtB,EAAAM,GAAA;"}
1
+ {"version":3,"file":"OwpUiProvider.js","sources":["../../src/contexts/OwpUiProvider.tsx"],"sourcesContent":["import { OwpAutoLogoutDialog } from '@/components/OwpAutoLogoutDialog/OwpAutoLogoutDialog';\nimport { OwpLoading } from '@/components/OwpLoading';\nimport { OwpPageLockLoading } from '@/components/OwpPageLockLoading';\nimport { OwpSnackbarContent } from '@/components/OwpSnackbarContent/OwpSnackbarContent';\nimport {\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;"}