tabulator-tables 5.0.1 → 5.0.6

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.
Files changed (59) hide show
  1. package/bower.json +1 -1
  2. package/build/rollup.js +1 -1
  3. package/dist/css/tabulator_bootstrap3.css +9 -0
  4. package/dist/css/tabulator_bootstrap3.css.map +1 -1
  5. package/dist/css/tabulator_bootstrap3.min.css +1 -1
  6. package/dist/css/tabulator_bootstrap3.min.css.map +1 -1
  7. package/dist/css/tabulator_bootstrap4.css +0 -4
  8. package/dist/css/tabulator_bootstrap4.css.map +1 -1
  9. package/dist/css/tabulator_bootstrap4.min.css +1 -1
  10. package/dist/css/tabulator_bootstrap4.min.css.map +1 -1
  11. package/dist/css/tabulator_bulma.css +5 -1
  12. package/dist/css/tabulator_bulma.css.map +1 -1
  13. package/dist/css/tabulator_bulma.min.css +1 -1
  14. package/dist/css/tabulator_bulma.min.css.map +1 -1
  15. package/dist/css/tabulator_semanticui.css +11 -2
  16. package/dist/css/tabulator_semanticui.css.map +1 -1
  17. package/dist/css/tabulator_semanticui.min.css +1 -1
  18. package/dist/css/tabulator_semanticui.min.css.map +1 -1
  19. package/dist/js/tabulator.js +295 -176
  20. package/dist/js/tabulator.js.map +1 -1
  21. package/dist/js/tabulator.min.js +2 -2
  22. package/dist/js/tabulator.min.js.map +1 -1
  23. package/dist/js/tabulator_esm.js +252 -153
  24. package/dist/js/tabulator_esm.js.map +1 -1
  25. package/dist/js/tabulator_esm.min.js +2 -2
  26. package/dist/js/tabulator_esm.min.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/js/core/ColumnManager.js +12 -12
  29. package/src/js/core/FooterManager.js +2 -2
  30. package/src/js/core/RowManager.js +6 -5
  31. package/src/js/core/Tabulator.js +64 -29
  32. package/src/js/core/column/Column.js +2 -2
  33. package/src/js/core/rendering/renderers/VirtualDomVertical.js +4 -0
  34. package/src/js/core/row/Row.js +4 -1
  35. package/src/js/core/tools/DataLoader.js +1 -1
  36. package/src/js/core/tools/ExternalEventBus.js +3 -2
  37. package/src/js/core/tools/Helpers.js +24 -7
  38. package/src/js/core/tools/InteractionMonitor.js +1 -0
  39. package/src/js/core/tools/ModuleBinder.js +1 -1
  40. package/src/js/modules/Accessor/Accessor.js +1 -1
  41. package/src/js/modules/Ajax/defaults/contentTypeFormatters.js +22 -1
  42. package/src/js/modules/DataTree/DataTree.js +1 -1
  43. package/src/js/modules/Edit/Edit.js +7 -6
  44. package/src/js/modules/Edit/defaults/editors/progress.js +2 -2
  45. package/src/js/modules/Filter/Filter.js +1 -1
  46. package/src/js/modules/Format/defaults/formatters/money.js +8 -1
  47. package/src/js/modules/FrozenColumns/FrozenColumns.js +21 -0
  48. package/src/js/modules/GroupRows/Group.js +2 -0
  49. package/src/js/modules/GroupRows/GroupRows.js +4 -6
  50. package/src/js/modules/History/defaults/redoers.js +1 -0
  51. package/src/js/modules/History/defaults/undoers.js +1 -0
  52. package/src/js/modules/HtmlTableImport/HtmlTableImport.js +4 -22
  53. package/src/js/modules/Page/Page.js +2 -2
  54. package/src/js/modules/ReactiveData/ReactiveData.js +28 -27
  55. package/src/js/modules/ResponsiveLayout/ResponsiveLayout.js +5 -1
  56. package/src/scss/themes/bootstrap/tabulator_bootstrap3.scss +9 -0
  57. package/src/scss/themes/bootstrap/tabulator_bootstrap4.scss +0 -4
  58. package/src/scss/themes/bulma/tabulator_bulma.scss +5 -1
  59. package/src/scss/themes/semanticui/tabulator_semanticui.scss +12 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabulator-tables",
