cozy-harvest-lib 21.0.2 → 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,27 @@
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
+
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)
20
+
21
+ **Note:** Version bump only for package cozy-harvest-lib
22
+
23
+
24
+
25
+
26
+
6
27
  ## [21.0.2](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@21.0.1...cozy-harvest-lib@21.0.2) (2023-12-20)
7
28
 
8
29
  **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 (!isKonnectorDisconnected) {
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.2",
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",
@@ -33,8 +33,8 @@
33
33
  "@sentry/browser": "^6.0.1",
34
34
  "classnames": "^2.3.1",
35
35
  "cozy-bi-auth": "0.0.25",
36
- "cozy-doctypes": "^1.89.0",
37
- "cozy-logger": "^1.10.1",
36
+ "cozy-doctypes": "^1.89.1",
37
+ "cozy-logger": "^1.10.2",
38
38
  "date-fns": "^1.30.1",
39
39
  "final-form": "^4.18.5",
40
40
  "lodash": "^4.17.19",
@@ -67,7 +67,7 @@
67
67
  "cozy-client": "^45.0.1",
68
68
  "cozy-device-helper": "^3.0.0",
69
69
  "cozy-flags": "^3.2.0",
70
- "cozy-intent": "^2.18.0",
70
+ "cozy-intent": "^2.18.1",
71
71
  "cozy-keys-lib": "^6.0.0",
72
72
  "cozy-realtime": "^5.0.0",
73
73
  "cozy-tsconfig": "^1.0.0",
@@ -104,5 +104,5 @@
104
104
  "react-router-dom": ">=4.3.1"
105
105
  },
106
106
  "sideEffects": false,
107
- "gitHead": "356b0dd816b43a57e6f405683975ef688d1fafc1"
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 (!isKonnectorDisconnected) {
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
  /**