sequential-workflow-designer 0.24.6 → 0.24.7
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 +120 -106
- package/lib/cjs/index.cjs +120 -106
- package/lib/esm/index.js +120 -107
- package/lib/index.d.ts +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -103,10 +103,10 @@ Add the below code to your head section in HTML document.
|
|
|
103
103
|
```html
|
|
104
104
|
<head>
|
|
105
105
|
...
|
|
106
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.
|
|
107
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.
|
|
108
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.
|
|
109
|
-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.
|
|
106
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.7/css/designer.css" rel="stylesheet">
|
|
107
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.7/css/designer-light.css" rel="stylesheet">
|
|
108
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.7/css/designer-dark.css" rel="stylesheet">
|
|
109
|
+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.24.7/dist/index.umd.js"></script>
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
Call the designer by:
|
package/dist/index.umd.js
CHANGED
|
@@ -1173,7 +1173,7 @@
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
|
-
const defaultConfiguration$
|
|
1176
|
+
const defaultConfiguration$6 = {
|
|
1177
1177
|
view: {
|
|
1178
1178
|
size: 22,
|
|
1179
1179
|
iconSize: 12
|
|
@@ -1181,7 +1181,7 @@
|
|
|
1181
1181
|
};
|
|
1182
1182
|
class ValidationErrorBadgeExtension {
|
|
1183
1183
|
static create(configuration) {
|
|
1184
|
-
return new ValidationErrorBadgeExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$
|
|
1184
|
+
return new ValidationErrorBadgeExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$6);
|
|
1185
1185
|
}
|
|
1186
1186
|
constructor(configuration) {
|
|
1187
1187
|
this.configuration = configuration;
|
|
@@ -1481,6 +1481,122 @@
|
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
|
|
1484
|
+
class StartStopRootComponentView {
|
|
1485
|
+
static create(parent, sequence, parentPlaceIndicator, context, cfg) {
|
|
1486
|
+
const g = Dom.svg('g', {
|
|
1487
|
+
class: 'sqd-root-start-stop'
|
|
1488
|
+
});
|
|
1489
|
+
parent.appendChild(g);
|
|
1490
|
+
const sequenceComponent = DefaultSequenceComponent.create(g, {
|
|
1491
|
+
sequence,
|
|
1492
|
+
depth: 0,
|
|
1493
|
+
isInputConnected: true,
|
|
1494
|
+
isOutputConnected: true,
|
|
1495
|
+
isPreview: false
|
|
1496
|
+
}, context);
|
|
1497
|
+
const view = sequenceComponent.view;
|
|
1498
|
+
const x = view.joinX - cfg.size / 2;
|
|
1499
|
+
const endY = cfg.size + view.height;
|
|
1500
|
+
const iconSize = parentPlaceIndicator ? cfg.folderIconSize : cfg.defaultIconSize;
|
|
1501
|
+
const startCircle = createCircle(parentPlaceIndicator ? cfg.folderIconD : cfg.startIconD, cfg.size, iconSize);
|
|
1502
|
+
Dom.translate(startCircle, x, 0);
|
|
1503
|
+
g.appendChild(startCircle);
|
|
1504
|
+
Dom.translate(view.g, 0, cfg.size);
|
|
1505
|
+
const endCircle = createCircle(parentPlaceIndicator ? cfg.folderIconD : cfg.stopIconD, cfg.size, iconSize);
|
|
1506
|
+
Dom.translate(endCircle, x, endY);
|
|
1507
|
+
g.appendChild(endCircle);
|
|
1508
|
+
let startPlaceholder = null;
|
|
1509
|
+
let endPlaceholder = null;
|
|
1510
|
+
if (parentPlaceIndicator) {
|
|
1511
|
+
const size = new Vector(cfg.size, cfg.size);
|
|
1512
|
+
startPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
1513
|
+
endPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
1514
|
+
Dom.translate(startPlaceholder.view.g, x, 0);
|
|
1515
|
+
Dom.translate(endPlaceholder.view.g, x, endY);
|
|
1516
|
+
}
|
|
1517
|
+
const badges = Badges.createForRoot(g, new Vector(x + cfg.size, 0), context);
|
|
1518
|
+
return new StartStopRootComponentView(g, view.width, view.height + cfg.size * 2, view.joinX, sequenceComponent, startPlaceholder, endPlaceholder, badges);
|
|
1519
|
+
}
|
|
1520
|
+
constructor(g, width, height, joinX, component, startPlaceholder, endPlaceholder, badges) {
|
|
1521
|
+
this.g = g;
|
|
1522
|
+
this.width = width;
|
|
1523
|
+
this.height = height;
|
|
1524
|
+
this.joinX = joinX;
|
|
1525
|
+
this.component = component;
|
|
1526
|
+
this.startPlaceholder = startPlaceholder;
|
|
1527
|
+
this.endPlaceholder = endPlaceholder;
|
|
1528
|
+
this.badges = badges;
|
|
1529
|
+
}
|
|
1530
|
+
destroy() {
|
|
1531
|
+
var _a;
|
|
1532
|
+
(_a = this.g.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.g);
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
function createCircle(d, size, iconSize) {
|
|
1536
|
+
const r = size / 2;
|
|
1537
|
+
const circle = Dom.svg('circle', {
|
|
1538
|
+
class: 'sqd-root-start-stop-circle',
|
|
1539
|
+
cx: r,
|
|
1540
|
+
cy: r,
|
|
1541
|
+
r: r
|
|
1542
|
+
});
|
|
1543
|
+
const g = Dom.svg('g');
|
|
1544
|
+
g.appendChild(circle);
|
|
1545
|
+
const offset = (size - iconSize) / 2;
|
|
1546
|
+
const icon = Icons.appendPath(g, 'sqd-root-start-stop-icon', d, iconSize);
|
|
1547
|
+
Dom.translate(icon, offset, offset);
|
|
1548
|
+
return g;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
class StartStopRootComponent {
|
|
1552
|
+
static create(parentElement, sequence, parentPlaceIndicator, context, viewConfiguration) {
|
|
1553
|
+
const view = StartStopRootComponentView.create(parentElement, sequence, parentPlaceIndicator, context, viewConfiguration);
|
|
1554
|
+
return new StartStopRootComponent(view);
|
|
1555
|
+
}
|
|
1556
|
+
constructor(view) {
|
|
1557
|
+
this.view = view;
|
|
1558
|
+
}
|
|
1559
|
+
resolveClick(click) {
|
|
1560
|
+
return this.view.component.resolveClick(click);
|
|
1561
|
+
}
|
|
1562
|
+
findById(stepId) {
|
|
1563
|
+
return this.view.component.findById(stepId);
|
|
1564
|
+
}
|
|
1565
|
+
resolvePlaceholders(skipComponent, result) {
|
|
1566
|
+
this.view.component.resolvePlaceholders(skipComponent, result);
|
|
1567
|
+
if (this.view.startPlaceholder && this.view.endPlaceholder) {
|
|
1568
|
+
result.placeholders.push(this.view.startPlaceholder);
|
|
1569
|
+
result.placeholders.push(this.view.endPlaceholder);
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
updateBadges(result) {
|
|
1573
|
+
this.view.badges.update(result);
|
|
1574
|
+
this.view.component.updateBadges(result);
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
const defaultConfiguration$5 = {
|
|
1579
|
+
view: {
|
|
1580
|
+
size: 30,
|
|
1581
|
+
defaultIconSize: 22,
|
|
1582
|
+
folderIconSize: 18,
|
|
1583
|
+
startIconD: Icons.play,
|
|
1584
|
+
stopIconD: Icons.stop,
|
|
1585
|
+
folderIconD: Icons.folder
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
class StartStopRootComponentExtension {
|
|
1589
|
+
static create(configuration) {
|
|
1590
|
+
return new StartStopRootComponentExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$5);
|
|
1591
|
+
}
|
|
1592
|
+
constructor(configuration) {
|
|
1593
|
+
this.configuration = configuration;
|
|
1594
|
+
}
|
|
1595
|
+
create(parentElement, sequence, parentPlaceIndicator, context) {
|
|
1596
|
+
return StartStopRootComponent.create(parentElement, sequence, parentPlaceIndicator, context, this.configuration.view);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1484
1600
|
const COMPONENT_CLASS_NAME$2 = 'container';
|
|
1485
1601
|
const createContainerStepComponentViewFactory = (cfg) => (parentElement, stepContext, viewContext) => {
|
|
1486
1602
|
return viewContext.createRegionComponentView(parentElement, COMPONENT_CLASS_NAME$2, (g, regionViewBuilder) => {
|
|
@@ -4259,109 +4375,6 @@
|
|
|
4259
4375
|
}
|
|
4260
4376
|
}
|
|
4261
4377
|
|
|
4262
|
-
const SIZE = 30;
|
|
4263
|
-
const DEFAULT_ICON_SIZE = 22;
|
|
4264
|
-
const FOLDER_ICON_SIZE = 18;
|
|
4265
|
-
class StartStopRootComponentView {
|
|
4266
|
-
static create(parent, sequence, parentPlaceIndicator, context) {
|
|
4267
|
-
const g = Dom.svg('g', {
|
|
4268
|
-
class: 'sqd-root-start-stop'
|
|
4269
|
-
});
|
|
4270
|
-
parent.appendChild(g);
|
|
4271
|
-
const sequenceComponent = DefaultSequenceComponent.create(g, {
|
|
4272
|
-
sequence,
|
|
4273
|
-
depth: 0,
|
|
4274
|
-
isInputConnected: true,
|
|
4275
|
-
isOutputConnected: true,
|
|
4276
|
-
isPreview: false
|
|
4277
|
-
}, context);
|
|
4278
|
-
const view = sequenceComponent.view;
|
|
4279
|
-
const x = view.joinX - SIZE / 2;
|
|
4280
|
-
const endY = SIZE + view.height;
|
|
4281
|
-
const iconSize = parentPlaceIndicator ? FOLDER_ICON_SIZE : DEFAULT_ICON_SIZE;
|
|
4282
|
-
const startCircle = createCircle(parentPlaceIndicator ? Icons.folder : Icons.play, iconSize);
|
|
4283
|
-
Dom.translate(startCircle, x, 0);
|
|
4284
|
-
g.appendChild(startCircle);
|
|
4285
|
-
Dom.translate(view.g, 0, SIZE);
|
|
4286
|
-
const endCircle = createCircle(parentPlaceIndicator ? Icons.folder : Icons.stop, iconSize);
|
|
4287
|
-
Dom.translate(endCircle, x, endY);
|
|
4288
|
-
g.appendChild(endCircle);
|
|
4289
|
-
let startPlaceholder = null;
|
|
4290
|
-
let endPlaceholder = null;
|
|
4291
|
-
if (parentPlaceIndicator) {
|
|
4292
|
-
const size = new Vector(SIZE, SIZE);
|
|
4293
|
-
startPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
4294
|
-
endPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
4295
|
-
Dom.translate(startPlaceholder.view.g, x, 0);
|
|
4296
|
-
Dom.translate(endPlaceholder.view.g, x, endY);
|
|
4297
|
-
}
|
|
4298
|
-
const badges = Badges.createForRoot(g, new Vector(x + SIZE, 0), context);
|
|
4299
|
-
return new StartStopRootComponentView(g, view.width, view.height + SIZE * 2, view.joinX, sequenceComponent, startPlaceholder, endPlaceholder, badges);
|
|
4300
|
-
}
|
|
4301
|
-
constructor(g, width, height, joinX, component, startPlaceholder, endPlaceholder, badges) {
|
|
4302
|
-
this.g = g;
|
|
4303
|
-
this.width = width;
|
|
4304
|
-
this.height = height;
|
|
4305
|
-
this.joinX = joinX;
|
|
4306
|
-
this.component = component;
|
|
4307
|
-
this.startPlaceholder = startPlaceholder;
|
|
4308
|
-
this.endPlaceholder = endPlaceholder;
|
|
4309
|
-
this.badges = badges;
|
|
4310
|
-
}
|
|
4311
|
-
destroy() {
|
|
4312
|
-
var _a;
|
|
4313
|
-
(_a = this.g.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.g);
|
|
4314
|
-
}
|
|
4315
|
-
}
|
|
4316
|
-
function createCircle(d, iconSize) {
|
|
4317
|
-
const r = SIZE / 2;
|
|
4318
|
-
const circle = Dom.svg('circle', {
|
|
4319
|
-
class: 'sqd-root-start-stop-circle',
|
|
4320
|
-
cx: r,
|
|
4321
|
-
cy: r,
|
|
4322
|
-
r: r
|
|
4323
|
-
});
|
|
4324
|
-
const g = Dom.svg('g');
|
|
4325
|
-
g.appendChild(circle);
|
|
4326
|
-
const offset = (SIZE - iconSize) / 2;
|
|
4327
|
-
const icon = Icons.appendPath(g, 'sqd-root-start-stop-icon', d, iconSize);
|
|
4328
|
-
Dom.translate(icon, offset, offset);
|
|
4329
|
-
return g;
|
|
4330
|
-
}
|
|
4331
|
-
|
|
4332
|
-
class StartStopRootComponent {
|
|
4333
|
-
static create(parentElement, sequence, parentPlaceIndicator, context) {
|
|
4334
|
-
const view = StartStopRootComponentView.create(parentElement, sequence, parentPlaceIndicator, context);
|
|
4335
|
-
return new StartStopRootComponent(view);
|
|
4336
|
-
}
|
|
4337
|
-
constructor(view) {
|
|
4338
|
-
this.view = view;
|
|
4339
|
-
}
|
|
4340
|
-
resolveClick(click) {
|
|
4341
|
-
return this.view.component.resolveClick(click);
|
|
4342
|
-
}
|
|
4343
|
-
findById(stepId) {
|
|
4344
|
-
return this.view.component.findById(stepId);
|
|
4345
|
-
}
|
|
4346
|
-
resolvePlaceholders(skipComponent, result) {
|
|
4347
|
-
this.view.component.resolvePlaceholders(skipComponent, result);
|
|
4348
|
-
if (this.view.startPlaceholder && this.view.endPlaceholder) {
|
|
4349
|
-
result.placeholders.push(this.view.startPlaceholder);
|
|
4350
|
-
result.placeholders.push(this.view.endPlaceholder);
|
|
4351
|
-
}
|
|
4352
|
-
}
|
|
4353
|
-
updateBadges(result) {
|
|
4354
|
-
this.view.badges.update(result);
|
|
4355
|
-
this.view.component.updateBadges(result);
|
|
4356
|
-
}
|
|
4357
|
-
}
|
|
4358
|
-
|
|
4359
|
-
class StartStopRootComponentExtension {
|
|
4360
|
-
constructor() {
|
|
4361
|
-
this.create = StartStopRootComponent.create;
|
|
4362
|
-
}
|
|
4363
|
-
}
|
|
4364
|
-
|
|
4365
4378
|
const defaultConfiguration$2 = {
|
|
4366
4379
|
view: {
|
|
4367
4380
|
minContainerWidth: 40,
|
|
@@ -4574,7 +4587,7 @@
|
|
|
4574
4587
|
services.grid = LineGridExtension.create();
|
|
4575
4588
|
}
|
|
4576
4589
|
if (!services.rootComponent) {
|
|
4577
|
-
services.rootComponent =
|
|
4590
|
+
services.rootComponent = StartStopRootComponentExtension.create();
|
|
4578
4591
|
}
|
|
4579
4592
|
if (!services.sequenceComponent) {
|
|
4580
4593
|
services.sequenceComponent = new DefaultSequenceComponentExtension();
|
|
@@ -4893,6 +4906,7 @@
|
|
|
4893
4906
|
exports.RectPlaceholderView = RectPlaceholderView;
|
|
4894
4907
|
exports.ServicesResolver = ServicesResolver;
|
|
4895
4908
|
exports.SimpleEvent = SimpleEvent;
|
|
4909
|
+
exports.StartStopRootComponentExtension = StartStopRootComponentExtension;
|
|
4896
4910
|
exports.StepComponent = StepComponent;
|
|
4897
4911
|
exports.StepExtensionResolver = StepExtensionResolver;
|
|
4898
4912
|
exports.StepsDesignerExtension = StepsDesignerExtension;
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -1171,7 +1171,7 @@ class ValidationErrorBadge {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
1174
|
-
const defaultConfiguration$
|
|
1174
|
+
const defaultConfiguration$6 = {
|
|
1175
1175
|
view: {
|
|
1176
1176
|
size: 22,
|
|
1177
1177
|
iconSize: 12
|
|
@@ -1179,7 +1179,7 @@ const defaultConfiguration$5 = {
|
|
|
1179
1179
|
};
|
|
1180
1180
|
class ValidationErrorBadgeExtension {
|
|
1181
1181
|
static create(configuration) {
|
|
1182
|
-
return new ValidationErrorBadgeExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$
|
|
1182
|
+
return new ValidationErrorBadgeExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$6);
|
|
1183
1183
|
}
|
|
1184
1184
|
constructor(configuration) {
|
|
1185
1185
|
this.configuration = configuration;
|
|
@@ -1479,6 +1479,122 @@ class DefaultSequenceComponent {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
}
|
|
1481
1481
|
|
|
1482
|
+
class StartStopRootComponentView {
|
|
1483
|
+
static create(parent, sequence, parentPlaceIndicator, context, cfg) {
|
|
1484
|
+
const g = Dom.svg('g', {
|
|
1485
|
+
class: 'sqd-root-start-stop'
|
|
1486
|
+
});
|
|
1487
|
+
parent.appendChild(g);
|
|
1488
|
+
const sequenceComponent = DefaultSequenceComponent.create(g, {
|
|
1489
|
+
sequence,
|
|
1490
|
+
depth: 0,
|
|
1491
|
+
isInputConnected: true,
|
|
1492
|
+
isOutputConnected: true,
|
|
1493
|
+
isPreview: false
|
|
1494
|
+
}, context);
|
|
1495
|
+
const view = sequenceComponent.view;
|
|
1496
|
+
const x = view.joinX - cfg.size / 2;
|
|
1497
|
+
const endY = cfg.size + view.height;
|
|
1498
|
+
const iconSize = parentPlaceIndicator ? cfg.folderIconSize : cfg.defaultIconSize;
|
|
1499
|
+
const startCircle = createCircle(parentPlaceIndicator ? cfg.folderIconD : cfg.startIconD, cfg.size, iconSize);
|
|
1500
|
+
Dom.translate(startCircle, x, 0);
|
|
1501
|
+
g.appendChild(startCircle);
|
|
1502
|
+
Dom.translate(view.g, 0, cfg.size);
|
|
1503
|
+
const endCircle = createCircle(parentPlaceIndicator ? cfg.folderIconD : cfg.stopIconD, cfg.size, iconSize);
|
|
1504
|
+
Dom.translate(endCircle, x, endY);
|
|
1505
|
+
g.appendChild(endCircle);
|
|
1506
|
+
let startPlaceholder = null;
|
|
1507
|
+
let endPlaceholder = null;
|
|
1508
|
+
if (parentPlaceIndicator) {
|
|
1509
|
+
const size = new Vector(cfg.size, cfg.size);
|
|
1510
|
+
startPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
1511
|
+
endPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
1512
|
+
Dom.translate(startPlaceholder.view.g, x, 0);
|
|
1513
|
+
Dom.translate(endPlaceholder.view.g, x, endY);
|
|
1514
|
+
}
|
|
1515
|
+
const badges = Badges.createForRoot(g, new Vector(x + cfg.size, 0), context);
|
|
1516
|
+
return new StartStopRootComponentView(g, view.width, view.height + cfg.size * 2, view.joinX, sequenceComponent, startPlaceholder, endPlaceholder, badges);
|
|
1517
|
+
}
|
|
1518
|
+
constructor(g, width, height, joinX, component, startPlaceholder, endPlaceholder, badges) {
|
|
1519
|
+
this.g = g;
|
|
1520
|
+
this.width = width;
|
|
1521
|
+
this.height = height;
|
|
1522
|
+
this.joinX = joinX;
|
|
1523
|
+
this.component = component;
|
|
1524
|
+
this.startPlaceholder = startPlaceholder;
|
|
1525
|
+
this.endPlaceholder = endPlaceholder;
|
|
1526
|
+
this.badges = badges;
|
|
1527
|
+
}
|
|
1528
|
+
destroy() {
|
|
1529
|
+
var _a;
|
|
1530
|
+
(_a = this.g.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.g);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
function createCircle(d, size, iconSize) {
|
|
1534
|
+
const r = size / 2;
|
|
1535
|
+
const circle = Dom.svg('circle', {
|
|
1536
|
+
class: 'sqd-root-start-stop-circle',
|
|
1537
|
+
cx: r,
|
|
1538
|
+
cy: r,
|
|
1539
|
+
r: r
|
|
1540
|
+
});
|
|
1541
|
+
const g = Dom.svg('g');
|
|
1542
|
+
g.appendChild(circle);
|
|
1543
|
+
const offset = (size - iconSize) / 2;
|
|
1544
|
+
const icon = Icons.appendPath(g, 'sqd-root-start-stop-icon', d, iconSize);
|
|
1545
|
+
Dom.translate(icon, offset, offset);
|
|
1546
|
+
return g;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
class StartStopRootComponent {
|
|
1550
|
+
static create(parentElement, sequence, parentPlaceIndicator, context, viewConfiguration) {
|
|
1551
|
+
const view = StartStopRootComponentView.create(parentElement, sequence, parentPlaceIndicator, context, viewConfiguration);
|
|
1552
|
+
return new StartStopRootComponent(view);
|
|
1553
|
+
}
|
|
1554
|
+
constructor(view) {
|
|
1555
|
+
this.view = view;
|
|
1556
|
+
}
|
|
1557
|
+
resolveClick(click) {
|
|
1558
|
+
return this.view.component.resolveClick(click);
|
|
1559
|
+
}
|
|
1560
|
+
findById(stepId) {
|
|
1561
|
+
return this.view.component.findById(stepId);
|
|
1562
|
+
}
|
|
1563
|
+
resolvePlaceholders(skipComponent, result) {
|
|
1564
|
+
this.view.component.resolvePlaceholders(skipComponent, result);
|
|
1565
|
+
if (this.view.startPlaceholder && this.view.endPlaceholder) {
|
|
1566
|
+
result.placeholders.push(this.view.startPlaceholder);
|
|
1567
|
+
result.placeholders.push(this.view.endPlaceholder);
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
updateBadges(result) {
|
|
1571
|
+
this.view.badges.update(result);
|
|
1572
|
+
this.view.component.updateBadges(result);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
const defaultConfiguration$5 = {
|
|
1577
|
+
view: {
|
|
1578
|
+
size: 30,
|
|
1579
|
+
defaultIconSize: 22,
|
|
1580
|
+
folderIconSize: 18,
|
|
1581
|
+
startIconD: Icons.play,
|
|
1582
|
+
stopIconD: Icons.stop,
|
|
1583
|
+
folderIconD: Icons.folder
|
|
1584
|
+
}
|
|
1585
|
+
};
|
|
1586
|
+
class StartStopRootComponentExtension {
|
|
1587
|
+
static create(configuration) {
|
|
1588
|
+
return new StartStopRootComponentExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$5);
|
|
1589
|
+
}
|
|
1590
|
+
constructor(configuration) {
|
|
1591
|
+
this.configuration = configuration;
|
|
1592
|
+
}
|
|
1593
|
+
create(parentElement, sequence, parentPlaceIndicator, context) {
|
|
1594
|
+
return StartStopRootComponent.create(parentElement, sequence, parentPlaceIndicator, context, this.configuration.view);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1482
1598
|
const COMPONENT_CLASS_NAME$2 = 'container';
|
|
1483
1599
|
const createContainerStepComponentViewFactory = (cfg) => (parentElement, stepContext, viewContext) => {
|
|
1484
1600
|
return viewContext.createRegionComponentView(parentElement, COMPONENT_CLASS_NAME$2, (g, regionViewBuilder) => {
|
|
@@ -4074,109 +4190,6 @@ class RectPlaceholderExtension {
|
|
|
4074
4190
|
}
|
|
4075
4191
|
}
|
|
4076
4192
|
|
|
4077
|
-
const SIZE = 30;
|
|
4078
|
-
const DEFAULT_ICON_SIZE = 22;
|
|
4079
|
-
const FOLDER_ICON_SIZE = 18;
|
|
4080
|
-
class StartStopRootComponentView {
|
|
4081
|
-
static create(parent, sequence, parentPlaceIndicator, context) {
|
|
4082
|
-
const g = Dom.svg('g', {
|
|
4083
|
-
class: 'sqd-root-start-stop'
|
|
4084
|
-
});
|
|
4085
|
-
parent.appendChild(g);
|
|
4086
|
-
const sequenceComponent = DefaultSequenceComponent.create(g, {
|
|
4087
|
-
sequence,
|
|
4088
|
-
depth: 0,
|
|
4089
|
-
isInputConnected: true,
|
|
4090
|
-
isOutputConnected: true,
|
|
4091
|
-
isPreview: false
|
|
4092
|
-
}, context);
|
|
4093
|
-
const view = sequenceComponent.view;
|
|
4094
|
-
const x = view.joinX - SIZE / 2;
|
|
4095
|
-
const endY = SIZE + view.height;
|
|
4096
|
-
const iconSize = parentPlaceIndicator ? FOLDER_ICON_SIZE : DEFAULT_ICON_SIZE;
|
|
4097
|
-
const startCircle = createCircle(parentPlaceIndicator ? Icons.folder : Icons.play, iconSize);
|
|
4098
|
-
Dom.translate(startCircle, x, 0);
|
|
4099
|
-
g.appendChild(startCircle);
|
|
4100
|
-
Dom.translate(view.g, 0, SIZE);
|
|
4101
|
-
const endCircle = createCircle(parentPlaceIndicator ? Icons.folder : Icons.stop, iconSize);
|
|
4102
|
-
Dom.translate(endCircle, x, endY);
|
|
4103
|
-
g.appendChild(endCircle);
|
|
4104
|
-
let startPlaceholder = null;
|
|
4105
|
-
let endPlaceholder = null;
|
|
4106
|
-
if (parentPlaceIndicator) {
|
|
4107
|
-
const size = new Vector(SIZE, SIZE);
|
|
4108
|
-
startPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
4109
|
-
endPlaceholder = context.services.placeholder.createForArea(g, size, exports.PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
4110
|
-
Dom.translate(startPlaceholder.view.g, x, 0);
|
|
4111
|
-
Dom.translate(endPlaceholder.view.g, x, endY);
|
|
4112
|
-
}
|
|
4113
|
-
const badges = Badges.createForRoot(g, new Vector(x + SIZE, 0), context);
|
|
4114
|
-
return new StartStopRootComponentView(g, view.width, view.height + SIZE * 2, view.joinX, sequenceComponent, startPlaceholder, endPlaceholder, badges);
|
|
4115
|
-
}
|
|
4116
|
-
constructor(g, width, height, joinX, component, startPlaceholder, endPlaceholder, badges) {
|
|
4117
|
-
this.g = g;
|
|
4118
|
-
this.width = width;
|
|
4119
|
-
this.height = height;
|
|
4120
|
-
this.joinX = joinX;
|
|
4121
|
-
this.component = component;
|
|
4122
|
-
this.startPlaceholder = startPlaceholder;
|
|
4123
|
-
this.endPlaceholder = endPlaceholder;
|
|
4124
|
-
this.badges = badges;
|
|
4125
|
-
}
|
|
4126
|
-
destroy() {
|
|
4127
|
-
var _a;
|
|
4128
|
-
(_a = this.g.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.g);
|
|
4129
|
-
}
|
|
4130
|
-
}
|
|
4131
|
-
function createCircle(d, iconSize) {
|
|
4132
|
-
const r = SIZE / 2;
|
|
4133
|
-
const circle = Dom.svg('circle', {
|
|
4134
|
-
class: 'sqd-root-start-stop-circle',
|
|
4135
|
-
cx: r,
|
|
4136
|
-
cy: r,
|
|
4137
|
-
r: r
|
|
4138
|
-
});
|
|
4139
|
-
const g = Dom.svg('g');
|
|
4140
|
-
g.appendChild(circle);
|
|
4141
|
-
const offset = (SIZE - iconSize) / 2;
|
|
4142
|
-
const icon = Icons.appendPath(g, 'sqd-root-start-stop-icon', d, iconSize);
|
|
4143
|
-
Dom.translate(icon, offset, offset);
|
|
4144
|
-
return g;
|
|
4145
|
-
}
|
|
4146
|
-
|
|
4147
|
-
class StartStopRootComponent {
|
|
4148
|
-
static create(parentElement, sequence, parentPlaceIndicator, context) {
|
|
4149
|
-
const view = StartStopRootComponentView.create(parentElement, sequence, parentPlaceIndicator, context);
|
|
4150
|
-
return new StartStopRootComponent(view);
|
|
4151
|
-
}
|
|
4152
|
-
constructor(view) {
|
|
4153
|
-
this.view = view;
|
|
4154
|
-
}
|
|
4155
|
-
resolveClick(click) {
|
|
4156
|
-
return this.view.component.resolveClick(click);
|
|
4157
|
-
}
|
|
4158
|
-
findById(stepId) {
|
|
4159
|
-
return this.view.component.findById(stepId);
|
|
4160
|
-
}
|
|
4161
|
-
resolvePlaceholders(skipComponent, result) {
|
|
4162
|
-
this.view.component.resolvePlaceholders(skipComponent, result);
|
|
4163
|
-
if (this.view.startPlaceholder && this.view.endPlaceholder) {
|
|
4164
|
-
result.placeholders.push(this.view.startPlaceholder);
|
|
4165
|
-
result.placeholders.push(this.view.endPlaceholder);
|
|
4166
|
-
}
|
|
4167
|
-
}
|
|
4168
|
-
updateBadges(result) {
|
|
4169
|
-
this.view.badges.update(result);
|
|
4170
|
-
this.view.component.updateBadges(result);
|
|
4171
|
-
}
|
|
4172
|
-
}
|
|
4173
|
-
|
|
4174
|
-
class StartStopRootComponentExtension {
|
|
4175
|
-
constructor() {
|
|
4176
|
-
this.create = StartStopRootComponent.create;
|
|
4177
|
-
}
|
|
4178
|
-
}
|
|
4179
|
-
|
|
4180
4193
|
const defaultConfiguration$2 = {
|
|
4181
4194
|
view: {
|
|
4182
4195
|
minContainerWidth: 40,
|
|
@@ -4389,7 +4402,7 @@ function setDefaults(services, configuration) {
|
|
|
4389
4402
|
services.grid = LineGridExtension.create();
|
|
4390
4403
|
}
|
|
4391
4404
|
if (!services.rootComponent) {
|
|
4392
|
-
services.rootComponent =
|
|
4405
|
+
services.rootComponent = StartStopRootComponentExtension.create();
|
|
4393
4406
|
}
|
|
4394
4407
|
if (!services.sequenceComponent) {
|
|
4395
4408
|
services.sequenceComponent = new DefaultSequenceComponentExtension();
|
|
@@ -4707,6 +4720,7 @@ exports.RectPlaceholder = RectPlaceholder;
|
|
|
4707
4720
|
exports.RectPlaceholderView = RectPlaceholderView;
|
|
4708
4721
|
exports.ServicesResolver = ServicesResolver;
|
|
4709
4722
|
exports.SimpleEvent = SimpleEvent;
|
|
4723
|
+
exports.StartStopRootComponentExtension = StartStopRootComponentExtension;
|
|
4710
4724
|
exports.StepComponent = StepComponent;
|
|
4711
4725
|
exports.StepExtensionResolver = StepExtensionResolver;
|
|
4712
4726
|
exports.StepsDesignerExtension = StepsDesignerExtension;
|
package/lib/esm/index.js
CHANGED
|
@@ -1170,7 +1170,7 @@ class ValidationErrorBadge {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
|
-
const defaultConfiguration$
|
|
1173
|
+
const defaultConfiguration$6 = {
|
|
1174
1174
|
view: {
|
|
1175
1175
|
size: 22,
|
|
1176
1176
|
iconSize: 12
|
|
@@ -1178,7 +1178,7 @@ const defaultConfiguration$5 = {
|
|
|
1178
1178
|
};
|
|
1179
1179
|
class ValidationErrorBadgeExtension {
|
|
1180
1180
|
static create(configuration) {
|
|
1181
|
-
return new ValidationErrorBadgeExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$
|
|
1181
|
+
return new ValidationErrorBadgeExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$6);
|
|
1182
1182
|
}
|
|
1183
1183
|
constructor(configuration) {
|
|
1184
1184
|
this.configuration = configuration;
|
|
@@ -1478,6 +1478,122 @@ class DefaultSequenceComponent {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
|
|
1481
|
+
class StartStopRootComponentView {
|
|
1482
|
+
static create(parent, sequence, parentPlaceIndicator, context, cfg) {
|
|
1483
|
+
const g = Dom.svg('g', {
|
|
1484
|
+
class: 'sqd-root-start-stop'
|
|
1485
|
+
});
|
|
1486
|
+
parent.appendChild(g);
|
|
1487
|
+
const sequenceComponent = DefaultSequenceComponent.create(g, {
|
|
1488
|
+
sequence,
|
|
1489
|
+
depth: 0,
|
|
1490
|
+
isInputConnected: true,
|
|
1491
|
+
isOutputConnected: true,
|
|
1492
|
+
isPreview: false
|
|
1493
|
+
}, context);
|
|
1494
|
+
const view = sequenceComponent.view;
|
|
1495
|
+
const x = view.joinX - cfg.size / 2;
|
|
1496
|
+
const endY = cfg.size + view.height;
|
|
1497
|
+
const iconSize = parentPlaceIndicator ? cfg.folderIconSize : cfg.defaultIconSize;
|
|
1498
|
+
const startCircle = createCircle(parentPlaceIndicator ? cfg.folderIconD : cfg.startIconD, cfg.size, iconSize);
|
|
1499
|
+
Dom.translate(startCircle, x, 0);
|
|
1500
|
+
g.appendChild(startCircle);
|
|
1501
|
+
Dom.translate(view.g, 0, cfg.size);
|
|
1502
|
+
const endCircle = createCircle(parentPlaceIndicator ? cfg.folderIconD : cfg.stopIconD, cfg.size, iconSize);
|
|
1503
|
+
Dom.translate(endCircle, x, endY);
|
|
1504
|
+
g.appendChild(endCircle);
|
|
1505
|
+
let startPlaceholder = null;
|
|
1506
|
+
let endPlaceholder = null;
|
|
1507
|
+
if (parentPlaceIndicator) {
|
|
1508
|
+
const size = new Vector(cfg.size, cfg.size);
|
|
1509
|
+
startPlaceholder = context.services.placeholder.createForArea(g, size, PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
1510
|
+
endPlaceholder = context.services.placeholder.createForArea(g, size, PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
1511
|
+
Dom.translate(startPlaceholder.view.g, x, 0);
|
|
1512
|
+
Dom.translate(endPlaceholder.view.g, x, endY);
|
|
1513
|
+
}
|
|
1514
|
+
const badges = Badges.createForRoot(g, new Vector(x + cfg.size, 0), context);
|
|
1515
|
+
return new StartStopRootComponentView(g, view.width, view.height + cfg.size * 2, view.joinX, sequenceComponent, startPlaceholder, endPlaceholder, badges);
|
|
1516
|
+
}
|
|
1517
|
+
constructor(g, width, height, joinX, component, startPlaceholder, endPlaceholder, badges) {
|
|
1518
|
+
this.g = g;
|
|
1519
|
+
this.width = width;
|
|
1520
|
+
this.height = height;
|
|
1521
|
+
this.joinX = joinX;
|
|
1522
|
+
this.component = component;
|
|
1523
|
+
this.startPlaceholder = startPlaceholder;
|
|
1524
|
+
this.endPlaceholder = endPlaceholder;
|
|
1525
|
+
this.badges = badges;
|
|
1526
|
+
}
|
|
1527
|
+
destroy() {
|
|
1528
|
+
var _a;
|
|
1529
|
+
(_a = this.g.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.g);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
function createCircle(d, size, iconSize) {
|
|
1533
|
+
const r = size / 2;
|
|
1534
|
+
const circle = Dom.svg('circle', {
|
|
1535
|
+
class: 'sqd-root-start-stop-circle',
|
|
1536
|
+
cx: r,
|
|
1537
|
+
cy: r,
|
|
1538
|
+
r: r
|
|
1539
|
+
});
|
|
1540
|
+
const g = Dom.svg('g');
|
|
1541
|
+
g.appendChild(circle);
|
|
1542
|
+
const offset = (size - iconSize) / 2;
|
|
1543
|
+
const icon = Icons.appendPath(g, 'sqd-root-start-stop-icon', d, iconSize);
|
|
1544
|
+
Dom.translate(icon, offset, offset);
|
|
1545
|
+
return g;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
class StartStopRootComponent {
|
|
1549
|
+
static create(parentElement, sequence, parentPlaceIndicator, context, viewConfiguration) {
|
|
1550
|
+
const view = StartStopRootComponentView.create(parentElement, sequence, parentPlaceIndicator, context, viewConfiguration);
|
|
1551
|
+
return new StartStopRootComponent(view);
|
|
1552
|
+
}
|
|
1553
|
+
constructor(view) {
|
|
1554
|
+
this.view = view;
|
|
1555
|
+
}
|
|
1556
|
+
resolveClick(click) {
|
|
1557
|
+
return this.view.component.resolveClick(click);
|
|
1558
|
+
}
|
|
1559
|
+
findById(stepId) {
|
|
1560
|
+
return this.view.component.findById(stepId);
|
|
1561
|
+
}
|
|
1562
|
+
resolvePlaceholders(skipComponent, result) {
|
|
1563
|
+
this.view.component.resolvePlaceholders(skipComponent, result);
|
|
1564
|
+
if (this.view.startPlaceholder && this.view.endPlaceholder) {
|
|
1565
|
+
result.placeholders.push(this.view.startPlaceholder);
|
|
1566
|
+
result.placeholders.push(this.view.endPlaceholder);
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
updateBadges(result) {
|
|
1570
|
+
this.view.badges.update(result);
|
|
1571
|
+
this.view.component.updateBadges(result);
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
const defaultConfiguration$5 = {
|
|
1576
|
+
view: {
|
|
1577
|
+
size: 30,
|
|
1578
|
+
defaultIconSize: 22,
|
|
1579
|
+
folderIconSize: 18,
|
|
1580
|
+
startIconD: Icons.play,
|
|
1581
|
+
stopIconD: Icons.stop,
|
|
1582
|
+
folderIconD: Icons.folder
|
|
1583
|
+
}
|
|
1584
|
+
};
|
|
1585
|
+
class StartStopRootComponentExtension {
|
|
1586
|
+
static create(configuration) {
|
|
1587
|
+
return new StartStopRootComponentExtension(configuration !== null && configuration !== void 0 ? configuration : defaultConfiguration$5);
|
|
1588
|
+
}
|
|
1589
|
+
constructor(configuration) {
|
|
1590
|
+
this.configuration = configuration;
|
|
1591
|
+
}
|
|
1592
|
+
create(parentElement, sequence, parentPlaceIndicator, context) {
|
|
1593
|
+
return StartStopRootComponent.create(parentElement, sequence, parentPlaceIndicator, context, this.configuration.view);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1481
1597
|
const COMPONENT_CLASS_NAME$2 = 'container';
|
|
1482
1598
|
const createContainerStepComponentViewFactory = (cfg) => (parentElement, stepContext, viewContext) => {
|
|
1483
1599
|
return viewContext.createRegionComponentView(parentElement, COMPONENT_CLASS_NAME$2, (g, regionViewBuilder) => {
|
|
@@ -4073,109 +4189,6 @@ class RectPlaceholderExtension {
|
|
|
4073
4189
|
}
|
|
4074
4190
|
}
|
|
4075
4191
|
|
|
4076
|
-
const SIZE = 30;
|
|
4077
|
-
const DEFAULT_ICON_SIZE = 22;
|
|
4078
|
-
const FOLDER_ICON_SIZE = 18;
|
|
4079
|
-
class StartStopRootComponentView {
|
|
4080
|
-
static create(parent, sequence, parentPlaceIndicator, context) {
|
|
4081
|
-
const g = Dom.svg('g', {
|
|
4082
|
-
class: 'sqd-root-start-stop'
|
|
4083
|
-
});
|
|
4084
|
-
parent.appendChild(g);
|
|
4085
|
-
const sequenceComponent = DefaultSequenceComponent.create(g, {
|
|
4086
|
-
sequence,
|
|
4087
|
-
depth: 0,
|
|
4088
|
-
isInputConnected: true,
|
|
4089
|
-
isOutputConnected: true,
|
|
4090
|
-
isPreview: false
|
|
4091
|
-
}, context);
|
|
4092
|
-
const view = sequenceComponent.view;
|
|
4093
|
-
const x = view.joinX - SIZE / 2;
|
|
4094
|
-
const endY = SIZE + view.height;
|
|
4095
|
-
const iconSize = parentPlaceIndicator ? FOLDER_ICON_SIZE : DEFAULT_ICON_SIZE;
|
|
4096
|
-
const startCircle = createCircle(parentPlaceIndicator ? Icons.folder : Icons.play, iconSize);
|
|
4097
|
-
Dom.translate(startCircle, x, 0);
|
|
4098
|
-
g.appendChild(startCircle);
|
|
4099
|
-
Dom.translate(view.g, 0, SIZE);
|
|
4100
|
-
const endCircle = createCircle(parentPlaceIndicator ? Icons.folder : Icons.stop, iconSize);
|
|
4101
|
-
Dom.translate(endCircle, x, endY);
|
|
4102
|
-
g.appendChild(endCircle);
|
|
4103
|
-
let startPlaceholder = null;
|
|
4104
|
-
let endPlaceholder = null;
|
|
4105
|
-
if (parentPlaceIndicator) {
|
|
4106
|
-
const size = new Vector(SIZE, SIZE);
|
|
4107
|
-
startPlaceholder = context.services.placeholder.createForArea(g, size, PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
4108
|
-
endPlaceholder = context.services.placeholder.createForArea(g, size, PlaceholderDirection.out, parentPlaceIndicator.sequence, parentPlaceIndicator.index);
|
|
4109
|
-
Dom.translate(startPlaceholder.view.g, x, 0);
|
|
4110
|
-
Dom.translate(endPlaceholder.view.g, x, endY);
|
|
4111
|
-
}
|
|
4112
|
-
const badges = Badges.createForRoot(g, new Vector(x + SIZE, 0), context);
|
|
4113
|
-
return new StartStopRootComponentView(g, view.width, view.height + SIZE * 2, view.joinX, sequenceComponent, startPlaceholder, endPlaceholder, badges);
|
|
4114
|
-
}
|
|
4115
|
-
constructor(g, width, height, joinX, component, startPlaceholder, endPlaceholder, badges) {
|
|
4116
|
-
this.g = g;
|
|
4117
|
-
this.width = width;
|
|
4118
|
-
this.height = height;
|
|
4119
|
-
this.joinX = joinX;
|
|
4120
|
-
this.component = component;
|
|
4121
|
-
this.startPlaceholder = startPlaceholder;
|
|
4122
|
-
this.endPlaceholder = endPlaceholder;
|
|
4123
|
-
this.badges = badges;
|
|
4124
|
-
}
|
|
4125
|
-
destroy() {
|
|
4126
|
-
var _a;
|
|
4127
|
-
(_a = this.g.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.g);
|
|
4128
|
-
}
|
|
4129
|
-
}
|
|
4130
|
-
function createCircle(d, iconSize) {
|
|
4131
|
-
const r = SIZE / 2;
|
|
4132
|
-
const circle = Dom.svg('circle', {
|
|
4133
|
-
class: 'sqd-root-start-stop-circle',
|
|
4134
|
-
cx: r,
|
|
4135
|
-
cy: r,
|
|
4136
|
-
r: r
|
|
4137
|
-
});
|
|
4138
|
-
const g = Dom.svg('g');
|
|
4139
|
-
g.appendChild(circle);
|
|
4140
|
-
const offset = (SIZE - iconSize) / 2;
|
|
4141
|
-
const icon = Icons.appendPath(g, 'sqd-root-start-stop-icon', d, iconSize);
|
|
4142
|
-
Dom.translate(icon, offset, offset);
|
|
4143
|
-
return g;
|
|
4144
|
-
}
|
|
4145
|
-
|
|
4146
|
-
class StartStopRootComponent {
|
|
4147
|
-
static create(parentElement, sequence, parentPlaceIndicator, context) {
|
|
4148
|
-
const view = StartStopRootComponentView.create(parentElement, sequence, parentPlaceIndicator, context);
|
|
4149
|
-
return new StartStopRootComponent(view);
|
|
4150
|
-
}
|
|
4151
|
-
constructor(view) {
|
|
4152
|
-
this.view = view;
|
|
4153
|
-
}
|
|
4154
|
-
resolveClick(click) {
|
|
4155
|
-
return this.view.component.resolveClick(click);
|
|
4156
|
-
}
|
|
4157
|
-
findById(stepId) {
|
|
4158
|
-
return this.view.component.findById(stepId);
|
|
4159
|
-
}
|
|
4160
|
-
resolvePlaceholders(skipComponent, result) {
|
|
4161
|
-
this.view.component.resolvePlaceholders(skipComponent, result);
|
|
4162
|
-
if (this.view.startPlaceholder && this.view.endPlaceholder) {
|
|
4163
|
-
result.placeholders.push(this.view.startPlaceholder);
|
|
4164
|
-
result.placeholders.push(this.view.endPlaceholder);
|
|
4165
|
-
}
|
|
4166
|
-
}
|
|
4167
|
-
updateBadges(result) {
|
|
4168
|
-
this.view.badges.update(result);
|
|
4169
|
-
this.view.component.updateBadges(result);
|
|
4170
|
-
}
|
|
4171
|
-
}
|
|
4172
|
-
|
|
4173
|
-
class StartStopRootComponentExtension {
|
|
4174
|
-
constructor() {
|
|
4175
|
-
this.create = StartStopRootComponent.create;
|
|
4176
|
-
}
|
|
4177
|
-
}
|
|
4178
|
-
|
|
4179
4192
|
const defaultConfiguration$2 = {
|
|
4180
4193
|
view: {
|
|
4181
4194
|
minContainerWidth: 40,
|
|
@@ -4388,7 +4401,7 @@ function setDefaults(services, configuration) {
|
|
|
4388
4401
|
services.grid = LineGridExtension.create();
|
|
4389
4402
|
}
|
|
4390
4403
|
if (!services.rootComponent) {
|
|
4391
|
-
services.rootComponent =
|
|
4404
|
+
services.rootComponent = StartStopRootComponentExtension.create();
|
|
4392
4405
|
}
|
|
4393
4406
|
if (!services.sequenceComponent) {
|
|
4394
4407
|
services.sequenceComponent = new DefaultSequenceComponentExtension();
|
|
@@ -4673,4 +4686,4 @@ class StepsDesignerExtension {
|
|
|
4673
4686
|
}
|
|
4674
4687
|
}
|
|
4675
4688
|
|
|
4676
|
-
export { Badges, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommandType, ComponentContext, ComponentDom, ControlBarApi, CustomActionController, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerExtension, DefinitionChangeType, Designer, DesignerApi, DesignerContext, DesignerState, Dom, Editor, EditorApi, Icons, InputView, JoinView, KeyboardAction, LabelView, LineGridDesignerExtension, ObjectCloner, OutputView, PathBarApi, PlaceholderDirection, QuantifiedScaleViewportCalculator, RectPlaceholder, RectPlaceholderView, ServicesResolver, SimpleEvent, StepComponent, StepExtensionResolver, StepsDesignerExtension, ToolboxApi, Uid, ValidationErrorBadgeExtension, Vector, WorkspaceApi, createContainerStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
|
4689
|
+
export { Badges, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommandType, ComponentContext, ComponentDom, ControlBarApi, CustomActionController, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerExtension, DefinitionChangeType, Designer, DesignerApi, DesignerContext, DesignerState, Dom, Editor, EditorApi, Icons, InputView, JoinView, KeyboardAction, LabelView, LineGridDesignerExtension, ObjectCloner, OutputView, PathBarApi, PlaceholderDirection, QuantifiedScaleViewportCalculator, RectPlaceholder, RectPlaceholderView, ServicesResolver, SimpleEvent, StartStopRootComponentExtension, StepComponent, StepExtensionResolver, StepsDesignerExtension, ToolboxApi, Uid, ValidationErrorBadgeExtension, Vector, WorkspaceApi, createContainerStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
package/lib/index.d.ts
CHANGED
|
@@ -589,6 +589,26 @@ declare class DefaultSequenceComponent implements SequenceComponent {
|
|
|
589
589
|
updateBadges(result: BadgesResult): void;
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
+
interface StartStopRootComponentViewConfiguration {
|
|
593
|
+
size: number;
|
|
594
|
+
defaultIconSize: number;
|
|
595
|
+
folderIconSize: number;
|
|
596
|
+
folderIconD: string;
|
|
597
|
+
startIconD: string;
|
|
598
|
+
stopIconD: string;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
interface StartStopRootComponentExtensionConfiguration {
|
|
602
|
+
view: StartStopRootComponentViewConfiguration;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
declare class StartStopRootComponentExtension implements RootComponentExtension {
|
|
606
|
+
private readonly configuration;
|
|
607
|
+
static create(configuration?: StartStopRootComponentExtensionConfiguration): StartStopRootComponentExtension;
|
|
608
|
+
private constructor();
|
|
609
|
+
create(parentElement: SVGElement, sequence: Sequence, parentPlaceIndicator: SequencePlaceIndicator | null, context: ComponentContext): Component;
|
|
610
|
+
}
|
|
611
|
+
|
|
592
612
|
interface ContainerStepComponentViewConfiguration {
|
|
593
613
|
paddingTop: number;
|
|
594
614
|
paddingX: number;
|
|
@@ -1282,4 +1302,4 @@ declare class StepsDesignerExtension implements DesignerExtension {
|
|
|
1282
1302
|
protected constructor(steps: StepExtension<Step>[]);
|
|
1283
1303
|
}
|
|
1284
1304
|
|
|
1285
|
-
export { Attributes, Badge, BadgeExtension, BadgeView, Badges, BadgesResult, BaseClickCommand, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommand, ClickCommandType, ClickDetails, Component, ComponentContext, ComponentDom, ComponentView, ContainerStepComponentViewConfiguration, ContainerStepExtensionConfiguration, ContextMenuExtension, ContextMenuItem, ContextMenuItemsProvider, ControlBarApi, CustomAction, CustomActionController, CustomActionHandler, CustomActionHandlerContext, Daemon, DaemonExtension, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerExtension, DefinitionChangeType, DefinitionChangedEvent, Designer, DesignerApi, DesignerConfiguration, DesignerContext, DesignerExtension, DesignerState, Dom, DraggedComponent, DraggedComponentExtension, Editor, EditorApi, EditorsConfiguration, FoundPlaceholders, Grid, GridExtension, I18n, Icons, InputView, JoinView, KeyboardAction, KeyboardConfiguration, LabelView, LineGridConfiguration, LineGridDesignerExtension, ObjectCloner, OpenFolderClickCommand, OutputView, PathBarApi, Placeholder, PlaceholderController, PlaceholderControllerExtension, PlaceholderDirection, PlaceholderExtension, PlaceholderView, PreferenceStorage, QuantifiedScaleViewportCalculator, RectPlaceholder, RectPlaceholderConfiguration, RectPlaceholderView, RegionComponentViewContentFactory, RegionComponentViewExtension, RegionView, RegionViewFactory, RerenderStepClickCommand, RootComponentExtension, RootEditorContext, RootEditorProvider, RootValidator, SelectStepClickCommand, SelectedStepIdProvider, SequenceComponent, SequenceComponentExtension, SequenceContext, SequencePlaceIndicator, Services, ServicesResolver, SimpleEvent, SimpleEventListener, StateModifierDependency, StepComponent, StepComponentView, StepComponentViewContext, StepComponentViewFactory, StepComponentViewWrapperExtension, StepContext, StepDefinition, StepDescriptionProvider, StepEditorContext, StepEditorProvider, StepExtension, StepExtensionResolver, StepIconUrlProvider, StepLabelProvider, StepValidator, StepsConfiguration, StepsDesignerExtension, StepsDesignerExtensionConfiguration, SwitchStepComponentViewConfiguration, SwitchStepExtensionConfiguration, TaskStepComponentViewConfiguration, TaskStepExtensionConfiguration, ToolboxApi, ToolboxConfiguration, ToolboxGroupConfiguration, TriggerCustomActionClickCommand, UiComponent, UiComponentExtension, Uid, UidGenerator, UndoStack, UndoStackItem, ValidationErrorBadgeExtension, ValidationErrorBadgeExtensionConfiguration, ValidationErrorBadgeViewConfiguration, ValidatorConfiguration, Vector, Viewport, ViewportController, ViewportControllerExtension, WheelController, WheelControllerExtension, WorkspaceApi, createContainerStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
|
1305
|
+
export { Attributes, Badge, BadgeExtension, BadgeView, Badges, BadgesResult, BaseClickCommand, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommand, ClickCommandType, ClickDetails, Component, ComponentContext, ComponentDom, ComponentView, ContainerStepComponentViewConfiguration, ContainerStepExtensionConfiguration, ContextMenuExtension, ContextMenuItem, ContextMenuItemsProvider, ControlBarApi, CustomAction, CustomActionController, CustomActionHandler, CustomActionHandlerContext, Daemon, DaemonExtension, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerExtension, DefinitionChangeType, DefinitionChangedEvent, Designer, DesignerApi, DesignerConfiguration, DesignerContext, DesignerExtension, DesignerState, Dom, DraggedComponent, DraggedComponentExtension, Editor, EditorApi, EditorsConfiguration, FoundPlaceholders, Grid, GridExtension, I18n, Icons, InputView, JoinView, KeyboardAction, KeyboardConfiguration, LabelView, LineGridConfiguration, LineGridDesignerExtension, ObjectCloner, OpenFolderClickCommand, OutputView, PathBarApi, Placeholder, PlaceholderController, PlaceholderControllerExtension, PlaceholderDirection, PlaceholderExtension, PlaceholderView, PreferenceStorage, QuantifiedScaleViewportCalculator, RectPlaceholder, RectPlaceholderConfiguration, RectPlaceholderView, RegionComponentViewContentFactory, RegionComponentViewExtension, RegionView, RegionViewFactory, RerenderStepClickCommand, RootComponentExtension, RootEditorContext, RootEditorProvider, RootValidator, SelectStepClickCommand, SelectedStepIdProvider, SequenceComponent, SequenceComponentExtension, SequenceContext, SequencePlaceIndicator, Services, ServicesResolver, SimpleEvent, SimpleEventListener, StartStopRootComponentExtension, StartStopRootComponentExtensionConfiguration, StartStopRootComponentViewConfiguration, StateModifierDependency, StepComponent, StepComponentView, StepComponentViewContext, StepComponentViewFactory, StepComponentViewWrapperExtension, StepContext, StepDefinition, StepDescriptionProvider, StepEditorContext, StepEditorProvider, StepExtension, StepExtensionResolver, StepIconUrlProvider, StepLabelProvider, StepValidator, StepsConfiguration, StepsDesignerExtension, StepsDesignerExtensionConfiguration, SwitchStepComponentViewConfiguration, SwitchStepExtensionConfiguration, TaskStepComponentViewConfiguration, TaskStepExtensionConfiguration, ToolboxApi, ToolboxConfiguration, ToolboxGroupConfiguration, TriggerCustomActionClickCommand, UiComponent, UiComponentExtension, Uid, UidGenerator, UndoStack, UndoStackItem, ValidationErrorBadgeExtension, ValidationErrorBadgeExtensionConfiguration, ValidationErrorBadgeViewConfiguration, ValidatorConfiguration, Vector, Viewport, ViewportController, ViewportControllerExtension, WheelController, WheelControllerExtension, WorkspaceApi, createContainerStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
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.24.
|
|
4
|
+
"version": "0.24.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|