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.
Files changed (294) hide show
  1. package/CHANGELOG.md +376 -353
  2. package/README.md +1 -1
  3. package/dist/OpenGrid-B7m7ei7f.cjs +7385 -0
  4. package/dist/OpenGrid-CeUdO_fM.js +7398 -0
  5. package/dist/index-CeJ-0-80.cjs +260 -0
  6. package/dist/index-DnarQ4eR.js +266 -0
  7. package/dist/index-DrCPRuYi.js +548 -0
  8. package/dist/index-JjfWY3Bt.cjs +520 -0
  9. package/dist/open-grid-base.css +12 -1
  10. package/dist/open-grid-react.cjs +27 -1
  11. package/dist/open-grid-react.js +22 -82
  12. package/dist/open-grid-vue.cjs +31 -1
  13. package/dist/open-grid-vue.js +29 -79
  14. package/dist/open-grid.cjs +272 -6
  15. package/dist/open-grid.js +177 -266
  16. package/dist/types/bench/perf.d.ts +14 -8
  17. package/dist/types/core/AppearanceResolver.d.ts +98 -11
  18. package/dist/types/core/CFRenderBridge.d.ts +13 -0
  19. package/dist/types/core/CellEditManager.d.ts +73 -0
  20. package/dist/types/core/CellEventHandler.d.ts +99 -2
  21. package/dist/types/core/CellTypeRegistry.d.ts +24 -0
  22. package/dist/types/core/ChartManager.d.ts +51 -3
  23. package/dist/types/core/ColumnLayout.d.ts +100 -2
  24. package/dist/types/core/ContextMenu.d.ts +43 -2
  25. package/dist/types/core/CrossGridController.d.ts +86 -15
  26. package/dist/types/core/CrossGridMapper.d.ts +43 -5
  27. package/dist/types/core/CrossGridRegistry.d.ts +36 -2
  28. package/dist/types/core/DataLayer.d.ts +210 -15
  29. package/dist/types/core/DetailManager.d.ts +106 -15
  30. package/dist/types/core/DragVisuals.d.ts +33 -4
  31. package/dist/types/core/EventEmitter.d.ts +54 -0
  32. package/dist/types/core/ExportManager.d.ts +66 -1
  33. package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
  34. package/dist/types/core/FilterPanel.d.ts +17 -2
  35. package/dist/types/core/FilterSelect.d.ts +37 -13
  36. package/dist/types/core/FindBarManager.d.ts +26 -0
  37. package/dist/types/core/FlatRowModel.d.ts +54 -11
  38. package/dist/types/core/FooterManager.d.ts +53 -1
  39. package/dist/types/core/FormulaController.d.ts +139 -10
  40. package/dist/types/core/FormulaEngine.d.ts +15 -4
  41. package/dist/types/core/GridComposer.d.ts +54 -6
  42. package/dist/types/core/GridRenderer.d.ts +143 -10
  43. package/dist/types/core/GridShuttle.d.ts +44 -4
  44. package/dist/types/core/GroupEngine.d.ts +68 -10
  45. package/dist/types/core/GroupTreeManager.d.ts +86 -2
  46. package/dist/types/core/IconRegistry.d.ts +56 -9
  47. package/dist/types/core/KeyboardManager.d.ts +88 -4
  48. package/dist/types/core/MaskingEngine.d.ts +10 -9
  49. package/dist/types/core/MathUtils.d.ts +58 -5
  50. package/dist/types/core/MergeEngine.d.ts +45 -10
  51. package/dist/types/core/MutationService.d.ts +113 -10
  52. package/dist/types/core/OGDecimal.d.ts +144 -13
  53. package/dist/types/core/OpenGrid.d.ts +99 -0
  54. package/dist/types/core/OrgChart.d.ts +56 -1
  55. package/dist/types/core/OverrideKernel.d.ts +59 -15
  56. package/dist/types/core/Pagination.d.ts +38 -4
  57. package/dist/types/core/PivotEngine.d.ts +37 -0
  58. package/dist/types/core/RangeSelectionManager.d.ts +121 -7
  59. package/dist/types/core/RenderController.d.ts +56 -0
  60. package/dist/types/core/RowDragDrop.d.ts +52 -6
  61. package/dist/types/core/RowManager.d.ts +55 -0
  62. package/dist/types/core/SkinRegistry.d.ts +55 -15
  63. package/dist/types/core/SortFilterManager.d.ts +80 -1
  64. package/dist/types/core/TreeEngine.d.ts +60 -6
  65. package/dist/types/core/TriggerManager.d.ts +46 -0
  66. package/dist/types/core/VirtualScroll.d.ts +64 -0
  67. package/dist/types/core/WorksheetManager.d.ts +61 -2
  68. package/dist/types/core/XmlConverter.d.ts +56 -23
  69. package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
  70. package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
  71. package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
  72. package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
  73. package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
  74. package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
  75. package/dist/types/core/a11y/index.d.ts +13 -0
  76. package/dist/types/core/a11y/ports.d.ts +24 -0
  77. package/dist/types/core/appearance/Appearance.d.ts +68 -0
  78. package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
  79. package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
  80. package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
  81. package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
  82. package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
  83. package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
  84. package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
  85. package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
  86. package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
  87. package/dist/types/core/appearance/defaults.d.ts +10 -0
  88. package/dist/types/core/appearance/index.d.ts +20 -0
  89. package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
  90. package/dist/types/core/cf/CFEngine.d.ts +56 -0
  91. package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
  92. package/dist/types/core/cf/CFRule.d.ts +127 -0
  93. package/dist/types/core/cf/ColorScale.d.ts +49 -0
  94. package/dist/types/core/cf/InkResolver.d.ts +33 -0
  95. package/dist/types/core/cf/appearance.d.ts +20 -0
  96. package/dist/types/core/cf/encoders.d.ts +61 -0
  97. package/dist/types/core/cf/eval-types.d.ts +93 -0
  98. package/dist/types/core/cf/index.d.ts +21 -0
  99. package/dist/types/core/cf/lineage.d.ts +32 -0
  100. package/dist/types/core/cf/predicates.d.ts +27 -0
  101. package/dist/types/core/cf/serialize.d.ts +46 -0
  102. package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
  103. package/dist/types/core/chart/DataExtractor.d.ts +53 -12
  104. package/dist/types/core/chart/a11y.d.ts +22 -0
  105. package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
  106. package/dist/types/core/chart/downsample-report.d.ts +36 -0
  107. package/dist/types/core/chart/downsample.d.ts +26 -1
  108. package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
  109. package/dist/types/core/chart/geometry.d.ts +96 -0
  110. package/dist/types/core/chart/hittest.d.ts +21 -3
  111. package/dist/types/core/chart/palette.d.ts +96 -12
  112. package/dist/types/core/chart/parity.d.ts +12 -0
  113. package/dist/types/core/chart/provenance.d.ts +47 -0
  114. package/dist/types/core/chart/scales.d.ts +28 -1
  115. package/dist/types/core/chart/scene.d.ts +102 -0
  116. package/dist/types/core/chart/server.d.ts +36 -0
  117. package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
  118. package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
  119. package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
  120. package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
  121. package/dist/types/core/chart/types.d.ts +107 -10
  122. package/dist/types/core/command/CommandBus.d.ts +51 -0
  123. package/dist/types/core/command/CommandRegistry.d.ts +43 -0
  124. package/dist/types/core/command/CommandStack.d.ts +38 -0
  125. package/dist/types/core/command/ICommand.d.ts +110 -0
  126. package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
  127. package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
  128. package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
  129. package/dist/types/core/command/index.d.ts +9 -0
  130. package/dist/types/core/command/support.d.ts +51 -0
  131. package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
  132. package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
  133. package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
  134. package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
  135. package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
  136. package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
  137. package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
  138. package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
  139. package/dist/types/core/coordinate/index.d.ts +10 -0
  140. package/dist/types/core/coordinate/ports.d.ts +45 -0
  141. package/dist/types/core/coordinate/types.d.ts +76 -0
  142. package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
  143. package/dist/types/core/detail/DetailSplice.d.ts +42 -11
  144. package/dist/types/core/detail/DetailState.d.ts +80 -11
  145. package/dist/types/core/detail/SubgridCache.d.ts +72 -10
  146. package/dist/types/core/detail/index.d.ts +8 -0
  147. package/dist/types/core/domain/AggregateResult.d.ts +54 -0
  148. package/dist/types/core/domain/CellAddress.d.ts +61 -0
  149. package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
  150. package/dist/types/core/domain/Delta.d.ts +37 -0
  151. package/dist/types/core/domain/DomainValue.d.ts +80 -0
  152. package/dist/types/core/domain/Missing.d.ts +65 -0
  153. package/dist/types/core/domain/Money.d.ts +42 -0
  154. package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
  155. package/dist/types/core/domain/Plain.d.ts +45 -0
  156. package/dist/types/core/domain/Quantity.d.ts +32 -0
  157. package/dist/types/core/domain/Ratios.d.ts +100 -0
  158. package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
  159. package/dist/types/core/domain/ValueType.d.ts +71 -0
  160. package/dist/types/core/domain/rounding.d.ts +25 -0
  161. package/dist/types/core/domain/strategies.d.ts +38 -0
  162. package/dist/types/core/editors/CellEditor.d.ts +29 -2
  163. package/dist/types/core/editors/DateEditor.d.ts +18 -0
  164. package/dist/types/core/editors/SelectEditor.d.ts +29 -0
  165. package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
  166. package/dist/types/core/export/ExportManifest.d.ts +13 -0
  167. package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
  168. package/dist/types/core/export/Provenance.d.ts +34 -0
  169. package/dist/types/core/export/StreamPump.d.ts +28 -0
  170. package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
  171. package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
  172. package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
  173. package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
  174. package/dist/types/core/export/channels/capabilities.d.ts +13 -0
  175. package/dist/types/core/export/index.d.ts +24 -0
  176. package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
  177. package/dist/types/core/export/print/Paginator.d.ts +48 -0
  178. package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
  179. package/dist/types/core/export/sinks.d.ts +40 -0
  180. package/dist/types/core/export/types.d.ts +211 -0
  181. package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
  182. package/dist/types/core/extension/IExtension.d.ts +90 -0
  183. package/dist/types/core/extension/Registry.d.ts +142 -0
  184. package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
  185. package/dist/types/core/extension/adapters.d.ts +44 -0
  186. package/dist/types/core/extension/conformance.d.ts +47 -0
  187. package/dist/types/core/extension/index.d.ts +16 -0
  188. package/dist/types/core/extension/registries.d.ts +31 -0
  189. package/dist/types/core/extension/reserved.d.ts +10 -0
  190. package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
  191. package/dist/types/core/format/FormatCache.d.ts +20 -0
  192. package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
  193. package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
  194. package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
  195. package/dist/types/core/format/index.d.ts +55 -0
  196. package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
  197. package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
  198. package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
  199. package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
  200. package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
  201. package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
  202. package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
  203. package/dist/types/core/format/types.d.ts +292 -0
  204. package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
  205. package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
  206. package/dist/types/core/formula/CalcService.d.ts +137 -0
  207. package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
  208. package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
  209. package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
  210. package/dist/types/core/formula/FormulaParser.d.ts +9 -0
  211. package/dist/types/core/formula/FormulaStore.d.ts +63 -1
  212. package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
  213. package/dist/types/core/formula/Generation.d.ts +86 -0
  214. package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
  215. package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
  216. package/dist/types/core/formula/functions/essential.d.ts +3 -0
  217. package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
  218. package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
  219. package/dist/types/core/formula/numericLiteral.d.ts +11 -1
  220. package/dist/types/core/formula/serializeFormula.d.ts +10 -1
  221. package/dist/types/core/formula/types.d.ts +71 -8
  222. package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
  223. package/dist/types/core/host/GridHostDriver.d.ts +27 -0
  224. package/dist/types/core/host/GridHostPort.d.ts +37 -0
  225. package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
  226. package/dist/types/core/host/archCheck.d.ts +26 -0
  227. package/dist/types/core/host/index.d.ts +6 -0
  228. package/dist/types/core/host/reconcile.d.ts +22 -0
  229. package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
  230. package/dist/types/core/i18n/types.d.ts +26 -1
  231. package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
  232. package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
  233. package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
  234. package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
  235. package/dist/types/core/quality/PerfSpec.d.ts +95 -0
  236. package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
  237. package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
  238. package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
  239. package/dist/types/core/quality/VisualRegression.d.ts +74 -0
  240. package/dist/types/core/quality/hooks.d.ts +53 -0
  241. package/dist/types/core/quality/index.d.ts +20 -0
  242. package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
  243. package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
  244. package/dist/types/core/range/FillEngine.d.ts +69 -9
  245. package/dist/types/core/range/RangeModel.d.ts +100 -13
  246. package/dist/types/core/range/RangeQuery.d.ts +24 -2
  247. package/dist/types/core/range/types.d.ts +27 -11
  248. package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
  249. package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
  250. package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
  251. package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
  252. package/dist/types/core/realtime/PollingSource.d.ts +42 -0
  253. package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
  254. package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
  255. package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
  256. package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
  257. package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
  258. package/dist/types/core/realtime/backoff.d.ts +12 -0
  259. package/dist/types/core/realtime/index.d.ts +13 -0
  260. package/dist/types/core/realtime/ports.d.ts +80 -0
  261. package/dist/types/core/render/CellApplier.d.ts +18 -0
  262. package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
  263. package/dist/types/core/render/CellPipeline.d.ts +39 -0
  264. package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
  265. package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
  266. package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
  267. package/dist/types/core/render/RenderBudget.d.ts +67 -0
  268. package/dist/types/core/render/contrast.d.ts +33 -0
  269. package/dist/types/core/render/index.d.ts +35 -0
  270. package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
  271. package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
  272. package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
  273. package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
  274. package/dist/types/core/render/stages/index.d.ts +14 -0
  275. package/dist/types/core/renderers/CellRenderer.d.ts +100 -8
  276. package/dist/types/core/state/AutosaveController.d.ts +63 -0
  277. package/dist/types/core/state/IStatePersistence.d.ts +59 -0
  278. package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
  279. package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
  280. package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
  281. package/dist/types/core/state/StateCodec.d.ts +75 -0
  282. package/dist/types/core/state/index.d.ts +6 -0
  283. package/dist/types/core/types.d.ts +17 -0
  284. package/dist/types/react/OpenGrid.d.ts +54 -0
  285. package/dist/types/react/index.d.ts +5 -0
  286. package/dist/types/realtime/index.d.ts +1 -0
  287. package/dist/types/vue/index.d.ts +5 -0
  288. package/dist/types/vue/types.d.ts +35 -0
  289. package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
  290. package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
  291. package/package.json +112 -110
  292. package/dist/OpenGrid-B0Spm0rU.js +0 -10404
  293. package/dist/OpenGrid-CuXj0isp.cjs +0 -97
  294. package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
