open-grid 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +376 -353
- package/README.md +1 -1
- package/dist/OpenGrid-B7m7ei7f.cjs +7385 -0
- package/dist/OpenGrid-CeUdO_fM.js +7398 -0
- package/dist/index-CeJ-0-80.cjs +260 -0
- package/dist/index-DnarQ4eR.js +266 -0
- package/dist/index-DrCPRuYi.js +548 -0
- package/dist/index-JjfWY3Bt.cjs +520 -0
- package/dist/open-grid-base.css +12 -1
- package/dist/open-grid-react.cjs +27 -1
- package/dist/open-grid-react.js +22 -82
- package/dist/open-grid-vue.cjs +31 -1
- package/dist/open-grid-vue.js +29 -79
- package/dist/open-grid.cjs +272 -6
- package/dist/open-grid.js +177 -266
- package/dist/types/bench/perf.d.ts +14 -8
- package/dist/types/core/AppearanceResolver.d.ts +98 -11
- package/dist/types/core/CFRenderBridge.d.ts +13 -0
- package/dist/types/core/CellEditManager.d.ts +73 -0
- package/dist/types/core/CellEventHandler.d.ts +99 -2
- package/dist/types/core/CellTypeRegistry.d.ts +24 -0
- package/dist/types/core/ChartManager.d.ts +51 -3
- package/dist/types/core/ColumnLayout.d.ts +100 -2
- package/dist/types/core/ContextMenu.d.ts +43 -2
- package/dist/types/core/CrossGridController.d.ts +86 -15
- package/dist/types/core/CrossGridMapper.d.ts +43 -5
- package/dist/types/core/CrossGridRegistry.d.ts +36 -2
- package/dist/types/core/DataLayer.d.ts +210 -15
- package/dist/types/core/DetailManager.d.ts +106 -15
- package/dist/types/core/DragVisuals.d.ts +33 -4
- package/dist/types/core/EventEmitter.d.ts +54 -0
- package/dist/types/core/ExportManager.d.ts +66 -1
- package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
- package/dist/types/core/FilterPanel.d.ts +17 -2
- package/dist/types/core/FilterSelect.d.ts +37 -13
- package/dist/types/core/FindBarManager.d.ts +26 -0
- package/dist/types/core/FlatRowModel.d.ts +54 -11
- package/dist/types/core/FooterManager.d.ts +53 -1
- package/dist/types/core/FormulaController.d.ts +139 -10
- package/dist/types/core/FormulaEngine.d.ts +15 -4
- package/dist/types/core/GridComposer.d.ts +54 -6
- package/dist/types/core/GridRenderer.d.ts +143 -10
- package/dist/types/core/GridShuttle.d.ts +44 -4
- package/dist/types/core/GroupEngine.d.ts +68 -10
- package/dist/types/core/GroupTreeManager.d.ts +86 -2
- package/dist/types/core/IconRegistry.d.ts +56 -9
- package/dist/types/core/KeyboardManager.d.ts +88 -4
- package/dist/types/core/MaskingEngine.d.ts +10 -9
- package/dist/types/core/MathUtils.d.ts +58 -5
- package/dist/types/core/MergeEngine.d.ts +45 -10
- package/dist/types/core/MutationService.d.ts +113 -10
- package/dist/types/core/OGDecimal.d.ts +144 -13
- package/dist/types/core/OpenGrid.d.ts +99 -0
- package/dist/types/core/OrgChart.d.ts +56 -1
- package/dist/types/core/OverrideKernel.d.ts +59 -15
- package/dist/types/core/Pagination.d.ts +38 -4
- package/dist/types/core/PivotEngine.d.ts +37 -0
- package/dist/types/core/RangeSelectionManager.d.ts +121 -7
- package/dist/types/core/RenderController.d.ts +56 -0
- package/dist/types/core/RowDragDrop.d.ts +52 -6
- package/dist/types/core/RowManager.d.ts +55 -0
- package/dist/types/core/SkinRegistry.d.ts +55 -15
- package/dist/types/core/SortFilterManager.d.ts +80 -1
- package/dist/types/core/TreeEngine.d.ts +60 -6
- package/dist/types/core/TriggerManager.d.ts +46 -0
- package/dist/types/core/VirtualScroll.d.ts +64 -0
- package/dist/types/core/WorksheetManager.d.ts +61 -2
- package/dist/types/core/XmlConverter.d.ts +56 -23
- package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
- package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
- package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
- package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
- package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
- package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
- package/dist/types/core/a11y/index.d.ts +13 -0
- package/dist/types/core/a11y/ports.d.ts +24 -0
- package/dist/types/core/appearance/Appearance.d.ts +68 -0
- package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
- package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
- package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
- package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
- package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
- package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
- package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
- package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
- package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
- package/dist/types/core/appearance/defaults.d.ts +10 -0
- package/dist/types/core/appearance/index.d.ts +20 -0
- package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
- package/dist/types/core/cf/CFEngine.d.ts +56 -0
- package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
- package/dist/types/core/cf/CFRule.d.ts +127 -0
- package/dist/types/core/cf/ColorScale.d.ts +49 -0
- package/dist/types/core/cf/InkResolver.d.ts +33 -0
- package/dist/types/core/cf/appearance.d.ts +20 -0
- package/dist/types/core/cf/encoders.d.ts +61 -0
- package/dist/types/core/cf/eval-types.d.ts +93 -0
- package/dist/types/core/cf/index.d.ts +21 -0
- package/dist/types/core/cf/lineage.d.ts +32 -0
- package/dist/types/core/cf/predicates.d.ts +27 -0
- package/dist/types/core/cf/serialize.d.ts +46 -0
- package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
- package/dist/types/core/chart/DataExtractor.d.ts +53 -12
- package/dist/types/core/chart/a11y.d.ts +22 -0
- package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
- package/dist/types/core/chart/downsample-report.d.ts +36 -0
- package/dist/types/core/chart/downsample.d.ts +26 -1
- package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
- package/dist/types/core/chart/geometry.d.ts +96 -0
- package/dist/types/core/chart/hittest.d.ts +21 -3
- package/dist/types/core/chart/palette.d.ts +96 -12
- package/dist/types/core/chart/parity.d.ts +12 -0
- package/dist/types/core/chart/provenance.d.ts +47 -0
- package/dist/types/core/chart/scales.d.ts +28 -1
- package/dist/types/core/chart/scene.d.ts +102 -0
- package/dist/types/core/chart/server.d.ts +36 -0
- package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
- package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
- package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
- package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
- package/dist/types/core/chart/types.d.ts +107 -10
- package/dist/types/core/command/CommandBus.d.ts +51 -0
- package/dist/types/core/command/CommandRegistry.d.ts +43 -0
- package/dist/types/core/command/CommandStack.d.ts +38 -0
- package/dist/types/core/command/ICommand.d.ts +110 -0
- package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
- package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
- package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
- package/dist/types/core/command/index.d.ts +9 -0
- package/dist/types/core/command/support.d.ts +51 -0
- package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
- package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
- package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
- package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
- package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
- package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
- package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
- package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
- package/dist/types/core/coordinate/index.d.ts +10 -0
- package/dist/types/core/coordinate/ports.d.ts +45 -0
- package/dist/types/core/coordinate/types.d.ts +76 -0
- package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
- package/dist/types/core/detail/DetailSplice.d.ts +42 -11
- package/dist/types/core/detail/DetailState.d.ts +80 -11
- package/dist/types/core/detail/SubgridCache.d.ts +72 -10
- package/dist/types/core/detail/index.d.ts +8 -0
- package/dist/types/core/domain/AggregateResult.d.ts +54 -0
- package/dist/types/core/domain/CellAddress.d.ts +61 -0
- package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
- package/dist/types/core/domain/Delta.d.ts +37 -0
- package/dist/types/core/domain/DomainValue.d.ts +80 -0
- package/dist/types/core/domain/Missing.d.ts +65 -0
- package/dist/types/core/domain/Money.d.ts +42 -0
- package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
- package/dist/types/core/domain/Plain.d.ts +45 -0
- package/dist/types/core/domain/Quantity.d.ts +32 -0
- package/dist/types/core/domain/Ratios.d.ts +100 -0
- package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
- package/dist/types/core/domain/ValueType.d.ts +71 -0
- package/dist/types/core/domain/rounding.d.ts +25 -0
- package/dist/types/core/domain/strategies.d.ts +38 -0
- package/dist/types/core/editors/CellEditor.d.ts +29 -2
- package/dist/types/core/editors/DateEditor.d.ts +18 -0
- package/dist/types/core/editors/SelectEditor.d.ts +29 -0
- package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
- package/dist/types/core/export/ExportManifest.d.ts +13 -0
- package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
- package/dist/types/core/export/Provenance.d.ts +34 -0
- package/dist/types/core/export/StreamPump.d.ts +28 -0
- package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
- package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
- package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
- package/dist/types/core/export/channels/capabilities.d.ts +13 -0
- package/dist/types/core/export/index.d.ts +24 -0
- package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
- package/dist/types/core/export/print/Paginator.d.ts +48 -0
- package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
- package/dist/types/core/export/sinks.d.ts +40 -0
- package/dist/types/core/export/types.d.ts +211 -0
- package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
- package/dist/types/core/extension/IExtension.d.ts +90 -0
- package/dist/types/core/extension/Registry.d.ts +142 -0
- package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
- package/dist/types/core/extension/adapters.d.ts +44 -0
- package/dist/types/core/extension/conformance.d.ts +47 -0
- package/dist/types/core/extension/index.d.ts +16 -0
- package/dist/types/core/extension/registries.d.ts +31 -0
- package/dist/types/core/extension/reserved.d.ts +10 -0
- package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
- package/dist/types/core/format/FormatCache.d.ts +20 -0
- package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
- package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
- package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
- package/dist/types/core/format/index.d.ts +55 -0
- package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
- package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
- package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
- package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
- package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
- package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
- package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
- package/dist/types/core/format/types.d.ts +292 -0
- package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
- package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
- package/dist/types/core/formula/CalcService.d.ts +137 -0
- package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
- package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
- package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
- package/dist/types/core/formula/FormulaParser.d.ts +9 -0
- package/dist/types/core/formula/FormulaStore.d.ts +63 -1
- package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
- package/dist/types/core/formula/Generation.d.ts +86 -0
- package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
- package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
- package/dist/types/core/formula/functions/essential.d.ts +3 -0
- package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
- package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
- package/dist/types/core/formula/numericLiteral.d.ts +11 -1
- package/dist/types/core/formula/serializeFormula.d.ts +10 -1
- package/dist/types/core/formula/types.d.ts +71 -8
- package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
- package/dist/types/core/host/GridHostDriver.d.ts +27 -0
- package/dist/types/core/host/GridHostPort.d.ts +37 -0
- package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
- package/dist/types/core/host/archCheck.d.ts +26 -0
- package/dist/types/core/host/index.d.ts +6 -0
- package/dist/types/core/host/reconcile.d.ts +22 -0
- package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
- package/dist/types/core/i18n/types.d.ts +26 -1
- package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
- package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
- package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
- package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
- package/dist/types/core/quality/PerfSpec.d.ts +95 -0
- package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
- package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
- package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
- package/dist/types/core/quality/VisualRegression.d.ts +74 -0
- package/dist/types/core/quality/hooks.d.ts +53 -0
- package/dist/types/core/quality/index.d.ts +20 -0
- package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
- package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
- package/dist/types/core/range/FillEngine.d.ts +69 -9
- package/dist/types/core/range/RangeModel.d.ts +100 -13
- package/dist/types/core/range/RangeQuery.d.ts +24 -2
- package/dist/types/core/range/types.d.ts +27 -11
- package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
- package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
- package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
- package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
- package/dist/types/core/realtime/PollingSource.d.ts +42 -0
- package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
- package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
- package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
- package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
- package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
- package/dist/types/core/realtime/backoff.d.ts +12 -0
- package/dist/types/core/realtime/index.d.ts +13 -0
- package/dist/types/core/realtime/ports.d.ts +80 -0
- package/dist/types/core/render/CellApplier.d.ts +18 -0
- package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
- package/dist/types/core/render/CellPipeline.d.ts +39 -0
- package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
- package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
- package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
- package/dist/types/core/render/RenderBudget.d.ts +67 -0
- package/dist/types/core/render/contrast.d.ts +33 -0
- package/dist/types/core/render/index.d.ts +35 -0
- package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
- package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
- package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
- package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
- package/dist/types/core/render/stages/index.d.ts +14 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +100 -8
- package/dist/types/core/state/AutosaveController.d.ts +63 -0
- package/dist/types/core/state/IStatePersistence.d.ts +59 -0
- package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
- package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
- package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
- package/dist/types/core/state/StateCodec.d.ts +75 -0
- package/dist/types/core/state/index.d.ts +6 -0
- package/dist/types/core/types.d.ts +17 -0
- package/dist/types/react/OpenGrid.d.ts +54 -0
- package/dist/types/react/index.d.ts +5 -0
- package/dist/types/realtime/index.d.ts +1 -0
- package/dist/types/vue/index.d.ts +5 -0
- package/dist/types/vue/types.d.ts +35 -0
- package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
- package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
- package/package.json +112 -110
- package/dist/OpenGrid-B0Spm0rU.js +0 -10404
- package/dist/OpenGrid-CuXj0isp.cjs +0 -97
- package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OGDecimal, OGDecimalLike } from '../OGDecimal.js';
|
|
2
|
+
import { DomainValue, DomainValueDTO } from './DomainValue.js';
|
|
3
|
+
import { ValueType } from './ValueType.js';
|
|
4
|
+
/** 차원/단위 불일치 합산 오류. / Raised when quantities of different dimensions/units are combined. */
|
|
5
|
+
export declare class QuantityMismatchError extends Error {
|
|
6
|
+
constructor(a: string, b: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 수량 값 객체(REQ-T9-839 근접). / Quantity value object with a unit dimension.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Quantity implements DomainValue {
|
|
12
|
+
readonly value: OGDecimal;
|
|
13
|
+
readonly unit: string;
|
|
14
|
+
readonly dimension: string;
|
|
15
|
+
readonly kind = "quantity";
|
|
16
|
+
private constructor();
|
|
17
|
+
static of(value: OGDecimalLike, unit: string, dimension?: string): Quantity;
|
|
18
|
+
get type(): ValueType;
|
|
19
|
+
isMissing(): boolean;
|
|
20
|
+
isError(): boolean;
|
|
21
|
+
isBlank(): boolean;
|
|
22
|
+
/** 동일 차원·동일 단위만 합산(불일치 시 throw). / Add only same dimension & unit (throws otherwise). */
|
|
23
|
+
add(other: Quantity): Quantity;
|
|
24
|
+
equals(other: DomainValue): boolean;
|
|
25
|
+
hashKey(): string;
|
|
26
|
+
/** 동일 단위=value, 이종 단위=unit 콜레이션 그룹분리 후 value. / Same unit: by value; else group by unit code. */
|
|
27
|
+
compareTo(other: DomainValue): number;
|
|
28
|
+
textEquivalent(_locale?: string): string;
|
|
29
|
+
toJSON(): DomainValueDTO;
|
|
30
|
+
}
|
|
31
|
+
/** Quantity 값 타입(레지스트리 등록용). / ValueType for quantity. */
|
|
32
|
+
export declare const quantityType: ValueType;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { OGDecimal, OGDecimalLike } from '../OGDecimal.js';
|
|
2
|
+
import { DomainValue, DomainValueDTO } from './DomainValue.js';
|
|
3
|
+
import { ValueType } from './ValueType.js';
|
|
4
|
+
/**
|
|
5
|
+
* 기저 적법성 판별자(REQ-T2-803) — GrowthRate·Delta 공유 정본 열거.
|
|
6
|
+
* / Base validity discriminant shared by GrowthRate and Delta.
|
|
7
|
+
*/
|
|
8
|
+
export type BaseValidity = 'ok' | 'zeroBase' | 'negativeBase' | 'signChange';
|
|
9
|
+
/** 0~1 무차원 비율. / Dimensionless ratio in [0,1]. */
|
|
10
|
+
export declare class Ratio implements DomainValue {
|
|
11
|
+
readonly value: OGDecimal;
|
|
12
|
+
readonly kind = "ratio";
|
|
13
|
+
private constructor();
|
|
14
|
+
static of(value: OGDecimalLike): Ratio;
|
|
15
|
+
get type(): ValueType;
|
|
16
|
+
isMissing(): boolean;
|
|
17
|
+
isError(): boolean;
|
|
18
|
+
isBlank(): boolean;
|
|
19
|
+
/** ×100 명시 변환. / Explicit ×100 conversion. */
|
|
20
|
+
toPercent(): Percent;
|
|
21
|
+
/**
|
|
22
|
+
* 비율 집계 적법성(REQ-T2-805): 단순평균 금지 → 가중평균만(가중치=모수).
|
|
23
|
+
* / Weighted mean only (weights = population size); simple mean is disallowed.
|
|
24
|
+
*/
|
|
25
|
+
static weightedMean(pairs: Array<[Ratio, OGDecimalLike]>): Ratio;
|
|
26
|
+
equals(other: DomainValue): boolean;
|
|
27
|
+
hashKey(): string;
|
|
28
|
+
compareTo(other: DomainValue): number;
|
|
29
|
+
textEquivalent(_locale?: string): string;
|
|
30
|
+
toJSON(): DomainValueDTO;
|
|
31
|
+
}
|
|
32
|
+
/** 백분율(예: 12.5%). / Percentage (e.g. 12.5%). */
|
|
33
|
+
export declare class Percent implements DomainValue {
|
|
34
|
+
readonly value: OGDecimal;
|
|
35
|
+
readonly kind = "percent";
|
|
36
|
+
private constructor();
|
|
37
|
+
static of(value: OGDecimalLike): Percent;
|
|
38
|
+
get type(): ValueType;
|
|
39
|
+
isMissing(): boolean;
|
|
40
|
+
isError(): boolean;
|
|
41
|
+
isBlank(): boolean;
|
|
42
|
+
/** ÷100 명시 변환. / Explicit ÷100 conversion. */
|
|
43
|
+
toRatio(): Ratio;
|
|
44
|
+
/** %p 는 오직 두 Percent 의 차로만 생성(의미 강제). / A %p is only produced by subtracting two Percents. */
|
|
45
|
+
minus(other: Percent): PercentagePoint;
|
|
46
|
+
equals(other: DomainValue): boolean;
|
|
47
|
+
hashKey(): string;
|
|
48
|
+
compareTo(other: DomainValue): number;
|
|
49
|
+
textEquivalent(locale?: string): string;
|
|
50
|
+
toJSON(): DomainValueDTO;
|
|
51
|
+
}
|
|
52
|
+
/** 퍼센트 포인트(%p) — 두 Percent 의 차. Percent 로 암시 변환 없음. / Percentage point; no implicit conversion to Percent. */
|
|
53
|
+
export declare class PercentagePoint implements DomainValue {
|
|
54
|
+
readonly value: OGDecimal;
|
|
55
|
+
readonly kind = "percentagePoint";
|
|
56
|
+
private constructor();
|
|
57
|
+
static of(value: OGDecimalLike): PercentagePoint;
|
|
58
|
+
get type(): ValueType;
|
|
59
|
+
isMissing(): boolean;
|
|
60
|
+
isError(): boolean;
|
|
61
|
+
isBlank(): boolean;
|
|
62
|
+
/** 가법(같은 %p 끼리만). / Addition (only with another %p). */
|
|
63
|
+
add(other: PercentagePoint): PercentagePoint;
|
|
64
|
+
equals(other: DomainValue): boolean;
|
|
65
|
+
hashKey(): string;
|
|
66
|
+
compareTo(other: DomainValue): number;
|
|
67
|
+
textEquivalent(locale?: string): string;
|
|
68
|
+
toJSON(): DomainValueDTO;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 증감률(REQ-T2-803) — 부호·기저 규칙을 값 객체에 못박음.
|
|
72
|
+
* / Growth rate; base/sign rules are encoded in the value object.
|
|
73
|
+
*/
|
|
74
|
+
export declare class GrowthRate implements DomainValue {
|
|
75
|
+
readonly rate: OGDecimal | null;
|
|
76
|
+
readonly baseValidity: BaseValidity;
|
|
77
|
+
readonly kind = "growthRate";
|
|
78
|
+
private constructor();
|
|
79
|
+
/** (현재-기저)/|기저|. 기저 0 → rate=null·zeroBase(∞ 표기 금지). / Growth rate; zero base → null. */
|
|
80
|
+
static from(current: OGDecimalLike, base: OGDecimalLike): GrowthRate;
|
|
81
|
+
get type(): ValueType;
|
|
82
|
+
isMissing(): boolean;
|
|
83
|
+
isError(): boolean;
|
|
84
|
+
isBlank(): boolean;
|
|
85
|
+
/** 해석 가능(기저 적법 && 산출 가능). / Meaningful when base is ok and rate exists. */
|
|
86
|
+
isMeaningful(): boolean;
|
|
87
|
+
equals(other: DomainValue): boolean;
|
|
88
|
+
hashKey(): string;
|
|
89
|
+
compareTo(other: DomainValue): number;
|
|
90
|
+
textEquivalent(locale?: string): string;
|
|
91
|
+
toJSON(): DomainValueDTO;
|
|
92
|
+
}
|
|
93
|
+
/** Ratio 값 타입. / ValueType for ratio. */
|
|
94
|
+
export declare const ratioType: ValueType;
|
|
95
|
+
/** Percent 값 타입. / ValueType for percent. */
|
|
96
|
+
export declare const percentType: ValueType;
|
|
97
|
+
/** PercentagePoint 값 타입. / ValueType for percentage point. */
|
|
98
|
+
export declare const percentagePointType: ValueType;
|
|
99
|
+
/** GrowthRate 값 타입. / ValueType for growth rate. */
|
|
100
|
+
export declare const growthRateType: ValueType;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { OGDecimal, OGDecimalLike } from '../OGDecimal.js';
|
|
2
|
+
import { DomainValue, DomainValueDTO } from './DomainValue.js';
|
|
3
|
+
import { ValueType } from './ValueType.js';
|
|
4
|
+
/** 임계 구간 정의. / A threshold band definition. */
|
|
5
|
+
export interface Band {
|
|
6
|
+
/** 구간 상한(null = 상방 무한). / Upper bound (null = unbounded above). */
|
|
7
|
+
readonly upper: OGDecimal | null;
|
|
8
|
+
/** 상한 포함 여부. / Whether the upper bound is inclusive. */
|
|
9
|
+
readonly inclusive: boolean;
|
|
10
|
+
/** 구간 라벨. / Band label. */
|
|
11
|
+
readonly label: string;
|
|
12
|
+
}
|
|
13
|
+
/** 임계 방향. / Threshold direction. */
|
|
14
|
+
export type ThresholdDirection = 'higherIsBetter' | 'lowerIsBetter';
|
|
15
|
+
/** 밴드 입력(OGDecimalLike 허용). / Band input accepting OGDecimalLike. */
|
|
16
|
+
export interface BandInput {
|
|
17
|
+
readonly upper: OGDecimalLike | null;
|
|
18
|
+
readonly inclusive: boolean;
|
|
19
|
+
readonly label: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 임계 집합 값 객체(REQ-T5-814). / ThresholdSet value object.
|
|
23
|
+
*/
|
|
24
|
+
export declare class ThresholdSet implements DomainValue {
|
|
25
|
+
readonly bands: ReadonlyArray<Band>;
|
|
26
|
+
readonly direction: ThresholdDirection;
|
|
27
|
+
readonly kind = "thresholdSet";
|
|
28
|
+
private constructor();
|
|
29
|
+
static of(bands: ReadonlyArray<BandInput>, direction?: ThresholdDirection): ThresholdSet;
|
|
30
|
+
get type(): ValueType;
|
|
31
|
+
isMissing(): boolean;
|
|
32
|
+
isError(): boolean;
|
|
33
|
+
isBlank(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 값이 속한 구간 인덱스(경계 규칙 일관 판정). 결측/오류/미소속 → -1.
|
|
36
|
+
* / Index of the band a value falls into; missing/error/unmatched → -1.
|
|
37
|
+
*/
|
|
38
|
+
bandOf(v: DomainValue): number;
|
|
39
|
+
equals(other: DomainValue): boolean;
|
|
40
|
+
hashKey(): string;
|
|
41
|
+
compareTo(other: DomainValue): number;
|
|
42
|
+
textEquivalent(_locale?: string): string;
|
|
43
|
+
toJSON(): DomainValueDTO;
|
|
44
|
+
}
|
|
45
|
+
/** ThresholdSet 값 타입. / ValueType for thresholdSet. */
|
|
46
|
+
export declare const thresholdSetType: ValueType;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { DomainValue, ValueKind } from './DomainValue.js';
|
|
2
|
+
import { RoundingRule } from './rounding.js';
|
|
3
|
+
import { SignRule, MissingPolicy, AggregationLegality } from './strategies.js';
|
|
4
|
+
export type { SignRule, MissingPolicy, AggregationLegality } from './strategies.js';
|
|
5
|
+
export type { RoundingRule } from './rounding.js';
|
|
6
|
+
/** 파싱 문맥(편집 커밋·임포트 시 값종별 부속 정보). / Parse context (per-kind hints on commit/import). */
|
|
7
|
+
export interface ParseContext {
|
|
8
|
+
readonly currency?: string;
|
|
9
|
+
readonly unit?: string;
|
|
10
|
+
readonly dimension?: string;
|
|
11
|
+
readonly locale?: string;
|
|
12
|
+
readonly precision?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* ValueType — 값 종류별 도메인 메타(REQ-TX-831). 순수 메타 객체.
|
|
16
|
+
* / Per-kind domain meta; a pure, tree-shakeable descriptor.
|
|
17
|
+
*/
|
|
18
|
+
export interface ValueType {
|
|
19
|
+
readonly kind: ValueKind;
|
|
20
|
+
/** 단위 차원('money'|'none'|'length'…). 집계 호환성 판정용. / Unit dimension. */
|
|
21
|
+
readonly dimension: string;
|
|
22
|
+
/** 기본 반올림 규칙(값객체·포맷터·집계 공유). / Default rounding rule. */
|
|
23
|
+
readonly rounding: RoundingRule;
|
|
24
|
+
/** 부호·기저 규칙(의미). / Sign/base semantics rule. */
|
|
25
|
+
readonly sign: SignRule;
|
|
26
|
+
/** 결측 처우 기본. / Default missing-handling policy. */
|
|
27
|
+
readonly missing: MissingPolicy;
|
|
28
|
+
/** 집계 적법성(REQ-T2-805). / Aggregation legality. */
|
|
29
|
+
readonly aggregation: AggregationLegality;
|
|
30
|
+
/** 원시값 → 값 객체 파싱(편집 커밋·임포트 진입점). / Parse a raw value into a value object. */
|
|
31
|
+
parse(raw: unknown, ctx?: ParseContext): DomainValue;
|
|
32
|
+
}
|
|
33
|
+
/** 컬럼 값 메타(개방형 기술자) — 적합 타입 해석 입력. / Open column descriptor for type resolution. */
|
|
34
|
+
export interface ColumnValueMeta {
|
|
35
|
+
readonly kind?: ValueKind;
|
|
36
|
+
readonly dataType?: string;
|
|
37
|
+
readonly unit?: string;
|
|
38
|
+
readonly currencyCode?: string;
|
|
39
|
+
readonly intlLocale?: string;
|
|
40
|
+
readonly precision?: number;
|
|
41
|
+
readonly nullable?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* ValueTypeRegistry — 값 타입 카탈로그(REQ-TX-831). / ValueType catalog.
|
|
45
|
+
*/
|
|
46
|
+
export interface ValueTypeRegistry {
|
|
47
|
+
/** 값 타입 등록(additive; 동일 kind 재등록=last-wins 승격). / Register a value type (last-wins). */
|
|
48
|
+
register(type: ValueType): void;
|
|
49
|
+
/** kind 로 조회(미등록 → PLAIN 폴백, throw 아님). / Resolve by kind; unknown → PLAIN fallback. */
|
|
50
|
+
get(kind: ValueKind): ValueType;
|
|
51
|
+
/** 등록 여부. / Whether a kind is registered. */
|
|
52
|
+
has(kind: ValueKind): boolean;
|
|
53
|
+
/** 컬럼 메타로 적합 타입 해석. / Resolve a suitable type from column meta. */
|
|
54
|
+
resolveForColumn(meta: ColumnValueMeta): ValueType;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 기본 ValueTypeRegistry 구현(REQ-TX-831). / Default registry implementation.
|
|
58
|
+
*/
|
|
59
|
+
export declare class DefaultValueTypeRegistry implements ValueTypeRegistry {
|
|
60
|
+
private _map;
|
|
61
|
+
register(type: ValueType): void;
|
|
62
|
+
get(kind: ValueKind): ValueType;
|
|
63
|
+
has(kind: ValueKind): boolean;
|
|
64
|
+
resolveForColumn(meta: ColumnValueMeta): ValueType;
|
|
65
|
+
}
|
|
66
|
+
/** 기본 8+종 값 타입. / The built-in value types. */
|
|
67
|
+
export declare const DEFAULT_VALUE_TYPES: readonly ValueType[];
|
|
68
|
+
/**
|
|
69
|
+
* 기본 값 타입이 등록된 레지스트리 생성(REQ-TX-831). / Create a registry with the built-in types registered.
|
|
70
|
+
*/
|
|
71
|
+
export declare function createDefaultRegistry(): DefaultValueTypeRegistry;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OGDecimal } from '../OGDecimal.js';
|
|
2
|
+
/** 반올림 모드. / Rounding mode. */
|
|
3
|
+
export type RoundingMode = 'half-up' | 'half-even' | 'down';
|
|
4
|
+
/**
|
|
5
|
+
* 반올림 규칙(Strategy). ValueType·포맷터·집계가 공유(REQ-T2-804).
|
|
6
|
+
* / Rounding rule strategy shared by value types, formatters and aggregation.
|
|
7
|
+
*/
|
|
8
|
+
export interface RoundingRule {
|
|
9
|
+
readonly mode: RoundingMode;
|
|
10
|
+
/** value 를 dp 소수자리로 반올림한 새 OGDecimal. / Round `value` to `dp` places (new OGDecimal). */
|
|
11
|
+
round(value: OGDecimal, dp: number): OGDecimal;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 문자열(정확 표현) 기반 반올림 — OGDecimal 정밀 손실 없이 HALF_EVEN/HALF_UP/DOWN.
|
|
15
|
+
* / Exact string-based rounding — no precision loss on OGDecimal.
|
|
16
|
+
*/
|
|
17
|
+
export declare function roundDecimal(value: OGDecimal, dp: number, mode: RoundingMode): OGDecimal;
|
|
18
|
+
/** RoundingRule 팩토리. / Build a RoundingRule for a mode. */
|
|
19
|
+
export declare function makeRoundingRule(mode: RoundingMode): RoundingRule;
|
|
20
|
+
/** 반올림(HALF_UP). / Round half up. */
|
|
21
|
+
export declare const HALF_UP: RoundingRule;
|
|
22
|
+
/** 은행가 반올림(HALF_EVEN) — 회계 SSOT. / Banker's rounding. */
|
|
23
|
+
export declare const HALF_EVEN: RoundingRule;
|
|
24
|
+
/** 버림(DOWN, 0 방향). / Truncate toward zero. */
|
|
25
|
+
export declare const DOWN: RoundingRule;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 부호·기저 규칙(REQ-T2-803). 회계부호/무변화 ε 등 의미 규칙(표현은 밖).
|
|
3
|
+
* / Sign/base semantics rule (presentation lives outside).
|
|
4
|
+
*/
|
|
5
|
+
export interface SignRule {
|
|
6
|
+
/** 음수 허용 여부. / Whether negatives are allowed. */
|
|
7
|
+
readonly allowNegative: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 결측 처우 정책(REQ-TX-832). 표식은 밖, 여기선 정책 값만.
|
|
11
|
+
* / Missing-value handling policy (visual marks live outside).
|
|
12
|
+
*/
|
|
13
|
+
export interface MissingPolicy {
|
|
14
|
+
/** 집계에서 제외/포함. / Excluded or included from aggregation. */
|
|
15
|
+
readonly aggregation: 'excluded' | 'included';
|
|
16
|
+
/** 정규화 스케일에서 제외 여부. / Excluded from normalization scale. */
|
|
17
|
+
readonly scaleExcluded: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 집계 적법성(REQ-T2-805). 타입별 허용 집계 선언(비율=가중평균, 통화=합, 코드=비집계).
|
|
21
|
+
* / Aggregation legality: which aggregations are meaningful for a value type.
|
|
22
|
+
*/
|
|
23
|
+
export interface AggregationLegality {
|
|
24
|
+
readonly legalFns: readonly string[];
|
|
25
|
+
/** fn 이 이 타입에 적법한가. / Whether `fn` is legal for this type. */
|
|
26
|
+
allows(fn: string): boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const SIGN_ALLOW_NEGATIVE: SignRule;
|
|
29
|
+
export declare const SIGN_NON_NEGATIVE: SignRule;
|
|
30
|
+
export declare const MISSING_EXCLUDE: MissingPolicy;
|
|
31
|
+
/** 통화·수치: 합·평균·최소·최대·개수. / Money & numbers: sum/avg/min/max/count. */
|
|
32
|
+
export declare const AGG_NUMERIC: AggregationLegality;
|
|
33
|
+
/** 비율: 가중평균만(단순평균 금지). / Ratios: weighted mean only. */
|
|
34
|
+
export declare const AGG_WEIGHTED_MEAN: AggregationLegality;
|
|
35
|
+
/** 통화: 합·최소·최대·개수(평균은 가중 문맥). / Money: sum/min/max/count. */
|
|
36
|
+
export declare const AGG_MONEY: AggregationLegality;
|
|
37
|
+
/** 코드·텍스트: 비집계(개수만). / Codes & text: count only. */
|
|
38
|
+
export declare const AGG_NONE: AggregationLegality;
|
|
@@ -2,16 +2,25 @@ import { ColumnDef, EditorDef } from '../types.js';
|
|
|
2
2
|
import { RenderContext } from '../renderers/CellRenderer.js';
|
|
3
3
|
export { DateEditor } from './DateEditor.js';
|
|
4
4
|
export { SelectEditor } from './SelectEditor.js';
|
|
5
|
+
/** 편집 결과(커밋 여부 + 값). / Edit result (whether committed + value). */
|
|
5
6
|
export interface EditorResult {
|
|
7
|
+
/** 커밋(확정) 여부. / Whether committed. */
|
|
6
8
|
committed: boolean;
|
|
9
|
+
/** 편집된 값. / Edited value. */
|
|
7
10
|
value: any;
|
|
8
11
|
}
|
|
12
|
+
/** 셀 에디터 인터페이스 — 편집 위젯 수명 관리. / Cell editor interface — manages the edit widget lifecycle. */
|
|
9
13
|
export interface CellEditor {
|
|
14
|
+
/** 컨테이너에 편집 위젯을 마운트한다. / Mount the edit widget into the container. */
|
|
10
15
|
mount(container: HTMLElement, ctx: RenderContext, onCommit: (value: any) => void, onCancel: () => void): void;
|
|
16
|
+
/** 현재 편집 값을 반환한다. / Return the current edit value. */
|
|
11
17
|
getValue(): any;
|
|
18
|
+
/** 편집 위젯에 포커스한다. / Focus the edit widget. */
|
|
12
19
|
focus(): void;
|
|
20
|
+
/** 편집 위젯을 정리한다. / Tear down the edit widget. */
|
|
13
21
|
destroy(): void;
|
|
14
22
|
}
|
|
23
|
+
/** 텍스트 입력 에디터. / Text input editor. */
|
|
15
24
|
export declare class TextEditor implements CellEditor {
|
|
16
25
|
private input;
|
|
17
26
|
private _onCommit;
|
|
@@ -23,6 +32,7 @@ export declare class TextEditor implements CellEditor {
|
|
|
23
32
|
focus(): void;
|
|
24
33
|
destroy(): void;
|
|
25
34
|
}
|
|
35
|
+
/** 숫자 입력 에디터(min/max/step 지원). / Number input editor (supports min/max/step). */
|
|
26
36
|
export declare class NumberEditor implements CellEditor {
|
|
27
37
|
private input;
|
|
28
38
|
private _onCommit;
|
|
@@ -43,6 +53,7 @@ export declare class NumberEditor implements CellEditor {
|
|
|
43
53
|
focus(): void;
|
|
44
54
|
destroy(): void;
|
|
45
55
|
}
|
|
56
|
+
/** 체크박스 에디터(change 즉시 커밋). / Checkbox editor (commits immediately on change). */
|
|
46
57
|
export declare class CheckboxEditor implements CellEditor {
|
|
47
58
|
private chk;
|
|
48
59
|
private _onCommit;
|
|
@@ -62,9 +73,25 @@ export declare class CheckboxEditor implements CellEditor {
|
|
|
62
73
|
* - number 는 def 가 있으면 min/max/step 을 옵션으로, 없으면 기본 NumberEditor.
|
|
63
74
|
* - select 는 def 가 있으면 def.options, 없으면 col.options 를 쓴다(원 switch 와 동일).
|
|
64
75
|
*/
|
|
76
|
+
/** 셀 에디터 팩토리 시그니처 `(col, def?) => CellEditor`. / Cell-editor factory signature `(col, def?) => CellEditor`. */
|
|
65
77
|
export type EditorFactory = (col: ColumnDef, def?: EditorDef) => CellEditor;
|
|
66
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* 커스텀 셀 에디터 타입을 코어 편집 없이 등록(OCP). 프로세스 전역.
|
|
80
|
+
* / Register a custom cell-editor type without editing core (OCP). Process-global.
|
|
81
|
+
*
|
|
82
|
+
* @param typeName - 에디터 타입 이름(예: 'color') / Editor type name (e.g. 'color')
|
|
83
|
+
* @param factory - 에디터 팩토리 / Editor factory
|
|
84
|
+
* @example
|
|
85
|
+
* registerEditor('color', () => new TextEditor());
|
|
86
|
+
*/
|
|
67
87
|
export declare function registerEditor(typeName: string, factory: EditorFactory): void;
|
|
68
|
-
/** 등록 여부 조회(내부/테스트용). */
|
|
88
|
+
/** 에디터 타입 등록 여부 조회(내부/테스트용). / Whether an editor type is registered (internal/test use). */
|
|
69
89
|
export declare function hasEditor(typeName: string): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 컬럼 정의로부터 셀 에디터를 생성한다(레지스트리 해석, 미등록 시 TextEditor 폴백).
|
|
92
|
+
* / Create a cell editor from a column definition (registry resolution; falls back to TextEditor when unregistered).
|
|
93
|
+
*
|
|
94
|
+
* @param col - 컬럼 정의 / Column definition
|
|
95
|
+
* @returns 셀 에디터 / A cell editor
|
|
96
|
+
*/
|
|
70
97
|
export declare function createEditor(col: ColumnDef): CellEditor;
|
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
import { CellEditor } from './CellEditor.js';
|
|
2
2
|
import { RenderContext } from '../renderers/CellRenderer.js';
|
|
3
|
+
/**
|
|
4
|
+
* 날짜 셀 편집기. 네이티브 `<input type="date">` 로 편집하며 `yyyy-MM-dd` 문자열을 커밋한다.
|
|
5
|
+
* / Date cell editor. Edits via a native `<input type="date">` and commits a `yyyy-MM-dd` string.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const col = { field: 'due', header: '마감일', editor: () => new DateEditor() };
|
|
9
|
+
*/
|
|
3
10
|
export declare class DateEditor implements CellEditor {
|
|
4
11
|
private input;
|
|
5
12
|
private _container;
|
|
6
13
|
private _onCommit;
|
|
7
14
|
private _onCancel;
|
|
15
|
+
/**
|
|
16
|
+
* 편집기를 컨테이너에 마운트한다. / Mount the editor into a container.
|
|
17
|
+
*
|
|
18
|
+
* @param container - 편집기를 붙일 셀 요소 / Cell element to attach the editor to
|
|
19
|
+
* @param ctx - 렌더 컨텍스트(값·컬럼·행 등) / Render context (value, column, row, …)
|
|
20
|
+
* @param onCommit - 값 확정 콜백 / Callback to commit a value
|
|
21
|
+
* @param onCancel - 편집 취소 콜백 / Callback to cancel editing
|
|
22
|
+
*/
|
|
8
23
|
mount(container: HTMLElement, ctx: RenderContext, onCommit: (v: any) => void, onCancel: () => void): void;
|
|
9
24
|
private _onKeyDown;
|
|
10
25
|
private _onBlur;
|
|
26
|
+
/** 현재 입력 값(`yyyy-MM-dd` 문자열)을 반환. / Return the current input value (`yyyy-MM-dd` string). */
|
|
11
27
|
getValue(): any;
|
|
28
|
+
/** 입력 요소에 포커스. / Focus the input element. */
|
|
12
29
|
focus(): void;
|
|
30
|
+
/** 리스너 해제 + aria 상태 원복. / Detach listeners + reset aria state. */
|
|
13
31
|
destroy(): void;
|
|
14
32
|
}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { CellEditor } from './CellEditor.js';
|
|
2
2
|
import { RenderContext } from '../renderers/CellRenderer.js';
|
|
3
|
+
/**
|
|
4
|
+
* 셀렉트 옵션. 문자열(라벨=값) 또는 `{ label|text, value }` 객체 형식.
|
|
5
|
+
* / A select option: a string (label = value) or a `{ label|text, value }` object.
|
|
6
|
+
*/
|
|
3
7
|
export type SelectOption = string | {
|
|
4
8
|
label?: string;
|
|
5
9
|
text?: string;
|
|
6
10
|
value: any;
|
|
7
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* 드롭다운 셀 편집기. 고정 옵션 배열 또는 행별 동적 옵션 함수로 `<select>` 를 구성한다.
|
|
14
|
+
* / Dropdown cell editor. Builds a `<select>` from a fixed option array or a per-row dynamic options function.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 고정 옵션 / fixed options
|
|
18
|
+
* new SelectEditor(['대기', '진행', '완료']);
|
|
19
|
+
* // 행별 동적 옵션 / per-row dynamic options
|
|
20
|
+
* new SelectEditor([], (row) => row.type === 'A' ? ['a1', 'a2'] : ['b1']);
|
|
21
|
+
*/
|
|
8
22
|
export declare class SelectEditor implements CellEditor {
|
|
9
23
|
private select;
|
|
10
24
|
private _container;
|
|
@@ -12,9 +26,24 @@ export declare class SelectEditor implements CellEditor {
|
|
|
12
26
|
private _onCancel;
|
|
13
27
|
private _options;
|
|
14
28
|
private _optionsFn;
|
|
29
|
+
/**
|
|
30
|
+
* @param options - 고정 옵션 배열 / Fixed option array
|
|
31
|
+
* @param optionsFn - 행별 동적 옵션 함수(있으면 options 대신 사용) / Per-row dynamic options function (used instead of options when present)
|
|
32
|
+
*/
|
|
15
33
|
constructor(options?: SelectOption[], optionsFn?: (row: any, rowIndex: number) => SelectOption[]);
|
|
34
|
+
/**
|
|
35
|
+
* 편집기를 컨테이너에 마운트한다. / Mount the editor into a container.
|
|
36
|
+
*
|
|
37
|
+
* @param container - 편집기를 붙일 셀 요소 / Cell element to attach the editor to
|
|
38
|
+
* @param ctx - 렌더 컨텍스트(값·컬럼·행 등) / Render context (value, column, row, …)
|
|
39
|
+
* @param onCommit - 값 확정 콜백 / Callback to commit a value
|
|
40
|
+
* @param onCancel - 편집 취소 콜백 / Callback to cancel editing
|
|
41
|
+
*/
|
|
16
42
|
mount(container: HTMLElement, ctx: RenderContext, onCommit: (v: any) => void, onCancel: () => void): void;
|
|
43
|
+
/** 현재 선택된 값(문자열)을 반환. / Return the currently selected value (string). */
|
|
17
44
|
getValue(): any;
|
|
45
|
+
/** 셀렉트 요소에 포커스. / Focus the select element. */
|
|
18
46
|
focus(): void;
|
|
47
|
+
/** aria 상태 원복(리스너는 요소 제거 시 함께 정리됨). / Reset aria state (listeners are cleaned up when the element is removed). */
|
|
19
48
|
destroy(): void;
|
|
20
49
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChannelId, IExportChannel } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* export 채널 레지스트리 — DD-10 TypedRegistry 위의 채널 특화 별칭.
|
|
4
|
+
* register(channel) 는 IRegistry.register(channel.id, channel) 의 별칭.
|
|
5
|
+
* / Channel registry — a channel-typed alias over DD-10 TypedRegistry.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ChannelRegistry {
|
|
8
|
+
private readonly _reg;
|
|
9
|
+
constructor();
|
|
10
|
+
/** 채널 등록(id 재등록 시 last-wins user override). / Register a channel (last-wins for user overrides). */
|
|
11
|
+
register(channel: IExportChannel): void;
|
|
12
|
+
/** 사용자 채널 교체(동일 id last-wins, 내장 보호 우회). / User channel override (replaces builtin). */
|
|
13
|
+
override(channel: IExportChannel): void;
|
|
14
|
+
/** 미등록 → undefined(never-throw). / Unregistered ⇒ undefined. */
|
|
15
|
+
get(id: ChannelId): IExportChannel | undefined;
|
|
16
|
+
has(id: ChannelId): boolean;
|
|
17
|
+
list(): ChannelId[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActiveStateFlags, ChannelCapabilities, ChannelId, ChannelStateMatrix, StateLoss } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* 채널별 포함/제외 매트릭스 + 이번 export 의 실제 손실 항목 고지(§2.7).
|
|
4
|
+
* / Channel capability matrix + this run's actual losses.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ExportManifest {
|
|
7
|
+
private readonly caps;
|
|
8
|
+
constructor(caps: Readonly<Record<ChannelId, ChannelCapabilities>>);
|
|
9
|
+
/** 현 그리드 상태(활성 병합·CF·필터…) 대비 이 채널이 잃는 항목 목록. / Losses for a channel vs active state. */
|
|
10
|
+
losses(channel: ChannelId, activeState: ActiveStateFlags): ReadonlyArray<StateLoss>;
|
|
11
|
+
/** UI/문서용 채널×항목 매트릭스. / Channel×item matrix for UI/docs. */
|
|
12
|
+
matrix(): ChannelStateMatrix;
|
|
13
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ColumnFormatSpec, FormatContext, FormatInput, FormatResult } from '../format/types.js';
|
|
2
|
+
import { VisualSpec } from '../cf/encoders.js';
|
|
3
|
+
import { CellAlign, DataState, HeaderArtifact, IArtifactSource, ProjectOptions, RowChunk, RowRange } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* export 가 실제로 필요로 하는 좁은 포맷 포트 — 전체 FormatResult 접근(text 뿐 아니라 rawText/aria/
|
|
6
|
+
* sign/applied). DD-04 DisplayFormatter 가 구조적으로 만족(화면과 동일 인스턴스 주입).
|
|
7
|
+
* / The narrow format port export needs — full FormatResult access; DisplayFormatter satisfies it.
|
|
8
|
+
*/
|
|
9
|
+
export interface IArtifactFormatter {
|
|
10
|
+
format(input: FormatInput, spec: ColumnFormatSpec, ctx: FormatContext): FormatResult;
|
|
11
|
+
}
|
|
12
|
+
/** 투영 대상 컬럼 서술(가시 리프 1개). / One visible-leaf column descriptor. */
|
|
13
|
+
export interface ArtifactColumn<T> {
|
|
14
|
+
readonly field: string;
|
|
15
|
+
readonly header: string;
|
|
16
|
+
readonly spec: ColumnFormatSpec;
|
|
17
|
+
readonly align: CellAlign;
|
|
18
|
+
readonly widthPx?: number;
|
|
19
|
+
/** raw 접근자(미주입 시 row[field]). / Raw accessor (defaults to row[field]). */
|
|
20
|
+
readonly get?: (row: T) => unknown;
|
|
21
|
+
}
|
|
22
|
+
/** 병합 배치 조회(DD-02 CoordinateKernel.placeCell 위임 지점). / Placement lookup (delegates to DD-02). */
|
|
23
|
+
export type PlacementFn = (modelIndex: number, colIndex: number) => {
|
|
24
|
+
rowSpan: number;
|
|
25
|
+
colSpan: number;
|
|
26
|
+
hidden: boolean;
|
|
27
|
+
} | undefined;
|
|
28
|
+
/** CF 시각 스펙 조회(DD-05 evaluate+encode 위임 지점). / CF visual lookup (delegates to DD-05). */
|
|
29
|
+
export type CfFn<T> = (row: T, col: ArtifactColumn<T>, modelIndex: number) => VisualSpec | undefined;
|
|
30
|
+
/** GridArtifactSource 협력자(생성자 주입). / Collaborators injected into the source. */
|
|
31
|
+
export interface GridArtifactSourceDeps<T extends Record<string, any>> {
|
|
32
|
+
/** 논리 순서(정렬/필터 후) 전체 행. / All rows in logical order. */
|
|
33
|
+
readonly rows: () => ReadonlyArray<T>;
|
|
34
|
+
/** 가시 리프 컬럼. / Visible-leaf columns. */
|
|
35
|
+
readonly columns: () => ReadonlyArray<ArtifactColumn<T>>;
|
|
36
|
+
/** DD-04 표시값 파사드(화면과 동일 인스턴스). / DD-04 display formatter (same instance as screen). */
|
|
37
|
+
readonly formatter: IArtifactFormatter;
|
|
38
|
+
/** 포맷 컨텍스트(로케일/테마/consumer). / Format context. */
|
|
39
|
+
readonly ctx: () => FormatContext;
|
|
40
|
+
/** 선택: DD-05 CF 시각 스펙. / Optional: DD-05 CF visual spec. */
|
|
41
|
+
readonly cfFor?: CfFn<T>;
|
|
42
|
+
/** 선택: DD-02 병합 배치. / Optional: DD-02 merge placement. */
|
|
43
|
+
readonly placeFor?: PlacementFn;
|
|
44
|
+
/** 선택: 데이터 상태(기본 ready). / Optional: data state (defaults to ready). */
|
|
45
|
+
readonly state?: () => DataState;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 화면과 동일 파이프라인에서 아티팩트를 접는 소스 구현(§2.2).
|
|
49
|
+
* export 채널은 이 포트만 알고 상류 셋(DD-04/05/02)을 직접 모른다(의존 역전).
|
|
50
|
+
* / Folds artifacts from the same pipeline as the screen; channels know only this port.
|
|
51
|
+
*/
|
|
52
|
+
export declare class GridArtifactSource<T extends Record<string, any> = any> implements IArtifactSource {
|
|
53
|
+
private readonly d;
|
|
54
|
+
constructor(d: GridArtifactSourceDeps<T>);
|
|
55
|
+
projectHeader(opts?: ProjectOptions): ReadonlyArray<ReadonlyArray<HeaderArtifact>>;
|
|
56
|
+
projectRows(opts?: ProjectOptions): AsyncIterable<RowChunk>;
|
|
57
|
+
totalRows(range?: RowRange): number;
|
|
58
|
+
dataState(): DataState;
|
|
59
|
+
private _foldRow;
|
|
60
|
+
private _cols;
|
|
61
|
+
private _resolveRange;
|
|
62
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ChannelId, IArtifactProvenance, ProvenanceBadge, ProvenanceBlock, TransformProvenance } from './types.js';
|
|
2
|
+
/** ArtifactProvenance 구성 인자. / Construction options. */
|
|
3
|
+
export interface ArtifactProvenanceOptions {
|
|
4
|
+
readonly transforms?: ReadonlyArray<TransformProvenance>;
|
|
5
|
+
/** 전체 행수 등 범위 고지("인쇄 범위: 전체 12,300행"). / Range note. */
|
|
6
|
+
readonly rangeNote?: string;
|
|
7
|
+
/** 산출 시각(테스트 결정론 위해 주입 가능). / Generated-at (injectable for determinism). */
|
|
8
|
+
readonly generatedAt?: number;
|
|
9
|
+
/** 로케일 라벨 해석(미주입 시 ko 폴백). / Locale label resolver (ko fallback). */
|
|
10
|
+
readonly t?: (key: string, params?: Record<string, string | number>) => string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 산출물 단위 provenance 집계 — 아티팩트가 '어디에 놓이든 자신의 변환을 고지'(§2.3).
|
|
14
|
+
* / Per-artifact provenance aggregate — discloses its own transforms wherever it lands.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ArtifactProvenance implements IArtifactProvenance {
|
|
17
|
+
readonly transforms: ReadonlyArray<TransformProvenance>;
|
|
18
|
+
readonly badges: ReadonlyArray<ProvenanceBadge>;
|
|
19
|
+
readonly generatedAt: number;
|
|
20
|
+
readonly rangeNote: string;
|
|
21
|
+
private readonly _t?;
|
|
22
|
+
constructor(opts?: ArtifactProvenanceOptions);
|
|
23
|
+
/** 변환 집합 → 무결성 배지(중복 kind 는 1배지). / Transforms → integrity badges (dedup by kind). */
|
|
24
|
+
private _buildBadges;
|
|
25
|
+
private _label;
|
|
26
|
+
/**
|
|
27
|
+
* 배지/캡션을 채널 표현으로 렌더(§2.3). PDF=꼬리말, xlsx=시트 메모, CSV=주석행, print=페이지 푸터.
|
|
28
|
+
* 어느 채널이든 동일 transforms/badges 를 표현 → 고지 누락 0.
|
|
29
|
+
* / Render badges/caption to the channel's representation; no channel drops a disclosure.
|
|
30
|
+
*/
|
|
31
|
+
render(channel: ChannelId): ProvenanceBlock;
|
|
32
|
+
}
|
|
33
|
+
/** 편의 팩토리 — transforms 로부터 provenance 생성. / Convenience factory. */
|
|
34
|
+
export declare function buildProvenance(opts?: ArtifactProvenanceOptions): ArtifactProvenance;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ExportResult, ExportRunCtx, IByteSink, RowArtifact, RowChunk } from './types.js';
|
|
2
|
+
/** 스트리밍 수치 예산(§7). / Streaming numeric budget. */
|
|
3
|
+
export declare const STREAM_DEFAULTS: {
|
|
4
|
+
/** 스트리밍 강제 임계(행수). / Row-count threshold for forced streaming. */
|
|
5
|
+
readonly streamRowThreshold: 50000;
|
|
6
|
+
/** 스트리밍 강제 임계(추정 바이트). / Byte threshold for forced streaming. */
|
|
7
|
+
readonly streamByteThreshold: number;
|
|
8
|
+
/** 청크 기본(행/청크). / Default rows per chunk. */
|
|
9
|
+
readonly chunkRows: 2000;
|
|
10
|
+
/** 소비 버퍼 상한(바이트). / Consumer high-water-mark bytes. */
|
|
11
|
+
readonly highWaterMarkBytes: number;
|
|
12
|
+
/** 힙 상한 힌트(바이트). / Heap hint bytes. */
|
|
13
|
+
readonly maxHeapHintBytes: number;
|
|
14
|
+
};
|
|
15
|
+
/** 규모가 스트리밍 sink 를 강제하는가(§7 전환 임계). / Whether scale forces a streaming sink. */
|
|
16
|
+
export declare function shouldStream(rowCount: number, estBytes?: number): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 생산-소비 흐름 제어기(§2.5). 채널 write 내부에서 사용.
|
|
19
|
+
* / Producer–consumer flow controller used inside a channel's write.
|
|
20
|
+
*/
|
|
21
|
+
export declare class StreamPump {
|
|
22
|
+
/**
|
|
23
|
+
* 스트림을 청크로 흘리며 진행/취소/백프레셔 처리.
|
|
24
|
+
* 루프: for await(chunk) → encode → if(desiredSize<=0) await write(drain) → onProgress → 취소 검사.
|
|
25
|
+
* / Flows the stream chunk-by-chunk with progress, cancellation and backpressure.
|
|
26
|
+
*/
|
|
27
|
+
pump(source: AsyncIterable<RowChunk>, encodeChunk: (rows: ReadonlyArray<RowArtifact>) => Uint8Array | string, sink: IByteSink, ctx?: ExportRunCtx, total?: number): Promise<ExportResult>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ExportResult, ExportRunCtx, IArtifactSource, IByteSink } from '../types.js';
|
|
2
|
+
/** CSV 채널 옵션. / CSV channel options. */
|
|
3
|
+
export interface CsvChannelOptions {
|
|
4
|
+
/** 헤더 행 포함(기본 true). / Include header row (default true). */
|
|
5
|
+
readonly includeHeader?: boolean;
|
|
6
|
+
/** UTF-8 BOM 프리픽스(기본 true, Excel 한글). / Prefix UTF-8 BOM (default true). */
|
|
7
|
+
readonly bom?: boolean;
|
|
8
|
+
/** provenance 주석행 포함(기본 true). / Include provenance comment rows (default true). */
|
|
9
|
+
readonly includeProvenance?: boolean;
|
|
10
|
+
/** 값 대신 원값(rawText) 우선(값 보존 export). / Prefer rawText over display text. */
|
|
11
|
+
readonly preserveRaw?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** CSV 직렬화 전략. / CSV serialization strategy. */
|
|
14
|
+
export declare class CsvChannel {
|
|
15
|
+
private readonly opts;
|
|
16
|
+
readonly id: "csv";
|
|
17
|
+
readonly capabilities: import('../types.js').ChannelCapabilities;
|
|
18
|
+
constructor(opts?: CsvChannelOptions);
|
|
19
|
+
write(source: IArtifactSource, sink: IByteSink, ctx?: ExportRunCtx): Promise<ExportResult>;
|
|
20
|
+
}
|