@bigbinary/neeto-editor 1.26.26 → 1.26.27

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/index.js CHANGED
@@ -53299,7 +53299,7 @@ var buildImageOptions = function buildImageOptions() {
53299
53299
 
53300
53300
  function cov_vqdq5apbi() {
53301
53301
  var path = "/home/runner/work/neeto-editor/neeto-editor/src/apis/direct_uploads.js";
53302
- var hash = "c9aa1392452082c42ebf665a7b95dfda57cac07e";
53302
+ var hash = "2c2f1d9ec04b2d08c46a8553efefbf4d6710b538";
53303
53303
  var global = new Function("return this")();
53304
53304
  var gcv = "__coverage__";
53305
53305
  var coverageData = {
@@ -53388,11 +53388,31 @@ function cov_vqdq5apbi() {
53388
53388
  "8": {
53389
53389
  start: {
53390
53390
  line: 30,
53391
+ column: 15
53392
+ },
53393
+ end: {
53394
+ line: 33,
53395
+ column: 4
53396
+ }
53397
+ },
53398
+ "9": {
53399
+ start: {
53400
+ line: 31,
53401
+ column: 2
53402
+ },
53403
+ end: {
53404
+ line: 33,
53405
+ column: 4
53406
+ }
53407
+ },
53408
+ "10": {
53409
+ start: {
53410
+ line: 35,
53391
53411
  column: 25
53392
53412
  },
53393
53413
  end: {
53394
- line: 30,
53395
- column: 62
53414
+ line: 35,
53415
+ column: 70
53396
53416
  }
53397
53417
  }
53398
53418
  },
@@ -53492,9 +53512,106 @@ function cov_vqdq5apbi() {
53492
53512
  }
53493
53513
  },
53494
53514
  line: 26
53515
+ },
53516
+ "4": {
53517
+ name: "(anonymous_4)",
53518
+ decl: {
53519
+ start: {
53520
+ line: 30,
53521
+ column: 15
53522
+ },
53523
+ end: {
53524
+ line: 30,
53525
+ column: 16
53526
+ }
53527
+ },
53528
+ loc: {
53529
+ start: {
53530
+ line: 31,
53531
+ column: 2
53532
+ },
53533
+ end: {
53534
+ line: 33,
53535
+ column: 4
53536
+ }
53537
+ },
53538
+ line: 31
53539
+ }
53540
+ },
53541
+ branchMap: {
53542
+ "0": {
53543
+ loc: {
53544
+ start: {
53545
+ line: 18,
53546
+ column: 42
53547
+ },
53548
+ end: {
53549
+ line: 18,
53550
+ column: 59
53551
+ }
53552
+ },
53553
+ type: "default-arg",
53554
+ locations: [{
53555
+ start: {
53556
+ line: 18,
53557
+ column: 55
53558
+ },
53559
+ end: {
53560
+ line: 18,
53561
+ column: 59
53562
+ }
53563
+ }],
53564
+ line: 18
53565
+ },
53566
+ "1": {
53567
+ loc: {
53568
+ start: {
53569
+ line: 25,
53570
+ column: 32
53571
+ },
53572
+ end: {
53573
+ line: 25,
53574
+ column: 49
53575
+ }
53576
+ },
53577
+ type: "default-arg",
53578
+ locations: [{
53579
+ start: {
53580
+ line: 25,
53581
+ column: 45
53582
+ },
53583
+ end: {
53584
+ line: 25,
53585
+ column: 49
53586
+ }
53587
+ }],
53588
+ line: 25
53589
+ },
53590
+ "2": {
53591
+ loc: {
53592
+ start: {
53593
+ line: 30,
53594
+ column: 30
53595
+ },
53596
+ end: {
53597
+ line: 30,
53598
+ column: 47
53599
+ }
53600
+ },
53601
+ type: "default-arg",
53602
+ locations: [{
53603
+ start: {
53604
+ line: 30,
53605
+ column: 43
53606
+ },
53607
+ end: {
53608
+ line: 30,
53609
+ column: 47
53610
+ }
53611
+ }],
53612
+ line: 30
53495
53613
  }
53496
53614
  },
