@ukhomeoffice/cop-react-form-renderer 3.5.2-alpha → 3.5.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.
|
@@ -73,8 +73,7 @@ var FormRenderer = function FormRenderer(_ref) {
|
|
|
73
73
|
className = _ref.className,
|
|
74
74
|
hide_title = _ref.hide_title,
|
|
75
75
|
summaryListClassModifiers = _ref.summaryListClassModifiers,
|
|
76
|
-
noChangeAction = _ref.noChangeAction
|
|
77
|
-
newPageId = _ref.newPageId;
|
|
76
|
+
noChangeAction = _ref.noChangeAction;
|
|
78
77
|
return /*#__PURE__*/_react.default.createElement(_context.HooksContextProvider, {
|
|
79
78
|
overrides: hooks
|
|
80
79
|
}, /*#__PURE__*/_react.default.createElement(_context.ValidationContextProvider, null, /*#__PURE__*/_react.default.createElement(InternalFormRenderer, {
|
|
@@ -90,8 +89,7 @@ var FormRenderer = function FormRenderer(_ref) {
|
|
|
90
89
|
className: className,
|
|
91
90
|
hide_title: hide_title,
|
|
92
91
|
summaryListClassModifiers: summaryListClassModifiers,
|
|
93
|
-
noChangeAction: noChangeAction
|
|
94
|
-
newPageId: newPageId
|
|
92
|
+
noChangeAction: noChangeAction
|
|
95
93
|
})));
|
|
96
94
|
};
|
|
97
95
|
|
|
@@ -111,8 +109,7 @@ var InternalFormRenderer = function InternalFormRenderer(_ref2) {
|
|
|
111
109
|
className = _ref2.className,
|
|
112
110
|
hide_title = _ref2.hide_title,
|
|
113
111
|
summaryListClassModifiers = _ref2.summaryListClassModifiers,
|
|
114
|
-
noChangeAction = _ref2.noChangeAction
|
|
115
|
-
newPageId = _ref2.newPageId;
|
|
112
|
+
noChangeAction = _ref2.noChangeAction;
|
|
116
113
|
|
|
117
114
|
// Set up the initial states.
|
|
118
115
|
var _useState = (0, _react.useState)({}),
|
|
@@ -180,10 +177,7 @@ var InternalFormRenderer = function InternalFormRenderer(_ref2) {
|
|
|
180
177
|
|
|
181
178
|
(0, _react.useEffect)(function () {
|
|
182
179
|
setPages(_utils.default.FormPage.getAll(_pages, components, _objectSpread({}, data)));
|
|
183
|
-
}, [components, _pages, data, setPages]);
|
|
184
|
-
(0, _react.useEffect)(function () {
|
|
185
|
-
if (newPageId !== undefined) onPageChange(newPageId);
|
|
186
|
-
}, [newPageId]); // Setup initial pageId.
|
|
180
|
+
}, [components, _pages, data, setPages]); // Setup initial pageId.
|
|
187
181
|
|
|
188
182
|
(0, _react.useEffect)(function () {
|
|
189
183
|
setPageId(function (prev) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ukhomeoffice/cop-react-form-renderer",
|
|
3
|
-
"version": "3.5.2
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf dist",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"post-compile": "rimraf dist/*.test.* dist/**/*.test.* dist/**/*.stories.* dist/docs dist/assets"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@ukhomeoffice/cop-react-components": "1.9.
|
|
19
|
+
"@ukhomeoffice/cop-react-components": "1.9.3",
|
|
20
20
|
"axios": "^0.21.1",
|
|
21
21
|
"dayjs": "^1.11.0",
|
|
22
22
|
"govuk-frontend": "^3.13.0",
|