UNPKG

@novin-dev/formalite

Version:

Generate MUI form with few line of code

22 lines (19 loc) 823 B
import { __assign } from 'tslib'; var fixDropZoneDefaultValue = function (values) { return values.map(function (item) { return (__assign(__assign({}, item), { original: "default", status: "not_downloaded", controller: new AbortController(), originalName: "default" })); }); }; var downloadBase64 = function (base64, fileName) { fetch(base64) .then(function (res) { return res.blob(); }) .then(function (res) { var downloadUrl = window.URL.createObjectURL(res); var link = document.createElement("a"); link.href = downloadUrl; link.setAttribute("download", fileName); document.body.appendChild(link); link.click(); link.remove(); }); }; export { downloadBase64, fixDropZoneDefaultValue }; //# sourceMappingURL=utils.js.map