@abgov/jsonforms-components 2.81.0 → 2.81.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 +120 -72
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
- package/src/lib/Controls/FormStepper/context/StepperContext.d.ts +2 -0
- package/src/lib/Controls/FormStepper/context/StepperOptionsContext.d.ts +10 -0
- package/src/lib/Controls/FormStepper/context/index.d.ts +1 -0
- package/src/lib/Controls/FormStepper/util/stepperOptions.d.ts +10 -0
- package/src/lib/Controls/ObjectArray/ObjectListControlTypes.d.ts +1 -0
- package/src/lib/Controls/ObjectArray/ObjectListControlUtils.d.ts +2 -2
- package/src/lib/common/Constants.d.ts +3 -0
package/index.esm.js
CHANGED
|
@@ -3933,6 +3933,9 @@ var StepStatus;
|
|
|
3933
3933
|
const getAddressLookupFieldLabel = fieldName => {
|
|
3934
3934
|
return ADDRESS_LOOKUP_LABELS[fieldName] || fieldName;
|
|
3935
3935
|
};
|
|
3936
|
+
const NO_ANSWER_MESSAGE = '(none given)';
|
|
3937
|
+
const BACK_TO_OVERVIEW_LABEL = 'Back to application overview';
|
|
3938
|
+
const NEXT_BUTTON_LABEL = 'Next';
|
|
3936
3939
|
|
|
3937
3940
|
var classof$7 = classofRaw$2;
|
|
3938
3941
|
|
|
@@ -10247,6 +10250,18 @@ const getNavigationTargetFromParams = params => {
|
|
|
10247
10250
|
} : undefined;
|
|
10248
10251
|
};
|
|
10249
10252
|
|
|
10253
|
+
const getStepperPageOptions = uischema => {
|
|
10254
|
+
var _uischema$options$hid, _uischema$options, _uischema$options2, _uischema$options$toA, _uischema$options3, _uischema$options$sub, _uischema$options4, _uischema$options$noA, _uischema$options5, _uischema$options$sum, _uischema$options6;
|
|
10255
|
+
return {
|
|
10256
|
+
hideSubmit: (_uischema$options$hid = uischema == null || (_uischema$options = uischema.options) == null ? void 0 : _uischema$options.hideSubmit) != null ? _uischema$options$hid : false,
|
|
10257
|
+
hideSummary: (uischema == null || (_uischema$options2 = uischema.options) == null ? void 0 : _uischema$options2.hideSummary) === true,
|
|
10258
|
+
toAppOverviewLabel: (_uischema$options$toA = uischema == null || (_uischema$options3 = uischema.options) == null ? void 0 : _uischema$options3.toAppOverviewLabel) != null ? _uischema$options$toA : BACK_TO_OVERVIEW_LABEL,
|
|
10259
|
+
submissionLabel: (_uischema$options$sub = uischema == null || (_uischema$options4 = uischema.options) == null ? void 0 : _uischema$options4.submissionLabel) != null ? _uischema$options$sub : NEXT_BUTTON_LABEL,
|
|
10260
|
+
noAnswerMessage: (_uischema$options$noA = uischema == null || (_uischema$options5 = uischema.options) == null ? void 0 : _uischema$options5.noAnswerMessage) != null ? _uischema$options$noA : NO_ANSWER_MESSAGE,
|
|
10261
|
+
summaryPageTitle: (_uischema$options$sum = uischema == null || (_uischema$options6 = uischema.options) == null ? void 0 : _uischema$options6.summaryPageTitle) != null ? _uischema$options$sum : ''
|
|
10262
|
+
};
|
|
10263
|
+
};
|
|
10264
|
+
|
|
10250
10265
|
const createStepperContextInitData = (props, options) => {
|
|
10251
10266
|
var _uischema$options, _uischema$options2, _categorization$eleme, _props$activeId;
|
|
10252
10267
|
const {
|
|
@@ -10440,6 +10455,7 @@ const JsonFormsStepperContextProvider = ({
|
|
|
10440
10455
|
selectPath: () => {
|
|
10441
10456
|
return snapshot.path;
|
|
10442
10457
|
},
|
|
10458
|
+
selectStepperOptions: () => getStepperPageOptions(uischema),
|
|
10443
10459
|
selectCategory: id => {
|
|
10444
10460
|
return snapshot.categories[id];
|
|
10445
10461
|
},
|
|
@@ -10478,7 +10494,7 @@ const JsonFormsStepperContextProvider = ({
|
|
|
10478
10494
|
});
|
|
10479
10495
|
}
|
|
10480
10496
|
};
|
|
10481
|
-
}, [stepperDispatch, snapshot, doValidatePage]);
|
|
10497
|
+
}, [stepperDispatch, snapshot, doValidatePage, uischema]);
|
|
10482
10498
|
/* istanbul ignore next */
|
|
10483
10499
|
useEffect(() => {
|
|
10484
10500
|
var _ctx$core$errors, _ctx$core4;
|
|
@@ -10665,6 +10681,25 @@ const getEmptyRequiredStringErrors = (data, schema) => {
|
|
|
10665
10681
|
return errors;
|
|
10666
10682
|
};
|
|
10667
10683
|
|
|
10684
|
+
const StepperOptionsContext = /*#__PURE__*/createContext(undefined);
|
|
10685
|
+
// Carries the top-level uischema options to controls rendered without a stepper in context.
|
|
10686
|
+
const StepperOptionsProvider = ({
|
|
10687
|
+
uischema,
|
|
10688
|
+
children
|
|
10689
|
+
}) => {
|
|
10690
|
+
const options = useMemo(() => getStepperPageOptions(uischema), [uischema]);
|
|
10691
|
+
return jsx(StepperOptionsContext.Provider, {
|
|
10692
|
+
value: options,
|
|
10693
|
+
children: children
|
|
10694
|
+
});
|
|
10695
|
+
};
|
|
10696
|
+
const useStepperPageOptions = () => {
|
|
10697
|
+
var _ref, _stepperCtx$selectSte;
|
|
10698
|
+
const stepperCtx = useContext(JsonFormsStepperContext);
|
|
10699
|
+
const providedOptions = useContext(StepperOptionsContext);
|
|
10700
|
+
return (_ref = (_stepperCtx$selectSte = stepperCtx == null ? void 0 : stepperCtx.selectStepperOptions()) != null ? _stepperCtx$selectSte : providedOptions) != null ? _ref : getStepperPageOptions(undefined);
|
|
10701
|
+
};
|
|
10702
|
+
|
|
10668
10703
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10669
10704
|
/**
|
|
10670
10705
|
* jsdom implements neither of these, and scrollIntoView is missing on real elements often enough
|
|
@@ -12842,10 +12877,10 @@ const isObjectArrayEmpty = currentData => {
|
|
|
12842
12877
|
const result = isEmpty(currentData) || JSON.stringify(currentData) === '[{}]';
|
|
12843
12878
|
return result;
|
|
12844
12879
|
};
|
|
12845
|
-
const renderNoneGivenText = data => {
|
|
12880
|
+
const renderNoneGivenText = (data, noAnswerMessage) => {
|
|
12846
12881
|
return !data ? jsxs(Fragment, {
|
|
12847
12882
|
children: [jsx(NoneGivenTableText, {
|
|
12848
|
-
children:
|
|
12883
|
+
children: noAnswerMessage
|
|
12849
12884
|
}), jsx("br", {})]
|
|
12850
12885
|
}) : data;
|
|
12851
12886
|
};
|
|
@@ -12856,11 +12891,12 @@ const renderCellColumn = ({
|
|
|
12856
12891
|
index,
|
|
12857
12892
|
rowPath,
|
|
12858
12893
|
element,
|
|
12859
|
-
isRequired
|
|
12894
|
+
isRequired,
|
|
12895
|
+
noAnswerMessage
|
|
12860
12896
|
}) => {
|
|
12861
12897
|
const renderWarningCell = error => {
|
|
12862
12898
|
return jsxs(HilightCellWarning, {
|
|
12863
|
-
children: [renderNoneGivenText(data), error && jsxs(ObjectArrayWarningIconDiv, {
|
|
12899
|
+
children: [renderNoneGivenText(data, noAnswerMessage), error && jsxs(ObjectArrayWarningIconDiv, {
|
|
12864
12900
|
children: [jsx(GoabIcon, {
|
|
12865
12901
|
type: "warning",
|
|
12866
12902
|
title: "warning",
|
|
@@ -12938,7 +12974,7 @@ const createHumanizeError = (error, schema, uischema) => {
|
|
|
12938
12974
|
humanMessage = prettify(propertyMatch[1]) + ' is required';
|
|
12939
12975
|
}
|
|
12940
12976
|
}
|
|
12941
|
-
} catch (
|
|
12977
|
+
} catch (_unused) {
|
|
12942
12978
|
const raw = error.message;
|
|
12943
12979
|
const propertyMatch = raw == null ? void 0 : raw.match(/'([^']+)'/);
|
|
12944
12980
|
if (propertyMatch && propertyMatch[1]) {
|
|
@@ -14030,6 +14066,9 @@ const GoAInputBaseTableReview = props => {
|
|
|
14030
14066
|
visible
|
|
14031
14067
|
} = props;
|
|
14032
14068
|
const reportChange = useReviewChange();
|
|
14069
|
+
const {
|
|
14070
|
+
noAnswerMessage
|
|
14071
|
+
} = useStepperPageOptions();
|
|
14033
14072
|
const showChangeButtons = useShowChangeButtons();
|
|
14034
14073
|
const jsonForms = useJsonForms();
|
|
14035
14074
|
const reviewLabel = typeof ((_uischema$options = uischema.options) == null ? void 0 : _uischema$options.reviewLabel) === 'string' ? uischema.options.reviewLabel : '';
|
|
@@ -14145,7 +14184,7 @@ const GoAInputBaseTableReview = props => {
|
|
|
14145
14184
|
} else {
|
|
14146
14185
|
activeError = humanizeAjvError(matchedError, rootSchema != null ? rootSchema : schema, uischema);
|
|
14147
14186
|
}
|
|
14148
|
-
} catch (
|
|
14187
|
+
} catch (_unused) {
|
|
14149
14188
|
var _matchedError$params;
|
|
14150
14189
|
// Fallback: try to extract missing property name and create a friendly message
|
|
14151
14190
|
if (matchedError.keyword === 'required' && (_matchedError$params = matchedError.params) != null && _matchedError$params.missingProperty) {
|
|
@@ -14198,7 +14237,6 @@ const GoAInputBaseTableReview = props => {
|
|
|
14198
14237
|
reviewText = '';
|
|
14199
14238
|
isBooleanRequiredError = true;
|
|
14200
14239
|
}
|
|
14201
|
-
// eslint-disable-next-line
|
|
14202
14240
|
const stepId = (_uischema$options5 = uischema.options) == null ? void 0 : _uischema$options5.stepId;
|
|
14203
14241
|
function handleChangeClick() {
|
|
14204
14242
|
reportChange(stepId, uischema.scope);
|
|
@@ -14223,7 +14261,7 @@ const GoAInputBaseTableReview = props => {
|
|
|
14223
14261
|
children: [showInlineValue ? jsx("div", {
|
|
14224
14262
|
"data-testid": `review-value-${label}`,
|
|
14225
14263
|
children: isValueEmpty ? jsx(NoneGivenText, {
|
|
14226
|
-
children:
|
|
14264
|
+
children: noAnswerMessage
|
|
14227
14265
|
}) : reviewText != null ? reviewText : ''
|
|
14228
14266
|
}) : jsx(JsonFormsDispatch, {
|
|
14229
14267
|
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
@@ -15601,6 +15639,9 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
|
|
|
15601
15639
|
handleChange,
|
|
15602
15640
|
errors
|
|
15603
15641
|
} = props;
|
|
15642
|
+
const {
|
|
15643
|
+
noAnswerMessage
|
|
15644
|
+
} = useStepperPageOptions();
|
|
15604
15645
|
const element = (schema == null ? void 0 : schema.items) || (schema == null || (_schema$properties = schema.properties) == null || (_schema$properties = _schema$properties[rowPath]) == null ? void 0 : _schema$properties.items) || schema;
|
|
15605
15646
|
const required = (element == null ? void 0 : element.required) || [];
|
|
15606
15647
|
const properties = element == null ? void 0 : element.properties;
|
|
@@ -15707,7 +15748,8 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
|
|
|
15707
15748
|
errors: errors !== undefined ? errors : [],
|
|
15708
15749
|
element: key,
|
|
15709
15750
|
rowPath,
|
|
15710
|
-
index: i
|
|
15751
|
+
index: i,
|
|
15752
|
+
noAnswerMessage: noAnswerMessage != null ? noAnswerMessage : NO_ANSWER_MESSAGE
|
|
15711
15753
|
})
|
|
15712
15754
|
})]
|
|
15713
15755
|
}, key);
|
|
@@ -16994,6 +17036,9 @@ const AddressLoopUpControlTableReview = props => {
|
|
|
16994
17036
|
path
|
|
16995
17037
|
} = props;
|
|
16996
17038
|
const jsonForms = useJsonForms();
|
|
17039
|
+
const {
|
|
17040
|
+
noAnswerMessage
|
|
17041
|
+
} = useStepperPageOptions();
|
|
16997
17042
|
const stepId = (_uischema$options = uischema.options) == null ? void 0 : _uischema$options.stepId;
|
|
16998
17043
|
const reportChange = useReviewChange();
|
|
16999
17044
|
const showChangeButtons = useShowChangeButtons();
|
|
@@ -17116,7 +17161,7 @@ const AddressLoopUpControlTableReview = props => {
|
|
|
17116
17161
|
})]
|
|
17117
17162
|
}), jsxs(ReviewValue, {
|
|
17118
17163
|
children: [!value ? jsx(NoneGivenText, {
|
|
17119
|
-
children:
|
|
17164
|
+
children: noAnswerMessage
|
|
17120
17165
|
}) : value, errorMessage && jsx(GoabFormItem, {
|
|
17121
17166
|
error: errorMessage,
|
|
17122
17167
|
label: ""
|
|
@@ -17884,7 +17929,6 @@ const GoABaseTableReviewRenderers$1 = [
|
|
|
17884
17929
|
renderer: CalloutReviewControl
|
|
17885
17930
|
}];
|
|
17886
17931
|
const FormStepperReviewer = props => {
|
|
17887
|
-
var _uischema$options$com, _uischema$options, _uischema$options2;
|
|
17888
17932
|
const {
|
|
17889
17933
|
uischema,
|
|
17890
17934
|
data,
|
|
@@ -17893,10 +17937,11 @@ const FormStepperReviewer = props => {
|
|
|
17893
17937
|
cells,
|
|
17894
17938
|
enabled
|
|
17895
17939
|
} = props;
|
|
17896
|
-
const
|
|
17940
|
+
const jsonForms = useJsonForms();
|
|
17941
|
+
// Read from the uischema directly; the provider below is not yet in scope here.
|
|
17897
17942
|
const {
|
|
17898
17943
|
summaryPageTitle
|
|
17899
|
-
} = (
|
|
17944
|
+
} = getStepperPageOptions(uischema);
|
|
17900
17945
|
const categorization = uischema;
|
|
17901
17946
|
const categories = categorization.elements;
|
|
17902
17947
|
const rescopeMaps = ['#/properties/albertaAddress', '#/properties/canadianAddress', '#/properties/sin'];
|
|
@@ -17914,60 +17959,63 @@ const FormStepperReviewer = props => {
|
|
|
17914
17959
|
}
|
|
17915
17960
|
return true;
|
|
17916
17961
|
};
|
|
17917
|
-
return
|
|
17918
|
-
|
|
17919
|
-
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
|
|
17924
|
-
|
|
17925
|
-
|
|
17926
|
-
// Build visible elements list
|
|
17927
|
-
const elementsToRender = category.elements.filter(field => hasVisibleContent(field)).map(e => {
|
|
17928
|
-
const layout = e;
|
|
17929
|
-
if (rescopeMaps.some(scope => {
|
|
17930
|
-
var _layout$elements;
|
|
17931
|
-
return (_layout$elements = layout.elements) == null ? void 0 : _layout$elements.map(el => el.scope).includes(scope);
|
|
17932
|
-
})) {
|
|
17933
|
-
return layout.elements;
|
|
17962
|
+
return jsx(StepperOptionsProvider, {
|
|
17963
|
+
uischema: uischema,
|
|
17964
|
+
children: jsxs(ReviewItem, {
|
|
17965
|
+
children: [summaryPageTitle && !jsonForms.readonly && jsx(FormStepperSummaryH3, {
|
|
17966
|
+
children: summaryPageTitle
|
|
17967
|
+
}), categories.map((category, categoryIndex) => {
|
|
17968
|
+
// Preserve index stability
|
|
17969
|
+
if (!isVisible(category, data, '', ajv, undefined)) {
|
|
17970
|
+
return null;
|
|
17934
17971
|
}
|
|
17935
|
-
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
|
|
17941
|
-
|
|
17942
|
-
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
|
|
17946
|
-
|
|
17947
|
-
|
|
17948
|
-
|
|
17949
|
-
|
|
17950
|
-
|
|
17951
|
-
|
|
17972
|
+
const categoryLabel = category.label || category.i18n || 'Unknown Category';
|
|
17973
|
+
// Build visible elements list
|
|
17974
|
+
const elementsToRender = category.elements.filter(field => hasVisibleContent(field)).map(e => {
|
|
17975
|
+
const layout = e;
|
|
17976
|
+
if (rescopeMaps.some(scope => {
|
|
17977
|
+
var _layout$elements;
|
|
17978
|
+
return (_layout$elements = layout.elements) == null ? void 0 : _layout$elements.map(el => el.scope).includes(scope);
|
|
17979
|
+
})) {
|
|
17980
|
+
return layout.elements;
|
|
17981
|
+
}
|
|
17982
|
+
return e;
|
|
17983
|
+
}).flat();
|
|
17984
|
+
// Do not render empty categories
|
|
17985
|
+
if (elementsToRender.length === 0) {
|
|
17986
|
+
return null;
|
|
17987
|
+
}
|
|
17988
|
+
return jsxs(ReviewItemSection, {
|
|
17989
|
+
className: "jsonforms-table-review-section",
|
|
17990
|
+
id: `jsonforms-table-review-section-${categoryIndex}`,
|
|
17991
|
+
children: [jsx(ReviewItemHeader, {
|
|
17992
|
+
children: jsx(ReviewItemTitle, {
|
|
17993
|
+
children: categoryLabel
|
|
17952
17994
|
})
|
|
17953
|
-
})
|
|
17954
|
-
|
|
17955
|
-
|
|
17956
|
-
|
|
17957
|
-
children: jsx("tbody", {
|
|
17958
|
-
children: jsx(JsonFormsDispatch, {
|
|
17959
|
-
"data-testid": "jsonforms-object-list-defined-elements-dispatch",
|
|
17960
|
-
schema: schema,
|
|
17961
|
-
uischema: stepperElement,
|
|
17962
|
-
enabled: enabled,
|
|
17963
|
-
renderers: GoABaseTableReviewRenderers$1,
|
|
17964
|
-
cells: cells
|
|
17995
|
+
}), elementsToRender.map((element, elementIndex) => {
|
|
17996
|
+
const stepperElement = Object.assign({}, element, {
|
|
17997
|
+
options: Object.assign({}, element.options, {
|
|
17998
|
+
stepId: categoryIndex
|
|
17965
17999
|
})
|
|
17966
|
-
})
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
18000
|
+
});
|
|
18001
|
+
return jsx(GoabTable, {
|
|
18002
|
+
width: "100%",
|
|
18003
|
+
mb: "m",
|
|
18004
|
+
children: jsx("tbody", {
|
|
18005
|
+
children: jsx(JsonFormsDispatch, {
|
|
18006
|
+
"data-testid": "jsonforms-object-list-defined-elements-dispatch",
|
|
18007
|
+
schema: schema,
|
|
18008
|
+
uischema: stepperElement,
|
|
18009
|
+
enabled: enabled,
|
|
18010
|
+
renderers: GoABaseTableReviewRenderers$1,
|
|
18011
|
+
cells: cells
|
|
18012
|
+
})
|
|
18013
|
+
})
|
|
18014
|
+
}, elementIndex);
|
|
18015
|
+
})]
|
|
18016
|
+
}, categoryIndex);
|
|
18017
|
+
})]
|
|
18018
|
+
})
|
|
17971
18019
|
});
|
|
17972
18020
|
};
|
|
17973
18021
|
const FormStepperReviewControl = withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperReviewer)));
|
|
@@ -17996,7 +18044,6 @@ const FormStepperView = props => {
|
|
|
17996
18044
|
cells,
|
|
17997
18045
|
renderers,
|
|
17998
18046
|
visible,
|
|
17999
|
-
t,
|
|
18000
18047
|
enabled
|
|
18001
18048
|
} = props;
|
|
18002
18049
|
const enumerators = useContext(JsonFormContext);
|
|
@@ -18482,7 +18529,6 @@ const FormStepperPageReviewer = props => {
|
|
|
18482
18529
|
withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperPageReviewer)));
|
|
18483
18530
|
|
|
18484
18531
|
const RenderPages = props => {
|
|
18485
|
-
var _props$categoryProps$, _props$categoryProps$2, _props$categoryProps$3, _props$categoryProps$4, _props$categoryProps$5, _props$categoryProps$6, _props$categoryProps$7;
|
|
18486
18532
|
const {
|
|
18487
18533
|
data,
|
|
18488
18534
|
schema,
|
|
@@ -18507,10 +18553,12 @@ const RenderPages = props => {
|
|
|
18507
18553
|
validationTrigger,
|
|
18508
18554
|
targetScope
|
|
18509
18555
|
} = formStepperCtx.selectStepperState();
|
|
18510
|
-
const
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18556
|
+
const {
|
|
18557
|
+
hideSubmit,
|
|
18558
|
+
toAppOverviewLabel,
|
|
18559
|
+
submissionLabel,
|
|
18560
|
+
hideSummary
|
|
18561
|
+
} = formStepperCtx.selectStepperOptions();
|
|
18514
18562
|
const submitFormFunction = enumerators == null ? void 0 : enumerators.submitFunction.get('submit-form');
|
|
18515
18563
|
const submitForm = submitFormFunction && submitFormFunction();
|
|
18516
18564
|
const saveFormFunction = enumerators == null ? void 0 : enumerators.saveFunction.get('save-form');
|
|
@@ -18577,7 +18625,7 @@ const RenderPages = props => {
|
|
|
18577
18625
|
id: `${path || `goa`}-form-pages`,
|
|
18578
18626
|
children: jsxs(PageBorder, {
|
|
18579
18627
|
children: [jsx(BackButton, {
|
|
18580
|
-
text: toAppOverviewLabel,
|
|
18628
|
+
text: toAppOverviewLabel != null ? toAppOverviewLabel : BACK_TO_OVERVIEW_LABEL,
|
|
18581
18629
|
link: () => {
|
|
18582
18630
|
handleSave();
|
|
18583
18631
|
goToTableOfContext();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.81.
|
|
3
|
+
"version": "2.81.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",
|
package/renderer-catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-11-02T17:47:52.093Z",
|
|
4
|
+
"sourceCommit": "da01d224ca485b591dd08d5096ffc4a019da81cf",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 23,
|
|
7
7
|
"renderers": [
|
|
@@ -4,6 +4,7 @@ import { StepperContextDataType, CategoryState } from './types';
|
|
|
4
4
|
import { JsonFormStepperDispatch } from './reducer';
|
|
5
5
|
import { JsonSchema } from '@jsonforms/core';
|
|
6
6
|
import { ErrorObject } from 'ajv';
|
|
7
|
+
import { StepperPageOptions } from '../util/stepperOptions';
|
|
7
8
|
export interface JsonFormsStepperContextProviderProps {
|
|
8
9
|
children: ReactNode;
|
|
9
10
|
StepperProps: CategorizationStepperLayoutRendererProps & {
|
|
@@ -27,6 +28,7 @@ export interface JsonFormsStepperContextProps {
|
|
|
27
28
|
toggleShowReviewLink: (id: number) => void;
|
|
28
29
|
validatePage: (id: number) => void;
|
|
29
30
|
selectNumberOfCompletedCategories: () => number;
|
|
31
|
+
selectStepperOptions: () => StepperPageOptions;
|
|
30
32
|
isProvided?: boolean;
|
|
31
33
|
}
|
|
32
34
|
export declare const JsonFormsStepperContext: import("react").Context<JsonFormsStepperContextProps | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UISchemaElement } from '@jsonforms/core';
|
|
3
|
+
import { StepperPageOptions } from '../util/stepperOptions';
|
|
4
|
+
interface StepperOptionsProviderProps {
|
|
5
|
+
uischema: UISchemaElement;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const StepperOptionsProvider: ({ uischema, children }: StepperOptionsProviderProps) => JSX.Element;
|
|
9
|
+
export declare const useStepperPageOptions: () => StepperPageOptions;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UISchemaElement } from '@jsonforms/core';
|
|
2
|
+
export interface StepperPageOptions {
|
|
3
|
+
hideSubmit?: boolean;
|
|
4
|
+
hideSummary?: boolean;
|
|
5
|
+
toAppOverviewLabel?: string;
|
|
6
|
+
submissionLabel?: string;
|
|
7
|
+
noAnswerMessage?: string;
|
|
8
|
+
summaryPageTitle?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const getStepperPageOptions: (uischema?: UISchemaElement) => StepperPageOptions;
|
|
@@ -17,6 +17,6 @@ export interface TableProps {
|
|
|
17
17
|
columnLabels?: Record<string, string>;
|
|
18
18
|
}
|
|
19
19
|
export declare const isObjectArrayEmpty: (currentData: string) => boolean;
|
|
20
|
-
export declare const renderNoneGivenText: (data: string | undefined) => string | import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare const renderCellColumn: ({ data, error, errors, index, rowPath, element, isRequired, }: RenderCellColumnProps) => string | import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export declare const renderNoneGivenText: (data: string | undefined, noAnswerMessage: string) => string | import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const renderCellColumn: ({ data, error, errors, index, rowPath, element, isRequired, noAnswerMessage, }: RenderCellColumnProps) => string | import("react/jsx-runtime").JSX.Element | null;
|
|
22
22
|
export declare const createHumanizeError: (error: ErrorObject, schema: JsonSchema, uischema: UISchemaElement) => string | undefined;
|
|
@@ -27,3 +27,6 @@ export declare enum StepStatus {
|
|
|
27
27
|
}
|
|
28
28
|
export type StepStatusType = StepStatus.COMPLETED | StepStatus.NOT_STARTED | StepStatus.IN_PROGRESS;
|
|
29
29
|
export declare const getAddressLookupFieldLabel: (fieldName: string) => string;
|
|
30
|
+
export declare const NO_ANSWER_MESSAGE = "(none given)";
|
|
31
|
+
export declare const BACK_TO_OVERVIEW_LABEL = "Back to application overview";
|
|
32
|
+
export declare const NEXT_BUTTON_LABEL = "Next";
|