@searpent/react-image-annotate 2.0.39 → 2.0.41

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.
@@ -797,7 +797,7 @@ var examplePhotos = [{
797
797
  },
798
798
  "text": "[{\"key\":\"articleType\",\"value\":\"ads\"}, {\"key\":\"section\",\"value\":\"last page\"}]",
799
799
  "groupId": "1",
800
- "id": "aba453dd-f870-4510-ae40-a19eb52eb7d6"
800
+ "id": "2615bf87-7247-4bde-a0f9-45413034a6a6"
801
801
  }]
802
802
  }]
803
803
  },
@@ -155,27 +155,33 @@ export var Annotator = function Annotator(_ref) {
155
155
  var _ref2 = _asyncToGenerator(
156
156
  /*#__PURE__*/
157
157
  _regeneratorRuntime.mark(function _callee(e) {
158
+ var createdAt;
158
159
  return _regeneratorRuntime.wrap(function _callee$(_context) {
159
160
  while (1) {
160
161
  switch (_context.prev = _context.next) {
161
162
  case 0:
163
+ createdAt = new Date();
162
164
  e.preventDefault();
163
165
 
164
166
  if (!onSave) {
165
- _context.next = 5;
167
+ _context.next = 6;
166
168
  break;
167
169
  }
168
170
 
169
- _context.next = 4;
170
- return onSave(state.images);
171
+ _context.next = 5;
172
+ return onSave({
173
+ images: state.images,
174
+ albumMetadata: state.albumMetadata,
175
+ createdAt: createdAt
176
+ });
171
177
 
172
- case 4:
178
+ case 5:
173
179
  dispatchToReducer({
174
180
  type: "IMAGES_SAVED",
175
- savedAt: new Date()
181
+ savedAt: createdAt
176
182
  });
177
183
 
178
- case 5:
184
+ case 6:
179
185
  case "end":
180
186
  return _context.stop();
181
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searpent/react-image-annotate",
3
- "version": "2.0.39",
3
+ "version": "2.0.41",
4
4
  "dependencies": {
5
5
  "@editorjs/editorjs": "^2.25.0",
6
6
  "@editorjs/paragraph": "^2.8.0",