@abgov/jsonforms-components 2.43.0 → 2.43.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 +15 -5
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as runtime from 'react/jsx-runtime';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React, { createContext, useContext, useReducer, useMemo, useEffect, useCallback, useState, useRef, useLayoutEffect } from 'react';
|
|
4
|
-
import { GoabFormItem, GoabInput, GoabTextArea, GoabCallout, GoabRadioGroup, GoabRadioItem, GoabCheckbox, GoabIcon, GoabGrid, GoabFormStepper, GoabFormStep, GoabPages, GoabButton, GoabModal, GoabButtonGroup, GoabBadge, GoabText, GoabTable, GoabIconButton, GoabFileUploadInput, GoabCircularProgress, GoabContainer, GoabDropdown, GoabDropdownItem, GoabDetails, GoabSpinner } from '@abgov/react-components';
|
|
4
|
+
import { GoabFormItem, GoabInput, GoabTextArea, GoabCallout, GoabDatePicker, GoabRadioGroup, GoabRadioItem, GoabCheckbox, GoabIcon, GoabGrid, GoabFormStepper, GoabFormStep, GoabPages, GoabButton, GoabModal, GoabButtonGroup, GoabBadge, GoabText, GoabTable, GoabIconButton, GoabFileUploadInput, GoabCircularProgress, GoabContainer, GoabDropdown, GoabDropdownItem, GoabDetails, GoabSpinner } from '@abgov/react-components';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import get$1 from 'lodash/get';
|
|
@@ -6739,6 +6739,7 @@ const Dropdown = props => {
|
|
|
6739
6739
|
width: "100%",
|
|
6740
6740
|
value: inputText,
|
|
6741
6741
|
testId: `${id}-input`,
|
|
6742
|
+
ariaLabel: `${id}-input`,
|
|
6742
6743
|
id: `${id}-input`,
|
|
6743
6744
|
readonly: !isAutoCompletion,
|
|
6744
6745
|
onChange: detail => {
|
|
@@ -7077,8 +7078,8 @@ const GoADateInput = props => {
|
|
|
7077
7078
|
const today = new Date();
|
|
7078
7079
|
minDate = today.toISOString().split('T')[0];
|
|
7079
7080
|
}
|
|
7080
|
-
return jsx(
|
|
7081
|
-
type: "
|
|
7081
|
+
return jsx(GoabDatePicker, Object.assign({
|
|
7082
|
+
type: "calendar",
|
|
7082
7083
|
error: isVisited && errors.length > 0,
|
|
7083
7084
|
width: width,
|
|
7084
7085
|
name: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
|
|
@@ -7089,12 +7090,13 @@ const GoADateInput = props => {
|
|
|
7089
7090
|
min: minDate && new Date(minDate),
|
|
7090
7091
|
max: maxDate && new Date(maxDate),
|
|
7091
7092
|
onChange: detail => {
|
|
7093
|
+
var _a;
|
|
7092
7094
|
if (isVisited === false && setIsVisited) {
|
|
7093
7095
|
setIsVisited();
|
|
7094
7096
|
}
|
|
7095
7097
|
onChangeForDateControl({
|
|
7096
|
-
name: detail.name,
|
|
7097
|
-
value: detail.
|
|
7098
|
+
name: (_a = detail.name) !== null && _a !== void 0 ? _a : 'date',
|
|
7099
|
+
value: detail.valueStr,
|
|
7098
7100
|
controlProps: props
|
|
7099
7101
|
});
|
|
7100
7102
|
},
|
|
@@ -9361,6 +9363,7 @@ const RenderPages = props => {
|
|
|
9361
9363
|
const saveFormFunction = enumerators === null || enumerators === void 0 ? void 0 : enumerators.saveFunction.get('save-form');
|
|
9362
9364
|
const saveForm = saveFormFunction && saveFormFunction();
|
|
9363
9365
|
const [isOpen, setIsOpen] = useState(false);
|
|
9366
|
+
const topElementRef = useRef(null);
|
|
9364
9367
|
const handleSubmit = () => {
|
|
9365
9368
|
if (submitForm) {
|
|
9366
9369
|
submitForm(data);
|
|
@@ -9378,6 +9381,7 @@ const RenderPages = props => {
|
|
|
9378
9381
|
};
|
|
9379
9382
|
return jsxs("div", {
|
|
9380
9383
|
"data-testid": "form-stepper-test-wrapper",
|
|
9384
|
+
ref: topElementRef,
|
|
9381
9385
|
children: [jsx(Visible, {
|
|
9382
9386
|
visible: visible,
|
|
9383
9387
|
children: jsx("div", {
|
|
@@ -9429,6 +9433,9 @@ const RenderPages = props => {
|
|
|
9429
9433
|
prevId = prevId - 1;
|
|
9430
9434
|
}
|
|
9431
9435
|
if (prevId >= 0) {
|
|
9436
|
+
if (topElementRef.current) {
|
|
9437
|
+
topElementRef.current.scrollIntoView();
|
|
9438
|
+
}
|
|
9432
9439
|
goToPage(prevId);
|
|
9433
9440
|
}
|
|
9434
9441
|
},
|
|
@@ -9446,6 +9453,9 @@ const RenderPages = props => {
|
|
|
9446
9453
|
nextId = nextId + 1;
|
|
9447
9454
|
}
|
|
9448
9455
|
if (!(currentStep === totalSteps && hideSummary)) {
|
|
9456
|
+
if (topElementRef.current) {
|
|
9457
|
+
topElementRef.current.scrollIntoView();
|
|
9458
|
+
}
|
|
9449
9459
|
goToPage(nextId);
|
|
9450
9460
|
}
|
|
9451
9461
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.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",
|