cozy-harvest-lib 12.3.0 → 12.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 +27 -0
- package/dist/components/Routes.js +2 -1
- package/dist/components/cards/LaunchTriggerAlert.js +5 -0
- package/dist/components/cards/__snapshots__/LaunchTriggerCard.spec.jsx.snap +1 -1
- package/dist/locales/en.json +1 -1
- package/dist/locales/fr.json +1 -1
- package/dist/locales/index.spec.js +1 -1
- package/package.json +2 -2
- package/src/components/Routes.jsx +2 -1
- package/src/components/cards/LaunchTriggerAlert.jsx +4 -2
- package/src/components/cards/__snapshots__/LaunchTriggerCard.spec.jsx.snap +1 -1
- package/src/locales/en.json +1 -1
- package/src/locales/fr.json +1 -1
- package/src/locales/index.spec.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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
|
+
# [12.4.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@12.3.1...cozy-harvest-lib@12.4.0) (2023-01-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **harvest-lib:** Add disableTitleAutoPadding prop on dialogContext ([a5d9014](https://github.com/cozy/cozy-libs/commit/a5d901468d4993c4c5cbeb90d5ae1b1a233daeb1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **harvest-lib:** Update launchTrigger button locales ([6c3bdc6](https://github.com/cozy/cozy-libs/commit/6c3bdc6873e3f115ab84797068bcfc5a9e16ebe4))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [12.3.1](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@12.3.0...cozy-harvest-lib@12.3.1) (2023-01-17)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **harvest:** LaunchTriggerAlert text vertical alignement ([70e3f10](https://github.com/cozy/cozy-libs/commit/70e3f10c524ca320832c31c8a25d3379e9fe638d))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [12.3.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@12.2.0...cozy-harvest-lib@12.3.0) (2023-01-17)
|
|
7
34
|
|
|
8
35
|
|
|
@@ -60,7 +60,8 @@ var Routes = function Routes(_ref) {
|
|
|
60
60
|
var dialogContext = useCozyDialog({
|
|
61
61
|
size: 'l',
|
|
62
62
|
open: true,
|
|
63
|
-
onClose: onDismiss
|
|
63
|
+
onClose: onDismiss,
|
|
64
|
+
disableTitleAutoPadding: true
|
|
64
65
|
});
|
|
65
66
|
|
|
66
67
|
var _useKonnectorWithTrig = useKonnectorWithTriggers(konnectorSlug, konnector),
|
|
@@ -25,6 +25,10 @@ var styles = {
|
|
|
25
25
|
iconButtonWrapper: {
|
|
26
26
|
height: 32,
|
|
27
27
|
width: 46
|
|
28
|
+
},
|
|
29
|
+
// Alert is not designed to use 12px text, so this is necessary for now
|
|
30
|
+
typography: {
|
|
31
|
+
paddingTop: 2
|
|
28
32
|
}
|
|
29
33
|
};
|
|
30
34
|
export var LaunchTriggerAlert = function LaunchTriggerAlert(_ref) {
|
|
@@ -120,6 +124,7 @@ export var LaunchTriggerAlert = function LaunchTriggerAlert(_ref) {
|
|
|
120
124
|
}
|
|
121
125
|
}, t('card.launchTrigger.configure'))))
|
|
122
126
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
127
|
+
style: styles.typography,
|
|
123
128
|
variant: "caption"
|
|
124
129
|
}, makeLabel({
|
|
125
130
|
t: t,
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`LaunchTriggerCard should render impossible to run message when konnector is clientSide without an accessible launcher 1`] = `"<div class=\\"styles__c-card___YgP7B\\"><div class=\\"u-flex u-flex-column-s\\"><ul class=\\"u-nolist u-m-0 u-mr-1 u-pl-0 u-flex-grow-1\\"><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Update:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Unknown</span></li><div class=\\"styles__media___cSJMp styles__media--top___K9w0I\\"><div class=\\"styles__img___3SHpG u-m-1\\"><svg viewBox=\\"0 0 16 16\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\"><defs><path id=\\"info_svg__a\\" d=\\"M8 16A8 8 0 118 0a8 8 0 010 16zM7 4a1 1 0 102 0 1 1 0 10-2 0zm1 2H6v2h1v4a1 1 0 001 1h2v-2H9V7a1 1 0 00-1-1z\\"></path></defs><use fill-rule=\\"evenodd\\" xlink:href=\\"#info_svg__a\\"></use></svg></div><div class=\\"styles__bd___1Uv-F u-m-1\\"><p class=\\"MuiTypography-root MuiTypography-body1 MuiTypography-colorTextPrimary\\">The testname 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.</p></div></div></ul></div></div>"`;
|
|
4
4
|
|
|
5
|
-
exports[`LaunchTriggerCard should render normally when konnector is not clientSide 1`] = `"<div class=\\"styles__c-card___YgP7B\\"><div class=\\"u-flex u-flex-column-s\\"><ul class=\\"u-nolist u-m-0 u-mr-1 u-pl-0 u-flex-grow-1\\"><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Update:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Unknown</span></li><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Frequency:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Once a week</span></li></ul><div><button style=\\"line-height: 1.4;\\" type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--subtle___OknKf styles__c-btn--center___16_Xh u-mh-0 u-mv-0\\"><span><svg viewBox=\\"0 0 16 16\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\" focusable=\\"false\\"><path fill-rule=\\"evenodd\\" d=\\"M16 7.2V3c0-.6-.4-1-1-1-.5 0-.8.3-.9.7A8.09 8.09 0 008 0C4.9 0 2 1.8.7 4.6c-.2.5 0 1.1.5 1.3.5.2 1.1 0 1.3-.5C3.5 3.4 5.6 2 8 2c1.5 0 3 .6 4 1.5-.3 0-.6.1-.8.3-.4.4-.3 1.1.1 1.4l3 2.5h.1c.1.1.2.1.3.1h.4c.1 0 .2-.1.3-.1h.1c.1-.1.2-.1.2-.2.2 0 .2-.1.3-.3 0 .1 0 0 0 0m-1.2 2.9c-.5-.2-1.1 0-1.3.5A6 6 0 018 14c-1.5 0-2.9-.6-4-1.5.3 0 .5-.1.7-.4.4-.4.3-1.1-.1-1.4l-3-2.5h-.1L1.3 8h-.1c-.2 0-.5 0-.7.1H.4c-.1.1-.1.2-.2.3-.1.1-.1.2-.2.3V13c0 .6.4 1 1 1 .5 0 .9-.3 1-.8C3.5 14.9 5.6 16 8 16c3.1 0 5.9-1.8 7.3-4.5.2-.5 0-1.1-.5-1.4\\"></path></svg><span>
|
|
5
|
+
exports[`LaunchTriggerCard should render normally when konnector is not clientSide 1`] = `"<div class=\\"styles__c-card___YgP7B\\"><div class=\\"u-flex u-flex-column-s\\"><ul class=\\"u-nolist u-m-0 u-mr-1 u-pl-0 u-flex-grow-1\\"><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Update:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Unknown</span></li><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Frequency:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Once a week</span></li></ul><div><button style=\\"line-height: 1.4;\\" type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--subtle___OknKf styles__c-btn--center___16_Xh u-mh-0 u-mv-0\\"><span><svg viewBox=\\"0 0 16 16\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\" focusable=\\"false\\"><path fill-rule=\\"evenodd\\" d=\\"M16 7.2V3c0-.6-.4-1-1-1-.5 0-.8.3-.9.7A8.09 8.09 0 008 0C4.9 0 2 1.8.7 4.6c-.2.5 0 1.1.5 1.3.5.2 1.1 0 1.3-.5C3.5 3.4 5.6 2 8 2c1.5 0 3 .6 4 1.5-.3 0-.6.1-.8.3-.4.4-.3 1.1.1 1.4l3 2.5h.1c.1.1.2.1.3.1h.4c.1 0 .2-.1.3-.1h.1c.1-.1.2-.1.2-.2.2 0 .2-.1.3-.3 0 .1 0 0 0 0m-1.2 2.9c-.5-.2-1.1 0-1.3.5A6 6 0 018 14c-1.5 0-2.9-.6-4-1.5.3 0 .5-.1.7-.4.4-.4.3-1.1-.1-1.4l-3-2.5h-.1L1.3 8h-.1c-.2 0-.5 0-.7.1H.4c-.1.1-.1.2-.2.3-.1.1-.1.2-.2.3V13c0 .6.4 1 1 1 .5 0 .9-.3 1-.8C3.5 14.9 5.6 16 8 16c3.1 0 5.9-1.8 7.3-4.5.2-.5 0-1.1-.5-1.4\\"></path></svg><span>Synchronize</span></span></button></div></div></div>"`;
|
package/dist/locales/en.json
CHANGED
package/dist/locales/fr.json
CHANGED
|
@@ -2,6 +2,6 @@ import { getBoundT } from './index';
|
|
|
2
2
|
describe('bound t', function () {
|
|
3
3
|
it('should be possible to get a t bound to harvest locales', function () {
|
|
4
4
|
var t = getBoundT('en');
|
|
5
|
-
expect(t('card.launchTrigger.button.label')).toBe('
|
|
5
|
+
expect(t('card.launchTrigger.button.label')).toBe('Synchronize');
|
|
6
6
|
});
|
|
7
7
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-harvest-lib",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.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": "55845623d8990803bb5acf4757abc3866d83d3e2"
|
|
92
92
|
}
|
|
@@ -24,7 +24,9 @@ import { makeLabel } from './helpers'
|
|
|
24
24
|
const styles = {
|
|
25
25
|
// tricks to put 48px wide button inside 32px height container
|
|
26
26
|
// without enlarging the container
|
|
27
|
-
iconButtonWrapper: { height: 32, width: 46 }
|
|
27
|
+
iconButtonWrapper: { height: 32, width: 46 },
|
|
28
|
+
// Alert is not designed to use 12px text, so this is necessary for now
|
|
29
|
+
typography: { paddingTop: 2 }
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
export const LaunchTriggerAlert = ({
|
|
@@ -118,7 +120,7 @@ export const LaunchTriggerAlert = ({
|
|
|
118
120
|
)
|
|
119
121
|
}
|
|
120
122
|
>
|
|
121
|
-
<Typography variant="caption">
|
|
123
|
+
<Typography style={styles.typography} variant="caption">
|
|
122
124
|
{makeLabel({
|
|
123
125
|
t,
|
|
124
126
|
f,
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`LaunchTriggerCard should render impossible to run message when konnector is clientSide without an accessible launcher 1`] = `"<div class=\\"styles__c-card___YgP7B\\"><div class=\\"u-flex u-flex-column-s\\"><ul class=\\"u-nolist u-m-0 u-mr-1 u-pl-0 u-flex-grow-1\\"><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Update:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Unknown</span></li><div class=\\"styles__media___cSJMp styles__media--top___K9w0I\\"><div class=\\"styles__img___3SHpG u-m-1\\"><svg viewBox=\\"0 0 16 16\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\"><defs><path id=\\"info_svg__a\\" d=\\"M8 16A8 8 0 118 0a8 8 0 010 16zM7 4a1 1 0 102 0 1 1 0 10-2 0zm1 2H6v2h1v4a1 1 0 001 1h2v-2H9V7a1 1 0 00-1-1z\\"></path></defs><use fill-rule=\\"evenodd\\" xlink:href=\\"#info_svg__a\\"></use></svg></div><div class=\\"styles__bd___1Uv-F u-m-1\\"><p class=\\"MuiTypography-root MuiTypography-body1 MuiTypography-colorTextPrimary\\">The testname 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.</p></div></div></ul></div></div>"`;
|
|
4
4
|
|
|
5
|
-
exports[`LaunchTriggerCard should render normally when konnector is not clientSide 1`] = `"<div class=\\"styles__c-card___YgP7B\\"><div class=\\"u-flex u-flex-column-s\\"><ul class=\\"u-nolist u-m-0 u-mr-1 u-pl-0 u-flex-grow-1\\"><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Update:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Unknown</span></li><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Frequency:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Once a week</span></li></ul><div><button style=\\"line-height: 1.4;\\" type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--subtle___OknKf styles__c-btn--center___16_Xh u-mh-0 u-mv-0\\"><span><svg viewBox=\\"0 0 16 16\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\" focusable=\\"false\\"><path fill-rule=\\"evenodd\\" d=\\"M16 7.2V3c0-.6-.4-1-1-1-.5 0-.8.3-.9.7A8.09 8.09 0 008 0C4.9 0 2 1.8.7 4.6c-.2.5 0 1.1.5 1.3.5.2 1.1 0 1.3-.5C3.5 3.4 5.6 2 8 2c1.5 0 3 .6 4 1.5-.3 0-.6.1-.8.3-.4.4-.3 1.1.1 1.4l3 2.5h.1c.1.1.2.1.3.1h.4c.1 0 .2-.1.3-.1h.1c.1-.1.2-.1.2-.2.2 0 .2-.1.3-.3 0 .1 0 0 0 0m-1.2 2.9c-.5-.2-1.1 0-1.3.5A6 6 0 018 14c-1.5 0-2.9-.6-4-1.5.3 0 .5-.1.7-.4.4-.4.3-1.1-.1-1.4l-3-2.5h-.1L1.3 8h-.1c-.2 0-.5 0-.7.1H.4c-.1.1-.1.2-.2.3-.1.1-.1.2-.2.3V13c0 .6.4 1 1 1 .5 0 .9-.3 1-.8C3.5 14.9 5.6 16 8 16c3.1 0 5.9-1.8 7.3-4.5.2-.5 0-1.1-.5-1.4\\"></path></svg><span>
|
|
5
|
+
exports[`LaunchTriggerCard should render normally when konnector is not clientSide 1`] = `"<div class=\\"styles__c-card___YgP7B\\"><div class=\\"u-flex u-flex-column-s\\"><ul class=\\"u-nolist u-m-0 u-mr-1 u-pl-0 u-flex-grow-1\\"><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Update:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Unknown</span></li><li class=\\"u-mb-half\\"><span class=\\"MuiTypography-root u-mr-half MuiTypography-caption MuiTypography-colorTextSecondary\\" style=\\"display: inline-block;\\">Frequency:</span><span class=\\"MuiTypography-root MuiTypography-caption MuiTypography-colorTextPrimary\\" style=\\"display: inline-block;\\">Once a week</span></li></ul><div><button style=\\"line-height: 1.4;\\" type=\\"submit\\" class=\\"styles__c-btn___-2Vnj styles__c-btn--subtle___OknKf styles__c-btn--center___16_Xh u-mh-0 u-mv-0\\"><span><svg viewBox=\\"0 0 16 16\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\" focusable=\\"false\\"><path fill-rule=\\"evenodd\\" d=\\"M16 7.2V3c0-.6-.4-1-1-1-.5 0-.8.3-.9.7A8.09 8.09 0 008 0C4.9 0 2 1.8.7 4.6c-.2.5 0 1.1.5 1.3.5.2 1.1 0 1.3-.5C3.5 3.4 5.6 2 8 2c1.5 0 3 .6 4 1.5-.3 0-.6.1-.8.3-.4.4-.3 1.1.1 1.4l3 2.5h.1c.1.1.2.1.3.1h.4c.1 0 .2-.1.3-.1h.1c.1-.1.2-.1.2-.2.2 0 .2-.1.3-.3 0 .1 0 0 0 0m-1.2 2.9c-.5-.2-1.1 0-1.3.5A6 6 0 018 14c-1.5 0-2.9-.6-4-1.5.3 0 .5-.1.7-.4.4-.4.3-1.1-.1-1.4l-3-2.5h-.1L1.3 8h-.1c-.2 0-.5 0-.7.1H.4c-.1.1-.1.2-.2.3-.1.1-.1.2-.2.3V13c0 .6.4 1 1 1 .5 0 .9-.3 1-.8C3.5 14.9 5.6 16 8 16c3.1 0 5.9-1.8 7.3-4.5.2-.5 0-1.1-.5-1.4\\"></path></svg><span>Synchronize</span></span></button></div></div></div>"`;
|
package/src/locales/en.json
CHANGED
package/src/locales/fr.json
CHANGED
|
@@ -3,6 +3,6 @@ import { getBoundT } from './index'
|
|
|
3
3
|
describe('bound t', () => {
|
|
4
4
|
it('should be possible to get a t bound to harvest locales', () => {
|
|
5
5
|
const t = getBoundT('en')
|
|
6
|
-
expect(t('card.launchTrigger.button.label')).toBe('
|
|
6
|
+
expect(t('card.launchTrigger.button.label')).toBe('Synchronize')
|
|
7
7
|
})
|
|
8
8
|
})
|