@goplasmatic/dataflow-ui 2.0.11 → 2.0.12
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/dataflow-ui.css +34 -0
- package/dist/index.cjs +43 -7
- package/dist/index.d.ts +7 -0
- package/dist/index.js +43 -7
- package/package.json +1 -1
package/dist/dataflow-ui.css
CHANGED
|
@@ -5902,6 +5902,40 @@ svg.react-flow__connectionline {
|
|
|
5902
5902
|
color: white;
|
|
5903
5903
|
}
|
|
5904
5904
|
|
|
5905
|
+
.df-debug-toolbar-options {
|
|
5906
|
+
display: flex;
|
|
5907
|
+
align-items: center;
|
|
5908
|
+
gap: 4px;
|
|
5909
|
+
padding-left: 8px;
|
|
5910
|
+
border-left: 1px solid var(--df-border-color);
|
|
5911
|
+
}
|
|
5912
|
+
|
|
5913
|
+
.df-debug-toolbar-checkbox-label {
|
|
5914
|
+
display: flex;
|
|
5915
|
+
align-items: center;
|
|
5916
|
+
gap: 4px;
|
|
5917
|
+
font-size: 11px;
|
|
5918
|
+
color: var(--df-text-secondary);
|
|
5919
|
+
cursor: pointer;
|
|
5920
|
+
user-select: none;
|
|
5921
|
+
}
|
|
5922
|
+
|
|
5923
|
+
.df-debug-toolbar-checkbox-label:hover {
|
|
5924
|
+
color: var(--df-text-primary);
|
|
5925
|
+
}
|
|
5926
|
+
|
|
5927
|
+
.df-debug-toolbar-checkbox {
|
|
5928
|
+
width: 14px;
|
|
5929
|
+
height: 14px;
|
|
5930
|
+
cursor: pointer;
|
|
5931
|
+
accent-color: var(--df-accent-primary);
|
|
5932
|
+
}
|
|
5933
|
+
|
|
5934
|
+
.df-debug-toolbar-checkbox:disabled {
|
|
5935
|
+
opacity: 0.5;
|
|
5936
|
+
cursor: not-allowed;
|
|
5937
|
+
}
|
|
5938
|
+
|
|
5905
5939
|
.df-debug-toolbar-actions {
|
|
5906
5940
|
display: flex;
|
|
5907
5941
|
align-items: center;
|
package/dist/index.cjs
CHANGED
|
@@ -581,7 +581,8 @@ const initialState = {
|
|
|
581
581
|
// 500ms between steps
|
|
582
582
|
inputPayload: null,
|
|
583
583
|
isExecuting: false,
|
|
584
|
-
executionError: null
|
|
584
|
+
executionError: null,
|
|
585
|
+
skipFailedConditions: false
|
|
585
586
|
};
|
|
586
587
|
function debuggerReducer(state, action) {
|
|
587
588
|
switch (action.type) {
|
|
@@ -651,21 +652,30 @@ function debuggerReducer(state, action) {
|
|
|
651
652
|
playbackState: "stopped",
|
|
652
653
|
executionError: null
|
|
653
654
|
};
|
|
654
|
-
case "STEP_FORWARD":
|
|
655
|
+
case "STEP_FORWARD": {
|
|
655
656
|
if (!state.trace || state.trace.steps.length === 0) {
|
|
656
657
|
return state;
|
|
657
658
|
}
|
|
658
|
-
|
|
659
|
+
let nextIndex = state.currentStepIndex + 1;
|
|
660
|
+
if (state.skipFailedConditions) {
|
|
661
|
+
while (nextIndex < state.trace.steps.length && state.trace.steps[nextIndex].result === "skipped") {
|
|
662
|
+
nextIndex++;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
if (nextIndex >= state.trace.steps.length) {
|
|
659
666
|
return {
|
|
660
667
|
...state,
|
|
668
|
+
currentStepIndex: state.trace.steps.length - 1,
|
|
669
|
+
// Go to last step
|
|
661
670
|
playbackState: "paused"
|
|
662
671
|
// Auto-pause at end
|
|
663
672
|
};
|
|
664
673
|
}
|
|
665
674
|
return {
|
|
666
675
|
...state,
|
|
667
|
-
currentStepIndex:
|
|
676
|
+
currentStepIndex: nextIndex
|
|
668
677
|
};
|
|
678
|
+
}
|
|
669
679
|
case "STEP_BACKWARD":
|
|
670
680
|
if (state.currentStepIndex <= -1) return state;
|
|
671
681
|
return {
|
|
@@ -687,6 +697,11 @@ function debuggerReducer(state, action) {
|
|
|
687
697
|
...state,
|
|
688
698
|
playbackSpeed: Math.max(100, Math.min(2e3, action.speed))
|
|
689
699
|
};
|
|
700
|
+
case "SET_SKIP_FAILED_CONDITIONS":
|
|
701
|
+
return {
|
|
702
|
+
...state,
|
|
703
|
+
skipFailedConditions: action.skip
|
|
704
|
+
};
|
|
690
705
|
default:
|
|
691
706
|
return state;
|
|
692
707
|
}
|
|
@@ -730,6 +745,10 @@ function DebuggerProvider({
|
|
|
730
745
|
const stepBackward = require$$0.useCallback(() => dispatch2({ type: "STEP_BACKWARD" }), []);
|
|
731
746
|
const goToStep = require$$0.useCallback((index2) => dispatch2({ type: "GO_TO_STEP", index: index2 }), []);
|
|
732
747
|
const setSpeed = require$$0.useCallback((speed) => dispatch2({ type: "SET_SPEED", speed }), []);
|
|
748
|
+
const setSkipFailedConditions = require$$0.useCallback(
|
|
749
|
+
(skip) => dispatch2({ type: "SET_SKIP_FAILED_CONDITIONS", skip }),
|
|
750
|
+
[]
|
|
751
|
+
);
|
|
733
752
|
const runExecution = require$$0.useCallback(
|
|
734
753
|
async (workflows, payload) => {
|
|
735
754
|
var _a;
|
|
@@ -804,6 +823,7 @@ function DebuggerProvider({
|
|
|
804
823
|
stepBackward,
|
|
805
824
|
goToStep,
|
|
806
825
|
setSpeed,
|
|
826
|
+
setSkipFailedConditions,
|
|
807
827
|
runExecution,
|
|
808
828
|
currentStep,
|
|
809
829
|
currentMessage,
|
|
@@ -813,7 +833,8 @@ function DebuggerProvider({
|
|
|
813
833
|
hasTrace,
|
|
814
834
|
progress,
|
|
815
835
|
totalSteps,
|
|
816
|
-
isEngineReady
|
|
836
|
+
isEngineReady,
|
|
837
|
+
skipFailedConditions: state.skipFailedConditions
|
|
817
838
|
};
|
|
818
839
|
return /* @__PURE__ */ jsxRuntime.jsx(DebuggerContext.Provider, { value, children: children2 });
|
|
819
840
|
}
|
|
@@ -21101,7 +21122,9 @@ function IntegratedDebugToolbar({
|
|
|
21101
21122
|
isAtEnd,
|
|
21102
21123
|
hasTrace,
|
|
21103
21124
|
totalSteps,
|
|
21104
|
-
isEngineReady
|
|
21125
|
+
isEngineReady,
|
|
21126
|
+
skipFailedConditions,
|
|
21127
|
+
setSkipFailedConditions
|
|
21105
21128
|
} = useDebugger();
|
|
21106
21129
|
const { playbackState, currentStepIndex, isExecuting, executionError, trace } = state;
|
|
21107
21130
|
const lastExecutionRef = require$$0.useRef(null);
|
|
@@ -21307,6 +21330,19 @@ function IntegratedDebugToolbar({
|
|
|
21307
21330
|
}
|
|
21308
21331
|
)
|
|
21309
21332
|
] }),
|
|
21333
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "df-debug-toolbar-options", children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "df-debug-toolbar-checkbox-label", children: [
|
|
21334
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21335
|
+
"input",
|
|
21336
|
+
{
|
|
21337
|
+
type: "checkbox",
|
|
21338
|
+
checked: skipFailedConditions,
|
|
21339
|
+
onChange: (e) => setSkipFailedConditions(e.target.checked),
|
|
21340
|
+
className: "df-debug-toolbar-checkbox",
|
|
21341
|
+
disabled: isExecuting
|
|
21342
|
+
}
|
|
21343
|
+
),
|
|
21344
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Filter Workflows" })
|
|
21345
|
+
] }) }),
|
|
21310
21346
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "df-debug-toolbar-actions", children: hasTrace ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21311
21347
|
"button",
|
|
21312
21348
|
{
|
|
@@ -22323,7 +22359,7 @@ function JsonEditor({
|
|
|
22323
22359
|
acceptSuggestionOnEnter: "off",
|
|
22324
22360
|
formatOnPaste: true,
|
|
22325
22361
|
formatOnType: false,
|
|
22326
|
-
glyphMargin:
|
|
22362
|
+
glyphMargin: false
|
|
22327
22363
|
}
|
|
22328
22364
|
}
|
|
22329
22365
|
) });
|
package/dist/index.d.ts
CHANGED
|
@@ -162,6 +162,9 @@ export declare type DebuggerAction = {
|
|
|
162
162
|
} | {
|
|
163
163
|
type: 'SET_SPEED';
|
|
164
164
|
speed: number;
|
|
165
|
+
} | {
|
|
166
|
+
type: 'SET_SKIP_FAILED_CONDITIONS';
|
|
167
|
+
skip: boolean;
|
|
165
168
|
};
|
|
166
169
|
|
|
167
170
|
/**
|
|
@@ -184,6 +187,7 @@ declare interface DebuggerContextValue {
|
|
|
184
187
|
stepBackward: () => void;
|
|
185
188
|
goToStep: (index: number) => void;
|
|
186
189
|
setSpeed: (speed: number) => void;
|
|
190
|
+
setSkipFailedConditions: (skip: boolean) => void;
|
|
187
191
|
runExecution: (workflows: Workflow[], payload: Record<string, unknown>) => Promise<ExecutionTrace | null>;
|
|
188
192
|
currentStep: ExecutionStep | null;
|
|
189
193
|
currentMessage: Message | null;
|
|
@@ -194,6 +198,7 @@ declare interface DebuggerContextValue {
|
|
|
194
198
|
progress: number;
|
|
195
199
|
totalSteps: number;
|
|
196
200
|
isEngineReady: boolean;
|
|
201
|
+
skipFailedConditions: boolean;
|
|
197
202
|
}
|
|
198
203
|
|
|
199
204
|
/**
|
|
@@ -247,6 +252,8 @@ export declare interface DebuggerState {
|
|
|
247
252
|
isExecuting: boolean;
|
|
248
253
|
/** Error during execution */
|
|
249
254
|
executionError: string | null;
|
|
255
|
+
/** Whether to skip steps with failed conditions (result: 'skipped') */
|
|
256
|
+
skipFailedConditions: boolean;
|
|
250
257
|
}
|
|
251
258
|
|
|
252
259
|
/**
|
package/dist/index.js
CHANGED
|
@@ -579,7 +579,8 @@ const initialState = {
|
|
|
579
579
|
// 500ms between steps
|
|
580
580
|
inputPayload: null,
|
|
581
581
|
isExecuting: false,
|
|
582
|
-
executionError: null
|
|
582
|
+
executionError: null,
|
|
583
|
+
skipFailedConditions: false
|
|
583
584
|
};
|
|
584
585
|
function debuggerReducer(state, action) {
|
|
585
586
|
switch (action.type) {
|
|
@@ -649,21 +650,30 @@ function debuggerReducer(state, action) {
|
|
|
649
650
|
playbackState: "stopped",
|
|
650
651
|
executionError: null
|
|
651
652
|
};
|
|
652
|
-
case "STEP_FORWARD":
|
|
653
|
+
case "STEP_FORWARD": {
|
|
653
654
|
if (!state.trace || state.trace.steps.length === 0) {
|
|
654
655
|
return state;
|
|
655
656
|
}
|
|
656
|
-
|
|
657
|
+
let nextIndex = state.currentStepIndex + 1;
|
|
658
|
+
if (state.skipFailedConditions) {
|
|
659
|
+
while (nextIndex < state.trace.steps.length && state.trace.steps[nextIndex].result === "skipped") {
|
|
660
|
+
nextIndex++;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
if (nextIndex >= state.trace.steps.length) {
|
|
657
664
|
return {
|
|
658
665
|
...state,
|
|
666
|
+
currentStepIndex: state.trace.steps.length - 1,
|
|
667
|
+
// Go to last step
|
|
659
668
|
playbackState: "paused"
|
|
660
669
|
// Auto-pause at end
|
|
661
670
|
};
|
|
662
671
|
}
|
|
663
672
|
return {
|
|
664
673
|
...state,
|
|
665
|
-
currentStepIndex:
|
|
674
|
+
currentStepIndex: nextIndex
|
|
666
675
|
};
|
|
676
|
+
}
|
|
667
677
|
case "STEP_BACKWARD":
|
|
668
678
|
if (state.currentStepIndex <= -1) return state;
|
|
669
679
|
return {
|
|
@@ -685,6 +695,11 @@ function debuggerReducer(state, action) {
|
|
|
685
695
|
...state,
|
|
686
696
|
playbackSpeed: Math.max(100, Math.min(2e3, action.speed))
|
|
687
697
|
};
|
|
698
|
+
case "SET_SKIP_FAILED_CONDITIONS":
|
|
699
|
+
return {
|
|
700
|
+
...state,
|
|
701
|
+
skipFailedConditions: action.skip
|
|
702
|
+
};
|
|
688
703
|
default:
|
|
689
704
|
return state;
|
|
690
705
|
}
|
|
@@ -728,6 +743,10 @@ function DebuggerProvider({
|
|
|
728
743
|
const stepBackward = useCallback(() => dispatch2({ type: "STEP_BACKWARD" }), []);
|
|
729
744
|
const goToStep = useCallback((index2) => dispatch2({ type: "GO_TO_STEP", index: index2 }), []);
|
|
730
745
|
const setSpeed = useCallback((speed) => dispatch2({ type: "SET_SPEED", speed }), []);
|
|
746
|
+
const setSkipFailedConditions = useCallback(
|
|
747
|
+
(skip) => dispatch2({ type: "SET_SKIP_FAILED_CONDITIONS", skip }),
|
|
748
|
+
[]
|
|
749
|
+
);
|
|
731
750
|
const runExecution = useCallback(
|
|
732
751
|
async (workflows, payload) => {
|
|
733
752
|
var _a;
|
|
@@ -802,6 +821,7 @@ function DebuggerProvider({
|
|
|
802
821
|
stepBackward,
|
|
803
822
|
goToStep,
|
|
804
823
|
setSpeed,
|
|
824
|
+
setSkipFailedConditions,
|
|
805
825
|
runExecution,
|
|
806
826
|
currentStep,
|
|
807
827
|
currentMessage,
|
|
@@ -811,7 +831,8 @@ function DebuggerProvider({
|
|
|
811
831
|
hasTrace,
|
|
812
832
|
progress,
|
|
813
833
|
totalSteps,
|
|
814
|
-
isEngineReady
|
|
834
|
+
isEngineReady,
|
|
835
|
+
skipFailedConditions: state.skipFailedConditions
|
|
815
836
|
};
|
|
816
837
|
return /* @__PURE__ */ jsx(DebuggerContext.Provider, { value, children: children2 });
|
|
817
838
|
}
|
|
@@ -21099,7 +21120,9 @@ function IntegratedDebugToolbar({
|
|
|
21099
21120
|
isAtEnd,
|
|
21100
21121
|
hasTrace,
|
|
21101
21122
|
totalSteps,
|
|
21102
|
-
isEngineReady
|
|
21123
|
+
isEngineReady,
|
|
21124
|
+
skipFailedConditions,
|
|
21125
|
+
setSkipFailedConditions
|
|
21103
21126
|
} = useDebugger();
|
|
21104
21127
|
const { playbackState, currentStepIndex, isExecuting, executionError, trace } = state;
|
|
21105
21128
|
const lastExecutionRef = useRef(null);
|
|
@@ -21305,6 +21328,19 @@ function IntegratedDebugToolbar({
|
|
|
21305
21328
|
}
|
|
21306
21329
|
)
|
|
21307
21330
|
] }),
|
|
21331
|
+
/* @__PURE__ */ jsx("div", { className: "df-debug-toolbar-options", children: /* @__PURE__ */ jsxs("label", { className: "df-debug-toolbar-checkbox-label", children: [
|
|
21332
|
+
/* @__PURE__ */ jsx(
|
|
21333
|
+
"input",
|
|
21334
|
+
{
|
|
21335
|
+
type: "checkbox",
|
|
21336
|
+
checked: skipFailedConditions,
|
|
21337
|
+
onChange: (e) => setSkipFailedConditions(e.target.checked),
|
|
21338
|
+
className: "df-debug-toolbar-checkbox",
|
|
21339
|
+
disabled: isExecuting
|
|
21340
|
+
}
|
|
21341
|
+
),
|
|
21342
|
+
/* @__PURE__ */ jsx("span", { children: "Filter Workflows" })
|
|
21343
|
+
] }) }),
|
|
21308
21344
|
/* @__PURE__ */ jsx("div", { className: "df-debug-toolbar-actions", children: hasTrace ? /* @__PURE__ */ jsxs(
|
|
21309
21345
|
"button",
|
|
21310
21346
|
{
|
|
@@ -22321,7 +22357,7 @@ function JsonEditor({
|
|
|
22321
22357
|
acceptSuggestionOnEnter: "off",
|
|
22322
22358
|
formatOnPaste: true,
|
|
22323
22359
|
formatOnType: false,
|
|
22324
|
-
glyphMargin:
|
|
22360
|
+
glyphMargin: false
|
|
22325
22361
|
}
|
|
22326
22362
|
}
|
|
22327
22363
|
) });
|
package/package.json
CHANGED