@evoke-platform/ui-components 1.11.0-dev.3 → 1.11.0-dev.5
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.
|
@@ -49,6 +49,9 @@ const PropertyProtection = (props) => {
|
|
|
49
49
|
})
|
|
50
50
|
.finally(() => setIsLoading(false));
|
|
51
51
|
}
|
|
52
|
+
else {
|
|
53
|
+
setIsLoading(false);
|
|
54
|
+
}
|
|
52
55
|
}, []);
|
|
53
56
|
const hasValueChangedOrViewed = value !== obfuscateValue(value, { protection, mask });
|
|
54
57
|
const canViewFull = hasViewPermission || hasValueChangedOrViewed;
|
|
@@ -401,7 +401,7 @@ export const convertDocToParameters = (obj) => {
|
|
|
401
401
|
export const propertyToParameter = (property) => {
|
|
402
402
|
return {
|
|
403
403
|
...omit(property, ['searchable', 'formula', 'formulaType', 'mask', 'textTransform']),
|
|
404
|
-
validation:
|
|
404
|
+
validation: propertyValidationToParameterValidation(property),
|
|
405
405
|
};
|
|
406
406
|
};
|
|
407
407
|
export const propertyValidationToParameterValidation = (property) => {
|
|
@@ -409,9 +409,15 @@ export const propertyValidationToParameterValidation = (property) => {
|
|
|
409
409
|
if ('from' in property.validation || 'to' in property.validation) {
|
|
410
410
|
return undefined;
|
|
411
411
|
}
|
|
412
|
-
return { ...property.validation };
|
|
413
412
|
}
|
|
414
|
-
|
|
413
|
+
let paramValidation = property.validation;
|
|
414
|
+
if (property.mask) {
|
|
415
|
+
paramValidation = {
|
|
416
|
+
...(paramValidation ?? {}),
|
|
417
|
+
mask: property.mask,
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
return paramValidation;
|
|
415
421
|
};
|
|
416
422
|
export const convertPropertiesToParams = (object) => {
|
|
417
423
|
return object.properties
|
|
@@ -42,8 +42,12 @@ const DisplayedProperty = (props) => {
|
|
|
42
42
|
return value
|
|
43
43
|
? DateTime.fromISO(DateTime.now().toISODate() + 'T' + value).toFormat('hh:mm a')
|
|
44
44
|
: undefined;
|
|
45
|
-
case 'date':
|
|
46
|
-
|
|
45
|
+
case 'date': {
|
|
46
|
+
if (!value)
|
|
47
|
+
return undefined;
|
|
48
|
+
const date = DateTime.fromISO(value);
|
|
49
|
+
return date.isValid ? date.toFormat('MM/dd/yyyy') : value;
|
|
50
|
+
}
|
|
47
51
|
case 'date-time':
|
|
48
52
|
return value ? DateTime.fromISO(value).toFormat('MM/dd/yyyy hh:mm a') : undefined;
|
|
49
53
|
case 'document':
|