@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,20 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.FormForm = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
10
|
+
var _immutable = require("immutable");
|
|
11
|
+
var _Form = require("../../form/Form");
|
|
12
|
+
var _apis = require("../../../apis");
|
|
13
|
+
var _helpers = require("../../../helpers");
|
|
7
14
|
var FORM_STATUSES = ['New', 'Active', 'Inactive', 'Delete'];
|
|
8
15
|
var FORM_INCLUDES = 'details,attributesMap,securityPolicies,backgroundJobs,fields,categorizations';
|
|
9
16
|
var KAPP_INCLUDES = 'fields,formTypes,formAttributeDefinitions,kappAttributeDefinitions,securityPolicies';
|
|
10
17
|
var SPACE_INCLUDES = 'spaceAttributeDefinitions,formAttributeDefinitions,securityPolicies';
|
|
11
|
-
|
|
12
18
|
var dataSources = function dataSources(_ref) {
|
|
13
19
|
var formSlug = _ref.formSlug,
|
|
14
|
-
|
|
20
|
+
kappSlug = _ref.kappSlug;
|
|
15
21
|
return {
|
|
16
22
|
form: {
|
|
17
|
-
fn: fetchForm,
|
|
23
|
+
fn: _apis.fetchForm,
|
|
18
24
|
params: formSlug && [{
|
|
19
25
|
formSlug: formSlug,
|
|
20
26
|
kappSlug: kappSlug,
|
|
@@ -25,7 +31,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
25
31
|
}
|
|
26
32
|
},
|
|
27
33
|
kapp: {
|
|
28
|
-
fn: fetchKapp,
|
|
34
|
+
fn: _apis.fetchKapp,
|
|
29
35
|
params: kappSlug && [{
|
|
30
36
|
kappSlug: kappSlug,
|
|
31
37
|
include: KAPP_INCLUDES
|
|
@@ -35,7 +41,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
35
41
|
}
|
|
36
42
|
},
|
|
37
43
|
space: {
|
|
38
|
-
fn: fetchSpace,
|
|
44
|
+
fn: _apis.fetchSpace,
|
|
39
45
|
params: [{
|
|
40
46
|
include: SPACE_INCLUDES
|
|
41
47
|
}],
|
|
@@ -44,7 +50,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
44
50
|
}
|
|
45
51
|
},
|
|
46
52
|
attributeDefinitions: {
|
|
47
|
-
fn: fetchAttributeDefinitions,
|
|
53
|
+
fn: _apis.fetchAttributeDefinitions,
|
|
48
54
|
params: [{
|
|
49
55
|
kappSlug: kappSlug,
|
|
50
56
|
formSlug: formSlug,
|
|
@@ -55,7 +61,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
55
61
|
}
|
|
56
62
|
},
|
|
57
63
|
securityPolicyDefinitions: {
|
|
58
|
-
fn: fetchSecurityPolicyDefinitions,
|
|
64
|
+
fn: _apis.fetchSecurityPolicyDefinitions,
|
|
59
65
|
params: [{
|
|
60
66
|
kappSlug: kappSlug
|
|
61
67
|
}],
|
|
@@ -64,7 +70,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
64
70
|
}
|
|
65
71
|
},
|
|
66
72
|
categories: {
|
|
67
|
-
fn: fetchCategories,
|
|
73
|
+
fn: _apis.fetchCategories,
|
|
68
74
|
params: kappSlug && [{
|
|
69
75
|
kappSlug: kappSlug,
|
|
70
76
|
include: 'attributes[Parent]'
|
|
@@ -75,34 +81,29 @@ var dataSources = function dataSources(_ref) {
|
|
|
75
81
|
}
|
|
76
82
|
};
|
|
77
83
|
};
|
|
78
|
-
|
|
79
84
|
var handleSubmit = function handleSubmit(_ref2) {
|
|
80
85
|
var formSlug = _ref2.formSlug,
|
|
81
|
-
|
|
86
|
+
kappSlug = _ref2.kappSlug;
|
|
82
87
|
return function (values) {
|
|
83
|
-
return (formSlug ? updateForm : createForm)({
|
|
88
|
+
return (formSlug ? _apis.updateForm : _apis.createForm)({
|
|
84
89
|
kappSlug: kappSlug,
|
|
85
90
|
formSlug: formSlug,
|
|
86
91
|
form: values.toJS()
|
|
87
92
|
}).then(function (_ref3) {
|
|
88
93
|
var form = _ref3.form,
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
error = _ref3.error;
|
|
91
95
|
if (error) {
|
|
92
96
|
throw error.statusCode === 400 && error.message || 'There was an error saving the form';
|
|
93
97
|
}
|
|
94
|
-
|
|
95
98
|
return form;
|
|
96
99
|
});
|
|
97
100
|
};
|
|
98
101
|
};
|
|
99
|
-
|
|
100
102
|
var buildLabel = function buildLabel(_ref4) {
|
|
101
103
|
var name = _ref4.name,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
category = _ref4.category,
|
|
105
|
+
categories = _ref4.categories;
|
|
104
106
|
var match = null;
|
|
105
|
-
|
|
106
107
|
if (category.get('attributes').size) {
|
|
107
108
|
category.get('attributes').map(function (c) {
|
|
108
109
|
if (c.get('name') === 'Parent') {
|
|
@@ -115,14 +116,11 @@ var buildLabel = function buildLabel(_ref4) {
|
|
|
115
116
|
categories: categories
|
|
116
117
|
}) : "(Missing Category ".concat(c.getIn(['values', 0]), ")::").concat(name);
|
|
117
118
|
}
|
|
118
|
-
|
|
119
119
|
return name;
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
|
|
123
122
|
return name;
|
|
124
123
|
};
|
|
125
|
-
|
|
126
124
|
var securityEndpoints = {
|
|
127
125
|
formDisplay: {
|
|
128
126
|
endpoint: 'Display',
|
|
@@ -145,23 +143,22 @@ var securityEndpoints = {
|
|
|
145
143
|
types: ['Space', 'Kapp', 'Form', 'Submission']
|
|
146
144
|
}
|
|
147
145
|
};
|
|
148
|
-
|
|
149
146
|
var fields = function fields(_ref5) {
|
|
150
147
|
var formSlug = _ref5.formSlug,
|
|
151
|
-
|
|
148
|
+
kappSlug = _ref5.kappSlug;
|
|
152
149
|
return function (_ref6) {
|
|
153
150
|
var form = _ref6.form;
|
|
154
151
|
return (!formSlug || form) && [!!kappSlug && {
|
|
155
152
|
name: 'anonymous',
|
|
156
153
|
label: 'Anonymous',
|
|
157
154
|
type: 'checkbox',
|
|
158
|
-
initialValue: get(form, 'anonymous', false),
|
|
155
|
+
initialValue: (0, _immutable.get)(form, 'anonymous', false),
|
|
159
156
|
helpText: 'This setting controls whether a submission is submitted with the user\'s login information or with "anonymous". Note that this does not actually control access. That is done with the Form Display setting.'
|
|
160
157
|
}, {
|
|
161
158
|
name: 'description',
|
|
162
159
|
label: 'Description',
|
|
163
160
|
type: 'text',
|
|
164
|
-
initialValue: get(form, 'description')
|
|
161
|
+
initialValue: (0, _immutable.get)(form, 'description')
|
|
165
162
|
}, {
|
|
166
163
|
name: 'name',
|
|
167
164
|
label: 'Name',
|
|
@@ -170,18 +167,17 @@ var fields = function fields(_ref5) {
|
|
|
170
167
|
onChange: function onChange(_ref7, _ref8) {
|
|
171
168
|
var values = _ref7.values;
|
|
172
169
|
var setValue = _ref8.setValue;
|
|
173
|
-
|
|
174
170
|
if (values.get('linked')) {
|
|
175
|
-
setValue('slug', slugify(values.get('name')), false);
|
|
171
|
+
setValue('slug', (0, _helpers.slugify)(values.get('name')), false);
|
|
176
172
|
}
|
|
177
173
|
},
|
|
178
|
-
initialValue: get(form, 'name'),
|
|
174
|
+
initialValue: (0, _immutable.get)(form, 'name'),
|
|
179
175
|
helpText: 'User friendly name for the form.'
|
|
180
176
|
}, {
|
|
181
177
|
name: 'notes',
|
|
182
178
|
label: 'Notes',
|
|
183
179
|
type: 'text',
|
|
184
|
-
initialValue: get(form, 'notes') || ''
|
|
180
|
+
initialValue: (0, _immutable.get)(form, 'notes') || ''
|
|
185
181
|
}, {
|
|
186
182
|
name: 'slug',
|
|
187
183
|
label: 'Slug',
|
|
@@ -191,7 +187,7 @@ var fields = function fields(_ref5) {
|
|
|
191
187
|
var setValue = _ref9.setValue;
|
|
192
188
|
setValue('linked', false);
|
|
193
189
|
},
|
|
194
|
-
initialValue: get(form, 'slug'),
|
|
190
|
+
initialValue: (0, _immutable.get)(form, 'slug'),
|
|
195
191
|
helpText: 'Unique name used in the form path.'
|
|
196
192
|
}, {
|
|
197
193
|
name: 'linked',
|
|
@@ -210,21 +206,22 @@ var fields = function fields(_ref5) {
|
|
|
210
206
|
label: status
|
|
211
207
|
};
|
|
212
208
|
}),
|
|
213
|
-
initialValue: get(form, 'status', 'New'),
|
|
209
|
+
initialValue: (0, _immutable.get)(form, 'status', 'New'),
|
|
214
210
|
helpText: 'Used to determine availability for submissions and presentations.'
|
|
215
211
|
}, {
|
|
216
212
|
name: 'submissionLabelExpression',
|
|
217
213
|
label: 'Submission Label',
|
|
218
214
|
type: 'code',
|
|
219
215
|
language: 'js-template',
|
|
220
|
-
initialValue: get(form, 'submissionLabelExpression') || '',
|
|
221
|
-
helpText:
|
|
216
|
+
initialValue: (0, _immutable.get)(form, 'submissionLabelExpression') || '',
|
|
217
|
+
helpText:
|
|
218
|
+
// eslint-disable-next-line no-template-curly-in-string
|
|
222
219
|
"Custom label for form submissions. Click the </> button to see available values derived from each submission. Example: ${values('Customer Name')}",
|
|
223
220
|
options: function options(_ref10) {
|
|
224
221
|
var space = _ref10.space,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return buildBindings({
|
|
222
|
+
kapp = _ref10.kapp,
|
|
223
|
+
form = _ref10.form;
|
|
224
|
+
return (0, _helpers.buildBindings)({
|
|
228
225
|
space: space,
|
|
229
226
|
kapp: kapp,
|
|
230
227
|
form: form,
|
|
@@ -237,20 +234,19 @@ var fields = function fields(_ref5) {
|
|
|
237
234
|
type: 'select',
|
|
238
235
|
options: function options(_ref11) {
|
|
239
236
|
var kapp = _ref11.kapp;
|
|
240
|
-
return kapp ? get(kapp, 'formTypes').map(function (type) {
|
|
241
|
-
return Map({
|
|
237
|
+
return kapp ? (0, _immutable.get)(kapp, 'formTypes').map(function (type) {
|
|
238
|
+
return (0, _immutable.Map)({
|
|
242
239
|
value: type.get('name'),
|
|
243
240
|
label: type.get('name')
|
|
244
241
|
});
|
|
245
242
|
}) : [];
|
|
246
243
|
},
|
|
247
|
-
initialValue: get(form, 'type'),
|
|
244
|
+
initialValue: (0, _immutable.get)(form, 'type'),
|
|
248
245
|
helpText: 'Used for organizing and displaying forms. Values in the dropdown are defined under Form Types.'
|
|
249
|
-
}].concat(
|
|
250
|
-
var _ref13 =
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
246
|
+
}].concat((0, _toConsumableArray2["default"])(formSlug ? Object.entries(securityEndpoints).map(function (_ref12) {
|
|
247
|
+
var _ref13 = (0, _slicedToArray2["default"])(_ref12, 2),
|
|
248
|
+
endpointFieldName = _ref13[0],
|
|
249
|
+
endpoint = _ref13[1];
|
|
254
250
|
return {
|
|
255
251
|
name: endpointFieldName,
|
|
256
252
|
label: endpoint.label,
|
|
@@ -260,7 +256,7 @@ var fields = function fields(_ref5) {
|
|
|
260
256
|
return securityPolicyDefinitions ? securityPolicyDefinitions.filter(function (definition) {
|
|
261
257
|
return endpoint.types.includes(definition.get('type'));
|
|
262
258
|
}).map(function (definition) {
|
|
263
|
-
return Map({
|
|
259
|
+
return (0, _immutable.Map)({
|
|
264
260
|
value: definition.get('name'),
|
|
265
261
|
label: definition.get('name')
|
|
266
262
|
});
|
|
@@ -268,7 +264,7 @@ var fields = function fields(_ref5) {
|
|
|
268
264
|
},
|
|
269
265
|
initialValue: form ? form.get('securityPolicies').find(function (pol) {
|
|
270
266
|
return pol.get('endpoint') === endpoint.endpoint;
|
|
271
|
-
}, null, Map() // If no Security Endpoints were ever set, we need to default to an empty map so the next line doesn't fail
|
|
267
|
+
}, null, (0, _immutable.Map)() // If no Security Endpoints were ever set, we need to default to an empty map so the next line doesn't fail
|
|
272
268
|
).get('name', '') : '',
|
|
273
269
|
"transient": true
|
|
274
270
|
};
|
|
@@ -280,10 +276,9 @@ var fields = function fields(_ref5) {
|
|
|
280
276
|
serialize: function serialize(_ref15) {
|
|
281
277
|
var values = _ref15.values;
|
|
282
278
|
return Object.entries(securityEndpoints).map(function (_ref16) {
|
|
283
|
-
var _ref17 =
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
279
|
+
var _ref17 = (0, _slicedToArray2["default"])(_ref16, 2),
|
|
280
|
+
endpointFieldName = _ref17[0],
|
|
281
|
+
policy = _ref17[1];
|
|
287
282
|
return {
|
|
288
283
|
endpoint: policy.endpoint,
|
|
289
284
|
name: values.get(endpointFieldName)
|
|
@@ -292,7 +287,7 @@ var fields = function fields(_ref5) {
|
|
|
292
287
|
return endpoint.name !== '';
|
|
293
288
|
});
|
|
294
289
|
},
|
|
295
|
-
initialValue: get(form, 'securityPolicies')
|
|
290
|
+
initialValue: (0, _immutable.get)(form, 'securityPolicies')
|
|
296
291
|
}, {
|
|
297
292
|
name: 'attributesMap',
|
|
298
293
|
label: 'Attributes',
|
|
@@ -302,7 +297,7 @@ var fields = function fields(_ref5) {
|
|
|
302
297
|
var attributeDefinitions = _ref18.attributeDefinitions;
|
|
303
298
|
return attributeDefinitions;
|
|
304
299
|
},
|
|
305
|
-
initialValue: get(form, 'attributesMap')
|
|
300
|
+
initialValue: (0, _immutable.get)(form, 'attributesMap')
|
|
306
301
|
}, !!kappSlug && {
|
|
307
302
|
name: 'categorizations',
|
|
308
303
|
label: 'Categories',
|
|
@@ -310,7 +305,7 @@ var fields = function fields(_ref5) {
|
|
|
310
305
|
options: function options(_ref19) {
|
|
311
306
|
var categories = _ref19.categories;
|
|
312
307
|
return categories ? categories.map(function (category) {
|
|
313
|
-
return Map({
|
|
308
|
+
return (0, _immutable.Map)({
|
|
314
309
|
label: buildLabel({
|
|
315
310
|
name: category.get('name'),
|
|
316
311
|
category: category,
|
|
@@ -336,11 +331,11 @@ var fields = function fields(_ref5) {
|
|
|
336
331
|
}]);
|
|
337
332
|
};
|
|
338
333
|
};
|
|
339
|
-
|
|
340
|
-
export var FormForm = generateForm({
|
|
334
|
+
var FormForm = (0, _Form.generateForm)({
|
|
341
335
|
formOptions: ['formSlug', 'kappSlug'],
|
|
342
336
|
dataSources: dataSources,
|
|
343
337
|
fields: fields,
|
|
344
338
|
handleSubmit: handleSubmit
|
|
345
339
|
});
|
|
340
|
+
exports.FormForm = FormForm;
|
|
346
341
|
FormForm.displayName = 'FormForm';
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.FormTable = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _Table = require("../../table/Table");
|
|
10
|
+
var _apis = require("../../../apis");
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _helpers = require("../../../helpers");
|
|
13
|
+
var _http = require("../../../apis/http");
|
|
7
14
|
var VALID_FORM_STATUES = ['New', 'Active', 'Inactive', 'Delete'].map(function (s) {
|
|
8
15
|
return {
|
|
9
16
|
value: s,
|
|
10
17
|
label: s
|
|
11
18
|
};
|
|
12
19
|
});
|
|
13
|
-
|
|
14
20
|
var filterDataSources = function filterDataSources(_ref) {
|
|
15
21
|
var kappSlug = _ref.kappSlug;
|
|
16
22
|
return {
|
|
17
23
|
types: {
|
|
18
|
-
fn: fetchFormTypes,
|
|
24
|
+
fn: _apis.fetchFormTypes,
|
|
19
25
|
params: kappSlug && [{
|
|
20
26
|
kappSlug: kappSlug
|
|
21
27
|
}],
|
|
@@ -30,7 +36,6 @@ var filterDataSources = function filterDataSources(_ref) {
|
|
|
30
36
|
}
|
|
31
37
|
};
|
|
32
38
|
};
|
|
33
|
-
|
|
34
39
|
var filters = function filters(_ref2) {
|
|
35
40
|
var kappSlug = _ref2.kappSlug;
|
|
36
41
|
return function (_ref3) {
|
|
@@ -66,20 +71,18 @@ var filters = function filters(_ref2) {
|
|
|
66
71
|
}];
|
|
67
72
|
};
|
|
68
73
|
};
|
|
69
|
-
|
|
70
|
-
var formQuery = defineKqlQuery().matches('name', 'name').matches('slug', 'slug').startsWith('updatedBy', 'updatedBy').equals('type', 'type').equals('status', 'status').end();
|
|
71
|
-
|
|
74
|
+
var formQuery = (0, _helpers.defineKqlQuery)().matches('name', 'name').matches('slug', 'slug').startsWith('updatedBy', 'updatedBy').equals('type', 'type').equals('status', 'status').end();
|
|
72
75
|
var dataSource = function dataSource(_ref5) {
|
|
73
76
|
var _ref5$kappSlug = _ref5.kappSlug,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
kappSlug = _ref5$kappSlug === void 0 ? null : _ref5$kappSlug,
|
|
78
|
+
_ref5$manage = _ref5.manage,
|
|
79
|
+
manage = _ref5$manage === void 0 ? false : _ref5$manage,
|
|
80
|
+
_ref5$surveyList = _ref5.surveyList,
|
|
81
|
+
surveyList = _ref5$surveyList === void 0 ? false : _ref5$surveyList;
|
|
79
82
|
return {
|
|
80
|
-
fn: fetchForms,
|
|
83
|
+
fn: _apis.fetchForms,
|
|
81
84
|
params: function params(paramData) {
|
|
82
|
-
return [
|
|
85
|
+
return [(0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _http.generateSortParams)(paramData)), (0, _http.generatePaginationParams)(paramData)), {}, {
|
|
83
86
|
q: formQuery(paramData.filters.toJS()),
|
|
84
87
|
include: 'details,indexDefinitions,backgroundJobs',
|
|
85
88
|
kappSlug: kappSlug,
|
|
@@ -96,7 +99,6 @@ var dataSource = function dataSource(_ref5) {
|
|
|
96
99
|
}
|
|
97
100
|
};
|
|
98
101
|
};
|
|
99
|
-
|
|
100
102
|
var columns = [{
|
|
101
103
|
value: 'name',
|
|
102
104
|
title: 'Name',
|
|
@@ -137,16 +139,17 @@ var columns = [{
|
|
|
137
139
|
value: 'submissionLabelExpression',
|
|
138
140
|
title: 'Submission Label'
|
|
139
141
|
}];
|
|
140
|
-
|
|
142
|
+
var FormTable = (0, _Table.generateTable)({
|
|
141
143
|
tableOptions: ['kappSlug', 'manage', 'surveyList'],
|
|
142
144
|
columns: columns,
|
|
143
145
|
filters: filters,
|
|
144
146
|
filterDataSources: filterDataSources,
|
|
145
147
|
dataSource: dataSource
|
|
146
148
|
});
|
|
149
|
+
exports.FormTable = FormTable;
|
|
147
150
|
FormTable.defaultProps = {};
|
|
148
151
|
FormTable.displayName = 'FormTable';
|
|
149
152
|
FormTable.propTypes = {
|
|
150
153
|
/** Kapp Slug of associated forms to render. */
|
|
151
|
-
kappSlug:
|
|
154
|
+
kappSlug: _propTypes["default"].string
|
|
152
155
|
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { createFormType, updateFormType, fetchFormType } from '../../../apis';
|
|
1
|
+
"use strict";
|
|
3
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FormTypeForm = void 0;
|
|
7
|
+
var _Form = require("../../form/Form");
|
|
8
|
+
var _apis = require("../../../apis");
|
|
4
9
|
var dataSources = function dataSources(_ref) {
|
|
5
10
|
var kappSlug = _ref.kappSlug,
|
|
6
|
-
|
|
11
|
+
name = _ref.name;
|
|
7
12
|
return {
|
|
8
13
|
formType: {
|
|
9
|
-
fn: fetchFormType,
|
|
14
|
+
fn: _apis.fetchFormType,
|
|
10
15
|
params: name && [{
|
|
11
16
|
kappSlug: kappSlug,
|
|
12
17
|
name: name,
|
|
@@ -18,19 +23,17 @@ var dataSources = function dataSources(_ref) {
|
|
|
18
23
|
}
|
|
19
24
|
};
|
|
20
25
|
};
|
|
21
|
-
|
|
22
26
|
var handleSubmit = function handleSubmit(_ref2) {
|
|
23
27
|
var kappSlug = _ref2.kappSlug,
|
|
24
|
-
|
|
28
|
+
name = _ref2.name;
|
|
25
29
|
return function (values) {
|
|
26
|
-
return (name ? updateFormType : createFormType)({
|
|
30
|
+
return (name ? _apis.updateFormType : _apis.createFormType)({
|
|
27
31
|
formType: values.toJS(),
|
|
28
32
|
kappSlug: kappSlug,
|
|
29
33
|
name: name
|
|
30
34
|
}).then(function (_ref3) {
|
|
31
35
|
var formType = _ref3.formType,
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
error = _ref3.error;
|
|
34
37
|
if (error) {
|
|
35
38
|
if (error.statusCode === 400) {
|
|
36
39
|
// Currently the server side returns "Invalid Kapp" because
|
|
@@ -43,12 +46,10 @@ var handleSubmit = function handleSubmit(_ref2) {
|
|
|
43
46
|
throw _message;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
|
-
|
|
47
49
|
return formType;
|
|
48
50
|
});
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
|
-
|
|
52
53
|
var fields = function fields(_ref4) {
|
|
53
54
|
var name = _ref4.name;
|
|
54
55
|
return function (_ref5) {
|
|
@@ -63,11 +64,11 @@ var fields = function fields(_ref4) {
|
|
|
63
64
|
}];
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
-
export var FormTypeForm = generateForm({
|
|
67
|
+
var FormTypeForm = (0, _Form.generateForm)({
|
|
68
68
|
formOptions: ['kappSlug', 'name'],
|
|
69
69
|
dataSources: dataSources,
|
|
70
70
|
fields: fields,
|
|
71
71
|
handleSubmit: handleSubmit
|
|
72
72
|
});
|
|
73
|
+
exports.FormTypeForm = FormTypeForm;
|
|
73
74
|
FormTypeForm.displayName = 'FormTypeForm';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchFormTypes } 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.FormTypeTable = 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(_ref) {
|
|
7
12
|
var kappSlug = _ref.kappSlug;
|
|
8
13
|
return {
|
|
9
|
-
fn: fetchFormTypes,
|
|
14
|
+
fn: _apis.fetchFormTypes,
|
|
10
15
|
clientSide: clientSide,
|
|
11
16
|
params: function params() {
|
|
12
17
|
return [{
|
|
@@ -20,7 +25,6 @@ var dataSource = function dataSource(_ref) {
|
|
|
20
25
|
}
|
|
21
26
|
};
|
|
22
27
|
};
|
|
23
|
-
|
|
24
28
|
var filters = function filters() {
|
|
25
29
|
return function () {
|
|
26
30
|
return [{
|
|
@@ -30,18 +34,18 @@ var filters = function filters() {
|
|
|
30
34
|
}];
|
|
31
35
|
};
|
|
32
36
|
};
|
|
33
|
-
|
|
34
37
|
var columns = [{
|
|
35
38
|
value: 'name',
|
|
36
39
|
title: 'Form Type',
|
|
37
40
|
sortable: false
|
|
38
41
|
}];
|
|
39
|
-
|
|
42
|
+
var FormTypeTable = (0, _Table.generateTable)({
|
|
40
43
|
tableOptions: ['kappSlug'],
|
|
41
44
|
columns: columns,
|
|
42
45
|
filters: filters,
|
|
43
46
|
dataSource: dataSource
|
|
44
47
|
});
|
|
48
|
+
exports.FormTypeTable = FormTypeTable;
|
|
45
49
|
FormTypeTable.displayName = 'FormTypeTable';
|
|
46
50
|
FormTypeTable.defaultProps = {
|
|
47
51
|
columns: columns
|