@emailmaker/emailmaker 1.0.105-alpha.6 → 1.0.106

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.
@@ -1405,16 +1405,17 @@ var Te = class {
1405
1405
  return this._cache.upsertEntity(a), a;
1406
1406
  }
1407
1407
  async uploadFiles(e) {
1408
+ let t = await this.getTempFolder();
1408
1409
  e = {
1409
1410
  ...e,
1410
1411
  items: e.items?.map((e) => ({
1411
1412
  ...e,
1412
- folderId: e.noFolder ? i.id : e.folderId
1413
+ folderId: e.noFolder ? t?.id : e.folderId
1413
1414
  }))
1414
1415
  };
1415
- let t = e.items || [], n = e.folderId ?? this._rootId, i = await this.getTempFolder(), a = this.normalizeId(n);
1416
+ let n = e.items || [], i = e.folderId ?? this._rootId, a = this.normalizeId(i);
1416
1417
  if (this._validateDuplicates) {
1417
- for (let e of t) if (e.name) {
1418
+ for (let e of n) if (e.name) {
1418
1419
  this._validateName(e.name, !1);
1419
1420
  let t = this.normalizeId(e.folderId ?? a);
1420
1421
  if (this._checkNameExistsInCache(t, e.name, !1)) {
@@ -1424,11 +1425,11 @@ var Te = class {
1424
1425
  }
1425
1426
  }
1426
1427
  let o = this._cache.getEntity(a), s = {
1427
- detailed: Array(t.length),
1428
+ detailed: Array(n.length),
1428
1429
  success: !0
1429
1430
  };
1430
1431
  if (this._dataProvider.uploadFiles) {
1431
- let e = t.map((e) => ({
1432
+ let e = n.map((e) => ({
1432
1433
  ...e,
1433
1434
  folderId: this.normalizeId(e.folderId ?? a)
1434
1435
  }));
@@ -1455,7 +1456,7 @@ var Te = class {
1455
1456
  }
1456
1457
  s.success === void 0 && (s.success = !s.detailed.some((e) => !e.success));
1457
1458
  } else s.success = s.error ? !1 : !!s.success;
1458
- } else if (this._dataProvider.uploadFile) s.detailed = await Promise.all(t.map(async (e) => {
1459
+ } else if (this._dataProvider.uploadFile) s.detailed = await Promise.all(n.map(async (e) => {
1459
1460
  let t = this.normalizeId(e.folderId ?? a);
1460
1461
  try {
1461
1462
  let n = await this._uploadFile({
@@ -2491,7 +2492,7 @@ var ke = S(l), Ae = S(u), { useToken: je } = D, Me = ({ storageProvider: t }) =>
2491
2492
  W,
2492
2493
  I
2493
2494
  ]), Fe = C(async (e) => {
2494
- let t = e.url || e.thumbnailUrl || e.thumbnail;
2495
+ let t = e.url;
2495
2496
  !t && X && (t = await X.getFileUrl(e.folderId, e.name)), t && (I === "img" ? O(ne(t)) : I === "background" && O(_(t))), G();
2496
2497
  }, [
2497
2498
  X,