sequential-workflow-designer 0.30.2 → 0.30.4
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/README.md +4 -4
- package/dist/index.umd.js +52 -38
- package/lib/cjs/index.cjs +52 -38
- package/lib/esm/index.js +52 -39
- package/lib/index.d.ts +11 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,10 +106,10 @@ Add the below code to your head section in HTML document.
|
|
|
106
106
|
```html
|
|
107
107
|
<head>
|
|
108
108
|
...
|
|
109
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.
|
|
110
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.
|
|
111
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.
|
|
112
|
-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.
|
|
109
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.4/css/designer.css" rel="stylesheet">
|
|
110
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.4/css/designer-light.css" rel="stylesheet">
|
|
111
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.4/css/designer-dark.css" rel="stylesheet">
|
|
112
|
+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.30.4/dist/index.umd.js"></script>
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
Call the designer by:
|
package/dist/index.umd.js
CHANGED
|
@@ -2286,14 +2286,18 @@
|
|
|
2286
2286
|
}
|
|
2287
2287
|
|
|
2288
2288
|
class PlaceholderController {
|
|
2289
|
-
static create(configuration) {
|
|
2290
|
-
return new PlaceholderController(configuration);
|
|
2289
|
+
static create(state, configuration) {
|
|
2290
|
+
return new PlaceholderController(state, configuration);
|
|
2291
2291
|
}
|
|
2292
|
-
constructor(configuration) {
|
|
2293
|
-
var _a, _b
|
|
2292
|
+
constructor(state, configuration) {
|
|
2293
|
+
var _a, _b;
|
|
2294
2294
|
this.configuration = configuration;
|
|
2295
|
-
|
|
2296
|
-
|
|
2295
|
+
const canCreate = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.canCreate;
|
|
2296
|
+
const canShow = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.canShow;
|
|
2297
|
+
this.canCreate = canCreate ? (sequence, index) => canCreate(sequence, index, state.definition) : () => true;
|
|
2298
|
+
this.canShow = canShow
|
|
2299
|
+
? (sequence, index, draggingStepComponentType, draggingStepType) => canShow(sequence, index, draggingStepComponentType, draggingStepType, state.definition)
|
|
2300
|
+
: () => true;
|
|
2297
2301
|
}
|
|
2298
2302
|
}
|
|
2299
2303
|
|
|
@@ -2471,6 +2475,42 @@
|
|
|
2471
2475
|
}
|
|
2472
2476
|
}
|
|
2473
2477
|
|
|
2478
|
+
const defaultConfiguration$2 = {
|
|
2479
|
+
gapWidth: 88,
|
|
2480
|
+
gapHeight: 24,
|
|
2481
|
+
radius: 6,
|
|
2482
|
+
iconSize: 16
|
|
2483
|
+
};
|
|
2484
|
+
class RectPlaceholderExtension {
|
|
2485
|
+
static create(configuration) {
|
|
2486
|
+
return new RectPlaceholderExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$2);
|
|
2487
|
+
}
|
|
2488
|
+
constructor(configuration) {
|
|
2489
|
+
this.configuration = configuration;
|
|
2490
|
+
this.alongGapSize = new Vector(defaultConfiguration$2.gapWidth, defaultConfiguration$2.gapHeight);
|
|
2491
|
+
this.perpendicularGapSize = new Vector(defaultConfiguration$2.gapHeight, defaultConfiguration$2.gapWidth);
|
|
2492
|
+
}
|
|
2493
|
+
getGapSize(orientation) {
|
|
2494
|
+
return orientation === exports.PlaceholderGapOrientation.perpendicular ? this.perpendicularGapSize : this.alongGapSize;
|
|
2495
|
+
}
|
|
2496
|
+
createForGap(parent, parentSequence, index, orientation) {
|
|
2497
|
+
const gapSize = this.getGapSize(orientation);
|
|
2498
|
+
return RectPlaceholder.create(parent, gapSize, exports.PlaceholderDirection.gap, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
2499
|
+
}
|
|
2500
|
+
createForArea(parent, size, direction, parentSequence, index) {
|
|
2501
|
+
return RectPlaceholder.create(parent, size, direction, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
class RectPlaceholderDesignerExtension {
|
|
2506
|
+
static create(configuration) {
|
|
2507
|
+
return new RectPlaceholderDesignerExtension(RectPlaceholderExtension.create(configuration));
|
|
2508
|
+
}
|
|
2509
|
+
constructor(placeholder) {
|
|
2510
|
+
this.placeholder = placeholder;
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2474
2514
|
class StartStopRootComponentDesignerExtension {
|
|
2475
2515
|
static create(configuration) {
|
|
2476
2516
|
return new StartStopRootComponentDesignerExtension(StartStopRootComponentExtension.create(configuration));
|
|
@@ -2480,7 +2520,7 @@
|
|
|
2480
2520
|
}
|
|
2481
2521
|
}
|
|
2482
2522
|
|
|
2483
|
-
const defaultConfiguration$
|
|
2523
|
+
const defaultConfiguration$1 = {
|
|
2484
2524
|
view: {
|
|
2485
2525
|
paddingTop: 20,
|
|
2486
2526
|
paddingX: 20,
|
|
@@ -2498,7 +2538,7 @@
|
|
|
2498
2538
|
};
|
|
2499
2539
|
class ContainerStepExtension {
|
|
2500
2540
|
static create(configuration) {
|
|
2501
|
-
return new ContainerStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$
|
|
2541
|
+
return new ContainerStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$1);
|
|
2502
2542
|
}
|
|
2503
2543
|
constructor(configuration) {
|
|
2504
2544
|
this.configuration = configuration;
|
|
@@ -2543,7 +2583,7 @@
|
|
|
2543
2583
|
}
|
|
2544
2584
|
}
|
|
2545
2585
|
|
|
2546
|
-
const defaultConfiguration
|
|
2586
|
+
const defaultConfiguration = {
|
|
2547
2587
|
view: {
|
|
2548
2588
|
paddingLeft: 12,
|
|
2549
2589
|
paddingRight: 12,
|
|
@@ -2558,7 +2598,7 @@
|
|
|
2558
2598
|
};
|
|
2559
2599
|
class TaskStepExtension {
|
|
2560
2600
|
static create(configuration) {
|
|
2561
|
-
return new TaskStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration
|
|
2601
|
+
return new TaskStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration);
|
|
2562
2602
|
}
|
|
2563
2603
|
constructor(configuration) {
|
|
2564
2604
|
this.configuration = configuration;
|
|
@@ -3381,7 +3421,7 @@
|
|
|
3381
3421
|
const workspaceController = new WorkspaceControllerWrapper();
|
|
3382
3422
|
const behaviorController = BehaviorController.create(configuration.shadowRoot);
|
|
3383
3423
|
const stepExtensionResolver = StepExtensionResolver.create(services);
|
|
3384
|
-
const placeholderController = PlaceholderController.create(configuration.placeholder);
|
|
3424
|
+
const placeholderController = PlaceholderController.create(state, configuration.placeholder);
|
|
3385
3425
|
const definitionWalker = (_c = configuration.definitionWalker) !== null && _c !== void 0 ? _c : new DefinitionWalker();
|
|
3386
3426
|
const i18n = (_d = configuration.i18n) !== null && _d !== void 0 ? _d : ((_, defaultValue) => defaultValue);
|
|
3387
3427
|
const uidGenerator = (_e = configuration.uidGenerator) !== null && _e !== void 0 ? _e : Uid.next;
|
|
@@ -4923,33 +4963,6 @@
|
|
|
4923
4963
|
}
|
|
4924
4964
|
}
|
|
4925
4965
|
|
|
4926
|
-
const defaultConfiguration = {
|
|
4927
|
-
gapWidth: 88,
|
|
4928
|
-
gapHeight: 24,
|
|
4929
|
-
radius: 6,
|
|
4930
|
-
iconSize: 16
|
|
4931
|
-
};
|
|
4932
|
-
class RectPlaceholderExtension {
|
|
4933
|
-
static create(configuration) {
|
|
4934
|
-
return new RectPlaceholderExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration);
|
|
4935
|
-
}
|
|
4936
|
-
constructor(configuration) {
|
|
4937
|
-
this.configuration = configuration;
|
|
4938
|
-
this.alongGapSize = new Vector(defaultConfiguration.gapWidth, defaultConfiguration.gapHeight);
|
|
4939
|
-
this.perpendicularGapSize = new Vector(defaultConfiguration.gapHeight, defaultConfiguration.gapWidth);
|
|
4940
|
-
}
|
|
4941
|
-
getGapSize(orientation) {
|
|
4942
|
-
return orientation === exports.PlaceholderGapOrientation.perpendicular ? this.perpendicularGapSize : this.alongGapSize;
|
|
4943
|
-
}
|
|
4944
|
-
createForGap(parent, parentSequence, index, orientation) {
|
|
4945
|
-
const gapSize = this.getGapSize(orientation);
|
|
4946
|
-
return RectPlaceholder.create(parent, gapSize, exports.PlaceholderDirection.gap, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
4947
|
-
}
|
|
4948
|
-
createForArea(parent, size, direction, parentSequence, index) {
|
|
4949
|
-
return RectPlaceholder.create(parent, size, direction, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
4950
|
-
}
|
|
4951
|
-
}
|
|
4952
|
-
|
|
4953
4966
|
class DefaultSequenceComponentExtension {
|
|
4954
4967
|
constructor() {
|
|
4955
4968
|
this.create = DefaultSequenceComponent.create;
|
|
@@ -5383,6 +5396,7 @@
|
|
|
5383
5396
|
exports.PathBarApi = PathBarApi;
|
|
5384
5397
|
exports.PlaceholderController = PlaceholderController;
|
|
5385
5398
|
exports.RectPlaceholder = RectPlaceholder;
|
|
5399
|
+
exports.RectPlaceholderDesignerExtension = RectPlaceholderDesignerExtension;
|
|
5386
5400
|
exports.RectPlaceholderView = RectPlaceholderView;
|
|
5387
5401
|
exports.SelectStepBehaviorEndToken = SelectStepBehaviorEndToken;
|
|
5388
5402
|
exports.ServicesResolver = ServicesResolver;
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -2101,14 +2101,18 @@ class StepExtensionResolver {
|
|
|
2101
2101
|
}
|
|
2102
2102
|
|
|
2103
2103
|
class PlaceholderController {
|
|
2104
|
-
static create(configuration) {
|
|
2105
|
-
return new PlaceholderController(configuration);
|
|
2104
|
+
static create(state, configuration) {
|
|
2105
|
+
return new PlaceholderController(state, configuration);
|
|
2106
2106
|
}
|
|
2107
|
-
constructor(configuration) {
|
|
2108
|
-
var _a, _b
|
|
2107
|
+
constructor(state, configuration) {
|
|
2108
|
+
var _a, _b;
|
|
2109
2109
|
this.configuration = configuration;
|
|
2110
|
-
|
|
2111
|
-
|
|
2110
|
+
const canCreate = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.canCreate;
|
|
2111
|
+
const canShow = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.canShow;
|
|
2112
|
+
this.canCreate = canCreate ? (sequence, index) => canCreate(sequence, index, state.definition) : () => true;
|
|
2113
|
+
this.canShow = canShow
|
|
2114
|
+
? (sequence, index, draggingStepComponentType, draggingStepType) => canShow(sequence, index, draggingStepComponentType, draggingStepType, state.definition)
|
|
2115
|
+
: () => true;
|
|
2112
2116
|
}
|
|
2113
2117
|
}
|
|
2114
2118
|
|
|
@@ -2286,6 +2290,42 @@ class LineGridDesignerExtension {
|
|
|
2286
2290
|
}
|
|
2287
2291
|
}
|
|
2288
2292
|
|
|
2293
|
+
const defaultConfiguration$2 = {
|
|
2294
|
+
gapWidth: 88,
|
|
2295
|
+
gapHeight: 24,
|
|
2296
|
+
radius: 6,
|
|
2297
|
+
iconSize: 16
|
|
2298
|
+
};
|
|
2299
|
+
class RectPlaceholderExtension {
|
|
2300
|
+
static create(configuration) {
|
|
2301
|
+
return new RectPlaceholderExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$2);
|
|
2302
|
+
}
|
|
2303
|
+
constructor(configuration) {
|
|
2304
|
+
this.configuration = configuration;
|
|
2305
|
+
this.alongGapSize = new Vector(defaultConfiguration$2.gapWidth, defaultConfiguration$2.gapHeight);
|
|
2306
|
+
this.perpendicularGapSize = new Vector(defaultConfiguration$2.gapHeight, defaultConfiguration$2.gapWidth);
|
|
2307
|
+
}
|
|
2308
|
+
getGapSize(orientation) {
|
|
2309
|
+
return orientation === exports.PlaceholderGapOrientation.perpendicular ? this.perpendicularGapSize : this.alongGapSize;
|
|
2310
|
+
}
|
|
2311
|
+
createForGap(parent, parentSequence, index, orientation) {
|
|
2312
|
+
const gapSize = this.getGapSize(orientation);
|
|
2313
|
+
return RectPlaceholder.create(parent, gapSize, exports.PlaceholderDirection.gap, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
2314
|
+
}
|
|
2315
|
+
createForArea(parent, size, direction, parentSequence, index) {
|
|
2316
|
+
return RectPlaceholder.create(parent, size, direction, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
class RectPlaceholderDesignerExtension {
|
|
2321
|
+
static create(configuration) {
|
|
2322
|
+
return new RectPlaceholderDesignerExtension(RectPlaceholderExtension.create(configuration));
|
|
2323
|
+
}
|
|
2324
|
+
constructor(placeholder) {
|
|
2325
|
+
this.placeholder = placeholder;
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2289
2329
|
class StartStopRootComponentDesignerExtension {
|
|
2290
2330
|
static create(configuration) {
|
|
2291
2331
|
return new StartStopRootComponentDesignerExtension(StartStopRootComponentExtension.create(configuration));
|
|
@@ -2295,7 +2335,7 @@ class StartStopRootComponentDesignerExtension {
|
|
|
2295
2335
|
}
|
|
2296
2336
|
}
|
|
2297
2337
|
|
|
2298
|
-
const defaultConfiguration$
|
|
2338
|
+
const defaultConfiguration$1 = {
|
|
2299
2339
|
view: {
|
|
2300
2340
|
paddingTop: 20,
|
|
2301
2341
|
paddingX: 20,
|
|
@@ -2313,7 +2353,7 @@ const defaultConfiguration$2 = {
|
|
|
2313
2353
|
};
|
|
2314
2354
|
class ContainerStepExtension {
|
|
2315
2355
|
static create(configuration) {
|
|
2316
|
-
return new ContainerStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$
|
|
2356
|
+
return new ContainerStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$1);
|
|
2317
2357
|
}
|
|
2318
2358
|
constructor(configuration) {
|
|
2319
2359
|
this.configuration = configuration;
|
|
@@ -2358,7 +2398,7 @@ class SwitchStepExtension {
|
|
|
2358
2398
|
}
|
|
2359
2399
|
}
|
|
2360
2400
|
|
|
2361
|
-
const defaultConfiguration
|
|
2401
|
+
const defaultConfiguration = {
|
|
2362
2402
|
view: {
|
|
2363
2403
|
paddingLeft: 12,
|
|
2364
2404
|
paddingRight: 12,
|
|
@@ -2373,7 +2413,7 @@ const defaultConfiguration$1 = {
|
|
|
2373
2413
|
};
|
|
2374
2414
|
class TaskStepExtension {
|
|
2375
2415
|
static create(configuration) {
|
|
2376
|
-
return new TaskStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration
|
|
2416
|
+
return new TaskStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration);
|
|
2377
2417
|
}
|
|
2378
2418
|
constructor(configuration) {
|
|
2379
2419
|
this.configuration = configuration;
|
|
@@ -3196,7 +3236,7 @@ class DesignerContext {
|
|
|
3196
3236
|
const workspaceController = new WorkspaceControllerWrapper();
|
|
3197
3237
|
const behaviorController = BehaviorController.create(configuration.shadowRoot);
|
|
3198
3238
|
const stepExtensionResolver = StepExtensionResolver.create(services);
|
|
3199
|
-
const placeholderController = PlaceholderController.create(configuration.placeholder);
|
|
3239
|
+
const placeholderController = PlaceholderController.create(state, configuration.placeholder);
|
|
3200
3240
|
const definitionWalker = (_c = configuration.definitionWalker) !== null && _c !== void 0 ? _c : new sequentialWorkflowModel.DefinitionWalker();
|
|
3201
3241
|
const i18n = (_d = configuration.i18n) !== null && _d !== void 0 ? _d : ((_, defaultValue) => defaultValue);
|
|
3202
3242
|
const uidGenerator = (_e = configuration.uidGenerator) !== null && _e !== void 0 ? _e : Uid.next;
|
|
@@ -4738,33 +4778,6 @@ class ToolboxExtension {
|
|
|
4738
4778
|
}
|
|
4739
4779
|
}
|
|
4740
4780
|
|
|
4741
|
-
const defaultConfiguration = {
|
|
4742
|
-
gapWidth: 88,
|
|
4743
|
-
gapHeight: 24,
|
|
4744
|
-
radius: 6,
|
|
4745
|
-
iconSize: 16
|
|
4746
|
-
};
|
|
4747
|
-
class RectPlaceholderExtension {
|
|
4748
|
-
static create(configuration) {
|
|
4749
|
-
return new RectPlaceholderExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration);
|
|
4750
|
-
}
|
|
4751
|
-
constructor(configuration) {
|
|
4752
|
-
this.configuration = configuration;
|
|
4753
|
-
this.alongGapSize = new Vector(defaultConfiguration.gapWidth, defaultConfiguration.gapHeight);
|
|
4754
|
-
this.perpendicularGapSize = new Vector(defaultConfiguration.gapHeight, defaultConfiguration.gapWidth);
|
|
4755
|
-
}
|
|
4756
|
-
getGapSize(orientation) {
|
|
4757
|
-
return orientation === exports.PlaceholderGapOrientation.perpendicular ? this.perpendicularGapSize : this.alongGapSize;
|
|
4758
|
-
}
|
|
4759
|
-
createForGap(parent, parentSequence, index, orientation) {
|
|
4760
|
-
const gapSize = this.getGapSize(orientation);
|
|
4761
|
-
return RectPlaceholder.create(parent, gapSize, exports.PlaceholderDirection.gap, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
4762
|
-
}
|
|
4763
|
-
createForArea(parent, size, direction, parentSequence, index) {
|
|
4764
|
-
return RectPlaceholder.create(parent, size, direction, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
4765
|
-
}
|
|
4766
|
-
}
|
|
4767
|
-
|
|
4768
4781
|
class DefaultSequenceComponentExtension {
|
|
4769
4782
|
constructor() {
|
|
4770
4783
|
this.create = DefaultSequenceComponent.create;
|
|
@@ -5197,6 +5210,7 @@ exports.OutputView = OutputView;
|
|
|
5197
5210
|
exports.PathBarApi = PathBarApi;
|
|
5198
5211
|
exports.PlaceholderController = PlaceholderController;
|
|
5199
5212
|
exports.RectPlaceholder = RectPlaceholder;
|
|
5213
|
+
exports.RectPlaceholderDesignerExtension = RectPlaceholderDesignerExtension;
|
|
5200
5214
|
exports.RectPlaceholderView = RectPlaceholderView;
|
|
5201
5215
|
exports.SelectStepBehaviorEndToken = SelectStepBehaviorEndToken;
|
|
5202
5216
|
exports.ServicesResolver = ServicesResolver;
|
package/lib/esm/index.js
CHANGED
|
@@ -2100,14 +2100,18 @@ class StepExtensionResolver {
|
|
|
2100
2100
|
}
|
|
2101
2101
|
|
|
2102
2102
|
class PlaceholderController {
|
|
2103
|
-
static create(configuration) {
|
|
2104
|
-
return new PlaceholderController(configuration);
|
|
2103
|
+
static create(state, configuration) {
|
|
2104
|
+
return new PlaceholderController(state, configuration);
|
|
2105
2105
|
}
|
|
2106
|
-
constructor(configuration) {
|
|
2107
|
-
var _a, _b
|
|
2106
|
+
constructor(state, configuration) {
|
|
2107
|
+
var _a, _b;
|
|
2108
2108
|
this.configuration = configuration;
|
|
2109
|
-
|
|
2110
|
-
|
|
2109
|
+
const canCreate = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.canCreate;
|
|
2110
|
+
const canShow = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.canShow;
|
|
2111
|
+
this.canCreate = canCreate ? (sequence, index) => canCreate(sequence, index, state.definition) : () => true;
|
|
2112
|
+
this.canShow = canShow
|
|
2113
|
+
? (sequence, index, draggingStepComponentType, draggingStepType) => canShow(sequence, index, draggingStepComponentType, draggingStepType, state.definition)
|
|
2114
|
+
: () => true;
|
|
2111
2115
|
}
|
|
2112
2116
|
}
|
|
2113
2117
|
|
|
@@ -2285,6 +2289,42 @@ class LineGridDesignerExtension {
|
|
|
2285
2289
|
}
|
|
2286
2290
|
}
|
|
2287
2291
|
|
|
2292
|
+
const defaultConfiguration$2 = {
|
|
2293
|
+
gapWidth: 88,
|
|
2294
|
+
gapHeight: 24,
|
|
2295
|
+
radius: 6,
|
|
2296
|
+
iconSize: 16
|
|
2297
|
+
};
|
|
2298
|
+
class RectPlaceholderExtension {
|
|
2299
|
+
static create(configuration) {
|
|
2300
|
+
return new RectPlaceholderExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$2);
|
|
2301
|
+
}
|
|
2302
|
+
constructor(configuration) {
|
|
2303
|
+
this.configuration = configuration;
|
|
2304
|
+
this.alongGapSize = new Vector(defaultConfiguration$2.gapWidth, defaultConfiguration$2.gapHeight);
|
|
2305
|
+
this.perpendicularGapSize = new Vector(defaultConfiguration$2.gapHeight, defaultConfiguration$2.gapWidth);
|
|
2306
|
+
}
|
|
2307
|
+
getGapSize(orientation) {
|
|
2308
|
+
return orientation === PlaceholderGapOrientation.perpendicular ? this.perpendicularGapSize : this.alongGapSize;
|
|
2309
|
+
}
|
|
2310
|
+
createForGap(parent, parentSequence, index, orientation) {
|
|
2311
|
+
const gapSize = this.getGapSize(orientation);
|
|
2312
|
+
return RectPlaceholder.create(parent, gapSize, PlaceholderDirection.gap, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
2313
|
+
}
|
|
2314
|
+
createForArea(parent, size, direction, parentSequence, index) {
|
|
2315
|
+
return RectPlaceholder.create(parent, size, direction, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
class RectPlaceholderDesignerExtension {
|
|
2320
|
+
static create(configuration) {
|
|
2321
|
+
return new RectPlaceholderDesignerExtension(RectPlaceholderExtension.create(configuration));
|
|
2322
|
+
}
|
|
2323
|
+
constructor(placeholder) {
|
|
2324
|
+
this.placeholder = placeholder;
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2288
2328
|
class StartStopRootComponentDesignerExtension {
|
|
2289
2329
|
static create(configuration) {
|
|
2290
2330
|
return new StartStopRootComponentDesignerExtension(StartStopRootComponentExtension.create(configuration));
|
|
@@ -2294,7 +2334,7 @@ class StartStopRootComponentDesignerExtension {
|
|
|
2294
2334
|
}
|
|
2295
2335
|
}
|
|
2296
2336
|
|
|
2297
|
-
const defaultConfiguration$
|
|
2337
|
+
const defaultConfiguration$1 = {
|
|
2298
2338
|
view: {
|
|
2299
2339
|
paddingTop: 20,
|
|
2300
2340
|
paddingX: 20,
|
|
@@ -2312,7 +2352,7 @@ const defaultConfiguration$2 = {
|
|
|
2312
2352
|
};
|
|
2313
2353
|
class ContainerStepExtension {
|
|
2314
2354
|
static create(configuration) {
|
|
2315
|
-
return new ContainerStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$
|
|
2355
|
+
return new ContainerStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$1);
|
|
2316
2356
|
}
|
|
2317
2357
|
constructor(configuration) {
|
|
2318
2358
|
this.configuration = configuration;
|
|
@@ -2357,7 +2397,7 @@ class SwitchStepExtension {
|
|
|
2357
2397
|
}
|
|
2358
2398
|
}
|
|
2359
2399
|
|
|
2360
|
-
const defaultConfiguration
|
|
2400
|
+
const defaultConfiguration = {
|
|
2361
2401
|
view: {
|
|
2362
2402
|
paddingLeft: 12,
|
|
2363
2403
|
paddingRight: 12,
|
|
@@ -2372,7 +2412,7 @@ const defaultConfiguration$1 = {
|
|
|
2372
2412
|
};
|
|
2373
2413
|
class TaskStepExtension {
|
|
2374
2414
|
static create(configuration) {
|
|
2375
|
-
return new TaskStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration
|
|
2415
|
+
return new TaskStepExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration);
|
|
2376
2416
|
}
|
|
2377
2417
|
constructor(configuration) {
|
|
2378
2418
|
this.configuration = configuration;
|
|
@@ -3195,7 +3235,7 @@ class DesignerContext {
|
|
|
3195
3235
|
const workspaceController = new WorkspaceControllerWrapper();
|
|
3196
3236
|
const behaviorController = BehaviorController.create(configuration.shadowRoot);
|
|
3197
3237
|
const stepExtensionResolver = StepExtensionResolver.create(services);
|
|
3198
|
-
const placeholderController = PlaceholderController.create(configuration.placeholder);
|
|
3238
|
+
const placeholderController = PlaceholderController.create(state, configuration.placeholder);
|
|
3199
3239
|
const definitionWalker = (_c = configuration.definitionWalker) !== null && _c !== void 0 ? _c : new DefinitionWalker();
|
|
3200
3240
|
const i18n = (_d = configuration.i18n) !== null && _d !== void 0 ? _d : ((_, defaultValue) => defaultValue);
|
|
3201
3241
|
const uidGenerator = (_e = configuration.uidGenerator) !== null && _e !== void 0 ? _e : Uid.next;
|
|
@@ -4737,33 +4777,6 @@ class ToolboxExtension {
|
|
|
4737
4777
|
}
|
|
4738
4778
|
}
|
|
4739
4779
|
|
|
4740
|
-
const defaultConfiguration = {
|
|
4741
|
-
gapWidth: 88,
|
|
4742
|
-
gapHeight: 24,
|
|
4743
|
-
radius: 6,
|
|
4744
|
-
iconSize: 16
|
|
4745
|
-
};
|
|
4746
|
-
class RectPlaceholderExtension {
|
|
4747
|
-
static create(configuration) {
|
|
4748
|
-
return new RectPlaceholderExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration);
|
|
4749
|
-
}
|
|
4750
|
-
constructor(configuration) {
|
|
4751
|
-
this.configuration = configuration;
|
|
4752
|
-
this.alongGapSize = new Vector(defaultConfiguration.gapWidth, defaultConfiguration.gapHeight);
|
|
4753
|
-
this.perpendicularGapSize = new Vector(defaultConfiguration.gapHeight, defaultConfiguration.gapWidth);
|
|
4754
|
-
}
|
|
4755
|
-
getGapSize(orientation) {
|
|
4756
|
-
return orientation === PlaceholderGapOrientation.perpendicular ? this.perpendicularGapSize : this.alongGapSize;
|
|
4757
|
-
}
|
|
4758
|
-
createForGap(parent, parentSequence, index, orientation) {
|
|
4759
|
-
const gapSize = this.getGapSize(orientation);
|
|
4760
|
-
return RectPlaceholder.create(parent, gapSize, PlaceholderDirection.gap, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
4761
|
-
}
|
|
4762
|
-
createForArea(parent, size, direction, parentSequence, index) {
|
|
4763
|
-
return RectPlaceholder.create(parent, size, direction, parentSequence, index, this.configuration.radius, this.configuration.iconSize);
|
|
4764
|
-
}
|
|
4765
|
-
}
|
|
4766
|
-
|
|
4767
4780
|
class DefaultSequenceComponentExtension {
|
|
4768
4781
|
constructor() {
|
|
4769
4782
|
this.create = DefaultSequenceComponent.create;
|
|
@@ -5165,4 +5178,4 @@ class Designer {
|
|
|
5165
5178
|
}
|
|
5166
5179
|
}
|
|
5167
5180
|
|
|
5168
|
-
export { Badges, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommandType, ComponentContext, ComponentDom, ControlBarApi, CustomActionController, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerDesignerExtension, DefaultViewportControllerExtension, DefinitionChangeType, Designer, DesignerApi, DesignerContext, DesignerState, Dom, Editor, EditorApi, Icons, InputView, JoinView, KeyboardAction, LabelView, LineGridDesignerExtension, ObjectCloner, OutputView, PathBarApi, PlaceholderController, PlaceholderDirection, PlaceholderGapOrientation, RectPlaceholder, RectPlaceholderView, SelectStepBehaviorEndToken, ServicesResolver, SimpleEvent, StartStopRootComponentDesignerExtension, StartStopRootComponentExtension, StepComponent, StepExtensionResolver, StepsDesignerExtension, TYPE, ToolboxApi, Uid, ValidationErrorBadgeExtension, Vector, ViewportApi, WorkspaceApi, createContainerStepComponentViewFactory, createLaunchPadStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
|
5181
|
+
export { Badges, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommandType, ComponentContext, ComponentDom, ControlBarApi, CustomActionController, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerDesignerExtension, DefaultViewportControllerExtension, DefinitionChangeType, Designer, DesignerApi, DesignerContext, DesignerState, Dom, Editor, EditorApi, Icons, InputView, JoinView, KeyboardAction, LabelView, LineGridDesignerExtension, ObjectCloner, OutputView, PathBarApi, PlaceholderController, PlaceholderDirection, PlaceholderGapOrientation, RectPlaceholder, RectPlaceholderDesignerExtension, RectPlaceholderView, SelectStepBehaviorEndToken, ServicesResolver, SimpleEvent, StartStopRootComponentDesignerExtension, StartStopRootComponentExtension, StepComponent, StepExtensionResolver, StepsDesignerExtension, TYPE, ToolboxApi, Uid, ValidationErrorBadgeExtension, Vector, ViewportApi, WorkspaceApi, createContainerStepComponentViewFactory, createLaunchPadStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
package/lib/index.d.ts
CHANGED
|
@@ -283,10 +283,10 @@ declare class StepComponentFactory {
|
|
|
283
283
|
|
|
284
284
|
declare class PlaceholderController {
|
|
285
285
|
private readonly configuration;
|
|
286
|
-
static create(configuration: PlaceholderConfiguration | undefined): PlaceholderController;
|
|
287
|
-
private constructor();
|
|
286
|
+
static create(state: DesignerState, configuration: PlaceholderConfiguration | undefined): PlaceholderController;
|
|
288
287
|
readonly canCreate: (sequence: Sequence, index: number) => boolean;
|
|
289
288
|
readonly canShow: (sequence: Sequence, index: number, draggingStepComponentType: string, draggingStepType: string) => boolean;
|
|
289
|
+
private constructor();
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
declare class ComponentContext {
|
|
@@ -1139,8 +1139,8 @@ interface StepsConfiguration {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
type StepIconUrlProvider = (componentType: ComponentType, type: string) => string | null;
|
|
1141
1141
|
interface PlaceholderConfiguration {
|
|
1142
|
-
canCreate?: (sequence: Sequence, index: number) => boolean;
|
|
1143
|
-
canShow?: (sequence: Sequence, index: number, draggingStepComponentType: ComponentType, draggingStepType: string) => boolean;
|
|
1142
|
+
canCreate?: (sequence: Sequence, index: number, definition: Definition) => boolean;
|
|
1143
|
+
canShow?: (sequence: Sequence, index: number, draggingStepComponentType: ComponentType, draggingStepType: string, definition: Definition) => boolean;
|
|
1144
1144
|
}
|
|
1145
1145
|
interface ValidatorConfiguration {
|
|
1146
1146
|
step?: StepValidator;
|
|
@@ -1258,6 +1258,12 @@ declare class LineGridDesignerExtension implements DesignerExtension {
|
|
|
1258
1258
|
private constructor();
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
|
+
declare class RectPlaceholderDesignerExtension implements DesignerExtension {
|
|
1262
|
+
readonly placeholder: PlaceholderExtension;
|
|
1263
|
+
static create(configuration?: RectPlaceholderConfiguration): RectPlaceholderDesignerExtension;
|
|
1264
|
+
private constructor();
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1261
1267
|
declare class StartStopRootComponentDesignerExtension implements DesignerExtension {
|
|
1262
1268
|
readonly rootComponent: RootComponentExtension;
|
|
1263
1269
|
static create(configuration: StartStopRootComponentExtensionConfiguration): DesignerExtension;
|
|
@@ -1422,5 +1428,5 @@ declare class Designer<TDefinition extends Definition = Definition> {
|
|
|
1422
1428
|
private getHistoryController;
|
|
1423
1429
|
}
|
|
1424
1430
|
|
|
1425
|
-
export { Badges, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommandType, ComponentContext, ComponentDom, ControlBarApi, CustomActionController, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerDesignerExtension, DefaultViewportControllerExtension, DefinitionChangeType, Designer, DesignerApi, DesignerContext, DesignerState, Dom, Editor, EditorApi, Icons, InputView, JoinView, KeyboardAction, LabelView, LineGridDesignerExtension, ObjectCloner, OutputView, PathBarApi, PlaceholderController, PlaceholderDirection, PlaceholderGapOrientation, RectPlaceholder, RectPlaceholderView, SelectStepBehaviorEndToken, ServicesResolver, SimpleEvent, StartStopRootComponentDesignerExtension, StartStopRootComponentExtension, StepComponent, StepExtensionResolver, StepsDesignerExtension, TYPE, ToolboxApi, Uid, ValidationErrorBadgeExtension, Vector, ViewportApi, WorkspaceApi, createContainerStepComponentViewFactory, createLaunchPadStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
|
1431
|
+
export { Badges, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommandType, ComponentContext, ComponentDom, ControlBarApi, CustomActionController, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerDesignerExtension, DefaultViewportControllerExtension, DefinitionChangeType, Designer, DesignerApi, DesignerContext, DesignerState, Dom, Editor, EditorApi, Icons, InputView, JoinView, KeyboardAction, LabelView, LineGridDesignerExtension, ObjectCloner, OutputView, PathBarApi, PlaceholderController, PlaceholderDirection, PlaceholderGapOrientation, RectPlaceholder, RectPlaceholderDesignerExtension, RectPlaceholderView, SelectStepBehaviorEndToken, ServicesResolver, SimpleEvent, StartStopRootComponentDesignerExtension, StartStopRootComponentExtension, StepComponent, StepExtensionResolver, StepsDesignerExtension, TYPE, ToolboxApi, Uid, ValidationErrorBadgeExtension, Vector, ViewportApi, WorkspaceApi, createContainerStepComponentViewFactory, createLaunchPadStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
|
1426
1432
|
export type { Attributes, Badge, BadgeExtension, BadgeView, BadgesDecorator, BadgesResult, BaseClickCommand, Behavior, BehaviorEndToken, BranchNamesResolver, ClickBehaviorWrapper, ClickBehaviorWrapperExtension, ClickCommand, ClickDetails, Component, ComponentView, ContainerStepComponentViewConfiguration, ContainerStepExtensionConfiguration, ContextMenuExtension, ContextMenuItem, ContextMenuItemsProvider, CustomAction, CustomActionHandler, CustomActionHandlerContext, Daemon, DaemonExtension, DefaultViewportControllerConfiguration, DefaultViewportControllerExtensionConfiguration, DefinitionChangedEvent, DesignerConfiguration, DesignerExtension, DraggedComponent, DraggedComponentExtension, EditorsConfiguration, FoundPlaceholders, Grid, GridExtension, I18n, KeyboardConfiguration, LaunchPadStepComponentViewConfiguration, LaunchPadStepExtensionConfiguration, LineGridConfiguration, NextScale, OpenFolderClickCommand, Placeholder, PlaceholderConfiguration, PlaceholderExtension, PlaceholderView, PreferenceStorage, RectPlaceholderConfiguration, RegionComponentViewContentFactory, RegionComponentViewExtension, RegionView, RegionViewFactory, RerenderStepClickCommand, RootComponentExtension, RootEditorContext, RootEditorProvider, RootValidator, SelectStepClickCommand, SelectedStepIdProvider, SequenceComponent, SequenceComponentExtension, SequenceContext, SequencePlaceIndicator, Services, SimpleEventListener, StartStopRootComponentExtensionConfiguration, StartStopRootComponentViewConfiguration, StateModifierDependency, StepBadgesDecoratorExtension, StepComponentView, StepComponentViewContext, StepComponentViewFactory, StepComponentViewWrapperExtension, StepContext, StepDefinition, StepDescriptionProvider, StepEditorContext, StepEditorProvider, StepExtension, StepIconUrlProvider, StepLabelProvider, StepValidator, StepsConfiguration, StepsDesignerExtensionConfiguration, SwitchStepComponentViewConfiguration, SwitchStepExtensionConfiguration, TaskStepComponentViewConfiguration, TaskStepExtensionConfiguration, ToolboxConfiguration, ToolboxGroupConfiguration, TriggerCustomActionClickCommand, UiComponent, UiComponentExtension, UidGenerator, UndoStack, UndoStackItem, ValidationErrorBadgeExtensionConfiguration, ValidationErrorBadgeViewConfiguration, ValidatorConfiguration, Viewport, ViewportController, ViewportControllerExtension, WheelController, WheelControllerExtension, WorkspaceRootSequence };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sequential-workflow-designer",
|
|
3
3
|
"description": "Customizable no-code component for building flow-based programming applications.",
|
|
4
|
-
"version": "0.30.
|
|
4
|
+
"version": "0.30.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|