@kineticdata/react 6.0.5 → 6.1.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/CHANGELOG.md +116 -94
- package/lib/apis/core/attributeDefinitions.js +9 -6
- package/lib/apis/core/integrations.js +61 -0
- package/lib/apis/core/submissions.js +52 -15
- package/lib/apis/http.js +16 -2
- package/lib/apis/index.js +24 -0
- package/lib/apis/integrator/index.js +262 -0
- package/lib/apis/system/index.js +64 -12
- package/lib/apis/task/index.js +9 -2
- package/lib/components/agent/filestore/FilestoreForm.js +1 -1
- package/lib/components/common/AttributeSelect.js +10 -2
- package/lib/components/common/BridgeSelect.js +2 -1
- package/lib/components/common/ConnectionSelect.js +72 -0
- package/lib/components/common/FormSelect.js +2 -1
- package/lib/components/common/StaticSelect.js +15 -6
- package/lib/components/common/TableInput.js +4 -1
- package/lib/components/common/TeamSelect.js +2 -1
- package/lib/components/common/ToastContainer.js +34 -10
- package/lib/components/common/Typeahead.js +59 -23
- package/lib/components/common/UserSelect.js +2 -1
- package/lib/components/common/authentication/RequestInterceptor.js +1 -1
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +3 -0
- package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
- package/lib/components/core/category/CategoryForm.js +4 -1
- package/lib/components/core/category/CategoryTable.js +2 -2
- package/lib/components/core/core_form/CoreForm.js +18 -10
- package/lib/components/core/file_resource/FileResourceForm.js +2 -1
- package/lib/components/core/file_resource/FileResourceTable.js +14 -7
- package/lib/components/core/form/FormForm.js +42 -19
- package/lib/components/core/form/FormTable.js +14 -14
- package/lib/components/core/form_type/FormTypeForm.js +3 -0
- package/lib/components/core/i18n/Moment.js +1 -0
- package/lib/components/core/integration/IntegrationForm.js +232 -0
- package/lib/components/core/integration/IntegrationTable.js +139 -0
- package/lib/components/core/kapp/KappForm.js +18 -5
- package/lib/components/core/kapp/KappTable.js +3 -3
- package/lib/components/core/log/LogTable.js +1 -1
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
- package/lib/components/core/space/SpaceForm.js +3 -22
- package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
- package/lib/components/core/submission/FormSubmissionTable.js +12 -7
- package/lib/components/core/submission/KappSubmissionTable.js +4 -4
- package/lib/components/core/submission/SubmissionForm.js +3 -1
- package/lib/components/core/team/TeamTable.js +17 -7
- package/lib/components/core/user/UserTable.js +18 -18
- package/lib/components/core/webapi/WebApiForm.js +5 -2
- package/lib/components/core/webapi/WebApiTable.js +2 -2
- package/lib/components/core/webhook/WebhookForm.js +43 -33
- package/lib/components/core/webhook/WebhookTable.js +16 -16
- package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
- package/lib/components/form/Form.helpers.js +10 -4
- package/lib/components/form/Form.js +250 -168
- package/lib/components/form/Form.models.js +6 -1
- package/lib/components/form/FormState.js +9 -5
- package/lib/components/form/defaults/CodeField.js +44 -1
- package/lib/components/index.js +84 -3
- package/lib/components/integrator/connection/ConnectionForm.js +112 -0
- package/lib/components/integrator/connection/ConnectionTable.js +80 -0
- package/lib/components/integrator/connection/config_fields/http.js +570 -0
- package/lib/components/integrator/integrationTypes.js +98 -0
- package/lib/components/integrator/operation/OperationForm.js +128 -0
- package/lib/components/integrator/operation/OperationTable.js +64 -0
- package/lib/components/integrator/operation/config_fields/http.js +184 -0
- package/lib/components/system/SystemSecurityForm.js +1 -1
- package/lib/components/system/SystemTaskAdapterForm.js +9 -9
- package/lib/components/system/helpers.js +123 -100
- package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
- package/lib/components/system/spaces/SystemTenantForm.js +276 -104
- package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
- package/lib/components/system/spaces/SystemTenantTable.js +20 -16
- package/lib/components/table/Table.redux.js +1 -1
- package/lib/components/task/builder/ConnectorForm.js +11 -7
- package/lib/components/task/builder/Node.js +11 -2
- package/lib/components/task/builder/NodeForm.js +93 -22
- package/lib/components/task/builder/NodeParametersForm.js +29 -17
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
- package/lib/components/task/builder/TreeBuilder.js +24 -3
- package/lib/components/task/builder/builder.redux.js +310 -185
- package/lib/components/task/builder/constants.js +10 -2
- package/lib/components/task/builder/helpers.js +199 -79
- package/lib/components/task/builder/models.js +7 -6
- package/lib/components/task/category/TaskCategoryTable.js +3 -3
- package/lib/components/task/common/UsageTable.js +1 -1
- package/lib/components/task/handlers/HandlerTable.js +35 -19
- package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
- package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
- package/lib/components/task/runs/RunTable.js +4 -4
- package/lib/components/task/runs/RunTaskTable.js +1 -1
- package/lib/components/task/sources/SourceTable.js +2 -2
- package/lib/components/task/triggers/TriggerTable.js +2 -2
- package/lib/components/task/workflows/LinkedWorkflowTable.js +2 -2
- package/lib/components/task/workflows/WorkflowForm.js +27 -8
- package/lib/components/task/workflows/WorkflowTable.js +2 -2
- package/lib/helpers/index.js +289 -72
- package/package.json +5 -3
- package/proxyhelper.js +28 -3
|
@@ -16,6 +16,7 @@ var _store = require("../../../store");
|
|
|
16
16
|
var _models = require("./models");
|
|
17
17
|
var _apis = require("../../../apis");
|
|
18
18
|
var _helpers = require("./helpers");
|
|
19
|
+
var _constants = require("./constants");
|
|
19
20
|
var mountTreeBuilder = exports.mountTreeBuilder = function mountTreeBuilder(treeKey) {
|
|
20
21
|
return (0, _store.dispatch)('TREE_MOUNT', {
|
|
21
22
|
treeKey: treeKey
|
|
@@ -43,7 +44,7 @@ var remember = function remember(state, treeKey) {
|
|
|
43
44
|
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_CONFIGURE', function (_ref) {
|
|
44
45
|
var payload = _ref.payload;
|
|
45
46
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
|
46
|
-
var name, sourceGroup, sourceName, treeKey, platformSourceName, webApiProps, workflowProps, _yield$all, _yield$all2, _yield$all2$, tree, treeError, _yield$all2$2, workflow, workflowError, categories, _yield$all2$3, webApi, webApiError, workflowObject, workflowObjectError, _yield$call, platformItem, platformItemError, _yield$call2, linkedWorkflow, linkedError, treeObject, loadError;
|
|
47
|
+
var _treeObject$treeJson, _treeObject$treeJson$, name, sourceGroup, sourceName, treeKey, platformSourceName, webApiProps, workflowProps, _yield$all, _yield$all2, _yield$all2$, tree, treeError, _yield$all2$2, workflow, workflowError, categories, _yield$all2$3$connect, connections, _yield$all2$3, webApi, webApiError, kappSlug, formSlug, workflowObject, workflowObjectError, _yield$call, platformItem, platformItemError, _yield$call2, linkedWorkflow, linkedError, slugs, treeObject, loadError, operationIds;
|
|
47
48
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
48
49
|
while (1) switch (_context.prev = _context.next) {
|
|
49
50
|
case 0:
|
|
@@ -66,13 +67,15 @@ var remember = function remember(state, treeKey) {
|
|
|
66
67
|
(0, _effects.call)(_apis.fetchTaskCategories, {
|
|
67
68
|
include: 'handlers.results,handlers.parameters,trees.parameters,trees.inputs,trees.outputs'
|
|
68
69
|
}),
|
|
70
|
+
// Fetch connections
|
|
71
|
+
(0, _effects.call)(_apis.fetchConnections),
|
|
69
72
|
// Fetch the webAPI if applicable
|
|
70
73
|
webApiProps ? (0, _effects.call)(_apis.fetchWebApi, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, webApiProps), {}, {
|
|
71
74
|
include: 'details,securityPolicies'
|
|
72
75
|
})) : {}]);
|
|
73
76
|
case 6:
|
|
74
77
|
_yield$all = _context.sent;
|
|
75
|
-
_yield$all2 = (0, _slicedToArray2["default"])(_yield$all,
|
|
78
|
+
_yield$all2 = (0, _slicedToArray2["default"])(_yield$all, 5);
|
|
76
79
|
_yield$all2$ = _yield$all2[0];
|
|
77
80
|
tree = _yield$all2$.tree;
|
|
78
81
|
treeError = _yield$all2$.error;
|
|
@@ -80,76 +83,173 @@ var remember = function remember(state, treeKey) {
|
|
|
80
83
|
workflow = _yield$all2$2.workflow;
|
|
81
84
|
workflowError = _yield$all2$2.error;
|
|
82
85
|
categories = _yield$all2[2].categories;
|
|
83
|
-
_yield$all2$3 = _yield$all2[3];
|
|
86
|
+
_yield$all2$3$connect = _yield$all2[3].connections;
|
|
87
|
+
connections = _yield$all2$3$connect === void 0 ? [] : _yield$all2$3$connect;
|
|
88
|
+
_yield$all2$3 = _yield$all2[4];
|
|
84
89
|
webApi = _yield$all2$3.webApi;
|
|
85
90
|
webApiError = _yield$all2$3.error;
|
|
91
|
+
kappSlug = (webApiProps === null || webApiProps === void 0 ? void 0 : webApiProps.kappSlug) || (workflowProps === null || workflowProps === void 0 ? void 0 : workflowProps.kappSlug);
|
|
92
|
+
formSlug = workflowProps === null || workflowProps === void 0 ? void 0 : workflowProps.formSlug;
|
|
86
93
|
workflowObject = workflow;
|
|
87
94
|
workflowObjectError = workflowError; // If a tree was fetched and the tree has platform item data, fetch the
|
|
88
95
|
// platform item and then retrieve the workflow
|
|
89
96
|
if (!(tree && tree.platformItemId && tree.platformItemType)) {
|
|
90
|
-
_context.next =
|
|
97
|
+
_context.next = 42;
|
|
91
98
|
break;
|
|
92
99
|
}
|
|
93
|
-
_context.next =
|
|
100
|
+
_context.next = 27;
|
|
94
101
|
return (0, _effects.call)(_apis.fetchPlatformItem, {
|
|
95
102
|
type: tree.platformItemType,
|
|
96
103
|
id: tree.platformItemId
|
|
97
104
|
});
|
|
98
|
-
case
|
|
105
|
+
case 27:
|
|
99
106
|
_yield$call = _context.sent;
|
|
100
107
|
platformItem = _yield$call.platformItem;
|
|
101
108
|
platformItemError = _yield$call.error;
|
|
102
109
|
if (!platformItem) {
|
|
103
|
-
_context.next =
|
|
110
|
+
_context.next = 41;
|
|
104
111
|
break;
|
|
105
112
|
}
|
|
106
|
-
_context.next =
|
|
113
|
+
_context.next = 33;
|
|
107
114
|
return (0, _effects.call)(_apis.fetchWorkflow, (0, _objectSpread2["default"])({
|
|
108
115
|
workflowId: sourceGroup
|
|
109
116
|
}, getPlatformItemSlugs(platformItem)));
|
|
110
|
-
case
|
|
117
|
+
case 33:
|
|
111
118
|
_yield$call2 = _context.sent;
|
|
112
119
|
linkedWorkflow = _yield$call2.workflow;
|
|
113
120
|
linkedError = _yield$call2.error;
|
|
114
121
|
workflowObject = linkedWorkflow;
|
|
115
122
|
workflowObjectError = linkedError;
|
|
116
|
-
|
|
123
|
+
// If workflow was loaded via the old tree route, set the kapp and
|
|
124
|
+
// form slugs from the platform item
|
|
125
|
+
if (!workflowProps) {
|
|
126
|
+
slugs = getPlatformItemSlugs(platformItem);
|
|
127
|
+
if (!kappSlug) {
|
|
128
|
+
kappSlug = slugs === null || slugs === void 0 ? void 0 : slugs.kappSlug;
|
|
129
|
+
}
|
|
130
|
+
if (!formSlug) {
|
|
131
|
+
formSlug = slugs === null || slugs === void 0 ? void 0 : slugs.formSlug;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
_context.next = 42;
|
|
117
135
|
break;
|
|
118
|
-
case
|
|
136
|
+
case 41:
|
|
119
137
|
// If platform item was not retrieved, show an error because we don't
|
|
120
138
|
// want to render a workflow using a tree route
|
|
121
139
|
workflowObjectError = platformItemError || 'Failed to load linked workflow.';
|
|
122
|
-
case
|
|
140
|
+
case 42:
|
|
123
141
|
// If workflow, set sourceName to platformSourceName since the value is
|
|
124
142
|
// needed when creating new runs
|
|
125
143
|
treeObject = workflowObject ? (0, _objectSpread2["default"])({
|
|
126
144
|
sourceName: platformSourceName
|
|
127
145
|
}, workflowObject) : tree;
|
|
128
|
-
loadError = workflowObjectError || treeError || webApiError;
|
|
129
|
-
|
|
130
|
-
|
|
146
|
+
loadError = workflowObjectError || treeError || webApiError; // Find the operation ids of any integration nodes
|
|
147
|
+
operationIds = (treeObject === null || treeObject === void 0 ? void 0 : (_treeObject$treeJson = treeObject.treeJson) === null || _treeObject$treeJson === void 0 ? void 0 : (_treeObject$treeJson$ = _treeObject$treeJson.nodes) === null || _treeObject$treeJson$ === void 0 ? void 0 : _treeObject$treeJson$.map(function (node) {
|
|
148
|
+
var _node$parameters$find;
|
|
149
|
+
return node.definitionId.startsWith("".concat(_constants.ADVANCED_HANDLER_NAME_INTEGRATION, "_v")) ? (_node$parameters$find = node.parameters.find(function (p) {
|
|
150
|
+
return p.id === 'operation';
|
|
151
|
+
})) === null || _node$parameters$find === void 0 ? void 0 : _node$parameters$find.value : null;
|
|
152
|
+
}).filter(Boolean)) || [];
|
|
153
|
+
_context.next = 47;
|
|
154
|
+
return (0, _effects.all)([(0, _effects.put)((0, _store.action)('TREE_LOADED', {
|
|
131
155
|
categories: categories,
|
|
132
|
-
|
|
133
|
-
|
|
156
|
+
connections: connections,
|
|
157
|
+
kappSlug: kappSlug,
|
|
158
|
+
formSlug: formSlug,
|
|
134
159
|
treeKey: treeKey,
|
|
135
160
|
tree:
|
|
136
161
|
// Don't set the tree if it's for a webApi but the webApi errors
|
|
137
162
|
treeObject && (!webApiProps || webApi) ? (0, _models.deserializeTree)(treeObject) : null,
|
|
138
163
|
webApi: webApi ? (0, _models.deserializeWebApi)(webApi, webApiProps.kappSlug) : null,
|
|
139
164
|
error: loadError ? loadError.message || loadError : null
|
|
140
|
-
}))
|
|
141
|
-
|
|
142
|
-
|
|
165
|
+
})), operationIds.length > 0 ? (0, _effects.put)((0, _store.action)('TREE_LOAD_OPERATIONS', {
|
|
166
|
+
treeKey: treeKey,
|
|
167
|
+
operationIds: operationIds
|
|
168
|
+
})) : null]);
|
|
169
|
+
case 47:
|
|
170
|
+
_context.next = 52;
|
|
143
171
|
break;
|
|
144
|
-
case
|
|
145
|
-
_context.prev =
|
|
172
|
+
case 49:
|
|
173
|
+
_context.prev = 49;
|
|
146
174
|
_context.t0 = _context["catch"](0);
|
|
147
175
|
console.error('Caught error loading tree', _context.t0);
|
|
148
|
-
case
|
|
176
|
+
case 52:
|
|
149
177
|
case "end":
|
|
150
178
|
return _context.stop();
|
|
151
179
|
}
|
|
152
|
-
}, _callee, null, [[0,
|
|
180
|
+
}, _callee, null, [[0, 49]]);
|
|
181
|
+
})();
|
|
182
|
+
}));
|
|
183
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_LOAD_CONNECTIONS', function (_ref2) {
|
|
184
|
+
var payload = _ref2.payload;
|
|
185
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
|
|
186
|
+
var treeKey, _yield$call3, _yield$call3$connecti, connections;
|
|
187
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
|
|
188
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
189
|
+
case 0:
|
|
190
|
+
_context2.prev = 0;
|
|
191
|
+
treeKey = payload.treeKey;
|
|
192
|
+
_context2.next = 4;
|
|
193
|
+
return (0, _effects.call)(_apis.fetchConnections);
|
|
194
|
+
case 4:
|
|
195
|
+
_yield$call3 = _context2.sent;
|
|
196
|
+
_yield$call3$connecti = _yield$call3.connections;
|
|
197
|
+
connections = _yield$call3$connecti === void 0 ? [] : _yield$call3$connecti;
|
|
198
|
+
_context2.next = 9;
|
|
199
|
+
return (0, _effects.put)((0, _store.action)('TREE_INTEGRATION_DATA_LOADED', {
|
|
200
|
+
connections: connections,
|
|
201
|
+
treeKey: treeKey
|
|
202
|
+
}));
|
|
203
|
+
case 9:
|
|
204
|
+
_context2.next = 14;
|
|
205
|
+
break;
|
|
206
|
+
case 11:
|
|
207
|
+
_context2.prev = 11;
|
|
208
|
+
_context2.t0 = _context2["catch"](0);
|
|
209
|
+
console.error('Caught error loading tree integration data', _context2.t0);
|
|
210
|
+
case 14:
|
|
211
|
+
case "end":
|
|
212
|
+
return _context2.stop();
|
|
213
|
+
}
|
|
214
|
+
}, _callee2, null, [[0, 11]]);
|
|
215
|
+
})();
|
|
216
|
+
}));
|
|
217
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_LOAD_OPERATIONS', function (_ref3) {
|
|
218
|
+
var payload = _ref3.payload;
|
|
219
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
|
|
220
|
+
var treeKey, connectionId, _payload$operationIds, operationIds, _yield, _yield$operations, operations;
|
|
221
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context3) {
|
|
222
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
223
|
+
case 0:
|
|
224
|
+
_context3.prev = 0;
|
|
225
|
+
treeKey = payload.treeKey, connectionId = payload.connectionId, _payload$operationIds = payload.operationIds, operationIds = _payload$operationIds === void 0 ? [] : _payload$operationIds;
|
|
226
|
+
_context3.next = 4;
|
|
227
|
+
return connectionId ? (0, _effects.call)(_apis.fetchOperations, {
|
|
228
|
+
connectionId: connectionId
|
|
229
|
+
}) : (0, _effects.call)(_apis.fetchBulkOperations, {
|
|
230
|
+
ids: operationIds
|
|
231
|
+
});
|
|
232
|
+
case 4:
|
|
233
|
+
_yield = _context3.sent;
|
|
234
|
+
_yield$operations = _yield.operations;
|
|
235
|
+
operations = _yield$operations === void 0 ? [] : _yield$operations;
|
|
236
|
+
_context3.next = 9;
|
|
237
|
+
return (0, _effects.put)((0, _store.action)('TREE_INTEGRATION_DATA_LOADED', {
|
|
238
|
+
operations: operations,
|
|
239
|
+
treeKey: treeKey
|
|
240
|
+
}));
|
|
241
|
+
case 9:
|
|
242
|
+
_context3.next = 14;
|
|
243
|
+
break;
|
|
244
|
+
case 11:
|
|
245
|
+
_context3.prev = 11;
|
|
246
|
+
_context3.t0 = _context3["catch"](0);
|
|
247
|
+
console.error('Caught error loading tree integration data', _context3.t0);
|
|
248
|
+
case 14:
|
|
249
|
+
case "end":
|
|
250
|
+
return _context3.stop();
|
|
251
|
+
}
|
|
252
|
+
}, _callee3, null, [[0, 11]]);
|
|
153
253
|
})();
|
|
154
254
|
}));
|
|
155
255
|
var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
@@ -165,23 +265,23 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
165
265
|
} : {}
|
|
166
266
|
);
|
|
167
267
|
};
|
|
168
|
-
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE', function (
|
|
169
|
-
var payload =
|
|
170
|
-
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function
|
|
171
|
-
var newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, formSlug, lastSave, lastWebApi, tree, webApi, name, sourceGroup, sourceName,
|
|
172
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function
|
|
173
|
-
while (1) switch (
|
|
268
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE', function (_ref4) {
|
|
269
|
+
var payload = _ref4.payload;
|
|
270
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
|
|
271
|
+
var newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, formSlug, lastSave, lastWebApi, tree, webApi, name, sourceGroup, sourceName, _yield2, error1, newTree, newWorkflow, _yield3, error2, error;
|
|
272
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
|
|
273
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
174
274
|
case 0:
|
|
175
|
-
|
|
275
|
+
_context4.prev = 0;
|
|
176
276
|
// because of the optimistic locking functionality newName / overwrite can
|
|
177
277
|
// be passed as options to the builder's save function
|
|
178
278
|
newName = payload.newName, onError = payload.onError, onSave = payload.onSave, overwrite = payload.overwrite, treeKey = payload.treeKey;
|
|
179
|
-
|
|
279
|
+
_context4.next = 4;
|
|
180
280
|
return (0, _effects.select)(function (state) {
|
|
181
281
|
return state.getIn(['trees', treeKey]);
|
|
182
282
|
});
|
|
183
283
|
case 4:
|
|
184
|
-
_yield$select =
|
|
284
|
+
_yield$select = _context4.sent;
|
|
185
285
|
kappSlug = _yield$select.kappSlug;
|
|
186
286
|
formSlug = _yield$select.formSlug;
|
|
187
287
|
lastSave = _yield$select.lastSave;
|
|
@@ -192,7 +292,7 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
192
292
|
// contents, otherwise just an update
|
|
193
293
|
// additionally, if the tree is a linked workflow then we call a core
|
|
194
294
|
// endpoint to create the workflow
|
|
195
|
-
|
|
295
|
+
_context4.next = 14;
|
|
196
296
|
return newName ? tree.event ? (0, _effects.call)(_apis.createWorkflow, {
|
|
197
297
|
workflow: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree)), {}, {
|
|
198
298
|
name: newName
|
|
@@ -215,21 +315,21 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
215
315
|
tree: (0, _models.serializeTree)(tree, overwrite)
|
|
216
316
|
});
|
|
217
317
|
case 14:
|
|
218
|
-
|
|
219
|
-
error1 =
|
|
220
|
-
newTree =
|
|
221
|
-
newWorkflow =
|
|
222
|
-
|
|
318
|
+
_yield2 = _context4.sent;
|
|
319
|
+
error1 = _yield2.error;
|
|
320
|
+
newTree = _yield2.tree;
|
|
321
|
+
newWorkflow = _yield2.workflow;
|
|
322
|
+
_context4.next = 20;
|
|
223
323
|
return webApi && !error1 ? (0, _effects.call)(_apis.updateWebApi, {
|
|
224
324
|
slug: lastWebApi.get('slug'),
|
|
225
325
|
kappSlug: kappSlug,
|
|
226
326
|
webApi: webApi
|
|
227
327
|
}) : {};
|
|
228
328
|
case 20:
|
|
229
|
-
|
|
230
|
-
error2 =
|
|
329
|
+
_yield3 = _context4.sent;
|
|
330
|
+
error2 = _yield3.error;
|
|
231
331
|
error = error1 || error2; // dispatch the appropriate action based on the result of the call above
|
|
232
|
-
|
|
332
|
+
_context4.next = 25;
|
|
233
333
|
return (0, _effects.put)(error ? (0, _store.action)('TREE_SAVE_ERROR', {
|
|
234
334
|
treeKey: treeKey,
|
|
235
335
|
error: error.message || error,
|
|
@@ -240,118 +340,124 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
240
340
|
tree: newTree || newWorkflow,
|
|
241
341
|
webApi: webApi,
|
|
242
342
|
onSave: onSave,
|
|
243
|
-
scope: {
|
|
343
|
+
scope: tree.event ? {
|
|
244
344
|
kappSlug: kappSlug,
|
|
245
345
|
formSlug: formSlug
|
|
246
|
-
}
|
|
346
|
+
} : undefined
|
|
247
347
|
}));
|
|
248
348
|
case 25:
|
|
249
|
-
|
|
349
|
+
_context4.next = 30;
|
|
250
350
|
break;
|
|
251
351
|
case 27:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
console.error(
|
|
352
|
+
_context4.prev = 27;
|
|
353
|
+
_context4.t0 = _context4["catch"](0);
|
|
354
|
+
console.error(_context4.t0);
|
|
255
355
|
case 30:
|
|
256
356
|
case "end":
|
|
257
|
-
return
|
|
357
|
+
return _context4.stop();
|
|
258
358
|
}
|
|
259
|
-
},
|
|
359
|
+
}, _callee4, null, [[0, 27]]);
|
|
260
360
|
})();
|
|
261
361
|
}));
|
|
262
|
-
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE_ERROR', function (
|
|
263
|
-
var
|
|
264
|
-
error =
|
|
265
|
-
onError =
|
|
266
|
-
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function
|
|
267
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function
|
|
268
|
-
while (1) switch (
|
|
362
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE_ERROR', function (_ref5) {
|
|
363
|
+
var _ref5$payload = _ref5.payload,
|
|
364
|
+
error = _ref5$payload.error,
|
|
365
|
+
onError = _ref5$payload.onError;
|
|
366
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee5() {
|
|
367
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee5$(_context5) {
|
|
368
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
269
369
|
case 0:
|
|
270
|
-
|
|
370
|
+
_context5.prev = 0;
|
|
271
371
|
if (!(0, _lodashEs.isFunction)(onError)) {
|
|
272
|
-
|
|
372
|
+
_context5.next = 4;
|
|
273
373
|
break;
|
|
274
374
|
}
|
|
275
|
-
|
|
375
|
+
_context5.next = 4;
|
|
276
376
|
return (0, _effects.call)(onError, error);
|
|
277
377
|
case 4:
|
|
278
|
-
|
|
378
|
+
_context5.next = 9;
|
|
279
379
|
break;
|
|
280
380
|
case 6:
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
console.error(
|
|
381
|
+
_context5.prev = 6;
|
|
382
|
+
_context5.t0 = _context5["catch"](0);
|
|
383
|
+
console.error(_context5.t0);
|
|
284
384
|
case 9:
|
|
285
385
|
case "end":
|
|
286
|
-
return
|
|
386
|
+
return _context5.stop();
|
|
287
387
|
}
|
|
288
|
-
},
|
|
388
|
+
}, _callee5, null, [[0, 6]]);
|
|
289
389
|
})();
|
|
290
390
|
}));
|
|
291
|
-
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE_SUCCESS', function (
|
|
292
|
-
var
|
|
293
|
-
onSave =
|
|
294
|
-
previousTree =
|
|
295
|
-
treeKey =
|
|
296
|
-
scope =
|
|
297
|
-
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function
|
|
391
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE_SUCCESS', function (_ref6) {
|
|
392
|
+
var _ref6$payload = _ref6.payload,
|
|
393
|
+
onSave = _ref6$payload.onSave,
|
|
394
|
+
previousTree = _ref6$payload.previousTree,
|
|
395
|
+
treeKey = _ref6$payload.treeKey,
|
|
396
|
+
scope = _ref6$payload.scope;
|
|
397
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee6() {
|
|
298
398
|
var tree;
|
|
299
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function
|
|
300
|
-
while (1) switch (
|
|
399
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee6$(_context6) {
|
|
400
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
301
401
|
case 0:
|
|
302
|
-
|
|
402
|
+
_context6.prev = 0;
|
|
303
403
|
if (!(0, _lodashEs.isFunction)(onSave)) {
|
|
304
|
-
|
|
404
|
+
_context6.next = 7;
|
|
305
405
|
break;
|
|
306
406
|
}
|
|
307
|
-
|
|
407
|
+
_context6.next = 4;
|
|
308
408
|
return (0, _effects.select)(function (state) {
|
|
309
409
|
return state.getIn(['trees', treeKey, 'tree']);
|
|
310
410
|
});
|
|
311
411
|
case 4:
|
|
312
|
-
tree =
|
|
313
|
-
|
|
412
|
+
tree = _context6.sent;
|
|
413
|
+
_context6.next = 7;
|
|
314
414
|
return (0, _effects.call)(onSave, tree, previousTree, scope);
|
|
315
415
|
case 7:
|
|
316
|
-
|
|
416
|
+
_context6.next = 12;
|
|
317
417
|
break;
|
|
318
418
|
case 9:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
console.error(
|
|
419
|
+
_context6.prev = 9;
|
|
420
|
+
_context6.t0 = _context6["catch"](0);
|
|
421
|
+
console.error(_context6.t0);
|
|
322
422
|
case 12:
|
|
323
423
|
case "end":
|
|
324
|
-
return
|
|
424
|
+
return _context6.stop();
|
|
325
425
|
}
|
|
326
|
-
},
|
|
426
|
+
}, _callee6, null, [[0, 9]]);
|
|
327
427
|
})();
|
|
328
428
|
}));
|
|
329
429
|
(0, _store.regHandlers)({
|
|
330
430
|
// the TreeBuilder component does nothing while the tree state is undefined,
|
|
331
431
|
// on mount we set it to null to signal to the component to dispatch the
|
|
332
432
|
// configure action with its configuration props
|
|
333
|
-
TREE_MOUNT: function TREE_MOUNT(state,
|
|
334
|
-
var treeKey =
|
|
433
|
+
TREE_MOUNT: function TREE_MOUNT(state, _ref7) {
|
|
434
|
+
var treeKey = _ref7.payload.treeKey;
|
|
335
435
|
return state.setIn(['trees', treeKey], null);
|
|
336
436
|
},
|
|
337
|
-
TREE_CONFIGURE: function TREE_CONFIGURE(state,
|
|
338
|
-
var treeKey =
|
|
437
|
+
TREE_CONFIGURE: function TREE_CONFIGURE(state, _ref8) {
|
|
438
|
+
var treeKey = _ref8.payload.treeKey;
|
|
339
439
|
return state.setIn(['trees', treeKey], (0, _models.TreeBuilderState)());
|
|
340
440
|
},
|
|
341
|
-
TREE_UNMOUNT: function TREE_UNMOUNT(state,
|
|
342
|
-
var treeKey =
|
|
441
|
+
TREE_UNMOUNT: function TREE_UNMOUNT(state, _ref9) {
|
|
442
|
+
var treeKey = _ref9.payload.treeKey;
|
|
343
443
|
return state.deleteIn(['trees', treeKey]);
|
|
344
444
|
},
|
|
345
|
-
TREE_LOADED: function TREE_LOADED(state,
|
|
346
|
-
var
|
|
347
|
-
categories =
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
445
|
+
TREE_LOADED: function TREE_LOADED(state, _ref10) {
|
|
446
|
+
var _ref10$payload = _ref10.payload,
|
|
447
|
+
categories = _ref10$payload.categories,
|
|
448
|
+
connections = _ref10$payload.connections,
|
|
449
|
+
kappSlug = _ref10$payload.kappSlug,
|
|
450
|
+
formSlug = _ref10$payload.formSlug,
|
|
451
|
+
treeKey = _ref10$payload.treeKey,
|
|
452
|
+
tree = _ref10$payload.tree,
|
|
453
|
+
webApi = _ref10$payload.webApi,
|
|
454
|
+
error = _ref10$payload.error;
|
|
354
455
|
return state.mergeIn(['trees', treeKey], {
|
|
456
|
+
connections: (0, _immutable.fromJS)(connections).sortBy(function (conn) {
|
|
457
|
+
return conn.name;
|
|
458
|
+
}).reduce(function (reduction, conn) {
|
|
459
|
+
return reduction.set(conn.get('id'), conn.set('operations', (0, _immutable.OrderedMap)()));
|
|
460
|
+
}, (0, _immutable.OrderedMap)()),
|
|
355
461
|
kappSlug: kappSlug,
|
|
356
462
|
formSlug: formSlug,
|
|
357
463
|
lastSave: tree,
|
|
@@ -373,26 +479,45 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
373
479
|
error: error
|
|
374
480
|
});
|
|
375
481
|
},
|
|
376
|
-
|
|
377
|
-
var
|
|
482
|
+
TREE_INTEGRATION_DATA_LOADED: function TREE_INTEGRATION_DATA_LOADED(state, _ref11) {
|
|
483
|
+
var _ref11$payload = _ref11.payload,
|
|
484
|
+
treeKey = _ref11$payload.treeKey,
|
|
485
|
+
connections = _ref11$payload.connections,
|
|
486
|
+
operations = _ref11$payload.operations;
|
|
487
|
+
return state.updateIn(['trees', treeKey, 'connections'], function (connectionsMap) {
|
|
488
|
+
// Update connections map in state if data was provided
|
|
489
|
+
var newConnectionsMap = connections ? (0, _immutable.fromJS)(connections).sortBy(function (conn) {
|
|
490
|
+
return conn.name;
|
|
491
|
+
}).reduce(function (reduction, conn) {
|
|
492
|
+
return reduction.set(conn.get('id'), conn.set('operations', connectionsMap.getIn([conn.get('id'), 'operations']) || (0, _immutable.OrderedMap)()));
|
|
493
|
+
}, (0, _immutable.OrderedMap)()) : connectionsMap;
|
|
494
|
+
|
|
495
|
+
// Update the operations maps in each connection if data was provided
|
|
496
|
+
return operations ? (0, _immutable.fromJS)(operations).reduce(function (map, op) {
|
|
497
|
+
return map.setIn([op.get('connectionId'), 'operations', op.get('id')], op);
|
|
498
|
+
}, newConnectionsMap) : newConnectionsMap;
|
|
499
|
+
});
|
|
500
|
+
},
|
|
501
|
+
TREE_SAVE: function TREE_SAVE(state, _ref12) {
|
|
502
|
+
var treeKey = _ref12.payload.treeKey;
|
|
378
503
|
return state.mergeIn(['trees', treeKey], {
|
|
379
504
|
saving: true
|
|
380
505
|
});
|
|
381
506
|
},
|
|
382
|
-
TREE_SAVE_ERROR: function TREE_SAVE_ERROR(state,
|
|
383
|
-
var
|
|
384
|
-
treeKey =
|
|
385
|
-
error =
|
|
507
|
+
TREE_SAVE_ERROR: function TREE_SAVE_ERROR(state, _ref13) {
|
|
508
|
+
var _ref13$payload = _ref13.payload,
|
|
509
|
+
treeKey = _ref13$payload.treeKey,
|
|
510
|
+
error = _ref13$payload.error;
|
|
386
511
|
return state.mergeIn(['trees', treeKey], {
|
|
387
512
|
error: error,
|
|
388
513
|
saving: false
|
|
389
514
|
});
|
|
390
515
|
},
|
|
391
|
-
TREE_SAVE_SUCCESS: function TREE_SAVE_SUCCESS(state,
|
|
392
|
-
var
|
|
393
|
-
tree =
|
|
394
|
-
treeKey =
|
|
395
|
-
webApi =
|
|
516
|
+
TREE_SAVE_SUCCESS: function TREE_SAVE_SUCCESS(state, _ref14) {
|
|
517
|
+
var _ref14$payload = _ref14.payload,
|
|
518
|
+
tree = _ref14$payload.tree,
|
|
519
|
+
treeKey = _ref14$payload.treeKey,
|
|
520
|
+
webApi = _ref14$payload.webApi;
|
|
396
521
|
var newTree = state.getIn(['trees', treeKey, 'tree']).merge({
|
|
397
522
|
name: tree.name,
|
|
398
523
|
sourceGroup: tree.sourceGroup,
|
|
@@ -408,8 +533,8 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
408
533
|
webApi: webApi
|
|
409
534
|
});
|
|
410
535
|
},
|
|
411
|
-
TREE_UNDO: function TREE_UNDO(state,
|
|
412
|
-
var treeKey =
|
|
536
|
+
TREE_UNDO: function TREE_UNDO(state, _ref15) {
|
|
537
|
+
var treeKey = _ref15.payload.treeKey;
|
|
413
538
|
return state.getIn(['trees', treeKey, 'undoStack']).isEmpty() ? state : state.updateIn(['trees', treeKey], function (builderState) {
|
|
414
539
|
return builderState.merge({
|
|
415
540
|
tree: builderState.undoStack.last().tree,
|
|
@@ -422,8 +547,8 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
422
547
|
});
|
|
423
548
|
}).updateIn(['trees', treeKey], synchronizeRoutineDefinition);
|
|
424
549
|
},
|
|
425
|
-
TREE_REDO: function TREE_REDO(state,
|
|
426
|
-
var treeKey =
|
|
550
|
+
TREE_REDO: function TREE_REDO(state, _ref16) {
|
|
551
|
+
var treeKey = _ref16.payload.treeKey;
|
|
427
552
|
return state.getIn(['trees', treeKey, 'redoStack']).isEmpty() ? state : state.updateIn(['trees', treeKey], function (builderState) {
|
|
428
553
|
return builderState.merge({
|
|
429
554
|
tree: builderState.redoStack.last().tree,
|
|
@@ -436,24 +561,24 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
436
561
|
});
|
|
437
562
|
}).updateIn(['trees', treeKey], synchronizeRoutineDefinition);
|
|
438
563
|
},
|
|
439
|
-
TREE_UPDATE: function TREE_UPDATE(state,
|
|
440
|
-
var
|
|
441
|
-
tree =
|
|
442
|
-
treeKey =
|
|
564
|
+
TREE_UPDATE: function TREE_UPDATE(state, _ref17) {
|
|
565
|
+
var _ref17$payload = _ref17.payload,
|
|
566
|
+
tree = _ref17$payload.tree,
|
|
567
|
+
treeKey = _ref17$payload.treeKey;
|
|
443
568
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree'], tree);
|
|
444
569
|
},
|
|
445
|
-
TREE_UPDATE_NODE: function TREE_UPDATE_NODE(state,
|
|
446
|
-
var
|
|
447
|
-
treeKey =
|
|
448
|
-
id =
|
|
449
|
-
messages =
|
|
450
|
-
deferrable =
|
|
451
|
-
defers =
|
|
452
|
-
definitionId =
|
|
453
|
-
dependencies =
|
|
454
|
-
name =
|
|
455
|
-
parameters =
|
|
456
|
-
visible =
|
|
570
|
+
TREE_UPDATE_NODE: function TREE_UPDATE_NODE(state, _ref18) {
|
|
571
|
+
var _ref18$payload = _ref18.payload,
|
|
572
|
+
treeKey = _ref18$payload.treeKey,
|
|
573
|
+
id = _ref18$payload.id,
|
|
574
|
+
messages = _ref18$payload.messages,
|
|
575
|
+
deferrable = _ref18$payload.deferrable,
|
|
576
|
+
defers = _ref18$payload.defers,
|
|
577
|
+
definitionId = _ref18$payload.definitionId,
|
|
578
|
+
dependencies = _ref18$payload.dependencies,
|
|
579
|
+
name = _ref18$payload.name,
|
|
580
|
+
parameters = _ref18$payload.parameters,
|
|
581
|
+
visible = _ref18$payload.visible;
|
|
457
582
|
return remember(state, treeKey).mergeIn(['trees', treeKey, 'tree', 'nodes', id], {
|
|
458
583
|
deferrable: deferrable,
|
|
459
584
|
defers: defers,
|
|
@@ -464,28 +589,28 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
464
589
|
visible: visible
|
|
465
590
|
}).updateIn(['trees', treeKey, 'tree'], (0, _helpers.renameDependencies)(dependencies, name));
|
|
466
591
|
},
|
|
467
|
-
TREE_UPDATE_NODE_POSITION: function TREE_UPDATE_NODE_POSITION(state,
|
|
468
|
-
var
|
|
469
|
-
treeKey =
|
|
470
|
-
id =
|
|
471
|
-
position =
|
|
592
|
+
TREE_UPDATE_NODE_POSITION: function TREE_UPDATE_NODE_POSITION(state, _ref19) {
|
|
593
|
+
var _ref19$payload = _ref19.payload,
|
|
594
|
+
treeKey = _ref19$payload.treeKey,
|
|
595
|
+
id = _ref19$payload.id,
|
|
596
|
+
position = _ref19$payload.position;
|
|
472
597
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree', 'nodes', id, 'position'], position);
|
|
473
598
|
},
|
|
474
|
-
TREE_REMOVE_NODE: function TREE_REMOVE_NODE(state,
|
|
475
|
-
var
|
|
476
|
-
treeKey =
|
|
477
|
-
id =
|
|
599
|
+
TREE_REMOVE_NODE: function TREE_REMOVE_NODE(state, _ref20) {
|
|
600
|
+
var _ref20$payload = _ref20.payload,
|
|
601
|
+
treeKey = _ref20$payload.treeKey,
|
|
602
|
+
id = _ref20$payload.id;
|
|
478
603
|
return remember(state, treeKey).deleteIn(['trees', treeKey, 'tree', 'nodes', id]).updateIn(['trees', treeKey, 'tree', 'connectors'], function (connectors) {
|
|
479
604
|
return connectors.filter(function (connector) {
|
|
480
605
|
return connector.headId !== id && connector.tailId !== id;
|
|
481
606
|
});
|
|
482
607
|
});
|
|
483
608
|
},
|
|
484
|
-
TREE_ADD_CONNECTOR: function TREE_ADD_CONNECTOR(state,
|
|
485
|
-
var
|
|
486
|
-
treeKey =
|
|
487
|
-
headId =
|
|
488
|
-
tailId =
|
|
609
|
+
TREE_ADD_CONNECTOR: function TREE_ADD_CONNECTOR(state, _ref21) {
|
|
610
|
+
var _ref21$payload = _ref21.payload,
|
|
611
|
+
treeKey = _ref21$payload.treeKey,
|
|
612
|
+
headId = _ref21$payload.headId,
|
|
613
|
+
tailId = _ref21$payload.tailId;
|
|
489
614
|
return remember(state, treeKey).updateIn(['trees', treeKey, 'tree'], function (tree) {
|
|
490
615
|
return tree.update('connectors', function (connectors) {
|
|
491
616
|
return connectors.set(tree.nextConnectorId, (0, _models.Connector)({
|
|
@@ -498,43 +623,43 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
498
623
|
});
|
|
499
624
|
});
|
|
500
625
|
},
|
|
501
|
-
TREE_UPDATE_CONNECTOR: function TREE_UPDATE_CONNECTOR(state,
|
|
502
|
-
var
|
|
503
|
-
treeKey =
|
|
504
|
-
id =
|
|
505
|
-
type =
|
|
506
|
-
label =
|
|
507
|
-
condition =
|
|
626
|
+
TREE_UPDATE_CONNECTOR: function TREE_UPDATE_CONNECTOR(state, _ref22) {
|
|
627
|
+
var _ref22$payload = _ref22.payload,
|
|
628
|
+
treeKey = _ref22$payload.treeKey,
|
|
629
|
+
id = _ref22$payload.id,
|
|
630
|
+
type = _ref22$payload.type,
|
|
631
|
+
label = _ref22$payload.label,
|
|
632
|
+
condition = _ref22$payload.condition;
|
|
508
633
|
return state.hasIn(['trees', treeKey, 'tree', 'connectors', id]) ? remember(state, treeKey).mergeIn(['trees', treeKey, 'tree', 'connectors', id], {
|
|
509
634
|
type: type,
|
|
510
635
|
label: label,
|
|
511
636
|
condition: condition
|
|
512
637
|
}) : state;
|
|
513
638
|
},
|
|
514
|
-
TREE_REMOVE_CONNECTOR: function TREE_REMOVE_CONNECTOR(state,
|
|
515
|
-
var
|
|
516
|
-
treeKey =
|
|
517
|
-
id =
|
|
639
|
+
TREE_REMOVE_CONNECTOR: function TREE_REMOVE_CONNECTOR(state, _ref23) {
|
|
640
|
+
var _ref23$payload = _ref23.payload,
|
|
641
|
+
treeKey = _ref23$payload.treeKey,
|
|
642
|
+
id = _ref23$payload.id;
|
|
518
643
|
return remember(state, treeKey).deleteIn(['trees', treeKey, 'tree', 'connectors', id]);
|
|
519
644
|
},
|
|
520
|
-
TREE_UPDATE_CONNECTOR_HEAD: function TREE_UPDATE_CONNECTOR_HEAD(state,
|
|
521
|
-
var
|
|
522
|
-
treeKey =
|
|
523
|
-
id =
|
|
524
|
-
nodeId =
|
|
645
|
+
TREE_UPDATE_CONNECTOR_HEAD: function TREE_UPDATE_CONNECTOR_HEAD(state, _ref24) {
|
|
646
|
+
var _ref24$payload = _ref24.payload,
|
|
647
|
+
treeKey = _ref24$payload.treeKey,
|
|
648
|
+
id = _ref24$payload.id,
|
|
649
|
+
nodeId = _ref24$payload.nodeId;
|
|
525
650
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree', 'connectors', id, 'headId'], nodeId);
|
|
526
651
|
},
|
|
527
|
-
TREE_UPDATE_CONNECTOR_TAIL: function TREE_UPDATE_CONNECTOR_TAIL(state,
|
|
528
|
-
var
|
|
529
|
-
treeKey =
|
|
530
|
-
id =
|
|
531
|
-
nodeId =
|
|
652
|
+
TREE_UPDATE_CONNECTOR_TAIL: function TREE_UPDATE_CONNECTOR_TAIL(state, _ref25) {
|
|
653
|
+
var _ref25$payload = _ref25.payload,
|
|
654
|
+
treeKey = _ref25$payload.treeKey,
|
|
655
|
+
id = _ref25$payload.id,
|
|
656
|
+
nodeId = _ref25$payload.nodeId;
|
|
532
657
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree', 'connectors', id, 'tailId'], nodeId);
|
|
533
658
|
},
|
|
534
|
-
TREE_UPDATE_SETTINGS: function TREE_UPDATE_SETTINGS(state,
|
|
535
|
-
var
|
|
536
|
-
treeKey =
|
|
537
|
-
values =
|
|
659
|
+
TREE_UPDATE_SETTINGS: function TREE_UPDATE_SETTINGS(state, _ref26) {
|
|
660
|
+
var _ref26$payload = _ref26.payload,
|
|
661
|
+
treeKey = _ref26$payload.treeKey,
|
|
662
|
+
values = _ref26$payload.values;
|
|
538
663
|
// If the updated settings are for a routine we rebuild the "Tree Input"
|
|
539
664
|
// bindings.
|
|
540
665
|
var bindings = values.inputs ? (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state.getIn(['trees', treeKey, 'tree', 'bindings'])), {}, {
|
|
@@ -550,10 +675,10 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
|
550
675
|
bindings: bindings
|
|
551
676
|
})).updateIn(['trees', treeKey], synchronizeRoutineDefinition);
|
|
552
677
|
},
|
|
553
|
-
TREE_UPDATE_WEB_API: function TREE_UPDATE_WEB_API(state,
|
|
554
|
-
var
|
|
555
|
-
treeKey =
|
|
556
|
-
values =
|
|
678
|
+
TREE_UPDATE_WEB_API: function TREE_UPDATE_WEB_API(state, _ref27) {
|
|
679
|
+
var _ref27$payload = _ref27.payload,
|
|
680
|
+
treeKey = _ref27$payload.treeKey,
|
|
681
|
+
values = _ref27$payload.values;
|
|
557
682
|
return remember(state, treeKey).mergeIn(['trees', treeKey, 'webApi'], values).setIn(['trees', treeKey, 'tree', 'name'], values.slug).setIn(['trees', treeKey, 'tree', 'ownerEmail'], values.ownerEmail);
|
|
558
683
|
}
|
|
559
684
|
});
|
|
@@ -571,11 +696,11 @@ var synchronizeRoutineDefinition = function synchronizeRoutineDefinition(treeBui
|
|
|
571
696
|
});
|
|
572
697
|
});
|
|
573
698
|
};
|
|
574
|
-
var getWebApiProps = function getWebApiProps(
|
|
575
|
-
var name =
|
|
576
|
-
platformSourceName =
|
|
577
|
-
sourceGroup =
|
|
578
|
-
sourceName =
|
|
699
|
+
var getWebApiProps = function getWebApiProps(_ref28) {
|
|
700
|
+
var name = _ref28.name,
|
|
701
|
+
platformSourceName = _ref28.platformSourceName,
|
|
702
|
+
sourceGroup = _ref28.sourceGroup,
|
|
703
|
+
sourceName = _ref28.sourceName;
|
|
579
704
|
if (sourceName === platformSourceName && sourceGroup.startsWith('WebApis')) {
|
|
580
705
|
var kappSlug = sourceGroup.startsWith('WebApis > ') ? sourceGroup.replace('WebApis > ', '') : undefined;
|
|
581
706
|
var slug = name;
|
|
@@ -586,11 +711,11 @@ var getWebApiProps = function getWebApiProps(_ref25) {
|
|
|
586
711
|
}
|
|
587
712
|
return null;
|
|
588
713
|
};
|
|
589
|
-
var getWorkflowProps = function getWorkflowProps(
|
|
590
|
-
var type =
|
|
591
|
-
sourceGroup =
|
|
592
|
-
kappSlug =
|
|
593
|
-
formSlug =
|
|
714
|
+
var getWorkflowProps = function getWorkflowProps(_ref29) {
|
|
715
|
+
var type = _ref29.type,
|
|
716
|
+
sourceGroup = _ref29.sourceGroup,
|
|
717
|
+
kappSlug = _ref29.kappSlug,
|
|
718
|
+
formSlug = _ref29.formSlug;
|
|
594
719
|
if (type === 'workflow') {
|
|
595
720
|
return {
|
|
596
721
|
workflowId: sourceGroup,
|