@kineticdata/react 6.0.5 → 6.1.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/CHANGELOG.md +116 -94
- package/lib/apis/core/attributeDefinitions.js +9 -6
- package/lib/apis/core/integrations.js +61 -0
- package/lib/apis/core/submissions.js +52 -15
- package/lib/apis/http.js +16 -2
- package/lib/apis/index.js +24 -0
- package/lib/apis/integrator/index.js +262 -0
- package/lib/apis/system/index.js +64 -12
- package/lib/apis/task/index.js +9 -2
- package/lib/components/agent/filestore/FilestoreForm.js +1 -1
- package/lib/components/common/AttributeSelect.js +10 -2
- package/lib/components/common/BridgeSelect.js +2 -1
- package/lib/components/common/ConnectionSelect.js +72 -0
- package/lib/components/common/FormSelect.js +2 -1
- package/lib/components/common/StaticSelect.js +15 -6
- package/lib/components/common/TableInput.js +4 -1
- package/lib/components/common/TeamSelect.js +2 -1
- package/lib/components/common/ToastContainer.js +34 -10
- package/lib/components/common/Typeahead.js +59 -23
- package/lib/components/common/UserSelect.js +2 -1
- package/lib/components/common/authentication/RequestInterceptor.js +1 -1
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +3 -0
- package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
- package/lib/components/core/category/CategoryForm.js +4 -1
- package/lib/components/core/category/CategoryTable.js +2 -2
- package/lib/components/core/core_form/CoreForm.js +18 -10
- package/lib/components/core/file_resource/FileResourceForm.js +2 -1
- package/lib/components/core/file_resource/FileResourceTable.js +14 -7
- package/lib/components/core/form/FormForm.js +42 -19
- package/lib/components/core/form/FormTable.js +14 -14
- package/lib/components/core/form_type/FormTypeForm.js +3 -0
- package/lib/components/core/i18n/Moment.js +1 -0
- package/lib/components/core/integration/IntegrationForm.js +232 -0
- package/lib/components/core/integration/IntegrationTable.js +139 -0
- package/lib/components/core/kapp/KappForm.js +18 -5
- package/lib/components/core/kapp/KappTable.js +3 -3
- package/lib/components/core/log/LogTable.js +1 -1
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
- package/lib/components/core/space/SpaceForm.js +3 -22
- package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
- package/lib/components/core/submission/FormSubmissionTable.js +12 -7
- package/lib/components/core/submission/KappSubmissionTable.js +4 -4
- package/lib/components/core/submission/SubmissionForm.js +3 -1
- package/lib/components/core/team/TeamTable.js +17 -7
- package/lib/components/core/user/UserTable.js +18 -18
- package/lib/components/core/webapi/WebApiForm.js +5 -2
- package/lib/components/core/webapi/WebApiTable.js +2 -2
- package/lib/components/core/webhook/WebhookForm.js +43 -33
- package/lib/components/core/webhook/WebhookTable.js +16 -16
- package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
- package/lib/components/form/Form.helpers.js +10 -4
- package/lib/components/form/Form.js +250 -168
- package/lib/components/form/Form.models.js +6 -1
- package/lib/components/form/FormState.js +9 -5
- package/lib/components/form/defaults/CodeField.js +44 -1
- package/lib/components/index.js +84 -3
- package/lib/components/integrator/connection/ConnectionForm.js +112 -0
- package/lib/components/integrator/connection/ConnectionTable.js +80 -0
- package/lib/components/integrator/connection/config_fields/http.js +570 -0
- package/lib/components/integrator/integrationTypes.js +98 -0
- package/lib/components/integrator/operation/OperationForm.js +128 -0
- package/lib/components/integrator/operation/OperationTable.js +64 -0
- package/lib/components/integrator/operation/config_fields/http.js +184 -0
- package/lib/components/system/SystemSecurityForm.js +1 -1
- package/lib/components/system/SystemTaskAdapterForm.js +9 -9
- package/lib/components/system/helpers.js +123 -100
- package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
- package/lib/components/system/spaces/SystemTenantForm.js +276 -104
- package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
- package/lib/components/system/spaces/SystemTenantTable.js +20 -16
- package/lib/components/table/Table.redux.js +1 -1
- package/lib/components/task/builder/ConnectorForm.js +11 -7
- package/lib/components/task/builder/Node.js +11 -2
- package/lib/components/task/builder/NodeForm.js +93 -22
- package/lib/components/task/builder/NodeParametersForm.js +29 -17
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
- package/lib/components/task/builder/TreeBuilder.js +24 -3
- package/lib/components/task/builder/builder.redux.js +310 -185
- package/lib/components/task/builder/constants.js +10 -2
- package/lib/components/task/builder/helpers.js +199 -79
- package/lib/components/task/builder/models.js +7 -6
- package/lib/components/task/category/TaskCategoryTable.js +3 -3
- package/lib/components/task/common/UsageTable.js +1 -1
- package/lib/components/task/handlers/HandlerTable.js +35 -19
- package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
- package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
- package/lib/components/task/runs/RunTable.js +4 -4
- package/lib/components/task/runs/RunTaskTable.js +1 -1
- package/lib/components/task/sources/SourceTable.js +2 -2
- package/lib/components/task/triggers/TriggerTable.js +2 -2
- package/lib/components/task/workflows/LinkedWorkflowTable.js +2 -2
- package/lib/components/task/workflows/WorkflowForm.js +27 -8
- package/lib/components/task/workflows/WorkflowTable.js +2 -2
- package/lib/helpers/index.js +289 -72
- package/package.json +5 -3
- package/proxyhelper.js +28 -3
|
@@ -70,7 +70,7 @@ var columns = [{
|
|
|
70
70
|
value: 'type',
|
|
71
71
|
toggleable: true
|
|
72
72
|
}, {
|
|
73
|
-
title: 'Created',
|
|
73
|
+
title: 'Created At',
|
|
74
74
|
value: 'createdAt',
|
|
75
75
|
toggleable: true
|
|
76
76
|
}, {
|
|
@@ -78,7 +78,7 @@ var columns = [{
|
|
|
78
78
|
value: 'createdBy',
|
|
79
79
|
toggleable: true
|
|
80
80
|
}, {
|
|
81
|
-
title: 'Updated',
|
|
81
|
+
title: 'Updated At',
|
|
82
82
|
value: 'updatedAt',
|
|
83
83
|
toggleable: true
|
|
84
84
|
}, {
|
|
@@ -203,7 +203,7 @@ var columns = [{
|
|
|
203
203
|
}
|
|
204
204
|
}, {
|
|
205
205
|
value: 'createdAt',
|
|
206
|
-
title: 'Created',
|
|
206
|
+
title: 'Created At',
|
|
207
207
|
sortable: true,
|
|
208
208
|
toggleable: true
|
|
209
209
|
}, {
|
|
@@ -218,7 +218,7 @@ var columns = [{
|
|
|
218
218
|
toggleable: true
|
|
219
219
|
}, {
|
|
220
220
|
value: 'updatedAt',
|
|
221
|
-
title: 'Updated',
|
|
221
|
+
title: 'Updated At',
|
|
222
222
|
sortable: true,
|
|
223
223
|
toggleable: true
|
|
224
224
|
}, {
|
|
@@ -124,7 +124,7 @@ var columns = [{
|
|
|
124
124
|
toggleable: true
|
|
125
125
|
}, {
|
|
126
126
|
value: 'createdAt',
|
|
127
|
-
title: 'Created',
|
|
127
|
+
title: 'Created At',
|
|
128
128
|
sortable: false,
|
|
129
129
|
toggleable: true
|
|
130
130
|
}, {
|
|
@@ -134,7 +134,7 @@ var columns = [{
|
|
|
134
134
|
toggleable: true
|
|
135
135
|
}, {
|
|
136
136
|
value: 'updatedAt',
|
|
137
|
-
title: 'Updated',
|
|
137
|
+
title: 'Updated At',
|
|
138
138
|
sortable: true,
|
|
139
139
|
toggleable: true
|
|
140
140
|
}, {
|
|
@@ -10,7 +10,7 @@ var _apis = require("../../../apis");
|
|
|
10
10
|
var _Form = require("../../form/Form");
|
|
11
11
|
var _immutable = require("immutable");
|
|
12
12
|
var _helpers = require("../../../helpers");
|
|
13
|
-
var SPACE_INCLUDES = '
|
|
13
|
+
var SPACE_INCLUDES = 'spaceAttributeDefinitions,teamAttributeDefinitions,userAttributeDefinitions,userProfileAttributeDefinitions';
|
|
14
14
|
var KAPP_INCLUDES = 'formAttributeDefinitions,kappAttributeDefinitions,fields';
|
|
15
15
|
|
|
16
16
|
// bulids a definition id based on a name (similar to slugify)
|
|
@@ -147,7 +147,7 @@ var fields = function fields(_ref5) {
|
|
|
147
147
|
name: 'filter',
|
|
148
148
|
label: 'Filter',
|
|
149
149
|
type: 'code',
|
|
150
|
-
language: 'js',
|
|
150
|
+
language: 'js-expression',
|
|
151
151
|
initialValue: workflow && workflow.get('filter') || '',
|
|
152
152
|
required: false,
|
|
153
153
|
// use event to show filter on linked workflows
|
|
@@ -156,14 +156,33 @@ var fields = function fields(_ref5) {
|
|
|
156
156
|
var space = _ref9.space,
|
|
157
157
|
kapp = _ref9.kapp,
|
|
158
158
|
values = _ref9.values;
|
|
159
|
-
var type = ['
|
|
159
|
+
var type = ['Space', 'Team', 'User', 'Form', 'Submission'].find(function (type) {
|
|
160
160
|
var _values$get;
|
|
161
|
-
return (_values$get = values.get('event')) === null || _values$get === void 0 ? void 0 : _values$get.
|
|
161
|
+
return (_values$get = values.get('event')) === null || _values$get === void 0 ? void 0 : _values$get.startsWith(type);
|
|
162
162
|
});
|
|
163
|
-
return (0, _helpers.
|
|
164
|
-
space:
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
return (0, _helpers.buildCodeEditorBindings)({
|
|
164
|
+
space: {
|
|
165
|
+
attributeDefinitions: space === null || space === void 0 ? void 0 : space.get('spaceAttributeDefinitions')
|
|
166
|
+
},
|
|
167
|
+
user: type === 'User' && {
|
|
168
|
+
attributeDefinitions: space === null || space === void 0 ? void 0 : space.get('userAttributeDefinitions'),
|
|
169
|
+
profileAttributeDefinitions: space === null || space === void 0 ? void 0 : space.get('userProfileAttributeDefinitions')
|
|
170
|
+
},
|
|
171
|
+
team: type === 'Team' && {
|
|
172
|
+
attributeDefinitions: space === null || space === void 0 ? void 0 : space.get('teamAttributeDefinitions')
|
|
173
|
+
},
|
|
174
|
+
kapp: ['Form', 'Submission'].includes(type) && {
|
|
175
|
+
attributeDefinitions: kapp === null || kapp === void 0 ? void 0 : kapp.get('kappAttributeDefinitions')
|
|
176
|
+
},
|
|
177
|
+
form: ['Form', 'Submission'].includes(type) && {
|
|
178
|
+
attributeDefinitions: kapp === null || kapp === void 0 ? void 0 : kapp.get('formAttributeDefinitions')
|
|
179
|
+
},
|
|
180
|
+
submission: type === 'Submission' && {
|
|
181
|
+
detailed: true
|
|
182
|
+
},
|
|
183
|
+
values: type === 'Submission' && (kapp === null || kapp === void 0 ? void 0 : kapp.get('fields').size) > 0 && {
|
|
184
|
+
data: kapp.get('fields')
|
|
185
|
+
}
|
|
167
186
|
});
|
|
168
187
|
}
|
|
169
188
|
}, {
|
|
@@ -157,7 +157,7 @@ var columns = [{
|
|
|
157
157
|
toggleable: true
|
|
158
158
|
}, {
|
|
159
159
|
value: 'createdAt',
|
|
160
|
-
title: 'Created',
|
|
160
|
+
title: 'Created At',
|
|
161
161
|
sortable: false,
|
|
162
162
|
toggleable: true
|
|
163
163
|
}, {
|
|
@@ -167,7 +167,7 @@ var columns = [{
|
|
|
167
167
|
toggleable: true
|
|
168
168
|
}, {
|
|
169
169
|
value: 'updatedAt',
|
|
170
|
-
title: 'Updated',
|
|
170
|
+
title: 'Updated At',
|
|
171
171
|
sortable: true,
|
|
172
172
|
toggleable: true
|
|
173
173
|
}, {
|
package/lib/helpers/index.js
CHANGED
|
@@ -12,16 +12,18 @@ var _exportNames = {
|
|
|
12
12
|
generateKey: true,
|
|
13
13
|
slugify: true,
|
|
14
14
|
buildDefinitionId: true,
|
|
15
|
-
|
|
15
|
+
buildCodeEditorBindings: true,
|
|
16
16
|
buildAgentPath: true,
|
|
17
17
|
handleFormErrors: true,
|
|
18
18
|
INDEX_STATIC_PARTS: true,
|
|
19
19
|
TIMELINES: true,
|
|
20
20
|
MAX_PART_LENGTH: true
|
|
21
21
|
};
|
|
22
|
-
exports.splitTeamName = exports.slugify = exports.partitionListBy = exports.handleFormErrors = exports.generateKey = exports.bundle = exports.buildDefinitionId = exports.
|
|
22
|
+
exports.splitTeamName = exports.slugify = exports.partitionListBy = exports.handleFormErrors = exports.generateKey = exports.bundle = exports.buildDefinitionId = exports.buildCodeEditorBindings = exports.buildAgentPath = exports.TIMELINES = exports.MAX_PART_LENGTH = exports.K = exports.INDEX_STATIC_PARTS = void 0;
|
|
23
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
23
24
|
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toArray"));
|
|
24
25
|
var _immutable = require("immutable");
|
|
26
|
+
var _lodashEs = require("lodash-es");
|
|
25
27
|
var _SearchBuilder = require("./SearchBuilder");
|
|
26
28
|
Object.keys(_SearchBuilder).forEach(function (key) {
|
|
27
29
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -104,83 +106,298 @@ var buildDefinitionId = exports.buildDefinitionId = function buildDefinitionId(t
|
|
|
104
106
|
// Remove unwanted chars
|
|
105
107
|
.replace(/[^A-Za-z0-9_]+/g, '');
|
|
106
108
|
};
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
var STATIC_FORM_BINDINGS = [{
|
|
110
|
+
label: 'name',
|
|
111
|
+
boost: 20
|
|
112
|
+
}, {
|
|
113
|
+
label: 'slug',
|
|
114
|
+
boost: 20
|
|
115
|
+
}];
|
|
116
|
+
var STATIC_FORM_BINDINGS_DETAILED = [].concat(STATIC_FORM_BINDINGS, [{
|
|
117
|
+
label: 'anonymous'
|
|
118
|
+
}, {
|
|
119
|
+
label: 'description'
|
|
120
|
+
}, {
|
|
121
|
+
label: 'status'
|
|
122
|
+
}, {
|
|
123
|
+
label: 'type'
|
|
124
|
+
}, {
|
|
125
|
+
label: 'createdAt',
|
|
126
|
+
boost: -20
|
|
127
|
+
}, {
|
|
128
|
+
label: 'createdBy',
|
|
129
|
+
boost: -20
|
|
130
|
+
}, {
|
|
131
|
+
label: 'updatedAt',
|
|
132
|
+
boost: -20
|
|
133
|
+
}, {
|
|
134
|
+
label: 'updatedBy',
|
|
135
|
+
boost: -20
|
|
136
|
+
}]);
|
|
137
|
+
var STATIC_KAPP_BINDINGS = [{
|
|
138
|
+
label: 'name',
|
|
139
|
+
boost: 20
|
|
140
|
+
}, {
|
|
141
|
+
label: 'slug',
|
|
142
|
+
boost: 20
|
|
143
|
+
}];
|
|
144
|
+
var STATIC_SPACE_BINDINGS = [{
|
|
145
|
+
label: 'name',
|
|
146
|
+
boost: 20
|
|
147
|
+
}, {
|
|
148
|
+
label: 'slug',
|
|
149
|
+
boost: 20
|
|
150
|
+
}];
|
|
151
|
+
var STATIC_SUBMISSION_BINDINGS = [{
|
|
152
|
+
label: 'id',
|
|
153
|
+
boost: 20
|
|
154
|
+
}, {
|
|
155
|
+
label: 'coreState'
|
|
156
|
+
}, {
|
|
157
|
+
label: 'currentPage'
|
|
158
|
+
}, {
|
|
159
|
+
label: 'handle'
|
|
160
|
+
}, {
|
|
161
|
+
label: 'type'
|
|
162
|
+
}, {
|
|
163
|
+
label: 'closedAt',
|
|
164
|
+
boost: -20
|
|
165
|
+
}, {
|
|
166
|
+
label: 'closedBy',
|
|
167
|
+
boost: -20
|
|
168
|
+
}, {
|
|
169
|
+
label: 'createdAt',
|
|
170
|
+
boost: -20
|
|
171
|
+
}, {
|
|
172
|
+
label: 'createdBy',
|
|
173
|
+
boost: -20
|
|
174
|
+
}, {
|
|
175
|
+
label: 'submittedAt',
|
|
176
|
+
boost: -20
|
|
177
|
+
}, {
|
|
178
|
+
label: 'submittedBy',
|
|
179
|
+
boost: -20
|
|
180
|
+
}, {
|
|
181
|
+
label: 'updatedAt',
|
|
182
|
+
boost: -20
|
|
183
|
+
}, {
|
|
184
|
+
label: 'updatedBy',
|
|
185
|
+
boost: -20
|
|
186
|
+
}];
|
|
187
|
+
var STATIC_SUBMISSION_BINDINGS_DETAILED = [].concat(STATIC_SUBMISSION_BINDINGS, [{
|
|
188
|
+
label: 'sessionToken'
|
|
189
|
+
}]);
|
|
190
|
+
var STATIC_IDENTITY_BINDINGS = [{
|
|
191
|
+
label: 'username',
|
|
192
|
+
boost: 20
|
|
193
|
+
}, {
|
|
194
|
+
label: 'displayName',
|
|
195
|
+
boost: 10
|
|
196
|
+
}, {
|
|
197
|
+
label: 'email',
|
|
198
|
+
boost: 10
|
|
199
|
+
}, {
|
|
200
|
+
label: 'anonymous'
|
|
201
|
+
}, {
|
|
202
|
+
label: 'authenticated'
|
|
203
|
+
}, {
|
|
204
|
+
label: 'sessionToken'
|
|
205
|
+
}, {
|
|
206
|
+
label: 'spaceAdmin'
|
|
207
|
+
}];
|
|
208
|
+
var STATIC_FILE_BINDINGS = [{
|
|
209
|
+
label: 'folder'
|
|
210
|
+
}, {
|
|
211
|
+
label: 'name'
|
|
212
|
+
}, {
|
|
213
|
+
label: 'path'
|
|
214
|
+
}];
|
|
215
|
+
var STATIC_TEAM_BINDINGS = [{
|
|
216
|
+
label: 'name'
|
|
217
|
+
}, {
|
|
218
|
+
label: 'slug'
|
|
219
|
+
}];
|
|
220
|
+
var STATIC_USER_BINDINGS = [{
|
|
221
|
+
label: 'username',
|
|
222
|
+
boost: 20
|
|
223
|
+
}, {
|
|
224
|
+
label: 'displayName',
|
|
225
|
+
boost: 10
|
|
226
|
+
}, {
|
|
227
|
+
label: 'email',
|
|
228
|
+
boost: 10
|
|
229
|
+
}, {
|
|
230
|
+
label: 'spaceAdmin'
|
|
231
|
+
}];
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Builds code editor bindings from the provided options
|
|
235
|
+
*
|
|
236
|
+
* @param {object} options
|
|
237
|
+
*
|
|
238
|
+
* @param {object} [options.values] Options for values bindings
|
|
239
|
+
* @param {string} [options.values.label=values]
|
|
240
|
+
* @param {object[]} options.values.data
|
|
241
|
+
* @param {object} options.values.data[].name
|
|
242
|
+
* @param {object} options.values.data[].renderType
|
|
243
|
+
*
|
|
244
|
+
* @param {object} [options.form] Options for form bindings
|
|
245
|
+
* @param {string} [options.form.label=form]
|
|
246
|
+
* @param {boolean} [options.form.detailed]
|
|
247
|
+
* @param {object[]} [options.form.staticBindings]
|
|
248
|
+
* @param {object[]} [options.form.attributeDefinitions]
|
|
249
|
+
*
|
|
250
|
+
* @param {object} [options.kapp] Options for kapp bindings
|
|
251
|
+
* @param {string} [options.kapp.label=kapp]
|
|
252
|
+
* @param {object[]} [options.kapp.staticBindings]
|
|
253
|
+
* @param {object[]} [options.kapp.attributeDefinitions]
|
|
254
|
+
*
|
|
255
|
+
* @param {object} [options.space] Options for space bindings
|
|
256
|
+
* @param {string} [options.space.label=space]
|
|
257
|
+
* @param {object[]} [options.space.staticBindings]
|
|
258
|
+
* @param {object[]} [options.space.attributeDefinitions]
|
|
259
|
+
*
|
|
260
|
+
* @param {object} [options.submission] Options for submission bindings
|
|
261
|
+
* @param {string} [options.submission.label=submission]
|
|
262
|
+
* @param {boolean} [options.submission.detailed]
|
|
263
|
+
* @param {object[]} [options.submission.staticBindings]
|
|
264
|
+
*
|
|
265
|
+
* @param {object} [options.identity] Options for identity bindings
|
|
266
|
+
* @param {string} [options.identity.label=identity]
|
|
267
|
+
* @param {object[]} [options.identity.staticBindings]
|
|
268
|
+
* @param {object[]} [options.identity.attributeDefinitions]
|
|
269
|
+
* @param {object[]} [options.identity.profileAttributeDefinitions]
|
|
270
|
+
*
|
|
271
|
+
* @param {object} [options.user] Options for user bindings
|
|
272
|
+
* @param {string} [options.user.label=user]
|
|
273
|
+
* @param {object[]} [options.user.staticBindings]
|
|
274
|
+
* @param {object[]} [options.user.attributeDefinitions]
|
|
275
|
+
* @param {object[]} [options.user.profileAttributeDefinitions]
|
|
276
|
+
*
|
|
277
|
+
* @param {object} [options.team] Options for team bindings
|
|
278
|
+
* @param {string} [options.team.label=team]
|
|
279
|
+
* @param {object[]} [options.team.staticBindings]
|
|
280
|
+
* @param {object[]} [options.team.attributeDefinitions]
|
|
281
|
+
*
|
|
282
|
+
* @param {object} [options.file] Options for file resource bindings
|
|
283
|
+
* @param {string} [options.file.label=file]
|
|
284
|
+
* @param {object[]} [options.file.staticBindings]
|
|
285
|
+
*
|
|
286
|
+
* @param {object} [options.resources] Options for bridged resource bindings
|
|
287
|
+
* @param {string} [options.resources.label=resources]
|
|
288
|
+
* @param {string} [options.resources.bridgedResourceName]
|
|
289
|
+
* @param {string[]} [options.resources.attributes]
|
|
290
|
+
*
|
|
291
|
+
* @param {object} [options.integration] Options for integration bindings
|
|
292
|
+
* @param {string} [options.integration.label=integration]
|
|
293
|
+
* @param {string} [options.integration.integrationName]
|
|
294
|
+
* @param {string[]} [options.integration.outputs]
|
|
295
|
+
*
|
|
296
|
+
* @param {object[]} [options.staticBindings] Additional bindings to include
|
|
297
|
+
*
|
|
298
|
+
* @returns The bindings object to be used by the CodeEditor component.
|
|
299
|
+
*/
|
|
300
|
+
var buildCodeEditorBindings = exports.buildCodeEditorBindings = function buildCodeEditorBindings() {
|
|
301
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
302
|
+
values = _ref.values,
|
|
303
|
+
form = _ref.form,
|
|
304
|
+
kapp = _ref.kapp,
|
|
305
|
+
space = _ref.space,
|
|
306
|
+
submission = _ref.submission,
|
|
307
|
+
identity = _ref.identity,
|
|
308
|
+
user = _ref.user,
|
|
309
|
+
team = _ref.team,
|
|
310
|
+
file = _ref.file,
|
|
311
|
+
resources = _ref.resources,
|
|
312
|
+
integration = _ref.integration,
|
|
313
|
+
staticBindings = _ref.staticBindings;
|
|
314
|
+
return (0, _immutable.List)([values && buildValuesBindings(values.label || 'values', (0, _immutable.List)(values.data)), form && buildObjectWithAttributesBindings(form.label || 'form', (0, _immutable.List)(form.staticBindings).concat(form.detailed ? STATIC_FORM_BINDINGS_DETAILED : STATIC_FORM_BINDINGS), (0, _immutable.List)(form.attributeDefinitions)), kapp && buildObjectWithAttributesBindings(kapp.label || 'kapp', (0, _immutable.List)(kapp.staticBindings).concat(STATIC_KAPP_BINDINGS), (0, _immutable.List)(kapp.attributeDefinitions)), space && buildObjectWithAttributesBindings(space.label || 'space', (0, _immutable.List)(space.staticBindings).concat(STATIC_SPACE_BINDINGS), (0, _immutable.List)(space.attributeDefinitions)), submission && buildObjectWithAttributesBindings(submission.label || 'submission', (0, _immutable.List)(submission.staticBindings).concat(submission.detailed ? STATIC_SUBMISSION_BINDINGS_DETAILED : STATIC_SUBMISSION_BINDINGS)), identity && buildObjectWithAttributesBindings(identity.label || 'identity', (0, _immutable.List)(identity.staticBindings).concat(STATIC_IDENTITY_BINDINGS), (0, _immutable.List)(identity.attributeDefinitions), (0, _immutable.List)(identity.profileAttributeDefinitions)), user && buildObjectWithAttributesBindings(user.label || 'user', (0, _immutable.List)(user.staticBindings).concat(STATIC_USER_BINDINGS), (0, _immutable.List)(user.attributeDefinitions), (0, _immutable.List)(user.profileAttributeDefinitions)), team && buildObjectWithAttributesBindings(team.label || 'team', (0, _immutable.List)(team.staticBindings).concat(STATIC_TEAM_BINDINGS), (0, _immutable.List)(team.attributeDefinitions)), file && buildObjectWithAttributesBindings(file.label || 'file', (0, _immutable.List)(file.staticBindings).concat(STATIC_FILE_BINDINGS), (0, _immutable.List)(file.attributeDefinitions)), resources && buildResourcesBindings(resources.label || 'resources', resources.bridgedResourceName, resources.attributes), integration && buildIntegrationBindings(integration.label || 'integration', integration.integrationName, integration.integrationProperty, integration.outputs)].concat((0, _toConsumableArray2["default"])((staticBindings || []).map(function (binding) {
|
|
315
|
+
return (0, _immutable.fromJS)(binding);
|
|
316
|
+
}))).filter(Boolean));
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
// Builds code editor binding for kinetic objects with optional attribute
|
|
320
|
+
// definitions
|
|
321
|
+
var buildObjectWithAttributesBindings = function buildObjectWithAttributesBindings(label) {
|
|
322
|
+
var staticBindings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _immutable.List)();
|
|
323
|
+
var attributeDefinitions = arguments.length > 2 ? arguments[2] : undefined;
|
|
324
|
+
var profileAttributeDefinitions = arguments.length > 3 ? arguments[3] : undefined;
|
|
325
|
+
return (0, _immutable.Map)({
|
|
326
|
+
label: label,
|
|
327
|
+
type: 'function',
|
|
328
|
+
children: staticBindings.concat([attributeDefinitions && (0, _immutable.Map)({
|
|
329
|
+
label: 'attribute',
|
|
330
|
+
siblings: buildAttributeBindings(attributeDefinitions),
|
|
331
|
+
detail: 'Attribute Selector',
|
|
332
|
+
collapseSiblings: true
|
|
333
|
+
}), profileAttributeDefinitions && (0, _immutable.Map)({
|
|
334
|
+
label: 'profileAttribute',
|
|
335
|
+
siblings: buildAttributeBindings(profileAttributeDefinitions, true),
|
|
336
|
+
detail: 'Profile Attribute Selector',
|
|
337
|
+
collapseSiblings: true
|
|
338
|
+
})].filter(Boolean))
|
|
123
339
|
});
|
|
124
|
-
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
// Converts a list of attribute definitions to code editor bindings
|
|
343
|
+
var buildAttributeBindings = function buildAttributeBindings() {
|
|
344
|
+
var definitions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _immutable.List)();
|
|
345
|
+
var isProfile = arguments.length > 1 ? arguments[1] : undefined;
|
|
346
|
+
return definitions.map(function (def) {
|
|
125
347
|
return (0, _immutable.Map)({
|
|
126
|
-
|
|
127
|
-
|
|
348
|
+
label: (0, _immutable.get)(def, 'name'),
|
|
349
|
+
detail: "".concat(isProfile ? 'Profile ' : '', "Attribute").concat((0, _immutable.get)(def, 'allowsMultiple') ? ' (Multiple)' : ''),
|
|
350
|
+
section: "".concat(isProfile ? 'Profile ' : '', "Attributes")
|
|
128
351
|
});
|
|
129
352
|
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
// Converts a list of field data objects to code editor bindings
|
|
356
|
+
var buildValuesBindings = function buildValuesBindings(label) {
|
|
357
|
+
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _immutable.List)();
|
|
358
|
+
return (0, _immutable.Map)({
|
|
359
|
+
label: label,
|
|
360
|
+
type: 'function',
|
|
361
|
+
children: data.map(function (field) {
|
|
362
|
+
return (0, _immutable.Map)({
|
|
363
|
+
label: (0, _immutable.get)(field, 'name'),
|
|
364
|
+
detail: (0, _lodashEs.capitalize)((0, _immutable.get)(field, 'renderType'))
|
|
365
|
+
});
|
|
366
|
+
})
|
|
136
367
|
});
|
|
137
368
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
369
|
+
|
|
370
|
+
// Converts bridged resources data to code editor bindings
|
|
371
|
+
var buildResourcesBindings = function buildResourcesBindings(label, bridgedResourceName, attributes) {
|
|
372
|
+
return (0, _immutable.Map)({
|
|
373
|
+
label: label,
|
|
374
|
+
type: 'function',
|
|
375
|
+
children: [(0, _immutable.Map)({
|
|
376
|
+
label: bridgedResourceName,
|
|
377
|
+
siblings: attributes.map(function (label) {
|
|
378
|
+
return (0, _immutable.Map)({
|
|
379
|
+
label: label,
|
|
380
|
+
section: "".concat(bridgedResourceName, " Bridged Resource")
|
|
381
|
+
});
|
|
382
|
+
}),
|
|
383
|
+
detail: 'Bridged Resource',
|
|
384
|
+
collapseSiblings: true
|
|
385
|
+
})]
|
|
386
|
+
});
|
|
152
387
|
};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
children:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
children: ['Kapp', 'Form', 'Submission'].includes(scope) && bindify('kapp', KAPP_STATIC_BINDINGS, (0, _immutable.get)(kapp, 'kappAttributeDefinitions'))
|
|
167
|
-
})], ['Space', (0, _immutable.Map)({
|
|
168
|
-
children: bindify('space', SPACE_STATIC_BINDINGS, (0, _immutable.get)(space, 'spaceAttributeDefinitions'))
|
|
169
|
-
})], ['Submission', (0, _immutable.Map)({
|
|
170
|
-
children: ['Submission', 'Datastore Submission'].includes(scope) && bindify('submission', SUBMISSION_STATIC_BINDINGS)
|
|
171
|
-
})], ['Team', (0, _immutable.Map)({
|
|
172
|
-
children: scope === 'Team' && bindify('team', TEAM_STATIC_BINDINGS, (0, _immutable.get)(space, 'teamAttributeDefinitions'))
|
|
173
|
-
})], ['User', (0, _immutable.Map)({
|
|
174
|
-
children: scope === 'User' && bindify('user', USER_STATIC_BINDINGS, (0, _immutable.get)(space, 'userAttributeDefinitions'))
|
|
175
|
-
})], ['Values', (0, _immutable.Map)({
|
|
176
|
-
children: ['Submission', 'Datastore Submission'].includes(scope) && (form || kapp) && (0, _immutable.OrderedMap)((form ? form.get('fields') : kapp.get('fields')).map(function (field) {
|
|
177
|
-
return [field.get('name'), (0, _immutable.Map)({
|
|
178
|
-
value: "values('".concat(field.get('name'), "')"),
|
|
179
|
-
tags: []
|
|
180
|
-
})];
|
|
181
|
-
}))
|
|
182
|
-
})]]).filter(function (o) {
|
|
183
|
-
return o.get('children') && !o.get('children').isEmpty() || o.has('value');
|
|
388
|
+
|
|
389
|
+
// Converts integration data to code editor bindings
|
|
390
|
+
var buildIntegrationBindings = function buildIntegrationBindings(label, integrationName, integrationProperty, outputs) {
|
|
391
|
+
return (0, _immutable.Map)({
|
|
392
|
+
label: label,
|
|
393
|
+
type: 'function',
|
|
394
|
+
detail: 'Integration Result',
|
|
395
|
+
children: outputs.map(function (label) {
|
|
396
|
+
return (0, _immutable.Map)({
|
|
397
|
+
label: label,
|
|
398
|
+
section: "".concat(integrationName, " Integration") + (integrationProperty ? "\n\xA0\u2BA1 Properties of: ".concat(integrationProperty) : '')
|
|
399
|
+
});
|
|
400
|
+
})
|
|
184
401
|
});
|
|
185
402
|
};
|
|
186
403
|
var buildAgentPath = exports.buildAgentPath = function buildAgentPath(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kineticdata/react",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "A React library for the Kinetic Platform",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"prepublishOnly": "yarn build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"axios": "^1.
|
|
22
|
+
"axios": "^1.7.9",
|
|
23
23
|
"classnames": "^2.2.6",
|
|
24
24
|
"deepequal": "^0.0.1",
|
|
25
25
|
"draft-js": "^0.11.7",
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
"moment": "^2.29.4",
|
|
34
34
|
"prismjs": "1.29.0",
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
|
+
"qs": "^6.11.0",
|
|
36
37
|
"react-autosuggest": "^9.4.3",
|
|
38
|
+
"react-beautiful-dnd": "^11.0.5",
|
|
37
39
|
"react-popper": "^1.3.4",
|
|
38
40
|
"react-redux": "^8.1.3",
|
|
39
41
|
"reactstrap": "^9.2.0",
|
|
@@ -77,5 +79,5 @@
|
|
|
77
79
|
"classNameTemplate": "{classname}",
|
|
78
80
|
"titleTemplate": "{title}"
|
|
79
81
|
},
|
|
80
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "8ba251942ef9bd4e37a56d680afc6ff95fde4543"
|
|
81
83
|
}
|
package/proxyhelper.js
CHANGED
|
@@ -32,16 +32,24 @@ const defaultProxyLogger = ({
|
|
|
32
32
|
const proxyData = getProxyData(proxyRequest);
|
|
33
33
|
const originalData = getRequestData(originalRequest);
|
|
34
34
|
console.log(
|
|
35
|
-
`[proxy] [original] -> ${originalData.method}\t${
|
|
35
|
+
`[proxy] [original] -> ${originalData.method}\t${
|
|
36
|
+
originalData.scheme
|
|
37
|
+
}\t${originalData.host}\t${originalData.path}`,
|
|
36
38
|
);
|
|
37
39
|
console.log(
|
|
38
|
-
`[proxy] [proxied] -> ${proxyData.method}\t${proxyData.scheme}\t${
|
|
40
|
+
`[proxy] [proxied] -> ${proxyData.method}\t${proxyData.scheme}\t${
|
|
41
|
+
proxyData.host
|
|
42
|
+
}\t${proxyData.path}`,
|
|
39
43
|
);
|
|
40
44
|
} else if (proxyResponse) {
|
|
41
45
|
const responseData = getResponseData(proxyResponse);
|
|
42
46
|
const requestData = getRequestData(originalRequest);
|
|
43
47
|
console.log(
|
|
44
|
-
`[proxy] [original] <- ${responseData.statusCode}\t${
|
|
48
|
+
`[proxy] [original] <- ${responseData.statusCode}\t${
|
|
49
|
+
requestData.method
|
|
50
|
+
}\t${requestData.scheme}\t${requestData.host} (${responseData.host})\t${
|
|
51
|
+
requestData.path
|
|
52
|
+
}`,
|
|
45
53
|
);
|
|
46
54
|
}
|
|
47
55
|
} catch (e) {
|
|
@@ -56,6 +64,7 @@ const setupProxy = ({
|
|
|
56
64
|
target = process.env.REACT_APP_PROXY_HOST,
|
|
57
65
|
proxyLogger,
|
|
58
66
|
pathRewrite,
|
|
67
|
+
onlyTenant = false,
|
|
59
68
|
} = {}) => {
|
|
60
69
|
return {
|
|
61
70
|
target,
|
|
@@ -71,6 +80,7 @@ const setupProxy = ({
|
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
if (
|
|
83
|
+
!onlyTenant &&
|
|
74
84
|
process.env.REACT_APP_PROXY_SUBDOMAIN &&
|
|
75
85
|
!proxyRequest.path.endsWith('pack') &&
|
|
76
86
|
!proxyRequest.path.endsWith('favicon.ico')
|
|
@@ -112,6 +122,7 @@ const getProxyConfig = (
|
|
|
112
122
|
mainTarget = process.env.REACT_APP_PROXY_HOST,
|
|
113
123
|
loghubTarget = process.env.REACT_APP_LOGHUB_PROXY_HOST,
|
|
114
124
|
systemCoordinatorTarget = process.env.REACT_APP_SYS_COORDINATOR_PROXY_HOST,
|
|
125
|
+
integratorTarget = process.env.REACT_APP_INTEGRATOR_PROXY_HOST,
|
|
115
126
|
proxyLogger,
|
|
116
127
|
} = {},
|
|
117
128
|
) => {
|
|
@@ -160,6 +171,20 @@ const getProxyConfig = (
|
|
|
160
171
|
finalConfigs.push({ paths: ['/app/system-coordinator/**'], options });
|
|
161
172
|
}
|
|
162
173
|
|
|
174
|
+
if (integratorTarget) {
|
|
175
|
+
// If we're overriding the underlying Integrator host, bypass it in the main.
|
|
176
|
+
mainPaths.push('!/app/integrator/**');
|
|
177
|
+
const options = setupProxy({
|
|
178
|
+
target: integratorTarget,
|
|
179
|
+
proxyLogger,
|
|
180
|
+
pathRewrite: {
|
|
181
|
+
'^/app/integrator/': '/',
|
|
182
|
+
},
|
|
183
|
+
onlyTenant: true,
|
|
184
|
+
});
|
|
185
|
+
finalConfigs.push({ paths: ['/app/integrator/**'], options });
|
|
186
|
+
}
|
|
187
|
+
|
|
163
188
|
return finalConfigs.map(config => {
|
|
164
189
|
config.proxy = ({
|
|
165
190
|
paths = config.paths,
|