@kineticdata/react 6.0.4 → 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.
Files changed (100) hide show
  1. package/CHANGELOG.md +116 -86
  2. package/lib/apis/core/attributeDefinitions.js +9 -6
  3. package/lib/apis/core/integrations.js +61 -0
  4. package/lib/apis/core/submissions.js +52 -15
  5. package/lib/apis/http.js +16 -2
  6. package/lib/apis/index.js +24 -0
  7. package/lib/apis/integrator/index.js +262 -0
  8. package/lib/apis/system/index.js +64 -12
  9. package/lib/apis/task/index.js +9 -2
  10. package/lib/components/agent/filestore/FilestoreForm.js +1 -1
  11. package/lib/components/common/AttributeSelect.js +10 -2
  12. package/lib/components/common/BridgeSelect.js +2 -1
  13. package/lib/components/common/ConnectionSelect.js +72 -0
  14. package/lib/components/common/FormSelect.js +2 -1
  15. package/lib/components/common/StaticSelect.js +15 -6
  16. package/lib/components/common/TableInput.js +4 -1
  17. package/lib/components/common/TeamSelect.js +2 -1
  18. package/lib/components/common/ToastContainer.js +34 -10
  19. package/lib/components/common/Typeahead.js +59 -23
  20. package/lib/components/common/UserSelect.js +2 -1
  21. package/lib/components/common/authentication/RequestInterceptor.js +1 -1
  22. package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +3 -0
  23. package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
  24. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
  25. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
  26. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
  27. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
  28. package/lib/components/core/category/CategoryForm.js +4 -1
  29. package/lib/components/core/category/CategoryTable.js +2 -2
  30. package/lib/components/core/core_form/CoreForm.js +18 -10
  31. package/lib/components/core/file_resource/FileResourceForm.js +2 -1
  32. package/lib/components/core/file_resource/FileResourceTable.js +14 -7
  33. package/lib/components/core/form/FormForm.js +42 -19
  34. package/lib/components/core/form/FormTable.js +14 -14
  35. package/lib/components/core/form_type/FormTypeForm.js +3 -0
  36. package/lib/components/core/i18n/Moment.js +1 -0
  37. package/lib/components/core/integration/IntegrationForm.js +232 -0
  38. package/lib/components/core/integration/IntegrationTable.js +139 -0
  39. package/lib/components/core/kapp/KappForm.js +56 -67
  40. package/lib/components/core/kapp/KappTable.js +3 -3
  41. package/lib/components/core/log/LogTable.js +1 -1
  42. package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
  43. package/lib/components/core/space/SpaceForm.js +97 -111
  44. package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
  45. package/lib/components/core/submission/FormSubmissionTable.js +12 -7
  46. package/lib/components/core/submission/KappSubmissionTable.js +4 -4
  47. package/lib/components/core/submission/SubmissionForm.js +3 -1
  48. package/lib/components/core/team/TeamTable.js +17 -7
  49. package/lib/components/core/user/UserTable.js +18 -18
  50. package/lib/components/core/webapi/WebApiForm.js +5 -2
  51. package/lib/components/core/webapi/WebApiTable.js +2 -2
  52. package/lib/components/core/webhook/WebhookForm.js +43 -33
  53. package/lib/components/core/webhook/WebhookTable.js +16 -16
  54. package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
  55. package/lib/components/form/Form.helpers.js +10 -4
  56. package/lib/components/form/Form.js +250 -168
  57. package/lib/components/form/Form.models.js +6 -1
  58. package/lib/components/form/FormState.js +9 -5
  59. package/lib/components/form/defaults/CodeField.js +44 -1
  60. package/lib/components/index.js +84 -3
  61. package/lib/components/integrator/connection/ConnectionForm.js +112 -0
  62. package/lib/components/integrator/connection/ConnectionTable.js +80 -0
  63. package/lib/components/integrator/connection/config_fields/http.js +570 -0
  64. package/lib/components/integrator/integrationTypes.js +98 -0
  65. package/lib/components/integrator/operation/OperationForm.js +128 -0
  66. package/lib/components/integrator/operation/OperationTable.js +64 -0
  67. package/lib/components/integrator/operation/config_fields/http.js +184 -0
  68. package/lib/components/system/SystemSecurityForm.js +1 -1
  69. package/lib/components/system/SystemTaskAdapterForm.js +9 -9
  70. package/lib/components/system/helpers.js +123 -100
  71. package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
  72. package/lib/components/system/spaces/SystemTenantForm.js +276 -104
  73. package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
  74. package/lib/components/system/spaces/SystemTenantTable.js +20 -16
  75. package/lib/components/table/Table.redux.js +1 -1
  76. package/lib/components/task/builder/ConnectorForm.js +11 -7
  77. package/lib/components/task/builder/Node.js +11 -2
  78. package/lib/components/task/builder/NodeForm.js +93 -22
  79. package/lib/components/task/builder/NodeParametersForm.js +29 -17
  80. package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
  81. package/lib/components/task/builder/TreeBuilder.js +32 -5
  82. package/lib/components/task/builder/builder.redux.js +399 -205
  83. package/lib/components/task/builder/constants.js +10 -2
  84. package/lib/components/task/builder/helpers.js +199 -79
  85. package/lib/components/task/builder/models.js +11 -9
  86. package/lib/components/task/category/TaskCategoryTable.js +3 -3
  87. package/lib/components/task/common/UsageTable.js +1 -1
  88. package/lib/components/task/handlers/HandlerTable.js +35 -19
  89. package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
  90. package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
  91. package/lib/components/task/runs/RunTable.js +4 -4
  92. package/lib/components/task/runs/RunTaskTable.js +1 -1
  93. package/lib/components/task/sources/SourceTable.js +2 -2
  94. package/lib/components/task/triggers/TriggerTable.js +2 -2
  95. package/lib/components/task/workflows/LinkedWorkflowTable.js +2 -2
  96. package/lib/components/task/workflows/WorkflowForm.js +29 -9
  97. package/lib/components/task/workflows/WorkflowTable.js +2 -2
  98. package/lib/helpers/index.js +289 -72
  99. package/package.json +5 -3
  100. package/proxyhelper.js +28 -3
