@searpent/react-image-annotate 2.0.58 → 2.0.60

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searpent/react-image-annotate",
3
- "version": "2.0.58",
3
+ "version": "2.0.60",
4
4
  "dependencies": {
5
5
  "@editorjs/editorjs": "^2.25.0",
6
6
  "@editorjs/paragraph": "^2.8.0",
@@ -1,5 +1,4 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread";
2
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
2
 
4
3
  function sanitizedText(text) {
5
4
  // remove whitespaces
@@ -10,14 +9,15 @@ function sanitizedText(text) {
10
9
  }
11
10
 
12
11
  function blocksToArticle(blocks) {
13
- var renamedBlocks = _toConsumableArray(blocks).map(function (b) {
14
- if (b.data.labelName === 'interview') {
15
- b.data.labelName = 'text';
16
- }
17
-
18
- return _objectSpread({}, b);
12
+ var renamedBlocks = blocks.map(function (b) {
13
+ var newBlock = _objectSpread({}, b, {
14
+ data: _objectSpread({}, b.data, {
15
+ labelName: b.data.labelName === 'interview' ? 'text' : b.data.labelName
16
+ })
17
+ });
18
+
19
+ return newBlock;
19
20
  });
20
-
21
21
  var article = renamedBlocks.reduce(function (acc, curr) {
22
22
  var _ref = curr === null || curr === void 0 ? void 0 : curr.data,
23
23
  labelName = _ref.labelName,