cozy-client 47.0.0 → 47.1.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/dist/CozyClient.js +1 -1
- package/dist/models/paper.js +11 -4
- package/dist/models/paper.spec.js +9 -0
- package/package.json +2 -2
package/dist/CozyClient.js
CHANGED
|
@@ -2782,7 +2782,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2782
2782
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2783
2783
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2784
2784
|
|
|
2785
|
-
CozyClient.version = "47.
|
|
2785
|
+
CozyClient.version = "47.1.0";
|
|
2786
2786
|
|
|
2787
2787
|
_microee.default.mixin(CozyClient);
|
|
2788
2788
|
|
package/dist/models/paper.js
CHANGED
|
@@ -19,6 +19,8 @@ var _fr = _interopRequireDefault(require("date-fns/locale/fr"));
|
|
|
19
19
|
|
|
20
20
|
var _locales = require("./document/locales");
|
|
21
21
|
|
|
22
|
+
var _locales2 = require("./country/locales");
|
|
23
|
+
|
|
22
24
|
var _contact = require("./contact");
|
|
23
25
|
|
|
24
26
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
@@ -422,20 +424,21 @@ var formatInformationMetadataValue = function formatInformationMetadataValue(val
|
|
|
422
424
|
var lang = _ref5.lang,
|
|
423
425
|
name = _ref5.name,
|
|
424
426
|
qualificationLabel = _ref5.qualificationLabel;
|
|
425
|
-
var
|
|
427
|
+
var tDoc = (0, _locales.getLocalizer)(lang);
|
|
428
|
+
var tCountry = (0, _locales2.getLocalizer)(lang);
|
|
426
429
|
|
|
427
430
|
if (typeof value !== 'number' && !value) {
|
|
428
|
-
return
|
|
431
|
+
return tDoc('Scan.qualification.noInfo');
|
|
429
432
|
}
|
|
430
433
|
|
|
431
434
|
if (name === 'noticePeriod') {
|
|
432
|
-
return "".concat(value, " ").concat(
|
|
435
|
+
return "".concat(value, " ").concat(tDoc('Scan.qualification.information.day', {
|
|
433
436
|
smart_count: value
|
|
434
437
|
}));
|
|
435
438
|
}
|
|
436
439
|
|
|
437
440
|
if (name === 'contractType') {
|
|
438
|
-
return
|
|
441
|
+
return tDoc("Scan.attributes.contractType.".concat(value), {
|
|
439
442
|
_: value
|
|
440
443
|
});
|
|
441
444
|
}
|
|
@@ -444,6 +447,10 @@ var formatInformationMetadataValue = function formatInformationMetadataValue(val
|
|
|
444
447
|
return "".concat(value, " \u20AC");
|
|
445
448
|
}
|
|
446
449
|
|
|
450
|
+
if (name === 'country') {
|
|
451
|
+
return tCountry("nationalities.".concat(value));
|
|
452
|
+
}
|
|
453
|
+
|
|
447
454
|
return value;
|
|
448
455
|
};
|
|
449
456
|
/**
|
|
@@ -249,5 +249,14 @@ describe('Expiration', () => {
|
|
|
249
249
|
|
|
250
250
|
expect(res).toEqual('metadataValue')
|
|
251
251
|
})
|
|
252
|
+
|
|
253
|
+
it('should return nationality', () => {
|
|
254
|
+
const res = paperModel.formatInformationMetadataValue('FR', {
|
|
255
|
+
name: 'country',
|
|
256
|
+
lang: 'en'
|
|
257
|
+
})
|
|
258
|
+
|
|
259
|
+
expect(res).toEqual('French')
|
|
260
|
+
})
|
|
252
261
|
})
|
|
253
262
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "47.
|
|
3
|
+
"version": "47.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "6dcb50b49698107f3b872b7a528b7a88ea585bd9"
|
|
79
79
|
}
|