@abgov/jsonforms-components 1.28.0 → 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
|
@@ -4,7 +4,7 @@ import { GoAFormItem, GoAInput, GoATextArea, GoACallout, GoAInputDate, GoAInputD
|
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import get$1 from 'lodash/get';
|
|
7
|
-
import { rankWith, isStringControl, and, optionIs, uiTypeIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, getAjv, isVisible, isEnabled, deriveLabelForUISchemaElement, schemaTypeIs, formatIs, createDefaultValue, Paths, or, isObjectArrayControl, isPrimitiveArrayControl,
|
|
7
|
+
import { rankWith, isStringControl, and, optionIs, uiTypeIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, getAjv, isVisible, isEnabled, deriveLabelForUISchemaElement, schemaTypeIs, formatIs, createDefaultValue, Paths, or, isObjectArrayControl, isPrimitiveArrayControl, hasType, isControl, isCategorization, isLayout } from '@jsonforms/core';
|
|
8
8
|
import { withJsonFormsControlProps, withJsonFormsRendererProps, withJsonFormsEnumProps, withTranslateProps, useJsonForms, JsonFormsDispatch, withJsonFormsLayoutProps, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
|
|
9
9
|
import merge from 'lodash/merge';
|
|
10
10
|
import isEmpty$1 from 'lodash/isEmpty';
|
|
@@ -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 = ({
|
|
@@ -6480,7 +6484,6 @@ const GoAVerticalLayoutComponent = ({
|
|
|
6480
6484
|
const GoAlVerticalLayoutTester = rankWith(1, uiTypeIs('VerticalLayout'));
|
|
6481
6485
|
const GoAVerticalLayout = withJsonFormsLayoutProps(GoAVerticalLayoutComponent, true);
|
|
6482
6486
|
|
|
6483
|
-
const groupTester = rankWith(1, uiTypeIs('Group'));
|
|
6484
6487
|
const GoAGroupControlComponent = props => {
|
|
6485
6488
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
6486
6489
|
const {
|
|
@@ -6520,8 +6523,8 @@ const GoAGroupControlComponent = props => {
|
|
|
6520
6523
|
})]
|
|
6521
6524
|
});
|
|
6522
6525
|
};
|
|
6523
|
-
const GoAGroupLayoutTester =
|
|
6524
|
-
const GoAGroupControl = withJsonFormsLayoutProps(GoAGroupControlComponent);
|
|
6526
|
+
const GoAGroupLayoutTester = rankWith(1, uiTypeIs('Group'));
|
|
6527
|
+
const GoAGroupControl = withJsonFormsLayoutProps(GoAGroupControlComponent, true);
|
|
6525
6528
|
|
|
6526
6529
|
let _ = t => t,
|
|
6527
6530
|
_t;
|
|
@@ -6595,7 +6598,11 @@ const RenderLink = props => {
|
|
|
6595
6598
|
href: link,
|
|
6596
6599
|
rel: "noopener noreferrer",
|
|
6597
6600
|
target: "_blank",
|
|
6598
|
-
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, {
|
|
6599
6606
|
icon: "open",
|
|
6600
6607
|
title: "Open",
|
|
6601
6608
|
testId: "open-icon",
|
|
@@ -6995,6 +7002,9 @@ const GoABaseReviewRenderers = [
|
|
|
6995
7002
|
}, {
|
|
6996
7003
|
tester: GoAlVerticalLayoutTester,
|
|
6997
7004
|
renderer: GoAVerticalLayout
|
|
7005
|
+
}, {
|
|
7006
|
+
tester: GoAGroupLayoutTester,
|
|
7007
|
+
renderer: GoAGroupControl
|
|
6998
7008
|
}, {
|
|
6999
7009
|
tester: HelpContentTester,
|
|
7000
7010
|
renderer: HelpReviewContent
|
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",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LayoutProps, RankedTester } from '@jsonforms/core';
|
|
3
|
-
export declare const groupTester: RankedTester;
|
|
4
3
|
export declare const GoAGroupControlComponent: (props: LayoutProps) => JSX.Element;
|
|
5
4
|
export declare const GoAGroupLayoutTester: RankedTester;
|
|
6
5
|
export declare const GoAGroupControl: React.ComponentType<LayoutProps & import("@jsonforms/core").OwnPropsOfLayout>;
|