@abgov/jsonforms-components 2.67.1 → 2.67.3
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
|
@@ -10094,6 +10094,43 @@ class ListWithDetailControl extends React.Component {
|
|
|
10094
10094
|
}
|
|
10095
10095
|
}
|
|
10096
10096
|
|
|
10097
|
+
const REVIEW_CHANGE_ACTION = 'jsonforms/review/change';
|
|
10098
|
+
function reviewReducer(_state, action) {
|
|
10099
|
+
if (action.type === REVIEW_CHANGE_ACTION) {
|
|
10100
|
+
return action.payload;
|
|
10101
|
+
}
|
|
10102
|
+
return null;
|
|
10103
|
+
}
|
|
10104
|
+
const ReviewRenderContext = /*#__PURE__*/createContext(undefined);
|
|
10105
|
+
const ReviewRenderProvider = ({
|
|
10106
|
+
children,
|
|
10107
|
+
onReviewChange
|
|
10108
|
+
}) => {
|
|
10109
|
+
const [reviewChange, dispatch] = useReducer(reviewReducer, null);
|
|
10110
|
+
const onChangeDispatch = useCallback((stepId, scope) => {
|
|
10111
|
+
dispatch({
|
|
10112
|
+
type: REVIEW_CHANGE_ACTION,
|
|
10113
|
+
payload: {
|
|
10114
|
+
stepId,
|
|
10115
|
+
scope
|
|
10116
|
+
}
|
|
10117
|
+
});
|
|
10118
|
+
onReviewChange == null || onReviewChange(stepId, scope);
|
|
10119
|
+
}, [onReviewChange]);
|
|
10120
|
+
const context = useMemo(() => ({
|
|
10121
|
+
isProvided: true,
|
|
10122
|
+
onChangeDispatch,
|
|
10123
|
+
reviewChange
|
|
10124
|
+
}), [onChangeDispatch, reviewChange]);
|
|
10125
|
+
return jsx(ReviewRenderContext.Provider, {
|
|
10126
|
+
value: context,
|
|
10127
|
+
children: children
|
|
10128
|
+
});
|
|
10129
|
+
};
|
|
10130
|
+
const useReviewContext = () => {
|
|
10131
|
+
return useContext(ReviewRenderContext);
|
|
10132
|
+
};
|
|
10133
|
+
|
|
10097
10134
|
const GoAInputBaseTableReview = props => {
|
|
10098
10135
|
var _uischema$options, _uischema$scope2, _jsonForms$core, _uischema$options4, _uischema$options5, _uischema$options6;
|
|
10099
10136
|
const {
|
|
@@ -10110,6 +10147,7 @@ const GoAInputBaseTableReview = props => {
|
|
|
10110
10147
|
visible
|
|
10111
10148
|
} = props;
|
|
10112
10149
|
const context = useContext(JsonFormsStepperContext);
|
|
10150
|
+
const reviewCtx = useReviewContext();
|
|
10113
10151
|
const jsonForms = useJsonForms();
|
|
10114
10152
|
const reviewLabel = typeof ((_uischema$options = uischema.options) == null ? void 0 : _uischema$options.reviewLabel) === 'string' ? uischema.options.reviewLabel : '';
|
|
10115
10153
|
const propLabel = typeof label === 'string' ? label : '';
|
|
@@ -10273,6 +10311,10 @@ const GoAInputBaseTableReview = props => {
|
|
|
10273
10311
|
}
|
|
10274
10312
|
// eslint-disable-next-line
|
|
10275
10313
|
const stepId = (_uischema$options5 = uischema.options) == null ? void 0 : _uischema$options5.stepId;
|
|
10314
|
+
function handleChangeClick() {
|
|
10315
|
+
context == null || context.goToPage(stepId, uischema.scope);
|
|
10316
|
+
reviewCtx == null || reviewCtx.onChangeDispatch(stepId, uischema.scope);
|
|
10317
|
+
}
|
|
10276
10318
|
const showInlineValue = reviewText === null || reviewText === undefined || typeof reviewText === 'string' || typeof reviewText === 'number' || /*#__PURE__*/React.isValidElement(reviewText) || Array.isArray(reviewText) && reviewText.length === 0;
|
|
10277
10319
|
const isValueEmpty = !isBooleanRequiredError && (reviewText === null || reviewText === undefined || reviewText === '' || Array.isArray(reviewText) && reviewText.length === 0);
|
|
10278
10320
|
return jsx("tr", {
|
|
@@ -10287,7 +10329,7 @@ const GoAInputBaseTableReview = props => {
|
|
|
10287
10329
|
}), stepId !== undefined && !((_uischema$options6 = uischema.options) != null && (_uischema$options6 = _uischema$options6.componentProps) != null && _uischema$options6.readOnly) && jsx(GoabButton, {
|
|
10288
10330
|
type: "tertiary",
|
|
10289
10331
|
size: "compact",
|
|
10290
|
-
onClick:
|
|
10332
|
+
onClick: handleChangeClick,
|
|
10291
10333
|
children: "Change"
|
|
10292
10334
|
})]
|
|
10293
10335
|
}), jsxs(ReviewValue, {
|
|
@@ -12182,6 +12224,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
|
|
|
12182
12224
|
return err.instancePath.includes(rowPath);
|
|
12183
12225
|
})) == null ? void 0 : _errors$filter.length) > 0 : false;
|
|
12184
12226
|
return jsxs(NonEmptyCellStyle, {
|
|
12227
|
+
"data-testid": `${rowPath}-ObjectListOuterWrapper`,
|
|
12185
12228
|
children: [!isInReview && (uischema == null || (_uischema$elements = uischema.elements) == null ? void 0 : _uischema$elements.map(element => {
|
|
12186
12229
|
return jsx(JsonFormsDispatch, {
|
|
12187
12230
|
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
@@ -12197,7 +12240,8 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
|
|
|
12197
12240
|
style: {
|
|
12198
12241
|
padding: '0.75rem 0'
|
|
12199
12242
|
},
|
|
12200
|
-
|
|
12243
|
+
"data-testid": `${rowPath}.objectListWrapper`,
|
|
12244
|
+
children: range(count || 0).map((i, key) => {
|
|
12201
12245
|
const rowData = data && data[i];
|
|
12202
12246
|
if (!rowData) return null;
|
|
12203
12247
|
const hasAnyValue = Object.keys(tableKeys).some(key => {
|
|
@@ -12210,6 +12254,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
|
|
|
12210
12254
|
style: {
|
|
12211
12255
|
marginBottom: '1.5rem'
|
|
12212
12256
|
},
|
|
12257
|
+
"data-testid": `${rowPath}.objectList-${key}`,
|
|
12213
12258
|
children: Object.entries(tableKeys).map(([key, label]) => {
|
|
12214
12259
|
var _required$includes, _properties$key;
|
|
12215
12260
|
const value = rowData[key];
|
|
@@ -12237,6 +12282,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
|
|
|
12237
12282
|
marginBottom: '0.5rem',
|
|
12238
12283
|
alignItems: 'center'
|
|
12239
12284
|
},
|
|
12285
|
+
"data-testid": `#/properties/${key}-input-${i}-row`,
|
|
12240
12286
|
children: [jsxs("strong", {
|
|
12241
12287
|
style: {
|
|
12242
12288
|
width: '50%',
|
|
@@ -19242,4 +19288,4 @@ const GoARenderers = [...GoABaseRenderers, {
|
|
|
19242
19288
|
}];
|
|
19243
19289
|
const GoACells = [...InputCells];
|
|
19244
19290
|
|
|
19245
|
-
export { ADD_DATALIST_ACTION, ADD_NO_ANONYMOUS_ACTION, ADD_REGISTER_DATA_ACTION, ADD_REGISTER_DATA_ERROR, ADD_USER_ACTION, AUTO_POPULATE_SOURCES, AddressLookUpControl, AddressLookUpControlReview, AddressLookUpTester, AddressLoopUpControlTableReview, ArrayControl, ArrayControlBase, ArrayControlReview, BooleanComponent, BooleanControl, BooleanRadioComponent, BooleanRadioControl, CategorizationPagesRendererTester, CategorizationStepperRendererTester, CheckboxGroup, ContactInformationTester, ContextProviderC, ContextProviderClass, ContextProviderFactory, ContractInfoControl, ContractInfoControlReview, EnumCheckboxControl, EnumRadioControl, EnumSelect, FileUploader, FileUploaderReview, FileUploaderTester, FormPageStepper, FormPagesView, FormStepper, FormStepperControl, FormStepperPagesControl, FormStepperReviewControl, FormStepperReviewer, FormStepperView, FullNameControl, FullNameControlReview, FullNameDobControl, FullNameDobReviewControl, FullNameDobTester, FullNameReviewControl, FullNameTester, GoAArrayControlRenderer, GoAArrayControlReviewRenderer, GoAArrayControlTester, GoABaseInputReviewComponent, GoABaseRenderers, GoABaseReviewRenderers, GoABaseTableReviewRenderers, GoABooleanControl, GoABooleanControlTester, GoABooleanRadioControl, GoABooleanRadioControlTester, GoACalculationControl, GoACalculationControlTester, GoACells, GoACheckoutGroupControlTester, GoAContractInfoControlReview, GoADateControl, GoADateControlTester, GoADateInput, GoADateTimeControl, GoADateTimeControlTester, GoADateTimeInput, GoAEmailControl, GoAEmailControlTester, GoAEmailInput, GoAEnumCheckboxGroupControl, GoAEnumControl, GoAEnumControlTester, GoAEnumRadioGroupControl, GoAInputBaseControl, GoAInputBaseFullNameControlReview, GoAInputBaseFullNameDobControlReview, GoAInputBaseReviewControl, GoAInputBaseTableReview, GoAInputBaseTableReviewControl, GoAInputDateControl, GoAInputDateTimeControl, GoAInputEmailControl, GoAInputIntegerControl, GoAInputNumberControl, GoAInputText, GoAInputTextControl, GoAInputTimeControl, GoAIntegerControl, GoAIntegerControlTester, GoAListWithDetailsControlRenderer, GoAListWithDetailsTester, GoANumberControl, GoANumberControlTester, GoANumberInput, GoAPhoneNumberControl, GoAPhoneNumberWithTypeControl, GoAPrimitiveArrayRenderer, GoAPrimitiveArrayTester, GoARadioGroupControlTester, GoARenderers, GoAReviewRenderers, GoATextControl, GoATextControlTester, GoATimeControl, GoATimeControlTester, GoATimeInput, GoInputBaseReview, GoabInputBasePhoneNumberReviewControl, GoabInputBasePhoneNumberWithTypeReviewControl, GoabInputInteger, InnerGoAInputText, JsonFormContext, JsonFormRegisterProvider, JsonFormsRegisterContext, ListWithDetailsControl, MultiLineText, MultiLineTextControl, MultiLineTextControlInput, MultiLineTextControlTester, OPTION_DEFINITIONS, PHONE_REGEX, PhoneGrid, PhoneNumberControl, PhoneNumberReviewControl, PhoneNumberTester, PhoneNumberWithTypeControl, PhoneNumberWithTypeReviewControl, PhoneNumberWithTypeTester, PrimitiveArrayControl, RadioGroup, USER_FIELD_DEFINITIONS, autoPopulatePropertiesMonaco, autoPopulateValue, categoriesAreValid, createAutoPopulateMiddleware, createDefaultAjv, enumControl, errMalformedDate, fetchRegisterConfigFromOptions$1 as fetchRegisterConfigFromOptions, formatSin, getAutoPopulateControls, getAutoPopulatedData, getByJsonPointer, getCategoryScopes, hasDataInScopes, hasDataValue, isAddressLookup, isContactInformation, isFullName, isFullNameDoB, isPhoneNumberWithType, mergeAutoPopulatedData, predictiveOptionsMonaco, registerReducer, resolveRefs, toDateTimeLocalInputValue, tryResolveRefs, useRegisterUser };
|
|
19291
|
+
export { ADD_DATALIST_ACTION, ADD_NO_ANONYMOUS_ACTION, ADD_REGISTER_DATA_ACTION, ADD_REGISTER_DATA_ERROR, ADD_USER_ACTION, AUTO_POPULATE_SOURCES, AddressLookUpControl, AddressLookUpControlReview, AddressLookUpTester, AddressLoopUpControlTableReview, ArrayControl, ArrayControlBase, ArrayControlReview, BooleanComponent, BooleanControl, BooleanRadioComponent, BooleanRadioControl, CategorizationPagesRendererTester, CategorizationStepperRendererTester, CheckboxGroup, ContactInformationTester, ContextProviderC, ContextProviderClass, ContextProviderFactory, ContractInfoControl, ContractInfoControlReview, EnumCheckboxControl, EnumRadioControl, EnumSelect, FileUploader, FileUploaderReview, FileUploaderTester, FormPageStepper, FormPagesView, FormStepper, FormStepperControl, FormStepperPagesControl, FormStepperReviewControl, FormStepperReviewer, FormStepperView, FullNameControl, FullNameControlReview, FullNameDobControl, FullNameDobReviewControl, FullNameDobTester, FullNameReviewControl, FullNameTester, GoAArrayControlRenderer, GoAArrayControlReviewRenderer, GoAArrayControlTester, GoABaseInputReviewComponent, GoABaseRenderers, GoABaseReviewRenderers, GoABaseTableReviewRenderers, GoABooleanControl, GoABooleanControlTester, GoABooleanRadioControl, GoABooleanRadioControlTester, GoACalculationControl, GoACalculationControlTester, GoACells, GoACheckoutGroupControlTester, GoAContractInfoControlReview, GoADateControl, GoADateControlTester, GoADateInput, GoADateTimeControl, GoADateTimeControlTester, GoADateTimeInput, GoAEmailControl, GoAEmailControlTester, GoAEmailInput, GoAEnumCheckboxGroupControl, GoAEnumControl, GoAEnumControlTester, GoAEnumRadioGroupControl, GoAInputBaseControl, GoAInputBaseFullNameControlReview, GoAInputBaseFullNameDobControlReview, GoAInputBaseReviewControl, GoAInputBaseTableReview, GoAInputBaseTableReviewControl, GoAInputDateControl, GoAInputDateTimeControl, GoAInputEmailControl, GoAInputIntegerControl, GoAInputNumberControl, GoAInputText, GoAInputTextControl, GoAInputTimeControl, GoAIntegerControl, GoAIntegerControlTester, GoAListWithDetailsControlRenderer, GoAListWithDetailsTester, GoANumberControl, GoANumberControlTester, GoANumberInput, GoAPhoneNumberControl, GoAPhoneNumberWithTypeControl, GoAPrimitiveArrayRenderer, GoAPrimitiveArrayTester, GoARadioGroupControlTester, GoARenderers, GoAReviewRenderers, GoATextControl, GoATextControlTester, GoATimeControl, GoATimeControlTester, GoATimeInput, GoInputBaseReview, GoabInputBasePhoneNumberReviewControl, GoabInputBasePhoneNumberWithTypeReviewControl, GoabInputInteger, InnerGoAInputText, JsonFormContext, JsonFormRegisterProvider, JsonFormsRegisterContext, ListWithDetailsControl, MultiLineText, MultiLineTextControl, MultiLineTextControlInput, MultiLineTextControlTester, OPTION_DEFINITIONS, PHONE_REGEX, PhoneGrid, PhoneNumberControl, PhoneNumberReviewControl, PhoneNumberTester, PhoneNumberWithTypeControl, PhoneNumberWithTypeReviewControl, PhoneNumberWithTypeTester, PrimitiveArrayControl, REVIEW_CHANGE_ACTION, RadioGroup, ReviewRenderContext, ReviewRenderProvider, USER_FIELD_DEFINITIONS, autoPopulatePropertiesMonaco, autoPopulateValue, categoriesAreValid, createAutoPopulateMiddleware, createDefaultAjv, enumControl, errMalformedDate, fetchRegisterConfigFromOptions$1 as fetchRegisterConfigFromOptions, formatSin, getAutoPopulateControls, getAutoPopulatedData, getByJsonPointer, getCategoryScopes, hasDataInScopes, hasDataValue, isAddressLookup, isContactInformation, isFullName, isFullNameDoB, isPhoneNumberWithType, mergeAutoPopulatedData, predictiveOptionsMonaco, registerReducer, resolveRefs, toDateTimeLocalInputValue, tryResolveRefs, useRegisterUser, useReviewContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.67.
|
|
3
|
+
"version": "2.67.3",
|
|
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-06-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-06-18T18:55:02.219Z",
|
|
4
|
+
"sourceCommit": "b528900b24c85fd02b5cf6adecf29649575f5d06",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const REVIEW_CHANGE_ACTION = "jsonforms/review/change";
|
|
3
|
+
export interface ReviewChangeState {
|
|
4
|
+
stepId: number | undefined;
|
|
5
|
+
scope: string;
|
|
6
|
+
}
|
|
7
|
+
export type ReviewChangeAction = {
|
|
8
|
+
type: typeof REVIEW_CHANGE_ACTION;
|
|
9
|
+
payload: ReviewChangeState;
|
|
10
|
+
};
|
|
11
|
+
interface ReviewContext {
|
|
12
|
+
isProvided: boolean;
|
|
13
|
+
onChangeDispatch: (stepId: number | undefined, scope: string) => void;
|
|
14
|
+
reviewChange: ReviewChangeState | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const ReviewRenderContext: import("react").Context<ReviewContext | undefined>;
|
|
17
|
+
interface ReviewRenderProviderProps {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
onReviewChange?: (stepId: number | undefined, scope: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const ReviewRenderProvider: ({ children, onReviewChange }: ReviewRenderProviderProps) => JSX.Element;
|
|
22
|
+
export declare const useReviewContext: () => ReviewContext | undefined;
|
|
23
|
+
export {};
|