@ukhomeoffice/cop-react-form-renderer 5.12.1 → 5.12.2-alpha

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.
@@ -101,7 +101,7 @@ var onCYAAction = function onCYAAction(setPagePoint, action, pages, validate, co
101
101
  onPageChange(_helpers.default.getNextPageId(type, pages, pageId, action, (_formState$page = formState.page) === null || _formState$page === void 0 ? void 0 : _formState$page.formData));
102
102
  }
103
103
  if (action.type === _models.PageAction.TYPES.CANCEL) {
104
- hooks.onCancel();
104
+ hooks.onCancel(data);
105
105
  }
106
106
  };
107
107
  var _default = onCYAAction;
@@ -21,7 +21,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
21
21
  // for display purposes after submission.)
22
22
  var onPageAction = function onPageAction(action, patch, patchLabel, hooks, data, formState, validate, onPageChange, type, pages, components, pageId, setPagePoint, currentTask, setData, hubDetails, setSubmitted, addErrors) {
23
23
  if (action.type === _models.PageAction.TYPES.CANCEL) {
24
- hooks.onCancel();
24
+ hooks.onCancel(data);
25
25
  return;
26
26
  }
27
27
  ;
@@ -56,7 +56,7 @@ var DEFAULT_HOOKS = {
56
56
  return errors;
57
57
  },
58
58
  // Returns the list of errors already found in FR by default.
59
- onCancel: function onCancel() {} // Consuming application must provide function to action, else this does nothing.
59
+ onCancel: function onCancel(data) {} // Consuming application must provide function to action, else this does nothing.
60
60
  };
61
61
 
62
62
  var ALLOWED_HOOKS = Object.keys(DEFAULT_HOOKS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukhomeoffice/cop-react-form-renderer",
3
- "version": "5.12.1",
3
+ "version": "5.12.2-alpha",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",