tabulator-rails 1.1.1 → 1.1.2
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.
- checksums.yaml +4 -4
- data/VERSIONS.md +1 -0
- data/lib/tabulator-rails/version.rb +1 -1
- data/vendor/assets/javascripts/tabulator.js +71 -37
- data/vendor/assets/stylesheets/tabulator.css +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3f2c49d192f4b19acb4dfd6cdb0f28877f2b527
|
4
|
+
data.tar.gz: fd586fd24bba02440a45638fdc6cf218739748af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2de136d316dcd6c9172796db84d8b03f9d7b47f042ad2211ef87d05cd390a120086072b0700a71d28d2a3b71ad493f2f5813d573ebce322b33a6a17daf2e38bd
|
7
|
+
data.tar.gz: c6b22057f434015125ca5758e7ab7061269bdb873fc0b6d187c0c72e5a3c1087052616e79f8b4d4baaec4a571778e39d9b2ed73df1dd2787bdef98959ec669e3
|
data/VERSIONS.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
2
2
|
|
3
|
-
/* Tabulator v4.1.
|
3
|
+
/* Tabulator v4.1.2 (c) Oliver Folkerd */
|
4
4
|
|
5
5
|
;(function (global, factory) {
|
6
6
|
if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') {
|
@@ -4045,7 +4045,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
4045
4045
|
|
4046
4046
|
if (forceMove) {
|
4047
4047
|
|
4048
|
-
this.scrollTop = self.vDomTopPad + topPadHeight + offset;
|
4048
|
+
this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0);
|
4049
4049
|
}
|
4050
4050
|
|
4051
4051
|
this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height);
|
@@ -9429,7 +9429,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
9429
9429
|
margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2;
|
9430
9430
|
|
9431
9431
|
if (diff < margin) {
|
9432
|
-
this.table.modules.page.nextPage();
|
9432
|
+
this.table.modules.page.nextPage().then(function () {}).catch(function () {});
|
9433
9433
|
}
|
9434
9434
|
}
|
9435
9435
|
};
|
@@ -9922,7 +9922,17 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
9922
9922
|
ColumnCalcs.prototype.generateRow = function (pos, data) {
|
9923
9923
|
var self = this,
|
9924
9924
|
rowData = this.generateRowData(pos, data),
|
9925
|
-
row
|
9925
|
+
row;
|
9926
|
+
|
9927
|
+
if (self.table.modExists("mutator")) {
|
9928
|
+
self.table.modules.mutator.disable();
|
9929
|
+
}
|
9930
|
+
|
9931
|
+
row = new Row(rowData, this);
|
9932
|
+
|
9933
|
+
if (self.table.modExists("mutator")) {
|
9934
|
+
self.table.modules.mutator.enable();
|
9935
|
+
}
|
9926
9936
|
|
9927
9937
|
row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos);
|
9928
9938
|
row.type = "calc";
|
@@ -10212,7 +10222,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
10212
10222
|
|
10213
10223
|
if (typeof this.table.options.clipboardCopyHeader !== "undefined") {
|
10214
10224
|
config.columnHeaders = this.table.options.clipboardCopyHeader;
|
10215
|
-
console.warn("
|
10225
|
+
console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option");
|
10216
10226
|
}
|
10217
10227
|
|
10218
10228
|
if (this.table.options.clipboardCopyConfig) {
|
@@ -12115,7 +12125,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
12115
12125
|
|
12116
12126
|
if (column.definition.editor === "tick") {
|
12117
12127
|
column.definition.editor = "tickCross";
|
12118
|
-
console.warn("
|
12128
|
+
console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor");
|
12119
12129
|
}
|
12120
12130
|
|
12121
12131
|
if (self.editors[column.definition.editor]) {
|
@@ -12137,7 +12147,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
12137
12147
|
|
12138
12148
|
if (column.definition.formatter === "tick") {
|
12139
12149
|
column.definition.formatter = "tickCross";
|
12140
|
-
console.warn("
|
12150
|
+
console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor");
|
12141
12151
|
}
|
12142
12152
|
|
12143
12153
|
if (self.editors[column.definition.formatter]) {
|
@@ -12321,7 +12331,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
12321
12331
|
this.mouseClick = false;
|
12322
12332
|
|
12323
12333
|
if (cell.column.cellEvents.cellClick) {
|
12324
|
-
cell.column.cellEvents.cellClick.call(this.table, component);
|
12334
|
+
cell.column.cellEvents.cellClick.call(this.table, e, component);
|
12325
12335
|
}
|
12326
12336
|
}
|
12327
12337
|
|
@@ -12643,7 +12653,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
12643
12653
|
blurable = true;
|
12644
12654
|
|
12645
12655
|
if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) {
|
12646
|
-
console.warn("
|
12656
|
+
console.warn("DEPRECATION WANRING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object");
|
12647
12657
|
editorParams = { values: editorParams };
|
12648
12658
|
}
|
12649
12659
|
|
@@ -13492,16 +13502,24 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
13492
13502
|
|
13493
13503
|
input.checked = value === true || value === "true" || value === "True" || value === 1;
|
13494
13504
|
|
13495
|
-
function setValue() {
|
13505
|
+
function setValue(blur) {
|
13496
13506
|
if (tristate) {
|
13497
|
-
if (
|
13498
|
-
input.checked
|
13499
|
-
|
13500
|
-
|
13501
|
-
|
13507
|
+
if (!blur) {
|
13508
|
+
if (input.checked && !indetermState) {
|
13509
|
+
input.checked = false;
|
13510
|
+
input.indeterminate = true;
|
13511
|
+
indetermState = true;
|
13512
|
+
return indetermValue;
|
13513
|
+
} else {
|
13514
|
+
indetermState = false;
|
13515
|
+
return input.checked;
|
13516
|
+
}
|
13502
13517
|
} else {
|
13503
|
-
indetermState
|
13504
|
-
|
13518
|
+
if (indetermState) {
|
13519
|
+
return indetermValue;
|
13520
|
+
} else {
|
13521
|
+
return input.checked;
|
13522
|
+
}
|
13505
13523
|
}
|
13506
13524
|
} else {
|
13507
13525
|
return input.checked;
|
@@ -13514,7 +13532,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
13514
13532
|
});
|
13515
13533
|
|
13516
13534
|
input.addEventListener("blur", function (e) {
|
13517
|
-
success(setValue());
|
13535
|
+
success(setValue(true));
|
13518
13536
|
});
|
13519
13537
|
|
13520
13538
|
//submit new value on enter
|
@@ -14243,7 +14261,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
14243
14261
|
config.params.crossElement = false;
|
14244
14262
|
}
|
14245
14263
|
|
14246
|
-
console.warn("
|
14264
|
+
console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false");
|
14247
14265
|
}
|
14248
14266
|
|
14249
14267
|
if (self.formatters[column.definition.formatter]) {
|
@@ -14867,6 +14885,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
14867
14885
|
|
14868
14886
|
self.layoutColumn(column);
|
14869
14887
|
});
|
14888
|
+
|
14889
|
+
this.table.rowManager.tableElement.style.marginRight = this.rightMargin + "px";
|
14870
14890
|
}
|
14871
14891
|
};
|
14872
14892
|
|
@@ -17310,6 +17330,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
17310
17330
|
var Mutator = function Mutator(table) {
|
17311
17331
|
this.table = table; //hold Tabulator object
|
17312
17332
|
this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types
|
17333
|
+
this.enabled = true;
|
17313
17334
|
};
|
17314
17335
|
|
17315
17336
|
//initialize column mutator
|
@@ -17368,23 +17389,26 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
17368
17389
|
key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)),
|
17369
17390
|
value;
|
17370
17391
|
|
17371
|
-
|
17372
|
-
var mutator, params, component;
|
17392
|
+
if (this.enabled) {
|
17373
17393
|
|
17374
|
-
|
17375
|
-
|
17394
|
+
self.table.columnManager.traverse(function (column) {
|
17395
|
+
var mutator, params, component;
|
17376
17396
|
|
17377
|
-
if (
|
17378
|
-
|
17397
|
+
if (column.modules.mutate) {
|
17398
|
+
mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false;
|
17379
17399
|
|
17380
|
-
if (
|
17381
|
-
|
17382
|
-
|
17383
|
-
|
17400
|
+
if (mutator) {
|
17401
|
+
value = column.getFieldValue(data);
|
17402
|
+
|
17403
|
+
if (!update || update && typeof value !== "undefined") {
|
17404
|
+
component = column.getComponent();
|
17405
|
+
params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params;
|
17406
|
+
column.setFieldValue(data, mutator.mutator(value, data, type, params, component));
|
17407
|
+
}
|
17384
17408
|
}
|
17385
17409
|
}
|
17386
|
-
}
|
17387
|
-
}
|
17410
|
+
});
|
17411
|
+
}
|
17388
17412
|
|
17389
17413
|
return data;
|
17390
17414
|
};
|
@@ -17400,6 +17424,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
17400
17424
|
}
|
17401
17425
|
};
|
17402
17426
|
|
17427
|
+
Mutator.prototype.enable = function () {
|
17428
|
+
this.enabled = true;
|
17429
|
+
};
|
17430
|
+
|
17431
|
+
Mutator.prototype.disable = function () {
|
17432
|
+
this.enabled = false;
|
17433
|
+
};
|
17434
|
+
|
17403
17435
|
//default mutators
|
17404
17436
|
Mutator.prototype.mutators = {};
|
17405
17437
|
|
@@ -17513,7 +17545,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
17513
17545
|
});
|
17514
17546
|
|
17515
17547
|
self.nextBut.addEventListener("click", function () {
|
17516
|
-
self.nextPage();
|
17548
|
+
self.nextPage().then(function () {}).catch(function () {});
|
17517
17549
|
});
|
17518
17550
|
|
17519
17551
|
self.lastBut.addEventListener("click", function () {
|
@@ -17864,7 +17896,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
17864
17896
|
this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]);
|
17865
17897
|
if (this.page < this.max) {
|
17866
17898
|
setTimeout(function () {
|
17867
|
-
self.nextPage();
|
17899
|
+
self.nextPage().then(function () {}).catch(function () {});
|
17868
17900
|
}, self.table.options.ajaxProgressiveLoadDelay);
|
17869
17901
|
}
|
17870
17902
|
break;
|
@@ -17877,7 +17909,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
17877
17909
|
margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2;
|
17878
17910
|
|
17879
17911
|
if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) {
|
17880
|
-
self.nextPage();
|
17912
|
+
self.nextPage().then(function () {}).catch(function () {});
|
17881
17913
|
}
|
17882
17914
|
break;
|
17883
17915
|
}
|
@@ -18414,7 +18446,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
18414
18446
|
|
18415
18447
|
//generate resposive columns list
|
18416
18448
|
ResponsiveLayout.prototype.initialize = function () {
|
18417
|
-
var
|
18449
|
+
var self = this,
|
18450
|
+
columns = [];
|
18418
18451
|
|
18419
18452
|
this.mode = this.table.options.responsiveLayout;
|
18420
18453
|
this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData;
|
@@ -18428,8 +18461,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
18428
18461
|
column.modules.responsive.index = i;
|
18429
18462
|
columns.push(column);
|
18430
18463
|
|
18431
|
-
if (!column.visible &&
|
18432
|
-
|
18464
|
+
if (!column.visible && self.mode === "collapse") {
|
18465
|
+
self.hiddenColumns.push(column);
|
18433
18466
|
}
|
18434
18467
|
}
|
18435
18468
|
}
|
@@ -18642,6 +18675,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
18642
18675
|
};
|
18643
18676
|
|
18644
18677
|
Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout);
|
18678
|
+
|
18645
18679
|
var SelectRow = function SelectRow(table) {
|
18646
18680
|
this.table = table; //hold Tabulator object
|
18647
18681
|
this.selecting = false; //flag selecting in progress
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabulator-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tanvir hasan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|