cozy-harvest-lib 26.2.0 → 27.0.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 CHANGED
@@ -3,6 +3,32 @@
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
+ # [27.0.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@26.2.1...cozy-harvest-lib@27.0.0) (2024-07-16)
7
+
8
+
9
+ ### Features
10
+
11
+ * Replace Alerter by AlertProvider ([3e32363](https://github.com/cozy/cozy-libs/commit/3e32363e72c4d62eabec4b52047e2b1aec3bdf74))
12
+ * Upgrade packages ([dc89875](https://github.com/cozy/cozy-libs/commit/dc8987541f7c1fa385ca733ecfca11f83be8f364))
13
+
14
+
15
+ ### BREAKING CHANGES
16
+
17
+ * you must have `cozy-client >= 48.8.8` and `cozy-ui >= 111.0.0`
18
+ * Deprecated `Alerter` is no longer required. You must use `AlertProvider` instead.
19
+
20
+
21
+
22
+
23
+
24
+ ## [26.2.1](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@26.2.0...cozy-harvest-lib@26.2.1) (2024-07-11)
25
+
26
+ **Note:** Version bump only for package cozy-harvest-lib
27
+
28
+
29
+
30
+
31
+
6
32
  # [26.2.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@26.1.0...cozy-harvest-lib@26.2.0) (2024-07-05)
7
33
 
8
34
 
@@ -16,7 +16,7 @@ import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
16
16
  import CollectionField from 'cozy-ui/transpiled/react/Labs/CollectionField';
17
17
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
18
18
  import Stack from 'cozy-ui/transpiled/react/Stack';
19
- import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter';
19
+ import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
20
20
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
21
21
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
22
22
  import { withStyles } from 'cozy-ui/transpiled/react/styles';
@@ -82,6 +82,10 @@ var EditContract = function EditContract(props) {
82
82
 
83
83
  var client = useClient();
84
84
  var tracker = useTracker();
85
+
86
+ var _useAlert = useAlert(),
87
+ showAlert = _useAlert.showAlert;
88
+
85
89
  var contract = props.contract,
86
90
  onAfterRemove = props.onAfterRemove,
87
91
  _onSuccess = props.onSuccess,
@@ -137,7 +141,10 @@ var EditContract = function EditContract(props) {
137
141
  _onSuccess();
138
142
  }
139
143
 
140
- Alerter.success(t('contractForm.success'));
144
+ showAlert({
145
+ message: t('contractForm.success'),
146
+ severity: 'success'
147
+ });
141
148
  },
142
149
  onError: function onError(err) {
143
150
  if (_onError) {
@@ -146,7 +153,10 @@ var EditContract = function EditContract(props) {
146
153
 
147
154
 
148
155
  console.error(err);
149
- Alerter.error(t('contractForm.failure'));
156
+ showAlert({
157
+ message: t('contractForm.failure'),
158
+ severity: 'error'
159
+ });
150
160
  }
151
161
  });
152
162
 
@@ -217,7 +227,10 @@ var EditContract = function EditContract(props) {
217
227
  _context2.t0 = _context2["catch"](1);
218
228
  // eslint-disable-next-line no-console
219
229
  console.error(_context2.t0);
220
- Alerter.error(t('contractForm.deletion_error'));
230
+ showAlert({
231
+ message: t('contractForm.deletion_error'),
232
+ severity: 'error'
233
+ });
221
234
 
222
235
  case 12:
223
236
  _context2.prev = 12;
@@ -48,49 +48,75 @@ describe('EditContract', function () {
48
48
  expect(root.getByPlaceholderText('Label').value).toBe('Mon compte sociétaire');
49
49
  expect(root.getByPlaceholderText('Bank').value).toBe("Caisse d'Épargne Particuliers");
50
50
  });
51
- it('can edit the label', function () {
52
- var _setup2 = setup(),
53
- root = _setup2.root,
54
- client = _setup2.client;
51
+ it('can edit the label', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
52
+ var _setup2, root, client, labelInput, btn;
55
53
 
56
- var labelInput = root.getByPlaceholderText('Label');
57
- fireEvent.change(labelInput, {
58
- target: {
59
- value: 'Mes actions sociétaire'
54
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
55
+ while (1) {
56
+ switch (_context2.prev = _context2.next) {
57
+ case 0:
58
+ _setup2 = setup(), root = _setup2.root, client = _setup2.client;
59
+ labelInput = root.getByPlaceholderText('Label');
60
+ fireEvent.change(labelInput, {
61
+ target: {
62
+ value: 'Mes actions sociétaire'
63
+ }
64
+ });
65
+ btn = root.getByText('Apply').closest('button');
66
+ _context2.next = 6;
67
+ return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
68
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
69
+ while (1) {
70
+ switch (_context.prev = _context.next) {
71
+ case 0:
72
+ fireEvent.click(btn);
73
+
74
+ case 1:
75
+ case "end":
76
+ return _context.stop();
77
+ }
78
+ }
79
+ }, _callee);
80
+ })));
81
+
82
+ case 6:
83
+ expect(client.save).toHaveBeenCalledWith(expect.objectContaining({
84
+ shortLabel: 'Mes actions sociétaire'
85
+ }));
86
+
87
+ case 7:
88
+ case "end":
89
+ return _context2.stop();
90
+ }
60
91
  }
61
- });
62
- var btn = root.getByText('Apply').closest('button');
63
- fireEvent.click(btn);
64
- expect(client.save).toHaveBeenCalledWith(expect.objectContaining({
65
- shortLabel: 'Mes actions sociétaire'
66
- }));
67
- });
68
- it('shows confirmation deletion and allows to delete contract', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
92
+ }, _callee2);
93
+ })));
94
+ it('shows confirmation deletion and allows to delete contract', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
69
95
  var _setup3, root, client, btn, confirmBtn;
70
96
 
71
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
97
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
72
98
  while (1) {
73
- switch (_context2.prev = _context2.next) {
99
+ switch (_context4.prev = _context4.next) {
74
100
  case 0:
75
101
  _setup3 = setup(), root = _setup3.root, client = _setup3.client;
76
102
  btn = root.getByText('Remove the account');
77
103
  fireEvent.click(btn);
78
104
  confirmBtn = root.getByText('Confirm account deletion');
79
105
  expect(client.destroy).not.toHaveBeenCalled();
80
- _context2.next = 7;
81
- return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
82
- return _regeneratorRuntime.wrap(function _callee$(_context) {
106
+ _context4.next = 7;
107
+ return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
108
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
83
109
  while (1) {
84
- switch (_context.prev = _context.next) {
110
+ switch (_context3.prev = _context3.next) {
85
111
  case 0:
86
112
  fireEvent.click(confirmBtn);
87
113
 
88
114
  case 1:
89
115
  case "end":
90
- return _context.stop();
116
+ return _context3.stop();
91
117
  }
92
118
  }
93
- }, _callee);
119
+ }, _callee3);
94
120
  })));