@@ -3,39 +3,80 @@ import { RowDragDrop } from './RowDragDrop.js';
3
3
  import { MergeEngine } from './MergeEngine.js';
4
4
  import { AppearanceResolver } from './AppearanceResolver.js';
5
5
  import { ColumnDef, SortItem, CellRange, GridOptions, FilterItem } from './types.js';
6
+ /**
7
+ * R9(§6-R9 / §2.5 R-4a): 렌더러가 소비하는 opts 타입. 공개 GridOptions(생성 시 기본값 병합
8
+ * 완료 = Required) 위에, 렌더 파이프라인이 매 프레임 주입하는 내부 증강 필드(언더스코어 접두)를
9
+ * 얹은 것. 내부 필드는 렌더 파이프라인에서만 채워지며 공개 API 가 아니다(값은 항상 매니저 최신값).
10
+ * / R9 (§6-R9 / §2.5 R-4a): the opts type the renderer consumes. On top of the public GridOptions
11
+ * (defaults already merged at construction = Required), it adds internal augmentation fields
12
+ * (underscore-prefixed) injected each frame by the render pipeline. The internal fields are filled
13
+ * only by the render pipeline and are not public API (values are always the manager's latest).
14
+ * @internal
15
+ */
6
16
  export interface RenderOptions extends Required<GridOptions> {
7
- /** ColumnLayout.frozenCount — 고정 컬럼 수(헤더/본문 좌측 오프셋 계산). */
17
+ /** ColumnLayout.frozenCount — 고정 컬럼 수(헤더/본문 좌측 오프셋 계산). / Frozen column count (header/body left-offset calc). */
8
18
  _frozenCount?: number;
9
- /** SortFilterManager.filters — 필터 아이콘 활성 표시용. */
19
+ /** 활성 필터 — 필터 아이콘 활성 표시용. / Active filters — to mark the filter icon active. */
10
20
  _activeFilters?: Record<string, FilterItem[]>;
11
- /** DnD 핸들에 넘길 총 행수. */
21
+ /** DnD 핸들에 넘길 총 행수. / Total row count passed to the DnD handle. */
12
22
  _totalRows?: number;
13
- /** CellEditManager.focusCell — 포커스 셀 하이라이트. */
23
+ /** 포커스 셀 — 포커스 셀 하이라이트. / The focus cell — for focus-cell highlighting. */
14
24
  _focusCell?: {
15
25
  ri: number;
16
26
  ci: number;
17
27
  } | null;
18
- /** RangeSelectionManager — 범위 선택 rect 하이라이트 재적용 재료(비-'cells' 모드면 없음). */
28
+ /** 범위 선택 rect 하이라이트 재적용 재료(비-'cells' 모드면 없음). / Rects to re-apply range-selection highlight (absent outside 'cells' mode). */
19
29
  _rangeRects?: CellRange[];
20
30
  }
