tabulator-tables 6.0.0 → 6.1.0
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/bower.json +1 -1
- package/dist/css/tabulator_site_dark.css +1700 -0
- package/dist/css/tabulator_site_dark.css.map +1 -0
- package/dist/css/tabulator_site_dark.min.css +2 -0
- package/dist/css/tabulator_site_dark.min.css.map +1 -0
- package/dist/js/tabulator.js +17 -9
- package/dist/js/tabulator.js.map +1 -1
- package/dist/js/tabulator.min.js +2 -2
- package/dist/js/tabulator.min.js.map +1 -1
- package/dist/js/tabulator_esm.js +17 -9
- package/dist/js/tabulator_esm.js.map +1 -1
- package/dist/js/tabulator_esm.min.js +2 -2
- package/dist/js/tabulator_esm.min.js.map +1 -1
- package/package.json +1 -1
- package/src/js/core/Tabulator.js +2 -2
- package/src/js/modules/Import/Import.js +4 -4
- package/src/js/modules/Import/defaults/importers/xlsx.js +6 -0
- package/src/js/modules/Import/defaults/importers.js +2 -0
- package/src/scss/themes/tabulator_site_dark.scss +450 -0
package/dist/js/tabulator_esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Tabulator v6.
|
|
1
|
+
/* Tabulator v6.1.0 (c) Oliver Folkerd 2024 */
|
|
2
2
|
class CoreFeature{
|
|
3
3
|
|
|
4
4
|
constructor(table){
|
|
@@ -5078,7 +5078,7 @@ function pdf(list, options = {}, setFileContents){
|
|
|
5078
5078
|
setFileContents(doc.output("arraybuffer"), "application/pdf");
|
|
5079
5079
|
}
|
|
5080
5080
|
|
|
5081
|
-
function xlsx(list, options, setFileContents){
|
|
5081
|
+
function xlsx$1(list, options, setFileContents){
|
|
5082
5082
|
var self = this,
|
|
5083
5083
|
sheetName = options.sheetName || "Sheet1",
|
|
5084
5084
|
workbook = XLSX.utils.book_new(),
|
|
@@ -5223,7 +5223,7 @@ var defaultDownloaders = {
|
|
|
5223
5223
|
json:json$1,
|
|
5224
5224
|
jsonLines:jsonLines,
|
|
5225
5225
|
pdf:pdf,
|
|
5226
|
-
xlsx:xlsx,
|
|
5226
|
+
xlsx:xlsx$1,
|
|
5227
5227
|
html:html$1,
|
|
5228
5228
|
};
|
|
5229
5229
|
|
|
@@ -13258,10 +13258,18 @@ function array$1 (input){
|
|
|
13258
13258
|
return input;
|
|
13259
13259
|
}
|
|
13260
13260
|
|
|
13261
|
+
function xlsx(input, floop){
|
|
13262
|
+
var workbook2 = XLSX.read(input);
|
|
13263
|
+
var sheet = workbook2.Sheets[workbook2.SheetNames[0]];
|
|
13264
|
+
|
|
13265
|
+
return XLSX.utils.sheet_to_json(sheet, {});
|
|
13266
|
+
}
|
|
13267
|
+
|
|
13261
13268
|
var defaultImporters = {
|
|
13262
13269
|
csv:csv,
|
|
13263
13270
|
json:json,
|
|
13264
13271
|
array:array$1,
|
|
13272
|
+
xlsx:xlsx,
|
|
13265
13273
|
};
|
|
13266
13274
|
|
|
13267
13275
|
class Import extends Module{
|
|
@@ -13320,11 +13328,11 @@ class Import extends Module{
|
|
|
13320
13328
|
return importer;
|
|
13321
13329
|
}
|
|
13322
13330
|
|
|
13323
|
-
importFromFile(importFormat, extension){
|
|
13331
|
+
importFromFile(importFormat, extension, importReader){
|
|
13324
13332
|
var importer = this.lookupImporter(importFormat);
|
|
13325
13333
|
|
|
13326
13334
|
if(importer){
|
|
13327
|
-
return this.pickFile(extension)
|
|
13335
|
+
return this.pickFile(extension, importReader)
|
|
13328
13336
|
.then(this.importData.bind(this, importer))
|
|
13329
13337
|
.then(this.structureData.bind(this))
|
|
13330
13338
|
.then(this.setData.bind(this))
|
|
@@ -13335,7 +13343,7 @@ class Import extends Module{
|
|
|
13335
13343
|
}
|
|
13336
13344
|
}
|
|
13337
13345
|
|
|
13338
|
-
pickFile(extensions){
|
|
13346
|
+
pickFile(extensions, importReader){
|
|
13339
13347
|
return new Promise((resolve, reject) => {
|
|
13340
13348
|
var input = document.createElement("input");
|
|
13341
13349
|
input.type = "file";
|
|
@@ -13345,7 +13353,7 @@ class Import extends Module{
|
|
|
13345
13353
|
var file = input.files[0],
|
|
13346
13354
|
reader = new FileReader();
|
|
13347
13355
|
|
|
13348
|
-
switch(this.table.options.importReader){
|
|
13356
|
+
switch(importReader || this.table.options.importReader){
|
|
13349
13357
|
case "buffer":
|
|
13350
13358
|
reader.readAsArrayBuffer(file);
|
|
13351
13359
|
break;
|
|
@@ -28300,11 +28308,11 @@ class Tabulator extends ModuleBinder{
|
|
|
28300
28308
|
this._buildElement();
|
|
28301
28309
|
|
|
28302
28310
|
this._initializeTable();
|
|
28311
|
+
|
|
28312
|
+
this.initialized = true;
|
|
28303
28313
|
|
|
28304
28314
|
this._loadInitialData()
|
|
28305
28315
|
.finally(() => {
|
|
28306
|
-
this.initialized = true;
|
|
28307
|
-
|
|
28308
28316
|
this.eventBus.dispatch("table-initialized");
|
|
28309
28317
|
this.externalEvents.dispatch("tableBuilt");
|
|
28310
28318
|
});
|