open-grid 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +388 -365
- package/dist/{OpenGrid-0r_543Kj.cjs → OpenGrid-B7m7ei7f.cjs} +1222 -1029
- package/dist/{OpenGrid-HmhGVC2V.js → OpenGrid-CeUdO_fM.js} +1613 -1418
- package/dist/index-CeJ-0-80.cjs +260 -0
- package/dist/index-DnarQ4eR.js +266 -0
- package/dist/index-DrCPRuYi.js +548 -0
- package/dist/index-JjfWY3Bt.cjs +520 -0
- package/dist/open-grid-base.css +12 -1
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-vue.cjs +7 -7
- package/dist/open-grid-vue.js +2 -2
- package/dist/open-grid.cjs +1 -1
- package/dist/open-grid.js +2 -2
- package/dist/types/bench/perf.d.ts +14 -8
- package/dist/types/core/AppearanceResolver.d.ts +98 -11
- package/dist/types/core/CFRenderBridge.d.ts +13 -0
- package/dist/types/core/CellTypeRegistry.d.ts +24 -0
- package/dist/types/core/ColumnLayout.d.ts +100 -2
- package/dist/types/core/CrossGridMapper.d.ts +43 -5
- package/dist/types/core/DataLayer.d.ts +210 -15
- package/dist/types/core/DragVisuals.d.ts +33 -4
- package/dist/types/core/EventEmitter.d.ts +54 -0
- package/dist/types/core/FilterSelect.d.ts +26 -5
- package/dist/types/core/FormulaEngine.d.ts +15 -4
- package/dist/types/core/GridRenderer.d.ts +143 -10
- package/dist/types/core/GridShuttle.d.ts +26 -10
- package/dist/types/core/GroupEngine.d.ts +68 -10
- package/dist/types/core/IconRegistry.d.ts +31 -13
- package/dist/types/core/MathUtils.d.ts +58 -5
- package/dist/types/core/MergeEngine.d.ts +45 -10
- package/dist/types/core/OGDecimal.d.ts +144 -13
- package/dist/types/core/OpenGrid.d.ts +401 -122
- package/dist/types/core/OrgChart.d.ts +32 -11
- package/dist/types/core/PivotEngine.d.ts +37 -0
- package/dist/types/core/RowDragDrop.d.ts +52 -6
- package/dist/types/core/SkinRegistry.d.ts +86 -19
- package/dist/types/core/TreeEngine.d.ts +60 -6
- package/dist/types/core/VirtualScroll.d.ts +64 -0
- package/dist/types/core/XmlConverter.d.ts +40 -0
- package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
- package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
- package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
- package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
- package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
- package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
- package/dist/types/core/a11y/index.d.ts +13 -0
- package/dist/types/core/a11y/ports.d.ts +24 -0
- package/dist/types/core/appearance/Appearance.d.ts +68 -0
- package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
- package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
- package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
- package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
- package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
- package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
- package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
- package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
- package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
- package/dist/types/core/appearance/defaults.d.ts +10 -0
- package/dist/types/core/appearance/index.d.ts +20 -0
- package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
- package/dist/types/core/cf/CFEngine.d.ts +56 -0
- package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
- package/dist/types/core/cf/CFRule.d.ts +127 -0
- package/dist/types/core/cf/ColorScale.d.ts +49 -0
- package/dist/types/core/cf/InkResolver.d.ts +33 -0
- package/dist/types/core/cf/appearance.d.ts +20 -0
- package/dist/types/core/cf/encoders.d.ts +61 -0
- package/dist/types/core/cf/eval-types.d.ts +93 -0
- package/dist/types/core/cf/index.d.ts +21 -0
- package/dist/types/core/cf/lineage.d.ts +32 -0
- package/dist/types/core/cf/predicates.d.ts +27 -0
- package/dist/types/core/cf/serialize.d.ts +46 -0
- package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
- package/dist/types/core/chart/DataExtractor.d.ts +53 -12
- package/dist/types/core/chart/a11y.d.ts +22 -0
- package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
- package/dist/types/core/chart/downsample-report.d.ts +36 -0
- package/dist/types/core/chart/downsample.d.ts +26 -1
- package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
- package/dist/types/core/chart/geometry.d.ts +96 -0
- package/dist/types/core/chart/hittest.d.ts +21 -3
- package/dist/types/core/chart/palette.d.ts +96 -12
- package/dist/types/core/chart/parity.d.ts +12 -0
- package/dist/types/core/chart/provenance.d.ts +47 -0
- package/dist/types/core/chart/scales.d.ts +28 -1
- package/dist/types/core/chart/scene.d.ts +102 -0
- package/dist/types/core/chart/server.d.ts +36 -0
- package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
- package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
- package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
- package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
- package/dist/types/core/chart/types.d.ts +102 -21
- package/dist/types/core/command/CommandBus.d.ts +51 -0
- package/dist/types/core/command/CommandRegistry.d.ts +43 -0
- package/dist/types/core/command/CommandStack.d.ts +38 -0
- package/dist/types/core/command/ICommand.d.ts +110 -0
- package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
- package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
- package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
- package/dist/types/core/command/index.d.ts +9 -0
- package/dist/types/core/command/support.d.ts +51 -0
- package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
- package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
- package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
- package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
- package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
- package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
- package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
- package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
- package/dist/types/core/coordinate/index.d.ts +10 -0
- package/dist/types/core/coordinate/ports.d.ts +45 -0
- package/dist/types/core/coordinate/types.d.ts +76 -0
- package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
- package/dist/types/core/detail/DetailSplice.d.ts +42 -11
- package/dist/types/core/detail/DetailState.d.ts +80 -11
- package/dist/types/core/detail/SubgridCache.d.ts +72 -10
- package/dist/types/core/detail/index.d.ts +8 -0
- package/dist/types/core/domain/AggregateResult.d.ts +54 -0
- package/dist/types/core/domain/CellAddress.d.ts +61 -0
- package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
- package/dist/types/core/domain/Delta.d.ts +37 -0
- package/dist/types/core/domain/DomainValue.d.ts +80 -0
- package/dist/types/core/domain/Missing.d.ts +65 -0
- package/dist/types/core/domain/Money.d.ts +42 -0
- package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
- package/dist/types/core/domain/Plain.d.ts +45 -0
- package/dist/types/core/domain/Quantity.d.ts +32 -0
- package/dist/types/core/domain/Ratios.d.ts +100 -0
- package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
- package/dist/types/core/domain/ValueType.d.ts +71 -0
- package/dist/types/core/domain/rounding.d.ts +25 -0
- package/dist/types/core/domain/strategies.d.ts +38 -0
- package/dist/types/core/editors/DateEditor.d.ts +18 -0
- package/dist/types/core/editors/SelectEditor.d.ts +29 -0
- package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
- package/dist/types/core/export/ExportManifest.d.ts +13 -0
- package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
- package/dist/types/core/export/Provenance.d.ts +34 -0
- package/dist/types/core/export/StreamPump.d.ts +28 -0
- package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
- package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
- package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
- package/dist/types/core/export/channels/capabilities.d.ts +13 -0
- package/dist/types/core/export/index.d.ts +24 -0
- package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
- package/dist/types/core/export/print/Paginator.d.ts +48 -0
- package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
- package/dist/types/core/export/sinks.d.ts +40 -0
- package/dist/types/core/export/types.d.ts +211 -0
- package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
- package/dist/types/core/extension/IExtension.d.ts +90 -0
- package/dist/types/core/extension/Registry.d.ts +142 -0
- package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
- package/dist/types/core/extension/adapters.d.ts +44 -0
- package/dist/types/core/extension/conformance.d.ts +47 -0
- package/dist/types/core/extension/index.d.ts +16 -0
- package/dist/types/core/extension/registries.d.ts +31 -0
- package/dist/types/core/extension/reserved.d.ts +10 -0
- package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
- package/dist/types/core/format/FormatCache.d.ts +20 -0
- package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
- package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
- package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
- package/dist/types/core/format/index.d.ts +55 -0
- package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
- package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
- package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
- package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
- package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
- package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
- package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
- package/dist/types/core/format/types.d.ts +292 -0
- package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
- package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
- package/dist/types/core/formula/CalcService.d.ts +137 -0
- package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
- package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
- package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
- package/dist/types/core/formula/FormulaParser.d.ts +9 -0
- package/dist/types/core/formula/FormulaStore.d.ts +63 -1
- package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
- package/dist/types/core/formula/Generation.d.ts +86 -0
- package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
- package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
- package/dist/types/core/formula/functions/essential.d.ts +3 -0
- package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
- package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
- package/dist/types/core/formula/numericLiteral.d.ts +11 -1
- package/dist/types/core/formula/serializeFormula.d.ts +10 -1
- package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
- package/dist/types/core/host/GridHostDriver.d.ts +27 -0
- package/dist/types/core/host/GridHostPort.d.ts +37 -0
- package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
- package/dist/types/core/host/archCheck.d.ts +26 -0
- package/dist/types/core/host/index.d.ts +6 -0
- package/dist/types/core/host/reconcile.d.ts +22 -0
- package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
- package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
- package/dist/types/core/i18n/types.d.ts +67 -11
- package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
- package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
- package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
- package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
- package/dist/types/core/quality/PerfSpec.d.ts +95 -0
- package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
- package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
- package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
- package/dist/types/core/quality/VisualRegression.d.ts +74 -0
- package/dist/types/core/quality/hooks.d.ts +53 -0
- package/dist/types/core/quality/index.d.ts +20 -0
- package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
- package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
- package/dist/types/core/range/FillEngine.d.ts +69 -9
- package/dist/types/core/range/RangeModel.d.ts +100 -13
- package/dist/types/core/range/types.d.ts +27 -11
- package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
- package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
- package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
- package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
- package/dist/types/core/realtime/PollingSource.d.ts +42 -0
- package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
- package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
- package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
- package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
- package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
- package/dist/types/core/realtime/backoff.d.ts +12 -0
- package/dist/types/core/realtime/index.d.ts +13 -0
- package/dist/types/core/realtime/ports.d.ts +80 -0
- package/dist/types/core/render/CellApplier.d.ts +18 -0
- package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
- package/dist/types/core/render/CellPipeline.d.ts +39 -0
- package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
- package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
- package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
- package/dist/types/core/render/RenderBudget.d.ts +67 -0
- package/dist/types/core/render/contrast.d.ts +33 -0
- package/dist/types/core/render/index.d.ts +35 -0
- package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
- package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
- package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
- package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
- package/dist/types/core/render/stages/index.d.ts +14 -0
- package/dist/types/core/state/AutosaveController.d.ts +63 -0
- package/dist/types/core/state/IStatePersistence.d.ts +59 -0
- package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
- package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
- package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
- package/dist/types/core/state/StateCodec.d.ts +75 -0
- package/dist/types/core/state/index.d.ts +6 -0
- package/dist/types/core/types.d.ts +511 -226
- package/dist/types/react/OpenGrid.d.ts +54 -0
- package/dist/types/react/index.d.ts +5 -0
- package/dist/types/realtime/index.d.ts +1 -0
- package/dist/types/vue/index.d.ts +5 -0
- package/dist/types/vue/types.d.ts +35 -0
- package/package.json +112 -111
|
@@ -1,83 +1,163 @@
|
|
|
1
1
|
import { PartialLocaleMessages, LocaleMessageKey, MessageValue } from './i18n/types.js';
|
|
2
2
|
import { FormulaErrorCode } from './formula/types.js';
|
|
3
3
|
import { RangeStats as _RangeStats } from './range/RangeQuery.js';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* 컬럼이 담는 값의 종류. 이 값 하나로 그리드가 "어떻게 정렬하고, 기본 렌더러로 무엇을 쓰고,
|
|
6
|
+
* 편집기를 무엇으로 열지"를 결정합니다. 지정하지 않으면 문자열처럼 다룹니다.
|
|
7
|
+
* / What kind of value a column holds. This single choice drives how the grid sorts, which
|
|
8
|
+
* default renderer it uses, and which editor it opens. Unset behaves like a string.
|
|
9
|
+
*
|
|
10
|
+
* - `'string'` : 일반 텍스트. / Plain text.
|
|
11
|
+
* - `'number'` : 숫자(오른쪽 정렬·숫자 비교·천단위 포맷). / Number (right-aligned, numeric compare, thousand separators).
|
|
12
|
+
* - `'date'` : 날짜(달력 편집기·날짜 비교). / Date (calendar editor, date compare).
|
|
13
|
+
* - `'boolean'` : 참/거짓(체크박스 표시). / True/false (rendered as a checkbox).
|
|
14
|
+
* - `'select'` : 목록에서 하나 선택(드롭다운 편집기). / Single choice from a list (dropdown editor).
|
|
15
|
+
* - `'radio'` : 같은 그룹 안에서 하나 선택. / Single choice within a radio group.
|
|
16
|
+
* - `'img'` : 셀 값을 이미지 주소로 보고 그림 표시. / Treat the value as an image URL and show it.
|
|
17
|
+
* - `'html'` : HTML 문자열을 그대로 렌더(기본 sanitize). / Render an HTML string (sanitized by default).
|
|
18
|
+
* - `'barcode'` : 값을 바코드 그래픽으로 표시. / Show the value as a barcode graphic.
|
|
19
|
+
*/
|
|
5
20
|
export type DataType = 'string' | 'number' | 'date' | 'boolean' | 'select' | 'radio' | 'img' | 'html' | 'barcode';
|
|
6
21
|
export type { MaskType, MaskDef } from './MaskingEngine.js';
|
|
7
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* 사용자가 클릭·드래그로 무엇을 선택할 수 있는지 정하는 모드.
|
|
24
|
+
* / What the user can select by clicking or dragging.
|
|
25
|
+
*
|
|
26
|
+
* - `'single'` : 한 번에 한 행만. / One row at a time.
|
|
27
|
+
* - `'row'` : 행 단위 선택(다중 가능은 UI에 따름). / Row-level selection.
|
|
28
|
+
* - `'multiple'` : 여러 행을 함께(Ctrl/Shift). / Multiple rows together (Ctrl/Shift).
|
|
29
|
+
* - `'cells'` : 스프레드시트처럼 셀 사각형 범위를 선택(채우기 핸들 포함). / Spreadsheet-style rectangular cell range (with fill handle).
|
|
30
|
+
*/
|
|
8
31
|
export type SelectionMode = 'single' | 'row' | 'multiple' | 'cells';
|
|
9
|
-
/** 정렬 방향. / Sort direction. */
|
|
32
|
+
/** 정렬 방향. `'asc'` 오름차순(작은 값 먼저), `'desc'` 내림차순(큰 값 먼저). / Sort direction: 'asc' ascending (smallest first), 'desc' descending (largest first). */
|
|
10
33
|
export type SortDir = 'asc' | 'desc';
|
|
11
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* 새 항목을 어디에 끼워 넣을지. 키워드로 상대 위치를 주거나, 숫자로 정확한 인덱스를 줍니다.
|
|
36
|
+
* / Where to insert a new item — a keyword for a relative spot, or a number for an exact index.
|
|
37
|
+
*
|
|
38
|
+
* - `'first'` : 맨 앞. / At the very front.
|
|
39
|
+
* - `'last'` : 맨 뒤. / At the very end.
|
|
40
|
+
* - `'before'` : 기준 위치 바로 앞. / Just before the reference position.
|
|
41
|
+
* - `'after'` : 기준 위치 바로 뒤. / Just after the reference position.
|
|
42
|
+
* - `number` : 해당 인덱스 자리. / At that exact index.
|
|
43
|
+
*/
|
|
12
44
|
export type Position = 'first' | 'last' | 'before' | 'after' | number;
|
|
13
45
|
/** 내장 셀 렌더러 타입 이름. / Built-in cell renderer type name. */
|
|
14
46
|
export type RendererType = 'text' | 'number' | 'date' | 'checkbox' | 'button' | 'link' | 'image' | 'icon' | 'switch' | 'sparkline' | 'template' | 'custom' | 'badge' | 'progress' | 'rating' | 'radio' | 'img' | 'html' | 'barcode';
|
|
15
47
|
/** 내장 셀 에디터 타입 이름. / Built-in cell editor type name. */
|
|
16
48
|
export type EditorType = 'text' | 'number' | 'date' | 'select' | 'checkbox' | 'custom';
|
|
17
49
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
50
|
+
* 사용자가 셀을 마우스로 조작할 때(클릭·더블클릭·마우스 올림 등) 그 핸들러로 전달되는 정보 묶음입니다.
|
|
51
|
+
* "어느 행·어느 컬럼의 어떤 값이, 어떤 DOM 요소에서, 원래 어떤 브라우저 이벤트로" 일어났는지를
|
|
52
|
+
* 한 번에 담아 주므로 핸들러 안에서 좌표를 다시 계산할 필요가 없습니다.
|
|
53
|
+
* / The payload handed to your handler when the user manipulates a cell with the mouse
|
|
54
|
+
* (click / dbl-click / mouse-over …). It bundles which row & column, what value, which DOM
|
|
55
|
+
* element, and the original browser event — so your handler never has to recompute coordinates.
|
|
56
|
+
* 관련 옵션 / Related options: onCellClick, onCellDblClick, onCellMouseOver …
|
|
20
57
|
*
|
|
21
58
|
* @typeParam T - 행 데이터 타입 / Row data type
|
|
22
59
|
*/
|
|
23
60
|
export interface CellEvent<T = any> {
|
|
61
|
+
/** 이벤트 이름('cellClick' 등). / The event name (e.g. 'cellClick'). */
|
|
24
62
|
type: string;
|
|
63
|
+
/** 대상 행의 화면 표시 순서 인덱스. / Screen-order index of the target row. */
|
|
25
64
|
rowIndex: number;
|
|
65
|
+
/** 대상 컬럼의 인덱스. / Index of the target column. */
|
|
26
66
|
columnIndex: number;
|
|
67
|
+
/** 대상 컬럼의 field 이름. / field name of the target column. */
|
|
27
68
|
field: string;
|
|
69
|
+
/** 그 셀의 원시 값. / Raw value of that cell. */
|
|
28
70
|
value: any;
|
|
71
|
+
/** 그 행의 데이터 객체 전체. / The full row-data object. */
|
|
29
72
|
row: T;
|
|
73
|
+
/** 그 컬럼의 정의. / The column's definition. */
|
|
30
74
|
column: ColumnDef<T>;
|
|
75
|
+
/** 실제 클릭된 셀 DOM 요소. / The actual clicked cell DOM element. */
|
|
31
76
|
target: HTMLElement;
|
|
77
|
+
/** 브라우저 원본 마우스 이벤트(좌표·수식어 키 등). / The underlying browser mouse event (coords, modifier keys …). */
|
|
32
78
|
originalEvent: MouseEvent;
|
|
33
79
|
}
|
|
34
80
|
/**
|
|
35
|
-
* 셀 편집
|
|
36
|
-
*
|
|
81
|
+
* 셀 값 편집의 흐름(편집 시작 → 커밋 직전 → 편집 끝) 각 지점에서 핸들러로 오는 정보입니다.
|
|
82
|
+
* 편집 전 값(oldValue)과 편집 후 값(newValue)을 함께 주므로, 값이 실제로 바뀌었는지 비교하거나
|
|
83
|
+
* 커밋 직전 훅에서 검증 후 되돌릴 수 있습니다.
|
|
84
|
+
* / Delivered at each point in a cell edit (start → just-before-commit → end). It carries both the
|
|
85
|
+
* value before (oldValue) and after (newValue) so you can compare, or validate and veto the commit.
|
|
86
|
+
* 관련 옵션 / Related options: onEditStart, onEditBefore, onEditEnd
|
|
37
87
|
*
|
|
38
88
|
* @typeParam T - 행 데이터 타입 / Row data type
|
|
39
89
|
*/
|
|
40
90
|
export interface EditEvent<T = any> {
|
|
91
|
+
/** 이벤트 이름('editStart'/'editEnd'/'editBefore'). / The event name. */
|
|
41
92
|
type: string;
|
|
93
|
+
/** 편집 중인 행의 화면 표시 순서 인덱스. / Screen-order index of the row being edited. */
|
|
42
94
|
rowIndex: number;
|
|
95
|
+
/** 편집 중인 컬럼의 인덱스. / Index of the column being edited. */
|
|
43
96
|
columnIndex: number;
|
|
97
|
+
/** 편집 중인 컬럼의 field 이름. / field name of the column being edited. */
|
|
44
98
|
field: string;
|
|
99
|
+
/** 편집 전 값. / Value before the edit. */
|
|
45
100
|
oldValue: any;
|
|
101
|
+
/** 편집 후 들어온 값. / Value after the edit. */
|
|
46
102
|
newValue: any;
|
|
103
|
+
/** 편집 중인 행의 데이터 객체. / The row-data object being edited. */
|
|
47
104
|
row: T;
|
|
105
|
+
/** 편집 중인 컬럼의 정의. / The column's definition. */
|
|
48
106
|
column: ColumnDef<T>;
|
|
49
|
-
/** true 로 바꾸면
|
|
107
|
+
/** 편집 커밋 직전(onEditBefore)에 true 로 바꾸면 그 편집을 무효화합니다. / In the pre-commit hook (onEditBefore), set true to reject the edit. */
|
|
50
108
|
cancel?: boolean;
|
|
51
109
|
}
|
|
52
110
|
/**
|
|
53
|
-
* 행
|
|
54
|
-
*
|
|
111
|
+
* 셀이 아니라 "행 전체"를 마우스로 조작했을 때(행 클릭·더블클릭·마우스 올림 등) 오는 정보입니다.
|
|
112
|
+
* 컬럼 정보 없이 어느 행인지와 그 행 데이터만 필요할 때 CellEvent 보다 가볍게 씁니다.
|
|
113
|
+
* / Delivered when the user manipulates a whole row (row click / dbl-click / mouse-over …). Lighter
|
|
114
|
+
* than CellEvent for when you only need which row and its data, not the column.
|
|
115
|
+
* 관련 옵션 / Related options: onRowClick, onRowDblClick, onRowMouseOver …
|
|
55
116
|
*
|
|
56
117
|
* @typeParam T - 행 데이터 타입 / Row data type
|
|
57
118
|
*/
|
|
58
119
|
export interface RowEvent<T = any> {
|
|
120
|
+
/** 이벤트 이름('rowClick' 등). / The event name (e.g. 'rowClick'). */
|
|
59
121
|
type: string;
|
|
122
|
+
/** 대상 행의 화면 표시 순서 인덱스. / Screen-order index of the target row. */
|
|
60
123
|
rowIndex: number;
|
|
124
|
+
/** 그 행의 데이터 객체 전체. / The full row-data object. */
|
|
61
125
|
row: T;
|
|
126
|
+
/** 이벤트가 일어난 행 DOM 요소. / The row DOM element where the event occurred. */
|
|
62
127
|
target: HTMLElement;
|
|
128
|
+
/** 브라우저 원본 마우스 이벤트. / The underlying browser mouse event. */
|
|
63
129
|
originalEvent: MouseEvent;
|
|
64
130
|
}
|
|
65
131
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
132
|
+
* 셀에 포커스가 있는 상태에서 키를 눌렀을 때(키 다운·업·프레스) 오는 정보입니다. CellEvent 가 담는
|
|
133
|
+
* 행·컬럼·값에 더해, 눌린 키 이름(key)을 함께 주므로 Enter 이동·Delete 지우기 같은 단축키를 직접 구현할 수 있습니다.
|
|
134
|
+
* / Delivered when a key is pressed while a cell has focus (keydown/keyup/keypress). On top of the
|
|
135
|
+
* row/column/value that CellEvent carries, it adds the pressed `key` name so you can build
|
|
136
|
+
* shortcuts like Enter-to-move or Delete-to-clear.
|
|
137
|
+
* 관련 옵션 / Related options: onCellKeyDown, onCellKeyUp, onCellKeyPress
|
|
68
138
|
*
|
|
69
139
|
* @typeParam T - 행 데이터 타입 / Row data type
|
|
70
140
|
*/
|
|
71
141
|
export interface CellKeyEvent<T = any> {
|
|
142
|
+
/** 이벤트 이름('cellKeyDown' 등). / The event name. */
|
|
72
143
|
type: string;
|
|
144
|
+
/** 대상 행의 화면 표시 순서 인덱스. / Screen-order index of the target row. */
|
|
73
145
|
rowIndex: number;
|
|
146
|
+
/** 대상 컬럼의 인덱스. / Index of the target column. */
|
|
74
147
|
columnIndex: number;
|
|
148
|
+
/** 대상 컬럼의 field 이름. / field name of the target column. */
|
|
75
149
|
field: string;
|
|
150
|
+
/** 그 셀의 원시 값. / Raw value of that cell. */
|
|
76
151
|
value: any;
|
|
152
|
+
/** 그 행의 데이터 객체 전체. / The full row-data object. */
|
|
77
153
|
row: T;
|
|
154
|
+
/** 그 컬럼의 정의. / The column's definition. */
|
|
78
155
|
column: ColumnDef<T>;
|
|
156
|
+
/** 눌린 키 이름(KeyboardEvent.key: 'Enter','ArrowDown','a' …). / The pressed key name (KeyboardEvent.key). */
|
|
79
157
|
key: string;
|
|
158
|
+
/** 이벤트가 일어난 셀 DOM 요소. / The cell DOM element where the event occurred. */
|
|
80
159
|
target: HTMLElement;
|
|
160
|
+
/** 브라우저 원본 키보드 이벤트(수식어 키 등). / The underlying browser keyboard event (modifier keys …). */
|
|
81
161
|
originalEvent: KeyboardEvent;
|
|
82
162
|
}
|
|
83
163
|
/** 정렬 변경 이벤트(sortChange). / Sort change event (sortChange). */
|
|
@@ -150,40 +230,56 @@ export interface SelectionEvent<T = any> {
|
|
|
150
230
|
cells?: CellRange[];
|
|
151
231
|
}
|
|
152
232
|
/**
|
|
153
|
-
*
|
|
233
|
+
* 선택된 셀들의 사각형 범위를 네 모서리 인덱스로 나타냅니다(엑셀의 A1:C5 같은 개념).
|
|
234
|
+
* 범위 선택 기능이 이 값을 만들어 내고, 수식의 참조 대상과 차트의 데이터 소스가 이 좌표를 그대로 읽어 씁니다.
|
|
235
|
+
* / A rectangular block of selected cells, given as its four corner indexes (think of a spreadsheet's
|
|
236
|
+
* A1:C5). Range selection produces it; cell formulas and chart sources consume the same coordinates.
|
|
237
|
+
*
|
|
238
|
+
* 좌표가 가리키는 것 / What the coordinates mean:
|
|
239
|
+
* - 행 인덱스(startRow/endRow)는 "화면에 보이는 순서"입니다. 그룹·트리의 가상 행이나 펼쳐진 상세 행까지
|
|
240
|
+
* 포함한 순서라서, 정렬·필터만 반영한 순수 데이터 순서와는 다를 수 있습니다.
|
|
241
|
+
* / Row indexes are in on-screen order — they include group/tree pseudo-rows and expanded detail
|
|
242
|
+
* rows, so they can differ from the pure data order that reflects only sort/filter.
|
|
243
|
+
* - 컬럼 인덱스(startCol/endCol)는 "지금 보이는 컬럼들" 기준입니다(숨긴 컬럼 제외). 컬럼을 다시 보이게 하면
|
|
244
|
+
* 재렌더 때 좌표 표시가 갱신됩니다.
|
|
245
|
+
* / Column indexes count only currently visible columns (hidden ones excluded); un-hiding a column
|
|
246
|
+
* refreshes the displayed coordinates on the next render.
|
|
154
247
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* group/tree pseudo-row, (F2 도입 후) detail head/filler 도 포함한 인덱스 공간이며,
|
|
160
|
-
* display index(정렬/필터만 반영, group/tree 제외)와 다르다.
|
|
161
|
-
* - startCol/endCol : `ColumnLayout.visibleLeaves` 인덱스(숨김 컬럼 제외). 숨김 컬럼은
|
|
162
|
-
* 좌표를 흔들지 않되, 언하이드 시 재렌더로 좌표 표시(A1 등)가 갱신된다.
|
|
163
|
-
* - 선택 자체의 영속 정체성은 이 인덱스가 아니라 stable (rowId × field) 앵커로 저장한다
|
|
164
|
-
* (C0.5) — CellRange 는 어디까지나 "현재 화면에 투영된" 사각형 표현이다.
|
|
248
|
+
* 주의 / Note: 선택의 "영구 신원"은 이 인덱스가 아니라 안정적인 (행 id × field) 앵커로 저장됩니다.
|
|
249
|
+
* CellRange 는 어디까지나 "지금 화면에 투영된" 사각형 표현입니다.
|
|
250
|
+
* / The persistent identity of a selection is stored as a stable (rowId × field) anchor, not as these
|
|
251
|
+
* indexes — CellRange is only the "currently projected onto screen" rectangle.
|
|
165
252
|
*/
|
|
166
253
|
export interface CellRange {
|
|
254
|
+
/** 위쪽 경계 행(화면 표시 순서). / Top boundary row (on-screen order). */
|
|
167
255
|
startRow: number;
|
|
256
|
+
/** 아래쪽 경계 행(화면 표시 순서). / Bottom boundary row (on-screen order). */
|
|
168
257
|
endRow: number;
|
|
258
|
+
/** 왼쪽 경계 컬럼(보이는 컬럼 기준). / Left boundary column (among visible columns). */
|
|
169
259
|
startCol: number;
|
|
260
|
+
/** 오른쪽 경계 컬럼(보이는 컬럼 기준). / Right boundary column (among visible columns). */
|
|
170
261
|
endCol: number;
|
|
171
262
|
}
|
|
172
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* 스프레드시트식 범위 선택과 채우기 핸들의 세부 동작을 조절합니다. selection: 'cells' 로 켠 뒤,
|
|
265
|
+
* 채우기 핸들을 보일지·자동 스크롤 폭·시리즈 자동 감지 여부 등을 여기서 미세 조정합니다.
|
|
266
|
+
* / Fine-tunes spreadsheet-style range selection and the fill handle. After enabling selection:
|
|
267
|
+
* 'cells', tweak whether the handle shows, the autoscroll band, series auto-detection, and so on.
|
|
268
|
+
*/
|
|
173
269
|
export interface RangeSelectionOptions {
|
|
174
|
-
/**
|
|
270
|
+
/** 범위 선택 켜기. 생략 시 selection==='cells' 여부를 따릅니다. / Enable range selection. Unset follows whether selection==='cells'. */
|
|
175
271
|
enabled?: boolean;
|
|
176
|
-
/**
|
|
272
|
+
/** 선택 영역 모서리의 채우기 핸들(작은 사각형)을 보이고 드래그할 수 있게 할지. 기본 true. / Show and allow dragging the fill handle (the small corner square). Default true. */
|
|
177
273
|
fillHandle?: boolean;
|
|
178
|
-
/**
|
|
274
|
+
/** Ctrl 로 사각형 여러 개를 동시에 선택하게 할지. 기본 false(아직 미구현). / Whether Ctrl selects several rectangles at once. Default false (not implemented yet). */
|
|
179
275
|
multiRange?: boolean;
|
|
180
|
-
/**
|
|
276
|
+
/** 드래그가 이 가장자리 폭(px) 안에 들어오면 화면이 자동으로 스크롤됩니다. 기본 24. / When the drag enters this edge band (px), the view auto-scrolls. Default 24. */
|
|
181
277
|
autoScrollEdge?: number;
|
|
182
|
-
/** 기본 true
|
|
278
|
+
/** 1,2,3… 같은 규칙을 자동 감지해 이어 채울지. 기본 true. false 면 항상 단순 복사만 합니다. / Whether to auto-detect series (1,2,3…) and extend them. Default true; false always plain-copies. */
|
|
183
279
|
seriesFill?: boolean;
|
|
184
|
-
/**
|
|
280
|
+
/** 그룹·트리 모드에서도 범위 선택을 허용할지. 기본 false(현재 비활성). / Whether range selection also works in group/tree mode. Default false (off for now). */
|
|
185
281
|
enabledInTreeGroup?: boolean;
|
|
186
|
-
/**
|
|
282
|
+
/** 채우기가 수식이 들어 있는 셀을 덮어쓰도록 허용할지. 기본 false(수식 보호). / Whether filling may overwrite cells that contain formulas. Default false (formulas protected). */
|
|
187
283
|
fillOverwriteFormula?: boolean;
|
|
188
284
|
}
|
|
189
285
|
/** F1 채우기 커밋 이벤트(onRangeFill). / F1 fill commit event (onRangeFill). */
|
|
@@ -212,22 +308,36 @@ export interface RangeChangeEvent {
|
|
|
212
308
|
range: CellRange | null;
|
|
213
309
|
}
|
|
214
310
|
export type { FormulaErrorCode } from './formula/types.js';
|
|
215
|
-
/**
|
|
311
|
+
/**
|
|
312
|
+
* 셀에 '=' 로 시작하는 수식을 넣어 다른 셀을 참조·계산하게 하는 기능의 세부 설정입니다. 엑셀처럼
|
|
313
|
+
* 셀에 직접 '=A1+B2' 를 입력해 쓰게 할지, 참조를 어떻게 해석할지, 변경 시 자동으로 다시 계산할지 등을 정합니다.
|
|
314
|
+
* / Settings for cell formulas — cells that start with '=' and reference/compute other cells. Decide
|
|
315
|
+
* whether users can type '=A1+B2' directly, how references are interpreted, and whether edits
|
|
316
|
+
* trigger a recompute.
|
|
317
|
+
*/
|
|
216
318
|
export interface FormulaOptions {
|
|
217
|
-
/**
|
|
319
|
+
/** 셀에 '=' 를 직접 입력하면 수식으로 자동 인식할지. 기본 false(끄면 기존 편집과 동일). setCellFormula API 로는 이 값과 상관없이 언제나 수식을 넣을 수 있습니다. / Whether typing '=' in a cell is auto-recognized as a formula. Default false; the setCellFormula API works regardless. */
|
|
218
320
|
enabled?: boolean;
|
|
219
|
-
/**
|
|
321
|
+
/**
|
|
322
|
+
* 참조를 어떻게 기억할지. 'stable'(기본)은 행을 정렬·이동해도 같은 셀을 계속 가리키고,
|
|
323
|
+
* 'relative'는 위치 기준(엑셀 A1 상대참조처럼)입니다.
|
|
324
|
+
* / How references are anchored. 'stable' (default) keeps pointing at the same cell even after
|
|
325
|
+
* sorting/moving rows; 'relative' is position-based (like a spreadsheet's relative A1 ref).
|
|
326
|
+
*/
|
|
220
327
|
refMode?: 'stable' | 'relative';
|
|
221
|
-
/** 나눗셈
|
|
328
|
+
/** 나눗셈 결과의 소수점 자리수. 기본 30. / Decimal precision for division results. Default 30. */
|
|
222
329
|
divisionPrecision?: number;
|
|
223
|
-
/** 수식
|
|
330
|
+
/** 상단 수식 입력 바를 보일지. 기본 false(아직 미구현). / Whether to show a top formula bar. Default false (not implemented yet). */
|
|
224
331
|
formulaBar?: boolean;
|
|
225
|
-
/**
|
|
332
|
+
/** 수식이 든 셀에 표식(마커)을 달아 구분해 줄지. 기본 true. / Whether to mark formula-bearing cells so they stand out. Default true. */
|
|
226
333
|
cellMarker?: boolean;
|
|
227
|
-
/**
|
|
334
|
+
/** 참조된 셀이 바뀌면 수식을 자동으로 다시 계산할지. 기본 true. / Whether editing a referenced cell auto-recomputes the formula. Default true. */
|
|
228
335
|
autoRecalc?: boolean;
|
|
336
|
+
/** 어떤 셀의 수식 자체가 바뀌었을 때 호출. / Fired when a cell's formula text itself changes. */
|
|
229
337
|
onFormulaChange?: (e: FormulaChangeEvent) => void;
|
|
338
|
+
/** 재계산이 끝났을 때 호출(무엇이 바뀌었고 얼마나 걸렸는지). / Fired after a recompute finishes (what changed, how long it took). */
|
|
230
339
|
onFormulaRecalc?: (e: FormulaRecalcEvent) => void;
|
|
340
|
+
/** 수식 계산 중 오류(순환 참조·0 나눗셈 등)가 났을 때 호출. / Fired on a formula error (circular ref, divide-by-zero …). */
|
|
231
341
|
onFormulaError?: (e: FormulaErrorEvent) => void;
|
|
232
342
|
}
|
|
233
343
|
/** F3 수식 변경 이벤트(onFormulaChange). / F3 formula change event (onFormulaChange). */
|
|
@@ -243,7 +353,7 @@ export interface FormulaRecalcEvent {
|
|
|
243
353
|
changed: string[];
|
|
244
354
|
cycles: number;
|
|
245
355
|
ms: number;
|
|
246
|
-
/**
|
|
356
|
+
/** 이번에 다시 계산해야 했던 셀 무리가 임계값(500)을 넘었으면 true. 성능 모니터링·경고용 신호입니다. / true when the recalculated cell set exceeded the threshold (500) — a signal for perf monitoring/warnings. */
|
|
247
357
|
large: boolean;
|
|
248
358
|
}
|
|
249
359
|
/** F3 수식 오류 이벤트(onFormulaError). / F3 formula error event (onFormulaError). */
|
|
@@ -253,96 +363,151 @@ export interface FormulaErrorEvent {
|
|
|
253
363
|
error: FormulaErrorCode;
|
|
254
364
|
}
|
|
255
365
|
export type { RangeStats } from './range/RangeQuery.js';
|
|
256
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* 상세 패널을 직접 그릴 때(renderer) 세 번째 인자로 받는 도우미 묶음입니다. 방금 펼쳐진 행의 정보와,
|
|
368
|
+
* 그 패널을 접거나 다시 재는 조작을 담고 있어 커스텀 패널 안에서 그리드를 되짚을 수 있습니다.
|
|
369
|
+
* / The helper bundle passed as the 3rd argument when you draw a detail panel yourself (renderer). It
|
|
370
|
+
* carries the just-expanded row's info plus actions to collapse or re-measure the panel, so your
|
|
371
|
+
* custom panel can reach back into the grid.
|
|
372
|
+
*/
|
|
257
373
|
export interface DetailRenderApi<T = any> {
|
|
374
|
+
/** 이 패널을 소유한 그리드 인스턴스. / The grid instance owning this panel. */
|
|
258
375
|
grid: OpenGridInstance<T>;
|
|
376
|
+
/** 펼쳐진 행의 안정적 id. / Stable id of the expanded row. */
|
|
259
377
|
rowId: string;
|
|
260
|
-
/**
|
|
378
|
+
/** 이 그리드가 몇 겹째 중첩인지. 0 = 최상위. / How deeply nested this grid is. 0 = top level. */
|
|
261
379
|
depth: number;
|
|
262
|
-
/** 이 패널을
|
|
380
|
+
/** 이 패널을 접습니다. / Collapse this panel. */
|
|
263
381
|
collapse: () => void;
|
|
264
|
-
/** 패널
|
|
382
|
+
/** 패널 크기를 다시 잽니다. / Re-measure the panel. */
|
|
265
383
|
refresh: () => void;
|
|
266
384
|
}
|
|
267
|
-
/**
|
|
385
|
+
/**
|
|
386
|
+
* 각 행을 펼치면 그 아래에 딸린 상세 패널이 열리는 마스터/디테일 기능의 설정입니다. 주문 목록에서 한 줄을
|
|
387
|
+
* 열면 주문 상세가, 부서 목록에서 한 줄을 열면 소속 직원 표가 펼쳐지는 식입니다. 패널 내용은 두 가지 방법으로
|
|
388
|
+
* 채웁니다 — 직접 HTML 을 그리는 renderer 를 주거나, 자식 그리드를 자동 생성하는 subgridOptions 를 줍니다.
|
|
389
|
+
* / Master/detail: expanding a row opens an attached detail panel beneath it — open an order to see
|
|
390
|
+
* its lines, open a department to see its staff. Fill the panel either by drawing HTML yourself
|
|
391
|
+
* (renderer) or by auto-creating a child grid (subgridOptions).
|
|
392
|
+
*/
|
|
268
393
|
export interface MasterDetailOptions<T = any> {
|
|
269
|
-
/** 기능
|
|
394
|
+
/** 기능 켜기/끄기. 기본 false(꺼짐). / Turn the feature on/off. Default false (off). */
|
|
270
395
|
enabled?: boolean;
|
|
271
|
-
/**
|
|
396
|
+
/** 패널 안을 직접 그리는 함수(host 요소에 HTML/컴포넌트 주입). subgridOptions 와 같이 주면 이쪽이 우선. / A function that draws the panel yourself (inject HTML/components into host). Wins over subgridOptions if both given. */
|
|
272
397
|
renderer?: (row: T, host: HTMLElement, api: DetailRenderApi<T>) => void | HTMLElement;
|
|
273
|
-
/**
|
|
398
|
+
/** 패널의 세로 높이(px). 기본 200. 현재는 행 높이의 배수로 맞춰집니다. / Panel height (px). Default 200. Currently snapped to a multiple of the row height. */
|
|
274
399
|
height?: number;
|
|
275
400
|
/**
|
|
276
|
-
* 'fixed'(기본)만
|
|
277
|
-
*
|
|
278
|
-
* / Only 'fixed' (default) works
|
|
279
|
-
* if
|
|
401
|
+
* 패널 높이를 어떻게 정할지. 'fixed'(기본)만 지금 동작합니다. 'auto'(내용에 맞춰 자동)는 아직 미공개라,
|
|
402
|
+
* 지정해도 'fixed' 로 처리되고 한 번 경고를 남깁니다.
|
|
403
|
+
* / How the panel height is decided. Only 'fixed' (default) works today. 'auto' (fit-to-content) is
|
|
404
|
+
* not released yet — if set, it's treated as 'fixed' and warns once.
|
|
280
405
|
*/
|
|
281
406
|
heightMode?: 'fixed' | 'auto';
|
|
282
|
-
/** 기본 true. false
|
|
407
|
+
/** 여러 행을 동시에 펼쳐 둘지. 기본 true. false 로 하면 아코디언처럼 한 번에 하나만 열립니다. / Whether several rows can stay open at once. Default true; false = accordion (one open at a time). */
|
|
283
408
|
expandMultiple?: boolean;
|
|
284
|
-
/**
|
|
409
|
+
/** true 면 접어도 패널 내용을 캐시로 남겨 다시 펼칠 때 재생성을 건너뜁니다. 기본 false. / true keeps the panel cached when collapsed, skipping rebuild on re-expand. Default false. */
|
|
285
410
|
cache?: boolean;
|
|
286
|
-
/**
|
|
411
|
+
/** 펼침/접힘 버튼을 어디에 둘지. 기본 'expander-col'(전용 컬럼). 'first-cell'=첫 셀 안. / Where the expand toggle sits. Default 'expander-col' (a dedicated column); 'first-cell' = inside the first cell. */
|
|
287
412
|
toggle?: 'expander-col' | 'first-cell';
|
|
288
|
-
/** 패널
|
|
413
|
+
/** 스크린리더가 읽을 패널 영역 이름. 기본 '상세 내용'. / The panel region's screen-reader label. Default '상세 내용' (Details). */
|
|
289
414
|
ariaLabel?: string;
|
|
290
|
-
/**
|
|
415
|
+
/** 패널 안에 또 패널을 열 수 있는 최대 겹수. 기본 2. / How many levels of nested panels are allowed. Default 2. */
|
|
291
416
|
maxDepth?: number;
|
|
292
|
-
/**
|
|
417
|
+
/** 지정하면 height(px) 대신 "행 몇 개 높이"(정수, 최소 1)로 패널 높이를 정합니다. / When set, sizes the panel by row-count (integer, min 1) instead of height(px). */
|
|
293
418
|
detailRowCount?: number;
|
|
294
|
-
/** renderer
|
|
419
|
+
/** renderer 를 안 줬을 때, 이 옵션으로 자식 그리드를 자동 생성해 패널을 채웁니다. / When no renderer is given, auto-create a child grid from these options to fill the panel. */
|
|
295
420
|
subgridOptions?: GridOptions<any>;
|
|
296
421
|
}
|
|
297
|
-
/**
|
|
422
|
+
/**
|
|
423
|
+
* 행 상세 패널이 펼쳐지거나(rowExpand) 접힐 때(rowCollapse) 핸들러로 오는 정보입니다.
|
|
424
|
+
* 어느 행인지와, 그 상세 패널이 붙은 DOM 요소(host)를 함께 줍니다.
|
|
425
|
+
* / Delivered when a row's detail panel expands (rowExpand) or collapses (rowCollapse). It tells you
|
|
426
|
+
* which row it was and the DOM element (host) the detail panel is attached to.
|
|
427
|
+
*/
|
|
298
428
|
export interface RowExpandEvent<T = any> {
|
|
299
|
-
/**
|
|
429
|
+
/** 대상 행의 화면 표시 순서 인덱스. / Screen-order index of the target row. */
|
|
300
430
|
rowIndex: number;
|
|
431
|
+
/** 대상 행의 안정적 id. / Stable id of the target row. */
|
|
301
432
|
rowId: string;
|
|
433
|
+
/** 그 행의 데이터 객체. / The row-data object. */
|
|
302
434
|
row: T;
|
|
435
|
+
/** 상세 패널이 붙은 DOM 요소(접힘 이벤트에서는 null 일 수 있음). / The DOM element the detail panel is attached to (may be null on collapse). */
|
|
303
436
|
host: HTMLElement | null;
|
|
304
437
|
}
|
|
305
|
-
/**
|
|
438
|
+
/**
|
|
439
|
+
* 셀을 어떻게 그릴지 자세히 지정합니다. 렌더러 타입 이름만으로 부족해 부가 설정까지 주고 싶을 때
|
|
440
|
+
* 씁니다(`column.renderer` 에 문자열 대신 이 객체를 넘김). `type` 이외의 키는 렌더러마다 다르게 해석됩니다.
|
|
441
|
+
* / Detailed spec for how a cell is drawn. Use it (instead of a bare renderer-type string in
|
|
442
|
+
* `column.renderer`) when the renderer needs extra settings. Keys beyond `type` are
|
|
443
|
+
* renderer-specific.
|
|
444
|
+
*/
|
|
306
445
|
export interface RendererDef {
|
|
446
|
+
/** 사용할 내장 렌더러 이름. / Which built-in renderer to use. */
|
|
307
447
|
type: RendererType;
|
|
448
|
+
/** 렌더러별 추가 옵션(자유 키). / Renderer-specific extra options (free-form keys). */
|
|
308
449
|
[key: string]: any;
|
|
309
450
|
}
|
|
310
|
-
/**
|
|
451
|
+
/**
|
|
452
|
+
* 편집기를 어떻게 열지 자세히 지정합니다. 예를 들어 `select` 편집기에 선택지 목록을,
|
|
453
|
+
* `number` 편집기에 최소·최대·증가폭을 함께 줄 때 씁니다(`column.editor` 에 이 객체를 넘김).
|
|
454
|
+
* / Detailed spec for how the editor opens — e.g. a `select` editor's choices, or a `number`
|
|
455
|
+
* editor's min/max/step (passed to `column.editor`).
|
|
456
|
+
*/
|
|
311
457
|
export interface EditorDef {
|
|
458
|
+
/** 사용할 내장 편집기 이름. / Which built-in editor to use. */
|
|
312
459
|
type: EditorType;
|
|
460
|
+
/** select 편집기의 선택지(문자열 또는 {label,value}). / Choices for a select editor. */
|
|
313
461
|
options?: Array<string | {
|
|
314
462
|
label: string;
|
|
315
463
|
value: any;
|
|
316
464
|
}>;
|
|
465
|
+
/** select 에서 다중 선택 허용. / Allow multiple selection in select. */
|
|
317
466
|
multiple?: boolean;
|
|
467
|
+
/** number 편집기의 최솟값. / Minimum for a number editor. */
|
|
318
468
|
min?: number;
|
|
469
|
+
/** number 편집기의 최댓값. / Maximum for a number editor. */
|
|
319
470
|
max?: number;
|
|
471
|
+
/** number 편집기의 증가 단위. / Step increment for a number editor. */
|
|
320
472
|
step?: number;
|
|
473
|
+
/** 입력값 포맷 문자열. / Format string for the input value. */
|
|
321
474
|
format?: string;
|
|
475
|
+
/** 빈 편집기에 보일 안내 문구. / Placeholder shown in an empty editor. */
|
|
322
476
|
placeholder?: string;
|
|
477
|
+
/** 편집기별 추가 옵션(자유 키). / Editor-specific extra options (free-form keys). */
|
|
323
478
|
[key: string]: any;
|
|
324
479
|
}
|
|
325
480
|
/**
|
|
326
|
-
* 컬럼
|
|
481
|
+
* 컬럼 한 개를 어떻게 보이고 동작하게 할지 담는 설정 뭉치입니다. 그리드는 `columns` 배열에 담긴 이
|
|
482
|
+
* 정의들을 왼쪽부터 순서대로 그립니다. 최소한 `field`(어떤 데이터를 보여줄지)와 `header`(머리글 글자)만
|
|
483
|
+
* 있으면 되고, 나머지는 필요할 때만 켜는 선택 항목입니다.
|
|
484
|
+
* / The settings bundle for a single column — what it shows and how it behaves. The grid draws the
|
|
485
|
+
* definitions in the `columns` array left to right. Only `field` (which data to show) and `header`
|
|
486
|
+
* (the caption) are required; everything else is opt-in.
|
|
327
487
|
*
|
|
328
488
|
* @typeParam T - 행 데이터 타입 / Row data type
|
|
329
489
|
* @example
|
|
330
490
|
* const col: ColumnDef = { field: 'price', header: '가격', type: 'number', format: '#,##0' };
|
|
331
491
|
*/
|
|
332
492
|
export interface ColumnDef<T = any> {
|
|
333
|
-
/** 행 객체의 속성
|
|
493
|
+
/** 이 컬럼이 읽어 올 행 객체의 속성 이름(예: 행이 `{price: 1000}` 이면 `'price'`). 컬럼마다 고유. / The row-object property this column reads (e.g. `'price'` for a row `{price: 1000}`). Unique per column. */
|
|
334
494
|
field: string;
|
|
335
|
-
/**
|
|
495
|
+
/** 머리글에 보일 글자. 문자열 안의 '\n' 은 두 줄로 나뉩니다. / The caption shown in the header. A '\n' inside splits into two lines. */
|
|
336
496
|
header: string;
|
|
337
|
-
/**
|
|
497
|
+
/** 이 폭(px)으로 고정. 지정하면 flex 를 무시하고 정확히 이 값이 됩니다. / Pin this width (px). When set it overrides flex and stays exactly this. */
|
|
338
498
|
width?: number;
|
|
339
|
-
/** 최소 폭(px). /
|
|
499
|
+
/** 줄어들 때 넘지 않을 최소 폭(px). / Lower bound (px) the column won't shrink past. */
|
|
340
500
|
minWidth?: number;
|
|
341
|
-
/** 최대 폭(px). /
|
|
501
|
+
/** 늘어날 때 넘지 않을 최대 폭(px). / Upper bound (px) the column won't grow past. */
|
|
342
502
|
maxWidth?: number;
|
|
343
|
-
/**
|
|
503
|
+
/** 남는 가로 공간을 컬럼끼리 나눌 때의 비율. 값이 클수록 더 많이 차지합니다(width 미지정 컬럼끼리). / Weight for sharing leftover horizontal space — higher takes more (among columns without width). */
|
|
344
504
|
flex?: number;
|
|
345
|
-
/**
|
|
505
|
+
/**
|
|
506
|
+
* 이 컬럼 값의 종류. 이걸 정하면 그에 맞는 정렬 방식과 기본 렌더러가 자동으로 붙습니다
|
|
507
|
+
* (예: 'number' 는 오른쪽 정렬 + 숫자 비교). 지정하지 않으면 문자열처럼 다룹니다.
|
|
508
|
+
* / The kind of value here. Setting it auto-wires the matching sort behavior and default renderer
|
|
509
|
+
* (e.g. 'number' → right-aligned + numeric compare). Unset behaves like a string.
|
|
510
|
+
*/
|
|
346
511
|
type?: DataType;
|
|
347
512
|
/**
|
|
348
513
|
* 숫자/날짜 포맷 문자열. 숫자는 통화 기호 접두·접미와 음수 패턴 지원:
|
|
@@ -353,13 +518,18 @@ export interface ColumnDef<T = any> {
|
|
|
353
518
|
format?: string;
|
|
354
519
|
/** ISO 통화코드('KRW'|'USD'|'EUR'…). 지정 시 Intl.NumberFormat 로케일 통화 포맷 (format 보다 우선) / ISO currency code; uses Intl.NumberFormat locale currency formatting (takes precedence over format) */
|
|
355
520
|
currency?: string;
|
|
356
|
-
/**
|
|
521
|
+
/** 저장된 코드값을 사람이 읽는 말로 바꿔 보여줄 때(예: `{ 'M': '남', 'F': '여' }`). / Show human-readable text for stored codes (e.g. `{ 'M':'Male', 'F':'Female' }`). */
|
|
357
522
|
valueMap?: Record<string, string>;
|
|
358
|
-
/**
|
|
523
|
+
/** 셀을 그리는 방식. 내장 렌더러 이름 한 줄로 주거나, 부가 옵션이 필요하면 RendererDef 객체로 줍니다. / How the cell is drawn — a built-in renderer name, or a RendererDef object when extras are needed. */
|
|
359
524
|
renderer?: RendererType | RendererDef;
|
|
360
|
-
/**
|
|
525
|
+
/**
|
|
526
|
+
* 이 컬럼을 편집할 수 있는지. true 면 항상 편집 가능, 함수로 주면 행마다 다르게 결정합니다
|
|
527
|
+
* (예: 상태가 '확정'인 행만 잠그기). GridOptions.editable 과 둘 다 참일 때만 실제로 열립니다.
|
|
528
|
+
* / Whether this column is editable. true = always; a function decides per row (e.g. lock only
|
|
529
|
+
* 'finalized' rows). Editing opens only when this AND GridOptions.editable are true.
|
|
530
|
+
*/
|
|
361
531
|
editable?: boolean | ((row: T, rowIndex: number) => boolean);
|
|
362
|
-
/**
|
|
532
|
+
/** 편집기 종류. 내장 편집기 이름 한 줄로 주거나, 선택지·최소/최대 등이 필요하면 EditorDef 객체로 줍니다. / The editor — a built-in editor name, or an EditorDef object for choices/min/max, etc. */
|
|
363
533
|
editor?: EditorType | EditorDef;
|
|
364
534
|
/** 셀 정렬. / Cell text alignment. */
|
|
365
535
|
align?: 'left' | 'center' | 'right';
|
|
@@ -369,15 +539,15 @@ export interface ColumnDef<T = any> {
|
|
|
369
539
|
cellStyle?: CSSProperties | ((value: any, row: T, rowIndex: number) => CSSProperties);
|
|
370
540
|
/** 헤더 인라인 스타일. / Header inline style. */
|
|
371
541
|
headerStyle?: CSSProperties;
|
|
372
|
-
/**
|
|
542
|
+
/** 이 컬럼 머리글을 클릭하면 정렬되게 할지. 특정 컬럼만 정렬을 막거나 허용할 때 씁니다. / Whether clicking this header sorts. Use it to allow/deny sorting per column. */
|
|
373
543
|
sortable?: boolean;
|
|
374
|
-
/** 필터
|
|
544
|
+
/** 이 컬럼에 필터 아이콘·패널을 띄울지. / Whether to show the filter icon/panel on this column. */
|
|
375
545
|
filterable?: boolean;
|
|
376
|
-
/**
|
|
546
|
+
/** 머리글 경계를 드래그해 폭을 조절하게 할지. / Whether the user can drag the header edge to resize. */
|
|
377
547
|
resizable?: boolean;
|
|
378
|
-
/**
|
|
548
|
+
/** true 면 이 컬럼을 화면에서 감춥니다(데이터는 남고 showColumn 으로 다시 보임). / true hides the column (data stays; showColumn brings it back). */
|
|
379
549
|
hidden?: boolean;
|
|
380
|
-
/**
|
|
550
|
+
/** true 면 가로 스크롤과 무관하게 왼쪽에 붙박아 둡니다(핵심 식별 컬럼 고정용). / true pins the column to the left regardless of horizontal scroll (for key identifier columns). */
|
|
381
551
|
frozen?: boolean;
|
|
382
552
|
/** 셀 줄바꿈: true 면 nowrap+ellipsis 대신 여러 줄로 표시(rowHeight 확대와 함께 사용) / Cell wrapping: true renders multiple lines instead of nowrap+ellipsis (use with a larger rowHeight) */
|
|
383
553
|
wrap?: boolean;
|
|
@@ -416,13 +586,13 @@ export interface ColumnDef<T = any> {
|
|
|
416
586
|
sanitize?: boolean;
|
|
417
587
|
/** barcode — 바코드 높이(px), 기본 28 / barcode — bar height in px, default 28 */
|
|
418
588
|
barcodeHeight?: number;
|
|
419
|
-
/**
|
|
589
|
+
/** 표시할 때 반올림해서 보여줄 소수점 자리수(합계 계산에도 반영). / Decimal places to show (also applied to summing). */
|
|
420
590
|
precision?: number;
|
|
421
|
-
/** 컬럼
|
|
591
|
+
/** 이 컬럼 값을 다른 컬럼으로 자동 계산. 함수식 또는 '[field]' 를 쓰는 문자열식. / Auto-compute this column from others — a function, or a string using '[field]' refs. */
|
|
422
592
|
formula?: string | ((row: T, D: any) => any);
|
|
423
|
-
/**
|
|
593
|
+
/** 수식 나눗셈의 소수점 자리수. 기본 30. / Decimal precision for division inside the formula. Default 30. */
|
|
424
594
|
formulaPrecision?: number;
|
|
425
|
-
/** 마스킹 타입 또는 상세 정의. / Mask type or detailed
|
|
595
|
+
/** 이 컬럼 값을 가려 표시할 마스킹 타입 또는 상세 정의. / Mask type or detailed definition to obscure this column's values. */
|
|
426
596
|
mask?: import('./MaskingEngine.js').MaskType | import('./MaskingEngine.js').MaskDef;
|
|
427
597
|
/** 트리 노드 아이콘(정적 정의 또는 행별 함수). / Tree node icon (static def or per-row function). */
|
|
428
598
|
treeNodeIcon?: TreeNodeIconDef | ((row: T, hasChildren: boolean, expanded: boolean) => string);
|
|
@@ -447,16 +617,32 @@ export interface TreeNodeIconDef {
|
|
|
447
617
|
leaf?: string;
|
|
448
618
|
}
|
|
449
619
|
type CSSProperties = Partial<Record<keyof CSSStyleDeclaration, string>>;
|
|
450
|
-
/**
|
|
620
|
+
/**
|
|
621
|
+
* "이 컬럼을 이 방향으로 정렬" 한 건을 나타냅니다. 여러 개를 배열로 넘기면 앞에 있는 것이 1차 기준,
|
|
622
|
+
* 그 값이 같을 때 다음 것이 2차 기준이 되는 다중 정렬이 됩니다(예: 부서 오름차순 → 급여 내림차순).
|
|
623
|
+
* / One "sort this column this way" entry. Passed as an array, the first is the primary key and later
|
|
624
|
+
* entries break ties — i.e. multi-column sort (e.g. dept asc, then salary desc).
|
|
625
|
+
*/
|
|
451
626
|
export interface SortItem {
|
|
627
|
+
/** 정렬 기준 컬럼의 field. / field of the column to sort by. */
|
|
452
628
|
field: string;
|
|
629
|
+
/** 정렬 방향. / Sort direction. */
|
|
453
630
|
dir: SortDir;
|
|
454
631
|
}
|
|
455
|
-
/**
|
|
632
|
+
/**
|
|
633
|
+
* 필터 한 줄 = "연산자 + 비교값". 예: `{ operator: '>=', value: 1000 }` 는 값이 1000 이상인 행만 남깁니다.
|
|
634
|
+
* 한 컬럼에 여러 조건을 배열로 걸 수 있습니다(모두 만족하는 행만 통과).
|
|
635
|
+
* / One filter clause = "operator + value". e.g. `{ operator: '>=', value: 1000 }` keeps rows whose
|
|
636
|
+
* value is at least 1000. Multiple clauses per column combine (a row must satisfy all).
|
|
637
|
+
*/
|
|
456
638
|
export interface FilterItem {
|
|
457
|
-
/**
|
|
639
|
+
/**
|
|
640
|
+
* 비교 방식. `'='`·`'!='`·`'>'`·`'>='`·`'<'`·`'<='` 는 값 비교, `'contains'`·`'startsWith'`·`'endsWith'`
|
|
641
|
+
* 는 텍스트 부분 일치입니다. / How to compare — the six symbols are value comparisons; the three
|
|
642
|
+
* word operators are text substring matches.
|
|
643
|
+
*/
|
|
458
644
|
operator: '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith';
|
|
459
|
-
/** 비교 값. /
|
|
645
|
+
/** 비교 기준 값. / The value to compare against. */
|
|
460
646
|
value: any;
|
|
461
647
|
}
|
|
462
648
|
/** 집계 연산자. / Aggregate operator. */
|
|
@@ -467,28 +653,38 @@ export interface SummaryFieldDef {
|
|
|
467
653
|
op: SummaryOp;
|
|
468
654
|
label?: string;
|
|
469
655
|
}
|
|
470
|
-
/**
|
|
656
|
+
/**
|
|
657
|
+
* 그룹마다 소계/합계 행을 자동으로 끼워 넣는 설정입니다. groupBy 로 묶은 각 그룹의 지정 필드를
|
|
658
|
+
* 합·평균 등으로 집계해 그룹 위나 아래에 요약 행으로 보여 줍니다.
|
|
659
|
+
* / Auto-inserts a subtotal/summary row per group. For each group made by groupBy it aggregates the
|
|
660
|
+
* chosen fields (sum, average …) and shows the result as a summary row above or below the group.
|
|
661
|
+
*/
|
|
471
662
|
export interface SummaryOptions {
|
|
472
|
-
/**
|
|
663
|
+
/** 집계할 컬럼들의 field 목록. / field names of the columns to aggregate. */
|
|
473
664
|
fields: string[];
|
|
474
|
-
/**
|
|
665
|
+
/** 어떤 집계를 적용할지(하나 또는 여러 개). 생략 시 기본 동작. / Which aggregate(s) to apply (one or several). */
|
|
475
666
|
ops?: SummaryOp | SummaryOp[];
|
|
476
|
-
/**
|
|
667
|
+
/** 요약 행을 그룹 위('top')에 둘지 아래('bottom')에 둘지. / Put the summary row above ('top') or below ('bottom') the group. */
|
|
477
668
|
position?: 'top' | 'bottom';
|
|
478
|
-
/**
|
|
669
|
+
/** 한 그룹에 요약 행을 여러 줄 만들 때(예: 합계 줄 + 평균 줄). customFn 으로 직접 집계도 가능. / Multiple summary rows per group (e.g. a sum row + an average row); customFn allows your own aggregation. */
|
|
479
670
|
rows?: Array<{
|
|
480
671
|
op: SummaryOp;
|
|
481
672
|
label?: string;
|
|
482
673
|
customFn?: (items: any[]) => number;
|
|
483
674
|
}>;
|
|
484
675
|
}
|
|
485
|
-
/**
|
|
676
|
+
/**
|
|
677
|
+
* 그리드 맨 아래(또는 위) 고정 푸터의 셀 한 칸을 정의합니다. 스크롤과 무관하게 늘 보이는 합계 줄을
|
|
678
|
+
* 만들 때 씁니다. `field`+`op` 를 주면 그 컬럼을 집계해 표시하고, `label` 만 주면 고정 문구를 표시합니다.
|
|
679
|
+
* / Defines one cell of the pinned footer (bottom or top) — an always-visible totals row that stays
|
|
680
|
+
* put while the body scrolls. Give `field`+`op` to aggregate a column, or `label` for fixed text.
|
|
681
|
+
*/
|
|
486
682
|
export interface FooterDef {
|
|
487
|
-
/** 집계
|
|
683
|
+
/** 집계할 컬럼의 field(집계 셀일 때). / field of the column to aggregate (for an aggregate cell). */
|
|
488
684
|
field?: string;
|
|
489
|
-
/**
|
|
685
|
+
/** 어떤 집계를 낼지(SUM/AVG/…). / Which aggregate to compute (SUM/AVG/…). */
|
|
490
686
|
op?: SummaryOp;
|
|
491
|
-
/**
|
|
687
|
+
/** 집계 대신 그대로 보여줄 고정 문구(예: '합계'). / Fixed text shown instead of an aggregate (e.g. 'Total'). */
|
|
492
688
|
label?: string;
|
|
493
689
|
/**
|
|
494
690
|
* 숫자 포맷 문자열
|
|
@@ -512,27 +708,33 @@ export interface PrintOptions {
|
|
|
512
708
|
}
|
|
513
709
|
/** 내보내기 스타일 모드. / Export style mode. */
|
|
514
710
|
export type ExportStyleMode = 'theme' | 'none' | 'custom';
|
|
515
|
-
/**
|
|
711
|
+
/**
|
|
712
|
+
* 그리드 내용을 Excel·CSV·JSON 파일로 내보낼 때의 세부 설정입니다. 아무것도 안 주면 기본값으로 곧장
|
|
713
|
+
* 내보내지고, 파일명·시트명·제외 컬럼·제목 행 등을 필요할 때만 얹습니다. 문자열 하나만 넘기면 파일명으로 해석됩니다.
|
|
714
|
+
* / Settings for exporting the grid to Excel/CSV/JSON. With nothing set it exports with defaults;
|
|
715
|
+
* add filename, sheet name, excluded columns, title rows, etc. only as needed. A lone string is
|
|
716
|
+
* treated as the filename.
|
|
717
|
+
*/
|
|
516
718
|
export interface ExportOptions {
|
|
517
|
-
/**
|
|
719
|
+
/** 저장될 파일 이름. / The saved file's name. */
|
|
518
720
|
filename?: string;
|
|
519
|
-
/** 엑셀
|
|
721
|
+
/** 엑셀 시트 탭 이름. / Excel sheet tab name. */
|
|
520
722
|
sheetName?: string;
|
|
521
|
-
/**
|
|
723
|
+
/** 머리글 행을 포함할지. 기본 true. / Whether to include the header row. Default true. */
|
|
522
724
|
includeHeader?: boolean;
|
|
523
|
-
/**
|
|
725
|
+
/** 내보내기에서 뺄 컬럼들의 field. / field names of columns to leave out. */
|
|
524
726
|
exceptFields?: string[];
|
|
525
|
-
/** 데이터 위에
|
|
727
|
+
/** 데이터 위에 얹을 제목 행들(보고서 머리말 등). / Extra title rows placed above the data (report headings, etc.). */
|
|
526
728
|
headers?: ExportHeaderRow[];
|
|
527
|
-
/** 데이터 아래에
|
|
729
|
+
/** 데이터 아래에 붙일 행들(비고·서명란 등). / Extra rows appended below the data (notes, sign-off …). */
|
|
528
730
|
footers?: ExportHeaderRow[];
|
|
529
|
-
/**
|
|
731
|
+
/** 내보낸 파일에 그리드 테마 색을 입힐지 방식. 기본 'theme'(현재 테마 반영). / How to style the exported file — default 'theme' (carry the current theme). */
|
|
530
732
|
styleMode?: ExportStyleMode;
|
|
531
|
-
/** true
|
|
733
|
+
/** true 면 마스킹된 컬럼을 가려진 상태 그대로 내보냅니다. 기본 false = 원본 값 내보냄. / true exports masked columns still obscured. Default false = raw values. */
|
|
532
734
|
maskOnExport?: boolean;
|
|
533
|
-
/** 내보내기
|
|
735
|
+
/** 내보내기 시작 직전에 부를 훅(로딩 표시 등). / A hook called just before export starts (show a spinner …). */
|
|
534
736
|
onBefore?: () => void | Promise<void>;
|
|
535
|
-
/** 내보내기 완료
|
|
737
|
+
/** 내보내기 완료 후 부를 훅. 만들어진 파일 blob 을 받습니다. / A hook called after export, receiving the produced file blob. */
|
|
536
738
|
onAfter?: (blob: Blob) => void;
|
|
537
739
|
}
|
|
538
740
|
/** 내보내기 제목/푸터 행. / Export title/footer row. */
|
|
@@ -564,27 +766,37 @@ export interface ExportHeaderRow {
|
|
|
564
766
|
export interface GridOptions<T = any> {
|
|
565
767
|
/** 컬럼 정의 배열(필수). / Column definitions (required). */
|
|
566
768
|
columns: ColumnDef<T>[];
|
|
567
|
-
/**
|
|
769
|
+
/**
|
|
770
|
+
* 그리드의 세로 크기. 숫자면 px, 문자열이면 CSS 값('60vh' 등)입니다. 가상 스크롤이 제대로 돌려면
|
|
771
|
+
* 확정된 높이가 필요하므로, 큰 데이터에서는 이 값(또는 조상 요소의 높이)을 꼭 주는 걸 권합니다.
|
|
772
|
+
* / The grid's vertical size — a number is px, a string is a CSS value ('60vh' …). Virtual scroll
|
|
773
|
+
* needs a definite height, so on large data set this (or an ancestor's height).
|
|
774
|
+
*/
|
|
568
775
|
height?: number | string;
|
|
569
|
-
/**
|
|
776
|
+
/** 그리드의 가로 크기. 숫자면 px, 문자열이면 CSS 값. 생략 시 부모 폭을 채웁니다. / The grid's horizontal size — number = px, string = CSS. Unset fills the parent width. */
|
|
570
777
|
width?: number | string;
|
|
571
|
-
/**
|
|
778
|
+
/**
|
|
779
|
+
* 데이터 행 한 줄의 세로 픽셀 높이. 촘촘하게 많이 보이려면 줄이고, 터치·가독성 위주면 키웁니다.
|
|
780
|
+
* 가상 스크롤이 이 값으로 "화면에 몇 행이 들어갈지"를 계산합니다. 기본 32.
|
|
781
|
+
* / Height in px of one data row. Lower it to pack more rows in; raise it for touch/readability.
|
|
782
|
+
* Virtual scroll uses this to compute how many rows fit on screen. Default 32.
|
|
783
|
+
*/
|
|
572
784
|
rowHeight?: number;
|
|
573
|
-
/** 헤더
|
|
785
|
+
/** 머리글(헤더) 행의 높이(px). 여러 줄 헤더면 자동으로 늘어나므로 보통은 생략. / Header row height (px). Grows automatically for multi-line headers, so usually omitted. */
|
|
574
786
|
headerHeight?: number;
|
|
575
|
-
/** 푸터
|
|
787
|
+
/** 푸터(합계) 행의 높이(px). / Footer (totals) row height (px). */
|
|
576
788
|
footerHeight?: number;
|
|
577
|
-
/** 행 내용에 맞춰
|
|
789
|
+
/** 셀 내용이 길어 줄바꿈될 때 행 높이를 내용에 맞춰 자동으로 늘립니다. 컬럼의 wrap 과 함께 씁니다. / Auto-grow a row's height to fit wrapped content. Use together with a column's wrap. */
|
|
578
790
|
autoHeight?: boolean;
|
|
579
|
-
/** 컬럼
|
|
791
|
+
/** 컬럼 폭의 합이 컨테이너를 꽉 채우도록 늘립니다. 오른쪽에 빈 공간을 남기고 싶지 않을 때. / Stretch column widths so their sum fills the container — when you don't want empty space on the right. */
|
|
580
792
|
fillWidth?: boolean;
|
|
581
|
-
/** width
|
|
793
|
+
/** width 도 flex 도 안 준 컬럼에 적용할 기본 폭(px). / Fallback width (px) for columns given neither width nor flex. */
|
|
582
794
|
defaultColumnWidth?: number;
|
|
583
795
|
/**
|
|
584
796
|
* 뷰포트 안전장치(옵트인, 기본 undefined = OFF = 기존 동작 완전 불변).
|
|
585
797
|
* / Viewport safety net (opt-in; default undefined = OFF = behavior fully unchanged).
|
|
586
798
|
* 호스트가 그리드 컨테이너 조상 체인에 확정 높이(definite height)를 주지 않으면
|
|
587
|
-
* 내부 스페이서(totalRows×rowHeight)가 컨테이너를 전체 콘텐츠 크기로
|
|
799
|
+
* 내부 스페이서(totalRows×rowHeight)가 컨테이너를 전체 콘텐츠 크기로 늘리고,
|
|
588
800
|
* ResizeObserver 되먹임으로 windowing 이 무력화되어 전 행이 DOM 렌더되는 폭주가 발생한다
|
|
589
801
|
* (대량 데이터일수록 재앙적). 이 값을 지정하면, 컨테이너가 전 콘텐츠를 다 담는 "언바운드"
|
|
590
802
|
* 상태로 감지될 때에 한해 윈도잉 뷰포트 높이를 이 값(px)으로 클램프해 폭주를 차단한다.
|
|
@@ -598,45 +810,51 @@ export interface GridOptions<T = any> {
|
|
|
598
810
|
* this option is a safety net.
|
|
599
811
|
*/
|
|
600
812
|
fallbackViewportHeight?: number;
|
|
601
|
-
/**
|
|
813
|
+
/** 그리드 전체의 편집 스위치. 켜져 있고 컬럼의 editable 도 참일 때만 실제로 편집이 열립니다(둘 다 참 조건). / The grid-wide edit switch. Editing opens only when this AND a column's editable are true. */
|
|
602
814
|
editable?: boolean;
|
|
603
|
-
/**
|
|
815
|
+
/** 편집을 어떻게 시작할지. 'click'=한 번 클릭, 'dblclick'=더블클릭, 'none'=마우스로는 진입 불가(API 로만). / How editing starts — 'click' single click, 'dblclick' double click, 'none' no mouse entry (API only). */
|
|
604
816
|
editMode?: 'click' | 'dblclick' | 'none';
|
|
605
|
-
/** (예약) 편집
|
|
817
|
+
/** (예약) 편집 실행취소 히스토리 — 아직 미구현. / (Reserved) undo history for edits — not implemented yet. */
|
|
606
818
|
history?: boolean;
|
|
607
|
-
/** (예약)
|
|
819
|
+
/** (예약) 히스토리에 담을 최대 단계 수 — 아직 미구현. / (Reserved) max steps kept in history — not implemented yet. */
|
|
608
820
|
historySize?: number;
|
|
609
|
-
/**
|
|
821
|
+
/** 사용자가 무엇을 선택할 수 있는지. 'cells' 로 하면 스프레드시트식 범위 선택이 됩니다. / What the user can select. 'cells' enables spreadsheet-style range selection. */
|
|
610
822
|
selection?: SelectionMode;
|
|
611
|
-
/**
|
|
823
|
+
/** Ctrl+C / Ctrl+V 로 셀 값을 복사·붙여넣기하게 할지. / Whether Ctrl+C / Ctrl+V copy-paste of cell values is enabled. */
|
|
612
824
|
clipboard?: boolean;
|
|
613
|
-
/**
|
|
825
|
+
/** 범위 선택 + 채우기 핸들(엑셀식 드래그 채우기) 세부 설정. / Range selection + fill handle (Excel-style drag-fill) detailed options. */
|
|
614
826
|
rangeSelection?: RangeSelectionOptions;
|
|
615
|
-
/**
|
|
827
|
+
/** 셀 수식('=A1+B2' 같은 식) 기능 세부 설정. / Cell-formula ('=A1+B2'-style) detailed options. */
|
|
616
828
|
formula?: FormulaOptions;
|
|
617
|
-
/**
|
|
829
|
+
/** 마스터/디테일(행을 펼쳐 상세 패널 표시) 세부 설정. / Master/detail (expand a row into a detail panel) detailed options. */
|
|
618
830
|
masterDetail?: MasterDetailOptions<T>;
|
|
619
|
-
/**
|
|
831
|
+
/** 그리드 데이터를 그대로 쓰는 통합 차트 세부 설정. / Detailed options for the chart integrated on the grid's own data. */
|
|
620
832
|
chart?: import('./chart/types.js').ChartGlobalOptions;
|
|
621
|
-
/**
|
|
833
|
+
/**
|
|
834
|
+
* 조건부 서식 규칙 목록(값에 따라 셀을 데이터바·색조·아이콘으로 강조). 지정하지 않으면 아무 것도 바뀌지 않습니다.
|
|
835
|
+
* / Conditional-format rules — highlight cells by value with data-bars, color scales, or icon sets.
|
|
836
|
+
* Unset changes nothing.
|
|
837
|
+
*/
|
|
838
|
+
conditionalFormat?: import('./cf/CFRule.js').CFRule[];
|
|
839
|
+
/** 머리글 클릭 정렬을 그리드 전체에서 켤지. 컬럼별 sortable 로 예외를 둘 수 있습니다. / Turn header-click sorting on grid-wide. Per-column sortable can override. */
|
|
622
840
|
sortable?: boolean;
|
|
623
|
-
/** Shift
|
|
841
|
+
/** Shift+클릭으로 여러 컬럼을 겹쳐 정렬(2차·3차 기준)하게 할지. / Whether Shift+click stacks multiple sort keys (secondary, tertiary …). */
|
|
624
842
|
multiSort?: boolean;
|
|
625
|
-
/**
|
|
843
|
+
/** 필터 기능을 그리드 전체에서 켤지. 컬럼별 filterable 로 예외를 둘 수 있습니다. / Turn filtering on grid-wide. Per-column filterable can override. */
|
|
626
844
|
filterable?: boolean;
|
|
627
|
-
/**
|
|
845
|
+
/** 처음 로드될 때 미리 적용해 둘 정렬 상태. / The sort state to apply up front on first load. */
|
|
628
846
|
defaultSort?: SortItem[];
|
|
629
|
-
/**
|
|
847
|
+
/** 왼쪽부터 몇 개 컬럼을 가로 스크롤과 무관하게 고정할지. / How many leftmost columns stay pinned while scrolling horizontally. */
|
|
630
848
|
frozenColumns?: number;
|
|
631
|
-
/** (예약) 고정 행 수 — 미구현. / (Reserved) frozen
|
|
849
|
+
/** (예약) 위쪽 고정 행 수 — 아직 미구현. / (Reserved) number of top-frozen rows — not implemented yet. */
|
|
632
850
|
frozenRows?: number;
|
|
633
|
-
/** 행 번호
|
|
851
|
+
/** 맨 왼쪽에 1,2,3… 행 번호 컬럼을 붙일지. / Whether to add a leftmost 1,2,3… row-number column. */
|
|
634
852
|
rowNumber?: boolean;
|
|
635
|
-
/**
|
|
853
|
+
/** 각 행이 추가/수정/삭제 중 어떤 상태인지 표시하는 컬럼을 붙일지(편집 추적용). / Whether to add a column showing each row's added/edited/removed state (for change tracking). */
|
|
636
854
|
stateColumn?: boolean;
|
|
637
|
-
/** 체크박스
|
|
855
|
+
/** 행 선택용 체크박스 컬럼을 붙일지. / Whether to add a checkbox column for selecting rows. */
|
|
638
856
|
checkColumn?: boolean;
|
|
639
|
-
/**
|
|
857
|
+
/** 행을 드래그해 순서를 바꾸게 할지. / Whether rows can be dragged to reorder. */
|
|
640
858
|
draggable?: boolean;
|
|
641
859
|
/** 그리드↔그리드 행 드래그 이동 허용 (draggable:true 와 함께 사용, 양쪽 그리드 모두 true 여야 이동) / Enable grid-to-grid row drag (use with draggable:true; both grids must be true) */
|
|
642
860
|
crossGrid?: boolean;
|
|
@@ -649,27 +867,32 @@ export interface GridOptions<T = any> {
|
|
|
649
867
|
crossGridMapping?: 'auto' | 'interactive' | ((srcRow: T) => Partial<T>);
|
|
650
868
|
/** 셀 병합 기능 사용. / Enable cell merging. */
|
|
651
869
|
mergeCells?: boolean;
|
|
652
|
-
/**
|
|
870
|
+
/** 처음부터 이 필드들로 행을 묶어 보여 줄지. 여러 개면 다단계 그룹이 됩니다(예: 지역 → 부서). / Which fields to group rows by from the start. Several means nested groups (e.g. region → dept). */
|
|
653
871
|
groupBy?: string[];
|
|
654
|
-
/**
|
|
872
|
+
/** 각 그룹에 소계/합계 요약 행을 붙이는 설정. / Options for attaching subtotal/summary rows to each group. */
|
|
655
873
|
summary?: SummaryOptions;
|
|
656
|
-
/**
|
|
874
|
+
/**
|
|
875
|
+
* 트리(계층) 데이터를 어떤 모양으로 받을지. 'auto'=각 행이 children 배열로 자식을 품은 중첩 구조,
|
|
876
|
+
* 'flat'=모든 행이 한 줄이고 id/부모id 로 관계를 표현하는 평면 구조.
|
|
877
|
+
* / How hierarchical data is shaped. 'auto' = each row nests its children in a children array;
|
|
878
|
+
* 'flat' = every row is a flat entry linked by id / parent-id.
|
|
879
|
+
*/
|
|
657
880
|
treeMode?: 'auto' | 'flat';
|
|
658
|
-
/** flat
|
|
881
|
+
/** flat 트리에서 각 행의 고유 id 가 담긴 필드 이름. / In flat tree mode, the field holding each row's unique id. */
|
|
659
882
|
treeId?: string;
|
|
660
|
-
/** flat
|
|
883
|
+
/** flat 트리에서 부모 행의 id 가 담긴 필드 이름. / In flat tree mode, the field holding the parent row's id. */
|
|
661
884
|
treeParentId?: string;
|
|
662
|
-
/**
|
|
885
|
+
/** 로드하자마자 모든 노드를 펼쳐 둘지. / Whether to expand every node right after loading. */
|
|
663
886
|
expandOnLoad?: boolean;
|
|
664
|
-
/**
|
|
887
|
+
/** 아래쪽 페이지 이동 바를 띄울지. / Whether to show the pagination bar at the bottom. */
|
|
665
888
|
pagination?: boolean;
|
|
666
|
-
/**
|
|
889
|
+
/** 한 페이지에 몇 행을 보일지. / How many rows show per page. */
|
|
667
890
|
pageSize?: number;
|
|
668
|
-
/**
|
|
891
|
+
/** 아래(또는 위) 고정 푸터에 넣을 셀 정의들(합계 줄 등). / Cell definitions for the pinned footer (e.g. a totals row). */
|
|
669
892
|
footer?: FooterDef[];
|
|
670
|
-
/**
|
|
893
|
+
/** 푸터를 아래('bottom')에 둘지 위('top')에 둘지. / Put the footer at the bottom ('bottom') or top ('top'). */
|
|
671
894
|
footerPosition?: 'top' | 'bottom';
|
|
672
|
-
/**
|
|
895
|
+
/** true 면 모든 셀에 마우스를 올렸을 때 그 값이 브라우저 기본 툴팁으로 뜹니다. 컬럼의 tooltip 설정이 있으면 그쪽이 우선. / true shows every cell's value as a native browser tooltip on hover; a column's own tooltip wins. */
|
|
673
896
|
tooltips?: boolean;
|
|
674
897
|
/** 그리드 컨테이너 aria-label. / aria-label of the grid container. */
|
|
675
898
|
ariaLabel?: string;
|
|
@@ -677,6 +900,10 @@ export interface GridOptions<T = any> {
|
|
|
677
900
|
theme?: string;
|
|
678
901
|
/** 스킨 (FORM 축, R12b) — data-og-skin. 미지정 시 'default'(오늘과 byte-identical). / Skin (FORM axis, R12b) — data-og-skin. Default 'default' (byte-identical to stock look). */
|
|
679
902
|
skin?: string;
|
|
903
|
+
/** 행 간격(밀도) 이름. 촘촘·보통·여유처럼 행 높이와 여백을 통째로 바꿉니다. 지정하지 않으면 아무 것도 바뀌지 않습니다. / The row-spacing (density) name — compact/normal/roomy row heights and paddings. Unset changes nothing. */
|
|
904
|
+
density?: string;
|
|
905
|
+
/** 배경 질감(패턴) 이름. 셀 배경에 무늬만 입힙니다. 지정하지 않으면 아무 것도 바뀌지 않습니다. / The background texture (pattern) name — paints a pattern on cell backgrounds. Unset changes nothing. */
|
|
906
|
+
texture?: string;
|
|
680
907
|
/** 컨테이너에 주입할 CSS 변수 맵. / CSS custom properties injected on the container. */
|
|
681
908
|
cssVars?: Record<string, string>;
|
|
682
909
|
/**
|
|
@@ -690,15 +917,20 @@ export interface GridOptions<T = any> {
|
|
|
690
917
|
* / Per-instance partial message override (2-level deep-merge over the catalog). Per-label option > messages > catalog.
|
|
691
918
|
*/
|
|
692
919
|
messages?: PartialLocaleMessages;
|
|
693
|
-
/**
|
|
920
|
+
/** 우클릭 컨텍스트 메뉴. true=기본 메뉴, false=끔, 배열=직접 정한 항목들. / Right-click context menu — true = default menu, false = off, array = your own items. */
|
|
694
921
|
contextMenu?: boolean | ContextMenuItem[];
|
|
695
|
-
/**
|
|
922
|
+
/** 엑셀처럼 하단 탭으로 여러 시트를 전환하는 워크시트 정의들. / Worksheet definitions — Excel-like bottom tabs switching between multiple sheets. */
|
|
696
923
|
worksheets?: WorksheetDef[];
|
|
697
|
-
/**
|
|
924
|
+
/** 수식·집계 계산에 쓸 기본 소수점 정밀도. 기본 10. / Default decimal precision for formulas/aggregation. Default 10. */
|
|
698
925
|
calcPrecision?: number;
|
|
699
|
-
/** 컬럼
|
|
926
|
+
/** 머리글을 드래그해 컬럼 순서를 바꾸게 할지. / Whether headers can be dragged to reorder columns. */
|
|
700
927
|
columnReorder?: boolean;
|
|
701
|
-
/**
|
|
928
|
+
/**
|
|
929
|
+
* override 로 감싼 함수에서 예외가 나면 어떻게 할지. 기본(true, strict)은 예외를 그대로 전파합니다.
|
|
930
|
+
* false 로 하면 경고 후 원본 함수를 실행하는 완화(fallback) 동작을 허용합니다.
|
|
931
|
+
* / What happens when an overridden layer throws. Default (true, strict) propagates the error;
|
|
932
|
+
* false permits the softer fallback that warns then runs the original.
|
|
933
|
+
*/
|
|
702
934
|
overrideStrict?: boolean;
|
|
703
935
|
/** 첫 렌더 완료 콜백. / Fired after the first render. */
|
|
704
936
|
onReady?: (grid: OpenGridInstance<T>) => void;
|
|
@@ -709,14 +941,15 @@ export interface GridOptions<T = any> {
|
|
|
709
941
|
onEditBefore?: (e: EditEvent<T>) => boolean;
|
|
710
942
|
onRowClick?: (e: RowEvent<T>) => void;
|
|
711
943
|
onSelectionChange?: (e: SelectionEvent<T>) => void;
|
|
712
|
-
/**
|
|
944
|
+
/** 선택된 셀 범위가 바뀔 때마다 호출(차트가 이걸 실시간으로 구독하기도 함). / Fired whenever the selected cell range changes (the chart can subscribe to it live). */
|
|
713
945
|
onRangeChange?: (e: RangeChangeEvent) => void;
|
|
714
|
-
/**
|
|
946
|
+
/** 채우기 핸들로 값 채우기가 확정된 뒤, 무엇이 어떻게 채워졌는지 결과를 전달. / After a fill-handle fill commits, delivers what was filled and how. */
|
|
715
947
|
onRangeFill?: (e: RangeFillEvent) => void;
|
|
716
|
-
/**
|
|
948
|
+
/** 선택 범위를 복사(Ctrl+C)했을 때 호출. / Fired when the selected range is copied (Ctrl+C). */
|
|
717
949
|
onRangeCopy?: (e: RangeCopyEvent) => void;
|
|
718
|
-
/**
|
|
950
|
+
/** 행 상세 패널이 펼쳐질 때 호출. / Fired when a row's detail panel expands. */
|
|
719
951
|
onRowExpand?: (e: RowExpandEvent<T>) => void;
|
|
952
|
+
/** 행 상세 패널이 접힐 때 호출. / Fired when a row's detail panel collapses. */
|
|
720
953
|
onRowCollapse?: (e: RowExpandEvent<T>) => void;
|
|
721
954
|
onSortChange?: (e: SortEvent) => void;
|
|
722
955
|
onFilterChange?: (e: FilterEvent) => void;
|
|
@@ -767,13 +1000,21 @@ export interface OverrideCallOptions {
|
|
|
767
1000
|
/** 등록 가능한 알고리즘 슬롯 이름. / Registerable algorithm slot names. */
|
|
768
1001
|
export type StrategySlot = 'sortComparator' | 'filterPredicate' | 'displayFormatter' | 'cellSerializer' | 'groupKeyFn' | 'summaryOp' | 'cellClassResolver' | 'ariaLabelResolver' | 'skinResolver';
|
|
769
1002
|
/**
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
1003
|
+
* 스킨이 조절할 수 있는 CSS 변수 이름들의 목록입니다. 여기 담긴 것은 모두 "형태"에 관한 값(모서리 둥글기,
|
|
1004
|
+
* 테두리 두께, 그림자, 여백, 질감 등)뿐이고 색은 하나도 없습니다. 색은 별도의 테마(COLOR) 축이 맡습니다.
|
|
1005
|
+
* 이렇게 이름 자체를 색과 겹치지 않게 나눠 두어, 스킨을 바꿔도 색은 영향받지 않도록 보장합니다.
|
|
1006
|
+
* / The set of CSS-variable names a skin may adjust. Every one of these is about *form* (corner
|
|
1007
|
+
* radius, border width, elevation, spacing, texture …) and none are colors — color is owned by the
|
|
1008
|
+
* separate theme (COLOR) axis. Keeping the names disjoint guarantees a skin change never touches color.
|
|
774
1009
|
*/
|
|
775
1010
|
export type SkinTokenName = '--og-radius-none' | '--og-radius-sm' | '--og-radius-md' | '--og-radius-lg' | '--og-radius-pill' | '--og-radius-container' | '--og-radius-control' | '--og-radius-widget' | '--og-container-radius' | '--og-border-width' | '--og-border-width-strong' | '--og-border-style' | '--og-divider-style' | '--og-divider-repeat' | '--og-elevation-sm' | '--og-elevation-md' | '--og-elevation-lg' | '--og-elevation-alpha-sm' | '--og-elevation-alpha-md' | '--og-elevation-alpha-lg' | '--og-elevation-inset' | '--og-cell-padding-x' | '--og-cell-padding-y' | '--og-density-row-height' | '--og-density-header-height' | '--og-density-footer-height' | '--og-scrollbar-size' | '--og-texture-bg' | '--og-texture-size' | '--og-texture-opacity' | '--og-focus-width' | '--og-focus-style' | '--og-focus-offset' | '--og-focus-radius' | '--og-icon-size' | '--og-icon-fill' | '--og-icon-stroke-width' | '--og-icon-corner' | '--og-transition-fast' | '--og-transition-base' | '--og-row-accent-width';
|
|
776
|
-
/**
|
|
1011
|
+
/**
|
|
1012
|
+
* 스킨 하나가 바꾸는 "형태 변수 → 값" 묶음입니다(바꾸고 싶은 것만 골라 담는 부분 지정). 형태 전용이라,
|
|
1013
|
+
* 값에 색(예: '#fff')을 넣으면 등록 시점에 거부됩니다 — 색은 테마 축의 몫이기 때문입니다.
|
|
1014
|
+
* / A skin's bundle of "form variable → value" overrides (partial — include only what you change).
|
|
1015
|
+
* It is form-only: putting a color literal (e.g. '#fff') in a value is rejected at registration,
|
|
1016
|
+
* because color belongs to the theme axis.
|
|
1017
|
+
*/
|
|
777
1018
|
export type SkinTokenDelta = Partial<Record<SkinTokenName, string>>;
|
|
778
1019
|
/** 단일키 정렬 비교자. dir 부호는 호출자(DataLayer)가 적용 — 슬롯은 비교만 반환. / Single-key sort comparator. The dir sign is applied by the caller (DataLayer) — the slot only compares. */
|
|
779
1020
|
export type SortComparatorFn = (a: any, b: any, field: string, dir: 'asc' | 'desc') => number;
|
|
@@ -787,15 +1028,15 @@ export type CellSerializerFn = (value: any, col: any, row: any) => any;
|
|
|
787
1028
|
export type GroupKeyFn = (row: any, remainingFields: string[]) => any;
|
|
788
1029
|
/** 집계 연산. null 반환 시 기본 SUM/AVG/COUNT/MAX/MIN 분기로 폴백. / Aggregate operator. Returning null falls back to the built-in SUM/AVG/COUNT/MAX/MIN branch. */
|
|
789
1030
|
export type SummaryOpFn = (op: string, nums: any[], field: string) => number | null;
|
|
790
|
-
/**
|
|
1031
|
+
/** 셀마다 CSS 클래스 이름을 붙여 주는 함수 슬롯. 값·행에 따라 셀에 추가할 className 을 돌려줍니다(null 이면 아무 것도 안 붙임). / A slot that assigns a CSS class per cell — return the className to add based on value/row (null adds nothing). */
|
|
791
1032
|
export type CellClassResolverFn = (value: any, field: string, row: any) => string | null;
|
|
792
|
-
/**
|
|
1033
|
+
/** 셀의 스크린리더용 라벨(aria-label)을 바꿔 주는 함수 슬롯. 대체 라벨을 돌려줍니다(null 이면 기본값 유지). / A slot that overrides a cell's screen-reader label (aria-label) — return a replacement (null keeps the default). */
|
|
793
1034
|
export type AriaLabelResolverFn = (value: any, field: string, row: any) => string | null;
|
|
794
1035
|
/**
|
|
795
|
-
*
|
|
796
|
-
* ⚠️
|
|
797
|
-
* /
|
|
798
|
-
* ⚠️ Only the registration path exists;
|
|
1036
|
+
* 채우기 핸들의 "이어 채우기" 규칙을 직접 정의하는 함수 슬롯입니다(예: 날짜·요일·사용자 정의 수열).
|
|
1037
|
+
* ⚠️ 지금은 등록 통로만 열려 있고 실제 채우기에 연결되는 배선은 향후 버전에서 제공됩니다.
|
|
1038
|
+
* / A slot to define your own fill-series rule for the fill handle (dates, weekdays, custom sequences).
|
|
1039
|
+
* ⚠️ Only the registration path exists today; the wiring that actually consumes it ships in a later version.
|
|
799
1040
|
*/
|
|
800
1041
|
export type FillSeriesResolverFn = (sourceLine: any[], k: number, axisSign: 1 | -1) => any;
|
|
801
1042
|
/** 슬롯명 → 시그니처 매핑. / Slot name → signature map. */
|
|
@@ -812,57 +1053,65 @@ export interface StrategyMap {
|
|
|
812
1053
|
skinResolver: SkinResolverFn;
|
|
813
1054
|
}
|
|
814
1055
|
/**
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
* /
|
|
818
|
-
*
|
|
819
|
-
* built-in skin catalog applies as-is.
|
|
1056
|
+
* 스킨 이름을 받아 그 스킨의 형태 변수 묶음을 직접 만들어 돌려주는 함수 슬롯입니다. 내장 스킨 대신 나만의
|
|
1057
|
+
* 스킨 해석 규칙을 통째로 끼워 넣을 때 씁니다(null 을 돌려주면 내장 스킨 카탈로그를 그대로 사용).
|
|
1058
|
+
* / A slot that takes a skin name and returns that skin's form-variable bundle — plug in your own
|
|
1059
|
+
* skin-resolution rule in place of the built-ins (return null to fall back to the built-in catalog).
|
|
820
1060
|
*/
|
|
821
1061
|
export type SkinResolverFn = (skinId: string) => SkinTokenDelta | null;
|
|
822
1062
|
/**
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
* open — this interface only surfaces blessed extension-point names for IDE discovery.
|
|
1063
|
+
* override 로 감싸는 것이 **공식적으로 보장되는** 확장점 이름들의 목록입니다. 이 이름들은 버전이 올라가도
|
|
1064
|
+
* 유지되며 IDE 자동완성에 뜹니다. 목록에 없는 임의 메서드 이름도 override("이름", fn) 문자열 방식으로 감쌀 수
|
|
1065
|
+
* 있지만(최선 노력), 그건 보장 밖입니다.
|
|
1066
|
+
* / The list of extension points whose override is **officially guaranteed** — these names survive
|
|
1067
|
+
* version bumps and show up in IDE autocomplete. Any other method name can still be wrapped via the
|
|
1068
|
+
* string form override("name", fn) on a best-effort basis, but without that guarantee.
|
|
830
1069
|
*/
|
|
831
1070
|
export interface OverridePoints<T = any> {
|
|
832
|
-
/**
|
|
1071
|
+
/** 셀에 실제로 보이는 텍스트를 계산하는 지점. / Where a cell's visible display text is computed. */
|
|
833
1072
|
getDisplayValue(rowIndex: number, field: string): string;
|
|
834
|
-
/** 원시
|
|
1073
|
+
/** 셀의 원시 값을 읽는 지점. / Where a cell's raw value is read. */
|
|
835
1074
|
readCell(rowIndex: number, field: string): any;
|
|
836
1075
|
}
|
|
837
|
-
/**
|
|
1076
|
+
/**
|
|
1077
|
+
* grid.override 의 두 얼굴입니다 — 그 자체를 함수처럼 불러 메서드를 감쌀 수도 있고(override(...)),
|
|
1078
|
+
* .strategy(...) 로 정렬·포맷 같은 알고리즘 슬롯을 갈아 끼울 수도 있습니다. 모든 호출은 체이닝을 위해
|
|
1079
|
+
* 그리드 인스턴스를 다시 돌려줍니다.
|
|
1080
|
+
* / The two faces of grid.override — call it like a function to wrap a method (override(...)), or use
|
|
1081
|
+
* .strategy(...) to swap an algorithm slot like sorting/formatting. Every call returns the grid
|
|
1082
|
+
* instance for chaining.
|
|
1083
|
+
*/
|
|
838
1084
|
export interface OverrideApi<T = any> {
|
|
839
|
-
/**
|
|
1085
|
+
/** 보장된 확장점 이름을 감싸는 타입드 오버로드(IDE 자동완성). / Typed overload for the guaranteed extension-point names (IDE autocomplete). */
|
|
840
1086
|
<K extends keyof OverridePoints<T>>(name: K, fn: OverrideLayerFn, opts?: OverrideCallOptions): OpenGridInstance<T>;
|
|
841
|
-
/**
|
|
1087
|
+
/** 임의 메서드를 본문 수정 없이 런타임에 감쌉니다(문자열 이름 방식). 체이닝을 위해 그리드를 반환. / Wrap any method at runtime without touching its body (string-name form). Returns the grid for chaining. */
|
|
842
1088
|
(name: string, fn: OverrideLayerFn, opts?: OverrideCallOptions): OpenGridInstance<T>;
|
|
843
|
-
/** 알고리즘 슬롯
|
|
1089
|
+
/** 알고리즘 슬롯 하나를 내 함수로 등록합니다. 체이닝을 위해 그리드를 반환. / Register one algorithm slot with your function. Returns the grid for chaining. */
|
|
844
1090
|
strategy<K extends StrategySlot>(slot: K, fn: StrategyMap[K]): OpenGridInstance<T>;
|
|
845
1091
|
strategy(slot: string, fn: Function): OpenGridInstance<T>;
|
|
846
1092
|
}
|
|
847
1093
|
/**
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
*
|
|
1094
|
+
* `new OpenGrid(...)` 로 만든 그리드가 밖에 내어 주는 조작 창구(메서드 모음)입니다. 데이터 넣기·읽기,
|
|
1095
|
+
* 행·컬럼 편집, 정렬·필터, 선택, 내보내기, 테마 전환 등 그리드에게 시킬 수 있는 모든 일이 여기 모여 있습니다.
|
|
1096
|
+
* 각 메서드의 자세한 설명은 이 계약을 구현하는 OpenGrid 클래스 쪽에 있습니다.
|
|
1097
|
+
* / The set of methods a grid built with `new OpenGrid(...)` exposes — everything you can ask the
|
|
1098
|
+
* grid to do: load/read data, edit rows & columns, sort/filter, select, export, switch themes, and
|
|
1099
|
+
* more. Per-method detail lives on the OpenGrid class that implements this contract.
|
|
851
1100
|
*
|
|
852
1101
|
* @typeParam T - 행 데이터 타입 / Row data type
|
|
853
1102
|
*/
|
|
854
1103
|
export interface OpenGridInstance<T = any> {
|
|
855
|
-
/** 공개 메서드를
|
|
1104
|
+
/** 공개 메서드를 런타임에 감싸 동작을 바꾸거나(.override), 정렬·포맷 같은 알고리즘 슬롯을 갈아 끼웁니다(.strategy). / Wrap a public method at runtime to change its behavior (.override), or swap an algorithm slot like sorting/formatting (.strategy). */
|
|
856
1105
|
override: OverrideApi<T>;
|
|
857
|
-
/**
|
|
1106
|
+
/** 이름을 지정한 메서드 하나를 원래 동작으로 되돌립니다. / Restore one named method to its original behavior. */
|
|
858
1107
|
restore(name: string): OpenGridInstance<T>;
|
|
859
|
-
/**
|
|
1108
|
+
/** 걸어 둔 모든 override 와 strategy 를 한 번에 되돌립니다(그리드 파기 시 자동 호출). / Undo all overrides and strategies at once (called automatically on destroy). */
|
|
860
1109
|
restoreAll(): OpenGridInstance<T>;
|
|
861
|
-
/**
|
|
1110
|
+
/** 그 메서드가 지금 override 로 감싸져 있는지 확인합니다. / Check whether that method is currently overridden. */
|
|
862
1111
|
hasOverride(name: string): boolean;
|
|
863
|
-
/** override
|
|
1112
|
+
/** override 로 감싼 메서드 이름들의 목록을 돌려줍니다. / Return the list of overridden method names. */
|
|
864
1113
|
getOverrideNames(): string[];
|
|
865
|
-
/**
|
|
1114
|
+
/** 등록된 알고리즘 슬롯 함수를 가져옵니다(없으면 넘긴 fallback 을 그대로 반환). / Fetch a registered algorithm-slot function (returns the given fallback if none). */
|
|
866
1115
|
getStrategy<F extends Function>(slot: string, fallback: F): F;
|
|
867
1116
|
setData(data: T[]): void;
|
|
868
1117
|
getData(): T[];
|
|
@@ -870,6 +1119,14 @@ export interface OpenGridInstance<T = any> {
|
|
|
870
1119
|
pushData(data: T[]): void;
|
|
871
1120
|
prefixData(data: T[]): void;
|
|
872
1121
|
clearData(): void;
|
|
1122
|
+
/**
|
|
1123
|
+
* 조건부 서식 규칙을 지정합니다 — 값에 따라 셀에 데이터바·색조(히트맵)·아이콘셋을 입혀 강조합니다.
|
|
1124
|
+
* 규칙이 걸린 컬럼의 통계(최소·최대 등)를 미리 계산해 두고 다시 그립니다. 빈 배열을 주면 조건부 서식을 모두 해제합니다.
|
|
1125
|
+
* / Set conditional-format rules — highlight cells by value with data-bars, color scales (heatmaps),
|
|
1126
|
+
* or icon sets. It precomputes the rule-bearing columns' stats (min/max …) and re-renders. Pass an
|
|
1127
|
+
* empty array to clear all conditional formatting.
|
|
1128
|
+
*/
|
|
1129
|
+
setConditionalFormat(rules: import('./cf/CFRule.js').CFRule[]): Promise<void>;
|
|
873
1130
|
insertRow(item: Partial<T>, position?: Position): void;
|
|
874
1131
|
pushRow(items: Partial<T> | Partial<T>[]): void;
|
|
875
1132
|
unshiftRow(items: Partial<T> | Partial<T>[]): void;
|
|
@@ -880,15 +1137,17 @@ export interface OpenGridInstance<T = any> {
|
|
|
880
1137
|
getDisplayValue(rowIndex: number, field: string): string;
|
|
881
1138
|
writeCell(rowIndex: number, field: string, value: any): void;
|
|
882
1139
|
getRowAt(rowIndex: number): T;
|
|
883
|
-
/**
|
|
1140
|
+
/** 화면에 보이는 행 순서와 실제 데이터를 이어 주는 내부 모델을 돌려줍니다(고급 배선용). / Return the internal model mapping on-screen row order to actual data (for advanced wiring). */
|
|
884
1141
|
getFlatRowModel(): import('./FlatRowModel.js').FlatRowModel;
|
|
885
|
-
/**
|
|
1142
|
+
/** 여러 셀을 한꺼번에 쓸 때, 이 호출 이후의 writeCell 들이 즉시 다시 그리지 않도록 렌더를 잠시 미룹니다. / Start a batch — subsequent writeCell calls defer their render/change events instead of firing each time. */
|
|
886
1143
|
beginBatch(): void;
|
|
887
|
-
/**
|
|
1144
|
+
/** 배치를 끝내고, 그 사이 변경이 있었으면 단 한 번만 다시 그리고 변경 이벤트도 한 번만 냅니다. / End the batch — if anything changed, render once and emit one coalesced change event. */
|
|
888
1145
|
endBatch(): void;
|
|
889
1146
|
/**
|
|
890
|
-
* beginBatch
|
|
891
|
-
*
|
|
1147
|
+
* 여러 셀 쓰기를 한 번에 처리하는 간편 래퍼(beginBatch → 반복 쓰기 → endBatch). rowIndex 는 화면
|
|
1148
|
+
* 표시 순서이며, 그룹·트리·상세 같은 실제 데이터가 아닌 가상 행은 안전하게 건너뜁니다. 반환값은 건너뛴 셀 수입니다.
|
|
1149
|
+
* / A convenience wrapper that writes many cells at once (beginBatch → loop → endBatch). rowIndex is
|
|
1150
|
+
* screen-order; non-data pseudo-rows (group/tree/detail) are safely skipped. Returns how many were skipped.
|
|
892
1151
|
*/
|
|
893
1152
|
writeCells(patches: Array<{
|
|
894
1153
|
rowIndex: number;
|
|
@@ -936,63 +1195,75 @@ export interface OpenGridInstance<T = any> {
|
|
|
936
1195
|
getActiveRow(): number;
|
|
937
1196
|
activate(index: number): void;
|
|
938
1197
|
deselect(): void;
|
|
939
|
-
/**
|
|
1198
|
+
/** 현재 선택된 셀 범위들(없으면 빈 배열). 지금은 한 번에 하나까지 담깁니다. / Currently selected cell ranges (empty if none). At most one for now. */
|
|
940
1199
|
getRangeSelection(): CellRange[];
|
|
941
|
-
/**
|
|
1200
|
+
/** 지금 활성인 범위 하나(없으면 null). 차트가 이 값을 읽어 씁니다. / The single active range (null if none). The chart reads this. */
|
|
942
1201
|
getActiveRange(): CellRange | null;
|
|
1202
|
+
/** 셀 범위를 프로그램에서 직접 선택합니다. / Select a cell range programmatically. */
|
|
943
1203
|
setRangeSelection(range: CellRange | CellRange[]): void;
|
|
1204
|
+
/** 현재 범위 선택을 모두 해제합니다. / Clear the current range selection. */
|
|
944
1205
|
clearRangeSelection(): void;
|
|
945
|
-
/** 현재 활성
|
|
1206
|
+
/** 현재 활성 범위 안 셀 값들을 행×열 2차원 배열로 돌려줍니다(차트가 소비). / Return the active range's cell values as a 2-D (rows×cols) array (consumed by the chart). */
|
|
946
1207
|
getRangeValues(): any[][];
|
|
947
|
-
/** 현재 활성
|
|
1208
|
+
/** 현재 활성 범위의 숫자 셀 통계(합·평균·최소·최대 등, 고정밀 계산). 숫자가 없으면 null. / High-precision stats (sum/avg/min/max …) over the active range's numeric cells; null if none. */
|
|
948
1209
|
getRangeStats(): _RangeStats | null;
|
|
949
|
-
/**
|
|
1210
|
+
/** 원본 범위의 값을 대상 범위로 채웁니다. 'copy'=그대로 복사, 'series'=규칙 감지해 이어 채우기. / Fill the target range from the source — 'copy' duplicates, 'series' detects a pattern and extends. */
|
|
950
1211
|
fillRange(source: CellRange, target: CellRange, mode?: 'copy' | 'series'): void;
|
|
1212
|
+
/** 그리드 데이터로 차트를 만들어 인스턴스를 돌려줍니다. / Create a chart from grid data and return its instance. */
|
|
951
1213
|
createChart(config: import('./chart/types.js').ChartConfig): import('./chart/types.js').ChartInstance;
|
|
1214
|
+
/** 이 그리드에 붙어 있는 차트 인스턴스들. / The chart instances attached to this grid. */
|
|
952
1215
|
getCharts(): import('./chart/types.js').ChartInstance[];
|
|
1216
|
+
/** 이 그리드의 차트를 모두 정리(해제)합니다. / Dispose all charts on this grid. */
|
|
953
1217
|
destroyCharts(): void;
|
|
954
|
-
/** "=A1+B2"
|
|
1218
|
+
/** 셀에 수식을 넣습니다(예: "=A1+B2"). rowIndex 는 화면 순서로 주면 내부에서 안정적 참조로 바꿉니다. / Set a cell's formula (e.g. "=A1+B2"). Pass rowIndex in screen order; it's normalized to a stable ref inside. */
|
|
955
1219
|
setCellFormula(rowIndex: number, field: string, formula: string): void;
|
|
1220
|
+
/** 그 셀의 수식 원문(없으면 null). / The cell's formula text (null if none). */
|
|
956
1221
|
getCellFormula(rowIndex: number, field: string): string | null;
|
|
1222
|
+
/** 그 셀에 수식이 들어 있는지. / Whether that cell holds a formula. */
|
|
957
1223
|
hasCellFormula(rowIndex: number, field: string): boolean;
|
|
958
|
-
/**
|
|
1224
|
+
/** 셀의 수식만 지웁니다(마지막 계산 값은 남습니다). / Remove the cell's formula (keeps the last computed value). */
|
|
959
1225
|
clearCellFormula(rowIndex: number, field: string): void;
|
|
1226
|
+
/** 그 셀의 수식 오류 코드(오류가 없으면 null). / The cell's formula error code (null if none). */
|
|
960
1227
|
getCellError(rowIndex: number, field: string): FormulaErrorCode | null;
|
|
961
|
-
/** 디버깅용 — 이 셀을 참조하는(
|
|
1228
|
+
/** 디버깅용 — 이 셀을 참조하는(이 셀이 바뀌면 다시 계산되는) 셀들. / Debug — cells that reference this one (recomputed when it changes). */
|
|
962
1229
|
getDependents(rowIndex: number, field: string): Array<{
|
|
963
1230
|
rowIndex: number;
|
|
964
1231
|
field: string;
|
|
965
1232
|
}>;
|
|
966
|
-
/** 디버깅용 — 이
|
|
1233
|
+
/** 디버깅용 — 이 셀의 수식이 참조하는(이 셀보다 먼저 계산돼야 하는) 셀들. / Debug — cells this one's formula references (computed before it). */
|
|
967
1234
|
getPrecedents(rowIndex: number, field: string): Array<{
|
|
968
1235
|
rowIndex: number;
|
|
969
1236
|
field: string;
|
|
970
1237
|
}>;
|
|
971
|
-
/**
|
|
1238
|
+
/** 모든 수식을 처음부터 다시 계산합니다(데이터 교체·컬럼 변경 후 등). / Recompute every formula from scratch (after replacing data, changing columns, …). */
|
|
972
1239
|
recalculate(): void;
|
|
973
|
-
/**
|
|
1240
|
+
/** 이 셀과, 이 셀에 딸린(종속) 셀들만 다시 계산합니다. / Recompute only this cell and the cells depending on it. */
|
|
974
1241
|
recalculateCell(rowIndex: number, field: string): void;
|
|
975
|
-
/**
|
|
1242
|
+
/** 채우기 기능 전용 — 어떤 셀의 수식을 dRow/dCol 만큼 이동한 자리에 맞게 참조를 옮긴 새 수식 원문을 돌려줍니다. / Fill-only — return a copy of a cell's formula with its relative refs shifted by dRow/dCol. */
|
|
976
1243
|
offsetFormula(srcRowId: string, srcField: string, dRow: number, dCol: number): string;
|
|
977
|
-
/** rowRef 는
|
|
1244
|
+
/** 행을 펼쳐 상세 패널을 엽니다. rowRef 는 화면 순서 인덱스 또는 안정적 id. 허용 겹수를 넘으면 거부됩니다. / Expand a row's detail panel. rowRef is a screen-order index or a stable id; rejected past the nesting limit. */
|
|
978
1245
|
expandRow(rowRef: number | {
|
|
979
1246
|
id: string;
|
|
980
1247
|
}): void;
|
|
1248
|
+
/** 열려 있는 상세 패널을 접습니다. / Collapse an open detail panel. */
|
|
981
1249
|
collapseRow(rowRef: number | {
|
|
982
1250
|
id: string;
|
|
983
1251
|
}): void;
|
|
1252
|
+
/** 상세 패널을 펼쳐져 있으면 접고, 접혀 있으면 폅니다. / Toggle a detail panel open/closed. */
|
|
984
1253
|
toggleRow(rowRef: number | {
|
|
985
1254
|
id: string;
|
|
986
1255
|
}): void;
|
|
1256
|
+
/** 그 행의 상세 패널이 지금 펼쳐져 있는지. / Whether that row's detail panel is currently expanded. */
|
|
987
1257
|
isRowExpanded(rowRef: number | {
|
|
988
1258
|
id: string;
|
|
989
1259
|
}): boolean;
|
|
1260
|
+
/** 열려 있는 모든 상세 패널을 한 번에 접습니다. / Collapse every open detail panel at once. */
|
|
990
1261
|
collapseAllDetails(): void;
|
|
991
|
-
/**
|
|
1262
|
+
/** 그 행의 상세 패널 내용물(직접 그린 결과 또는 자동 생성된 자식 그리드). 한 번도 펼치지 않았으면 undefined. / The row's detail content (your rendered result or the auto-created child grid); undefined if never expanded. */
|
|
992
1263
|
getDetailInstance<D = any>(rowRef: number | {
|
|
993
1264
|
id: string;
|
|
994
1265
|
}): D | undefined;
|
|
995
|
-
/**
|
|
1266
|
+
/** 컬럼·컨테이너 크기를 바꾼 뒤 열린 패널의 폭을 다시 맞춥니다(보통은 재렌더가 알아서 처리). / Re-sync open panel widths after a column/container resize (usually the re-render handles it). */
|
|
996
1267
|
resyncPanelWidths(): void;
|
|
997
1268
|
getChecked(): Array<{
|
|
998
1269
|
row: T;
|
|
@@ -1011,9 +1282,9 @@ export interface OpenGridInstance<T = any> {
|
|
|
1011
1282
|
resetFilter(field?: string): void;
|
|
1012
1283
|
getFilterState(): Record<string, FilterItem[]>;
|
|
1013
1284
|
restoreFilter(state: Record<string, FilterItem[]>): void;
|
|
1014
|
-
/**
|
|
1285
|
+
/** 지정한 행들을 다른 그리드로 옮깁니다(드래그·셔틀과 같은 경로). 옮기는 전·후·완료 3단계 이벤트가 나고 필드 매핑 규칙이 적용됩니다. / Move the given rows into another grid (same path as drag/shuttle). Fires the three-phase events and applies the field-mapping rule. */
|
|
1015
1286
|
moveRowsTo(target: OpenGridInstance<T>, sourceIndexes: number[], targetIndex?: number): Promise<boolean>;
|
|
1016
|
-
/**
|
|
1287
|
+
/** 체크박스로 고른 행들을 다른 그리드로 옮깁니다(화살표 셔틀 버튼용). / Move the checkbox-selected rows into another grid (for the arrow-shuttle buttons). */
|
|
1017
1288
|
moveCheckedTo(target: OpenGridInstance<T>): Promise<boolean>;
|
|
1018
1289
|
freeze(columnCount: number): void;
|
|
1019
1290
|
freezeRows(rowCount: number): void;
|
|
@@ -1040,19 +1311,23 @@ export interface OpenGridInstance<T = any> {
|
|
|
1040
1311
|
resize(width?: number, height?: number): void;
|
|
1041
1312
|
setTheme(theme: string): void;
|
|
1042
1313
|
setThemeVar(varName: string, value: string): void;
|
|
1043
|
-
/**
|
|
1314
|
+
/** 스킨(형태 축)을 바꿉니다 — 모서리·테두리·여백 같은 "생김새"만 갈아 끼우고, 색 테마는 그대로 둡니다. / Switch the skin (form axis) — swaps the "shape" (corners, borders, spacing …) only, leaving the color theme untouched. */
|
|
1044
1315
|
setSkin(skin: string): void;
|
|
1045
|
-
/**
|
|
1316
|
+
/** 지금 적용된 스킨 id('default' = 기본 생김새). / The currently applied skin id ('default' = stock look). */
|
|
1046
1317
|
getSkin(): string;
|
|
1047
|
-
/**
|
|
1318
|
+
/** 형태 축의 CSS 변수 하나만 즉석에서 바꿉니다(setThemeVar 의 형태 버전). 색 값을 넣으면 거부됩니다. / Override a single form-axis CSS variable at runtime (the form-axis sibling of setThemeVar). Color values are rejected. */
|
|
1048
1319
|
setSkinVar(varName: string, value: string): void;
|
|
1049
|
-
/**
|
|
1320
|
+
/** 밀도(행 간격)를 바꿉니다 — 촘촘/보통/여유처럼 행 높이와 여백을 통째로 조절합니다. 색·스킨과 따로 노는 별개 축이며, 없는 이름을 줘도 오류를 내지 않습니다. / Switch the density (row spacing) — compact/normal/roomy row heights and paddings. An independent axis from color/skin; never throws on an unknown name. */
|
|
1321
|
+
setDensity(name: string): void;
|
|
1322
|
+
/** 질감(배경 패턴)을 바꿉니다 — 배경 페인트만 입히고 크기 재계산은 하지 않습니다. 없는 이름을 줘도 오류를 내지 않습니다. / Switch the texture (background pattern) — paints the background only, no relayout. Never throws on an unknown name. */
|
|
1323
|
+
setTexture(name: string): void;
|
|
1324
|
+
/** UI 문구의 언어(로케일)를 바꾸고 화면을 다시 그립니다. 등록되지 않은 로케일을 줘도 오류를 내지 않습니다. / Switch the UI language (locale) and re-render. Never throws on an unregistered locale. */
|
|
1050
1325
|
setLocale(locale: string): void;
|
|
1051
|
-
/**
|
|
1326
|
+
/** 이 그리드에 지금 적용된 로케일 id. / The locale id currently applied to this grid. */
|
|
1052
1327
|
getLocale(): string;
|
|
1053
|
-
/** 이
|
|
1328
|
+
/** 이 그리드에서만 특정 문구 하나를 다른 말로 바꿉니다. / Override a single UI message for this grid only. */
|
|
1054
1329
|
setMessage(key: LocaleMessageKey | string, value: MessageValue): OpenGridInstance<T>;
|
|
1055
|
-
/**
|
|
1330
|
+
/** 키에 해당하는 문구를 찾아 돌려줍니다(개별 오버라이드 → 활성 로케일 → 한국어 → 키 순). 오류를 내지 않습니다. / Resolve a message by key (per-message override → active locale → Korean → the key itself). Never throws. */
|
|
1056
1331
|
t(key: LocaleMessageKey | string, params?: Record<string, string | number>): string;
|
|
1057
1332
|
destroy(): void;
|
|
1058
1333
|
setOptions(opts: Partial<GridOptions<T>>): void;
|
|
@@ -1147,7 +1422,17 @@ export interface TriggerContext<TResult = any> {
|
|
|
1147
1422
|
*/
|
|
1148
1423
|
cancel(): void;
|
|
1149
1424
|
}
|
|
1150
|
-
/**
|
|
1425
|
+
/**
|
|
1426
|
+
* 트리거로 등록하는 핸들러 함수의 형태입니다. 작업의 맥락(TriggerContext)을 인자로 받아,
|
|
1427
|
+
* 작업 전이라면 검증·취소하고 작업 후라면 결과를 확인하는 등의 일을 합니다.
|
|
1428
|
+
* / The shape of a handler you register as a trigger. It receives the operation's context
|
|
1429
|
+
* (TriggerContext) — validate/cancel before, or inspect the result after.
|
|
1430
|
+
*/
|
|
1151
1431
|
export type TriggerHandler<TResult = any> = (ctx: TriggerContext<TResult>) => void;
|
|
1152
|
-
/**
|
|
1432
|
+
/**
|
|
1433
|
+
* 트리거를 걸 수 있는 이벤트 이름들. 형식은 '시점:작업' 입니다 — 'before:작업'은 그 작업이 실행되기
|
|
1434
|
+
* 직전(여기서 취소 가능), 'after:작업'은 끝난 직후, 'complete'는 어떤 작업이든 끝난 뒤 공통으로 호출됩니다.
|
|
1435
|
+
* / The event names you can attach triggers to, in 'phase:operation' form — 'before:*' fires just
|
|
1436
|
+
* before the operation (cancelable there), 'after:*' just after, and 'complete' after any operation.
|
|
1437
|
+
*/
|
|
1153
1438
|
export type TriggerEvent = 'before:setData' | 'after:setData' | 'before:insertRow' | 'after:insertRow' | 'before:deleteRow' | 'after:deleteRow' | 'before:writeCell' | 'after:writeCell' | 'before:applyColumns' | 'after:applyColumns' | 'before:orderBy' | 'after:orderBy' | 'before:setFilter' | 'after:setFilter' | 'before:groupBy' | 'after:groupBy' | 'complete';
|