tabulator-tables 5.2.4 → 5.2.5
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_bootstrap5.css +41 -32
- 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 +12 -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/js/tabulator.js +42 -123
- 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 +16 -93
- 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 +1 -1
- package/src/js/core/cell/Cell.js +1 -2
- package/src/js/core/column/Column.js +1 -81
- package/src/js/core/rendering/Renderer.js +2 -0
- package/src/js/core/tools/Popup.js +6 -0
- package/src/js/modules/Download/defaults/downloaders/csv.js +2 -3
- package/src/js/modules/Download/defaults/downloaders/pdf.js +2 -3
- package/src/js/modules/Edit/List.js +1 -1
- package/src/js/modules/Export/Export.js +1 -2
- package/src/js/modules/Interaction/Interaction.js +3 -3
- package/src/js/modules/Page/Page.js +1 -2
- package/src/js/modules/ResizeColumns/ResizeColumns.js +1 -1
- package/src/js/modules/Sort/Sort.js +1 -1
- package/src/scss/themes/bootstrap/tabulator_bootstrap5.scss +41 -32
- package/src/scss/themes/bulma/tabulator_bulma.scss +47 -32
package/dist/js/tabulator_esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Tabulator v5.2.
|
|
1
|
+
/* Tabulator v5.2.5 (c) Oliver Folkerd 2022 */
|
|
2
2
|
class CoreFeature{
|
|
3
3
|
|
|
4
4
|
constructor(table){
|
|
@@ -194,6 +194,8 @@ class Popup extends CoreFeature{
|
|
|
194
194
|
|
|
195
195
|
this.blurEvent = this.hide.bind(this, false);
|
|
196
196
|
this.escEvent = this._escapeCheck.bind(this);
|
|
197
|
+
|
|
198
|
+
this.destroyBinding = this.hide.bind(this, true);
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
_lookupContainer(){
|
|
@@ -311,6 +313,8 @@ class Popup extends CoreFeature{
|
|
|
311
313
|
this._fitToScreen(x, y, parentEl, parentOffset, position);
|
|
312
314
|
|
|
313
315
|
this.visible = true;
|
|
316
|
+
|
|
317
|
+
this.subscribe("table-destroy", this.destroyBinding);
|
|
314
318
|
|
|
315
319
|
return this;
|
|
316
320
|
}
|
|
@@ -406,6 +410,8 @@ class Popup extends CoreFeature{
|
|
|
406
410
|
if(this.blurCallback && !silent){
|
|
407
411
|
this.blurCallback();
|
|
408
412
|
}
|
|
413
|
+
|
|
414
|
+
this.unsubscribe("table-destroy", this.destroyBinding);
|
|
409
415
|
}
|
|
410
416
|
|
|
411
417
|
return this;
|
|
@@ -1564,7 +1570,6 @@ class Cell extends CoreFeature{
|
|
|
1564
1570
|
}
|
|
1565
1571
|
break;
|
|
1566
1572
|
case "undefined":
|
|
1567
|
-
case "null":
|
|
1568
1573
|
this.element.innerHTML = "";
|
|
1569
1574
|
break;
|
|
1570
1575
|
default:
|
|
@@ -2066,8 +2071,6 @@ class Column extends CoreFeature{
|
|
|
2066
2071
|
}
|
|
2067
2072
|
}
|
|
2068
2073
|
|
|
2069
|
-
this.contentElement = this._bindEvents();
|
|
2070
|
-
|
|
2071
2074
|
this.contentElement = this._buildColumnHeaderContent();
|
|
2072
2075
|
|
|
2073
2076
|
this.element.appendChild(this.contentElement);
|
|
@@ -2081,83 +2084,6 @@ class Column extends CoreFeature{
|
|
|
2081
2084
|
this.dispatch("column-init", this);
|
|
2082
2085
|
}
|
|
2083
2086
|
|
|
2084
|
-
_bindEvents(){
|
|
2085
|
-
var def = this.definition,
|
|
2086
|
-
dblTap, tapHold, tap;
|
|
2087
|
-
|
|
2088
|
-
//setup header click event bindings
|
|
2089
|
-
if(typeof(def.headerClick) == "function"){
|
|
2090
|
-
this.element.addEventListener("click", (e) => {def.headerClick(e, this.getComponent());});
|
|
2091
|
-
}
|
|
2092
|
-
|
|
2093
|
-
if(typeof(def.headerDblClick) == "function"){
|
|
2094
|
-
this.element.addEventListener("dblclick", (e) => {def.headerDblClick(e, this.getComponent());});
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
if(typeof(def.headerContext) == "function"){
|
|
2098
|
-
this.element.addEventListener("contextmenu", (e) => {def.headerContext(e, this.getComponent());});
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
//setup header tap event bindings
|
|
2102
|
-
if(typeof(def.headerTap) == "function"){
|
|
2103
|
-
tap = false;
|
|
2104
|
-
|
|
2105
|
-
this.element.addEventListener("touchstart", (e) => {
|
|
2106
|
-
tap = true;
|
|
2107
|
-
}, {passive: true});
|
|
2108
|
-
|
|
2109
|
-
this.element.addEventListener("touchend", (e) => {
|
|
2110
|
-
if(tap){
|
|
2111
|
-
def.headerTap(e, this.getComponent());
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
tap = false;
|
|
2115
|
-
});
|
|
2116
|
-
}
|
|
2117
|
-
|
|
2118
|
-
if(typeof(def.headerDblTap) == "function"){
|
|
2119
|
-
dblTap = null;
|
|
2120
|
-
|
|
2121
|
-
this.element.addEventListener("touchend", (e) => {
|
|
2122
|
-
|
|
2123
|
-
if(dblTap){
|
|
2124
|
-
clearTimeout(dblTap);
|
|
2125
|
-
dblTap = null;
|
|
2126
|
-
|
|
2127
|
-
def.headerDblTap(e, this.getComponent());
|
|
2128
|
-
}else {
|
|
2129
|
-
|
|
2130
|
-
dblTap = setTimeout(() => {
|
|
2131
|
-
clearTimeout(dblTap);
|
|
2132
|
-
dblTap = null;
|
|
2133
|
-
}, 300);
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
});
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
|
-
if(typeof(def.headerTapHold) == "function"){
|
|
2140
|
-
tapHold = null;
|
|
2141
|
-
|
|
2142
|
-
this.element.addEventListener("touchstart", (e) => {
|
|
2143
|
-
clearTimeout(tapHold);
|
|
2144
|
-
|
|
2145
|
-
tapHold = setTimeout(function(){
|
|
2146
|
-
clearTimeout(tapHold);
|
|
2147
|
-
tapHold = null;
|
|
2148
|
-
tap = false;
|
|
2149
|
-
def.headerTapHold(e, this.getComponent());
|
|
2150
|
-
}, 1000);
|
|
2151
|
-
|
|
2152
|
-
}, {passive: true});
|
|
2153
|
-
|
|
2154
|
-
this.element.addEventListener("touchend", (e) => {
|
|
2155
|
-
clearTimeout(tapHold);
|
|
2156
|
-
tapHold = null;
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
2087
|
//build header element for header
|
|
2162
2088
|
_buildColumnHeader(){
|
|
2163
2089
|
var def = this.definition,
|
|
@@ -2284,7 +2210,6 @@ class Column extends CoreFeature{
|
|
|
2284
2210
|
}
|
|
2285
2211
|
break;
|
|
2286
2212
|
case "undefined":
|
|
2287
|
-
case "null":
|
|
2288
2213
|
el.innerHTML = "";
|
|
2289
2214
|
break;
|
|
2290
2215
|
default:
|
|
@@ -4650,11 +4575,10 @@ function csv(list, options, setFileContents){
|
|
|
4650
4575
|
|
|
4651
4576
|
switch(typeof col.value){
|
|
4652
4577
|
case "object":
|
|
4653
|
-
col.value = JSON.stringify(col.value);
|
|
4578
|
+
col.value = col.value !== null ? JSON.stringify(col.value) : "";
|
|
4654
4579
|
break;
|
|
4655
4580
|
|
|
4656
4581
|
case "undefined":
|
|
4657
|
-
case "null":
|
|
4658
4582
|
col.value = "";
|
|
4659
4583
|
break;
|
|
4660
4584
|
}
|
|
@@ -4774,11 +4698,10 @@ function pdf(list, options, setFileContents){
|
|
|
4774
4698
|
if(col){
|
|
4775
4699
|
switch(typeof col.value){
|
|
4776
4700
|
case "object":
|
|
4777
|
-
col.value = JSON.stringify(col.value);
|
|
4701
|
+
col.value = col.value !== null ? JSON.stringify(col.value) : "";
|
|
4778
4702
|
break;
|
|
4779
4703
|
|
|
4780
4704
|
case "undefined":
|
|
4781
|
-
case "null":
|
|
4782
4705
|
col.value = "";
|
|
4783
4706
|
break;
|
|
4784
4707
|
}
|
|
@@ -5631,7 +5554,7 @@ class Edit{
|
|
|
5631
5554
|
this.initialValues = this.params.multiselect ? initialValue : [initialValue];
|
|
5632
5555
|
|
|
5633
5556
|
if(this.isFilter){
|
|
5634
|
-
this.input.value = this.initialValues.join(",");
|
|
5557
|
+
this.input.value = this.initialValues ? this.initialValues.join(",") : "";
|
|
5635
5558
|
this.headerFilterInitialListGen();
|
|
5636
5559
|
}
|
|
5637
5560
|
}
|
|
@@ -8188,11 +8111,10 @@ class Export extends Module{
|
|
|
8188
8111
|
}else {
|
|
8189
8112
|
switch(typeof value){
|
|
8190
8113
|
case "object":
|
|
8191
|
-
value = JSON.stringify(value);
|
|
8114
|
+
value = value !== null ? JSON.stringify(value) : "";
|
|
8192
8115
|
break;
|
|
8193
8116
|
|
|
8194
8117
|
case "undefined":
|
|
8195
|
-
case "null":
|
|
8196
8118
|
value = "";
|
|
8197
8119
|
break;
|
|
8198
8120
|
|
|
@@ -15150,7 +15072,6 @@ class Page extends Module{
|
|
|
15150
15072
|
}
|
|
15151
15073
|
break;
|
|
15152
15074
|
case "undefined":
|
|
15153
|
-
case "null":
|
|
15154
15075
|
this.pageCounterElement.innerHTML = "";
|
|
15155
15076
|
break;
|
|
15156
15077
|
default:
|
|
@@ -16735,7 +16656,7 @@ class ResizeColumns extends Module{
|
|
|
16735
16656
|
|
|
16736
16657
|
config.handleEl = handle;
|
|
16737
16658
|
|
|
16738
|
-
if(element.parentNode){
|
|
16659
|
+
if(element.parentNode && column.visible){
|
|
16739
16660
|
element.after(handle);
|
|
16740
16661
|
}
|
|
16741
16662
|
}
|
|
@@ -18517,7 +18438,7 @@ class Sort extends Module{
|
|
|
18517
18438
|
//set the column header sort direction
|
|
18518
18439
|
setColumnHeader(column, dir){
|
|
18519
18440
|
column.modules.sort.dir = dir;
|
|
18520
|
-
column.getElement().setAttribute("aria-sort", dir);
|
|
18441
|
+
column.getElement().setAttribute("aria-sort", dir === "asc" ? "ascending" : "descending");
|
|
18521
18442
|
}
|
|
18522
18443
|
|
|
18523
18444
|
//sort each item in sort list
|
|
@@ -19460,6 +19381,8 @@ class Renderer extends CoreFeature{
|
|
|
19460
19381
|
this.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;
|
|
19461
19382
|
}
|
|
19462
19383
|
|
|
19384
|
+
break;
|
|
19385
|
+
|
|
19463
19386
|
case "top":
|
|
19464
19387
|
this.elementVertical.scrollTop = rowEl.offsetTop;
|
|
19465
19388
|
break;
|
|
@@ -21420,7 +21343,7 @@ class RowManager extends CoreFeature{
|
|
|
21420
21343
|
|
|
21421
21344
|
el.classList.add("tabulator-tableholder");
|
|
21422
21345
|
el.setAttribute("tabindex", 0);
|
|
21423
|
-
el.setAttribute("role", "rowgroup");
|
|
21346
|
+
// el.setAttribute("role", "rowgroup");
|
|
21424
21347
|
|
|
21425
21348
|
return el;
|
|
21426
21349
|
}
|