cozy-harvest-lib 13.3.0 → 13.4.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 +12 -0
- package/dist/components/AccountForm/CannotConnectModal.js +14 -8
- package/dist/components/Markdown.js +7 -3
- package/dist/locales/en.json +2 -1
- package/dist/locales/fr.json +2 -1
- package/package.json +2 -2
- package/src/components/AccountForm/CannotConnectModal.jsx +15 -7
- package/src/components/Markdown.jsx +2 -1
- package/src/locales/en.json +2 -1
- package/src/locales/fr.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
# [13.4.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@13.3.0...cozy-harvest-lib@13.4.0) (2023-02-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **harvest:** Add create account wording in CannotConnectModal ([1d78356](https://github.com/cozy/cozy-libs/commit/1d78356b441b70c4da0a0ad06df3250edfe5ae52))
|
|
12
|
+
* **harvest:** Add props propagation on Markdown component ([f76f9a6](https://github.com/cozy/cozy-libs/commit/f76f9a6a22c6bbe23169638973b68ecfb7842257))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [13.3.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@13.2.2...cozy-harvest-lib@13.3.0) (2023-02-16)
|
|
7
19
|
|
|
8
20
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
4
|
-
import Link from 'cozy-ui/transpiled/react/Link';
|
|
5
4
|
import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
|
|
6
5
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
6
|
import { useComponentsProps } from '../Providers/ComponentsPropsProvider';
|
|
7
|
+
import Markdown from '../Markdown';
|
|
8
8
|
|
|
9
9
|
var CannotConnectModal = function CannotConnectModal(_ref) {
|
|
10
10
|
var _ComponentsProps$Cann;
|
|
@@ -24,13 +24,19 @@ var CannotConnectModal = function CannotConnectModal(_ref) {
|
|
|
24
24
|
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, {
|
|
25
25
|
variant: "h4",
|
|
26
26
|
className: "u-mb-1"
|
|
27
|
-
}, t('accountForm.cannotConnectModal.title')), /*#__PURE__*/React.createElement(
|
|
28
|
-
className: "u-mb-1"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
27
|
+
}, t('accountForm.cannotConnectModal.title')), /*#__PURE__*/React.createElement(Markdown, {
|
|
28
|
+
className: "u-mb-1",
|
|
29
|
+
source: t('accountForm.cannotConnectModal.content', {
|
|
30
|
+
vendorLink: vendorLink,
|
|
31
|
+
vendorName: vendorName
|
|
32
|
+
})
|
|
33
|
+
}), /*#__PURE__*/React.createElement(Markdown, {
|
|
34
|
+
className: "u-mb-1",
|
|
35
|
+
source: t('accountForm.cannotConnectModal.noAccount', {
|
|
36
|
+
vendorLink: vendorLink,
|
|
37
|
+
vendorName: vendorName
|
|
38
|
+
})
|
|
39
|
+
}), ComponentsProps === null || ComponentsProps === void 0 ? void 0 : (_ComponentsProps$Cann = ComponentsProps.CannotConnectModal) === null || _ComponentsProps$Cann === void 0 ? void 0 : _ComponentsProps$Cann.extraContent),
|
|
34
40
|
onClose: onClose
|
|
35
41
|
});
|
|
36
42
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
var _excluded = ["source", "linkProps"];
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import ReactMarkdown from 'react-markdown';
|
|
4
6
|
import Link from 'cozy-ui/transpiled/react/Link';
|
|
@@ -24,13 +26,15 @@ var reactMarkdownRendererOptions = function reactMarkdownRendererOptions(_ref) {
|
|
|
24
26
|
|
|
25
27
|
export var Markdown = function Markdown(_ref2) {
|
|
26
28
|
var source = _ref2.source,
|
|
27
|
-
linkProps = _ref2.linkProps
|
|
28
|
-
|
|
29
|
+
linkProps = _ref2.linkProps,
|
|
30
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
31
|
+
|
|
32
|
+
return /*#__PURE__*/React.createElement(ReactMarkdown, _extends({}, props, {
|
|
29
33
|
source: source,
|
|
30
34
|
linkTarget: "_blank",
|
|
31
35
|
renderers: reactMarkdownRendererOptions({
|
|
32
36
|
linkProps: linkProps
|
|
33
37
|
})
|
|
34
|
-
});
|
|
38
|
+
}));
|
|
35
39
|
};
|
|
36
40
|
export default Markdown;
|
package/dist/locales/en.json
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"cannotConnectModal": {
|
|
25
25
|
"title": "You can't connect?",
|
|
26
|
-
"content": "You can check your login or reset your password on the website
|
|
26
|
+
"content": "You can check your login or reset your password on the [%{vendorName}](%{vendorLink})'s website.",
|
|
27
|
+
"noAccount": "If you do not have an account you will need to create one on the [%{vendorName}](%{vendorLink})'s website."
|
|
27
28
|
},
|
|
28
29
|
"cannotConnectLink": "I can't connect",
|
|
29
30
|
"notClientSide": "The %{name} application uses a brand-new and efficient system for retrieving your data from your Cozy. This action is only accessible from the Cozy mobile app."
|
package/dist/locales/fr.json
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"cannotConnectModal": {
|
|
25
25
|
"title": "Vous ne parvenez pas à vous connecter ?",
|
|
26
|
-
"content": "Vous pouvez vérifier vos identifiants ou réinitialiser votre mot de passe sur le site "
|
|
26
|
+
"content": "Vous pouvez vérifier vos identifiants ou réinitialiser votre mot de passe sur le site [%{vendorName}](%{vendorLink}).",
|
|
27
|
+
"noAccount": "Si vous n'avez pas de compte il vous faudra en créer sur le site [%{vendorName}](%{vendorLink})."
|
|
27
28
|
},
|
|
28
29
|
"cannotConnectLink": "Je ne parviens pas à me connecter",
|
|
29
30
|
"notClientSide": "L'application %{name} utilise un nouveau système plus efficace pour la récupération de vos données dans votre Cozy. Cette action est uniquement accessible depuis l’application mobile Cozy."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-harvest-lib",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.4.0",
|
|
4
4
|
"description": "Provides logic, modules and components for Cozy's harvest applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"react-router-dom": ">=4.3.1"
|
|
89
89
|
},
|
|
90
90
|
"sideEffects": false,
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "33d3c7625a16ca02a771e5df5e9695366096261e"
|
|
92
92
|
}
|
|
@@ -2,11 +2,11 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
|
|
4
4
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
5
|
-
import Link from 'cozy-ui/transpiled/react/Link'
|
|
6
5
|
import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
7
6
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
7
|
|
|
9
8
|
import { useComponentsProps } from '../Providers/ComponentsPropsProvider'
|
|
9
|
+
import Markdown from '../Markdown'
|
|
10
10
|
|
|
11
11
|
const CannotConnectModal = ({ vendorName, vendorLink, onClose }) => {
|
|
12
12
|
const { t } = useI18n()
|
|
@@ -20,12 +20,20 @@ const CannotConnectModal = ({ vendorName, vendorLink, onClose }) => {
|
|
|
20
20
|
<Typography variant="h4" className="u-mb-1">
|
|
21
21
|
{t('accountForm.cannotConnectModal.title')}
|
|
22
22
|
</Typography>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
<Markdown
|
|
24
|
+
className="u-mb-1"
|
|
25
|
+
source={t('accountForm.cannotConnectModal.content', {
|
|
26
|
+
vendorLink,
|
|
27
|
+
vendorName
|
|
28
|
+
})}
|
|
29
|
+
/>
|
|
30
|
+
<Markdown
|
|
31
|
+
className="u-mb-1"
|
|
32
|
+
source={t('accountForm.cannotConnectModal.noAccount', {
|
|
33
|
+
vendorLink,
|
|
34
|
+
vendorName
|
|
35
|
+
})}
|
|
36
|
+
/>
|
|
29
37
|
{ComponentsProps?.CannotConnectModal?.extraContent}
|
|
30
38
|
</>
|
|
31
39
|
}
|
|
@@ -13,8 +13,9 @@ const reactMarkdownRendererOptions = ({ linkProps }) => ({
|
|
|
13
13
|
)
|
|
14
14
|
})
|
|
15
15
|
|
|
16
|
-
export const Markdown = ({ source, linkProps }) => (
|
|
16
|
+
export const Markdown = ({ source, linkProps, ...props }) => (
|
|
17
17
|
<ReactMarkdown
|
|
18
|
+
{...props}
|
|
18
19
|
source={source}
|
|
19
20
|
linkTarget="_blank"
|
|
20
21
|
renderers={reactMarkdownRendererOptions({ linkProps })}
|
package/src/locales/en.json
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"cannotConnectModal": {
|
|
25
25
|
"title": "You can't connect?",
|
|
26
|
-
"content": "You can check your login or reset your password on the website
|
|
26
|
+
"content": "You can check your login or reset your password on the [%{vendorName}](%{vendorLink})'s website.",
|
|
27
|
+
"noAccount": "If you do not have an account you will need to create one on the [%{vendorName}](%{vendorLink})'s website."
|
|
27
28
|
},
|
|
28
29
|
"cannotConnectLink": "I can't connect",
|
|
29
30
|
"notClientSide": "The %{name} application uses a brand-new and efficient system for retrieving your data from your Cozy. This action is only accessible from the Cozy mobile app."
|
package/src/locales/fr.json
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"cannotConnectModal": {
|
|
25
25
|
"title": "Vous ne parvenez pas à vous connecter ?",
|
|
26
|
-
"content": "Vous pouvez vérifier vos identifiants ou réinitialiser votre mot de passe sur le site "
|
|
26
|
+
"content": "Vous pouvez vérifier vos identifiants ou réinitialiser votre mot de passe sur le site [%{vendorName}](%{vendorLink}).",
|
|
27
|
+
"noAccount": "Si vous n'avez pas de compte il vous faudra en créer sur le site [%{vendorName}](%{vendorLink})."
|
|
27
28
|
},
|
|
28
29
|
"cannotConnectLink": "Je ne parviens pas à me connecter",
|
|
29
30
|
"notClientSide": "L'application %{name} utilise un nouveau système plus efficace pour la récupération de vos données dans votre Cozy. Cette action est uniquement accessible depuis l’application mobile Cozy."
|