@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,39 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import { getIn, List, Map, Set } from 'immutable';
|
|
3
|
-
import { generateTable } from '../../table/Table';
|
|
4
|
-
import { fetchForm, fetchKapp, searchSubmissions, SubmissionSearch, VALID_KAPP_CORE_STATES } from '../../../apis';
|
|
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["default"] = exports.KappSubmissionTable = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _Table = require("../../table/Table");
|
|
11
|
+
var _apis = require("../../../apis");
|
|
6
12
|
var applyMeta = function applyMeta(query, op, rvalue) {
|
|
7
13
|
return rvalue ? query[op](rvalue) : query;
|
|
8
14
|
};
|
|
9
|
-
|
|
10
15
|
var applyOp = function applyOp(query, op, lvalue, rvalue) {
|
|
11
16
|
return rvalue ? query[op](lvalue, rvalue) : query;
|
|
12
17
|
};
|
|
13
|
-
|
|
14
18
|
var submissionSearch = function submissionSearch(_ref, include) {
|
|
15
19
|
var filters = _ref.filters,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var query = new SubmissionSearch().includes(Set([].concat(
|
|
20
|
+
pageSize = _ref.pageSize,
|
|
21
|
+
sortColumn = _ref.sortColumn,
|
|
22
|
+
sortDirection = _ref.sortDirection;
|
|
23
|
+
var query = new _apis.SubmissionSearch().includes((0, _immutable.Set)([].concat((0, _toConsumableArray2["default"])(typeof include === 'string' ? include.split(',') : Array.isArray(include) ? include : []), ['details', 'form'])).toJS()).sortBy(sortColumn || 'createdAt').sortDirection(sortDirection.toLocaleUpperCase()).limit(pageSize);
|
|
20
24
|
applyMeta(query, 'coreState', filters.get('coreState'));
|
|
21
25
|
applyMeta(query, 'startDate', filters.get('startDate') && new Date("".concat(filters.get('startDate'), "T00:00:00")));
|
|
22
26
|
applyMeta(query, 'endDate', filters.get('endDate') && new Date("".concat(filters.get('endDate'), "T00:00:00")));
|
|
23
27
|
applyOp(query, 'eq', 'handle', filters.get('handle'));
|
|
24
28
|
applyOp(query, 'eq', 'submittedBy', filters.getIn(['submittedBy', 'username']));
|
|
25
|
-
filters.get('values', Map()).forEach(function (value, field) {
|
|
29
|
+
filters.get('values', (0, _immutable.Map)()).forEach(function (value, field) {
|
|
26
30
|
return applyOp(query, 'eq', "values[".concat(field, "]"), value);
|
|
27
31
|
});
|
|
28
32
|
return query.build();
|
|
29
33
|
};
|
|
30
|
-
|
|
31
34
|
var dataSource = function dataSource(_ref2) {
|
|
32
35
|
var formSlug = _ref2.formSlug,
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
kappSlug = _ref2.kappSlug,
|
|
37
|
+
include = _ref2.include;
|
|
35
38
|
return {
|
|
36
|
-
fn: searchSubmissions,
|
|
39
|
+
fn: _apis.searchSubmissions,
|
|
37
40
|
params: function params(paramData) {
|
|
38
41
|
return [{
|
|
39
42
|
kapp: kappSlug,
|
|
@@ -50,19 +53,17 @@ var dataSource = function dataSource(_ref2) {
|
|
|
50
53
|
}
|
|
51
54
|
};
|
|
52
55
|
};
|
|
53
|
-
|
|
54
56
|
var onValidateFilters = function onValidateFilters(filters) {
|
|
55
|
-
return filters.getIn(['values', 'value'], List()).reduce(function (valid, value) {
|
|
57
|
+
return filters.getIn(['values', 'value'], (0, _immutable.List)()).reduce(function (valid, value) {
|
|
56
58
|
return valid && value.get('field') !== '' ? value.get('value') !== '' : valid;
|
|
57
59
|
}, true);
|
|
58
60
|
};
|
|
59
|
-
|
|
60
61
|
var filterDataSources = function filterDataSources(_ref3) {
|
|
61
62
|
var kappSlug = _ref3.kappSlug,
|
|
62
|
-
|
|
63
|
+
formSlug = _ref3.formSlug;
|
|
63
64
|
return {
|
|
64
65
|
kapp: {
|
|
65
|
-
fn: fetchKapp,
|
|
66
|
+
fn: _apis.fetchKapp,
|
|
66
67
|
params: [{
|
|
67
68
|
kappSlug: kappSlug,
|
|
68
69
|
include: 'fields'
|
|
@@ -73,7 +74,7 @@ var filterDataSources = function filterDataSources(_ref3) {
|
|
|
73
74
|
},
|
|
74
75
|
form: {
|
|
75
76
|
fn: function fn(formSlug) {
|
|
76
|
-
return formSlug ? fetchForm({
|
|
77
|
+
return formSlug ? (0, _apis.fetchForm)({
|
|
77
78
|
kappSlug: kappSlug,
|
|
78
79
|
formSlug: formSlug,
|
|
79
80
|
include: 'fields'
|
|
@@ -81,7 +82,7 @@ var filterDataSources = function filterDataSources(_ref3) {
|
|
|
81
82
|
},
|
|
82
83
|
params: function params(_ref4) {
|
|
83
84
|
var values = _ref4.values;
|
|
84
|
-
return [getIn(values, ['form', 'slug'], formSlug)];
|
|
85
|
+
return [(0, _immutable.getIn)(values, ['form', 'slug'], formSlug)];
|
|
85
86
|
},
|
|
86
87
|
transform: function transform(result) {
|
|
87
88
|
return result && result.form;
|
|
@@ -93,7 +94,7 @@ var filterDataSources = function filterDataSources(_ref3) {
|
|
|
93
94
|
},
|
|
94
95
|
params: function params(_ref5) {
|
|
95
96
|
var form = _ref5.form,
|
|
96
|
-
|
|
97
|
+
kapp = _ref5.kapp;
|
|
97
98
|
return kapp && [form, kapp];
|
|
98
99
|
},
|
|
99
100
|
transform: function transform(result) {
|
|
@@ -107,7 +108,7 @@ var filterDataSources = function filterDataSources(_ref3) {
|
|
|
107
108
|
},
|
|
108
109
|
coreStateOptions: {
|
|
109
110
|
fn: function fn() {
|
|
110
|
-
return VALID_KAPP_CORE_STATES;
|
|
111
|
+
return _apis.VALID_KAPP_CORE_STATES;
|
|
111
112
|
},
|
|
112
113
|
params: [],
|
|
113
114
|
transform: function transform(coreStates) {
|
|
@@ -121,10 +122,9 @@ var filterDataSources = function filterDataSources(_ref3) {
|
|
|
121
122
|
}
|
|
122
123
|
};
|
|
123
124
|
};
|
|
124
|
-
|
|
125
125
|
var filters = function filters(_ref6) {
|
|
126
126
|
var kappSlug = _ref6.kappSlug,
|
|
127
|
-
|
|
127
|
+
formSlug = _ref6.formSlug;
|
|
128
128
|
return function (_ref7) {
|
|
129
129
|
var coreStateOptions = _ref7.coreStateOptions;
|
|
130
130
|
return coreStateOptions && [{
|
|
@@ -168,77 +168,94 @@ var filters = function filters(_ref6) {
|
|
|
168
168
|
}];
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
-
|
|
172
171
|
var columns = [{
|
|
173
172
|
value: 'closedAt',
|
|
174
|
-
title: 'Closed
|
|
175
|
-
sortable: true
|
|
173
|
+
title: 'Closed',
|
|
174
|
+
sortable: true,
|
|
175
|
+
toggleable: true
|
|
176
176
|
}, {
|
|
177
177
|
value: 'closedBy',
|
|
178
|
-
title: '
|
|
179
|
-
sortable: false
|
|
178
|
+
title: 'Closed By',
|
|
179
|
+
sortable: false,
|
|
180
|
+
toggleable: true
|
|
180
181
|
}, {
|
|
181
182
|
value: 'coreState',
|
|
182
183
|
title: 'Core State',
|
|
183
|
-
sortable: false
|
|
184
|
+
sortable: false,
|
|
185
|
+
toggleable: true
|
|
184
186
|
}, {
|
|
185
187
|
value: 'createdAt',
|
|
186
188
|
title: 'Created',
|
|
187
|
-
sortable: true
|
|
189
|
+
sortable: true,
|
|
190
|
+
toggleable: true
|
|
188
191
|
}, {
|
|
189
192
|
value: 'createdBy',
|
|
190
193
|
title: 'Created By',
|
|
191
|
-
sortable: false
|
|
194
|
+
sortable: false,
|
|
195
|
+
toggleable: true
|
|
192
196
|
}, {
|
|
193
197
|
value: 'currentPage',
|
|
194
198
|
title: 'Current Page',
|
|
195
|
-
sortable: false
|
|
199
|
+
sortable: false,
|
|
200
|
+
toggleable: true
|
|
196
201
|
}, {
|
|
197
202
|
value: 'handle',
|
|
198
203
|
title: 'Handle',
|
|
199
|
-
sortable: false
|
|
204
|
+
sortable: false,
|
|
205
|
+
toggleable: false,
|
|
206
|
+
columnOrder: 'first'
|
|
200
207
|
}, {
|
|
201
208
|
value: 'id',
|
|
202
209
|
title: 'Id',
|
|
203
|
-
sortable: false
|
|
210
|
+
sortable: false,
|
|
211
|
+
toggleable: true
|
|
204
212
|
}, {
|
|
205
213
|
value: 'label',
|
|
206
214
|
title: 'Label',
|
|
207
|
-
sortable: false
|
|
215
|
+
sortable: false,
|
|
216
|
+
toggleable: true
|
|
208
217
|
}, {
|
|
209
218
|
value: 'origin',
|
|
210
219
|
title: 'Origin',
|
|
211
|
-
sortable: false
|
|
220
|
+
sortable: false,
|
|
221
|
+
toggleable: true
|
|
212
222
|
}, {
|
|
213
223
|
value: 'parent',
|
|
214
224
|
title: 'Parent',
|
|
215
|
-
sortable: false
|
|
225
|
+
sortable: false,
|
|
226
|
+
toggleable: true
|
|
216
227
|
}, {
|
|
217
228
|
value: 'sessionToken',
|
|
218
229
|
title: 'Session Token',
|
|
219
|
-
sortable: false
|
|
230
|
+
sortable: false,
|
|
231
|
+
toggleable: true
|
|
220
232
|
}, {
|
|
221
233
|
value: 'submittedAt',
|
|
222
234
|
title: 'Submitted At',
|
|
223
|
-
sortable: true
|
|
235
|
+
sortable: true,
|
|
236
|
+
toggleable: true
|
|
224
237
|
}, {
|
|
225
238
|
value: 'submittedBy',
|
|
226
239
|
title: 'Submitted By',
|
|
227
|
-
sortable: false
|
|
240
|
+
sortable: false,
|
|
241
|
+
toggleable: true
|
|
228
242
|
}, {
|
|
229
243
|
value: 'type',
|
|
230
244
|
title: 'Type',
|
|
231
|
-
sortable: false
|
|
245
|
+
sortable: false,
|
|
246
|
+
toggleable: true
|
|
232
247
|
}, {
|
|
233
248
|
value: 'updatedAt',
|
|
234
249
|
title: 'Updated',
|
|
235
|
-
sortable: true
|
|
250
|
+
sortable: true,
|
|
251
|
+
toggleable: true
|
|
236
252
|
}, {
|
|
237
253
|
value: 'updatedBy',
|
|
238
254
|
title: 'Updated By',
|
|
239
|
-
sortable: false
|
|
255
|
+
sortable: false,
|
|
256
|
+
toggleable: true
|
|
240
257
|
}];
|
|
241
|
-
|
|
258
|
+
var KappSubmissionTable = (0, _Table.generateTable)({
|
|
242
259
|
tableOptions: ['kappSlug', 'formSlug', 'datastore', 'include'],
|
|
243
260
|
columns: columns,
|
|
244
261
|
dataSource: dataSource,
|
|
@@ -246,5 +263,7 @@ export var KappSubmissionTable = generateTable({
|
|
|
246
263
|
filters: filters,
|
|
247
264
|
onValidateFilters: onValidateFilters
|
|
248
265
|
});
|
|
266
|
+
exports.KappSubmissionTable = KappSubmissionTable;
|
|
249
267
|
KappSubmissionTable.displayName = 'KappSubmissionTable';
|
|
250
|
-
|
|
268
|
+
var _default = KappSubmissionTable;
|
|
269
|
+
exports["default"] = _default;
|
|
@@ -1,124 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchSubmission, updateSubmission } from '../../../apis';
|
|
3
|
-
import { generateForm } from '../../form/Form';
|
|
4
|
-
import moment from 'moment';
|
|
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.SubmissionForm = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _apis = require("../../../apis");
|
|
11
|
+
var _Form = require("../../form/Form");
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
+
var _lodashEs = require("lodash-es");
|
|
6
14
|
var dataSources = function dataSources(_ref) {
|
|
7
|
-
var
|
|
15
|
+
var kappSlug = _ref.kappSlug,
|
|
16
|
+
formSlug = _ref.formSlug,
|
|
17
|
+
submissionId = _ref.submissionId;
|
|
8
18
|
return {
|
|
9
19
|
submission: {
|
|
10
|
-
fn: fetchSubmission,
|
|
11
|
-
params: [{
|
|
20
|
+
fn: _apis.fetchSubmission,
|
|
21
|
+
params: submissionId && [{
|
|
12
22
|
id: submissionId,
|
|
13
|
-
include: 'details,values,form,form.fields,form.fields.details,form.pages'
|
|
23
|
+
include: 'details,values.raw,form,form.fields,form.fields.details,form.pages'
|
|
14
24
|
}],
|
|
15
25
|
transform: function transform(result) {
|
|
16
26
|
return result.submission;
|
|
17
27
|
}
|
|
28
|
+
},
|
|
29
|
+
form: {
|
|
30
|
+
fn: _apis.fetchForm,
|
|
31
|
+
params: kappSlug && formSlug && [{
|
|
32
|
+
kappSlug: kappSlug,
|
|
33
|
+
formSlug: formSlug,
|
|
34
|
+
include: 'pages'
|
|
35
|
+
}],
|
|
36
|
+
transform: function transform(result) {
|
|
37
|
+
return result.form;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
pages: {
|
|
41
|
+
fn: function fn(form) {
|
|
42
|
+
return form.get('pages');
|
|
43
|
+
},
|
|
44
|
+
params: function params(_ref2) {
|
|
45
|
+
var form = _ref2.form,
|
|
46
|
+
submission = _ref2.submission;
|
|
47
|
+
return submission ? [submission.get('form')] : form ? [form] : null;
|
|
48
|
+
}
|
|
18
49
|
}
|
|
19
50
|
};
|
|
20
51
|
};
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
52
|
+
var handleSubmit = function handleSubmit(_ref3) {
|
|
53
|
+
var kappSlug = _ref3.kappSlug,
|
|
54
|
+
formSlug = _ref3.formSlug,
|
|
55
|
+
id = _ref3.submissionId;
|
|
24
56
|
return function (values) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
57
|
+
// Remove the new files to upload from the values.
|
|
58
|
+
var processedValues = values.map(function (value) {
|
|
59
|
+
return (0, _lodashEs.isArray)(value) || _immutable.List.isList(value) ? value.filter(function (entry) {
|
|
60
|
+
return !(entry instanceof File);
|
|
61
|
+
}) : value;
|
|
62
|
+
});
|
|
31
63
|
|
|
64
|
+
// Construct a list of files to upload by iterating through the values,
|
|
65
|
+
// flattening if the value is a List/Array and then filtering to only keep
|
|
66
|
+
// values that are instances of File, which represent new files to upload.
|
|
67
|
+
var files = values.entrySeq().flatMap(function (_ref4) {
|
|
68
|
+
var _ref5 = (0, _slicedToArray2["default"])(_ref4, 2),
|
|
69
|
+
field = _ref5[0],
|
|
70
|
+
vals = _ref5[1];
|
|
71
|
+
return (0, _lodashEs.isArray)(vals) || _immutable.List.isList(vals) ? (0, _immutable.List)(vals).filter(function (val) {
|
|
72
|
+
return val instanceof File;
|
|
73
|
+
}).map(function (file) {
|
|
74
|
+
return (0, _immutable.Map)({
|
|
75
|
+
field: field,
|
|
76
|
+
file: file
|
|
77
|
+
});
|
|
78
|
+
}) : [];
|
|
79
|
+
}).toList();
|
|
80
|
+
return (0, _apis.saveSubmissionMultipart)({
|
|
81
|
+
kappSlug: kappSlug,
|
|
82
|
+
formSlug: formSlug,
|
|
83
|
+
id: id,
|
|
84
|
+
values: processedValues,
|
|
85
|
+
files: files
|
|
86
|
+
}).then(function (_ref6) {
|
|
87
|
+
var submission = _ref6.submission,
|
|
88
|
+
error = _ref6.error;
|
|
32
89
|
if (error) {
|
|
33
90
|
throw error.statusCode === 400 && error.message || 'There was an error saving the submission';
|
|
34
91
|
}
|
|
35
|
-
|
|
36
92
|
return submission;
|
|
37
93
|
});
|
|
38
94
|
};
|
|
39
95
|
};
|
|
40
|
-
|
|
41
96
|
var traverseElement = function traverseElement(traverse, iteratee, acc) {
|
|
42
97
|
var element = traverse.get(0);
|
|
43
98
|
var elements = traverse.shift();
|
|
44
|
-
var childElements = element.get('elements', List());
|
|
45
|
-
var result = iteratee(element, acc);
|
|
46
|
-
|
|
99
|
+
var childElements = element.get('elements', (0, _immutable.List)());
|
|
100
|
+
var result = iteratee(element, acc);
|
|
101
|
+
// If the current element has child elements make a recursive call.
|
|
47
102
|
if (childElements.size > 0) {
|
|
48
103
|
result = traverseElement(childElements, iteratee, result);
|
|
49
104
|
}
|
|
50
|
-
|
|
51
105
|
if (elements.size > 0) {
|
|
52
106
|
return traverseElement(elements, iteratee, result);
|
|
53
107
|
}
|
|
54
|
-
|
|
55
108
|
return result;
|
|
56
109
|
};
|
|
57
|
-
|
|
58
110
|
var convertRenderType = function convertRenderType(element) {
|
|
59
111
|
if (element.get('renderType') === 'dropdown') {
|
|
60
112
|
return element.get('choicesResourceName') ? 'text' : 'select';
|
|
61
113
|
} else if (element.get('renderType') === 'checkbox') {
|
|
62
114
|
return 'text-multi';
|
|
63
115
|
} else if (element.get('renderType') === 'attachment') {
|
|
64
|
-
|
|
116
|
+
if (element.get('allowMultiple')) {
|
|
117
|
+
return 'file-multi';
|
|
118
|
+
} else {
|
|
119
|
+
return 'file';
|
|
120
|
+
}
|
|
65
121
|
}
|
|
66
|
-
|
|
67
122
|
return element.get('renderType');
|
|
68
123
|
};
|
|
69
|
-
|
|
70
124
|
var getInitialValue = function getInitialValue(submission, element, type) {
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
125
|
+
var fieldKey = element.get('key');
|
|
126
|
+
var value = (0, _immutable.getIn)(submission, ['valuesRaw', fieldKey, 'value'], ['checkbox', 'attachment'].includes(element.get('renderType')) ? (0, _immutable.List)() : '') || '';
|
|
127
|
+
|
|
128
|
+
// To update a submission with existing submissions we need to grab the
|
|
129
|
+
// documentId and insert that into the attachment value normally returned with
|
|
130
|
+
// the submission.
|
|
131
|
+
if (element.get('renderType') === 'attachment') {
|
|
132
|
+
var rawValue = JSON.parse((0, _immutable.getIn)(submission, ['valuesRaw', fieldKey, 'rawValue'], null));
|
|
133
|
+
value = value.map(function (attachment, i) {
|
|
134
|
+
return attachment.set('documentId', (0, _immutable.getIn)(rawValue, [i, 'documentId'], null));
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return type === 'datetime' && value ? (0, _moment["default"])(value).format('yyyy-MM-DDThh:mm') : type === 'date' && value ? (0, _moment["default"])(value).format('yyyy-MM-DD') : value;
|
|
75
138
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var values = _ref4.values;
|
|
139
|
+
var serializer = function serializer(element) {
|
|
140
|
+
return function (_ref7) {
|
|
141
|
+
var values = _ref7.values;
|
|
80
142
|
var name = element.get('name');
|
|
81
|
-
|
|
143
|
+
var type = element.get('renderType');
|
|
144
|
+
switch (type) {
|
|
145
|
+
case 'datetime':
|
|
146
|
+
return values.get(name) && (0, _moment["default"])(values.get(name)).format();
|
|
147
|
+
case 'attachment':
|
|
148
|
+
// When updating a submission with existing attachment values, there will
|
|
149
|
+
// be a link property returned from the API that has to be removed from
|
|
150
|
+
// the payload we are going to submit.
|
|
151
|
+
return values.get(name).map(function (attachment) {
|
|
152
|
+
return attachment instanceof File ? attachment : (0, _immutable.remove)(attachment, 'link');
|
|
153
|
+
});
|
|
154
|
+
default:
|
|
155
|
+
return values.get(name);
|
|
156
|
+
}
|
|
82
157
|
};
|
|
83
|
-
};
|
|
84
|
-
// label/value mapping from and not actual choices.
|
|
85
|
-
|
|
158
|
+
};
|
|
86
159
|
|
|
160
|
+
// If the element uses bridged options then the `choices` value represents the
|
|
161
|
+
// label/value mapping from and not actual choices.
|
|
87
162
|
var getChoices = function getChoices(element) {
|
|
88
|
-
return !!element.get('choicesResourceName') ? List() : element.get('choices');
|
|
163
|
+
return !!element.get('choicesResourceName') ? (0, _immutable.List)() : element.get('choices');
|
|
89
164
|
};
|
|
90
|
-
|
|
91
165
|
var fields = function fields() {
|
|
92
|
-
return function (
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
166
|
+
return function (_ref8) {
|
|
167
|
+
var form = _ref8.form,
|
|
168
|
+
pages = _ref8.pages,
|
|
169
|
+
submission = _ref8.submission;
|
|
170
|
+
if (pages) {
|
|
97
171
|
var values = traverseElement(pages, function (element, values) {
|
|
98
172
|
var name = element.get('name');
|
|
99
173
|
var type = convertRenderType(element);
|
|
100
|
-
var initialValue = getInitialValue(submission, element, type);
|
|
101
|
-
var isAttachment = element.get('renderType') === 'attachment';
|
|
174
|
+
var initialValue = getInitialValue(submission || {}, element, type);
|
|
102
175
|
return element.get('type') === 'field' ? values.push({
|
|
103
176
|
name: name,
|
|
104
177
|
label: name,
|
|
105
178
|
type: type,
|
|
106
179
|
options: getChoices(element, initialValue),
|
|
107
180
|
initialValue: initialValue,
|
|
108
|
-
enabled: !isAttachment,
|
|
109
|
-
"transient": isAttachment,
|
|
110
181
|
serialize: serializer(element, type)
|
|
111
182
|
}) : values;
|
|
112
|
-
}, List());
|
|
183
|
+
}, (0, _immutable.List)());
|
|
113
184
|
return values.toJS();
|
|
114
185
|
}
|
|
115
186
|
};
|
|
116
187
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
formOptions: ['submissionId'],
|
|
188
|
+
var SubmissionForm = (0, _Form.generateForm)({
|
|
189
|
+
formOptions: ['kappSlug', 'formSlug', 'submissionId'],
|
|
120
190
|
dataSources: dataSources,
|
|
121
191
|
fields: fields,
|
|
122
192
|
handleSubmit: handleSubmit
|
|
123
193
|
});
|
|
194
|
+
exports.SubmissionForm = SubmissionForm;
|
|
124
195
|
SubmissionForm.displayName = 'SubmissionForm';
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React, { Component } from 'react';
|
|
6
|
-
import FormSubmissionTable from './FormSubmissionTable';
|
|
7
|
-
import DatastoreSubmissionTable from './DatastoreSubmissionTable';
|
|
8
|
-
import KappSubmissionTable from './KappSubmissionTable';
|
|
9
|
-
export var SubmissionTable = /*#__PURE__*/function (_Component) {
|
|
10
|
-
_inherits(SubmissionTable, _Component);
|
|
11
|
-
|
|
12
|
-
var _super = _createSuper(SubmissionTable);
|
|
1
|
+
"use strict";
|
|
13
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.SubmissionTable = 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 _FormSubmissionTable = _interopRequireDefault(require("./FormSubmissionTable"));
|
|
15
|
+
var _DatastoreSubmissionTable = _interopRequireDefault(require("./DatastoreSubmissionTable"));
|
|
16
|
+
var _KappSubmissionTable = _interopRequireDefault(require("./KappSubmissionTable"));
|
|
17
|
+
var SubmissionTable = /*#__PURE__*/function (_Component) {
|
|
18
|
+
(0, _inherits2["default"])(SubmissionTable, _Component);
|
|
19
|
+
var _super = (0, _createSuper2["default"])(SubmissionTable);
|
|
14
20
|
function SubmissionTable() {
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
(0, _classCallCheck2["default"])(this, SubmissionTable);
|
|
17
22
|
return _super.apply(this, arguments);
|
|
18
23
|
}
|
|
19
|
-
|
|
20
|
-
_createClass(SubmissionTable, [{
|
|
24
|
+
(0, _createClass2["default"])(SubmissionTable, [{
|
|
21
25
|
key: "componentDidMount",
|
|
22
26
|
value: function componentDidMount() {
|
|
23
27
|
if (this.props.mode === 'space') {
|
|
@@ -29,10 +33,10 @@ export var SubmissionTable = /*#__PURE__*/function (_Component) {
|
|
|
29
33
|
}, {
|
|
30
34
|
key: "render",
|
|
31
35
|
value: function render() {
|
|
32
|
-
var TableComponent = this.props.mode === 'form' ?
|
|
33
|
-
return /*#__PURE__*/
|
|
36
|
+
var TableComponent = this.props.mode === 'form' ? _FormSubmissionTable["default"] : this.props.mode === 'space' ? _DatastoreSubmissionTable["default"] : this.props.mode === 'kapp' ? _KappSubmissionTable["default"] : _KappSubmissionTable["default"];
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement(TableComponent, this.props, this.props.children);
|
|
34
38
|
}
|
|
35
39
|
}]);
|
|
36
|
-
|
|
37
40
|
return SubmissionTable;
|
|
38
|
-
}(Component);
|
|
41
|
+
}(_react.Component);
|
|
42
|
+
exports.SubmissionTable = SubmissionTable;
|