3
- "version": "5.0.1",
3
+ "version": "5.0.6",
4
4
  "description": "Interactive table generation JavaScript library",
5
5
  "style": "dist/css/tabulator.css",
6
6
  "main": "dist/js/tabulator.js",
@@ -64,6 +64,7 @@ export default class ColumnManager extends CoreFeature {
64
64
  var el = document.createElement("div");
65
65
 
66
66
  el.classList.add("tabulator-headers");
67
+ el.setAttribute("role", "row");
67
68
 
68
69
  return el;
69
70
  }
@@ -72,6 +73,7 @@ export default class ColumnManager extends CoreFeature {
72
73
  var el = document.createElement("div");
73
74
 
74
75
  el.classList.add("tabulator-header");
76
+ el.setAttribute("role", "rowgroup");
75
77
 
76
78
  if(!this.table.options.headerVisible){
77
79
  el.classList.add("tabulator-header-hidden");
@@ -230,7 +232,6 @@ export default class ColumnManager extends CoreFeature {
230
232
  index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn;
231
233
 
232
234
  if(nextToColumn && index > -1){
233
-
234
235
  var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn());
235
236
  var nextEl = nextToColumn.getElement();
236
237
 
@@ -241,7 +242,6 @@ export default class ColumnManager extends CoreFeature {
241
242
  this.columns.splice(parentIndex + 1, 0, column);
242
243
  nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling);
243
244
  }
244
-
245
245
  }else{
246
246
  if(before){
247
247
  this.columns.unshift(column);
@@ -250,10 +250,10 @@ export default class ColumnManager extends CoreFeature {
250
250
  this.columns.push(column);
251
251
  this.headersElement.appendChild(column.getElement());
252
252
  }
253
-
254
- column.columnRendered();
255
253
  }
256
254
 
255
+ column.columnRendered();
256
+
257
257
  return column;
258
258
  }
259
259
 
@@ -276,7 +276,7 @@ export default class ColumnManager extends CoreFeature {
276
276
  }
277
277
 
278
278
  //ensure column headers take up the correct amount of space in column groups
279
- _verticalAlignHeaders(){
279
+ verticalAlignHeaders(){
280
280
  var minHeight = 0;
281
281
 
282
282
  this.columns.forEach((column) => {
@@ -433,7 +433,7 @@ export default class ColumnManager extends CoreFeature {
433
433
  to.element.parentNode.insertBefore(to.element, from.element);
434
434
  }
435
435
 
436
- this._verticalAlignHeaders();
436
+ this.verticalAlignHeaders();
437
437
 
438
438
  this.table.rowManager.reinitialize();
439
439
  }
@@ -614,7 +614,7 @@ export default class ColumnManager extends CoreFeature {
614
614
  column.reinitializeWidth();
615
615
  }
616
616
 
617
- this._verticalAlignHeaders();
617
+ this.verticalAlignHeaders();
618
618
 
619
619
  this.table.rowManager.reinitialize();
620
620
 
@@ -648,18 +648,18 @@ export default class ColumnManager extends CoreFeature {
648
648
  this.columns.splice(index, 1);
649
649
  }
650
650
 
651
- this._verticalAlignHeaders();
651
+ this.verticalAlignHeaders();
652
652
 
653
653
  this.redraw();
654
654
  }
655
655
 
656
656
  //redraw columns
657
657
  redraw(force){
658
- if(force){
659
- if(Helpers.elVisible(this.element)){
660
- this._verticalAlignHeaders();
661
- }
658
+ if(Helpers.elVisible(this.element)){
659
+ this.verticalAlignHeaders();
660
+ }
662
661
 
662
+ if(force){
663
663
  this.table.rowManager.resetScroll();
664
664
  this.table.rowManager.reinitialize();
665
665
  }
@@ -14,7 +14,7 @@ export default class FooterManager extends CoreFeature{
14
14
  }
15
15
 
16
16
  initialize(){
17
-
17
+ this.initializeElement();
18
18
  }
19
19
 
20
20
  createElement (){
@@ -25,7 +25,7 @@ export default class FooterManager extends CoreFeature{
25
25
  return el;
26
26
  }
27
27
 
28
- initializeElement(element){
28
+ initializeElement(){
29
29
  if(this.table.options.footerElement){
30
30
 
31
31
  switch(typeof this.table.options.footerElement){
@@ -49,6 +49,7 @@ export default class RowManager extends CoreFeature{
49
49
 
50
50
  el.classList.add("tabulator-tableholder");
51
51
  el.setAttribute("tabindex", 0);
52
+ el.setAttribute("role", "rowgroup");
52
53
 
53
54
  return el;
54
55
  }
@@ -57,6 +58,7 @@ export default class RowManager extends CoreFeature{
57
58
  var el = document.createElement("div");
58
59
 
59
60
  el.classList.add("tabulator-table");
61
+ el.setAttribute("role", "rowgroup");
60
62
 
61
63
  return el;
62
64
  }
@@ -179,13 +181,12 @@ export default class RowManager extends CoreFeature{
179
181
  });
180
182
  }
181
183
  }else{
182
- if(this.table.options.autoColumns && columnsChanged){
184
+ if(this.table.options.autoColumns && columnsChanged && this.table.initialized){
183
185
  this.table.columnManager.generateColumnsFromRowData(data);
184
186
  }
185
187
  this.resetScroll();
186
188
 
187
189
  this._setDataActual(data);
188
-
189
190
  }
190
191
 
191
192
  resolve();
@@ -306,7 +307,7 @@ export default class RowManager extends CoreFeature{
306
307
  this.dispatch("row-added", row, data, pos, index);
307
308
  });
308
309
 
309
- this.reRenderInPosition();
310
+ this.refreshActiveData(false, false, true);
310
311
 
311
312
  this.regenerateRowNumbers();
312
313
 
@@ -854,13 +855,13 @@ export default class RowManager extends CoreFeature{
854
855
  }
855
856
 
856
857
  renderTable(){
857
-
858
858
  this.dispatchExternal("renderStarted");
859
859
 
860
860
  this.element.scrollTop = 0;
861
861
 
862
+ this._clearTable();
863
+
862
864
  if(this.displayRowsCount){
863
- this._clearTable();
864
865
  this.renderer.renderRows();
865
866
 
866
867
  if(this.firstRender){
@@ -35,6 +35,7 @@ class Tabulator {
35
35
  this.browserSlow = false; //handle reduced functionality for slower browsers
36
36
  this.browserMobile = false; //check if running on moble, prevent resize cancelling edit on keyboard appearence
37
37
  this.rtl = false; //check if the table is in RTL mode
38
+ this.originalElement = null; //hold original table element if it has been replaced
38
39
 
39
40
  this.componentFunctionBinder = new ComponentFuctionBinder(this); //bind component functions
40
41
  this.dataLoader = false; //bind component functions
@@ -93,7 +94,7 @@ class Tabulator {
93
94
 
94
95
  this._mapDepricatedFunctionality();
95
96
 
96
- this.externalEvents = new ExternalEventBus(this.options, this.options.debugEventsExternal);
97
+ this.externalEvents = new ExternalEventBus(this, this.options, this.options.debugEventsExternal);
97
98
  this.eventBus = new InternalEventBus(this.options.debugEventsInternal);
98
99
 
99
100
  this.interactionMonitor = new InteractionMonitor(this);
@@ -104,28 +105,6 @@ class Tabulator {
104
105
  this.footerManager.initialize();
105
106
  }
106
107
 
107
- rtlCheck(){
108
- var style = window.getComputedStyle(this.element);
109
-
110
- switch(this.options.textDirection){
111
- case"auto":
112
- if(style.direction !== "rtl"){
113
- break;
114
- };
115
-
116
- case "rtl":
117
- this.element.classList.add("tabulator-rtl");
118
- this.rtl = true;
119
- break;
120
-
121
- case "ltr":
122
- this.element.classList.add("tabulator-ltr");
123
-
124
- default:
125
- this.rtl = false;
126
- }
127
- }
128
-
129
108
  //convert depricated functionality to new functions
130
109
  _mapDepricatedFunctionality(){
131
110
  //all previously deprecated functionality removed in the 5.0 release
@@ -153,13 +132,39 @@ class Tabulator {
153
132
  this.externalEvents.dispatch("tableBuilding");
154
133
  this.eventBus.dispatch("table-building");
155
134
 
156
- this.rtlCheck();
135
+ this._rtlCheck();
157
136
 
158
137
  this._buildElement();
159
138
 
139
+ this._initializeTable();
140
+
160
141
  this._loadInitialData();
161
142
 
162
143
  this.initialized = true;
144
+
145
+ this.externalEvents.dispatch("tableBuilt");
146
+ }
147
+
148
+ _rtlCheck(){
149
+ var style = window.getComputedStyle(this.element);
150
+
151
+ switch(this.options.textDirection){
152
+ case"auto":
153
+ if(style.direction !== "rtl"){
154
+ break;
155
+ };
156
+
157
+ case "rtl":
158
+ this.element.classList.add("tabulator-rtl");
159
+ this.rtl = true;
160
+ break;
161
+
162
+ case "ltr":
163
+ this.element.classList.add("tabulator-ltr");
164
+
165
+ default:
166
+ this.rtl = false;
167
+ }
163
168
  }
164
169
 
165
170
  //clear pointers to objects in default config object
@@ -174,7 +179,28 @@ class Tabulator {
174
179
  //build tabulator element
175
180
  _buildElement(){
176
181
  var element = this.element,
177
- options = this.options;
182
+ options = this.options,
183
+ newElement;
184
+
185
+ if(element.tagName === "TABLE"){
186
+ this.originalElement = this.element;
187
+ newElement = document.createElement("div");
188
+
189
+ //transfer attributes to new element
190
+ var attributes = element.attributes;
191
+
192
+ // loop through attributes and apply them on div
193
+ for(var i in attributes){
194
+ if(typeof attributes[i] == "object"){
195
+ newElement.setAttribute(attributes[i].name, attributes[i].value);
196
+ }
197
+ }
198
+
199
+ // replace table with div element
200
+ element.parentNode.replaceChild(newElement, element);
201
+
202
+ this.element = element = newElement;
203
+ }
178
204
 
179
205
  element.classList.add("tabulator");
180
206
  element.setAttribute("role", "grid");
@@ -199,6 +225,12 @@ class Tabulator {
199
225
  options.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + "px";
200
226
  element.style.maxHeight = options.maxHeight;
201
227
  }
228
+ }
229
+
230
+ //initialize core systems and modules
231
+ _initializeTable(){
232
+ var element = this.element,
233
+ options = this.options;
202
234
 
203
235
  this.columnManager.initialize();
204
236
  this.rowManager.initialize();
@@ -214,7 +246,6 @@ class Tabulator {
214
246
 
215
247
  //configure placeholder element
216
248
  if(typeof options.placeholder == "string"){
217
-
218
249
  var el = document.createElement("div");
219
250
  el.classList.add("tabulator-placeholder");
220
251
 
@@ -234,7 +265,8 @@ class Tabulator {
234
265
  this.footerManager.activate();
235
266
  }
236
267
 
237
- if(options.autoColumns && this.options.data){
268
+ if(options.autoColumns && options.data){
269
+
238
270
  this.columnManager.generateColumnsFromRowData(this.options.data);
239
271
  }
240
272
 
@@ -248,7 +280,6 @@ class Tabulator {
248
280
  this.columnManager.setColumns(options.columns);
249
281
 
250
282
  this.eventBus.dispatch("table-built");
251
- this.externalEvents.dispatch("tableBuilt");
252
283
  }
253
284
 
254
285
  _loadInitialData(){
@@ -641,7 +672,11 @@ class Tabulator {
641
672
 
642
673
  /////////////// Column Functions ///////////////
643
674
  setColumns(definition){
644
- this.columnManager.setColumns(definition);
675
+ if(this.initialized){
676
+ this.columnManager.setColumns(definition);
677
+ }else{
678
+ console.warn("setColumns failed - table not yet initialized. To set initial data please use the 'columns' property in the table constructor.")
679
+ }
645
680
  }
646
681
 
647
682
  getColumns(structured){
@@ -668,7 +668,7 @@ class Column extends CoreFeature{
668
668
  this.reinitializeWidth();
669
669
  }
670
670
 
671
- this.table.columnManager._verticalAlignHeaders();
671
+ this.table.columnManager.verticalAlignHeaders();
672
672
 
673
673
  this.dispatch("column-show", this, responsiveToggle);
674
674
 
@@ -693,7 +693,7 @@ class Column extends CoreFeature{
693
693
 
694
694
  this.element.style.display = "none";
695
695
 
696
- this.table.columnManager._verticalAlignHeaders();
696
+ this.table.columnManager.verticalAlignHeaders();
697
697
 
698
698
  if(this.parent.isGroup){
699
699
  this.parent.checkColumnVisibility();
@@ -90,6 +90,10 @@ export default class VirtualDomVertical extends Renderer{
90
90
  }
91
91
  }
92
92
 
93
+ rows.forEach((row) => {
94
+ row.deinitializeHeight();
95
+ });
96
+
93
97
  if(callback){
94
98
  callback();
95
99
  }
@@ -104,6 +104,10 @@ export default class Row extends CoreFeature{
104
104
  }
105
105
  }
106
106
 
107
+ deinitializeHeight(){
108
+ this.heightInitialized = false;
109
+ }
110
+
107
111
  reinitialize(children){
108
112
  this.initialized = false;
109
113
  this.heightInitialized = false;
@@ -160,7 +164,6 @@ export default class Row extends CoreFeature{
160
164
 
161
165
  //normalize the height of elements in the row
162
166
  normalizeHeight(force){
163
-
164
167
  if(force){
165
168
  this.clearCellHeight();
166
169
  }
@@ -89,7 +89,7 @@ export default class DataLoader extends CoreFeature{
89
89
  this.hideLoader();
90
90
 
91
91
  if(rowData !== false){
92
- this.dispatchExternal("dataLoaded", data);
92
+ this.dispatchExternal("dataLoaded", rowData);
93
93
  this.table.rowManager.setData(rowData, replace, !replace);
94
94
  }
95
95
  }else{
@@ -1,6 +1,7 @@
1
1
  export default class ExternalEventBus {
2
2
 
3
- constructor(optionsList, debug){
3
+ constructor(table, optionsList, debug){
4
+ this.table = table;
4
5
  this.events = {};
5
6
  this.optionsList = optionsList || {};
6
7
  this.subscriptionNotifiers = {};
@@ -78,7 +79,7 @@ export default class ExternalEventBus {
78
79
 
79
80
  if(this.events[key]){
80
81
  this.events[key].forEach((callback, i) => {
81
- let callResult = callback.apply(this, args);
82
+ let callResult = callback.apply(this.table, args);
82
83
 
83
84
  if(!i){
84
85
  result = callResult;
@@ -13,18 +13,35 @@ export default class Helpers{
13
13
  };
14
14
  }
15
15
 
16
- static deepClone(obj){
17
- var clone = Object.assign(Array.isArray(obj) ? [] : {}, obj);
16
+ static deepClone(obj, clone, list = []){
17
+ var objectProto = {}.__proto__,
18
+ arrayProto = [].__proto__;
19
+
20
+ if (!clone){
21
+ clone = Object.assign(Array.isArray(obj) ? [] : {}, obj);
22
+ }
18
23
 
19
24
  for(var i in obj) {
20
- if(obj[i] != null && typeof(obj[i]) === "object"){
21
- if (obj[i] instanceof Date) {
22
- clone[i] = new Date(obj[i]);
23
- } else {
24
- clone[i] = this.deepClone(obj[i]);
25
+ let subject = obj[i],
26
+ match, copy;
27
+
28
+ if(subject != null && typeof subject === "object" && (subject.__proto__ === objectProto || subject.__proto__ === arrayProto)){
29
+ match = list.findIndex((item) => {
30
+ return item.subject === subject;
31
+ });
32
+
33
+ if(match > -1){
34
+ clone[i] = list[match].copy;
35
+ }else{
36
+ copy = Object.assign(Array.isArray(subject) ? [] : {}, subject);
37
+
38
+ list.unshift({subject, copy});
39
+
40
+ clone[i] = this.deepClone(subject, copy, list);
25
41
  }
26
42
  }
27
43
  }
44
+
28
45
  return clone;
29
46
  }
30
47
  }
@@ -94,6 +94,7 @@ export default class InteractionManager extends CoreFeature {
94
94
  if(!listener.handler){
95
95
  listener.handler = this.track.bind(this, key);
96
96
  this.el.addEventListener(key, listener.handler)
97
+ console.log("add", key)
97
98
  // this.el.addEventListener(key, listener.handler, {passive: true})
98
99
  }
99
100
  }else{
@@ -17,7 +17,7 @@ export default class ModuleBinder {
17
17
 
18
18
  tabulator.extendModule = function(name, property, values){
19
19
  if(tabulator.moduleBindings[name]){
20
- var source = tabulator.moduleBindings[name].prototype[property];
20
+ var source = tabulator.moduleBindings[name][property];
21
21
 
22
22
  if(source){
23
23
  if(typeof values == "object"){
@@ -34,7 +34,7 @@ class Accessor extends Module{
34
34
  var match = false,
35
35
  config = {};
36
36
 
37
- this.allowedTypes.forEach(function(type){
37
+ this.allowedTypes.forEach((type) => {
38
38
  var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)),
39
39
  accessor;
40
40
 
@@ -1,3 +1,23 @@
1
+ function generateParamsList(data, prefix){
2
+ var output = [];
3
+
4
+ prefix = prefix || "";
5
+
6
+ if(Array.isArray(data)){
7
+ data.forEach((item, i) => {
8
+ output = output.concat(generateParamsList(item, prefix ? prefix + "[" + i + "]" : i));
9
+ });
10
+ }else if (typeof data === "object"){
11
+ for (var key in data){
12
+ output = output.concat(generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key));
13
+ }
14
+ }else{
15
+ output.push({key:prefix, value:data});
16
+ }
17
+
18
+ return output;
19
+ }
20
+
1
21
  export default {
2
22
  "json":{
3
23
  headers:{
@@ -11,7 +31,8 @@ export default {
11
31
  headers:{
12
32
  },
13
33
  body:function(url, config, params){
14
- var output = this.generateParamsList(params),
34
+
35
+ var output = generateParamsList(params),
15
36
  form = new FormData();
16
37
 
17
38
  output.forEach(function(item){
@@ -557,7 +557,7 @@ class DataTree extends Module{
557
557
 
558
558
  checkForRestyle(cell){
559
559
  if(!cell.row.cells.indexOf(cell)){
560
- cell.row.reinitialize();
560
+ this.layoutRow(cell.row);
561
561
  }
562
562
  }
563
563
 
@@ -1,4 +1,5 @@
1
1
  import Module from '../../core/Module.js';
2
+ import Helpers from '../../core/tools/Helpers.js';
2
3
 
3
4
  import defaultEditors from './defaults/editors.js';
4
5
 
@@ -150,7 +151,7 @@ class Edit extends Module{
150
151
  nextCell = this.findNextEditableCell(prevRow, prevRow.cells.length);
151
152
 
152
153
  if(nextCell){
153
- nextCell.edit();
154
+ nextCell.getComponent().edit();
154
155
  return true;
155
156
  }
156
157
  }
@@ -181,7 +182,7 @@ class Edit extends Module{
181
182
  nextCell = this.findNextEditableCell(nextRow, -1);
182
183
 
183
184
  if(nextCell){
184
- nextCell.edit();
185
+ nextCell.getComponent().edit();
185
186
  return true;
186
187
  }
187
188
  }
@@ -205,7 +206,7 @@ class Edit extends Module{
205
206
  nextCell = this.findPrevEditableCell(cell.row, index);
206
207
 
207
208
  if(nextCell){
208
- nextCell.edit();
209
+ nextCell.getComponent().edit();
209
210
  return true;
210
211
  }
211
212
  }
@@ -227,7 +228,7 @@ class Edit extends Module{
227
228
  nextCell = this.findNextEditableCell(cell.row, index);
228
229
 
229
230
  if(nextCell){
230
- nextCell.edit();
231
+ nextCell.getComponent().edit();
231
232
  return true;
232
233
  }
233
234
  }
@@ -249,7 +250,7 @@ class Edit extends Module{
249
250
  nextRow = this.table.rowManager.prevDisplayRow(cell.row, true);
250
251
 
251
252
  if(nextRow){
252
- nextRow.cells[index].edit();
253
+ nextRow.cells[index].getComponent().edit();
253
254
  return true;
254
255
  }
255
256
  }
@@ -271,7 +272,7 @@ class Edit extends Module{
271
272
  nextRow = this.table.rowManager.nextDisplayRow(cell.row, true);
272
273
 
273
274
  if(nextRow){
274
- nextRow.cells[index].edit();
275
+ nextRow.cells[index].getComponent().edit();
275
276
  return true;
276
277
  }
277
278
  }
@@ -1,8 +1,8 @@
1
1
  //draggable progress bar
2
2
  export default function(cell, onRendered, success, cancel, editorParams){
3
3
  var element = cell.getElement(),
4
- max = typeof editorParams.max === "undefined" ? ( element.getElementsByTagName("div")[0].getAttribute("max") || 100) : editorParams.max,
5
- min = typeof editorParams.min === "undefined" ? ( element.getElementsByTagName("div")[0].getAttribute("min") || 0) : editorParams.min,
4
+ max = typeof editorParams.max === "undefined" ? ( element.getElementsByTagName("div")[0]?.getAttribute("max") || 100) : editorParams.max,
5
+ min = typeof editorParams.min === "undefined" ? ( element.getElementsByTagName("div")[0]?.getAttribute("min") || 0) : editorParams.min,
6
6
  percent = (max - min) / 100,
7
7
  value = cell.getValue() || 0,
8
8
  handle = document.createElement("div"),
@@ -549,7 +549,7 @@ class Filter extends Module{
549
549
  if(this.table.options.filterMode === "remote"){
550
550
  this.reloadData();
551
551
  }else{
552
- this.refreshData()
552
+ this.refreshData();
553
553
  }
554
554
 
555
555
  //TODO - Persist left position of row manager
@@ -1,9 +1,11 @@
1
1
  export default function(cell, formatterParams, onRendered){
2
2
  var floatVal = parseFloat(cell.getValue()),
3
+ sign = "",
3
4
  number, integer, decimal, rgx;
4
5
 
5
6
  var decimalSym = formatterParams.decimal || ".";
6
7
  var thousandSym = formatterParams.thousand || ",";
8
+ var negativeSign = formatterParams.negativeSign || "-";
7
9
  var symbol = formatterParams.symbol || "";
8
10
  var after = !!formatterParams.symbolAfter;
9
11
  var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2;
@@ -12,6 +14,11 @@ export default function(cell, formatterParams, onRendered){
12
14
  return this.emptyToSpace(this.sanitizeHTML(cell.getValue()));
13
15
  }
14
16
 
17
+ if(floatVal < 0){
18
+ floatVal = Math.abs(floatVal);
19
+ sign = negativeSign;
20
+ }
21
+
15
22
  number = precision !== false ? floatVal.toFixed(precision) : floatVal;
16
23
  number = String(number).split(".");
17
24
 
@@ -24,5 +31,5 @@ export default function(cell, formatterParams, onRendered){
24
31
  integer = integer.replace(rgx, "$1" + thousandSym + "$2");
25
32
  }
26
33
 
27
- return after ? integer + decimal + symbol : symbol + integer + decimal;
34
+ return after ? sign + integer + decimal + symbol : sign + symbol + integer + decimal;
28
35
  };
@@ -135,12 +135,33 @@ class FrozenColumns extends Module{
135
135
  if(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){
136
136
  this.layoutRow(this.table.modules.columnCalcs.topRow);
137
137
  }
138
+
138
139
  if(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){
139
140
  this.layoutRow(this.table.modules.columnCalcs.botRow);
140
141
  }
142
+
143
+ if(this.table.modExists("groupRows")){
144
+ this.layoutGroupCalcs(this.table.modules.groupRows.getGroups())
145
+ }
141
146
  }
142
147
  }
143
148
 
149
+ layoutGroupCalcs(groups){
150
+ groups.forEach((group) => {
151
+ if(group.calcs.top){
152
+ this.layoutRow(group.calcs.top);
153
+ }
154
+
155
+ if(group.calcs.bottom){
156
+ this.layoutRow(group.calcs.bottom);
157
+ }
158
+
159
+ if(group.groupList && group.groupList.length){
160
+ this.layoutGroupCalcs(group.groupList && group.groupList);
161
+ }
162
+ });
163
+ }
164
+
144
165
  //calculate column positions and layout headers
145
166
  layoutColumnPosition(allCells){
146
167