tabulator-tables 5.4.2 → 5.4.3
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/css/tabulator.css +1 -0
- package/dist/css/tabulator.css.map +1 -1
- package/dist/css/tabulator.min.css +1 -1
- package/dist/css/tabulator.min.css.map +1 -1
- package/dist/css/tabulator_bootstrap3.css +1 -0
- package/dist/css/tabulator_bootstrap3.css.map +1 -1
- package/dist/css/tabulator_bootstrap3.min.css +1 -1
- package/dist/css/tabulator_bootstrap3.min.css.map +1 -1
- package/dist/css/tabulator_bootstrap4.css +1 -0
- package/dist/css/tabulator_bootstrap4.css.map +1 -1
- package/dist/css/tabulator_bootstrap4.min.css +1 -1
- package/dist/css/tabulator_bootstrap4.min.css.map +1 -1
- package/dist/css/tabulator_bootstrap5.css +1 -0
- package/dist/css/tabulator_bootstrap5.css.map +1 -1
- package/dist/css/tabulator_bootstrap5.min.css +1 -1
- package/dist/css/tabulator_bootstrap5.min.css.map +1 -1
- package/dist/css/tabulator_bulma.css +1 -0
- package/dist/css/tabulator_bulma.css.map +1 -1
- package/dist/css/tabulator_bulma.min.css +1 -1
- package/dist/css/tabulator_bulma.min.css.map +1 -1
- package/dist/css/tabulator_materialize.css +1 -0
- package/dist/css/tabulator_materialize.css.map +1 -1
- package/dist/css/tabulator_materialize.min.css +1 -1
- package/dist/css/tabulator_materialize.min.css.map +1 -1
- package/dist/css/tabulator_midnight.css +1 -0
- package/dist/css/tabulator_midnight.css.map +1 -1
- package/dist/css/tabulator_midnight.min.css +1 -1
- package/dist/css/tabulator_midnight.min.css.map +1 -1
- package/dist/css/tabulator_modern.css +1 -0
- package/dist/css/tabulator_modern.css.map +1 -1
- package/dist/css/tabulator_modern.min.css +1 -1
- package/dist/css/tabulator_modern.min.css.map +1 -1
- package/dist/css/tabulator_semanticui.css +1 -0
- package/dist/css/tabulator_semanticui.css.map +1 -1
- package/dist/css/tabulator_semanticui.min.css +1 -1
- package/dist/css/tabulator_semanticui.min.css.map +1 -1
- package/dist/css/tabulator_simple.css +1 -0
- package/dist/css/tabulator_simple.css.map +1 -1
- package/dist/css/tabulator_simple.min.css +1 -1
- package/dist/css/tabulator_simple.min.css.map +1 -1
- package/dist/css/tabulator_site.css +1 -0
- package/dist/css/tabulator_site.css.map +1 -1
- package/dist/css/tabulator_site.min.css +1 -1
- package/dist/css/tabulator_site.min.css.map +1 -1
- package/dist/js/tabulator.js +280 -222
- 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 +280 -222
- 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/RowManager.js +49 -30
- package/src/js/core/Tabulator.js +7 -8
- package/src/js/core/tools/Popup.js +1 -1
- package/src/js/modules/Edit/List.js +1 -1
- package/src/js/modules/Edit/inputMask.js +1 -1
- package/src/js/modules/Export/Export.js +151 -145
- package/src/js/modules/Filter/Filter.js +11 -8
- package/src/js/modules/GroupRows/Group.js +10 -7
- package/src/js/modules/GroupRows/GroupRows.js +23 -7
- package/src/js/modules/Localize/Localize.js +0 -9
- package/src/js/modules/Print/Print.js +15 -2
- package/src/js/modules/SelectRow/SelectRow.js +10 -2
- package/src/scss/tabulator.scss +1 -0
package/package.json
CHANGED
|
@@ -66,18 +66,32 @@ export default class RowManager extends CoreFeature{
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
initializePlaceholder(){
|
|
69
|
+
var placeholder = this.table.options.placeholder;
|
|
70
|
+
|
|
69
71
|
//configure placeholder element
|
|
70
|
-
if(
|
|
72
|
+
if(placeholder){
|
|
71
73
|
let el = document.createElement("div");
|
|
72
74
|
el.classList.add("tabulator-placeholder");
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
|
|
76
|
+
if(typeof placeholder == "string"){
|
|
77
|
+
let contents = document.createElement("div");
|
|
78
|
+
contents.classList.add("tabulator-placeholder-contents");
|
|
79
|
+
contents.innerHTML = placeholder;
|
|
80
|
+
|
|
81
|
+
el.appendChild(contents);
|
|
82
|
+
|
|
83
|
+
this.placeholderContents = contents;
|
|
84
|
+
|
|
85
|
+
}else if(typeof HTMLElement !== "undefined" && placeholder instanceof HTMLElement){
|
|
86
|
+
|
|
87
|
+
el.appendChild(placeholder);
|
|
88
|
+
this.placeholderContents = placeholder;
|
|
89
|
+
}else{
|
|
90
|
+
console.warn("Invalid placeholder provided, must be string or HTML Element", placeholder);
|
|
91
|
+
|
|
92
|
+
this.el = null;
|
|
93
|
+
}
|
|
94
|
+
|
|
81
95
|
this.placeholder = el;
|
|
82
96
|
}
|
|
83
97
|
}
|
|
@@ -235,18 +249,24 @@ export default class RowManager extends CoreFeature{
|
|
|
235
249
|
_wipeElements(){
|
|
236
250
|
this.dispatch("rows-wipe");
|
|
237
251
|
|
|
252
|
+
this.destroy();
|
|
253
|
+
|
|
254
|
+
this.adjustTableSize();
|
|
255
|
+
|
|
256
|
+
this.dispatch("rows-wiped");
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
destroy(){
|
|
238
260
|
this.rows.forEach((row) => {
|
|
239
261
|
row.wipe();
|
|
240
262
|
});
|
|
241
|
-
|
|
263
|
+
|
|
242
264
|
this.rows = [];
|
|
243
265
|
this.activeRows = [];
|
|
244
266
|
this.activeRowsPipeline = [];
|
|
245
267
|
this.activeRowsCount = 0;
|
|
246
268
|
this.displayRows = [];
|
|
247
269
|
this.displayRowsCount = 0;
|
|
248
|
-
|
|
249
|
-
this.adjustTableSize();
|
|
250
270
|
}
|
|
251
271
|
|
|
252
272
|
deleteRow(row, blockRedraw){
|
|
@@ -294,7 +314,7 @@ export default class RowManager extends CoreFeature{
|
|
|
294
314
|
}
|
|
295
315
|
|
|
296
316
|
//add multiple rows
|
|
297
|
-
addRows(data, pos, index){
|
|
317
|
+
addRows(data, pos, index, refreshDisplayOnly){
|
|
298
318
|
var rows = [];
|
|
299
319
|
|
|
300
320
|
return new Promise((resolve, reject) => {
|
|
@@ -313,8 +333,8 @@ export default class RowManager extends CoreFeature{
|
|
|
313
333
|
rows.push(row);
|
|
314
334
|
this.dispatch("row-added", row, data, pos, index);
|
|
315
335
|
});
|
|
316
|
-
|
|
317
|
-
this.refreshActiveData(false, false, true);
|
|
336
|
+
|
|
337
|
+
this.refreshActiveData(refreshDisplayOnly ? "displayPipeline" : false, false, true);
|
|
318
338
|
|
|
319
339
|
this.regenerateRowPositions();
|
|
320
340
|
|
|
@@ -794,22 +814,21 @@ export default class RowManager extends CoreFeature{
|
|
|
794
814
|
getRows(type){
|
|
795
815
|
var rows = [];
|
|
796
816
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
817
|
+
switch(type){
|
|
818
|
+
case "active":
|
|
819
|
+
rows = this.activeRows;
|
|
820
|
+
break;
|
|
821
|
+
|
|
822
|
+
case "display":
|
|
823
|
+
rows = this.table.rowManager.getDisplayRows();
|
|
824
|
+
break;
|
|
804
825
|
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
break;
|
|
812
|
-
}
|
|
826
|
+
case "visible":
|
|
827
|
+
rows = this.getVisibleRows(false, true);
|
|
828
|
+
break;
|
|
829
|
+
|
|
830
|
+
default:
|
|
831
|
+
rows = this.chain("rows-retrieve", type, null, this.rows) || this.rows;
|
|
813
832
|
}
|
|
814
833
|
|
|
815
834
|
return rows;
|
package/src/js/core/Tabulator.js
CHANGED
|
@@ -290,13 +290,7 @@ class Tabulator {
|
|
|
290
290
|
this.eventBus.dispatch("table-destroy");
|
|
291
291
|
|
|
292
292
|
//clear row data
|
|
293
|
-
this.rowManager.
|
|
294
|
-
row.wipe();
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
this.rowManager.rows = [];
|
|
298
|
-
this.rowManager.activeRows = [];
|
|
299
|
-
this.rowManager.displayRows = [];
|
|
293
|
+
this.rowManager.destroy();
|
|
300
294
|
|
|
301
295
|
//clear DOM
|
|
302
296
|
while(element.firstChild) element.removeChild(element.firstChild);
|
|
@@ -431,7 +425,12 @@ class Tabulator {
|
|
|
431
425
|
if(!responses){
|
|
432
426
|
resolve();
|
|
433
427
|
}
|
|
428
|
+
})
|
|
429
|
+
.catch((e) => {
|
|
430
|
+
reject("Update Error - Unable to update row", item, e);
|
|
434
431
|
});
|
|
432
|
+
}else{
|
|
433
|
+
reject("Update Error - Unable to find row", item);
|
|
435
434
|
}
|
|
436
435
|
});
|
|
437
436
|
}else{
|
|
@@ -587,7 +586,7 @@ class Tabulator {
|
|
|
587
586
|
data = JSON.parse(data);
|
|
588
587
|
}
|
|
589
588
|
|
|
590
|
-
return this.rowManager.addRows(data, pos, index)
|
|
589
|
+
return this.rowManager.addRows(data, pos, index, true)
|
|
591
590
|
.then((rows)=>{
|
|
592
591
|
return rows[0].getComponent();
|
|
593
592
|
});
|
|
@@ -25,7 +25,7 @@ export default class Popup extends CoreFeature{
|
|
|
25
25
|
this.blurEvent = this.hide.bind(this, false);
|
|
26
26
|
this.escEvent = this._escapeCheck.bind(this);
|
|
27
27
|
|
|
28
|
-
this.destroyBinding = this.tableDestroyed;
|
|
28
|
+
this.destroyBinding = this.tableDestroyed.bind(this);
|
|
29
29
|
this.destroyed = false;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -1006,7 +1006,7 @@ export default class Edit{
|
|
|
1006
1006
|
if(this.currentItems[0]){
|
|
1007
1007
|
output = this.currentItems[0].value;
|
|
1008
1008
|
}else{
|
|
1009
|
-
initialValue = this.initialValues[0];
|
|
1009
|
+
initialValue = Array.isArray(this.initialValues) ? this.initialValues[0] : this.initialValues;
|
|
1010
1010
|
|
|
1011
1011
|
if(initialValue === null || typeof initialValue === "undefined" || initialValue === ""){
|
|
1012
1012
|
output = initialValue;
|