@abgov/jsonforms-components 1.38.4 → 1.39.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 +13 -0
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -5607,13 +5607,19 @@ const FormStepper = props => {
|
|
|
5607
5607
|
setStep((componentProps === null || componentProps === void 0 ? void 0 : componentProps.controlledNav) ? 1 : 0);
|
|
5608
5608
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5609
5609
|
}, []);
|
|
5610
|
+
/* istanbul ignore next */
|
|
5610
5611
|
if ((categories === null || categories === void 0 ? void 0 : categories.length) < 1) {
|
|
5611
5612
|
// eslint-disable-next-line
|
|
5612
5613
|
return jsx(Fragment, {});
|
|
5613
5614
|
}
|
|
5614
5615
|
function nextPage(page, disabled) {
|
|
5616
|
+
const pageStatus = getCompletionStatus(inputStatuses, page);
|
|
5617
|
+
const statuses = [...stepStatuses];
|
|
5618
|
+
statuses[page - 1] = pageStatus ? pageStatus : 'incomplete';
|
|
5619
|
+
setStepStatuses(statuses);
|
|
5615
5620
|
page++;
|
|
5616
5621
|
while (page <= disabled.length && disabled[page - 1]) {
|
|
5622
|
+
/* istanbul ignore next */
|
|
5617
5623
|
page++;
|
|
5618
5624
|
}
|
|
5619
5625
|
setPage(page);
|
|
@@ -5621,14 +5627,20 @@ const FormStepper = props => {
|
|
|
5621
5627
|
function prevPage(page, disabled) {
|
|
5622
5628
|
page--;
|
|
5623
5629
|
while (page >= 0 && disabled[page - 1]) {
|
|
5630
|
+
/* istanbul ignore next */
|
|
5624
5631
|
page--;
|
|
5625
5632
|
}
|
|
5626
5633
|
setPage(page);
|
|
5627
5634
|
}
|
|
5635
|
+
/* istanbul ignore next */
|
|
5628
5636
|
function setTab(page) {
|
|
5629
5637
|
const categoryLabels = [...allCategories.elements.map(category => category.label), summaryLabel];
|
|
5630
5638
|
const visibleLabels = [...visibleCategoryLabels, summaryLabel];
|
|
5631
5639
|
const newPage = mapToVisibleStep(page, categoryLabels, visibleLabels);
|
|
5640
|
+
const pageStatus = getCompletionStatus(inputStatuses, page);
|
|
5641
|
+
const statuses = [...stepStatuses];
|
|
5642
|
+
statuses[page - 1] = pageStatus ? pageStatus : 'incomplete';
|
|
5643
|
+
setStepStatuses(statuses);
|
|
5632
5644
|
setPage(newPage);
|
|
5633
5645
|
}
|
|
5634
5646
|
function setPage(page) {
|
|
@@ -5722,6 +5734,7 @@ const FormStepper = props => {
|
|
|
5722
5734
|
children: category.elements.filter(field => {
|
|
5723
5735
|
var _a, _b;
|
|
5724
5736
|
const conditionProps = (_a = field.rule) === null || _a === void 0 ? void 0 : _a.condition;
|
|
5737
|
+
/* istanbul ignore next */
|
|
5725
5738
|
if (conditionProps && data) {
|
|
5726
5739
|
const canHideControlParts = (_b = conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.scope) === null || _b === void 0 ? void 0 : _b.split('/');
|
|
5727
5740
|
const canHideControl = canHideControlParts && canHideControlParts[(canHideControlParts === null || canHideControlParts === void 0 ? void 0 : canHideControlParts.length) - 1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.39.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",
|