@kineticdata/react 5.1.0-rc.1 → 5.1.1

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.
Files changed (75) hide show
  1. package/lib/apis/core/attributeDefinitions.js +11 -9
  2. package/lib/apis/core/attributeDefinitions.test.js +1 -1
  3. package/lib/apis/core/authentication.js +13 -5
  4. package/lib/apis/core/backgroundJobs.js +2 -1
  5. package/lib/apis/core/bridgeModelAttributeMappings.js +1 -1
  6. package/lib/apis/core/bridgeModelAttributes.js +15 -12
  7. package/lib/apis/core/bridgeModelMappings.js +1 -1
  8. package/lib/apis/core/bridgeModelQualificationMappings.js +2 -2
  9. package/lib/apis/core/bridgeModelQualifications.js +2 -2
  10. package/lib/apis/core/bridgeModels.js +14 -8
  11. package/lib/apis/core/bridgedresources.js +3 -2
  12. package/lib/apis/core/fileResources.js +36 -0
  13. package/lib/apis/core/filestores.js +40 -0
  14. package/lib/apis/core/formTypes.js +18 -21
  15. package/lib/apis/core/oauthClients.js +11 -5
  16. package/lib/apis/core/securityPolicyDefinitions.js +1 -1
  17. package/lib/apis/core/securityPolicyDefinitions.test.js +4 -4
  18. package/lib/apis/core/submissions.js +68 -0
  19. package/lib/apis/core/webhooks.js +1 -1
  20. package/lib/apis/core/webhooks.test.js +2 -2
  21. package/lib/apis/http.js +17 -3
  22. package/lib/apis/index.js +2 -0
  23. package/lib/apis/system/index.js +86 -1
  24. package/lib/apis/task/index.js +20 -13
  25. package/lib/components/agent/filestore/FilestoreForm.js +132 -0
  26. package/lib/components/agent/filestore/FilestoreTable.js +53 -0
  27. package/lib/components/common/BridgeSelect.js +2 -1
  28. package/lib/components/common/FormSelect.js +2 -1
  29. package/lib/components/common/Scroller.js +6 -6
  30. package/lib/components/common/TableInput.js +74 -29
  31. package/lib/components/common/TeamSelect.js +2 -1
  32. package/lib/components/common/Typeahead.js +7 -4
  33. package/lib/components/common/UserSelect.js +2 -1
  34. package/lib/components/common/authentication/AuthenticationContainer.js +50 -27
  35. package/lib/components/core/core_form/CoreForm.js +10 -10
  36. package/lib/components/core/file_resource/FileResourceForm.js +180 -0
  37. package/lib/components/core/file_resource/FileResourceTable.js +71 -0
  38. package/lib/components/core/i18n/I18n.js +14 -14
  39. package/lib/components/core/security_definition/SecurityDefinitionForm.js +1 -1
  40. package/lib/components/core/space/SpaceForm.js +37 -8
  41. package/lib/components/core/submission/FormSubmissionFilters.js +3 -11
  42. package/lib/components/core/submission/FormSubmissionTable.js +4 -2
  43. package/lib/components/core/submission/SubmissionForm.js +124 -0
  44. package/lib/components/core/submission/helpers.js +2 -2
  45. package/lib/components/core/user/UserForm.js +2 -2
  46. package/lib/components/core/webapi/WebApiForm.js +111 -126
  47. package/lib/components/form/Form.helpers.js +1 -1
  48. package/lib/components/form/Form.js +200 -144
  49. package/lib/components/index.js +14 -6
  50. package/lib/components/system/SystemBackgroundTasksTable.js +83 -0
  51. package/lib/components/system/SystemSecurityForm.js +69 -0
  52. package/lib/components/system/helpers.js +2 -2
  53. package/lib/components/system/spaces/SystemSpaceForm.js +44 -16
  54. package/lib/components/system/spaces/SystemTenantForm.js +15 -9
  55. package/lib/components/system/spaces/SystemTenantTable.js +15 -10
  56. package/lib/components/table/Table.js +9 -6
  57. package/lib/components/task/builder/Connector.js +21 -10
  58. package/lib/components/task/builder/ConnectorForm.js +1 -1
  59. package/lib/components/task/builder/Node.js +10 -3
  60. package/lib/components/task/builder/NodeForm.js +51 -22
  61. package/lib/components/task/builder/NodeParametersForm.js +5 -2
  62. package/lib/components/task/builder/SvgCanvas.js +13 -4
  63. package/lib/components/task/builder/TaskDefinitionConfigForm.js +113 -0
  64. package/lib/components/task/builder/TreeBuilder.js +27 -9
  65. package/lib/components/task/builder/builder.redux.js +159 -52
  66. package/lib/components/task/builder/helpers.js +5 -3
  67. package/lib/components/task/builder/models.js +84 -12
  68. package/lib/components/task/errors/RunErrorTable.js +1 -1
  69. package/lib/components/task/runs/CreateManualTriggerForm.js +15 -24
  70. package/lib/components/task/runs/RunTable.js +5 -3
  71. package/lib/components/task/workflows/WorkflowForm.js +67 -85
  72. package/lib/helpers/index.js +4 -1
  73. package/lib/index.js +1 -0
  74. package/package.json +2 -2
  75. package/proxyhelper.js +19 -6
