@social-mail/social-mail-client 1.2.264 → 1.2.266

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.
@@ -48952,7 +48952,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
48952
48952
  return __awaiter(this, void 0, void 0, function* () {
48953
48953
  const items = yield this.entityService.query(StoreItem).where({
48954
48954
  id
48955
- }, p => x => x.storeItemID === p.id || x.variantForID === p.id || x.sizeForID === p.id).include(x => [x.store.folder, x.itemFolder, x.fileFolder, x.storeItemPrices.forEach(i => i.addons.forEach(a => a.addOnItem.storeItemPrices)), x.mediaFiles, x.storeItemTags.forEach(t => t.tag)]).toArray();
48955
+ }, p => x => x.storeItemID === p.id || x.variantForID === p.id || x.sizeForID === p.id).include(x => [x.store.folder, x.itemFolder, x.fileFolder, x.storeItemPrices.forEach(i => i.addons.forEach(a => a.addOnItem.storeItemPrices)), x.mediaFiles.forEach(m => m.appFile), x.storeItemTags.forEach(t => t.tag)]).toArray();
48956
48956
  const item = items.find(x => x.storeItemID === id);
48957
48957
  if (!item.folderID) {
48958
48958
  const store = yield this.entityService.query(Store).where({
@@ -49992,9 +49992,12 @@ System.register(["tslib", "@web-atoms/core/dist/web/controls/AtomControl", "../.
49992
49992
  return __awaiter(this, void 0, void 0, function* () {
49993
49993
  (_a = (_b = this.model).mediaFiles) !== null && _a !== void 0 ? _a : _b.mediaFiles = [];
49994
49994
  for (const appFile of files) {
49995
+ const isPreview = /^(image|video)\//i.test(appFile.contentType);
49995
49996
  this.model.mediaFiles.add(StoreMediaFile.create({
49996
49997
  appFile,
49997
- appFileID: appFile.appFileID
49998
+ appFileID: appFile.appFileID,
49999
+ fileContentID: appFile.fileContentID,
50000
+ isPreview
49998
50001
  }));
49999
50002
  }
50000
50003
  });