sequential-workflow-designer-react 0.19.4 → 0.21.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/lib/cjs/index.cjs CHANGED
@@ -172,13 +172,9 @@ function SequentialWorkflowDesigner(props) {
172
172
  var controlBar = props.controlBar;
173
173
  var contextMenu = props.contextMenu;
174
174
  var keyboard = props.keyboard;
175
+ var preferenceStorage = props.preferenceStorage;
175
176
  var extensions = props.extensions;
176
- if (props.controlBar === undefined) {
177
- throw new Error('The "controlBar" property is not set');
178
- }
179
- if (props.globalEditor) {
180
- throw new Error('The "globalEditor" property is renamed to "rootEditor"');
181
- }
177
+ var i18n = props.i18n;
182
178
  function forwardDefinition() {
183
179
  if (designerRef.current) {
184
180
  var wd = wrapDefinition(designerRef.current.getDefinition(), designerRef.current.isValid());
@@ -282,6 +278,7 @@ function SequentialWorkflowDesigner(props) {
282
278
  controlBar: controlBar,
283
279
  contextMenu: contextMenu,
284
280
  keyboard: keyboard,
281
+ preferenceStorage: preferenceStorage,
285
282
  editors: rootEditorRef.current && stepEditorRef.current
286
283
  ? {
287
284
  isCollapsed: isEditorCollapsed,
@@ -291,6 +288,7 @@ function SequentialWorkflowDesigner(props) {
291
288
  : false,
292
289
  customActionHandler: customActionHandlerRef.current && customActionHandler,
293
290
  extensions: extensions,
291
+ i18n: i18n,
294
292
  isReadonly: isReadonly
295
293
  });
296
294
  if (controllerRef.current) {
@@ -330,10 +328,12 @@ function SequentialWorkflowDesigner(props) {
330
328
  isEditorCollapsed,
331
329
  contextMenu,
332
330
  keyboard,
331
+ preferenceStorage,
333
332
  controlBar,
334
333
  steps,
335
334
  validator,
336
- extensions
335
+ extensions,
336
+ i18n
337
337
  ]);
338
338
  react.useEffect(function () {
339
339
  return tryDestroy;
package/lib/esm/index.js CHANGED
@@ -170,13 +170,9 @@ function SequentialWorkflowDesigner(props) {
170
170
  var controlBar = props.controlBar;
171
171
  var contextMenu = props.contextMenu;
172
172
  var keyboard = props.keyboard;
173
+ var preferenceStorage = props.preferenceStorage;
173
174
  var extensions = props.extensions;
174
- if (props.controlBar === undefined) {
175
- throw new Error('The "controlBar" property is not set');
176
- }
177
- if (props.globalEditor) {
178
- throw new Error('The "globalEditor" property is renamed to "rootEditor"');
179
- }
175
+ var i18n = props.i18n;
180
176
  function forwardDefinition() {
181
177
  if (designerRef.current) {
182
178
  var wd = wrapDefinition(designerRef.current.getDefinition(), designerRef.current.isValid());
@@ -280,6 +276,7 @@ function SequentialWorkflowDesigner(props) {
280
276
  controlBar: controlBar,
281
277
  contextMenu: contextMenu,
282
278
  keyboard: keyboard,
279
+ preferenceStorage: preferenceStorage,
283
280
  editors: rootEditorRef.current && stepEditorRef.current
284
281
  ? {
285
282
  isCollapsed: isEditorCollapsed,
@@ -289,6 +286,7 @@ function SequentialWorkflowDesigner(props) {
289
286
  : false,
290
287
  customActionHandler: customActionHandlerRef.current && customActionHandler,
291
288
  extensions: extensions,
289
+ i18n: i18n,
292
290
  isReadonly: isReadonly
293
291
  });
294
292
  if (controllerRef.current) {
@@ -328,10 +326,12 @@ function SequentialWorkflowDesigner(props) {
328
326
  isEditorCollapsed,
329
327
  contextMenu,
330
328
  keyboard,
329
+ preferenceStorage,
331
330
  controlBar,
332
331
  steps,
333
332
  validator,
334
- extensions
333
+ extensions,
334
+ i18n
335
335
  ]);
336
336
  useEffect(function () {
337
337
  return tryDestroy;
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, CustomActionHandler, DesignerExtension, Step, StepEditorContext } from 'sequential-workflow-designer';
4
+ import { Definition, RootEditorContext, 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;
@@ -88,9 +88,11 @@ interface SequentialWorkflowDesignerProps<TDefinition extends Definition> {
88
88
  controlBar: boolean;
89
89
  contextMenu?: boolean;
90
90
  keyboard?: boolean | KeyboardConfiguration;
91
+ preferenceStorage?: PreferenceStorage;
91
92
  controller?: SequentialWorkflowDesignerController;
92
93
  customActionHandler?: CustomActionHandler;
93
94
  extensions?: DesignerExtension[];
95
+ i18n?: I18n;
94
96
  }
95
97
  declare function SequentialWorkflowDesigner<TDefinition extends Definition>(props: SequentialWorkflowDesignerProps<TDefinition>): JSX.Element;
96
98
 
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.19.4",
4
+ "version": "0.21.0",
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.19.4"
50
+ "sequential-workflow-designer": "^0.21.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@rollup/plugin-node-resolve": "^15.0.1",
@@ -60,10 +60,10 @@
60
60
  "eslint": "^8.30.0",
61
61
  "jest": "^29.3.1",
62
62
  "jest-environment-jsdom": "^29.3.1",
63
- "prettier": "^2.8.2",
63
+ "prettier": "^3.2.5",
64
64
  "react": "^18.2.0",
65
65
  "react-dom": "^18.2.0",
66
- "sequential-workflow-designer": "^0.19.4",
66
+ "sequential-workflow-designer": "^0.21.0",
67
67
  "rollup": "^3.18.0",
68
68
  "rollup-plugin-dts": "^5.2.0",
69
69
  "rollup-plugin-typescript2": "^0.34.1",