@@ -0,0 +1,83 @@
1
+ import { generateTable } from '../table/Table';
2
+ import { fetchSystemBackgroundTasks } from '../../apis';
3
+ import { defineFilter } from '../../helpers';
4
+ import { List } from 'immutable';
5
+ var clientSide = defineFilter(true).startsWith('id', 'id').startsWith('status', 'status').end();
6
+
7
+ var dataSource = function dataSource(_ref) {
8
+ var spaceSlug = _ref.spaceSlug;
9
+ return {
10
+ fn: fetchSystemBackgroundTasks,
11
+ clientSide: clientSide,
12
+ params: function params() {
13
+ return [{
14
+ spaceSlug: spaceSlug
15
+ }];
16
+ },
17
+ transform: function transform(result) {
18
+ return {
19
+ data: result.backgroundTasks
20
+ };
21
+ }
22
+ };
23
+ };
24
+
25
+ var filters = function filters() {
26
+ return function () {
27
+ return [{
28
+ name: 'id',
29
+ label: 'ID',
30
+ type: 'text'
31
+ }, {
32
+ name: 'status',
33
+ label: 'Status',
34
+ type: 'text'
35
+ }];
36
+ };
37
+ };
38
+
39
+ var columns = [{
40
+ value: 'id',
41
+ title: 'ID',
42
+ sortable: false
43
+ }, {
44
+ value: 'createdAt',
45
+ title: 'Created At',
46
+ valueTransform: function valueTransform(_value, row) {
47
+ var createdTransition = row.get('transitions', List()).find(function (t) {
48
+ return t.has('Created');
49
+ });
50
+ return createdTransition ? createdTransition.get('Created') : 'N/A';
51
+ },
52
+ sortable: true
53
+ }, {
54
+ value: 'description',
55
+ title: 'Description',
56
+ sortable: false
57
+ }, {
58
+ value: 'exception',
59
+ title: 'Exception',
60
+ sortable: false
61
+ }, {
62
+ value: 'messages',
63
+ title: 'Messages',
64
+ sortable: false
65
+ }, {
66
+ value: 'Result',
67
+ title: 'Result',
68
+ sortable: false
69
+ }, {
70
+ value: 'status',
71
+ title: 'Status'
72
+ }, {
73
+ value: 'transitions',
74
+ title: 'Transitions',
75
+ sortable: false
76
+ }];
77
+ export var SystemBackgroundTasksTable = generateTable({
78
+ tableOptions: ['spaceSlug'],
79
+ columns: columns,
80
+ filters: filters,
81
+ dataSource: dataSource
82
+ });
83
+ SystemBackgroundTasksTable.displayName = 'SystemBackgroundTasksTable';
@@ -0,0 +1,69 @@
1
+ import { List, fromJS, get } from 'immutable';
2
+ import { generateForm } from '../form/Form';
3
+ import { fetchSystemSecurity, updateSystemSecurity } from '../../apis';
4
+ import { handleFormErrors } from '../form/Form.helpers';
5
+
6
+ var handleSubmit = function handleSubmit() {
7
+ return function (values) {
8
+ return updateSystemSecurity({
9
+ systemSecurity: values.toJS()
10
+ }).then(handleFormErrors());
11
+ };
12
+ };
13
+
14
+ var dataSources = function dataSources() {
15
+ return {
16
+ systemSecurity: {
17
+ fn: fetchSystemSecurity,
18
+ params: [],
19
+ transform: function transform(result) {
20
+ return result.systemSecurity;
21
+ }
22
+ }
23
+ };
24
+ };
25
+
26
+ var fields = function fields() {
27
+ return function (_ref) {
28
+ var systemSecurity = _ref.systemSecurity;
29
+ return systemSecurity && [{
30
+ name: 'allowedSystemIps',
31
+ label: 'Allowed IPs',
32
+ type: 'select',
33
+ options: function options() {
34
+ return fromJS([{
35
+ name: 'description',
36
+ label: 'Description',
37
+ type: 'text'
38
+ }, {
39
+ name: 'value',
40
+ label: 'IP Range',
41
+ type: 'text'
42
+ }]);
43
+ },
44
+ visible: function visible(_ref2) {
45
+ var values = _ref2.values;
46
+ return values.get('allowedSystemIpsEnabled', false);
47
+ },
48
+ initialValue: get(systemSecurity, 'allowedSystemIps', List()),
49
+ serialize: function serialize(_ref3) {
50
+ var values = _ref3.values;
51
+ return values.get('allowedSystemIpsEnabled', false) ? values.get('allowedSystemIps') : [];
52
+ }
53
+ }, {
54
+ name: 'allowedSystemIpsEnabled',
55
+ label: 'Enabled Allowed IP Restrictions?',
56
+ type: 'checkbox',
57
+ initialValue: get(systemSecurity, 'allowedSystemIps', List()).size > 0,
58
+ "transient": true
59
+ }];
60
+ };
61
+ };
62
+
63
+ export var SystemSecurityForm = generateForm({
64
+ formOptions: [],
65
+ dataSources: dataSources,
66
+ fields: fields,
67
+ handleSubmit: handleSubmit
68
+ });
69
+ SystemSecurityForm.displayName = 'SystemSecurityForm';
@@ -396,14 +396,13 @@ export var POSTGRES_FIELDS = function POSTGRES_FIELDS(adapter, persistedObject,
396
396
  };
