UNPKG

@ag-grid-community/csv-export

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

4 lines (3 loc) 20 kB
import{BeanStub as L}from"@ag-grid-community/core";var x=class extends L{setBeans(e){this.beans=e}getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};import{_isGroupMultiAutoColumn as U,_isGroupUseEntireRow as T,_isServerSideRowModel as _}from"@ag-grid-community/core";var E=class{constructor(e){this.groupColumns=[];const{columnModel:t,funcColsService:r,columnNameService:o,valueService:s,gos:n,processCellCallback:i,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:u}=e;this.columnModel=t,this.funcColsService=r,this.columnNameService=o,this.valueService=s,this.gos=n,this.processCellCallback=i,this.processHeaderCallback=l,this.processGroupHeaderCallback=a,this.processRowGroupCallback=u}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,r,o,s){const i=(!this.gos.get("groupHideOpenParents")||s.footer)&&this.shouldRenderGroupSummaryCell(s,e,t)?this.createValueForGroupNode(e,s):this.valueService.getValue(e,s);return this.processCell({accumulatedRowIndex:r,rowNode:s,column:e,value:i,processCellCallback:this.processCellCallback,type:o})}shouldRenderGroupSummaryCell(e,t,r){if(!(e&&e.group))return!1;if(this.groupColumns.indexOf(t)!==-1){const i=e.groupData?.[t.getId()],l=this.gos.get("suppressGroupMaintainValueType");if(l&&i!=null||!l&&i!==void 0||_(this.gos)&&e.group)return!0;if(e.footer&&e.level===-1){const a=t.getColDef();return a==null||a.showRowGroup===!0||a.showRowGroup===this.funcColsService.getRowGroupColumns()[0].getId()}}const n=T(this.gos,this.columnModel.isPivotMode());return r===0&&n}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnNameService.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));const r=this.gos.get("treeData"),o=this.gos.get("suppressGroupMaintainValueType"),s=a=>{if(r||o)return a.key;const u=a.groupData?.[e.getId()];return!u||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?u:this.valueService.formatValue(a.rowGroupColumn,a,u)??u},n=t.footer,i=[s(t)];if(!U(this.gos))for(;t.parent;)t=t.parent,i.push(s(t));const l=i.reverse().join(" -> ");return n?`Total ${l}`:l}processCell(e){const{accumulatedRowIndex:t,rowNode:r,column:o,value:s,processCellCallback:n,type:i}=e;return n?{value:n(this.gos.addGridCommonParams({accumulatedRowIndex:t,column:o,node:r,value:s,type:i,parseValue:l=>this.valueService.parseValue(o,r,l,this.valueService.getValue(o,r)),formatValue:l=>this.valueService.formatValue(o,r,l)??l}))??""}:o.getColDef().useValueFormatterForExport!==!1?{value:s??"",valueFormatted:this.valueService.formatValue(o,r,s)}:{value:s??""}}};import{_warnOnce as z}from"@ag-grid-community/core";import{_warnOnce as $}from"@ag-grid-community/core";var P=class{static download(e,t){const r=document.defaultView||window;if(!r){$("There is no `window` associated with the current `document`");return}const o=document.createElement("a"),s=r.URL.createObjectURL(t);o.setAttribute("href",s),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:r})),document.body.removeChild(o),r.setTimeout(()=>{r.URL.revokeObjectURL(s)},0)}};import{_warnOnce as Q}from"@ag-grid-community/core";var M=`\r `,j=class extends E{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:r}=e;this.suppressQuotes=t,this.columnSeparator=r}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,M),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((r,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(r.data.value||""),r.mergeAcross&&this.appendEmptyCells(r.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,r,o){r!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,r){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",r);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(Q("unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=M),this.isFirstLine=!1}},A=class extends x{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.gridSerializer=e.gridSerializer}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){z("Export cancelled. Export is not allowed as per your configuration.");return}const t=this.getMergedParams(e),r=this.getData(t),o=new Blob(["\uFEFF",r],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(this.gos.getGridCommonParams()):t.fileName;P.download(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const r=t?Object.assign({},e):this.getMergedParams(e);return this.getData(r)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:t,columnNameService:r,funcColsService:o,valueService:s,gos:n}=this,{processCellCallback:i,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:u,suppressQuotes:d,columnSeparator:p}=e;return new j({columnModel:t,columnNameService:r,funcColsService:o,valueService:s,gos:n,processCellCallback:i||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:a||void 0,processRowGroupCallback:u||void 0,suppressQuotes:d||!1,columnSeparator:p||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};import{ModuleNames as b,_defineModule as N}from"@ag-grid-community/core";function K(e,t){return e.csvCreator?.getDataAsCsv(t)}function W(e,t){e.csvCreator?.exportDataAsCsv(t)}import{BeanStub as X,GroupInstanceIdCreator as Y,_compose as Z,_isClientSideRowModel as q,_isServerSideRowModel as J,_last as ee,isColumnControlsCol as te,isColumnGroup as oe,isColumnGroupAutoCol as re}from"@ag-grid-community/core";var H=(e=>(e[e.HEADER_GROUPING=0]="HEADER_GROUPING",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY",e))(H||{}),D=class extends X{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.selectionService=e.selectionService,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController}serialize(e,t={}){const{allColumns:r,columnKeys:o,skipRowGroups:s}=t,n=this.getColumnsToExport(r,s,o);return Z(this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t))(e).parse()}processRow(e,t,r,o){const s=t.shouldRowBeSkipped||(()=>!1),n=this.gos.get("groupRemoveSingleChildren"),i=this.gos.get("groupRemoveLowestSingleChildren"),a=t.rowPositions!=null||!!t.onlySelected,u=this.gos.get("groupHideOpenParents")&&!a,d=this.columnModel.isPivotMode()?o.leafGroup:!o.group,p=!!o.footer,f=i&&o.leafGroup,c=o.allChildrenCount===1&&o.childrenAfterGroup?.length===1&&(n||f);if(!d&&!p&&(t.skipRowGroups||c||u)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.level===-1&&!d&&!p||s(this.gos.addGridCommonParams({node:o})))return;const v=e.onNewBodyRow(o);if(r.forEach((C,R)=>{v.onColumn(C,R,o)}),t.getCustomContentBelowRow){const C=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:o}));C&&e.addCustomContent(C)}}appendContent(e){return t=>{const r=e.appendContent;return r&&t.addCustomContent(r),t}}prependContent(e){return t=>{const r=e.prependContent;return r&&t.addCustomContent(r),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return r=>{if(!e.skipColumnGroupHeaders){const o=new Y,s=this.visibleColsService.createGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0});this.recursivelyAddHeaderGroups(s,r,e.processGroupHeaderCallback)}return r}}exportHeaders(e,t){return r=>{if(!e.skipColumnHeaders){const o=r.onNewHeaderRow();t.forEach((s,n)=>{o.onColumn(s,n,void 0)})}return r}}processPinnedTopRows(e,t){return r=>{const o=this.processRow.bind(this,r,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="top").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel.getPinnedTopRow(s.rowIndex)).forEach(o):this.pinnedRowModel.forEachPinnedRow("top",o),r}}processRows(e,t){return r=>{const o=this.rowModel,s=q(this.gos),n=J(this.gos),i=!s&&e.onlySelected,l=this.processRow.bind(this,r,e,t),{exportedRows:a="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(u=>u.rowPinned==null).sort((u,d)=>u.rowIndex-d.rowIndex).map(u=>o.getRow(u.rowIndex)).forEach(l);else if(this.columnModel.isPivotMode())s?o.forEachPivotNode(l,!0):n?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);else if(e.onlySelectedAllPages||i){const u=this.selectionService.getSelectedNodes();this.replicateSortedOrder(u),u.forEach(l)}else a==="all"?o.forEachNode(l):s||n?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);return r}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),r=(o,s)=>o.rowIndex!=null&&s.rowIndex!=null?o.rowIndex-s.rowIndex:o.level===s.level?o.parent?.id===s.parent?.id?this.rowNodeSorter.compareRowNodes(t,{rowNode:o,currentPos:o.rowIndex??-1},{rowNode:s,currentPos:s.rowIndex??-1}):r(o.parent,s.parent):o.level>s.level?r(o.parent,s):r(o,s.parent);e.sort(r)}processPinnedBottomRows(e,t){return r=>{const o=this.processRow.bind(this,r,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="bottom").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel.getPinnedBottomRow(s.rowIndex)).forEach(o):this.pinnedRowModel.forEachPinnedRow("bottom",o),r}}getColumnsToExport(e=!1,t=!1,r){const o=this.columnModel.isPivotMode();if(r&&r.length)return this.columnModel.getColsForKeys(r);const s=this.gos.get("treeData");let n=[];return e&&!o?n=this.columnModel.getCols():n=this.visibleColsService.getAllCols(),t&&!s&&(n=n.filter(i=>!re(i)&&!te(i))),n}recursivelyAddHeaderGroups(e,t,r){const o=[];e.forEach(s=>{const n=s;n.getChildren&&n.getChildren().forEach(i=>o.push(i))}),e.length>0&&oe(e[0])&&this.doAddHeaderHeader(t,e,r),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,r)}doAddHeaderHeader(e,t,r){const o=e.onNewHeaderGroupingRow();let s=0;t.forEach(n=>{const i=n;let l;r?l=r(this.gos.addGridCommonParams({columnGroup:i})):l=this.columnNameService.getDisplayNameForColumnGroup(i,"header");const a=i.getLeafColumns().reduce((u,d,p,f)=>{let c=ee(u);return d.getColumnGroupShow()==="open"?(!c||c[1]!=null)&&(c=[p],u.push(c)):c&&c[1]==null&&(c[1]=p-1),p===f.length-1&&c&&c[1]==null&&(c[1]=p),u},[]);o.onColumn(i,l||"",s++,i.getLeafColumns().length-1,a)})}},G="32.3.9",y=N({version:G,moduleName:`${b.CsvExportModule}-core`,beans:[A,D]}),se=N({version:G,moduleName:`${b.CsvExportModule}-api`,apiFunctions:{getDataAsCsv:K,exportDataAsCsv:W},dependantModules:[y]}),ne=N({version:G,moduleName:b.CsvExportModule,dependantModules:[y,se]}),S=`\r `;function k(e,t,r){if(!t&&t!==""&&t!==0)return"";let o=t;return typeof t=="boolean"&&r&&(o=r(t)),` ${e}="${o}"`}var ie=class{static createHeader(e={}){const t="<?",r="?>",o=["version"];e.version||(e.version="1.0"),e.encoding&&o.push("encoding"),e.standalone&&o.push("standalone");const s=o.map(n=>`${n}="${e[n]}"`).join(" ");return`${t}xml ${s} ${r}`}static createXml(e,t){let r="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach(s=>{Object.keys(s.map).forEach(n=>{r+=k(s.prefix+n,s.map[n],t)})}),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach(s=>{r+=k(s,e.properties.rawMap[s],t)}));let o="<"+e.name+r;return!e.children&&e.textNode==null?o+"/>"+S:e.textNode!=null?o+">"+e.textNode+"</"+e.name+">"+S:(o+=">"+S,e.children&&e.children.forEach(s=>{o+=this.createXml(s,t)}),o+"</"+e.name+">"+S)}};import{_utf8_encode as le}from"@ag-grid-community/core";var ae=async e=>{let t=0;const r=[],o=new WritableStream({write:i=>{r.push(i),t+=i.length}}),s=new ReadableStream({start:i=>{const l=new FileReader;l.onload=a=>{a.target?.result&&i.enqueue(a.target.result),i.close()},l.readAsArrayBuffer(e)}}),n=new window.CompressionStream("deflate-raw");return await s.pipeThrough(n).pipeTo(o),{size:t,content:new Blob(r)}},ue=async e=>{const t=new Blob([e]),{size:r,content:o}=await ae(t),s=new Uint8Array(await o.arrayBuffer());return{size:r,content:s}},ce=e=>{let t=e.getHours();return t<<=6,t=t|e.getMinutes(),t<<=5,t=t|e.getSeconds()/2,t},de=e=>{let t=e.getFullYear()-1980;return t<<=4,t=t|e.getMonth()+1,t<<=5,t=t|e.getDate(),t};function h(e,t){let r="";for(let o=0;o<t;o++)r+=String.fromCharCode(e&255),e>>>=8;return r}var I=e=>{if(!e.length)return 0;let t=-1,r=0,o=0,s=0;for(let n=0;n<e.length;n++)r=e[n],o=(t^r)&255,s=pe[o],t=t>>>8^s;return t^-1},O=e=>e.length?I(typeof e=="string"?new TextEncoder().encode(e):e):0,pe=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),V=(e,t,r,o,s,n)=>{const{content:i,path:l,created:a}=e,u=ce(a),d=de(a),p=O(s),f=n!==void 0?n:o,c=le(l),w=c!==l;let m="";if(w){const g=h(1,1)+h(O(c),4)+c;m="up"+h(g.length,2)+g}const v="\0"+(w?"\0\b":"\0\0")+h(t?8:0,2)+h(u,2)+h(d,2)+h(f?p:0,4)+h(n??o,4)+h(o,4)+h(c.length,2)+h(m.length,2),C="PK"+v+c+m,R="PK\0"+v+"\0\0\0\0\0\0"+(i?"\0\0\0\0":"\0\0\0")+h(r,4)+c+m;return{localFileHeader:Uint8Array.from(C,g=>g.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(R,g=>g.charCodeAt(0))}},B=e=>{let t;if(typeof e=="string"){const r=atob(e.split(";base64,")[1]);t=Uint8Array.from(r,o=>o.charCodeAt(0))}else t=e;return{size:t.length,content:t}},he=async(e,t)=>{const{content:r}=e,{size:o,content:s}=r?B(r):{size:0,content:Uint8Array.from([])};let n,i,l=!1;if(e.type==="file"&&s&&o>0){const d=await ue(s);n=d.content,i=d.size,l=!0}return{...V(e,l,t,o,s,i),content:n||s,isCompressed:l}},fe=(e,t)=>{const{content:r}=e,{content:o}=r?B(r):{content:Uint8Array.from([])};return{...V(e,!1,t,o.length,o,void 0),content:o,isCompressed:!1}},Ce=(e,t,r)=>{const o="PK\0\0\0\0"+h(e,2)+h(e,2)+h(t,4)+h(r,4)+"\0\0";return Uint8Array.from(o,s=>s.charCodeAt(0))},F=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,t,r=!1){this.files.push({path:e,created:new Date,content:r?t:new TextEncoder().encode(t),isBase64:r,type:"file"})}static async getZipFile(e="application/zip"){const t=await this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e})}static getUncompressedZipFile(e="application/zip"){const t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){let t=0,r=0;for(const u of e){const{localFileHeader:d,centralDirectoryHeader:p,content:f}=u;t+=d.length+f.length,r+=p.length}const o=new Uint8Array(t),s=new Uint8Array(r);let n=0,i=0;for(const u of e){const{localFileHeader:d,centralDirectoryHeader:p,content:f}=u;o.set(d,n),n+=d.length,o.set(f,n),n+=f.length,s.set(p,i),i+=p.length}const l=Ce(e.length,r,t),a=new Uint8Array(o.length+s.length+l.length);return a.set(o),a.set(s,o.length),a.set(l,o.length+s.length),a}static async buildCompressedFileStream(){const e=[...this.folders,...this.files],t=[];let r=0;for(const o of e){const s=await he(o,r),{localFileHeader:n,content:i}=s;t.push(s),r+=n.length+i.length}return this.packageFiles(t)}static buildFileStream(){const e=[...this.folders,...this.files],t=[];let r=0;for(const o of e){const s=fe(o,r),{localFileHeader:n,content:i}=s;t.push(s),r+=n.length+i.length}return this.packageFiles(t)}};F.folders=[],F.files=[];export{x as BaseCreator,E as BaseGridSerializingSession,A as CsvCreator,ne as CsvExportModule,P as Downloader,D as GridSerializer,H as RowType,ie as XmlFactory,F as ZipContainer,y as _CsvExportCoreModule};