@crystaldesign/media-upload 24.11.0-beta.36 → 24.11.0-beta.38
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/build/cjs/index.js
CHANGED
|
@@ -252,7 +252,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
252
252
|
}, {
|
|
253
253
|
key: "save",
|
|
254
254
|
value: function () {
|
|
255
|
-
var _save = _asyncToGenerator__default["default"](
|
|
255
|
+
var _save = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(params) {
|
|
256
256
|
var _this$fileObject, _this$itemRef, _this$itemRef$url, _this$itemRef2, _file2, _url, response, blob, formData, mediaitem, _url2, mediaitemref, _mediaitemref, data, media, _media$spinImages, _media, ref, item, _this$item;
|
|
257
257
|
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
|
|
258
258
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -394,8 +394,8 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
394
394
|
headers: this.config.jwt ? {
|
|
395
395
|
Authorization: "Bearer ".concat(this.config.jwt)
|
|
396
396
|
} : {}
|
|
397
|
-
}).then(
|
|
398
|
-
var _ref = _asyncToGenerator__default["default"](
|
|
397
|
+
}).then(/*#__PURE__*/function () {
|
|
398
|
+
var _ref = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(r) {
|
|
399
399
|
var error, err;
|
|
400
400
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
401
401
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -473,8 +473,8 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
473
473
|
}, this.config.jwt ? {
|
|
474
474
|
Authorization: "Bearer ".concat(this.config.jwt)
|
|
475
475
|
} : {})
|
|
476
|
-
}).then(
|
|
477
|
-
var _ref2 = _asyncToGenerator__default["default"](
|
|
476
|
+
}).then(/*#__PURE__*/function () {
|
|
477
|
+
var _ref2 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(r) {
|
|
478
478
|
var error, err;
|
|
479
479
|
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
480
480
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -525,7 +525,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
525
525
|
}, {
|
|
526
526
|
key: "load",
|
|
527
527
|
value: function () {
|
|
528
|
-
var _load = _asyncToGenerator__default["default"](
|
|
528
|
+
var _load = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(params) {
|
|
529
529
|
var mediaItemRef;
|
|
530
530
|
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
|
|
531
531
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -586,7 +586,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
586
586
|
}, {
|
|
587
587
|
key: "getMediaItem",
|
|
588
588
|
value: function () {
|
|
589
|
-
var _getMediaItem = _asyncToGenerator__default["default"](
|
|
589
|
+
var _getMediaItem = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(imageUrl, organizationId) {
|
|
590
590
|
var url, filter, mediaItem;
|
|
591
591
|
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
|
|
592
592
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -627,7 +627,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
627
627
|
}, {
|
|
628
628
|
key: "getMediaItemRef",
|
|
629
629
|
value: function () {
|
|
630
|
-
var _getMediaItemRef = _asyncToGenerator__default["default"](
|
|
630
|
+
var _getMediaItemRef = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(ref, organizationId) {
|
|
631
631
|
var url, filter, mediaItemRef;
|
|
632
632
|
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
|
|
633
633
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -792,7 +792,7 @@ function index (_ref) {
|
|
|
792
792
|
fileObjects = _useState20[0],
|
|
793
793
|
setFileObjects = _useState20[1];
|
|
794
794
|
var initState = /*#__PURE__*/function () {
|
|
795
|
-
var _ref2 = _asyncToGenerator__default["default"](
|
|
795
|
+
var _ref2 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(data) {
|
|
796
796
|
var _newState$0$classes;
|
|
797
797
|
var newState, files, i, file, newFile, fileEndingIndex;
|
|
798
798
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
package/build/esm/index.js
CHANGED
|
@@ -228,7 +228,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
228
228
|
}, {
|
|
229
229
|
key: "save",
|
|
230
230
|
value: function () {
|
|
231
|
-
var _save = _asyncToGenerator(
|
|
231
|
+
var _save = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(params) {
|
|
232
232
|
var _this$fileObject, _this$itemRef, _this$itemRef$url, _this$itemRef2, _file2, _url, response, blob, formData, mediaitem, _url2, mediaitemref, _mediaitemref, data, media, _media$spinImages, _media, ref, item, _this$item;
|
|
233
233
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
234
234
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -370,8 +370,8 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
370
370
|
headers: this.config.jwt ? {
|
|
371
371
|
Authorization: "Bearer ".concat(this.config.jwt)
|
|
372
372
|
} : {}
|
|
373
|
-
}).then(
|
|
374
|
-
var _ref = _asyncToGenerator(
|
|
373
|
+
}).then(/*#__PURE__*/function () {
|
|
374
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(r) {
|
|
375
375
|
var error, err;
|
|
376
376
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
377
377
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -449,8 +449,8 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
449
449
|
}, this.config.jwt ? {
|
|
450
450
|
Authorization: "Bearer ".concat(this.config.jwt)
|
|
451
451
|
} : {})
|
|
452
|
-
}).then(
|
|
453
|
-
var _ref2 = _asyncToGenerator(
|
|
452
|
+
}).then(/*#__PURE__*/function () {
|
|
453
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(r) {
|
|
454
454
|
var error, err;
|
|
455
455
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
456
456
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -501,7 +501,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
501
501
|
}, {
|
|
502
502
|
key: "load",
|
|
503
503
|
value: function () {
|
|
504
|
-
var _load = _asyncToGenerator(
|
|
504
|
+
var _load = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(params) {
|
|
505
505
|
var mediaItemRef;
|
|
506
506
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
507
507
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -562,7 +562,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
562
562
|
}, {
|
|
563
563
|
key: "getMediaItem",
|
|
564
564
|
value: function () {
|
|
565
|
-
var _getMediaItem = _asyncToGenerator(
|
|
565
|
+
var _getMediaItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(imageUrl, organizationId) {
|
|
566
566
|
var url, filter, mediaItem;
|
|
567
567
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
568
568
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -603,7 +603,7 @@ var DivaFile = /*#__PURE__*/function () {
|
|
|
603
603
|
}, {
|
|
604
604
|
key: "getMediaItemRef",
|
|
605
605
|
value: function () {
|
|
606
|
-
var _getMediaItemRef = _asyncToGenerator(
|
|
606
|
+
var _getMediaItemRef = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(ref, organizationId) {
|
|
607
607
|
var url, filter, mediaItemRef;
|
|
608
608
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
609
609
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -768,7 +768,7 @@ function index (_ref) {
|
|
|
768
768
|
fileObjects = _useState20[0],
|
|
769
769
|
setFileObjects = _useState20[1];
|
|
770
770
|
var initState = /*#__PURE__*/function () {
|
|
771
|
-
var _ref2 = _asyncToGenerator(
|
|
771
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(data) {
|
|
772
772
|
var _newState$0$classes;
|
|
773
773
|
var newState, files, i, file, newFile, fileEndingIndex;
|
|
774
774
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|