@nocobase/plugin-action-export 1.3.24-beta → 1.3.25-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/externalVersion.js
CHANGED
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@formily/react": "2.3.0",
|
|
12
12
|
"@formily/shared": "2.3.0",
|
|
13
|
-
"@nocobase/client": "1.3.
|
|
13
|
+
"@nocobase/client": "1.3.25-beta",
|
|
14
14
|
"react": "18.2.0",
|
|
15
15
|
"@formily/antd-v5": "1.1.9",
|
|
16
16
|
"react-i18next": "11.18.6",
|
|
17
17
|
"lodash": "4.17.21",
|
|
18
18
|
"antd": "5.12.8",
|
|
19
|
-
"@nocobase/server": "1.3.
|
|
20
|
-
"@nocobase/data-source-manager": "1.3.
|
|
21
|
-
"@nocobase/database": "1.3.
|
|
22
|
-
"@nocobase/actions": "1.3.
|
|
19
|
+
"@nocobase/server": "1.3.25-beta",
|
|
20
|
+
"@nocobase/data-source-manager": "1.3.25-beta",
|
|
21
|
+
"@nocobase/database": "1.3.25-beta",
|
|
22
|
+
"@nocobase/actions": "1.3.25-beta",
|
|
23
23
|
"async-mutex": "0.3.2"
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"xlsx","version":"0.20.2","author":"sheetjs","description":"SheetJS Spreadsheet data parser and writer","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"bin":{"xlsx":"./bin/xlsx.njs"},"main":"xlsx.js","module":"xlsx.mjs","unpkg":"dist/xlsx.full.min.js","jsdelivr":"dist/xlsx.full.min.js","types":"types/index.d.ts","exports":{".":{"import":"./xlsx.mjs","require":"./xlsx.js","types":"./types/index.d.ts"},"./xlsx.mjs":{"import":"./xlsx.mjs","types":"./types/index.d.ts"},"./xlsx.js":{"require":"./xlsx.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min.js":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min.js":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min.js":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.zahl":{"import":"./dist/xlsx.zahl.mjs","require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.mjs":{"import":"./dist/xlsx.zahl.mjs","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.js":{"require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/cpexcel":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.js":{"require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full.mjs":{"import":"./dist/cpexcel.full.mjs","types":"./dist/cpexcel.d.ts"}},"browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","adler-32":"~1.3.1","alex":"8.1.1","blanket":"~1.2.3","cfb":"~1.2.2","codepage":"~1.15.0","commander":"~2.17.1","crc-32":"~1.2.2","dtslint":"^0.1.2","eslint":"7.23.0","eslint-plugin-html":"^6.1.2","eslint-plugin-json":"^2.1.2","exit-on-epipe":"~1.0.1","fflate":"^0.7.1","jsdom":"~11.1.0","markdown-spellcheck":"^1.3.1","mocha":"~2.5.3","sinon":"^1.17.7","ssf":"~0.11.2","typescript":"2.2.0","wmf":"~1.0.1","word":"~0.3.0"},"repository":{"type":"git","url":"https://git.sheetjs.com/SheetJS/sheetjs"},"scripts":{"pretest":"npm run lint","test":"npm run tests-only","pretest-only":"git submodule init && git submodule update","tests-only":"make travis","build":"make","lint":"make fullint","dtslint":"dtslint types"},"config":{"blanket":{"pattern":"xlsx.js"}},"alex":{"allow":["chinese","special","simple","just","crash","wtf","holes"]},"homepage":"https://sheetjs.com/","files":["CHANGELOG.md","LICENSE","README.md","bower.json","package.json","xlsx.js","xlsx.mjs","xlsxworker.js","bin/xlsx.njs","dist/LICENSE","dist/*.mjs","dist/*.js","dist/*.map","dist/*.d.ts","types/index.d.ts","types/tsconfig.json"],"bugs":{"url":"https://git.sheetjs.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"2024-09-
|
|
1
|
+
{"name":"xlsx","version":"0.20.2","author":"sheetjs","description":"SheetJS Spreadsheet data parser and writer","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"bin":{"xlsx":"./bin/xlsx.njs"},"main":"xlsx.js","module":"xlsx.mjs","unpkg":"dist/xlsx.full.min.js","jsdelivr":"dist/xlsx.full.min.js","types":"types/index.d.ts","exports":{".":{"import":"./xlsx.mjs","require":"./xlsx.js","types":"./types/index.d.ts"},"./xlsx.mjs":{"import":"./xlsx.mjs","types":"./types/index.d.ts"},"./xlsx.js":{"require":"./xlsx.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min.js":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min.js":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min.js":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.zahl":{"import":"./dist/xlsx.zahl.mjs","require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.mjs":{"import":"./dist/xlsx.zahl.mjs","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.js":{"require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/cpexcel":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.js":{"require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full.mjs":{"import":"./dist/cpexcel.full.mjs","types":"./dist/cpexcel.d.ts"}},"browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","adler-32":"~1.3.1","alex":"8.1.1","blanket":"~1.2.3","cfb":"~1.2.2","codepage":"~1.15.0","commander":"~2.17.1","crc-32":"~1.2.2","dtslint":"^0.1.2","eslint":"7.23.0","eslint-plugin-html":"^6.1.2","eslint-plugin-json":"^2.1.2","exit-on-epipe":"~1.0.1","fflate":"^0.7.1","jsdom":"~11.1.0","markdown-spellcheck":"^1.3.1","mocha":"~2.5.3","sinon":"^1.17.7","ssf":"~0.11.2","typescript":"2.2.0","wmf":"~1.0.1","word":"~0.3.0"},"repository":{"type":"git","url":"https://git.sheetjs.com/SheetJS/sheetjs"},"scripts":{"pretest":"npm run lint","test":"npm run tests-only","pretest-only":"git submodule init && git submodule update","tests-only":"make travis","build":"make","lint":"make fullint","dtslint":"dtslint types"},"config":{"blanket":{"pattern":"xlsx.js"}},"alex":{"allow":["chinese","special","simple","just","crash","wtf","holes"]},"homepage":"https://sheetjs.com/","files":["CHANGELOG.md","LICENSE","README.md","bower.json","package.json","xlsx.js","xlsx.mjs","xlsxworker.js","bin/xlsx.njs","dist/LICENSE","dist/*.mjs","dist/*.js","dist/*.map","dist/*.d.ts","types/index.d.ts","types/tsconfig.json"],"bugs":{"url":"https://git.sheetjs.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"2024-09-25T14:10:34.358Z"}
|
|
@@ -132,7 +132,7 @@ class XlsxExporter {
|
|
|
132
132
|
const currentField = collection.getField(dataIndex[0]);
|
|
133
133
|
if (dataIndex.length > 1) {
|
|
134
134
|
let targetCollection;
|
|
135
|
-
for (let i = 0; i < dataIndex.length
|
|
135
|
+
for (let i = 0; i < dataIndex.length; i++) {
|
|
136
136
|
const isLast = i === dataIndex.length - 1;
|
|
137
137
|
if (isLast) {
|
|
138
138
|
return targetCollection.getField(dataIndex[i]);
|
|
@@ -157,32 +157,29 @@ class XlsxExporter {
|
|
|
157
157
|
}
|
|
158
158
|
return value;
|
|
159
159
|
}
|
|
160
|
+
getFieldRenderer(field, ctx) {
|
|
161
|
+
var _a;
|
|
162
|
+
const InterfaceClass = this.options.collectionManager.getFieldInterface((_a = field == null ? void 0 : field.options) == null ? void 0 : _a.interface);
|
|
163
|
+
if (!InterfaceClass) {
|
|
164
|
+
return this.renderRawValue;
|
|
165
|
+
}
|
|
166
|
+
const fieldInternface = new InterfaceClass(field == null ? void 0 : field.options);
|
|
167
|
+
return (value) => fieldInternface.toString(value, ctx);
|
|
168
|
+
}
|
|
160
169
|
renderCellValue(rowData, column, ctx) {
|
|
161
170
|
const { dataIndex } = column;
|
|
162
171
|
rowData = rowData.toJSON();
|
|
163
172
|
const value = rowData[dataIndex[0]];
|
|
173
|
+
const field = this.findFieldByDataIndex(dataIndex);
|
|
174
|
+
const render = this.getFieldRenderer(field, ctx);
|
|
164
175
|
if (dataIndex.length > 1) {
|
|
165
176
|
const deepValue = (0, import_deep_get.deepGet)(rowData, dataIndex);
|
|
166
177
|
if (Array.isArray(deepValue)) {
|
|
167
|
-
return deepValue.join(",");
|
|
178
|
+
return deepValue.map(render).join(",");
|
|
168
179
|
}
|
|
169
|
-
return deepValue;
|
|
170
|
-
}
|
|
171
|
-
const field = this.findFieldByDataIndex(dataIndex);
|
|
172
|
-
if (!field) {
|
|
173
|
-
return this.renderRawValue(value);
|
|
174
|
-
}
|
|
175
|
-
const fieldOptions = field.options;
|
|
176
|
-
const interfaceName = fieldOptions["interface"];
|
|
177
|
-
if (!interfaceName) {
|
|
178
|
-
return this.renderRawValue(value);
|
|
179
|
-
}
|
|
180
|
-
const InterfaceClass = this.options.collectionManager.getFieldInterface(interfaceName);
|
|
181
|
-
if (!InterfaceClass) {
|
|
182
|
-
return this.renderRawValue(value);
|
|
180
|
+
return render(deepValue);
|
|
183
181
|
}
|
|
184
|
-
|
|
185
|
-
return interfaceInstance.toString(value, ctx);
|
|
182
|
+
return render(value);
|
|
186
183
|
}
|
|
187
184
|
}
|
|
188
185
|
var xlsx_exporter_default = XlsxExporter;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "操作:导出记录",
|
|
5
5
|
"description": "Export filtered records to excel, you can configure which fields to export.",
|
|
6
6
|
"description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。",
|
|
7
|
-
"version": "1.3.
|
|
7
|
+
"version": "1.3.25-beta",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/action-export",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@nocobase/test": "1.x",
|
|
30
30
|
"@nocobase/utils": "1.x"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "dea17d475f5db81a93fd7c27aebd650c46bb3a45",
|
|
33
33
|
"keywords": [
|
|
34
34
|
"Actions"
|
|
35
35
|
]
|