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
@@ -1,15 +1,29 @@
1
1
  import { ColumnLayout } from './ColumnLayout.js';
2
2
  import { WorksheetManager } from './WorksheetManager.js';
3
3
  import { ExportOptions } from './types.js';
4
+ /**
5
+ * ExportManager 의존성 주입 인터페이스. / Dependency-injection interface for ExportManager.
6
+ *
7
+ * OpenGrid 내부 상태(데이터·컬럼·옵션 등)를 export 로직에서 직접 참조하지 않고
8
+ * 콜백으로만 받도록 분리한다. / Decouples export logic from OpenGrid's internals —
9
+ * everything is read back through callbacks instead of direct references.
10
+ */
4
11
  export interface ExportDeps<T extends Record<string, any>> {
12
+ /** 내보낼 전체 행 데이터. / Full row data to export. */
5
13
  getData: () => T[];
14
+ /** 현재 컬럼 레이아웃(가시 리프 컬럼 조회용). / Current column layout (for resolving visible leaf columns). */
6
15
  getColLayout: () => ColumnLayout<T>;
16
+ /** 컬럼별 현재 폭(px) 배열. / Current per-column widths (px). */
7
17
  getColWidths: () => number[];
18
+ /** 그리드 옵션 스냅샷. / Snapshot of grid options. */
8
19
  getOptions: () => any;
20
+ /** 그리드 컨테이너 엘리먼트(테마 CSS 변수 조회용). / Grid container element (for reading theme CSS variables). */
9
21
  getContainer: () => HTMLElement;
22
+ /** 필드별 마스킹 활성 여부. / Whether masking is enabled for a given field. */
10
23
  getMaskEnabled: (field: string) => boolean;
24
+ /** 워크시트 매니저(다중 시트 내보내기용). 없으면 `null`. / Worksheet manager (for multi-sheet export); `null` if absent. */
11
25
  getWsManager: () => WorksheetManager<T> | null;
12
- /** Phase 2: OverrideKernel.getStrategy 주입(슬롯 cellSerializer 도달용). */
26
+ /** Phase 2: OverrideKernel.getStrategy 주입(슬롯 cellSerializer 도달용). / Phase 2: injected via OverrideKernel.getStrategy (reaches the `cellSerializer` slot). */
13
27
  getStrategy?: <F extends Function>(slot: string, fallback: F) => F;
14
28
  /** i18n: 인쇄 요약행 해석(미주입 시 ko 폴백). / i18n: resolve print summary row (ko fallback when absent). */
15
29
  t?: (key: string, params?: Record<string, string | number>) => string;
@@ -19,18 +33,69 @@ export interface ExportDeps<T extends Record<string, any>> {
19
33
  exportFont?: string;
20
34
  };
21
35
  }
