@abgov/jsonforms-components 1.24.7 → 1.24.9
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
CHANGED
|
@@ -10,6 +10,7 @@ import merge from 'lodash/merge';
|
|
|
10
10
|
import isEmpty$1 from 'lodash/isEmpty';
|
|
11
11
|
import range from 'lodash/range';
|
|
12
12
|
import Ajv from 'ajv';
|
|
13
|
+
import addFormats from 'ajv-formats';
|
|
13
14
|
|
|
14
15
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
15
16
|
|
|
@@ -3206,9 +3207,10 @@ const fetchRegister = props => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
3206
3207
|
}
|
|
3207
3208
|
return undefined;
|
|
3208
3209
|
});
|
|
3209
|
-
const
|
|
3210
|
-
const
|
|
3211
|
-
|
|
3210
|
+
const isValidHref = function isValidHref(url) {
|
|
3211
|
+
const httpPattern = new RegExp(/^(http|https):\/\/[^ "]+$/);
|
|
3212
|
+
const mailToPattern = new RegExp(/^(mailto):[^ "]+$/);
|
|
3213
|
+
return httpPattern.test(url) || mailToPattern.test(url);
|
|
3212
3214
|
};
|
|
3213
3215
|
|
|
3214
3216
|
const JsonFormsRegisterContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -6309,7 +6311,7 @@ const RenderLink = props => {
|
|
|
6309
6311
|
}
|
|
6310
6312
|
useEffect(() => {
|
|
6311
6313
|
if (linkUrl) {
|
|
6312
|
-
setLinkValid(
|
|
6314
|
+
setLinkValid(isValidHref(linkUrl));
|
|
6313
6315
|
}
|
|
6314
6316
|
}, [linkUrl]);
|
|
6315
6317
|
if (!linkLabel && !error) {
|
|
@@ -6599,10 +6601,12 @@ var GoAErrorControl = withJsonFormsControlProps(ErrorControl);
|
|
|
6599
6601
|
|
|
6600
6602
|
const ajv = new Ajv({
|
|
6601
6603
|
allErrors: true,
|
|
6602
|
-
verbose: true
|
|
6604
|
+
verbose: true,
|
|
6605
|
+
strict: 'log'
|
|
6603
6606
|
});
|
|
6604
6607
|
//Example format: urn:ads:platform:file-service:v1:/files/f6de737e-c5fc-42fe-963b-28bfe14597c4
|
|
6605
6608
|
ajv.addFormat('file-urn', /^urn:ads:platform:file-service:v[0-9]:\/files\/[a-zA-Z0-9.-]*$/);
|
|
6609
|
+
addFormats(ajv);
|
|
6606
6610
|
|
|
6607
6611
|
const GoABaseRenderers = [
|
|
6608
6612
|
// controls
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.9",
|
|
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",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@jsonforms/core": "^3.1.0",
|
|
10
10
|
"@jsonforms/react": "^3.1.0",
|
|
11
11
|
"react": "^18.0.0",
|
|
12
|
-
"ajv": "^6.
|
|
13
|
-
"
|
|
12
|
+
"ajv": "^8.6.1",
|
|
13
|
+
"ajv-formats": "^3.0.1"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"axios": "^1.6.7",
|
package/src/lib/common/Ajv.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import Ajv from 'ajv';
|
|
2
|
-
export declare const ajv: Ajv
|
|
2
|
+
export declare const ajv: Ajv;
|
package/src/lib/util/layout.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import type { UISchemaElement } from '@jsonforms/core';
|
|
3
3
|
import { JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry, JsonSchema, OwnPropsOfRenderer } from '@jsonforms/core';
|
|
4
|
-
import Ajv from '
|
|
4
|
+
import Ajv from 'ajv';
|
|
5
5
|
export type Ajv8 = Ajv;
|
|
6
6
|
export declare const renderLayoutElements: (elements: UISchemaElement[], schema?: JsonSchema, path?: string, enabled?: boolean, renderers?: JsonFormsRendererRegistryEntry[], cells?: JsonFormsCellRendererRegistryEntry[]) => import("react/jsx-runtime").JSX.Element[];
|
|
7
7
|
export interface LayoutRendererProps extends OwnPropsOfRenderer {
|