next-recomponents 1.9.65 → 1.9.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -20
- package/dist/index.mjs +69525 -922
- package/package.json +2 -3
- package/src/select/index.tsx +10 -8
- package/src/table3/panel.tsx +0 -1
- package/src/use-excel/index.tsx +185 -63
- package/dist/browser/chunk-2CNTHC24.mjs +0 -112
- package/dist/browser/exceljs.min-5PAECRDI.mjs +0 -23833
- package/dist/browser/index.css +0 -701
- package/dist/browser/index.mjs +0 -35284
- package/dist/chunk-TV7H7NJ5.mjs +0 -155
- package/dist/excel-J7FFBCNO.mjs +0 -68498
- package/dist/node/chunk-TV7H7NJ5.mjs +0 -155
- package/dist/node/excel-J7FFBCNO.mjs +0 -68498
- package/dist/node/index.css +0 -701
- package/dist/node/index.d.mts +0 -240
- package/dist/node/index.d.ts +0 -240
- package/dist/node/index.js +0 -46464
- package/dist/node/index.mjs +0 -46460
package/dist/index.js
CHANGED
|
@@ -3582,9 +3582,9 @@ var require_link2 = __commonJS({
|
|
|
3582
3582
|
}
|
|
3583
3583
|
});
|
|
3584
3584
|
|
|
3585
|
-
//
|
|
3585
|
+
// node_modules/file-saver/dist/FileSaver.min.js
|
|
3586
3586
|
var require_FileSaver_min = __commonJS({
|
|
3587
|
-
"
|
|
3587
|
+
"node_modules/file-saver/dist/FileSaver.min.js"(exports2, module2) {
|
|
3588
3588
|
"use strict";
|
|
3589
3589
|
(function(a, b) {
|
|
3590
3590
|
if ("function" == typeof define && define.amd) define([], b);
|
|
@@ -72009,7 +72009,7 @@ var require_workbook_reader = __commonJS({
|
|
|
72009
72009
|
var require_exceljs_nodejs = __commonJS({
|
|
72010
72010
|
"../../node_modules/exceljs/lib/exceljs.nodejs.js"(exports2, module2) {
|
|
72011
72011
|
"use strict";
|
|
72012
|
-
var
|
|
72012
|
+
var ExcelJS2 = {
|
|
72013
72013
|
Workbook: require_workbook(),
|
|
72014
72014
|
ModelContainer: require_modelcontainer(),
|
|
72015
72015
|
stream: {
|
|
@@ -72019,8 +72019,8 @@ var require_exceljs_nodejs = __commonJS({
|
|
|
72019
72019
|
}
|
|
72020
72020
|
}
|
|
72021
72021
|
};
|
|
72022
|
-
Object.assign(
|
|
72023
|
-
module2.exports =
|
|
72022
|
+
Object.assign(ExcelJS2, require_enums());
|
|
72023
|
+
module2.exports = ExcelJS2;
|
|
72024
72024
|
}
|
|
72025
72025
|
});
|
|
72026
72026
|
|
|
@@ -102350,8 +102350,12 @@ function Select(_a) {
|
|
|
102350
102350
|
}, 200);
|
|
102351
102351
|
},
|
|
102352
102352
|
onChange: (e) => {
|
|
102353
|
+
var _a2;
|
|
102353
102354
|
setHasEdition(true);
|
|
102354
102355
|
setInputValue(e.target.value);
|
|
102356
|
+
if (strictMode == false) {
|
|
102357
|
+
(_a2 = props == null ? void 0 : props.onChange) == null ? void 0 : _a2.call(props, e);
|
|
102358
|
+
}
|
|
102355
102359
|
},
|
|
102356
102360
|
placeholder,
|
|
102357
102361
|
onFocus: () => setIsOpen(true),
|
|
@@ -102549,14 +102553,8 @@ function useDates() {
|
|
|
102549
102553
|
}
|
|
102550
102554
|
|
|
102551
102555
|
// src/use-excel/index.tsx
|
|
102556
|
+
var import_exceljs = __toESM(require_excel());
|
|
102552
102557
|
var import_file_saver2 = __toESM(require_FileSaver_min());
|
|
102553
|
-
function getExcelJS() {
|
|
102554
|
-
return __async(this, null, function* () {
|
|
102555
|
-
var _a;
|
|
102556
|
-
const mod = yield Promise.resolve().then(() => __toESM(require_excel()));
|
|
102557
|
-
return (_a = mod.default) != null ? _a : mod;
|
|
102558
|
-
});
|
|
102559
|
-
}
|
|
102560
102558
|
function useExcel() {
|
|
102561
102559
|
function worksheetToJson(worksheet) {
|
|
102562
102560
|
const rows = [];
|
|
@@ -102580,9 +102578,8 @@ function useExcel() {
|
|
|
102580
102578
|
}
|
|
102581
102579
|
function importFileAllPages(file) {
|
|
102582
102580
|
return __async(this, null, function* () {
|
|
102583
|
-
const ExcelJS = yield getExcelJS();
|
|
102584
102581
|
const arrayBuffer = yield file.arrayBuffer();
|
|
102585
|
-
const workbook = new
|
|
102582
|
+
const workbook = new import_exceljs.default.Workbook();
|
|
102586
102583
|
yield workbook.xlsx.load(arrayBuffer);
|
|
102587
102584
|
const allSheetsData = {};
|
|
102588
102585
|
workbook.worksheets.forEach((ws) => {
|
|
@@ -102593,9 +102590,8 @@ function useExcel() {
|
|
|
102593
102590
|
}
|
|
102594
102591
|
function importFile(file) {
|
|
102595
102592
|
return __async(this, null, function* () {
|
|
102596
|
-
const ExcelJS = yield getExcelJS();
|
|
102597
102593
|
const arrayBuffer = yield file.arrayBuffer();
|
|
102598
|
-
const workbook = new
|
|
102594
|
+
const workbook = new import_exceljs.default.Workbook();
|
|
102599
102595
|
yield workbook.xlsx.load(arrayBuffer);
|
|
102600
102596
|
const ws = workbook.worksheets[0];
|
|
102601
102597
|
if (!ws) return [];
|
|
@@ -102617,10 +102613,9 @@ function useExcel() {
|
|
|
102617
102613
|
}
|
|
102618
102614
|
function exportFile(data, fileName = "archivo.xlsx", params) {
|
|
102619
102615
|
return __async(this, null, function* () {
|
|
102620
|
-
const ExcelJS = yield getExcelJS();
|
|
102621
102616
|
if (!data || data.length === 0) return;
|
|
102622
102617
|
const headers = Object.keys(data[0]);
|
|
102623
|
-
const workbook = new
|
|
102618
|
+
const workbook = new import_exceljs.default.Workbook();
|
|
102624
102619
|
const sheet = workbook.addWorksheet("Sheet1");
|
|
102625
102620
|
const headerRow = sheet.addRow(headers);
|
|
102626
102621
|
headerRow.eachCell((cell) => {
|
|
@@ -102668,8 +102663,7 @@ function useExcel() {
|
|
|
102668
102663
|
}
|
|
102669
102664
|
function exportFileAllPages(data, fileName = "archivo.xlsx", params) {
|
|
102670
102665
|
return __async(this, null, function* () {
|
|
102671
|
-
const
|
|
102672
|
-
const workbook = new ExcelJS.Workbook();
|
|
102666
|
+
const workbook = new import_exceljs.default.Workbook();
|
|
102673
102667
|
for (const sheetName in data) {
|
|
102674
102668
|
if (!Object.prototype.hasOwnProperty.call(data, sheetName)) continue;
|
|
102675
102669
|
const sheetData = data[sheetName] || [];
|