cozy-client 52.0.0 → 52.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
CHANGED
|
@@ -3049,7 +3049,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
3049
3049
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
3050
3050
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
3051
3051
|
|
|
3052
|
-
CozyClient.version = "52.
|
|
3052
|
+
CozyClient.version = "52.1.0";
|
|
3053
3053
|
|
|
3054
3054
|
_microee.default.mixin(CozyClient);
|
|
3055
3055
|
|
|
@@ -7,7 +7,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.getIconByLabel = exports.getQualification = exports.setQualification = exports.Qualification = void 0;
|
|
10
|
+
exports.hasSupportedQualification = exports.isSupportedQualification = exports.getIconByLabel = exports.getQualification = exports.setQualification = exports.Qualification = void 0;
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
@@ -364,5 +364,32 @@ var getIconByLabel = function getIconByLabel(label) {
|
|
|
364
364
|
|
|
365
365
|
return '';
|
|
366
366
|
};
|
|
367
|
+
/**
|
|
368
|
+
* @param {string} label - The qualification label
|
|
369
|
+
* @returns {boolean}
|
|
370
|
+
*/
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
exports.getIconByLabel = getIconByLabel;
|
|
374
|
+
|
|
375
|
+
var isSupportedQualification = function isSupportedQualification(label) {
|
|
376
|
+
return qualificationModel.qualifications.some(function (qualif) {
|
|
377
|
+
return qualif.label === label;
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* @param {object} document - The document
|
|
382
|
+
* @returns {boolean}
|
|
383
|
+
*/
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
exports.isSupportedQualification = isSupportedQualification;
|
|
387
|
+
|
|
388
|
+
var hasSupportedQualification = function hasSupportedQualification(document) {
|
|
389
|
+
var _document$metadata2, _document$metadata2$q;
|
|
390
|
+
|
|
391
|
+
var label = document === null || document === void 0 ? void 0 : (_document$metadata2 = document.metadata) === null || _document$metadata2 === void 0 ? void 0 : (_document$metadata2$q = _document$metadata2.qualification) === null || _document$metadata2$q === void 0 ? void 0 : _document$metadata2$q.label;
|
|
392
|
+
return isSupportedQualification(label);
|
|
393
|
+
};
|
|
367
394
|
|
|
368
|
-
exports.
|
|
395
|
+
exports.hasSupportedQualification = hasSupportedQualification;
|
package/dist/models/paper.js
CHANGED
|
@@ -388,10 +388,10 @@ var formatDateMetadataValue = function formatDateMetadataValue(value, _ref3) {
|
|
|
388
388
|
|
|
389
389
|
if (value) {
|
|
390
390
|
if (lang === 'en') {
|
|
391
|
-
return f(value, '
|
|
391
|
+
return f(value, 'LL/dd/yyyy');
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
return f(value, '
|
|
394
|
+
return f(value, 'dd/LL/yyyy');
|
|
395
395
|
} else {
|
|
396
396
|
return t('Scan.qualification.noInfo');
|
|
397
397
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "52.
|
|
3
|
+
"version": "52.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
73
73
|
},
|
|
74
74
|
"sideEffects": false,
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "c6762bb0c1fad4ac62f18b4118c8577a749caf2b"
|
|
76
76
|
}
|
|
@@ -108,6 +108,8 @@ export namespace Qualification {
|
|
|
108
108
|
export function setQualification(document: object, qualification: Qualification): object;
|
|
109
109
|
export function getQualification(document: object): Qualification | null;
|
|
110
110
|
export function getIconByLabel(label: string): import('../../types').IconQualificationLabels | string;
|
|
111
|
+
export function isSupportedQualification(label: string): boolean;
|
|
112
|
+
export function hasSupportedQualification(document: object): boolean;
|
|
111
113
|
export type QualificationAttributes = {
|
|
112
114
|
/**
|
|
113
115
|
* - The qualification icon.
|