@abgov/jsonforms-components 1.23.1 → 1.23.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
|
@@ -4881,6 +4881,7 @@ const FormStepper = props => {
|
|
|
4881
4881
|
const categorization = uischema;
|
|
4882
4882
|
const allCategories = JSON.parse(JSON.stringify(categorization));
|
|
4883
4883
|
const componentProps = (_b = (_a = uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps) !== null && _b !== void 0 ? _b : {};
|
|
4884
|
+
const optionProps = uischema.options || {};
|
|
4884
4885
|
const [step, setStep] = React.useState(0);
|
|
4885
4886
|
const [isFormValid, setIsFormValid] = React.useState(false);
|
|
4886
4887
|
const [showNextBtn, setShowNextBtn] = React.useState(true);
|
|
@@ -5051,7 +5052,7 @@ const FormStepper = props => {
|
|
|
5051
5052
|
minChildWidth: "100px",
|
|
5052
5053
|
children: [jsx("div", {
|
|
5053
5054
|
children: step !== 1 ? jsx(GoAButton, {
|
|
5054
|
-
type: (
|
|
5055
|
+
type: (optionProps === null || optionProps === void 0 ? void 0 : optionProps.previousButtonType) ? optionProps === null || optionProps === void 0 ? void 0 : optionProps.previousButtonType : 'secondary',
|
|
5055
5056
|
disabled: disabledCategoryMap[step - 1],
|
|
5056
5057
|
onClick: () => {
|
|
5057
5058
|
const element = document.getElementById(`${path || `goa`}-form-stepper`);
|
|
@@ -5061,11 +5062,11 @@ const FormStepper = props => {
|
|
|
5061
5062
|
prevPage(step, disabledCategoryMap);
|
|
5062
5063
|
},
|
|
5063
5064
|
testId: "prev-button",
|
|
5064
|
-
children: (
|
|
5065
|
+
children: (optionProps === null || optionProps === void 0 ? void 0 : optionProps.previousButtonLabel) ? optionProps === null || optionProps === void 0 ? void 0 : optionProps.previousButtonLabel : 'Previous'
|
|
5065
5066
|
}) : jsx("div", {})
|
|
5066
5067
|
}), jsxs(RightAlignmentDiv, {
|
|
5067
5068
|
children: [step !== null && showNextBtn && jsx(GoAButton, {
|
|
5068
|
-
type: (
|
|
5069
|
+
type: (optionProps === null || optionProps === void 0 ? void 0 : optionProps.nextButtonType) ? optionProps === null || optionProps === void 0 ? void 0 : optionProps.nextButtonType : 'primary',
|
|
5069
5070
|
disabled: disabledCategoryMap[step - 1],
|
|
5070
5071
|
onClick: () => {
|
|
5071
5072
|
const element = document.getElementById(`${path || `goa`}-form-stepper`);
|
|
@@ -5075,7 +5076,7 @@ const FormStepper = props => {
|
|
|
5075
5076
|
nextPage(step, disabledCategoryMap);
|
|
5076
5077
|
},
|
|
5077
5078
|
testId: "next-button",
|
|
5078
|
-
children: (
|
|
5079
|
+
children: (optionProps === null || optionProps === void 0 ? void 0 : optionProps.nextButtonLabel) ? optionProps === null || optionProps === void 0 ? void 0 : optionProps.nextButtonLabel : 'Next'
|
|
5079
5080
|
}), !showNextBtn && !isFormSubmitted && jsx("div", {
|
|
5080
5081
|
children: jsx(GoAButton, {
|
|
5081
5082
|
type: 'primary',
|
|
@@ -6012,10 +6013,10 @@ const HelpContentComponent = _a => {
|
|
|
6012
6013
|
height,
|
|
6013
6014
|
width,
|
|
6014
6015
|
alt,
|
|
6015
|
-
|
|
6016
|
+
src
|
|
6016
6017
|
}) => {
|
|
6017
6018
|
return jsx("img", {
|
|
6018
|
-
src:
|
|
6019
|
+
src: src,
|
|
6019
6020
|
width: width,
|
|
6020
6021
|
height: height,
|
|
6021
6022
|
alt: alt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.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",
|
|
@@ -5,12 +5,14 @@ import { AjvProps } from '../../util/layout';
|
|
|
5
5
|
export interface CategorizationStepperLayoutRendererProps extends StatePropsOfLayout, AjvProps, TranslateProps {
|
|
6
6
|
}
|
|
7
7
|
export interface FormStepperComponentProps {
|
|
8
|
+
controlledNav?: number;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface FormStepperOptionProps {
|
|
8
12
|
nextButtonLabel?: string;
|
|
9
13
|
nextButtonType?: GoAButtonType;
|
|
10
14
|
previousButtonLabel?: string;
|
|
11
15
|
previousButtonType?: GoAButtonType;
|
|
12
|
-
controlledNav?: number;
|
|
13
|
-
readOnly?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export declare const FormStepper: (props: CategorizationStepperLayoutRendererProps) => JSX.Element;
|
|
16
18
|
export declare const FormStepperControl: (props: CategorizationStepperLayoutRendererProps & import("@jsonforms/core").OwnPropsOfLayout) => import("react/jsx-runtime").JSX.Element;
|