@kineticdata/react 6.1.1 → 7.0.0-rc1
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/lib/apis/core/authentication.js +241 -67
- package/lib/apis/core/authentication.test.js +360 -0
- package/lib/apis/core/customIndexes.js +102 -0
- package/lib/apis/core/customIndexes.test.js +276 -0
- package/lib/apis/core/oauthClients.js +33 -8
- package/lib/apis/index.js +12 -0
- package/lib/apis/system/index.js +16 -1
- package/lib/apis/task/index.js +1 -1
- package/lib/components/core/custom_index/CustomIndexForm.js +140 -0
- package/lib/components/core/custom_index/CustomIndexTable.js +98 -0
- package/lib/components/core/oauth_client/OAuthClientForm.js +246 -28
- package/lib/components/core/oauth_client/OAuthClientTable.js +77 -8
- package/lib/components/index.js +14 -0
- package/lib/components/integrator/operation/config_fields/http.js +1 -1
- package/lib/components/task/builder/helpers.js +3 -2
- package/lib/helpers/index.js +6 -1
- package/package.json +5 -5
|
@@ -8,12 +8,17 @@ var _immutable = require("immutable");
|
|
|
8
8
|
var _Form = require("../../form/Form");
|
|
9
9
|
var _apis = require("../../../apis");
|
|
10
10
|
var dataSources = function dataSources(_ref) {
|
|
11
|
-
var clientId = _ref.clientId
|
|
11
|
+
var clientId = _ref.clientId,
|
|
12
|
+
username = _ref.username,
|
|
13
|
+
me = _ref.me;
|
|
12
14
|
return {
|
|
13
15
|
client: {
|
|
14
16
|
fn: _apis.fetchOAuthClient,
|
|
15
17
|
params: clientId && [{
|
|
16
|
-
clientId: clientId
|
|
18
|
+
clientId: clientId,
|
|
19
|
+
username: username,
|
|
20
|
+
me: me,
|
|
21
|
+
include: 'details'
|
|
17
22
|
}],
|
|
18
23
|
transform: function transform(result) {
|
|
19
24
|
return result.client;
|
|
@@ -22,11 +27,21 @@ var dataSources = function dataSources(_ref) {
|
|
|
22
27
|
};
|
|
23
28
|
};
|
|
24
29
|
var handleSubmit = function handleSubmit(_ref2) {
|
|
25
|
-
var clientId = _ref2.clientId
|
|
30
|
+
var clientId = _ref2.clientId,
|
|
31
|
+
username = _ref2.username,
|
|
32
|
+
me = _ref2.me;
|
|
26
33
|
return function (values) {
|
|
34
|
+
var clientData = values.toJS();
|
|
35
|
+
// The UserField typeahead stores the full user object; extract the
|
|
36
|
+
// username string before sending to the API.
|
|
37
|
+
if (clientData.serviceUsername && typeof clientData.serviceUsername === 'object') {
|
|
38
|
+
clientData.serviceUsername = clientData.serviceUsername.username || '';
|
|
39
|
+
}
|
|
27
40
|
return (clientId ? _apis.updateOAuthClient : _apis.createOAuthClient)({
|
|
28
41
|
clientId: clientId,
|
|
29
|
-
|
|
42
|
+
username: username,
|
|
43
|
+
me: me,
|
|
44
|
+
client: clientData
|
|
30
45
|
}).then(function (_ref3) {
|
|
31
46
|
var client = _ref3.client,
|
|
32
47
|
error = _ref3.error;
|
|
@@ -37,10 +52,37 @@ var handleSubmit = function handleSubmit(_ref2) {
|
|
|
37
52
|
});
|
|
38
53
|
};
|
|
39
54
|
};
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
var isUserScoped = function isUserScoped(_ref4) {
|
|
56
|
+
var username = _ref4.username,
|
|
57
|
+
me = _ref4.me;
|
|
58
|
+
return !!username || !!me;
|
|
59
|
+
};
|
|
60
|
+
var UserScopedClientIdField = function UserScopedClientIdField(props) {
|
|
61
|
+
return props.visible && /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: "mb-3"
|
|
63
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
64
|
+
className: "form-label"
|
|
65
|
+
}, props.label), props.value ? /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: "form-control-plaintext"
|
|
67
|
+
}, props.value) : /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: "form-text text-muted"
|
|
69
|
+
}, "A Client ID will be generated automatically when this client is saved."));
|
|
70
|
+
};
|
|
71
|
+
var UserScopedClientSecretField = function UserScopedClientSecretField(props) {
|
|
72
|
+
return props.visible && /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "mb-3"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
75
|
+
className: "form-label"
|
|
76
|
+
}, props.label), /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: "form-text text-muted"
|
|
78
|
+
}, "A Client Secret will be generated automatically when this client is saved."));
|
|
79
|
+
};
|
|
80
|
+
var fields = function fields(_ref5) {
|
|
81
|
+
var clientId = _ref5.clientId,
|
|
82
|
+
username = _ref5.username,
|
|
83
|
+
me = _ref5.me;
|
|
84
|
+
return function (_ref6) {
|
|
85
|
+
var client = _ref6.client;
|
|
44
86
|
return (!clientId || client) && [{
|
|
45
87
|
name: 'name',
|
|
46
88
|
label: 'Name',
|
|
@@ -57,52 +99,228 @@ var fields = function fields(_ref4) {
|
|
|
57
99
|
name: 'clientId',
|
|
58
100
|
label: 'Client ID',
|
|
59
101
|
type: 'text',
|
|
60
|
-
required:
|
|
102
|
+
required: !isUserScoped({
|
|
103
|
+
username: username,
|
|
104
|
+
me: me
|
|
105
|
+
}),
|
|
106
|
+
enabled: !isUserScoped({
|
|
107
|
+
username: username,
|
|
108
|
+
me: me
|
|
109
|
+
}),
|
|
110
|
+
"transient": isUserScoped({
|
|
111
|
+
username: username,
|
|
112
|
+
me: me
|
|
113
|
+
}),
|
|
61
114
|
initialValue: (0, _immutable.get)(client, 'clientId') || '',
|
|
62
|
-
|
|
115
|
+
component: isUserScoped({
|
|
116
|
+
username: username,
|
|
117
|
+
me: me
|
|
118
|
+
}) ? UserScopedClientIdField : undefined,
|
|
119
|
+
helpText: !isUserScoped({
|
|
120
|
+
username: username,
|
|
121
|
+
me: me
|
|
122
|
+
}) ? 'A unique identifier for this client' : undefined,
|
|
123
|
+
pattern: !isUserScoped({
|
|
124
|
+
username: username,
|
|
125
|
+
me: me
|
|
126
|
+
}) ? /^[a-zA-Z0-9-]+$/ : undefined,
|
|
127
|
+
patternMessage: 'Client ID may only contain letters, numbers, or hyphens.',
|
|
128
|
+
constraint: function constraint(_ref7) {
|
|
129
|
+
var values = _ref7.values;
|
|
130
|
+
return !['system', 'system-dev'].includes(values.get('clientId'));
|
|
131
|
+
},
|
|
132
|
+
constraintMessage: 'Client ID may not be set to a reserved value.'
|
|
63
133
|
}, {
|
|
64
134
|
name: 'clientSecret',
|
|
65
135
|
label: 'Client Secret',
|
|
66
136
|
type: 'password',
|
|
67
|
-
|
|
68
|
-
|
|
137
|
+
// User-scoped create: show informational text
|
|
138
|
+
// User-scoped edit: hidden (replaced by external reset button)
|
|
139
|
+
// Non-user-scoped: standard secret field toggled by changeClientSecret
|
|
140
|
+
visible: isUserScoped({
|
|
141
|
+
username: username,
|
|
142
|
+
me: me
|
|
143
|
+
}) ? !clientId : function (_ref8) {
|
|
144
|
+
var values = _ref8.values;
|
|
69
145
|
return values.get('changeClientSecret');
|
|
70
146
|
},
|
|
71
|
-
required:
|
|
72
|
-
|
|
147
|
+
required: isUserScoped({
|
|
148
|
+
username: username,
|
|
149
|
+
me: me
|
|
150
|
+
}) ? false : function (_ref9) {
|
|
151
|
+
var values = _ref9.values;
|
|
73
152
|
return values.get('changeClientSecret');
|
|
74
153
|
},
|
|
75
|
-
"transient":
|
|
76
|
-
|
|
154
|
+
"transient": isUserScoped({
|
|
155
|
+
username: username,
|
|
156
|
+
me: me
|
|
157
|
+
}) ? true : function (_ref10) {
|
|
158
|
+
var values = _ref10.values;
|
|
77
159
|
return !values.get('changeClientSecret');
|
|
78
|
-
}
|
|
160
|
+
},
|
|
161
|
+
component: isUserScoped({
|
|
162
|
+
username: username,
|
|
163
|
+
me: me
|
|
164
|
+
}) && !clientId ? UserScopedClientSecretField : undefined
|
|
79
165
|
}, {
|
|
80
166
|
name: 'changeClientSecret',
|
|
81
167
|
label: 'Change Client Secret',
|
|
82
168
|
type: 'checkbox',
|
|
83
169
|
"transient": true,
|
|
84
|
-
//
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
170
|
+
// User-scoped: always hidden (create uses auto-gen, edit uses reset)
|
|
171
|
+
// Non-user-scoped edit: visible toggle
|
|
172
|
+
// Non-user-scoped create: hidden, defaults to true
|
|
173
|
+
visible: isUserScoped({
|
|
174
|
+
username: username,
|
|
175
|
+
me: me
|
|
176
|
+
}) ? false : !!clientId,
|
|
177
|
+
initialValue: isUserScoped({
|
|
178
|
+
username: username,
|
|
179
|
+
me: me
|
|
180
|
+
}) ? false : !clientId,
|
|
181
|
+
onChange: function onChange(_ref11, _ref12) {
|
|
182
|
+
var values = _ref11.values;
|
|
183
|
+
var setValue = _ref12.setValue;
|
|
90
184
|
if (values.get('clientSecret') !== '') {
|
|
91
185
|
setValue('clientSecret', '');
|
|
92
186
|
}
|
|
93
187
|
}
|
|
94
188
|
}, {
|
|
95
|
-
name: '
|
|
96
|
-
label: '
|
|
189
|
+
name: 'clientType',
|
|
190
|
+
label: 'Client Type',
|
|
191
|
+
type: 'select',
|
|
192
|
+
required: true,
|
|
193
|
+
initialValue: (0, _immutable.get)(client, 'clientType') || '',
|
|
194
|
+
options: [{
|
|
195
|
+
label: 'Confidential',
|
|
196
|
+
value: 'confidential'
|
|
197
|
+
}, {
|
|
198
|
+
label: 'Public',
|
|
199
|
+
value: 'public'
|
|
200
|
+
}],
|
|
201
|
+
helpText: 'Determines authentication methods, grant types, and proof key requirements'
|
|
202
|
+
}, {
|
|
203
|
+
name: 'serviceUsername',
|
|
204
|
+
label: 'Service User',
|
|
97
205
|
type: 'text',
|
|
206
|
+
required: false,
|
|
207
|
+
visible: !isUserScoped({
|
|
208
|
+
username: username,
|
|
209
|
+
me: me
|
|
210
|
+
}),
|
|
211
|
+
initialValue: (0, _immutable.get)(client, 'serviceUsername') ? (0, _immutable.Map)({
|
|
212
|
+
username: (0, _immutable.get)(client, 'serviceUsername')
|
|
213
|
+
}) : '',
|
|
214
|
+
helpText: 'Optional user whose identity this client acts on behalf of'
|
|
215
|
+
}, {
|
|
216
|
+
name: 'redirectUris',
|
|
217
|
+
label: 'Redirect URIs',
|
|
218
|
+
type: 'text-multi',
|
|
98
219
|
required: true,
|
|
99
|
-
initialValue: (0, _immutable.get)(client, '
|
|
100
|
-
helpText: '
|
|
220
|
+
initialValue: (0, _immutable.get)(client, 'redirectUris') || [],
|
|
221
|
+
helpText: 'Allowed redirect URIs for this client'
|
|
222
|
+
}, {
|
|
223
|
+
name: 'scopes',
|
|
224
|
+
label: 'Scopes',
|
|
225
|
+
type: 'checkbox-multi',
|
|
226
|
+
initialValue: (0, _immutable.get)(client, 'scopes') || [],
|
|
227
|
+
options: [{
|
|
228
|
+
label: 'Full',
|
|
229
|
+
value: 'full'
|
|
230
|
+
}, {
|
|
231
|
+
label: 'Read',
|
|
232
|
+
value: 'read'
|
|
233
|
+
}, {
|
|
234
|
+
label: 'Write',
|
|
235
|
+
value: 'write'
|
|
236
|
+
}, {
|
|
237
|
+
label: 'Admin',
|
|
238
|
+
value: 'admin'
|
|
239
|
+
}, {
|
|
240
|
+
label: 'Submissions',
|
|
241
|
+
value: 'submissions'
|
|
242
|
+
}, {
|
|
243
|
+
label: 'Submissions: Read',
|
|
244
|
+
value: 'submissions:read'
|
|
245
|
+
}],
|
|
246
|
+
helpText: 'OAuth scopes this client can request'
|
|
247
|
+
}, {
|
|
248
|
+
name: 'requireConsent',
|
|
249
|
+
label: 'Require Consent',
|
|
250
|
+
type: 'checkbox',
|
|
251
|
+
initialValue: (0, _immutable.get)(client, 'requireConsent') || false,
|
|
252
|
+
helpText: 'Require user consent before granting access to this client'
|
|
253
|
+
}, {
|
|
254
|
+
name: 'logoUri',
|
|
255
|
+
label: 'Logo URI',
|
|
256
|
+
type: 'text',
|
|
257
|
+
required: false,
|
|
258
|
+
initialValue: (0, _immutable.get)(client, 'logoUri') || '',
|
|
259
|
+
helpText: 'URL to client logo displayed on consent screen'
|
|
260
|
+
}, {
|
|
261
|
+
name: 'clientAuthenticationMethods',
|
|
262
|
+
label: 'Client Authentication Methods',
|
|
263
|
+
type: 'checkbox-multi',
|
|
264
|
+
initialValue: (0, _immutable.get)(client, 'clientAuthenticationMethods') || [],
|
|
265
|
+
options: [{
|
|
266
|
+
label: 'Client Secret Basic',
|
|
267
|
+
value: 'client_secret_basic'
|
|
268
|
+
}, {
|
|
269
|
+
label: 'Client Secret Post',
|
|
270
|
+
value: 'client_secret_post'
|
|
271
|
+
}, {
|
|
272
|
+
label: 'None',
|
|
273
|
+
value: 'none'
|
|
274
|
+
}]
|
|
275
|
+
}, {
|
|
276
|
+
name: 'authorizationGrantTypes',
|
|
277
|
+
label: 'Authorization Grant Types',
|
|
278
|
+
type: 'checkbox-multi',
|
|
279
|
+
initialValue: (0, _immutable.get)(client, 'authorizationGrantTypes') || [],
|
|
280
|
+
options: [{
|
|
281
|
+
label: 'Authorization Code',
|
|
282
|
+
value: 'authorization_code'
|
|
283
|
+
}, {
|
|
284
|
+
label: 'Client Credentials',
|
|
285
|
+
value: 'client_credentials'
|
|
286
|
+
}]
|
|
287
|
+
}, {
|
|
288
|
+
name: 'requireProofKey',
|
|
289
|
+
label: 'Require Proof Key',
|
|
290
|
+
type: 'checkbox',
|
|
291
|
+
initialValue: (0, _immutable.get)(client, 'requireProofKey') || false
|
|
292
|
+
}, {
|
|
293
|
+
name: 'enabled',
|
|
294
|
+
label: 'Enabled',
|
|
295
|
+
type: 'checkbox',
|
|
296
|
+
initialValue: (0, _immutable.get)(client, 'enabled') !== false,
|
|
297
|
+
helpText: 'Whether this client is currently enabled'
|
|
298
|
+
}, {
|
|
299
|
+
name: 'dynamicallyRegistered',
|
|
300
|
+
label: 'Dynamically Registered',
|
|
301
|
+
type: 'checkbox',
|
|
302
|
+
"transient": true,
|
|
303
|
+
enabled: false,
|
|
304
|
+
initialValue: (0, _immutable.get)(client, 'dynamicallyRegistered') || false
|
|
305
|
+
}, {
|
|
306
|
+
name: 'lastUsedAt',
|
|
307
|
+
label: 'Last Used',
|
|
308
|
+
type: 'text',
|
|
309
|
+
"transient": true,
|
|
310
|
+
enabled: false,
|
|
311
|
+
initialValue: (0, _immutable.get)(client, 'lastUsedAt') || ''
|
|
312
|
+
}, {
|
|
313
|
+
name: 'expiresAt',
|
|
314
|
+
label: 'Expires',
|
|
315
|
+
type: 'text',
|
|
316
|
+
"transient": true,
|
|
317
|
+
enabled: false,
|
|
318
|
+
initialValue: (0, _immutable.get)(client, 'expiresAt') || ''
|
|
101
319
|
}];
|
|
102
320
|
};
|
|
103
321
|
};
|
|
104
322
|
var OAuthClientForm = exports.OAuthClientForm = (0, _Form.generateForm)({
|
|
105
|
-
formOptions: ['clientId'],
|
|
323
|
+
formOptions: ['clientId', 'username', 'me'],
|
|
106
324
|
dataSources: dataSources,
|
|
107
325
|
fields: fields,
|
|
108
326
|
handleSubmit: handleSubmit
|
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.OAuthClientTable = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
10
|
var _Table = require("../../table/Table");
|
|
8
11
|
var _apis = require("../../../apis");
|
|
9
12
|
var _helpers = require("../../../helpers");
|
|
10
|
-
var
|
|
13
|
+
var BooleanYesNoCell = function BooleanYesNoCell(_ref) {
|
|
14
|
+
var value = _ref.value;
|
|
15
|
+
return /*#__PURE__*/_react["default"].createElement("td", null, value ? 'Yes' : 'No');
|
|
16
|
+
};
|
|
17
|
+
var clientSide = (0, _helpers.defineFilter)(true).startsWith('name', 'name').equals('dynamicallyRegistered', 'dynamicallyRegistered').equals('enabled', 'enabled').end();
|
|
11
18
|
var dataSource = function dataSource() {
|
|
19
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
20
|
+
username = _ref2.username,
|
|
21
|
+
me = _ref2.me;
|
|
12
22
|
return {
|
|
13
23
|
fn: _apis.fetchOAuthClients,
|
|
14
24
|
clientSide: clientSide,
|
|
15
25
|
params: function params() {
|
|
16
|
-
return [
|
|
26
|
+
return username || me ? [{
|
|
27
|
+
username: username,
|
|
28
|
+
me: me,
|
|
29
|
+
include: 'details'
|
|
30
|
+
}] : [{
|
|
31
|
+
include: 'details'
|
|
32
|
+
}];
|
|
17
33
|
},
|
|
18
34
|
transform: function transform(result) {
|
|
19
35
|
return {
|
|
20
|
-
data: result.oauthClients
|
|
36
|
+
data: result.oauthClients.map(function (client) {
|
|
37
|
+
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, client), {}, {
|
|
38
|
+
dynamicallyRegistered: !!client.dynamicallyRegistered
|
|
39
|
+
});
|
|
40
|
+
})
|
|
21
41
|
};
|
|
22
42
|
}
|
|
23
43
|
};
|
|
@@ -28,6 +48,28 @@ var filters = function filters() {
|
|
|
28
48
|
name: 'name',
|
|
29
49
|
label: 'Name',
|
|
30
50
|
type: 'text'
|
|
51
|
+
}, {
|
|
52
|
+
name: 'dynamicallyRegistered',
|
|
53
|
+
label: 'Dynamically Registered',
|
|
54
|
+
type: 'select',
|
|
55
|
+
options: [{
|
|
56
|
+
label: 'Yes',
|
|
57
|
+
value: 'true'
|
|
58
|
+
}, {
|
|
59
|
+
label: 'No',
|
|
60
|
+
value: 'false'
|
|
61
|
+
}]
|
|
62
|
+
}, {
|
|
63
|
+
name: 'enabled',
|
|
64
|
+
label: 'Enabled',
|
|
65
|
+
type: 'select',
|
|
66
|
+
options: [{
|
|
67
|
+
label: 'Yes',
|
|
68
|
+
value: 'true'
|
|
69
|
+
}, {
|
|
70
|
+
label: 'No',
|
|
71
|
+
value: 'false'
|
|
72
|
+
}]
|
|
31
73
|
}];
|
|
32
74
|
};
|
|
33
75
|
};
|
|
@@ -35,20 +77,47 @@ var columns = [{
|
|
|
35
77
|
value: 'clientId',
|
|
36
78
|
title: 'Client ID',
|
|
37
79
|
sortable: true
|
|
80
|
+
}, {
|
|
81
|
+
value: 'name',
|
|
82
|
+
title: 'Name',
|
|
83
|
+
sortable: true
|
|
38
84
|
}, {
|
|
39
85
|
value: 'description',
|
|
40
86
|
title: 'Description',
|
|
41
87
|
sortable: false
|
|
42
88
|
}, {
|
|
43
|
-
value: '
|
|
44
|
-
title: '
|
|
89
|
+
value: 'clientType',
|
|
90
|
+
title: 'Client Type',
|
|
45
91
|
sortable: true
|
|
46
92
|
}, {
|
|
47
|
-
value: '
|
|
48
|
-
title: '
|
|
49
|
-
sortable: true
|
|
93
|
+
value: 'dynamicallyRegistered',
|
|
94
|
+
title: 'DCR',
|
|
95
|
+
sortable: true,
|
|
96
|
+
toggleable: true,
|
|
97
|
+
components: {
|
|
98
|
+
BodyCell: BooleanYesNoCell
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
value: 'enabled',
|
|
102
|
+
title: 'Enabled',
|
|
103
|
+
sortable: true,
|
|
104
|
+
toggleable: true,
|
|
105
|
+
components: {
|
|
106
|
+
BodyCell: BooleanYesNoCell
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
value: 'lastUsedAt',
|
|
110
|
+
title: 'Last Used',
|
|
111
|
+
sortable: true,
|
|
112
|
+
toggleable: true
|
|
113
|
+
}, {
|
|
114
|
+
value: 'expiresAt',
|
|
115
|
+
title: 'Expires',
|
|
116
|
+
sortable: true,
|
|
117
|
+
toggleable: true
|
|
50
118
|
}];
|
|
51
119
|
var OAuthClientTable = exports.OAuthClientTable = (0, _Table.generateTable)({
|
|
120
|
+
tableOptions: ['username', 'me'],
|
|
52
121
|
columns: columns,
|
|
53
122
|
filters: filters,
|
|
54
123
|
dataSource: dataSource
|
package/lib/components/index.js
CHANGED
|
@@ -171,6 +171,18 @@ Object.defineProperty(exports, "CreateManualTriggerForm", {
|
|
|
171
171
|
return _CreateManualTriggerForm.CreateManualTriggerForm;
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
+
Object.defineProperty(exports, "CustomIndexForm", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function get() {
|
|
177
|
+
return _CustomIndexForm.CustomIndexForm;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "CustomIndexTable", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function get() {
|
|
183
|
+
return _CustomIndexTable.CustomIndexTable;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
174
186
|
Object.defineProperty(exports, "DatastoreSubmissionTable", {
|
|
175
187
|
enumerable: true,
|
|
176
188
|
get: function get() {
|
|
@@ -1111,6 +1123,8 @@ var _I18n = require("./core/i18n/I18n");
|
|
|
1111
1123
|
var _Moment = require("./core/i18n/Moment");
|
|
1112
1124
|
var _I18nProvider = require("./core/i18n/I18nProvider");
|
|
1113
1125
|
var _CoreForm = require("./core/core_form/CoreForm");
|
|
1126
|
+
var _CustomIndexForm = require("./core/custom_index/CustomIndexForm");
|
|
1127
|
+
var _CustomIndexTable = require("./core/custom_index/CustomIndexTable");
|
|
1114
1128
|
var _IndexDefinitionForm = require("./core/index_definition/IndexDefinitionForm");
|
|
1115
1129
|
var _IndexDefinitionTable = require("./core/index_definition/IndexDefinitionTable");
|
|
1116
1130
|
var _IndexJobTable = require("./core/index_job/IndexJobTable");
|
|
@@ -110,7 +110,7 @@ var generateHttpOperationConfigFields = exports.generateHttpOperationConfigField
|
|
|
110
110
|
// { label: 'Multipart', value: 'multipart_form' },
|
|
111
111
|
],
|
|
112
112
|
|
|
113
|
-
initialValue: (0, _immutable.getIn)(config, ['body', 'bodyType']) || '
|
|
113
|
+
initialValue: (0, _immutable.getIn)(config, ['body', 'bodyType']) || 'raw'
|
|
114
114
|
}, {
|
|
115
115
|
name: 'body.form',
|
|
116
116
|
label: 'Form Body',
|
|
@@ -174,6 +174,7 @@ var buildBindings = exports.buildBindings = function buildBindings(_ref6) {
|
|
|
174
174
|
connections = _ref6.connections,
|
|
175
175
|
node = _ref6.node;
|
|
176
176
|
var Results = tree.nodes.reduce(function (results, node) {
|
|
177
|
+
if (!node.name) return results;
|
|
177
178
|
var isIntegration = node.definitionId.startsWith("".concat(_constants.ADVANCED_HANDLER_NAME_INTEGRATION, "_v"));
|
|
178
179
|
if (isIntegration) {
|
|
179
180
|
var _node$parameters$find, _node$parameters$find2;
|
|
@@ -184,13 +185,13 @@ var buildBindings = exports.buildBindings = function buildBindings(_ref6) {
|
|
|
184
185
|
})) === null || _node$parameters$find2 === void 0 ? void 0 : _node$parameters$find2.value, 'outputs']);
|
|
185
186
|
if (outputs) {
|
|
186
187
|
return results.set(node.name, outputs.reduce(function (res, _, name) {
|
|
187
|
-
return res.set(name, "@results['".concat(node.name, "']['").concat(name, "']"));
|
|
188
|
+
return res.set(name, "<%= @results['".concat(node.name, "']['").concat(name, "'] %>"));
|
|
188
189
|
}, (0, _immutable.Map)()));
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
192
|
var task = tasks.get(node.definitionId);
|
|
192
193
|
return results.set(node.name, (task && (task.results || task.outputs) || []).reduce(function (res, output) {
|
|
193
|
-
return res.set(output.name, "@results['".concat(node.name, "']['").concat(output.name, "']"));
|
|
194
|
+
return res.set(output.name, "<%= @results['".concat(node.name, "']['").concat(output.name, "'] %>"));
|
|
194
195
|
}, (0, _immutable.Map)()));
|
|
195
196
|
}, (0, _immutable.Map)()).filter(function (results) {
|
|
196
197
|
return !results.isEmpty();
|
package/lib/helpers/index.js
CHANGED
|
@@ -17,10 +17,11 @@ var _exportNames = {
|
|
|
17
17
|
handleFormErrors: true,
|
|
18
18
|
INDEX_STATIC_PARTS: true,
|
|
19
19
|
TIMELINES: true,
|
|
20
|
+
CUSTOM_INDEX_PROPERTIES: true,
|
|
20
21
|
MAX_PART_LENGTH: true,
|
|
21
22
|
usePrevious: true
|
|
22
23
|
};
|
|
23
|
-
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;
|
|
24
|
+
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 = exports.CUSTOM_INDEX_PROPERTIES = void 0;
|
|
24
25
|
exports.usePrevious = usePrevious;
|
|
25
26
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
26
27
|
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toArray"));
|
|
@@ -419,6 +420,10 @@ var handleFormErrors = exports.handleFormErrors = function handleFormErrors(key)
|
|
|
419
420
|
};
|
|
420
421
|
var INDEX_STATIC_PARTS = exports.INDEX_STATIC_PARTS = ['closedBy', 'coreState', 'createdBy', 'handle', 'submittedBy', 'type', 'updatedBy'].sort();
|
|
421
422
|
var TIMELINES = exports.TIMELINES = ['createdAt', 'updatedAt', 'submittedAt', 'closedAt'].sort();
|
|
423
|
+
|
|
424
|
+
// Postgres custom-index property allowlist. Snake-case, server-canonical.
|
|
425
|
+
// Disjoint from INDEX_STATIC_PARTS (Cassandra-era, camelCase).
|
|
426
|
+
var CUSTOM_INDEX_PROPERTIES = exports.CUSTOM_INDEX_PROPERTIES = ['closed_at', 'core_state', 'created_at', 'label', 'submitted_at', 'submitted_by', 'updated_at'];
|
|
422
427
|
var MAX_PART_LENGTH = exports.MAX_PART_LENGTH = 10;
|
|
423
428
|
function usePrevious(value) {
|
|
424
429
|
// The ref object is a generic container whose current property is mutable ...
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kineticdata/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-rc1",
|
|
4
4
|
"description": "A React library for the Kinetic Platform",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
"prepublishOnly": "yarn build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"axios": "1.
|
|
22
|
+
"axios": "^1.15.2",
|
|
23
23
|
"classnames": "^2.2.6",
|
|
24
24
|
"deepequal": "^0.0.1",
|
|
25
25
|
"draft-js": "^0.11.7",
|
|
26
26
|
"history": "^4.9.0",
|
|
27
|
-
"immutable": "4.
|
|
27
|
+
"immutable": "4.3.8",
|
|
28
28
|
"kld-intersections": "^0.7.0",
|
|
29
|
-
"lodash-es": "^4.
|
|
29
|
+
"lodash-es": "^4.18.1",
|
|
30
30
|
"lodash.isplainobject": "^4.0.6",
|
|
31
31
|
"lodash.isstring": "^4.0.1",
|
|
32
32
|
"modularscale-sass": "^3.0.8",
|
|
33
33
|
"moment": "^2.29.4",
|
|
34
34
|
"prismjs": "1.30.0",
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
|
-
"qs": "^6.
|
|
36
|
+
"qs": "^6.14.2",
|
|
37
37
|
"react-autosuggest": "^9.4.3",
|
|
38
38
|
"react-beautiful-dnd": "^11.0.5",
|
|
39
39
|
"react-popper": "^1.3.4",
|