@ukhomeoffice/cop-react-form-renderer 4.64.0-alpha → 4.64.0-bravo

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.
@@ -15,6 +15,8 @@ var _utils = _interopRequireDefault(require("../../utils"));
15
15
 
16
16
  var _FormPage = _interopRequireDefault(require("../FormPage"));
17
17
 
18
+ var _FormPage2 = require("../FormPage/FormPage");
19
+
18
20
  require("../FormPage/FormPage.scss");
19
21
 
20
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -41,7 +43,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
41
43
 
42
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
45
 
44
- var DEFAULT_CLASS = 'hods-form';
46
+ var DEFAULT_CLASS = _FormPage2.DEFAULT_CLASS;
45
47
  exports.DEFAULT_CLASS = DEFAULT_CLASS;
46
48
 
47
49
  var CollectionPage = function CollectionPage(_ref) {
@@ -236,7 +236,7 @@ describe('components.CollectionPage', function () {
236
236
  })), container = _renderWithValidation.container;
237
237
  page = container.childNodes[0];
238
238
  expect(page.tagName).toEqual('DIV');
239
- expect(page.classList).toContain("".concat(_CollectionPage.DEFAULT_CLASS, "__page"));
239
+ expect(page.classList).toContain(_CollectionPage.DEFAULT_CLASS);
240
240
  heading = page.childNodes[0];
241
241
  expect(heading.classList).toContain('govuk-heading-l');
242
242
  expect(heading.textContent).toEqual(PAGE.title);
@@ -264,7 +264,7 @@ describe('components.CollectionPage', function () {
264
264
  page = container.childNodes[0];
265
265
  FORM_DATA = PAGE_WITH_BUTTON_ACTIONS.formData;
266
266
  expect(page.tagName).toEqual('DIV');
267
- expect(page.classList).toContain("".concat(_CollectionPage.DEFAULT_CLASS, "__page"));
267
+ expect(page.classList).toContain(_CollectionPage.DEFAULT_CLASS);
268
268
  heading = page.childNodes[0];
269
269
  expect(heading.classList).toContain('govuk-heading-l');
270
270
  expect(heading.textContent).toEqual(FORM_DATA.title);
@@ -47,7 +47,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
47
47
 
48
48
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
49
49
 
50
- var DEFAULT_CLASS = 'hods-form';
50
+ var DEFAULT_CLASS = 'hods-form__page';
51
51
  exports.DEFAULT_CLASS = DEFAULT_CLASS;
52
52
 
53
53
  var FormPage = function FormPage(_ref) {
@@ -113,7 +113,7 @@ var FormPage = function FormPage(_ref) {
113
113
  });
114
114
  page.formData = _utils.default.Operate.runPageOperations(page, _objectSpread(_objectSpread({}, page.formData), patch), onWrapperChange || onPageChange);
115
115
  return /*#__PURE__*/_react.default.createElement("div", {
116
- className: classes('page'),
116
+ className: classes(),
117
117
  key: page.id
118
118
  }, (errors === null || errors === void 0 ? void 0 : errors.length) > 0 && /*#__PURE__*/_react.default.createElement(_copReactComponents.ErrorSummary, {
119
119
  errors: errors,
@@ -221,7 +221,7 @@ describe('components.FormPage', function () {
221
221
  })), container = _renderWithValidation.container;
222
222
  page = container.childNodes[0];
223
223
  expect(page.tagName).toEqual('DIV');
224
- expect(page.classList).toContain("".concat(_FormPage.DEFAULT_CLASS, "__page"));
224
+ expect(page.classList).toContain(_FormPage.DEFAULT_CLASS);
225
225
  heading = page.childNodes[0];
226
226
  expect(heading.classList).toContain('govuk-heading-l');
227
227
  expect(heading.textContent).toEqual(PAGE.title);
@@ -249,7 +249,7 @@ describe('components.FormPage', function () {
249
249
  page = container.childNodes[0];
250
250
  FORM_DATA = PAGE_WITH_BUTTON_ACTIONS.formData;
251
251
  expect(page.tagName).toEqual('DIV');
252
- expect(page.classList).toContain("".concat(_FormPage.DEFAULT_CLASS, "__page"));
252
+ expect(page.classList).toContain(_FormPage.DEFAULT_CLASS);
253
253
  heading = page.childNodes[0];
254
254
  expect(heading.classList).toContain('govuk-heading-l');
255
255
  expect(heading.textContent).toEqual(FORM_DATA.title);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukhomeoffice/cop-react-form-renderer",
3
- "version": "4.64.0-alpha",
3
+ "version": "4.64.0-bravo",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",