@kineticdata/react 5.1.1 → 6.0.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/assets/task/icons/drag-handle.svg +3 -0
- package/assets/task/icons/plus_small.svg +2 -4
- package/lib/apis/agent/adapters.js +16 -12
- package/lib/apis/agent/bridges.js +54 -41
- package/lib/apis/agent/handlers.js +51 -38
- package/lib/apis/core/activity.js +19 -11
- package/lib/apis/core/attributeDefinitions.js +54 -46
- package/lib/apis/core/attributeDefinitions.test.js +47 -55
- package/lib/apis/core/authentication.js +58 -63
- package/lib/apis/core/backgroundJobs.js +38 -30
- package/lib/apis/core/bridgeModelAttributeMappings.js +42 -34
- package/lib/apis/core/bridgeModelAttributes.js +47 -37
- package/lib/apis/core/bridgeModelMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualificationMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualifications.js +42 -34
- package/lib/apis/core/bridgeModels.js +61 -45
- package/lib/apis/core/bridgeModels.test.js +64 -80
- package/lib/apis/core/bridgedresources.js +64 -71
- package/lib/apis/core/bridgedresources.test.js +34 -31
- package/lib/apis/core/categories.js +59 -52
- package/lib/apis/core/categories.test.js +36 -33
- package/lib/apis/core/fileResources.js +41 -33
- package/lib/apis/core/filestores.js +42 -34
- package/lib/apis/core/formTypes.js +50 -44
- package/lib/apis/core/forms.js +53 -48
- package/lib/apis/core/forms.test.js +60 -74
- package/lib/apis/core/kapps.js +45 -39
- package/lib/apis/core/kapps.test.js +45 -52
- package/lib/apis/core/logs.js +20 -16
- package/lib/apis/core/memberships.js +23 -20
- package/lib/apis/core/meta.js +31 -19
- package/lib/apis/core/notices.js +17 -9
- package/lib/apis/core/oauthClients.js +49 -45
- package/lib/apis/core/platformComponents.js +73 -57
- package/lib/apis/core/platformItems.js +30 -0
- package/lib/apis/core/profile.js +28 -21
- package/lib/apis/core/profile.test.js +20 -17
- package/lib/apis/core/securityPolicyDefinitions.js +48 -41
- package/lib/apis/core/securityPolicyDefinitions.test.js +50 -60
- package/lib/apis/core/space.js +23 -16
- package/lib/apis/core/space.test.js +31 -38
- package/lib/apis/core/submissions.js +220 -172
- package/lib/apis/core/submissions.test.js +81 -51
- package/lib/apis/core/teams.js +51 -44
- package/lib/apis/core/teams.test.js +42 -39
- package/lib/apis/core/translations.js +123 -130
- package/lib/apis/core/translations.test.js +278 -368
- package/lib/apis/core/users.js +56 -49
- package/lib/apis/core/users.test.js +42 -39
- package/lib/apis/core/version.js +20 -11
- package/lib/apis/core/webApis.js +42 -34
- package/lib/apis/core/webhooks.js +48 -41
- package/lib/apis/core/webhooks.test.js +50 -60
- package/lib/apis/core/webhooksJobs.js +30 -26
- package/lib/apis/core/workflows.js +64 -0
- package/lib/apis/http.js +89 -80
- package/lib/apis/http.test.js +37 -38
- package/lib/apis/index.js +506 -48
- package/lib/apis/system/index.js +228 -211
- package/lib/apis/task/index.js +283 -226
- package/lib/components/agent/bridge/BridgeForm.js +50 -50
- package/lib/components/agent/bridge/BridgeTable.js +12 -8
- package/lib/components/agent/filestore/FilestoreForm.js +49 -48
- package/lib/components/agent/filestore/FilestoreTable.js +12 -8
- package/lib/components/agent/handler/AgentHandlerForm.js +24 -27
- package/lib/components/agent/handler/AgentHandlerTable.js +12 -8
- package/lib/components/common/AttributeSelect.js +15 -9
- package/lib/components/common/BridgeSelect.js +48 -43
- package/lib/components/common/ComponentConfigContext.js +9 -2
- package/lib/components/common/ContentEditable.js +36 -60
- package/lib/components/common/FormSelect.js +70 -58
- package/lib/components/common/NodeSelect.js +23 -19
- package/lib/components/common/Scroller.js +24 -23
- package/lib/components/common/StaticSelect.js +57 -50
- package/lib/components/common/TableInput.js +54 -57
- package/lib/components/common/TeamSelect.js +42 -39
- package/lib/components/common/Typeahead.js +121 -138
- package/lib/components/common/UserSelect.js +42 -41
- package/lib/components/common/authentication/AuthInterceptor.js +15 -19
- package/lib/components/common/authentication/AuthInterceptor.test.js +46 -64
- package/lib/components/common/authentication/AuthenticationContainer.js +350 -454
- package/lib/components/common/authentication/RequestInterceptor.js +16 -19
- package/lib/components/common/code_input/CodeInput.js +92 -122
- package/lib/components/common/code_input/draftHelpers.js +96 -90
- package/lib/components/common/code_input/languageHelpers.js +49 -47
- package/lib/components/common/code_input/languageHelpers.test.js +21 -16
- package/lib/components/core/CoreFormModal.js +26 -24
- package/lib/components/core/CoreModal.js +37 -31
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +24 -23
- package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +18 -15
- package/lib/components/core/bridge_model/BridgeModelForm.js +27 -37
- package/lib/components/core/bridge_model/BridgeModelTable.js +12 -8
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +17 -16
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +25 -21
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +20 -20
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +27 -22
- package/lib/components/core/category/CategoryForm.js +22 -22
- package/lib/components/core/category/CategoryTable.js +15 -10
- package/lib/components/core/core_form/CoreForm.js +209 -285
- package/lib/components/core/core_form/CoreForm.test.js +12 -10
- package/lib/components/core/core_form/defaults/index.js +52 -44
- package/lib/components/core/core_form/globals.js +14 -5
- package/lib/components/core/field_definition/FieldDefinitionForm.js +23 -21
- package/lib/components/core/field_definition/FieldDefinitionTable.js +15 -10
- package/lib/components/core/file_resource/FileResourceForm.js +38 -37
- package/lib/components/core/file_resource/FileResourceTable.js +16 -12
- package/lib/components/core/form/FormForm.js +56 -61
- package/lib/components/core/form/FormTable.js +25 -22
- package/lib/components/core/form_type/FormTypeForm.js +14 -13
- package/lib/components/core/form_type/FormTypeTable.js +12 -8
- package/lib/components/core/i18n/I18n.js +54 -61
- package/lib/components/core/i18n/I18nContext.js +9 -2
- package/lib/components/core/i18n/I18nProvider.js +40 -43
- package/lib/components/core/i18n/Moment.js +40 -50
- package/lib/components/core/index_definition/IndexDefinitionForm.js +23 -24
- package/lib/components/core/index_definition/IndexDefinitionTable.js +19 -11
- package/lib/components/core/index_job/IndexJobTable.js +20 -15
- package/lib/components/core/kapp/KappForm.js +57 -58
- package/lib/components/core/kapp/KappTable.js +17 -12
- package/lib/components/core/log/LogTable.js +35 -33
- package/lib/components/core/oauth_client/OAuthClientForm.js +17 -17
- package/lib/components/core/oauth_client/OAuthClientTable.js +12 -8
- package/lib/components/core/platform_component/AgentComponentForm.js +15 -15
- package/lib/components/core/platform_component/AgentComponentTable.js +10 -5
- package/lib/components/core/platform_component/TaskComponentForm.js +14 -14
- package/lib/components/core/profile/ProfileForm.js +40 -39
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +28 -25
- package/lib/components/core/security_definition/SecurityDefinitionTable.js +18 -13
- package/lib/components/core/space/SpaceForm.js +79 -90
- package/lib/components/core/submission/DatastoreSubmissionFilters.js +39 -40
- package/lib/components/core/submission/DatastoreSubmissionTable.js +37 -34
- package/lib/components/core/submission/FormSubmissionFilters.js +79 -75
- package/lib/components/core/submission/FormSubmissionTable.js +27 -20
- package/lib/components/core/submission/KappSubmissionTable.js +30 -29
- package/lib/components/core/submission/SubmissionForm.js +126 -55
- package/lib/components/core/submission/SubmissionTable.js +24 -20
- package/lib/components/core/submission/helpers.js +37 -33
- package/lib/components/core/submission/helpers.test.js +69 -20
- package/lib/components/core/team/TeamForm.js +24 -21
- package/lib/components/core/team/TeamTable.js +16 -11
- package/lib/components/core/translation/ContextForm.js +13 -10
- package/lib/components/core/translation/ContextTable.js +13 -10
- package/lib/components/core/translation/EntryForm.js +27 -24
- package/lib/components/core/translation/EntryTable.js +19 -16
- package/lib/components/core/translation/LocaleForm.js +16 -13
- package/lib/components/core/translation/LocaleTable.js +12 -8
- package/lib/components/core/user/UserForm.js +38 -37
- package/lib/components/core/user/UserTable.js +19 -15
- package/lib/components/core/webapi/WebApiForm.js +49 -61
- package/lib/components/core/webapi/WebApiTable.js +14 -10
- package/lib/components/core/webhook/WebhookForm.js +33 -32
- package/lib/components/core/webhook/WebhookTable.js +22 -20
- package/lib/components/core/webhook_job/WebhookJobTable.js +19 -16
- package/lib/components/form/Form.helpers.js +102 -90
- package/lib/components/form/Form.js +467 -524
- package/lib/components/form/Form.models.js +38 -24
- package/lib/components/form/FormState.js +8 -5
- package/lib/components/form/KitchenSinkForm.js +135 -4
- package/lib/components/form/defaults/AttributesField.js +48 -59
- package/lib/components/form/defaults/CheckboxField.js +14 -6
- package/lib/components/form/defaults/CodeField.js +15 -7
- package/lib/components/form/defaults/FormButtons.js +12 -4
- package/lib/components/form/defaults/FormError.js +12 -4
- package/lib/components/form/defaults/FormField.js +15 -7
- package/lib/components/form/defaults/FormLayout.js +12 -4
- package/lib/components/form/defaults/FormMultiField.js +15 -7
- package/lib/components/form/defaults/PasswordField.js +14 -6
- package/lib/components/form/defaults/RadioField.js +15 -7
- package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +17 -9
- package/lib/components/form/defaults/SelectField.js +16 -8
- package/lib/components/form/defaults/SelectMultiField.js +15 -7
- package/lib/components/form/defaults/TableField.js +14 -6
- package/lib/components/form/defaults/TeamField.js +15 -7
- package/lib/components/form/defaults/TeamMultiField.js +15 -7
- package/lib/components/form/defaults/TextField.js +14 -6
- package/lib/components/form/defaults/TextMultiField.js +26 -28
- package/lib/components/form/defaults/UserField.js +15 -7
- package/lib/components/form/defaults/UserMultiField.js +15 -7
- package/lib/components/form/defaults/index.js +48 -41
- package/lib/components/form/tests/Form.test.js +568 -864
- package/lib/components/form/tests/components.js +15 -25
- package/lib/components/form/tests/helpers.test.js +35 -33
- package/lib/components/index.js +981 -133
- package/lib/components/system/SystemBackgroundTasksTable.js +14 -10
- package/lib/components/system/SystemFilestoreForm.js +28 -25
- package/lib/components/system/SystemForm.js +19 -16
- package/lib/components/system/SystemIngressForm.js +10 -9
- package/lib/components/system/SystemSecurityForm.js +17 -14
- package/lib/components/system/SystemSmtpForm.js +13 -13
- package/lib/components/system/SystemTaskAdapterForm.js +21 -17
- package/lib/components/system/SystemUserForm.js +15 -14
- package/lib/components/system/helpers.js +62 -60
- package/lib/components/system/helpers.test.js +16 -12
- package/lib/components/system/spaces/SystemSpaceForm.js +25 -24
- package/lib/components/system/spaces/SystemTenantForm.js +43 -40
- package/lib/components/system/spaces/SystemTenantTable.js +12 -8
- package/lib/components/table/Table.js +219 -225
- package/lib/components/table/Table.redux.js +298 -327
- package/lib/components/table/Table.redux.test.js +49 -47
- package/lib/components/table/Table.test.js +107 -132
- package/lib/components/table/defaults/BodyCell.js +12 -6
- package/lib/components/table/defaults/BodyRow.js +10 -4
- package/lib/components/table/defaults/BooleanFilter.js +17 -11
- package/lib/components/table/defaults/EmptyBodyRow.js +12 -6
- package/lib/components/table/defaults/FilterLayout.js +17 -11
- package/lib/components/table/defaults/Footer.js +11 -5
- package/lib/components/table/defaults/FooterCell.js +10 -4
- package/lib/components/table/defaults/FooterRow.js +10 -4
- package/lib/components/table/defaults/Header.js +10 -4
- package/lib/components/table/defaults/HeaderCell.js +16 -10
- package/lib/components/table/defaults/HeaderRow.js +10 -4
- package/lib/components/table/defaults/PaginationControl.js +18 -9
- package/lib/components/table/defaults/TableBody.js +10 -4
- package/lib/components/table/defaults/TableLayout.js +12 -6
- package/lib/components/table/defaults/TextFilter.js +16 -10
- package/lib/components/table/defaults/index.js +41 -33
- package/lib/components/task/builder/Connector.js +100 -111
- package/lib/components/task/builder/ConnectorForm.js +17 -11
- package/lib/components/task/builder/Node.js +101 -83
- package/lib/components/task/builder/NodeForm.js +30 -27
- package/lib/components/task/builder/NodeParametersForm.js +27 -24
- package/lib/components/task/builder/SvgCanvas.js +67 -96
- package/lib/components/task/builder/SvgText.js +19 -134
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +28 -23
- package/lib/components/task/builder/TreeBuilder.js +140 -115
- package/lib/components/task/builder/builder.redux.js +322 -300
- package/lib/components/task/builder/constants.js +94 -45
- package/lib/components/task/builder/helpers.js +184 -173
- package/lib/components/task/builder/helpers.test.js +20 -18
- package/lib/components/task/builder/models.js +133 -91
- package/lib/components/task/category/TaskCategoryForm.js +31 -29
- package/lib/components/task/category/TaskCategoryTable.js +12 -8
- package/lib/components/task/common/UsageTable.js +16 -12
- package/lib/components/task/engine/EngineSettingsForm.js +13 -11
- package/lib/components/task/errors/RunErrorTable.js +17 -13
- package/lib/components/task/errors/SystemErrorsTable.js +13 -9
- package/lib/components/task/handlers/HandlerForm.js +55 -55
- package/lib/components/task/handlers/HandlerTable.js +12 -8
- package/lib/components/task/handlers/MissingHandlerTable.js +12 -8
- package/lib/components/task/policy_rule/PolicyRuleForm.js +33 -32
- package/lib/components/task/policy_rule/PolicyRuleTable.js +12 -8
- package/lib/components/task/runs/CreateManualTriggerForm.js +17 -15
- package/lib/components/task/runs/RunTable.js +23 -20
- package/lib/components/task/runs/RunTaskTable.js +10 -6
- package/lib/components/task/sources/SourceForm.js +47 -47
- package/lib/components/task/sources/SourceTable.js +14 -11
- package/lib/components/task/triggers/TriggerTable.js +21 -18
- package/lib/components/task/workflows/LinkedWorkflowForm.js +249 -0
- package/lib/components/task/workflows/LinkedWorkflowTable.js +137 -0
- package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
- package/lib/components/task/workflows/WorkflowForm.js +61 -46
- package/lib/components/task/workflows/WorkflowTable.js +17 -14
- package/lib/helpers/SearchBuilder.js +73 -127
- package/lib/helpers/SearchBuilder.test.js +184 -175
- package/lib/helpers/index.js +116 -74
- package/lib/index.js +86 -38
- package/lib/reducer.js +11 -3
- package/lib/saga.js +42 -38
- package/lib/store.js +59 -35
- package/package.json +4 -29
- package/proxyhelper.js +105 -47
- package/assets/discussions/images/avi_128.png +0 -0
- package/assets/discussions/images/excel_128.png +0 -0
- package/assets/discussions/images/html_128.png +0 -0
- package/assets/discussions/images/illustrator_128.png +0 -0
- package/assets/discussions/images/indesign_128.png +0 -0
- package/assets/discussions/images/movie_128.png +0 -0
- package/assets/discussions/images/mpeg_128.png +0 -0
- package/assets/discussions/images/pdf_128.png +0 -0
- package/assets/discussions/images/photoshop_128.png +0 -0
- package/assets/discussions/images/powerpoint_128.png +0 -0
- package/assets/discussions/images/txt_128.png +0 -0
- package/assets/discussions/images/unknown_128.png +0 -0
- package/assets/discussions/images/word_128.png +0 -0
- package/assets/discussions/styles/_discussion.scss +0 -506
- package/lib/apis/discussions/index.js +0 -395
- package/lib/apis/socket/index.js +0 -77
- package/lib/apis/socket/socket.js +0 -350
- package/lib/apis/socket/socket.test.js +0 -90
- package/lib/apis/socket/timer.js +0 -45
- package/lib/apis/socket/timer.test.js +0 -51
- package/lib/apis/socket/topic.js +0 -185
- package/lib/apis/topics/index.js +0 -19
- package/lib/components/discussions/ChatInputForm.js +0 -424
- package/lib/components/discussions/DateBanner.js +0 -10
- package/lib/components/discussions/Discussion.js +0 -202
- package/lib/components/discussions/DiscussionForm.js +0 -227
- package/lib/components/discussions/InvitationForm.js +0 -107
- package/lib/components/discussions/MessageHistory.js +0 -110
- package/lib/components/discussions/MessagesByDate.js +0 -40
- package/lib/components/discussions/MessagesList.js +0 -30
- package/lib/components/discussions/MoreMessagesBanner.js +0 -26
- package/lib/components/discussions/ScrollHelper.js +0 -84
- package/lib/components/discussions/SystemMessage.js +0 -88
- package/lib/components/discussions/SystemMessageGroup.js +0 -15
- package/lib/components/discussions/UserMessage.js +0 -163
- package/lib/components/discussions/UserMessageGroup.js +0 -34
- package/lib/components/discussions/redux.js +0 -178
- package/lib/components/discussions/sagas.js +0 -500
- package/lib/helpers/discussions/canManage.js +0 -30
- package/lib/helpers/discussions/canManage.test.js +0 -69
- package/lib/helpers/discussions/generateSystemMessageContent.js +0 -131
- package/lib/helpers/discussions/generateSystemMessageContent.test.js +0 -450
- package/lib/models/discussions.js +0 -76
- package/lib/models/index.js +0 -1
|
@@ -1,29 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.unmountTreeBuilder = exports.mountTreeBuilder = exports.configureTreeBuilder = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
12
|
+
var _effects = require("redux-saga/effects");
|
|
13
|
+
var _immutable = require("immutable");
|
|
14
|
+
var _lodashEs = require("lodash-es");
|
|
15
|
+
var _store = require("../../../store");
|
|
16
|
+
var _models = require("./models");
|
|
17
|
+
var _apis = require("../../../apis");
|
|
18
|
+
var _helpers = require("./helpers");
|
|
19
|
+
var mountTreeBuilder = function mountTreeBuilder(treeKey) {
|
|
20
|
+
return (0, _store.dispatch)('TREE_MOUNT', {
|
|
14
21
|
treeKey: treeKey
|
|
15
22
|
});
|
|
16
23
|
};
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
exports.mountTreeBuilder = mountTreeBuilder;
|
|
25
|
+
var unmountTreeBuilder = function unmountTreeBuilder(treeKey) {
|
|
26
|
+
return (0, _store.dispatch)('TREE_UNMOUNT', {
|
|
19
27
|
treeKey: treeKey
|
|
20
28
|
});
|
|
21
29
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
exports.unmountTreeBuilder = unmountTreeBuilder;
|
|
31
|
+
var configureTreeBuilder = function configureTreeBuilder(props) {
|
|
32
|
+
return (0, _store.dispatch)('TREE_CONFIGURE', props);
|
|
33
|
+
};
|
|
26
34
|
|
|
35
|
+
// Helper that adds the present state to the past stack and clears the future
|
|
36
|
+
// stack. This should be called by reducer cases that will be undo/redo able.
|
|
37
|
+
exports.configureTreeBuilder = configureTreeBuilder;
|
|
27
38
|
var remember = function remember(state, treeKey) {
|
|
28
39
|
return state.updateIn(['trees', treeKey, 'undoStack'], function (stack) {
|
|
29
40
|
return stack.push({
|
|
@@ -32,224 +43,236 @@ var remember = function remember(state, treeKey) {
|
|
|
32
43
|
});
|
|
33
44
|
}).deleteIn(['trees', treeKey, 'redoStack']);
|
|
34
45
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
46
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_CONFIGURE', function (_ref) {
|
|
47
|
+
var payload = _ref.payload;
|
|
48
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
|
49
|
+
var name, sourceGroup, sourceName, treeKey, webApiProps, _yield$all, _yield$all2, tree, categories, webApi, platformItem, result;
|
|
50
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
51
|
+
while (1) {
|
|
52
|
+
switch (_context.prev = _context.next) {
|
|
53
|
+
case 0:
|
|
54
|
+
_context.prev = 0;
|
|
55
|
+
name = payload.name, sourceGroup = payload.sourceGroup, sourceName = payload.sourceName, treeKey = payload.treeKey;
|
|
56
|
+
webApiProps = getWebApiProps(payload);
|
|
57
|
+
_context.next = 5;
|
|
58
|
+
return (0, _effects.all)([(0, _effects.call)(_apis.fetchTree, {
|
|
59
|
+
name: name,
|
|
60
|
+
sourceGroup: sourceGroup,
|
|
61
|
+
sourceName: sourceName,
|
|
62
|
+
include: 'bindings,categories,details,treeJson,inputs,outputs'
|
|
63
|
+
}), (0, _effects.call)(_apis.fetchTaskCategories, {
|
|
64
|
+
include: 'handlers.results,handlers.parameters,trees.parameters,trees.inputs,trees.outputs'
|
|
65
|
+
}), webApiProps ? (0, _effects.call)(_apis.fetchWebApi, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, webApiProps), {}, {
|
|
66
|
+
include: 'details,securityPolicies'
|
|
67
|
+
})) : {}]);
|
|
68
|
+
case 5:
|
|
69
|
+
_yield$all = _context.sent;
|
|
70
|
+
_yield$all2 = (0, _slicedToArray2["default"])(_yield$all, 3);
|
|
71
|
+
tree = _yield$all2[0].tree;
|
|
72
|
+
categories = _yield$all2[1].categories;
|
|
73
|
+
webApi = _yield$all2[2].webApi;
|
|
74
|
+
platformItem = null;
|
|
75
|
+
if (!tree.event) {
|
|
76
|
+
_context.next = 16;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
_context.next = 14;
|
|
80
|
+
return (0, _effects.call)(_apis.fetchPlatformItem, {
|
|
81
|
+
type: tree.platformItemType,
|
|
82
|
+
id: tree.platformItemId
|
|
83
|
+
});
|
|
84
|
+
case 14:
|
|
85
|
+
result = _context.sent;
|
|
86
|
+
platformItem = result.platformItem;
|
|
87
|
+
case 16:
|
|
88
|
+
_context.next = 18;
|
|
89
|
+
return (0, _effects.put)((0, _store.action)('TREE_LOADED', {
|
|
90
|
+
categories: categories,
|
|
91
|
+
kappSlug: webApiProps && webApiProps.kappSlug,
|
|
92
|
+
platformItem: platformItem,
|
|
93
|
+
treeKey: treeKey,
|
|
94
|
+
tree: (0, _models.deserializeTree)(tree),
|
|
95
|
+
webApi: webApiProps && (0, _models.deserializeWebApi)(webApi, webApiProps.kappSlug)
|
|
96
|
+
}));
|
|
97
|
+
case 18:
|
|
98
|
+
_context.next = 23;
|
|
99
|
+
break;
|
|
100
|
+
case 20:
|
|
101
|
+
_context.prev = 20;
|
|
102
|
+
_context.t0 = _context["catch"](0);
|
|
103
|
+
console.error('Caught error loading tree', _context.t0);
|
|
104
|
+
case 23:
|
|
105
|
+
case "end":
|
|
106
|
+
return _context.stop();
|
|
107
|
+
}
|
|
86
108
|
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}))
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
tree
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
109
|
+
}, _callee, null, [[0, 20]]);
|
|
110
|
+
})();
|
|
111
|
+
}));
|
|
112
|
+
var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
|
|
113
|
+
return platformItem.kapp ? {
|
|
114
|
+
formSlug: platformItem.slug,
|
|
115
|
+
kappSlug: platformItem.kapp.slug
|
|
116
|
+
} : platformItem.space ? {
|
|
117
|
+
kappSlug: platformItem.slug
|
|
118
|
+
} : {};
|
|
119
|
+
};
|
|
120
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE', function (_ref2) {
|
|
121
|
+
var payload = _ref2.payload;
|
|
122
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
|
|
123
|
+
var newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, lastSave, lastWebApi, platformItem, tree, webApi, name, sourceGroup, sourceName, _yield, error1, newTree, newWorkflow, _yield2, error2, error;
|
|
124
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
|
|
125
|
+
while (1) {
|
|
126
|
+
switch (_context2.prev = _context2.next) {
|
|
127
|
+
case 0:
|
|
128
|
+
_context2.prev = 0;
|
|
129
|
+
// because of the optimistic locking functionality newName / overwrite can
|
|
130
|
+
// be passed as options to the builder's save function
|
|
131
|
+
newName = payload.newName, onError = payload.onError, onSave = payload.onSave, overwrite = payload.overwrite, treeKey = payload.treeKey;
|
|
132
|
+
_context2.next = 4;
|
|
133
|
+
return (0, _effects.select)(function (state) {
|
|
134
|
+
return state.getIn(['trees', treeKey]);
|
|
135
|
+
});
|
|
136
|
+
case 4:
|
|
137
|
+
_yield$select = _context2.sent;
|
|
138
|
+
kappSlug = _yield$select.kappSlug;
|
|
139
|
+
lastSave = _yield$select.lastSave;
|
|
140
|
+
lastWebApi = _yield$select.lastWebApi;
|
|
141
|
+
platformItem = _yield$select.platformItem;
|
|
142
|
+
tree = _yield$select.tree;
|
|
143
|
+
webApi = _yield$select.webApi;
|
|
144
|
+
name = lastSave.name, sourceGroup = lastSave.sourceGroup, sourceName = lastSave.sourceName; // if a newName was passed we will be creating a new tree with the builder
|
|
145
|
+
// contents, otherwise just an update
|
|
146
|
+
// additionally, if the tree is a linked workflow then we call a core
|
|
147
|
+
// endpoint to create the workflow
|
|
148
|
+
_context2.next = 14;
|
|
149
|
+
return newName ? tree.event ? (0, _effects.call)(_apis.createWorkflow, (0, _objectSpread2["default"])({
|
|
150
|
+
workflow: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree)), {}, {
|
|
151
|
+
name: newName
|
|
152
|
+
})
|
|
153
|
+
}, getPlatformItemSlugs(platformItem))) : (0, _effects.call)(_apis.createTree, {
|
|
154
|
+
tree: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree, true)), {}, {
|
|
155
|
+
name: newName
|
|
156
|
+
})
|
|
157
|
+
}) : (0, _effects.call)(_apis.updateTree, {
|
|
158
|
+
name: name,
|
|
159
|
+
sourceGroup: sourceGroup,
|
|
160
|
+
sourceName: sourceName,
|
|
161
|
+
tree: (0, _models.serializeTree)(tree, overwrite)
|
|
162
|
+
});
|
|
163
|
+
case 14:
|
|
164
|
+
_yield = _context2.sent;
|
|
165
|
+
error1 = _yield.error;
|
|
166
|
+
newTree = _yield.tree;
|
|
167
|
+
newWorkflow = _yield.workflow;
|
|
168
|
+
_context2.next = 20;
|
|
169
|
+
return webApi && !error1 ? (0, _effects.call)(_apis.updateWebApi, {
|
|
170
|
+
slug: lastWebApi.get('slug'),
|
|
171
|
+
kappSlug: kappSlug,
|
|
172
|
+
webApi: webApi
|
|
173
|
+
}) : {};
|
|
174
|
+
case 20:
|
|
175
|
+
_yield2 = _context2.sent;
|
|
176
|
+
error2 = _yield2.error;
|
|
177
|
+
error = error1 || error2; // dispatch the appropriate action based on the result of the call above
|
|
178
|
+
_context2.next = 25;
|
|
179
|
+
return (0, _effects.put)(error ? (0, _store.action)('TREE_SAVE_ERROR', {
|
|
180
|
+
treeKey: treeKey,
|
|
181
|
+
error: error.message || error,
|
|
182
|
+
onError: onError
|
|
183
|
+
}) : (0, _store.action)('TREE_SAVE_SUCCESS', {
|
|
184
|
+
previousTree: lastSave,
|
|
185
|
+
treeKey: treeKey,
|
|
186
|
+
tree: newTree || newWorkflow,
|
|
187
|
+
webApi: webApi,
|
|
188
|
+
onSave: onSave
|
|
189
|
+
}));
|
|
190
|
+
case 25:
|
|
191
|
+
_context2.next = 30;
|
|
192
|
+
break;
|
|
193
|
+
case 27:
|
|
194
|
+
_context2.prev = 27;
|
|
195
|
+
_context2.t0 = _context2["catch"](0);
|
|
196
|
+
console.error(_context2.t0);
|
|
197
|
+
case 30:
|
|
198
|
+
case "end":
|
|
199
|
+
return _context2.stop();
|
|
200
|
+
}
|
|
173
201
|
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}))
|
|
177
|
-
regSaga(takeEvery('TREE_SAVE_ERROR',
|
|
178
|
-
var _ref3$payload
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
202
|
+
}, _callee2, null, [[0, 27]]);
|
|
203
|
+
})();
|
|
204
|
+
}));
|
|
205
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE_ERROR', function (_ref3) {
|
|
206
|
+
var _ref3$payload = _ref3.payload,
|
|
207
|
+
error = _ref3$payload.error,
|
|
208
|
+
onError = _ref3$payload.onError;
|
|
209
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
|
|
210
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context3) {
|
|
211
|
+
while (1) {
|
|
212
|
+
switch (_context3.prev = _context3.next) {
|
|
213
|
+
case 0:
|
|
214
|
+
_context3.prev = 0;
|
|
215
|
+
if (!(0, _lodashEs.isFunction)(onError)) {
|
|
216
|
+
_context3.next = 4;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
_context3.next = 4;
|
|
220
|
+
return (0, _effects.call)(onError, error);
|
|
221
|
+
case 4:
|
|
222
|
+
_context3.next = 9;
|
|
189
223
|
break;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
case 7:
|
|
200
|
-
_context3.prev = 7;
|
|
201
|
-
_context3.t0 = _context3["catch"](1);
|
|
202
|
-
console.error(_context3.t0);
|
|
203
|
-
|
|
204
|
-
case 10:
|
|
205
|
-
case "end":
|
|
206
|
-
return _context3.stop();
|
|
224
|
+
case 6:
|
|
225
|
+
_context3.prev = 6;
|
|
226
|
+
_context3.t0 = _context3["catch"](0);
|
|
227
|
+
console.error(_context3.t0);
|
|
228
|
+
case 9:
|
|
229
|
+
case "end":
|
|
230
|
+
return _context3.stop();
|
|
231
|
+
}
|
|
207
232
|
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}))
|
|
211
|
-
regSaga(takeEvery('TREE_SAVE_SUCCESS',
|
|
212
|
-
var _ref4$payload
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
_context4.
|
|
233
|
+
}, _callee3, null, [[0, 6]]);
|
|
234
|
+
})();
|
|
235
|
+
}));
|
|
236
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE_SUCCESS', function (_ref4) {
|
|
237
|
+
var _ref4$payload = _ref4.payload,
|
|
238
|
+
onSave = _ref4$payload.onSave,
|
|
239
|
+
previousTree = _ref4$payload.previousTree,
|
|
240
|
+
treeKey = _ref4$payload.treeKey;
|
|
241
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
|
|
242
|
+
var tree;
|
|
243
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
|
|
244
|
+
while (1) {
|
|
245
|
+
switch (_context4.prev = _context4.next) {
|
|
246
|
+
case 0:
|
|
247
|
+
_context4.prev = 0;
|
|
248
|
+
if (!(0, _lodashEs.isFunction)(onSave)) {
|
|
249
|
+
_context4.next = 7;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
_context4.next = 4;
|
|
253
|
+
return (0, _effects.select)(function (state) {
|
|
254
|
+
return state.getIn(['trees', treeKey, 'tree']);
|
|
255
|
+
});
|
|
256
|
+
case 4:
|
|
257
|
+
tree = _context4.sent;
|
|
258
|
+
_context4.next = 7;
|
|
259
|
+
return (0, _effects.call)(onSave, tree, previousTree);
|
|
260
|
+
case 7:
|
|
261
|
+
_context4.next = 12;
|
|
223
262
|
break;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
tree = _context4.sent;
|
|
233
|
-
_context4.next = 8;
|
|
234
|
-
return call(onSave, tree, previousTree);
|
|
235
|
-
|
|
236
|
-
case 8:
|
|
237
|
-
_context4.next = 13;
|
|
238
|
-
break;
|
|
239
|
-
|
|
240
|
-
case 10:
|
|
241
|
-
_context4.prev = 10;
|
|
242
|
-
_context4.t0 = _context4["catch"](1);
|
|
243
|
-
console.error(_context4.t0);
|
|
244
|
-
|
|
245
|
-
case 13:
|
|
246
|
-
case "end":
|
|
247
|
-
return _context4.stop();
|
|
263
|
+
case 9:
|
|
264
|
+
_context4.prev = 9;
|
|
265
|
+
_context4.t0 = _context4["catch"](0);
|
|
266
|
+
console.error(_context4.t0);
|
|
267
|
+
case 12:
|
|
268
|
+
case "end":
|
|
269
|
+
return _context4.stop();
|
|
270
|
+
}
|
|
248
271
|
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}))
|
|
252
|
-
regHandlers({
|
|
272
|
+
}, _callee4, null, [[0, 9]]);
|
|
273
|
+
})();
|
|
274
|
+
}));
|
|
275
|
+
(0, _store.regHandlers)({
|
|
253
276
|
// the TreeBuilder component does nothing while the tree state is undefined,
|
|
254
277
|
// on mount we set it to null to signal to the component to dispatch the
|
|
255
278
|
// configure action with its configuration props
|
|
@@ -259,7 +282,7 @@ regHandlers({
|
|
|
259
282
|
},
|
|
260
283
|
TREE_CONFIGURE: function TREE_CONFIGURE(state, _ref6) {
|
|
261
284
|
var treeKey = _ref6.payload.treeKey;
|
|
262
|
-
return state.setIn(['trees', treeKey], TreeBuilderState());
|
|
285
|
+
return state.setIn(['trees', treeKey], (0, _models.TreeBuilderState)());
|
|
263
286
|
},
|
|
264
287
|
TREE_UNMOUNT: function TREE_UNMOUNT(state, _ref7) {
|
|
265
288
|
var treeKey = _ref7.payload.treeKey;
|
|
@@ -267,27 +290,29 @@ regHandlers({
|
|
|
267
290
|
},
|
|
268
291
|
TREE_LOADED: function TREE_LOADED(state, _ref8) {
|
|
269
292
|
var _ref8$payload = _ref8.payload,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
293
|
+
categories = _ref8$payload.categories,
|
|
294
|
+
kappSlug = _ref8$payload.kappSlug,
|
|
295
|
+
platformItem = _ref8$payload.platformItem,
|
|
296
|
+
treeKey = _ref8$payload.treeKey,
|
|
297
|
+
tree = _ref8$payload.tree,
|
|
298
|
+
webApi = _ref8$payload.webApi;
|
|
275
299
|
return state.mergeIn(['trees', treeKey], {
|
|
276
300
|
kappSlug: kappSlug,
|
|
277
301
|
lastSave: tree,
|
|
278
302
|
lastWebApi: webApi,
|
|
279
303
|
loading: false,
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
304
|
+
platformItem: platformItem,
|
|
305
|
+
tasks: (0, _immutable.List)(categories).map(function (category) {
|
|
306
|
+
return category.name === 'System Controls' ? (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, category), {}, {
|
|
307
|
+
handlers: [].concat((0, _toConsumableArray2["default"])(category.handlers), [(0, _helpers.treeReturnTask)(tree)])
|
|
283
308
|
}) : category;
|
|
284
309
|
}).flatMap(function (category) {
|
|
285
|
-
return [].concat(
|
|
310
|
+
return [].concat((0, _toConsumableArray2["default"])(category.handlers), (0, _toConsumableArray2["default"])(category.trees));
|
|
286
311
|
}).sortBy(function (task) {
|
|
287
312
|
return task.name;
|
|
288
313
|
}).reduce(function (reduction, task) {
|
|
289
314
|
return reduction.set(task.definitionId, task);
|
|
290
|
-
}, OrderedMap()),
|
|
315
|
+
}, (0, _immutable.OrderedMap)()),
|
|
291
316
|
tree: tree,
|
|
292
317
|
webApi: webApi
|
|
293
318
|
});
|
|
@@ -300,8 +325,8 @@ regHandlers({
|
|
|
300
325
|
},
|
|
301
326
|
TREE_SAVE_ERROR: function TREE_SAVE_ERROR(state, _ref10) {
|
|
302
327
|
var _ref10$payload = _ref10.payload,
|
|
303
|
-
|
|
304
|
-
|
|
328
|
+
treeKey = _ref10$payload.treeKey,
|
|
329
|
+
error = _ref10$payload.error;
|
|
305
330
|
return state.mergeIn(['trees', treeKey], {
|
|
306
331
|
error: error,
|
|
307
332
|
saving: false
|
|
@@ -309,11 +334,12 @@ regHandlers({
|
|
|
309
334
|
},
|
|
310
335
|
TREE_SAVE_SUCCESS: function TREE_SAVE_SUCCESS(state, _ref11) {
|
|
311
336
|
var _ref11$payload = _ref11.payload,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
337
|
+
tree = _ref11$payload.tree,
|
|
338
|
+
treeKey = _ref11$payload.treeKey,
|
|
339
|
+
webApi = _ref11$payload.webApi;
|
|
315
340
|
var newTree = state.getIn(['trees', treeKey, 'tree']).merge({
|
|
316
341
|
name: tree.name,
|
|
342
|
+
sourceGroup: tree.sourceGroup,
|
|
317
343
|
versionId: tree.versionId
|
|
318
344
|
});
|
|
319
345
|
return state.mergeIn(['trees', treeKey], {
|
|
@@ -356,22 +382,22 @@ regHandlers({
|
|
|
356
382
|
},
|
|
357
383
|
TREE_UPDATE: function TREE_UPDATE(state, _ref14) {
|
|
358
384
|
var _ref14$payload = _ref14.payload,
|
|
359
|
-
|
|
360
|
-
|
|
385
|
+
tree = _ref14$payload.tree,
|
|
386
|
+
treeKey = _ref14$payload.treeKey;
|
|
361
387
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree'], tree);
|
|
362
388
|
},
|
|
363
389
|
TREE_UPDATE_NODE: function TREE_UPDATE_NODE(state, _ref15) {
|
|
364
390
|
var _ref15$payload = _ref15.payload,
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
391
|
+
treeKey = _ref15$payload.treeKey,
|
|
392
|
+
id = _ref15$payload.id,
|
|
393
|
+
messages = _ref15$payload.messages,
|
|
394
|
+
deferrable = _ref15$payload.deferrable,
|
|
395
|
+
defers = _ref15$payload.defers,
|
|
396
|
+
definitionId = _ref15$payload.definitionId,
|
|
397
|
+
dependencies = _ref15$payload.dependencies,
|
|
398
|
+
name = _ref15$payload.name,
|
|
399
|
+
parameters = _ref15$payload.parameters,
|
|
400
|
+
visible = _ref15$payload.visible;
|
|
375
401
|
return remember(state, treeKey).mergeIn(['trees', treeKey, 'tree', 'nodes', id], {
|
|
376
402
|
deferrable: deferrable,
|
|
377
403
|
defers: defers,
|
|
@@ -380,19 +406,19 @@ regHandlers({
|
|
|
380
406
|
name: name,
|
|
381
407
|
parameters: parameters,
|
|
382
408
|
visible: visible
|
|
383
|
-
}).updateIn(['trees', treeKey, 'tree'], renameDependencies(dependencies, name));
|
|
409
|
+
}).updateIn(['trees', treeKey, 'tree'], (0, _helpers.renameDependencies)(dependencies, name));
|
|
384
410
|
},
|
|
385
411
|
TREE_UPDATE_NODE_POSITION: function TREE_UPDATE_NODE_POSITION(state, _ref16) {
|
|
386
412
|
var _ref16$payload = _ref16.payload,
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
413
|
+
treeKey = _ref16$payload.treeKey,
|
|
414
|
+
id = _ref16$payload.id,
|
|
415
|
+
position = _ref16$payload.position;
|
|
390
416
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree', 'nodes', id, 'position'], position);
|
|
391
417
|
},
|
|
392
418
|
TREE_REMOVE_NODE: function TREE_REMOVE_NODE(state, _ref17) {
|
|
393
419
|
var _ref17$payload = _ref17.payload,
|
|
394
|
-
|
|
395
|
-
|
|
420
|
+
treeKey = _ref17$payload.treeKey,
|
|
421
|
+
id = _ref17$payload.id;
|
|
396
422
|
return remember(state, treeKey).deleteIn(['trees', treeKey, 'tree', 'nodes', id]).updateIn(['trees', treeKey, 'tree', 'connectors'], function (connectors) {
|
|
397
423
|
return connectors.filter(function (connector) {
|
|
398
424
|
return connector.headId !== id && connector.tailId !== id;
|
|
@@ -401,12 +427,12 @@ regHandlers({
|
|
|
401
427
|
},
|
|
402
428
|
TREE_ADD_CONNECTOR: function TREE_ADD_CONNECTOR(state, _ref18) {
|
|
403
429
|
var _ref18$payload = _ref18.payload,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
430
|
+
treeKey = _ref18$payload.treeKey,
|
|
431
|
+
headId = _ref18$payload.headId,
|
|
432
|
+
tailId = _ref18$payload.tailId;
|
|
407
433
|
return remember(state, treeKey).updateIn(['trees', treeKey, 'tree'], function (tree) {
|
|
408
434
|
return tree.update('connectors', function (connectors) {
|
|
409
|
-
return connectors.set(tree.nextConnectorId, Connector({
|
|
435
|
+
return connectors.set(tree.nextConnectorId, (0, _models.Connector)({
|
|
410
436
|
id: tree.nextConnectorId,
|
|
411
437
|
headId: headId,
|
|
412
438
|
tailId: tailId
|
|
@@ -418,11 +444,11 @@ regHandlers({
|
|
|
418
444
|
},
|
|
419
445
|
TREE_UPDATE_CONNECTOR: function TREE_UPDATE_CONNECTOR(state, _ref19) {
|
|
420
446
|
var _ref19$payload = _ref19.payload,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
447
|
+
treeKey = _ref19$payload.treeKey,
|
|
448
|
+
id = _ref19$payload.id,
|
|
449
|
+
type = _ref19$payload.type,
|
|
450
|
+
label = _ref19$payload.label,
|
|
451
|
+
condition = _ref19$payload.condition;
|
|
426
452
|
return state.hasIn(['trees', treeKey, 'tree', 'connectors', id]) ? remember(state, treeKey).mergeIn(['trees', treeKey, 'tree', 'connectors', id], {
|
|
427
453
|
type: type,
|
|
428
454
|
label: label,
|
|
@@ -431,31 +457,31 @@ regHandlers({
|
|
|
431
457
|
},
|
|
432
458
|
TREE_REMOVE_CONNECTOR: function TREE_REMOVE_CONNECTOR(state, _ref20) {
|
|
433
459
|
var _ref20$payload = _ref20.payload,
|
|
434
|
-
|
|
435
|
-
|
|
460
|
+
treeKey = _ref20$payload.treeKey,
|
|
461
|
+
id = _ref20$payload.id;
|
|
436
462
|
return remember(state, treeKey).deleteIn(['trees', treeKey, 'tree', 'connectors', id]);
|
|
437
463
|
},
|
|
438
464
|
TREE_UPDATE_CONNECTOR_HEAD: function TREE_UPDATE_CONNECTOR_HEAD(state, _ref21) {
|
|
439
465
|
var _ref21$payload = _ref21.payload,
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
466
|
+
treeKey = _ref21$payload.treeKey,
|
|
467
|
+
id = _ref21$payload.id,
|
|
468
|
+
nodeId = _ref21$payload.nodeId;
|
|
443
469
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree', 'connectors', id, 'headId'], nodeId);
|
|
444
470
|
},
|
|
445
471
|
TREE_UPDATE_CONNECTOR_TAIL: function TREE_UPDATE_CONNECTOR_TAIL(state, _ref22) {
|
|
446
472
|
var _ref22$payload = _ref22.payload,
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
473
|
+
treeKey = _ref22$payload.treeKey,
|
|
474
|
+
id = _ref22$payload.id,
|
|
475
|
+
nodeId = _ref22$payload.nodeId;
|
|
450
476
|
return remember(state, treeKey).setIn(['trees', treeKey, 'tree', 'connectors', id, 'tailId'], nodeId);
|
|
451
477
|
},
|
|
452
478
|
TREE_UPDATE_SETTINGS: function TREE_UPDATE_SETTINGS(state, _ref23) {
|
|
453
479
|
var _ref23$payload = _ref23.payload,
|
|
454
|
-
|
|
455
|
-
|
|
480
|
+
treeKey = _ref23$payload.treeKey,
|
|
481
|
+
values = _ref23$payload.values;
|
|
456
482
|
// If the updated settings are for a routine we rebuild the "Tree Input"
|
|
457
483
|
// bindings.
|
|
458
|
-
var bindings = values.inputs ?
|
|
484
|
+
var bindings = values.inputs ? (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, state.getIn(['trees', treeKey, 'tree', 'bindings'])), {}, {
|
|
459
485
|
'Tree Input': values.inputs.groupBy(function (input) {
|
|
460
486
|
return input.get('name');
|
|
461
487
|
}).map(function (list) {
|
|
@@ -464,39 +490,36 @@ regHandlers({
|
|
|
464
490
|
return "<%=@inputs['".concat(name, "']%>");
|
|
465
491
|
}).toJS()
|
|
466
492
|
}) : state.getIn(['trees', treeKey, 'tree', 'bindings']);
|
|
467
|
-
return remember(state, treeKey).mergeIn(['trees', treeKey, 'tree'],
|
|
493
|
+
return remember(state, treeKey).mergeIn(['trees', treeKey, 'tree'], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, values), {}, {
|
|
468
494
|
bindings: bindings
|
|
469
495
|
})).updateIn(['trees', treeKey], synchronizeRoutineDefinition);
|
|
470
496
|
},
|
|
471
497
|
TREE_UPDATE_WEB_API: function TREE_UPDATE_WEB_API(state, _ref24) {
|
|
472
498
|
var _ref24$payload = _ref24.payload,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
return remember(state, treeKey).mergeIn(['trees', treeKey, 'webApi'], values).setIn(['trees', treeKey, 'tree', 'name'], values.slug);
|
|
499
|
+
treeKey = _ref24$payload.treeKey,
|
|
500
|
+
values = _ref24$payload.values;
|
|
501
|
+
return remember(state, treeKey).mergeIn(['trees', treeKey, 'webApi'], values).setIn(['trees', treeKey, 'tree', 'name'], values.slug).setIn(['trees', treeKey, 'tree', 'ownerEmail'], values.ownerEmail);
|
|
476
502
|
}
|
|
477
503
|
});
|
|
478
|
-
|
|
479
504
|
var synchronizeRoutineDefinition = function synchronizeRoutineDefinition(treeBuilderState) {
|
|
480
505
|
var tree = treeBuilderState.tree;
|
|
481
506
|
var definitionId = tree.definitionId,
|
|
482
|
-
|
|
483
|
-
|
|
507
|
+
inputs = tree.inputs,
|
|
508
|
+
outputs = tree.outputs;
|
|
484
509
|
return treeBuilderState.update('tasks', function (tasks) {
|
|
485
510
|
return tasks.map(function (task, taskDefinitionId) {
|
|
486
|
-
return definitionId === taskDefinitionId ?
|
|
511
|
+
return definitionId === taskDefinitionId ? (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, task), {}, {
|
|
487
512
|
inputs: inputs.toJS(),
|
|
488
513
|
outputs: outputs.toJS()
|
|
489
|
-
}) : taskDefinitionId === 'system_tree_return_v1' ? treeReturnTask(tree) : task;
|
|
514
|
+
}) : taskDefinitionId === 'system_tree_return_v1' ? (0, _helpers.treeReturnTask)(tree) : task;
|
|
490
515
|
});
|
|
491
516
|
});
|
|
492
517
|
};
|
|
493
|
-
|
|
494
518
|
var getWebApiProps = function getWebApiProps(_ref25) {
|
|
495
519
|
var name = _ref25.name,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
520
|
+
platformSourceName = _ref25.platformSourceName,
|
|
521
|
+
sourceGroup = _ref25.sourceGroup,
|
|
522
|
+
sourceName = _ref25.sourceName;
|
|
500
523
|
if (sourceName === platformSourceName && sourceGroup.startsWith('WebApis')) {
|
|
501
524
|
var kappSlug = sourceGroup.startsWith('WebApis > ') ? sourceGroup.replace('WebApis > ', '') : undefined;
|
|
502
525
|
var slug = name;
|
|
@@ -505,6 +528,5 @@ var getWebApiProps = function getWebApiProps(_ref25) {
|
|
|
505
528
|
slug: slug
|
|
506
529
|
};
|
|
507
530
|
}
|
|
508
|
-
|
|
509
531
|
return null;
|
|
510
532
|
};
|