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,16 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OPEN_GRID 성능 벤치마크
|
|
3
|
+
* / OPEN_GRID performance benchmark.
|
|
3
4
|
*
|
|
4
5
|
* 브라우저 콘솔 또는 Node 환경에서 실행:
|
|
5
6
|
* npx vite-node src/bench/perf.ts
|
|
7
|
+
* / Run in the browser console or a Node environment:
|
|
8
|
+
* npx vite-node src/bench/perf.ts
|
|
9
|
+
*
|
|
10
|
+
* 측정 항목: / Measured items:
|
|
11
|
+
* - 10만 행 데이터 생성 시간 / Time to generate 100k rows
|
|
12
|
+
* - DataLayer.setData() 시간 / DataLayer.setData() time
|
|
13
|
+
* - DataLayer.applySort() 시간 / DataLayer.applySort() time
|
|
14
|
+
* - DataLayer.applyFilter() 시간 / DataLayer.applyFilter() time
|
|
15
|
+
* - buildGroups() 시간 / buildGroups() time
|
|
16
|
+
* - buildTree() 시간 / buildTree() time
|
|
17
|
+
* - MergeEngine.applyAutoMerge() 시간 / MergeEngine.applyAutoMerge() time
|
|
6
18
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - DataLayer.setData() 시간
|
|
10
|
-
* - DataLayer.applySort() 시간
|
|
11
|
-
* - DataLayer.applyFilter() 시간
|
|
12
|
-
* - buildGroups() 시간
|
|
13
|
-
* - buildTree() 시간
|
|
14
|
-
* - MergeEngine.applyAutoMerge() 시간
|
|
19
|
+
* @internal 개발용 벤치 스크립트 — 공개 API 아님. / Dev-only benchmark script — not part of the public API.
|
|
20
|
+
* @packageDocumentation
|
|
15
21
|
*/
|
|
16
22
|
export {};
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ThemeContext — DOM-free 값 객체. 활성 색 테마(및 미래의 스킨) 식별자를 운반한다.
|
|
3
3
|
* R12a 에서 resolver 메서드는 아직 이 컨텍스트로 분기하지 않는다(반환은 항상 `var()` 문자열이라
|
|
4
|
-
* 브라우저가 런타임에 테마별로 재계산 → 오늘의 zero-rerender 테마 전환을
|
|
4
|
+
* 브라우저가 런타임에 테마별로 재계산 → 오늘의 zero-rerender 테마 전환을 보존).
|
|
5
5
|
* R12b(스킨)에서 `skin` 을 읽어 FORM 토큰을 해결하는 자리를 여기 마련해 둔다.
|
|
6
|
+
* / ThemeContext — a DOM-free value object carrying the active color theme (and future skin)
|
|
7
|
+
* identifiers. In R12a the resolver methods do not yet branch on this context (returns are always
|
|
8
|
+
* `var()` strings so the browser recomputes per-theme at runtime → preserving today's
|
|
9
|
+
* zero-rerender theme switching). R12b (skins) will read `skin` here to resolve FORM tokens.
|
|
10
|
+
*
|
|
11
|
+
* @param theme - 활성 색 테마 id / Active color theme id
|
|
12
|
+
* @param skin - 활성 스킨 id(FORM 축, R12b) / Active skin id (FORM axis, R12b)
|
|
6
13
|
*/
|
|
7
14
|
export declare class ThemeContext {
|
|
8
15
|
readonly theme: string;
|
|
@@ -10,85 +17,161 @@ export declare class ThemeContext {
|
|
|
10
17
|
constructor(theme?: string, skin?: string);
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
|
-
* propagateAppearance — 분리(portal-ed) UI 로 외관 축을 함께 복사(
|
|
20
|
+
* propagateAppearance — 분리(portal-ed) UI 로 외관 축을 함께 복사(§4.3).
|
|
14
21
|
* 두 속성(`data-og-theme` COLOR · `data-og-skin` FORM)을 **한 번에** 복사해, 컴포넌트마다
|
|
15
|
-
* 두 번째 속성을 잊어 스킨만 안 먹는 조용한
|
|
22
|
+
* 두 번째 속성을 잊어 스킨만 안 먹는 조용한 사고를 구조적으로 막는다.
|
|
16
23
|
* `fromEl` 에서 가장 가까운 속성 보유 조상을 찾아 `toEl` 에 복사한다.
|
|
24
|
+
* / propagateAppearance — copy the appearance axes together onto portal-ed UI (§4.3). Copies both
|
|
25
|
+
* attributes (`data-og-theme` COLOR · `data-og-skin` FORM) **in one call**, structurally
|
|
26
|
+
* preventing the silent bug where a component forgets the second attribute and the skin quietly
|
|
27
|
+
* fails to apply. Finds the nearest attribute-bearing ancestor of `fromEl` and copies onto `toEl`.
|
|
28
|
+
*
|
|
29
|
+
* @param fromEl - 외관 속성을 상속받을 원본 요소(null 이면 no-op) / Source element to inherit appearance from (no-op if null)
|
|
30
|
+
* @param toEl - 속성을 복사받을 대상 요소 / Target element to receive the attributes
|
|
17
31
|
*/
|
|
18
32
|
export declare function propagateAppearance(fromEl: Element | null, toEl: Element): void;
|
|
19
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* border()/focusRing() 형태 옵션(미래 스킨용). 미지정 시 오늘의 기본값 = byte-identical.
|
|
35
|
+
* / Shape options for border()/focusRing() (for future skins). Unset = today's defaults = byte-identical.
|
|
36
|
+
*/
|
|
20
37
|
export interface BorderOptions {
|
|
21
|
-
/** 보더 스타일 키워드(기본 'solid'). */
|
|
38
|
+
/** 보더 스타일 키워드(기본 'solid'). / Border style keyword (default 'solid'). */
|
|
22
39
|
style?: string;
|
|
23
|
-
/** true 면 상태(added/edited/removed·selection·range) 보더 —
|
|
40
|
+
/** true 면 상태(added/edited/removed·selection·range) 보더 — G-ST2: 항상 solid 강제. / true = a state border (added/edited/removed·selection·range) — G-ST2: always forced solid. */
|
|
24
41
|
state?: boolean;
|
|
25
42
|
}
|
|
43
|
+
/** focusRing() 형태 옵션. / Shape options for focusRing(). */
|
|
26
44
|
export interface FocusRingOptions {
|
|
45
|
+
/** 링 두께(px, 최소 2 클램프). / Ring width (px, clamped to a minimum of 2). */
|
|
27
46
|
width?: number;
|
|
47
|
+
/** 링 스타일('none' 은 solid 로 클램프). / Ring style ('none' is clamped to solid). */
|
|
28
48
|
style?: string;
|
|
49
|
+
/** 링 색(미지정 시 프라이머리 기반). / Ring color (primary-based if unset). */
|
|
29
50
|
color?: string;
|
|
30
51
|
}
|
|
52
|
+
/** 엘리베이션(그림자) 단계. / Elevation (shadow) level. */
|
|
31
53
|
export type ElevationLevel = 'sm' | 'md' | 'lg';
|
|
32
54
|
/**
|
|
33
55
|
* AppearanceResolver — 렌더 레이어가 "형태 값"을 물어보는 단일 지점.
|
|
34
56
|
* R12a 는 **결정을 객체화**할 뿐 값은 오늘과 동일하다(회귀 0). 상태 없음(순수) — 반환은
|
|
35
57
|
* `var()` 기반 문자열 또는 px 패스스루라, 인스턴스 공유가 안전하다(멀티그리드 격리 무해).
|
|
58
|
+
* / AppearanceResolver — the single place the render layer asks for "shape values". R12a merely
|
|
59
|
+
* **objectifies the decisions**; the values are identical to today (zero regression). It is
|
|
60
|
+
* stateless (pure) — returns are `var()`-based strings or px pass-throughs, so sharing an
|
|
61
|
+
* instance is safe (harmless to multi-grid isolation).
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const ap = new AppearanceResolver(new ThemeContext('dark'));
|
|
65
|
+
* el.style.border = ap.border(); // "1px solid var(--og-border-color,#e0e0e0)"
|
|
66
|
+
* el.style.outline = ap.focusRing(); // AA-safe, clamped to ≥2px solid
|
|
36
67
|
*/
|
|
37
68
|
export declare class AppearanceResolver {
|
|
38
69
|
private _ctx;
|
|
39
70
|
constructor(_ctx?: ThemeContext);
|
|
40
|
-
/** 활성 테마/스킨 컨텍스트(R12b 스킨 해결의 진입점). */
|
|
71
|
+
/** 활성 테마/스킨 컨텍스트(R12b 스킨 해결의 진입점). / The active theme/skin context (entry point for R12b skin resolution). */
|
|
41
72
|
get context(): ThemeContext;
|
|
42
|
-
/** 스킨이 활성(비-default)인가. default 면 오늘의 리터럴을 그대로 반환(byte-identical). */
|
|
73
|
+
/** 스킨이 활성(비-default)인가. default 면 오늘의 리터럴을 그대로 반환(byte-identical). / Whether a skin is active (non-default). When default, today's literals are returned as-is (byte-identical). */
|
|
43
74
|
private _skinActive;
|
|
44
75
|
/**
|
|
45
76
|
* R12b: 스킨 컨텍스트 교체(테마는 유지). 파사드 setSkin 이 호출한 뒤 재렌더하면 인라인 form 사이트가
|
|
46
77
|
* 이 컨텍스트로 재해석된다. default → named 전환 시 border/divider 가 리터럴 → var() 로 승격.
|
|
78
|
+
* / R12b: swap the skin context (theme kept). After the facade setSkin calls this and re-renders,
|
|
79
|
+
* inline form sites are re-resolved against this context. On default → named, border/divider are
|
|
80
|
+
* promoted from literals to var().
|
|
81
|
+
*
|
|
82
|
+
* @param skin - 새 스킨 id / New skin id
|
|
47
83
|
*/
|
|
48
84
|
setSkin(skin: string): void;
|
|
49
85
|
/** border-color 토큰 참조(폴백 포함) — 렌더 코드가 오늘 쓰는 문자열과 동일. */
|
|
50
86
|
private _borderColorVar;
|
|
51
87
|
/**
|
|
52
88
|
* 셀/헤더 가장자리 보더. 오늘의 리터럴 `1px solid var(--og-border-color,#e0e0e0)` 과
|
|
53
|
-
* **문자 단위 동일**.
|
|
89
|
+
* **문자 단위 동일**. G-ST2: state 보더는 스타일을 solid 로 강제(현재 호출은 state 미지정 → no-op).
|
|
90
|
+
* / Cell/header edge border. **Byte-identical** to today's literal
|
|
91
|
+
* `1px solid var(--og-border-color,#e0e0e0)`. G-ST2: a state border forces solid style (current
|
|
92
|
+
* calls pass no state → no-op).
|
|
93
|
+
*
|
|
94
|
+
* @param opts - 보더 스타일·state 여부(선택) / Border style / state flag (optional)
|
|
95
|
+
* @returns CSS border shorthand 문자열 / A CSS border-shorthand string
|
|
54
96
|
*/
|
|
55
97
|
border(opts?: BorderOptions): string;
|
|
56
98
|
/**
|
|
57
99
|
* 행/섹션 구획선(가로 separator). 오늘은 border() 와 동일 문자열(=`1px solid var(--og-border-color,#e0e0e0)`).
|
|
58
100
|
* 별도 메서드로 둔 이유: R12b 스킨에서 divider-style 이 border-style 과 갈라질 수 있어(§1.2)
|
|
59
101
|
* 결정 지점을 미리 분리해 둔다. 현재 출력은 border() 와 byte-identical.
|
|
102
|
+
* / Row/section divider (horizontal separator). Today the same string as border()
|
|
103
|
+
* (=`1px solid var(--og-border-color,#e0e0e0)`). Kept as a separate method because in R12b skins
|
|
104
|
+
* divider-style may diverge from border-style (§1.2), so the decision point is split in advance.
|
|
105
|
+
* Current output is byte-identical to border().
|
|
106
|
+
*
|
|
107
|
+
* @returns CSS border shorthand 문자열(구획선용) / A CSS border-shorthand string (for the divider)
|
|
60
108
|
*/
|
|
61
109
|
divider(): string;
|
|
62
110
|
/**
|
|
63
|
-
* G-ST1(코어 불변식,
|
|
111
|
+
* G-ST1(코어 불변식, §2): 텍스처 존 제한. 텍스처는 컨테이너 배경·헤더 여백·빈 상태·온보딩
|
|
64
112
|
* 오버레이에만 렌더되고, **데이터/상태/범위/병합/포커스 셀 배경 뒤에는 절대 렌더 금지**(스킨이 끌 수 없음).
|
|
65
113
|
* 렌더 레이어가 셀 배경 텍스처를 바를 때 이 메서드로 zone 을 물어본다.
|
|
66
114
|
* - 금지 zone → 항상 `'none'`(스킨과 무관).
|
|
67
115
|
* - 허용 zone → `var(--og-texture-bg, none)`(스킨 미설정 시 none = byte-identical).
|
|
116
|
+
* / G-ST1 (core invariant, §2): texture-zone restriction. Texture renders only behind the
|
|
117
|
+
* container background, header padding, empty state, and onboarding overlay, and is **never**
|
|
118
|
+
* rendered behind data/status/range/merge/focus cell backgrounds (a skin cannot turn it on). The
|
|
119
|
+
* render layer asks this method for the zone before painting a cell-background texture.
|
|
120
|
+
* - forbidden zone → always `'none'` (skin-independent).
|
|
121
|
+
* - allowed zone → `var(--og-texture-bg, none)` (none when no skin is set = byte-identical).
|
|
122
|
+
*
|
|
123
|
+
* @param zone - 텍스처를 바르려는 위치 / The zone the texture would paint into
|
|
124
|
+
* @returns `'none'` 또는 텍스처 토큰 문자열 / `'none'` or the texture token string
|
|
68
125
|
*/
|
|
69
126
|
texture(zone: 'container' | 'header-pad' | 'empty' | 'onboarding' | 'data' | 'status' | 'range' | 'merge' | 'focus'): string;
|
|
70
127
|
/**
|
|
71
128
|
* 반경 값 → CSS 길이 문자열. R12a 는 패스스루(`${px}px`)로 오늘의 리터럴을 그대로 보존한다.
|
|
72
129
|
* 반경 리터럴이 흩어져 있던 결정 지점(이미지/프로그레스/스위치/뱃지/마스킹/상태뱃지)을 이 한 곳으로 모은다.
|
|
73
130
|
* R12b 에서 `--og-radius-*` 스케일 토큰으로 승격할 착지점.
|
|
131
|
+
* / Radius value → CSS length string. R12a is a pass-through (`${px}px`) that preserves today's
|
|
132
|
+
* literal. It gathers the radius-literal decision points (image/progress/switch/badge/masking/
|
|
133
|
+
* state-badge) into this one place. A landing site for promotion to `--og-radius-*` scale tokens
|
|
134
|
+
* in R12b.
|
|
135
|
+
*
|
|
136
|
+
* @param px - 반경 픽셀 값 / Radius value in px
|
|
137
|
+
* @returns CSS 길이 문자열(`${px}px`) / A CSS length string (`${px}px`)
|
|
74
138
|
*/
|
|
75
139
|
radius(px: number): string;
|
|
76
140
|
/**
|
|
77
141
|
* 데이터/그룹 셀의 인라인 패딩. 오늘의 그룹 셀 리터럴 `2px 8px` 과 동일.
|
|
78
142
|
* R12b `--og-cell-padding-*` 승격 자리.
|
|
143
|
+
* / Inline padding for data/group cells. Same as today's group-cell literal `2px 8px`. A landing
|
|
144
|
+
* site for promotion to `--og-cell-padding-*` in R12b.
|
|
145
|
+
*
|
|
146
|
+
* @returns CSS padding shorthand 문자열 / A CSS padding-shorthand string
|
|
79
147
|
*/
|
|
80
148
|
cellPadding(): string;
|
|
81
149
|
/**
|
|
82
150
|
* 엘리베이션(box-shadow) — R12b 스킨 축의 형태/잉크 분리 seam(§1.4)을 미리 표기한다.
|
|
83
151
|
* R12a 에서는 어떤 인라인 사이트도 이 메서드를 경유하지 않는다(현재 그림자 결정이 인라인에 없음).
|
|
84
152
|
* 값은 미래 토큰 + 오늘과 무해한 기본 geometry/alpha 로, 라우팅 0 이라 출력에 영향 없음.
|
|
153
|
+
* / Elevation (box-shadow) — pre-marks the shape/ink separation seam of the R12b skin axis
|
|
154
|
+
* (§1.4). In R12a no inline site routes through this method (no shadow decision is inline today).
|
|
155
|
+
* The value is a future token plus a harmless default geometry/alpha, and with zero routing it
|
|
156
|
+
* does not affect output.
|
|
157
|
+
*
|
|
158
|
+
* @param level - 그림자 단계(기본 'md') / Shadow level (default 'md')
|
|
159
|
+
* @returns CSS box-shadow 문자열 / A CSS box-shadow string
|
|
85
160
|
*/
|
|
86
161
|
elevation(level?: ElevationLevel): string;
|
|
87
162
|
/**
|
|
88
|
-
* 포커스 링.
|
|
163
|
+
* 포커스 링. 하드 계약(불변식): 가시 포커스는 비협상 —
|
|
89
164
|
* `width < 2px` 또는 `style: 'none'` 은 최소 `2px solid` 로 **클램프**한다(스킨이 끌 수 없음).
|
|
90
165
|
* R12a 에서 라우팅되는 인라인 포커스 사이트는 없다(포커스 표시는 CSS 클래스 `.og-cell-focused`).
|
|
91
166
|
* 기본 반환은 현 프라이머리 색 기반의 AA-safe 링 — 미래 스킨/오버라이드가 이 초크포인트를 경유한다.
|
|
167
|
+
* / Focus ring. Hard contract (invariant): visible focus is non-negotiable — `width < 2px` or
|
|
168
|
+
* `style: 'none'` is **clamped** to at least `2px solid` (a skin cannot turn it off). No inline
|
|
169
|
+
* focus site routes through this in R12a (focus is shown via the CSS class `.og-cell-focused`).
|
|
170
|
+
* The default return is an AA-safe ring based on the current primary color — future
|
|
171
|
+
* skins/overrides pass through this chokepoint.
|
|
172
|
+
*
|
|
173
|
+
* @param opts - 링 두께·스타일·색(선택, 미지정 시 안전 기본값) / Ring width/style/color (optional; safe defaults when unset)
|
|
174
|
+
* @returns CSS outline/border shorthand 문자열 / A CSS outline/border-shorthand string
|
|
92
175
|
*/
|
|
93
176
|
focusRing(opts?: FocusRingOptions): string;
|
|
94
177
|
}
|
|
@@ -96,5 +179,9 @@ export declare class AppearanceResolver {
|
|
|
96
179
|
* 프로세스 공유 기본 resolver. CellRenderer(팩토리로 생성돼 per-instance 컨텍스트를 받지 않음)가
|
|
97
180
|
* 반경 결정을 이 초크포인트로 보낼 때 사용한다. R12a 반환은 상태 없는 순수값이라 공유가 안전하다.
|
|
98
181
|
* per-instance(테마 컨텍스트) 주입은 R12b 스킨에서 확장한다.
|
|
182
|
+
* / The process-shared default resolver. Used by cell renderers (factory-created, so they receive
|
|
183
|
+
* no per-instance context) to route radius decisions through this chokepoint. R12a returns
|
|
184
|
+
* stateless pure values, so sharing is safe. Per-instance (theme-context) injection is extended in
|
|
185
|
+
* the R12b skin work.
|
|
99
186
|
*/
|
|
100
187
|
export declare const defaultAppearance: AppearanceResolver;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VisualSpec } from './cf/encoders.js';
|
|
2
|
+
/**
|
|
3
|
+
* VisualSpec[] 를 셀 DOM 에 적용한다(데이터바·히트맵·아이콘셋·잉크·aria 텍스트 쌍둥이).
|
|
4
|
+
* cf/ 가 산출한 순수 스펙을 렌더층에서 물질화하는 유일 진입점. 호스트 CSS 격리 위해 전부 인라인 스타일.
|
|
5
|
+
* / Apply VisualSpec[] onto a cell (data-bar/heatmap/icon-set/ink/aria text-twin). The sole point
|
|
6
|
+
* that materializes cf/'s pure specs in the render layer. All-inline styles for host-CSS isolation.
|
|
7
|
+
*
|
|
8
|
+
* @param cellEl - 대상 셀 요소 / Target cell element
|
|
9
|
+
* @param specs - CFEngine.paintFor 산출 시각 스펙 배열 / The VisualSpec array from CFEngine.paintFor
|
|
10
|
+
* @param cellW - 셀 콘텐츠 폭(px) — 데이터바 길이 산출 / Cell content width (px) for bar length
|
|
11
|
+
* @param cellH - 셀 콘텐츠 높이(px) / Cell content height (px)
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyVisualSpecs(cellEl: HTMLElement, specs: VisualSpec[], cellW: number, _cellH: number): void;
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import { ColumnDef } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* 컬럼이 토글(체크박스/스위치) 셀인지 판정. / Whether a column renders as a toggle (checkbox/switch) cell.
|
|
4
|
+
*
|
|
5
|
+
* `type` 이 `boolean`/`checkbox` 이거나 renderer 가 `checkbox`/`switch` 이면 참.
|
|
6
|
+
* / True when `type` is `boolean`/`checkbox`, or the renderer is `checkbox`/`switch`.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam T - 행 데이터 타입 / Row data type
|
|
9
|
+
* @param col - 검사할 컬럼 정의 / Column definition to inspect
|
|
10
|
+
* @returns 토글 셀이면 true / true if the column is a toggle cell
|
|
11
|
+
*/
|
|
2
12
|
export declare function isToggleCol<T>(col: ColumnDef<T>): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 컬럼이 셀렉트(드롭다운) 셀인지 판정. / Whether a column renders as a select (dropdown) cell.
|
|
15
|
+
*
|
|
16
|
+
* @typeParam T - 행 데이터 타입 / Row data type
|
|
17
|
+
* @param col - 검사할 컬럼 정의 / Column definition to inspect
|
|
18
|
+
* @returns `type` 이 `select` 이면 true / true if `type` is `select`
|
|
19
|
+
*/
|
|
3
20
|
export declare function isSelectCol<T>(col: ColumnDef<T>): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 컬럼이 라디오 버튼 셀인지 판정. / Whether a column renders as a radio-button cell.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam T - 행 데이터 타입 / Row data type
|
|
25
|
+
* @param col - 검사할 컬럼 정의 / Column definition to inspect
|
|
26
|
+
* @returns `type` 이 `radio` 이면 true / true if `type` is `radio`
|
|
27
|
+
*/
|
|
4
28
|
export declare function isRadioCol<T>(col: ColumnDef<T>): boolean;
|
|
@@ -1,40 +1,138 @@
|
|
|
1
1
|
import { ColumnDef } from './types.js';
|
|
2
|
+
/** 리프(말단) 컬럼 — 배치 계산에 필요한 인덱스·깊이 메타를 얹은 컬럼 정의. / A leaf column — a column def augmented with index/depth metadata for layout. */
|
|
2
3
|
export interface FlatColumn<T = any> extends ColumnDef<T> {
|
|
4
|
+
/** 좌→우 리프 컬럼 순번(0-base). / Left-to-right leaf column index (0-based). */
|
|
3
5
|
_colIndex: number;
|
|
6
|
+
/** 헤더 트리 깊이(1-base). / Header tree depth (1-based). */
|
|
4
7
|
_depth: number;
|
|
8
|
+
/** 리프 여부(항상 true). / Whether this is a leaf (always true here). */
|
|
5
9
|
_leaf: boolean;
|
|
10
|
+
/** 계산된 가로 병합 수(선택). / Computed horizontal span (optional). */
|
|
6
11
|
_colSpanCount?: number;
|
|
12
|
+
/** 계산된 세로 병합 수(선택). / Computed vertical span (optional). */
|
|
7
13
|
_rowSpanCount?: number;
|
|
8
14
|
}
|
|
15
|
+
/** 헤더 렌더링용 셀 하나의 배치 정보. / Layout info for a single header cell to render. */
|
|
9
16
|
export interface HeaderCell {
|
|
17
|
+
/** 대상 컬럼 정의. / The column definition. */
|
|
10
18
|
column: FlatColumn;
|
|
19
|
+
/** 리프 컬럼 인덱스. / Leaf column index. */
|
|
11
20
|
colIndex: number;
|
|
21
|
+
/** 헤더 깊이(1-base). / Header depth (1-based). */
|
|
12
22
|
depth: number;
|
|
23
|
+
/** 가로 병합 칸 수. / Horizontal span count. */
|
|
13
24
|
colSpan: number;
|
|
25
|
+
/** 세로 병합 칸 수. / Vertical span count. */
|
|
14
26
|
rowSpan: number;
|
|
15
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* 컬럼 트리(그룹 헤더 포함)를 리프 배열·헤더 셀·너비로 평탄화하는 배치 엔진.
|
|
30
|
+
* / Layout engine that flattens the column tree (including group headers) into leaf arrays,
|
|
31
|
+
* header cells, and computed widths.
|
|
32
|
+
*
|
|
33
|
+
* @typeParam T - 행 데이터 타입 / Row data type
|
|
34
|
+
* @example
|
|
35
|
+
* const layout = new ColumnLayout([{ field: 'name', header: '이름' }], 1);
|
|
36
|
+
* layout.visibleLeaves; // 표시 리프 컬럼 / visible leaf columns
|
|
37
|
+
* layout.computeWidths(800); // 리프 너비 배열 / per-leaf widths
|
|
38
|
+
*/
|
|
16
39
|
export declare class ColumnLayout<T = any> {
|
|
17
40
|
private _columns;
|
|
18
41
|
private _flatLeaves;
|
|
19
42
|
private _maxDepth;
|
|
20
43
|
private _frozenCount;
|
|
44
|
+
/**
|
|
45
|
+
* 컬럼 정의로 배치 엔진 생성 후 즉시 리프·깊이를 계산. / Create the layout engine and immediately compute leaves/depth.
|
|
46
|
+
*
|
|
47
|
+
* @param columns - 컬럼 정의 배열(그룹 헤더는 children 사용) / Column definitions (group headers use `children`)
|
|
48
|
+
* @param frozenCount - 좌측 고정 컬럼 수(기본 0) / Number of left-frozen columns (default 0)
|
|
49
|
+
*/
|
|
21
50
|
constructor(columns: ColumnDef<T>[], frozenCount?: number);
|
|
22
51
|
private _process;
|
|
52
|
+
/** 전체 리프 컬럼(숨김 포함). / All leaf columns (including hidden ones). */
|
|
23
53
|
get leaves(): FlatColumn<T>[];
|
|
54
|
+
/** 표시 리프 컬럼(hidden 제외). / Visible leaf columns (excluding hidden). */
|
|
24
55
|
get visibleLeaves(): FlatColumn<T>[];
|
|
56
|
+
/** 헤더 트리 최대 깊이(=헤더 행 수). / Maximum header tree depth (= header row count). */
|
|
25
57
|
get headerDepth(): number;
|
|
58
|
+
/** 좌측 고정 컬럼 수. / Number of left-frozen columns. */
|
|
26
59
|
get frozenCount(): number;
|
|
60
|
+
/**
|
|
61
|
+
* 좌측 고정 컬럼 수 변경. / Change the number of left-frozen columns.
|
|
62
|
+
*
|
|
63
|
+
* @param count - 고정할 컬럼 수 / Column count to freeze
|
|
64
|
+
*/
|
|
27
65
|
setFrozen(count: number): void;
|
|
66
|
+
/**
|
|
67
|
+
* 컬럼 정의 전체 교체 후 배치 재계산. / Replace all column definitions and re-run layout.
|
|
68
|
+
*
|
|
69
|
+
* @param columns - 새 컬럼 정의 배열 / New column definitions
|
|
70
|
+
*/
|
|
28
71
|
setColumns(columns: ColumnDef<T>[]): void;
|
|
72
|
+
/**
|
|
73
|
+
* 지정 field(들)의 리프 컬럼을 숨김 처리. / Hide the leaf column(s) for the given field(s).
|
|
74
|
+
*
|
|
75
|
+
* @param field - 숨길 field 또는 field 배열 / Field or fields to hide
|
|
76
|
+
*/
|
|
29
77
|
hideColumn(field: string | string[]): void;
|
|
78
|
+
/**
|
|
79
|
+
* 지정 field(들)의 리프 컬럼을 다시 표시. / Show the leaf column(s) for the given field(s).
|
|
80
|
+
*
|
|
81
|
+
* @param field - 표시할 field 또는 field 배열 / Field or fields to show
|
|
82
|
+
*/
|
|
30
83
|
showColumn(field: string | string[]): void;
|
|
84
|
+
/**
|
|
85
|
+
* 컬럼 추가 후 배치 재계산. / Add a column and re-run layout.
|
|
86
|
+
*
|
|
87
|
+
* @param colDef - 추가할 컬럼 정의 / Column definition to add
|
|
88
|
+
* @param position - 삽입 위치: 'first' | 'last' | 인덱스(기본 'last') / Insert position: 'first' | 'last' | index (default 'last')
|
|
89
|
+
*/
|
|
31
90
|
addColumn(colDef: ColumnDef<T>, position?: 'first' | 'last' | number): void;
|
|
91
|
+
/**
|
|
92
|
+
* 지정 field 컬럼을 트리에서 제거(중첩 그룹 포함) 후 배치 재계산.
|
|
93
|
+
* / Remove the column with the given field from the tree (including nested groups) and re-run layout.
|
|
94
|
+
*
|
|
95
|
+
* @param field - 제거할 컬럼 field / Field of the column to remove
|
|
96
|
+
*/
|
|
32
97
|
removeColumn(field: string): void;
|
|
98
|
+
/**
|
|
99
|
+
* field 로 리프 컬럼 조회. / Look up a leaf column by field.
|
|
100
|
+
*
|
|
101
|
+
* @param field - 컬럼 field / Column field
|
|
102
|
+
* @returns 리프 컬럼, 없으면 undefined / The leaf column, or undefined
|
|
103
|
+
*/
|
|
33
104
|
getColumnByField(field: string): FlatColumn<T> | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* 인덱스로 리프 컬럼 조회. / Look up a leaf column by index.
|
|
107
|
+
*
|
|
108
|
+
* @param index - 리프 컬럼 인덱스 / Leaf column index
|
|
109
|
+
* @returns 리프 컬럼, 없으면 undefined / The leaf column, or undefined
|
|
110
|
+
*/
|
|
34
111
|
getColumnByIndex(index: number): FlatColumn<T> | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* field 의 리프 컬럼 인덱스 조회. / Get the leaf column index for a field.
|
|
114
|
+
*
|
|
115
|
+
* @param field - 컬럼 field / Column field
|
|
116
|
+
* @returns 리프 인덱스, 없으면 -1 / Leaf index, or -1 if not found
|
|
117
|
+
*/
|
|
35
118
|
getColumnIndex(field: string): number;
|
|
36
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* 헤더 렌더링용 셀 계산 — 깊이별 행 배열(그룹 헤더 colSpan/rowSpan 포함).
|
|
121
|
+
* / Compute header cells for rendering — rows by depth (with group-header colSpan/rowSpan).
|
|
122
|
+
*
|
|
123
|
+
* @returns 깊이(행) × 셀 2차원 배열 / A 2D array of cells indexed by depth (row)
|
|
124
|
+
*/
|
|
37
125
|
buildHeaderCells(): HeaderCell[][];
|
|
38
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* 각 표시 리프 컬럼의 계산된 너비 배열 반환. / Return computed widths for each visible leaf column.
|
|
128
|
+
*
|
|
129
|
+
* flex 컬럼은 잔여 폭을 flex 비율로 분배받고, 고정 컬럼은 자기 width(없으면 기본값)를 쓴다.
|
|
130
|
+
* / Flex columns share the remaining width by their flex ratio; fixed columns use their own
|
|
131
|
+
* width (or the default when unset).
|
|
132
|
+
*
|
|
133
|
+
* @param totalWidth - 전체 사용 가능 폭(px) / Total available width in px
|
|
134
|
+
* @param defaultWidth - width 미지정 고정 컬럼의 기본 폭(기본 100) / Default width for fixed columns without a width (default 100)
|
|
135
|
+
* @returns 표시 리프 순서의 너비 배열(px) / Widths in visible-leaf order (px)
|
|
136
|
+
*/
|
|
39
137
|
computeWidths(totalWidth: number, defaultWidth?: number): number[];
|
|
40
138
|
}
|
|
@@ -1,21 +1,59 @@
|
|
|
1
|
+
/** 한 컬럼의 매핑용 최소 필드 정보. / Minimal field info of a single column, used for mapping. */
|
|
1
2
|
export interface FieldInfo {
|
|
3
|
+
/** 컬럼 field 키. / Column field key. */
|
|
2
4
|
field: string;
|
|
5
|
+
/** 컬럼 헤더 라벨(표시용). / Column header label (for display). */
|
|
3
6
|
header: string;
|
|
4
7
|
}
|
|
8
|
+
/** 매핑 모달 확정 결과. / Result of confirming the mapping modal. */
|
|
5
9
|
export interface MappingResult {
|
|
6
|
-
/** 타깃필드 → 소스필드 (빈 문자열이면 미매핑) */
|
|
10
|
+
/** 타깃필드 → 소스필드 (빈 문자열이면 미매핑). / Target field → source field (empty string = unmapped). */
|
|
7
11
|
mapping: Record<string, string>;
|
|
8
|
-
/** crossGridMapping 에 그대로 쓸 수 있는 변환 함수
|
|
12
|
+
/** crossGridMapping 에 그대로 쓸 수 있는 변환 함수 소스. / Transform-function source usable as-is in crossGridMapping. */
|
|
9
13
|
script: string;
|
|
10
14
|
}
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* mapping → 변환 함수 스크립트 문자열 생성.
|
|
17
|
+
* / Build a transform-function script string from a mapping.
|
|
18
|
+
*
|
|
19
|
+
* @param mapping - 타깃필드 → 소스필드 매핑(빈 값은 제외) / Target-to-source field mapping (empty entries skipped)
|
|
20
|
+
* @returns 코드에 붙여넣을 수 있는 `mapRow(src)` 함수 소스 / `mapRow(src)` function source ready to paste into code
|
|
21
|
+
* @example
|
|
22
|
+
* const script = buildMappingScript({ name: 'userName', age: '' });
|
|
23
|
+
* // → "function mapRow(src) { return { \"name\": src[\"userName\"], }; }"
|
|
24
|
+
*/
|
|
12
25
|
export declare function buildMappingScript(mapping: Record<string, string>): string;
|
|
13
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* mapping → 실제 행 변환 함수.
|
|
28
|
+
* / Build the actual row transform function from a mapping.
|
|
29
|
+
*
|
|
30
|
+
* @param mapping - 타깃필드 → 소스필드 매핑 / Target-to-source field mapping
|
|
31
|
+
* @returns 소스 행을 타깃 스키마로 변환하는 함수 / A function converting a source row into the target schema
|
|
32
|
+
* @example
|
|
33
|
+
* const toTarget = buildTransform({ name: 'userName' });
|
|
34
|
+
* toTarget({ userName: 'Kim' }); // → { name: 'Kim' }
|
|
35
|
+
*/
|
|
14
36
|
export declare function buildTransform(mapping: Record<string, string>): (src: any) => any;
|
|
15
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* 같은 필드 집합인지 (순서 무관).
|
|
39
|
+
* / Whether two field sets are equal (order-independent).
|
|
40
|
+
*
|
|
41
|
+
* @param a - 필드명 배열 A / Field-name array A
|
|
42
|
+
* @param b - 필드명 배열 B / Field-name array B
|
|
43
|
+
* @returns 두 집합이 동일하면 true / true when the two sets are identical
|
|
44
|
+
*/
|
|
16
45
|
export declare function sameSchema(a: string[], b: string[]): boolean;
|
|
17
46
|
/**
|
|
18
47
|
* 매핑 모달을 띄우고 사용자가 확정한 매핑을 Promise 로 반환한다. (취소 시 null)
|
|
19
48
|
* 모달은 document.body 에 오버레이로 붙는다(디자인타임 헬퍼).
|
|
49
|
+
* / Open the mapping modal and return the user-confirmed mapping as a Promise (null on cancel).
|
|
50
|
+
* The modal attaches to document.body as an overlay (design-time helper).
|
|
51
|
+
*
|
|
52
|
+
* @param sourceFields - 소스 그리드의 필드 목록 / Field list of the source grid
|
|
53
|
+
* @param targetFields - 타깃 그리드의 필드 목록 / Field list of the target grid
|
|
54
|
+
* @returns 확정된 매핑 결과, 취소 시 null / The confirmed mapping result, or null on cancel
|
|
55
|
+
* @example
|
|
56
|
+
* const result = await openCrossGridMapper(srcCols, tgtCols);
|
|
57
|
+
* if (result) console.log(result.script); // 변환 스크립트 / transform script
|
|
20
58
|
*/
|
|
21
59
|
export declare function openCrossGridMapper(sourceFields: FieldInfo[], targetFields: FieldInfo[]): Promise<MappingResult | null>;
|