31
+ /**
32
+ * R3(§6-R3 / §2.5 R-4b): renderBody 의 위치 인자 묶음을 단일 파라미터 객체로.
33
+ * R9: opts 필드 타입 복원(any → RenderOptions). 나머지 필드는 기존 위치 인자의 타입 그대로.
34
+ * / R3 (§6-R3 / §2.5 R-4b): renderBody's positional arguments gathered into a single parameter
35
+ * object. R9: opts field typed as RenderOptions (was any); the remaining fields keep the types of
36
+ * the former positional arguments.
37
+ * @internal
38
+ */
21
39
  export interface RenderFrame {
40
+ /** 가시 구간 시작 flat 행 인덱스. / First visible flat row index. */
22
41
  startIndex: number;
42
+ /** 가시 구간 끝 flat 행 인덱스. / Last visible flat row index. */
23
43
  endIndex: number;
44
+ /** 행 데이터 소스. / Row data source. */
24
45
  data: DataLayer<any>;
46
+ /** 리프 컬럼 정의 배열. / Leaf column definitions. */
25
47
  leaves: ColumnDef[];
48
+ /** 리프 컬럼별 너비(px). / Per-leaf column widths (px). */
26
49
  widths: number[];
50
+ /** 렌더 옵션(내부 증강 포함). / Render options (with internal augmentation). */
27
51
  opts: RenderOptions;
52
+ /** 가상 스크롤 상단 오프셋(px). / Virtual-scroll top offset (px). */
28
53
  offsetY: number;
54
+ /** 전체 스크롤 높이(px). / Total scroll height (px). */
29
55
  totalHeight: number;
56
+ /** 선택된 행 집합. / Set of selected rows. */
30
57
  selectedRows: Set<number>;
58
+ /** 체크된 행 집합. / Set of checked rows. */
31
59
  checkedRows: Set<number>;
60
+ /** 그룹/트리 플랫 행(그룹핑 시). / Grouped/tree flat rows (when grouping). */
32
61
  groupFlatRows?: Array<any> | null;
62
+ /** 그룹 접기/펴기 콜백. / Group collapse/expand callback. */
33
63
  onGroupToggle?: ((key: string) => void) | undefined;
64
+ /** 트리 노드 접기/펴기 콜백. / Tree-node collapse/expand callback. */
34
65
  onTreeToggle?: ((nodeId: any) => void) | undefined;
66
+ /** opts 위에 병합할 추가 옵션(DnD 총행수 등). / Extra options merged over opts (e.g. DnD total rows). */
35
67
  extraOpts?: Record<string, any>;
68
+ /** 셀 병합 엔진(있으면). / Cell-merge engine (if any). */
36
69
  mergeEngine?: MergeEngine | undefined;
70
+ /** 마스터/디테일 렌더 배선(F2, 비활성 시 undefined). / Master/detail render wiring (F2; undefined when disabled). */
37
71
  detailApi?: DetailRenderContext | undefined;
38
72
  }