36
+ /**
37
+ * 그리드 데이터 내보내기(Excel/CSV/JSON/인쇄) 관리자. / Manages exporting grid data (Excel/CSV/JSON/print).
38
+ *
39
+ * OpenGrid 상태를 {@link ExportDeps} 콜백으로만 읽으며, Excel 계열은 `xlsx-js-style` 을
40
+ * 동적 import 하여 필요할 때만 로드한다. / Reads OpenGrid state only through {@link ExportDeps}
41
+ * callbacks; Excel exports dynamically `import()` `xlsx-js-style` so it loads only on demand.
42
+ */
22
43
  export declare class ExportManager<T extends Record<string, any> = any> {
23
44
  private _d;
24
45
  constructor(deps: ExportDeps<T>);
46
+ /** @internal 컨테이너의 CSS 커스텀 프로퍼티 값을 읽는다. / Reads a CSS custom property value from the container. */
25
47
  private _readCssVar;
48
+ /** @internal HEX/RGB 색상 문자열을 xlsx-js-style 이 요구하는 6자리 RGB 헥스로 변환. / Converts a HEX/RGB color string into the 6-digit RGB hex xlsx-js-style expects. */
26
49
  private _hexToXlsxRgb;
50
+ /**
51
+ * 현재 그리드 데이터를 스타일이 적용된 `.xlsx` 로 내보낸다. / Export the current grid data as a styled `.xlsx` file.
52
+ *
53
+ * 헤더/데이터 배색은 `styleMode: 'theme'`(기본) 시 그리드 테마 CSS 변수(`--og-*`)에서
54
+ * 읽어 반영하고, `cellSerializer` override 슬롯이 있으면 셀 값 직렬화를 위임한다.
55
+ * / When `styleMode: 'theme'` (default), header/data colors are read from the grid's
56
+ * theme CSS variables (`--og-*`); if an `cellSerializer` override slot is registered,
57
+ * cell-value serialization is delegated to it.
58
+ *
59
+ * @param options - 파일명 문자열 또는 {@link ExportOptions} / A filename string, or {@link ExportOptions}
60
+ * @example
61
+ * grid.exportExcel({ filename: 'orders', maskOnExport: true });
62
+ */
27
63
  exportExcel(options?: ExportOptions | string): void;
64
+ /**
65
+ * 현재 그리드 데이터를 UTF-8 BOM 포함 CSV 로 내보낸다. / Export the current grid data as a UTF-8 (BOM) CSV file.
66
+ *
67
+ * @param options - 파일명 문자열 또는 {@link ExportOptions} / A filename string, or {@link ExportOptions}
68
+ */
28
69
  exportCsv(options?: ExportOptions | string): void;
70
+ /**
71
+ * 현재 그리드 데이터를 JSON 파일로 내보낸다. / Export the current grid data as a JSON file.
72
+ *
73
+ * @param options - 파일명 문자열 또는 `filename` 을 담은 옵션 / A filename string, or an options object with `filename`
74
+ */
29
75
  exportJson(options?: ExportOptions | string): void;
76
+ /**
77
+ * 새 창을 열어 현재 그리드 데이터를 인쇄용 HTML 표로 렌더하고 인쇄 대화상자를 띄운다.
78
+ * / Opens a new window, renders the current grid data as a print-ready HTML table, and triggers the print dialog.
79
+ *
80
+ * 인쇄 문서의 `lang`·날짜 로케일·요약행 문구는 활성 로케일(`getMeta`/`t`)을 따른다
81
+ * (미주입 시 ko 폴백, byte-identical). / The document `lang`, date locale, and summary
82
+ * line follow the active locale (`getMeta`/`t`); falls back to ko when not injected (byte-identical).
83
+ *
84
+ * @param options - 제목·제외 필드·인쇄 푸터 텍스트 / Title, excluded fields, and print-footer text
85
+ */
30
86
  print(options?: {
31
87
  title?: string;
32
88
  excludeFields?: string[];
33
89
  footerText?: string;
34
90
  }): void;
91
+ /**
92
+ * 워크시트 매니저의 모든 시트를 시트별 탭으로 갖는 단일 `.xlsx` 로 내보낸다.
93
+ * / Export every sheet from the worksheet manager into a single `.xlsx` file, one tab per sheet.
94
+ *
95
+ * 워크시트 매니저가 없으면 {@link exportExcel} 로 폴백한다.
96
+ * / Falls back to {@link exportExcel} when no worksheet manager is present.
97
+ *
98
+ * @param filename - 파일명(확장자 생략 가능) / Output filename (extension optional)
99
+ */
35
100
  exportSheetsExcel(filename?: string): void;
36
101
  }
