tabulator-rails 0.3.2 → 0.3.3
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 +113 -55
- data/vendor/assets/stylesheets/tabulator.css +7 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cf2b7482a36cda91b1eda4de2df75ec4418a899
|
4
|
+
data.tar.gz: 7913b0e9a0f5a94e8c7bb9ee838d84cf4422d1d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd5190a3f9998de2f93dcebde2ee54925b17d2b1fbff083c09dc49f8dc46d69bbe24b1a3c98be7b88b4350e723b24af882fc7ddbd9ffd9ebf8a46ff776eff2d4
|
7
|
+
data.tar.gz: 5c1fa45554b12a55dcd8fad4280477d3f53fc5a00f9936dc6010dde0746e90cfff3459d788d77b3b41265666e838ac4758e7371041598a559032bee604d7c861
|
data/VERSIONS.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
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; };
|
4
4
|
|
5
|
-
/* Tabulator v3.5.
|
5
|
+
/* Tabulator v3.5.3 (c) Oliver Folkerd */
|
6
6
|
|
7
7
|
/*
|
8
8
|
* This file is part of the Tabulator package.
|
@@ -2021,8 +2021,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
2021
2021
|
width = Math.floor(this.table.element.innerWidth() / 100 * parseInt(width));
|
2022
2022
|
}
|
2023
2023
|
|
2024
|
-
console.log;
|
2025
|
-
|
2026
2024
|
width = Math.max(this.minWidth, width);
|
2027
2025
|
|
2028
2026
|
this.width = width;
|
@@ -3091,11 +3089,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
3091
3089
|
|
3092
3090
|
//build header row
|
3093
3091
|
|
3094
|
-
this.table.columnManager.
|
3092
|
+
this.table.columnManager.getColumns().forEach(function (column) {
|
3095
3093
|
|
3096
3094
|
var def = column.getDefinition();
|
3097
3095
|
|
3098
|
-
if (column.
|
3096
|
+
if (column.visible && !def.hideInHtml) {
|
3099
3097
|
|
3100
3098
|
header += '<th>' + (def.title || "") + '</th>';
|
3101
3099
|
|
@@ -3111,12 +3109,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
3111
3109
|
|
3112
3110
|
columns.forEach(function (column) {
|
3113
3111
|
|
3114
|
-
var value =
|
3112
|
+
var value = column.getFieldValue(rowData);
|
3115
3113
|
|
3116
|
-
if (
|
3114
|
+
if (typeof value === "undefined" || value === null) {
|
3117
3115
|
|
3118
|
-
|
3116
|
+
value = ":";
|
3119
3117
|
}
|
3118
|
+
|
3119
|
+
row += '<td>' + value + '</td>';
|
3120
3120
|
});
|
3121
3121
|
|
3122
3122
|
body += '<tr>' + row + '</tr>';
|
@@ -3643,6 +3643,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
3643
3643
|
|
3644
3644
|
if (self.table.options.placeholder) {
|
3645
3645
|
|
3646
|
+
if (this.renderMode) {
|
3647
|
+
|
3648
|
+
self.table.options.placeholder.attr("tabulator-render-mode", this.renderMode);
|
3649
|
+
}
|
3650
|
+
|
3646
3651
|
self.getElement().append(self.table.options.placeholder);
|
3647
3652
|
}
|
3648
3653
|
}
|
@@ -3661,6 +3666,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
3661
3666
|
|
3662
3667
|
if (self.displayRowsCount) {
|
3663
3668
|
|
3669
|
+
var onlyGroupHeaders = true;
|
3670
|
+
|
3664
3671
|
self.getDisplayRows().forEach(function (row, index) {
|
3665
3672
|
|
3666
3673
|
self.styleRow(row, index);
|
@@ -3668,7 +3675,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
3668
3675
|
element.append(row.getElement());
|
3669
3676
|
|
3670
3677
|
row.initialize(true);
|
3678
|
+
|
3679
|
+
if (row.type !== "group") {
|
3680
|
+
|
3681
|
+
onlyGroupHeaders = false;
|
3682
|
+
}
|
3671
3683
|
});
|
3684
|
+
|
3685
|
+
if (onlyGroupHeaders) {
|
3686
|
+
|
3687
|
+
self.tableElement.css({
|
3688
|
+
|
3689
|
+
"min-width": self.table.columnManager.getWidth()
|
3690
|
+
|
3691
|
+
});
|
3692
|
+
}
|
3672
3693
|
} else {
|
3673
3694
|
|
3674
3695
|
self.renderEmptyScroll();
|
@@ -4195,9 +4216,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
4195
4216
|
|
4196
4217
|
if (!force) {
|
4197
4218
|
|
4198
|
-
if (self.renderMode == "
|
4219
|
+
if (self.renderMode == "classic") {
|
4220
|
+
|
4221
|
+
if (self.table.options.groupBy) {
|
4199
4222
|
|
4200
|
-
|
4223
|
+
self.refreshActiveData("group", false, false);
|
4224
|
+
} else {
|
4225
|
+
|
4226
|
+
this._simpleRender();
|
4227
|
+
}
|
4201
4228
|
} else {
|
4202
4229
|
|
4203
4230
|
this.reRenderInPosition();
|
@@ -9868,7 +9895,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
9868
9895
|
value = "";
|
9869
9896
|
}
|
9870
9897
|
|
9871
|
-
value = typeof value == "undefined" ? "" : value.toString();
|
9898
|
+
value = typeof value == "undefined" || value === null ? "" : value.toString();
|
9872
9899
|
|
9873
9900
|
if (value.match(/\r|\n/)) {
|
9874
9901
|
|
@@ -10395,40 +10422,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
10395
10422
|
|
10396
10423
|
var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } };
|
10397
10424
|
|
10398
|
-
|
10399
|
-
|
10400
|
-
row.forEach(function (value, j) {
|
10401
|
-
|
10402
|
-
var cell = { v: typeof value == "undefined" || value === null ? "" : value };
|
10403
|
-
|
10404
|
-
if (cell != null) {
|
10405
|
-
|
10406
|
-
switch (_typeof(cell.v)) {
|
10407
|
-
|
10408
|
-
case "number":
|
10409
|
-
|
10410
|
-
cell.t = 'n';
|
10411
|
-
|
10412
|
-
break;
|
10413
|
-
|
10414
|
-
case "boolean":
|
10415
|
-
|
10416
|
-
cell.t = 'b';
|
10417
|
-
|
10418
|
-
break;
|
10419
|
-
|
10420
|
-
default:
|
10421
|
-
|
10422
|
-
cell.t = 's';
|
10423
|
-
|
10424
|
-
break;
|
10425
|
-
|
10426
|
-
}
|
10427
|
-
|
10428
|
-
sheet[XLSX.utils.encode_cell({ c: j, r: i })] = cell;
|
10429
|
-
}
|
10430
|
-
});
|
10431
|
-
});
|
10425
|
+
XLSX.utils.sheet_add_aoa(sheet, rows);
|
10432
10426
|
|
10433
10427
|
sheet['!ref'] = XLSX.utils.encode_range(range);
|
10434
10428
|
|
@@ -12481,7 +12475,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
12481
12475
|
return rowVal === filterVal ? true : false;
|
12482
12476
|
} else {
|
12483
12477
|
|
12484
|
-
|
12478
|
+
if (typeof rowVal !== 'undefined' && rowVal !== null) {
|
12479
|
+
|
12480
|
+
return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false;
|
12481
|
+
} else {
|
12482
|
+
|
12483
|
+
return false;
|
12484
|
+
}
|
12485
12485
|
}
|
12486
12486
|
},
|
12487
12487
|
|
@@ -13874,7 +13874,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
13874
13874
|
|
13875
13875
|
if (!this.groupList.length) {
|
13876
13876
|
|
13877
|
-
this.parent
|
13877
|
+
if (this.parent) {
|
13878
|
+
|
13879
|
+
this.parent.removeGroup(this);
|
13880
|
+
} else {
|
13881
|
+
|
13882
|
+
this.groupManager.removeGroup(this);
|
13883
|
+
}
|
13878
13884
|
}
|
13879
13885
|
}
|
13880
13886
|
};
|
@@ -13983,10 +13989,36 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
13983
13989
|
|
13984
13990
|
this.element.removeClass("tabulator-group-visible");
|
13985
13991
|
|
13986
|
-
this.
|
13992
|
+
if (this.groupList.length) {
|
13987
13993
|
|
13988
|
-
|
13989
|
-
|
13994
|
+
this.groupList.forEach(function (group) {
|
13995
|
+
|
13996
|
+
if (group.calcs.top) {
|
13997
|
+
|
13998
|
+
group.calcs.top.getElement().detach();
|
13999
|
+
}
|
14000
|
+
|
14001
|
+
if (group.calcs.bottom) {
|
14002
|
+
|
14003
|
+
group.calcs.bottom.getElement().detach();
|
14004
|
+
}
|
14005
|
+
|
14006
|
+
var rows = group.getHeadersAndRows();
|
14007
|
+
|
14008
|
+
rows.forEach(function (row) {
|
14009
|
+
|
14010
|
+
row.getElement().detach();
|
14011
|
+
});
|
14012
|
+
});
|
14013
|
+
} else {
|
14014
|
+
|
14015
|
+
this.rows.forEach(function (row) {
|
14016
|
+
|
14017
|
+
row.getElement().detach();
|
14018
|
+
});
|
14019
|
+
}
|
14020
|
+
|
14021
|
+
this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());
|
13990
14022
|
} else {
|
13991
14023
|
|
13992
14024
|
this.groupManager.updateGroupRows(true);
|
@@ -14005,12 +14037,36 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
14005
14037
|
|
14006
14038
|
this.element.addClass("tabulator-group-visible");
|
14007
14039
|
|
14008
|
-
self.
|
14040
|
+
var prev = self.getElement();
|
14041
|
+
|
14042
|
+
if (this.groupList.length) {
|
14009
14043
|
|
14010
|
-
|
14044
|
+
this.groupList.forEach(function (group) {
|
14011
14045
|
|
14012
|
-
|
14013
|
-
|
14046
|
+
var rows = group.getHeadersAndRows();
|
14047
|
+
|
14048
|
+
rows.forEach(function (row) {
|
14049
|
+
|
14050
|
+
prev.after(row.getElement());
|
14051
|
+
|
14052
|
+
row.initialize();
|
14053
|
+
|
14054
|
+
prev = row.getElement();
|
14055
|
+
});
|
14056
|
+
});
|
14057
|
+
} else {
|
14058
|
+
|
14059
|
+
self.rows.forEach(function (row) {
|
14060
|
+
|
14061
|
+
prev.after(row.getElement());
|
14062
|
+
|
14063
|
+
row.initialize();
|
14064
|
+
|
14065
|
+
prev = row.getElement();
|
14066
|
+
});
|
14067
|
+
}
|
14068
|
+
|
14069
|
+
this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex());
|
14014
14070
|
} else {
|
14015
14071
|
|
14016
14072
|
this.groupManager.updateGroupRows(true);
|
@@ -16735,7 +16791,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
16735
16791
|
|
16736
16792
|
var self = this;
|
16737
16793
|
|
16738
|
-
var button = $("<button class='tabulator-page " + (page == self.page ? "active" : "") + "' data-page='" + page + "' role='button'
|
16794
|
+
var button = $("<button class='tabulator-page " + (page == self.page ? "active" : "") + "' data-page='" + page + "' role='button' type='button' aria-label='Show Page " + page + "'>" + page + "</button>");
|
16739
16795
|
|
16740
16796
|
button.on("click", function (e) {
|
16741
16797
|
|
@@ -17032,6 +17088,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
17032
17088
|
|
17033
17089
|
this.table.rowManager.scrollHorizontal(left);
|
17034
17090
|
|
17091
|
+
this.table.columnManager.scrollHorizontal(left);
|
17092
|
+
|
17035
17093
|
this.table.options.pageLoaded(this.getPage());
|
17036
17094
|
}
|
17037
17095
|
} else {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* Tabulator v3.5.
|
1
|
+
/* Tabulator v3.5.3 (c) Oliver Folkerd */
|
2
2
|
.tabulator {
|
3
3
|
position: relative;
|
4
4
|
border: 1px solid #999;
|
@@ -209,16 +209,19 @@
|
|
209
209
|
}
|
210
210
|
|
211
211
|
.tabulator .tabulator-tableHolder .tabulator-placeholder {
|
212
|
-
position: absolute;
|
213
212
|
box-sizing: border-box;
|
214
213
|
display: -ms-flexbox;
|
215
214
|
display: flex;
|
216
215
|
-ms-flex-align: center;
|
217
216
|
align-items: center;
|
217
|
+
width: 100%;
|
218
|
+
}
|
219
|
+
|
220
|
+
.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] {
|
221
|
+
position: absolute;
|
218
222
|
top: 0;
|
219
223
|
left: 0;
|
220
224
|
height: 100%;
|
221
|
-
width: 100%;
|
222
225
|
}
|
223
226
|
|
224
227
|
.tabulator .tabulator-tableHolder .tabulator-placeholder span {
|
@@ -270,7 +273,7 @@
|
|
270
273
|
|
271
274
|
.tabulator .tabulator-footer .tabulator-calcs-holder {
|
272
275
|
box-sizing: border-box;
|
273
|
-
width: calc(
|
276
|
+
width: calc(100% + 20px);
|
274
277
|
margin: -5px -10px 5px -10px;
|
275
278
|
text-align: left;
|
276
279
|
background: #f3f3f3 !important;
|