cozy-harvest-lib 9.26.5 → 9.26.8
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 +31 -0
- package/dist/components/DisconnectedAccountModal.spec.js +7 -0
- package/dist/components/KonnectorConfiguration/ConfigurationTab/Contracts.js +4 -2
- package/dist/components/OAuthForm.js +1 -1
- package/dist/locales/en.json +2 -2
- package/dist/locales/fr.json +2 -2
- package/package.json +4 -4
- package/src/components/DisconnectedAccountModal.spec.jsx +7 -0
- package/src/components/KonnectorConfiguration/ConfigurationTab/Contracts.jsx +2 -1
- package/src/components/OAuthForm.jsx +1 -1
- package/src/locales/en.json +2 -2
- package/src/locales/fr.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
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.26.8](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.26.7...cozy-harvest-lib@9.26.8) (2022-09-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Open oauth window for oauth connectors ([e8293f6](https://github.com/cozy/cozy-libs/commit/e8293f659d3d9bb643fb528b4328885ba451e79e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [9.26.7](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.26.6...cozy-harvest-lib@9.26.7) (2022-09-06)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package cozy-harvest-lib
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [9.26.6](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.26.5...cozy-harvest-lib@9.26.6) (2022-08-31)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* Add realtime on bank accounts ([3a03448](https://github.com/cozy/cozy-libs/commit/3a03448e0a371377023f9ec1c856dbdb53fd3e68))
|
|
31
|
+
* Better msg on ACCOUNT_WITH_SAME_IDENTIFIER_ALREADY_DEFINED error ([afc1f1c](https://github.com/cozy/cozy-libs/commit/afc1f1c84cb7a8c16a0d84942c6a6bbd68bd50ba))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
6
37
|
## [9.26.5](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.26.4...cozy-harvest-lib@9.26.5) (2022-08-29)
|
|
7
38
|
|
|
8
39
|
**Note:** Version bump only for package cozy-harvest-lib
|
|
@@ -6,6 +6,13 @@ import bankAccounts from './KonnectorConfiguration/ConfigurationTab/bank-account
|
|
|
6
6
|
describe('DisconnectedAccountModal', function () {
|
|
7
7
|
var setup = function setup() {
|
|
8
8
|
var mockClient = {};
|
|
9
|
+
mockClient.plugins = {
|
|
10
|
+
realtime: {
|
|
11
|
+
subscribe: jest.fn(),
|
|
12
|
+
unsubscribe: jest.fn()
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
mockClient.dispatch = jest.fn();
|
|
9
16
|
var root = render( /*#__PURE__*/React.createElement(AppLike, {
|
|
10
17
|
client: mockClient
|
|
11
18
|
}, /*#__PURE__*/React.createElement(DisconnectedAccountModal, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import compose from 'lodash/flowRight';
|
|
4
|
-
import CozyClient, { Q, queryConnect } from 'cozy-client';
|
|
4
|
+
import CozyClient, { Q, queryConnect, RealTimeQueries } from 'cozy-client';
|
|
5
5
|
import MuiCozyTheme from 'cozy-ui/transpiled/react/MuiCozyTheme';
|
|
6
6
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
7
|
import NavigationList, { NavigationListSection, NavigationListHeader } from 'cozy-ui/transpiled/react/NavigationList';
|
|
@@ -42,7 +42,9 @@ var DumbContracts = function DumbContracts(_ref2) {
|
|
|
42
42
|
if (contractData.length === 0) return null;
|
|
43
43
|
var doctype = contractData[0] ? contractData[0]._type : null;
|
|
44
44
|
var headerKey = customHeaderPerDoctype[doctype] || 'default';
|
|
45
|
-
return /*#__PURE__*/React.createElement(MuiCozyTheme, null, /*#__PURE__*/React.createElement(
|
|
45
|
+
return /*#__PURE__*/React.createElement(MuiCozyTheme, null, /*#__PURE__*/React.createElement(RealTimeQueries, {
|
|
46
|
+
doctype: "io.cozy.bank.accounts"
|
|
47
|
+
}), /*#__PURE__*/React.createElement(NavigationList, null, /*#__PURE__*/React.createElement(NavigationListHeader, null, t("contracts.headers.".concat(headerKey))), /*#__PURE__*/React.createElement(NavigationListSection, null, contractData && contractData.map(function (contract, i) {
|
|
46
48
|
return /*#__PURE__*/React.createElement(ContractItem, {
|
|
47
49
|
key: contract._id,
|
|
48
50
|
konnector: konnector,
|
|
@@ -173,7 +173,7 @@ export var OAuthForm = /*#__PURE__*/function (_PureComponent) {
|
|
|
173
173
|
extension: "full",
|
|
174
174
|
label: t(buttonLabel),
|
|
175
175
|
onClick: this.handleConnect
|
|
176
|
-
}), showOAuthWindow && extraParams && /*#__PURE__*/React.createElement(OAuthWindow, {
|
|
176
|
+
}), showOAuthWindow && (!needExtraParams || extraParams) && /*#__PURE__*/React.createElement(OAuthWindow, {
|
|
177
177
|
extraParams: extraParams,
|
|
178
178
|
konnector: konnector,
|
|
179
179
|
reconnect: reconnect,
|
package/dist/locales/en.json
CHANGED
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
},
|
|
218
218
|
"ACCOUNT_WITH_SAME_IDENTIFIER_ALREADY_DEFINED": {
|
|
219
219
|
"title": "This account already exists",
|
|
220
|
-
"description": "
|
|
220
|
+
"description": "Your possible modification of the list of synchronized accounts will be taken into account within a few minutes."
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
},
|
|
@@ -541,4 +541,4 @@
|
|
|
541
541
|
"caption": "This service retrieves your latest documents and keeps a complete back-up for you."
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
}
|
|
544
|
+
}
|
package/dist/locales/fr.json
CHANGED
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
},
|
|
218
218
|
"ACCOUNT_WITH_SAME_IDENTIFIER_ALREADY_DEFINED": {
|
|
219
219
|
"title": "Ce compte est déjà configuré",
|
|
220
|
-
"description": "
|
|
220
|
+
"description": "Votre éventuelle modification de la liste des comptes synchronisés sera prise en compte sous quelques minutes."
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
},
|
|
@@ -541,4 +541,4 @@
|
|
|
541
541
|
"caption": "Ce service récupère vos derniers documents et garde une sauvegarde complète pour vous."
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
}
|
|
544
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-harvest-lib",
|
|
3
|
-
"version": "9.26.
|
|
3
|
+
"version": "9.26.8",
|
|
4
4
|
"description": "Provides logic, modules and components for Cozy's harvest applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
54
54
|
"babel-preset-cozy-app": "^2.0.3",
|
|
55
55
|
"cozy-client": "27.17.0",
|
|
56
|
-
"cozy-device-helper": "^2.
|
|
56
|
+
"cozy-device-helper": "^2.3.0",
|
|
57
57
|
"cozy-flags": "^2.10.1",
|
|
58
58
|
"cozy-intent": "^2.3.2",
|
|
59
59
|
"cozy-keys-lib": "^4.1.9",
|
|
60
|
-
"cozy-realtime": "^4.2.
|
|
60
|
+
"cozy-realtime": "^4.2.4",
|
|
61
61
|
"cozy-ui": "60.6.0",
|
|
62
62
|
"enzyme": "3.11.0",
|
|
63
63
|
"enzyme-adapter-react-16": "1.15.6",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"react-router-dom": "^5.0.1"
|
|
91
91
|
},
|
|
92
92
|
"sideEffects": false,
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "cc7470cbd830844cd34130df19bbea8b514aa305"
|
|
94
94
|
}
|
|
@@ -8,6 +8,13 @@ import bankAccounts from './KonnectorConfiguration/ConfigurationTab/bank-account
|
|
|
8
8
|
describe('DisconnectedAccountModal', () => {
|
|
9
9
|
const setup = () => {
|
|
10
10
|
const mockClient = {}
|
|
11
|
+
mockClient.plugins = {
|
|
12
|
+
realtime: {
|
|
13
|
+
subscribe: jest.fn(),
|
|
14
|
+
unsubscribe: jest.fn()
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
mockClient.dispatch = jest.fn()
|
|
11
18
|
const root = render(
|
|
12
19
|
<AppLike client={mockClient}>
|
|
13
20
|
<DisconnectedAccountModal
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import compose from 'lodash/flowRight'
|
|
4
4
|
|
|
5
|
-
import CozyClient, { Q, queryConnect } from 'cozy-client'
|
|
5
|
+
import CozyClient, { Q, queryConnect, RealTimeQueries } from 'cozy-client'
|
|
6
6
|
import MuiCozyTheme from 'cozy-ui/transpiled/react/MuiCozyTheme'
|
|
7
7
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
8
|
import NavigationList, {
|
|
@@ -52,6 +52,7 @@ const DumbContracts = ({
|
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
54
|
<MuiCozyTheme>
|
|
55
|
+
<RealTimeQueries doctype="io.cozy.bank.accounts" />
|
|
55
56
|
<NavigationList>
|
|
56
57
|
<NavigationListHeader>
|
|
57
58
|
{t(`contracts.headers.${headerKey}`)}
|
|
@@ -138,7 +138,7 @@ export class OAuthForm extends PureComponent {
|
|
|
138
138
|
onClick={this.handleConnect}
|
|
139
139
|
/>
|
|
140
140
|
)}
|
|
141
|
-
{showOAuthWindow && extraParams && (
|
|
141
|
+
{showOAuthWindow && (!needExtraParams || extraParams) && (
|
|
142
142
|
<OAuthWindow
|
|
143
143
|
extraParams={extraParams}
|
|
144
144
|
konnector={konnector}
|
package/src/locales/en.json
CHANGED
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
},
|
|
218
218
|
"ACCOUNT_WITH_SAME_IDENTIFIER_ALREADY_DEFINED": {
|
|
219
219
|
"title": "This account already exists",
|
|
220
|
-
"description": "
|
|
220
|
+
"description": "Your possible modification of the list of synchronized accounts will be taken into account within a few minutes."
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
},
|
|
@@ -541,4 +541,4 @@
|
|
|
541
541
|
"caption": "This service retrieves your latest documents and keeps a complete back-up for you."
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
}
|
|
544
|
+
}
|
package/src/locales/fr.json
CHANGED
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
},
|
|
218
218
|
"ACCOUNT_WITH_SAME_IDENTIFIER_ALREADY_DEFINED": {
|
|
219
219
|
"title": "Ce compte est déjà configuré",
|
|
220
|
-
"description": "
|
|
220
|
+
"description": "Votre éventuelle modification de la liste des comptes synchronisés sera prise en compte sous quelques minutes."
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
},
|
|
@@ -541,4 +541,4 @@
|
|
|
541
541
|
"caption": "Ce service récupère vos derniers documents et garde une sauvegarde complète pour vous."
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
}
|
|
544
|
+
}
|