cozy-ui 78.1.0 → 79.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 +19 -0
- package/package.json +1 -1
- package/react/AppSections/search.js +4 -3
- package/react/AppSections/search.spec.js +6 -4
- package/react/Viewer/locales/en.json +1 -1
- package/react/Viewer/locales/fr.json +2 -2
- package/transpiled/react/AppSections/search.js +4 -3
- package/transpiled/react/Viewer/hoc/withViewerLocales.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [79.0.0](https://github.com/cozy/cozy-ui/compare/v78.1.1...v79.0.0) (2022-12-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **search.js:** rename underMaintenance to showMaintenance ([295058a](https://github.com/cozy/cozy-ui/commit/295058a))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **search.js:** You need to use showMaintenance instead underMaintenance matcher in AppSection filters
|
|
12
|
+
|
|
13
|
+
## [78.1.1](https://github.com/cozy/cozy-ui/compare/v78.1.0...v78.1.1) (2022-12-08)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* Update expiration date and notice period wordings ([d6169ba](https://github.com/cozy/cozy-ui/commit/d6169ba))
|
|
19
|
+
|
|
1
20
|
# [78.1.0](https://github.com/cozy/cozy-ui/compare/v78.0.0...v78.1.0) (2022-12-08)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -27,8 +27,9 @@ const doctypeMatcher = doctype => app => {
|
|
|
27
27
|
}
|
|
28
28
|
const pendingUpdateMatcher = () => app => !!app.availableVersion
|
|
29
29
|
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const showMaintenanceMatcher = isShowMaintenance => app => {
|
|
31
|
+
if (isShowMaintenance) return true
|
|
32
|
+
return app.maintenance === undefined
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
const searchAttrToMatcher = {
|
|
@@ -37,7 +38,7 @@ const searchAttrToMatcher = {
|
|
|
37
38
|
tag: tagMatcher,
|
|
38
39
|
doctype: doctypeMatcher,
|
|
39
40
|
pendingUpdate: pendingUpdateMatcher,
|
|
40
|
-
|
|
41
|
+
showMaintenance: showMaintenanceMatcher
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/**
|
|
@@ -45,17 +45,19 @@ describe('makeMatcherFromSearch', () => {
|
|
|
45
45
|
expect(mockApps.filter(matcher)).toMatchSnapshot()
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
it('should filter correctly when
|
|
49
|
-
const matcher = makeMatcherFromSearch({
|
|
48
|
+
it('should filter correctly when show maintenance is false', () => {
|
|
49
|
+
const matcher = makeMatcherFromSearch({ showMaintenance: false })
|
|
50
50
|
expect(mockMaintenanceApps.filter(matcher)).toStrictEqual([
|
|
51
51
|
{ slug: 'collect' },
|
|
52
52
|
{ slug: 'drive' }
|
|
53
53
|
])
|
|
54
54
|
})
|
|
55
55
|
|
|
56
|
-
it('should filter correctly when
|
|
57
|
-
const matcher = makeMatcherFromSearch({
|
|
56
|
+
it('should filter correctly when show maintenance is true', () => {
|
|
57
|
+
const matcher = makeMatcherFromSearch({ showMaintenance: true })
|
|
58
58
|
expect(mockMaintenanceApps.filter(matcher)).toStrictEqual([
|
|
59
|
+
{ slug: 'collect' },
|
|
60
|
+
{ slug: 'drive' },
|
|
59
61
|
{
|
|
60
62
|
maintenance: {
|
|
61
63
|
flag_disallow_manual_exec: true,
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"CObtentionDate": "Permis C, délivré le",
|
|
44
44
|
"DObtentionDate": "Permis D, délivré le",
|
|
45
45
|
"issueDate": "Délivré le",
|
|
46
|
-
"expirationDate": "
|
|
46
|
+
"expirationDate": "Date d'expiration",
|
|
47
47
|
"referencedDate": "Date de référence",
|
|
48
48
|
"shootingDate": "Date de prise de vue",
|
|
49
49
|
"obtentionDate": "Date d'obtention",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"ibanNumber": "Numéro d'IBAN",
|
|
59
59
|
"country": "Pays de délivrance",
|
|
60
60
|
"passportNumber": "Numéro du passeport",
|
|
61
|
-
"noticePeriod": "
|
|
61
|
+
"noticePeriod": "Alerte d’expiration"
|
|
62
62
|
},
|
|
63
63
|
"day": "jour |||| jours"
|
|
64
64
|
},
|
|
@@ -46,9 +46,10 @@ var pendingUpdateMatcher = function pendingUpdateMatcher() {
|
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var showMaintenanceMatcher = function showMaintenanceMatcher(isShowMaintenance) {
|
|
50
50
|
return function (app) {
|
|
51
|
-
|
|
51
|
+
if (isShowMaintenance) return true;
|
|
52
|
+
return app.maintenance === undefined;
|
|
52
53
|
};
|
|
53
54
|
};
|
|
54
55
|
|
|
@@ -58,7 +59,7 @@ var searchAttrToMatcher = {
|
|
|
58
59
|
tag: tagMatcher,
|
|
59
60
|
doctype: doctypeMatcher,
|
|
60
61
|
pendingUpdate: pendingUpdateMatcher,
|
|
61
|
-
|
|
62
|
+
showMaintenance: showMaintenanceMatcher
|
|
62
63
|
};
|
|
63
64
|
/**
|
|
64
65
|
* Returns a predicate function to match an app based on
|
|
@@ -59,7 +59,7 @@ var en = {
|
|
|
59
59
|
ibanNumber: "IBAN number",
|
|
60
60
|
country: "Country of delivery",
|
|
61
61
|
passportNumber: "Passport number",
|
|
62
|
-
noticePeriod: "
|
|
62
|
+
noticePeriod: "Expiration alert"
|
|
63
63
|
},
|
|
64
64
|
day: "day |||| days"
|
|
65
65
|
},
|
|
@@ -146,7 +146,7 @@ var fr = {
|
|
|
146
146
|
CObtentionDate: "Permis C, d\xE9livr\xE9 le",
|
|
147
147
|
DObtentionDate: "Permis D, d\xE9livr\xE9 le",
|
|
148
148
|
issueDate: "D\xE9livr\xE9 le",
|
|
149
|
-
expirationDate: "
|
|
149
|
+
expirationDate: "Date d'expiration",
|
|
150
150
|
referencedDate: "Date de r\xE9f\xE9rence",
|
|
151
151
|
shootingDate: "Date de prise de vue",
|
|
152
152
|
obtentionDate: "Date d'obtention",
|
|
@@ -161,7 +161,7 @@ var fr = {
|
|
|
161
161
|
ibanNumber: "Num\xE9ro d'IBAN",
|
|
162
162
|
country: "Pays de d\xE9livrance",
|
|
163
163
|
passportNumber: "Num\xE9ro du passeport",
|
|
164
|
-
noticePeriod: "
|
|
164
|
+
noticePeriod: "Alerte d\u2019expiration"
|
|
165
165
|
},
|
|
166
166
|
day: "jour |||| jours"
|
|
167
167
|
},
|