@dmitryvim/form-builder 0.2.24 → 0.2.25

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.
@@ -2294,6 +2294,7 @@ async function renderUploadedFilePreview(container, resourceId, fileName, meta,
2294
2294
  }
2295
2295
  }
2296
2296
  async function renderFilePreview(container, resourceId, state, options = {}) {
2297
+ var _a;
2297
2298
  const { fileName = "", isReadonly = false, deps = null } = options;
2298
2299
  if (!isReadonly && deps && (!deps.picker || !deps.fileUploadHandler || !deps.dragHandler)) {
2299
2300
  throw new Error(
@@ -2323,6 +2324,10 @@ async function renderFilePreview(container, resourceId, state, options = {}) {
2323
2324
  meta,
2324
2325
  state
2325
2326
  );
2327
+ const isVideo = (_a = meta == null ? void 0 : meta.type) == null ? void 0 : _a.startsWith("video/");
2328
+ if (!isReadonly && !isVideo) {
2329
+ renderDeleteButton(container, resourceId, state);
2330
+ }
2326
2331
  }
2327
2332
  }
2328
2333
  async function renderFilePreviewReadonly(resourceId, state, fileName) {