ngx-rs-ant 1.2.9 → 1.3.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/camunda-bpmn-editor/camunda-bpmn-editor.component.d.ts +1 -1
- package/camunda-bpmn-editor/custom/config/CustomPropertiesProvider.d.ts +4 -1
- package/camunda-bpmn-editor/custom/config/properties/{user-task/TaskDescriptionProps.d.ts → DescriptionProps.d.ts} +1 -1
- package/camunda-bpmn-editor/custom/config/util/ElementUtils.d.ts +1 -3
- package/camunda-bpmn-editor/custom/hide-other/HideOtherContextPadProvider.d.ts +0 -4
- package/data-grid/data-grid.service.d.ts +11 -10
- package/esm2020/camunda-bpmn-editor/camunda-bpmn-editor.component.mjs +7 -23
- package/esm2020/camunda-bpmn-editor/custom/config/CustomPropertiesProvider.mjs +19 -21
- package/esm2020/camunda-bpmn-editor/custom/config/descriptors/coast.json +24 -0
- package/esm2020/camunda-bpmn-editor/custom/config/properties/DescriptionProps.mjs +28 -0
- package/esm2020/camunda-bpmn-editor/custom/config/util/ElementUtils.mjs +9 -30
- package/esm2020/camunda-bpmn-editor/custom/hide-other/HideOtherContextPadProvider.mjs +1 -3
- package/esm2020/camunda-bpmn-editor/custom/hide-other/HideOtherPaletteProvider.mjs +1 -2
- package/esm2020/camunda-bpmn-editor/custom/translate/translations.mjs +2 -26
- package/esm2020/data-grid/data-grid.component.mjs +1 -1
- package/esm2020/data-grid/data-grid.service.mjs +22 -24
- package/fesm2015/ngx-rs-ant.mjs +96 -242
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +97 -242
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/package.json +1 -1
- package/camunda-bpmn-editor/custom/config/properties/user-task/user-assignment/UserAssignmentProps.d.ts +0 -2
- package/camunda-bpmn-editor/custom/config/properties/user-task/user-assignment/UserAssignmentStaticOrDynamicProps.d.ts +0 -6
- package/camunda-bpmn-editor/custom/service-task/ServiceTaskContextPadProvider.d.ts +0 -23
- package/camunda-bpmn-editor/custom/service-task/ServiceTaskPaletteProvider.d.ts +0 -18
- package/camunda-bpmn-editor/custom/service-task/index.d.ts +0 -8
- package/esm2020/camunda-bpmn-editor/custom/config/properties/user-task/TaskDescriptionProps.mjs +0 -26
- package/esm2020/camunda-bpmn-editor/custom/config/properties/user-task/user-assignment/UserAssignmentProps.mjs +0 -5
- package/esm2020/camunda-bpmn-editor/custom/config/properties/user-task/user-assignment/UserAssignmentStaticOrDynamicProps.mjs +0 -32
- package/esm2020/camunda-bpmn-editor/custom/service-task/ServiceTaskContextPadProvider.mjs +0 -46
- package/esm2020/camunda-bpmn-editor/custom/service-task/ServiceTaskPaletteProvider.mjs +0 -27
- package/esm2020/camunda-bpmn-editor/custom/service-task/index.mjs +0 -8
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import { Component, Input, HostBinding, EventEmitter, Output, HostListener, View
|
|
|
3
3
|
import { PluginFactory } from 'coast-plugin-register';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { Subject, ReplaySubject, Subscription, map,
|
|
6
|
+
import { Subject, ReplaySubject, Subscription, map, shareReplay, lastValueFrom, debounceTime, interval } from 'rxjs';
|
|
7
7
|
import * as i2 from 'devextreme-angular/ui/number-box';
|
|
8
8
|
import * as i2$1 from 'devextreme-angular/ui/draggable';
|
|
9
9
|
import { DevExtremeModule, DxLoadPanelModule, DxDataGridComponent, DxValidationGroupComponent } from 'devextreme-angular';
|
|
10
10
|
import BpmnModeler from 'camunda-bpmn-js/lib/camunda-platform/Modeler';
|
|
11
11
|
import { is } from 'bpmn-js/lib/util/ModelUtil';
|
|
12
|
-
import {
|
|
12
|
+
import { TextFieldEntry, isTextFieldEntryEdited } from '@bpmn-io/properties-panel';
|
|
13
13
|
import * as i6 from 'devextreme-angular/ui/load-panel';
|
|
14
14
|
import * as i6$1 from 'devextreme-angular/ui/nested';
|
|
15
15
|
import { DxoPositionModule } from 'devextreme-angular/ui/nested';
|
|
@@ -846,40 +846,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
846
846
|
}] });
|
|
847
847
|
|
|
848
848
|
const translations = {
|
|
849
|
-
// 调色板
|
|
850
849
|
'Activate the hand tool': '激活拖拽工具',
|
|
851
850
|
'Activate the lasso tool': '激活框选工具',
|
|
852
851
|
'Activate the create/remove space tool': '激活空间移动工具',
|
|
853
852
|
'Activate the global connect tool': '激活全局连接工具',
|
|
854
853
|
'Create StartEvent': '创建开始节点',
|
|
855
854
|
'Create EndEvent': '创建结束节点',
|
|
856
|
-
'Create UserTask': '创建用户任务',
|
|
857
|
-
'Create ServiceTask': '创建服务任务',
|
|
858
855
|
'Create Gateway': '创建网关节点',
|
|
859
|
-
|
|
860
|
-
'Append EndEvent': '追加结束节点',
|
|
861
|
-
'Append UserTask': '追加用户任务',
|
|
862
|
-
'Append ServiceTask': '追加服务任务',
|
|
863
|
-
'Append Gateway': '追加网关节点',
|
|
864
|
-
'Connect using Sequence/MessageFlow or Association': '使用序列/消息流或关联连接',
|
|
865
|
-
'Remove': '删除',
|
|
866
|
-
'Set Color': '设置颜色',
|
|
867
|
-
'Change type': '改变节点类型',
|
|
868
|
-
'Exclusive Gateway': '互斥网关',
|
|
869
|
-
'Parallel Gateway': '并行网关',
|
|
870
|
-
'Default Flow': '默认流向',
|
|
871
|
-
'Sequence Flow': '顺序流向',
|
|
856
|
+
'Create UserTask': '创建用户任务',
|
|
872
857
|
'Open minimap': '打开缩略图',
|
|
873
858
|
'Close minimap': '关闭缩略图',
|
|
874
|
-
// 配置
|
|
875
|
-
'General': '参数配置',
|
|
876
|
-
'Name': '名称',
|
|
877
|
-
'Task description': '任务描述',
|
|
878
|
-
'Set assignment rule': '设置用户规则',
|
|
879
|
-
'dynamic user': '动态用户',
|
|
880
|
-
'static user': '静态用户',
|
|
881
|
-
'dynamic role': '动态角色',
|
|
882
|
-
'static role': '静态角色',
|
|
883
859
|
/*
|
|
884
860
|
'Create {type}': '创建{type}',
|
|
885
861
|
'Create Intermediate/Boundary Event': '创建中间/边界事件',
|
|
@@ -1250,85 +1226,6 @@ var customUserTaskModule = {
|
|
|
1250
1226
|
userTaskContextPadProvider: ['type', UserTaskContextPadProvider],
|
|
1251
1227
|
};
|
|
1252
1228
|
|
|
1253
|
-
class ServiceTaskPaletteProvider {
|
|
1254
|
-
constructor(palette, translate, elementFactory, create) {
|
|
1255
|
-
this.translate = translate;
|
|
1256
|
-
this.elementFactory = elementFactory;
|
|
1257
|
-
this.create = create;
|
|
1258
|
-
palette.registerProvider(this);
|
|
1259
|
-
this.createServiceTask = this.createServiceTask.bind(this);
|
|
1260
|
-
}
|
|
1261
|
-
getPaletteEntries() {
|
|
1262
|
-
return {
|
|
1263
|
-
'create.service-task': {
|
|
1264
|
-
group: 'activity',
|
|
1265
|
-
className: 'bpmn-icon-service-task',
|
|
1266
|
-
title: this.translate('Create ServiceTask'),
|
|
1267
|
-
action: {
|
|
1268
|
-
dragstart: this.createServiceTask,
|
|
1269
|
-
click: this.createServiceTask
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
};
|
|
1273
|
-
}
|
|
1274
|
-
createServiceTask(event) {
|
|
1275
|
-
const shape = this.elementFactory.createShape({ type: 'bpmn:ServiceTask' });
|
|
1276
|
-
this.create.start(event, shape);
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
class ServiceTaskContextPadProvider {
|
|
1281
|
-
constructor(contextPad, translate, appendPreview, elementFactory, autoPlace, create) {
|
|
1282
|
-
this.translate = translate;
|
|
1283
|
-
this.appendPreview = appendPreview;
|
|
1284
|
-
this.elementFactory = elementFactory;
|
|
1285
|
-
this.autoPlace = autoPlace;
|
|
1286
|
-
this.create = create;
|
|
1287
|
-
contextPad.registerProvider(this);
|
|
1288
|
-
this.appendServiceTaskPreview = this.appendServiceTaskPreview.bind(this);
|
|
1289
|
-
this.appendServiceTask = this.appendServiceTask.bind(this);
|
|
1290
|
-
this.appendServiceTaskStart = this.appendServiceTaskStart.bind(this);
|
|
1291
|
-
}
|
|
1292
|
-
getContextPadEntries() {
|
|
1293
|
-
return {
|
|
1294
|
-
'append.service-task': {
|
|
1295
|
-
group: 'model',
|
|
1296
|
-
className: 'bpmn-icon-service-task',
|
|
1297
|
-
title: this.translate('Append ServiceTask'),
|
|
1298
|
-
action: {
|
|
1299
|
-
hover: this.appendServiceTaskPreview,
|
|
1300
|
-
click: this.appendServiceTask,
|
|
1301
|
-
dragstart: this.appendServiceTaskStart
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
};
|
|
1305
|
-
}
|
|
1306
|
-
appendServiceTaskPreview(event, source) {
|
|
1307
|
-
this.appendPreview.create(source, 'bpmn:ServiceTask');
|
|
1308
|
-
return () => {
|
|
1309
|
-
this.appendPreview.cleanUp();
|
|
1310
|
-
};
|
|
1311
|
-
}
|
|
1312
|
-
appendServiceTask(event, source) {
|
|
1313
|
-
const shape = this.elementFactory.createShape({ type: 'bpmn:ServiceTask' });
|
|
1314
|
-
this.autoPlace.append(source, shape);
|
|
1315
|
-
this.appendPreview.cleanUp();
|
|
1316
|
-
}
|
|
1317
|
-
appendServiceTaskStart(event, source) {
|
|
1318
|
-
const shape = this.elementFactory.createShape({ type: 'bpmn:ServiceTask' });
|
|
1319
|
-
this.create.start(event, shape, {
|
|
1320
|
-
source: source
|
|
1321
|
-
});
|
|
1322
|
-
this.appendPreview.cleanUp();
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
var customServiceTaskModule = {
|
|
1327
|
-
__init__: ['serviceTaskPaletteProvider', 'serviceTaskContextPadProvider'],
|
|
1328
|
-
serviceTaskPaletteProvider: ['type', ServiceTaskPaletteProvider],
|
|
1329
|
-
serviceTaskContextPadProvider: ['type', ServiceTaskContextPadProvider],
|
|
1330
|
-
};
|
|
1331
|
-
|
|
1332
1229
|
class HideOtherPaletteProvider {
|
|
1333
1230
|
constructor(palette) {
|
|
1334
1231
|
this.visibleEntryKeys = [
|
|
@@ -1340,7 +1237,6 @@ class HideOtherPaletteProvider {
|
|
|
1340
1237
|
'create.start-event',
|
|
1341
1238
|
'create.end-event',
|
|
1342
1239
|
'create.user-task',
|
|
1343
|
-
'create.service-task',
|
|
1344
1240
|
'create.exclusive-gateway',
|
|
1345
1241
|
'xml'
|
|
1346
1242
|
];
|
|
@@ -1390,7 +1286,6 @@ class HideOtherContextPadProvider {
|
|
|
1390
1286
|
else if (is(element, 'bpmn:Gateway')) {
|
|
1391
1287
|
return {
|
|
1392
1288
|
'append.user-task': entries['append.user-task'],
|
|
1393
|
-
'append.service-task': entries['append.service-task'],
|
|
1394
1289
|
'append.gateway': entries['append.gateway'],
|
|
1395
1290
|
'append.end-event': entries['append.end-event'],
|
|
1396
1291
|
'connect': entries['connect'],
|
|
@@ -1401,7 +1296,6 @@ class HideOtherContextPadProvider {
|
|
|
1401
1296
|
}
|
|
1402
1297
|
return {
|
|
1403
1298
|
'append.user-task': entries['append.user-task'],
|
|
1404
|
-
'append.service-task': entries['append.service-task'],
|
|
1405
1299
|
'append.gateway': entries['append.gateway'],
|
|
1406
1300
|
'append.end-event': entries['append.end-event'],
|
|
1407
1301
|
'connect': entries['connect'],
|
|
@@ -1469,13 +1363,12 @@ var customHideOtherModule = {
|
|
|
1469
1363
|
gatewayReplaceMenuProvider: ['type', GatewayReplaceMenuProvider]
|
|
1470
1364
|
};
|
|
1471
1365
|
|
|
1472
|
-
|
|
1473
|
-
function addExtensionProperty(element, key, value) {
|
|
1366
|
+
function addExtensionProperty(element, key, value, bpmnFactory, modeling) {
|
|
1474
1367
|
let extensionElements = element.businessObject.get('extensionElements');
|
|
1475
1368
|
if (!extensionElements) {
|
|
1476
|
-
extensionElements =
|
|
1369
|
+
extensionElements = bpmnFactory.create('bpmn:ExtensionElements', { values: [] });
|
|
1477
1370
|
extensionElements.$parent = element.businessObject;
|
|
1478
|
-
|
|
1371
|
+
modeling.updateModdleProperties(element, element.businessObject, { extensionElements });
|
|
1479
1372
|
}
|
|
1480
1373
|
let properties = null;
|
|
1481
1374
|
const extensionElementValues = extensionElements.get('values');
|
|
@@ -1484,125 +1377,73 @@ function addExtensionProperty(element, key, value) {
|
|
|
1484
1377
|
properties = existPropertiesElements[0];
|
|
1485
1378
|
}
|
|
1486
1379
|
if (!properties) {
|
|
1487
|
-
properties =
|
|
1380
|
+
properties = bpmnFactory.create('camunda:Properties', { values: [] });
|
|
1488
1381
|
properties.$parent = extensionElements;
|
|
1489
|
-
|
|
1382
|
+
modeling.updateModdleProperties(element, extensionElements, { values: [...extensionElements.get('values'), properties] });
|
|
1490
1383
|
}
|
|
1491
1384
|
const propertyValues = properties.get('values');
|
|
1492
1385
|
const existPropertyIndex = propertyValues.findIndex((value) => value.name === key);
|
|
1493
1386
|
if (existPropertyIndex > -1) {
|
|
1494
|
-
|
|
1387
|
+
modeling.updateModdleProperties(element, propertyValues[existPropertyIndex], { name: key, value });
|
|
1495
1388
|
}
|
|
1496
1389
|
else {
|
|
1497
|
-
const property =
|
|
1390
|
+
const property = bpmnFactory.create('camunda:Property', { name: key, value });
|
|
1498
1391
|
property.$parent = properties;
|
|
1499
|
-
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
function getExtensionPropertyValue(element, key) {
|
|
1503
|
-
let extensionElements = element.businessObject.get('extensionElements');
|
|
1504
|
-
if (!extensionElements) {
|
|
1505
|
-
return '';
|
|
1506
|
-
}
|
|
1507
|
-
let properties = null;
|
|
1508
|
-
const extensionElementValues = extensionElements.get('values');
|
|
1509
|
-
const existPropertiesElements = extensionElementValues.filter((value) => is(value, 'camunda:Properties'));
|
|
1510
|
-
if (existPropertiesElements.length > 0) {
|
|
1511
|
-
properties = existPropertiesElements[0];
|
|
1512
|
-
}
|
|
1513
|
-
if (!properties) {
|
|
1514
|
-
return '';
|
|
1515
|
-
}
|
|
1516
|
-
const propertyValues = properties.get('values');
|
|
1517
|
-
const existPropertyIndex = propertyValues.findIndex((value) => value.name === key);
|
|
1518
|
-
if (existPropertyIndex > -1) {
|
|
1519
|
-
return propertyValues[existPropertyIndex].value;
|
|
1392
|
+
modeling.updateModdleProperties(element, properties, { values: [...properties.get('values'), property] });
|
|
1520
1393
|
}
|
|
1521
1394
|
}
|
|
1522
1395
|
|
|
1523
1396
|
// @ts-ignore
|
|
1524
|
-
class
|
|
1397
|
+
class DescriptionProps {
|
|
1525
1398
|
constructor(props) {
|
|
1526
1399
|
this.id = 'Coast_taskDescription';
|
|
1527
|
-
const { element } = props;
|
|
1400
|
+
const { element, translate, bpmnFactory, modeling, debounce } = props;
|
|
1528
1401
|
this.component = () => {
|
|
1529
|
-
return
|
|
1530
|
-
element: element,
|
|
1402
|
+
return TextFieldEntry({
|
|
1531
1403
|
id: this.id,
|
|
1532
|
-
label: util.translate('Task description'),
|
|
1533
|
-
getValue: () => {
|
|
1534
|
-
return getExtensionPropertyValue(element, this.id);
|
|
1535
|
-
},
|
|
1536
|
-
setValue: (value) => {
|
|
1537
|
-
addExtensionProperty(element, this.id, value);
|
|
1538
|
-
},
|
|
1539
|
-
debounce: util.debounce,
|
|
1540
|
-
autoResize: true
|
|
1541
|
-
});
|
|
1542
|
-
};
|
|
1543
|
-
this.isEdited = isTextAreaEntryEdited;
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
// @ts-ignore
|
|
1548
|
-
class UserAssignmentStaticOrDynamicProps {
|
|
1549
|
-
constructor(props) {
|
|
1550
|
-
this.id = 'Coast_userAssignment_staticOrDynamic';
|
|
1551
|
-
const { element } = props;
|
|
1552
|
-
this.component = () => {
|
|
1553
|
-
return SelectEntry({
|
|
1554
1404
|
element: element,
|
|
1555
|
-
|
|
1556
|
-
label: util.translate('Set assignment rule'),
|
|
1405
|
+
label: translate('Task Description'),
|
|
1557
1406
|
getValue: () => {
|
|
1558
|
-
return
|
|
1407
|
+
return element.businessObject.get('taskDescription') || '';
|
|
1559
1408
|
},
|
|
1560
1409
|
setValue: (value) => {
|
|
1561
|
-
|
|
1410
|
+
modeling.updateModdleProperties(element, element.businessObject, {
|
|
1411
|
+
'taskDescription': value
|
|
1412
|
+
});
|
|
1413
|
+
addExtensionProperty(element, 'taskDescription', value, bpmnFactory, modeling);
|
|
1562
1414
|
},
|
|
1563
|
-
|
|
1564
|
-
return [
|
|
1565
|
-
{ value: '', label: util.translate('dynamic user') },
|
|
1566
|
-
{ value: 'static_user', label: util.translate('static user') },
|
|
1567
|
-
{ value: 'dynamic_role', label: util.translate('dynamic role') },
|
|
1568
|
-
{ value: 'static_role', label: util.translate('static role') }
|
|
1569
|
-
];
|
|
1570
|
-
}
|
|
1415
|
+
debounce
|
|
1571
1416
|
});
|
|
1572
1417
|
};
|
|
1573
|
-
this.isEdited =
|
|
1418
|
+
this.isEdited = isTextFieldEntryEdited;
|
|
1574
1419
|
}
|
|
1575
1420
|
}
|
|
1576
1421
|
|
|
1577
|
-
function getUserAssignmentProps(element) {
|
|
1578
|
-
return [new UserAssignmentStaticOrDynamicProps(element)];
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
1422
|
class CustomPropertiesProvider {
|
|
1582
1423
|
constructor(propertiesPanel, translate, bpmnFactory, modeling, debounceInput) {
|
|
1583
1424
|
this.translate = translate;
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
util.debounce = debounceInput;
|
|
1425
|
+
this.bpmnFactory = bpmnFactory;
|
|
1426
|
+
this.modeling = modeling;
|
|
1427
|
+
this.debounceInput = debounceInput;
|
|
1588
1428
|
propertiesPanel.registerProvider(0, this);
|
|
1589
1429
|
}
|
|
1590
1430
|
getGroups(element) {
|
|
1591
1431
|
return ((groups) => {
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1432
|
+
if (is(element, 'bpmn:UserTask')) {
|
|
1433
|
+
console.log(groups);
|
|
1434
|
+
return [groups.find((group) => group.id === 'general'), {
|
|
1435
|
+
id: 'Coast_Implementation',
|
|
1436
|
+
label: this.translate('More config'),
|
|
1437
|
+
entries: [new DescriptionProps({
|
|
1438
|
+
element,
|
|
1439
|
+
translate: this.translate,
|
|
1440
|
+
bpmnFactory: this.bpmnFactory,
|
|
1441
|
+
modeling: this.modeling,
|
|
1442
|
+
debounce: this.debounceInput
|
|
1443
|
+
})]
|
|
1444
|
+
}];
|
|
1445
|
+
}
|
|
1446
|
+
return groups;
|
|
1606
1447
|
});
|
|
1607
1448
|
}
|
|
1608
1449
|
}
|
|
@@ -1612,6 +1453,38 @@ var customPropertiesPanelModule = {
|
|
|
1612
1453
|
customPropertiesProvider: ['type', CustomPropertiesProvider]
|
|
1613
1454
|
};
|
|
1614
1455
|
|
|
1456
|
+
var name = "Coast Custom";
|
|
1457
|
+
var prefix = "coast";
|
|
1458
|
+
var uri = "https://c-standard.cn";
|
|
1459
|
+
var xml = {
|
|
1460
|
+
tagAlias: "lowerCase"
|
|
1461
|
+
};
|
|
1462
|
+
var associations = [
|
|
1463
|
+
];
|
|
1464
|
+
var types = [
|
|
1465
|
+
{
|
|
1466
|
+
name: "CoastUserTask",
|
|
1467
|
+
"extends": [
|
|
1468
|
+
"bpmn:UserTask"
|
|
1469
|
+
],
|
|
1470
|
+
properties: [
|
|
1471
|
+
{
|
|
1472
|
+
name: "taskDescription",
|
|
1473
|
+
isAttr: true,
|
|
1474
|
+
type: "String"
|
|
1475
|
+
}
|
|
1476
|
+
]
|
|
1477
|
+
}
|
|
1478
|
+
];
|
|
1479
|
+
var coastModdleDescriptor = {
|
|
1480
|
+
name: name,
|
|
1481
|
+
prefix: prefix,
|
|
1482
|
+
uri: uri,
|
|
1483
|
+
xml: xml,
|
|
1484
|
+
associations: associations,
|
|
1485
|
+
types: types
|
|
1486
|
+
};
|
|
1487
|
+
|
|
1615
1488
|
class CodeEditorComponent {
|
|
1616
1489
|
set code(code) {
|
|
1617
1490
|
this._code = code || '';
|
|
@@ -1687,24 +1560,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
1687
1560
|
class CamundaBpmnEditorComponent {
|
|
1688
1561
|
constructor() {
|
|
1689
1562
|
this.isShowXml = false;
|
|
1690
|
-
this.initialDiagram = '<?xml version="1.0" encoding="UTF-8"?>' +
|
|
1691
|
-
'<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
|
|
1692
|
-
'xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" ' +
|
|
1693
|
-
'xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" ' +
|
|
1694
|
-
'xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" ' +
|
|
1695
|
-
'targetNamespace="http://bpmn.io/schema/bpmn" ' +
|
|
1696
|
-
'id="Definitions_1">' +
|
|
1697
|
-
'<bpmn:process id="Process_1" isExecutable="true">' +
|
|
1698
|
-
'<bpmn:startEvent id="StartEvent_1"/>' +
|
|
1699
|
-
'</bpmn:process>' +
|
|
1700
|
-
'<bpmndi:BPMNDiagram id="BPMNDiagram_1">' +
|
|
1701
|
-
'<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">' +
|
|
1702
|
-
'<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">' +
|
|
1703
|
-
'<dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/>' +
|
|
1704
|
-
'</bpmndi:BPMNShape>' +
|
|
1705
|
-
'</bpmndi:BPMNPlane>' +
|
|
1706
|
-
'</bpmndi:BPMNDiagram>' +
|
|
1707
|
-
'</bpmn:definitions>';
|
|
1708
1563
|
}
|
|
1709
1564
|
ngAfterViewInit() {
|
|
1710
1565
|
this.modeler = new BpmnModeler({
|
|
@@ -1718,17 +1573,19 @@ class CamundaBpmnEditorComponent {
|
|
|
1718
1573
|
additionalModules: [
|
|
1719
1574
|
customTranslateModule,
|
|
1720
1575
|
customUserTaskModule,
|
|
1721
|
-
customServiceTaskModule,
|
|
1722
1576
|
customHideOtherModule,
|
|
1723
1577
|
customPropertiesPanelModule
|
|
1724
|
-
]
|
|
1578
|
+
],
|
|
1579
|
+
moddleExtensions: {
|
|
1580
|
+
coast: coastModdleDescriptor
|
|
1581
|
+
}
|
|
1725
1582
|
});
|
|
1726
1583
|
const logo = this.modeler._container.querySelector('.bjs-powered-by');
|
|
1727
1584
|
if (logo) {
|
|
1728
1585
|
this.modeler._container.removeChild(logo);
|
|
1729
1586
|
}
|
|
1730
1587
|
this.canvas = this.modeler.get('canvas');
|
|
1731
|
-
this.modeler.
|
|
1588
|
+
this.modeler.createDiagram().then(() => {
|
|
1732
1589
|
this.canvas.zoom('fit-viewport');
|
|
1733
1590
|
});
|
|
1734
1591
|
}
|
|
@@ -1935,32 +1792,30 @@ class DataGridService {
|
|
|
1935
1792
|
}, undefined, onSuccess);
|
|
1936
1793
|
}
|
|
1937
1794
|
getUserInfo(uid) {
|
|
1938
|
-
if (this.userInfoCache.hasOwnProperty(uid)) {
|
|
1939
|
-
|
|
1795
|
+
if (!this.userInfoCache.hasOwnProperty(uid)) {
|
|
1796
|
+
this.userInfoCache[uid] = this.http.get('api/data/custom', {
|
|
1797
|
+
params: {
|
|
1798
|
+
executor: 'com.cs.system.user.GetUserInfo',
|
|
1799
|
+
uid
|
|
1800
|
+
}
|
|
1801
|
+
}).pipe(shareReplay(1), map(response => {
|
|
1802
|
+
return response.data;
|
|
1803
|
+
}));
|
|
1940
1804
|
}
|
|
1941
|
-
return this.
|
|
1942
|
-
params: {
|
|
1943
|
-
executor: 'com.cs.system.user.GetUserInfo',
|
|
1944
|
-
uid
|
|
1945
|
-
}
|
|
1946
|
-
}).pipe(map(response => {
|
|
1947
|
-
this.userInfoCache[uid] = response.data;
|
|
1948
|
-
return response.data;
|
|
1949
|
-
}));
|
|
1805
|
+
return this.userInfoCache[uid];
|
|
1950
1806
|
}
|
|
1951
1807
|
getUnitInfo(uid) {
|
|
1952
|
-
if (this.unitInfoCache.hasOwnProperty(uid)) {
|
|
1953
|
-
|
|
1808
|
+
if (!this.unitInfoCache.hasOwnProperty(uid)) {
|
|
1809
|
+
this.unitInfoCache[uid] = this.http.get('api/data/custom', {
|
|
1810
|
+
params: {
|
|
1811
|
+
executor: 'com.cs.system.user.GetUnitInfo',
|
|
1812
|
+
uid
|
|
1813
|
+
}
|
|
1814
|
+
}).pipe(shareReplay(1), map(response => {
|
|
1815
|
+
return response.data;
|
|
1816
|
+
}));
|
|
1954
1817
|
}
|
|
1955
|
-
return this.
|
|
1956
|
-
params: {
|
|
1957
|
-
executor: 'com.cs.system.user.GetUnitInfo',
|
|
1958
|
-
uid
|
|
1959
|
-
}
|
|
1960
|
-
}).pipe(map(response => {
|
|
1961
|
-
this.unitInfoCache[uid] = response.data;
|
|
1962
|
-
return response.data;
|
|
1963
|
-
}));
|
|
1818
|
+
return this.unitInfoCache[uid];
|
|
1964
1819
|
}
|
|
1965
1820
|
}
|
|
1966
1821
|
DataGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|