@republicroad/seal-editor 1.24.0 → 1.26.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/dist/index.d.ts CHANGED
@@ -97,6 +97,13 @@ export declare const buildRequestSchemaFromDefinitions: (schemaValue: unknown, d
97
97
 
98
98
  export declare const calculateDiffGraph: (currentGraph: DecisionGraphType, previousGraph: DecisionGraphType, options?: ProcessNodesOptions) => DecisionGraphType;
99
99
 
100
+ declare type CellHistoryEntry = {
101
+ rowId: string;
102
+ columnId: string;
103
+ previousValue: string;
104
+ value: string;
105
+ };
106
+
100
107
  export declare const clusterToolbarItems: (items: ToolbarItem[]) => ToolbarItem[];
101
108
 
102
109
  export declare const CodeEditor: default_2.ForwardRefExoticComponent<{
@@ -171,6 +178,8 @@ export declare const codemirror: {
171
178
  linter: typeof linter;
172
179
  };
173
180
 
181
+ export declare const coerceToTypedValue: (raw: unknown) => TypedValue;
182
+
174
183
  export declare const COLUMN_FIELD_TYPE_OPTIONS: {
175
184
  value: ColumnFieldType['type'];
176
185
  label: string;
@@ -406,6 +415,7 @@ declare type DecisionGraphStoreType = {
406
415
  activePanel?: string;
407
416
  onPanelsChange?: (val?: string) => void;
408
417
  simulate?: Simulation;
418
+ simulateRuns: SimulateRunEntry[];
409
419
  user: string;
410
420
  simulatorRequest?: string;
411
421
  simulatorExampleBinding?: SimulatorExampleBinding;
@@ -456,6 +466,8 @@ declare type DecisionGraphStoreType = {
456
466
  openTab: (id: string) => void;
457
467
  goToNode: (id: string) => void;
458
468
  setActivePanel: (panel?: string) => void;
469
+ pushSimulateRun: (entry: SimulateRunEntry) => void;
470
+ clearSimulateRuns: () => void;
459
471
  setCompactMode: (mode: boolean) => void;
460
472
  toggleCompactMode: () => void;
461
473
  setNodeType: (id: string, kind: NodeTypeKind, vt: VariableType) => void;
@@ -932,11 +944,20 @@ declare type DecisionTableStoreType = {
932
944
  trace: SimulationTrace<SimulationTraceDataTable>;
933
945
  inputData?: GetNodeDataResult;
934
946
  };
947
+ cellUndoStack: CellHistoryEntry[][];
948
+ cellRedoStack: CellHistoryEntry[][];
935
949
  };
936
950
  actions: {
937
951
  setDecisionTable: (val: DecisionTableType) => void;
938
952
  setCursor: (cursor: TableCursor | null) => void;
939
953
  commitData: (data: string, cursor: TableCursor) => void;
954
+ commitCells: (changes: Array<{
955
+ value: string;
956
+ columnId: string;
957
+ rowIndex: number;
958
+ }>) => void;
959
+ undoCells: () => void;
960
+ redoCells: () => void;
940
961
  swapRows: (source: number, target: number) => void;
941
962
  addRowAbove: (target?: number) => void;
942
963
  addRowBelow: (target?: number) => void;
@@ -1113,6 +1134,9 @@ declare const en: {
1113
1134
  readonly 'dt.toolbar.addRowBelow': "Add row below";
1114
1135
  readonly 'dt.toolbar.removeRow': "Remove row";
1115
1136
  readonly 'dt.toolbar.toggleColumns': "Toggle columns";
1137
+ readonly 'dt.toolbar.undo': "Undo cell changes";
1138
+ readonly 'dt.toolbar.redo': "Redo cell changes";
1139
+ readonly 'dt.cellsSkipped': "Skipped {{count}} non-writable cell(s)";
1116
1140
  readonly 'dt.toolbar.removeRowConfirm': "Remove row?";
1117
1141
  readonly 'dt.table.column': "Table column";
1118
1142
  readonly 'dt.table.excelColumn': "Excel column";
@@ -1125,6 +1149,7 @@ declare const en: {
1125
1149
  readonly 'dt.field.output.add': "Add Output";
1126
1150
  readonly 'dt.field.output.label': "Output Field";
1127
1151
  readonly 'dt.field.label': "Field label";
1152
+ readonly 'dt.field.browse': "Browse fields";
1128
1153
  readonly 'dt.field.name': "Name";
1129
1154
  readonly 'dt.field.type': "Field Type";
1130
1155
  readonly 'dt.field.outputType': "Output Type";
@@ -1179,6 +1204,10 @@ declare const en: {
1179
1204
  readonly 'dg.toolbar.downloadExcel': "Download Excel";
1180
1205
  readonly 'dg.toolbar.searchNodes': "Search nodes";
1181
1206
  readonly 'dg.toolbar.closeClose': "Close panel";
1207
+ readonly 'dg.simulation.toastOk': "Simulation finished";
1208
+ readonly 'dg.simulation.toastErr': "Simulation failed";
1209
+ readonly 'dg.simulation.runsEmpty': "No runs yet — run a simulation to build history";
1210
+ readonly 'dg.simulation.runsClear': "Clear history";
1182
1211
  readonly 'dg.toolbar.schema': "JSON Schema";
1183
1212
  readonly 'dg.tabs.close': "Close";
1184
1213
  readonly 'dg.tabs.closeAll': "Close all Tabs";
@@ -1309,6 +1338,8 @@ declare const en: {
1309
1338
  readonly 'cf.instanceOverview': "Instances";
1310
1339
  readonly 'cf.parallelHint': "runs in parallel";
1311
1340
  readonly 'cf.duplicateKeyError': "Duplicate output key — parallel results will overwrite";
1341
+ readonly 'cf.scheduleCycleError': "Circular dependency detected: {{keys}}";
1342
+ readonly 'cf.instanceLayerHint': "Execution layer {{layer}}";
1312
1343
  readonly 'cf.modeTable': "Table";
1313
1344
  readonly 'cf.modeCode': "Code";
1314
1345
  readonly 'cf.codeInvalidJson': "Invalid JSON";
@@ -1770,9 +1801,21 @@ declare type InstanceEditorProps = {
1770
1801
  driftByInstance?: Record<string, InstanceDriftSummary>;
1771
1802
  duplicateKeys?: string[];
1772
1803
  outputsByKey?: Record<string, unknown>;
1804
+ schedule?: InstanceSchedule;
1773
1805
  onChange: (instances: FunctionInstance[]) => void;
1774
1806
  };
1775
1807
 
1808
+ declare type InstanceSchedule = {
1809
+ ok: true;
1810
+ layers: string[][];
1811
+ hasEdges: boolean;
1812
+ depsByItem: Record<string, string[]>;
1813
+ } | {
1814
+ ok: false;
1815
+ error: 'DUPLICATE_OUTPUT' | 'CYCLE_DETECTED';
1816
+ keys: string[];
1817
+ };
1818
+
1776
1819
  declare type InterpolationParams = Record<string, string | number>;
1777
1820
 
1778
1821
  export declare const JdmConfigProvider: default_2.FC<JdmConfigProviderProps>;
@@ -2409,6 +2452,15 @@ declare type SetDecisionGraphOptions = {
2409
2452
 
2410
2453
  export declare const setUdfCompletions: (tools: UdfCompletionTool[]) => void;
2411
2454
 
2455
+ declare type SimulateRunEntry = {
2456
+ id: string;
2457
+ ts: string;
2458
+ ok: boolean;
2459
+ performance?: string;
2460
+ error?: string;
2461
+ snapshot: Simulation;
2462
+ };
2463
+
2412
2464
  export declare type Simulation = {
2413
2465
  result?: SimulationOk;
2414
2466
  } & {
@@ -2659,6 +2711,24 @@ declare type TraceFunctionLog = {
2659
2711
 
2660
2712
  declare type TranslationKey = keyof typeof en;
2661
2713
 
2714
+ export declare const TypedInput: default_2.FC<TypedInputProps>;
2715
+
2716
+ declare type TypedInputProps = {
2717
+ parameterType: string;
2718
+ value?: TypedValue;
2719
+ onChange: (value: TypedValue) => void;
2720
+ disabled?: boolean;
2721
+ placeholder?: string;
2722
+ fieldPaths?: string[];
2723
+ };
2724
+
2725
+ export declare type TypedValue = {
2726
+ mode: TypedValueMode;
2727
+ value: unknown;
2728
+ };
2729
+
2730
+ export declare type TypedValueMode = 'literal' | 'expression' | 'reference';
2731
+
2662
2732
  export declare type UdfCompletionTool = {
2663
2733
  name: string;
2664
2734
  title?: string;