cozy-harvest-lib 21.0.3 → 21.0.4
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
|
@@ -3,6 +3,19 @@
|
|
|
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
|
+
## [21.0.4](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@21.0.3...cozy-harvest-lib@21.0.4) (2023-12-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add more function to policy ([653190d](https://github.com/cozy/cozy-libs/commit/653190dd37ee09163ac4b6e68ee8138e5fcc7f20))
|
|
12
|
+
* isDisconnected should be called with trigger ([f8bcb74](https://github.com/cozy/cozy-libs/commit/f8bcb74c4e02347b1dfc04b65baffd37db7fe05b))
|
|
13
|
+
* We want to display the button if its connected ([bbc5452](https://github.com/cozy/cozy-libs/commit/bbc545293186a80eebcf4feea0d67ae92e715ce9))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
## [21.0.3](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@21.0.2...cozy-harvest-lib@21.0.3) (2023-12-21)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package cozy-harvest-lib
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-check on
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { triggers as triggersModel } from 'cozy-client/dist/models/trigger';
|
|
3
4
|
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
@@ -25,7 +26,7 @@ function LaunchButton() {
|
|
|
25
26
|
|
|
26
27
|
var launch = flow.launch,
|
|
27
28
|
konnector = flow.konnector;
|
|
28
|
-
var isKonnectorDisconnected = isDisconnected(konnector);
|
|
29
|
+
var isKonnectorDisconnected = isDisconnected(konnector, trigger);
|
|
29
30
|
var konnectorPolicy = findKonnectorPolicy(konnector);
|
|
30
31
|
|
|
31
32
|
var onSync = function onSync() {
|
|
@@ -38,7 +39,7 @@ function LaunchButton() {
|
|
|
38
39
|
}
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
if (
|
|
42
|
+
if (isKonnectorDisconnected) {
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
45
|
|
package/dist/types.js
CHANGED
|
@@ -53,13 +53,16 @@
|
|
|
53
53
|
* @property {String} name
|
|
54
54
|
* @property {Function} refreshContracts
|
|
55
55
|
* @property {Function} fetchExtraOAuthUrlParams
|
|
56
|
-
* @property {Boolean} isBIWebView
|
|
56
|
+
* @property {Boolean} [isBIWebView]
|
|
57
57
|
* @property {Function} sendAdditionalInformation
|
|
58
58
|
* @property {Function} getAdditionalInformationNeeded
|
|
59
59
|
* @property {Boolean} needsAccountAndTriggerCreation
|
|
60
60
|
* @property {Boolean} needsTriggerLaunch
|
|
61
61
|
* @property {Function} onLaunch
|
|
62
62
|
* @property {Boolean} isRunnable
|
|
63
|
+
* @property {Function} shouldLaunchRedirectToEdit
|
|
64
|
+
* @property {Function} shouldLaunchDisplayOAuthWindow
|
|
65
|
+
* @property {Function} shouldDisplayRunningAlert
|
|
63
66
|
*/
|
|
64
67
|
|
|
65
68
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-harvest-lib",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.4",
|
|
4
4
|
"description": "Provides logic, modules and components for Cozy's harvest applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"react-router-dom": ">=4.3.1"
|
|
105
105
|
},
|
|
106
106
|
"sideEffects": false,
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "83a97eff69e3d708922cbae5e3e0a2d8431c6bea"
|
|
108
108
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-check on
|
|
1
2
|
import React from 'react'
|
|
2
3
|
|
|
3
4
|
import { triggers as triggersModel } from 'cozy-client/dist/models/trigger'
|
|
@@ -23,7 +24,7 @@ function LaunchButton({
|
|
|
23
24
|
|
|
24
25
|
const { launch, konnector } = flow
|
|
25
26
|
|
|
26
|
-
const isKonnectorDisconnected = isDisconnected(konnector)
|
|
27
|
+
const isKonnectorDisconnected = isDisconnected(konnector, trigger)
|
|
27
28
|
const konnectorPolicy = findKonnectorPolicy(konnector)
|
|
28
29
|
|
|
29
30
|
const onSync = () => {
|
|
@@ -41,7 +42,7 @@ function LaunchButton({
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
if (
|
|
45
|
+
if (isKonnectorDisconnected) {
|
|
45
46
|
return null
|
|
46
47
|
}
|
|
47
48
|
|
package/src/types.js
CHANGED
|
@@ -53,13 +53,16 @@
|
|
|
53
53
|
* @property {String} name
|
|
54
54
|
* @property {Function} refreshContracts
|
|
55
55
|
* @property {Function} fetchExtraOAuthUrlParams
|
|
56
|
-
* @property {Boolean} isBIWebView
|
|
56
|
+
* @property {Boolean} [isBIWebView]
|
|
57
57
|
* @property {Function} sendAdditionalInformation
|
|
58
58
|
* @property {Function} getAdditionalInformationNeeded
|
|
59
59
|
* @property {Boolean} needsAccountAndTriggerCreation
|
|
60
60
|
* @property {Boolean} needsTriggerLaunch
|
|
61
61
|
* @property {Function} onLaunch
|
|
62
62
|
* @property {Boolean} isRunnable
|
|
63
|
+
* @property {Function} shouldLaunchRedirectToEdit
|
|
64
|
+
* @property {Function} shouldLaunchDisplayOAuthWindow
|
|
65
|
+
* @property {Function} shouldDisplayRunningAlert
|
|
63
66
|
*/
|
|
64
67
|
|
|
65
68
|
/**
|