@abgov/jsonforms-components 2.5.1 → 2.6.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/index.esm.js +13 -1
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -11936,8 +11936,20 @@ const createDefaultAjv = (...schemas) => {
|
|
|
11936
11936
|
ajv.addSchema(schemas);
|
|
11937
11937
|
addErrors(ajv);
|
|
11938
11938
|
addFormats(ajv);
|
|
11939
|
-
ajv.addFormat('file-urn', /^urn:ads:platform:file-service:v[0-9]:\/files\/[a-zA-Z0-9.-]*$/);
|
|
11940
11939
|
ajv.addFormat('time', /^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/);
|
|
11940
|
+
ajv.addFormat('file-urn', {
|
|
11941
|
+
type: 'string',
|
|
11942
|
+
validate: input => {
|
|
11943
|
+
const fileUrnRegExp = new RegExp('^urn:ads:platform:file-service:v[0-9]:/files/[a-zA-Z0-9.-]*$');
|
|
11944
|
+
const fileUrns = input.split(';');
|
|
11945
|
+
for (const urn of fileUrns) {
|
|
11946
|
+
if (!fileUrnRegExp.test(urn)) {
|
|
11947
|
+
return false;
|
|
11948
|
+
}
|
|
11949
|
+
}
|
|
11950
|
+
return true;
|
|
11951
|
+
}
|
|
11952
|
+
});
|
|
11941
11953
|
return ajv;
|
|
11942
11954
|
};
|
|
11943
11955
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|