fui-material 2.1.8 → 2.1.9

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.
@@ -50057,6 +50057,21 @@ const getMimeTypeFromFileName = (fileName) => {
50057
50057
  };
50058
50058
  return mimeTypes[extension];
50059
50059
  };
50060
+ function fDownloadBlobFile(blob, fileName) {
50061
+ if (!blob) {
50062
+ throw new Error("Blob or string content must not be empty");
50063
+ }
50064
+ const blobObject = typeof blob === "string" ? new Blob([blob], { type: "text/plain;charset=utf-8" }) : blob;
50065
+ const link2 = document.createElement("a");
50066
+ const url = window.URL.createObjectURL(blobObject);
50067
+ link2.href = url;
50068
+ link2.download = fileName;
50069
+ link2.style.display = "none";
50070
+ document.body.appendChild(link2);
50071
+ link2.click();
50072
+ document.body.removeChild(link2);
50073
+ window.URL.revokeObjectURL(url);
50074
+ }
50060
50075
  function bind(fn, thisArg) {
50061
50076
  return function wrap() {
50062
50077
  return fn.apply(thisArg, arguments);
@@ -52557,6 +52572,7 @@ export {
52557
52572
  fAlert,
52558
52573
  fConfirm,
52559
52574
  fConvertFileToBase64,
52575
+ fDownloadBlobFile,
52560
52576
  fDownloadFileFromBase64,
52561
52577
  fExportHtmlOrJsxToWord,
52562
52578
  fExportTableToExcel,