cozy-harvest-lib 9.2.4 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/components/TriggerManager.js +12 -18
- package/package.json +4 -4
- package/src/components/TriggerManager.jsx +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [9.3.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.2.7...cozy-harvest-lib@9.3.0) (2022-05-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Remove useVaultClient call in LegacyTriggerManager ([439e603](https://github.com/cozy/cozy-libs/commit/439e603cef915e9fede72ae293ae35ca330347eb))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [9.2.7](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.2.6...cozy-harvest-lib@9.2.7) (2022-05-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* bump leaflet from 1.7.1 to 1.8.0 ([e4ae32d](https://github.com/cozy/cozy-libs/commit/e4ae32d7610a5e969147354405cfdde5e913bf34))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [9.2.6](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.2.5...cozy-harvest-lib@9.2.6) (2022-05-13)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package cozy-harvest-lib
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [9.2.5](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.2.4...cozy-harvest-lib@9.2.5) (2022-05-13)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package cozy-harvest-lib
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## [9.2.4](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.2.3...cozy-harvest-lib@9.2.4) (2022-05-13)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package cozy-harvest-lib
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
6
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -10,9 +9,6 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
10
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
11
10
|
var _excluded = ["onLaunch", "onSuccess", "onLoginSuccess", "onError", "initialTrigger"],
|
|
12
11
|
_excluded2 = ["vaultUnlockFormProps"];
|
|
13
|
-
|
|
14
|
-
var _DumbTriggerManager$p;
|
|
15
|
-
|
|
16
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
17
13
|
|
|
18
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -28,7 +24,7 @@ import { Account } from 'cozy-doctypes';
|
|
|
28
24
|
import { translate } from 'cozy-ui/transpiled/react/I18n';
|
|
29
25
|
import Spinner from 'cozy-ui/transpiled/react/Spinner';
|
|
30
26
|
import { ModalBackButton } from 'cozy-ui/transpiled/react/Modal';
|
|
31
|
-
import { CipherType, withVaultUnlockContext, VaultUnlockPlaceholder, VaultUnlockProvider,
|
|
27
|
+
import { CipherType, withVaultUnlockContext, VaultUnlockPlaceholder, VaultUnlockProvider, CozyUtils } from 'cozy-keys-lib';
|
|
32
28
|
import AccountForm from './AccountForm';
|
|
33
29
|
import OAuthForm from './OAuthForm';
|
|
34
30
|
import { fetchAccount } from '../connections/accounts';
|
|
@@ -568,7 +564,7 @@ export var DumbTriggerManager = /*#__PURE__*/function (_Component) {
|
|
|
568
564
|
|
|
569
565
|
return DumbTriggerManager;
|
|
570
566
|
}(Component);
|
|
571
|
-
DumbTriggerManager.propTypes =
|
|
567
|
+
DumbTriggerManager.propTypes = {
|
|
572
568
|
/**
|
|
573
569
|
* Account document. Used to get initial form values.
|
|
574
570
|
* If no account is passed, AccountForm will use empty initial values.
|
|
@@ -609,21 +605,19 @@ DumbTriggerManager.propTypes = (_DumbTriggerManager$p = {
|
|
|
609
605
|
vaultClient: PropTypes.object,
|
|
610
606
|
client: PropTypes.object,
|
|
611
607
|
onError: PropTypes.func,
|
|
612
|
-
showUnlockForm: PropTypes.func
|
|
613
|
-
|
|
608
|
+
showUnlockForm: PropTypes.func,
|
|
609
|
+
error: PropTypes.any,
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Used to have options on fields (forceEncryptedPlaceholder or focus)
|
|
613
|
+
*/
|
|
614
|
+
fieldOptions: PropTypes.object,
|
|
615
|
+
flow: PropTypes.object,
|
|
616
|
+
flowState: PropTypes.object
|
|
617
|
+
};
|
|
614
618
|
var TriggerManager = compose(translate(), withClient, withVaultUnlockContext, withConnectionFlow())(DumbTriggerManager); // TriggerManager is exported wrapped in FlowProvider to avoid breaking changes.
|
|
615
619
|
|
|
616
620
|
var LegacyTriggerManager = function LegacyTriggerManager(props) {
|
|
617
|
-
// Since the 4.1.0 of cozy-keys-lib, we
|
|
618
|
-
// render children even if vaultClient is
|
|
619
|
-
// not defined yet. In that case we we were
|
|
620
|
-
// displaying TriggerManager without vaultClient.
|
|
621
|
-
// It was raising an error.
|
|
622
|
-
// The current fix, is to not display the
|
|
623
|
-
// TriggerManager when vaultClient is null.
|
|
624
|
-
var vaultClient = useVaultClient();
|
|
625
|
-
if (!vaultClient) return null;
|
|
626
|
-
|
|
627
621
|
var onLaunch = props.onLaunch,
|
|
628
622
|
onSuccess = props.onSuccess,
|
|
629
623
|
onLoginSuccess = props.onLoginSuccess,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-harvest-lib",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Provides logic, modules and components for Cozy's harvest applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"cozy-client": "27.17.0",
|
|
56
56
|
"cozy-device-helper": "^2.1.0",
|
|
57
57
|
"cozy-flags": "^2.8.7",
|
|
58
|
-
"cozy-intent": "^2.0.
|
|
58
|
+
"cozy-intent": "^2.0.2",
|
|
59
59
|
"cozy-keys-lib": "^4.1.9",
|
|
60
60
|
"cozy-realtime": "^4.1.0",
|
|
61
61
|
"cozy-ui": "60.6.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"jest-environment-jsdom-sixteen": "1.0.3",
|
|
68
68
|
"jest-resolve-cached": "1.0.0",
|
|
69
69
|
"jsdom": "16.4.0",
|
|
70
|
-
"leaflet": "1.
|
|
70
|
+
"leaflet": "1.8.0",
|
|
71
71
|
"prop-types": "15.7.2",
|
|
72
72
|
"react": "16.12.0",
|
|
73
73
|
"react-dom": "16.13.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"react-router-dom": "^5.0.1"
|
|
88
88
|
},
|
|
89
89
|
"sideEffects": false,
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "057e65e2c3e1c367a49e348b494b2b21a7e90e6f"
|
|
91
91
|
}
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
withVaultUnlockContext,
|
|
16
16
|
VaultUnlockPlaceholder,
|
|
17
17
|
VaultUnlockProvider,
|
|
18
|
-
useVaultClient,
|
|
19
18
|
CozyUtils
|
|
20
19
|
} from 'cozy-keys-lib'
|
|
21
20
|
|
|
@@ -424,15 +423,7 @@ DumbTriggerManager.propTypes = {
|
|
|
424
423
|
client: PropTypes.object,
|
|
425
424
|
onError: PropTypes.func,
|
|
426
425
|
showUnlockForm: PropTypes.func,
|
|
427
|
-
onVaultDismiss: PropTypes.func,
|
|
428
426
|
error: PropTypes.any,
|
|
429
|
-
/**
|
|
430
|
-
* Indicates if the AccountForm has to show errors. Sometimes errors may be
|
|
431
|
-
* displayed elsewhere. However, a KonnectorJobError corresponding to a login
|
|
432
|
-
* error is always displayed.
|
|
433
|
-
* @type {Boolean}
|
|
434
|
-
*/
|
|
435
|
-
showError: PropTypes.bool,
|
|
436
427
|
/**
|
|
437
428
|
* Used to have options on fields (forceEncryptedPlaceholder or focus)
|
|
438
429
|
*/
|
|
@@ -450,15 +441,6 @@ const TriggerManager = compose(
|
|
|
450
441
|
|
|
451
442
|
// TriggerManager is exported wrapped in FlowProvider to avoid breaking changes.
|
|
452
443
|
const LegacyTriggerManager = props => {
|
|
453
|
-
// Since the 4.1.0 of cozy-keys-lib, we
|
|
454
|
-
// render children even if vaultClient is
|
|
455
|
-
// not defined yet. In that case we we were
|
|
456
|
-
// displaying TriggerManager without vaultClient.
|
|
457
|
-
// It was raising an error.
|
|
458
|
-
// The current fix, is to not display the
|
|
459
|
-
// TriggerManager when vaultClient is null.
|
|
460
|
-
const vaultClient = useVaultClient()
|
|
461
|
-
if (!vaultClient) return null
|
|
462
444
|
const {
|
|
463
445
|
onLaunch,
|
|
464
446
|
onSuccess,
|