73
+ /**
74
+ * 렌더러가 상위(RenderController/OpenGrid)로 이벤트를 되돌리고 상태를 질의하는 콜백 묶음.
75
+ * 매 렌더 최신값으로 채워진다.
76
+ * / The callback bundle through which the renderer sends events back to and queries state from the
77
+ * host (RenderController/OpenGrid). Filled with the latest values each render.
78
+ * @internal
79
+ */
39
80
  export interface RendererCallbacks {
40
81
  onHeaderClick: (field: string, shiftKey: boolean) => void;
41
82
  onCellClick: (ri: number, ci: number, e: MouseEvent) => void;
@@ -62,27 +103,49 @@ export interface RendererCallbacks {
62
103
  approx: boolean;
63
104
  } | null;
64
105
  t?: (key: string, params?: Record<string, string | number>) => string;
106
+ applyCF?: (cellEl: HTMLElement, rowIndex: number, field: string, value: unknown, cellW: number, cellH: number) => void;
65
107
  }
66
108
  /**
67
- * F2(11_design_F2_v2.md §4/§5, C6/C10): renderBody 가 detail head/filler 분기·expander 셀을
68
- * 그릴 때 소비하는 배선 콜백 묶음. OpenGrid._buildDetailRenderContext() 가 매 렌더 새로 만들어
69
- * 넘긴다(옵션/상태는 항상 DetailManager 최신값). masterDetail.enabled 가 아니면 undefined.
109
+ * F2(§4/§5, C6/C10): renderBody 가 detail head/filler 분기·expander 셀을 그릴 때 소비하는 배선
110
+ * 콜백 묶음. 매 렌더 새로 만들어 넘긴다(옵션/상태는 항상 DetailManager 최신값). masterDetail.enabled
111
+ * 가 아니면 undefined.
112
+ * / F2 (§4/§5, C6/C10): the wiring-callback bundle renderBody consumes when drawing detail
113
+ * head/filler branches and the expander cell. Rebuilt and passed each render (options/state are
114
+ * always DetailManager's latest). undefined unless masterDetail.enabled.
115
+ * @internal
70
116
  */
71
117
  export interface DetailRenderContext {
118
+ /** 토글 위치 모드(전용 컬럼 vs 첫 셀). / Toggle placement mode (dedicated column vs first cell). */
72
119
  toggleMode: 'expander-col' | 'first-cell';
120
+ /** 디테일 패널 aria-label. / Detail-panel aria-label. */
73
121
  ariaLabel: string;
122
+ /** 행 → rowId 해소. / Resolve a row to its rowId. */
74
123
  getRowId: (row: any) => string;
124
+ /** rowId 가 펼쳐졌는가. / Whether the rowId is expanded. */
75
125
  isExpanded: (rowId: string) => boolean;
126
+ /** 토글 클릭 처리. / Handle a toggle click. */
76
127
  onToggle: (rowIndex: number, rowId: string) => void;
128
+ /** 확장 상태별 글리프·라벨·title. / Glyph/label/title per expanded state. */
77
129
  getGlyph: (expanded: boolean) => {
78
130
  glyph: string;
79
131
  ariaLabel: string;
80
132
  title: string;
81
133
  };
134
+ /** rowId 의 영속 패널 host 요소. / The persistent panel host element for a rowId. */
82
135
  getPanelHost: (rowId: string) => HTMLElement;
83
- /** renderBody 매 호출 시작(teardown 직전) — 편집중 host hoist + 나머지 detach(§5). */
136
+ /** renderBody 매 호출 시작(teardown 직전) — 편집중 host hoist + 나머지 detach(§5). / Start of each renderBody call (just before teardown) — hoist the editing host, detach the rest (§5). */
84
137
  onBeforeTeardown: () => void;
85
138
  }
