@ukhomeoffice/cop-react-form-renderer 5.24.0 → 5.24.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.
@@ -70,7 +70,7 @@ var CollectionPage = function CollectionPage(_ref) {
70
70
  return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, parentCollection, _utils.default.CollectionPage.getData(parentCollection, page.formData)));
71
71
  });
72
72
  };
73
- var onActiveIdChange = function onActiveIdChange(_ref3) {
73
+ var onTopLevelChange = function onTopLevelChange(_ref3) {
74
74
  var target = _ref3.target;
75
75
  currentPage.formData[target.name] = target.value;
76
76
  };
@@ -86,7 +86,7 @@ var CollectionPage = function CollectionPage(_ref) {
86
86
  }
87
87
  };
88
88
  var reportActiveIdChange = function reportActiveIdChange(newActiveId) {
89
- onActiveIdChange({
89
+ onTopLevelChange({
90
90
  target: {
91
91
  name: "".concat(currentCollectionName, "ActiveId"),
92
92
  value: newActiveId
@@ -123,7 +123,7 @@ var CollectionPage = function CollectionPage(_ref) {
123
123
  }),
124
124
  onAction: onInnerPageAction,
125
125
  onWrapperChange: onInnerPageChange,
126
- onTopLevelChange: onPageChange,
126
+ onTopLevelChange: onTopLevelChange,
127
127
  hashLink: hashLink,
128
128
  classBlock: classBlock,
129
129
  classModifiers: classModifiers,
@@ -136,7 +136,7 @@ var Collection = function Collection(_ref) {
136
136
  className: classes('title')
137
137
  }, config.label), value && value.map(function (item, index) {
138
138
  var _config$removeLocatio;
139
- var fullPath = "".concat(config.fullPath || config.fieldId, "[").concat(index, "]");
139
+ var fullPath = "".concat(config.full_path || config.fieldId, "[").concat(index, "]");
140
140
  var labelCount = (config.countOffset || 0) + index + 1;
141
141
  var itemTitle = _utils.default.interpolateString(labels.item, _objectSpread(_objectSpread({}, item), {}, {
142
142
  index: labelCount
@@ -184,7 +184,7 @@ var Collection = function Collection(_ref) {
184
184
  label: _utils.default.interpolateString(label, _objectSpread(_objectSpread({}, item), {}, {
185
185
  index: labelCount
186
186
  })),
187
- fullPath: "".concat(fullPath, ".").concat(component.fieldId)
187
+ full_path: "".concat(fullPath, ".").concat(component.fieldId)
188
188
  });
189
189
  })
190
190
  },
@@ -211,7 +211,7 @@ Collection.propTypes = {
211
211
  disableAddAndRemove: _propTypes.default.bool,
212
212
  id: _propTypes.default.string.isRequired,
213
213
  fieldId: _propTypes.default.string.isRequired,
214
- fullPath: _propTypes.default.string,
214
+ full_path: _propTypes.default.string,
215
215
  restrictHint: _propTypes.default.bool,
216
216
  item: _propTypes.default.arrayOf(_propTypes.default.shape({
217
217
  fieldId: _propTypes.default.string,
@@ -54,11 +54,11 @@ var Container = function Container(_ref) {
54
54
  var fullPath = "".concat(container.full_path || container.fieldId, ".").concat(options.fieldId);
55
55
  if (options.type === _models.ComponentTypes.CONTAINER) {
56
56
  return _utils.default.Container.show(_objectSpread(_objectSpread({}, options), {}, {
57
- fullPath: fullPath
57
+ full_path: fullPath
58
58
  }), formData);
59
59
  }
60
60
  return _utils.default.Component.show(_objectSpread(_objectSpread({}, options), {}, {
61
- fullPath: fullPath
61
+ full_path: fullPath
62
62
  }), formData);
63
63
  };
64
64
  var classes = _utils.default.classBuilder(DEFAULT_CLASS, [], container.className);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukhomeoffice/cop-react-form-renderer",
3
- "version": "5.24.0",
3
+ "version": "5.24.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",