@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":"OwpTreeGrid.js","sources":["../../../src/components/OwpTreeGrid/OwpTreeGrid.tsx"],"sourcesContent":["import { resolveOwpGridTheme } from '@/constants/gridTheme';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { useGetCurrentLanguage } from '@/hooks/useCurrentLanguage';\nimport {\n TREE_GRID_BODY_ROWS_CHANGED_EVENT,\n type TreeGridBodyRowsChangedEventDetail,\n} from '@/utils/treeGridBodyRowsEvent';\nimport { delay, isEmpty, isEqual, omit } from 'es-toolkit/compat';\n// Temporary TreeGrid perf instrumentation import. Remove with ./internal/utils/perf after profiling is finished.\nimport {\n countTreeGridPerf,\n getTreeGridPerfTimestamp,\n logTreeGridPerf,\n measureTreeGridPerf,\n} from './internal/utils/perf';\nimport {\n type CSSProperties,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport { useOwpTreeGridOverlayFrame } from './internal/hooks/useOwpTreeGridOverlayFrame';\nimport {\n bindTreeGridEvents,\n buildTreeGridInitializationOptions,\n getTreeGridBodyDataCount,\n hasTreeGridDisplayDataRows,\n replaceTreeGridBodyData,\n TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,\n type TreeGridEventHandlers,\n} from './internal/treeGridRuntime';\nimport { applyTreeGridLayoutToGrid } from './internal/treeGridLayout';\nimport { OwpTreeGridLoadingOverlay } from './internal/OwpTreeGridLoadingOverlay';\nimport { OwpTreeGridNoDataOverlay } from './internal/OwpTreeGridNoDataOverlay';\nimport {\n createTreeGridColumnEditRulesState,\n resolveTreeGridColumnEditRuleLookup,\n syncTreeGridColumnEditRules,\n} from './internal/treeGridColumnEditRules';\n\ntype TreeGridLayoutScalarValue = string | number;\ntype TreeGridNestedLayoutFields = Record<string, TreeGridLayoutScalarValue>;\ntype TreeGridLayoutFields = Record<string, TreeGridLayoutScalarValue | TreeGridNestedLayoutFields>;\ntype TreeGridSectionFields = Record<string, TreeGridLayoutScalarValue>;\ntype TreeGridThemeContainerStyle = CSSProperties & {\n '--owp-tree-grid-header-background-color'?: string;\n '--owp-tree-grid-header-color'?: string;\n '--owp-tree-grid-header-font-size'?: string;\n '--owp-tree-grid-header-font-weight'?: string;\n '--owp-tree-grid-cell-font-size'?: string;\n};\n\nconst TREE_GRID_STYLE_PREFIXES = [\n 'TS',\n 'TW',\n 'TB',\n 'TM',\n 'TT',\n 'CF',\n 'CL',\n 'CO',\n 'CG',\n 'CB',\n 'CQ',\n 'CE',\n 'CS',\n 'CR',\n 'CP',\n 'CC',\n] as const;\nconst TREE_GRID_THEME_WRAPPER_CLASS = 'owp-tree-grid-theme';\n\nconst toTreeGridCssValue = (value: number | string) => {\n return typeof value === 'number' ? `${value}px` : value;\n};\n\nconst createTreeGridSelectors = ({\n rowSuffix,\n suffixes,\n withChildren = false,\n}: {\n rowSuffix?: string;\n suffixes: readonly string[];\n withChildren?: boolean;\n}) => {\n return TREE_GRID_STYLE_PREFIXES.flatMap((prefix) => {\n return suffixes.flatMap((suffix) => {\n const wrapperSelector = `.${TREE_GRID_THEME_WRAPPER_CLASS}`;\n const rowSelector = rowSuffix ? ` .${prefix}${rowSuffix}` : '';\n const selector = `${wrapperSelector}${rowSelector} .${prefix}${suffix}`;\n\n return withChildren ? [selector, `${selector} *`] : [selector];\n });\n }).join(', ');\n};\n\nconst treeGridBodyTypographySelector = createTreeGridSelectors({\n suffixes: ['Main'],\n withChildren: true,\n});\n\nconst treeGridHeaderTypographySelector = createTreeGridSelectors({\n rowSuffix: 'HeaderRow',\n suffixes: ['CellHeader', 'CellIndex', 'GanttHeaderBase', 'LevelButton'],\n withChildren: true,\n});\n\nconst treeGridHeaderSurfaceSelector = createTreeGridSelectors({\n rowSuffix: 'HeaderRow',\n suffixes: [\n 'CellHeader',\n 'CellIndex',\n 'EditHeaderInput',\n 'EditHeaderTextarea',\n 'ColorFocusedCellHeader',\n 'ColorHoveredCellHeader',\n 'ColorHoveredCellIndex',\n 'HeaderFocus',\n 'HeaderDrag',\n ],\n});\n\nconst treeGridThemeStyles = {\n [treeGridBodyTypographySelector]: {\n fontSize: 'var(--owp-tree-grid-cell-font-size, 13px)',\n fontWeight: 'normal',\n lineHeight: '16px',\n },\n [treeGridHeaderTypographySelector]: {\n color: 'var(--owp-tree-grid-header-color, #ffffff) !important',\n fontSize: 'var(--owp-tree-grid-header-font-size, 14px) !important',\n fontWeight: 'var(--owp-tree-grid-header-font-weight, normal) !important',\n lineHeight: '16px',\n },\n [treeGridHeaderSurfaceSelector]: {\n backgroundColor: 'var(--owp-tree-grid-header-background-color, #586980) !important',\n color: 'var(--owp-tree-grid-header-color, #ffffff) !important',\n },\n};\n\nexport interface OwpTreeGridLayout {\n Header?: TreeGridLayoutFields;\n Toolbar?: TreeGridSectionFields;\n Foot?: TreeGridSectionFields;\n}\n\nexport type OwpTreeGridLayoutConfig = OwpTreeGridLayout;\nexport type THeader = OwpTreeGridLayoutConfig;\nexport type OwpTreeGridBodyData<T> = Record<string, never> | [] | undefined | T[];\nexport type OwpTreeGridData<T> = OwpTreeGridBodyData<T>;\nexport type TData<T> = OwpTreeGridBodyData<T>;\nexport type OwpTreeGridRowModel<T> = TRow & T;\nexport type OwpTreeGridSelectedRows<T> = OwpTreeGridRowModel<T>[];\nexport type OwpTreeGridColumnEditPreset = 'hourMinute';\n\nexport interface OwpTreeGridColumnEditRule {\n columns: readonly string[];\n preset: OwpTreeGridColumnEditPreset;\n}\n\ntype OwpTreeGridSelectHandler<T> = (selectedRows: OwpTreeGridSelectedRows<T>) => void;\ntype OwpTreeGridRowAddHandler<T> = (grid: TGrid, row: OwpTreeGridRowModel<T>) => void;\ntype OwpTreeGridRowDeleteHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n deleteType: number,\n) => void;\ntype OwpTreeGridRowUndeleteHandler<T> = (grid: TGrid, row: OwpTreeGridRowModel<T>) => void;\ntype OwpTreeGridButtonClickHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n col: string,\n event: Event,\n) => void;\ntype OwpTreeGridRowClickHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n col: string,\n x: number,\n y: number,\n event: Event,\n) => void;\ntype OwpTreeGridSaveHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n autoupdate: boolean | number,\n) => void;\ntype OwpTreeGridCellValue = unknown;\ntype OwpTreeGridAfterValueChangedHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n col: string,\n value: OwpTreeGridCellValue,\n) => void;\n\nexport interface OwpTreeGridProps<T> {\n id: string;\n className?: string;\n containerStyle?: CSSProperties;\n containerClassName?: string;\n layoutUrl?: string;\n dataUrl?: string;\n layoutOverrides?: OwpTreeGridLayoutConfig;\n data?: OwpTreeGridBodyData<T>;\n style?: CSSProperties;\n height?: string | number;\n width?: string | number;\n useDataUrl?: boolean;\n onSelect?: OwpTreeGridSelectHandler<T>;\n onRowAdd?: OwpTreeGridRowAddHandler<T>;\n onRowDelete?: OwpTreeGridRowDeleteHandler<T>;\n onRowUndelete?: OwpTreeGridRowUndeleteHandler<T>;\n onRowChange?: OwpTreeGridAfterValueChangedHandler<T>;\n onClickButton?: OwpTreeGridButtonClickHandler<T>;\n onReady?: (grid: TGrid) => void;\n onRowClick?: OwpTreeGridRowClickHandler<T>;\n onSave?: OwpTreeGridSaveHandler<T>;\n onAfterValueChanged?: OwpTreeGridAfterValueChangedHandler<T>;\n columnEditRules?: readonly OwpTreeGridColumnEditRule[];\n highlightEditableCells?: boolean;\n highlightChangedCells?: boolean;\n loading?: boolean;\n showLoading?: boolean;\n}\n\n/**\n * OwpTreeGrid 컴포넌트\n * @param id 식별자\n * @param containerStyle containerStyle 값\n * @param containerClassName containerClassName 값\n * @param className CSS 클래스명\n * @param style 스타일 객체\n * @param height height 값\n */\nconst OwpTreeGrid = <T,>({\n id = 'treeGridWrapper',\n containerStyle,\n containerClassName,\n className,\n style,\n height = '100%',\n width = '100%',\n layoutUrl,\n dataUrl,\n layoutOverrides,\n data,\n useDataUrl,\n onSelect,\n onRowClick,\n onRowAdd,\n onRowDelete,\n onRowUndelete,\n onRowChange,\n onClickButton,\n onSave,\n onReady,\n onAfterValueChanged,\n columnEditRules,\n highlightEditableCells = true,\n highlightChangedCells = true,\n loading,\n showLoading = true,\n}: OwpTreeGridProps<T>) => {\n const { t } = useOwpTranslation();\n const currentSettings = useGetCurrentSettings();\n const treeGridInstanceRef = useRef<TGrid>(null);\n const treeGridContainerRef = useRef<HTMLDivElement | null>(null);\n const treeGridInitStartedAtRef = useRef<number | null>(null);\n const bodyReloadStartedAtRef = useRef<number | null>(null);\n const latestLayoutOverridesRef = useRef<OwpTreeGridLayoutConfig | undefined>(layoutOverrides);\n const latestBodyDataPropRef = useRef<OwpTreeGridBodyData<T>>(data);\n const latestColumnEditRulesRef = useRef<readonly OwpTreeGridColumnEditRule[] | undefined>(\n columnEditRules,\n );\n const latestColumnEditRuleLookupRef = useRef(\n resolveTreeGridColumnEditRuleLookup(columnEditRules, {\n hourMinuteInvalidText: t('Message.시간은 HH:mm 형식으로 입력해주세요.'),\n }),\n );\n const latestEventHandlersRef = useRef<TreeGridEventHandlers<T>>({\n onSelect,\n onRowClick,\n onRowAdd,\n onRowDelete,\n onRowUndelete,\n onRowChange,\n onClickButton,\n onSave,\n onReady,\n onAfterValueChanged,\n });\n const stagedBodyDataPropRef = useRef<OwpTreeGridBodyData<T>>(undefined);\n const hasStagedBodyDataPropRef = useRef(false);\n const appliedLayoutOverridesRef = useRef<OwpTreeGridLayoutConfig | undefined>(undefined);\n const appliedBodyDataPropRef = useRef<OwpTreeGridBodyData<T>>(undefined);\n const appliedColumnEditRulesRef = useRef<readonly OwpTreeGridColumnEditRule[] | undefined>(\n undefined,\n );\n const columnEditRulesStateRef = useRef(createTreeGridColumnEditRulesState());\n const hasAppliedInitialLayoutRef = useRef(false);\n const bodyReloadSequenceRef = useRef(0);\n const bindingLoadingStartedAtRef = useRef<number | null>(null);\n const bindingLoadingHideTimeoutRef = useRef<number | undefined>(undefined);\n const bodyReloadStartTimeoutRef = useRef<number | undefined>(undefined);\n const highlightEditableCellsRef = useRef(highlightEditableCells);\n const highlightChangedCellsRef = useRef(highlightChangedCells);\n const [isTreeGridReady, setIsTreeGridReady] = useState(false);\n const [isBindingLoadingVisible, setIsBindingLoadingVisible] = useState(false);\n const [hasDisplayDataRows, setHasDisplayDataRows] = useState(false);\n const currentLanguage = useGetCurrentLanguage();\n const treeGridTheme = useMemo(\n () => resolveOwpGridTheme(currentSettings?.theme?.main?.grid),\n [currentSettings],\n );\n const currentLanguageIdRef = useRef(currentLanguage.id);\n const isPendingBodyReload =\n showLoading &&\n data !== undefined &&\n isTreeGridReady &&\n appliedBodyDataPropRef.current !== data;\n const isInternalLoadingVisible = showLoading && (isBindingLoadingVisible || isPendingBodyReload);\n const isLoadingOverlayVisible = (showLoading && loading === true) || isInternalLoadingVisible;\n const isNoDataVisible =\n !isLoadingOverlayVisible && data !== undefined && isEmpty(data) && !hasDisplayDataRows;\n\n const syncHasDisplayDataRows = (grid: TGrid | null) => {\n setHasDisplayDataRows(hasTreeGridDisplayDataRows(grid));\n };\n\n latestLayoutOverridesRef.current = layoutOverrides;\n latestBodyDataPropRef.current = data;\n latestColumnEditRulesRef.current = columnEditRules;\n latestColumnEditRuleLookupRef.current = resolveTreeGridColumnEditRuleLookup(columnEditRules, {\n hourMinuteInvalidText: t('Message.시간은 HH:mm 형식으로 입력해주세요.'),\n });\n highlightEditableCellsRef.current = highlightEditableCells;\n highlightChangedCellsRef.current = highlightChangedCells;\n latestEventHandlersRef.current = {\n onSelect,\n onRowClick,\n onRowAdd,\n onRowDelete,\n onRowUndelete,\n onRowChange,\n onClickButton,\n onSave,\n onReady,\n onAfterValueChanged,\n };\n\n const overlayFrame = useOwpTreeGridOverlayFrame({\n visible: isLoadingOverlayVisible || isNoDataVisible,\n containerRef: treeGridContainerRef,\n treeGridInstanceRef,\n debugId: id,\n });\n\n const clearBindingLoadingHideTimeout = () => {\n if (bindingLoadingHideTimeoutRef.current !== undefined) {\n window.clearTimeout(bindingLoadingHideTimeoutRef.current);\n bindingLoadingHideTimeoutRef.current = undefined;\n }\n };\n\n const clearBodyReloadStartTimeout = () => {\n if (bodyReloadStartTimeoutRef.current !== undefined) {\n window.clearTimeout(bodyReloadStartTimeoutRef.current);\n bodyReloadStartTimeoutRef.current = undefined;\n }\n };\n\n useEffect(() => {\n const handleBodyRowsChanged = (event: Event) => {\n const customEvent = event as CustomEvent<TreeGridBodyRowsChangedEventDetail>;\n\n if (customEvent.detail?.gridId !== id) {\n return;\n }\n\n setHasDisplayDataRows(hasTreeGridDisplayDataRows(treeGridInstanceRef.current));\n };\n\n window.addEventListener(TREE_GRID_BODY_ROWS_CHANGED_EVENT, handleBodyRowsChanged);\n\n return () => {\n window.removeEventListener(TREE_GRID_BODY_ROWS_CHANGED_EVENT, handleBodyRowsChanged);\n };\n }, [id]);\n\n useEffect(() => {\n if (!showLoading) {\n clearBodyReloadStartTimeout();\n clearBindingLoadingHideTimeout();\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n }\n }, [showLoading]);\n\n useEffect(() => {\n if (\n currentLanguage.id !== currentLanguageIdRef.current &&\n !isEmpty(treeGridInstanceRef.current)\n ) {\n treeGridInstanceRef.current?.Dispose();\n treeGridInstanceRef.current = null;\n currentLanguageIdRef.current = currentLanguage.id;\n }\n\n if (!isEmpty(treeGridInstanceRef.current)) {\n return;\n }\n\n bindTreeGridEvents({\n id,\n latestEventHandlersRef,\n highlightEditableCellsRef,\n highlightChangedCellsRef,\n treeGridInstanceRef,\n treeGridInitStartedAtRef,\n latestLayoutOverridesRef,\n appliedLayoutOverridesRef,\n appliedBodyDataPropRef,\n latestColumnEditRulesRef,\n latestColumnEditRuleLookupRef,\n appliedColumnEditRulesRef,\n columnEditRulesStateRef,\n hasAppliedInitialLayoutRef,\n syncHasDisplayDataRows,\n setIsTreeGridReady,\n });\n\n treeGridInitStartedAtRef.current = getTreeGridPerfTimestamp();\n countTreeGridPerf(id, 'init');\n logTreeGridPerf(id, 'TreeGrid init start', {\n useDataUrl: Boolean(useDataUrl),\n bodyRowCount: getTreeGridBodyDataCount(data),\n });\n\n window.TreeGrid(\n buildTreeGridInitializationOptions({\n id,\n layoutUrl,\n dataUrl,\n bodyData: data,\n useDataUrl,\n width,\n height,\n languageId: currentLanguage.id,\n }),\n id,\n id,\n );\n\n return () => {\n delay(() => {\n treeGridInstanceRef.current?.Dispose();\n }, 200);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useLayoutEffect(() => {\n const treeGrid = treeGridInstanceRef.current;\n const nextLayoutOverrides = latestLayoutOverridesRef.current;\n const nextBodyData = latestBodyDataPropRef.current;\n const nextColumnEditRules = latestColumnEditRulesRef.current;\n\n if (isEmpty(treeGrid) || !isTreeGridReady) {\n return;\n }\n\n const shouldApplyLayoutOverrides =\n appliedLayoutOverridesRef.current !== nextLayoutOverrides &&\n !isEqual(appliedLayoutOverridesRef.current, nextLayoutOverrides);\n const shouldApplyBodyData =\n appliedBodyDataPropRef.current !== nextBodyData &&\n (!hasStagedBodyDataPropRef.current || stagedBodyDataPropRef.current !== nextBodyData);\n const shouldApplyColumnEditRules =\n appliedColumnEditRulesRef.current !== nextColumnEditRules &&\n !isEqual(appliedColumnEditRulesRef.current, nextColumnEditRules);\n\n if (!shouldApplyLayoutOverrides && !shouldApplyBodyData && !shouldApplyColumnEditRules) {\n return;\n }\n\n if (shouldApplyLayoutOverrides) {\n const layoutApplyStartedAt = getTreeGridPerfTimestamp();\n\n applyTreeGridLayoutToGrid(treeGrid, nextLayoutOverrides, shouldApplyBodyData);\n appliedLayoutOverridesRef.current = nextLayoutOverrides;\n measureTreeGridPerf(id, 'apply layout', layoutApplyStartedAt, {\n disableBodyReload: Boolean(shouldApplyBodyData),\n });\n }\n\n if (shouldApplyBodyData) {\n const reloadSequence = bodyReloadSequenceRef.current + 1;\n const runBodyReload = () => {\n const bodyDataToApply = stagedBodyDataPropRef.current;\n\n bodyReloadStartTimeoutRef.current = undefined;\n bodyReloadStartedAtRef.current = getTreeGridPerfTimestamp();\n countTreeGridPerf(id, 'reload');\n logTreeGridPerf(id, 'ReloadBody start', {\n bodyRowCount: getTreeGridBodyDataCount(bodyDataToApply),\n });\n\n replaceTreeGridBodyData(treeGrid, bodyDataToApply, () => {\n if (bodyReloadSequenceRef.current !== reloadSequence) {\n return;\n }\n\n appliedBodyDataPropRef.current = bodyDataToApply;\n syncHasDisplayDataRows(treeGrid);\n measureTreeGridPerf(id, 'ReloadBody end', bodyReloadStartedAtRef.current, {\n bodyRowCount: getTreeGridBodyDataCount(bodyDataToApply),\n });\n bodyReloadStartedAtRef.current = null;\n\n if (stagedBodyDataPropRef.current === bodyDataToApply) {\n stagedBodyDataPropRef.current = undefined;\n hasStagedBodyDataPropRef.current = false;\n }\n\n const startedAt = bindingLoadingStartedAtRef.current;\n\n if (!showLoading || startedAt === null) {\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n return;\n }\n\n const remainingVisibleTime = Math.max(\n 0,\n TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS - (Date.now() - startedAt),\n );\n\n clearBindingLoadingHideTimeout();\n\n if (remainingVisibleTime === 0) {\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n return;\n }\n\n bindingLoadingHideTimeoutRef.current = window.setTimeout(() => {\n if (bodyReloadSequenceRef.current !== reloadSequence) {\n return;\n }\n\n bindingLoadingHideTimeoutRef.current = undefined;\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n }, remainingVisibleTime);\n });\n };\n\n bodyReloadSequenceRef.current = reloadSequence;\n stagedBodyDataPropRef.current = nextBodyData;\n hasStagedBodyDataPropRef.current = true;\n\n if (showLoading && nextBodyData !== undefined) {\n clearBodyReloadStartTimeout();\n clearBindingLoadingHideTimeout();\n bindingLoadingStartedAtRef.current = Date.now();\n setIsBindingLoadingVisible(true);\n bodyReloadStartTimeoutRef.current = window.setTimeout(() => {\n if (bodyReloadSequenceRef.current !== reloadSequence) {\n return;\n }\n\n runBodyReload();\n }, 0);\n } else {\n runBodyReload();\n }\n }\n\n if (shouldApplyColumnEditRules) {\n syncTreeGridColumnEditRules(\n treeGrid,\n latestColumnEditRuleLookupRef.current,\n columnEditRulesStateRef.current,\n );\n appliedColumnEditRulesRef.current = nextColumnEditRules;\n }\n }, [isTreeGridReady, layoutOverrides, data, columnEditRules, showLoading, id]);\n\n useEffect(() => {\n return () => {\n clearBodyReloadStartTimeout();\n clearBindingLoadingHideTimeout();\n };\n }, []);\n\n const resolvedContainerStyle: TreeGridThemeContainerStyle = {\n height,\n width,\n '--owp-tree-grid-header-background-color': treeGridTheme.header.backgroundColor,\n '--owp-tree-grid-header-color': treeGridTheme.header.color,\n '--owp-tree-grid-header-font-size': toTreeGridCssValue(treeGridTheme.header.fontSize),\n '--owp-tree-grid-header-font-weight': String(treeGridTheme.header.fontWeight),\n '--owp-tree-grid-cell-font-size': toTreeGridCssValue(treeGridTheme.cell.fontSize),\n ...containerStyle,\n };\n\n if (showLoading || isNoDataVisible) {\n resolvedContainerStyle.position =\n containerStyle?.position && containerStyle.position !== 'static'\n ? containerStyle.position\n : 'relative';\n resolvedContainerStyle.isolation = 'isolate';\n }\n\n return (\n <div\n ref={treeGridContainerRef}\n className={[TREE_GRID_THEME_WRAPPER_CLASS, containerClassName].filter(Boolean).join(' ')}\n style={resolvedContainerStyle}\n >\n <GlobalStyles styles={treeGridThemeStyles} />\n <div id={id} className={className} style={omit(style, ['height', 'width'])} />\n <OwpTreeGridNoDataOverlay\n visible={isNoDataVisible}\n message={t('Message.조회된 결과가 없습니다.')}\n overlayFrame={overlayFrame}\n />\n <OwpTreeGridLoadingOverlay visible={isLoadingOverlayVisible} overlayFrame={overlayFrame} />\n </div>\n );\n};\n\nexport { OwpTreeGrid };\n"],"names":["TREE_GRID_STYLE_PREFIXES","TREE_GRID_THEME_WRAPPER_CLASS","toTreeGridCssValue","__name","value","createTreeGridSelectors","rowSuffix","suffixes","withChildren","prefix","suffix","wrapperSelector","rowSelector","selector","treeGridBodyTypographySelector","treeGridHeaderTypographySelector","treeGridHeaderSurfaceSelector","treeGridThemeStyles","OwpTreeGrid","id","containerStyle","containerClassName","className","style","height","width","layoutUrl","dataUrl","layoutOverrides","data","useDataUrl","onSelect","onRowClick","onRowAdd","onRowDelete","onRowUndelete","onRowChange","onClickButton","onSave","onReady","onAfterValueChanged","columnEditRules","highlightEditableCells","highlightChangedCells","loading","showLoading","t","useOwpTranslation","currentSettings","useGetCurrentSettings","treeGridInstanceRef","useRef","treeGridContainerRef","treeGridInitStartedAtRef","bodyReloadStartedAtRef","latestLayoutOverridesRef","latestBodyDataPropRef","latestColumnEditRulesRef","latestColumnEditRuleLookupRef","resolveTreeGridColumnEditRuleLookup","latestEventHandlersRef","stagedBodyDataPropRef","hasStagedBodyDataPropRef","appliedLayoutOverridesRef","appliedBodyDataPropRef","appliedColumnEditRulesRef","columnEditRulesStateRef","createTreeGridColumnEditRulesState","hasAppliedInitialLayoutRef","bodyReloadSequenceRef","bindingLoadingStartedAtRef","bindingLoadingHideTimeoutRef","bodyReloadStartTimeoutRef","highlightEditableCellsRef","highlightChangedCellsRef","isTreeGridReady","setIsTreeGridReady","useState","isBindingLoadingVisible","setIsBindingLoadingVisible","hasDisplayDataRows","setHasDisplayDataRows","currentLanguage","useGetCurrentLanguage","treeGridTheme","useMemo","resolveOwpGridTheme","_b","_a","currentLanguageIdRef","isPendingBodyReload","isLoadingOverlayVisible","isNoDataVisible","isEmpty","syncHasDisplayDataRows","grid","hasTreeGridDisplayDataRows","overlayFrame","useOwpTreeGridOverlayFrame","clearBindingLoadingHideTimeout","clearBodyReloadStartTimeout","useEffect","handleBodyRowsChanged","event","TREE_GRID_BODY_ROWS_CHANGED_EVENT","bindTreeGridEvents","getTreeGridPerfTimestamp","countTreeGridPerf","logTreeGridPerf","getTreeGridBodyDataCount","buildTreeGridInitializationOptions","delay","useLayoutEffect","treeGrid","nextLayoutOverrides","nextBodyData","nextColumnEditRules","shouldApplyLayoutOverrides","isEqual","shouldApplyBodyData","shouldApplyColumnEditRules","layoutApplyStartedAt","applyTreeGridLayoutToGrid","measureTreeGridPerf","reloadSequence","runBodyReload","bodyDataToApply","replaceTreeGridBodyData","startedAt","remainingVisibleTime","TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS","syncTreeGridColumnEditRules","resolvedContainerStyle","jsxs","jsx","GlobalStyles","omit","OwpTreeGridNoDataOverlay","OwpTreeGridLoadingOverlay"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwDA,MAAMA,KAA2B;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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,IACA,OAAAC;AAAA,IACA,2CAA2C2D,EAAc,OAAO;AAAA,IAChE,gCAAgCA,EAAc,OAAO;AAAA,IACrD,oCAAoClF,GAAmBkF,EAAc,OAAO,QAAQ;AAAA,IACpF,sCAAsC,OAAOA,EAAc,OAAO,UAAU;AAAA,IAC5E,kCAAkClF,GAAmBkF,EAAc,KAAK,QAAQ;AAAA,IAChF,GAAGhE;AAAA,EAAA;AAGL,UAAIyB,KAAe+C,OACjBwC,EAAuB,WACrBhH,KAAA,QAAAA,EAAgB,YAAYA,EAAe,aAAa,WACpDA,EAAe,WACf,YACNgH,EAAuB,YAAY,YAInC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKjF;AAAA,MACL,WAAW,CAACnD,IAA+BoB,CAAkB,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACvF,OAAO+G;AAAA,MAEP,UAAA;AAAA,QAAA,gBAAAE,EAACC,IAAA,EAAa,QAAQtH,GAAA,CAAqB;AAAA,QAC3C,gBAAAqH,EAAC,OAAA,EAAI,IAAAnH,GAAQ,WAAAG,GAAsB,OAAOkH,GAAKjH,GAAO,CAAC,UAAU,OAAO,CAAC,EAAA,CAAG;AAAA,QAC5E,gBAAA+G;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS7C;AAAA,YACT,SAAS9C,EAAE,uBAAuB;AAAA,YAClC,cAAAmD;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAqC,EAACI,IAAA,EAA0B,SAAS/C,GAAyB,cAAAM,GAAA,CAA4B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG/F,GA5YoB;"}
|
|
1
|
+
{"version":3,"file":"OwpTreeGrid.js","sources":["../../../src/components/OwpTreeGrid/OwpTreeGrid.tsx"],"sourcesContent":["import { resolveOwpGridTheme } from '@/constants/gridTheme';\nimport {\n resolveTreeGridColorNumber,\n TREEGRID_CELL_HIGHLIGHT_COLOR,\n TREEGRID_INPUT_CELL_COLOR,\n} from '@/constants/treeGrid';\nimport { useGetCurrentSettings } from '@/hooks/useOwpSettings';\nimport { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport { useGetCurrentLanguage } from '@/hooks/useCurrentLanguage';\nimport {\n TREE_GRID_BODY_ROWS_CHANGED_EVENT,\n type TreeGridBodyRowsChangedEventDetail,\n} from '@/utils/treeGridBodyRowsEvent';\nimport { delay, isEmpty, isEqual, omit } from 'es-toolkit/compat';\n// Temporary TreeGrid perf instrumentation import. Remove with ./internal/utils/perf after profiling is finished.\nimport {\n countTreeGridPerf,\n getTreeGridPerfTimestamp,\n logTreeGridPerf,\n measureTreeGridPerf,\n} from './internal/utils/perf';\nimport {\n type CSSProperties,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport { useOwpTreeGridOverlayFrame } from './internal/hooks/useOwpTreeGridOverlayFrame';\nimport {\n bindTreeGridEvents,\n buildTreeGridInitializationOptions,\n getTreeGridBodyDataCount,\n hasTreeGridDisplayDataRows,\n replaceTreeGridBodyData,\n TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,\n type TreeGridEventHandlers,\n} from './internal/treeGridRuntime';\nimport { applyTreeGridLayoutToGrid } from './internal/treeGridLayout';\nimport { OwpTreeGridLoadingOverlay } from './internal/OwpTreeGridLoadingOverlay';\nimport { OwpTreeGridNoDataOverlay } from './internal/OwpTreeGridNoDataOverlay';\nimport {\n createTreeGridColumnEditRulesState,\n resolveTreeGridColumnEditRuleLookup,\n syncTreeGridColumnEditRules,\n} from './internal/treeGridColumnEditRules';\nimport {\n createTreeGridThemeContainerStyle,\n TREE_GRID_THEME_WRAPPER_CLASS,\n treeGridThemeStyles,\n type TreeGridThemeContainerStyle,\n} from './internal/treeGridTheme';\n\ntype TreeGridLayoutScalarValue = string | number;\ntype TreeGridNestedLayoutFields = Record<string, TreeGridLayoutScalarValue>;\ntype TreeGridLayoutFields = Record<string, TreeGridLayoutScalarValue | TreeGridNestedLayoutFields>;\ntype TreeGridSectionFields = Record<string, TreeGridLayoutScalarValue>;\n\nexport interface OwpTreeGridLayout {\n Header?: TreeGridLayoutFields;\n Toolbar?: TreeGridSectionFields;\n Foot?: TreeGridSectionFields;\n}\n\nexport type OwpTreeGridLayoutConfig = OwpTreeGridLayout;\nexport type THeader = OwpTreeGridLayoutConfig;\nexport type OwpTreeGridBodyData<T> = Record<string, never> | [] | undefined | T[];\nexport type OwpTreeGridData<T> = OwpTreeGridBodyData<T>;\nexport type TData<T> = OwpTreeGridBodyData<T>;\nexport type OwpTreeGridRowModel<T> = TRow & T;\nexport type OwpTreeGridSelectedRows<T> = OwpTreeGridRowModel<T>[];\nexport type OwpTreeGridColumnEditPreset = 'hourMinute';\n\nexport interface OwpTreeGridColumnEditRule {\n columns: readonly string[];\n preset: OwpTreeGridColumnEditPreset;\n}\n\ntype OwpTreeGridSelectHandler<T> = (selectedRows: OwpTreeGridSelectedRows<T>) => void;\ntype OwpTreeGridRowAddHandler<T> = (grid: TGrid, row: OwpTreeGridRowModel<T>) => void;\ntype OwpTreeGridRowDeleteHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n deleteType: number,\n) => void;\ntype OwpTreeGridRowUndeleteHandler<T> = (grid: TGrid, row: OwpTreeGridRowModel<T>) => void;\ntype OwpTreeGridButtonClickHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n col: string,\n event: Event,\n) => void;\ntype OwpTreeGridRowClickHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n col: string,\n x: number,\n y: number,\n event: Event,\n) => void;\ntype OwpTreeGridSaveHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n autoupdate: boolean | number,\n) => void;\ntype OwpTreeGridCellValue = unknown;\ntype OwpTreeGridAfterValueChangedHandler<T> = (\n grid: TGrid,\n row: OwpTreeGridRowModel<T>,\n col: string,\n value: OwpTreeGridCellValue,\n) => void;\n\nexport interface OwpTreeGridProps<T> {\n id: string;\n className?: string;\n containerStyle?: CSSProperties;\n containerClassName?: string;\n layoutUrl?: string;\n layoutData?: string;\n dataUrl?: string;\n layoutOverrides?: OwpTreeGridLayoutConfig;\n data?: OwpTreeGridBodyData<T>;\n style?: CSSProperties;\n height?: string | number;\n width?: string | number;\n useDataUrl?: boolean;\n onSelect?: OwpTreeGridSelectHandler<T>;\n onRowAdd?: OwpTreeGridRowAddHandler<T>;\n onRowDelete?: OwpTreeGridRowDeleteHandler<T>;\n onRowUndelete?: OwpTreeGridRowUndeleteHandler<T>;\n onRowChange?: OwpTreeGridAfterValueChangedHandler<T>;\n onClickButton?: OwpTreeGridButtonClickHandler<T>;\n onReady?: (grid: TGrid) => void;\n onRowClick?: OwpTreeGridRowClickHandler<T>;\n onSave?: OwpTreeGridSaveHandler<T>;\n onAfterValueChanged?: OwpTreeGridAfterValueChangedHandler<T>;\n columnEditRules?: readonly OwpTreeGridColumnEditRule[];\n highlightEditableCells?: boolean;\n highlightChangedCells?: boolean;\n loading?: boolean;\n showLoading?: boolean;\n}\n\n/**\n * OwpTreeGrid 컴포넌트\n * @param id 식별자\n * @param containerStyle containerStyle 값\n * @param containerClassName containerClassName 값\n * @param className CSS 클래스명\n * @param style 스타일 객체\n * @param height height 값\n */\nconst OwpTreeGrid = <T,>({\n id = 'treeGridWrapper',\n containerStyle,\n containerClassName,\n className,\n style,\n height = '100%',\n width = '100%',\n layoutUrl,\n layoutData,\n dataUrl,\n layoutOverrides,\n data,\n useDataUrl,\n onSelect,\n onRowClick,\n onRowAdd,\n onRowDelete,\n onRowUndelete,\n onRowChange,\n onClickButton,\n onSave,\n onReady,\n onAfterValueChanged,\n columnEditRules,\n highlightEditableCells = true,\n highlightChangedCells = true,\n loading,\n showLoading = true,\n}: OwpTreeGridProps<T>) => {\n const { t } = useOwpTranslation();\n const currentSettings = useGetCurrentSettings();\n const currentGridThemeConfig = currentSettings?.theme?.main?.grid;\n const treeGridInstanceRef = useRef<TGrid>(null);\n const treeGridContainerRef = useRef<HTMLDivElement | null>(null);\n const treeGridInitStartedAtRef = useRef<number | null>(null);\n const bodyReloadStartedAtRef = useRef<number | null>(null);\n const latestLayoutOverridesRef = useRef<OwpTreeGridLayoutConfig | undefined>(layoutOverrides);\n const latestBodyDataPropRef = useRef<OwpTreeGridBodyData<T>>(data);\n const latestColumnEditRulesRef = useRef<readonly OwpTreeGridColumnEditRule[] | undefined>(\n columnEditRules,\n );\n const latestColumnEditRuleLookupRef = useRef(\n resolveTreeGridColumnEditRuleLookup(columnEditRules, {\n hourMinuteInvalidText: t('Message.시간은 HH:mm 형식으로 입력해주세요.'),\n }),\n );\n const latestEventHandlersRef = useRef<TreeGridEventHandlers<T>>({\n onSelect,\n onRowClick,\n onRowAdd,\n onRowDelete,\n onRowUndelete,\n onRowChange,\n onClickButton,\n onSave,\n onReady,\n onAfterValueChanged,\n });\n const stagedBodyDataPropRef = useRef<OwpTreeGridBodyData<T>>(undefined);\n const hasStagedBodyDataPropRef = useRef(false);\n const appliedLayoutOverridesRef = useRef<OwpTreeGridLayoutConfig | undefined>(undefined);\n const appliedBodyDataPropRef = useRef<OwpTreeGridBodyData<T>>(undefined);\n const appliedColumnEditRulesRef = useRef<readonly OwpTreeGridColumnEditRule[] | undefined>(\n undefined,\n );\n const columnEditRulesStateRef = useRef(createTreeGridColumnEditRulesState());\n const hasAppliedInitialLayoutRef = useRef(false);\n const bodyReloadSequenceRef = useRef(0);\n const bindingLoadingStartedAtRef = useRef<number | null>(null);\n const bindingLoadingHideTimeoutRef = useRef<number | undefined>(undefined);\n const bodyReloadStartTimeoutRef = useRef<number | undefined>(undefined);\n const highlightEditableCellsRef = useRef(highlightEditableCells);\n const highlightChangedCellsRef = useRef(highlightChangedCells);\n const [isTreeGridReady, setIsTreeGridReady] = useState(false);\n const [isBindingLoadingVisible, setIsBindingLoadingVisible] = useState(false);\n const [hasDisplayDataRows, setHasDisplayDataRows] = useState(false);\n const currentLanguage = useGetCurrentLanguage();\n const treeGridTheme = useMemo(\n () => resolveOwpGridTheme(currentGridThemeConfig),\n [currentGridThemeConfig],\n );\n const editableCellBackgroundColorValueRef = useRef(\n resolveTreeGridColorNumber(treeGridTheme.editable.backgroundColor) ??\n resolveTreeGridColorNumber(TREEGRID_INPUT_CELL_COLOR),\n );\n const changedCellBackgroundColorRef = useRef(\n treeGridTheme.changed.backgroundColor ?? TREEGRID_CELL_HIGHLIGHT_COLOR,\n );\n const selectedCellBackgroundColorRef = useRef(treeGridTheme.state.selectedCellBackgroundColor);\n const hoverCellBackgroundColorRef = useRef(treeGridTheme.state.hoverCellBackgroundColor);\n const currentLanguageIdRef = useRef(currentLanguage.id);\n const isPendingBodyReload =\n showLoading &&\n data !== undefined &&\n isTreeGridReady &&\n appliedBodyDataPropRef.current !== data;\n const isInternalLoadingVisible = showLoading && (isBindingLoadingVisible || isPendingBodyReload);\n const isLoadingOverlayVisible = (showLoading && loading === true) || isInternalLoadingVisible;\n const isNoDataVisible =\n !isLoadingOverlayVisible && data !== undefined && isEmpty(data) && !hasDisplayDataRows;\n\n const syncHasDisplayDataRows = (grid: TGrid | null) => {\n setHasDisplayDataRows(hasTreeGridDisplayDataRows(grid));\n };\n\n latestLayoutOverridesRef.current = layoutOverrides;\n latestBodyDataPropRef.current = data;\n latestColumnEditRulesRef.current = columnEditRules;\n latestColumnEditRuleLookupRef.current = resolveTreeGridColumnEditRuleLookup(columnEditRules, {\n hourMinuteInvalidText: t('Message.시간은 HH:mm 형식으로 입력해주세요.'),\n });\n highlightEditableCellsRef.current = highlightEditableCells;\n highlightChangedCellsRef.current = highlightChangedCells;\n editableCellBackgroundColorValueRef.current =\n resolveTreeGridColorNumber(treeGridTheme.editable.backgroundColor) ??\n resolveTreeGridColorNumber(TREEGRID_INPUT_CELL_COLOR);\n changedCellBackgroundColorRef.current =\n treeGridTheme.changed.backgroundColor ?? TREEGRID_CELL_HIGHLIGHT_COLOR;\n selectedCellBackgroundColorRef.current = treeGridTheme.state.selectedCellBackgroundColor;\n hoverCellBackgroundColorRef.current = treeGridTheme.state.hoverCellBackgroundColor;\n latestEventHandlersRef.current = {\n onSelect,\n onRowClick,\n onRowAdd,\n onRowDelete,\n onRowUndelete,\n onRowChange,\n onClickButton,\n onSave,\n onReady,\n onAfterValueChanged,\n };\n\n const overlayFrame = useOwpTreeGridOverlayFrame({\n visible: isLoadingOverlayVisible || isNoDataVisible,\n containerRef: treeGridContainerRef,\n treeGridInstanceRef,\n debugId: id,\n });\n\n const clearBindingLoadingHideTimeout = () => {\n if (bindingLoadingHideTimeoutRef.current !== undefined) {\n window.clearTimeout(bindingLoadingHideTimeoutRef.current);\n bindingLoadingHideTimeoutRef.current = undefined;\n }\n };\n\n const clearBodyReloadStartTimeout = () => {\n if (bodyReloadStartTimeoutRef.current !== undefined) {\n window.clearTimeout(bodyReloadStartTimeoutRef.current);\n bodyReloadStartTimeoutRef.current = undefined;\n }\n };\n\n useEffect(() => {\n const handleBodyRowsChanged = (event: Event) => {\n const customEvent = event as CustomEvent<TreeGridBodyRowsChangedEventDetail>;\n\n if (customEvent.detail?.gridId !== id) {\n return;\n }\n\n setHasDisplayDataRows(hasTreeGridDisplayDataRows(treeGridInstanceRef.current));\n };\n\n window.addEventListener(TREE_GRID_BODY_ROWS_CHANGED_EVENT, handleBodyRowsChanged);\n\n return () => {\n window.removeEventListener(TREE_GRID_BODY_ROWS_CHANGED_EVENT, handleBodyRowsChanged);\n };\n }, [id]);\n\n useEffect(() => {\n if (!showLoading) {\n clearBodyReloadStartTimeout();\n clearBindingLoadingHideTimeout();\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n }\n }, [showLoading]);\n\n useEffect(() => {\n if (\n currentLanguage.id !== currentLanguageIdRef.current &&\n !isEmpty(treeGridInstanceRef.current)\n ) {\n treeGridInstanceRef.current?.Dispose();\n treeGridInstanceRef.current = null;\n currentLanguageIdRef.current = currentLanguage.id;\n }\n\n if (!isEmpty(treeGridInstanceRef.current)) {\n return;\n }\n\n bindTreeGridEvents({\n id,\n latestEventHandlersRef,\n highlightEditableCellsRef,\n highlightChangedCellsRef,\n editableCellBackgroundColorValueRef,\n changedCellBackgroundColorRef,\n selectedCellBackgroundColorRef,\n hoverCellBackgroundColorRef,\n treeGridInstanceRef,\n treeGridInitStartedAtRef,\n latestLayoutOverridesRef,\n appliedLayoutOverridesRef,\n appliedBodyDataPropRef,\n latestColumnEditRulesRef,\n latestColumnEditRuleLookupRef,\n appliedColumnEditRulesRef,\n columnEditRulesStateRef,\n hasAppliedInitialLayoutRef,\n syncHasDisplayDataRows,\n setIsTreeGridReady,\n });\n\n treeGridInitStartedAtRef.current = getTreeGridPerfTimestamp();\n countTreeGridPerf(id, 'init');\n logTreeGridPerf(id, 'TreeGrid init start', {\n useDataUrl: Boolean(useDataUrl),\n bodyRowCount: getTreeGridBodyDataCount(data),\n });\n\n window.TreeGrid(\n buildTreeGridInitializationOptions({\n id,\n layoutUrl,\n layoutData,\n dataUrl,\n bodyData: data,\n useDataUrl,\n width,\n height,\n languageId: currentLanguage.id,\n }),\n id,\n id,\n );\n\n return () => {\n delay(() => {\n treeGridInstanceRef.current?.Dispose();\n }, 200);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useLayoutEffect(() => {\n const treeGrid = treeGridInstanceRef.current;\n const nextLayoutOverrides = latestLayoutOverridesRef.current;\n const nextBodyData = latestBodyDataPropRef.current;\n const nextColumnEditRules = latestColumnEditRulesRef.current;\n\n if (isEmpty(treeGrid) || !isTreeGridReady) {\n return;\n }\n\n const shouldApplyLayoutOverrides =\n appliedLayoutOverridesRef.current !== nextLayoutOverrides &&\n !isEqual(appliedLayoutOverridesRef.current, nextLayoutOverrides);\n const shouldApplyBodyData =\n appliedBodyDataPropRef.current !== nextBodyData &&\n (!hasStagedBodyDataPropRef.current || stagedBodyDataPropRef.current !== nextBodyData);\n const shouldApplyColumnEditRules =\n appliedColumnEditRulesRef.current !== nextColumnEditRules &&\n !isEqual(appliedColumnEditRulesRef.current, nextColumnEditRules);\n\n if (!shouldApplyLayoutOverrides && !shouldApplyBodyData && !shouldApplyColumnEditRules) {\n return;\n }\n\n if (shouldApplyLayoutOverrides) {\n const layoutApplyStartedAt = getTreeGridPerfTimestamp();\n\n applyTreeGridLayoutToGrid(treeGrid, nextLayoutOverrides, shouldApplyBodyData);\n appliedLayoutOverridesRef.current = nextLayoutOverrides;\n measureTreeGridPerf(id, 'apply layout', layoutApplyStartedAt, {\n disableBodyReload: Boolean(shouldApplyBodyData),\n });\n }\n\n if (shouldApplyBodyData) {\n const reloadSequence = bodyReloadSequenceRef.current + 1;\n const runBodyReload = () => {\n const bodyDataToApply = stagedBodyDataPropRef.current;\n\n bodyReloadStartTimeoutRef.current = undefined;\n bodyReloadStartedAtRef.current = getTreeGridPerfTimestamp();\n countTreeGridPerf(id, 'reload');\n logTreeGridPerf(id, 'ReloadBody start', {\n bodyRowCount: getTreeGridBodyDataCount(bodyDataToApply),\n });\n\n replaceTreeGridBodyData(treeGrid, bodyDataToApply, () => {\n if (bodyReloadSequenceRef.current !== reloadSequence) {\n return;\n }\n\n appliedBodyDataPropRef.current = bodyDataToApply;\n syncHasDisplayDataRows(treeGrid);\n measureTreeGridPerf(id, 'ReloadBody end', bodyReloadStartedAtRef.current, {\n bodyRowCount: getTreeGridBodyDataCount(bodyDataToApply),\n });\n bodyReloadStartedAtRef.current = null;\n\n if (stagedBodyDataPropRef.current === bodyDataToApply) {\n stagedBodyDataPropRef.current = undefined;\n hasStagedBodyDataPropRef.current = false;\n }\n\n const startedAt = bindingLoadingStartedAtRef.current;\n\n if (!showLoading || startedAt === null) {\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n return;\n }\n\n const remainingVisibleTime = Math.max(\n 0,\n TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS - (Date.now() - startedAt),\n );\n\n clearBindingLoadingHideTimeout();\n\n if (remainingVisibleTime === 0) {\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n return;\n }\n\n bindingLoadingHideTimeoutRef.current = window.setTimeout(() => {\n if (bodyReloadSequenceRef.current !== reloadSequence) {\n return;\n }\n\n bindingLoadingHideTimeoutRef.current = undefined;\n bindingLoadingStartedAtRef.current = null;\n setIsBindingLoadingVisible(false);\n }, remainingVisibleTime);\n });\n };\n\n bodyReloadSequenceRef.current = reloadSequence;\n stagedBodyDataPropRef.current = nextBodyData;\n hasStagedBodyDataPropRef.current = true;\n\n if (showLoading && nextBodyData !== undefined) {\n clearBodyReloadStartTimeout();\n clearBindingLoadingHideTimeout();\n bindingLoadingStartedAtRef.current = Date.now();\n setIsBindingLoadingVisible(true);\n bodyReloadStartTimeoutRef.current = window.setTimeout(() => {\n if (bodyReloadSequenceRef.current !== reloadSequence) {\n return;\n }\n\n runBodyReload();\n }, 0);\n } else {\n runBodyReload();\n }\n }\n\n if (shouldApplyColumnEditRules) {\n syncTreeGridColumnEditRules(\n treeGrid,\n latestColumnEditRuleLookupRef.current,\n columnEditRulesStateRef.current,\n );\n appliedColumnEditRulesRef.current = nextColumnEditRules;\n }\n }, [isTreeGridReady, layoutOverrides, data, columnEditRules, showLoading, id]);\n\n useEffect(() => {\n return () => {\n clearBodyReloadStartTimeout();\n clearBindingLoadingHideTimeout();\n };\n }, []);\n\n const resolvedContainerStyle: TreeGridThemeContainerStyle = createTreeGridThemeContainerStyle({\n width,\n height,\n treeGridTheme,\n gridThemeConfig: currentGridThemeConfig,\n containerStyle,\n });\n\n if (showLoading || isNoDataVisible) {\n resolvedContainerStyle.position =\n containerStyle?.position && containerStyle.position !== 'static'\n ? containerStyle.position\n : 'relative';\n resolvedContainerStyle.isolation = 'isolate';\n }\n\n return (\n <div\n ref={treeGridContainerRef}\n className={[TREE_GRID_THEME_WRAPPER_CLASS, containerClassName].filter(Boolean).join(' ')}\n style={resolvedContainerStyle}\n >\n <GlobalStyles styles={treeGridThemeStyles} />\n <div id={id} className={className} style={omit(style, ['height', 'width'])} />\n <OwpTreeGridNoDataOverlay\n visible={isNoDataVisible}\n message={t('Message.조회된 결과가 없습니다.')}\n overlayFrame={overlayFrame}\n />\n <OwpTreeGridLoadingOverlay visible={isLoadingOverlayVisible} overlayFrame={overlayFrame} />\n </div>\n );\n};\n\nexport { OwpTreeGrid };\n"],"names":["OwpTreeGrid","__name","id","containerStyle","containerClassName","className","style","height","width","layoutUrl","layoutData","dataUrl","layoutOverrides","data","useDataUrl","onSelect","onRowClick","onRowAdd","onRowDelete","onRowUndelete","onRowChange","onClickButton","onSave","onReady","onAfterValueChanged","columnEditRules","highlightEditableCells","highlightChangedCells","loading","showLoading","t","useOwpTranslation","currentSettings","useGetCurrentSettings","currentGridThemeConfig","_b","_a","treeGridInstanceRef","useRef","treeGridContainerRef","treeGridInitStartedAtRef","bodyReloadStartedAtRef","latestLayoutOverridesRef","latestBodyDataPropRef","latestColumnEditRulesRef","latestColumnEditRuleLookupRef","resolveTreeGridColumnEditRuleLookup","latestEventHandlersRef","stagedBodyDataPropRef","hasStagedBodyDataPropRef","appliedLayoutOverridesRef","appliedBodyDataPropRef","appliedColumnEditRulesRef","columnEditRulesStateRef","createTreeGridColumnEditRulesState","hasAppliedInitialLayoutRef","bodyReloadSequenceRef","bindingLoadingStartedAtRef","bindingLoadingHideTimeoutRef","bodyReloadStartTimeoutRef","highlightEditableCellsRef","highlightChangedCellsRef","isTreeGridReady","setIsTreeGridReady","useState","isBindingLoadingVisible","setIsBindingLoadingVisible","hasDisplayDataRows","setHasDisplayDataRows","currentLanguage","useGetCurrentLanguage","treeGridTheme","useMemo","resolveOwpGridTheme","editableCellBackgroundColorValueRef","resolveTreeGridColorNumber","TREEGRID_INPUT_CELL_COLOR","changedCellBackgroundColorRef","TREEGRID_CELL_HIGHLIGHT_COLOR","selectedCellBackgroundColorRef","hoverCellBackgroundColorRef","currentLanguageIdRef","isPendingBodyReload","isLoadingOverlayVisible","isNoDataVisible","isEmpty","syncHasDisplayDataRows","grid","hasTreeGridDisplayDataRows","overlayFrame","useOwpTreeGridOverlayFrame","clearBindingLoadingHideTimeout","clearBodyReloadStartTimeout","useEffect","handleBodyRowsChanged","event","TREE_GRID_BODY_ROWS_CHANGED_EVENT","bindTreeGridEvents","getTreeGridPerfTimestamp","countTreeGridPerf","logTreeGridPerf","getTreeGridBodyDataCount","buildTreeGridInitializationOptions","delay","useLayoutEffect","treeGrid","nextLayoutOverrides","nextBodyData","nextColumnEditRules","shouldApplyLayoutOverrides","isEqual","shouldApplyBodyData","shouldApplyColumnEditRules","layoutApplyStartedAt","applyTreeGridLayoutToGrid","measureTreeGridPerf","reloadSequence","runBodyReload","bodyDataToApply","replaceTreeGridBodyData","startedAt","remainingVisibleTime","TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS","syncTreeGridColumnEditRules","resolvedContainerStyle","createTreeGridThemeContainerStyle","jsxs","TREE_GRID_THEME_WRAPPER_CLASS","jsx","GlobalStyles","treeGridThemeStyles","omit","OwpTreeGridNoDataOverlay","OwpTreeGridLoadingOverlay"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2JA,MAAMA,KAAc,gBAAAC,EAAA,CAAK;AAAA,EACvB,IAAAC,IAAK;AAAA,EACL,gBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,wBAAAC,KAAyB;AAAA,EACzB,uBAAAC,KA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AA/B;AAAA,EAAA,CACD;AAED,UAAI0B,KAAeuD,OACjBwC,EAAuB,WACrBzH,KAAA,QAAAA,EAAgB,YAAYA,EAAe,aAAa,WACpDA,EAAe,WACf,YACNyH,EAAuB,YAAY,YAInC,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKvF;AAAA,MACL,WAAW,CAACwF,IAA+B3H,EAAkB,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACvF,OAAOwH;AAAA,MAEP,UAAA;AAAA,QAAA,gBAAAI,EAACC,IAAA,EAAa,QAAQC,GAAA,CAAqB;AAAA,QAC3C,gBAAAF,EAAC,OAAA,EAAI,IAAA9H,GAAQ,WAAAG,IAAsB,OAAO8H,GAAK7H,IAAO,CAAC,UAAU,OAAO,CAAC,EAAA,CAAG;AAAA,QAC5E,gBAAA0H;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAAShD;AAAA,YACT,SAAStD,EAAE,uBAAuB;AAAA,YAClC,cAAA2D;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAuC,EAACK,IAAA,EAA0B,SAASlD,GAAyB,cAAAM,GAAA,CAA4B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG/F,GAhaoB;"}
|
|
@@ -1,190 +1,249 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { getTreeGridTextResourceUrl as
|
|
4
|
-
import { highlightTreeGridCellById as
|
|
5
|
-
import { enqueueSnackbar as
|
|
6
|
-
import { applyTreeGridLayoutToGrid as
|
|
7
|
-
import { resolveTreeGridColumnEditValue as
|
|
8
|
-
import { measureTreeGridPerf as
|
|
1
|
+
var W = Object.defineProperty;
|
|
2
|
+
var s = (e, t) => W(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { getTreeGridTextResourceUrl as P } from "../../../constants/treeGrid.js";
|
|
4
|
+
import { highlightTreeGridCellById as M } from "../../../utils/treeGridUtil.js";
|
|
5
|
+
import { enqueueSnackbar as j } from "notistack";
|
|
6
|
+
import { applyTreeGridLayoutToGrid as q } from "./treeGridLayout.js";
|
|
7
|
+
import { resolveTreeGridColumnEditValue as Y, resetTreeGridColumnEditRulesState as z, syncTreeGridColumnEditRules as K } from "./treeGridColumnEditRules.js";
|
|
8
|
+
import { measureTreeGridPerf as Q } from "./utils/perf.js";
|
|
9
9
|
import { debounce as O } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
|
|
10
|
-
import { get as
|
|
11
|
-
import { isEmpty as
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
import { get as J } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
|
|
11
|
+
import { isEmpty as X } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
|
|
12
|
+
const Be = 300, Z = [255, 255, 166], g = [240, 240, 240], H = [248, 248, 248], ee = [255, 255, 255], te = [255, 255, 254], ne = [242, 242, 242], U = /* @__PURE__ */ s((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), v = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ s((e) => {
|
|
13
|
+
if (!e || !e.startsWith("data:"))
|
|
14
|
+
return e;
|
|
15
|
+
const t = v.get(e);
|
|
16
|
+
if (t)
|
|
17
|
+
return t;
|
|
18
|
+
try {
|
|
19
|
+
const [n, c = ""] = e.split(",", 2), G = /^data:([^;]*)(;base64)?$/i.exec(n), a = (G == null ? void 0 : G[1]) || "application/octet-stream", R = G != null && G[2] ? atob(c) : decodeURIComponent(c), l = new Uint8Array(R.length);
|
|
20
|
+
for (let _ = 0; _ < R.length; _ += 1)
|
|
21
|
+
l[_] = R.charCodeAt(_);
|
|
22
|
+
const S = URL.createObjectURL(new Blob([l], { type: a }));
|
|
23
|
+
return v.set(e, S), S;
|
|
24
|
+
} catch {
|
|
25
|
+
return e;
|
|
26
|
+
}
|
|
27
|
+
}, "resolveTreeGridInlineUrl"), I = /* @__PURE__ */ s((e) => {
|
|
28
|
+
if (!e || U(e))
|
|
29
|
+
return re(e);
|
|
30
|
+
const t = e.indexOf("#"), [n, c] = t >= 0 ? [e.slice(0, t), e.slice(t)] : [e, ""], G = n.includes("?") ? "&" : "?";
|
|
31
|
+
return `${n}${G}noCache=${Date.now()}${c}`;
|
|
32
|
+
}, "appendNoCacheQuery"), oe = /* @__PURE__ */ s((e) => e ? U(e) || e.includes("assets") ? I(e) : I(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), ce = /* @__PURE__ */ s((e, t, n) => e ? { Url: oe(t) } : { Data: { Body: [X(n) ? [] : n] } }, "buildTreeGridDataSource"), he = /* @__PURE__ */ s(({
|
|
19
33
|
id: e,
|
|
20
34
|
layoutUrl: t,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
layoutData: n,
|
|
36
|
+
dataUrl: c,
|
|
37
|
+
bodyData: G,
|
|
38
|
+
useDataUrl: a,
|
|
39
|
+
width: R,
|
|
25
40
|
height: l,
|
|
26
|
-
languageId:
|
|
41
|
+
languageId: S
|
|
27
42
|
}) => ({
|
|
28
43
|
id: e,
|
|
29
|
-
Layout: { Url:
|
|
30
|
-
Data:
|
|
44
|
+
Layout: n ? { Data: n } : { Url: I(t ?? "") },
|
|
45
|
+
Data: ce(a, c, G),
|
|
31
46
|
Text: {
|
|
32
|
-
Url:
|
|
47
|
+
Url: P(S)
|
|
33
48
|
},
|
|
34
|
-
width:
|
|
49
|
+
width: R,
|
|
35
50
|
height: l,
|
|
36
51
|
Debug: "Error"
|
|
37
|
-
}), "buildTreeGridInitializationOptions"),
|
|
52
|
+
}), "buildTreeGridInitializationOptions"), A = /* @__PURE__ */ s((e) => J(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), ue = /* @__PURE__ */ s((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), ie = /* @__PURE__ */ s((e) => {
|
|
38
53
|
const t = e == null ? void 0 : e.Visible;
|
|
39
54
|
return !!e && t !== 0 && t !== !1 && t !== "0";
|
|
40
|
-
}, "isVisibleTreeGridRow"),
|
|
55
|
+
}, "isVisibleTreeGridRow"), se = /* @__PURE__ */ s((e) => {
|
|
41
56
|
const t = e == null ? void 0 : e.Added;
|
|
42
57
|
return !!e && t !== 0 && t !== !1 && t !== "0" && t !== void 0;
|
|
43
|
-
}, "isAddedTreeGridRow"),
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
}, "hasExplicitTreeGridCellColor"),
|
|
47
|
-
if (!(!t || !
|
|
48
|
-
return
|
|
49
|
-
}, "getEditableTreeGridCellDefaultColor"),
|
|
58
|
+
}, "isAddedTreeGridRow"), E = /* @__PURE__ */ s((e) => !e || e.Fixed === "Foot" || !ie(e) ? !1 : e.Kind === "Data" || se(e), "isDisplayTreeGridRow"), Ge = /* @__PURE__ */ s((e, t, n) => !t || !n || !E(t) ? !1 : e.CanEdit(t, n) === 1, "isEditableTreeGridCell"), fe = /* @__PURE__ */ s((e, t, n) => {
|
|
59
|
+
const c = e.GetAttribute(t, n, "Color");
|
|
60
|
+
return c != null && c !== "";
|
|
61
|
+
}, "hasExplicitTreeGridCellColor"), de = /* @__PURE__ */ s((e, t, n, c) => {
|
|
62
|
+
if (!(!t || c === void 0 || !Ge(e, t, n) || fe(e, t, n)))
|
|
63
|
+
return c;
|
|
64
|
+
}, "getEditableTreeGridCellDefaultColor"), m = /* @__PURE__ */ s((e, t, n, c) => e === c[0] && t === c[1] && n === c[2], "matchesTreeGridRgbColor"), Te = /* @__PURE__ */ s((e, t, n) => {
|
|
65
|
+
if (!t || !n || !E(t))
|
|
66
|
+
return !1;
|
|
67
|
+
const c = e.IsSelected(t, n);
|
|
68
|
+
return c !== 0 && c !== !1 && c !== void 0 && c !== null;
|
|
69
|
+
}, "isTreeGridSelectedCellState"), ae = /* @__PURE__ */ s((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 0, "isTreeGridReadonlyHoveredCellState"), Ce = /* @__PURE__ */ s((e, t, n) => !t || !n || !E(t) || e.ARow !== t || e.ACol !== n ? !1 : e.CanEdit(t, n) === 2, "isTreeGridPreviewHoveredCellState"), Re = /* @__PURE__ */ s(({
|
|
70
|
+
grid: e,
|
|
71
|
+
row: t,
|
|
72
|
+
col: n,
|
|
73
|
+
r: c,
|
|
74
|
+
g: G,
|
|
75
|
+
b: a,
|
|
76
|
+
selectedCellBackgroundColor: R,
|
|
77
|
+
hoverCellBackgroundColor: l
|
|
78
|
+
}) => {
|
|
79
|
+
if (Te(e, t, n) && m(c, G, a, Z))
|
|
80
|
+
return R;
|
|
81
|
+
if (ae(e, t, n) && (m(c, G, a, g) || m(c, G, a, H)) || Ce(e, t, n) && (m(c, G, a, ee) || m(c, G, a, te) || m(c, G, a, ne)))
|
|
82
|
+
return l;
|
|
83
|
+
}, "resolveTreeGridStateBackgroundColor"), we = /* @__PURE__ */ s((e) => {
|
|
50
84
|
if (!e)
|
|
51
85
|
return !1;
|
|
52
86
|
if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
|
|
53
87
|
let t = e.GetFirst();
|
|
54
88
|
for (; t; ) {
|
|
55
|
-
if (
|
|
89
|
+
if (E(t))
|
|
56
90
|
return !0;
|
|
57
91
|
t = e.GetNext(t);
|
|
58
92
|
}
|
|
59
93
|
return !1;
|
|
60
94
|
}
|
|
61
|
-
return Object.values(e.Rows ?? {}).some((t) =>
|
|
62
|
-
}, "hasTreeGridDisplayDataRows"),
|
|
63
|
-
var
|
|
64
|
-
const
|
|
95
|
+
return Object.values(e.Rows ?? {}).some((t) => E(t));
|
|
96
|
+
}, "hasTreeGridDisplayDataRows"), Le = /* @__PURE__ */ s((e, t, n) => {
|
|
97
|
+
var G;
|
|
98
|
+
const c = (G = e.Data) == null ? void 0 : G.Data;
|
|
65
99
|
e.Data.Data = {
|
|
66
|
-
...
|
|
100
|
+
...c,
|
|
67
101
|
Data: { Body: [t || []] },
|
|
68
102
|
Url: ""
|
|
69
|
-
}, e.ReloadBody(
|
|
70
|
-
}, "replaceTreeGridBodyData"),
|
|
103
|
+
}, e.ReloadBody(n);
|
|
104
|
+
}, "replaceTreeGridBodyData"), be = /* @__PURE__ */ s(({
|
|
71
105
|
id: e,
|
|
72
106
|
latestEventHandlersRef: t,
|
|
73
|
-
highlightEditableCellsRef:
|
|
74
|
-
highlightChangedCellsRef:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
107
|
+
highlightEditableCellsRef: n,
|
|
108
|
+
highlightChangedCellsRef: c,
|
|
109
|
+
editableCellBackgroundColorValueRef: G,
|
|
110
|
+
changedCellBackgroundColorRef: a,
|
|
111
|
+
selectedCellBackgroundColorRef: R,
|
|
112
|
+
hoverCellBackgroundColorRef: l,
|
|
113
|
+
treeGridInstanceRef: S,
|
|
114
|
+
treeGridInitStartedAtRef: _,
|
|
115
|
+
latestLayoutOverridesRef: x,
|
|
116
|
+
appliedLayoutOverridesRef: N,
|
|
117
|
+
appliedBodyDataPropRef: V,
|
|
118
|
+
latestColumnEditRulesRef: k,
|
|
119
|
+
latestColumnEditRuleLookupRef: B,
|
|
120
|
+
appliedColumnEditRulesRef: F,
|
|
121
|
+
columnEditRulesStateRef: h,
|
|
122
|
+
hasAppliedInitialLayoutRef: w,
|
|
123
|
+
syncHasDisplayDataRows: D,
|
|
124
|
+
setIsTreeGridReady: $
|
|
87
125
|
}) => {
|
|
88
|
-
const
|
|
89
|
-
window.TGSetEvent("OnRowAdd", e, (r,
|
|
90
|
-
var
|
|
91
|
-
|
|
126
|
+
const f = t.current;
|
|
127
|
+
window.TGSetEvent("OnRowAdd", e, (r, u) => {
|
|
128
|
+
var o, i;
|
|
129
|
+
u.CanEdit = 1, u.CanDelete = 1, (i = (o = t.current) == null ? void 0 : o.onRowAdd) == null || i.call(o, r, u);
|
|
92
130
|
}), window.TGSetEvent("OnRowAdded", e, (r) => {
|
|
93
|
-
|
|
94
|
-
}), typeof (
|
|
131
|
+
D(r);
|
|
132
|
+
}), typeof (f == null ? void 0 : f.onRowClick) == "function" && window.TGSetEvent(
|
|
95
133
|
"OnClick",
|
|
96
134
|
e,
|
|
97
|
-
O((r, o,
|
|
98
|
-
var
|
|
99
|
-
(
|
|
100
|
-
|
|
135
|
+
O((r, u, o, i, d, T) => {
|
|
136
|
+
var C, p;
|
|
137
|
+
(p = (C = t.current) == null ? void 0 : C.onRowClick) == null || p.call(
|
|
138
|
+
C,
|
|
101
139
|
r,
|
|
102
|
-
o,
|
|
103
|
-
n,
|
|
104
140
|
u,
|
|
105
|
-
|
|
106
|
-
|
|
141
|
+
o,
|
|
142
|
+
i,
|
|
143
|
+
d,
|
|
144
|
+
T
|
|
107
145
|
);
|
|
108
146
|
}, 300)
|
|
109
|
-
), typeof (
|
|
147
|
+
), typeof (f == null ? void 0 : f.onClickButton) == "function" && window.TGSetEvent(
|
|
110
148
|
"OnClickButton",
|
|
111
149
|
e,
|
|
112
|
-
O((r,
|
|
113
|
-
var
|
|
114
|
-
(
|
|
115
|
-
|
|
150
|
+
O((r, u, o, i) => {
|
|
151
|
+
var d, T;
|
|
152
|
+
(T = (d = t.current) == null ? void 0 : d.onClickButton) == null || T.call(
|
|
153
|
+
d,
|
|
116
154
|
r,
|
|
155
|
+
u,
|
|
117
156
|
o,
|
|
118
|
-
|
|
119
|
-
u
|
|
157
|
+
i
|
|
120
158
|
);
|
|
121
159
|
}, 300)
|
|
122
|
-
), typeof (
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
|
|
160
|
+
), typeof (f == null ? void 0 : f.onRowDelete) == "function" ? window.TGSetEvent("OnRowDelete", e, (r, u, o) => {
|
|
161
|
+
var i, d;
|
|
162
|
+
D(r), (d = (i = t.current) == null ? void 0 : i.onRowDelete) == null || d.call(
|
|
163
|
+
i,
|
|
126
164
|
r,
|
|
127
|
-
|
|
128
|
-
|
|
165
|
+
u,
|
|
166
|
+
o
|
|
129
167
|
);
|
|
130
168
|
}) : window.TGSetEvent("OnRowDelete", e, (r) => {
|
|
131
|
-
|
|
132
|
-
}), typeof (
|
|
133
|
-
var
|
|
134
|
-
|
|
169
|
+
D(r);
|
|
170
|
+
}), typeof (f == null ? void 0 : f.onRowUndelete) == "function" ? window.TGSetEvent("OnRowUndelete", e, (r, u) => {
|
|
171
|
+
var o, i;
|
|
172
|
+
D(r), (i = (o = t.current) == null ? void 0 : o.onRowUndelete) == null || i.call(o, r, u);
|
|
135
173
|
}) : window.TGSetEvent("OnRowUndelete", e, (r) => {
|
|
136
|
-
|
|
137
|
-
}), window.TGSetEvent("OnGetDefaultColor", e, (r,
|
|
138
|
-
if (!(!
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
174
|
+
D(r);
|
|
175
|
+
}), window.TGSetEvent("OnGetDefaultColor", e, (r, u, o) => {
|
|
176
|
+
if (!(!n.current || !E(u)))
|
|
177
|
+
return de(
|
|
178
|
+
r,
|
|
179
|
+
u,
|
|
180
|
+
o,
|
|
181
|
+
G.current
|
|
182
|
+
);
|
|
183
|
+
}), window.TGSetEvent("OnGetColor", e, (r, u, o, i, d, T, C) => {
|
|
184
|
+
if (!C)
|
|
185
|
+
return Re({
|
|
186
|
+
grid: r,
|
|
187
|
+
row: u,
|
|
188
|
+
col: o,
|
|
189
|
+
r: i,
|
|
190
|
+
g: d,
|
|
191
|
+
b: T,
|
|
192
|
+
selectedCellBackgroundColor: R.current,
|
|
193
|
+
hoverCellBackgroundColor: l.current
|
|
194
|
+
});
|
|
195
|
+
}), window.TGSetEvent("OnAfterValueChanged", e, (r, u, o, i) => {
|
|
196
|
+
var L, b;
|
|
197
|
+
const d = B.current, T = d ? Y(d, o, i) : void 0, C = T == null ? void 0 : T.value, p = C ?? i;
|
|
198
|
+
T != null && T.invalidText && j(T.invalidText, { variant: "warning" }), C !== void 0 && r.SetValue(u, o, C, 1), c.current && E(u) && M(e, {
|
|
199
|
+
row: u,
|
|
200
|
+
col: o,
|
|
201
|
+
backgroundColor: a.current
|
|
202
|
+
});
|
|
203
|
+
const y = ((L = t.current) == null ? void 0 : L.onAfterValueChanged) ?? ((b = t.current) == null ? void 0 : b.onRowChange);
|
|
204
|
+
y == null || y(r, u, o, p);
|
|
205
|
+
}), typeof (f == null ? void 0 : f.onSelect) == "function" && window.TGSetEvent(
|
|
147
206
|
"OnSelect",
|
|
148
207
|
e,
|
|
149
208
|
O((r) => {
|
|
150
|
-
var
|
|
151
|
-
const
|
|
152
|
-
(
|
|
209
|
+
var o, i;
|
|
210
|
+
const u = r.GetSelRows() ?? [];
|
|
211
|
+
(i = (o = t.current) == null ? void 0 : o.onSelect) == null || i.call(o, u);
|
|
153
212
|
}, 100)
|
|
154
|
-
), typeof (
|
|
155
|
-
var
|
|
156
|
-
(
|
|
157
|
-
|
|
213
|
+
), typeof (f == null ? void 0 : f.onSave) == "function" && window.TGSetEvent("OnSave", e, (r, u, o) => {
|
|
214
|
+
var i, d;
|
|
215
|
+
(d = (i = t.current) == null ? void 0 : i.onSave) == null || d.call(
|
|
216
|
+
i,
|
|
158
217
|
r,
|
|
159
|
-
|
|
160
|
-
|
|
218
|
+
u,
|
|
219
|
+
o
|
|
161
220
|
);
|
|
162
221
|
}), window.TGSetEvent(
|
|
163
222
|
"OnReady",
|
|
164
223
|
e,
|
|
165
224
|
O((r) => {
|
|
166
|
-
var
|
|
167
|
-
if (!
|
|
168
|
-
const
|
|
169
|
-
|
|
225
|
+
var u, o;
|
|
226
|
+
if (!w.current) {
|
|
227
|
+
const i = x.current;
|
|
228
|
+
w.current = !0, q(r, i), z(h.current), K(
|
|
170
229
|
r,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
),
|
|
174
|
-
bodyRowCount:
|
|
175
|
-
|
|
230
|
+
B.current,
|
|
231
|
+
h.current
|
|
232
|
+
), S.current = r, N.current = i, V.current = A(r), F.current = k.current, D(r), $(!0), Q(e, "TreeGrid init ready", _.current, {
|
|
233
|
+
bodyRowCount: ue(
|
|
234
|
+
A(r)
|
|
176
235
|
)
|
|
177
|
-
}),
|
|
236
|
+
}), _.current = null, (o = (u = t.current) == null ? void 0 : u.onReady) == null || o.call(u, r);
|
|
178
237
|
}
|
|
179
238
|
}, 100)
|
|
180
239
|
);
|
|
181
240
|
}, "bindTreeGridEvents");
|
|
182
241
|
export {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
242
|
+
Be as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
|
|
243
|
+
be as bindTreeGridEvents,
|
|
244
|
+
he as buildTreeGridInitializationOptions,
|
|
245
|
+
ue as getTreeGridBodyDataCount,
|
|
246
|
+
we as hasTreeGridDisplayDataRows,
|
|
247
|
+
Le as replaceTreeGridBodyData
|
|
189
248
|
};
|
|
190
249
|
//# sourceMappingURL=treeGridRuntime.js.map
|