95
121
 
96
122
  case 7:
@@ -98,9 +124,9 @@ describe('EditContract', function () {
98
124
 
99
125
  case 8:
100
126
  case "end":
101
- return _context2.stop();
127
+ return _context4.stop();
102
128
  }
103
129
  }
104
- }, _callee2);
130
+ }, _callee4);
105
131
  })));
106
132
  });
@@ -20,7 +20,7 @@ import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryA
20
20
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
21
21
  import NavigationList, { NavigationListSection, NavigationListHeader } from 'cozy-ui/transpiled/react/NavigationList';
22
22
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
23
- import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter';
23
+ import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
24
24
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
25
25
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'; // @ts-ignore peerDep
26
26
 
@@ -82,6 +82,9 @@ var ConfigurationTab = function ConfigurationTab(_ref2) {
82
82
  var client = useClient();
83
83
  var vaultClient = useVaultClient();
84
84
 
85
+ var _useAlert = useAlert(),
86
+ showAlert = _useAlert.showAlert;
87
+
85
88
  var _useSafeState = useSafeState(false),
86
89
  _useSafeState2 = _slicedToArray(_useSafeState, 2),
87
90
  deleting = _useSafeState2[0],
@@ -154,8 +157,10 @@ var ConfigurationTab = function ConfigurationTab(_ref2) {
154
157
  return deleteAccount(client, account);
155
158
 
156
159
  case 5:
157
- // @ts-ignore La propriété 'success' n'existe pas sur le type '(...args: any[]) => any'.
158
- Alerter.success(t('modal.updateAccount.delete-account-success')); // @ts-ignore 0 arguments attendus, mais 1 reçus.
160
+ showAlert({
161
+ message: t('modal.updateAccount.delete-account-success'),
162
+ severity: 'success'
163
+ }); // @ts-ignore 0 arguments attendus, mais 1 reçus.
159
164
 
160
165
  tracker.trackEvent({
161
166
  name: 'compte_bancaire_supprime',
@@ -168,9 +173,11 @@ var ConfigurationTab = function ConfigurationTab(_ref2) {
168
173
  _context2.prev = 9;
169
174
  _context2.t0 = _context2["catch"](1);
170
175
  // eslint-disable-next-line no-console
171
- console.warn('Error while deleting account', _context2.t0); // @ts-ignore La propriété 'error' n'existe pas sur le type '(...args: any[]) => any'.
172
-
173
- Alerter.error(t('modal.updateAccount.delete-account-error'));
176
+ console.warn('Error while deleting account', _context2.t0);
177
+ showAlert({
178
+ message: t('modal.updateAccount.delete-account-error'),
179
+ severity: 'error'
180
+ });
174
181
 
175
182
  case 13:
176
183
  _context2.prev = 13;
@@ -6,7 +6,7 @@ import { useVaultUnlockContext, VaultUnlockPlaceholder } from 'cozy-keys-lib';
6
6
  import { DialogCloseButton, useCozyDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
7
7
  import Dialog from 'cozy-ui/transpiled/react/Dialog';
8
8
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
9
- import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter';
9
+ import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
10
10
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
11
11
  import { withStyles } from 'cozy-ui/transpiled/react/styles';
12
12
  import { DatacardOptions } from './Datacards/DatacardOptionsContext';
@@ -85,6 +85,9 @@ var Routes = function Routes(_ref) {
85
85
  disableTitleAutoPadding: true
86
86
  });
87
87
 
88
+ var _useAlert = useAlert(),
89
+ showAlert = _useAlert.showAlert;
90
+
88
91
  var _useKonnectorWithTrig = useKonnectorWithTriggers(konnectorSlug, konnector),
89
92
  konnectorWithTriggers = _useKonnectorWithTrig.konnectorWithTriggers,
90
93
  fetching = _useKonnectorWithTrig.fetching,
@@ -93,9 +96,12 @@ var Routes = function Routes(_ref) {
93
96
  useEffect(function () {
94
97
  if (notFoundError) {
95
98
  onDismiss();
96
- Alerter.error(t('error.application-not-found'));
99
+ showAlert({
100
+ message: t('error.application-not-found'),
101
+ severity: 'error'
102
+ });
97
103
  }
98
- }, [notFoundError, onDismiss, t]);
104
+ }, [notFoundError, onDismiss, t, showAlert]);
99
105
  return /*#__PURE__*/React.createElement(DatacardOptions, {
100
106
  options: datacardOptions
101
107
  }, /*#__PURE__*/React.createElement(HarvestWrapper, {
@@ -1,94 +1,104 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`OAuthForm should bypass reconnect button when updating an account 1`] = `<div />`;
3
+ exports[`OAuthForm should bypass reconnect button when updating an account 1`] = `
4
+ <div>
5
+ <div
6
+ class="CozyTheme--light-normal u-dc"
7
+ />
8
+ </div>
9
+ `;
4
10
 
5
11
  exports[`OAuthForm should handle oauth cancelation 1`] = `
6
12
  <div>
7
13
  <div
8
- class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
14
+ class="CozyTheme--light-normal u-dc"
9
15
  >
10
16
  <div
11
- class="styles__Stack--m___1tSpV"
17
+ class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
12
18
  >
13
19
  <div
14
- class="styles__Infos-description___3q8sW"
20
+ class="styles__Stack--m___1tSpV"
15
21
  >
16
22
  <div
17
- class="styles__Stack--xs___2R5lW"
23
+ class="styles__Infos-description___3q8sW"
18
24
  >
19
- <h6
20
- class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
21
- >
22
- Canceled
23
- </h6>
24
25
  <div
25
- class="MuiTypography-root MuiTypography-body1"
26
+ class="styles__Stack--xs___2R5lW"
26
27
  >
27
- <span
28
- class="u-db u-mv-0"
28
+ <h6
29
+ class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
30
+ >
31
+ Canceled
32
+ </h6>
33
+ <div
34
+ class="MuiTypography-root MuiTypography-body1"
29
35
  >
30
- We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
31
- </span>
36
+ <span
37
+ class="u-db u-mv-0"
38
+ >
39
+ We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
40
+ </span>
41
+ </div>
32
42
  </div>
33
43
  </div>
34
44
  </div>
35
45
  </div>
36
- </div>
37
- <div
38
- class="styles__c-card___YgP7B u-flex u-flex-wrap"
39
- >
40
46
  <div
41
- class="styles__c-empty___3w5oV"
47
+ class="styles__c-card___YgP7B u-flex u-flex-wrap"
42
48
  >
43
- CloudSync2
44
- <h3
45
- class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
46
- >
47
- oauth.connect.title
48
- </h3>
49
- <p
50
- class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
51
- >
52
- oauth.connect.description
53
- </p>
54
49
  <div
55
- class="styles__c-empty-text___3HnvR"
56
- />
57
- </div>
58
- <button
59
- class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation Mui-disabled Mui-disabled"
60
- disabled=""
61
- tabindex="-1"
62
- type="button"
63
- >
64
- <span
65
- class="MuiButton-label"
50
+ class="styles__c-empty___3w5oV"
51
+ >
52
+ CloudSync2
53
+ <h3
54
+ class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
55
+ >
56
+ oauth.connect.title
57
+ </h3>
58
+ <p
59
+ class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
60
+ >
61
+ oauth.connect.description
62
+ </p>
63
+ <div
64
+ class="styles__c-empty-text___3HnvR"
65
+ />
66
+ </div>
67
+ <button
68
+ class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation Mui-disabled Mui-disabled"
69
+ disabled=""
70
+ tabindex="-1"
71
+ type="button"
66
72
  >
67
- oauth.connect.submit
68
73
  <span
69
- class="MuiButton-endIcon MuiButton-iconSizeMedium"
74
+ class="MuiButton-label"
70
75
  >
71
- <svg
72
- aria-busy="true"
73
- aria-hidden="true"
74
- class="styles__icon___23x3R styles__icon--spin___ybfC1"
75
- focusable="false"
76
- height="16"
77
- role="progressbar"
78
- viewBox="0 0 32 32"
79
- width="16"
76
+ oauth.connect.submit
77
+ <span
78
+ class="MuiButton-endIcon MuiButton-iconSizeMedium"
80
79
  >
81
- <path
82
- d="M16 0a16 16 0 000 32 16 16 0 000-32m0 4a12 12 0 010 24 12 12 0 010-24"
83
- opacity="0.25"
84
- />
85
- <path
86
- d="M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"
87
- />
88
- </svg>
80
+ <svg
81
+ aria-busy="true"
82
+ aria-hidden="true"
83
+ class="styles__icon___23x3R styles__icon--spin___ybfC1"
84
+ focusable="false"
85
+ height="16"
86
+ role="progressbar"
87
+ viewBox="0 0 32 32"
88
+ width="16"
89
+ >
90
+ <path
91
+ d="M16 0a16 16 0 000 32 16 16 0 000-32m0 4a12 12 0 010 24 12 12 0 010-24"
92
+ opacity="0.25"
93
+ />
94
+ <path
95
+ d="M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"
96
+ />
97
+ </svg>
98
+ </span>
89
99
  </span>
90
- </span>
91
- </button>
100
+ </button>
101
+ </div>
92
102
  </div>
93
103
  </div>
94
104
  `;
@@ -96,70 +106,74 @@ exports[`OAuthForm should handle oauth cancelation 1`] = `
96
106
  exports[`OAuthForm should handle oauth cancelation 2`] = `
97
107
  <div>
98
108
  <div
99
- class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
109
+ class="CozyTheme--light-normal u-dc"
100
110
  >
101
111
  <div
102
- class="styles__Stack--m___1tSpV"
112
+ class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
103
113
  >
104
114
  <div
105
- class="styles__Infos-description___3q8sW"
115
+ class="styles__Stack--m___1tSpV"
106
116
  >
107
117
  <div
108
- class="styles__Stack--xs___2R5lW"
118
+ class="styles__Infos-description___3q8sW"
109
119
  >
110
- <h6
111
- class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
112
- >
113
- Canceled
114
- </h6>
115
120
  <div
116
- class="MuiTypography-root MuiTypography-body1"
121
+ class="styles__Stack--xs___2R5lW"
117
122
  >
118
- <span
119
- class="u-db u-mv-0"
123
+ <h6
124
+ class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
125
+ >
126
+ Canceled
127
+ </h6>
128
+ <div
129
+ class="MuiTypography-root MuiTypography-body1"
120
130
  >
121
- We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
122
- </span>
131
+ <span
132
+ class="u-db u-mv-0"
133
+ >
134
+ We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
135
+ </span>
136
+ </div>
123
137
  </div>
124
138
  </div>
125
139
  </div>
126
140
  </div>
127
- </div>
128
- <div
129
- class="styles__c-card___YgP7B u-flex u-flex-wrap"
130
- >
131
141
  <div
132
- class="styles__c-empty___3w5oV"
142
+ class="styles__c-card___YgP7B u-flex u-flex-wrap"
133
143
  >
134
- CloudSync2
135
- <h3
136
- class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
144
+ <div
145
+ class="styles__c-empty___3w5oV"
137
146
  >
138
- oauth.connect.title
139
- </h3>
140
- <p
141
- class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
147
+ CloudSync2
148
+ <h3
149
+ class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
150
+ >
151
+ oauth.connect.title
152
+ </h3>
153
+ <p
154
+ class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
155
+ >
156
+ oauth.connect.description
157
+ </p>
158
+ <div
159
+ class="styles__c-empty-text___3HnvR"
160
+ />
161
+ </div>
162
+ <button
163
+ class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
164
+ tabindex="0"
165
+ type="button"
142
166
  >
143
- oauth.connect.description
144
- </p>
145
- <div
146
- class="styles__c-empty-text___3HnvR"
147
- />
167
+ <span
168
+ class="MuiButton-label"
169
+ >
170
+ oauth.connect.submit
171
+ </span>
172
+ <span
173
+ class="MuiTouchRipple-root"
174
+ />
175
+ </button>
148
176
  </div>
149
- <button
150
- class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
151
- tabindex="0"
152
- type="button"
153
- >
154
- <span
155
- class="MuiButton-label"
156
- >
157
- oauth.connect.submit
158
- </span>
159
- <span
160
- class="MuiTouchRipple-root"
161
- />
162
- </button>
163
177
  </div>
164
178
  </div>
165
179
  `;
@@ -167,40 +181,44 @@ exports[`OAuthForm should handle oauth cancelation 2`] = `
167
181
  exports[`OAuthForm should render 1`] = `
168
182
  <div>
169
183
  <div
170
- class="styles__c-card___YgP7B u-flex u-flex-wrap"
184
+ class="CozyTheme--light-normal u-dc"
171
185
  >
172
186
  <div
173
- class="styles__c-empty___3w5oV"
187
+ class="styles__c-card___YgP7B u-flex u-flex-wrap"
174
188
  >
175
- CloudSync2
176
- <h3
177
- class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
189
+ <div
190
+ class="styles__c-empty___3w5oV"
178
191
  >
179
- oauth.connect.title
180
- </h3>
181
- <p
182
- class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
192
+ CloudSync2
193
+ <h3
194
+ class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
195
+ >
196
+ oauth.connect.title
197
+ </h3>
198
+ <p
199
+ class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
200
+ >
201
+ oauth.connect.description
202
+ </p>
203
+ <div
204
+ class="styles__c-empty-text___3HnvR"
205
+ />
206
+ </div>
207
+ <button
208
+ class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
209
+ tabindex="0"
210
+ type="button"
183
211
  >
184
- oauth.connect.description
185
- </p>
186
- <div
187
- class="styles__c-empty-text___3HnvR"
188
- />
212
+ <span
213
+ class="MuiButton-label"
214
+ >
215
+ oauth.connect.submit
216
+ </span>
217
+ <span
218
+ class="MuiTouchRipple-root"
219
+ />
220
+ </button>
189
221
  </div>
190
- <button
191
- class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
192
- tabindex="0"
193
- type="button"
194
- >
195
- <span
196
- class="MuiButton-label"
197
- >
198
- oauth.connect.submit
199
- </span>
200
- <span
201
- class="MuiTouchRipple-root"
202
- />
203
- </button>
204
222
  </div>
205
223
  </div>
206
224
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-harvest-lib",
3
- "version": "26.2.0",
3
+ "version": "27.0.0",
4
4
  "description": "Provides logic, modules and components for Cozy's harvest applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -33,7 +33,7 @@
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.91.0",
36
+ "cozy-doctypes": "^1.91.1",
37
37
  "cozy-logger": "^1.10.4",
38
38
  "date-fns": "^1.30.1",
39
39
  "final-form": "^4.18.5",
@@ -65,15 +65,15 @@
65
65
  "babel-jest": "26.6.3",
66
66
  "babel-plugin-inline-react-svg": "1.1.2",
67
67
  "babel-preset-cozy-app": "^2.1.0",
68
- "cozy-client": "^47.6.0",
68
+ "cozy-client": "^48.8.0",
69
69
  "cozy-device-helper": "^3.0.0",
70
- "cozy-flags": "^3.2.2",
70
+ "cozy-flags": "^4.0.0",
71
71
  "cozy-intent": "^2.22.0",
72
72
  "cozy-interapp": "^0.9.0",
73
73
  "cozy-keys-lib": "^6.1.1",
74
74
  "cozy-realtime": "^5.0.1",
75
75
  "cozy-tsconfig": "^1.2.0",
76
- "cozy-ui": "^108.0.0",
76
+ "cozy-ui": "^111.0.0",
77
77
  "enzyme": "3.11.0",
78
78
  "enzyme-adapter-react-16": "1.15.6",
79
79
  "form-data": "4.0.0",
@@ -94,18 +94,18 @@
94
94
  },
95
95
  "peerDependencies": {
96
96
  "@babel/runtime": ">=7.12.5",
97
- "cozy-client": ">=47.6.0",
97
+ "cozy-client": ">=48.8.0",
98
98
  "cozy-device-helper": ">=2.6.0",
99
99
  "cozy-flags": ">=2.3.5",
100
100
  "cozy-intent": ">=1.14.1",
101
101
  "cozy-interapp": ">=0.9.0",
102
102
  "cozy-keys-lib": ">=6.1.1",
103
103
  "cozy-realtime": ">=4.2.8",
104
- "cozy-ui": ">=108.0.0",
104
+ "cozy-ui": ">=111.0.0",
105
105
  "leaflet": "^1.7.1",
106
106
  "react-router": "3.2.6",
107
107
  "react-router-dom": ">=4.3.1"
108
108
  },
109
109
  "sideEffects": false,
110
- "gitHead": "be77d460607ec83143827a6d01677f0def225f4d"
110
+ "gitHead": "bb8af08240428b7161da4f40895f9a8e4c458a3b"
111
111
  }
@@ -26,7 +26,7 @@ import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash'
26
26
  import CollectionField from 'cozy-ui/transpiled/react/Labs/CollectionField'
27
27
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
28
28
  import Stack from 'cozy-ui/transpiled/react/Stack'
29
- import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'
29
+ import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
30
30
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
31
31
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
32
32
  import { withStyles } from 'cozy-ui/transpiled/react/styles'
@@ -94,6 +94,7 @@ const EditContract = props => {
94
94
  const { isMobile } = useBreakpoints()
95
95
  const client = useClient()
96
96
  const tracker = useTracker()
97
+ const { showAlert } = useAlert()
97
98
 
98
99
  const { contract, onAfterRemove, onSuccess, onClose, onError } = props
99
100
 
@@ -127,7 +128,10 @@ const EditContract = props => {
127
128
  if (onSuccess) {
128
129
  onSuccess()
129
130
  }
130
- Alerter.success(t('contractForm.success'))
131
+ showAlert({
132
+ message: t('contractForm.success'),
133
+ severity: 'success'
134
+ })
131
135
  },
132
136
  onError: err => {
133
137
  if (onError) {
@@ -135,7 +139,10 @@ const EditContract = props => {
135
139
  }
136
140
  // eslint-disable-next-line no-console
137
141
  console.error(err)
138
- Alerter.error(t('contractForm.failure'))
142
+ showAlert({
143
+ message: t('contractForm.failure'),
144
+ severity: 'error'
145
+ })
139
146
  }
140
147
  })
141
148
  }
@@ -170,7 +177,10 @@ const EditContract = props => {
170
177
  } catch (err) {
171
178
  // eslint-disable-next-line no-console
172
179
  console.error(err)
173
- Alerter.error(t('contractForm.deletion_error'))
180
+ showAlert({
181
+ message: t('contractForm.deletion_error'),
182
+ severity: 'error'
183
+ })
174
184
  } finally {
175
185
  setDeleting(false)
176
186
  }
@@ -37,22 +37,30 @@ describe('EditContract', () => {
37
37
 
38
38
  it('should show fields of the bank account', () => {
39
39
  const { root } = setup()
40
+
40
41
  expect(root.getByPlaceholderText('Label').value).toBe(
41
42
  'Mon compte sociétaire'
42
43
  )
44
+
43
45
  expect(root.getByPlaceholderText('Bank').value).toBe(
44
46
  "Caisse d'Épargne Particuliers"
45
47
  )
46
48
  })
47
49
 
48
- it('can edit the label', () => {
50
+ it('can edit the label', async () => {
49
51
  const { root, client } = setup()
50
52
  const labelInput = root.getByPlaceholderText('Label')
53
+
51
54
  fireEvent.change(labelInput, {
52
55
  target: { value: 'Mes actions sociétaire' }
53
56
  })
57
+
54
58
  const btn = root.getByText('Apply').closest('button')
55
- fireEvent.click(btn)
59
+
60
+ await act(async () => {
61
+ fireEvent.click(btn)
62
+ })
63
+
56
64
  expect(client.save).toHaveBeenCalledWith(
57
65
  expect.objectContaining({
58
66
  shortLabel: 'Mes actions sociétaire'
@@ -66,9 +74,11 @@ describe('EditContract', () => {
66
74
  fireEvent.click(btn)
67
75
  const confirmBtn = root.getByText('Confirm account deletion')
68
76
  expect(client.destroy).not.toHaveBeenCalled()
77
+
69
78
  await act(async () => {
70
79
  fireEvent.click(confirmBtn)
71
80
  })
81
+
72
82
  expect(client.destroy).toHaveBeenCalled()
73
83
  })
74
84
  })
@@ -21,7 +21,7 @@ import NavigationList, {
21
21
  NavigationListHeader
22
22
  } from 'cozy-ui/transpiled/react/NavigationList'
23
23
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
24
- import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'
24
+ import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
25
25
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
26
26
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
27
27
  // @ts-ignore peerDep
@@ -81,6 +81,7 @@ const ConfigurationTab = ({
81
81
  const { pushHistory } = useContext(MountPointContext)
82
82
  const client = useClient()
83
83
  const vaultClient = useVaultClient()
84
+ const { showAlert } = useAlert()
84
85
  const [deleting, setDeleting] = useSafeState(false)
85
86
  const [requestingDeletion, setRequestDeletion] = useState(false)
86
87
  const tracker = useTracker()
@@ -107,8 +108,10 @@ const ConfigurationTab = ({
107
108
  try {
108
109
  onAccountDeleted(account)
109
110
  await deleteAccount(client, account)
110
- // @ts-ignore La propriété 'success' n'existe pas sur le type '(...args: any[]) => any'.
111
- Alerter.success(t('modal.updateAccount.delete-account-success'))
111
+ showAlert({
112
+ message: t('modal.updateAccount.delete-account-success'),
113
+ severity: 'success'
114
+ })
112
115
  // @ts-ignore 0 arguments attendus, mais 1 reçus.
113
116
  tracker.trackEvent({
114
117
  name: 'compte_bancaire_supprime',
@@ -117,8 +120,10 @@ const ConfigurationTab = ({
117
120
  } catch (error) {
118
121
  // eslint-disable-next-line no-console
119
122
  console.warn('Error while deleting account', error)
120
- // @ts-ignore La propriété 'error' n'existe pas sur le type '(...args: any[]) => any'.
121
- Alerter.error(t('modal.updateAccount.delete-account-error'))
123
+ showAlert({
124
+ message: t('modal.updateAccount.delete-account-error'),
125
+ severity: 'error'
126
+ })
122
127
  } finally {
123
128
  setDeleting(false)
124
129
  }
@@ -9,7 +9,7 @@ import {
9
9
  } from 'cozy-ui/transpiled/react/CozyDialogs'
10
10
  import Dialog from 'cozy-ui/transpiled/react/Dialog'
11
11
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
12
- import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'
12
+ import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
13
13
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
14
14
  import { withStyles } from 'cozy-ui/transpiled/react/styles'
15
15
 
@@ -80,6 +80,7 @@ const Routes = ({
80
80
  onClose: onDismiss,
81
81
  disableTitleAutoPadding: true
82
82
  })
83
+ const { showAlert } = useAlert()
83
84
 
84
85
  const { konnectorWithTriggers, fetching, notFoundError } =
85
86
  useKonnectorWithTriggers(konnectorSlug, konnector)
@@ -87,9 +88,12 @@ const Routes = ({
87
88
  useEffect(() => {
88
89
  if (notFoundError) {
89
90
  onDismiss()
90
- Alerter.error(t('error.application-not-found'))
91
+ showAlert({
92
+ message: t('error.application-not-found'),
93
+ severity: 'error'
94
+ })
91
95
  }
92
- }, [notFoundError, onDismiss, t])
96
+ }, [notFoundError, onDismiss, t, showAlert])
93
97
 
94
98
  return (
95
99
  <DatacardOptions options={datacardOptions}>
@@ -1,94 +1,104 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`OAuthForm should bypass reconnect button when updating an account 1`] = `<div />`;
3
+ exports[`OAuthForm should bypass reconnect button when updating an account 1`] = `
4
+ <div>
5
+ <div
6
+ class="CozyTheme--light-normal u-dc"
7
+ />
8
+ </div>
9
+ `;
4
10
 
5
11
  exports[`OAuthForm should handle oauth cancelation 1`] = `
6
12
  <div>
7
13
  <div
8
- class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
14
+ class="CozyTheme--light-normal u-dc"
9
15
  >
10
16
  <div
11
- class="styles__Stack--m___1tSpV"
17
+ class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
12
18
  >
13
19
  <div
14
- class="styles__Infos-description___3q8sW"
20
+ class="styles__Stack--m___1tSpV"
15
21
  >
16
22
  <div
17
- class="styles__Stack--xs___2R5lW"
23
+ class="styles__Infos-description___3q8sW"
18
24
  >
19
- <h6
20
- class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
21
- >
22
- Canceled
23
- </h6>
24
25
  <div
25
- class="MuiTypography-root MuiTypography-body1"
26
+ class="styles__Stack--xs___2R5lW"
26
27
  >
27
- <span
28
- class="u-db u-mv-0"
28
+ <h6
29
+ class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
30
+ >
31
+ Canceled
32
+ </h6>
33
+ <div
34
+ class="MuiTypography-root MuiTypography-body1"
29
35
  >
30
- We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
31
- </span>
36
+ <span
37
+ class="u-db u-mv-0"
38
+ >
39
+ We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
40
+ </span>
41
+ </div>
32
42
  </div>
33
43
  </div>
34
44
  </div>
35
45
  </div>
36
- </div>
37
- <div
38
- class="styles__c-card___YgP7B u-flex u-flex-wrap"
39
- >
40
46
  <div
41
- class="styles__c-empty___3w5oV"
47
+ class="styles__c-card___YgP7B u-flex u-flex-wrap"
42
48
  >
43
- CloudSync2
44
- <h3
45
- class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
46
- >
47
- oauth.connect.title
48
- </h3>
49
- <p
50
- class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
51
- >
52
- oauth.connect.description
53
- </p>
54
49
  <div
55
- class="styles__c-empty-text___3HnvR"
56
- />
57
- </div>
58
- <button
59
- class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation Mui-disabled Mui-disabled"
60
- disabled=""
61
- tabindex="-1"
62
- type="button"
63
- >
64
- <span
65
- class="MuiButton-label"
50
+ class="styles__c-empty___3w5oV"
51
+ >
52
+ CloudSync2
53
+ <h3
54
+ class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
55
+ >
56
+ oauth.connect.title
57
+ </h3>
58
+ <p
59
+ class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
60
+ >
61
+ oauth.connect.description
62
+ </p>
63
+ <div
64
+ class="styles__c-empty-text___3HnvR"
65
+ />
66
+ </div>
67
+ <button
68
+ class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation Mui-disabled Mui-disabled"
69
+ disabled=""
70
+ tabindex="-1"
71
+ type="button"
66
72
  >
67
- oauth.connect.submit
68
73
  <span
69
- class="MuiButton-endIcon MuiButton-iconSizeMedium"
74
+ class="MuiButton-label"
70
75
  >
71
- <svg
72
- aria-busy="true"
73
- aria-hidden="true"
74
- class="styles__icon___23x3R styles__icon--spin___ybfC1"
75
- focusable="false"
76
- height="16"
77
- role="progressbar"
78
- viewBox="0 0 32 32"
79
- width="16"
76
+ oauth.connect.submit
77
+ <span
78
+ class="MuiButton-endIcon MuiButton-iconSizeMedium"
80
79
  >
81
- <path
82
- d="M16 0a16 16 0 000 32 16 16 0 000-32m0 4a12 12 0 010 24 12 12 0 010-24"
83
- opacity="0.25"
84
- />
85
- <path
86
- d="M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"
87
- />
88
- </svg>
80
+ <svg
81
+ aria-busy="true"
82
+ aria-hidden="true"
83
+ class="styles__icon___23x3R styles__icon--spin___ybfC1"
84
+ focusable="false"
85
+ height="16"
86
+ role="progressbar"
87
+ viewBox="0 0 32 32"
88
+ width="16"
89
+ >
90
+ <path
91
+ d="M16 0a16 16 0 000 32 16 16 0 000-32m0 4a12 12 0 010 24 12 12 0 010-24"
92
+ opacity="0.25"
93
+ />
94
+ <path
95
+ d="M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"
96
+ />
97
+ </svg>
98
+ </span>
89
99
  </span>
90
- </span>
91
- </button>
100
+ </button>
101
+ </div>
92
102
  </div>
93
103
  </div>
94
104
  `;
@@ -96,70 +106,74 @@ exports[`OAuthForm should handle oauth cancelation 1`] = `
96
106
  exports[`OAuthForm should handle oauth cancelation 2`] = `
97
107
  <div>
98
108
  <div
99
- class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
109
+ class="CozyTheme--light-normal u-dc"
100
110
  >
101
111
  <div
102
- class="styles__Stack--m___1tSpV"
112
+ class="styles__Infos___tpCYh styles__Infos--danger___1HWww u-mb-1"
103
113
  >
104
114
  <div
105
- class="styles__Infos-description___3q8sW"
115
+ class="styles__Stack--m___1tSpV"
106
116
  >
107
117
  <div
108
- class="styles__Stack--xs___2R5lW"
118
+ class="styles__Infos-description___3q8sW"
109
119
  >
110
- <h6
111
- class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
112
- >
113
- Canceled
114
- </h6>
115
120
  <div
116
- class="MuiTypography-root MuiTypography-body1"
121
+ class="styles__Stack--xs___2R5lW"
117
122
  >
118
- <span
119
- class="u-db u-mv-0"
123
+ <h6
124
+ class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom"
125
+ >
126
+ Canceled
127
+ </h6>
128
+ <div
129
+ class="MuiTypography-root MuiTypography-body1"
120
130
  >
121
- We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
122
- </span>
131
+ <span
132
+ class="u-db u-mv-0"
133
+ >
134
+ We could not add your bank since you canceled the connection. Click "Add your bank" one more time to try again.
135
+ </span>
136
+ </div>
123
137
  </div>
124
138
  </div>
125
139
  </div>
126
140
  </div>
127
- </div>
128
- <div
129
- class="styles__c-card___YgP7B u-flex u-flex-wrap"
130
- >
131
141
  <div
132
- class="styles__c-empty___3w5oV"
142
+ class="styles__c-card___YgP7B u-flex u-flex-wrap"
133
143
  >
134
- CloudSync2
135
- <h3
136
- class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
144
+ <div
145
+ class="styles__c-empty___3w5oV"
137
146
  >
138
- oauth.connect.title
139
- </h3>
140
- <p
141
- class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
147
+ CloudSync2
148
+ <h3
149
+ class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
150
+ >
151
+ oauth.connect.title
152
+ </h3>
153
+ <p
154
+ class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
155
+ >
156
+ oauth.connect.description
157
+ </p>
158
+ <div
159
+ class="styles__c-empty-text___3HnvR"
160
+ />
161
+ </div>
162
+ <button
163
+ class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
164
+ tabindex="0"
165
+ type="button"
142
166
  >
143
- oauth.connect.description
144
- </p>
145
- <div
146
- class="styles__c-empty-text___3HnvR"
147
- />
167
+ <span
168
+ class="MuiButton-label"
169
+ >
170
+ oauth.connect.submit
171
+ </span>
172
+ <span
173
+ class="MuiTouchRipple-root"
174
+ />
175
+ </button>
148
176
  </div>
149
- <button
150
- class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
151
- tabindex="0"
152
- type="button"
153
- >
154
- <span
155
- class="MuiButton-label"
156
- >
157
- oauth.connect.submit
158
- </span>
159
- <span
160
- class="MuiTouchRipple-root"
161
- />
162
- </button>
163
177
  </div>
164
178
  </div>
165
179
  `;
@@ -167,40 +181,44 @@ exports[`OAuthForm should handle oauth cancelation 2`] = `
167
181
  exports[`OAuthForm should render 1`] = `
168
182
  <div>
169
183
  <div
170
- class="styles__c-card___YgP7B u-flex u-flex-wrap"
184
+ class="CozyTheme--light-normal u-dc"
171
185
  >
172
186
  <div
173
- class="styles__c-empty___3w5oV"
187
+ class="styles__c-card___YgP7B u-flex u-flex-wrap"
174
188
  >
175
- CloudSync2
176
- <h3
177
- class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
189
+ <div
190
+ class="styles__c-empty___3w5oV"
178
191
  >
179
- oauth.connect.title
180
- </h3>
181
- <p
182
- class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
192
+ CloudSync2
193
+ <h3
194
+ class="MuiTypography-root MuiTypography-h3 MuiTypography-colorTextPrimary MuiTypography-gutterBottom"
195
+ >
196
+ oauth.connect.title
197
+ </h3>
198
+ <p
199
+ class="MuiTypography-root MuiTypography-body1 MuiTypography-colorTextSecondary MuiTypography-gutterBottom"
200
+ >
201
+ oauth.connect.description
202
+ </p>
203
+ <div
204
+ class="styles__c-empty-text___3HnvR"
205
+ />
206
+ </div>
207
+ <button
208
+ class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
209
+ tabindex="0"
210
+ type="button"
183
211
  >
184
- oauth.connect.description
185
- </p>
186
- <div
187
- class="styles__c-empty-text___3HnvR"
188
- />
212
+ <span
213
+ class="MuiButton-label"
214
+ >
215
+ oauth.connect.submit
216
+ </span>
217
+ <span
218
+ class="MuiTouchRipple-root"
219
+ />
220
+ </button>
189
221
  </div>
190
- <button
191
- class="MuiButtonBase-root MuiButton-root MuiButton-contained customColor-primary u-mh-auto MuiButton-containedPrimary MuiButton-disableElevation"
192
- tabindex="0"
193
- type="button"
194
- >
195
- <span
196
- class="MuiButton-label"
197
- >
198
- oauth.connect.submit
199
- </span>
200
- <span
201
- class="MuiTouchRipple-root"
202
- />
203
- </button>
204
222
  </div>
205
223
  </div>
206
224
  `;
package/test/AppLike.jsx CHANGED
@@ -3,7 +3,9 @@ import { Provider as ReduxProvider } from 'react-redux'
3
3
 
4
4
  import CozyClient, { CozyProvider as CozyClientProvider } from 'cozy-client'
5
5
  import { useCozyDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
6
+ import AlertProvider from 'cozy-ui/transpiled/react/providers/Alert'
6
7
  import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
8
+ import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme'
7
9
  import I18n from 'cozy-ui/transpiled/react/providers/I18n'
8
10
 
9
11
  import DialogContext from '../src/components/DialogContext'
@@ -23,13 +25,17 @@ const AppLike = ({
23
25
 
24
26
  return (
25
27
  <CozyClientProvider client={client}>
26
- <BreakpointsProvider>
27
- <DialogContextApp>
28
- <I18n lang="en" dictRequire={() => locale || enLocale}>
29
- <ReduxProvider store={store}>{children}</ReduxProvider>
30
- </I18n>
31
- </DialogContextApp>
32
- </BreakpointsProvider>
28
+ <CozyTheme>
29
+ <BreakpointsProvider>
30
+ <AlertProvider>
31
+ <DialogContextApp>
32
+ <I18n lang="en" dictRequire={() => locale || enLocale}>
33
+ <ReduxProvider store={store}>{children}</ReduxProvider>
34
+ </I18n>
35
+ </DialogContextApp>
36
+ </AlertProvider>
37
+ </BreakpointsProvider>
38
+ </CozyTheme>
33
39
  </CozyClientProvider>
34
40
  )
35
41
  }