sequential-workflow-designer-react 0.27.1 → 0.27.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 +6 -1
- package/lib/esm/index.js +7 -2
- package/lib/index.d.ts +5 -1
- package/package.json +3 -3
package/lib/cjs/index.cjs
CHANGED
|
@@ -344,6 +344,10 @@ function SequentialWorkflowDesigner(props) {
|
|
|
344
344
|
var SequentialWorkflowDesignerController = /** @class */ (function () {
|
|
345
345
|
function SequentialWorkflowDesignerController() {
|
|
346
346
|
var _this = this;
|
|
347
|
+
/**
|
|
348
|
+
* @description Event that is raised when the controller is ready to be used.
|
|
349
|
+
*/
|
|
350
|
+
this.onIsReadyChanged = new sequentialWorkflowDesigner.SimpleEvent();
|
|
347
351
|
this.designer = null;
|
|
348
352
|
/**
|
|
349
353
|
* @description Moves the viewport to the step with the animation.
|
|
@@ -385,13 +389,14 @@ var SequentialWorkflowDesignerController = /** @class */ (function () {
|
|
|
385
389
|
* @returns `true` if the controller is ready to be used, `false` otherwise.
|
|
386
390
|
*/
|
|
387
391
|
SequentialWorkflowDesignerController.prototype.isReady = function () {
|
|
388
|
-
return
|
|
392
|
+
return Boolean(this.designer);
|
|
389
393
|
};
|
|
390
394
|
SequentialWorkflowDesignerController.prototype.setDesigner = function (designer) {
|
|
391
395
|
if (designer && this.designer) {
|
|
392
396
|
throw new Error('Designer is already set');
|
|
393
397
|
}
|
|
394
398
|
this.designer = designer;
|
|
399
|
+
this.onIsReadyChanged.forward();
|
|
395
400
|
};
|
|
396
401
|
SequentialWorkflowDesignerController.prototype.getDesigner = function () {
|
|
397
402
|
if (!this.designer) {
|
package/lib/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ReactDOM from 'react-dom/client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { createContext, useContext, useState, useRef, useEffect, isValidElement, useMemo } from 'react';
|
|
4
|
-
import { Designer } from 'sequential-workflow-designer';
|
|
4
|
+
import { Designer, SimpleEvent } from 'sequential-workflow-designer';
|
|
5
5
|
|
|
6
6
|
var Presenter = /** @class */ (function () {
|
|
7
7
|
function Presenter() {
|
|
@@ -342,6 +342,10 @@ function SequentialWorkflowDesigner(props) {
|
|
|
342
342
|
var SequentialWorkflowDesignerController = /** @class */ (function () {
|
|
343
343
|
function SequentialWorkflowDesignerController() {
|
|
344
344
|
var _this = this;
|
|
345
|
+
/**
|
|
346
|
+
* @description Event that is raised when the controller is ready to be used.
|
|
347
|
+
*/
|
|
348
|
+
this.onIsReadyChanged = new SimpleEvent();
|
|
345
349
|
this.designer = null;
|
|
346
350
|
/**
|
|
347
351
|
* @description Moves the viewport to the step with the animation.
|
|
@@ -383,13 +387,14 @@ var SequentialWorkflowDesignerController = /** @class */ (function () {
|
|
|
383
387
|
* @returns `true` if the controller is ready to be used, `false` otherwise.
|
|
384
388
|
*/
|
|
385
389
|
SequentialWorkflowDesignerController.prototype.isReady = function () {
|
|
386
|
-
return
|
|
390
|
+
return Boolean(this.designer);
|
|
387
391
|
};
|
|
388
392
|
SequentialWorkflowDesignerController.prototype.setDesigner = function (designer) {
|
|
389
393
|
if (designer && this.designer) {
|
|
390
394
|
throw new Error('Designer is already set');
|
|
391
395
|
}
|
|
392
396
|
this.designer = designer;
|
|
397
|
+
this.onIsReadyChanged.forward();
|
|
393
398
|
};
|
|
394
399
|
SequentialWorkflowDesignerController.prototype.getDesigner = function () {
|
|
395
400
|
if (!this.designer) {
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MutableRefObject, Context, ReactNode, DependencyList } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom/client';
|
|
4
|
-
import { Definition, RootEditorContext, Designer, ToolboxConfiguration, RootEditorProvider, StepEditorProvider, StepsConfiguration, ValidatorConfiguration, KeyboardConfiguration, PreferenceStorage, CustomActionHandler, DesignerExtension, I18n, Step, StepEditorContext } from 'sequential-workflow-designer';
|
|
4
|
+
import { Definition, RootEditorContext, SimpleEvent, Designer, ToolboxConfiguration, RootEditorProvider, StepEditorProvider, StepsConfiguration, ValidatorConfiguration, KeyboardConfiguration, PreferenceStorage, CustomActionHandler, DesignerExtension, I18n, Step, StepEditorContext } from 'sequential-workflow-designer';
|
|
5
5
|
|
|
6
6
|
declare class Presenter {
|
|
7
7
|
static render(className: string, rootRef: MutableRefObject<ReactDOM.Root | null>, element: JSX.Element): HTMLElement;
|
|
@@ -36,6 +36,10 @@ declare function wrapDefinition<TDefinition extends Definition = Definition>(val
|
|
|
36
36
|
|
|
37
37
|
declare class SequentialWorkflowDesignerController {
|
|
38
38
|
static create(): SequentialWorkflowDesignerController;
|
|
39
|
+
/**
|
|
40
|
+
* @description Event that is raised when the controller is ready to be used.
|
|
41
|
+
*/
|
|
42
|
+
readonly onIsReadyChanged: SimpleEvent<void>;
|
|
39
43
|
private designer;
|
|
40
44
|
private constructor();
|
|
41
45
|
/**
|
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.27.
|
|
4
|
+
"version": "0.27.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.27.
|
|
50
|
+
"sequential-workflow-designer": "^0.27.3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"prettier": "^3.2.5",
|
|
64
64
|
"react": "^18.2.0",
|
|
65
65
|
"react-dom": "^18.2.0",
|
|
66
|
-
"sequential-workflow-designer": "^0.27.
|
|
66
|
+
"sequential-workflow-designer": "^0.27.3",
|
|
67
67
|
"rollup": "^3.18.0",
|
|
68
68
|
"rollup-plugin-dts": "^5.2.0",
|
|
69
69
|
"rollup-plugin-typescript2": "^0.34.1",
|