tabulator-tables 5.1.6 → 5.2.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/.github/ISSUE_TEMPLATE/bug_report.md +3 -2
- package/.github/ISSUE_TEMPLATE/feature_request.md +1 -1
- package/bower.json +1 -1
- package/dist/css/tabulator.css +59 -51
- 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 +59 -51
- 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 +59 -51
- 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 +1575 -0
- package/dist/css/tabulator_bootstrap5.css.map +1 -0
- package/dist/css/tabulator_bootstrap5.min.css +2 -0
- package/dist/css/tabulator_bootstrap5.min.css.map +1 -0
- package/dist/css/tabulator_bulma.css +59 -51
- 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 +59 -51
- 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 +59 -51
- 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 +59 -51
- 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 +59 -51
- 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 +59 -51
- 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 +59 -51
- 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 +2550 -1663
- 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 +2827 -2147
- 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/FooterManager.js +6 -13
- package/src/js/core/Module.js +44 -2
- package/src/js/core/Tabulator.js +341 -289
- package/src/js/core/cell/Cell.js +9 -38
- package/src/js/core/column/Column.js +8 -44
- package/src/js/core/column/defaults/options.js +0 -2
- package/src/js/core/defaults/options.js +5 -2
- package/src/js/core/modules/optional.js +2 -0
- package/src/js/core/rendering/renderers/VirtualDomHorizontal.js +6 -3
- package/src/js/core/row/Row.js +127 -118
- package/src/js/core/tools/Alert.js +63 -0
- package/src/js/core/tools/ComponentFunctionBinder.js +3 -3
- package/src/js/core/tools/DataLoader.js +12 -84
- package/src/js/core/tools/InteractionMonitor.js +1 -1
- package/src/js/core/tools/ModuleBinder.js +30 -23
- package/src/js/core/tools/Popup.js +251 -0
- package/src/js/modules/ColumnCalcs/ColumnCalcs.js +2 -2
- package/src/js/modules/Edit/Edit.js +6 -25
- package/src/js/modules/Edit/List.js +997 -0
- package/src/js/modules/Edit/defaults/editors/autocomplete.js +6 -446
- package/src/js/modules/Edit/defaults/editors/input.js +4 -0
- package/src/js/modules/Edit/defaults/editors/list.js +7 -0
- package/src/js/modules/Edit/defaults/editors/number.js +4 -0
- package/src/js/modules/Edit/defaults/editors/select.js +5 -584
- package/src/js/modules/Edit/defaults/editors/textarea.js +4 -0
- package/src/js/modules/Edit/defaults/editors/tickCross.js +17 -5
- package/src/js/modules/Edit/defaults/editors.js +2 -0
- package/src/js/modules/Filter/Filter.js +7 -4
- package/src/js/modules/Format/defaults/formatters/datetime.js +10 -4
- package/src/js/modules/Format/defaults/formatters/datetimediff.js +10 -3
- package/src/js/modules/Format/defaults/formatters/link.js +12 -1
- package/src/js/modules/Format/defaults/formatters/money.js +5 -3
- package/src/js/modules/Format/defaults/formatters/tickCross.js +2 -1
- package/src/js/modules/FrozenColumns/FrozenColumns.js +30 -8
- package/src/js/modules/HtmlTableImport/HtmlTableImport.js +5 -1
- package/src/js/modules/Menu/Menu.js +59 -157
- package/src/js/modules/Mutator/Mutator.js +20 -0
- package/src/js/modules/Page/Page.js +7 -3
- package/src/js/modules/Persistence/Persistence.js +1 -1
- package/src/js/modules/Popup/Popup.js +194 -0
- package/src/js/modules/ResizeColumns/ResizeColumns.js +138 -81
- package/src/js/modules/Sort/defaults/sorters/datetime.js +15 -2
- package/src/js/modules/Tooltip/Tooltip.js +132 -0
- package/src/js/modules/Validate/Validate.js +107 -71
- package/src/scss/tabulator.scss +349 -349
- package/src/scss/themes/bootstrap/functions5.scss +302 -0
- package/src/scss/themes/bootstrap/tabulator_bootstrap5.scss +546 -0
- package/src/scss/themes/bootstrap/variables5.scss +1641 -0
package/src/js/core/cell/Cell.js
CHANGED
|
@@ -85,13 +85,6 @@ export default class Cell extends CoreFeature{
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
//update tooltip on mouse enter
|
|
89
|
-
if (this.table.options.tooltipGenerationMode === "hover"){
|
|
90
|
-
element.addEventListener("mouseenter", (e) => {
|
|
91
|
-
this._generateTooltip();
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
88
|
this.dispatch("cell-init", this);
|
|
96
89
|
|
|
97
90
|
//hide cell if not visible
|
|
@@ -137,31 +130,6 @@ export default class Cell extends CoreFeature{
|
|
|
137
130
|
this.dispatch("cell-rendered", this);
|
|
138
131
|
}
|
|
139
132
|
|
|
140
|
-
//generate tooltip text
|
|
141
|
-
_generateTooltip(){
|
|
142
|
-
var tooltip = this.column.tooltip;
|
|
143
|
-
|
|
144
|
-
if(tooltip){
|
|
145
|
-
if(tooltip === true){
|
|
146
|
-
tooltip = this.value;
|
|
147
|
-
}else if(typeof(tooltip) == "function"){
|
|
148
|
-
tooltip = tooltip(this.getComponent());
|
|
149
|
-
|
|
150
|
-
if(tooltip === false){
|
|
151
|
-
tooltip = "";
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if(typeof tooltip === "undefined"){
|
|
156
|
-
tooltip = "";
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
this.element.setAttribute("title", tooltip);
|
|
160
|
-
}else{
|
|
161
|
-
this.element.setAttribute("title", "");
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
133
|
//////////////////// Getters ////////////////////
|
|
166
134
|
getElement(containerOnly){
|
|
167
135
|
if(!this.loaded){
|
|
@@ -183,8 +151,8 @@ export default class Cell extends CoreFeature{
|
|
|
183
151
|
}
|
|
184
152
|
|
|
185
153
|
//////////////////// Actions ////////////////////
|
|
186
|
-
setValue(value, mutate){
|
|
187
|
-
var changed = this.setValueProcessData(value, mutate);
|
|
154
|
+
setValue(value, mutate, force){
|
|
155
|
+
var changed = this.setValueProcessData(value, mutate, force);
|
|
188
156
|
|
|
189
157
|
if(changed){
|
|
190
158
|
this.dispatch("cell-value-updated", this);
|
|
@@ -203,10 +171,10 @@ export default class Cell extends CoreFeature{
|
|
|
203
171
|
}
|
|
204
172
|
}
|
|
205
173
|
|
|
206
|
-
setValueProcessData(value, mutate){
|
|
174
|
+
setValueProcessData(value, mutate, force){
|
|
207
175
|
var changed = false;
|
|
208
176
|
|
|
209
|
-
if(this.value !== value){
|
|
177
|
+
if(this.value !== value || force){
|
|
210
178
|
|
|
211
179
|
changed = true;
|
|
212
180
|
|
|
@@ -242,7 +210,6 @@ export default class Cell extends CoreFeature{
|
|
|
242
210
|
|
|
243
211
|
layoutElement(){
|
|
244
212
|
this._generateContents();
|
|
245
|
-
this._generateTooltip();
|
|
246
213
|
|
|
247
214
|
this.dispatch("cell-layout", this);
|
|
248
215
|
}
|
|
@@ -279,11 +246,15 @@ export default class Cell extends CoreFeature{
|
|
|
279
246
|
clearHeight(){
|
|
280
247
|
this.element.style.height = "";
|
|
281
248
|
this.height = null;
|
|
249
|
+
|
|
250
|
+
this.dispatch("cell-height", this, "");
|
|
282
251
|
}
|
|
283
252
|
|
|
284
253
|
setHeight(){
|
|
285
254
|
this.height = this.row.height;
|
|
286
|
-
this.element.style.height =
|
|
255
|
+
this.element.style.height = this.row.heightStyled;
|
|
256
|
+
|
|
257
|
+
this.dispatch("cell-height", this, this.row.heightStyled);
|
|
287
258
|
}
|
|
288
259
|
|
|
289
260
|
getHeight(){
|
|
@@ -20,7 +20,6 @@ class Column extends CoreFeature{
|
|
|
20
20
|
this.titleElement = false;
|
|
21
21
|
this.groupElement = this.createGroupElement(); //column group holder element
|
|
22
22
|
this.isGroup = false;
|
|
23
|
-
this.tooltip = false; //hold column tooltip
|
|
24
23
|
this.hozAlign = ""; //horizontal text alignment
|
|
25
24
|
this.vertAlign = ""; //vert text alignment
|
|
26
25
|
|
|
@@ -145,39 +144,6 @@ class Column extends CoreFeature{
|
|
|
145
144
|
//all previously deprecated functionality removed in the 5.0 release
|
|
146
145
|
}
|
|
147
146
|
|
|
148
|
-
setTooltip(){
|
|
149
|
-
var def = this.definition;
|
|
150
|
-
|
|
151
|
-
//set header tooltips
|
|
152
|
-
var tooltip = def.headerTooltip;
|
|
153
|
-
|
|
154
|
-
if(tooltip){
|
|
155
|
-
if(tooltip === true){
|
|
156
|
-
if(def.field){
|
|
157
|
-
this.langBind("columns|" + def.field, (value) => {
|
|
158
|
-
this.element.setAttribute("title", value || def.title);
|
|
159
|
-
});
|
|
160
|
-
}else{
|
|
161
|
-
this.element.setAttribute("title", def.title);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
}else{
|
|
165
|
-
if(typeof(tooltip) == "function"){
|
|
166
|
-
tooltip = tooltip(this.getComponent());
|
|
167
|
-
|
|
168
|
-
if(tooltip === false){
|
|
169
|
-
tooltip = "";
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
this.element.setAttribute("title", tooltip);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
}else{
|
|
177
|
-
this.element.setAttribute("title", "");
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
147
|
//build header element
|
|
182
148
|
_initialize(){
|
|
183
149
|
var def = this.definition;
|
|
@@ -204,14 +170,7 @@ class Column extends CoreFeature{
|
|
|
204
170
|
this._buildColumnHeader();
|
|
205
171
|
}
|
|
206
172
|
|
|
207
|
-
this.setTooltip();
|
|
208
|
-
|
|
209
173
|
this.dispatch("column-init", this);
|
|
210
|
-
|
|
211
|
-
//update header tooltip on mouse enter
|
|
212
|
-
this.element.addEventListener("mouseenter", (e) => {
|
|
213
|
-
this.setTooltip();
|
|
214
|
-
});
|
|
215
174
|
}
|
|
216
175
|
|
|
217
176
|
_bindEvents(){
|
|
@@ -332,9 +291,6 @@ class Column extends CoreFeature{
|
|
|
332
291
|
|
|
333
292
|
this.reinitializeWidth();
|
|
334
293
|
|
|
335
|
-
//set tooltip if present
|
|
336
|
-
this.tooltip = this.definition.tooltip;
|
|
337
|
-
|
|
338
294
|
//set orizontal text alignment
|
|
339
295
|
this.hozAlign = this.definition.hozAlign;
|
|
340
296
|
this.vertAlign = this.definition.vertAlign;
|
|
@@ -510,6 +466,8 @@ class Column extends CoreFeature{
|
|
|
510
466
|
if(this.groupElement){
|
|
511
467
|
this.columns.push(column);
|
|
512
468
|
this.groupElement.appendChild(column.getElement());
|
|
469
|
+
|
|
470
|
+
column.columnRendered();
|
|
513
471
|
}else{
|
|
514
472
|
console.warn("Column Warning - Column being attached to another column instead of column group");
|
|
515
473
|
}
|
|
@@ -524,6 +482,8 @@ class Column extends CoreFeature{
|
|
|
524
482
|
|
|
525
483
|
this.element.style.height = parentHeight + "px";
|
|
526
484
|
|
|
485
|
+
this.dispatch("column-height", this, this.element.style.height);
|
|
486
|
+
|
|
527
487
|
if(this.isGroup){
|
|
528
488
|
this.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + "px";
|
|
529
489
|
}
|
|
@@ -552,6 +512,8 @@ class Column extends CoreFeature{
|
|
|
552
512
|
this.columns.forEach(function(column){
|
|
553
513
|
column.clearVerticalAlign();
|
|
554
514
|
});
|
|
515
|
+
|
|
516
|
+
this.dispatch("column-height", this, "");
|
|
555
517
|
}
|
|
556
518
|
|
|
557
519
|
bindModuleColumns (){
|
|
@@ -901,6 +863,8 @@ class Column extends CoreFeature{
|
|
|
901
863
|
if(this.titleFormatterRendered){
|
|
902
864
|
this.titleFormatterRendered();
|
|
903
865
|
}
|
|
866
|
+
|
|
867
|
+
this.dispatch("column-rendered", this);
|
|
904
868
|
}
|
|
905
869
|
|
|
906
870
|
//////////////// Cell Management /////////////////
|
|
@@ -9,10 +9,8 @@ export default {
|
|
|
9
9
|
"minWidth": 40,
|
|
10
10
|
"maxWidth": undefined,
|
|
11
11
|
"maxInitialWidth": undefined,
|
|
12
|
-
"tooltip": undefined,
|
|
13
12
|
"cssClass": undefined,
|
|
14
13
|
"variableHeight": undefined,
|
|
15
|
-
"headerTooltip": undefined,
|
|
16
14
|
"headerVertical": undefined,
|
|
17
15
|
"headerHozAlign": undefined,
|
|
18
16
|
"editableTitle": undefined,
|
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
debugEventsExternal:false, //flag to console log events
|
|
4
4
|
debugEventsInternal:false, //flag to console log events
|
|
5
5
|
debugInvalidOptions:true, //allow toggling of invalid option warnings
|
|
6
|
+
debugInitialization:true, //allow toggling of invalid option warnings
|
|
6
7
|
|
|
7
8
|
height:false, //height of tabulator
|
|
8
9
|
minHeight:false, //minimum height of tabulator
|
|
@@ -10,6 +11,8 @@ export default {
|
|
|
10
11
|
|
|
11
12
|
columnHeaderVertAlign:"top", //vertical alignment of column headers
|
|
12
13
|
|
|
14
|
+
popupContainer:false,
|
|
15
|
+
|
|
13
16
|
columns:[],//store for colum header info
|
|
14
17
|
columnDefaults:{}, //store column default props
|
|
15
18
|
|
|
@@ -20,8 +23,6 @@ export default {
|
|
|
20
23
|
|
|
21
24
|
nestedFieldSeparator:".", //separator for nested data
|
|
22
25
|
|
|
23
|
-
tooltipGenerationMode:"load", //when to generate tooltips
|
|
24
|
-
|
|
25
26
|
footerElement:false, //hold footer element
|
|
26
27
|
|
|
27
28
|
index:"id", //filed for row index
|
|
@@ -47,6 +48,8 @@ export default {
|
|
|
47
48
|
rowFormatterClipboard:null,
|
|
48
49
|
rowFormatterHtmlOutput:null,
|
|
49
50
|
|
|
51
|
+
rowHeight:null,
|
|
52
|
+
|
|
50
53
|
placeholder:false,
|
|
51
54
|
|
|
52
55
|
dataLoader:true,
|
|
@@ -22,6 +22,7 @@ export {default as MoveRowsModule} from '../../modules/MoveRows/MoveRows.js';
|
|
|
22
22
|
export {default as MutatorModule} from '../../modules/Mutator/Mutator.js';
|
|
23
23
|
export {default as PageModule} from '../../modules/Page/Page.js';
|
|
24
24
|
export {default as PersistenceModule} from '../../modules/Persistence/Persistence.js';
|
|
25
|
+
export {default as PopupModule} from '../../modules/Popup/Popup.js';
|
|
25
26
|
export {default as PrintModule} from '../../modules/Print/Print.js';
|
|
26
27
|
export {default as ReactiveDataModule} from '../../modules/ReactiveData/ReactiveData.js';
|
|
27
28
|
export {default as ResizeColumnsModule} from '../../modules/ResizeColumns/ResizeColumns.js';
|
|
@@ -30,4 +31,5 @@ export {default as ResizeTableModule} from '../../modules/ResizeTable/ResizeTabl
|
|
|
30
31
|
export {default as ResponsiveLayoutModule} from '../../modules/ResponsiveLayout/ResponsiveLayout.js';
|
|
31
32
|
export {default as SelectRowModule} from '../../modules/SelectRow/SelectRow.js';
|
|
32
33
|
export {default as SortModule} from '../../modules/Sort/Sort.js';
|
|
34
|
+
export {default as TooltipModule} from '../../modules/Tooltip/Tooltip.js';
|
|
33
35
|
export {default as ValidateModule} from '../../modules/Validate/Validate.js';
|
|
@@ -76,9 +76,12 @@ export default class VirtualDomHorizontal extends Renderer{
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
vertScrollListen(){
|
|
79
|
-
this.subscribe("scroll-vertical", ()
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
this.subscribe("scroll-vertical", this.clearVisRowCache.bind(this));
|
|
80
|
+
this.subscribe("data-refreshed", this.clearVisRowCache.bind(this));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
clearVisRowCache(){
|
|
84
|
+
this.visibleRows = null;
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
//////////////////////////////////////
|