@@ -11,82 +11,228 @@ import { StrategySlot, StrategyMap, OverrideLayerFn, OverrideCallOptions, Overri
11
11
  * 3범주(§4.1): (a) strategy 슬롯(값·계산) · (b) 컴포넌트 registry(렌더훅 포함) · (c) lifecycle hook.
12
12
  * 이중구조(T-ζ): "SemVer 보증 카탈로그"(타입드 좁은 문) + "best-effort 임의 인터셉트 탈출구"(UC-11,
13
13
  * 넓은 문). 문서·타입에서 둘을 명확히 분리하되 넓은 문을 닫지 않는다.
14
+ * / R11 (§4 T3, §3.1 C7): a **typed extension-point registry** layered on top of the kernel.
15
+ *
16
+ * `OverrideKernel` is the execution engine (reversible, host-agnostic, zero source lines,
17
+ * untouchable — not a single line of it is modified). This registry is the **typed facade**
18
+ * placed on top of it, making the extension surface explicit, typed, and discoverable. The
19
+ * burden of extending the grid shifts from "editing core (adding a hardcoded gate)" to
20
+ * "registering data" (A4).
21
+ *
22
+ * Three categories (§4.1): (a) strategy slots (value/computation) · (b) component registries
23
+ * (including render hooks) · (c) lifecycle hooks. Dual structure (T-ζ): a "SemVer-guaranteed
24
+ * catalog" (the typed narrow door) plus a "best-effort arbitrary intercept escape hatch"
25
+ * (UC-11, the wide door). Docs and types keep the two clearly separated without ever closing
26
+ * the wide door.
14
27
  */
15
28
  /**
16
29
  * 렌더 참여 훅(§4.2). 렌더층이 셀마다 참조하는 교체가능 지점.
17
30
  * - `gate()` : 미설정(등록 override/strategy 없음)이면 false → 렌더층이 resolve 를 호출조차 안 함(제로코스트).
18
31
  * - `resolve(rowIndex, field)` : 게이트 통과 시 렌더층에 줄 값(표시문자열/클래스/aria 등). null=미참여.
19
32
  * 첫 등록 항목 = 기존 `getDisplayValue` 표시텍스트 동작(동일 출력 → 회귀0). 이후 새 훅은 등록만으로 열린다.
33
+ * / A render-participation hook (§4.2). A swappable point the render layer consults per cell.
34
+ * - `gate()`: `false` when unconfigured (no override/strategy registered) — the render layer
35
+ * won't even call `resolve` (zero cost).
36
+ * - `resolve(rowIndex, field)`: the value to hand to the render layer once the gate passes
37
+ * (display string/class/aria, etc.). `null` = does not participate.
38
+ * The first registered entry is the existing `getDisplayValue` display-text behavior (same
39
+ * output — zero regression). Any new hook opens up simply by registering.
20
40
  */
21
41
  export interface RenderHook<R = string> {
42
+ /** 훅 식별자(등록/조회 키). / Hook identifier (registration/lookup key). */
22
43
  readonly id: string;
44
+ /** 이 훅이 현재 활성인지. / Whether this hook is currently active. */
23
45
  gate(): boolean;
46
+ /** 게이트 통과 시의 셀 값 해석. / Resolve the cell value once the gate passes. */
24
47
  resolve(rowIndex: number, field: string): R | null;
25
48
  }
26
49
  /**
27
50
  * 렌더훅 레지스트리(§4.2). 하드코딩 게이트 1개를 데이터 구동 훅 목록으로 일반화.
28
51
  * 등록순 보존(첫 항목=표시텍스트). 렌더층은 이름을 하드코딩하지 않고 `resolve(id,…)` 로 순회 참조한다.
52
+ * / The render-hook registry (§4.2). Generalizes a single hardcoded gate into a
53
+ * data-driven list of hooks. Registration order is preserved (the first entry is the
54
+ * display-text hook). The render layer never hardcodes names — it consults hooks by
55
+ * iterating and calling `resolve(id, …)`.
29
56
  */
30
57
  export declare class RenderHookRegistry {
31
58
  private _order;
32
59
  private _hooks;
60
+ /**
61
+ * 훅을 등록한다(신규 id 는 등록순 끝에 추가, 기존 id 는 갱신). / Register a hook (a new id
62
+ * is appended to registration order; an existing id is updated in place).
63
+ *
64
+ * @param hook - 등록할 렌더훅 / The render hook to register
65
+ */
33
66
  register(hook: RenderHook<any>): void;
67
+ /**
68
+ * id 로 등록된 훅을 조회한다. / Look up a registered hook by id.
69
+ *
70
+ * @param id - 훅 식별자 / Hook identifier
71
+ * @returns 등록된 훅, 없으면 undefined / The registered hook, or `undefined`
72
+ */
34
73
  get(id: string): RenderHook<any> | undefined;
74
+ /**
75
+ * id 가 등록되어 있는지 확인한다. / Check whether an id is registered.
76
+ *
77
+ * @param id - 훅 식별자 / Hook identifier
78
+ * @returns 등록 여부 / Whether it is registered
79
+ */
35
80
  has(id: string): boolean;
36
- /** 등록순 훅 id 목록(첫 항목=표시텍스트). */
81
+ /** 등록순 훅 id 목록(첫 항목=표시텍스트). / Registered hook ids in registration order (the first entry is display-text). */
37
82
  ids(): string[];
38
83
  /**
39
84
  * 훅 해석. 미등록이거나 게이트가 닫혀 있으면 resolve 를 **호출하지 않고** null 반환(제로코스트 보존).
85
+ * / Resolve a hook. If unregistered or its gate is closed, `resolve` is **not called** and
86
+ * `null` is returned (preserving zero cost).
87
+ *
88
+ * @param id - 훅 식별자 / Hook identifier
89
+ * @param rowIndex - 대상 행 인덱스 / Target row index
90
+ * @param field - 대상 컬럼 field 명 / Target column field name
91
+ * @returns 해석된 값, 미참여 시 null / The resolved value, or `null` if it does not participate
40
92
  */
41
93
  resolve(id: string, rowIndex: number, field: string): any;
42
- /** 게이트가 열린(활성) 훅 id — 렌더층 스윕/디버깅용. */
94
+ /** 게이트가 열린(활성) 훅 id — 렌더층 스윕/디버깅용. / Ids of hooks whose gate is open (active) — for render-layer sweeps/debugging. */
43
95
  activeIds(): string[];
44
96
  }
45
- /** 단일 커밋 초크포인트(C5 MutationService)가 트리거로 감싸는 변경 연산. */
97
+ /** 단일 커밋 초크포인트(C5 MutationService)가 트리거로 감싸는 변경 연산.
98
+ * / A mutation operation wrapped in a trigger by the single commit chokepoint (C5 MutationService). */
46
99
  export type MutationOp = 'setData' | 'insertRow' | 'deleteRow' | 'writeCell';
47
- /** 카탈로그(매니페스트) 엔트리 — R-3d "지원 확장점 카탈로그" 산출물. */
100
+ /** 카탈로그(매니페스트) 엔트리 — R-3d "지원 확장점 카탈로그" 산출물.
101
+ * / A catalog (manifest) entry — the R-3d "supported extension point catalog" artifact. */
48
102
  export interface ExtensionCatalogEntry {
103
+ /** 확장점 이름. / Extension point name. */
49
104
  readonly name: string;
105
+ /** 확장점 범주. / Extension point category. */
50
106
  readonly category: 'strategy' | 'renderHook' | 'lifecycle' | 'override' | 'escapeHatch';
107
+ /** 사람이 읽는 시그니처 문자열. / Human-readable signature string. */
51
108
  readonly signature: string;
52
109
  }
110
+ /**
111
+ * ExtensionPointRegistry 의 의존성 계약. / Dependency contract for ExtensionPointRegistry.
112
+ */
53
113
  export interface ExtensionRegistryDeps {
54
- /** 실행 엔진(불가침). 레지스트리는 소유·위임할 뿐 내부를 건드리지 않는다. */
114
+ /** 실행 엔진(불가침). 레지스트리는 소유·위임할 뿐 내부를 건드리지 않는다.
115
+ * / The execution engine (untouchable). The registry only owns and delegates to it —
116
+ * it never reaches into its internals. */
55
117
  kernel: OverrideKernel;
56
- /** before/after 취소가능 훅을 부착할 커밋 초크포인트의 TriggerManager(늦은-null 견딤). */
118
+ /** before/after 취소가능 훅을 부착할 커밋 초크포인트의 TriggerManager(늦은-null 견딤).
119
+ * / The commit chokepoint's TriggerManager, to which cancelable before/after hooks are
120
+ * attached (tolerates late-null). */
57
121
  getTrigMgr: () => TriggerManager;
58
122
  }
123
+ /**
124
+ * R11 확장점 레지스트리. / R11 extension-point registry.
125
+ *
126
+ * `OverrideKernel` 실행 엔진 위에 얹는 타입드 정면으로, strategy 슬롯·렌더훅·lifecycle 훅·
127
+ * override 카탈로그를 하나의 등록 표면으로 노출한다(§4.1~§4.3).
128
+ * / The typed facade layered on top of the `OverrideKernel` execution engine, exposing
129
+ * strategy slots, render hooks, lifecycle hooks, and the override catalog as a single
130
+ * registration surface (§4.1–§4.3).
131
+ */
59
132
  export declare class ExtensionPointRegistry<T = any> {
60
133
  private _deps;
61
134
  private _renderHooks;
62
135
  constructor(deps: ExtensionRegistryDeps);
136
+ /** 렌더훅 레지스트리. / The render-hook registry. */
63
137
  get renderHooks(): RenderHookRegistry;
64
- /** 렌더훅 등록(코어 편집 없이 렌더층 참여 지점 추가 — OCP). */
138
+ /**
139
+ * 렌더훅 등록(코어 편집 없이 렌더층 참여 지점 추가 — OCP).
140
+ * / Register a render hook (adds a render-layer participation point without editing
141
+ * core — OCP).
142
+ *
143
+ * @param hook - 등록할 렌더훅 / The render hook to register
144
+ * @example
145
+ * registry.registerRenderHook({
146
+ * id: 'myBadge',
147
+ * gate: () => true,
148
+ * resolve: (rowIndex, field) => (field === 'status' ? 'badge-on' : null),
149
+ * });
150
+ */
65
151
  registerRenderHook(hook: RenderHook<any>): void;
66
- /** 렌더층이 매 셀 호출 — 미등록/게이트닫힘이면 제로코스트 null. */
152
+ /**
153
+ * 렌더층이 매 셀 호출 — 미등록/게이트닫힘이면 제로코스트 null.
154
+ * / Called by the render layer for every cell — zero-cost `null` when unregistered or the
155
+ * gate is closed.
156
+ *
157
+ * @param id - 렌더훅 식별자 / Render hook identifier
158
+ * @param rowIndex - 대상 행 인덱스 / Target row index
159
+ * @param field - 대상 컬럼 field 명 / Target column field name
160
+ * @returns 해석된 값, 미참여 시 null / The resolved value, or `null` if it does not participate
161
+ */
67
162
  resolveRenderHook(id: string, rowIndex: number, field: string): any;
68
- /** 타입드 슬롯 등록(SemVer 보증 카탈로그). 런타임은 커널 문자열 기반(하위호환). */
163
+ /**
164
+ * 타입드 슬롯 등록(SemVer 보증 카탈로그). 런타임은 커널 문자열 기반(하위호환).
165
+ * / Register a typed slot (SemVer-guaranteed catalog). At runtime it is still
166
+ * string-keyed via the kernel (backward compatible).
167
+ *
168
+ * @param slot - strategy 슬롯 이름 / Strategy slot name
169
+ * @param fn - 슬롯 구현 함수 / The slot implementation function
170
+ * @example
171
+ * registry.strategy('displayFormatter', (value, field, row) => String(value).toUpperCase());
172
+ */
69
173
  strategy<K extends StrategySlot>(slot: K, fn: StrategyMap[K]): void;
70
174
  strategy(slot: string, fn: Function): void;
71
- /** 슬롯 조회(미등록 시 fallback — 매니저 read API, 제로코스트 철학 보존). */
175
+ /**
176
+ * 슬롯 조회(미등록 시 fallback — 매니저 read API, 제로코스트 철학 보존).
177
+ * / Look up a slot (falls back when unregistered — manager read API, preserving the
178
+ * zero-cost philosophy).
179
+ *
180
+ * @param slot - strategy 슬롯 이름 / Strategy slot name
181
+ * @param fallback - 미등록 시 사용할 기본 함수 / Default function used when unregistered
182
+ * @returns 등록된 함수 또는 fallback / The registered function, or the fallback
183
+ */
72
184
  getStrategy<F extends Function>(slot: string, fallback: F): F;
185
+ /**
186
+ * 슬롯 등록 여부를 확인한다. / Check whether a slot is registered.
187
+ *
188
+ * @param slot - strategy 슬롯 이름 / Strategy slot name
189
+ * @returns 등록 여부 / Whether it is registered
190
+ */
73
191
  hasStrategy(slot: string): boolean;
74
- /** 타입드 오버로드: 좁은 "지원됨" 카탈로그(IDE 발견). */
192
+ /** 타입드 오버로드: 좁은 "지원됨" 카탈로그(IDE 발견). / Typed overload: the narrow "supported" catalog (IDE-discoverable). */
75
193
  override<K extends keyof OverridePoints<T>>(name: K, fn: OverrideLayerFn, opts?: OverrideCallOptions): void;
76
- /** 탈출구(UC-11): 임의 메서드 best-effort 인터셉트 — 넓은 문은 닫지 않는다. */
194
+ /** 탈출구(UC-11): 임의 메서드 best-effort 인터셉트 — 넓은 문은 닫지 않는다. / Escape hatch (UC-11): best-effort intercept of an arbitrary method — the wide door stays open. */
77
195
  override(name: string, fn: OverrideLayerFn, opts?: OverrideCallOptions): void;
78
196
  /**
79
197
  * 취소가능 before 훅. 단일 커밋 초크포인트(C5 MutationService)가 이미 제공하는 `before:{op}`
80
198
  * 트리거를 **타입드로 표면화**할 뿐 메커니즘을 재배선하지 않는다. 핸들러가 `ctx.cancel()` 하면 변경 취소.
199
+ * / A cancelable before-hook. Merely **surfaces as typed** the `before:{op}` trigger already
200
+ * provided by the single commit chokepoint (C5 MutationService) — it does not rewire the
201
+ * mechanism. If the handler calls `ctx.cancel()`, the mutation is cancelled.
202
+ *
203
+ * @param op - 대상 변경 연산 / Target mutation operation
204
+ * @param handler - 취소 가능한 before 핸들러 / Cancelable before handler
205
+ * @example
206
+ * registry.beforeMutation('deleteRow', (ctx) => {
207
+ * if (!confirm('삭제할까요?')) ctx.cancel();
208
+ * });
81
209
  */
82
210
  beforeMutation(op: MutationOp, handler: TriggerHandler): void;
83
- /** 관찰(취소불가) after 훅 — 커밋 완료 후 `after:{op}` 트리거를 타입드로 표면화. */
211
+ /**
212
+ * 관찰(취소불가) after 훅 — 커밋 완료 후 `after:{op}` 트리거를 타입드로 표면화.
213
+ * / An observation-only (non-cancelable) after-hook — surfaces the `after:{op}` trigger,
214
+ * fired once the commit completes, as typed.
215
+ *
216
+ * @param op - 대상 변경 연산 / Target mutation operation
217
+ * @param handler - 관찰용 after 핸들러 / Observation-only after handler
218
+ */
84
219
  afterMutation(op: MutationOp, handler: TriggerHandler): void;
85
- /** 등록한 MutationHook 해제. */
220
+ /**
221
+ * 등록한 MutationHook 해제. / Remove a previously registered MutationHook.
222
+ *
223
+ * @param when - 'before' 또는 'after' / `'before'` or `'after'`
224
+ * @param op - 대상 변경 연산 / Target mutation operation
225
+ * @param handler - 제거할 핸들러(등록 시와 동일 참조) / Handler to remove (same reference used at registration)
226
+ */
86
227
  offMutation(when: 'before' | 'after', op: MutationOp, handler: TriggerHandler): void;
87
228
  /**
88
229
  * 타입드 확장점 카탈로그. render 훅 항목은 실제 등록분(`renderHooks.ids()`)에서 유도 —
89
230
  * 유령 확장점(등록 없는 카탈로그 엔트리) 금지(DeMarco M9b).
231
+ * / The typed extension-point catalog. Render-hook entries are derived from the actual
232
+ * registrations (`renderHooks.ids()`) — no phantom extension points (catalog entries with
233
+ * no registration) are allowed (DeMarco M9b).
234
+ *
235
+ * @returns 확장점 카탈로그 엔트리 배열 / Array of extension-point catalog entries
90
236
  */
91
237
  catalog(): ExtensionCatalogEntry[];
92
238
  }
@@ -1,11 +1,16 @@
1
1
  import { FilterItem } from './types.js';
2
+ /** 필터 적용 콜백. / Callback invoked when a filter is applied. */
2
3
  export type FilterApplyFn = (field: string, items: FilterItem[]) => void;
4
+ /** 필터 해제 콜백. / Callback invoked when a filter is cleared. */
3
5
  export type FilterClearFn = (field: string) => void;
4
6
  /** i18n: 필터 라벨 로케일 해석기(주입 없으면 전역 t). / i18n: filter-label resolver (global t when not injected). */
5
7
  export type FilterPanelT = (key: string, params?: Record<string, string | number>) => string;
6
8
  /**
7
- * 컬럼 헤더 필터 드롭다운 패널.
8
- * 단일 인스턴스를 재사용(열릴 때 위치 재계산).
9
+ * 컬럼 헤더 필터 드롭다운 패널. / Column-header filter dropdown panel.
10
+ *
11
+ * 단일 인스턴스를 재사용하며, 열릴 때마다 대상 컬럼(`field`)과 앵커 기준 위치를
12
+ * 재계산한다. / Reuses a single instance; on each open it recomputes the target
13
+ * column (`field`) and its anchor-relative position.
9
14
  */
10
15
  export declare class FilterPanel {
11
16
  private _el;
@@ -15,8 +20,18 @@ export declare class FilterPanel {
15
20
  private _t;
16
21
  private _outsideHandler;
17
22
  constructor(container: HTMLElement, onApply: FilterApplyFn, onClear: FilterClearFn, t?: FilterPanelT);
23
+ /**
24
+ * 지정 컬럼의 필터 패널을 앵커 엘리먼트 아래에 연다. / Open the filter panel for the given column, anchored below `anchorEl`.
25
+ *
26
+ * @param field - 필터 대상 컬럼 field 명 / Field name of the column to filter
27
+ * @param anchorEl - 위치 기준이 되는 헤더 엘리먼트(보통 필터 아이콘) / Header element used as the position anchor (typically the filter icon)
28
+ * @param currentFilters - 해당 컬럼에 이미 적용된 필터(있으면 입력값 프리필) / Filters already applied to this column (pre-fills the inputs, if any)
29
+ */
18
30
  open(field: string, anchorEl: HTMLElement, currentFilters: FilterItem[]): void;
31
+ /** 필터 패널을 숨기고 외부 클릭 리스너를 해제한다. / Hide the filter panel and detach the outside-click listener. */
19
32
  close(): void;
33
+ /** 패널이 현재 열려 있는지 여부. / Whether the panel is currently open. */
20
34
  get isOpen(): boolean;
35
+ /** 패널을 닫고 DOM 에서 제거한다. / Close the panel and remove it from the DOM. */
21
36
  destroy(): void;
22
37
  }
@@ -1,14 +1,17 @@
1
1
  import { FilterItem } from './types.js';
2
2
  /** i18n: 필터 셀렉트 라벨 해석기(주입 없으면 전역 t). / i18n: filter-select label resolver (global t when not injected). */
3
3
  export type FilterSelectT = (key: string, params?: Record<string, string | number>) => string;
4
+ /** 필터 셀렉트 옵션(값/표시 텍스트). / Filter-select option (value/display text). */
4
5
  export interface FilterSelectOption {
6
+ /** 필터·선택에 사용할 값. / Value used for filtering/selection. */
5
7
  value: string;
8
+ /** 화면에 표시할 텍스트. / Text shown on screen. */
6
9
  text: string;
7
10
  }
8
11
  /**
9
- * 캐스케이딩 필터 셀렉트 컬럼 정의.
12
+ * 캐스케이딩 필터 셀렉트 컬럼 정의. / Cascading filter-select column definition.
10
13
  *
11
- * ### 데이터 공급 방식 (택 1)
14
+ * ### 데이터 공급 방식 (택 1) / Data supply (pick one)
12
15
  *
13
16
  * **A. JSON 배열 바인딩** (권장)
14
17
  * ```ts
@@ -30,30 +33,31 @@ export interface FilterSelectOption {
30
33
  * ```
31
34
  */
32
35
  export interface FilterSelectColumn {
33
- /** 캐스케이딩 식별자 / 기본 필터 키 */
36
+ /** 캐스케이딩 식별자 / 기본 필터 키. / Cascading identifier / default filter key. */
34
37
  field: string;
35
- /** 화면 표시 라벨 */
38
+ /** 화면 표시 라벨. / Display label. */
36
39
  label: string;
37
- /** 바인딩할 JSON 배열 */
40
+ /** 바인딩할 JSON 배열. / JSON array to bind. */
38
41
  data?: any[];
39
- /** data[]에서 option value로 사용할 키 */
42
+ /** data[] 에서 option value 로 사용할 키. / Key in data[] used as the option value. */
40
43
  valueKey?: string;
41
- /** data[]에서 화면 표시 text로 사용할 키 (미지정 시 valueKey 사용) */
44
+ /** data[] 에서 화면 표시 text 로 사용할 키(미지정 시 valueKey 사용). / Key in data[] used as display text (falls back to valueKey). */
42
45
  textKey?: string;
43
46
  /**
44
- * 그리드 행 데이터에서 실제 필터링할 키.
45
- * 미지정 시 `field` 값 그대로 사용.
47
+ * 그리드 행 데이터에서 실제 필터링할 키. 미지정 시 `field` 값 그대로 사용.
48
+ * / Key actually filtered against grid row data; falls back to `field`.
46
49
  *
47
50
  * @example
48
- * // 그리드 row.category === selectedValue 로 필터링
51
+ * // 그리드 row.category === selectedValue 로 필터링 / filter where row.category === selectedValue
49
52
  * filterKey: 'category'
50
53
  */
51
54
  filterKey?: string;
55
+ /** 정적 옵션 배열(data 대신 사용). / Static option array (used instead of data). */
52
56
  options?: FilterSelectOption[];
53
- /** 부모 컬럼의 field 명 */
57
+ /** 부모 컬럼의 field 명. / Parent column's field name. */
54
58
  dependsOn?: string;
55
59
  /**
56
- * 자식 data[]에서 부모 선택값과 비교할 키.
60
+ * 자식 data[] 에서 부모 선택값과 비교할 키. / Key in the child data[] compared against the parent's selected value.
57
61
  *
58
62
  * @example
59
63
  * // brandList.filter(b => b.catCode === parentSelectedValue)
@@ -61,13 +65,23 @@ export interface FilterSelectColumn {
61
65
  */
62
66
  dependsOnKey?: string;
63
67
  }
68
+ /** 필터 셀렉트 패널 구성. / Filter-select panel configuration. */
64
69
  export interface FilterSelectConfig {
70
+ /** 캐스케이딩 컬럼 정의 배열. / Cascading column definitions. */
65
71
  columns: FilterSelectColumn[];
66
- /** fieldset 제목 (기본: '필터') */
72
+ /** fieldset 제목(기본: 로케일 'filter.legend'). / fieldset legend (default: locale 'filter.legend'). */
67
73
  legend?: string;
68
74
  }
69
75
  type FilterFn = (field: string, items: FilterItem[]) => void;
70
76
  type ResetFn = (field?: string) => void;
77
+ /**
78
+ * 캐스케이딩 필터 셀렉트 패널. / Cascading filter-select panel.
79
+ *
80
+ * 그리드 헤더 앞에 fieldset 형태의 셀렉트 필터를 삽입하고, 부모→자식 종속(캐스케이딩)
81
+ * 옵션 재계산과 그리드 필터 콜백을 배선한다.
82
+ * / Inserts a fieldset of select filters ahead of the grid header and wires parent→child cascading
83
+ * option recalculation to the grid filter callbacks.
84
+ */
71
85
  export declare class FilterSelectPanel {
72
86
  private _el;
73
87
  private _selects;
@@ -77,6 +91,14 @@ export declare class FilterSelectPanel {
77
91
  private _onFilter;
78
92
  private _onReset;
79
93
  private _t;
94
+ /**
95
+ * @param container - 패널을 삽입할 컨테이너(그리드 헤더 앞에 prepend) / Container to insert the panel into (prepended before the grid header)
96
+ * @param config - 패널 구성 / Panel configuration
97
+ * @param onFilter - 필터 적용 콜백(field, items) / Filter-apply callback (field, items)
98
+ * @param onReset - 필터 해제 콜백(field?) / Filter-reset callback (field?)
99
+ * @param gridId - aria-controls 로 연결할 그리드 id(선택) / Grid id to link via aria-controls (optional)
100
+ * @param t - 로케일 해석기(미주입 시 전역 t) / Locale resolver (global t when not injected)
101
+ */
80
102
  constructor(container: HTMLElement, config: FilterSelectConfig, onFilter: FilterFn, onReset: ResetFn, gridId?: string, t?: FilterSelectT);
81
103
  /**
82
104
  * 컬럼의 옵션 목록을 계산한다.
@@ -92,7 +114,9 @@ export declare class FilterSelectPanel {
92
114
  */
93
115
  private _cascade;
94
116
  private _reset;
117
+ /** 모든 필터 선택을 초기화한다. / Reset all filter selections. */
95
118
  reset(): void;
119
+ /** 패널을 DOM 에서 제거한다. / Remove the panel from the DOM. */
96
120
  destroy(): void;
97
121
  }
98
122
  export {};
@@ -2,16 +2,33 @@ import { ColumnLayout } from './ColumnLayout.js';
2
2
  import { DataLayer } from './DataLayer.js';
3
3
  import { Pagination } from './Pagination.js';
4
4
  import { VirtualScroll } from './VirtualScroll.js';
5
+ /**
6
+ * FindBarManager 의존성 주입 인터페이스. / Dependency-injection interface for FindBarManager.
7
+ */
5
8
  export interface FindBarDeps<T extends Record<string, any>> {
9
+ /** 현재 컬럼 레이아웃(검색 대상 필드 조회용). / Current column layout (for resolving searchable fields). */
6
10
  getColLayout: () => ColumnLayout<T>;
11
+ /** 그리드 데이터 레이어(찾기/필터 적용 대상). / Grid data layer to apply the find filter against. */
7
12
  getData: () => DataLayer<T>;
13
+ /** 현재 활성 컬럼 필터(찾기와 함께 재적용). / Currently active column filters (reapplied alongside the find filter). */
8
14
  getFilters: () => Record<string, any[]>;
15
+ /** 가상 스크롤 인스턴스(행수 갱신용). 없으면 `null`. / Virtual-scroll instance (for updating row count); `null` if absent. */
9
16
  getVs: () => VirtualScroll | null;
17
+ /** 페이지네이션 인스턴스(행수 갱신용). 없으면 `null`. / Pagination instance (for updating row count); `null` if absent. */
10
18
  getPagination: () => Pagination | null;
19
+ /** 필터 적용 후 그리드 재렌더를 트리거. / Triggers a grid re-render after the filter is applied. */
11
20
  doRender: () => void;
12
21
  /** i18n: 메시지 해석(라벨/placeholder/aria/카운트 배지). / i18n: resolve labels/placeholder/aria/count badge. */
13
22
  t: (key: string, params?: Record<string, string | number>) => string;
14
23
  }
24
+ /**
25
+ * 그리드 상단 찾기(find) 바 관리자. / Manages the grid's top find bar.
26
+ *
27
+ * 입력값을 표시 중인 모든 컬럼에 대한 부분 일치 필터로 변환해 {@link DataLayer}에
28
+ * 적용하고, 가상 스크롤/페이지네이션의 행 수를 함께 갱신한다.
29
+ * / Turns the input value into a substring-match filter across all visible columns,
30
+ * applies it via {@link DataLayer}, and keeps virtual-scroll/pagination row counts in sync.
31
+ */
15
32
  export declare class FindBarManager<T extends Record<string, any> = any> {
16
33
  private _bar;
17
34
  private _input;
@@ -21,11 +38,20 @@ export declare class FindBarManager<T extends Record<string, any> = any> {
21
38
  private _filter;
22
39
  private _d;
23
40
  constructor(deps: FindBarDeps<T>);
41
+ /** 현재 찾기 입력값. / Current find-bar input value. */
24
42
  get findFilter(): string;
43
+ /**
44
+ * 찾기 바 DOM 을 생성하고 컨테이너 최상단에 삽입한다. / Build the find-bar DOM and insert it at the top of the container.
45
+ *
46
+ * @param container - 그리드 컨테이너 엘리먼트 / Grid container element
47
+ */
25
48
  init(container: HTMLElement): void;
26
49
  /** i18n: 상주 크롬 라벨을 활성 로케일로 다시 그린다(setLocale 경로). / i18n: repaint resident chrome labels in the active locale (setLocale path). */
27
50
  refreshLabels(): void;
51
+ /** 찾기 바를 표시하고 입력에 포커스한다. / Show the find bar and focus the input. */
28
52
  open(): void;
53
+ /** 찾기 바를 숨기고 필터를 해제한다. / Hide the find bar and clear the filter. */
29
54
  close(): void;
55
+ /** @internal 현재 찾기 필터를 데이터 레이어에 적용하고 재렌더한다. / Applies the current find filter to the data layer and re-renders. */
30
56
  private _apply;
31
57
  }