53497
- branchMap: {},
53498
53615
  s: {
53499
53616
  "0": 0,
53500
53617
  "1": 0,
@@ -53504,17 +53621,24 @@ function cov_vqdq5apbi() {
53504
53621
  "5": 0,
53505
53622
  "6": 0,
53506
53623
  "7": 0,
53507
- "8": 0
53624
+ "8": 0,
53625
+ "9": 0,
53626
+ "10": 0
53508
53627
  },
53509
53628
  f: {
53510
53629
  "0": 0,
53511
53630
  "1": 0,
53512
53631
  "2": 0,
53513
- "3": 0
53632
+ "3": 0,
53633
+ "4": 0
53634
+ },
53635
+ b: {
53636
+ "0": [0],
53637
+ "1": [0],
53638
+ "2": [0]
53514
53639
  },
53515
- b: {},
53516
53640
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
53517
- hash: "c9aa1392452082c42ebf665a7b95dfda57cac07e"
53641
+ hash: "2c2f1d9ec04b2d08c46a8553efefbf4d6710b538"
53518
53642
  };
53519
53643
  var coverage = global[gcv] || (global[gcv] = {});
53520
53644
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -53556,7 +53680,8 @@ var update = function update(_ref) {
53556
53680
  var url = _ref.url,
53557
53681
  signedId = _ref.signedId,
53558
53682
  payload = _ref.payload,
53559
- showToastr = _ref.showToastr;
53683
+ _ref$showToastr = _ref.showToastr,
53684
+ showToastr = _ref$showToastr === void 0 ? (cov_vqdq5apbi().b[0][0]++, true) : _ref$showToastr;
53560
53685
  cov_vqdq5apbi().f[2]++;
53561
53686
  cov_vqdq5apbi().s[5]++;
53562
53687
  return axios.patch("".concat(url, "/").concat(signedId, "/"), payload, {
@@ -53566,18 +53691,29 @@ var update = function update(_ref) {
53566
53691
  });
53567
53692
  };
53568
53693
  cov_vqdq5apbi().s[6]++;
53569
- var destroy = function destroy(url, signedId, showToastr) {
53694
+ var destroy = function destroy(url, signedId) {
53695
+ var showToastr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (cov_vqdq5apbi().b[1][0]++, true);
53570
53696
  cov_vqdq5apbi().f[3]++;
53571
53697
  cov_vqdq5apbi().s[7]++;
53572
53698
  return axios["delete"]("".concat(url, "/").concat(signedId), {
53573
53699
  showToastr: showToastr
53574
53700
  });
53575
53701
  };
53576
- var directUploadsApi = (cov_vqdq5apbi().s[8]++, {
53702
+ cov_vqdq5apbi().s[8]++;
53703
+ var attach = function attach(url, payload) {
53704
+ var showToastr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (cov_vqdq5apbi().b[2][0]++, true);
53705
+ cov_vqdq5apbi().f[4]++;
53706
+ cov_vqdq5apbi().s[9]++;
53707
+ return axios.post("/neeto_editor/api/v1/direct_uploads/attach", payload, {
53708
+ showToastr: showToastr
53709
+ });
53710
+ };
53711
+ var directUploadsApi = (cov_vqdq5apbi().s[10]++, {
53577
53712
  generate: generate,
53578
53713
  create: create$1,
53579
53714
  update: update,
53580
- destroy: destroy
53715
+ destroy: destroy,
53716
+ attach: attach
53581
53717
  });
53582
53718
 
53583
53719
  var cryptoJs = {exports: {}};
@@ -60873,7 +61009,7 @@ var generateChecksum = /*#__PURE__*/function () {
60873
61009
 
60874
61010
  function cov_2fcm1htlbu() {
60875
61011
  var path = "/home/runner/work/neeto-editor/neeto-editor/src/utils/DirectUpload/index.js";
60876
- var hash = "ed1e27506f04c8d8468d25fd4f7ea3a1ef776be7";
61012
+ var hash = "31d39243ad4954174351229f432b4407db4d5786";
60877
61013
  var global = new Function("return this")();
60878
61014
  var gcv = "__coverage__";
60879
61015
  var coverageData = {
@@ -60925,7 +61061,7 @@ function cov_2fcm1htlbu() {
60925
61061
  column: 11
60926
61062
  },
60927
61063
  end: {
60928
- line: 22,
61064
+ line: 24,
60929
61065
  column: 3
60930
61066
  }
60931
61067
  },
@@ -60952,100 +61088,120 @@ function cov_2fcm1htlbu() {
60952
61088
  "7": {
60953
61089
  start: {
60954
61090
  line: 19,
60955
- column: 4
61091
+ column: 30
60956
61092
  },
60957
61093
  end: {
60958
61094
  line: 19,
60959
- column: 43
61095
+ column: 55
60960
61096
  }
60961
61097
  },
60962
61098
  "8": {
61099
+ start: {
61100
+ line: 20,
61101
+ column: 4
61102
+ },
61103
+ end: {
61104
+ line: 20,
61105
+ column: 43
61106
+ }
61107
+ },
61108
+ "9": {
60963
61109
  start: {
60964
61110
  line: 21,
60965
61111
  column: 4
60966
61112
  },
60967
61113
  end: {
60968
61114
  line: 21,
61115
+ column: 63
61116
+ }
61117
+ },
61118
+ "10": {
61119
+ start: {
61120
+ line: 23,
61121
+ column: 4
61122
+ },
61123
+ end: {
61124
+ line: 23,
60969
61125
  column: 20
60970
61126
  }
60971
61127
  },
60972
- "9": {
61128
+ "11": {
60973
61129
  start: {
60974
- line: 24,
61130
+ line: 26,
60975
61131
  column: 16
60976
61132
  },
60977
61133
  end: {
60978
- line: 35,
61134
+ line: 37,
60979
61135
  column: 3
60980
61136
  }
60981
61137
  },
60982
- "10": {
61138
+ "12": {
60983
61139
  start: {
60984
- line: 25,
61140
+ line: 27,
60985
61141
  column: 20
60986
61142
  },
60987
61143
  end: {
60988
- line: 32,
61144
+ line: 34,
60989
61145
  column: 5
60990
61146
  }
60991
61147
  },
60992
- "11": {
61148
+ "13": {
60993
61149
  start: {
60994
- line: 34,
61150
+ line: 36,
60995
61151
  column: 4
60996
61152
  },
60997
61153
  end: {
60998
- line: 34,
61154
+ line: 36,
60999
61155
  column: 56
61000
61156
  }
61001
61157
  },
61002
- "12": {
61158
+ "14": {
61003
61159
  start: {
61004
- line: 37,
61160
+ line: 39,
61005
61161
  column: 10
61006
61162
  },
61007
61163
  end: {
61008
- line: 37,
61164
+ line: 39,
61009
61165
  column: 44
61010
61166
  }
61011
61167
  },
61012
- "13": {
61168
+ "15": {
61013
61169
  start: {
61014
- line: 37,
61170
+ line: 39,
61015
61171
  column: 16
61016
61172
  },
61017
61173
  end: {
61018
- line: 37,
61174
+ line: 39,
61019
61175
  column: 44
61020
61176
  }
61021
61177
  },
61022
- "14": {
61178
+ "16": {
61023
61179
  start: {
61024
- line: 39,
61180
+ line: 41,
61025
61181
  column: 18
61026
61182
  },
61027
61183
  end: {
61028
- line: 47,
61184
+ line: 49,
61029
61185
  column: 3
61030
61186
  }
61031
61187
  },
61032
- "15": {
61188
+ "17": {
61033
61189
  start: {
61034
- line: 40,
61190
+ line: 42,
61035
61191
  column: 19
61036
61192
  },
61037
61193
  end: {
61038
- line: 44,
61194
+ line: 46,
61039
61195
  column: 5
61040
61196
  }
61041
61197
  },
61042
- "16": {
61198
+ "18": {
61043
61199
  start: {
61044
- line: 46,
61200
+ line: 48,
61045
61201
  column: 4
61046
61202
  },
61047
61203
  end: {
61048
- line: 46,
61204
+ line: 48,
61049
61205
  column: 59
61050
61206
  }
61051
61207
  }
@@ -61093,7 +61249,7 @@ function cov_2fcm1htlbu() {
61093
61249
  column: 23
61094
61250
  },
61095
61251
  end: {
61096
- line: 22,
61252
+ line: 24,
61097
61253
  column: 3
61098
61254
  }
61099
61255
  },
@@ -61103,73 +61259,73 @@ function cov_2fcm1htlbu() {
61103
61259
  name: "(anonymous_2)",
61104
61260
  decl: {
61105
61261
  start: {
61106
- line: 24,
61262
+ line: 26,
61107
61263
  column: 16
61108
61264
  },
61109
61265
  end: {
61110
- line: 24,
61266
+ line: 26,
61111
61267
  column: 17
61112
61268
  }
61113
61269
  },
61114
61270
  loc: {
61115
61271
  start: {
61116
- line: 24,
61272
+ line: 26,
61117
61273
  column: 28
61118
61274
  },
61119
61275
  end: {
61120
- line: 35,
61276
+ line: 37,
61121
61277
  column: 3
61122
61278
  }
61123
61279
  },
61124
- line: 24
61280
+ line: 26
61125
61281
  },
61126
61282
  "3": {
61127
61283
  name: "(anonymous_3)",
61128
61284
  decl: {
61129
61285
  start: {
61130
- line: 37,
61286
+ line: 39,
61131
61287
  column: 10
61132
61288
  },
61133
61289
  end: {
61134
- line: 37,
61290
+ line: 39,
61135
61291
  column: 11
61136
61292
  }
61137
61293
  },
61138
61294
  loc: {
61139
61295
  start: {
61140
- line: 37,
61296
+ line: 39,
61141
61297
  column: 16
61142
61298
  },
61143
61299
  end: {
61144
- line: 37,
61300
+ line: 39,
61145
61301
  column: 44
61146
61302
  }
61147
61303
  },
61148
- line: 37
61304
+ line: 39
61149
61305
  },
61150
61306
  "4": {
61151
61307
  name: "(anonymous_4)",
61152
61308
  decl: {
61153
61309
  start: {
61154
- line: 39,
61310
+ line: 41,
61155
61311
  column: 18
61156
61312
  },
61157
61313
  end: {
61158
- line: 39,
61314
+ line: 41,
61159
61315
  column: 19
61160
61316
  }
61161
61317
  },
61162
61318
  loc: {
61163
61319
  start: {
61164
- line: 39,
61320
+ line: 41,
61165
61321
  column: 36
61166
61322
  },
61167
61323
  end: {
61168
- line: 47,
61324
+ line: 49,
61169
61325
  column: 3
61170
61326
  }
61171
61327
  },
61172
- line: 39
61328
+ line: 41
61173
61329
  }
61174
61330
  },
61175
61331
  branchMap: {
@@ -61229,6 +61385,39 @@ function cov_2fcm1htlbu() {
61229
61385
  }
61230
61386
  }],
61231
61387
  line: 18
61388
+ },
61389
+ "2": {
61390
+ loc: {
61391
+ start: {
61392
+ line: 19,
61393
+ column: 30
61394
+ },
61395
+ end: {
61396
+ line: 19,
61397
+ column: 55
61398
+ }
61399
+ },
61400
+ type: "binary-expr",
61401
+ locations: [{
61402
+ start: {
61403
+ line: 19,
61404
+ column: 30
61405
+ },
61406
+ end: {
61407
+ line: 19,
61408
+ column: 43
61409
+ }
61410
+ }, {
61411
+ start: {
61412
+ line: 19,
61413
+ column: 47
61414
+ },
61415
+ end: {
61416
+ line: 19,
61417
+ column: 55
61418
+ }
61419
+ }],
61420
+ line: 19
61232
61421
  }
61233
61422
  },
61234
61423
  s: {
@@ -61248,7 +61437,9 @@ function cov_2fcm1htlbu() {
61248
61437
  "13": 0,
61249
61438
  "14": 0,
61250
61439
  "15": 0,
61251
- "16": 0
61440
+ "16": 0,
61441
+ "17": 0,
61442
+ "18": 0
61252
61443
  },
61253
61444
  f: {
61254
61445
  "0": 0,
@@ -61259,10 +61450,11 @@ function cov_2fcm1htlbu() {
61259
61450
  },
61260
61451
  b: {
61261
61452
  "0": [0],
61262
- "1": [0, 0]
61453
+ "1": [0, 0],
61454
+ "2": [0, 0]
61263
61455
  },
61264
61456
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
61265
- hash: "ed1e27506f04c8d8468d25fd4f7ea3a1ef776be7"
61457
+ hash: "31d39243ad4954174351229f432b4407db4d5786"
61266
61458
  };
61267
61459
  var coverage = global[gcv] || (global[gcv] = {});
61268
61460
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -61286,7 +61478,7 @@ var DirectUpload = /*#__PURE__*/_createClass$1(function DirectUpload(_ref) {
61286
61478
  progress = _ref$progress === void 0 ? (cov_2fcm1htlbu().b[0][0]++, noop$2) : _ref$progress;
61287
61479
  _classCallCheck$1(this, DirectUpload);
61288
61480
  _defineProperty(this, "create", (cov_2fcm1htlbu().s[4]++, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
61289
- var response, _ref3, url, headers;
61481
+ var response, _ref3, url, headers, _ref4, id, signed_id;
61290
61482
  return regenerator.wrap(function _callee$(_context) {
61291
61483
  while (1) switch (_context.prev = _context.next) {
61292
61484
  case 0:
@@ -61297,25 +61489,33 @@ var DirectUpload = /*#__PURE__*/_createClass$1(function DirectUpload(_ref) {
61297
61489
  case 4:
61298
61490
  response = _context.sent;
61299
61491
  _ref3 = (cov_2fcm1htlbu().s[6]++, (cov_2fcm1htlbu().b[1][0]++, response.direct_upload) || (cov_2fcm1htlbu().b[1][1]++, response.data.direct_upload)), url = _ref3.url, headers = _ref3.headers;
61300
- cov_2fcm1htlbu().s[7]++;
61301
- _context.next = 9;
61302
- return _this.uploadToCloud(url, headers);
61303
- case 9:
61492
+ _ref4 = (cov_2fcm1htlbu().s[7]++, (cov_2fcm1htlbu().b[2][0]++, response.data) || (cov_2fcm1htlbu().b[2][1]++, response)), id = _ref4.id, signed_id = _ref4.signed_id;
61304
61493
  cov_2fcm1htlbu().s[8]++;
61494
+ _context.next = 10;
61495
+ return _this.uploadToCloud(url, headers);
61496
+ case 10:
61497
+ cov_2fcm1htlbu().s[9]++;
61498
+ _context.next = 13;
61499
+ return directUploadsApi.attach(_this.url, {
61500
+ id: id,
61501
+ signed_id: signed_id
61502
+ });
61503
+ case 13:
61504
+ cov_2fcm1htlbu().s[10]++;
61305
61505
  return _context.abrupt("return", response);
61306
- case 11:
61506
+ case 15:
61307
61507
  case "end":
61308
61508
  return _context.stop();
61309
61509
  }
61310
61510
  }, _callee);
61311
61511
  }))));
61312
- _defineProperty(this, "generateUrl", (cov_2fcm1htlbu().s[9]++, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
61512
+ _defineProperty(this, "generateUrl", (cov_2fcm1htlbu().s[11]++, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
61313
61513
  var payload;
61314
61514
  return regenerator.wrap(function _callee2$(_context2) {
61315
61515
  while (1) switch (_context2.prev = _context2.next) {
61316
61516
  case 0:
61317
61517
  cov_2fcm1htlbu().f[2]++;
61318
- cov_2fcm1htlbu().s[10]++;
61518
+ cov_2fcm1htlbu().s[12]++;
61319
61519
  _context2.t0 = _this.file.name;
61320
61520
  _context2.t1 = _this.file.size;
61321
61521
  _context2.t2 = _this.file.type;
@@ -61332,7 +61532,7 @@ var DirectUpload = /*#__PURE__*/_createClass$1(function DirectUpload(_ref) {
61332
61532
  payload = {
61333
61533
  blob: _context2.t4
61334
61534
  };
61335
- cov_2fcm1htlbu().s[11]++;
61535
+ cov_2fcm1htlbu().s[13]++;
61336
61536
  return _context2.abrupt("return", directUploadsApi.generate(_this.url, payload));
61337
61537
  case 12:
61338
61538
  case "end":
@@ -61340,19 +61540,19 @@ var DirectUpload = /*#__PURE__*/_createClass$1(function DirectUpload(_ref) {
61340
61540
  }
61341
61541
  }, _callee2);
61342
61542
  }))));
61343
- _defineProperty(this, "abort", (cov_2fcm1htlbu().s[12]++, function () {
61543
+ _defineProperty(this, "abort", (cov_2fcm1htlbu().s[14]++, function () {
61344
61544
  cov_2fcm1htlbu().f[3]++;
61345
- cov_2fcm1htlbu().s[13]++;
61545
+ cov_2fcm1htlbu().s[15]++;
61346
61546
  return _this.abortController.abort();
61347
61547
  }));
61348
- _defineProperty(this, "uploadToCloud", (cov_2fcm1htlbu().s[14]++, function (url, headers) {
61548
+ _defineProperty(this, "uploadToCloud", (cov_2fcm1htlbu().s[16]++, function (url, headers) {
61349
61549
  cov_2fcm1htlbu().f[4]++;
61350
- var config = (cov_2fcm1htlbu().s[15]++, {
61550
+ var config = (cov_2fcm1htlbu().s[17]++, {
61351
61551
  headers: headers,
61352
61552
  onUploadProgress: _this.progress,
61353
61553
  signal: _this.abortController.signal
61354
61554
  });
61355
- cov_2fcm1htlbu().s[16]++;
61555
+ cov_2fcm1htlbu().s[18]++;
61356
61556
  return directUploadsApi.create(url, _this.file, config);
61357
61557
  }));
61358
61558
  cov_2fcm1htlbu().f[0]++;