sequential-workflow-designer-react 0.18.2 → 0.18.3
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/lib/cjs/index.cjs +8 -2
- package/lib/esm/index.js +8 -2
- package/package.json +3 -3
package/lib/cjs/index.cjs
CHANGED
|
@@ -163,6 +163,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
163
163
|
var customActionHandlerRef = react.useRef(props.customActionHandler);
|
|
164
164
|
var designerRef = react.useRef(null);
|
|
165
165
|
var editorRootRef = react.useRef(null);
|
|
166
|
+
var wrappedDefinitionRef = react.useRef(null);
|
|
166
167
|
var definition = props.definition;
|
|
167
168
|
var selectedStepId = props.selectedStepId;
|
|
168
169
|
var isReadonly = props.isReadonly;
|
|
@@ -185,8 +186,9 @@ function SequentialWorkflowDesigner(props) {
|
|
|
185
186
|
}
|
|
186
187
|
function forwardDefinition() {
|
|
187
188
|
if (designerRef.current) {
|
|
188
|
-
var
|
|
189
|
-
|
|
189
|
+
var wd = wrapDefinition(designerRef.current.getDefinition(), designerRef.current.isValid());
|
|
190
|
+
wrappedDefinitionRef.current = wd;
|
|
191
|
+
onDefinitionChangeRef.current(wd);
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
function rootEditorProvider(def, context, isReadonly) {
|
|
@@ -251,6 +253,10 @@ function SequentialWorkflowDesigner(props) {
|
|
|
251
253
|
if (designerRef.current) {
|
|
252
254
|
var isNotChanged = definition.value === designerRef.current.getDefinition();
|
|
253
255
|
if (isNotChanged) {
|
|
256
|
+
if (wrappedDefinitionRef.current !== definition) {
|
|
257
|
+
wrappedDefinitionRef.current = definition;
|
|
258
|
+
designerRef.current.updateRootComponent();
|
|
259
|
+
}
|
|
254
260
|
if (selectedStepId !== undefined && selectedStepId !== designerRef.current.getSelectedStepId()) {
|
|
255
261
|
if (selectedStepId) {
|
|
256
262
|
designerRef.current.selectStepById(selectedStepId);
|
package/lib/esm/index.js
CHANGED
|
@@ -161,6 +161,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
161
161
|
var customActionHandlerRef = useRef(props.customActionHandler);
|
|
162
162
|
var designerRef = useRef(null);
|
|
163
163
|
var editorRootRef = useRef(null);
|
|
164
|
+
var wrappedDefinitionRef = useRef(null);
|
|
164
165
|
var definition = props.definition;
|
|
165
166
|
var selectedStepId = props.selectedStepId;
|
|
166
167
|
var isReadonly = props.isReadonly;
|
|
@@ -183,8 +184,9 @@ function SequentialWorkflowDesigner(props) {
|
|
|
183
184
|
}
|
|
184
185
|
function forwardDefinition() {
|
|
185
186
|
if (designerRef.current) {
|
|
186
|
-
var
|
|
187
|
-
|
|
187
|
+
var wd = wrapDefinition(designerRef.current.getDefinition(), designerRef.current.isValid());
|
|
188
|
+
wrappedDefinitionRef.current = wd;
|
|
189
|
+
onDefinitionChangeRef.current(wd);
|
|
188
190
|
}
|
|
189
191
|
}
|
|
190
192
|
function rootEditorProvider(def, context, isReadonly) {
|
|
@@ -249,6 +251,10 @@ function SequentialWorkflowDesigner(props) {
|
|
|
249
251
|
if (designerRef.current) {
|
|
250
252
|
var isNotChanged = definition.value === designerRef.current.getDefinition();
|
|
251
253
|
if (isNotChanged) {
|
|
254
|
+
if (wrappedDefinitionRef.current !== definition) {
|
|
255
|
+
wrappedDefinitionRef.current = definition;
|
|
256
|
+
designerRef.current.updateRootComponent();
|
|
257
|
+
}
|
|
252
258
|
if (selectedStepId !== undefined && selectedStepId !== designerRef.current.getSelectedStepId()) {
|
|
253
259
|
if (selectedStepId) {
|
|
254
260
|
designerRef.current.selectStepById(selectedStepId);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sequential-workflow-designer-react",
|
|
3
3
|
"description": "React wrapper for Sequential Workflow Designer component.",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": "^18.2.0",
|
|
49
49
|
"react-dom": "^18.2.0",
|
|
50
|
-
"sequential-workflow-designer": "^0.18.
|
|
50
|
+
"sequential-workflow-designer": "^0.18.3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"prettier": "^2.8.2",
|
|
64
64
|
"react": "^18.2.0",
|
|
65
65
|
"react-dom": "^18.2.0",
|
|
66
|
-
"sequential-workflow-designer": "^0.18.
|
|
66
|
+
"sequential-workflow-designer": "^0.18.3",
|
|
67
67
|
"rollup": "^3.18.0",
|
|
68
68
|
"rollup-plugin-dts": "^5.2.0",
|
|
69
69
|
"rollup-plugin-typescript2": "^0.34.1",
|