139
+ /**
140
+ * 그리드의 DOM 렌더러. 루트에 헤더·본문 래퍼를 마운트하고, 가상 스크롤 프레임마다 헤더/본문 셀을
141
+ * 다시 그린다. 스타일 결정은 AppearanceResolver(R12a C10) 한 곳을 경유하고, host-isolation 을 위해
142
+ * load-bearing 스타일은 인라인으로 쓴다. 상위 상태 접근·이벤트 반환은 전부 RendererCallbacks 경유.
143
+ * / The grid's DOM renderer. Mounts the header and body wrapper into the root and repaints
144
+ * header/body cells for each virtual-scroll frame. Style decisions route through the single
145
+ * AppearanceResolver (R12a C10), and load-bearing styles are written inline for host isolation.
146
+ * All host-state access and event return goes through RendererCallbacks.
147
+ * @internal
148
+ */
86
149
  export declare class GridRenderer {
87
150
  private _root;
88
151
  private _header;
@@ -92,15 +155,68 @@ export declare class GridRenderer {
92
155
  private _cbs;
93
156
  private _ap;
94
157
  private _cellMap;
158
+ /** 본문 스크롤 래퍼 요소(스크롤/뷰포트 계산 접근용). / The body scroll-wrapper element (for scroll/viewport calculations). */
95
159
  get bodyWrapper(): HTMLElement;
96
160
  /** i18n: 렌더 로케일 해석기 — cbs.t(인스턴스 로케일) 우선, 미주입 시 전역 t. / i18n: cbs.t (instance locale) first, global t otherwise. */
97
161
  private _t;
162
+ /**
163
+ * 루트에 헤더·본문 래퍼를 마운트하고 헤더-본문 가로 스크롤을 동기화한다.
164
+ * / Mount the header and body wrapper into the root and sync header–body horizontal scroll.
165
+ *
166
+ * @param root - 렌더러가 채울 컨테이너 요소 / Container element the renderer fills
167
+ * @param opts - 렌더 옵션(기본값 병합 완료) / Render options (defaults already merged)
168
+ * @param cbs - 이벤트/상태 콜백 묶음 / Event/state callback bundle
169
+ * @param appearance - 스타일 결정 resolver(미주입 시 테마 컨텍스트로 생성) / Style-decision resolver (created from the theme context if not injected)
170
+ */
98
171
  constructor(root: HTMLElement, opts: RenderOptions, cbs: RendererCallbacks, appearance?: AppearanceResolver);
172
+ /**
173
+ * 본문 래퍼 높이를 전체 높이에서 헤더 높이를 뺀 값으로 설정한다.
174
+ * / Set the body wrapper's height to the total height minus the header height.
175
+ *
176
+ * @param totalHeight - 그리드 전체 높이(px) / Total grid height (px)
177
+ * @param headerHeight - 헤더 높이(px) / Header height (px)
178
+ */
99
179
  updateSize(totalHeight: number, headerHeight: number): void;
100
- /** 현재 렌더된 헤더 영역의 실제 높이(px). 헤더 줄바꿈으로 늘어난 높이를 레이아웃에 반영할 때 사용. */
180
+ /**
181
+ * 현재 렌더된 헤더 영역의 실제 높이(px). 헤더 줄바꿈으로 늘어난 높이를 레이아웃에 반영할 때 사용.
182
+ * / The actual height (px) of the currently rendered header. Used to reflect height grown by
183
+ * header wrapping back into layout.
184
+ *
185
+ * @returns 헤더 offsetHeight(px) / The header offsetHeight (px)
186
+ */
101
187
  getHeaderHeight(): number;
188
+ /**
189
+ * 헤더 영역을 다시 그린다 — 다단 헤더 행·정렬/필터 아이콘·리사이저·컬럼 재정렬·고정 컬럼
190
+ * 오프셋을 반영한다. 매 호출 헤더 innerHTML 을 재구성한다.
191
+ * / Repaint the header — reflecting multi-row headers, sort/filter icons, resizers, column
192
+ * reordering, and frozen-column offsets. Rebuilds the header innerHTML each call.
193
+ *
194
+ * @param headerRows - 다단 헤더 셀 행렬 / Multi-row header cell matrix
195
+ * @param leaves - 리프 컬럼 정의 / Leaf column definitions
196
+ * @param widths - 리프 컬럼 너비(px) / Leaf column widths (px)
197
+ * @param sortList - 활성 정렬 항목 / Active sort items
198
+ * @param opts - 렌더 옵션(고정 컬럼 수·필터 등) / Render options (frozen count, filters, …)
199
+ */
102
200
  renderHeader(headerRows: any[][], leaves: ColumnDef[], widths: number[], sortList: SortItem[], opts: RenderOptions): void;
201
+ /**
202
+ * 본문 가시 구간을 다시 그린다 — 그룹/트리 행·상태/선택 배경·고정 컬럼·셀 병합·마스터/디테일
203
+ * 패널·수식 메타를 반영하고, rowIndex→colIndex→cellEl 맵을 재구성한다(getCellEl 근거).
204
+ * / Repaint the visible body range — reflecting group/tree rows, state/selection backgrounds,
205
+ * frozen columns, cell merges, master/detail panels, and formula meta, and rebuilding the
206
+ * rowIndex→colIndex→cellEl map (the basis for getCellEl).
207
+ *
208
+ * @param frame - 렌더 프레임(구간·데이터·컬럼·상태·배선) / The render frame (range, data, columns, state, wiring)
209
+ */
103
210
  renderBody(frame: RenderFrame): void;
211
+ /**
212
+ * 마지막 renderBody 가 만든 셀 요소를 조회한다(맵 미스면 undefined — 가시 구간 밖이거나 병합 은닉).
213
+ * / Look up a cell element from the last renderBody (undefined on map miss — outside the visible
214
+ * range or hidden by a merge).
215
+ *
216
+ * @param rowIndex - flat 행 인덱스 / Flat row index
217
+ * @param colIndex - 리프 컬럼 인덱스 / Leaf column index
218
+ * @returns 셀 요소 또는 undefined / The cell element, or undefined
219
+ */
104
220
  getCellEl(rowIndex: number, colIndex: number): HTMLElement | undefined;
105
221
  /**
106
222
  * F2(§4.3 C6): full-width 디테일 패널을 body-absolute 로 그린다(병합 마스터셀 선례
@@ -109,8 +225,25 @@ export declare class GridRenderer {
109
225
  * DOM 이동만 발생하므로(파괴 아님) 재렌더/스크롤 왕복에도 인스턴스 상태가 생존한다.
110
226
  */
111
227
  private _appendDetailPanel;
228
+ /**
229
+ * 렌더러가 마운트한 DOM 을 전부 제거해 루트를 비운다.
230
+ * / Remove all DOM the renderer mounted, emptying the root.
231
+ */
112
232
  destroy(): void;
113
233
  }
234
+ /**
235
+ * 태그(+선택 className)로 요소를 만든다. / Create an element from a tag (+optional className).
236
+ * @internal
237
+ */
114
238
  export declare function _el(tag: string, className?: string): HTMLElement;
239
+ /**
240
+ * 요소 style 에 부분 스타일을 병합한다. / Merge a partial style bag into an element's style.
241
+ * @internal
242
+ */
115
243
  export declare function _style(el: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
244
+ /**
245
+ * 문자열 내용을 파일로 다운로드시킨다(Blob URL 생성 후 즉시 해제).
246
+ * / Trigger a file download of string content (creates then immediately revokes a Blob URL).
247
+ * @internal
248
+ */
116
249
  export declare function _downloadText(content: string, filename: string, mime?: string): void;
@@ -1,10 +1,15 @@
1
1
  import { OpenGridInstance } from './types.js';
2
+ /**
3
+ * 그리드 셔틀 생성 옵션. / Grid shuttle construction options.
4
+ */
2
5
  export interface GridShuttleOptions {
3
- /** 버튼 배치 방향 (기본 'vertical') */
6
+ /** 버튼 배치 방향. 기본 'vertical'. / Button layout direction. Default 'vertical'.
7
+ * @defaultValue 'vertical' */
4
8
  layout?: 'vertical' | 'horizontal';
5
- /** 전체 이동(≫ ≪) 버튼도 표시 (기본 false) */
9
+ /** 전체 이동(≫ ≪) 버튼도 표시. 기본 false. / Also show move-all (≫ ≪) buttons. Default false.
10
+ * @defaultValue false */
6
11
  includeAll?: boolean;
7
- /** 버튼 라벨 커스터마이즈 */
12
+ /** 버튼 라벨 커스터마이즈. / Customize button labels. */
8
13
  labels?: {
9
14
  toRight?: string;
10
15
  toLeft?: string;
@@ -12,13 +17,48 @@ export interface GridShuttleOptions {
12
17
  allLeft?: string;
13
18
  };
14
19
  }
20
+ /**
21
+ * 두 그리드 사이의 셔틀 UI. / Shuttle UI between two grids.
22
+ *
23
+ * 두 그리드 사이에 화살표 버튼을 두고 "체크된 행"을 드래그 없이 버튼으로 이동(move)시킨다.
24
+ * 이동은 `grid.moveCheckedTo()` 를 호출하므로 crossGridMapping(필드 매핑)과 3단계 이벤트가
25
+ * 드래그 이동과 100% 동일하게 적용된다.
26
+ * / Places arrow buttons between two grids to move "checked rows" without dragging.
27
+ * The move delegates to `grid.moveCheckedTo()`, so crossGridMapping (field mapping) and the
28
+ * 3-stage events apply identically to drag-based moves.
29
+ *
30
+ * @example
31
+ * const shuttle = new GridShuttle(leftGrid, rightGrid, document.querySelector('#mid')!, {
32
+ * layout: 'vertical',
33
+ * includeAll: true,
34
+ * });
35
+ */
15
36
  export declare class GridShuttle {
16
37
  private _left;
17
38
  private _right;
18
39
  private _el;
40
+ /**
41
+ * @param _left - 왼쪽 그리드 인스턴스 / Left grid instance
42
+ * @param _right - 오른쪽 그리드 인스턴스 / Right grid instance
43
+ * @param mount - 셔틀 버튼을 붙일 마운트 엘리먼트 / Mount element to attach the shuttle buttons
44
+ * @param opts - 셔틀 옵션 / Shuttle options
45
+ */
19
46
  constructor(_left: OpenGridInstance, _right: OpenGridInstance, mount: HTMLElement, opts?: GridShuttleOptions);
20
47
  private _moveAll;
48
+ /** 셔틀 UI 를 DOM 에서 제거한다. / Remove the shuttle UI from the DOM. */
21
49
  destroy(): void;
22
50
  }
23
- /** 두 그리드 사이에 셔틀(화살표 이동) 버튼을 만든다 */
51
+ /**
52
+ * 두 그리드 사이에 셔틀(화살표 이동) 버튼을 만든다. / Create shuttle (arrow-move) buttons between two grids.
53
+ *
54
+ * `new GridShuttle(...)` 의 편의 팩토리. / Convenience factory for `new GridShuttle(...)`.
55
+ *
56
+ * @param left - 왼쪽 그리드 인스턴스 / Left grid instance
57
+ * @param right - 오른쪽 그리드 인스턴스 / Right grid instance
58
+ * @param mount - 셔틀 버튼을 붙일 마운트 엘리먼트 / Mount element to attach the shuttle buttons
59
+ * @param opts - 셔틀 옵션 / Shuttle options
60
+ * @returns 생성된 GridShuttle 인스턴스 / The created GridShuttle instance
61
+ * @example
62
+ * const shuttle = createGridShuttle(leftGrid, rightGrid, mountEl, { includeAll: true });
63
+ */
24
64
  export declare function createGridShuttle(left: OpenGridInstance, right: OpenGridInstance, mount: HTMLElement, opts?: GridShuttleOptions): GridShuttle;
@@ -1,50 +1,108 @@
1
1
  import { SummaryOp } from './types.js';
2
+ /** 그룹 헤더 행 — 하위 행 집계·상태·펼침 메타를 담는다. / A group header row — carries child aggregation, state, and expansion metadata. */
2
3
  export interface GroupRow<T = any> {
4
+ /** 그룹 행 판별 플래그(항상 true). / Group-row discriminant flag (always true). */
3
5
  _isGroup: true;
6
+ /** 그룹핑 기준 필드명. / Field this level is grouped by. */
4
7
  _groupField: string;
8
+ /** 그룹 값(원본). / Raw group value. */
5
9
  _groupValue: any;
10
+ /** 표시용 그룹 라벨(null 값은 전역 로케일 라벨로 대체). / Display label (null values fall back to the global locale label). */
6
11
  _groupLabel: string;
12
+ /** 그룹 깊이(0-base). / Group depth (0-based). */
7
13
  _depth: number;
14
+ /** 펼침 여부. / Whether the group is expanded. */
8
15
  _expanded: boolean;
16
+ /** 하위 행 수. / Number of child rows. */
9
17
  _childCount: number;
18
+ /** { field → 계산값(number) }. / { field → computed value (number) }. */
10
19
  _summary: Record<string, any>;
20
+ /** { field → 포맷된 문자열 }. / { field → formatted string }. */
11
21
  _summaryFmt: Record<string, string>;
22
+ /** 하위 행 편집 상태 카운트. / Edit-state counts among child rows. */
12
23
  _states: {
13
24
  added: number;
14
25
  edited: number;
15
26
  removed: number;
16
27
  };
28
+ /** 자식(중첩 그룹 또는 원본 행). / Children (nested groups or raw rows). */
17
29
  children: Array<GroupRow<T> | T>;
18
30
  }
31
+ /** 그룹 항목 — 그룹 헤더 행 또는 원본 행. / A group item — either a group header row or a raw row. */
19
32
  export type GroupItem<T> = GroupRow<T> | T;
33
+ /** 그룹 집계(summary) 정의. / A group summary (aggregation) definition. */
20
34
  export interface SummaryDef {
35
+ /** 집계 대상 필드명. / Field to aggregate. */
21
36
  field: string;
37
+ /** 집계 연산(SUM/AVG/COUNT/MIN/MAX). / Aggregation op (SUM/AVG/COUNT/MIN/MAX). */
22
38
  op: SummaryOp;
39
+ /** 표시 라벨(선택). / Display label (optional). */
23
40
  label?: string;
41
+ /** 숫자 포맷 예: '#,##0' | '#,##0.00' | '0.00' | '2'. / Number format, e.g. '#,##0' | '#,##0.00' | '0.00' | '2'. */
24
42
  format?: string;
25
43
  }
26
44
  declare function _isGroup<T>(item: any): item is GroupRow<T>;
27
45
  /**
28
- * flat 데이터를 fields 기준으로 계층 그룹핑.
46
+ * flat 데이터를 fields 기준으로 계층 그룹핑. / Hierarchically group flat data by `fields`.
47
+ *
29
48
  * Phase 2 슬롯 #5: groupKeyFn(getKey) — 미지정 시 default = `row[field]`(현행 단일 필드 키).
30
49
  * GroupTreeManager 가 host.getStrategy 로 주입. ⚠️ 핫패스(행당) — 슬롯 예외 비격리.
50
+ * / Phase 2 slot #5: groupKeyFn (`getKey`) — when unset the default is `row[field]` (the current
51
+ * single-field key), injected by GroupTreeManager via host.getStrategy. ⚠️ Hot path (per row) —
52
+ * exceptions thrown by the slot are not isolated.
53
+ *
54
+ * @typeParam T - 행 데이터 타입 / Row data type
55
+ * @param data - flat 행 배열 / Flat rows
56
+ * @param fields - 그룹핑 기준 필드 순서 / Fields to group by, in order
57
+ * @param summaryDefs - 그룹별 집계 정의(기본 없음) / Per-group aggregation defs (default none)
58
+ * @param expandedKeys - 펼침 상태 그룹 키 집합 / Set of expanded group keys
59
+ * @param getRowState - 행 편집 상태 조회자(선택) / Optional row edit-state accessor
60
+ * @param getKey - 그룹 키 계산 슬롯(선택) / Optional group-key computation slot
61
+ * @returns 최상위 그룹 행 배열 / Array of top-level group rows
62
+ * @example
63
+ * const groups = buildGroups(rows, ['region', 'city'], [{ field: 'amount', op: 'SUM' }]);
64
+ * const flat = flattenGroups(groups); // 화면 표시용 / for on-screen display
31
65
  */
32
66
  export declare function buildGroups<T extends Record<string, any>>(data: T[], fields: string[], summaryDefs?: SummaryDef[], expandedKeys?: Set<string>, getRowState?: (row: T) => string, getKey?: (row: T, remainingFields: string[]) => any): GroupRow<T>[];
33
67
  /**
34
- * 숫자 포맷팅 (GroupEngine 내부 + 외부 공용)
35
- * '#,##0' → 천단위 콤마, 정수
36
- * '#,##0.00' → 천단위 콤마, 소수 2자리
37
- * '0.00' → 소수 2자리 (콤마 없음)
38
- * '2' → 소수 2자리 (하위 호환)
68
+ * 숫자 포맷팅(GroupEngine 내부 + 외부 공용). / Number formatting (used inside GroupEngine and shared externally).
69
+ *
70
+ * '#,##0' → 천단위 콤마, 정수 / thousands comma, integer
71
+ * '#,##0.00' → 천단위 콤마, 소수 2자리 / thousands comma, 2 decimals
72
+ * '0.00' → 소수 2자리 (콤마 없음) / 2 decimals, no comma
73
+ * '2' → 소수 2자리 (하위 호환) / 2 decimals (legacy compatibility)
74
+ *
75
+ * @param value - 포맷할 숫자 / Number to format
76
+ * @param fmt - 포맷 패턴(생략 시 자동: 정수/소수 판별) / Format pattern (auto integer/decimal when omitted)
77
+ * @returns 포맷된 문자열 / The formatted string
39
78
  */
40
79
  export declare function _fmtNum(value: number, fmt?: string): string;
41
80
  /**
42
- * 그룹 트리를 화면에 표시할 flat 행 배열로 변환.
43
- * 접힌 그룹(expanded=false)의 자식은 포함하지 않음.
81
+ * 그룹 트리를 화면에 표시할 flat 행 배열로 변환. / Flatten a group tree into a display row array.
82
+ *
83
+ * 접힌 그룹(expanded=false)의 자식은 포함하지 않음. / Children of collapsed groups (expanded=false) are excluded.
84
+ *
85
+ * @typeParam T - 행 데이터 타입 / Row data type
86
+ * @param groups - 최상위 그룹 행 배열 / Top-level group rows
87
+ * @returns 펼침 상태에 따른 표시 행(그룹 헤더 + 원본 행) / Visible rows per expansion state (group headers + raw rows)
44
88
  */
45
89
  export declare function flattenGroups<T>(groups: GroupRow<T>[]): Array<GroupRow<T> | T>;
46
- /** 특정 그룹 키의 펼침 상태를 토글 */
90
+ /**
91
+ * 특정 그룹 키의 펼침 상태를 토글. / Toggle the expansion state of a group key.
92
+ *
93
+ * @typeParam T - 행 데이터 타입 / Row data type
94
+ * @param groups - 그룹 행 배열(시그니처 호환용) / Group rows (kept for signature compatibility)
95
+ * @param groupKey - 토글할 그룹 키 / Group key to toggle
96
+ * @param expandedKeys - 펼침 상태 집합(제자리 변경) / Set of expanded keys (mutated in place)
97
+ */
47
98
  export declare function toggleGroup<T>(groups: GroupRow<T>[], groupKey: string, expandedKeys: Set<string>): void;
48
- /** 모든 그룹 키 수집 */
99
+ /**
100
+ * 모든 그룹 키 수집(전체 펼침/접기 등에 사용). / Collect every group key (used for expand-all/collapse-all).
101
+ *
102
+ * @typeParam T - 행 데이터 타입 / Row data type
103
+ * @param groups - 그룹 행 배열 / Group rows
104
+ * @param parentKey - 상위 키 접두(재귀용, 기본 '') / Parent key prefix (for recursion, default '')
105
+ * @returns 중첩 포함 전체 그룹 키 배열 / All group keys including nested ones
106
+ */
49
107
  export declare function collectAllKeys<T>(groups: GroupRow<T>[], parentKey?: string): string[];
50
108
  export { _isGroup };
@@ -2,18 +2,37 @@ import { DataLayer } from './DataLayer.js';
2
2
  import { VirtualScroll } from './VirtualScroll.js';
3
3
  import { GroupRow } from './GroupEngine.js';
4
4
  import { TreeNode } from './TreeEngine.js';
5
+ /**
6
+ * {@link GroupTreeManager} 의존성 주입 계약. / Dependency-injection contract for {@link GroupTreeManager}.
7
+ *
8
+ * 그룹/트리 재구성에 필요한 데이터·렌더·백킹 배선 훅을 호스트 그리드가 제공한다.
9
+ * / The host grid supplies the data/render/backing-wiring hooks needed to rebuild
10
+ * groups and trees.
11
+ */
5
12
  export interface GroupTreeDeps<T extends Record<string, any>> {
13
+ /** 현재 원본 행 배열 조회. / Look up the current raw row array. */
6
14
  getData: () => T[];
15
+ /** 현재 데이터 레이어 조회. / Look up the current data layer. */
7
16
  getDataLayer: () => DataLayer<T>;
17
+ /** 현재 그리드 옵션 조회. / Look up the current grid options. */
8
18
  getOptions: () => any;
19
+ /** 가상 스크롤 인스턴스 조회(없으면 `null`). / Look up the virtual-scroll instance (or `null`). */
9
20
  getVs: () => VirtualScroll | null;
21
+ /** 전체 재계산 렌더(총 행수 갱신 포함). / Full re-render including a total-row-count refresh. */
10
22
  doRenderFull: (totalRows: number) => void;
23
+ /** 바디를 다시 그린다. / Re-render the body. */
11
24
  doRender: () => void;
12
- /** Phase 2: OverrideKernel.getStrategy 주입(슬롯 groupKeyFn 도달용). */
25
+ /** Phase 2: OverrideKernel.getStrategy 주입(슬롯 groupKeyFn 도달용).
26
+ * / Phase 2: injected `OverrideKernel.getStrategy` (reaches the `groupKeyFn` slot). */
13
27
  getStrategy?: <F extends Function>(slot: string, fallback: F) => F;
14
28
  /**
15
29
  * Phase 0(C0.3): FlatRowModel 의 baseline backing 등록점. group/tree 진입 시 자기
16
30
  * flat 배열(`_groupFlatRows`/`_treeFlatRows`)로 교체하고, 해제 시 null(plain 복귀)로 되돌린다.
31
+ * / Phase 0 (C0.3): registration point for `FlatRowModel`'s baseline backing. Swapped
32
+ * to this manager's own flat array (`_groupFlatRows`/`_treeFlatRows`) on entering
33
+ * group/tree mode, and reset to `null` (plain mode) on exit.
34
+ *
35
+ * @param provider - flat 행 배열을 반환하는 함수, 해제 시 `null` / Function returning the flat row array, or `null` to detach
17
36
  */
18
37
  setFlatBacking: (provider: (() => Array<any>) | null) => void;
19
38
  /**
@@ -22,9 +41,27 @@ export interface GroupTreeDeps<T extends Record<string, any>> {
22
41
  * backing 위에 DetailManager 가 등록한 detail splice 까지 합성한 "최종" 총 행수이므로,
23
42
  * GroupTreeManager 는 자기 배열 길이(`_groupFlatRows.length` 등)를 직접 쓰지 않는다
24
43
  * (detail 활성 시 그 값은 실제보다 작아 스크롤/렌더 범위가 잘린다).
44
+ * / F2 (11_design_F2_v2.md §3.2 R3, resolving the "flat ownership contention" issue):
45
+ * queried right after `setFlatBacking` and passed to `VirtualScroll.setTotalRows`/
46
+ * `doRenderFull`. `FlatRowModel.count()` is the "final" total row count — it composites
47
+ * the backing just swapped in with any detail splices `DetailManager` has registered —
48
+ * so `GroupTreeManager` never uses its own array length (`_groupFlatRows.length`, etc.)
49
+ * directly (with detail active, that length is smaller than the real total and would
50
+ * truncate the scroll/render range).
51
+ *
52
+ * @returns 합성된 최종 총 행수 / The composited final total row count
25
53
  */
26
54
  getFlatCount: () => number;
27
55
  }
56
+ /**
57
+ * 그룹핑과 트리 모드를 함께 관리하는 매니저. / Manages both grouping and tree (parent/child) modes.
58
+ *
59
+ * 그룹/트리는 상호 배타적이며, 둘 다 원본 데이터를 하나의 "flat 배열"로 펼쳐
60
+ * {@link GroupTreeDeps.setFlatBacking} 을 통해 가상 스크롤의 백킹으로 등록한다.
61
+ * / Grouping and tree mode are mutually exclusive; both flatten the source data into
62
+ * a single "flat array" and register it as the virtual-scroll backing via
63
+ * {@link GroupTreeDeps.setFlatBacking}.
64
+ */
28
65
  export declare class GroupTreeManager<T extends Record<string, any> = any> {
29
66
  private _groupFields;
30
67
  private _groupExpandedKeys;
@@ -36,24 +73,71 @@ export declare class GroupTreeManager<T extends Record<string, any> = any> {
36
73
  private _isTreeMode;
37
74
  private _d;
38
75
  constructor(deps: GroupTreeDeps<T>);
76
+ /** 그룹 모드 활성 여부. / Whether group mode is active. */
39
77
  get isGroupMode(): boolean;
78
+ /** 트리 모드 활성 여부. / Whether tree mode is active. */
40
79
  get isTreeMode(): boolean;
80
+ /** 현재 펼쳐진 그룹 flat 행 배열(그룹 헤더/요약/데이터 행 혼합). / Current flattened group rows (mix of group header/summary/data rows). */
41
81
  get groupFlatRows(): Array<GroupRow<T> | T>;
82
+ /** 현재 펼쳐진 트리 flat 노드 배열(펼침 상태 반영). / Current flattened tree nodes (reflects expand/collapse state). */
42
83
  get treeFlatRows(): TreeNode<T>[];
84
+ /**
85
+ * 지정 필드로 그룹핑을 시작(또는 재설정)한다. / Start (or reset) grouping by the given fields.
86
+ *
87
+ * @param fields - 그룹 기준 필드명 배열(순서대로 중첩). 빈 배열이면 그룹 해제 / Fields to group by, in nesting order; an empty array disables grouping
88
+ */
43
89
  groupBy(fields: string[]): void;
90
+ /** 그룹핑을 해제하고 평면 모드로 복귀한다. / Disable grouping and return to flat mode. */
44
91
  clearGroup(): void;
92
+ /** 모든 그룹을 펼친다(그룹 모드가 아니면 무시). / Expand every group (no-op outside group mode). */
45
93
  expandAll(): void;
46
- /** Phase 2 슬롯 #5: groupKeyFn resolver. default = undefined(→ GroupEngine 가 row[field] 사용). */
94
+ /** Phase 2 슬롯 #5: groupKeyFn resolver. default = undefined(→ GroupEngine 가 row[field] 사용).
95
+ * / Phase 2 slot #5: groupKeyFn resolver. Default `undefined` (falls back to
96
+ * `GroupEngine` using `row[field]`).
97
+ * @internal */
47
98
  private _groupKeyFn;
99
+ /** 모든 그룹을 접는다. / Collapse every group. */
48
100
  collapseAll(): void;
101
+ /**
102
+ * 특정 그룹의 펼침/접힘을 토글한다. / Toggle a single group's expand/collapse state.
103
+ *
104
+ * @param groupKey - 대상 그룹의 키 / Key of the target group
105
+ */
49
106
  handleGroupToggle(groupKey: string): void;
107
+ /**
108
+ * 현재 그룹 필드/펼침 상태로 flat 행 배열을 재계산하고 렌더한다. / Recompute the flat row array from the current group fields/expand state and render.
109
+ */
50
110
  rebuildGroups(): void;
111
+ /**
112
+ * 트리 모드를 활성화한다(그룹 모드와 배타). / Enable tree mode (mutually exclusive with group mode).
113
+ *
114
+ * `expandOnLoad` 옵션이 켜져 있으면 전체 노드를 펼친 상태로 시작한다.
115
+ * / If the `expandOnLoad` option is on, starts with every node expanded.
116
+ */
51
117
  enableTree(): void;
118
+ /** 트리 모드를 해제하고 평면 모드로 복귀한다. / Disable tree mode and return to flat mode. */
52
119
  disableTree(): void;
120
+ /**
121
+ * 지정 노드(들)를 펼치거나 접는다. / Expand or collapse the given node(s).
122
+ *
123
+ * @param ids - 대상 노드 id, 또는 id 배열 / A single node id, or an array of node ids
124
+ * @param open - `true` 면 펼침, `false` 면 접힘(기본 `true`) / `true` to expand, `false` to collapse (default `true`)
125
+ */
53
126
  expandNodes(ids: any | any[], open?: boolean): void;
127
+ /** 모든 트리 노드를 펼친다(트리 모드가 아니면 무시). / Expand every tree node (no-op outside tree mode). */
54
128
  expandAllNodes(): void;
129
+ /** 모든 트리 노드를 접는다(트리 모드가 아니면 무시). / Collapse every tree node (no-op outside tree mode). */
55
130
  collapseAllNodes(): void;
131
+ /**
132
+ * 특정 트리 노드의 펼침/접힘을 토글한다. / Toggle a single tree node's expand/collapse state.
133
+ *
134
+ * @param nodeId - 대상 노드 id / Id of the target node
135
+ */
56
136
  handleTreeToggle(nodeId: any): void;
137
+ /**
138
+ * 현재 펼침 상태로 트리를 재구성하고 flat 행 배열을 갱신한다. / Rebuild the tree from the current expand state and refresh the flat row array.
139
+ */
57
140
  rebuildTree(): void;
141
+ /** @internal */
58
142
  private _getSummaryDefs;
59
143
  }