@abgov/jsonforms-components 2.58.1 → 2.58.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 +75 -80
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -14066,9 +14066,7 @@ const RenderPages = props => {
|
|
|
14066
14066
|
const formStepperCtx = useContext(JsonFormsStepperContext);
|
|
14067
14067
|
const {
|
|
14068
14068
|
goToPage,
|
|
14069
|
-
|
|
14070
|
-
goToTableOfContext,
|
|
14071
|
-
validatePage
|
|
14069
|
+
goToTableOfContext
|
|
14072
14070
|
} = formStepperCtx;
|
|
14073
14071
|
const {
|
|
14074
14072
|
categories,
|
|
@@ -14102,6 +14100,21 @@ const RenderPages = props => {
|
|
|
14102
14100
|
const onCloseModal = () => {
|
|
14103
14101
|
setIsOpen(false);
|
|
14104
14102
|
};
|
|
14103
|
+
const category = categories[activeId];
|
|
14104
|
+
const categoryProps = {
|
|
14105
|
+
category: category == null ? void 0 : category.uischema,
|
|
14106
|
+
categoryIndex: category == null ? void 0 : category.id,
|
|
14107
|
+
visible: category == null ? void 0 : category.visible,
|
|
14108
|
+
enabled: category == null ? void 0 : category.isEnabled,
|
|
14109
|
+
path,
|
|
14110
|
+
schema,
|
|
14111
|
+
renderers,
|
|
14112
|
+
cells,
|
|
14113
|
+
data,
|
|
14114
|
+
validationTrigger
|
|
14115
|
+
};
|
|
14116
|
+
const currentStep = activeId + 1 - categories.filter(c => !c.visible && c.id < activeId).length;
|
|
14117
|
+
const totalSteps = categories.filter(c => c.visible).length;
|
|
14105
14118
|
return jsxs("div", {
|
|
14106
14119
|
"data-testid": "form-stepper-test-wrapper",
|
|
14107
14120
|
ref: topElementRef,
|
|
@@ -14117,85 +14130,67 @@ const RenderPages = props => {
|
|
|
14117
14130
|
goToTableOfContext();
|
|
14118
14131
|
},
|
|
14119
14132
|
testId: "back-to-tasks"
|
|
14120
|
-
}),
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
|
|
14125
|
-
|
|
14126
|
-
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
14130
|
-
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
}), jsx(PageRenderPadding, {
|
|
14149
|
-
children: jsxs(GoabGrid, {
|
|
14150
|
-
minChildWidth: "100px",
|
|
14151
|
-
gap: "2xs",
|
|
14152
|
-
children: [jsxs(GoabButtonGroup, {
|
|
14153
|
-
alignment: "start",
|
|
14154
|
-
children: [activeId > 0 && jsx(GoabButton, {
|
|
14155
|
-
type: "secondary",
|
|
14156
|
-
onClick: () => {
|
|
14157
|
-
handleSave();
|
|
14158
|
-
let prevId = activeId - 1;
|
|
14159
|
-
while (prevId >= 0 && categories[prevId].visible === false) {
|
|
14160
|
-
prevId = prevId - 1;
|
|
14161
|
-
}
|
|
14162
|
-
if (prevId >= 0) {
|
|
14163
|
-
if (topElementRef.current) {
|
|
14164
|
-
topElementRef.current.scrollIntoView();
|
|
14165
|
-
}
|
|
14166
|
-
goToPage(prevId);
|
|
14167
|
-
}
|
|
14168
|
-
},
|
|
14169
|
-
testId: "pages-prev-btn",
|
|
14170
|
-
children: "Previous"
|
|
14171
|
-
}), ' ']
|
|
14172
|
-
}), jsx(GoabButtonGroup, {
|
|
14173
|
-
alignment: "end",
|
|
14174
|
-
children: jsx(GoabButton, {
|
|
14175
|
-
type: "submit",
|
|
14176
|
-
onClick: () => {
|
|
14177
|
-
handleSave();
|
|
14178
|
-
let nextId = activeId + 1;
|
|
14179
|
-
while (nextId < categories.length && categories[nextId].visible === false) {
|
|
14180
|
-
nextId = nextId + 1;
|
|
14133
|
+
}), !isOnReview && jsx(Visible, {
|
|
14134
|
+
visible: true,
|
|
14135
|
+
children: jsxs("div", {
|
|
14136
|
+
"data-testid": `step_${activeId}-content-pages`,
|
|
14137
|
+
style: {
|
|
14138
|
+
marginTop: '1.5rem'
|
|
14139
|
+
},
|
|
14140
|
+
children: [jsxs(PageRenderPadding, {
|
|
14141
|
+
children: [jsxs("h3", {
|
|
14142
|
+
children: ["Step ", currentStep, " of ", totalSteps]
|
|
14143
|
+
}), jsx(RenderStepElements, Object.assign({}, categoryProps))]
|
|
14144
|
+
}), jsx(PageRenderPadding, {
|
|
14145
|
+
children: jsxs(GoabGrid, {
|
|
14146
|
+
minChildWidth: "100px",
|
|
14147
|
+
gap: "2xs",
|
|
14148
|
+
children: [jsxs(GoabButtonGroup, {
|
|
14149
|
+
alignment: "start",
|
|
14150
|
+
children: [activeId > 0 && jsx(GoabButton, {
|
|
14151
|
+
type: "secondary",
|
|
14152
|
+
onClick: () => {
|
|
14153
|
+
handleSave();
|
|
14154
|
+
let prevId = activeId - 1;
|
|
14155
|
+
while (prevId >= 0 && categories[prevId].visible === false) {
|
|
14156
|
+
prevId = prevId - 1;
|
|
14157
|
+
}
|
|
14158
|
+
if (prevId >= 0) {
|
|
14159
|
+
if (topElementRef.current) {
|
|
14160
|
+
topElementRef.current.scrollIntoView();
|
|
14181
14161
|
}
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14162
|
+
goToPage(prevId);
|
|
14163
|
+
}
|
|
14164
|
+
},
|
|
14165
|
+
testId: "pages-prev-btn",
|
|
14166
|
+
children: "Previous"
|
|
14167
|
+
}), ' ']
|
|
14168
|
+
}), jsx(GoabButtonGroup, {
|
|
14169
|
+
alignment: "end",
|
|
14170
|
+
children: jsx(GoabButton, {
|
|
14171
|
+
type: "submit",
|
|
14172
|
+
onClick: () => {
|
|
14173
|
+
handleSave();
|
|
14174
|
+
let nextId = activeId + 1;
|
|
14175
|
+
while (nextId < categories.length && categories[nextId].visible === false) {
|
|
14176
|
+
nextId = nextId + 1;
|
|
14177
|
+
}
|
|
14178
|
+
if (!(currentStep === totalSteps && hideSummary)) {
|
|
14179
|
+
if (topElementRef.current) {
|
|
14180
|
+
topElementRef.current.scrollIntoView();
|
|
14187
14181
|
}
|
|
14188
|
-
|
|
14189
|
-
|
|
14190
|
-
|
|
14191
|
-
|
|
14192
|
-
|
|
14193
|
-
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14182
|
+
goToPage(nextId);
|
|
14183
|
+
}
|
|
14184
|
+
},
|
|
14185
|
+
disabled: !enabled,
|
|
14186
|
+
testId: "pages-save-continue-btn",
|
|
14187
|
+
children: currentStep === totalSteps ? submissionLabel : 'Next'
|
|
14188
|
+
})
|
|
14189
|
+
})]
|
|
14190
|
+
})
|
|
14191
|
+
})]
|
|
14192
|
+
})
|
|
14193
|
+
}, `page-${category == null ? void 0 : category.id}`), isOnReview && jsxs("div", {
|
|
14199
14194
|
"data-testid": "stepper-pages-review-page",
|
|
14200
14195
|
children: [jsx(FormStepperPageReviewer, Object.assign({}, props.categoryProps, {
|
|
14201
14196
|
navigationFunc: goToPage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.58.
|
|
3
|
+
"version": "2.58.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-04-01T17:26:01.951Z",
|
|
4
|
+
"sourceCommit": "29aae2716f1a5c05b00e4213c92ece4b2e44a7da",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|