@senlinz/import-export 0.1.0-beta.14 → 0.1.0-beta.16
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.
- package/dist/index.js +2 -0
- package/dist/types/{declarations/ExcelDefinition.d.ts → ExcelDefinition.d.ts} +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/utils.d.ts +2 -2
- package/package.json +18 -16
- package/dist/components/editable-cell.js +0 -2
- package/dist/components/import-export-definition.js +0 -2
- package/dist/components/import-export-studio.js +0 -2
- package/dist/components/import-export-table.js +0 -2
- package/dist/components/index.js +0 -2
- package/dist/components/p-89617fec.js +0 -2
- package/dist/components/p-c9904f6a.js +0 -2
- package/dist/components/p-dd1bf849.js +0 -2
- package/dist/components/p-ddbe189c.js +0 -2
- package/dist/components/p-f7586df1.js +0 -2
- package/dist/tests/dist/editable-cell.d.ts +0 -11
- package/dist/tests/dist/imexport-table.d.ts +0 -11
- package/dist/tests/dist/import-export-definition.d.ts +0 -11
- package/dist/tests/dist/import-export-definiton.d.ts +0 -11
- package/dist/tests/dist/import-export-studio.d.ts +0 -11
- package/dist/tests/dist/import-export-table.d.ts +0 -11
- package/dist/tests/dist/index.d.ts +0 -33
- package/dist/tests/dist/table-definition.d.ts +0 -11
- package/dist/types/components/editable-cell/editable-cell.d.ts +0 -18
- package/dist/types/components/imexport-table/imexport-table.d.ts +0 -19
- package/dist/types/components/import-export-definition/import-export-definition.d.ts +0 -7
- package/dist/types/components/import-export-definition/import-export-definiton.d.ts +0 -6
- package/dist/types/components/import-export-studio/import-export-studio.d.ts +0 -14
- package/dist/types/components/import-export-studio/import-export-table.d.ts +0 -5
- package/dist/types/components/import-export-table/import-export-table.d.ts +0 -6
- package/dist/types/components/table-definition/table-definition.d.ts +0 -0
- package/dist/types/components.d.ts +0 -116
- package/dist/types/declarations/ExcelDefintion.d.ts +0 -17
- package/dist/types/stencil-public-runtime.d.ts +0 -1674
- package/dist/types/types/index.d.ts +0 -19
- package/dist/types/utils/utils.d.ts +0 -9
|
@@ -19,7 +19,7 @@ interface ExcelColumnDefinition {
|
|
|
19
19
|
name: string;
|
|
20
20
|
width?: number;
|
|
21
21
|
note?: string;
|
|
22
|
-
dataType?: "string" | "number" | "date";
|
|
22
|
+
dataType?: "string" | "number" | "date" | "image";
|
|
23
23
|
allowedValues?: string[];
|
|
24
24
|
parent?: string;
|
|
25
25
|
backgroundColor?: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type * from './
|
|
2
|
-
import { ExcelDefinition } from './
|
|
1
|
+
export type * from './ExcelDefinition';
|
|
2
|
+
import { ExcelDefinition } from './ExcelDefinition';
|
|
3
3
|
import { importExcel, exportExcel, downloadExcelTemplate, fromExcel, toExcel, generateExcelTemplate } from './utils.js';
|
|
4
4
|
declare function getUtils(): {
|
|
5
5
|
importExcel: typeof importExcel;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExcelDefinition } from './
|
|
1
|
+
import { ExcelDefinition } from './ExcelDefinition';
|
|
2
2
|
declare function initializeWasm(): void;
|
|
3
3
|
declare function _fromExcel<T>(definition: ExcelDefinition, buffer: Uint8Array): Promise<T[]>;
|
|
4
4
|
declare function _toExcel<T>(definition: ExcelDefinition, data: T[]): Promise<any>;
|
|
5
|
-
declare function generateExcelTemplate(definition: ExcelDefinition): Promise<Uint8Array
|
|
5
|
+
declare function generateExcelTemplate(definition: ExcelDefinition): Promise<Uint8Array<ArrayBufferLike>>;
|
|
6
6
|
declare function downloadExcelTemplate(definition: ExcelDefinition): Promise<void>;
|
|
7
7
|
declare function download(data: Uint8Array | string, name: string, type?: string): void;
|
|
8
8
|
declare function importExcel<T>(defintion: ExcelDefinition): Promise<T[]>;
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@senlinz/import-export",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
4
|
-
"description": "
|
|
5
|
-
"module": "dist/components/index.js",
|
|
6
|
-
"types": "dist/types/index.d.ts",
|
|
3
|
+
"version": "0.1.0-beta.16",
|
|
4
|
+
"description": "import/export excel core",
|
|
7
5
|
"files": [
|
|
8
6
|
"dist/**/*.js",
|
|
9
7
|
"dist/**/*.d.ts",
|
|
10
8
|
"README.md"
|
|
11
9
|
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"module": "dist/components/index.js",
|
|
12
|
+
"types": "dist/types/index.d.ts",
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
14
15
|
"import": "./dist/components/index.js",
|
|
@@ -16,12 +17,18 @@
|
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
20
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
21
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
19
22
|
"@rollup/plugin-terser": "^0.4.4",
|
|
20
|
-
"@
|
|
23
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
21
24
|
"@types/jest": "^29.5.6",
|
|
22
25
|
"@types/node": "^16.18.108",
|
|
23
26
|
"jest": "^29.7.0",
|
|
24
|
-
"jest-cli": "^29.7.0"
|
|
27
|
+
"jest-cli": "^29.7.0",
|
|
28
|
+
"rollup": "^4.39.0",
|
|
29
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
30
|
+
"tslib": "^2.8.1",
|
|
31
|
+
"typescript": "^5.8.2"
|
|
25
32
|
},
|
|
26
33
|
"author": "senlin",
|
|
27
34
|
"license": "MIT",
|
|
@@ -31,11 +38,9 @@
|
|
|
31
38
|
},
|
|
32
39
|
"dependencies": {
|
|
33
40
|
"fflate": "^0.8.2",
|
|
34
|
-
"@senlinz/import-export-wasm": "0.1.0-beta.
|
|
41
|
+
"@senlinz/import-export-wasm": "0.1.0-beta.16"
|
|
35
42
|
},
|
|
36
43
|
"keywords": [
|
|
37
|
-
"stencil",
|
|
38
|
-
"webcomponents",
|
|
39
44
|
"rust",
|
|
40
45
|
"wasm",
|
|
41
46
|
"import",
|
|
@@ -49,12 +54,9 @@
|
|
|
49
54
|
"client"
|
|
50
55
|
],
|
|
51
56
|
"scripts": {
|
|
52
|
-
"build": "
|
|
53
|
-
"
|
|
54
|
-
"test": "
|
|
55
|
-
"e2e-serve": "
|
|
56
|
-
"e2e-test": "playwright test",
|
|
57
|
-
"generate": "stencil generate",
|
|
58
|
-
"publish-dry-run": "pnpm publish --dry-run --no-git-checks"
|
|
57
|
+
"build": "rollup -c",
|
|
58
|
+
"dev": "rollup -c -w",
|
|
59
|
+
"test": "jest",
|
|
60
|
+
"e2e-serve": "serve dist"
|
|
59
61
|
}
|
|
60
62
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,h as o}from"./p-ddbe189c.js";import{g as n,i,a as s,b as a,d as c,f as r,E as d,e as l,c as f,k as u,h as p,j as b}from"./p-89617fec.js";import{d as m}from"./p-dd1bf849.js";import{d as h}from"./p-f7586df1.js";import{d as x}from"./p-c9904f6a.js";let y=!1;async function w(t,e){const o=S(t),n=async function(t,e){const o=[],n={};for(const t of e)n[t.key]=t.dataType;for(const e of t.rows){const t={};for(const o of e.columns)"number"!=n[o.key]?t[o.key]=o.value:t[o.key]=parseFloat(o.value);o.push(t)}return o}(a(o,e),t.columns);return n}function k(t,e,o=""){const n=[];for(const i of t){let t=[];for(const n in i){let s=e[n],a=i[n];if(s&&void 0!==a)if(s.data_group){if(a.children&&a.children.length){let i=k(a.children,e,n);o?t.push(p.newGroup(n,a.value.toString(),i)):t.push(p.newRootGroup(n,i))}}else t.push(new p(n,a.toString()))}n.push(new b(t))}return n}async function v(t,e){const o=S(t);let n={};for(const t of o.columns)n[t.key]=t;const i=k(e,n),s=new d(i);return l(o,s)}async function g(t){const e=`${t.name}.xlsx`,o=await async function(t){return f(S(t))}(t);E(o,e)}function E(t,e,o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"){var n;const i="senlinzImportExportDownload";null===(n=document.querySelector(`#${i}`))||void 0===n||n.remove();const s=document.createElement("a");s.id=i,s.download=e;const a=new Blob([t],{type:o});s.href=URL.createObjectURL(a),s.click()}function D(t){let e=new u;return t.rule&&(e=e.withRule(t.rule)),t.value&&(e=e.withValue(t.value)),t.color&&(e=e.withColor(t.color)),t.bold&&(e=e.withBold(t.bold)),t.italic&&(e=e.withItalic(t.italic)),t.underline&&(e=e.withUnderline(t.underline)),t.strikethrough&&(e=e.withStrikethrough(t.strikethrough)),t.fontSize&&(e=e.withFontSize(t.fontSize)),t.backgroundColor&&(e=e.withBackgroundColor(t.backgroundColor)),t.align&&(e=e.withAlign(t.align)),t.alignVertical&&(e=e.withAlignVertical(t.alignVertical)),t.borderColor&&(e=e.withBorderColor(t.borderColor)),t.dateFormat&&(e=e.withDateFormat(t.dateFormat)),e}function S(t){var e,o,n,i,s,a=t.columns.map((t=>{let e=new c(t.key,t.name);if(t.width&&(e=e.withWidth(t.width)),t.dataType&&(e=e.withDataType(t.dataType)),t.note&&(e=e.withNote(t.note)),t.allowedValues&&(e=e.withAllowedValues(t.allowedValues)),t.parent&&(e=e.withParent(t.parent)),t.format&&(e=e.withFormat(D(t.format))),t.valueFormat){let o=Array.isArray(t.valueFormat)?t.valueFormat:[t.valueFormat];e=e.withValueFormat(o.map(D))}return t.dataGroup&&(e=e.withDataGroup(t.dataGroup)),t.dataGroupParent&&(e=e.withDataGroupParent(t.dataGroupParent)),e})),d=new r(t.name,null!==(e=t.sheetName)&&void 0!==e?e:"sheet1",a,null!==(o=t.author)&&void 0!==o?o:"",function(t){if("string"==typeof t)return t;const e=t.getFullYear(),o=t.getMonth()+1,n=t.getDate(),i=t.getHours(),s=t.getMinutes(),a=t.getSeconds(),c=t=>t<10?`0${t}`:t.toString();return`${e}-${c(o)}-${c(n)} ${c(i)}:${c(s)}:${c(a)}`}(null!==(n=t.createTime)&&void 0!==n?n:new Date));let l=null!==(i=t.dx)&&void 0!==i?i:0,f=null!==(s=t.dy)&&void 0!==s?s:0;return d=d.withOffset(l,f),t.title&&(d=d.withTitle(t.title)),t.titleHeight&&(d=d.withTitleHeight(t.titleHeight)),t.titleFormat&&(d=d.withTitleFormat(D(t.titleFormat))),t.defaultRowHeight&&(d=d.withDefaultRowHeight(t.defaultRowHeight)),t.isHeaderFreeze&&(d=d.withIsHeaderFreeze(t.isHeaderFreeze)),t.progressCallback&&(d=d.withProgressCallback(t.progressCallback)),t.imageFetcher&&(d=d.withImageFetcher(t.imageFetcher)),d}const $={zh:{hideDefinition:"隐藏定义",showDefinition:"显示定义",downloadTemplate:"下载模板",exportExcel:"导出Excel",importExcel:"导入Excel",downloadDefinition:"下载定义",preview:"预览",dataSource:"数据源",hideDataSource:"隐藏数据源",showDataSource:"显示数据源"},en:{hideDefinition:"Hide Definition",showDefinition:"Show Definition",downloadTemplate:"Download Template",exportExcel:"Export Excel",importExcel:"Import Excel",downloadDefinition:"Download Definition",preview:"Preview",dataSource:"Data Source",hideDataSource:"Hide Data Source",showDataSource:"Show Data Source"}},I=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.toggleDefinitionVisibility=()=>{this.showDefinition=!this.showDefinition},this.toggleDataSourceVisibility=()=>{this.showDataSource=!this.showDataSource},this.importExcelHandler=async t=>{const e=await(o=t,new Promise(((t,e)=>{var n;let i=document.querySelector("#senlinzImportExportInput");i||(null===(n=document.querySelector("#senlinzImportExportInput"))||void 0===n||n.remove(),i=document.createElement("input"),i.id="senlinzImportExportInput",i.style.display="none",i.type="file",i.accept=".xlsx,.xls,.xlsm,.xlsb,.xla,.xlam,.ods",i.addEventListener("change",(function e(n){const s=n.target.files[0],a=new FileReader;a.onload=async()=>{const n=new Uint8Array(a.result),s=await w(o,n);i.removeEventListener("change",e),i.remove(),t(s)},a.readAsArrayBuffer(s)})),document.body.appendChild(i));const s=document.createElement("button");s.textContent="Import Excel",s.style.display="none",s.addEventListener("click",(()=>{i.click()})),document.body.appendChild(s),s.click(),s.removeEventListener("click",(()=>{i.click()})),document.body.removeChild(s)})));var o;this.data=e},this.handleDataSourceChange=t=>{const e=t.target;try{this.data=JSON.parse(e.value)}catch(t){console.log(t)}},this.definition=void 0,this.culture="en",this.data=[],this.showDefinition=!0,this.showDataSource=!1}componentWillLoad(){!function(){if(!y){const t=n(Uint8Array.from(atob(i),(t=>t.charCodeAt(0))));s({module:t}),y=!0}}()}render(){const t=$[this.culture];return o("div",{key:"9b80914f0440e8f10960ffd58c7e20bc27beb9ae",class:"import-export-studio"},o("div",{key:"5f61a5605d2ba737169f0e0549e8078b80f2e128",class:"operation"},o("button",{key:"4ec2f3ff61487e91a0f508c65c57b061b5316bf6",type:"text",class:"studio-button",onClick:this.toggleDefinitionVisibility},this.showDefinition?t.hideDefinition:t.showDefinition),o("button",{key:"31e3970572332e77a4ee111096c13509053a71a0",type:"text",class:"studio-button",onClick:()=>{return t=this.definition,void E(JSON.stringify(t,null,2),`${t.name}-definition.json`,"application/json");var t}},t.downloadDefinition),o("button",{key:"8b062e1c105b0a67f8fbf6a85b2ff6e4cbfa0825",type:"text",class:"studio-button",onClick:()=>g(this.definition)},t.downloadTemplate),o("button",{key:"6ee2da16c955c8f4b4298f6a1da6987e2a1eda8a",type:"text",class:"studio-button",onClick:()=>async function(t,e){E(await v(t,e),`${t.name}.xlsx`)}(this.definition,this.data)},t.exportExcel),o("button",{key:"ea7429bd2e8ed556c398c92a2264433b80d11d67",type:"text",class:"studio-button",onClick:()=>this.importExcelHandler(this.definition)},t.importExcel),o("button",{key:"9bbcb60005f3621b7b2212ebc7381206b8333743",type:"text",class:"studio-button",onClick:()=>this.toggleDataSourceVisibility()},this.showDataSource?t.hideDataSource:t.showDataSource)),o("div",{key:"8dc12abc11a572e4d57ba341eba5b82078790baf",class:"definition"},this.showDefinition&&o("import-export-definition",{key:"0e53a51e6fb268566d2a2982fec6df1d7c9fb548",definition:this.definition,culture:this.culture})),o("div",{key:"df601e00704f71e0dbb74cc74bafbaa59816be7e",class:"preview-table"},o("h3",{key:"469d94d10cc84788438fe5ee4ddfdf55b9e062f1"},t.preview),o("import-export-table",{key:"e0080482da9af16e16507f94f725f38c3bb460a0",definition:this.definition,data:this.data})),this.showDataSource&&o("div",{key:"40025966896deee2003402bef85c812071d302d9",class:"data-source"},o("h3",{key:"b69b787b893065dfd25b45e7e9a453c7823f7c8c"},t.dataSource),o("p",{key:"ac27bb80c702815decdf847c9b34adde399d1832"},JSON.stringify(this.data,null,2))))}static get style(){return".import-export-studio{font-family:Arial, sans-serif;padding:10px;background-color:#f9f9f9}.studio-button{background:linear-gradient(to right, #4caf50, #549757);color:white;border:none;padding:8px 16px;margin-right:8px;text-decoration:none;display:inline-block;font-size:16px;margin:0;cursor:pointer;border-radius:6px;transition:background-color 0.3s}.toggle-definition-button:hover{background:linear-gradient(to right, #45a049, #2d9231)}.operation{display:flex;gap:10px;align-items:center;margin-bottom:10px}.definition{margin-bottom:10px}.data-source textarea{width:100%;height:50%}"}},[1,"import-export-studio",{definition:[16],culture:[1],data:[16],showDefinition:[32],showDataSource:[32]}]);function j(){if("undefined"==typeof customElements)return;["import-export-studio","editable-cell","import-export-definition","import-export-table"].forEach((t=>{switch(t){case"import-export-studio":customElements.get(t)||customElements.define(t,I);break;case"editable-cell":customElements.get(t)||m();break;case"import-export-definition":customElements.get(t)||h();break;case"import-export-table":customElements.get(t)||x()}}))}j();const C=I,z=j;export{C as ImportExportStudio,z as defineCustomElement};
|
|
2
|
-
//# sourceMappingURL=import-export-studio.js.map
|
package/dist/components/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export{g as getAssetPath,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-ddbe189c.js";import{g as n,i as t,a as o,b as e,E as c,e as r,c as l,d as u,f as i,h as f,j as m,k as p}from"./p-89617fec.js";let x=!1;function d(){if(!x){const e=n(Uint8Array.from(atob(t),(n=>n.charCodeAt(0))));o({module:e}),x=!0}}async function w(n,t){const o=A(n),c=async function(n,t){const o=[],e={};for(const n of t)e[n.key]=n.dataType;for(const t of n.rows){const n={};for(const o of t.columns)"number"!=e[o.key]?n[o.key]=o.value:n[o.key]=parseFloat(o.value);o.push(n)}return o}(e(o,t),n.columns);return c}function E(n,t,o=""){const e=[];for(const c of n){let n=[];for(const e in c){let s=t[e],r=c[e];if(s&&void 0!==r)if(s.data_group){if(r.children&&r.children.length){let c=E(r.children,t,e);o?n.push(f.newGroup(e,r.value.toString(),c)):n.push(f.newRootGroup(e,c))}}else n.push(new f(e,r.toString()))}e.push(new m(n))}return e}async function v(n,t){const o=A(n);let e={};for(const n of o.columns)e[n.key]=n;const s=E(t,e),a=new c(s);return r(o,a)}async function y(n){return l(A(n))}async function $(n){const t=`${n.name}.xlsx`;h(await y(n),t)}function h(n,t,o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"){var e;const c="senlinzImportExportDownload";null===(e=document.querySelector(`#${c}`))||void 0===e||e.remove();const s=document.createElement("a");s.id=c,s.download=t;const r=new Blob([n],{type:o});s.href=URL.createObjectURL(r),s.click()}function I(n){let t=new p;return n.rule&&(t=t.withRule(n.rule)),n.value&&(t=t.withValue(n.value)),n.color&&(t=t.withColor(n.color)),n.bold&&(t=t.withBold(n.bold)),n.italic&&(t=t.withItalic(n.italic)),n.underline&&(t=t.withUnderline(n.underline)),n.strikethrough&&(t=t.withStrikethrough(n.strikethrough)),n.fontSize&&(t=t.withFontSize(n.fontSize)),n.backgroundColor&&(t=t.withBackgroundColor(n.backgroundColor)),n.align&&(t=t.withAlign(n.align)),n.alignVertical&&(t=t.withAlignVertical(n.alignVertical)),n.borderColor&&(t=t.withBorderColor(n.borderColor)),n.dateFormat&&(t=t.withDateFormat(n.dateFormat)),t}function A(n){var t,o,e,c,s,r=n.columns.map((n=>{let t=new u(n.key,n.name);if(n.width&&(t=t.withWidth(n.width)),n.dataType&&(t=t.withDataType(n.dataType)),n.note&&(t=t.withNote(n.note)),n.allowedValues&&(t=t.withAllowedValues(n.allowedValues)),n.parent&&(t=t.withParent(n.parent)),n.format&&(t=t.withFormat(I(n.format))),n.valueFormat){let o=Array.isArray(n.valueFormat)?n.valueFormat:[n.valueFormat];t=t.withValueFormat(o.map(I))}return n.dataGroup&&(t=t.withDataGroup(n.dataGroup)),n.dataGroupParent&&(t=t.withDataGroupParent(n.dataGroupParent)),t})),a=new i(n.name,null!==(t=n.sheetName)&&void 0!==t?t:"sheet1",r,null!==(o=n.author)&&void 0!==o?o:"",function(n){if("string"==typeof n)return n;const t=n.getFullYear(),o=n.getMonth()+1,e=n.getDate(),c=n.getHours(),s=n.getMinutes(),r=n.getSeconds(),a=n=>n<10?`0${n}`:n.toString();return`${t}-${a(o)}-${a(e)} ${a(c)}:${a(s)}:${a(r)}`}(null!==(e=n.createTime)&&void 0!==e?e:new Date));let l=null!==(c=n.dx)&&void 0!==c?c:0,f=null!==(s=n.dy)&&void 0!==s?s:0;return a=a.withOffset(l,f),n.title&&(a=a.withTitle(n.title)),n.titleHeight&&(a=a.withTitleHeight(n.titleHeight)),n.titleFormat&&(a=a.withTitleFormat(I(n.titleFormat))),n.defaultRowHeight&&(a=a.withDefaultRowHeight(n.defaultRowHeight)),n.isHeaderFreeze&&(a=a.withIsHeaderFreeze(n.isHeaderFreeze)),n.progressCallback&&(a=a.withProgressCallback(n.progressCallback)),n.imageFetcher&&(a=a.withImageFetcher(n.imageFetcher)),a}function z(n){return new Promise(((t,o)=>{var e;let c=document.querySelector("#senlinzImportExportInput");c||(null===(e=document.querySelector("#senlinzImportExportInput"))||void 0===e||e.remove(),c=document.createElement("input"),c.id="senlinzImportExportInput",c.style.display="none",c.type="file",c.accept=".xlsx,.xls,.xlsm,.xlsb,.xla,.xlam,.ods",c.addEventListener("change",(function o(e){const s=e.target.files[0],r=new FileReader;r.onload=async()=>{const e=new Uint8Array(r.result),s=await w(n,e);c.removeEventListener("change",o),c.remove(),t(s)},r.readAsArrayBuffer(s)})),document.body.appendChild(c));const s=document.createElement("button");s.textContent="Import Excel",s.style.display="none",s.addEventListener("click",(()=>{c.click()})),document.body.appendChild(s),s.click(),s.removeEventListener("click",(()=>{c.click()})),document.body.removeChild(s)}))}async function P(n,t){h(await v(n,t),`${n.name}.xlsx`)}function U(){return d(),{importExcel:z,exportExcel:P,downloadExcelTemplate:$,fromExcel:w,toExcel:v,generateExcelTemplate:y}}function j(n){return d(),z(n)}function k(n,t){return d(),P(n,t)}function T(n,t){return d(),w(n,t)}function D(n,t){return d(),v(n,t)}function F(n){return d(),$(n)}export{F as downloadExcelTemplate,k as exportExcel,T as fromExcel,U as getUtils,j as importExcel,D as toExcel};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|