tabulator-tables 5.0.7 → 5.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/.editorconfig +6 -0
- package/LICENSE +1 -1
- package/bower.json +1 -1
- package/build/rollup.js +1 -1
- package/dist/css/tabulator.css +15 -2
- 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 +15 -2
- 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 +15 -2
- 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_bulma.css +15 -2
- 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 +22 -6
- 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 +19 -2
- 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 +15 -2
- 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 +15 -2
- 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 +15 -2
- 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 +19 -2
- 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 +1121 -533
- 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 +1566 -991
- 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/ColumnManager.js +4 -2
- package/src/js/core/CoreFeature.js +1 -5
- package/src/js/core/RowManager.js +15 -9
- package/src/js/core/Tabulator.js +14 -59
- package/src/js/core/cell/Cell.js +5 -1
- package/src/js/core/column/Column.js +21 -6
- package/src/js/core/column/ColumnComponent.js +4 -0
- package/src/js/core/column/defaults/options.js +1 -0
- package/src/js/core/defaults/options.js +3 -3
- package/src/js/core/modules/optional.js +1 -0
- package/src/js/core/rendering/Renderer.js +3 -2
- package/src/js/core/rendering/renderers/BasicVertical.js +2 -1
- package/src/js/core/rendering/renderers/VirtualDomHorizontal.js +165 -151
- package/src/js/core/rendering/renderers/VirtualDomVertical.js +1 -1
- package/src/js/core/row/Row.js +2 -2
- package/src/js/core/tools/{ComponentFuctionBinder.js → ComponentFunctionBinder.js} +1 -1
- package/src/js/core/tools/DataLoader.js +6 -6
- package/src/js/core/tools/InteractionMonitor.js +149 -49
- package/src/js/core/tools/OptionsList.js +2 -2
- package/src/js/modules/Ajax/Ajax.js +62 -82
- package/src/js/modules/ColumnCalcs/ColumnCalcs.js +15 -2
- package/src/js/modules/DataTree/DataTree.js +23 -9
- package/src/js/modules/Download/defaults/downloaders/json.js +1 -1
- package/src/js/modules/Download/defaults/downloaders/jsonLines.js +32 -0
- package/src/js/modules/Download/defaults/downloaders/pdf.js +0 -2
- package/src/js/modules/Download/defaults/downloaders/xlsx.js +3 -2
- package/src/js/modules/Download/defaults/downloaders.js +2 -0
- package/src/js/modules/Edit/Edit.js +27 -39
- package/src/js/modules/Edit/defaults/editors/progress.js +2 -2
- package/src/js/modules/Export/Export.js +1 -1
- package/src/js/modules/Filter/Filter.js +2 -2
- package/src/js/modules/Format/defaults/formatters/datetime.js +2 -2
- package/src/js/modules/Format/defaults/formatters/datetimediff.js +2 -1
- package/src/js/modules/FrozenColumns/FrozenColumns.js +1 -1
- package/src/js/modules/FrozenRows/FrozenRows.js +9 -0
- package/src/js/modules/GroupRows/Group.js +18 -67
- package/src/js/modules/GroupRows/GroupRows.js +8 -3
- package/src/js/modules/HtmlTableImport/HtmlTableImport.js +4 -7
- package/src/js/modules/Import/Import.js +197 -0
- package/src/js/modules/Import/defaults/importers/csv.js +63 -0
- package/src/js/modules/Import/defaults/importers/json.js +8 -0
- package/src/js/modules/Import/defaults/importers.js +7 -0
- package/src/js/modules/Interaction/Interaction.js +5 -0
- package/src/js/modules/Keybindings/Keybindings.js +9 -14
- package/src/js/modules/Keybindings/defaults/bindings.js +3 -3
- package/src/js/modules/Localize/defaults/langs.js +6 -0
- package/src/js/modules/Menu/Menu.js +200 -155
- package/src/js/modules/MoveColumns/MoveColumns.js +58 -57
- package/src/js/modules/MoveRows/MoveRows.js +4 -0
- package/src/js/modules/Page/Page.js +279 -183
- package/src/js/modules/Page/defaults/pageCounters/pages.js +33 -0
- package/src/js/modules/Page/defaults/pageCounters/rows.js +32 -0
- package/src/js/modules/Page/defaults/pageCounters.js +8 -0
- package/src/js/modules/ResizeRows/ResizeRows.js +1 -1
- package/src/js/modules/ResponsiveLayout/ResponsiveLayout.js +3 -5
- package/src/js/modules/SelectRow/SelectRow.js +4 -8
- package/src/js/modules/Sort/Sort.js +1 -1
- package/src/js/modules/Sort/defaults/sorters/datetime.js +3 -2
- package/src/js/modules/Validate/Validate.js +7 -5
- package/src/scss/tabulator.scss +20 -2
- package/src/scss/themes/materialize/tabulator_materialize.scss +5 -4
- package/src/scss/themes/tabulator_midnight.scss +4 -0
- package/src/scss/themes/tabulator_site.scss +4 -0
package/package.json
CHANGED
|
@@ -7,6 +7,8 @@ import OptionsList from './tools/OptionsList.js';
|
|
|
7
7
|
import RendererBasicHorizontal from './rendering/renderers/BasicHorizontal.js';
|
|
8
8
|
import RendererVirtualDomHorizontal from './rendering/renderers/VirtualDomHorizontal.js';
|
|
9
9
|
|
|
10
|
+
import defaultColumnOptions from './column/defaults/options.js';
|
|
11
|
+
|
|
10
12
|
export default class ColumnManager extends CoreFeature {
|
|
11
13
|
|
|
12
14
|
constructor (table){
|
|
@@ -19,7 +21,7 @@ export default class ColumnManager extends CoreFeature {
|
|
|
19
21
|
this.columnsByIndex = []; //columns by index
|
|
20
22
|
this.columnsByField = {}; //columns by field
|
|
21
23
|
this.scrollLeft = 0;
|
|
22
|
-
this.optionsList = new OptionsList(this.table, "column definition");
|
|
24
|
+
this.optionsList = new OptionsList(this.table, "column definition", defaultColumnOptions);
|
|
23
25
|
|
|
24
26
|
this.renderer = null;
|
|
25
27
|
}
|
|
@@ -348,7 +350,7 @@ export default class ColumnManager extends CoreFeature {
|
|
|
348
350
|
return this.columnsByIndex[index];
|
|
349
351
|
}
|
|
350
352
|
|
|
351
|
-
|
|
353
|
+
getFirstVisibleColumn(index){
|
|
352
354
|
var index = this.columnsByIndex.findIndex((col) => {
|
|
353
355
|
return col.visible;
|
|
354
356
|
});
|
|
@@ -102,11 +102,7 @@ export default class CoreFeature{
|
|
|
102
102
|
//////////////// Options /////////////////
|
|
103
103
|
//////////////////////////////////////////
|
|
104
104
|
|
|
105
|
-
options(key
|
|
106
|
-
if(typeof value !== "undefined"){
|
|
107
|
-
this.table.options[key] = value;
|
|
108
|
-
}
|
|
109
|
-
|
|
105
|
+
options(key){
|
|
110
106
|
return this.table.options[key];
|
|
111
107
|
}
|
|
112
108
|
|
|
@@ -20,7 +20,7 @@ export default class RowManager extends CoreFeature{
|
|
|
20
20
|
this.fixedHeight = false; //current rendering mode
|
|
21
21
|
|
|
22
22
|
this.rows = []; //hold row data objects
|
|
23
|
-
this.activeRowsPipeline = []; //hold
|
|
23
|
+
this.activeRowsPipeline = []; //hold calculation of active rows
|
|
24
24
|
this.activeRows = []; //rows currently available to on display in the table
|
|
25
25
|
this.activeRowsCount = 0; //count of active rows
|
|
26
26
|
|
|
@@ -32,9 +32,9 @@ export default class RowManager extends CoreFeature{
|
|
|
32
32
|
|
|
33
33
|
this.rowNumColumn = false; //hold column component for row number column
|
|
34
34
|
|
|
35
|
-
this.redrawBlock = false; //prevent redraws to allow multiple data manipulations
|
|
35
|
+
this.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing
|
|
36
36
|
this.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed
|
|
37
|
-
this.
|
|
37
|
+
this.redrawBlockRenderInPosition = false; //store latest redraw function calls for when redraw is needed
|
|
38
38
|
|
|
39
39
|
this.dataPipeline = []; //hold data pipeline tasks
|
|
40
40
|
this.displayPipeline = []; //hold data display pipeline tasks
|
|
@@ -709,7 +709,7 @@ export default class RowManager extends CoreFeature{
|
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
-
this.dispatch("data-
|
|
712
|
+
this.dispatch("data-refreshed");
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
|
|
@@ -772,8 +772,14 @@ export default class RowManager extends CoreFeature{
|
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
-
getVisibleRows(viewable){
|
|
776
|
-
|
|
775
|
+
getVisibleRows(chain, viewable){
|
|
776
|
+
var rows = Object.assign([], this.renderer.visibleRows(!viewable));
|
|
777
|
+
|
|
778
|
+
if(chain){
|
|
779
|
+
rows = this.chain("rows-visible", [viewable], rows, rows);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
return rows;
|
|
777
783
|
}
|
|
778
784
|
|
|
779
785
|
//repeat action accross display rows
|
|
@@ -815,7 +821,7 @@ export default class RowManager extends CoreFeature{
|
|
|
815
821
|
if(callback){
|
|
816
822
|
callback();
|
|
817
823
|
}else{
|
|
818
|
-
this.
|
|
824
|
+
this.redrawBlockRenderInPosition = true;
|
|
819
825
|
}
|
|
820
826
|
}else{
|
|
821
827
|
this.renderer.rerenderRows(callback);
|
|
@@ -995,12 +1001,12 @@ export default class RowManager extends CoreFeature{
|
|
|
995
1001
|
|
|
996
1002
|
this.redrawBlockRestoreConfig = false;
|
|
997
1003
|
}else{
|
|
998
|
-
if(this.
|
|
1004
|
+
if(this.redrawBlockRenderInPosition){
|
|
999
1005
|
this.reRenderInPosition();
|
|
1000
1006
|
}
|
|
1001
1007
|
}
|
|
1002
1008
|
|
|
1003
|
-
this.
|
|
1009
|
+
this.redrawBlockRenderInPosition = false;
|
|
1004
1010
|
}
|
|
1005
1011
|
|
|
1006
1012
|
//redraw table
|
package/src/js/core/Tabulator.js
CHANGED
|
@@ -7,7 +7,7 @@ import RowManager from './RowManager.js';
|
|
|
7
7
|
import FooterManager from './FooterManager.js';
|
|
8
8
|
|
|
9
9
|
import InteractionMonitor from './tools/InteractionMonitor.js';
|
|
10
|
-
import
|
|
10
|
+
import ComponentFunctionBinder from './tools/ComponentFunctionBinder.js';
|
|
11
11
|
import DataLoader from './tools/DataLoader.js';
|
|
12
12
|
|
|
13
13
|
import ExternalEventBus from './tools/ExternalEventBus.js';
|
|
@@ -33,11 +33,11 @@ class Tabulator {
|
|
|
33
33
|
this.interactionMonitor = false; //track user interaction
|
|
34
34
|
this.browser = ""; //hold current browser type
|
|
35
35
|
this.browserSlow = false; //handle reduced functionality for slower browsers
|
|
36
|
-
this.browserMobile = false; //check if running on
|
|
36
|
+
this.browserMobile = false; //check if running on mobile, prevent resize cancelling edit on keyboard appearance
|
|
37
37
|
this.rtl = false; //check if the table is in RTL mode
|
|
38
38
|
this.originalElement = null; //hold original table element if it has been replaced
|
|
39
39
|
|
|
40
|
-
this.componentFunctionBinder = new
|
|
40
|
+
this.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions
|
|
41
41
|
this.dataLoader = false; //bind component functions
|
|
42
42
|
|
|
43
43
|
this.modules = {}; //hold all modules bound to this table
|
|
@@ -52,13 +52,13 @@ class Tabulator {
|
|
|
52
52
|
|
|
53
53
|
this.initialzeCoreSystems(options);
|
|
54
54
|
|
|
55
|
-
//delay table creation to allow event bindings
|
|
55
|
+
//delay table creation to allow event bindings immediately after the constructor
|
|
56
56
|
setTimeout(() => {
|
|
57
57
|
this._create();
|
|
58
58
|
})
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
TableRegistry.register(this); //register table for
|
|
61
|
+
TableRegistry.register(this); //register table for inter-device communication
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
initializeElement(element){
|
|
@@ -92,7 +92,7 @@ class Tabulator {
|
|
|
92
92
|
|
|
93
93
|
this._clearObjectPointers();
|
|
94
94
|
|
|
95
|
-
this.
|
|
95
|
+
this._mapDeprecatedFunctionality();
|
|
96
96
|
|
|
97
97
|
this.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);
|
|
98
98
|
this.eventBus = new InternalEventBus(this.options.debugEventsInternal);
|
|
@@ -105,8 +105,8 @@ class Tabulator {
|
|
|
105
105
|
this.footerManager.initialize();
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
//convert
|
|
109
|
-
|
|
108
|
+
//convert deprecated functionality to new functions
|
|
109
|
+
_mapDeprecatedFunctionality(){
|
|
110
110
|
//all previously deprecated functionality removed in the 5.0 release
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -127,7 +127,7 @@ class Tabulator {
|
|
|
127
127
|
this.element.classList.remove("tabulator-block-select");
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
//
|
|
130
|
+
//create table
|
|
131
131
|
_create(){
|
|
132
132
|
this.externalEvents.dispatch("tableBuilding");
|
|
133
133
|
this.eventBus.dispatch("table-building");
|
|
@@ -232,6 +232,8 @@ class Tabulator {
|
|
|
232
232
|
var element = this.element,
|
|
233
233
|
options = this.options;
|
|
234
234
|
|
|
235
|
+
this.interactionMonitor.initialize();
|
|
236
|
+
|
|
235
237
|
this.columnManager.initialize();
|
|
236
238
|
this.rowManager.initialize();
|
|
237
239
|
|
|
@@ -290,7 +292,7 @@ class Tabulator {
|
|
|
290
292
|
destroy(){
|
|
291
293
|
var element = this.element;
|
|
292
294
|
|
|
293
|
-
TableRegistry.deregister(this); //deregister table from
|
|
295
|
+
TableRegistry.deregister(this); //deregister table from inter-device communication
|
|
294
296
|
|
|
295
297
|
this.eventBus.dispatch("table-destroy");
|
|
296
298
|
|
|
@@ -339,49 +341,6 @@ class Tabulator {
|
|
|
339
341
|
return this.rowManager.restoreRedraw();
|
|
340
342
|
}
|
|
341
343
|
|
|
342
|
-
//local data from local file
|
|
343
|
-
setDataFromLocalFile(extensions){
|
|
344
|
-
return new Promise((resolve, reject) => {
|
|
345
|
-
var input = document.createElement("input");
|
|
346
|
-
input.type = "file";
|
|
347
|
-
input.accept = extensions || ".json,application/json";
|
|
348
|
-
|
|
349
|
-
input.addEventListener("change", (e) => {
|
|
350
|
-
var file = input.files[0],
|
|
351
|
-
reader = new FileReader(),
|
|
352
|
-
data;
|
|
353
|
-
|
|
354
|
-
reader.readAsText(file);
|
|
355
|
-
|
|
356
|
-
reader.onload = (e) => {
|
|
357
|
-
|
|
358
|
-
try {
|
|
359
|
-
data = JSON.parse(reader.result);
|
|
360
|
-
} catch(e) {
|
|
361
|
-
console.warn("File Load Error - File contents is invalid JSON", e);
|
|
362
|
-
reject(e);
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
this.setData(data)
|
|
367
|
-
.then((data) => {
|
|
368
|
-
resolve(data);
|
|
369
|
-
})
|
|
370
|
-
.catch((err) => {
|
|
371
|
-
resolve(err);
|
|
372
|
-
});
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
reader.onerror = (e) => {
|
|
376
|
-
console.warn("File Load Error - Unable to read file");
|
|
377
|
-
reject();
|
|
378
|
-
};
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
input.click();
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
|
|
385
344
|
//load data
|
|
386
345
|
setData(data, params, config){
|
|
387
346
|
if(this.initialized){
|
|
@@ -644,7 +603,7 @@ class Tabulator {
|
|
|
644
603
|
if(row){
|
|
645
604
|
return row.updateData(data)
|
|
646
605
|
.then(()=>{
|
|
647
|
-
resolve(row.getComponent());
|
|
606
|
+
return Promise.resolve(row.getComponent());
|
|
648
607
|
})
|
|
649
608
|
}else{
|
|
650
609
|
console.warn("Update Error - No matching row found:", index);
|
|
@@ -675,11 +634,7 @@ class Tabulator {
|
|
|
675
634
|
}
|
|
676
635
|
|
|
677
636
|
getRows(active){
|
|
678
|
-
|
|
679
|
-
return this.rowManager.getComponents(active);
|
|
680
|
-
}else{
|
|
681
|
-
console.warn("getRows failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.");
|
|
682
|
-
}
|
|
637
|
+
return this.rowManager.getComponents(active);
|
|
683
638
|
}
|
|
684
639
|
|
|
685
640
|
//get position of row in table
|
package/src/js/core/cell/Cell.js
CHANGED
|
@@ -191,6 +191,10 @@ export default class Cell extends CoreFeature{
|
|
|
191
191
|
|
|
192
192
|
this.cellRendered();
|
|
193
193
|
|
|
194
|
+
if(this.column.definition.cellEdited){
|
|
195
|
+
this.column.definition.cellEdited.call(this.table, this.getComponent());
|
|
196
|
+
}
|
|
197
|
+
|
|
194
198
|
this.dispatchExternal("cellEdited", this.getComponent());
|
|
195
199
|
|
|
196
200
|
if(this.subscribedExternal("dataChanged")){
|
|
@@ -202,7 +206,7 @@ export default class Cell extends CoreFeature{
|
|
|
202
206
|
setValueProcessData(value, mutate){
|
|
203
207
|
var changed = false;
|
|
204
208
|
|
|
205
|
-
if(this.value
|
|
209
|
+
if(this.value !== value){
|
|
206
210
|
|
|
207
211
|
changed = true;
|
|
208
212
|
|
|
@@ -30,6 +30,7 @@ class Column extends CoreFeature{
|
|
|
30
30
|
this.getFieldValue = "";
|
|
31
31
|
this.setFieldValue = "";
|
|
32
32
|
|
|
33
|
+
this.titleDownload = null;
|
|
33
34
|
this.titleFormatterRendered = false;
|
|
34
35
|
|
|
35
36
|
this.mapDefinitions();
|
|
@@ -42,6 +43,7 @@ class Column extends CoreFeature{
|
|
|
42
43
|
this.widthStyled = ""; //column width prestyled to improve render efficiency
|
|
43
44
|
this.maxWidth = null; //column maximum width
|
|
44
45
|
this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency
|
|
46
|
+
this.maxInitialWidth = null;
|
|
45
47
|
this.minWidth = null; //column minimum width
|
|
46
48
|
this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency
|
|
47
49
|
this.widthFixed = false; //user has specified a width for this column
|
|
@@ -147,7 +149,7 @@ class Column extends CoreFeature{
|
|
|
147
149
|
var def = this.definition;
|
|
148
150
|
|
|
149
151
|
//set header tooltips
|
|
150
|
-
var tooltip =
|
|
152
|
+
var tooltip = def.headerTooltip;
|
|
151
153
|
|
|
152
154
|
if(tooltip){
|
|
153
155
|
if(tooltip === true){
|
|
@@ -320,6 +322,10 @@ class Column extends CoreFeature{
|
|
|
320
322
|
//set min width if present
|
|
321
323
|
this.setMinWidth(parseInt(def.minWidth));
|
|
322
324
|
|
|
325
|
+
if (def.maxInitialWidth) {
|
|
326
|
+
this.maxInitialWidth = parseInt(def.maxInitialWidth);
|
|
327
|
+
}
|
|
328
|
+
|
|
323
329
|
if(def.maxWidth){
|
|
324
330
|
this.setMaxWidth(parseInt(def.maxWidth));
|
|
325
331
|
}
|
|
@@ -571,6 +577,10 @@ class Column extends CoreFeature{
|
|
|
571
577
|
return this.field;
|
|
572
578
|
}
|
|
573
579
|
|
|
580
|
+
getTitleDownload() {
|
|
581
|
+
return this.titleDownload;
|
|
582
|
+
}
|
|
583
|
+
|
|
574
584
|
//return the first column in a group
|
|
575
585
|
getFirstColumn(){
|
|
576
586
|
if(!this.isGroup){
|
|
@@ -703,7 +713,7 @@ class Column extends CoreFeature{
|
|
|
703
713
|
cell.hide();
|
|
704
714
|
});
|
|
705
715
|
|
|
706
|
-
this.dispatch("column-hide", this);
|
|
716
|
+
this.dispatch("column-hide", this, responsiveToggle);
|
|
707
717
|
|
|
708
718
|
if(!silent){
|
|
709
719
|
this.dispatchExternal("columnVisibilityChanged", this.getComponent(), false);
|
|
@@ -823,7 +833,7 @@ class Column extends CoreFeature{
|
|
|
823
833
|
}
|
|
824
834
|
|
|
825
835
|
getHeight(){
|
|
826
|
-
return this.element.
|
|
836
|
+
return Math.ceil(this.element.getBoundingClientRect().height);
|
|
827
837
|
}
|
|
828
838
|
|
|
829
839
|
setMinWidth(minWidth){
|
|
@@ -928,18 +938,19 @@ class Column extends CoreFeature{
|
|
|
928
938
|
|
|
929
939
|
//set width if present
|
|
930
940
|
if(typeof this.definition.width !== "undefined" && !force){
|
|
941
|
+
// maxInitialWidth ignored here as width specified
|
|
931
942
|
this.setWidth(this.definition.width);
|
|
932
943
|
}
|
|
933
944
|
|
|
934
945
|
this.dispatch("column-width-fit-before", this);
|
|
935
946
|
|
|
936
|
-
this.fitToData();
|
|
947
|
+
this.fitToData(force);
|
|
937
948
|
|
|
938
949
|
this.dispatch("column-width-fit-after", this);
|
|
939
950
|
}
|
|
940
951
|
|
|
941
952
|
//set column width to maximum cell width for non group columns
|
|
942
|
-
fitToData(){
|
|
953
|
+
fitToData(force){
|
|
943
954
|
if(this.isGroup){
|
|
944
955
|
return;
|
|
945
956
|
}
|
|
@@ -964,7 +975,11 @@ class Column extends CoreFeature{
|
|
|
964
975
|
});
|
|
965
976
|
|
|
966
977
|
if(maxWidth){
|
|
967
|
-
|
|
978
|
+
var setTo = maxWidth + 1;
|
|
979
|
+
if (this.maxInitialWidth && !force) {
|
|
980
|
+
setTo = Math.min(setTo, this.maxInitialWidth);
|
|
981
|
+
}
|
|
982
|
+
this.setWidthActual(setTo);
|
|
968
983
|
}
|
|
969
984
|
}
|
|
970
985
|
}
|
|
@@ -8,7 +8,6 @@ export default {
|
|
|
8
8
|
minHeight:false, //minimum height of tabulator
|
|
9
9
|
maxHeight:false, //maximum height of tabulator
|
|
10
10
|
|
|
11
|
-
columnMaxWidth:false, //minimum global width for a column
|
|
12
11
|
columnHeaderVertAlign:"top", //vertical alignment of column headers
|
|
13
12
|
|
|
14
13
|
columns:[],//store for colum header info
|
|
@@ -19,7 +18,7 @@ export default {
|
|
|
19
18
|
autoColumns:false, //build columns from data row structure
|
|
20
19
|
autoColumnsDefinitions:false,
|
|
21
20
|
|
|
22
|
-
nestedFieldSeparator:".", //
|
|
21
|
+
nestedFieldSeparator:".", //separator for nested data
|
|
23
22
|
|
|
24
23
|
tooltipGenerationMode:"load", //when to generate tooltips
|
|
25
24
|
|
|
@@ -53,8 +52,9 @@ export default {
|
|
|
53
52
|
dataLoader:true,
|
|
54
53
|
dataLoaderLoading:false,
|
|
55
54
|
dataLoaderError:false,
|
|
55
|
+
dataLoaderErrorTimeout:3000,
|
|
56
56
|
|
|
57
57
|
dataSendParams:{},
|
|
58
58
|
|
|
59
59
|
dataReceiveParams:{},
|
|
60
|
-
}
|
|
60
|
+
}
|
|
@@ -13,6 +13,7 @@ export {default as FrozenRowsModule} from '../../modules/FrozenRows/FrozenRows.j
|
|
|
13
13
|
export {default as GroupRowsModule} from '../../modules/GroupRows/GroupRows.js';
|
|
14
14
|
export {default as HistoryModule} from '../../modules/History/History.js';
|
|
15
15
|
export {default as HtmlTableImportModule} from '../../modules/HtmlTableImport/HtmlTableImport.js';
|
|
16
|
+
export {default as ImportModule} from '../../modules/Import/Import.js';
|
|
16
17
|
export {default as InteractionModule} from '../../modules/Interaction/Interaction.js';
|
|
17
18
|
export {default as KeybindingsModule} from '../../modules/Keybindings/Keybindings.js';
|
|
18
19
|
export {default as MenuModule} from '../../modules/Menu/Menu.js';
|
|
@@ -79,7 +79,7 @@ export default class Renderer extends CoreFeature{
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
scrollToRowNearestTop(row){
|
|
82
|
-
//
|
|
82
|
+
//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
visibleRows(includingBuffer){
|
|
@@ -146,8 +146,9 @@ export default class Renderer extends CoreFeature{
|
|
|
146
146
|
if(!ifVisible){
|
|
147
147
|
if(Helpers.elVisible(rowEl)){
|
|
148
148
|
offset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
if(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){
|
|
151
|
+
resolve();
|
|
151
152
|
return false;
|
|
152
153
|
}
|
|
153
154
|
}
|