@kineticdata/react 6.0.4 → 6.0.5

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 CHANGED
@@ -4,6 +4,14 @@ When upgrading `@kineticdata/react` to a newer version, remember that all `@kine
4
4
 
5
5
  Remember to always run `yarn install` after upgrading any dependency versions.
6
6
 
7
+ ## 6.0.4 (January 22, 2024)
8
+
9
+ - Fixed bug with SAML logout options
10
+
11
+ ## 6.0.3 (December 11, 2023)
12
+
13
+ _No relevant changes._
14
+
7
15
  ## 6.0.2 (November 6, 2023)
8
16
 
9
17
  - Removed XSRF header setting from Request Interceptor
@@ -11,7 +11,7 @@ var _immutable = require("immutable");
11
11
  var _Form = require("../../form/Form");
12
12
  var _apis = require("../../../apis");
13
13
  var _helpers = require("../../../helpers");
14
- var DISPLAY_TYPES = ['Display Page', 'Redirect'];
14
+ var DISPLAY_TYPES = ['Redirect'];
15
15
  var SPACE_INCLUDES = 'details,spaceAttributeDefinitions';
16
16
  var KAPP_INCLUDES = 'attributesMap,securityPolicies,details,fields.details,formAttributeDefinitions';
17
17
  var dataSources = function dataSources(_ref) {
@@ -124,37 +124,25 @@ var fields = function fields(_ref4) {
124
124
  label: 'After Logout Path',
125
125
  type: 'text',
126
126
  initialValue: (0, _immutable.get)(kapp, 'afterLogoutPath'),
127
- visible: function visible(_ref6) {
128
- var space = _ref6.space;
129
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
130
- }
127
+ visible: false
131
128
  }, {
132
129
  name: 'bundlePath',
133
130
  label: 'Bundle Path',
134
131
  type: 'text',
135
132
  initialValue: (0, _immutable.get)(kapp, 'bundlePath'),
136
- visible: function visible(_ref7) {
137
- var space = _ref7.space;
138
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
139
- }
133
+ visible: false
140
134
  }, {
141
135
  name: 'defaultFormConfirmationPage',
142
136
  label: 'Form Confirmation Page',
143
137
  type: 'text',
144
138
  initialValue: (0, _immutable.get)(kapp, 'defaultFormConfirmationPage'),
145
- visible: function visible(_ref8) {
146
- var space = _ref8.space;
147
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
148
- }
139
+ visible: false
149
140
  }, {
150
141
  name: 'defaultFormDisplayPage',
151
142
  label: 'Form Display Page',
152
143
  type: 'text',
153
144
  initialValue: (0, _immutable.get)(kapp, 'defaultFormDisplayPage'),
154
- visible: function visible(_ref9) {
155
- var space = _ref9.space;
156
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
157
- }
145
+ visible: false
158
146
  }, {
159
147
  name: 'defaultSubmissionLabelExpression',
160
148
  label: 'Submission Label',
@@ -164,10 +152,10 @@ var fields = function fields(_ref4) {
164
152
  helpText:
165
153
  // eslint-disable-next-line no-template-curly-in-string
166
154
  "Default label for form submissions. Click the </> button to see available values derived from each submission. Example: ${form('name')}",
167
- options: function options(_ref10) {
168
- var space = _ref10.space,
169
- kapp = _ref10.kapp,
170
- attributeDefinitions = _ref10.attributeDefinitions;
155
+ options: function options(_ref6) {
156
+ var space = _ref6.space,
157
+ kapp = _ref6.kapp,
158
+ attributeDefinitions = _ref6.attributeDefinitions;
171
159
  return (0, _helpers.buildBindings)({
172
160
  space: space,
173
161
  kapp: kapp && kapp.set('kappAttributeDefinitions', attributeDefinitions),
@@ -184,38 +172,29 @@ var fields = function fields(_ref4) {
184
172
  label: displayType
185
173
  };
186
174
  }),
187
- enabled: function enabled(_ref11) {
188
- var space = _ref11.space;
189
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
190
- },
191
- initialValue: (0, _immutable.get)(kapp, 'displayType') || 'Display Page',
175
+ visible: false,
176
+ initialValue: (0, _immutable.get)(kapp, 'displayType'),
192
177
  helpText: 'Determines how the application works. Set in Space Settings.'
193
178
  }, {
194
179
  name: 'displayValue',
195
- label: function label(_ref12) {
196
- var values = _ref12.values;
197
- return values.get('displayType') === 'Redirect' ? 'Redirect URL' : 'Kapp Display Page';
180
+ label: function label(_ref7) {
181
+ var values = _ref7.values;
182
+ return values.get('displayType') === 'Redirect' ? 'Redirect URL' : 'Display Value';
198
183
  },
199
184
  type: 'text',
200
185
  initialValue: (0, _immutable.get)(kapp, 'displayValue'),
201
- required: function required(_ref13) {
202
- var values = _ref13.values;
186
+ required: function required(_ref8) {
187
+ var values = _ref8.values;
203
188
  return values.get('displayType') === 'Redirect';
204
189
  },
205
190
  requiredMessage: "This field is required, when display type is 'Redirect'",
206
- visible: function visible(_ref14) {
207
- var space = _ref14.space;
208
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
209
- }
191
+ visible: false
210
192
  }, {
211
193
  name: 'loginPage',
212
194
  label: 'Login Page',
213
195
  type: 'text',
214
196
  initialValue: (0, _immutable.get)(kapp, 'loginPage'),
215
- visible: function visible(_ref15) {
216
- var space = _ref15.space;
217
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
218
- }
197
+ visible: false
219
198
  }, {
220
199
  name: 'name',
221
200
  label: 'Kapp Name',
@@ -223,9 +202,9 @@ var fields = function fields(_ref4) {
223
202
  required: true,
224
203
  initialValue: (0, _immutable.get)(kapp, 'name'),
225
204
  helpText: 'User friendly name for the Kapp, used throughout the system.',
226
- onChange: function onChange(_ref16, _ref17) {
227
- var values = _ref16.values;
228
- var setValue = _ref17.setValue;
205
+ onChange: function onChange(_ref9, _ref10) {
206
+ var values = _ref9.values;
207
+ var setValue = _ref10.setValue;
229
208
  if (values.get('linked')) {
230
209
  setValue('slug', (0, _helpers.slugify)(values.get('name')), false);
231
210
  }
@@ -235,10 +214,7 @@ var fields = function fields(_ref4) {
235
214
  label: 'Reset Password Page',
236
215
  type: 'text',
237
216
  initialValue: (0, _immutable.get)(kapp, 'resetPasswordPage'),
238
- visible: function visible(_ref18) {
239
- var space = _ref18.space;
240
- return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
241
- }
217
+ visible: false
242
218
  }, {
243
219
  name: 'slug',
244
220
  label: 'Slug',
@@ -246,8 +222,8 @@ var fields = function fields(_ref4) {
246
222
  required: true,
247
223
  initialValue: (0, _immutable.get)(kapp, 'slug'),
248
224
  helpText: 'Unique name used in the Kapp path.',
249
- onChange: function onChange(_bindings, _ref19) {
250
- var setValue = _ref19.setValue;
225
+ onChange: function onChange(_bindings, _ref11) {
226
+ var setValue = _ref11.setValue;
251
227
  setValue('linked', false);
252
228
  }
253
229
  }, {
@@ -257,16 +233,16 @@ var fields = function fields(_ref4) {
257
233
  "transient": true,
258
234
  initialValue: kapp ? false : true,
259
235
  visible: false
260
- }].concat((0, _toConsumableArray2["default"])(kappSlug ? Object.entries(securityEndpoints).map(function (_ref20) {
261
- var _ref21 = (0, _slicedToArray2["default"])(_ref20, 2),
262
- endpointFieldName = _ref21[0],
263
- endpoint = _ref21[1];
236
+ }].concat((0, _toConsumableArray2["default"])(kappSlug ? Object.entries(securityEndpoints).map(function (_ref12) {
237
+ var _ref13 = (0, _slicedToArray2["default"])(_ref12, 2),
238
+ endpointFieldName = _ref13[0],
239
+ endpoint = _ref13[1];
264
240
  return {
265
241
  name: endpointFieldName,
266
242
  label: endpoint.label,
267
243
  type: 'select',
268
- options: function options(_ref22) {
269
- var securityPolicyDefinitions = _ref22.securityPolicyDefinitions;
244
+ options: function options(_ref14) {
245
+ var securityPolicyDefinitions = _ref14.securityPolicyDefinitions;
270
246
  return securityPolicyDefinitions ? securityPolicyDefinitions.filter(function (definition) {
271
247
  return endpoint.types.includes(definition.get('type'));
272
248
  }).map(function (definition) {
@@ -286,12 +262,12 @@ var fields = function fields(_ref4) {
286
262
  label: 'Security Policies',
287
263
  type: null,
288
264
  visible: false,
289
- serialize: function serialize(_ref23) {
290
- var values = _ref23.values;
291
- return Object.entries(securityEndpoints).map(function (_ref24) {
292
- var _ref25 = (0, _slicedToArray2["default"])(_ref24, 2),
293
- endpointFieldName = _ref25[0],
294
- policy = _ref25[1];
265
+ serialize: function serialize(_ref15) {
266
+ var values = _ref15.values;
267
+ return Object.entries(securityEndpoints).map(function (_ref16) {
268
+ var _ref17 = (0, _slicedToArray2["default"])(_ref16, 2),
269
+ endpointFieldName = _ref17[0],
270
+ policy = _ref17[1];
295
271
  return {
296
272
  endpoint: policy.endpoint,
297
273
  name: values.get(endpointFieldName)
@@ -306,8 +282,8 @@ var fields = function fields(_ref4) {
306
282
  label: 'Attributes',
307
283
  type: 'attributes',
308
284
  required: false,
309
- options: function options(_ref26) {
310
- var attributeDefinitions = _ref26.attributeDefinitions;
285
+ options: function options(_ref18) {
286
+ var attributeDefinitions = _ref18.attributeDefinitions;
311
287
  return attributeDefinitions;
312
288
  },
313
289
  initialValue: (0, _immutable.get)(kapp, 'attributesMap')
@@ -12,7 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _Form = require("../../form/Form");
13
13
  var _apis = require("../../../apis");
14
14
  var _helpers = require("../../../helpers");
15
- var DISPLAY_TYPES = ['Display Page', 'Redirect', 'Single Page App'];
15
+ var DISPLAY_TYPES = ['Custom', 'Hosted', 'Platform', 'Redirect'];
16
+ var getInitialDisplayType = function getInitialDisplayType(value) {
17
+ if (value === 'Single Page App') {
18
+ return 'Custom';
19
+ }
20
+ return value || 'Platform';
21
+ };
16
22
  var dataSources = function dataSources() {
17
23
  return {
18
24
  space: {
@@ -148,45 +154,33 @@ var fields = function fields() {
148
154
  var space = _ref3.space;
149
155
  return "/".concat((0, _immutable.get)(space, 'slug'));
150
156
  },
151
- visible: function visible(_ref4) {
152
- var values = _ref4.values;
153
- return (0, _immutable.get)(values, 'displayType') !== 'Single Page App';
154
- }
157
+ visible: false
155
158
  }, {
156
159
  name: 'bundlePath',
157
160
  label: 'Bundle Path',
158
161
  type: 'text',
159
162
  initialValue: (0, _immutable.get)(space, 'bundlePath'),
160
- required: function required(_ref5) {
161
- var values = _ref5.values;
162
- return (0, _immutable.get)(values, 'sharedBundleBase') !== '' && (0, _immutable.get)(values, 'displayType') === 'Display Page';
163
- }
163
+ visible: false
164
164
  }, {
165
165
  name: 'defaultFormConfirmationPage',
166
166
  label: 'Default Form Confirmation Page',
167
167
  type: 'text',
168
168
  initialValue: (0, _immutable.get)(space, 'defaultFormConfirmationPage'),
169
169
  placeholder: 'confirmation.jsp',
170
- visible: function visible(_ref6) {
171
- var values = _ref6.values;
172
- return (0, _immutable.get)(values, 'displayType') !== 'Single Page App';
173
- }
170
+ visible: false
174
171
  }, {
175
172
  name: 'defaultFormDisplayPage',
176
173
  label: 'Default Form Display Page',
177
174
  type: 'text',
178
175
  initialValue: (0, _immutable.get)(space, 'defaultFormDisplayPage'),
179
176
  placeholder: 'form.jsp',
180
- visible: function visible(_ref7) {
181
- var values = _ref7.values;
182
- return (0, _immutable.get)(values, 'displayType') !== 'Single Page App';
183
- }
177
+ visible: false
184
178
  }, {
185
179
  name: 'defaultLocale',
186
180
  label: 'Default Locale',
187
181
  type: 'text',
188
- options: function options(_ref8) {
189
- var locales = _ref8.locales;
182
+ options: function options(_ref4) {
183
+ var locales = _ref4.locales;
190
184
  return locales.map(function (locale) {
191
185
  return (0, _immutable.Map)({
192
186
  value: locale.get('code'),
@@ -199,8 +193,8 @@ var fields = function fields() {
199
193
  name: 'defaultTimezone',
200
194
  label: 'Default Timezone',
201
195
  type: 'text',
202
- options: function options(_ref9) {
203
- var timezones = _ref9.timezones;
196
+ options: function options(_ref5) {
197
+ var timezones = _ref5.timezones;
204
198
  return timezones.map(function (timezone) {
205
199
  return (0, _immutable.Map)({
206
200
  value: timezone.get('id'),
@@ -220,20 +214,16 @@ var fields = function fields() {
220
214
  };
221
215
  }),
222
216
  required: true,
223
- initialValue: (0, _immutable.get)(space, 'displayType') || 'Display Page',
224
- helpText: 'Determines how the application works. For kinops, Single Page App is used.'
217
+ initialValue: getInitialDisplayType((0, _immutable.get)(space, 'displayType')),
218
+ helpText: 'Display Types indicate how the Platform should render your bundle.'
225
219
  }, {
226
220
  name: 'displayValueJSP',
227
- label: 'Space Display Page',
221
+ label: '',
228
222
  type: 'text',
229
223
  "transient": true,
230
224
  placeholder: 'space.jsp',
231
- visible: function visible(_ref10) {
232
- var values = _ref10.values;
233
- return (0, _immutable.get)(values, 'displayType') === 'Display Page';
234
- },
235
- required: function required(_ref11) {
236
- var values = _ref11.values;
225
+ visible: function visible(_ref6) {
226
+ var values = _ref6.values;
237
227
  return (0, _immutable.get)(values, 'displayType') === 'Display Page';
238
228
  },
239
229
  initialValue: (0, _immutable.get)(space, 'displayType') === 'Display Page' ? (0, _immutable.get)(space, 'displayValue') : ''
@@ -242,12 +232,12 @@ var fields = function fields() {
242
232
  label: 'Redirect URL',
243
233
  type: 'text',
244
234
  "transient": true,
245
- visible: function visible(_ref12) {
246
- var values = _ref12.values;
235
+ visible: function visible(_ref7) {
236
+ var values = _ref7.values;
247
237
  return (0, _immutable.get)(values, 'displayType') === 'Redirect';
248
238
  },
249
- required: function required(_ref13) {
250
- var values = _ref13.values;
239
+ required: function required(_ref8) {
240
+ var values = _ref8.values;
251
241
  return (0, _immutable.get)(values, 'displayType') === 'Redirect';
252
242
  },
253
243
  requiredMessage: "This field is required, when display type is 'Redirect'",
@@ -257,30 +247,50 @@ var fields = function fields() {
257
247
  label: 'Location',
258
248
  type: 'text',
259
249
  "transient": true,
260
- visible: function visible(_ref14) {
261
- var values = _ref14.values;
262
- return (0, _immutable.get)(values, 'displayType') === 'Single Page App';
250
+ visible: function visible(_ref9) {
251
+ var values = _ref9.values;
252
+ return (0, _immutable.get)(values, 'displayType') === 'Custom';
263
253
  },
264
- required: function required(_ref15) {
265
- var values = _ref15.values;
266
- return (0, _immutable.get)(values, 'displayType') === 'Single Page App';
254
+ required: function required(_ref10) {
255
+ var values = _ref10.values;
256
+ return (0, _immutable.get)(values, 'displayType') === 'Custom';
267
257
  },
268
- initialValue: (0, _immutable.get)(space, 'displayType') === 'Single Page App' ? ((0, _immutable.get)(space, 'displayValue') || '').replace('spa.jsp', '').replace('?location=', '') : '',
269
- helpText: 'See explanation below for external and embedded asset modes.'
258
+ initialValue: (0, _immutable.get)(space, 'displayType') === 'Single Page App' || (0, _immutable.get)(space, 'displayType') === 'Custom' ? ((0, _immutable.get)(space, 'displayValue') || '').replace('spa.jsp', '').replace('?location=', '') : '',
259
+ helpText: 'Enter the full URL to where your bundle is stored. This must include the index.html in the path.'
260
+ }, {
261
+ name: 'displayValueHost',
262
+ label: 'Bundle Slug',
263
+ type: 'text',
264
+ "transient": true,
265
+ visible: function visible(_ref11) {
266
+ var values = _ref11.values;
267
+ return (0, _immutable.get)(values, 'displayType') === 'Hosted';
268
+ },
269
+ required: function required(_ref12) {
270
+ var values = _ref12.values;
271
+ return (0, _immutable.get)(values, 'displayType') === 'Hosted';
272
+ },
273
+ initialValue: (0, _immutable.get)(space, 'displayType') === 'Hosted' ? (0, _immutable.get)(space, 'displayValue') : '',
274
+ helpText: 'Enter the full "slug" which corresponds to the directory your hosted bundle is stored in.'
270
275
  }, {
271
276
  name: 'displayValue',
272
- label: 'Dispaly Value',
277
+ label: 'Display Value',
273
278
  type: 'text',
274
279
  visible: false,
275
280
  initialValue: (0, _immutable.get)(space, 'displayValue'),
276
- serialize: function serialize(_ref16) {
277
- var values = _ref16.values;
281
+ serialize: function serialize(_ref13) {
282
+ var values = _ref13.values;
278
283
  var displayType = values.get('displayType');
279
284
  var displayValueSPA = values.get('displayValueSPA');
285
+ var displayValueHost = values.get('displayValueHost');
280
286
  var displayValueJSP = values.get('displayValueJSP');
281
287
  var displayValueRedirect = values.get('displayValueRedirect');
282
- if (displayType === 'Single Page App') {
288
+ if ((0, _immutable.get)(values, 'displayType') === 'Custom') {
283
289
  return displayValueSPA && displayValueSPA.endsWith('index.html') ? displayValueSPA : "spa.jsp".concat(displayValueSPA && '?location=' + displayValueSPA);
290
+ } else if ((0, _immutable.get)(values, 'displayType') === 'Hosted') {
291
+ return displayValueHost;
292
+ } else if ((0, _immutable.get)(values, 'displayType') === 'Platform') {
293
+ return '';
284
294
  } else {
285
295
  return displayType === 'Redirect' ? displayValueRedirect : displayValueJSP;
286
296
  }
@@ -291,19 +301,16 @@ var fields = function fields() {
291
301
  type: 'text',
292
302
  initialValue: (0, _immutable.get)(space, 'loginPage'),
293
303
  placeholder: 'login.jsp',
294
- visible: function visible(_ref17) {
295
- var values = _ref17.values;
296
- return (0, _immutable.get)(values, 'displayType') !== 'Single Page App';
297
- }
304
+ visible: false
298
305
  }, {
299
306
  name: 'name',
300
307
  label: 'Space Name',
301
308
  type: 'text',
302
309
  required: true,
303
310
  initialValue: (0, _immutable.get)(space, 'name'),
304
- onChange: function onChange(_ref18, _ref19) {
305
- var values = _ref18.values;
306
- var setValue = _ref19.setValue;
311
+ onChange: function onChange(_ref14, _ref15) {
312
+ var values = _ref14.values;
313
+ var setValue = _ref15.setValue;
307
314
  if (values.get('linked')) {
308
315
  setValue('slug', (0, _helpers.slugify)(values.get('name')), false);
309
316
  }
@@ -315,20 +322,17 @@ var fields = function fields() {
315
322
  type: 'text',
316
323
  initialValue: (0, _immutable.get)(space, 'resetPasswordPage'),
317
324
  placeholder: 'resetPassword.jsp',
318
- visible: function visible(_ref20) {
319
- var values = _ref20.values;
320
- return (0, _immutable.get)(values, 'displayType') !== 'Single Page App';
321
- }
325
+ visible: false
322
326
  }, {
323
327
  name: 'oauthSigningKey',
324
328
  label: 'OAuth Signing Key',
325
329
  type: 'password',
326
- visible: function visible(_ref21) {
327
- var values = _ref21.values;
330
+ visible: function visible(_ref16) {
331
+ var values = _ref16.values;
328
332
  return values.get('changeOAuthSigningKey');
329
333
  },
330
- "transient": function transient(_ref22) {
331
- var values = _ref22.values;
334
+ "transient": function transient(_ref17) {
335
+ var values = _ref17.values;
332
336
  return !values.get('changeOAuthSigningKey');
333
337
  }
334
338
  }, {
@@ -337,14 +341,14 @@ var fields = function fields() {
337
341
  type: 'checkbox',
338
342
  "transient": true,
339
343
  // in "new" mode we do not show this toggle field and default it to true
340
- visible: function visible(_ref23) {
341
- var space = _ref23.space;
344
+ visible: function visible(_ref18) {
345
+ var space = _ref18.space;
342
346
  return !!space;
343
347
  },
344
348
  initialValue: !space,
345
- onChange: function onChange(_ref24, _ref25) {
346
- var values = _ref24.values;
347
- var setValue = _ref25.setValue;
349
+ onChange: function onChange(_ref19, _ref20) {
350
+ var values = _ref19.values;
351
+ var setValue = _ref20.setValue;
348
352
  if (values.get('oauthSigningKey') !== '') {
349
353
  setValue('oauthSigningKey', '');
350
354
  }
@@ -355,8 +359,8 @@ var fields = function fields() {
355
359
  type: 'text',
356
360
  initialValue: (0, _immutable.get)(space, 'sessionInactiveLimitInSeconds'),
357
361
  helpText: 'Users will be logged out automatically if inactive for this amount of time.',
358
- serialize: function serialize(_ref26) {
359
- var values = _ref26.values;
362
+ serialize: function serialize(_ref21) {
363
+ var values = _ref21.values;
360
364
  return parseInt(values.get('sessionInactiveLimitInSeconds'));
361
365
  }
362
366
  }, {
@@ -364,15 +368,16 @@ var fields = function fields() {
364
368
  label: 'Shared Bundle Base',
365
369
  type: 'text',
366
370
  initialValue: (0, _immutable.get)(space, 'sharedBundleBase'),
367
- helpText: 'Directory used as path prefix for bundles.'
371
+ helpText: 'Directory used as path prefix for bundles.',
372
+ visible: false
368
373
  }, {
369
374
  name: 'slug',
370
375
  label: 'Slug',
371
376
  type: 'text',
372
377
  required: true,
373
378
  initialValue: (0, _immutable.get)(space, 'slug'),
374
- onChange: function onChange(_bindings, _ref27) {
375
- var setValue = _ref27.setValue;
379
+ onChange: function onChange(_bindings, _ref22) {
380
+ var setValue = _ref22.setValue;
376
381
  setValue('linked', false);
377
382
  },
378
383
  helpText: 'Unique name used in the space path.'
@@ -393,16 +398,16 @@ var fields = function fields() {
393
398
  label: 'Trusted Resource Domains',
394
399
  type: 'text-multi',
395
400
  initialValue: (0, _immutable.get)(space, 'trustedResourceDomains')
396
- }].concat((0, _toConsumableArray2["default"])(Object.entries(securityEndpoints).map(function (_ref28) {
397
- var _ref29 = (0, _slicedToArray2["default"])(_ref28, 2),
398
- endpointFieldName = _ref29[0],
399
- endpoint = _ref29[1];
401
+ }].concat((0, _toConsumableArray2["default"])(Object.entries(securityEndpoints).map(function (_ref23) {
402
+ var _ref24 = (0, _slicedToArray2["default"])(_ref23, 2),
403
+ endpointFieldName = _ref24[0],
404
+ endpoint = _ref24[1];
400
405
  return {
401
406
  name: endpointFieldName,
402
407
  label: endpoint.label,
403
408
  type: 'select',
404
- options: function options(_ref30) {
405
- var securityPolicyDefinitions = _ref30.securityPolicyDefinitions;
409
+ options: function options(_ref25) {
410
+ var securityPolicyDefinitions = _ref25.securityPolicyDefinitions;
406
411
  return securityPolicyDefinitions.filter(function (definition) {
407
412
  return endpoint.types.includes(definition.get('type'));
408
413
  }).map(function (definition) {
@@ -422,12 +427,12 @@ var fields = function fields() {
422
427
  label: 'Security Policies',
423
428
  type: null,
424
429
  visible: false,
425
- serialize: function serialize(_ref31) {
426
- var values = _ref31.values;
427
- return Object.entries(securityEndpoints).map(function (_ref32) {
428
- var _ref33 = (0, _slicedToArray2["default"])(_ref32, 2),
429
- endpointFieldName = _ref33[0],
430
- policy = _ref33[1];
430
+ serialize: function serialize(_ref26) {
431
+ var values = _ref26.values;
432
+ return Object.entries(securityEndpoints).map(function (_ref27) {
433
+ var _ref28 = (0, _slicedToArray2["default"])(_ref27, 2),
434
+ endpointFieldName = _ref28[0],
435
+ policy = _ref28[1];
431
436
  return {
432
437
  endpoint: policy.endpoint,
433
438
  name: values.get(endpointFieldName)
@@ -452,13 +457,13 @@ var fields = function fields() {
452
457
  type: 'text'
453
458
  }]);
454
459
  },
455
- visible: function visible(_ref34) {
456
- var values = _ref34.values;
460
+ visible: function visible(_ref29) {
461
+ var values = _ref29.values;
457
462
  return values.get('allowedIpsEnabled', false);
458
463
  },
459
464
  initialValue: (0, _immutable.get)(space, 'allowedIps', []),
460
- serialize: function serialize(_ref35) {
461
- var values = _ref35.values;
465
+ serialize: function serialize(_ref30) {
466
+ var values = _ref30.values;
462
467
  return values.get('allowedIpsEnabled', false) ? values.get('allowedIps') : [];
463
468
  }
464
469
  }, {
@@ -471,8 +476,8 @@ var fields = function fields() {
471
476
  label: 'Attributes',
472
477
  type: 'attributes',
473
478
  required: false,
474
- options: function options(_ref36) {
475
- var attributeDefinitions = _ref36.attributeDefinitions;
479
+ options: function options(_ref31) {
480
+ var attributeDefinitions = _ref31.attributeDefinitions;
476
481
  return attributeDefinitions;
477
482
  },
478
483
  initialValue: (0, _immutable.get)(space, 'attributesMap')
@@ -235,14 +235,16 @@ var TreeBuilderComponent = exports.TreeBuilderComponent = /*#__PURE__*/function
235
235
  // placeholder then we will call configureTreeBuilder with the component's
236
236
  // props at that time
237
237
  if (this.props.treeBuilderState === null) {
238
- (0, _builder.configureTreeBuilder)((0, _lodashEs.pick)(this.props, ['treeKey', 'sourceName', 'sourceGroup', 'name', 'platformSourceName']));
238
+ (0, _builder.configureTreeBuilder)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, this.props.configParams), {}, {
239
+ treeKey: this.props.treeKey
240
+ }));
239
241
  }
240
242
  }
241
243
  }, {
242
244
  key: "checkHighlight",
243
245
  value: function checkHighlight() {
244
246
  var prevProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
245
- if (this.props.treeBuilderState && !this.props.treeBuilderState.loading) {
247
+ if (this.props.treeBuilderState && !this.props.treeBuilderState.loading && this.props.tree) {
246
248
  // one the first "real" render of the tree builder check for the highlight
247
249
  // node and focus if one is specified
248
250
  if ((!prevProps.treeBuilderState || prevProps.treeBuilderState.loading) && this.props.highlight) {
@@ -269,13 +271,15 @@ var TreeBuilderComponent = exports.TreeBuilderComponent = /*#__PURE__*/function
269
271
  highlightType = _ref4[0],
270
272
  highlightId = _ref4[1];
271
273
  if (treeBuilderState) {
272
- var lastSave = treeBuilderState.lastSave,
274
+ var error = treeBuilderState.error,
275
+ lastSave = treeBuilderState.lastSave,
273
276
  lastWebApi = treeBuilderState.lastWebApi,
274
277
  redoStack = treeBuilderState.redoStack,
275
278
  saving = treeBuilderState.saving,
276
279
  tasks = treeBuilderState.tasks,
277
280
  tree = treeBuilderState.tree,
278
281
  kappSlug = treeBuilderState.kappSlug,
282
+ formSlug = treeBuilderState.formSlug,
279
283
  undoStack = treeBuilderState.undoStack,
280
284
  webApi = treeBuilderState.webApi;
281
285
  return this.props.children({
@@ -351,6 +355,7 @@ var TreeBuilderComponent = exports.TreeBuilderComponent = /*#__PURE__*/function
351
355
  }
352
356
  },
353
357
  dirty: this.isDirty(treeBuilderState),
358
+ error: error,
354
359
  lastTree: lastSave,
355
360
  lastWebApi: lastWebApi,
356
361
  name: tree ? tree.name : null,
@@ -359,6 +364,7 @@ var TreeBuilderComponent = exports.TreeBuilderComponent = /*#__PURE__*/function
359
364
  tasks: tasks,
360
365
  tree: tree,
361
366
  kappSlug: kappSlug,
367
+ formSlug: formSlug,
362
368
  treeBuilder: tree && /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_SvgCanvas.SvgCanvas, {
363
369
  ref: this.canvasRef
364
370
  }, tree.connectors.map(function (connector) {
@@ -43,88 +43,132 @@ var remember = function remember(state, treeKey) {
43
43
  (0, _store.regSaga)((0, _effects.takeEvery)('TREE_CONFIGURE', function (_ref) {
44
44
  var payload = _ref.payload;
45
45
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
46
- var _getPlatformItemSlugs, name, sourceGroup, sourceName, treeKey, webApiProps, _yield$all, _yield$all2, tree, categories, webApi, platformItem, result, _yield$call, workflow;
46
+ var name, sourceGroup, sourceName, treeKey, platformSourceName, webApiProps, workflowProps, _yield$all, _yield$all2, _yield$all2$, tree, treeError, _yield$all2$2, workflow, workflowError, categories, _yield$all2$3, webApi, webApiError, workflowObject, workflowObjectError, _yield$call, platformItem, platformItemError, _yield$call2, linkedWorkflow, linkedError, treeObject, loadError;
47
47
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
48
48
  while (1) switch (_context.prev = _context.next) {
49
49
  case 0:
50
50
  _context.prev = 0;
51
- name = payload.name, sourceGroup = payload.sourceGroup, sourceName = payload.sourceName, treeKey = payload.treeKey;
51
+ name = payload.name, sourceGroup = payload.sourceGroup, sourceName = payload.sourceName, treeKey = payload.treeKey, platformSourceName = payload.platformSourceName;
52
52
  webApiProps = getWebApiProps(payload);
53
- _context.next = 5;
54
- return (0, _effects.all)([(0, _effects.call)(_apis.fetchTree, {
53
+ workflowProps = getWorkflowProps(payload);
54
+ _context.next = 6;
55
+ return (0, _effects.all)([
56
+ // Fetch the tree if not a linked workflow
57
+ !workflowProps ? (0, _effects.call)(_apis.fetchTree, {
55
58
  name: name,
56
59
  sourceGroup: sourceGroup,
57
60
  sourceName: sourceName,
58
61
  include: 'bindings,categories,details,treeJson,inputs,outputs'
59
- }), (0, _effects.call)(_apis.fetchTaskCategories, {
62
+ }) : {},
63
+ // Fetch the workflow if it is a linked workflow
64
+ workflowProps ? (0, _effects.call)(_apis.fetchWorkflow, (0, _objectSpread2["default"])({}, workflowProps)) : {},
65
+ // Fetch task categories
66
+ (0, _effects.call)(_apis.fetchTaskCategories, {
60
67
  include: 'handlers.results,handlers.parameters,trees.parameters,trees.inputs,trees.outputs'
61
- }), webApiProps ? (0, _effects.call)(_apis.fetchWebApi, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, webApiProps), {}, {
68
+ }),
69
+ // Fetch the webAPI if applicable
70
+ webApiProps ? (0, _effects.call)(_apis.fetchWebApi, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, webApiProps), {}, {
62
71
  include: 'details,securityPolicies'
63
72
  })) : {}]);
64
- case 5:
73
+ case 6:
65
74
  _yield$all = _context.sent;
66
- _yield$all2 = (0, _slicedToArray2["default"])(_yield$all, 3);
67
- tree = _yield$all2[0].tree;
68
- categories = _yield$all2[1].categories;
69
- webApi = _yield$all2[2].webApi;
70
- platformItem = null;
71
- if (!tree.event) {
72
- _context.next = 21;
75
+ _yield$all2 = (0, _slicedToArray2["default"])(_yield$all, 4);
76
+ _yield$all2$ = _yield$all2[0];
77
+ tree = _yield$all2$.tree;
78
+ treeError = _yield$all2$.error;
79
+ _yield$all2$2 = _yield$all2[1];
80
+ workflow = _yield$all2$2.workflow;
81
+ workflowError = _yield$all2$2.error;
82
+ categories = _yield$all2[2].categories;
83
+ _yield$all2$3 = _yield$all2[3];
84
+ webApi = _yield$all2$3.webApi;
85
+ webApiError = _yield$all2$3.error;
86
+ workflowObject = workflow;
87
+ workflowObjectError = workflowError; // If a tree was fetched and the tree has platform item data, fetch the
88
+ // platform item and then retrieve the workflow
89
+ if (!(tree && tree.platformItemId && tree.platformItemType)) {
90
+ _context.next = 37;
73
91
  break;
74
92
  }
75
- _context.next = 14;
93
+ _context.next = 23;
76
94
  return (0, _effects.call)(_apis.fetchPlatformItem, {
77
95
  type: tree.platformItemType,
78
96
  id: tree.platformItemId
79
97
  });
80
- case 14:
81
- result = _context.sent;
82
- platformItem = result.platformItem;
83
- _context.next = 18;
98
+ case 23:
99
+ _yield$call = _context.sent;
100
+ platformItem = _yield$call.platformItem;
101
+ platformItemError = _yield$call.error;
102
+ if (!platformItem) {
103
+ _context.next = 36;
104
+ break;
105
+ }
106
+ _context.next = 29;
84
107
  return (0, _effects.call)(_apis.fetchWorkflow, (0, _objectSpread2["default"])({
85
108
  workflowId: sourceGroup
86
109
  }, getPlatformItemSlugs(platformItem)));
87
- case 18:
88
- _yield$call = _context.sent;
89
- workflow = _yield$call.workflow;
90
- // Add workflow filter from core to the tree to be used in the Settings > WorkflowForm
91
- tree['filter'] = workflow ? workflow.filter : '';
92
- case 21:
93
- _context.next = 23;
110
+ case 29:
111
+ _yield$call2 = _context.sent;
112
+ linkedWorkflow = _yield$call2.workflow;
113
+ linkedError = _yield$call2.error;
114
+ workflowObject = linkedWorkflow;
115
+ workflowObjectError = linkedError;
116
+ _context.next = 37;
117
+ break;
118
+ case 36:
119
+ // If platform item was not retrieved, show an error because we don't
120
+ // want to render a workflow using a tree route
121
+ workflowObjectError = platformItemError || 'Failed to load linked workflow.';
122
+ case 37:
123
+ // If workflow, set sourceName to platformSourceName since the value is
124
+ // needed when creating new runs
125
+ treeObject = workflowObject ? (0, _objectSpread2["default"])({
126
+ sourceName: platformSourceName
127
+ }, workflowObject) : tree;
128
+ loadError = workflowObjectError || treeError || webApiError;
129
+ _context.next = 41;
94
130
  return (0, _effects.put)((0, _store.action)('TREE_LOADED', {
95
131
  categories: categories,
96
- kappSlug: webApiProps && webApiProps.kappSlug || ((_getPlatformItemSlugs = getPlatformItemSlugs(platformItem)) === null || _getPlatformItemSlugs === void 0 ? void 0 : _getPlatformItemSlugs.kappSlug),
97
- platformItem: platformItem,
132
+ kappSlug: (webApiProps === null || webApiProps === void 0 ? void 0 : webApiProps.kappSlug) || (workflowProps === null || workflowProps === void 0 ? void 0 : workflowProps.kappSlug),
133
+ formSlug: workflowProps === null || workflowProps === void 0 ? void 0 : workflowProps.formSlug,
98
134
  treeKey: treeKey,
99
- tree: (0, _models.deserializeTree)(tree),
100
- webApi: webApiProps && (0, _models.deserializeWebApi)(webApi, webApiProps.kappSlug)
135
+ tree:
136
+ // Don't set the tree if it's for a webApi but the webApi errors
137
+ treeObject && (!webApiProps || webApi) ? (0, _models.deserializeTree)(treeObject) : null,
138
+ webApi: webApi ? (0, _models.deserializeWebApi)(webApi, webApiProps.kappSlug) : null,
139
+ error: loadError ? loadError.message || loadError : null
101
140
  }));
102
- case 23:
103
- _context.next = 28;
141
+ case 41:
142
+ _context.next = 46;
104
143
  break;
105
- case 25:
106
- _context.prev = 25;
144
+ case 43:
145
+ _context.prev = 43;
107
146
  _context.t0 = _context["catch"](0);
108
147
  console.error('Caught error loading tree', _context.t0);
109
- case 28:
148
+ case 46:
110
149
  case "end":
111
150
  return _context.stop();
112
151
  }
113
- }, _callee, null, [[0, 25]]);
152
+ }, _callee, null, [[0, 43]]);
114
153
  })();
115
154
  }));
116
155
  var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
117
- return platformItem !== null && platformItem !== void 0 && platformItem.kapp ? {
118
- formSlug: platformItem.slug,
119
- kappSlug: platformItem.kapp.slug
120
- } : platformItem !== null && platformItem !== void 0 && platformItem.space ? {
121
- kappSlug: platformItem.slug
122
- } : {};
156
+ return (
157
+ // If platform item has a kapp property, then it's a form object
158
+ platformItem !== null && platformItem !== void 0 && platformItem.kapp ? {
159
+ formSlug: platformItem.slug,
160
+ kappSlug: platformItem.kapp.slug
161
+ } :
162
+ // If platform item has a space property, than it's a kapp object
163
+ platformItem !== null && platformItem !== void 0 && platformItem.space ? {
164
+ kappSlug: platformItem.slug
165
+ } : {}
166
+ );
123
167
  };
124
168
  (0, _store.regSaga)((0, _effects.takeEvery)('TREE_SAVE', function (_ref2) {
125
169
  var payload = _ref2.payload;
126
170
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
127
- var newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, lastSave, lastWebApi, platformItem, tree, webApi, name, sourceGroup, sourceName, _yield, error1, newTree, newWorkflow, _yield2, error2, error;
171
+ var newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, formSlug, lastSave, lastWebApi, tree, webApi, name, sourceGroup, sourceName, _yield, error1, newTree, newWorkflow, _yield2, error2, error;
128
172
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
129
173
  while (1) switch (_context2.prev = _context2.next) {
130
174
  case 0:
@@ -139,9 +183,9 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
139
183
  case 4:
140
184
  _yield$select = _context2.sent;
141
185
  kappSlug = _yield$select.kappSlug;
186
+ formSlug = _yield$select.formSlug;
142
187
  lastSave = _yield$select.lastSave;
143
188
  lastWebApi = _yield$select.lastWebApi;
144
- platformItem = _yield$select.platformItem;
145
189
  tree = _yield$select.tree;
146
190
  webApi = _yield$select.webApi;
147
191
  name = lastSave.name, sourceGroup = lastSave.sourceGroup, sourceName = lastSave.sourceName; // if a newName was passed we will be creating a new tree with the builder
@@ -149,18 +193,22 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
149
193
  // additionally, if the tree is a linked workflow then we call a core
150
194
  // endpoint to create the workflow
151
195
  _context2.next = 14;
152
- return newName ? tree.event ? (0, _effects.call)(_apis.createWorkflow, (0, _objectSpread2["default"])({
196
+ return newName ? tree.event ? (0, _effects.call)(_apis.createWorkflow, {
153
197
  workflow: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree)), {}, {
154
198
  name: newName
155
- })
156
- }, getPlatformItemSlugs(platformItem))) : (0, _effects.call)(_apis.createTree, {
199
+ }),
200
+ kappSlug: kappSlug,
201
+ formSlug: formSlug
202
+ }) : (0, _effects.call)(_apis.createTree, {
157
203
  tree: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree, true)), {}, {
158
204
  name: newName
159
205
  })
160
- }) : tree.event ? (0, _effects.call)(_apis.updateWorkflow, (0, _objectSpread2["default"])({
206
+ }) : tree.event ? (0, _effects.call)(_apis.updateWorkflow, {
161
207
  workflowId: sourceGroup,
162
- workflow: (0, _models.serializeTree)(tree, overwrite)
163
- }, getPlatformItemSlugs(platformItem))) : (0, _effects.call)(_apis.updateTree, {
208
+ workflow: (0, _models.serializeTree)(tree, overwrite),
209
+ kappSlug: kappSlug,
210
+ formSlug: formSlug
211
+ }) : (0, _effects.call)(_apis.updateTree, {
164
212
  name: name,
165
213
  sourceGroup: sourceGroup,
166
214
  sourceName: sourceName,
@@ -191,7 +239,11 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
191
239
  treeKey: treeKey,
192
240
  tree: newTree || newWorkflow,
193
241
  webApi: webApi,
194
- onSave: onSave
242
+ onSave: onSave,
243
+ scope: {
244
+ kappSlug: kappSlug,
245
+ formSlug: formSlug
246
+ }
195
247
  }));
196
248
  case 25:
197
249
  _context2.next = 30;
@@ -240,7 +292,8 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
240
292
  var _ref4$payload = _ref4.payload,
241
293
  onSave = _ref4$payload.onSave,
242
294
  previousTree = _ref4$payload.previousTree,
243
- treeKey = _ref4$payload.treeKey;
295
+ treeKey = _ref4$payload.treeKey,
296
+ scope = _ref4$payload.scope;
244
297
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
245
298
  var tree;
246
299
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
@@ -258,7 +311,7 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
258
311
  case 4:
259
312
  tree = _context4.sent;
260
313
  _context4.next = 7;
261
- return (0, _effects.call)(onSave, tree, previousTree);
314
+ return (0, _effects.call)(onSave, tree, previousTree, scope);
262
315
  case 7:
263
316
  _context4.next = 12;
264
317
  break;
@@ -293,19 +346,20 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
293
346
  var _ref8$payload = _ref8.payload,
294
347
  categories = _ref8$payload.categories,
295
348
  kappSlug = _ref8$payload.kappSlug,
296
- platformItem = _ref8$payload.platformItem,
349
+ formSlug = _ref8$payload.formSlug,
297
350
  treeKey = _ref8$payload.treeKey,
298
351
  tree = _ref8$payload.tree,
299
- webApi = _ref8$payload.webApi;
352
+ webApi = _ref8$payload.webApi,
353
+ error = _ref8$payload.error;
300
354
  return state.mergeIn(['trees', treeKey], {
301
355
  kappSlug: kappSlug,
356
+ formSlug: formSlug,
302
357
  lastSave: tree,
303
358
  lastWebApi: webApi,
304
359
  loading: false,
305
- platformItem: platformItem,
306
360
  tasks: (0, _immutable.List)(categories).map(function (category) {
307
361
  return category.name === 'System Controls' ? (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, category), {}, {
308
- handlers: [].concat((0, _toConsumableArray2["default"])(category.handlers), [(0, _helpers.treeReturnTask)(tree)])
362
+ handlers: [].concat((0, _toConsumableArray2["default"])(category.handlers), [tree ? (0, _helpers.treeReturnTask)(tree) : null]).filter(Boolean)
309
363
  }) : category;
310
364
  }).flatMap(function (category) {
311
365
  return [].concat((0, _toConsumableArray2["default"])(category.handlers), (0, _toConsumableArray2["default"])(category.trees));
@@ -315,7 +369,8 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
315
369
  return reduction.set(task.definitionId, task);
316
370
  }, (0, _immutable.OrderedMap)()),
317
371
  tree: tree,
318
- webApi: webApi
372
+ webApi: webApi,
373
+ error: error
319
374
  });
320
375
  },
321
376
  TREE_SAVE: function TREE_SAVE(state, _ref9) {
@@ -530,4 +585,18 @@ var getWebApiProps = function getWebApiProps(_ref25) {
530
585
  };
531
586
  }
532
587
  return null;
588
+ };
589
+ var getWorkflowProps = function getWorkflowProps(_ref26) {
590
+ var type = _ref26.type,
591
+ sourceGroup = _ref26.sourceGroup,
592
+ kappSlug = _ref26.kappSlug,
593
+ formSlug = _ref26.formSlug;
594
+ if (type === 'workflow') {
595
+ return {
596
+ workflowId: sourceGroup,
597
+ kappSlug: kappSlug,
598
+ formSlug: formSlug
599
+ };
600
+ }
601
+ return null;
533
602
  };
@@ -28,7 +28,7 @@ var WebApi = exports.WebApi = (0, _immutable.Record)({
28
28
  updatedBy: null
29
29
  });
30
30
  var Tree = exports.Tree = (0, _immutable.Record)({
31
- bindings: (0, _immutable.OrderedMap)(),
31
+ bindings: {},
32
32
  categories: (0, _immutable.List)(),
33
33
  connectors: (0, _immutable.OrderedMap)(),
34
34
  definitionId: null,
@@ -90,11 +90,11 @@ var Connector = exports.Connector = (0, _immutable.Record)({
90
90
  var TreeBuilderState = exports.TreeBuilderState = (0, _immutable.Record)({
91
91
  categories: (0, _immutable.OrderedMap)(),
92
92
  error: null,
93
+ formSlug: null,
93
94
  kappSlug: null,
94
95
  lastSave: null,
95
96
  lastWebApi: null,
96
97
  loading: true,
97
- platformItem: null,
98
98
  redoStack: (0, _immutable.List)(),
99
99
  saving: false,
100
100
  tasks: (0, _immutable.OrderedMap)(),
@@ -182,6 +182,7 @@ var deserializeTree = exports.deserializeTree = function deserializeTree(_ref4)
182
182
  event = _ref4.event,
183
183
  filter = _ref4.filter,
184
184
  guid = _ref4.guid,
185
+ id = _ref4.id,
185
186
  inputs = _ref4.inputs,
186
187
  name = _ref4.name,
187
188
  notes = _ref4.notes,
@@ -206,7 +207,7 @@ var deserializeTree = exports.deserializeTree = function deserializeTree(_ref4)
206
207
  definitionId: definitionId,
207
208
  event: event,
208
209
  filter: filter,
209
- guid: guid,
210
+ guid: guid || id,
210
211
  inputs: (0, _immutable.List)(inputs).map(_immutable.Map),
211
212
  name: name,
212
213
  notes: notes,
@@ -148,7 +148,7 @@ var fields = function fields(_ref5) {
148
148
  label: 'Filter',
149
149
  type: 'code',
150
150
  language: 'js',
151
- initialValue: workflow ? workflow.get('filter') : '',
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'),
@@ -157,7 +157,8 @@ var fields = function fields(_ref5) {
157
157
  kapp = _ref9.kapp,
158
158
  values = _ref9.values;
159
159
  var type = ['File Resource', 'Kapp', 'Form', 'Submission', 'Team', 'User'].find(function (scope) {
160
- return values.get('event').includes(scope);
160
+ var _values$get;
161
+ return (_values$get = values.get('event')) === null || _values$get === void 0 ? void 0 : _values$get.includes(scope);
161
162
  });
162
163
  return (0, _helpers.buildBindings)({
163
164
  space: space,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kineticdata/react",
3
- "version": "6.0.4",
3
+ "version": "6.0.5",
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.6.7",
23
23
  "classnames": "^2.2.6",
24
24
  "deepequal": "^0.0.1",
25
25
  "draft-js": "^0.11.7",
@@ -77,5 +77,5 @@
77
77
  "classNameTemplate": "{classname}",
78
78
  "titleTemplate": "{title}"
79
79
  },
80
- "gitHead": "cd94ee7c16756e39778c7c80ed1d47fd63fdee4c"
80
+ "gitHead": "46bbd148a831a29c1a81ec3a081b3e60cdccb03e"
81
81
  }