@abgov/jsonforms-components 1.28.1 → 1.28.2
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
|
@@ -3231,6 +3231,10 @@ const isValidHref = function isValidHref(url) {
|
|
|
3231
3231
|
const mailToPattern = new RegExp(/^(mailto):[^ "]+$/);
|
|
3232
3232
|
return httpPattern.test(url) || mailToPattern.test(url);
|
|
3233
3233
|
};
|
|
3234
|
+
const isMailToHref = function isMailToHref(url) {
|
|
3235
|
+
const mailToPattern = new RegExp(/^(mailto):[^ "]+$/);
|
|
3236
|
+
return mailToPattern.test(url);
|
|
3237
|
+
};
|
|
3234
3238
|
|
|
3235
3239
|
const JsonFormsRegisterContext = /*#__PURE__*/createContext(undefined);
|
|
3236
3240
|
const JsonFormRegisterProvider = ({
|
|
@@ -6594,7 +6598,11 @@ const RenderLink = props => {
|
|
|
6594
6598
|
href: link,
|
|
6595
6599
|
rel: "noopener noreferrer",
|
|
6596
6600
|
target: "_blank",
|
|
6597
|
-
children: [linkLabel, jsx(
|
|
6601
|
+
children: [linkLabel, isMailToHref(link !== null && link !== void 0 ? link : '') ? jsx(GoAContextMenuIcon, {
|
|
6602
|
+
type: "mail",
|
|
6603
|
+
title: "Email",
|
|
6604
|
+
testId: "mail-icon"
|
|
6605
|
+
}) : jsx(GoAIconButton, {
|
|
6598
6606
|
icon: "open",
|
|
6599
6607
|
title: "Open",
|
|
6600
6608
|
testId: "open-icon",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.2",
|
|
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",
|