@kineticdata/react 5.1.2 → 6.0.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.
- 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 +56 -46
- package/lib/apis/core/bridgeModels.test.js +64 -80
- package/lib/apis/core/bridgedresources.js +64 -72
- package/lib/apis/core/bridgedresources.test.js +33 -30
- 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 -49
- 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 +22 -13
- 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 +213 -186
- package/lib/apis/core/submissions.test.js +39 -36
- 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 +52 -44
- package/lib/apis/http.js +121 -80
- package/lib/apis/http.test.js +137 -38
- package/lib/apis/index.js +506 -50
- package/lib/apis/system/index.js +363 -215
- package/lib/apis/task/index.js +294 -227
- package/lib/components/agent/bridge/BridgeForm.js +50 -50
- package/lib/components/agent/bridge/BridgeTable.js +16 -9
- package/lib/components/agent/filestore/FilestoreForm.js +49 -48
- package/lib/components/agent/filestore/FilestoreTable.js +16 -9
- package/lib/components/agent/handler/AgentHandlerForm.js +24 -27
- package/lib/components/agent/handler/AgentHandlerTable.js +17 -10
- 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/ToastContainer.js +170 -0
- 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/common/defaults/Toast.js +26 -0
- package/lib/components/common/defaults/index.js +13 -0
- 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 +25 -18
- package/lib/components/core/bridge_model/BridgeModelForm.js +27 -37
- package/lib/components/core/bridge_model/BridgeModelTable.js +17 -10
- 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 +28 -16
- 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 +26 -15
- 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 +47 -33
- package/lib/components/core/form_type/FormTypeForm.js +14 -13
- package/lib/components/core/form_type/FormTypeTable.js +15 -9
- 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 +31 -16
- 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 +34 -44
- package/lib/components/core/log/LogTable.js +42 -34
- 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 +27 -17
- 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 +64 -39
- package/lib/components/core/submission/KappSubmissionTable.js +67 -48
- 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 +27 -16
- 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 +42 -20
- package/lib/components/core/webapi/WebApiForm.js +87 -80
- package/lib/components/core/webapi/WebApiTable.js +28 -17
- package/lib/components/core/webhook/WebhookForm.js +33 -32
- package/lib/components/core/webhook/WebhookTable.js +41 -29
- package/lib/components/core/webhook_job/WebhookJobTable.js +58 -35
- package/lib/components/form/Form.helpers.js +182 -108
- package/lib/components/form/Form.js +467 -524
- package/lib/components/form/Form.models.js +39 -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 +1034 -135
- package/lib/components/system/SystemBackgroundTasksTable.js +14 -10
- package/lib/components/system/SystemCassandraForm.js +98 -0
- package/lib/components/system/SystemElasticSearchForm.js +98 -0
- package/lib/components/system/SystemFilestoreForm.js +36 -28
- package/lib/components/system/SystemForm.js +19 -16
- package/lib/components/system/SystemIngressForm.js +85 -36
- package/lib/components/system/SystemSecurityForm.js +17 -14
- package/lib/components/system/SystemSmtpForm.js +13 -13
- package/lib/components/system/SystemTaskAdapterForm.js +49 -21
- package/lib/components/system/SystemTrustedCertificateForm.js +40 -0
- package/lib/components/system/SystemTrustedCertificatesTable.js +74 -0
- package/lib/components/system/SystemUserForm.js +15 -14
- package/lib/components/system/helpers.js +281 -98
- 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 +112 -68
- package/lib/components/system/spaces/SystemTenantTable.js +12 -8
- package/lib/components/table/Table.js +295 -227
- package/lib/components/table/Table.redux.js +339 -355
- package/lib/components/table/Table.redux.test.js +49 -47
- package/lib/components/table/Table.test.js +146 -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/ColumnControl.js +26 -0
- 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 +43 -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 +27 -22
- package/lib/components/task/builder/TreeBuilder.js +140 -115
- package/lib/components/task/builder/builder.redux.js +311 -326
- 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 +121 -98
- 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 +50 -27
- 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 +35 -19
- 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 +45 -29
- 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 +29 -18
- package/lib/components/task/triggers/TriggerTable.js +71 -41
- package/lib/components/task/workflows/LinkedWorkflowForm.js +48 -54
- package/lib/components/task/workflows/LinkedWorkflowTable.js +46 -26
- package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
- package/lib/components/task/workflows/WorkflowForm.js +49 -44
- package/lib/components/task/workflows/WorkflowTable.js +47 -29
- 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 +87 -38
- package/lib/reducer.js +11 -3
- package/lib/saga.js +42 -38
- package/lib/store.js +59 -35
- package/package.json +17 -29
- package/proxyhelper.js +122 -57
- 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,42 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Node = void 0;
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
11
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
12
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createSuper"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _lodashEs = require("lodash-es");
|
|
15
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
|
+
var _store = require("../../../store");
|
|
17
|
+
var constants = _interopRequireWildcard(require("./constants"));
|
|
18
|
+
var _helpers = require("./helpers");
|
|
19
|
+
var _models = require("./models");
|
|
20
|
+
var _SvgText = require("./SvgText");
|
|
21
|
+
var _plus_small = _interopRequireDefault(require("../../../../assets/task/icons/plus_small.svg"));
|
|
22
|
+
var _dragHandle = _interopRequireDefault(require("../../../../assets/task/icons/drag-handle.svg"));
|
|
23
|
+
var Node = /*#__PURE__*/function (_Component) {
|
|
24
|
+
(0, _inherits2["default"])(Node, _Component);
|
|
25
|
+
var _super = (0, _createSuper2["default"])(Node);
|
|
19
26
|
function Node(props) {
|
|
20
27
|
var _this;
|
|
21
|
-
|
|
22
|
-
_classCallCheck(this, Node);
|
|
23
|
-
|
|
28
|
+
(0, _classCallCheck2["default"])(this, Node);
|
|
24
29
|
_this = _super.call(this, props);
|
|
25
|
-
|
|
26
|
-
_this.addNewNode = function () {
|
|
27
|
-
if (isFunction(_this.props.onNew)) {
|
|
28
|
-
_this.props.onNew(addNewTask(_this.props.treeKey, _this.props.tree, _this.props.node, getNewNodePosition(_this.props.node, _this.treeBuilder.getChildNodes(_this.props.node.id))));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
30
|
_this.onSelect = function (shiftKey) {
|
|
33
31
|
return function () {
|
|
34
|
-
if (isFunction(_this.props.onSelect)) {
|
|
32
|
+
if ((0, _lodashEs.isFunction)(_this.props.onSelect)) {
|
|
35
33
|
_this.props.onSelect(_this.props.node, shiftKey);
|
|
36
34
|
}
|
|
37
35
|
};
|
|
38
36
|
};
|
|
39
|
-
|
|
40
37
|
_this.drag = function (event) {
|
|
41
38
|
_this.treeBuilder.watchDrag({
|
|
42
39
|
event: event,
|
|
@@ -45,67 +42,63 @@ export var Node = /*#__PURE__*/function (_Component) {
|
|
|
45
42
|
onClick: _this.onSelect(event.shiftKey)
|
|
46
43
|
});
|
|
47
44
|
};
|
|
48
|
-
|
|
49
45
|
_this.dragPlus = function (event) {
|
|
50
46
|
_this.treeBuilder.watchDrag({
|
|
51
47
|
event: event,
|
|
52
48
|
relative: false,
|
|
53
49
|
onMove: _this.treeBuilder.dragNewConnector(_this.props.node),
|
|
54
50
|
onDrop: _this.treeBuilder.dropNewConnector,
|
|
55
|
-
onClick: _this.addNewNode
|
|
51
|
+
onClick: _this.treeBuilder.addNewNode(_this.props.node, event.nativeEvent, (0, _helpers.getNodeType)(_this.props.node) === 'start' ? constants.NODE_START_RADIUS * 2 - 18 : constants.NODE_WIDTH - 18, (0, _helpers.getNodeType)(_this.props.node) === 'start' ? (constants.NODE_START_RADIUS * 2 - constants.NODE_HEIGHT) / 2 : 0)
|
|
56
52
|
});
|
|
57
53
|
};
|
|
58
|
-
|
|
59
54
|
_this.drop = function () {
|
|
60
|
-
dispatch('TREE_UPDATE_NODE_POSITION', {
|
|
55
|
+
(0, _store.dispatch)('TREE_UPDATE_NODE_POSITION', {
|
|
61
56
|
treeKey: _this.props.treeKey,
|
|
62
57
|
id: _this.props.node.id,
|
|
63
58
|
position: _this.position
|
|
64
59
|
});
|
|
65
60
|
};
|
|
66
|
-
|
|
67
61
|
_this.move = function (_ref) {
|
|
68
62
|
var dx = _ref.dx,
|
|
69
|
-
|
|
70
|
-
_this.position = Point({
|
|
63
|
+
dy = _ref.dy;
|
|
64
|
+
_this.position = (0, _models.Point)({
|
|
71
65
|
x: _this.position.x + dx,
|
|
72
66
|
y: _this.position.y + dy
|
|
73
67
|
});
|
|
74
|
-
|
|
75
68
|
_this.treeBuilder.getConnectorsByHead(_this.props.node.id).forEach(function (connector) {
|
|
76
69
|
return connector.setHead(_this.position, false);
|
|
77
70
|
});
|
|
78
|
-
|
|
79
71
|
_this.treeBuilder.getConnectorsByTail(_this.props.node.id).forEach(function (connector) {
|
|
80
72
|
return connector.setTail(_this.position, false);
|
|
81
73
|
});
|
|
82
|
-
|
|
74
|
+
if (!_this.props.id && _this.treeBuilder.newConnector.current) {
|
|
75
|
+
_this.treeBuilder.newConnector.current.setHead(_this.position, false);
|
|
76
|
+
}
|
|
83
77
|
_this.draw();
|
|
84
78
|
};
|
|
85
|
-
|
|
86
|
-
_this.el = createRef();
|
|
79
|
+
_this.el = /*#__PURE__*/(0, _react.createRef)();
|
|
87
80
|
return _this;
|
|
88
81
|
}
|
|
89
|
-
|
|
90
|
-
_createClass(Node, [{
|
|
82
|
+
(0, _createClass2["default"])(Node, [{
|
|
91
83
|
key: "setTreeBuilder",
|
|
92
84
|
value: function setTreeBuilder(treeBuilder) {
|
|
93
85
|
this.treeBuilder = treeBuilder;
|
|
94
86
|
}
|
|
87
|
+
|
|
95
88
|
/*****************************************************************************
|
|
96
89
|
* Click handlers *
|
|
97
90
|
****************************************************************************/
|
|
98
|
-
|
|
99
91
|
}, {
|
|
100
92
|
key: "shouldComponentUpdate",
|
|
101
|
-
|
|
93
|
+
value:
|
|
102
94
|
/*****************************************************************************
|
|
103
95
|
* React lifecycle *
|
|
104
96
|
* Check the `node` prop for change, which should be an immutable record. *
|
|
105
97
|
* If that prop changes we need to sync the instance's `position` value and *
|
|
106
98
|
* call `draw`. *
|
|
107
99
|
****************************************************************************/
|
|
108
|
-
|
|
100
|
+
|
|
101
|
+
function shouldComponentUpdate(nextProps) {
|
|
109
102
|
return !this.props.node.equals(nextProps.node) || this.props.primary !== nextProps.primary || this.props.selected !== nextProps.selected || this.props.highlighted !== nextProps.highlighted;
|
|
110
103
|
}
|
|
111
104
|
}, {
|
|
@@ -120,13 +113,13 @@ export var Node = /*#__PURE__*/function (_Component) {
|
|
|
120
113
|
this.position = this.props.node.position;
|
|
121
114
|
this.draw();
|
|
122
115
|
}
|
|
116
|
+
|
|
123
117
|
/*****************************************************************************
|
|
124
118
|
* Rendering *
|
|
125
119
|
* To make the drag-and-drop perform as fast as possible we manually *
|
|
126
120
|
* manipulate some DOM elements in the `draw` method below. Anything that *
|
|
127
121
|
* changes the instance's `position` property should also call `draw` *
|
|
128
122
|
****************************************************************************/
|
|
129
|
-
|
|
130
123
|
}, {
|
|
131
124
|
key: "draw",
|
|
132
125
|
value: function draw() {
|
|
@@ -135,7 +128,8 @@ export var Node = /*#__PURE__*/function (_Component) {
|
|
|
135
128
|
// ? `translate(${this.position.x} ${this.position.y})`
|
|
136
129
|
// : `transform: translate(${this.position.x}px, ${this.position.y}px)`;
|
|
137
130
|
// this.el.current.setAttribute(attribute, value);
|
|
138
|
-
|
|
131
|
+
|
|
132
|
+
if (_helpers.isIE11) {
|
|
139
133
|
this.el.current.transform = "translate(".concat(this.position.x, " ").concat(this.position.y, ")");
|
|
140
134
|
} else {
|
|
141
135
|
this.el.current.style.transform = "translate(".concat(this.position.x, "px, ").concat(this.position.y, "px)");
|
|
@@ -145,26 +139,28 @@ export var Node = /*#__PURE__*/function (_Component) {
|
|
|
145
139
|
key: "render",
|
|
146
140
|
value: function render() {
|
|
147
141
|
var _this$props = this.props,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
142
|
+
node = _this$props.node,
|
|
143
|
+
highlighted = _this$props.highlighted,
|
|
144
|
+
primary = _this$props.primary,
|
|
145
|
+
selected = _this$props.selected,
|
|
146
|
+
tasks = _this$props.tasks;
|
|
153
147
|
var defers = node.defers,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var
|
|
148
|
+
definitionId = node.definitionId,
|
|
149
|
+
id = node.id,
|
|
150
|
+
name = node.name;
|
|
151
|
+
var tempNode = typeof id !== 'number';
|
|
152
|
+
var missing = !tempNode && !tasks.has(node.definitionId) && !node.definitionId.startsWith('system_tree_return_v') && !node.definitionId.startsWith('system_start_v');
|
|
153
|
+
var invalid = missing || !tempNode && !name || node.parameters.some(function (parameter) {
|
|
158
154
|
return parameter.required && parameter.value === '';
|
|
159
155
|
});
|
|
160
|
-
var isRoutine = tasks.get(definitionId) && isArray(tasks.get(definitionId).inputs);
|
|
161
|
-
var type = getNodeType(node);
|
|
156
|
+
var isRoutine = tasks.get(definitionId) && (0, _lodashEs.isArray)(tasks.get(definitionId).inputs);
|
|
157
|
+
var type = (0, _helpers.getNodeType)(node);
|
|
162
158
|
var height = type === 'join' || type === 'junction' ? constants.NODE_JOIN_JUNCTION_HEIGHT : type === 'start' ? constants.NODE_START_RADIUS * 2 : constants.NODE_HEIGHT;
|
|
163
159
|
var width = type === 'start' ? constants.NODE_START_RADIUS * 2 : constants.NODE_WIDTH;
|
|
164
|
-
return /*#__PURE__*/
|
|
160
|
+
return /*#__PURE__*/_react["default"].createElement("g", {
|
|
165
161
|
ref: this.el
|
|
166
|
-
}, type === 'start' ? /*#__PURE__*/
|
|
167
|
-
className:
|
|
162
|
+
}, type === 'start' ? /*#__PURE__*/_react["default"].createElement("circle", {
|
|
163
|
+
className: (0, _classnames["default"])('node', type, {
|
|
168
164
|
highlighted: highlighted,
|
|
169
165
|
invalid: invalid,
|
|
170
166
|
primary: primary,
|
|
@@ -175,50 +171,72 @@ export var Node = /*#__PURE__*/function (_Component) {
|
|
|
175
171
|
r: constants.NODE_START_RADIUS,
|
|
176
172
|
strokeWidth: constants.NODE_STROKE_WIDTH,
|
|
177
173
|
onMouseDown: this.drag
|
|
178
|
-
}) : /*#__PURE__*/
|
|
179
|
-
className:
|
|
174
|
+
}) : /*#__PURE__*/_react["default"].createElement("rect", {
|
|
175
|
+
className: (0, _classnames["default"])('node', type, {
|
|
180
176
|
highlighted: highlighted,
|
|
181
177
|
invalid: invalid,
|
|
182
178
|
primary: primary,
|
|
183
179
|
selected: selected,
|
|
184
|
-
missing: missing
|
|
180
|
+
missing: missing,
|
|
181
|
+
positioning: tempNode
|
|
185
182
|
}),
|
|
186
183
|
height: height,
|
|
187
184
|
width: constants.NODE_WIDTH,
|
|
188
185
|
rx: constants.NODE_RADIUS,
|
|
189
186
|
ry: constants.NODE_RADIUS,
|
|
190
187
|
strokeWidth: constants.NODE_STROKE_WIDTH,
|
|
191
|
-
onMouseDown: this.drag
|
|
192
|
-
}), /*#__PURE__*/
|
|
193
|
-
className:
|
|
188
|
+
onMouseDown: tempNode ? undefined : this.drag
|
|
189
|
+
}), type !== 'start' && /*#__PURE__*/_react["default"].createElement("rect", {
|
|
190
|
+
className: "node-text-skeleton low-detail-only",
|
|
191
|
+
height: 12,
|
|
192
|
+
width: 150,
|
|
193
|
+
x: (constants.NODE_WIDTH - 150) / 2,
|
|
194
|
+
y: (constants.NODE_HEIGHT - 12) / 2,
|
|
195
|
+
rx: 4,
|
|
196
|
+
ry: 4
|
|
197
|
+
}), "/>", /*#__PURE__*/_react["default"].createElement(_SvgText.SvgText, {
|
|
198
|
+
className: (0, _classnames["default"])('node-name med-detail', type),
|
|
194
199
|
x: 0,
|
|
195
200
|
y: 0,
|
|
196
201
|
height: height,
|
|
197
202
|
width: width,
|
|
198
203
|
padding: constants.NODE_NAME_PADDING
|
|
199
|
-
}, type === 'junction' ? 'Junction' : type === 'join' ? 'Join' : name), isRoutine && /*#__PURE__*/
|
|
204
|
+
}, type === 'junction' ? 'Junction' : type === 'join' ? 'Join' : tempNode ? 'Drag new node' : name), isRoutine && /*#__PURE__*/_react["default"].createElement("path", {
|
|
200
205
|
d: constants.NODE_LEFT_BAR_PATH,
|
|
201
|
-
className: "routine-bar"
|
|
202
|
-
|
|
206
|
+
className: "routine-bar",
|
|
207
|
+
strokeWidth: constants.NODE_DECORATION_STROKE_WIDTH
|
|
208
|
+
}), type === 'loop-head' && /*#__PURE__*/_react["default"].createElement("path", {
|
|
203
209
|
d: constants.NODE_BOTTOM_BAR_PATH,
|
|
204
|
-
className: "loop-bar"
|
|
205
|
-
|
|
210
|
+
className: "loop-bar",
|
|
211
|
+
strokeWidth: constants.NODE_DECORATION_STROKE_WIDTH
|
|
212
|
+
}), type === 'loop-tail' && /*#__PURE__*/_react["default"].createElement("path", {
|
|
206
213
|
d: constants.NODE_TOP_BAR_PATH,
|
|
207
|
-
className: "loop-bar"
|
|
208
|
-
|
|
214
|
+
className: "loop-bar",
|
|
215
|
+
strokeWidth: constants.NODE_DECORATION_STROKE_WIDTH
|
|
216
|
+
}), defers && /*#__PURE__*/_react["default"].createElement("path", {
|
|
209
217
|
d: constants.NODE_CORNER_TAB_PATH,
|
|
210
|
-
className: "defers-tab"
|
|
211
|
-
|
|
218
|
+
className: "defers-tab",
|
|
219
|
+
strokeWidth: constants.NODE_DECORATION_STROKE_WIDTH
|
|
220
|
+
}), !tempNode && /*#__PURE__*/_react["default"].createElement("image", {
|
|
212
221
|
className: "high-detail",
|
|
213
|
-
xlinkHref:
|
|
222
|
+
xlinkHref: _plus_small["default"],
|
|
214
223
|
height: constants.ICON_SIZE,
|
|
215
224
|
width: constants.ICON_SIZE,
|
|
216
|
-
x:
|
|
217
|
-
y:
|
|
225
|
+
x: width - constants.ICON_CENTER,
|
|
226
|
+
y: (type === 'start' ? constants.NODE_START_RADIUS : constants.NODE_CENTER_Y) - constants.ICON_CENTER,
|
|
218
227
|
onMouseDown: this.dragPlus
|
|
228
|
+
}), tempNode && /*#__PURE__*/_react["default"].createElement("image", {
|
|
229
|
+
xlinkHref: _dragHandle["default"],
|
|
230
|
+
height: 24,
|
|
231
|
+
width: 24,
|
|
232
|
+
x: 12,
|
|
233
|
+
y: constants.NODE_CENTER_Y - 12,
|
|
234
|
+
style: {
|
|
235
|
+
cursor: 'grabbing'
|
|
236
|
+
}
|
|
219
237
|
}));
|
|
220
238
|
}
|
|
221
239
|
}]);
|
|
222
|
-
|
|
223
240
|
return Node;
|
|
224
|
-
}(Component);
|
|
241
|
+
}(_react.Component);
|
|
242
|
+
exports.Node = Node;
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import { List } from 'immutable';
|
|
3
|
-
import { generateForm } from '../../form/Form';
|
|
4
|
-
import { NodeMessage } from './models';
|
|
5
|
-
import { buildBindings } from './helpers';
|
|
6
|
-
import { fetchForm } from '../../../apis';
|
|
7
|
-
import { checkOmittedParameters, generateTaskDefinition } from './TaskDefinitionConfigForm';
|
|
1
|
+
"use strict";
|
|
8
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.NodeForm = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _Form = require("../../form/Form");
|
|
11
|
+
var _models = require("./models");
|
|
12
|
+
var _helpers = require("./helpers");
|
|
13
|
+
var _apis = require("../../../apis");
|
|
14
|
+
var _TaskDefinitionConfigForm = require("./TaskDefinitionConfigForm");
|
|
9
15
|
var dataSources = function dataSources(_ref) {
|
|
10
16
|
var tasks = _ref.tasks,
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
tree = _ref.tree,
|
|
18
|
+
node = _ref.node;
|
|
13
19
|
return {
|
|
14
20
|
bindings: {
|
|
15
|
-
fn: buildBindings,
|
|
21
|
+
fn: _helpers.buildBindings,
|
|
16
22
|
params: [tree, tasks, node]
|
|
17
23
|
},
|
|
18
24
|
parameters: {
|
|
@@ -23,7 +29,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
23
29
|
},
|
|
24
30
|
form: {
|
|
25
31
|
fn: function fn(node) {
|
|
26
|
-
return fetchForm({
|
|
32
|
+
return (0, _apis.fetchForm)({
|
|
27
33
|
kappSlug: node.parameters.find(function (parameter) {
|
|
28
34
|
return parameter.id === 'kappSlug';
|
|
29
35
|
}).value,
|
|
@@ -35,22 +41,21 @@ var dataSources = function dataSources(_ref) {
|
|
|
35
41
|
return data.form;
|
|
36
42
|
});
|
|
37
43
|
},
|
|
38
|
-
params: generateTaskDefinition(tasks.get(node.definitionId)) ? [node] : null
|
|
44
|
+
params: (0, _TaskDefinitionConfigForm.generateTaskDefinition)(tasks.get(node.definitionId)) ? [node] : null
|
|
39
45
|
},
|
|
40
46
|
task: {
|
|
41
47
|
fn: function fn(node, form) {
|
|
42
|
-
return form ? generateTaskDefinition(tasks.get(node.definitionId))({
|
|
48
|
+
return form ? (0, _TaskDefinitionConfigForm.generateTaskDefinition)(tasks.get(node.definitionId))({
|
|
43
49
|
form: form.toJS()
|
|
44
50
|
}) : tasks.get(node.definitionId);
|
|
45
51
|
},
|
|
46
52
|
params: function params(_ref2) {
|
|
47
53
|
var form = _ref2.form;
|
|
48
|
-
return generateTaskDefinition(tasks.get(node.definitionId)) ? form ? [node, form] : null : [node, null];
|
|
54
|
+
return (0, _TaskDefinitionConfigForm.generateTaskDefinition)(tasks.get(node.definitionId)) ? form ? [node, form] : null : [node, null];
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
57
|
};
|
|
52
58
|
};
|
|
53
|
-
|
|
54
59
|
var getOptions = function getOptions(menu) {
|
|
55
60
|
return menu.split(',').filter(function (value) {
|
|
56
61
|
return !!value;
|
|
@@ -61,18 +66,16 @@ var getOptions = function getOptions(menu) {
|
|
|
61
66
|
};
|
|
62
67
|
});
|
|
63
68
|
};
|
|
64
|
-
|
|
65
69
|
var checkDependsOn = function checkDependsOn(parameter) {
|
|
66
70
|
return !parameter.dependsOnId || function (_ref3) {
|
|
67
71
|
var values = _ref3.values;
|
|
68
72
|
return values.get("parameter_".concat(parameter.dependsOnId)) === parameter.dependsOnValue;
|
|
69
73
|
};
|
|
70
74
|
};
|
|
71
|
-
|
|
72
75
|
var fields = function fields(_ref4) {
|
|
73
76
|
var tasks = _ref4.tasks,
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
tree = _ref4.tree,
|
|
78
|
+
node = _ref4.node;
|
|
76
79
|
return function (_ref5) {
|
|
77
80
|
var bindings = _ref5.bindings;
|
|
78
81
|
return bindings && [{
|
|
@@ -117,7 +120,7 @@ var fields = function fields(_ref4) {
|
|
|
117
120
|
type: 'text',
|
|
118
121
|
enabled: false,
|
|
119
122
|
initialValue: node.id
|
|
120
|
-
}].concat(
|
|
123
|
+
}].concat((0, _toConsumableArray2["default"])(node.parameters.map(function (parameter) {
|
|
121
124
|
return {
|
|
122
125
|
name: "parameter_".concat(parameter.id),
|
|
123
126
|
label: parameter.label,
|
|
@@ -127,7 +130,7 @@ var fields = function fields(_ref4) {
|
|
|
127
130
|
initialValue: parameter.value,
|
|
128
131
|
options: parameter.menu ? getOptions(parameter.menu) : bindings,
|
|
129
132
|
"transient": true,
|
|
130
|
-
visible: checkDependsOn(parameter) && checkOmittedParameters(node, parameter)
|
|
133
|
+
visible: checkDependsOn(parameter) && (0, _TaskDefinitionConfigForm.checkOmittedParameters)(node, parameter)
|
|
131
134
|
};
|
|
132
135
|
})), [{
|
|
133
136
|
name: 'parameters',
|
|
@@ -189,12 +192,13 @@ var fields = function fields(_ref4) {
|
|
|
189
192
|
visible: false,
|
|
190
193
|
serialize: function serialize(_ref10) {
|
|
191
194
|
var values = _ref10.values;
|
|
192
|
-
return List(values.get('defers') ? ['Create', 'Update', 'Complete'] : ['Complete']).map(function (type) {
|
|
193
|
-
return NodeMessage({
|
|
195
|
+
return (0, _immutable.List)(values.get('defers') ? ['Create', 'Update', 'Complete'] : ['Complete']).map(function (type) {
|
|
196
|
+
return (0, _models.NodeMessage)({
|
|
194
197
|
type: type,
|
|
195
198
|
value: values.get("message_".concat(type))
|
|
196
199
|
});
|
|
197
|
-
})
|
|
200
|
+
})
|
|
201
|
+
// Do not serialize empty messages.
|
|
198
202
|
.filter(function (message) {
|
|
199
203
|
return !!message.value;
|
|
200
204
|
});
|
|
@@ -202,18 +206,17 @@ var fields = function fields(_ref4) {
|
|
|
202
206
|
}]);
|
|
203
207
|
};
|
|
204
208
|
};
|
|
205
|
-
|
|
206
209
|
var handleSubmit = function handleSubmit(_ref11) {
|
|
207
210
|
var node = _ref11.node;
|
|
208
211
|
return function (values) {
|
|
209
212
|
return node.merge(values);
|
|
210
213
|
};
|
|
211
214
|
};
|
|
212
|
-
|
|
213
|
-
export var NodeForm = generateForm({
|
|
215
|
+
var NodeForm = (0, _Form.generateForm)({
|
|
214
216
|
formOptions: ['node', 'tasks', 'tree'],
|
|
215
217
|
dataSources: dataSources,
|
|
216
218
|
fields: fields,
|
|
217
219
|
handleSubmit: handleSubmit
|
|
218
220
|
});
|
|
221
|
+
exports.NodeForm = NodeForm;
|
|
219
222
|
NodeForm.displayName = 'NodeForm';
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { generateForm } from '../../form/Form';
|
|
3
|
-
import { buildBindings, normalizeParameter } from './helpers';
|
|
4
|
-
import { NodeParameter } from './models';
|
|
5
|
-
import { checkOmittedParameters } from './TaskDefinitionConfigForm';
|
|
1
|
+
"use strict";
|
|
6
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.NodeParametersForm = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _Form = require("../../form/Form");
|
|
10
|
+
var _helpers = require("./helpers");
|
|
11
|
+
var _models = require("./models");
|
|
12
|
+
var _TaskDefinitionConfigForm = require("./TaskDefinitionConfigForm");
|
|
7
13
|
var getOptions = function getOptions(menu) {
|
|
8
14
|
return menu.split(',').filter(function (value) {
|
|
9
15
|
return !!value;
|
|
@@ -14,15 +20,14 @@ var getOptions = function getOptions(menu) {
|
|
|
14
20
|
};
|
|
15
21
|
});
|
|
16
22
|
};
|
|
17
|
-
|
|
18
23
|
var dataSources = function dataSources(_ref) {
|
|
19
24
|
var task = _ref.task,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
tasks = _ref.tasks,
|
|
26
|
+
tree = _ref.tree,
|
|
27
|
+
node = _ref.node;
|
|
23
28
|
return {
|
|
24
29
|
bindings: {
|
|
25
|
-
fn: buildBindings,
|
|
30
|
+
fn: _helpers.buildBindings,
|
|
26
31
|
params: [tree, tasks, node]
|
|
27
32
|
},
|
|
28
33
|
parameters: {
|
|
@@ -31,21 +36,20 @@ var dataSources = function dataSources(_ref) {
|
|
|
31
36
|
},
|
|
32
37
|
params: [],
|
|
33
38
|
transform: function transform(result) {
|
|
34
|
-
return result.map(normalizeParameter).map(NodeParameter);
|
|
39
|
+
return result.map(_helpers.normalizeParameter).map(_models.NodeParameter);
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
};
|
|
38
43
|
};
|
|
39
|
-
|
|
40
44
|
var fields = function fields(_ref2) {
|
|
41
45
|
var node = _ref2.node,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
task = _ref2.task,
|
|
47
|
+
tasks = _ref2.tasks,
|
|
48
|
+
tree = _ref2.tree;
|
|
45
49
|
return function (_ref3) {
|
|
46
50
|
var bindings = _ref3.bindings,
|
|
47
|
-
|
|
48
|
-
return bindings && parameters && [].concat(
|
|
51
|
+
parameters = _ref3.parameters;
|
|
52
|
+
return bindings && parameters && [].concat((0, _toConsumableArray2["default"])(node.parameters.map(function (parameter) {
|
|
49
53
|
return {
|
|
50
54
|
name: "oldParameter_".concat(parameter.id),
|
|
51
55
|
label: parameter.label,
|
|
@@ -56,9 +60,9 @@ var fields = function fields(_ref2) {
|
|
|
56
60
|
options: parameter.menu ? getOptions(parameter.menu) : bindings,
|
|
57
61
|
"transient": true,
|
|
58
62
|
enabled: false,
|
|
59
|
-
visible: checkOmittedParameters(node, parameter)
|
|
63
|
+
visible: (0, _TaskDefinitionConfigForm.checkOmittedParameters)(node, parameter)
|
|
60
64
|
};
|
|
61
|
-
})),
|
|
65
|
+
})), (0, _toConsumableArray2["default"])(parameters.map(function (parameter) {
|
|
62
66
|
var matchingParameter = node.parameters.find(function (oldParameter) {
|
|
63
67
|
return oldParameter.id === parameter.id;
|
|
64
68
|
});
|
|
@@ -71,7 +75,7 @@ var fields = function fields(_ref2) {
|
|
|
71
75
|
initialValue: matchingParameter ? matchingParameter.value : parameter.defaultValue,
|
|
72
76
|
options: parameter.menu ? getOptions(parameter.menu) : bindings,
|
|
73
77
|
"transient": true,
|
|
74
|
-
visible: checkOmittedParameters(node, parameter)
|
|
78
|
+
visible: (0, _TaskDefinitionConfigForm.checkOmittedParameters)(node, parameter)
|
|
75
79
|
};
|
|
76
80
|
})), [{
|
|
77
81
|
name: 'parameters',
|
|
@@ -79,7 +83,7 @@ var fields = function fields(_ref2) {
|
|
|
79
83
|
visible: false,
|
|
80
84
|
serialize: function serialize(_ref4) {
|
|
81
85
|
var parameters = _ref4.parameters,
|
|
82
|
-
|
|
86
|
+
values = _ref4.values;
|
|
83
87
|
return parameters.map(function (parameter) {
|
|
84
88
|
return parameter.set('value', values.get("parameter_".concat(parameter.id)));
|
|
85
89
|
});
|
|
@@ -124,18 +128,17 @@ var fields = function fields(_ref2) {
|
|
|
124
128
|
}]);
|
|
125
129
|
};
|
|
126
130
|
};
|
|
127
|
-
|
|
128
131
|
var handleSubmit = function handleSubmit(_ref5) {
|
|
129
132
|
var node = _ref5.node;
|
|
130
133
|
return function (values) {
|
|
131
134
|
return values;
|
|
132
135
|
};
|
|
133
136
|
};
|
|
134
|
-
|
|
135
|
-
export var NodeParametersForm = generateForm({
|
|
137
|
+
var NodeParametersForm = (0, _Form.generateForm)({
|
|
136
138
|
formOptions: ['node', 'task', 'tasks', 'tree'],
|
|
137
139
|
dataSources: dataSources,
|
|
138
140
|
fields: fields,
|
|
139
141
|
handleSubmit: handleSubmit
|
|
140
142
|
});
|
|
143
|
+
exports.NodeParametersForm = NodeParametersForm;
|
|
141
144
|
NodeParametersForm.displayName = 'NodeParametersForm';
|