@kineticdata/react 5.1.2 → 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 +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 +89 -80
- package/lib/apis/http.test.js +37 -38
- package/lib/apis/index.js +506 -50
- package/lib/apis/system/index.js +228 -211
- package/lib/apis/task/index.js +280 -227
- 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 -135
- 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 +211 -224
- package/lib/components/table/Table.redux.js +292 -329
- 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 +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 +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 +48 -54
- package/lib/components/task/workflows/LinkedWorkflowTable.js +14 -10
- 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 +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 +3 -28
- package/proxyhelper.js +105 -46
- 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,54 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _immutable = require("immutable");
|
|
4
|
+
var _helpers = require("./helpers");
|
|
5
|
+
var _models = require("./models");
|
|
4
6
|
describe('parseNodeResultDependencies', function () {
|
|
5
7
|
test('supports erb', function () {
|
|
6
|
-
expect(parseNodeResultDependencies(['node', '2', 'parameter', '4'], 'Hello <%= @results ["Person"]["First Name"] %> from <%= @results["Requester"]["Name"] %>', true)).toEqual(List([NodeResultDependency({
|
|
7
|
-
context: List(['node', '2', 'parameter', '4']),
|
|
8
|
+
expect((0, _helpers.parseNodeResultDependencies)(['node', '2', 'parameter', '4'], 'Hello <%= @results ["Person"]["First Name"] %> from <%= @results["Requester"]["Name"] %>', true)).toEqual((0, _immutable.List)([(0, _models.NodeResultDependency)({
|
|
9
|
+
context: (0, _immutable.List)(['node', '2', 'parameter', '4']),
|
|
8
10
|
name: 'Person',
|
|
9
11
|
index: 21
|
|
10
|
-
}), NodeResultDependency({
|
|
11
|
-
context: List(['node', '2', 'parameter', '4']),
|
|
12
|
+
}), (0, _models.NodeResultDependency)({
|
|
13
|
+
context: (0, _immutable.List)(['node', '2', 'parameter', '4']),
|
|
12
14
|
name: 'Requester',
|
|
13
15
|
index: 66
|
|
14
16
|
})]));
|
|
15
17
|
});
|
|
16
18
|
test('supports ruby', function () {
|
|
17
|
-
expect(parseNodeResultDependencies(['connector', '1'], '"Hello " + @results["Person"]["First Name"]')).toEqual(List.of(NodeResultDependency({
|
|
18
|
-
context: List(['connector', '1']),
|
|
19
|
+
expect((0, _helpers.parseNodeResultDependencies)(['connector', '1'], '"Hello " + @results["Person"]["First Name"]')).toEqual(_immutable.List.of((0, _models.NodeResultDependency)({
|
|
20
|
+
context: (0, _immutable.List)(['connector', '1']),
|
|
19
21
|
name: 'Person',
|
|
20
22
|
index: 21
|
|
21
23
|
})));
|
|
22
24
|
});
|
|
23
25
|
test('supports %^...^ strings', function () {
|
|
24
|
-
expect(parseNodeResultDependencies(['connector', '1'], '"Hello " + @results[%^Person^]["First Name"]')).toEqual(List.of(NodeResultDependency({
|
|
25
|
-
context: List(['connector', '1']),
|
|
26
|
+
expect((0, _helpers.parseNodeResultDependencies)(['connector', '1'], '"Hello " + @results[%^Person^]["First Name"]')).toEqual(_immutable.List.of((0, _models.NodeResultDependency)({
|
|
27
|
+
context: (0, _immutable.List)(['connector', '1']),
|
|
26
28
|
name: 'Person',
|
|
27
29
|
index: 22
|
|
28
30
|
})));
|
|
29
31
|
});
|
|
30
32
|
test('supports %q^...^ strings', function () {
|
|
31
|
-
expect(parseNodeResultDependencies(['connector', '1'], '"Hello " + @results[%q^Person^]["First Name"]')).toEqual(List.of(NodeResultDependency({
|
|
32
|
-
context: List(['connector', '1']),
|
|
33
|
+
expect((0, _helpers.parseNodeResultDependencies)(['connector', '1'], '"Hello " + @results[%q^Person^]["First Name"]')).toEqual(_immutable.List.of((0, _models.NodeResultDependency)({
|
|
34
|
+
context: (0, _immutable.List)(['connector', '1']),
|
|
33
35
|
name: 'Person',
|
|
34
36
|
index: 23
|
|
35
37
|
})));
|
|
36
38
|
});
|
|
37
39
|
test('supports %(...) strings', function () {
|
|
38
|
-
expect(parseNodeResultDependencies(['connector', '1'], '"Hello " + @results[%(Person)]["First Name"]')).toEqual(List.of(NodeResultDependency({
|
|
39
|
-
context: List(['connector', '1']),
|
|
40
|
+
expect((0, _helpers.parseNodeResultDependencies)(['connector', '1'], '"Hello " + @results[%(Person)]["First Name"]')).toEqual(_immutable.List.of((0, _models.NodeResultDependency)({
|
|
41
|
+
context: (0, _immutable.List)(['connector', '1']),
|
|
40
42
|
name: 'Person',
|
|
41
43
|
index: 22
|
|
42
44
|
})));
|
|
43
45
|
});
|
|
44
46
|
test('allows whitespace between @results and [ and string', function () {
|
|
45
|
-
expect(parseNodeResultDependencies(['connector', '1'], '"Hello " + @results [ "Person" ]["First Name"]')).toEqual(List.of(NodeResultDependency({
|
|
46
|
-
context: List(['connector', '1']),
|
|
47
|
+
expect((0, _helpers.parseNodeResultDependencies)(['connector', '1'], '"Hello " + @results [ "Person" ]["First Name"]')).toEqual(_immutable.List.of((0, _models.NodeResultDependency)({
|
|
48
|
+
context: (0, _immutable.List)(['connector', '1']),
|
|
47
49
|
name: 'Person',
|
|
48
50
|
index: 23
|
|
49
51
|
})));
|
|
50
52
|
});
|
|
51
53
|
test('returns empty is no node dependencies', function () {
|
|
52
|
-
expect(parseNodeResultDependencies(['connector', '1'], '"Hello " + @other["Person"]["First Name"]')).toEqual(List());
|
|
54
|
+
expect((0, _helpers.parseNodeResultDependencies)(['connector', '1'], '"Hello " + @other["Person"]["First Name"]')).toEqual((0, _immutable.List)());
|
|
53
55
|
});
|
|
54
56
|
});
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.serializeTree = exports.serializeNodeId = exports.serializeNode = exports.serializeConnector = exports.deserializeWebApi = exports.deserializeTree = exports.deserializeNode = exports.deserializeConnector = exports.WebApi = exports.TreeBuilderState = exports.Tree = exports.Point = exports.NodeResultDependency = exports.NodeParameter = exports.NodeMessage = exports.Node = exports.Connector = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
|
+
var _immutable = require("immutable");
|
|
11
|
+
var _excluded = ["id", "messages", "parameters", "position"];
|
|
4
12
|
/*******************************************************************************
|
|
5
13
|
* Immutable records *
|
|
6
14
|
******************************************************************************/
|
|
7
15
|
|
|
8
|
-
|
|
16
|
+
var Point = (0, _immutable.Record)({
|
|
9
17
|
x: 0,
|
|
10
18
|
y: 0
|
|
11
19
|
}, 'Point');
|
|
12
|
-
|
|
20
|
+
exports.Point = Point;
|
|
21
|
+
var WebApi = (0, _immutable.Record)({
|
|
13
22
|
createdAt: null,
|
|
14
23
|
createdBy: null,
|
|
15
24
|
method: null,
|
|
@@ -19,10 +28,11 @@ export var WebApi = Record({
|
|
|
19
28
|
updatedAt: null,
|
|
20
29
|
updatedBy: null
|
|
21
30
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
exports.WebApi = WebApi;
|
|
32
|
+
var Tree = (0, _immutable.Record)({
|
|
33
|
+
bindings: (0, _immutable.OrderedMap)(),
|
|
34
|
+
categories: (0, _immutable.List)(),
|
|
35
|
+
connectors: (0, _immutable.OrderedMap)(),
|
|
26
36
|
definitionId: null,
|
|
27
37
|
event: null,
|
|
28
38
|
guid: null,
|
|
@@ -30,7 +40,7 @@ export var Tree = Record({
|
|
|
30
40
|
name: '',
|
|
31
41
|
nextNodeId: 0,
|
|
32
42
|
nextConnectorId: 0,
|
|
33
|
-
nodes: OrderedMap(),
|
|
43
|
+
nodes: (0, _immutable.OrderedMap)(),
|
|
34
44
|
notes: '',
|
|
35
45
|
outputs: null,
|
|
36
46
|
ownerEmail: '',
|
|
@@ -43,20 +53,22 @@ export var Tree = Record({
|
|
|
43
53
|
type: '',
|
|
44
54
|
versionId: '0'
|
|
45
55
|
});
|
|
46
|
-
|
|
56
|
+
exports.Tree = Tree;
|
|
57
|
+
var Node = (0, _immutable.Record)({
|
|
47
58
|
configured: true,
|
|
48
59
|
deferrable: false,
|
|
49
60
|
defers: false,
|
|
50
61
|
definitionId: '',
|
|
51
62
|
id: null,
|
|
52
|
-
messages: List(),
|
|
63
|
+
messages: (0, _immutable.List)(),
|
|
53
64
|
name: '',
|
|
54
|
-
parameters: List(),
|
|
65
|
+
parameters: (0, _immutable.List)(),
|
|
55
66
|
position: Point(),
|
|
56
67
|
version: 1,
|
|
57
68
|
visible: true
|
|
58
69
|
});
|
|
59
|
-
|
|
70
|
+
exports.Node = Node;
|
|
71
|
+
var NodeParameter = (0, _immutable.Record)({
|
|
60
72
|
dependsOnId: '',
|
|
61
73
|
dependsOnValue: '',
|
|
62
74
|
description: '',
|
|
@@ -66,11 +78,13 @@ export var NodeParameter = Record({
|
|
|
66
78
|
required: false,
|
|
67
79
|
value: ''
|
|
68
80
|
});
|
|
69
|
-
|
|
81
|
+
exports.NodeParameter = NodeParameter;
|
|
82
|
+
var NodeMessage = (0, _immutable.Record)({
|
|
70
83
|
type: '',
|
|
71
84
|
value: ''
|
|
72
85
|
});
|
|
73
|
-
|
|
86
|
+
exports.NodeMessage = NodeMessage;
|
|
87
|
+
var Connector = (0, _immutable.Record)({
|
|
74
88
|
condition: '',
|
|
75
89
|
headId: null,
|
|
76
90
|
id: null,
|
|
@@ -78,68 +92,72 @@ export var Connector = Record({
|
|
|
78
92
|
tailId: null,
|
|
79
93
|
type: 'Complete'
|
|
80
94
|
});
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
exports.Connector = Connector;
|
|
96
|
+
var TreeBuilderState = (0, _immutable.Record)({
|
|
97
|
+
categories: (0, _immutable.OrderedMap)(),
|
|
83
98
|
error: null,
|
|
84
99
|
kappSlug: null,
|
|
85
100
|
lastSave: null,
|
|
86
101
|
lastWebApi: null,
|
|
87
102
|
loading: true,
|
|
88
103
|
platformItem: null,
|
|
89
|
-
redoStack: List(),
|
|
104
|
+
redoStack: (0, _immutable.List)(),
|
|
90
105
|
saving: false,
|
|
91
|
-
tasks: OrderedMap(),
|
|
106
|
+
tasks: (0, _immutable.OrderedMap)(),
|
|
92
107
|
tree: null,
|
|
93
|
-
undoStack: List(),
|
|
108
|
+
undoStack: (0, _immutable.List)(),
|
|
94
109
|
webApi: null
|
|
95
110
|
});
|
|
96
|
-
|
|
111
|
+
exports.TreeBuilderState = TreeBuilderState;
|
|
112
|
+
var NodeResultDependency = (0, _immutable.Record)({
|
|
97
113
|
// where the dependency was found, one of:
|
|
98
114
|
// connector id | node id message type | node id parameter id
|
|
99
|
-
context: List(),
|
|
115
|
+
context: (0, _immutable.List)(),
|
|
100
116
|
// name of the node being referenced
|
|
101
117
|
name: '',
|
|
102
118
|
// position of the node name in the value
|
|
103
119
|
index: 0
|
|
104
120
|
});
|
|
121
|
+
|
|
105
122
|
/*******************************************************************************
|
|
106
123
|
* Serialization functions *
|
|
107
124
|
* Should take native objects that are returned from the API endpoints and *
|
|
108
125
|
* convert them to immutable records used by the builder implementation *
|
|
109
126
|
******************************************************************************/
|
|
110
|
-
|
|
127
|
+
exports.NodeResultDependency = NodeResultDependency;
|
|
111
128
|
var deserializeNodeId = function deserializeNodeId(id) {
|
|
112
|
-
var match = id.match(/_(\d+)$/);
|
|
113
|
-
|
|
129
|
+
var match = id.match(/_(\d+)$/);
|
|
130
|
+
// the start node will not match the pattern above so we give that an id of 0
|
|
114
131
|
return match ? parseInt(match[1]) : 0;
|
|
115
132
|
};
|
|
116
|
-
|
|
117
|
-
export var serializeNodeId = function serializeNodeId(node) {
|
|
133
|
+
var serializeNodeId = function serializeNodeId(node) {
|
|
118
134
|
return node.id === 0 ? 'start' : "".concat(node.definitionId, "_").concat(node.id);
|
|
119
135
|
};
|
|
120
|
-
|
|
136
|
+
exports.serializeNodeId = serializeNodeId;
|
|
137
|
+
var deserializeNode = function deserializeNode(_ref) {
|
|
121
138
|
var id = _ref.id,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return Node(_objectSpread(_objectSpread({}, props), {}, {
|
|
139
|
+
messages = _ref.messages,
|
|
140
|
+
parameters = _ref.parameters,
|
|
141
|
+
position = _ref.position,
|
|
142
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
143
|
+
return Node((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
|
|
128
144
|
id: deserializeNodeId(id),
|
|
129
|
-
messages: List(messages.map(NodeMessage)),
|
|
130
|
-
parameters: List(parameters.map(NodeParameter)),
|
|
145
|
+
messages: (0, _immutable.List)(messages.map(NodeMessage)),
|
|
146
|
+
parameters: (0, _immutable.List)(parameters.map(NodeParameter)),
|
|
131
147
|
position: Point(position)
|
|
132
148
|
}));
|
|
133
149
|
};
|
|
134
|
-
|
|
150
|
+
exports.deserializeNode = deserializeNode;
|
|
151
|
+
var serializeNode = function serializeNode(node) {
|
|
135
152
|
return node.set('id', serializeNodeId(node)).toJS();
|
|
136
153
|
};
|
|
137
|
-
|
|
154
|
+
exports.serializeNode = serializeNode;
|
|
155
|
+
var deserializeConnector = function deserializeConnector(_ref2, id) {
|
|
138
156
|
var from = _ref2.from,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
157
|
+
label = _ref2.label,
|
|
158
|
+
to = _ref2.to,
|
|
159
|
+
type = _ref2.type,
|
|
160
|
+
value = _ref2.value;
|
|
143
161
|
var headId = deserializeNodeId(to);
|
|
144
162
|
var tailId = deserializeNodeId(from);
|
|
145
163
|
return Connector({
|
|
@@ -151,13 +169,14 @@ export var deserializeConnector = function deserializeConnector(_ref2, id) {
|
|
|
151
169
|
type: type
|
|
152
170
|
});
|
|
153
171
|
};
|
|
154
|
-
|
|
172
|
+
exports.deserializeConnector = deserializeConnector;
|
|
173
|
+
var serializeConnector = function serializeConnector(nodes) {
|
|
155
174
|
return function (_ref3) {
|
|
156
175
|
var condition = _ref3.condition,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
176
|
+
headId = _ref3.headId,
|
|
177
|
+
label = _ref3.label,
|
|
178
|
+
tailId = _ref3.tailId,
|
|
179
|
+
type = _ref3.type;
|
|
161
180
|
return {
|
|
162
181
|
from: serializeNodeId(nodes.get(tailId)),
|
|
163
182
|
label: label,
|
|
@@ -167,46 +186,47 @@ export var serializeConnector = function serializeConnector(nodes) {
|
|
|
167
186
|
};
|
|
168
187
|
};
|
|
169
188
|
};
|
|
170
|
-
|
|
189
|
+
exports.serializeConnector = serializeConnector;
|
|
190
|
+
var deserializeTree = function deserializeTree(_ref4) {
|
|
171
191
|
var bindings = _ref4.bindings,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
192
|
+
categories = _ref4.categories,
|
|
193
|
+
definitionId = _ref4.definitionId,
|
|
194
|
+
event = _ref4.event,
|
|
195
|
+
guid = _ref4.guid,
|
|
196
|
+
inputs = _ref4.inputs,
|
|
197
|
+
name = _ref4.name,
|
|
198
|
+
notes = _ref4.notes,
|
|
199
|
+
outputs = _ref4.outputs,
|
|
200
|
+
ownerEmail = _ref4.ownerEmail,
|
|
201
|
+
platformItemId = _ref4.platformItemId,
|
|
202
|
+
platformItemType = _ref4.platformItemType,
|
|
203
|
+
sourceGroup = _ref4.sourceGroup,
|
|
204
|
+
sourceName = _ref4.sourceName,
|
|
205
|
+
status = _ref4.status,
|
|
206
|
+
treeJson = _ref4.treeJson,
|
|
207
|
+
type = _ref4.type,
|
|
208
|
+
versionId = _ref4.versionId;
|
|
189
209
|
return Tree({
|
|
190
210
|
bindings: bindings,
|
|
191
|
-
categories: List(categories).map(function (c) {
|
|
211
|
+
categories: (0, _immutable.List)(categories).map(function (c) {
|
|
192
212
|
return c.name;
|
|
193
213
|
}),
|
|
194
|
-
connectors: OrderedMap(treeJson.connectors.map(deserializeConnector).map(function (c) {
|
|
214
|
+
connectors: (0, _immutable.OrderedMap)(treeJson.connectors.map(deserializeConnector).map(function (c) {
|
|
195
215
|
return [c.id, c];
|
|
196
216
|
})),
|
|
197
217
|
definitionId: definitionId,
|
|
198
218
|
event: event,
|
|
199
219
|
guid: guid,
|
|
200
|
-
inputs: List(inputs).map(Map),
|
|
220
|
+
inputs: (0, _immutable.List)(inputs).map(_immutable.Map),
|
|
201
221
|
name: name,
|
|
202
222
|
notes: notes,
|
|
203
|
-
outputs: List(outputs).map(Map),
|
|
223
|
+
outputs: (0, _immutable.List)(outputs).map(_immutable.Map),
|
|
204
224
|
ownerEmail: ownerEmail,
|
|
205
225
|
platformItemId: platformItemId,
|
|
206
226
|
platformItemType: platformItemType,
|
|
207
227
|
nextNodeId: treeJson.lastId + 1,
|
|
208
228
|
nextConnectorId: treeJson.connectors.length,
|
|
209
|
-
nodes: OrderedMap(treeJson.nodes.map(deserializeNode).map(function (n) {
|
|
229
|
+
nodes: (0, _immutable.OrderedMap)(treeJson.nodes.map(deserializeNode).map(function (n) {
|
|
210
230
|
return [n.id, n];
|
|
211
231
|
})),
|
|
212
232
|
schemaVersion: treeJson.schemaVersion,
|
|
@@ -217,25 +237,26 @@ export var deserializeTree = function deserializeTree(_ref4) {
|
|
|
217
237
|
versionId: versionId
|
|
218
238
|
});
|
|
219
239
|
};
|
|
220
|
-
|
|
240
|
+
exports.deserializeTree = deserializeTree;
|
|
241
|
+
var serializeTree = function serializeTree(_ref5) {
|
|
221
242
|
var connectors = _ref5.connectors,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
243
|
+
categories = _ref5.categories,
|
|
244
|
+
definitionId = _ref5.definitionId,
|
|
245
|
+
event = _ref5.event,
|
|
246
|
+
inputs = _ref5.inputs,
|
|
247
|
+
name = _ref5.name,
|
|
248
|
+
nextNodeId = _ref5.nextNodeId,
|
|
249
|
+
nodes = _ref5.nodes,
|
|
250
|
+
notes = _ref5.notes,
|
|
251
|
+
outputs = _ref5.outputs,
|
|
252
|
+
ownerEmail = _ref5.ownerEmail,
|
|
253
|
+
platformItemId = _ref5.platformItemId,
|
|
254
|
+
platformItemType = _ref5.platformItemType,
|
|
255
|
+
schemaVersion = _ref5.schemaVersion,
|
|
256
|
+
sourceGroup = _ref5.sourceGroup,
|
|
257
|
+
sourceName = _ref5.sourceName,
|
|
258
|
+
status = _ref5.status,
|
|
259
|
+
versionId = _ref5.versionId;
|
|
239
260
|
var overwrite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
240
261
|
return {
|
|
241
262
|
categories: categories,
|
|
@@ -260,22 +281,24 @@ export var serializeTree = function serializeTree(_ref5) {
|
|
|
260
281
|
versionId: overwrite ? null : versionId
|
|
261
282
|
};
|
|
262
283
|
};
|
|
263
|
-
|
|
284
|
+
exports.serializeTree = serializeTree;
|
|
285
|
+
var deserializeWebApi = function deserializeWebApi(_ref6, kappSlug) {
|
|
264
286
|
var createdAt = _ref6.createdAt,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
287
|
+
createdBy = _ref6.createdBy,
|
|
288
|
+
method = _ref6.method,
|
|
289
|
+
securityPolicies = _ref6.securityPolicies,
|
|
290
|
+
slug = _ref6.slug,
|
|
291
|
+
updatedAt = _ref6.updatedAt,
|
|
292
|
+
updatedBy = _ref6.updatedBy;
|
|
271
293
|
return WebApi({
|
|
272
294
|
createdAt: createdAt,
|
|
273
295
|
createdBy: createdBy,
|
|
274
296
|
method: method,
|
|
275
|
-
securityPolicies: List(securityPolicies).map(Map),
|
|
297
|
+
securityPolicies: (0, _immutable.List)(securityPolicies).map(_immutable.Map),
|
|
276
298
|
slug: slug,
|
|
277
299
|
kappSlug: kappSlug,
|
|
278
300
|
updatedAt: updatedAt,
|
|
279
301
|
updatedBy: updatedBy
|
|
280
302
|
});
|
|
281
|
-
};
|
|
303
|
+
};
|
|
304
|
+
exports.deserializeWebApi = deserializeWebApi;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import { Map } from 'immutable';
|
|
3
|
-
import { createTaskCategory, fetchTaskCategory, updateTaskCategory, fetchHandlers, fetchTrees, fetchPolicyRules } from '../../../apis';
|
|
4
|
-
import { Form } from '../../form/Form';
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TaskCategoryForm = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _apis = require("../../../apis");
|
|
11
|
+
var _Form = require("../../form/Form");
|
|
6
12
|
var dataSources = function dataSources(_ref) {
|
|
7
13
|
var categoryName = _ref.categoryName;
|
|
8
14
|
return {
|
|
9
15
|
category: {
|
|
10
|
-
fn: fetchTaskCategory,
|
|
16
|
+
fn: _apis.fetchTaskCategory,
|
|
11
17
|
params: categoryName && [{
|
|
12
18
|
categoryName: categoryName,
|
|
13
19
|
include: 'details,handlers,trees,policyRules'
|
|
@@ -17,7 +23,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
17
23
|
}
|
|
18
24
|
},
|
|
19
25
|
handlers: {
|
|
20
|
-
fn: fetchHandlers,
|
|
26
|
+
fn: _apis.fetchHandlers,
|
|
21
27
|
params: [{
|
|
22
28
|
include: 'details'
|
|
23
29
|
}],
|
|
@@ -26,7 +32,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
26
32
|
}
|
|
27
33
|
},
|
|
28
34
|
routines: {
|
|
29
|
-
fn: fetchTrees,
|
|
35
|
+
fn: _apis.fetchTrees,
|
|
30
36
|
params: [{
|
|
31
37
|
type: 'Global Routine',
|
|
32
38
|
include: 'details'
|
|
@@ -36,7 +42,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
36
42
|
}
|
|
37
43
|
},
|
|
38
44
|
policyRules: {
|
|
39
|
-
fn: fetchPolicyRules,
|
|
45
|
+
fn: _apis.fetchPolicyRules,
|
|
40
46
|
params: [{
|
|
41
47
|
type: 'Category Access',
|
|
42
48
|
include: 'details'
|
|
@@ -47,26 +53,22 @@ var dataSources = function dataSources(_ref) {
|
|
|
47
53
|
}
|
|
48
54
|
};
|
|
49
55
|
};
|
|
50
|
-
|
|
51
56
|
var handleSubmit = function handleSubmit(_ref2) {
|
|
52
57
|
var categoryName = _ref2.categoryName;
|
|
53
58
|
return function (values) {
|
|
54
|
-
return (categoryName ? updateTaskCategory : createTaskCategory)({
|
|
59
|
+
return (categoryName ? _apis.updateTaskCategory : _apis.createTaskCategory)({
|
|
55
60
|
category: values.toJS(),
|
|
56
61
|
categoryName: categoryName
|
|
57
62
|
}).then(function (_ref3) {
|
|
58
63
|
var category = _ref3.category,
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
error = _ref3.error;
|
|
61
65
|
if (error) {
|
|
62
66
|
throw error.statusCode === 400 && error.message || 'There was an error saving the category';
|
|
63
67
|
}
|
|
64
|
-
|
|
65
68
|
return category;
|
|
66
69
|
});
|
|
67
70
|
};
|
|
68
71
|
};
|
|
69
|
-
|
|
70
72
|
var fields = function fields(_ref4) {
|
|
71
73
|
var categoryName = _ref4.categoryName;
|
|
72
74
|
return function (_ref5) {
|
|
@@ -92,7 +94,7 @@ var fields = function fields(_ref4) {
|
|
|
92
94
|
options: function options(_ref6) {
|
|
93
95
|
var handlers = _ref6.handlers;
|
|
94
96
|
return handlers ? handlers.map(function (handler) {
|
|
95
|
-
return Map({
|
|
97
|
+
return (0, _immutable.Map)({
|
|
96
98
|
label: handler.get('name'),
|
|
97
99
|
value: handler.get('definitionId')
|
|
98
100
|
});
|
|
@@ -115,7 +117,7 @@ var fields = function fields(_ref4) {
|
|
|
115
117
|
options: function options(_ref8) {
|
|
116
118
|
var routines = _ref8.routines;
|
|
117
119
|
return routines ? routines.map(function (routine) {
|
|
118
|
-
return Map({
|
|
120
|
+
return (0, _immutable.Map)({
|
|
119
121
|
label: routine.get('name'),
|
|
120
122
|
value: routine.get('definitionId')
|
|
121
123
|
});
|
|
@@ -138,7 +140,7 @@ var fields = function fields(_ref4) {
|
|
|
138
140
|
options: function options(_ref10) {
|
|
139
141
|
var policyRules = _ref10.policyRules;
|
|
140
142
|
return policyRules ? policyRules.map(function (policyRule) {
|
|
141
|
-
return Map({
|
|
143
|
+
return (0, _immutable.Map)({
|
|
142
144
|
label: policyRule.get('name'),
|
|
143
145
|
value: policyRule.get('name')
|
|
144
146
|
});
|
|
@@ -156,18 +158,17 @@ var fields = function fields(_ref4) {
|
|
|
156
158
|
}];
|
|
157
159
|
};
|
|
158
160
|
};
|
|
159
|
-
|
|
160
|
-
export var TaskCategoryForm = function TaskCategoryForm(_ref12) {
|
|
161
|
+
var TaskCategoryForm = function TaskCategoryForm(_ref12) {
|
|
161
162
|
var addFields = _ref12.addFields,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return /*#__PURE__*/
|
|
163
|
+
alterFields = _ref12.alterFields,
|
|
164
|
+
fieldSet = _ref12.fieldSet,
|
|
165
|
+
formKey = _ref12.formKey,
|
|
166
|
+
components = _ref12.components,
|
|
167
|
+
onSave = _ref12.onSave,
|
|
168
|
+
onError = _ref12.onError,
|
|
169
|
+
children = _ref12.children,
|
|
170
|
+
categoryName = _ref12.categoryName;
|
|
171
|
+
return /*#__PURE__*/_react["default"].createElement(_Form.Form, {
|
|
171
172
|
addFields: addFields,
|
|
172
173
|
alterFields: alterFields,
|
|
173
174
|
fieldSet: fieldSet,
|
|
@@ -182,4 +183,5 @@ export var TaskCategoryForm = function TaskCategoryForm(_ref12) {
|
|
|
182
183
|
categoryName: categoryName
|
|
183
184
|
}
|
|
184
185
|
}, children);
|
|
185
|
-
};
|
|
186
|
+
};
|
|
187
|
+
exports.TaskCategoryForm = TaskCategoryForm;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchTaskCategories } from '../../../apis';
|
|
3
|
-
import { defineFilter } from '../../../helpers';
|
|
4
|
-
var clientSide = defineFilter(true).startsWith('name', 'name').end();
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TaskCategoryTable = void 0;
|
|
7
|
+
var _Table = require("../../table/Table");
|
|
8
|
+
var _apis = require("../../../apis");
|
|
9
|
+
var _helpers = require("../../../helpers");
|
|
10
|
+
var clientSide = (0, _helpers.defineFilter)(true).startsWith('name', 'name').end();
|
|
6
11
|
var dataSource = function dataSource() {
|
|
7
12
|
return {
|
|
8
|
-
fn: fetchTaskCategories,
|
|
13
|
+
fn: _apis.fetchTaskCategories,
|
|
9
14
|
clientSide: clientSide,
|
|
10
15
|
params: function params() {
|
|
11
16
|
return [{
|
|
@@ -19,7 +24,6 @@ var dataSource = function dataSource() {
|
|
|
19
24
|
}
|
|
20
25
|
};
|
|
21
26
|
};
|
|
22
|
-
|
|
23
27
|
var filters = function filters() {
|
|
24
28
|
return function () {
|
|
25
29
|
return [{
|
|
@@ -29,7 +33,6 @@ var filters = function filters() {
|
|
|
29
33
|
}];
|
|
30
34
|
};
|
|
31
35
|
};
|
|
32
|
-
|
|
33
36
|
var columns = [{
|
|
34
37
|
value: 'name',
|
|
35
38
|
title: 'Name',
|
|
@@ -63,11 +66,12 @@ var columns = [{
|
|
|
63
66
|
title: 'Updated By',
|
|
64
67
|
sortable: true
|
|
65
68
|
}];
|
|
66
|
-
|
|
69
|
+
var TaskCategoryTable = (0, _Table.generateTable)({
|
|
67
70
|
tableOptions: [],
|
|
68
71
|
columns: columns,
|
|
69
72
|
filters: filters,
|
|
70
73
|
dataSource: dataSource
|
|
71
74
|
});
|
|
75
|
+
exports.TaskCategoryTable = TaskCategoryTable;
|
|
72
76
|
TaskCategoryTable.propTypes = {};
|
|
73
77
|
TaskCategoryTable.displayName = 'TaskCategoryTable';
|