@abgov/jsonforms-components 1.2.3 → 1.2.4
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
|
@@ -2,6 +2,7 @@ import { withAjvProps, materialSliderControlTester, MaterialSliderControl, mater
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { GoAFormItem, GoACallout, GoAInputDate, GoAInput, GoATextArea, GoAInputDateTime, GoAInputTime, GoADropdown, GoADropdownItem, GoARadioGroup, GoARadioItem, GoACheckbox, GoAFormStepper, GoAFormStep, GoAPages, GoAButton, GoAIconButton, GoAFileUploadInput, GoAModal, GoACircularProgress, GoAGrid, GoAContainer, GoAButtonGroup, GoADetails } from '@abgov/react-components';
|
|
4
4
|
import { Hidden, Typography, FormHelperText } from '@mui/material';
|
|
5
|
+
import styled from 'styled-components';
|
|
5
6
|
import { rankWith, isDateControl, isStringControl, and, optionIs, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, isDescriptionHidden, isVisible, isEnabled, deriveLabelForUISchemaElement, uiTypeIs, schemaTypeIs, formatIs, createDefaultValue, Paths, or, isObjectArrayControl, isPrimitiveArrayControl, withIncreasedRank, hasType, isControl, isCategorization, isLayout } from '@jsonforms/core';
|
|
6
7
|
import { withJsonFormsControlProps, withJsonFormsEnumProps, withTranslateProps, withJsonFormsLayoutProps, JsonFormsDispatch, useJsonForms, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
|
|
7
8
|
import React, { createContext, useEffect, useState, useMemo, useContext, useCallback } from 'react';
|
|
@@ -9,7 +10,6 @@ import merge from 'lodash/merge';
|
|
|
9
10
|
import axios from 'axios';
|
|
10
11
|
import TextField from '@mui/material/TextField';
|
|
11
12
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
12
|
-
import styled from 'styled-components';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
14
|
import range from 'lodash/range';
|
|
15
15
|
|
|
@@ -1739,6 +1739,12 @@ $$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }
|
|
|
1739
1739
|
assign: assign
|
|
1740
1740
|
});
|
|
1741
1741
|
|
|
1742
|
+
let _$6 = t => t,
|
|
1743
|
+
_t$6;
|
|
1744
|
+
const FormFieldWrapper = styled.div(_t$6 || (_t$6 = _$6`
|
|
1745
|
+
margin-bottom: var(--goa-space-l);
|
|
1746
|
+
`));
|
|
1747
|
+
|
|
1742
1748
|
var anObject$3 = anObject$9;
|
|
1743
1749
|
|
|
1744
1750
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -2389,12 +2395,14 @@ const GoAInputBaseControl = props => {
|
|
|
2389
2395
|
}
|
|
2390
2396
|
return jsx(Hidden, {
|
|
2391
2397
|
xsUp: !visible,
|
|
2392
|
-
children: jsx(
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
+
children: jsx(FormFieldWrapper, {
|
|
2399
|
+
children: jsx(GoAFormItem, {
|
|
2400
|
+
requirement: required ? 'required' : undefined,
|
|
2401
|
+
error: modifiedErrors,
|
|
2402
|
+
label: (props === null || props === void 0 ? void 0 : props.noLabel) === true ? '' : labelToUpdate,
|
|
2403
|
+
helpText: typeof ((_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.help) === 'string' ? (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.help : '',
|
|
2404
|
+
children: jsx(InnerComponent, Object.assign({}, props))
|
|
2405
|
+
})
|
|
2398
2406
|
})
|
|
2399
2407
|
});
|
|
2400
2408
|
};
|
|
@@ -4704,7 +4712,7 @@ const GoAGroupControlComponent = props => {
|
|
|
4704
4712
|
const group = uischema;
|
|
4705
4713
|
return jsx(Hidden, {
|
|
4706
4714
|
xsUp: !visible,
|
|
4707
|
-
children: jsx(GoAContainer, Object.assign({},
|
|
4715
|
+
children: jsx(GoAContainer, Object.assign({}, (_a = group.options) === null || _a === void 0 ? void 0 : _a.componentProps, {
|
|
4708
4716
|
children: renderLayoutElements(group.elements, schema, path, enabled, renderers, cells)
|
|
4709
4717
|
}))
|
|
4710
4718
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
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",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FormFieldWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LayoutProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
export declare const groupTester: RankedTester;
|
|
4
|
+
export declare const GoAGroupControlComponent: (props: LayoutProps) => JSX.Element;
|
|
4
5
|
export declare const GoAGroupLayoutTester: RankedTester;
|
|
5
6
|
export declare const GoAGroupControl: React.ComponentType<LayoutProps & import("@jsonforms/core").OwnPropsOfLayout>;
|