@@ -13,7 +13,7 @@ var ORDER_BY = (0, _immutable.Map)({
13
13
  tree: 'tree.name',
14
14
  type: 'tree.type'
15
15
  });
16
- var RUN_TYPES = ['Tree', 'Global Routine', 'Local Routine'].map(function (v) {
16
+ var RUN_TYPES = ['Tree', 'Global Routine'].map(function (v) {
17
17
  return {
18
18
  label: v,
19
19
  value: v
@@ -125,7 +125,7 @@ var filters = function filters() {
125
125
  };
126
126
  var columns = [{
127
127
  value: 'id',
128
- title: 'Id',
128
+ title: 'ID',
129
129
  sortable: true,
130
130
  toggleable: false,
131
131
  columnOrder: 'first'
@@ -178,7 +178,7 @@ var columns = [{
178
178
  toggleable: true
179
179
  }, {
180
180
  value: 'createdAt',
181
- title: 'Created',
181
+ title: 'Created At',
182
182
  sortable: true,
183
183
  toggleable: true
184
184
  }, {
@@ -188,7 +188,7 @@ var columns = [{
188
188
  toggleable: true
189
189
  }, {
190
190
  value: 'updatedAt',
191
- title: 'Updated',
191
+ title: 'Updated At',
192
192
  sortable: true,
193
193
  toggleable: true
194
194
  }, {
@@ -51,7 +51,7 @@ var columns = [{
51
51
  sortable: true
52
52
  }, {
53
53
  value: 'createdAt',
54
- title: 'Created',
54
+ title: 'Created At',
55
55
  sortable: true
56
56
  }];
57
57
  var RunTaskTable = exports.RunTaskTable = (0, _.generateTable)({
@@ -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 = 'formAttributeDefinitions,spaceAttributeDefinitions,teamAttributeDefinitions,userAttributeDefinitions,userProfileAttributeDefinitions';
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,8 +147,8 @@ var fields = function fields(_ref5) {
147
147
  name: 'filter',
148
148
  label: 'Filter',
149
149
  type: 'code',
150
- language: 'js',
151
- initialValue: workflow ? workflow.get('filter') : '',
150
+ language: 'js-expression',
151
+ initialValue: workflow && workflow.get('filter') || '',
152
152
  required: false,
153
153
  // use event to show filter on linked workflows
154
154
  visible: workflow && !!workflow.get('event'),
@@ -156,13 +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 = ['File Resource', 'Kapp', 'Form', 'Submission', 'Team', 'User'].find(function (scope) {
160
- return values.get('event').includes(scope);
159
+ var type = ['Space', 'Team', 'User', 'Form', 'Submission'].find(function (type) {
160
+ var _values$get;
161
+ return (_values$get = values.get('event')) === null || _values$get === void 0 ? void 0 : _values$get.startsWith(type);
161
162
  });
162
- return (0, _helpers.buildBindings)({
163
- space: space,
164
- kapp: kapp,
165
- scope: type
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
+ }
166
186
  });
167
187
  }
168
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
  }, {
@@ -12,16 +12,18 @@ var _exportNames = {
12
12
  generateKey: true,
13
13
  slugify: true,
14
14
  buildDefinitionId: true,
15
- buildBindings: true,
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.buildBindings = exports.buildAgentPath = exports.TIMELINES = exports.MAX_PART_LENGTH = exports.K = exports.INDEX_STATIC_PARTS = void 0;
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 FILE_STATIC_BINDINGS = [['Folder', 'folder'], ['Name', 'name'], ['Path', 'path']];
108
- var SUBMISSION_STATIC_BINDINGS = [['Anonymous', 'anonymous'], ['Closed At', 'closedAt'], ['Closed By', 'closedBy'], ['Core State', 'coreState'], ['Created At', 'createdAt'], ['Created By', 'createdBy'], ['Current Page', 'currentPage'], ['Id', 'id'], ['Session Token', 'sessionToken'], ['Submitted At', 'submittedAt'], ['Submitted By', 'submittedBy'], ['Type', 'type'], ['Updated At', 'updatedAt'], ['Updated By', 'updatedBy']];
109
- var TEAM_STATIC_BINDINGS = [['Name', 'name'], ['Slug', 'slug']];
110
- var USER_STATIC_BINDINGS = [['Display Name', 'displayName'], ['Email', 'email'], ['Invited By', 'invitedBy'], ['Space Admin', 'spaceAdmin'], ['Username', 'username']];
111
- var FORM_STATIC_BINDINGS = [['Name', 'name'], ['Slug', 'slug']];
112
- var KAPP_STATIC_BINDINGS = [['Name', 'name'], ['Slug', 'slug']];
113
- var SPACE_STATIC_BINDINGS = [['Name', 'name'], ['Slug', 'slug']];
114
- var IDENTITY_STATIC_BINDINGS = [['Username', 'username'], ['Display Name', 'displayName'], ['Email Address', 'email'], ['Groups', 'groups'], ['Session Token', 'sessionToken'], ['Is Anonymous?', 'anonymous'], ['Is Authenticated?', 'authenticated'], ['Is Space Admin?', 'spaceAdmin']];
115
- var bindifyProfile = function bindifyProfile(fnName, staticMap, attributes, profileAttributes) {
116
- var attributeTag = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'Attribute';
117
- var profileAttributeTag = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'Profile Attribute';
118
- var attributesMap = attributes.map(function (value, label) {
119
- return (0, _immutable.Map)({
120
- value: "".concat(fnName, "('attribute:").concat(label, "')"),
121
- tags: [attributeTag]
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
- var profileAttributesMap = profileAttributes.map(function (value, label) {
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
- value: "".concat(fnName, "('profileAttribute:").concat(label, "')"),
127
- tags: [profileAttributeTag]
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
- var combinedMap = (0, _immutable.OrderedMap)(staticMap).merge(attributesMap).merge(profileAttributesMap);
131
- return combinedMap.map(function (value) {
132
- return (0, _immutable.Map)({
133
- value: _immutable.Map.isMap(value) ? value.get('value') : "".concat(fnName, "('").concat(value, "')"),
134
- tags: []
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
- var bindify = function bindify(fnName, staticMap) {
139
- var attributeDefinitions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (0, _immutable.List)();
140
- var attributeTag = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'Attribute';
141
- return attributeDefinitions.reduce(function (reduction, attrDef) {
142
- return reduction.set(attrDef.get('name'), (0, _immutable.Map)({
143
- value: "".concat(fnName, "('attribute:").concat(attrDef.get('name'), "')"),
144
- tags: [attributeTag]
145
- }));
146
- }, (0, _immutable.OrderedMap)(staticMap).map(function (value) {
147
- return (0, _immutable.Map)({
148
- value: "".concat(fnName, "('").concat(value, "')"),
149
- tags: []
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
- var buildBindings = exports.buildBindings = function buildBindings(_ref) {
154
- var space = _ref.space,
155
- kapp = _ref.kapp,
156
- form = _ref.form,
157
- scope = _ref.scope,
158
- profile = _ref.profile;
159
- return (0, _immutable.OrderedMap)([['Identity', (0, _immutable.Map)({
160
- children: profile && bindifyProfile('identity', IDENTITY_STATIC_BINDINGS, (0, _immutable.get)(profile, 'attributesMap'), (0, _immutable.get)(profile, 'profileAttributesMap'))
161
- })], ['File Resource', (0, _immutable.Map)({
162
- children: ['File Resource'].includes(scope) && bindify('file', FILE_STATIC_BINDINGS)
163
- })], ['Form', (0, _immutable.Map)({
164
- children: ['Datastore Form', 'Datastore Submission', 'Form', 'Submission'].includes(scope) && bindify('form', FORM_STATIC_BINDINGS, scope.startsWith('Datastore') ? (0, _immutable.get)(space, 'datastoreFormAttributeDefinitions') : (0, _immutable.get)(kapp, 'formAttributeDefinitions'))
165
- })], ['Kapp', (0, _immutable.Map)({
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.4",
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.6.0",
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": "cd94ee7c16756e39778c7c80ed1d47fd63fdee4c"
82
+ "gitHead": "8ba251942ef9bd4e37a56d680afc6ff95fde4543"
81
83
  }