@abgov/jsonforms-components 2.61.1 → 2.62.0
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
|
@@ -5789,7 +5789,8 @@ let _$a = t => t,
|
|
|
5789
5789
|
_t9$2,
|
|
5790
5790
|
_t0$2,
|
|
5791
5791
|
_t1$2,
|
|
5792
|
-
_t10$2
|
|
5792
|
+
_t10$2,
|
|
5793
|
+
_t11$2;
|
|
5793
5794
|
const FormFieldWrapper$1 = styled.div(_t$b || (_t$b = _$a`
|
|
5794
5795
|
margin-bottom: var(--goa-space-l);
|
|
5795
5796
|
`));
|
|
@@ -5848,11 +5849,15 @@ const ReviewValue = styled.div(_t9$2 || (_t9$2 = _$a`
|
|
|
5848
5849
|
const CheckboxWrapper = styled.div(_t0$2 || (_t0$2 = _$a`
|
|
5849
5850
|
min-height: 28px;
|
|
5850
5851
|
`));
|
|
5851
|
-
styled.
|
|
5852
|
+
const NoneGivenText = styled.span(_t1$2 || (_t1$2 = _$a`
|
|
5853
|
+
color: var(--goa-color-greyscale-700);
|
|
5854
|
+
font-style: italic;
|
|
5855
|
+
`));
|
|
5856
|
+
styled.h4(_t10$2 || (_t10$2 = _$a`
|
|
5852
5857
|
margin: 0 0 0.25rem 0;
|
|
5853
5858
|
fontsize: larger;
|
|
5854
5859
|
`));
|
|
5855
|
-
styled.h4(
|
|
5860
|
+
styled.h4(_t11$2 || (_t11$2 = _$a`
|
|
5856
5861
|
border-bottom: 1px solid #ddd;
|
|
5857
5862
|
`));
|
|
5858
5863
|
|
|
@@ -9516,17 +9521,18 @@ function humanizeAjvError(error, schema, uischema) {
|
|
|
9516
9521
|
var _error$message;
|
|
9517
9522
|
const path = getEffectiveInstancePath(error);
|
|
9518
9523
|
const label = resolveLabel(path, schema, uischema);
|
|
9519
|
-
console.log('Do we get here?', {
|
|
9520
|
-
error,
|
|
9521
|
-
path,
|
|
9522
|
-
label
|
|
9523
|
-
});
|
|
9524
9524
|
switch (error.keyword) {
|
|
9525
9525
|
case VALIDATION_KEYWORDS.REQUIRED:
|
|
9526
9526
|
return `${label} is required`;
|
|
9527
9527
|
case VALIDATION_KEYWORDS.MIN_LENGTH:
|
|
9528
|
+
if (error != null && error.message) {
|
|
9529
|
+
return error.message;
|
|
9530
|
+
}
|
|
9528
9531
|
return `${label} must be at least ${error.params.limit} characters`;
|
|
9529
9532
|
case VALIDATION_KEYWORDS.MAX_LENGTH:
|
|
9533
|
+
if (error != null && error.message) {
|
|
9534
|
+
return error.message;
|
|
9535
|
+
}
|
|
9530
9536
|
return `${label} must be at most ${error.params.limit} characters`;
|
|
9531
9537
|
case VALIDATION_KEYWORDS.FORMAT:
|
|
9532
9538
|
return `${label} must be a valid ${error.params.format}`;
|
|
@@ -10140,12 +10146,15 @@ const GoAInputBaseTableReview = props => {
|
|
|
10140
10146
|
}
|
|
10141
10147
|
// If a required checkbox is unchecked, show only the validation message in
|
|
10142
10148
|
// review mode (not a contradictory "No (...)" value line).
|
|
10149
|
+
let isBooleanRequiredError = false;
|
|
10143
10150
|
if ((schema == null ? void 0 : schema.type) === 'boolean' && data === false && activeError && /\sis required$/i.test(activeError)) {
|
|
10144
10151
|
reviewText = '';
|
|
10152
|
+
isBooleanRequiredError = true;
|
|
10145
10153
|
}
|
|
10146
10154
|
// eslint-disable-next-line
|
|
10147
10155
|
const stepId = (_uischema$options4 = uischema.options) == null ? void 0 : _uischema$options4.stepId;
|
|
10148
10156
|
const showInlineValue = reviewText === null || reviewText === undefined || typeof reviewText === 'string' || typeof reviewText === 'number' || /*#__PURE__*/React.isValidElement(reviewText) || Array.isArray(reviewText) && reviewText.length === 0;
|
|
10157
|
+
const isValueEmpty = !isBooleanRequiredError && (reviewText === null || reviewText === undefined || reviewText === '' || Array.isArray(reviewText) && reviewText.length === 0);
|
|
10149
10158
|
return jsx("tr", {
|
|
10150
10159
|
"data-testid": `input-base-table-${label}-row`,
|
|
10151
10160
|
children: jsxs(PageReviewContainer, {
|
|
@@ -10164,7 +10173,9 @@ const GoAInputBaseTableReview = props => {
|
|
|
10164
10173
|
}), jsxs(ReviewValue, {
|
|
10165
10174
|
children: [showInlineValue ? jsx("div", {
|
|
10166
10175
|
"data-testid": `review-value-${label}`,
|
|
10167
|
-
children:
|
|
10176
|
+
children: isValueEmpty ? jsx(NoneGivenText, {
|
|
10177
|
+
children: "(none given)"
|
|
10178
|
+
}) : reviewText != null ? reviewText : ''
|
|
10168
10179
|
}) : jsx(JsonFormsDispatch, {
|
|
10169
10180
|
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
10170
10181
|
schema: schema,
|
|
@@ -13126,7 +13137,9 @@ const AddressLoopUpControlTableReview = props => {
|
|
|
13126
13137
|
children: "Change"
|
|
13127
13138
|
})]
|
|
13128
13139
|
}), jsxs(ReviewValue, {
|
|
13129
|
-
children: [value
|
|
13140
|
+
children: [!value ? jsx(NoneGivenText, {
|
|
13141
|
+
children: "(none given)"
|
|
13142
|
+
}) : value, errorMessage && jsx(GoabFormItem, {
|
|
13130
13143
|
error: errorMessage,
|
|
13131
13144
|
label: ""
|
|
13132
13145
|
})]
|
|
@@ -13495,6 +13508,12 @@ const RenderLink = props => {
|
|
|
13495
13508
|
};
|
|
13496
13509
|
|
|
13497
13510
|
const _excluded$3 = ["isParent", "showLabel"];
|
|
13511
|
+
const markdownComponents = {
|
|
13512
|
+
a: props => jsx("a", Object.assign({}, props, {
|
|
13513
|
+
target: "_blank",
|
|
13514
|
+
rel: "noopener noreferrer"
|
|
13515
|
+
}))
|
|
13516
|
+
};
|
|
13498
13517
|
const HelpContentReviewComponent = () => {
|
|
13499
13518
|
return jsx(Fragment, {
|
|
13500
13519
|
children: " "
|
|
@@ -13527,7 +13546,9 @@ const MarkdownComponent = ({
|
|
|
13527
13546
|
} = evaluateSync(markdown, Object.assign({}, runtime, {
|
|
13528
13547
|
Fragment: React.Fragment
|
|
13529
13548
|
}));
|
|
13530
|
-
return /*#__PURE__*/React.createElement(MDXContent, {
|
|
13549
|
+
return /*#__PURE__*/React.createElement(MDXContent, {
|
|
13550
|
+
components: markdownComponents
|
|
13551
|
+
});
|
|
13531
13552
|
}
|
|
13532
13553
|
return jsxs(InvalidMarkdown, {
|
|
13533
13554
|
children: ["Help content markdown is invalid: ", response.error, " "]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.62.0",
|
|
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",
|
package/renderer-catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-05-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-05-04T22:09:31.942Z",
|
|
4
|
+
"sourceCommit": "db0eb216b2743826de1a7f3bb0e6d6e2aa7ec1cf",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RankedTester } from '@jsonforms/core';
|
|
3
3
|
import { ControlProps, ControlElement } from '@jsonforms/core';
|
|
4
|
+
import * as runtime from 'react/jsx-runtime';
|
|
4
5
|
import './HelpContent.css';
|
|
5
6
|
interface OptionProps {
|
|
6
7
|
ariaLabel?: string;
|
|
@@ -27,6 +28,9 @@ interface CustomControlProps extends ControlProps {
|
|
|
27
28
|
interface MdxMarkdown {
|
|
28
29
|
markdown: string;
|
|
29
30
|
}
|
|
31
|
+
export declare const markdownComponents: {
|
|
32
|
+
a: (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => runtime.JSX.Element;
|
|
33
|
+
};
|
|
30
34
|
export declare const MarkdownComponent: ({ markdown }: MdxMarkdown) => JSX.Element;
|
|
31
35
|
export declare const HelpContentComponent: ({ isParent, showLabel, ...props }: CustomControlProps & ExtraHelpContentProps) => JSX.Element;
|
|
32
36
|
export declare const HelpContentTester: RankedTester;
|
|
@@ -8,5 +8,6 @@ export declare const ReviewHeader: import("styled-components/dist/types").IStyle
|
|
|
8
8
|
export declare const ReviewLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
9
9
|
export declare const ReviewValue: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
10
10
|
export declare const CheckboxWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
11
|
+
export declare const NoneGivenText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
11
12
|
export declare const H4Large: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>>> & string;
|
|
12
13
|
export declare const Row: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>>> & string;
|