( contents: DownloadContent[], format: ExportFormat )
| 147 | }; |
| 148 | |
| 149 | const downloadZip = async ( |
| 150 | contents: DownloadContent[], |
| 151 | format: ExportFormat |
| 152 | ) => { |
| 153 | const zip = new JSZip(); |
| 154 | for (const entry of contents) { |
| 155 | zip.file(entry.filename, toBlob(entry, format)); |
| 156 | } |
| 157 | const zipFile = await zip.generateAsync({ type: "blob" }); |
| 158 | saveAs(zipFile, `download_${dayjs().format("YYYY-MM-DDTHH-mm-ss")}.zip`); |
| 159 | }; |
| 160 | |
| 161 | const downloadAll = async ( |
| 162 | contents: DownloadContent[], |