@abgov/jsonforms-components 1.24.8 → 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
|
@@ -3207,9 +3207,10 @@ const fetchRegister = props => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
3207
3207
|
}
|
|
3208
3208
|
return undefined;
|
|
3209
3209
|
});
|
|
3210
|
-
const
|
|
3211
|
-
const
|
|
3212
|
-
|
|
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);
|
|
3213
3214
|
};
|
|
3214
3215
|
|
|
3215
3216
|
const JsonFormsRegisterContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -6310,7 +6311,7 @@ const RenderLink = props => {
|
|
|
6310
6311
|
}
|
|
6311
6312
|
useEffect(() => {
|
|
6312
6313
|
if (linkUrl) {
|
|
6313
|
-
setLinkValid(
|
|
6314
|
+
setLinkValid(isValidHref(linkUrl));
|
|
6314
6315
|
}
|
|
6315
6316
|
}, [linkUrl]);
|
|
6316
6317
|
if (!linkLabel && !error) {
|
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",
|