397
397
  export var adapterProperties = function adapterProperties(values, adapter) {
398
398
  var adapterPrefix = "".concat(adapter, "_");
399
- var properties = values // Remove the other adapters properties.
399
+ return values // Remove the other adapters properties.
400
400
  .filter(function (_v, key) {
401
401
  return key.startsWith(adapterPrefix);
402
402
  }) // Remove the adapter prefix from the property names.
403
403
  .mapKeys(function (key) {
404
404
  return key.replace(adapterPrefix, '');
405
405
  }).toObject();
406
- return properties;
407
406
  };
408
407
  export var propertiesFromAdapters = function propertiesFromAdapters() {
409
408
  var taskDbAdapters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : List();
@@ -464,6 +463,7 @@ export var adapterPropertiesFields = function adapterPropertiesFields(_ref9) {
464
463
  return values.get(formPropertyName(prefix, adapterType)) === property.get('type');
465
464
  },
466
465
  type: property.get('sensitive') ? 'password' : property.has('options') ? 'select' : 'text',
466
+ placeholder: property.get('sensitive') && defaultAdapter.get('adapterClass') === property.get('type') ? '•••••••' : undefined,
467
467
  helpText: property.get('description'),
468
468
  required: function required(_ref11) {
469
469
  var values = _ref11.values;
@@ -1,5 +1,5 @@
1
1
  import { fetchSpace, updateSpace } from '../../../apis';
2
- import { get } from 'immutable';
2
+ import { fromJS, get } from 'immutable';
3
3
  import { generateForm } from '../../form/Form';
4
4
  import { handleFormErrors } from '../../form/Form.helpers';
5
5
 
@@ -10,7 +10,7 @@ var dataSources = function dataSources(_ref) {
10
10
  fn: fetchSpace,
11
11
  params: slug && [{
12
12
  slug: slug,
13
- include: 'details'
13
+ include: 'details,allowedIps'
14
14
  }],
15
15
  transform: function transform(result) {
16
16
  return result.space;
@@ -29,10 +29,9 @@ var handleSubmit = function handleSubmit(_ref2) {
29
29
  };
30
30
  };
31
31
 
32
- var fields = function fields(_ref3) {
33
- var slug = _ref3.slug;
34
- return function (_ref4) {
35
- var space = _ref4.space;
32
+ var fields = function fields() {
33
+ return function (_ref3) {
34
+ var space = _ref3.space;
36
35
  return space && [{
37
36
  name: 'name',
38
37
  label: 'Name',
@@ -52,9 +51,9 @@ var fields = function fields(_ref3) {
52
51
  type: 'checkbox',
53
52
  "transient": true,
54
53
  initialValue: (get(space, 'sharedBundleBase') || '') !== '',
55
- onChange: function onChange(_ref5, _ref6) {
56
- var values = _ref5.values;
57
- var setValue = _ref6.setValue;
54
+ onChange: function onChange(_ref4, _ref5) {
55
+ var values = _ref4.values;
56
+ var setValue = _ref5.setValue;
58
57
 
59
58
  if (values.get('sharedBundleBase') !== '') {
60
59
  setValue('sharedBundleBase', '');
@@ -70,12 +69,12 @@ var fields = function fields(_ref3) {
70
69
  type: 'text',
71
70
  initialValue: get(space, 'sharedBundleBase') || '',
72
71
  helpText: 'Directory used as path prefix for bundles.',
73
- visible: function visible(_ref7) {
74
- var values = _ref7.values;
72
+ visible: function visible(_ref6) {
73
+ var values = _ref6.values;
75
74
  return values.get('sharedBundle');
76
75
  },
77
- required: function required(_ref8) {
78
- var values = _ref8.values;
76
+ required: function required(_ref7) {
77
+ var values = _ref7.values;
79
78
  return values.get('sharedBundle');
80
79
  }
81
80
  }, {
@@ -83,14 +82,43 @@ var fields = function fields(_ref3) {
83
82
  label: 'Bundle Path',
84
83
  type: 'text',
85
84
  initialValue: get(space, 'bundlePath') || '',
86
- visible: function visible(_ref9) {
85
+ visible: function visible(_ref8) {
86
+ var values = _ref8.values;
87
+ return get(values, 'sharedBundle');
88
+ },
89
+ required: function required(_ref9) {
87
90
  var values = _ref9.values;
88
91
  return get(values, 'sharedBundle');
92
+ }
93
+ }, {
94
+ name: 'allowedIps',
95
+ label: 'Allowed IPs',
96
+ type: 'select',
97
+ options: function options() {
98
+ return fromJS([{
99
+ name: 'description',
100
+ label: 'Description',
101
+ type: 'text'
102
+ }, {
103
+ name: 'value',
104
+ label: 'IP Range',
105
+ type: 'text'
106
+ }]);
89
107
  },
90
- required: function required(_ref10) {
108
+ visible: function visible(_ref10) {
91
109
  var values = _ref10.values;
92
- return get(values, 'sharedBundle');
110
+ return values.get('allowedIpsEnabled', false);
111
+ },
112
+ initialValue: get(space, 'allowedIps', []),
113
+ serialize: function serialize(_ref11) {
114
+ var values = _ref11.values;
115
+ return values.get('allowedIpsEnabled', false) ? values.get('allowedIps') : [];
93
116
  }
117
+ }, {
118
+ name: 'allowedIpsEnabled',
119
+ label: 'Enabled Allowed IP Restrictions?',
120
+ type: 'checkbox',
121
+ initialValue: get(space, 'allowedIpsEnabled', false) || false
94
122
  }];
95
123
  };
96
124
  };
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import { get, getIn } from 'immutable';
4
4
  import { generateForm } from '../../form/Form';
5
- import { createTenant, fetchSystemDefaultTaskDbAdapter, fetchTenant, updateTenant } from '../../../apis/system';
5
+ import { createTenant, fetchSystemDefaultTaskDbAdapter, fetchTenant, updateTenant } from '../../../apis';
6
6
  import { slugify } from '../../../helpers';
7
7
  import { VALIDATE_DB_ADAPTERS, ORACLE_FIELDS, MSSQL_FIELDS, POSTGRES_FIELDS, adapterProperties } from '../helpers';
8
8
  import { handleFormErrors } from '../../form/Form.helpers';
@@ -34,26 +34,32 @@ var dataSources = function dataSources(_ref) {
34
34
  var handleSubmit = function handleSubmit(_ref2) {
35
35
  var slug = _ref2.slug;
36
36
  return function (values) {
37
- var tenant = {
37
+ var authenticationSecret = values.get('authenticationSecret') ? {
38
+ authenticationSecret: values.get('authenticationSecret')
39
+ } : {};
40
+ var deployment = slug ? {
41
+ deployment: {
42
+ image: values.get('image'),
43
+ replicas: parseInt(values.get('replicas'))
44
+ }
45
+ } : {};
46
+
47
+ var tenant = _objectSpread(_objectSpread({}, authenticationSecret), {}, {
38
48
  space: {
39
49
  slug: values.get('slug'),
40
50
  name: values.get('name')
41
51
  },
42
52
  task: _objectSpread(_objectSpread({
43
53
  autoCreateDatabase: values.get('task_autoCreateDatabase') ? 'true' : 'false'
44
- }, slug ? {
45
- deployment: {
46
- image: values.get('image'),
47
- replicas: parseInt(values.get('replicas'))
48
- }
49
- } : {}), {}, {
54
+ }, deployment), {}, {
50
55
  databaseAdapter: {
51
56
  type: values.get('task_databaseAdapter_type'),
52
57
  properties: adapterProperties(values, values.get('task_databaseAdapter_type'))
53
58
  }
54
59
  }),
55
60
  users: values.get('users')
56
- };
61
+ });
62
+
57
63
  return slug ? updateTenant({
58
64
  slug: slug,
59
65
  tenant: tenant
@@ -1,5 +1,5 @@
1
1
  import { generateTable } from '../../table/Table';
2
- import { fetchTenants } from '../../../apis/system';
2
+ import { fetchTenants } from '../../../apis';
3
3
  import { defineFilter } from '../../../helpers';
4
4
  var clientSide = defineFilter(true).startsWith('slug', 'slug').startsWith('space.name', 'space.name').end();
5
5
 
@@ -19,15 +19,20 @@ var dataSource = function dataSource() {
19
19
  };
20
20
  };
21
21
 
22
- var filters = [{
23
- name: 'slug',
24
- label: 'Slug',
25
- type: 'text'
26
- }, {
27
- name: 'space.name',
28
- label: 'Name',
29
- type: 'text'
30
- }];
22
+ var filters = function filters() {
23
+ return function () {
24
+ return [{
25
+ name: 'slug',
26
+ label: 'Slug',
27
+ type: 'text'
28
+ }, {
29
+ name: 'space.name',
30
+ label: 'Name',
31
+ type: 'text'
32
+ }];
33
+ };
34
+ };
35
+
31
36
  var columns = [{
32
37
  value: 'slug',
33
38
  title: 'Slug',
@@ -10,7 +10,7 @@ import { compose, lifecycle } from 'recompose';
10
10
  import { List, Map, mergeDeep } from 'immutable';
11
11
  import { ComponentConfigContext } from '../common/ComponentConfigContext';
12
12
  import { connect, dispatch } from '../../store';
13
- import { configureTable, mountTable, unmountTable, isClientSide, filterFormKey } from './Table.redux';
13
+ import { configureTable, filterFormKey, isClientSide, mountTable, unmountTable } from './Table.redux';
14
14
  import { generateKey } from '../../helpers';
15
15
  import { generateForm } from '../form/Form';
16
16
 
@@ -340,7 +340,8 @@ export var buildTableHeaderCell = function buildTableHeaderCell(props) {
340
340
  components = props.components,
341
341
  columnComponents = props.columnComponents,
342
342
  renderOptions = props.renderOptions,
343
- tableOptions = props.tableOptions;
343
+ tableOptions = props.tableOptions,
344
+ appliedFilters = props.appliedFilters;
344
345
  var HeaderCell = columnComponents.getIn([column.get('value'), 'HeaderCell'], components.HeaderCell);
345
346
  var sorting = column === props.sortColumn && props.sortDirection;
346
347
  var sortable = props.sortable && column.get('sortable');
@@ -352,7 +353,8 @@ export var buildTableHeaderCell = function buildTableHeaderCell(props) {
352
353
  renderOptions: renderOptions,
353
354
  sorting: sorting,
354
355
  sortable: sortable,
355
- tableOptions: tableOptions
356
+ tableOptions: tableOptions,
357
+ filters: appliedFilters
356
358
  }));
357
359
  };
358
360
  };
@@ -379,7 +381,7 @@ export var buildTableBodyRows = function buildTableBodyRows(props) {
379
381
  tableOptions = props.tableOptions;
380
382
  var BodyRow = components.BodyRow;
381
383
  var EmptyBodyRow = components.EmptyBodyRow;
382
- var tableRows = rows.size > 0 ? rows.map(function (row, index) {
384
+ return rows.size > 0 ? rows.map(function (row, index) {
383
385
  var cells = buildTableBodyCells(props, row, index);
384
386
  return /*#__PURE__*/React.createElement(KeyWrapper, {
385
387
  key: "row-".concat(index)
@@ -400,7 +402,6 @@ export var buildTableBodyRows = function buildTableBodyRows(props) {
400
402
  tableOptions: tableOptions,
401
403
  error: props.error
402
404
  });
403
- return tableRows;
404
405
  };
405
406
  export var buildTableBodyCells = function buildTableBodyCells(props, row, rowIndex) {
406
407
  var tableKey = props.tableKey,
@@ -409,6 +410,7 @@ export var buildTableBodyCells = function buildTableBodyCells(props, row, rowInd
409
410
  columns = props.columns,
410
411
  columnSet = props.columnSet,
411
412
  columnComponents = props.columnComponents,
413
+ appliedFilters = props.appliedFilters,
412
414
  renderOptions = props.renderOptions,
413
415
  tableOptions = props.tableOptions;
414
416
  return fromColumnSet(columns, columnSet).map(function (column, index) {
@@ -424,6 +426,7 @@ export var buildTableBodyCells = function buildTableBodyCells(props, row, rowInd
424
426
  value: value,
425
427
  rows: rows,
426
428
  column: column,
429
+ filters: appliedFilters,
427
430
  renderOptions: renderOptions,
428
431
  tableOptions: tableOptions
429
432
  }));
@@ -513,7 +516,7 @@ var onSortColumn = function onSortColumn(tableKey, column) {
513
516
  };
514
517
  };
515
518
 
516
- var mapStateToProps = function mapStateToProps(state) {
519
+ var mapStateToProps = function mapStateToProps() {
517
520
  return function (state, props) {
518
521
  return state.getIn(['tables', props.tableKey], Map()).toObject();
519
522
  };
@@ -73,8 +73,8 @@ export var Connector = /*#__PURE__*/function (_Component) {
73
73
  });
74
74
  } // when dropping a new connector the `headNode` prop will be undefined
75
75
  else if (_this.props.headNode) {
76
- _this.setHead(_this.props.headNode.position, false);
77
- }
76
+ _this.setHead(_this.props.headNode.position, false);
77
+ }
78
78
  };
79
79
 
80
80
  _this.dropTail = function () {
@@ -126,21 +126,32 @@ export var Connector = /*#__PURE__*/function (_Component) {
126
126
  var dy = y2 - y1;
127
127
  var length = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
128
128
  var angle = Math.atan2(dy, dx) * 180 / Math.PI + 180;
129
- var attribute = isIE11 ? 'transform' : 'style';
130
- var connectorValue = isIE11 ? "translate(".concat(x2, " ").concat(y2, ") rotate(").concat(angle, ")") : "transform: translate(".concat(x2, "px, ").concat(y2, "px) rotate(").concat(angle, "deg)");
131
- var connectorLabelValue = isIE11 ? "translate(".concat(x1 + dx / 2, " ").concat(y1 + dy / 2, ")") : "transform: translate(".concat(x1 + dx / 2, "px, ").concat(y1 + dy / 2, "px)");
129
+ var connectorValue = isIE11 ? "translate(".concat(x2, " ").concat(y2, ") rotate(").concat(angle, ")") : "translate(".concat(x2, "px, ").concat(y2, "px) rotate(").concat(angle, "deg)");
130
+ var connectorLabelValue = isIE11 ? "translate(".concat(x1 + dx / 2, " ").concat(y1 + dy / 2, ")") : "translate(".concat(x1 + dx / 2, "px, ").concat(y1 + dy / 2, "px)");
131
+
132
+ if (isIE11) {
133
+ _this.connector.current.transform = connectorValue;
134
+
135
+ if (_this.connectorLabel.current) {
136
+ _this.connectorLabel.current.transform = connectorLabelValue;
137
+ }
138
+ } else {
139
+ _this.connector.current.style.transform = connectorValue;
140
+
141
+ if (_this.connectorLabel.current) {
142
+ _this.connectorLabel.current.style.transform = connectorLabelValue;
143
+ }
144
+ } // this.connector.current.setAttribute(attribute, connectorValue);
132
145
 
133
- _this.connector.current.setAttribute(attribute, connectorValue);
134
146
 
135
147
  if (_this.connectorTail.current) {
136
148
  _this.connectorTail.current.setAttribute('cx', length);
137
149
  }
138
150
 
139
- _this.connectorBody.current.setAttribute('x2', length);
151
+ _this.connectorBody.current.setAttribute('x2', length); // if (this.connectorLabel.current) {
152
+ // this.connectorLabel.current.setAttribute(attribute, connectorLabelValue);
153
+ // }
140
154
 
141
- if (_this.connectorLabel.current) {
142
- _this.connectorLabel.current.setAttribute(attribute, connectorLabelValue);
143
- }
144
155
  };
145
156
 
146
157
  _this.connector = createRef();
@@ -72,7 +72,7 @@ var fields = function fields(_ref2) {
72
72
  var handleSubmit = function handleSubmit(_ref4) {
73
73
  var connector = _ref4.connector;
74
74
  return function (values) {
75
- return values.toObject();
75
+ return connector.merge(values);
76
76
  };
77
77
  };
78
78
 
@@ -130,9 +130,16 @@ export var Node = /*#__PURE__*/function (_Component) {
130
130
  }, {
131
131
  key: "draw",
132
132
  value: function draw() {
133
- var attribute = isIE11 ? 'transform' : 'style';
134
- var value = isIE11 ? "translate(".concat(this.position.x, " ").concat(this.position.y, ")") : "transform: translate(".concat(this.position.x, "px, ").concat(this.position.y, "px)");
135
- this.el.current.setAttribute(attribute, value);
133
+ // const attribute = isIE11 ? 'transform' : 'style';
134
+ // const value = isIE11
135
+ // ? `translate(${this.position.x} ${this.position.y})`
136
+ // : `transform: translate(${this.position.x}px, ${this.position.y}px)`;
137
+ // this.el.current.setAttribute(attribute, value);
138
+ if (isIE11) {
139
+ this.el.current.transform = "translate(".concat(this.position.x, " ").concat(this.position.y, ")");
140
+ } else {
141
+ this.el.current.style.transform = "translate(".concat(this.position.x, "px, ").concat(this.position.y, "px)");
142
+ }
136
143
  }
137
144
  }, {
138
145
  key: "render",
@@ -3,6 +3,8 @@ import { List } from 'immutable';
3
3
  import { generateForm } from '../../form/Form';
4
4
  import { NodeMessage } from './models';
5
5
  import { buildBindings } from './helpers';
6
+ import { fetchForm } from '../../../apis';
7
+ import { checkOmittedParameters, generateTaskDefinition } from './TaskDefinitionConfigForm';
6
8
 
7
9
  var dataSources = function dataSources(_ref) {
8
10
  var tasks = _ref.tasks,
@@ -18,6 +20,33 @@ var dataSources = function dataSources(_ref) {
18
20
  return node.parameters;
19
21
  },
20
22
  params: [node]
23
+ },
24
+ form: {
25
+ fn: function fn(node) {
26
+ return fetchForm({
27
+ kappSlug: node.parameters.find(function (parameter) {
28
+ return parameter.id === 'kappSlug';
29
+ }).value,
30
+ formSlug: node.parameters.find(function (parameter) {
31
+ return parameter.id === 'formSlug';
32
+ }).value,
33
+ include: 'fields,kapp'
34
+ }).then(function (data) {
35
+ return data.form;
36
+ });
37
+ },
38
+ params: generateTaskDefinition(tasks.get(node.definitionId)) ? [node] : null
39
+ },
40
+ task: {
41
+ fn: function fn(node, form) {
42
+ return form ? generateTaskDefinition(tasks.get(node.definitionId))({
43
+ form: form.toJS()
44
+ }) : tasks.get(node.definitionId);
45
+ },
46
+ params: function params(_ref2) {
47
+ var form = _ref2.form;
48
+ return generateTaskDefinition(tasks.get(node.definitionId)) ? form ? [node, form] : null : [node, null];
49
+ }
21
50
  }
22
51
  };
23
52
  };
@@ -34,26 +63,26 @@ var getOptions = function getOptions(menu) {
34
63
  };
35
64
 
36
65
  var checkDependsOn = function checkDependsOn(parameter) {
37
- return !parameter.dependsOnId || function (_ref2) {
38
- var values = _ref2.values;
66
+ return !parameter.dependsOnId || function (_ref3) {
67
+ var values = _ref3.values;
39
68
  return values.get("parameter_".concat(parameter.dependsOnId)) === parameter.dependsOnValue;
40
69
  };
41
70
  };
42
71
 
43
- var fields = function fields(_ref3) {
44
- var tasks = _ref3.tasks,
45
- tree = _ref3.tree,
46
- node = _ref3.node;
47
- return function (_ref4) {
48
- var bindings = _ref4.bindings;
72
+ var fields = function fields(_ref4) {
73
+ var tasks = _ref4.tasks,
74
+ tree = _ref4.tree,
75
+ node = _ref4.node;
76
+ return function (_ref5) {
77
+ var bindings = _ref5.bindings;
49
78
  return bindings && [{
50
79
  name: 'name',
51
80
  label: 'Name',
52
81
  type: 'text',
53
82
  initialValue: node.name,
54
83
  required: true,
55
- constraint: function constraint(_ref5) {
56
- var values = _ref5.values;
84
+ constraint: function constraint(_ref6) {
85
+ var values = _ref6.values;
57
86
  return tree.nodes.some(function (other) {
58
87
  return other.name === values.get('name') && other.id !== node.id;
59
88
  }) ? 'This name is already used by another node' : values.get('name').length > 128 ? 'Name cannot exceed 128 characters' : true;
@@ -98,14 +127,14 @@ var fields = function fields(_ref3) {
98
127
  initialValue: parameter.value,
99
128
  options: parameter.menu ? getOptions(parameter.menu) : bindings,
100
129
  "transient": true,
101
- visible: checkDependsOn(parameter)
130
+ visible: checkDependsOn(parameter) && checkOmittedParameters(node, parameter)
102
131
  };
103
132
  })), [{
104
133
  name: 'parameters',
105
134
  type: null,
106
135
  visible: false,
107
- serialize: function serialize(_ref6) {
108
- var values = _ref6.values;
136
+ serialize: function serialize(_ref7) {
137
+ var values = _ref7.values;
109
138
  return node.parameters.map(function (parameter) {
110
139
  return parameter.set('value', values.get("parameter_".concat(parameter.id)));
111
140
  });
@@ -122,8 +151,8 @@ var fields = function fields(_ref3) {
122
151
  language: 'erb',
123
152
  options: bindings,
124
153
  "transient": true,
125
- visible: function visible(_ref7) {
126
- var values = _ref7.values;
154
+ visible: function visible(_ref8) {
155
+ var values = _ref8.values;
127
156
  return values.get('defers', false);
128
157
  }
129
158
  }, {
@@ -138,8 +167,8 @@ var fields = function fields(_ref3) {
138
167
  language: 'erb',
139
168
  options: bindings,
140
169
  "transient": true,
141
- visible: function visible(_ref8) {
142
- var values = _ref8.values;
170
+ visible: function visible(_ref9) {
171
+ var values = _ref9.values;
143
172
  return values.get('defers', false);
144
173
  }
145
174
  }, {
@@ -158,8 +187,8 @@ var fields = function fields(_ref3) {
158
187
  name: 'messages',
159
188
  type: null,
160
189
  visible: false,
161
- serialize: function serialize(_ref9) {
162
- var values = _ref9.values;
190
+ serialize: function serialize(_ref10) {
191
+ var values = _ref10.values;
163
192
  return List(values.get('defers') ? ['Create', 'Update', 'Complete'] : ['Complete']).map(function (type) {
164
193
  return NodeMessage({
165
194
  type: type,
@@ -174,10 +203,10 @@ var fields = function fields(_ref3) {
174
203
  };
175
204
  };
176
205
 
177
- var handleSubmit = function handleSubmit(_ref10) {
178
- var node = _ref10.node;
206
+ var handleSubmit = function handleSubmit(_ref11) {
207
+ var node = _ref11.node;
179
208
  return function (values) {
180
- return values.toObject();
209
+ return node.merge(values);
181
210
  };
182
211
  };
183
212