@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,20 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
-
import { generateForm } from '../../form/Form';
|
|
4
|
-
import { List, Map } from 'immutable';
|
|
5
|
-
import { fetchBridgeModel, createBridgeModel, createBridgeModelMapping, updateBridgeModel, updateBridgeModelMapping, fetchBridges, fetchAgentComponents } from '../../../apis';
|
|
1
|
+
"use strict";
|
|
6
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.BridgeModelForm = void 0;
|
|
8
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
10
|
+
var _Form = require("../../form/Form");
|
|
11
|
+
var _immutable = require("immutable");
|
|
12
|
+
var _apis = require("../../../apis");
|
|
7
13
|
var getMapping = function getMapping(model) {
|
|
8
14
|
return model && model.get('mappings') && model.get('mappings').find(function (mapping) {
|
|
9
15
|
return mapping.get('name') === model.get('activeMappingName');
|
|
10
16
|
}) || {};
|
|
11
17
|
};
|
|
12
|
-
|
|
13
18
|
var dataSources = function dataSources(_ref) {
|
|
14
19
|
var modelName = _ref.modelName;
|
|
15
20
|
return {
|
|
16
21
|
model: {
|
|
17
|
-
fn: fetchBridgeModel,
|
|
22
|
+
fn: _apis.fetchBridgeModel,
|
|
18
23
|
params: modelName && [{
|
|
19
24
|
modelName: modelName,
|
|
20
25
|
include: 'details'
|
|
@@ -31,14 +36,14 @@ var dataSources = function dataSources(_ref) {
|
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
agents: {
|
|
34
|
-
fn: fetchAgentComponents,
|
|
39
|
+
fn: _apis.fetchAgentComponents,
|
|
35
40
|
params: [],
|
|
36
41
|
transform: function transform(result) {
|
|
37
42
|
return result.agents;
|
|
38
43
|
}
|
|
39
44
|
},
|
|
40
45
|
bridges: {
|
|
41
|
-
fn: fetchBridges,
|
|
46
|
+
fn: _apis.fetchBridges,
|
|
42
47
|
params: function params(_ref3) {
|
|
43
48
|
var values = _ref3.values;
|
|
44
49
|
return values && [{
|
|
@@ -51,14 +56,12 @@ var dataSources = function dataSources(_ref) {
|
|
|
51
56
|
}
|
|
52
57
|
};
|
|
53
58
|
};
|
|
54
|
-
|
|
55
59
|
var handleSubmit = function handleSubmit(_ref4) {
|
|
56
60
|
var modelName = _ref4.modelName;
|
|
57
61
|
return /*#__PURE__*/function () {
|
|
58
|
-
var _ref6 =
|
|
62
|
+
var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee(values, _ref5) {
|
|
59
63
|
var modelMapping, _values$toJS, name, status, bridgeSlug, agentSlug, structure, modelMethod, mappingName, mappingMethod, _yield$modelMethod, bridgeModel, modelError, _yield$mappingMethod, mappingError;
|
|
60
|
-
|
|
61
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
64
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
62
65
|
while (1) {
|
|
63
66
|
switch (_context.prev = _context.next) {
|
|
64
67
|
case 0:
|
|
@@ -66,12 +69,10 @@ var handleSubmit = function handleSubmit(_ref4) {
|
|
|
66
69
|
// destructure the values of the fields because they will be used in different
|
|
67
70
|
// payloads below
|
|
68
71
|
_values$toJS = values.toJS(), name = _values$toJS.name, status = _values$toJS.status, bridgeSlug = _values$toJS.bridgeSlug, agentSlug = _values$toJS.agentSlug, structure = _values$toJS.structure; // determine if we are creating / updating a model
|
|
69
|
-
|
|
70
|
-
modelMethod = modelName ? updateBridgeModel : createBridgeModel; // determine if we are creating / updating a model mapping, due to invalid
|
|
72
|
+
modelMethod = modelName ? _apis.updateBridgeModel : _apis.createBridgeModel; // determine if we are creating / updating a model mapping, due to invalid
|
|
71
73
|
// states its possible that we can be updating a model but creating a mapping
|
|
72
|
-
|
|
73
74
|
mappingName = modelMapping && modelMapping.get('name');
|
|
74
|
-
mappingMethod = mappingName ? updateBridgeModelMapping : createBridgeModelMapping;
|
|
75
|
+
mappingMethod = mappingName ? _apis.updateBridgeModelMapping : _apis.createBridgeModelMapping;
|
|
75
76
|
_context.next = 7;
|
|
76
77
|
return modelMethod({
|
|
77
78
|
modelName: modelName,
|
|
@@ -81,19 +82,15 @@ var handleSubmit = function handleSubmit(_ref4) {
|
|
|
81
82
|
activeMappingName: name
|
|
82
83
|
}
|
|
83
84
|
});
|
|
84
|
-
|
|
85
85
|
case 7:
|
|
86
86
|
_yield$modelMethod = _context.sent;
|
|
87
87
|
bridgeModel = _yield$modelMethod.bridgeModel;
|
|
88
88
|
modelError = _yield$modelMethod.error;
|
|
89
|
-
|
|
90
89
|
if (!modelError) {
|
|
91
90
|
_context.next = 12;
|
|
92
91
|
break;
|
|
93
92
|
}
|
|
94
|
-
|
|
95
93
|
throw modelError.statusCode === 400 && modelError.message || 'There was an error saving the model';
|
|
96
|
-
|
|
97
94
|
case 12:
|
|
98
95
|
_context.next = 14;
|
|
99
96
|
return mappingMethod({
|
|
@@ -106,21 +103,16 @@ var handleSubmit = function handleSubmit(_ref4) {
|
|
|
106
103
|
structure: structure
|
|
107
104
|
}
|
|
108
105
|
});
|
|
109
|
-
|
|
110
106
|
case 14:
|
|
111
107
|
_yield$mappingMethod = _context.sent;
|
|
112
108
|
mappingError = _yield$mappingMethod.error;
|
|
113
|
-
|
|
114
109
|
if (!mappingError) {
|
|
115
110
|
_context.next = 18;
|
|
116
111
|
break;
|
|
117
112
|
}
|
|
118
|
-
|
|
119
113
|
throw mappingError.statusCode === 400 && mappingError.message || 'There was an error saving the model mapping';
|
|
120
|
-
|
|
121
114
|
case 18:
|
|
122
115
|
return _context.abrupt("return", bridgeModel);
|
|
123
|
-
|
|
124
116
|
case 19:
|
|
125
117
|
case "end":
|
|
126
118
|
return _context.stop();
|
|
@@ -128,19 +120,17 @@ var handleSubmit = function handleSubmit(_ref4) {
|
|
|
128
120
|
}
|
|
129
121
|
}, _callee);
|
|
130
122
|
}));
|
|
131
|
-
|
|
132
123
|
return function (_x, _x2) {
|
|
133
124
|
return _ref6.apply(this, arguments);
|
|
134
125
|
};
|
|
135
126
|
}();
|
|
136
127
|
};
|
|
137
|
-
|
|
138
128
|
var fields = function fields(_ref7) {
|
|
139
129
|
var modelName = _ref7.modelName;
|
|
140
130
|
return function (_ref8) {
|
|
141
131
|
var model = _ref8.model,
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
modelMapping = _ref8.modelMapping,
|
|
133
|
+
agents = _ref8.agents;
|
|
144
134
|
return (!modelName || model && modelMapping && agents) && [{
|
|
145
135
|
name: 'name',
|
|
146
136
|
label: 'Name',
|
|
@@ -170,11 +160,11 @@ var fields = function fields(_ref7) {
|
|
|
170
160
|
options: function options(_ref9) {
|
|
171
161
|
var bridges = _ref9.bridges;
|
|
172
162
|
return bridges ? bridges.map(function (bridge) {
|
|
173
|
-
return Map({
|
|
163
|
+
return (0, _immutable.Map)({
|
|
174
164
|
value: bridge.get('slug'),
|
|
175
165
|
label: bridge.get('slug')
|
|
176
166
|
});
|
|
177
|
-
}) : List();
|
|
167
|
+
}) : (0, _immutable.List)();
|
|
178
168
|
}
|
|
179
169
|
}, {
|
|
180
170
|
name: 'agentSlug',
|
|
@@ -194,14 +184,14 @@ var fields = function fields(_ref7) {
|
|
|
194
184
|
options: function options(_ref11) {
|
|
195
185
|
var agents = _ref11.agents;
|
|
196
186
|
return agents ? agents.map(function (agent) {
|
|
197
|
-
return Map({
|
|
187
|
+
return (0, _immutable.Map)({
|
|
198
188
|
value: agent.get('slug'),
|
|
199
189
|
label: agent.get('slug')
|
|
200
190
|
});
|
|
201
|
-
}).unshift(Map({
|
|
191
|
+
}).unshift((0, _immutable.Map)({
|
|
202
192
|
value: 'system',
|
|
203
193
|
label: 'system'
|
|
204
|
-
})) : List();
|
|
194
|
+
})) : (0, _immutable.List)();
|
|
205
195
|
}
|
|
206
196
|
}, {
|
|
207
197
|
name: 'structure',
|
|
@@ -213,11 +203,11 @@ var fields = function fields(_ref7) {
|
|
|
213
203
|
}];
|
|
214
204
|
};
|
|
215
205
|
};
|
|
216
|
-
|
|
217
|
-
export var BridgeModelForm = generateForm({
|
|
206
|
+
var BridgeModelForm = (0, _Form.generateForm)({
|
|
218
207
|
formOptions: ['modelName'],
|
|
219
208
|
dataSources: dataSources,
|
|
220
209
|
fields: fields,
|
|
221
210
|
handleSubmit: handleSubmit
|
|
222
211
|
});
|
|
212
|
+
exports.BridgeModelForm = BridgeModelForm;
|
|
223
213
|
BridgeModelForm.displayName = 'BridgeModelForm';
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchBridgeModels } from '../../../apis';
|
|
3
|
-
import { defineFilter } from '../../../helpers';
|
|
4
|
-
var clientSide = defineFilter(true).startsWith('name', 'name').equals('status', 'status').end();
|
|
1
|
+
"use strict";
|
|
5
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BridgeModelTable = 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').equals('status', 'status').end();
|
|
6
11
|
var dataSource = function dataSource() {
|
|
7
12
|
return {
|
|
8
|
-
fn: fetchBridgeModels,
|
|
13
|
+
fn: _apis.fetchBridgeModels,
|
|
9
14
|
clientSide: clientSide,
|
|
10
15
|
params: function params() {
|
|
11
16
|
return [{
|
|
@@ -20,7 +25,6 @@ var dataSource = function dataSource() {
|
|
|
20
25
|
}
|
|
21
26
|
};
|
|
22
27
|
};
|
|
23
|
-
|
|
24
28
|
var filters = function filters() {
|
|
25
29
|
return function () {
|
|
26
30
|
return [{
|
|
@@ -41,19 +45,22 @@ var filters = function filters() {
|
|
|
41
45
|
}];
|
|
42
46
|
};
|
|
43
47
|
};
|
|
44
|
-
|
|
45
48
|
var columns = [{
|
|
46
49
|
value: 'name',
|
|
47
50
|
title: 'Model Name',
|
|
48
|
-
sortable: true
|
|
51
|
+
sortable: true,
|
|
52
|
+
toggleable: false,
|
|
53
|
+
columnOrder: 'first'
|
|
49
54
|
}, {
|
|
50
55
|
value: 'status',
|
|
51
56
|
title: 'Status',
|
|
52
|
-
sortable: true
|
|
57
|
+
sortable: true,
|
|
58
|
+
toggleable: true
|
|
53
59
|
}];
|
|
54
|
-
|
|
60
|
+
var BridgeModelTable = (0, _Table.generateTable)({
|
|
55
61
|
columns: columns,
|
|
56
62
|
filters: filters,
|
|
57
63
|
dataSource: dataSource
|
|
58
64
|
});
|
|
65
|
+
exports.BridgeModelTable = BridgeModelTable;
|
|
59
66
|
BridgeModelTable.displayName = 'BridgeModelTable';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchBridgeModel, fetchBridgeModelAttributeMapping, createBridgeModelAttribute, createBridgeModelAttributeMapping, updateBridgeModelAttribute, updateBridgeModelAttributeMapping } from '../../../apis';
|
|
1
|
+
"use strict";
|
|
3
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BridgeModelAttributeForm = void 0;
|
|
7
|
+
var _Form = require("../../form/Form");
|
|
8
|
+
var _apis = require("../../../apis");
|
|
4
9
|
var dataSources = function dataSources(_ref) {
|
|
5
10
|
var modelName = _ref.modelName,
|
|
6
|
-
|
|
11
|
+
attributeName = _ref.attributeName;
|
|
7
12
|
return {
|
|
8
13
|
bridgeModel: {
|
|
9
|
-
fn: fetchBridgeModel,
|
|
14
|
+
fn: _apis.fetchBridgeModel,
|
|
10
15
|
params: [{
|
|
11
16
|
modelName: modelName
|
|
12
17
|
}],
|
|
@@ -15,7 +20,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
15
20
|
}
|
|
16
21
|
},
|
|
17
22
|
bridgeModelAttribute: {
|
|
18
|
-
fn: fetchBridgeModelAttributeMapping,
|
|
23
|
+
fn: _apis.fetchBridgeModelAttributeMapping,
|
|
19
24
|
params: function params(_ref2) {
|
|
20
25
|
var bridgeModel = _ref2.bridgeModel;
|
|
21
26
|
return attributeName && bridgeModel && [{
|
|
@@ -30,23 +35,22 @@ var dataSources = function dataSources(_ref) {
|
|
|
30
35
|
}
|
|
31
36
|
};
|
|
32
37
|
};
|
|
33
|
-
|
|
34
38
|
var handleSubmit = function handleSubmit(_ref3) {
|
|
35
39
|
var modelName = _ref3.modelName,
|
|
36
|
-
|
|
40
|
+
attributeName = _ref3.attributeName;
|
|
37
41
|
return function (values, _ref4) {
|
|
38
42
|
var bridgeModel = _ref4.bridgeModel;
|
|
39
43
|
var mappingName = bridgeModel.get('activeMappingName');
|
|
40
44
|
var name = values.get('name');
|
|
41
45
|
var structureField = values.get('mapping');
|
|
42
|
-
return (attributeName ? updateBridgeModelAttribute : createBridgeModelAttribute)({
|
|
46
|
+
return (attributeName ? _apis.updateBridgeModelAttribute : _apis.createBridgeModelAttribute)({
|
|
43
47
|
modelName: modelName,
|
|
44
48
|
attributeName: attributeName,
|
|
45
49
|
bridgeModelAttribute: {
|
|
46
50
|
name: name
|
|
47
51
|
}
|
|
48
52
|
}).then(function (result) {
|
|
49
|
-
return result.error ? result : (attributeName ? updateBridgeModelAttributeMapping : createBridgeModelAttributeMapping)({
|
|
53
|
+
return result.error ? result : (attributeName ? _apis.updateBridgeModelAttributeMapping : _apis.createBridgeModelAttributeMapping)({
|
|
50
54
|
modelName: modelName,
|
|
51
55
|
mappingName: mappingName,
|
|
52
56
|
attributeName: name,
|
|
@@ -57,20 +61,17 @@ var handleSubmit = function handleSubmit(_ref3) {
|
|
|
57
61
|
});
|
|
58
62
|
}).then(function (_ref5) {
|
|
59
63
|
var bridgeModelAttributeMapping = _ref5.bridgeModelAttributeMapping,
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
error = _ref5.error;
|
|
62
65
|
if (error) {
|
|
63
66
|
throw error.statusCode === 400 && error.message || 'There was an error saving the attribute';
|
|
64
67
|
}
|
|
65
|
-
|
|
66
68
|
return bridgeModelAttributeMapping;
|
|
67
69
|
});
|
|
68
70
|
};
|
|
69
71
|
};
|
|
70
|
-
|
|
71
72
|
var fields = function fields(_ref6) {
|
|
72
73
|
var modelName = _ref6.modelName,
|
|
73
|
-
|
|
74
|
+
attributeName = _ref6.attributeName;
|
|
74
75
|
return function (_ref7) {
|
|
75
76
|
var bridgeModelAttribute = _ref7.bridgeModelAttribute;
|
|
76
77
|
return (!attributeName || bridgeModelAttribute) && [{
|
|
@@ -98,11 +99,11 @@ var fields = function fields(_ref6) {
|
|
|
98
99
|
}];
|
|
99
100
|
};
|
|
100
101
|
};
|
|
101
|
-
|
|
102
|
-
export var BridgeModelAttributeForm = generateForm({
|
|
102
|
+
var BridgeModelAttributeForm = (0, _Form.generateForm)({
|
|
103
103
|
formOptions: ['modelName', 'attributeName'],
|
|
104
104
|
dataSources: dataSources,
|
|
105
105
|
fields: fields,
|
|
106
106
|
handleSubmit: handleSubmit
|
|
107
107
|
});
|
|
108
|
+
exports.BridgeModelAttributeForm = BridgeModelAttributeForm;
|
|
108
109
|
BridgeModelAttributeForm.displayName = 'BridgeModelAttributeForm';
|
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.BridgeModelAttributeTable = 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 _helpers = require("../../../helpers");
|
|
12
|
+
var clientSide = (0, _helpers.defineFilter)(true).startsWith('name', 'name').end();
|
|
13
|
+
|
|
14
|
+
// Handles bridge model api response by checking for error and also returning
|
|
6
15
|
// error if active mapping is not present. If valid returns object with the
|
|
7
16
|
// attributes and their mappings.
|
|
8
|
-
|
|
9
17
|
var handleBridgeModel = function handleBridgeModel(_ref) {
|
|
10
18
|
var _ref$bridgeModel = _ref.bridgeModel,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
error = _ref$bridgeModel.error,
|
|
20
|
+
attributes = _ref$bridgeModel.attributes,
|
|
21
|
+
activeMappingName = _ref$bridgeModel.activeMappingName,
|
|
22
|
+
mappings = _ref$bridgeModel.mappings;
|
|
16
23
|
if (error) {
|
|
17
24
|
return {
|
|
18
25
|
error: error
|
|
19
26
|
};
|
|
20
27
|
}
|
|
21
|
-
|
|
22
28
|
var mapping = mappings.find(function (_ref2) {
|
|
23
29
|
var name = _ref2.name;
|
|
24
30
|
return name === activeMappingName;
|
|
25
31
|
});
|
|
26
|
-
|
|
27
32
|
if (!mapping) {
|
|
28
33
|
return {
|
|
29
34
|
error: 'Invalid bridge model, active mapping not found'
|
|
30
35
|
};
|
|
31
36
|
}
|
|
32
|
-
|
|
33
37
|
return {
|
|
34
38
|
attributes: attributes,
|
|
35
39
|
attributeMappings: mapping.attributes
|
|
36
40
|
};
|
|
37
41
|
};
|
|
38
|
-
|
|
39
42
|
var transform = function transform(_ref3) {
|
|
40
43
|
var attributes = _ref3.attributes,
|
|
41
|
-
|
|
44
|
+
attributeMappings = _ref3.attributeMappings;
|
|
42
45
|
return {
|
|
43
46
|
data: attributes.map(function (attribute) {
|
|
44
47
|
var mapping = attributeMappings.find(function (_ref4) {
|
|
45
48
|
var name = _ref4.name;
|
|
46
49
|
return name === attribute.name;
|
|
47
50
|
});
|
|
48
|
-
return
|
|
51
|
+
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, attribute), {}, {
|
|
49
52
|
structureField: mapping ? mapping.structureField || '' : null
|
|
50
53
|
});
|
|
51
54
|
})
|
|
52
55
|
};
|
|
53
56
|
};
|
|
54
|
-
|
|
55
57
|
var dataSource = function dataSource(_ref5) {
|
|
56
58
|
var modelName = _ref5.modelName;
|
|
57
59
|
return {
|
|
58
60
|
fn: function fn() {
|
|
59
|
-
return fetchBridgeModel({
|
|
61
|
+
return (0, _apis.fetchBridgeModel)({
|
|
60
62
|
modelName: modelName
|
|
61
63
|
}).then(handleBridgeModel);
|
|
62
64
|
},
|
|
@@ -68,8 +70,9 @@ var dataSource = function dataSource(_ref5) {
|
|
|
68
70
|
},
|
|
69
71
|
transform: transform
|
|
70
72
|
};
|
|
71
|
-
};
|
|
73
|
+
};
|
|
72
74
|
|
|
75
|
+
// const filters = () => () => [{ name: 'name', label: 'Name', type: 'text' }];
|
|
73
76
|
|
|
74
77
|
var columns = [{
|
|
75
78
|
value: 'name',
|
|
@@ -80,10 +83,11 @@ var columns = [{
|
|
|
80
83
|
title: 'Mapping',
|
|
81
84
|
type: 'text'
|
|
82
85
|
}];
|
|
83
|
-
|
|
86
|
+
var BridgeModelAttributeTable = (0, _Table.generateTable)({
|
|
84
87
|
columns: columns,
|
|
85
88
|
// filters,
|
|
86
89
|
dataSource: dataSource,
|
|
87
90
|
tableOptions: ['modelName']
|
|
88
91
|
});
|
|
92
|
+
exports.BridgeModelAttributeTable = BridgeModelAttributeTable;
|
|
89
93
|
BridgeModelAttributeTable.displayName = 'BridgeModelAttributeTable';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { fetchBridgeModel, fetchBridgeModelQualification, fetchBridgeModelQualificationMapping, createBridgeModelQualification, createBridgeModelQualificationMapping, updateBridgeModelQualification, updateBridgeModelQualificationMapping, deleteBridgeModelQualification } from '../../../apis';
|
|
1
|
+
"use strict";
|
|
3
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BridgeModelQualificationForm = void 0;
|
|
7
|
+
var _Form = require("../../form/Form");
|
|
8
|
+
var _apis = require("../../../apis");
|
|
4
9
|
var dataSources = function dataSources(_ref) {
|
|
5
10
|
var modelName = _ref.modelName,
|
|
6
|
-
|
|
11
|
+
qualificationName = _ref.qualificationName;
|
|
7
12
|
return {
|
|
8
13
|
bridgeModel: {
|
|
9
|
-
fn: fetchBridgeModel,
|
|
14
|
+
fn: _apis.fetchBridgeModel,
|
|
10
15
|
params: [{
|
|
11
16
|
modelName: modelName
|
|
12
17
|
}],
|
|
@@ -15,7 +20,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
15
20
|
}
|
|
16
21
|
},
|
|
17
22
|
bridgeModelQualification: {
|
|
18
|
-
fn: fetchBridgeModelQualification,
|
|
23
|
+
fn: _apis.fetchBridgeModelQualification,
|
|
19
24
|
params: qualificationName && [{
|
|
20
25
|
modelName: modelName,
|
|
21
26
|
qualificationName: qualificationName
|
|
@@ -25,7 +30,7 @@ var dataSources = function dataSources(_ref) {
|
|
|
25
30
|
}
|
|
26
31
|
},
|
|
27
32
|
bridgeModelQualificationMapping: {
|
|
28
|
-
fn: fetchBridgeModelQualificationMapping,
|
|
33
|
+
fn: _apis.fetchBridgeModelQualificationMapping,
|
|
29
34
|
params: function params(_ref2) {
|
|
30
35
|
var bridgeModel = _ref2.bridgeModel;
|
|
31
36
|
return qualificationName && bridgeModel && [{
|
|
@@ -40,17 +45,16 @@ var dataSources = function dataSources(_ref) {
|
|
|
40
45
|
}
|
|
41
46
|
};
|
|
42
47
|
};
|
|
43
|
-
|
|
44
48
|
var handleSubmit = function handleSubmit(_ref3) {
|
|
45
49
|
var modelName = _ref3.modelName,
|
|
46
|
-
|
|
50
|
+
qualificationName = _ref3.qualificationName;
|
|
47
51
|
return function (values, _ref4) {
|
|
48
52
|
var bridgeModel = _ref4.bridgeModel;
|
|
49
53
|
var mappingName = bridgeModel.get('activeMappingName');
|
|
50
54
|
var name = values.get('name');
|
|
51
55
|
var resultType = values.get('resultType');
|
|
52
56
|
var query = values.get('query');
|
|
53
|
-
return (qualificationName ? updateBridgeModelQualification : createBridgeModelQualification)({
|
|
57
|
+
return (qualificationName ? _apis.updateBridgeModelQualification : _apis.createBridgeModelQualification)({
|
|
54
58
|
modelName: modelName,
|
|
55
59
|
qualificationName: qualificationName,
|
|
56
60
|
bridgeModelQualification: {
|
|
@@ -58,7 +62,7 @@ var handleSubmit = function handleSubmit(_ref3) {
|
|
|
58
62
|
resultType: resultType
|
|
59
63
|
}
|
|
60
64
|
}).then(function (result) {
|
|
61
|
-
return result.error ? result : (qualificationName ? updateBridgeModelQualificationMapping : createBridgeModelQualificationMapping)({
|
|
65
|
+
return result.error ? result : (qualificationName ? _apis.updateBridgeModelQualificationMapping : _apis.createBridgeModelQualificationMapping)({
|
|
62
66
|
modelName: modelName,
|
|
63
67
|
mappingName: mappingName,
|
|
64
68
|
qualificationName: name,
|
|
@@ -68,7 +72,7 @@ var handleSubmit = function handleSubmit(_ref3) {
|
|
|
68
72
|
}
|
|
69
73
|
}).then(function (result) {
|
|
70
74
|
if (result.error && !qualificationName) {
|
|
71
|
-
return deleteBridgeModelQualification({
|
|
75
|
+
return (0, _apis.deleteBridgeModelQualification)({
|
|
72
76
|
modelName: modelName,
|
|
73
77
|
qualificationName: name
|
|
74
78
|
}).then(function () {
|
|
@@ -77,28 +81,24 @@ var handleSubmit = function handleSubmit(_ref3) {
|
|
|
77
81
|
};
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
|
-
|
|
81
84
|
return result;
|
|
82
85
|
});
|
|
83
86
|
}).then(function (_ref5) {
|
|
84
87
|
var bridgeModelQualificationMapping = _ref5.bridgeModelQualificationMapping,
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
error = _ref5.error;
|
|
87
89
|
if (error) {
|
|
88
90
|
throw error.statusCode === 400 && error.message || 'There was an error saving the qualification';
|
|
89
91
|
}
|
|
90
|
-
|
|
91
92
|
return bridgeModelQualificationMapping;
|
|
92
93
|
});
|
|
93
94
|
};
|
|
94
95
|
};
|
|
95
|
-
|
|
96
96
|
var fields = function fields(_ref6) {
|
|
97
97
|
var modelName = _ref6.modelName,
|
|
98
|
-
|
|
98
|
+
qualificationName = _ref6.qualificationName;
|
|
99
99
|
return function (_ref7) {
|
|
100
100
|
var bridgeModelQualification = _ref7.bridgeModelQualification,
|
|
101
|
-
|
|
101
|
+
bridgeModelQualificationMapping = _ref7.bridgeModelQualificationMapping;
|
|
102
102
|
return (!qualificationName || bridgeModelQualification && bridgeModelQualificationMapping) && [{
|
|
103
103
|
name: 'name',
|
|
104
104
|
label: 'Name',
|
|
@@ -137,11 +137,11 @@ var fields = function fields(_ref6) {
|
|
|
137
137
|
}];
|
|
138
138
|
};
|
|
139
139
|
};
|
|
140
|
-
|
|
141
|
-
export var BridgeModelQualificationForm = generateForm({
|
|
140
|
+
var BridgeModelQualificationForm = (0, _Form.generateForm)({
|
|
142
141
|
formOptions: ['modelName', 'qualificationName'],
|
|
143
142
|
dataSources: dataSources,
|
|
144
143
|
fields: fields,
|
|
145
144
|
handleSubmit: handleSubmit
|
|
146
145
|
});
|
|
146
|
+
exports.BridgeModelQualificationForm = BridgeModelQualificationForm;
|
|
147
147
|
BridgeModelQualificationForm.displayName = 'BridgeModelQualificationForm';
|