open-grid 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +376 -353
- package/README.md +1 -1
- package/dist/OpenGrid-B7m7ei7f.cjs +7385 -0
- package/dist/OpenGrid-CeUdO_fM.js +7398 -0
- package/dist/index-CeJ-0-80.cjs +260 -0
- package/dist/index-DnarQ4eR.js +266 -0
- package/dist/index-DrCPRuYi.js +548 -0
- package/dist/index-JjfWY3Bt.cjs +520 -0
- package/dist/open-grid-base.css +12 -1
- package/dist/open-grid-react.cjs +27 -1
- package/dist/open-grid-react.js +22 -82
- package/dist/open-grid-vue.cjs +31 -1
- package/dist/open-grid-vue.js +29 -79
- package/dist/open-grid.cjs +272 -6
- package/dist/open-grid.js +177 -266
- package/dist/types/bench/perf.d.ts +14 -8
- package/dist/types/core/AppearanceResolver.d.ts +98 -11
- package/dist/types/core/CFRenderBridge.d.ts +13 -0
- package/dist/types/core/CellEditManager.d.ts +73 -0
- package/dist/types/core/CellEventHandler.d.ts +99 -2
- package/dist/types/core/CellTypeRegistry.d.ts +24 -0
- package/dist/types/core/ChartManager.d.ts +51 -3
- package/dist/types/core/ColumnLayout.d.ts +100 -2
- package/dist/types/core/ContextMenu.d.ts +43 -2
- package/dist/types/core/CrossGridController.d.ts +86 -15
- package/dist/types/core/CrossGridMapper.d.ts +43 -5
- package/dist/types/core/CrossGridRegistry.d.ts +36 -2
- package/dist/types/core/DataLayer.d.ts +210 -15
- package/dist/types/core/DetailManager.d.ts +106 -15
- package/dist/types/core/DragVisuals.d.ts +33 -4
- package/dist/types/core/EventEmitter.d.ts +54 -0
- package/dist/types/core/ExportManager.d.ts +66 -1
- package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
- package/dist/types/core/FilterPanel.d.ts +17 -2
- package/dist/types/core/FilterSelect.d.ts +37 -13
- package/dist/types/core/FindBarManager.d.ts +26 -0
- package/dist/types/core/FlatRowModel.d.ts +54 -11
- package/dist/types/core/FooterManager.d.ts +53 -1
- package/dist/types/core/FormulaController.d.ts +139 -10
- package/dist/types/core/FormulaEngine.d.ts +15 -4
- package/dist/types/core/GridComposer.d.ts +54 -6
- package/dist/types/core/GridRenderer.d.ts +143 -10
- package/dist/types/core/GridShuttle.d.ts +44 -4
- package/dist/types/core/GroupEngine.d.ts +68 -10
- package/dist/types/core/GroupTreeManager.d.ts +86 -2
- package/dist/types/core/IconRegistry.d.ts +56 -9
- package/dist/types/core/KeyboardManager.d.ts +88 -4
- package/dist/types/core/MaskingEngine.d.ts +10 -9
- package/dist/types/core/MathUtils.d.ts +58 -5
- package/dist/types/core/MergeEngine.d.ts +45 -10
- package/dist/types/core/MutationService.d.ts +113 -10
- package/dist/types/core/OGDecimal.d.ts +144 -13
- package/dist/types/core/OpenGrid.d.ts +99 -0
- package/dist/types/core/OrgChart.d.ts +56 -1
- package/dist/types/core/OverrideKernel.d.ts +59 -15
- package/dist/types/core/Pagination.d.ts +38 -4
- package/dist/types/core/PivotEngine.d.ts +37 -0
- package/dist/types/core/RangeSelectionManager.d.ts +121 -7
- package/dist/types/core/RenderController.d.ts +56 -0
- package/dist/types/core/RowDragDrop.d.ts +52 -6
- package/dist/types/core/RowManager.d.ts +55 -0
- package/dist/types/core/SkinRegistry.d.ts +55 -15
- package/dist/types/core/SortFilterManager.d.ts +80 -1
- package/dist/types/core/TreeEngine.d.ts +60 -6
- package/dist/types/core/TriggerManager.d.ts +46 -0
- package/dist/types/core/VirtualScroll.d.ts +64 -0
- package/dist/types/core/WorksheetManager.d.ts +61 -2
- package/dist/types/core/XmlConverter.d.ts +56 -23
- package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
- package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
- package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
- package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
- package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
- package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
- package/dist/types/core/a11y/index.d.ts +13 -0
- package/dist/types/core/a11y/ports.d.ts +24 -0
- package/dist/types/core/appearance/Appearance.d.ts +68 -0
- package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
- package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
- package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
- package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
- package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
- package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
- package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
- package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
- package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
- package/dist/types/core/appearance/defaults.d.ts +10 -0
- package/dist/types/core/appearance/index.d.ts +20 -0
- package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
- package/dist/types/core/cf/CFEngine.d.ts +56 -0
- package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
- package/dist/types/core/cf/CFRule.d.ts +127 -0
- package/dist/types/core/cf/ColorScale.d.ts +49 -0
- package/dist/types/core/cf/InkResolver.d.ts +33 -0
- package/dist/types/core/cf/appearance.d.ts +20 -0
- package/dist/types/core/cf/encoders.d.ts +61 -0
- package/dist/types/core/cf/eval-types.d.ts +93 -0
- package/dist/types/core/cf/index.d.ts +21 -0
- package/dist/types/core/cf/lineage.d.ts +32 -0
- package/dist/types/core/cf/predicates.d.ts +27 -0
- package/dist/types/core/cf/serialize.d.ts +46 -0
- package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
- package/dist/types/core/chart/DataExtractor.d.ts +53 -12
- package/dist/types/core/chart/a11y.d.ts +22 -0
- package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
- package/dist/types/core/chart/downsample-report.d.ts +36 -0
- package/dist/types/core/chart/downsample.d.ts +26 -1
- package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
- package/dist/types/core/chart/geometry.d.ts +96 -0
- package/dist/types/core/chart/hittest.d.ts +21 -3
- package/dist/types/core/chart/palette.d.ts +96 -12
- package/dist/types/core/chart/parity.d.ts +12 -0
- package/dist/types/core/chart/provenance.d.ts +47 -0
- package/dist/types/core/chart/scales.d.ts +28 -1
- package/dist/types/core/chart/scene.d.ts +102 -0
- package/dist/types/core/chart/server.d.ts +36 -0
- package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
- package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
- package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
- package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
- package/dist/types/core/chart/types.d.ts +107 -10
- package/dist/types/core/command/CommandBus.d.ts +51 -0
- package/dist/types/core/command/CommandRegistry.d.ts +43 -0
- package/dist/types/core/command/CommandStack.d.ts +38 -0
- package/dist/types/core/command/ICommand.d.ts +110 -0
- package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
- package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
- package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
- package/dist/types/core/command/index.d.ts +9 -0
- package/dist/types/core/command/support.d.ts +51 -0
- package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
- package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
- package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
- package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
- package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
- package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
- package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
- package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
- package/dist/types/core/coordinate/index.d.ts +10 -0
- package/dist/types/core/coordinate/ports.d.ts +45 -0
- package/dist/types/core/coordinate/types.d.ts +76 -0
- package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
- package/dist/types/core/detail/DetailSplice.d.ts +42 -11
- package/dist/types/core/detail/DetailState.d.ts +80 -11
- package/dist/types/core/detail/SubgridCache.d.ts +72 -10
- package/dist/types/core/detail/index.d.ts +8 -0
- package/dist/types/core/domain/AggregateResult.d.ts +54 -0
- package/dist/types/core/domain/CellAddress.d.ts +61 -0
- package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
- package/dist/types/core/domain/Delta.d.ts +37 -0
- package/dist/types/core/domain/DomainValue.d.ts +80 -0
- package/dist/types/core/domain/Missing.d.ts +65 -0
- package/dist/types/core/domain/Money.d.ts +42 -0
- package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
- package/dist/types/core/domain/Plain.d.ts +45 -0
- package/dist/types/core/domain/Quantity.d.ts +32 -0
- package/dist/types/core/domain/Ratios.d.ts +100 -0
- package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
- package/dist/types/core/domain/ValueType.d.ts +71 -0
- package/dist/types/core/domain/rounding.d.ts +25 -0
- package/dist/types/core/domain/strategies.d.ts +38 -0
- package/dist/types/core/editors/CellEditor.d.ts +29 -2
- package/dist/types/core/editors/DateEditor.d.ts +18 -0
- package/dist/types/core/editors/SelectEditor.d.ts +29 -0
- package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
- package/dist/types/core/export/ExportManifest.d.ts +13 -0
- package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
- package/dist/types/core/export/Provenance.d.ts +34 -0
- package/dist/types/core/export/StreamPump.d.ts +28 -0
- package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
- package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
- package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
- package/dist/types/core/export/channels/capabilities.d.ts +13 -0
- package/dist/types/core/export/index.d.ts +24 -0
- package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
- package/dist/types/core/export/print/Paginator.d.ts +48 -0
- package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
- package/dist/types/core/export/sinks.d.ts +40 -0
- package/dist/types/core/export/types.d.ts +211 -0
- package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
- package/dist/types/core/extension/IExtension.d.ts +90 -0
- package/dist/types/core/extension/Registry.d.ts +142 -0
- package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
- package/dist/types/core/extension/adapters.d.ts +44 -0
- package/dist/types/core/extension/conformance.d.ts +47 -0
- package/dist/types/core/extension/index.d.ts +16 -0
- package/dist/types/core/extension/registries.d.ts +31 -0
- package/dist/types/core/extension/reserved.d.ts +10 -0
- package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
- package/dist/types/core/format/FormatCache.d.ts +20 -0
- package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
- package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
- package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
- package/dist/types/core/format/index.d.ts +55 -0
- package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
- package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
- package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
- package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
- package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
- package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
- package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
- package/dist/types/core/format/types.d.ts +292 -0
- package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
- package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
- package/dist/types/core/formula/CalcService.d.ts +137 -0
- package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
- package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
- package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
- package/dist/types/core/formula/FormulaParser.d.ts +9 -0
- package/dist/types/core/formula/FormulaStore.d.ts +63 -1
- package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
- package/dist/types/core/formula/Generation.d.ts +86 -0
- package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
- package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
- package/dist/types/core/formula/functions/essential.d.ts +3 -0
- package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
- package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
- package/dist/types/core/formula/numericLiteral.d.ts +11 -1
- package/dist/types/core/formula/serializeFormula.d.ts +10 -1
- package/dist/types/core/formula/types.d.ts +71 -8
- package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
- package/dist/types/core/host/GridHostDriver.d.ts +27 -0
- package/dist/types/core/host/GridHostPort.d.ts +37 -0
- package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
- package/dist/types/core/host/archCheck.d.ts +26 -0
- package/dist/types/core/host/index.d.ts +6 -0
- package/dist/types/core/host/reconcile.d.ts +22 -0
- package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
- package/dist/types/core/i18n/types.d.ts +26 -1
- package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
- package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
- package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
- package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
- package/dist/types/core/quality/PerfSpec.d.ts +95 -0
- package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
- package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
- package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
- package/dist/types/core/quality/VisualRegression.d.ts +74 -0
- package/dist/types/core/quality/hooks.d.ts +53 -0
- package/dist/types/core/quality/index.d.ts +20 -0
- package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
- package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
- package/dist/types/core/range/FillEngine.d.ts +69 -9
- package/dist/types/core/range/RangeModel.d.ts +100 -13
- package/dist/types/core/range/RangeQuery.d.ts +24 -2
- package/dist/types/core/range/types.d.ts +27 -11
- package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
- package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
- package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
- package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
- package/dist/types/core/realtime/PollingSource.d.ts +42 -0
- package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
- package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
- package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
- package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
- package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
- package/dist/types/core/realtime/backoff.d.ts +12 -0
- package/dist/types/core/realtime/index.d.ts +13 -0
- package/dist/types/core/realtime/ports.d.ts +80 -0
- package/dist/types/core/render/CellApplier.d.ts +18 -0
- package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
- package/dist/types/core/render/CellPipeline.d.ts +39 -0
- package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
- package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
- package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
- package/dist/types/core/render/RenderBudget.d.ts +67 -0
- package/dist/types/core/render/contrast.d.ts +33 -0
- package/dist/types/core/render/index.d.ts +35 -0
- package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
- package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
- package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
- package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
- package/dist/types/core/render/stages/index.d.ts +14 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +100 -8
- package/dist/types/core/state/AutosaveController.d.ts +63 -0
- package/dist/types/core/state/IStatePersistence.d.ts +59 -0
- package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
- package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
- package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
- package/dist/types/core/state/StateCodec.d.ts +75 -0
- package/dist/types/core/state/index.d.ts +6 -0
- package/dist/types/core/types.d.ts +17 -0
- package/dist/types/react/OpenGrid.d.ts +54 -0
- package/dist/types/react/index.d.ts +5 -0
- package/dist/types/realtime/index.d.ts +1 -0
- package/dist/types/vue/index.d.ts +5 -0
- package/dist/types/vue/types.d.ts +35 -0
- package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
- package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
- package/package.json +112 -110
- package/dist/OpenGrid-B0Spm0rU.js +0 -10404
- package/dist/OpenGrid-CuXj0isp.cjs +0 -97
- package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { SortItem, FilterItem } from './types.js';
|
|
2
2
|
type RowState = 'added' | 'edited' | 'removed' | 'none';
|
|
3
|
+
/**
|
|
4
|
+
* 그리드 데이터 모델 계층(C0 DataLayer). / Grid data model layer (contract C0 DataLayer).
|
|
5
|
+
*
|
|
6
|
+
* 원본 데이터·변경 추적(added/edited/removed)·정렬/필터 후 표시 인덱스·rowId 역매핑을 관리한다.
|
|
7
|
+
* 각 행에는 안정적 rowId 를 부여하여 정렬/필터로 순서가 바뀌어도 같은 논리 레코드를 가리킬 수 있다.
|
|
8
|
+
* / Manages source data, change tracking (added/edited/removed), the post-sort/filter display index,
|
|
9
|
+
* and the rowId reverse map. Each row is assigned a stable rowId so it keeps pointing to the same
|
|
10
|
+
* logical record even as sorting/filtering reorders rows.
|
|
11
|
+
*
|
|
12
|
+
* @typeParam T - 행 데이터 타입 / Row data type
|
|
13
|
+
* @example
|
|
14
|
+
* const layer = new DataLayer();
|
|
15
|
+
* layer.setData([{ name: 'Kim' }, { name: 'Lee' }]);
|
|
16
|
+
* layer.updateCell(0, 'name', 'Park');
|
|
17
|
+
* layer.getChanges(); // { added, edited, removed }
|
|
18
|
+
*/
|
|
3
19
|
export declare class DataLayer<T extends Record<string, any> = any> {
|
|
4
20
|
private _data;
|
|
5
21
|
private _original;
|
|
@@ -8,50 +24,178 @@ export declare class DataLayer<T extends Record<string, any> = any> {
|
|
|
8
24
|
private _displayIndexes;
|
|
9
25
|
private _idMap;
|
|
10
26
|
/**
|
|
11
|
-
* rowId → DataLayer 원본(_data) 인덱스 조회.
|
|
12
|
-
*
|
|
27
|
+
* rowId → DataLayer 원본(_data) 인덱스 조회. / rowId → source (`_data`) index lookup.
|
|
28
|
+
*
|
|
29
|
+
* Phase 0 인프라(FlatRowModel.ts, C0.3 FlatRowRef.dataIndex) 해소 전용 — 내부 역매핑을
|
|
13
30
|
* 직접 노출하지 않고 단건 조회만 허용한다. 없으면 undefined(삭제된 행 등).
|
|
31
|
+
* / Serves the Phase 0 infrastructure (contract C0.3 FlatRowRef.dataIndex) — exposes a single
|
|
32
|
+
* lookup rather than the internal reverse map. Returns undefined when absent (e.g. removed rows).
|
|
33
|
+
*
|
|
34
|
+
* @param rowId - 안정적 행 id / Stable row id
|
|
35
|
+
* @returns 원본 인덱스, 없으면 undefined / Source index, or undefined
|
|
14
36
|
*/
|
|
15
37
|
getDataIndexByRowId(rowId: string): number | undefined;
|
|
16
38
|
private _findQuery;
|
|
17
39
|
private _findFields;
|
|
18
40
|
private _getStrategy;
|
|
41
|
+
/**
|
|
42
|
+
* 데이터 계층 생성. / Create the data layer.
|
|
43
|
+
*
|
|
44
|
+
* @param idField - 각 행에 부여할 rowId 필드명(기본 '_ogRowId') / Field name that holds each row's rowId (default '_ogRowId')
|
|
45
|
+
*/
|
|
19
46
|
constructor(idField?: string);
|
|
20
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Phase 2: 전략 resolver 주입 — 슬롯 sortComparator/filterPredicate 도달용.
|
|
49
|
+
* / Phase 2: inject the strategy resolver — routes to the sortComparator/filterPredicate slots.
|
|
50
|
+
*
|
|
51
|
+
* OpenGrid 가 OverrideKernel.getStrategy 를 넘긴다. / OpenGrid passes OverrideKernel.getStrategy.
|
|
52
|
+
*
|
|
53
|
+
* @param resolver - 슬롯명+폴백을 받아 실제 전략 함수를 반환 / Takes a slot name + fallback and returns the effective strategy fn
|
|
54
|
+
*/
|
|
21
55
|
setStrategyResolver(resolver: <F extends Function>(slot: string, fallback: F) => F): void;
|
|
56
|
+
/**
|
|
57
|
+
* 데이터 전체 교체 — 각 행에 rowId 부여, 원본 스냅샷 저장, 표시 인덱스 초기화.
|
|
58
|
+
* / Replace all data — assigns a rowId per row, snapshots the original, resets the display index.
|
|
59
|
+
*
|
|
60
|
+
* @param data - 설정할 행 배열 / Rows to set
|
|
61
|
+
*/
|
|
22
62
|
setData(data: T[]): void;
|
|
63
|
+
/**
|
|
64
|
+
* 정렬/필터가 적용된 표시 순서의 행 배열 반환. / Return rows in the applied sort/filter display order.
|
|
65
|
+
*
|
|
66
|
+
* @returns 표시 순서 행 배열 / Rows in display order
|
|
67
|
+
*/
|
|
23
68
|
getData(): T[];
|
|
69
|
+
/**
|
|
70
|
+
* setData 시점의 원본 데이터 스냅샷 반환. / Return the original data snapshot taken at setData time.
|
|
71
|
+
*
|
|
72
|
+
* @returns 원본 행 배열(복사본) / A copy of the original rows
|
|
73
|
+
*/
|
|
24
74
|
getOriginalData(): T[];
|
|
75
|
+
/**
|
|
76
|
+
* 정렬/필터·soft-delete 무시하고 전체 행 반환. / Return all rows, ignoring sort/filter and soft-delete.
|
|
77
|
+
*
|
|
78
|
+
* @returns 전체 행 배열(복사본) / A copy of all rows
|
|
79
|
+
*/
|
|
25
80
|
getAllData(): T[];
|
|
81
|
+
/** 모든 데이터·메타·인덱스 초기화. / Clear all data, metadata, and indexes. */
|
|
26
82
|
clearData(): void;
|
|
83
|
+
/** 표시(정렬/필터 후) 행 수. / Displayed (post sort/filter) row count. */
|
|
27
84
|
get rowCount(): number;
|
|
85
|
+
/** 전체(soft-delete 포함) 행 수. / Total row count (including soft-deleted). */
|
|
28
86
|
get totalRowCount(): number;
|
|
87
|
+
/**
|
|
88
|
+
* 행 추가 — added 상태로 표시되고 표시 인덱스에 반영된다. / Add a row — marked as `added` and reflected in the display index.
|
|
89
|
+
*
|
|
90
|
+
* @param item - 추가할 부분 행(rowId 자동 부여) / Partial row to add (rowId assigned automatically)
|
|
91
|
+
* @param position - 삽입 위치: 'first' | 'last' | 표시 인덱스(기본 'last') / Insert position: 'first' | 'last' | display index (default 'last')
|
|
92
|
+
*/
|
|
29
93
|
addRow(item: Partial<T>, position?: 'first' | 'last' | number): void;
|
|
94
|
+
/**
|
|
95
|
+
* 행 삭제 — 새로 추가된 행은 완전 삭제, 기존 행은 soft-delete(removed 표시).
|
|
96
|
+
* / Remove a row — newly added rows are fully deleted; existing rows are soft-deleted (marked removed).
|
|
97
|
+
*
|
|
98
|
+
* @param rowIndex - 표시 순서 행 인덱스 / Display-order row index
|
|
99
|
+
* @returns 삭제된 행, 없으면 undefined / The removed row, or undefined
|
|
100
|
+
*/
|
|
30
101
|
removeRow(rowIndex: number): T | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* 행 이동 — 표시 인덱스 기준으로 원본 배열에서 실제 위치를 옮긴다. / Move a row — repositions it in the source array by display index.
|
|
104
|
+
*
|
|
105
|
+
* @param fromDisplayIdx - 원래 표시 인덱스 / Source display index
|
|
106
|
+
* @param toDisplayIdx - 목표 표시 인덱스 / Target display index
|
|
107
|
+
*/
|
|
31
108
|
moveRow(fromDisplayIdx: number, toDisplayIdx: number): void;
|
|
109
|
+
/**
|
|
110
|
+
* 셀 값 수정 — 최초 수정 시 원본을 백업하고 상태를 edited 로 전이. / Update a cell — backs up the original on first edit and transitions state to `edited`.
|
|
111
|
+
*
|
|
112
|
+
* @param rowIndex - 표시 순서 행 인덱스 / Display-order row index
|
|
113
|
+
* @param field - 컬럼 field 명 / Column field name
|
|
114
|
+
* @param value - 기록할 값 / Value to write
|
|
115
|
+
* @returns 성공하면 true, 대상 행이 없으면 false / true on success, false when the row is absent
|
|
116
|
+
*/
|
|
32
117
|
updateCell(rowIndex: number, field: string, value: any): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* 표시 순서 인덱스로 행 조회. / Get a row by display-order index.
|
|
120
|
+
*
|
|
121
|
+
* @param rowIndex - 표시 순서 행 인덱스 / Display-order row index
|
|
122
|
+
* @returns 행, 없으면 undefined / The row, or undefined
|
|
123
|
+
*/
|
|
33
124
|
getRowByIndex(rowIndex: number): T | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* 표시 순서 인덱스 + field 로 셀 값 조회. / Get a cell value by display index + field.
|
|
127
|
+
*
|
|
128
|
+
* @param rowIndex - 표시 순서 행 인덱스 / Display-order row index
|
|
129
|
+
* @param field - 컬럼 field 명 / Column field name
|
|
130
|
+
* @returns 셀 값, 없으면 undefined / The cell value, or undefined
|
|
131
|
+
*/
|
|
34
132
|
getCellValue(rowIndex: number, field: string): any;
|
|
35
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* rowId 가 아직 존재(soft-delete 제외)하는지 판정(F3-R28 삭제 무효화). / Whether a rowId still exists (excluding soft-delete) (F3-R28 delete invalidation).
|
|
135
|
+
*
|
|
136
|
+
* @param rowId - 안정적 행 id / Stable row id
|
|
137
|
+
* @returns 존재하고 삭제되지 않았으면 true / true if present and not removed
|
|
138
|
+
*/
|
|
36
139
|
hasRow(rowId: string): boolean;
|
|
37
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* rowId → 원본 행 조회(soft-delete 된 행은 undefined, F3-R28). / rowId → row lookup (soft-deleted rows return undefined, F3-R28).
|
|
142
|
+
*
|
|
143
|
+
* @param rowId - 안정적 행 id / Stable row id
|
|
144
|
+
* @returns 행, 없거나 삭제되었으면 undefined / The row, or undefined if absent/removed
|
|
145
|
+
*/
|
|
38
146
|
getRowById(rowId: string): T | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* rowId + field 로 셀 값 조회(정렬/필터 무관). / Get a cell value by rowId + field (independent of sort/filter).
|
|
149
|
+
*
|
|
150
|
+
* @param rowId - 안정적 행 id / Stable row id
|
|
151
|
+
* @param field - 컬럼 field 명 / Column field name
|
|
152
|
+
* @returns 셀 값, 없으면 undefined / The cell value, or undefined
|
|
153
|
+
*/
|
|
39
154
|
getCellValueByRowId(rowId: string, field: string): any;
|
|
40
155
|
/**
|
|
41
|
-
* 수식 재계산 결과 기록(§4.2/C2.2)
|
|
42
|
-
*
|
|
43
|
-
*
|
|
156
|
+
* 수식 재계산 결과 기록(§4.2/C2.2). / Write a formula recalculation result (contract §4.2/C2.2).
|
|
157
|
+
*
|
|
158
|
+
* 일반 updateCell 과 달리 meta.state 를 건드리지 않고(edited 오염 방지) dataChange 도 발화하지
|
|
159
|
+
* 않는다(호출부가 배치 종료 후 formulaRecalc 1회로 표면화할 책임을 진다).
|
|
160
|
+
* / Unlike updateCell, this does not touch meta.state (to avoid polluting `edited`) and does not
|
|
161
|
+
* emit dataChange (the caller surfaces the batch via a single formulaRecalc afterwards).
|
|
162
|
+
*
|
|
163
|
+
* @param rowId - 안정적 행 id / Stable row id
|
|
164
|
+
* @param field - 컬럼 field 명 / Column field name
|
|
165
|
+
* @param value - 계산된 값 / Computed value
|
|
44
166
|
*/
|
|
45
167
|
setComputedValueByRowId(rowId: string, field: string, value: any): void;
|
|
46
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* 수정된 행만 반환(추가/삭제 제외). / Return only edited rows (excluding added/removed).
|
|
170
|
+
*
|
|
171
|
+
* @returns edited 상태 행 배열 / Rows in the `edited` state
|
|
172
|
+
*/
|
|
47
173
|
getEditedRows(): T[];
|
|
48
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* 수정된 행만 반환(하위 호환용 — 신규 코드는 getEditedRows() 사용).
|
|
176
|
+
* / Return only edited rows (legacy alias — new code should use getEditedRows()).
|
|
177
|
+
*
|
|
178
|
+
* @returns edited 상태 행 배열 / Rows in the `edited` state
|
|
179
|
+
*/
|
|
49
180
|
getChangedRows(): T[];
|
|
181
|
+
/**
|
|
182
|
+
* 추가된 행만 반환. / Return only added rows.
|
|
183
|
+
*
|
|
184
|
+
* @returns added 상태 행 배열 / Rows in the `added` state
|
|
185
|
+
*/
|
|
50
186
|
getAddedRows(): T[];
|
|
187
|
+
/**
|
|
188
|
+
* 삭제(soft-delete)된 행만 반환. / Return only removed (soft-deleted) rows.
|
|
189
|
+
*
|
|
190
|
+
* @returns removed 상태 행 배열 / Rows in the `removed` state
|
|
191
|
+
*/
|
|
51
192
|
getRemovedRows(): T[];
|
|
52
193
|
/**
|
|
53
|
-
* 추가/수정/삭제 모든 변경사항을 한 번에 반환.
|
|
54
|
-
*
|
|
194
|
+
* 추가/수정/삭제 모든 변경사항을 한 번에 반환. / Return all added/edited/removed changes at once.
|
|
195
|
+
*
|
|
196
|
+
* edited 행에는 _changedFields 배열도 포함. / Edited rows also carry a `_changedFields` array.
|
|
197
|
+
*
|
|
198
|
+
* @returns { added, edited, removed } 변경 묶음 / An { added, edited, removed } change bundle
|
|
55
199
|
*/
|
|
56
200
|
getChanges(): {
|
|
57
201
|
added: T[];
|
|
@@ -60,7 +204,11 @@ export declare class DataLayer<T extends Record<string, any> = any> {
|
|
|
60
204
|
};
|
|
61
205
|
/**
|
|
62
206
|
* 수정된 컬럼 정보 반환 — 각 edited 행에 대해 { row, fields, diff } 반환.
|
|
63
|
-
*
|
|
207
|
+
* / Return changed-column info — for each edited row, yields { row, fields, diff }.
|
|
208
|
+
*
|
|
209
|
+
* diff 는 { field, oldValue, newValue } 배열. / `diff` is an array of { field, oldValue, newValue }.
|
|
210
|
+
*
|
|
211
|
+
* @returns edited 행별 변경 컬럼 상세 배열 / Per-edited-row changed-column details
|
|
64
212
|
*/
|
|
65
213
|
getChangedColumns(): Array<{
|
|
66
214
|
row: T;
|
|
@@ -71,13 +219,60 @@ export declare class DataLayer<T extends Record<string, any> = any> {
|
|
|
71
219
|
newValue: any;
|
|
72
220
|
}>;
|
|
73
221
|
}>;
|
|
74
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* 지정 행의 원본(수정 전) 데이터 반환. / Return the original (pre-edit) data for a row.
|
|
224
|
+
*
|
|
225
|
+
* 추가된 행은 undefined. / Added rows return undefined.
|
|
226
|
+
*
|
|
227
|
+
* @param rowIndex - 표시 순서 행 인덱스 / Display-order row index
|
|
228
|
+
* @returns 원본 행, 추가/미존재면 undefined / The original row, or undefined for added/absent rows
|
|
229
|
+
*/
|
|
75
230
|
getOriginalRow(rowIndex: number): T | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* 각 행에 편집 상태를 지정 필드로 얹어 전체 행 반환. / Return all rows with each row's edit state attached under the given field.
|
|
233
|
+
*
|
|
234
|
+
* @param stateField - 상태를 담을 필드명 / Field name to hold the state
|
|
235
|
+
* @returns 상태가 부착된 전체 행 배열 / All rows with the state field attached
|
|
236
|
+
*/
|
|
76
237
|
getRowsWithState(stateField: string): T[];
|
|
238
|
+
/**
|
|
239
|
+
* 지정 행의 편집 상태 반환. / Return the edit state of a row.
|
|
240
|
+
*
|
|
241
|
+
* @param rowIndex - 표시 순서 행 인덱스 / Display-order row index
|
|
242
|
+
* @returns 'added' | 'edited' | 'removed' | 'none' / One of 'added' | 'edited' | 'removed' | 'none'
|
|
243
|
+
*/
|
|
77
244
|
getRowState(rowIndex: number): RowState;
|
|
245
|
+
/**
|
|
246
|
+
* 다중 키 정렬 적용 — 표시 인덱스를 재배열한다. / Apply multi-key sorting — reorders the display index.
|
|
247
|
+
*
|
|
248
|
+
* 빈 목록이면 원본 순서로 복원한다. Schwartzian transform 으로 비교 비용을 낮추고,
|
|
249
|
+
* 비교자는 Phase 2 sortComparator 슬롯을 통해 오버라이드될 수 있다(기본은 내장 비교).
|
|
250
|
+
* / An empty list restores source order. Uses a Schwartzian transform to cut comparison cost; the
|
|
251
|
+
* comparator can be overridden via the Phase 2 sortComparator slot (built-in comparison by default).
|
|
252
|
+
*
|
|
253
|
+
* @param sortList - {field, dir} 정렬 키 목록(우선순위 순) / Sort keys {field, dir} in priority order
|
|
254
|
+
*/
|
|
78
255
|
applySort(sortList: SortItem[]): void;
|
|
256
|
+
/**
|
|
257
|
+
* 컬럼별 필터 + F3 찾기 바(전체 컬럼 OR)를 적용해 표시 인덱스를 재계산. / Recompute the display index by applying per-column filters plus the F3 find bar (cross-column OR).
|
|
258
|
+
*
|
|
259
|
+
* 같은 컬럼의 여러 조건은 AND, 컬럼 간에도 AND 이며, 찾기 바는 지정 필드들에 대해 OR 로 결합된다.
|
|
260
|
+
* 술어는 Phase 2 filterPredicate 슬롯으로 오버라이드될 수 있다(기본은 모듈 matchFilter).
|
|
261
|
+
* / Multiple conditions on the same column are ANDed, columns are ANDed together, and the find bar
|
|
262
|
+
* ORs across its fields. The predicate can be overridden via the Phase 2 filterPredicate slot
|
|
263
|
+
* (module `matchFilter` by default).
|
|
264
|
+
*
|
|
265
|
+
* @param filters - field → 필터 조건 배열 맵 / Map of field → array of filter conditions
|
|
266
|
+
*/
|
|
79
267
|
applyFilter(filters: Record<string, FilterItem[]>): void;
|
|
80
|
-
/**
|
|
268
|
+
/**
|
|
269
|
+
* F3: 찾기 바 전체 컬럼 OR 검색 설정(대소문자 무시). / F3: configure the find bar's cross-column OR search (case-insensitive).
|
|
270
|
+
*
|
|
271
|
+
* 다음 applyFilter 호출부터 반영된다. / Takes effect from the next applyFilter call.
|
|
272
|
+
*
|
|
273
|
+
* @param query - 검색어(소문자로 정규화됨) / Search query (normalized to lowercase)
|
|
274
|
+
* @param fields - OR 검색 대상 field 목록 / Fields to OR-search across
|
|
275
|
+
*/
|
|
81
276
|
setFindFilter(query: string, fields: string[]): void;
|
|
82
277
|
private _rebuildIdMap;
|
|
83
278
|
}
|
|
@@ -1,33 +1,55 @@
|
|
|
1
1
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
2
2
|
import { FlatRowModel } from './FlatRowModel.js';
|
|
3
|
-
/** expandRow/collapseRow/toggleRow/isRowExpanded/getDetailInstance 공통 인자(§6.2, C0.2).
|
|
3
|
+
/** expandRow/collapseRow/toggleRow/isRowExpanded/getDetailInstance 공통 인자(§6.2, C0.2).
|
|
4
|
+
* / Common argument shape for expandRow/collapseRow/toggleRow/isRowExpanded/getDetailInstance (§6.2, C0.2). */
|
|
4
5
|
export type DetailRowRef = number | {
|
|
5
6
|
id: string;
|
|
6
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* DetailManager 가 OpenGrid 서브시스템을 읽기 위해 주입받는 클로저 묶음. / Closures injected into
|
|
10
|
+
* DetailManager so it can read OpenGrid subsystem state without owning it directly.
|
|
11
|
+
*/
|
|
7
12
|
export interface DetailManagerDeps<T extends Record<string, any> = any> {
|
|
8
|
-
/** this._options — masterDetail.* 를 이 안에서 읽는다(옵션 자체는 항상 최신값 참조).
|
|
13
|
+
/** this._options — masterDetail.* 를 이 안에서 읽는다(옵션 자체는 항상 최신값 참조).
|
|
14
|
+
* / this._options — reads masterDetail.* from it (always the latest option values). */
|
|
9
15
|
getOptions: () => any;
|
|
10
16
|
/** Phase 0 baseline. registerSplice 로 detail splice 를 등록하고, count()/resolveFlatRow 로
|
|
11
|
-
* rowIndex↔rowId 를 해소한다(F2 는 이 모델의 "소유자"가 아니라 "등록자" — C0.3 정정).
|
|
17
|
+
* rowIndex↔rowId 를 해소한다(F2 는 이 모델의 "소유자"가 아니라 "등록자" — C0.3 정정).
|
|
18
|
+
* / Phase 0 baseline. Registers the detail splice via registerSplice, and resolves
|
|
19
|
+
* rowIndex↔rowId through count()/resolveFlatRow (F2 is a "registrant" of this model,
|
|
20
|
+
* not its "owner" — C0.3 correction). */
|
|
12
21
|
getFlatModel: () => FlatRowModel;
|
|
22
|
+
/** 가상 스크롤 인스턴스(마운트 전이면 null). / Virtual scroll instance (null before mount). */
|
|
13
23
|
getVs: () => VirtualScroll | null;
|
|
14
|
-
/** DataLayer 가 부여한 stable id 필드값(OpenGrid 의 ROW_ID_FIELD). */
|
|
24
|
+
/** DataLayer 가 부여한 stable id 필드값(OpenGrid 의 ROW_ID_FIELD). / The stable id field value assigned by DataLayer (OpenGrid's ROW_ID_FIELD). */
|
|
15
25
|
getRowId: (row: T) => string;
|
|
16
|
-
/** stable rowId → 현재 행(삭제됐으면 undefined). DataLayer.getRowById 위임. */
|
|
26
|
+
/** stable rowId → 현재 행(삭제됐으면 undefined). DataLayer.getRowById 위임. / stable rowId → current row (undefined if deleted). Delegates to DataLayer.getRowById. */
|
|
17
27
|
getRowById: (rowId: string) => T | undefined;
|
|
18
|
-
/** group/tree rebuild 와 동일한 관용구 — 전체(0..n-1) 재렌더. */
|
|
28
|
+
/** group/tree rebuild 와 동일한 관용구 — 전체(0..n-1) 재렌더. / Same idiom as group/tree rebuild — re-renders the full (0..n-1) range. */
|
|
19
29
|
doRenderFull: (n: number) => void;
|
|
30
|
+
/** 그리드 이벤트 발행. / Emit a grid event. */
|
|
20
31
|
emit: (ev: string, payload: any) => void;
|
|
32
|
+
/** aria-live 영역에 메시지를 공지. / Announce a message via the aria-live region. */
|
|
21
33
|
announce: (msg: string) => void;
|
|
22
34
|
/** i18n: 깊이 한계/펼침·접힘 announce 메시지 해석. / i18n: resolve depth-limit & expand/collapse announces. */
|
|
23
35
|
t: (key: string, params?: Record<string, string | number>) => string;
|
|
24
|
-
/** 이 그리드 인스턴스의 중첩 깊이(0=최상위, 부모가 자식 생성 시 depth+1 주입). */
|
|
36
|
+
/** 이 그리드 인스턴스의 중첩 깊이(0=최상위, 부모가 자식 생성 시 depth+1 주입). / Nesting depth of this grid instance (0 = top level; a parent injects depth+1 when creating a child). */
|
|
25
37
|
getDepth: () => number;
|
|
26
|
-
/** masterDetail.renderer 의 DetailRenderApi.grid 에 실어줄 인스턴스. */
|
|
38
|
+
/** masterDetail.renderer 의 DetailRenderApi.grid 에 실어줄 인스턴스. / Instance handed to DetailRenderApi.grid inside masterDetail.renderer. */
|
|
27
39
|
getGridInstance: () => any;
|
|
28
|
-
/** masterDetail.subgridOptions(§5 ②) 소비 — 순환 import 회피 위해 OpenGrid.ts 가 주입. */
|
|
40
|
+
/** masterDetail.subgridOptions(§5 ②) 소비 — 순환 import 회피 위해 OpenGrid.ts 가 주입. / Consumes masterDetail.subgridOptions (§5 ②) — injected by OpenGrid.ts to avoid a circular import. */
|
|
29
41
|
createSubgrid?: (host: HTMLElement, subgridOptions: any, depth: number) => any;
|
|
30
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* F2 마스터/디테일 매니저. / F2 master/detail manager.
|
|
45
|
+
*
|
|
46
|
+
* 행 펼침 상태(DetailState)를 소유하고, FlatRowModel 합성 체인 끝에 detail head/filler 의사행을
|
|
47
|
+
* 등록(registerSplice)하며, 펼쳐진 행마다 서브그리드/커스텀 렌더러 host 를 mount-once 로
|
|
48
|
+
* 생명주기 관리(SubgridCache)한다. / Owns the row expand/collapse state (DetailState), registers
|
|
49
|
+
* detail head/filler pseudo-rows at the tail of the FlatRowModel composition chain
|
|
50
|
+
* (registerSplice), and manages the mount-once lifecycle of each expanded row's
|
|
51
|
+
* subgrid/custom-renderer host (SubgridCache).
|
|
52
|
+
*/
|
|
31
53
|
export declare class DetailManager<T extends Record<string, any> = any> {
|
|
32
54
|
private _d;
|
|
33
55
|
private _state;
|
|
@@ -38,37 +60,106 @@ export declare class DetailManager<T extends Record<string, any> = any> {
|
|
|
38
60
|
private _focusPendingRestore;
|
|
39
61
|
constructor(deps: DetailManagerDeps<T>);
|
|
40
62
|
private _mdOpts;
|
|
41
|
-
/** masterDetail.enabled 여부(옵션 자체 — 펼침 개수와 무관). */
|
|
63
|
+
/** masterDetail.enabled 여부(옵션 자체 — 펼침 개수와 무관). / Whether masterDetail.enabled is set (the option itself — independent of how many rows are expanded). */
|
|
42
64
|
get enabled(): boolean;
|
|
43
|
-
/** §3.2 v2: "isActive" = 기능 on + 실제 펼침 ≥1(FlatRowModel 합성/렌더 분기 판단용).
|
|
65
|
+
/** §3.2 v2: "isActive" = 기능 on + 실제 펼침 ≥1(FlatRowModel 합성/렌더 분기 판단용).
|
|
66
|
+
* / §3.2 v2: "isActive" = feature on AND at least one row expanded (used to branch
|
|
67
|
+
* FlatRowModel composition/rendering). */
|
|
44
68
|
get isActive(): boolean;
|
|
69
|
+
/** 현재 설정된 최대 중첩 깊이. / Currently configured maximum nesting depth. */
|
|
45
70
|
get maxDepth(): number;
|
|
46
71
|
private _resolveRowId;
|
|
72
|
+
/** stable rowId 기준 펼침 여부. / Whether the row is expanded, keyed by stable rowId.
|
|
73
|
+
*
|
|
74
|
+
* @param rowId - 대상 행의 stable id / Stable id of the target row
|
|
75
|
+
* @returns 펼쳐져 있으면 true / True if the row is expanded
|
|
76
|
+
*/
|
|
47
77
|
isExpandedId(rowId: string): boolean;
|
|
78
|
+
/** rowRef(flat index 또는 stable id) 기준 펼침 여부. / Whether the row is expanded, keyed by rowRef (flat index or stable id).
|
|
79
|
+
*
|
|
80
|
+
* @param ref - flat index 또는 `{ id }` 형태의 행 참조(C0.2) / Row reference as a flat index or `{ id }` (C0.2)
|
|
81
|
+
* @returns 펼쳐져 있으면 true / True if the row is expanded
|
|
82
|
+
*/
|
|
48
83
|
isRowExpanded(ref: DetailRowRef): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 지정 행을 펼친다. / Expand the given row.
|
|
86
|
+
*
|
|
87
|
+
* maxDepth 초과면 렌더러 진입 전에 거부하고(자식 패널 미생성) announce 로 알린다(CON-4/FR-10).
|
|
88
|
+
* / If maxDepth would be exceeded, the expansion is rejected before reaching the renderer
|
|
89
|
+
* (no child panel is created) and the rejection is announced (CON-4/FR-10).
|
|
90
|
+
*
|
|
91
|
+
* @param ref - flat index 또는 `{ id }` 형태의 행 참조 / Row reference as a flat index or `{ id }`
|
|
92
|
+
*/
|
|
49
93
|
expandRow(ref: DetailRowRef): void;
|
|
94
|
+
/**
|
|
95
|
+
* 지정 행을 접는다. / Collapse the given row.
|
|
96
|
+
*
|
|
97
|
+
* @param ref - flat index 또는 `{ id }` 형태의 행 참조 / Row reference as a flat index or `{ id }`
|
|
98
|
+
*/
|
|
50
99
|
collapseRow(ref: DetailRowRef): void;
|
|
100
|
+
/**
|
|
101
|
+
* 펼침/접힘 상태를 반전한다. / Toggle the row's expanded/collapsed state.
|
|
102
|
+
*
|
|
103
|
+
* @param ref - flat index 또는 `{ id }` 형태의 행 참조 / Row reference as a flat index or `{ id }`
|
|
104
|
+
*/
|
|
51
105
|
toggleRow(ref: DetailRowRef): void;
|
|
106
|
+
/** 펼쳐진 모든 행을 접는다(변경 없으면 no-op). / Collapse every currently expanded row (no-op if none are expanded). */
|
|
52
107
|
collapseAllDetails(): void;
|
|
108
|
+
/**
|
|
109
|
+
* 펼쳐진 행의 서브그리드/커스텀 렌더러 인스턴스를 조회한다. / Look up the subgrid or custom-renderer
|
|
110
|
+
* instance mounted for an expanded row.
|
|
111
|
+
*
|
|
112
|
+
* @param ref - flat index 또는 `{ id }` 형태의 행 참조 / Row reference as a flat index or `{ id }`
|
|
113
|
+
* @returns 마운트된 인스턴스, 없으면 `undefined` / The mounted instance, or `undefined`
|
|
114
|
+
*/
|
|
53
115
|
getDetailInstance<D = any>(ref: DetailRowRef): D | undefined;
|
|
54
116
|
/** FR-11 공개 계약 — 실제로는 리사이즈 이후 발생하는 통상 재렌더가 panel width 를 최신
|
|
55
117
|
* totalColWidth 로 이미 재계산하므로(§4.3 GridRenderer 가 매 렌더 폭을 새로 그린다), 여기선
|
|
56
|
-
* 강제 재렌더 1회로 계약을 만족시킨다(중복 상태 없이 단일 진실원 유지).
|
|
118
|
+
* 강제 재렌더 1회로 계약을 만족시킨다(중복 상태 없이 단일 진실원 유지).
|
|
119
|
+
* / FR-11 public contract — in practice, the normal re-render that follows a resize already
|
|
120
|
+
* recomputes panel width against the latest totalColWidth (§4.3: GridRenderer redraws width on
|
|
121
|
+
* every render), so this simply forces one re-render to satisfy the contract (no duplicate
|
|
122
|
+
* state; single source of truth is preserved). */
|
|
57
123
|
resyncPanelWidths(): void;
|
|
58
|
-
/** GridRenderer 가 detailHead 를 그릴 때 호출 — 영속 host 를 최초 1회만 만들고 이후 재사용.
|
|
124
|
+
/** GridRenderer 가 detailHead 를 그릴 때 호출 — 영속 host 를 최초 1회만 만들고 이후 재사용.
|
|
125
|
+
* / Called by GridRenderer when it draws a detailHead — creates the persistent host only
|
|
126
|
+
* once and reuses it thereafter.
|
|
127
|
+
*
|
|
128
|
+
* @param rowId - 대상 행의 stable id / Stable id of the target row
|
|
129
|
+
* @returns 재사용 가능한 host div / A reusable host div
|
|
130
|
+
*/
|
|
59
131
|
getPanelHost(rowId: string): HTMLElement;
|
|
60
132
|
private _buildInstance;
|
|
61
133
|
/** §5(4) skip-rebuild(FR-8/NFR-2, MCCONNELL-04 → Phase1 승격): renderBody teardown 직전
|
|
62
134
|
* 호출된다. 편집 중인 host 는 detach 자체를 회피(document.body 로 hoist, 연결 유지 → blur
|
|
63
|
-
* 없음) 하고, 그 외는 정상 detach(연결 끊음, 참조는 Map 이 쥐고 있어 파괴 아님).
|
|
135
|
+
* 없음) 하고, 그 외는 정상 detach(연결 끊음, 참조는 Map 이 쥐고 있어 파괴 아님).
|
|
136
|
+
* / §5(4) skip-rebuild (FR-8/NFR-2, MCCONNELL-04 → promoted to Phase1): called immediately
|
|
137
|
+
* before renderBody teardown. A host that is currently being edited avoids detach altogether
|
|
138
|
+
* (hoisted into document.body, staying connected → no blur); every other host is detached
|
|
139
|
+
* normally (disconnected, but not destroyed — the Map still holds the reference). */
|
|
64
140
|
onBeforeTeardown(): void;
|
|
141
|
+
/** 서브그리드/커스텀 렌더러 인스턴스가 현재 편집 중인지 여부. / Whether the subgrid/custom-renderer
|
|
142
|
+
* instance for a row is currently being edited.
|
|
143
|
+
*
|
|
144
|
+
* @param rowId - 대상 행의 stable id / Stable id of the target row
|
|
145
|
+
* @returns 편집 중이면 true / True if currently being edited
|
|
146
|
+
*/
|
|
65
147
|
isEditing(rowId: string): boolean;
|
|
66
148
|
/** collapse 직후 렌더가 끝난 뒤 호출 — FR-9: 패널 내부에 포커스가 있었으면 해당 마스터 행의
|
|
67
|
-
* expander 로 복원한다. GridRenderer 가 expander 엘리먼트를 렌더한 다음 프레임에 호출.
|
|
149
|
+
* expander 로 복원한다. GridRenderer 가 expander 엘리먼트를 렌더한 다음 프레임에 호출.
|
|
150
|
+
* / Called right after the render that follows a collapse — FR-9: if focus had been inside the
|
|
151
|
+
* panel, restore it to that master row's expander. GridRenderer calls this on the frame after
|
|
152
|
+
* it renders the expander element.
|
|
153
|
+
*
|
|
154
|
+
* @returns 포커스를 복원해야 할 행의 stable id, 없으면 `null` / Stable id of the row whose focus
|
|
155
|
+
* should be restored, or `null`
|
|
156
|
+
*/
|
|
68
157
|
consumePendingFocusRestore(): string | null;
|
|
69
158
|
private _releaseInstance;
|
|
70
159
|
private _splice;
|
|
71
160
|
private _afterToggle;
|
|
72
161
|
private _rebuildAndRender;
|
|
162
|
+
/** 모든 서브그리드/커스텀 렌더러 인스턴스를 파괴하고 host 캐시를 비운다.
|
|
163
|
+
* / Destroy every subgrid/custom-renderer instance and clear the host cache. */
|
|
73
164
|
destroy(): void;
|
|
74
165
|
}
|
|
@@ -1,23 +1,52 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* 커서를 따라다니는 점선 고스트. transform 으로 X·Y 모두 이동(부드럽게).
|
|
3
|
+
* / Dashed ghost that follows the cursor. Moves on both X and Y via transform (smoothly).
|
|
4
|
+
*
|
|
5
|
+
* @param rect - 잡은 행의 화면 사각형(위치·크기 기준) / Screen rect of the grabbed row (position/size basis)
|
|
6
|
+
* @param grabX - 잡은 시점의 커서 X(clientX) / Cursor X at grab time (clientX)
|
|
7
|
+
* @param grabY - 잡은 시점의 커서 Y(clientY) / Cursor Y at grab time (clientY)
|
|
8
|
+
* @param count - 함께 드래그하는 행 수(2 이상이면 배지 표시) / Number of rows dragged together (badge shown when > 1)
|
|
9
|
+
*/
|
|
2
10
|
export declare class DragGhost {
|
|
3
11
|
private _el;
|
|
4
12
|
private _dx;
|
|
5
13
|
private _dy;
|
|
6
14
|
constructor(rect: DOMRect, grabX: number, grabY: number, count: number);
|
|
7
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* 커서 위치로 이동 (grab 오프셋 유지).
|
|
17
|
+
* / Move to the cursor position (keeping the grab offset).
|
|
18
|
+
*
|
|
19
|
+
* @param clientX - 현재 커서 X(clientX) / Current cursor X (clientX)
|
|
20
|
+
* @param clientY - 현재 커서 Y(clientY) / Current cursor Y (clientY)
|
|
21
|
+
*/
|
|
8
22
|
move(clientX: number, clientY: number): void;
|
|
23
|
+
/** 고스트 요소를 DOM 에서 제거한다. / Remove the ghost element from the DOM. */
|
|
9
24
|
destroy(): void;
|
|
10
25
|
}
|
|
11
26
|
/**
|
|
12
27
|
* 드롭(삽입) 위치 마커. 행과 행 사이 경계에 "▶━━━◀" 형태로 또렷하게 표시해
|
|
13
|
-
* "여기에 삽입됩니다 / 지금 버튼을 떼면 됩니다" 를 직관적으로 알린다(
|
|
28
|
+
* "여기에 삽입됩니다 / 지금 버튼을 떼면 됩니다" 를 직관적으로 알린다(문서 편집기 표 삽입 표시 느낌).
|
|
14
29
|
* 자기 그리드/타깃 그리드 모두에 재사용.
|
|
30
|
+
* / Drop (insertion) position marker. Rendered crisply as "▶━━━◀" on the boundary between two
|
|
31
|
+
* rows so the user intuitively sees "it will be inserted here / release the button now"
|
|
32
|
+
* (like an inline table-insertion marker in a document editor). Reused for both the source
|
|
33
|
+
* grid and target grids.
|
|
34
|
+
*
|
|
35
|
+
* @param color - 마커 색(자기=파랑, 크로스=초록 등 구분용) / Marker color (e.g. blue for self, green for cross)
|
|
15
36
|
*/
|
|
16
37
|
export declare class DropIndicator {
|
|
17
38
|
private _el;
|
|
18
39
|
constructor(color?: string);
|
|
19
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* parent(그리드 바디) 안의 top(행 경계) 위치에 표시.
|
|
42
|
+
* / Show at the given top (row boundary) position inside parent (the grid body).
|
|
43
|
+
*
|
|
44
|
+
* @param parent - 마커를 붙일 컨테이너(그리드 바디) / Container to attach the marker to (grid body)
|
|
45
|
+
* @param top - parent 기준 세로 위치(px, 행 경계) / Vertical position relative to parent (px, row boundary)
|
|
46
|
+
*/
|
|
20
47
|
showIn(parent: HTMLElement, top: number): void;
|
|
48
|
+
/** 마커를 숨긴다(요소는 유지). / Hide the marker (element is kept). */
|
|
21
49
|
hide(): void;
|
|
50
|
+
/** 마커 요소를 DOM 에서 제거한다. / Remove the marker element from the DOM. */
|
|
22
51
|
destroy(): void;
|
|
23
52
|
}
|
|
@@ -1,11 +1,65 @@
|
|
|
1
1
|
type Handler = (...args: any[]) => any;
|
|
2
|
+
/**
|
|
3
|
+
* 최소 이벤트 발행/구독 허브. / Minimal publish/subscribe event hub.
|
|
4
|
+
*
|
|
5
|
+
* 그리드 코어 전반의 이벤트 배선에 쓰이는 경량 emitter. 모든 등록 메서드는
|
|
6
|
+
* 체이닝을 위해 `this` 를 반환한다.
|
|
7
|
+
* / Lightweight emitter used across the grid core for event wiring. Registration
|
|
8
|
+
* methods return `this` for chaining.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const bus = new EventEmitter();
|
|
12
|
+
* bus.on('dataChange', () => render()).emit('dataChange');
|
|
13
|
+
*/
|
|
2
14
|
export declare class EventEmitter {
|
|
3
15
|
private listeners;
|
|
16
|
+
/**
|
|
17
|
+
* 이벤트 핸들러 등록(반복 호출). / Register a handler for an event (fires repeatedly).
|
|
18
|
+
*
|
|
19
|
+
* @param event - 이벤트 이름 / Event name
|
|
20
|
+
* @param handler - 발화 시 호출될 콜백 / Callback invoked on emit
|
|
21
|
+
* @returns 체이닝용 this / this, for chaining
|
|
22
|
+
*/
|
|
4
23
|
on(event: string, handler: Handler): this;
|
|
24
|
+
/**
|
|
25
|
+
* 1회성 이벤트 핸들러 등록(발화 후 자동 제거). / Register a one-shot handler (auto-removed after first emit).
|
|
26
|
+
*
|
|
27
|
+
* @param event - 이벤트 이름 / Event name
|
|
28
|
+
* @param handler - 한 번만 호출될 콜백 / Callback invoked exactly once
|
|
29
|
+
* @returns 체이닝용 this / this, for chaining
|
|
30
|
+
*/
|
|
5
31
|
once(event: string, handler: Handler): this;
|
|
32
|
+
/**
|
|
33
|
+
* 핸들러 해제. handler 미지정 시 해당 이벤트의 모든 핸들러 제거.
|
|
34
|
+
* / Remove a handler. When `handler` is omitted, removes all handlers for the event.
|
|
35
|
+
*
|
|
36
|
+
* @param event - 이벤트 이름 / Event name
|
|
37
|
+
* @param handler - 제거할 특정 핸들러(생략 시 전체) / Specific handler to remove (omit for all)
|
|
38
|
+
* @returns 체이닝용 this / this, for chaining
|
|
39
|
+
*/
|
|
6
40
|
off(event: string, handler?: Handler): this;
|
|
41
|
+
/**
|
|
42
|
+
* 이벤트 발화 — 등록된 모든 핸들러를 순서대로 호출. / Emit an event — invokes all registered handlers in order.
|
|
43
|
+
*
|
|
44
|
+
* @param event - 이벤트 이름 / Event name
|
|
45
|
+
* @param args - 핸들러에 전달할 인자 / Arguments passed to handlers
|
|
46
|
+
* @returns 호출된 핸들러가 하나 이상이면 true / true if at least one handler was invoked
|
|
47
|
+
*/
|
|
7
48
|
emit(event: string, ...args: any[]): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 핸들러 일괄 제거. event 지정 시 해당 이벤트만, 미지정 시 전체.
|
|
51
|
+
* / Remove handlers in bulk — a single event when given, otherwise all.
|
|
52
|
+
*
|
|
53
|
+
* @param event - 비울 이벤트 이름(생략 시 전체) / Event to clear (omit for all)
|
|
54
|
+
* @returns 체이닝용 this / this, for chaining
|
|
55
|
+
*/
|
|
8
56
|
removeAllListeners(event?: string): this;
|
|
57
|
+
/**
|
|
58
|
+
* 특정 이벤트에 등록된 핸들러 수 반환. / Return the number of handlers registered for an event.
|
|
59
|
+
*
|
|
60
|
+
* @param event - 이벤트 이름 / Event name
|
|
61
|
+
* @returns 등록된 핸들러 개수 / Count of registered handlers
|
|
62
|
+
*/
|
|
9
63
|
listenerCount(event: string): number;
|
|
10
64
|
}
|
|
11
65
|
export {};
|