From 6ac789f1bff2b4fe029eb67d014228b93f68fd4f Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Tue, 15 Aug 2023 19:29:01 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=E6=94=B9?= =?UTF-8?q?=E4=B8=BAn=20=20d=E4=B8=BA=E6=97=A5=E6=9C=9F=20n=E4=B8=BA?= =?UTF-8?q?=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ToLuckySheet/LuckyCell.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ToLuckySheet/LuckyCell.ts b/src/ToLuckySheet/LuckyCell.ts index 786b5c1..8cb0dbd 100644 --- a/src/ToLuckySheet/LuckyCell.ts +++ b/src/ToLuckySheet/LuckyCell.ts @@ -201,7 +201,7 @@ export class LuckySheetCelldata extends LuckySheetCelldataBase{ let cellFormat = new LuckySheetCellFormat(); cellFormat.fa = escapeCharacter(numf); // console.log(numf, numFmtId, this.v); - cellFormat.t = t || 'd'; + cellFormat.t = t || 'n'; cellValue.ct = cellFormat; } From b4ddd44ddc9d4431f63a253f062730653d86a35c Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Tue, 15 Aug 2023 19:50:45 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0luckysheet?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=B8=BAexcel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 264 +++++++++++++++++++++++++++++++++++- package.json | 3 +- src/ICommon.ts | 3 + src/common/constant.ts | 52 +++++++- src/common/method.ts | 25 +++- src/index.html | 274 +++++++++++++++++++++++--------------- src/main.ts | 79 ++++++----- src/toExcel/BorderInfo.ts | 132 ++++++++++++++++++ src/toExcel/ExcelFile.ts | 27 ++++ src/toExcel/Workcell.ts | 83 ++++++++++++ src/toExcel/Worksheet.ts | 101 ++++++++++++++ 11 files changed, 902 insertions(+), 141 deletions(-) create mode 100644 src/toExcel/BorderInfo.ts create mode 100644 src/toExcel/Workcell.ts diff --git a/package-lock.json b/package-lock.json index 20164eb..d3cbb11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "license": "MIT", "dependencies": { "dayjs": "^1.10.6", - "jszip": "^3.5.0" + "jszip": "^3.5.0", + "xlsx-js-style": "^1.2.0" }, "devDependencies": { "@babel/core": "^7.10.5", @@ -1443,6 +1444,21 @@ "node": ">=0.4.0" } }, + "node_modules/adler-32": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/adler-32/-/adler-32-1.2.0.tgz", + "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=", + "dependencies": { + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" + }, + "bin": { + "adler32": "bin/adler32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/after": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", @@ -2985,6 +3001,26 @@ "integrity": "sha512-pkpCg7dmI/a7WcqM2yfdOiT4Xx5tzyoHAXWsX5/HxZ3TemwDZs0QXdqbE0UPLPVy/7BeK7693YfzfRYfu1YVpg==", "dev": true }, + "node_modules/cfb": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "dependencies": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/cfb/node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://mirrors.tencent.com/npm/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -3125,6 +3161,26 @@ "node": ">=0.10.0" } }, + "node_modules/codepage": { + "version": "1.14.0", + "resolved": "https://mirrors.tencent.com/npm/codepage/-/codepage-1.14.0.tgz", + "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=", + "dependencies": { + "commander": "~2.14.1", + "exit-on-epipe": "~1.0.1" + }, + "bin": { + "codepage": "bin/codepage.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/codepage/node_modules/commander": { + "version": "2.14.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-2.14.1.tgz", + "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" + }, "node_modules/collection-map": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", @@ -3346,6 +3402,17 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -4104,6 +4171,14 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -4306,6 +4381,11 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", "dev": true }, + "node_modules/fflate": { + "version": "0.3.11", + "resolved": "https://mirrors.tencent.com/npm/fflate/-/fflate-0.3.11.tgz", + "integrity": "sha512-Rr5QlUeGN1mbOHlaqcSYMKVpPbgLy0AWT/W0EHxA6NGI12yO1jpoui2zBBvU2G824ltM6Ut8BFgfHSBGfkmS0A==" + }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -4474,6 +4554,14 @@ "node": ">=0.10.0" } }, + "node_modules/frac": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -7450,6 +7538,17 @@ "node": ">= 0.8" } }, + "node_modules/printj": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==", + "bin": { + "printj": "bin/printj.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -8719,6 +8818,17 @@ "node": ">=0.10.0" } }, + "node_modules/ssf": { + "version": "0.11.2", + "resolved": "https://mirrors.tencent.com/npm/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "dependencies": { + "frac": "~1.1.2" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -9867,6 +9977,22 @@ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", "dev": true }, + "node_modules/wmf": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word": { + "version": "0.3.0", + "resolved": "https://mirrors.tencent.com/npm/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -9895,6 +10021,34 @@ "async-limiter": "~1.0.0" } }, + "node_modules/xlsx-js-style": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/xlsx-js-style/-/xlsx-js-style-1.2.0.tgz", + "integrity": "sha512-DDT4FXFSWfT4DXMSok/m3TvmP1gvO3dn0Eu/c+eXHW5Kzmp7IczNkxg/iEPnImbG9X0Vb8QhROda5eatSR/97Q==", + "dependencies": { + "adler-32": "~1.2.0", + "cfb": "^1.1.4", + "codepage": "~1.14.0", + "commander": "~2.17.1", + "crc-32": "~1.2.0", + "exit-on-epipe": "~1.0.1", + "fflate": "^0.3.8", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + }, + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/xlsx-js-style/node_modules/commander": { + "version": "2.17.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" + }, "node_modules/xmlhttprequest-ssl": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", @@ -11120,6 +11274,15 @@ "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, + "adler-32": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/adler-32/-/adler-32-1.2.0.tgz", + "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=", + "requires": { + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" + } + }, "after": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", @@ -12384,6 +12547,22 @@ "integrity": "sha512-pkpCg7dmI/a7WcqM2yfdOiT4Xx5tzyoHAXWsX5/HxZ3TemwDZs0QXdqbE0UPLPVy/7BeK7693YfzfRYfu1YVpg==", "dev": true }, + "cfb": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "requires": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "dependencies": { + "adler-32": { + "version": "1.3.1", + "resolved": "https://mirrors.tencent.com/npm/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==" + } + } + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -12504,6 +12683,22 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "codepage": { + "version": "1.14.0", + "resolved": "https://mirrors.tencent.com/npm/codepage/-/codepage-1.14.0.tgz", + "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=", + "requires": { + "commander": "~2.14.1", + "exit-on-epipe": "~1.0.1" + }, + "dependencies": { + "commander": { + "version": "2.14.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-2.14.1.tgz", + "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" + } + } + }, "collection-map": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", @@ -12698,6 +12893,11 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -13379,6 +13579,11 @@ "safe-buffer": "^5.1.1" } }, + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==" + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -13550,6 +13755,11 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", "dev": true }, + "fflate": { + "version": "0.3.11", + "resolved": "https://mirrors.tencent.com/npm/fflate/-/fflate-0.3.11.tgz", + "integrity": "sha512-Rr5QlUeGN1mbOHlaqcSYMKVpPbgLy0AWT/W0EHxA6NGI12yO1jpoui2zBBvU2G824ltM6Ut8BFgfHSBGfkmS0A==" + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -13678,6 +13888,11 @@ "for-in": "^1.0.1" } }, + "frac": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==" + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -16126,6 +16341,11 @@ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, + "printj": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==" + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -17218,6 +17438,14 @@ "extend-shallow": "^3.0.0" } }, + "ssf": { + "version": "0.11.2", + "resolved": "https://mirrors.tencent.com/npm/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "requires": { + "frac": "~1.1.2" + } + }, "stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -18185,6 +18413,16 @@ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", "dev": true }, + "wmf": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==" + }, + "word": { + "version": "0.3.0", + "resolved": "https://mirrors.tencent.com/npm/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==" + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -18210,6 +18448,30 @@ "async-limiter": "~1.0.0" } }, + "xlsx-js-style": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/xlsx-js-style/-/xlsx-js-style-1.2.0.tgz", + "integrity": "sha512-DDT4FXFSWfT4DXMSok/m3TvmP1gvO3dn0Eu/c+eXHW5Kzmp7IczNkxg/iEPnImbG9X0Vb8QhROda5eatSR/97Q==", + "requires": { + "adler-32": "~1.2.0", + "cfb": "^1.1.4", + "codepage": "~1.14.0", + "commander": "~2.17.1", + "crc-32": "~1.2.0", + "exit-on-epipe": "~1.0.1", + "fflate": "^0.3.8", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" + } + } + }, "xmlhttprequest-ssl": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", diff --git a/package.json b/package.json index 23f337b..62c3235 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ }, "dependencies": { "dayjs": "^1.10.6", - "jszip": "^3.5.0" + "jszip": "^3.5.0", + "xlsx-js-style": "^1.2.0" } } diff --git a/src/ICommon.ts b/src/ICommon.ts index db2ff4b..4bd9073 100644 --- a/src/ICommon.ts +++ b/src/ICommon.ts @@ -8,6 +8,9 @@ export interface IuploadfileList { export interface stringToNum { [index:string] : number } +export interface stringToBoolean { + [index:string] : boolean +} export interface numTostring { [index:number] : string diff --git a/src/common/constant.ts b/src/common/constant.ts index 9687532..1071c43 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -1,4 +1,4 @@ -import {stringToNum, IattributeList, numTostring, IDataVerificationMap, IDataVerificationType2Map} from "../ICommon"; +import {stringToNum, IattributeList, numTostring, stringToBoolean, IDataVerificationMap, IDataVerificationType2Map} from "../ICommon"; export const columeHeader_word:string[] = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; @@ -176,6 +176,56 @@ export const borderTypes:stringToNum = { "thick":13 } +// 对齐文档 BORDER_STYLE https://github.com/gitbrent/xlsx-js-style#border_style-string-properties +export const excelBorderStyles: IattributeList = { + '1': 'thin', + '2': 'hair', + '3': 'dotted', + '4': 'dashed', + '5': 'dashDot', + '6': 'dashDotDot', + '8': 'medium', + '9': 'mediumDashed', + '10': 'mediumDashDot', + '11': 'mediumDashDotDot', + '12': 'slantDashDot', + '13': 'thick', +} + +export const excelBorderPositions: IattributeList = { + t: "top", + b: "bottom", + l: "left", + r: "right", +} + +export const verticalMap: IattributeList = { + '0': 'center', + '1': 'top', + '2': 'bottom', +} + +export const horizontalMap: IattributeList = { + '0': 'center', + '1': 'left', + '2': 'right', +} + +export const wrapTextMap: stringToBoolean = { + '0': false, + '1': false, + '2': true, +} + +export const textRotationMap: stringToNum = { + '0': 0, + '1': 45, + '2': 135, + '3': 255, + '4': 90, + '5': 180, +} + export let numFmtDefaultMap: IattributeList = { "yyyy/m/d;@": "yyyy/MM/dd", diff --git a/src/common/method.ts b/src/common/method.ts index 79d6035..ad931f9 100644 --- a/src/common/method.ts +++ b/src/common/method.ts @@ -236,7 +236,7 @@ export function LightenDarkenColor(sixColor:string, tint:number){ } -function rgbToHex(rgb:string){ +export function rgbToHex(rgb:string){ //十六进制颜色值的正则表达式 var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; // 如果是rgb颜色表示 @@ -1163,4 +1163,27 @@ export function getMultiFormulaValue(value: string): string[] { retArr.push(escapeCharacter(_value.replace(/"|^\"|\"$/g, ""))); } return retArr; +} + +/** + * 检查某一单元格是否在指定区域内 + * @param {Number} r 单元格所在行 + * @param {Number} c 单元格所在列 + * @param {Array} specifiedRange 指定区域 + */ +export function checkCellWithinSpecifiedRange(r: number, c: number, specifiedRange: {row: number[], column: number[]}[]) { + let within = false + if (!specifiedRange || specifiedRange.length === 0) { + return false + } + for(let item of specifiedRange){ + let r1 = item.row[0], r2 = item.row[1]; + let c1 = item.column[0], c2 = item.column[1]; + + if(r>=r1 && r<=r2 && c>=c1 && c<=c2){ + within = true; + break; + } + } + return within } \ No newline at end of file diff --git a/src/index.html b/src/index.html index 1e8eae2..e62a7c2 100644 --- a/src/index.html +++ b/src/index.html @@ -1,31 +1,62 @@ - - - Hello World! - - - - - - - - - - -

Or Load remote xlsx file: Download source xlsx file

-
- - - - + } + demoHandler(); + + + \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 33a8eab..f0bd063 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,11 @@ import { LuckyFile } from "./ToLuckySheet/LuckyFile"; +import { ExcelFile } from './toExcel/ExcelFile' // import {SecurityDoor,Car} from './content'; -import {HandleZip} from './HandleZip'; +import { HandleZip } from './HandleZip'; -import {IuploadfileList} from "./ICommon"; +import { IuploadfileList } from "./ICommon"; +import XLSX from 'xlsx-js-style'; import { fstat } from "fs"; // //demo @@ -13,9 +15,9 @@ import { fstat } from "fs"; // let downlodDemo = document.getElementById("Luckyexcel-downlod-file"); // let mask = document.getElementById("lucky-mask-demo"); // if(upload){ - + // window.onload = () => { - + // upload.addEventListener("change", function(evt){ // var files:FileList = (evt.target as any).files; // if(files==null || files.length==0){ @@ -30,14 +32,14 @@ import { fstat } from "fs"; // return; // } // LuckyExcel.transformExcelToLucky(files[0], function(exportJson:any, luckysheetfile:string){ - + // if(exportJson.sheets==null || exportJson.sheets.length==0){ // alert("Failed to read the content of the excel file, currently does not support xls files!"); // return; // } // console.log(exportJson, luckysheetfile); // window.luckysheet.destroy(); - + // window.luckysheet.create({ // container: 'luckysheet', //luckysheet is the container id // showinfobar:false, @@ -58,7 +60,7 @@ import { fstat } from "fs"; // } // mask.style.display = "flex"; // LuckyExcel.transformExcelToLuckyByUrl(value, name, function(exportJson:any, luckysheetfile:string){ - + // if(exportJson.sheets==null || exportJson.sheets.length==0){ // alert("Failed to read the content of the excel file, currently does not support xls files!"); // return; @@ -66,7 +68,7 @@ import { fstat } from "fs"; // console.log(exportJson, luckysheetfile); // mask.style.display = "none"; // window.luckysheet.destroy(); - + // window.luckysheet.create({ // container: 'luckysheet', //luckysheet is the container id // showinfobar:false, @@ -104,12 +106,12 @@ import { fstat } from "fs"; // demoHandler(); // api -export class LuckyExcel{ +export class LuckyExcel { static transformExcelToLucky(excelFile: File, callback?: (files: IuploadfileList, fs?: string) => void, errorHandler?: (err: Error) => void) { - let handleZip:HandleZip = new HandleZip(excelFile); - + let handleZip: HandleZip = new HandleZip(excelFile); + handleZip.unzipFile(function (files: IuploadfileList) { let luckyFile = new LuckyFile(files, excelFile.name); let luckysheetfile = luckyFile.Parse(); @@ -118,13 +120,13 @@ export class LuckyExcel{ callback(exportJson, luckysheetfile); } }, - function(err:Error){ - if (errorHandler) { - errorHandler(err); - } else { - console.error(err); - } - }); + function (err: Error) { + if (errorHandler) { + errorHandler(err); + } else { + console.error(err); + } + }); } static transformExcelToLuckyByUrl( @@ -132,26 +134,41 @@ export class LuckyExcel{ name: string, callBack?: (files: IuploadfileList, fs?: string) => void, errorHandler?: (err: Error) => void) { - let handleZip:HandleZip = new HandleZip(); - handleZip.unzipFileByUrl(url, function(files:IuploadfileList){ + let handleZip: HandleZip = new HandleZip(); + handleZip.unzipFileByUrl(url, function (files: IuploadfileList) { let luckyFile = new LuckyFile(files, name); let luckysheetfile = luckyFile.Parse(); let exportJson = JSON.parse(luckysheetfile); - if(callBack != undefined){ + if (callBack != undefined) { callBack(exportJson, luckysheetfile); } }, - function(err:Error){ - if (errorHandler) { - errorHandler(err); - } else { - console.error(err); - } - }); + function (err: Error) { + if (errorHandler) { + errorHandler(err); + } else { + console.error(err); + } + }); + } + + static readExcel( + data: any, + callBack?: (files: string) => void, + errorHandler?: (err: Error) => void) { + const workbook = XLSX.read(data, { bookDeps: true, cellStyles: true, raw: true, cellNF: true }); } static transformLuckyToExcel( - LuckyFile: any, - callBack?: (files: string) => void , - errorHandler?: (err: Error) => void){ } + luckysheetJson: any, + callBack?: (files: any) => void, + errorHandler?: (err: Error) => void) { + try { + const excelFile = new ExcelFile(luckysheetJson) + excelFile.export(); + callBack(excelFile) + } catch(e) { + errorHandler(e) + } + } } \ No newline at end of file diff --git a/src/toExcel/BorderInfo.ts b/src/toExcel/BorderInfo.ts new file mode 100644 index 0000000..f8ea003 --- /dev/null +++ b/src/toExcel/BorderInfo.ts @@ -0,0 +1,132 @@ +import XLSX from 'xlsx-js-style'; +import {excelBorderPositions, excelBorderStyles} from '../common/constant' +import {rgbToHex} from '../common/method' + +export class BorderInfoBase { + data: Record +} + +export class BorderInfo extends BorderInfoBase { + constructor(data: any){ + super() + this.data = {} + data?.forEach((item: any) => { + const {rangeType} = item; + // 旧版excel导入时生成的borderinfo + if (rangeType === 'cell') { + const {value} = item; + const cellKey = XLSX.utils.encode_cell({ c: value.col_index, r: value.row_index }); + this.data[cellKey] = {}; + ['t', 'b', 'l', 'r'].forEach((p) => { + const borderStyle = value[p] + if (borderStyle && excelBorderPositions[p]) { + this.data[cellKey][excelBorderPositions[p]] = { + style: excelBorderStyles[borderStyle.style] || 'thin', + color: {rgb: rgbToHex(borderStyle.color)?.replace('#', '') || '000000'} + } + } + }) + } + // 新版luckysheet操作生成的borderinfo + if (rangeType === 'range') { + const {color, style, range = [], borderType} = item + const borderStyle = { + style: excelBorderStyles[style] || 'thin', + color: {rgb: rgbToHex(color)?.replace('#', '') || '000000'} + } + + for(let rangeItem of range){ + const [rangeStartRow, rangeEndRow] = rangeItem.row + const [rangeStartCol, rangeEndCol] = rangeItem.column + + for(let row = rangeStartRow; row <= rangeEndRow; row++){ + for(let col = rangeStartCol; col <= rangeEndCol; col++){ + const cellKey = XLSX.utils.encode_cell({ c: col, r: row }); + this.data[cellKey] = {} + // 检查上下左右边的情况,按需添加边框 + if (borderType === 'border-none') { + this.data[cellKey] = null + } else if (borderType === 'border-all') { + this.data[cellKey].top = borderStyle; + this.data[cellKey].bottom = borderStyle; + this.data[cellKey].left = borderStyle; + this.data[cellKey].right = borderStyle; + } else { + const isOnTop = isOnTopBorder({row: row, column: col}, rangeItem.row, rangeItem.column) + const isOnBottom = isOnBottomBorder({row: row, column: col}, rangeItem.row, rangeItem.column) + const isOnRight = isOnRightBorder({row: row, column: col}, rangeItem.row, rangeItem.column) + const isOnLeft = isOnLeftBorder({row: row, column: col}, rangeItem.row, rangeItem.column) + + if (['border-top', 'border-outside'].includes(borderType) && isOnTop) { + this.data[cellKey].top = borderStyle; + } + if (['border-bottom', 'border-outside'].includes(borderType) && isOnBottom) { + this.data[cellKey].bottom = borderStyle; + } + if (['border-right', 'border-outside'].includes(borderType) && isOnRight) { + this.data[cellKey].right = borderStyle; + } + if (['border-left', 'border-outside'].includes(borderType) && isOnLeft) { + this.data[cellKey].left = borderStyle; + } + if (borderType === 'border-inside') { + !isOnTop && (this.data[cellKey].top = borderStyle) + !isOnBottom && (this.data[cellKey].bottom = borderStyle) + !isOnRight && (this.data[cellKey].right = borderStyle) + !isOnLeft && (this.data[cellKey].left = borderStyle) + } + if (borderType === 'border-horizontal') { + !isOnTop && (this.data[cellKey].top = borderStyle) + !isOnBottom && (this.data[cellKey].bottom = borderStyle) + } + if (borderType === 'border-vertical') { + !isOnRight && (this.data[cellKey].right = borderStyle) + !isOnLeft && (this.data[cellKey].left = borderStyle) + } + } + } + } + } + } + }) + } + + get(key: string){ + return this.data[key] + } +} + +type Cell = { + row: number; + column: number; +} + +type Range = [number, number] + +function isOnTopBorder(cell: Cell, rowRange: Range, columnRange: Range) { + const {row: cellRow, column: cellCol} = cell; + const [rangeStartRow, rangeEndRow] = rowRange + const [rangeStartCol, rangeEndCol] = columnRange + return cellRow === rangeStartRow +} + +function isOnBottomBorder(cell: Cell, rowRange: Range, columnRange: Range) { + const {row: cellRow, column: cellCol} = cell; + const [rangeStartRow, rangeEndRow] = rowRange + const [rangeStartCol, rangeEndCol] = columnRange + return cellRow === rangeEndRow +} + +function isOnRightBorder(cell: Cell, rowRange: Range, columnRange: Range) { + const {row: cellRow, column: cellCol} = cell; + const [rangeStartRow, rangeEndRow] = rowRange + const [rangeStartCol, rangeEndCol] = columnRange + return cellCol === rangeEndCol +} + +function isOnLeftBorder(cell: Cell, rowRange: Range, columnRange: Range) { + const {row: cellRow, column: cellCol} = cell; + const [rangeStartRow, rangeEndRow] = rowRange + const [rangeStartCol, rangeEndCol] = columnRange + return cellCol === rangeStartCol +} \ No newline at end of file diff --git a/src/toExcel/ExcelFile.ts b/src/toExcel/ExcelFile.ts index e69de29..e48862f 100644 --- a/src/toExcel/ExcelFile.ts +++ b/src/toExcel/ExcelFile.ts @@ -0,0 +1,27 @@ +import XLSX from 'xlsx-js-style'; +import { WorkSheet } from './Worksheet'; + +export class ExcelFileBase { + fileName: string + sheets: any[] +} +export class ExcelFile extends ExcelFileBase { + /** + * @param luckysheetJson luckysheet.toJson() 返回数据 + * @param fileName + */ + constructor(luckysheetJson: any, fileName?: string) { + super(); + const {title, data} = luckysheetJson + this.fileName = fileName || luckysheetJson.title + this.sheets = data?.map((item: any) => new WorkSheet(item)) + } + + export() { + const wb = XLSX.utils.book_new() + this.sheets?.forEach((sheet: WorkSheet) => { + XLSX.utils.book_append_sheet(wb, sheet.toData(), sheet.name) + }) + XLSX.writeFile(wb, `${this.fileName}.xlsx`) + } +} \ No newline at end of file diff --git a/src/toExcel/Workcell.ts b/src/toExcel/Workcell.ts new file mode 100644 index 0000000..a99226f --- /dev/null +++ b/src/toExcel/Workcell.ts @@ -0,0 +1,83 @@ +import XLSX from 'xlsx-js-style'; +import {verticalMap, horizontalMap, wrapTextMap, textRotationMap} from '../common/constant' +import {rgbToHex} from '../common/method' + +export class WorkCellBase { + key: string + data: any +} + +export class WorkCell extends WorkCellBase { + constructor(data: any) { + super() + const {r, c} = data + const {ct, v, m, f, vt, ht, tb, tr, bg, fc, bl, it, cl, un, fs, ff} = data.v || {} + + this.key = XLSX.utils.encode_cell({ c, r }) + this.data = {v: '', t: 's', s: {}} + + if (v !== undefined && ct !== undefined) { + this.data.v = v + this.data.t = ct.t + + // 数字 + if (ct?.t === 'n') { + this.data.t = 'n' + this.data.z = ct.fa + f && (this.data.f = f) + } + + // 日期 + if (ct?.t === 'd') { + // 如果类型规定为d 解析日期不对 + this.data.t = 'n' + this.data.z = 'm/d/yy' + this.data.s = {numFmt: 'm/d/yy'} + } + + // 字符串 + if (ct?.t === 'g') { + this.data.t = 's' + this.data.w = ct.fa + } + } + + // 对齐方式 换行 文字方向 + if ([vt, ht, tb, tr].some((item) => item !== undefined)) { + this.data.s.alignment = {} + vt !== undefined && (this.data.s.alignment.vertical = verticalMap[vt]) + ht !== undefined && (this.data.s.alignment.horizontal = horizontalMap[ht]) + tb !== undefined && (this.data.s.alignment.wrapText = wrapTextMap[tb]) + tr !== undefined && (this.data.s.alignment.textRotation = textRotationMap[tr]) + } + + // 背景色 + if (bg) { + this.data.s.fill = { + fgColor: {rgb: rgbToHex(bg)?.replace('#', '') || 'ffffff'} + } + } + + // 文本样式 + if ([fc, bl, it, cl, un, fs].some((item) => item !== undefined)) { + this.data.s.font = {} + fc !== undefined && (this.data.s.font.color = {rgb: rgbToHex(fc)?.replace('#', '') || '000000'}) + bl !== undefined && (this.data.s.font.bold = !!bl) + bl !== undefined && (this.data.s.font.italic = !!it) + cl !== undefined && (this.data.s.font.strike = !!cl) + un !== undefined && (this.data.s.font.underline = !!un) + fs !== undefined && (this.data.s.font.sz = fs) + // 字体种类可能缺失造成不匹配 暂时去掉 + // ff !== undefined && (this.data.s.font.name = ff) + } + } + + toData() { + const data = this.data + // const borderInfo = this.border.get(this.key) + // if (borderInfo && Object.keys(borderInfo).length !== 0) { + // data.s = {border: {...borderInfo}} + // } + return data + } +} \ No newline at end of file diff --git a/src/toExcel/Worksheet.ts b/src/toExcel/Worksheet.ts index e69de29..3fb34ed 100644 --- a/src/toExcel/Worksheet.ts +++ b/src/toExcel/Worksheet.ts @@ -0,0 +1,101 @@ +import XLSX from 'xlsx-js-style'; +import {WorkCell} from './Workcell' +import {BorderInfo} from './BorderInfo' +import {IluckySheetCelldata} from '../ToLuckySheet/ILuck' +interface IMergeCell { + e: { c: number; r: number }, + s: { c: number; r: number } +} +export class WorkSheetBase { + data: Record; + border: Record; + ref: string; + cols: any[]; + rows: any[]; + name: string; + merges: IMergeCell[]; +} +export class WorkSheet extends WorkSheetBase { + constructor(sheetData: any) { + super() + const { config, column, row, celldata, name, data } = sheetData + const { columnlen, rowlen, merge, borderInfo } = config || {} + this.data = {} + this.border = {} + this.name = name + + // 解析borderInfo + const border = new BorderInfo(borderInfo) + for (const [key, borderValue] of Object.entries(border.data)) { + this.data[key] = {} + this.border[key] = borderValue + } + + // 解析单元格内容 + // const rowLen = data.length + // const columnLen = data?.[0]?.length || 0 + // for(let row = 0; row <= rowLen; row++){ + // for(let col = 0; col <= columnLen; col++){ + // const cellValue = data[row][col] || {r: row, c: col} + // const cell = new WorkCell(cellValue, border) + // this.data[cell.key] = cell.toData() + // } + // } + celldata?.forEach((data: IluckySheetCelldata) => { + const cell = new WorkCell(data) + if (this.border[cell.key]) { + this.data[cell.key] = { + ...(cell.toData() || {}), + s: { + ...(cell.toData()?.s || {}), + border: this.border[cell.key] || {} + } + } + } else { + this.data[cell.key] = cell.toData() + } + }) + + // 规定数据范围 + const endCellRange = XLSX.utils.encode_cell({ c: column - 1, r: row - 1 }) + this.ref = `A1:${endCellRange}` + + // 规定行列宽高 + this.cols = []; + if (columnlen) { + Object.keys(columnlen).forEach((index) => { + this.cols[Number(index)] = { wpx: Math.round(parseFloat(columnlen[index]) * 0.75) } + }) + } + this.rows = []; + if (rowlen) { + Object.keys(rowlen).forEach((index) => { + this.rows[Number(index)] = { hpx: Math.round(parseFloat(rowlen[index]) * 0.75) } + }) + } + + // 合并单元格范围 + this.merges = [] + if (merge) { + Object.keys(merge).forEach((key) => { + // rs cs 为所占行数 + const {r, c, rs, cs} = merge[key] + // s为合并单元格开始行列 e为结束 + const mergeValue = { + s: { r, c }, + e: { r: r + ( rs - 1), c: c + ( cs - 1) } + } + this.merges.push(mergeValue) + }) + } + } + + toData() { + const result = Object.assign({}, this.data) + result['!ref'] = this.ref + result['!cols'] = this.cols + result['!rows'] = this.rows + result['!merges'] = this.merges + return result + } +} \ No newline at end of file From 6339b2a783b218abaad6585fcefd4fccada2f4e5 Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Wed, 16 Aug 2023 14:24:28 +0800 Subject: [PATCH 03/10] =?UTF-8?q?fix:=20=E5=9B=9E=E8=B0=83=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index f0bd063..0e4abfa 100644 --- a/src/main.ts +++ b/src/main.ts @@ -166,9 +166,9 @@ export class LuckyExcel { try { const excelFile = new ExcelFile(luckysheetJson) excelFile.export(); - callBack(excelFile) + callBack?.(excelFile) } catch(e) { - errorHandler(e) + errorHandler?.(e) } } } \ No newline at end of file From 7993adc11cad35db7baa366ea58d2f4b0568f6f4 Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Fri, 27 Oct 2023 16:42:39 +0800 Subject: [PATCH 04/10] =?UTF-8?q?feat:=20=E5=AF=BC=E5=85=A5excel=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=BC=A9=E8=BF=9B=E5=B1=9E=E6=80=A7=20ti=EF=BC=88text?= =?UTF-8?q?=20indent=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ToLuckySheet/LuckyBase.ts | 1 + src/ToLuckySheet/LuckyCell.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ToLuckySheet/LuckyBase.ts b/src/ToLuckySheet/LuckyBase.ts index 3770e54..39a2307 100644 --- a/src/ToLuckySheet/LuckyBase.ts +++ b/src/ToLuckySheet/LuckyBase.ts @@ -79,6 +79,7 @@ export class LuckySheetCelldataValue implements IluckySheetCelldataValue{ f: string | undefined //formula, f rt:number | undefined //text rotation angle 0-180 alignment qp:number | undefined //quotePrefix, show number as string + ti:number | undefined //text indent } diff --git a/src/ToLuckySheet/LuckyCell.ts b/src/ToLuckySheet/LuckyCell.ts index 8cb0dbd..f2edfc9 100644 --- a/src/ToLuckySheet/LuckyCell.ts +++ b/src/ToLuckySheet/LuckyCell.ts @@ -416,7 +416,10 @@ export class LuckySheetCelldata extends LuckySheetCelldataBase{ } if(indent!=undefined){//luckysheet unsupport - + const result = parseInt(indent) + if (!isNaN(result)) { + cellValue.ti = result + } } if(borderId!=undefined){ From d128a93bcb1a940fcb6423987712cf63085472b4 Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Fri, 27 Oct 2023 17:21:58 +0800 Subject: [PATCH 05/10] =?UTF-8?q?fix:=20inline=20string=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=AF=BC=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/toExcel/Workcell.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/toExcel/Workcell.ts b/src/toExcel/Workcell.ts index a99226f..7ca92fd 100644 --- a/src/toExcel/Workcell.ts +++ b/src/toExcel/Workcell.ts @@ -16,9 +16,15 @@ export class WorkCell extends WorkCellBase { this.key = XLSX.utils.encode_cell({ c, r }) this.data = {v: '', t: 's', s: {}} - if (v !== undefined && ct !== undefined) { - this.data.v = v - this.data.t = ct.t + if (ct !== undefined) { + if (v !== undefined) { + this.data.v = v + this.data.t = ct.t + } else if (Array.isArray(ct.s)) { + // inline string格式的简易处理 + this.data.t = 's' + this.data.v = ct?.s?.reduce((prev: any, cur: { v: any; }) => prev + cur.v, ''); + } // 数字 if (ct?.t === 'n') { From 9aca7f6d174a90bbabac5baf937724b8de4c9137 Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Thu, 2 Nov 2023 17:36:03 +0800 Subject: [PATCH 06/10] =?UTF-8?q?fix:=20error=E6=A0=BC=E5=BC=8F=E6=97=B6?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=85=AC=E5=BC=8F=E4=B8=BAundefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/constant.ts | 14 +++++++++++++- src/toExcel/Workcell.ts | 17 ++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/common/constant.ts b/src/common/constant.ts index 1071c43..5c975bb 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -15,7 +15,19 @@ export const worksheetFilePath = "xl/worksheets/"; export const theme1File = "xl/theme/theme1.xml"; export const workbookRels= "xl/_rels/workbook.xml.rels"; - +export const ErrorValueMap: stringToNum = { + '#NULL!': 0x00, + '#DIV/0!': 0x07, + '#VALUE!': 0x0F, + '#REF!': 0x17, + '#NAME?': 0x1D, + '#NUM!': 0x24, + '#N/A': 0x2A, + '#GETTING_DATA': 0x2B, + '#SPILL!': 0x0F, + '#CONNECT!': 0x0F, + '#BLOCKED!': 0x0F +} //Excel Built-In cell type diff --git a/src/toExcel/Workcell.ts b/src/toExcel/Workcell.ts index 7ca92fd..bbab9e2 100644 --- a/src/toExcel/Workcell.ts +++ b/src/toExcel/Workcell.ts @@ -1,5 +1,5 @@ import XLSX from 'xlsx-js-style'; -import {verticalMap, horizontalMap, wrapTextMap, textRotationMap} from '../common/constant' +import {verticalMap, horizontalMap, wrapTextMap, textRotationMap, ErrorValueMap} from '../common/constant' import {rgbToHex} from '../common/method' export class WorkCellBase { @@ -18,7 +18,13 @@ export class WorkCell extends WorkCellBase { if (ct !== undefined) { if (v !== undefined) { - this.data.v = v + // 错误时 值有特定mapping + if (ErrorValueMap[v] !== undefined) { + this.data.v = ErrorValueMap[v] + } else { + this.data.v = v + } + this.data.t = ct.t } else if (Array.isArray(ct.s)) { // inline string格式的简易处理 @@ -26,9 +32,9 @@ export class WorkCell extends WorkCellBase { this.data.v = ct?.s?.reduce((prev: any, cur: { v: any; }) => prev + cur.v, ''); } - // 数字 - if (ct?.t === 'n') { - this.data.t = 'n' + // 数字 & 错误 + if (ct?.t === 'n' && ct?.t === 'e') { + this.data.t = ct.t this.data.z = ct.fa f && (this.data.f = f) } @@ -46,6 +52,7 @@ export class WorkCell extends WorkCellBase { this.data.t = 's' this.data.w = ct.fa } + } // 对齐方式 换行 文字方向 From 42bb0345ca7768d2ae263eb48047f82b58fb1d5c Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Thu, 2 Nov 2023 17:36:55 +0800 Subject: [PATCH 07/10] =?UTF-8?q?feat:=20=E5=BC=80=E5=90=AFsourcemap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index de61755..99dfc27 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -121,7 +121,7 @@ async function compile() { // commonjs(), // converts date-fns to ES modules typescript({ tsconfigOverride: { - compilerOptions : { module: "ESNext" } + compilerOptions : { module: "ESNext", "sourceMap": true } } }), // terser(), // minify, but only in production @@ -134,14 +134,14 @@ async function compile() { format: 'esm', name: 'LuckyExcel', inlineDynamicImports:true, - // sourcemap: true + sourcemap: true }) bundle.write({ file: pkg.main, format: 'cjs', name: 'LuckyExcel', inlineDynamicImports:true, - // sourcemap: true + sourcemap: true }) // bundle.write({ // file: pkg.browser, @@ -169,7 +169,7 @@ function bundleUMD() { .bundle() .pipe(source('luckyexcel.umd.js')) .pipe(buffer()) - // .pipe(sourcemaps.init({loadMaps: true})) //The production environment does not need source map file + .pipe(sourcemaps.init({loadMaps: true})) //The production environment does not need source map file // .pipe(uglify()) .pipe(sourcemaps.write('./')) .pipe(dest("dist")); From 42ba6872e9327c74e56d229c1b928012cdadf82b Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Thu, 9 Nov 2023 16:34:16 +0800 Subject: [PATCH 08/10] =?UTF-8?q?fix:=20ct=E4=B8=BAnull=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/toExcel/Workcell.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/toExcel/Workcell.ts b/src/toExcel/Workcell.ts index bbab9e2..898bc9a 100644 --- a/src/toExcel/Workcell.ts +++ b/src/toExcel/Workcell.ts @@ -16,8 +16,8 @@ export class WorkCell extends WorkCellBase { this.key = XLSX.utils.encode_cell({ c, r }) this.data = {v: '', t: 's', s: {}} - if (ct !== undefined) { - if (v !== undefined) { + if (ct) { + if (v) { // 错误时 值有特定mapping if (ErrorValueMap[v] !== undefined) { this.data.v = ErrorValueMap[v] @@ -26,7 +26,7 @@ export class WorkCell extends WorkCellBase { } this.data.t = ct.t - } else if (Array.isArray(ct.s)) { + } else if (Array.isArray(ct?.s)) { // inline string格式的简易处理 this.data.t = 's' this.data.v = ct?.s?.reduce((prev: any, cur: { v: any; }) => prev + cur.v, ''); From 0764a035cae92844b7246c25b9b64e1f77a49d4f Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Thu, 23 Nov 2023 15:10:38 +0800 Subject: [PATCH 09/10] =?UTF-8?q?feat:=20exceljs=20=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1222 ++++++++++++++++++++++++++++++++--- package.json | 1 + src/ToLuckySheet/ILuck.ts | 2 + src/common/constant.ts | 2 + src/common/method.ts | 55 +- src/index.html | 12 +- src/main.ts | 14 + src/toExceljs/BorderInfo.ts | 133 ++++ src/toExceljs/ExcelFile.ts | 36 ++ src/toExceljs/Workcell.ts | 141 ++++ src/toExceljs/Worksheet.ts | 89 +++ src/toExceljs/constant.ts | 88 +++ 12 files changed, 1686 insertions(+), 109 deletions(-) create mode 100644 src/toExceljs/BorderInfo.ts create mode 100644 src/toExceljs/ExcelFile.ts create mode 100644 src/toExceljs/Workcell.ts create mode 100644 src/toExceljs/Worksheet.ts create mode 100644 src/toExceljs/constant.ts diff --git a/package-lock.json b/package-lock.json index d3cbb11..a28af81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "MIT", "dependencies": { "dayjs": "^1.10.6", + "exceljs": "^4.4.0", "jszip": "^3.5.0", "xlsx-js-style": "^1.2.0" }, @@ -1296,6 +1297,33 @@ "to-fast-properties": "^2.0.0" } }, + "node_modules/@fast-csv/format": { + "version": "4.3.5", + "resolved": "https://mirrors.tencent.com/npm/@fast-csv/format/-/format-4.3.5.tgz", + "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", + "dependencies": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.isboolean": "^3.0.3", + "lodash.isequal": "^4.5.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0" + } + }, + "node_modules/@fast-csv/parse": { + "version": "4.3.6", + "resolved": "https://mirrors.tencent.com/npm/@fast-csv/parse/-/parse-4.3.6.tgz", + "integrity": "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==", + "dependencies": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.groupby": "^4.6.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0", + "lodash.isundefined": "^3.0.1", + "lodash.uniq": "^4.5.0" + } + }, "node_modules/@gulp-sourcemaps/identity-map": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz", @@ -1396,8 +1424,7 @@ "node_modules/@types/node": { "version": "14.14.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.2.tgz", - "integrity": "sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg==", - "dev": true + "integrity": "sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg==" }, "node_modules/accepts": { "version": "1.3.7", @@ -1544,6 +1571,69 @@ "node": ">=0.10.0" } }, + "node_modules/archiver": { + "version": "5.3.2", + "resolved": "https://mirrors.tencent.com/npm/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", + "dependencies": { + "archiver-utils": "^2.1.0", + "async": "^3.2.4", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/archiver-utils": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dependencies": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/archiver-utils/node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/archiver/node_modules/async": { + "version": "3.2.5", + "resolved": "https://mirrors.tencent.com/npm/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "node_modules/archiver/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -1935,8 +2025,7 @@ "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "node_modules/base": { "version": "0.11.2", @@ -2019,7 +2108,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -2071,6 +2159,26 @@ "node": "*" } }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://mirrors.tencent.com/npm/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/binary": { + "version": "0.3.0", + "resolved": "https://mirrors.tencent.com/npm/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "dependencies": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + }, + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", @@ -2106,6 +2214,11 @@ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", "dev": true }, + "node_modules/bluebird": { + "version": "3.4.7", + "resolved": "https://mirrors.tencent.com/npm/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" + }, "node_modules/bn.js": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", @@ -2116,7 +2229,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2915,6 +3027,14 @@ "isarray": "^1.0.0" } }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://mirrors.tencent.com/npm/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "engines": { + "node": "*" + } + }, "node_modules/buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", @@ -2930,12 +3050,28 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "node_modules/buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, + "node_modules/buffers": { + "version": "0.1.1", + "resolved": "https://mirrors.tencent.com/npm/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", + "engines": { + "node": ">=0.2.0" + } + }, "node_modules/builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -3021,6 +3157,17 @@ "node": ">=0.8" } }, + "node_modules/chainsaw": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "dependencies": { + "traverse": ">=0.3.0 <0.4" + }, + "engines": { + "node": "*" + } + }, "node_modules/chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -3280,11 +3427,45 @@ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", "dev": true }, + "node_modules/compress-commons": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", + "dependencies": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/compress-commons/node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/compress-commons/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "node_modules/concat-stream": { "version": "1.6.2", @@ -3413,6 +3594,31 @@ "node": ">=0.8" } }, + "node_modules/crc32-stream": { + "version": "4.0.3", + "resolved": "https://mirrors.tencent.com/npm/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/crc32-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -3832,7 +4038,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, "dependencies": { "readable-stream": "^2.0.2" } @@ -3935,7 +4140,6 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, "dependencies": { "once": "^1.4.0" } @@ -4171,6 +4375,38 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/exceljs": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/exceljs/-/exceljs-4.4.0.tgz", + "integrity": "sha512-XctvKaEMaj1Ii9oDOqbW/6e1gXknSY4g/aLCDicOXqBE4M0nRWkUu0PTp++UPNzoFY12BNHMfs/VadKIS6llvg==", + "dependencies": { + "archiver": "^5.0.0", + "dayjs": "^1.8.34", + "fast-csv": "^4.3.1", + "jszip": "^3.10.1", + "readable-stream": "^3.6.0", + "saxes": "^5.0.1", + "tmp": "^0.2.0", + "unzipper": "^0.10.11", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/exceljs/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/exit-on-epipe": { "version": "1.0.1", "resolved": "https://mirrors.tencent.com/npm/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", @@ -4375,6 +4611,18 @@ "node": ">= 0.10" } }, + "node_modules/fast-csv": { + "version": "4.3.6", + "resolved": "https://mirrors.tencent.com/npm/fast-csv/-/fast-csv-4.3.6.tgz", + "integrity": "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==", + "dependencies": { + "@fast-csv/format": "4.3.5", + "@fast-csv/parse": "4.3.6" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/fast-safe-stringify": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", @@ -4583,6 +4831,11 @@ "node": ">= 0.6" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "node_modules/fs-extra": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", @@ -4610,8 +4863,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "node_modules/fsevents": { "version": "1.2.13", @@ -4632,6 +4884,20 @@ "node": ">= 4.0" } }, + "node_modules/fstream": { + "version": "1.0.12", + "resolved": "https://mirrors.tencent.com/npm/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dependencies": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "engines": { + "node": ">=0.6" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -4669,15 +4935,14 @@ } }, "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, + "version": "7.2.3", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -4802,8 +5067,7 @@ "node_modules/graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", - "dev": true + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, "node_modules/gulp": { "version": "4.0.2", @@ -5357,7 +5621,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -5397,7 +5660,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -5872,14 +6134,14 @@ } }, "node_modules/jszip": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", - "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", + "version": "3.10.1", + "resolved": "https://mirrors.tencent.com/npm/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", "readable-stream": "~2.3.6", - "set-immediate-shim": "~1.0.1" + "setimmediate": "^1.0.5" } }, "node_modules/just-debounce": { @@ -5924,7 +6186,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, "dependencies": { "readable-stream": "^2.0.5" }, @@ -6010,6 +6271,11 @@ "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==", "dev": true }, + "node_modules/listenercount": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" + }, "node_modules/load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -6299,6 +6565,16 @@ "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", "dev": true }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "node_modules/lodash.difference": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" + }, "node_modules/lodash.escape": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", @@ -6308,6 +6584,21 @@ "lodash._root": "^3.0.0" } }, + "node_modules/lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "node_modules/lodash.groupby": { + "version": "4.6.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.groupby/-/lodash.groupby-4.6.0.tgz", + "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=" + }, "node_modules/lodash.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", @@ -6320,12 +6611,42 @@ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", "dev": true }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "node_modules/lodash.isfinite": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", "dev": true }, + "node_modules/lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://mirrors.tencent.com/npm/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==" + }, + "node_modules/lodash.isnil": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.isnil/-/lodash.isnil-4.0.0.tgz", + "integrity": "sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw=" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://mirrors.tencent.com/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "node_modules/lodash.isundefined": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", + "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=" + }, "node_modules/lodash.keys": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", @@ -6376,6 +6697,16 @@ "lodash.escape": "^3.0.0" } }, + "node_modules/lodash.union": { + "version": "4.6.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -6641,10 +6972,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6653,10 +6983,12 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/mitt": { "version": "1.2.0", @@ -6689,6 +7021,17 @@ "node": ">=0.10.0" } }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://mirrors.tencent.com/npm/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", @@ -7089,7 +7432,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "dependencies": { "wrappy": "1" } @@ -7320,7 +7662,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -7731,6 +8072,33 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -8012,7 +8380,6 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -8144,6 +8511,17 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -8306,14 +8684,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "node_modules/set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -8341,6 +8711,11 @@ "node": ">=0.10.0" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, "node_modules/setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", @@ -9053,6 +9428,67 @@ "acorn-node": "^1.2.0" } }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/tar-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://mirrors.tencent.com/npm/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/tfunk": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-3.1.0.tgz", @@ -9120,6 +9556,31 @@ "next-tick": "1" } }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/tmp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/to-absolute-glob": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", @@ -9233,6 +9694,14 @@ "node": ">=0.6" } }, + "node_modules/traverse": { + "version": "0.3.9", + "resolved": "https://mirrors.tencent.com/npm/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", + "engines": { + "node": "*" + } + }, "node_modules/tsconfig": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", @@ -9539,6 +10008,23 @@ "node": ">=0.10.0" } }, + "node_modules/unzipper": { + "version": "0.10.14", + "resolved": "https://mirrors.tencent.com/npm/unzipper/-/unzipper-0.10.14.tgz", + "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", + "dependencies": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + } + }, "node_modules/upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", @@ -9610,6 +10096,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://mirrors.tencent.com/npm/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8flags": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", @@ -10009,8 +10503,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/ws": { "version": "6.1.4", @@ -10049,6 +10542,11 @@ "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-2.17.1.tgz", "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + }, "node_modules/xmlhttprequest-ssl": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", @@ -10094,21 +10592,75 @@ "yargs-parser": "5.0.0-security.0" } }, - "node_modules/yargs-parser": { - "version": "5.0.0-security.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz", - "integrity": "sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ==", - "dev": true, - "dependencies": { - "camelcase": "^3.0.0", - "object.assign": "^4.1.0" + "node_modules/yargs-parser": { + "version": "5.0.0-security.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz", + "integrity": "sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ==", + "dev": true, + "dependencies": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + }, + "node_modules/yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + }, + "node_modules/zip-stream": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", + "dependencies": { + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/node_modules/archiver-utils": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "dependencies": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true + "node_modules/zip-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } } }, "dependencies": { @@ -11165,6 +11717,33 @@ "to-fast-properties": "^2.0.0" } }, + "@fast-csv/format": { + "version": "4.3.5", + "resolved": "https://mirrors.tencent.com/npm/@fast-csv/format/-/format-4.3.5.tgz", + "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", + "requires": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.isboolean": "^3.0.3", + "lodash.isequal": "^4.5.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0" + } + }, + "@fast-csv/parse": { + "version": "4.3.6", + "resolved": "https://mirrors.tencent.com/npm/@fast-csv/parse/-/parse-4.3.6.tgz", + "integrity": "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==", + "requires": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.groupby": "^4.6.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0", + "lodash.isundefined": "^3.0.1", + "lodash.uniq": "^4.5.0" + } + }, "@gulp-sourcemaps/identity-map": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz", @@ -11238,8 +11817,7 @@ "@types/node": { "version": "14.14.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.2.tgz", - "integrity": "sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg==", - "dev": true + "integrity": "sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg==" }, "accepts": { "version": "1.3.7", @@ -11350,6 +11928,61 @@ "buffer-equal": "^1.0.0" } }, + "archiver": { + "version": "5.3.2", + "resolved": "https://mirrors.tencent.com/npm/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", + "requires": { + "archiver-utils": "^2.1.0", + "async": "^3.2.4", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "dependencies": { + "async": { + "version": "3.2.5", + "resolved": "https://mirrors.tencent.com/npm/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "archiver-utils": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "requires": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + } + } + }, "archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -11669,8 +12302,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -11736,8 +12368,7 @@ "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "base64id": { "version": "1.0.0", @@ -11766,6 +12397,20 @@ "callsite": "1.0.0" } }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://mirrors.tencent.com/npm/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==" + }, + "binary": { + "version": "0.3.0", + "resolved": "https://mirrors.tencent.com/npm/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "requires": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + } + }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", @@ -11798,6 +12443,11 @@ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", "dev": true }, + "bluebird": { + "version": "3.4.7", + "resolved": "https://mirrors.tencent.com/npm/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" + }, "bn.js": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", @@ -11808,7 +12458,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -12476,6 +13125,11 @@ "isarray": "^1.0.0" } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://mirrors.tencent.com/npm/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, "buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", @@ -12488,12 +13142,22 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==" + }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, + "buffers": { + "version": "0.1.1", + "resolved": "https://mirrors.tencent.com/npm/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" + }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -12563,6 +13227,14 @@ } } }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "requires": { + "traverse": ">=0.3.0 <0.4" + } + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -12791,11 +13463,38 @@ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", "dev": true }, + "compress-commons": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", + "requires": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", @@ -12898,6 +13597,27 @@ "resolved": "https://mirrors.tencent.com/npm/crc-32/-/crc-32-1.2.2.tgz", "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" }, + "crc32-stream": { + "version": "4.0.3", + "resolved": "https://mirrors.tencent.com/npm/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", + "requires": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -13259,7 +13979,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, "requires": { "readable-stream": "^2.0.2" } @@ -13355,7 +14074,6 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, "requires": { "once": "^1.4.0" } @@ -13579,6 +14297,34 @@ "safe-buffer": "^5.1.1" } }, + "exceljs": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/exceljs/-/exceljs-4.4.0.tgz", + "integrity": "sha512-XctvKaEMaj1Ii9oDOqbW/6e1gXknSY4g/aLCDicOXqBE4M0nRWkUu0PTp++UPNzoFY12BNHMfs/VadKIS6llvg==", + "requires": { + "archiver": "^5.0.0", + "dayjs": "^1.8.34", + "fast-csv": "^4.3.1", + "jszip": "^3.10.1", + "readable-stream": "^3.6.0", + "saxes": "^5.0.1", + "tmp": "^0.2.0", + "unzipper": "^0.10.11", + "uuid": "^8.3.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "exit-on-epipe": { "version": "1.0.1", "resolved": "https://mirrors.tencent.com/npm/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", @@ -13749,6 +14495,15 @@ "time-stamp": "^1.0.0" } }, + "fast-csv": { + "version": "4.3.6", + "resolved": "https://mirrors.tencent.com/npm/fast-csv/-/fast-csv-4.3.6.tgz", + "integrity": "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==", + "requires": { + "@fast-csv/format": "4.3.5", + "@fast-csv/parse": "4.3.6" + } + }, "fast-safe-stringify": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", @@ -13908,6 +14663,11 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", "dev": true }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs-extra": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", @@ -13932,8 +14692,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "1.2.13", @@ -13946,6 +14705,17 @@ "nan": "^2.12.1" } }, + "fstream": { + "version": "1.0.12", + "resolved": "https://mirrors.tencent.com/npm/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -13977,15 +14747,14 @@ "dev": true }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, + "version": "7.2.3", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -14085,8 +14854,7 @@ "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", - "dev": true + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, "gulp": { "version": "4.0.2", @@ -14533,8 +15301,7 @@ "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "immediate": { "version": "3.0.6", @@ -14557,7 +15324,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -14943,14 +15709,14 @@ } }, "jszip": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", - "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", + "version": "3.10.1", + "resolved": "https://mirrors.tencent.com/npm/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", "requires": { "lie": "~3.3.0", "pako": "~1.0.2", "readable-stream": "~2.3.6", - "set-immediate-shim": "~1.0.1" + "setimmediate": "^1.0.5" } }, "just-debounce": { @@ -14989,7 +15755,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, "requires": { "readable-stream": "^2.0.5" } @@ -15057,6 +15822,11 @@ "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==", "dev": true }, + "listenercount": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -15307,6 +16077,16 @@ "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", "dev": true }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" + }, "lodash.escape": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", @@ -15316,6 +16096,21 @@ "lodash._root": "^3.0.0" } }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.groupby": { + "version": "4.6.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.groupby/-/lodash.groupby-4.6.0.tgz", + "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=" + }, "lodash.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", @@ -15328,12 +16123,42 @@ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", "dev": true }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "lodash.isfinite": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", "dev": true }, + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://mirrors.tencent.com/npm/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==" + }, + "lodash.isnil": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.isnil/-/lodash.isnil-4.0.0.tgz", + "integrity": "sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://mirrors.tencent.com/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isundefined": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", + "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=" + }, "lodash.keys": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", @@ -15384,6 +16209,16 @@ "lodash.escape": "^3.0.0" } }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -15607,19 +16442,17 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" }, "mitt": { "version": "1.2.0", @@ -15648,6 +16481,14 @@ } } }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://mirrors.tencent.com/npm/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, "mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", @@ -15990,7 +16831,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } @@ -16181,8 +17021,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-parse": { "version": "1.0.6", @@ -16505,6 +17344,32 @@ "util-deprecate": "~1.0.1" } }, + "readdir-glob": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "requires": { + "minimatch": "^5.1.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -16730,7 +17595,6 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -16839,6 +17703,14 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "saxes": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "requires": { + "xmlchars": "^2.2.0" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -16978,11 +17850,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" - }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -17006,6 +17873,11 @@ } } }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", @@ -17633,6 +18505,49 @@ "acorn-node": "^1.2.0" } }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "bl": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://mirrors.tencent.com/npm/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "tfunk": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-3.1.0.tgz", @@ -17694,6 +18609,24 @@ "next-tick": "1" } }, + "tmp": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "requires": { + "rimraf": "^3.0.0" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + } + } + }, "to-absolute-glob": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", @@ -17787,6 +18720,11 @@ "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "dev": true }, + "traverse": { + "version": "0.3.9", + "resolved": "https://mirrors.tencent.com/npm/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" + }, "tsconfig": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", @@ -18027,6 +18965,23 @@ } } }, + "unzipper": { + "version": "0.10.14", + "resolved": "https://mirrors.tencent.com/npm/unzipper/-/unzipper-0.10.14.tgz", + "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", + "requires": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + } + }, "upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", @@ -18091,6 +19046,11 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "dev": true }, + "uuid": { + "version": "8.3.2", + "resolved": "https://mirrors.tencent.com/npm/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, "v8flags": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", @@ -18436,8 +19396,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { "version": "6.1.4", @@ -18472,6 +19431,11 @@ } } }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + }, "xmlhttprequest-ssl": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", @@ -18526,6 +19490,50 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", "dev": true + }, + "zip-stream": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", + "requires": { + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "archiver-utils": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "requires": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } } } } diff --git a/package.json b/package.json index 62c3235..c132a29 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ }, "dependencies": { "dayjs": "^1.10.6", + "exceljs": "^4.4.0", "jszip": "^3.5.0", "xlsx-js-style": "^1.2.0" } diff --git a/src/ToLuckySheet/ILuck.ts b/src/ToLuckySheet/ILuck.ts index f4e9f8b..1baed90 100644 --- a/src/ToLuckySheet/ILuck.ts +++ b/src/ToLuckySheet/ILuck.ts @@ -171,12 +171,14 @@ export interface IluckySheetCelldataValue{ rt:number | undefined, //text rotation angle 0-180 alignment f: string | undefined, //formula qp:number | undefined //quotePrefix, show number as string + ti:number | undefined //text indent } export interface ILuckySheetCellFormat { fa:string //Format definition string t:string // Cell Type + s?: any } export interface IluckySheetCelldataValueMerge{ diff --git a/src/common/constant.ts b/src/common/constant.ts index 5c975bb..dd91834 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -305,3 +305,5 @@ export const DATA_VERIFICATION_TYPE2_MAP: IDataVerificationType2Map = { phone: "phone", }, }; + +export { IattributeList }; diff --git a/src/common/method.ts b/src/common/method.ts index ad931f9..6fba745 100644 --- a/src/common/method.ts +++ b/src/common/method.ts @@ -124,7 +124,7 @@ function ABCatNum(abc:string) { } //列下标 数字转字母 -function chatatABC(index:number) { +export function chatatABC(index:number) { let wordlen = columeHeader_word.length; if (index < wordlen) { @@ -1186,4 +1186,57 @@ export function checkCellWithinSpecifiedRange(r: number, c: number, specifiedRan } } return within +} +export interface CellAddress { + /** Column number */ + c: number | string; + /** Row number */ + r: number | string; +} + +export interface Range { + /** Starting cell */ + s: CellAddress; + /** Ending cell */ + e: CellAddress; +} + +export function decodeCell(cstr: string) { + var R = 0, C = 0; + for(var i = 0; i < cstr.length; ++i) { + var cc = cstr.charCodeAt(i); + if(cc >= 48 && cc <= 57) R = 10 * R + (cc - 48); + else if(cc >= 65 && cc <= 90) C = 26 * C + (cc - 64); + } + return { c: C - 1, r:R - 1 }; +} + +export function encodeCell(cell: CellAddress): string { + if (typeof cell.c === 'string') { + cell.c = parseInt(cell.c) + } + if (typeof cell.r === 'string') { + cell.r = parseInt(cell.r) + } + var col = cell.c + 1; + var s=""; + for(; col; col=((col-1)/26)|0) s = String.fromCharCode(((col-1)%26) + 65) + s; + return s + (cell.r + 1); +} + +export function decodeRange(range: string):Range { + var idx = range.indexOf(":"); + if(idx == -1) return { s: decodeCell(range), e: decodeCell(range) }; + return { s: decodeCell(range.slice(0, idx)), e: decodeCell(range.slice(idx + 1)) }; +} + +export function encodeRange(cs: CellAddress, ce: CellAddress):string { + let s,e + if(typeof cs !== 'string') { + s = encodeCell(cs) + } + if(typeof ce !== 'string') { + e = encodeCell(ce); + } + return s == e ? s : s + ":" + e; } \ No newline at end of file diff --git a/src/index.html b/src/index.html index e62a7c2..61073a7 100644 --- a/src/index.html +++ b/src/index.html @@ -31,6 +31,7 @@ 导入excel为sheetjs + Or Load remote xlsx file: