@kineticdata/react 6.1.0 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -110
- package/assets/task/icons/defer.svg +12 -12
- package/assets/task/icons/drag-handle.svg +3 -3
- package/assets/task/icons/filter.svg +11 -11
- package/assets/task/icons/loop.svg +10 -10
- package/assets/task/icons/plus_small.svg +5 -5
- package/assets/task/icons/routine.svg +9 -9
- package/assets/task/icons/scale-minus.svg +11 -11
- package/assets/task/icons/scale-plus.svg +13 -13
- package/assets/task/icons/start.svg +11 -11
- package/assets/task/icons/stop.svg +8 -8
- package/lib/apis/core/activity.js +4 -4
- package/lib/apis/core/attributeDefinitions.js +55 -0
- package/lib/apis/core/attributeDefinitions.test.js +7 -4
- package/lib/apis/core/authentication.js +12 -1
- package/lib/apis/core/bridgeModels.test.js +46 -23
- package/lib/apis/core/bridgedresources.js +41 -41
- package/lib/apis/core/fileResources.js +2 -6
- package/lib/apis/core/forms.js +51 -2
- package/lib/apis/core/forms.test.js +32 -19
- package/lib/apis/core/kapps.js +49 -0
- package/lib/apis/core/kapps.test.js +16 -10
- package/lib/apis/core/notices.js +7 -0
- package/lib/apis/core/securityPolicyDefinitions.test.js +7 -4
- package/lib/apis/core/space.js +18 -0
- package/lib/apis/core/space.test.js +16 -10
- package/lib/apis/core/submissionActivities.js +38 -0
- package/lib/apis/core/submissions.js +62 -0
- package/lib/apis/core/translations.test.js +126 -55
- package/lib/apis/core/userPreferences.js +59 -0
- package/lib/apis/core/webApis.js +32 -2
- package/lib/apis/core/webhooks.test.js +7 -4
- package/lib/apis/http.js +22 -11
- package/lib/apis/index.js +24 -0
- package/lib/apis/integrator/index.js +95 -20
- package/lib/components/common/AttributeSelect.js +1 -0
- package/lib/components/common/BridgeSelect.js +1 -0
- package/lib/components/common/ConnectionSelect.js +2 -1
- package/lib/components/common/FormSelect.js +1 -0
- package/lib/components/common/NodeSelect.js +1 -0
- package/lib/components/common/StaticSelect.js +1 -0
- package/lib/components/common/TeamSelect.js +1 -0
- package/lib/components/common/ToastContainer.js +3 -3
- package/lib/components/common/Typeahead.js +3 -0
- package/lib/components/common/UserSelect.js +1 -0
- package/lib/components/common/authentication/AuthenticationContainer.js +121 -55
- package/lib/components/common/preferences/PreferencesProvider.js +461 -0
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +7 -7
- package/lib/components/core/field_definition/FieldDefinitionForm.js +3 -3
- package/lib/components/core/form/FormTable.js +0 -1
- package/lib/components/core/integration/IntegrationTable.js +3 -0
- package/lib/components/core/space/SpaceForm.js +14 -14
- package/lib/components/core/submission/SubmissionActivityForm.js +79 -0
- package/lib/components/core/submission/SubmissionForm.js +12 -2
- package/lib/components/core/translation/EntryTable.js +8 -7
- package/lib/components/core/user/UserForm.js +2 -0
- package/lib/components/core/user/UserTable.js +4 -4
- package/lib/components/form/Form.js +14 -3
- package/lib/components/form/FormState.js +1 -1
- package/lib/components/form/SimpleForm.js +2 -2
- package/lib/components/index.js +68 -0
- package/lib/components/integrator/connection/ConnectionForm.js +62 -18
- package/lib/components/integrator/connection/ConnectionTable.js +5 -3
- package/lib/components/integrator/connection/config_fields/http.js +19 -19
- package/lib/components/integrator/connection/config_fields/sql.js +123 -0
- package/lib/components/integrator/integrationTypes.js +27 -5
- package/lib/components/integrator/operation/OperationForm.js +24 -4
- package/lib/components/integrator/operation/OperationTable.js +3 -5
- package/lib/components/integrator/operation/config_fields/http.js +3 -2
- package/lib/components/integrator/operation/config_fields/sql.js +81 -0
- package/lib/components/system/SystemUserForm.js +2 -0
- package/lib/components/table/Table.js +75 -15
- package/lib/components/table/Table.redux.js +296 -72
- package/lib/components/table/defaults/FilterControl.js +24 -0
- package/lib/components/table/defaults/index.js +2 -0
- package/lib/components/table/tests/Table.test.js +22 -22
- package/lib/components/table/tests/components.js +9 -2
- package/lib/components/task/builder/Connector.js +51 -41
- package/lib/components/task/builder/Node.js +25 -38
- package/lib/components/task/builder/SvgCanvas.js +3 -17
- package/lib/components/task/builder/TreeBuilder.js +1 -2
- package/lib/components/task/builder/builder.redux.js +52 -32
- package/lib/components/task/builder/helpers.js +35 -5
- package/lib/components/task/common/UsageTable.js +8 -1
- package/lib/components/task/handlers/HandlerTable.js +9 -18
- package/lib/components/task/runs/RunTable.js +6 -10
- package/lib/components/task/workflows/LinkedWorkflowTable.js +14 -9
- package/lib/components/task/workflows/WorkflowTable.js +25 -24
- package/lib/helpers/index.js +18 -2
- package/lib/index.js +2 -1
- package/lib/saga.js +4 -4
- package/lib/store.js +2 -1
- package/package.json +5 -6
- package/proxyhelper.js +201 -201
- package/CHANGELOG.md +0 -116
|
@@ -17,6 +17,7 @@ var _lodashEs = require("lodash-es");
|
|
|
17
17
|
var _moment = _interopRequireDefault(require("moment"));
|
|
18
18
|
var _store = require("../../../store");
|
|
19
19
|
var _apis = require("../../../apis");
|
|
20
|
+
var _PreferencesProvider = require("../preferences/PreferencesProvider");
|
|
20
21
|
var defaultLoginProps = {
|
|
21
22
|
error: null,
|
|
22
23
|
password: '',
|
|
@@ -42,6 +43,7 @@ var defaultLoginProps = {
|
|
|
42
43
|
SET_AUTHENTICATED: function SET_AUTHENTICATED(state, action) {
|
|
43
44
|
return state.mergeIn(['session'], {
|
|
44
45
|
loggedIn: true,
|
|
46
|
+
timedOut: false,
|
|
45
47
|
token: action.payload.token
|
|
46
48
|
}).set('login', defaultLoginProps);
|
|
47
49
|
},
|
|
@@ -50,6 +52,7 @@ var defaultLoginProps = {
|
|
|
50
52
|
csrfToken: action.payload.csrfToken,
|
|
51
53
|
initialized: true,
|
|
52
54
|
loggedIn: !!action.payload.token,
|
|
55
|
+
timedOut: false,
|
|
53
56
|
securityStrategies: action.payload.securityStrategies,
|
|
54
57
|
spaceSlug: action.payload.spaceSlug,
|
|
55
58
|
token: action.payload.token,
|
|
@@ -80,6 +83,9 @@ var defaultLoginProps = {
|
|
|
80
83
|
},
|
|
81
84
|
TIMEOUT: function TIMEOUT(state) {
|
|
82
85
|
return state.setIn(['session', 'token'], null);
|
|
86
|
+
},
|
|
87
|
+
TIMEOUT_SESSION: function TIMEOUT_SESSION(state) {
|
|
88
|
+
return state.setIn(['session', 'timedOut'], true);
|
|
83
89
|
}
|
|
84
90
|
});
|
|
85
91
|
(0, _store.regSaga)('WATCH_SYSTEM_AUTHENTICATION', /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
|
@@ -313,19 +319,75 @@ var defaultLoginProps = {
|
|
|
313
319
|
}, _callee3, null, [[0, 17]]);
|
|
314
320
|
})();
|
|
315
321
|
}));
|
|
322
|
+
(0, _store.regSaga)((0, _effects.takeEvery)('TIMEOUT', /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
|
|
323
|
+
var system, token;
|
|
324
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
|
|
325
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
326
|
+
case 0:
|
|
327
|
+
_context4.next = 2;
|
|
328
|
+
return (0, _effects.select)(function (state) {
|
|
329
|
+
return state.getIn(['session', 'system']);
|
|
330
|
+
});
|
|
331
|
+
case 2:
|
|
332
|
+
system = _context4.sent;
|
|
333
|
+
if (!system) {
|
|
334
|
+
_context4.next = 8;
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
_context4.next = 6;
|
|
338
|
+
return (0, _effects.put)((0, _store.action)('TIMEOUT_SESSION'));
|
|
339
|
+
case 6:
|
|
340
|
+
_context4.next = 26;
|
|
341
|
+
break;
|
|
342
|
+
case 8:
|
|
343
|
+
_context4.prev = 8;
|
|
344
|
+
_context4.next = 11;
|
|
345
|
+
return (0, _effects.call)(_apis.retrieveJwt);
|
|
346
|
+
case 11:
|
|
347
|
+
token = _context4.sent;
|
|
348
|
+
if (!token) {
|
|
349
|
+
_context4.next = 17;
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
_context4.next = 15;
|
|
353
|
+
return (0, _effects.put)((0, _store.action)('SET_AUTHENTICATED', {
|
|
354
|
+
token: token
|
|
355
|
+
}));
|
|
356
|
+
case 15:
|
|
357
|
+
_context4.next = 19;
|
|
358
|
+
break;
|
|
359
|
+
case 17:
|
|
360
|
+
_context4.next = 19;
|
|
361
|
+
return (0, _effects.put)((0, _store.action)('TIMEOUT_SESSION'));
|
|
362
|
+
case 19:
|
|
363
|
+
_context4.next = 26;
|
|
364
|
+
break;
|
|
365
|
+
case 21:
|
|
366
|
+
_context4.prev = 21;
|
|
367
|
+
_context4.t0 = _context4["catch"](8);
|
|
368
|
+
_context4.next = 25;
|
|
369
|
+
return (0, _effects.put)((0, _store.action)('TIMEOUT_SESSION'));
|
|
370
|
+
case 25:
|
|
371
|
+
console.error(_context4.t0);
|
|
372
|
+
case 26:
|
|
373
|
+
case "end":
|
|
374
|
+
return _context4.stop();
|
|
375
|
+
}
|
|
376
|
+
}, _callee4, null, [[8, 21]]);
|
|
377
|
+
})));
|
|
316
378
|
var SYSTEM_TOKEN = 'kd-system';
|
|
317
379
|
(0, _store.regSaga)((0, _effects.takeEvery)('INITIALIZE', function (_ref3) {
|
|
318
380
|
var _ref3$payload = _ref3.payload,
|
|
319
381
|
system = _ref3$payload.system,
|
|
320
382
|
skipInit = _ref3$payload.skipInit;
|
|
321
|
-
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function
|
|
383
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee5() {
|
|
322
384
|
var token, localToken, parsedToken, isValid, _yield$call4, securityStrategies, _yield$call4$session, _yield$call4$session2, csrfToken, isAuthenticated, spaceSlug, error, _token;
|
|
323
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function
|
|
324
|
-
while (1) switch (
|
|
385
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee5$(_context5) {
|
|
386
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
325
387
|
case 0:
|
|
326
|
-
|
|
388
|
+
_context5.prev = 0;
|
|
327
389
|
if (!system) {
|
|
328
|
-
|
|
390
|
+
_context5.next = 8;
|
|
329
391
|
break;
|
|
330
392
|
}
|
|
331
393
|
localToken = localStorage ? localStorage.getItem(SYSTEM_TOKEN) : null;
|
|
@@ -334,19 +396,19 @@ var SYSTEM_TOKEN = 'kd-system';
|
|
|
334
396
|
isValid = _moment["default"].unix(parsedToken.exp).isAfter(new Date());
|
|
335
397
|
token = isValid ? localToken : null;
|
|
336
398
|
}
|
|
337
|
-
|
|
399
|
+
_context5.next = 6;
|
|
338
400
|
return (0, _effects.put)((0, _store.action)('SET_INITIALIZED', {
|
|
339
401
|
system: system,
|
|
340
402
|
token: token
|
|
341
403
|
}));
|
|
342
404
|
case 6:
|
|
343
|
-
|
|
405
|
+
_context5.next = 33;
|
|
344
406
|
break;
|
|
345
407
|
case 8:
|
|
346
|
-
|
|
408
|
+
_context5.next = 10;
|
|
347
409
|
return (0, _effects.call)(_apis.fetchSpaMeta);
|
|
348
410
|
case 10:
|
|
349
|
-
_yield$call4 =
|
|
411
|
+
_yield$call4 = _context5.sent;
|
|
350
412
|
securityStrategies = _yield$call4.securityStrategies;
|
|
351
413
|
_yield$call4$session = _yield$call4.session;
|
|
352
414
|
_yield$call4$session2 = _yield$call4$session === void 0 ? {} : _yield$call4$session;
|
|
@@ -355,30 +417,30 @@ var SYSTEM_TOKEN = 'kd-system';
|
|
|
355
417
|
spaceSlug = _yield$call4.spaceSlug;
|
|
356
418
|
error = _yield$call4.error;
|
|
357
419
|
if (!error) {
|
|
358
|
-
|
|
420
|
+
_context5.next = 23;
|
|
359
421
|
break;
|
|
360
422
|
}
|
|
361
|
-
|
|
423
|
+
_context5.next = 21;
|
|
362
424
|
return (0, _effects.put)((0, _store.action)('SET_SERVER_ERROR', error));
|
|
363
425
|
case 21:
|
|
364
|
-
|
|
426
|
+
_context5.next = 33;
|
|
365
427
|
break;
|
|
366
428
|
case 23:
|
|
367
429
|
if (!(isAuthenticated && !skipInit)) {
|
|
368
|
-
|
|
430
|
+
_context5.next = 29;
|
|
369
431
|
break;
|
|
370
432
|
}
|
|
371
|
-
|
|
433
|
+
_context5.next = 26;
|
|
372
434
|
return (0, _effects.call)(_apis.retrieveJwt);
|
|
373
435
|
case 26:
|
|
374
|
-
|
|
375
|
-
|
|
436
|
+
_context5.t0 = _context5.sent;
|
|
437
|
+
_context5.next = 30;
|
|
376
438
|
break;
|
|
377
439
|
case 29:
|
|
378
|
-
|
|
440
|
+
_context5.t0 = null;
|
|
379
441
|
case 30:
|
|
380
|
-
_token =
|
|
381
|
-
|
|
442
|
+
_token = _context5.t0;
|
|
443
|
+
_context5.next = 33;
|
|
382
444
|
return (0, _effects.put)((0, _store.action)('SET_INITIALIZED', {
|
|
383
445
|
csrfToken: csrfToken,
|
|
384
446
|
securityStrategies: securityStrategies,
|
|
@@ -386,87 +448,87 @@ var SYSTEM_TOKEN = 'kd-system';
|
|
|
386
448
|
token: _token
|
|
387
449
|
}));
|
|
388
450
|
case 33:
|
|
389
|
-
|
|
451
|
+
_context5.next = 38;
|
|
390
452
|
break;
|
|
391
453
|
case 35:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
console.error(
|
|
454
|
+
_context5.prev = 35;
|
|
455
|
+
_context5.t1 = _context5["catch"](0);
|
|
456
|
+
console.error(_context5.t1);
|
|
395
457
|
case 38:
|
|
396
458
|
case "end":
|
|
397
|
-
return
|
|
459
|
+
return _context5.stop();
|
|
398
460
|
}
|
|
399
|
-
},
|
|
461
|
+
}, _callee5, null, [[0, 35]]);
|
|
400
462
|
})();
|
|
401
463
|
}));
|
|
402
464
|
(0, _store.regSaga)((0, _effects.takeEvery)('LOGOUT_START', function (_ref4) {
|
|
403
465
|
var payload = _ref4.payload;
|
|
404
|
-
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function
|
|
466
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee6() {
|
|
405
467
|
var callback, isSaml, system, loggedIn;
|
|
406
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function
|
|
407
|
-
while (1) switch (
|
|
468
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee6$(_context6) {
|
|
469
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
408
470
|
case 0:
|
|
409
471
|
callback = payload.callback, isSaml = payload.isSaml;
|
|
410
|
-
|
|
411
|
-
|
|
472
|
+
_context6.prev = 1;
|
|
473
|
+
_context6.next = 4;
|
|
412
474
|
return (0, _effects.select)(function (state) {
|
|
413
475
|
return state.getIn(['session', 'system']);
|
|
414
476
|
});
|
|
415
477
|
case 4:
|
|
416
|
-
system =
|
|
417
|
-
|
|
478
|
+
system = _context6.sent;
|
|
479
|
+
_context6.next = 7;
|
|
418
480
|
return (0, _effects.select)(function (state) {
|
|
419
481
|
return state.getIn(['session', 'token']);
|
|
420
482
|
});
|
|
421
483
|
case 7:
|
|
422
|
-
loggedIn =
|
|
484
|
+
loggedIn = _context6.sent;
|
|
423
485
|
if (!(!system && loggedIn)) {
|
|
424
|
-
|
|
486
|
+
_context6.next = 11;
|
|
425
487
|
break;
|
|
426
488
|
}
|
|
427
|
-
|
|
489
|
+
_context6.next = 11;
|
|
428
490
|
return (0, _effects.call)(_apis.logoutDirect, isSaml);
|
|
429
491
|
case 11:
|
|
430
|
-
|
|
492
|
+
_context6.next = 13;
|
|
431
493
|
return (0, _effects.put)((0, _store.action)('LOGOUT'));
|
|
432
494
|
case 13:
|
|
433
495
|
if (!(0, _lodashEs.isFunction)(callback)) {
|
|
434
|
-
|
|
496
|
+
_context6.next = 16;
|
|
435
497
|
break;
|
|
436
498
|
}
|
|
437
|
-
|
|
499
|
+
_context6.next = 16;
|
|
438
500
|
return (0, _effects.call)(callback);
|
|
439
501
|
case 16:
|
|
440
|
-
|
|
502
|
+
_context6.next = 21;
|
|
441
503
|
break;
|
|
442
504
|
case 18:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
console.error(
|
|
505
|
+
_context6.prev = 18;
|
|
506
|
+
_context6.t0 = _context6["catch"](1);
|
|
507
|
+
console.error(_context6.t0);
|
|
446
508
|
case 21:
|
|
447
509
|
case "end":
|
|
448
|
-
return
|
|
510
|
+
return _context6.stop();
|
|
449
511
|
}
|
|
450
|
-
},
|
|
512
|
+
}, _callee6, null, [[1, 18]]);
|
|
451
513
|
})();
|
|
452
514
|
}));
|
|
453
515
|
(0, _store.regSaga)((0, _effects.takeEvery)('SET_AUTHENTICATED', function (_ref5) {
|
|
454
516
|
var payload = _ref5.payload;
|
|
455
|
-
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function
|
|
456
|
-
return (0, _regeneratorRuntime2["default"])().wrap(function
|
|
457
|
-
while (1) switch (
|
|
517
|
+
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee7() {
|
|
518
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee7$(_context7) {
|
|
519
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
458
520
|
case 0:
|
|
459
521
|
if (!(0, _lodashEs.isFunction)(payload.callback)) {
|
|
460
|
-
|
|
522
|
+
_context7.next = 3;
|
|
461
523
|
break;
|
|
462
524
|
}
|
|
463
|
-
|
|
525
|
+
_context7.next = 3;
|
|
464
526
|
return (0, _effects.call)(payload.callback);
|
|
465
527
|
case 3:
|
|
466
528
|
case "end":
|
|
467
|
-
return
|
|
529
|
+
return _context7.stop();
|
|
468
530
|
}
|
|
469
|
-
},
|
|
531
|
+
}, _callee7);
|
|
470
532
|
})();
|
|
471
533
|
}));
|
|
472
534
|
var onChangeUsername = function onChangeUsername(e) {
|
|
@@ -520,15 +582,15 @@ var AuthenticationComponent = exports.AuthenticationComponent = /*#__PURE__*/fun
|
|
|
520
582
|
var _this$props = this.props,
|
|
521
583
|
initialized = _this$props.initialized,
|
|
522
584
|
loggedIn = _this$props.loggedIn,
|
|
585
|
+
timedOut = _this$props.timedOut,
|
|
523
586
|
login = _this$props.login,
|
|
524
587
|
securityStrategies = _this$props.securityStrategies,
|
|
525
588
|
serverError = _this$props.serverError,
|
|
526
|
-
spaceSlug = _this$props.spaceSlug
|
|
527
|
-
|
|
528
|
-
return this.props.children({
|
|
589
|
+
spaceSlug = _this$props.spaceSlug;
|
|
590
|
+
var content = this.props.children({
|
|
529
591
|
serverError: serverError,
|
|
530
592
|
initialized: initialized,
|
|
531
|
-
timedOut: loggedIn &&
|
|
593
|
+
timedOut: loggedIn && timedOut,
|
|
532
594
|
loggedIn: loggedIn,
|
|
533
595
|
loginProps: (0, _objectSpread2["default"])({
|
|
534
596
|
onChangeUsername: onChangeUsername,
|
|
@@ -542,6 +604,9 @@ var AuthenticationComponent = exports.AuthenticationComponent = /*#__PURE__*/fun
|
|
|
542
604
|
} : null
|
|
543
605
|
}, login)
|
|
544
606
|
});
|
|
607
|
+
return this.props.preferences ? /*#__PURE__*/React.createElement(_PreferencesProvider.PreferencesProvider, {
|
|
608
|
+
loggedIn: loggedIn
|
|
609
|
+
}, content) : content;
|
|
545
610
|
}
|
|
546
611
|
}]);
|
|
547
612
|
return AuthenticationComponent;
|
|
@@ -550,6 +615,7 @@ var mapStateToProps = function mapStateToProps(state) {
|
|
|
550
615
|
return {
|
|
551
616
|
initialized: state.getIn(['session', 'initialized'], false),
|
|
552
617
|
loggedIn: state.getIn(['session', 'loggedIn'], false),
|
|
618
|
+
timedOut: state.getIn(['session', 'timedOut'], false),
|
|
553
619
|
token: state.getIn(['session', 'token'], null),
|
|
554
620
|
login: state.get('login', defaultLoginProps),
|
|
555
621
|
spaceSlug: state.getIn(['session', 'spaceSlug'], ''),
|