tabulator-rails 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e09d2791c9a4a2cc558b7308f7907fe504230174
4
- data.tar.gz: d4838f6293b296a720dd13db6ae90ed75a3d9015
3
+ metadata.gz: 92c7b9b7e861bd16d8c5bc7cce60ef4b88461c8d
4
+ data.tar.gz: 06a185e873d45c1c86b6ab471678cb193ecd2807
5
5
  SHA512:
6
- metadata.gz: 6f741a1fb44fa629b7edf0a61ed99376e82b8a0e2cf0b4a609aff1e3b5a3dc02b4179157cfe61d9ea220285f0b17e1ae49fa7e1c83958834b1dd63d0bf37cd2e
7
- data.tar.gz: ef226021e9f051c3369913ff2021f738c8b334edac1485f10352eb5e88bafbb433ccc3f468d5bf8a42a839b6abb8f32acfdb13ff70f27e6476c98073ea5d6263
6
+ metadata.gz: e50905eba80f26d0a686eb77840eb06301ba82a6d4fad59cc5f5cfc964b0aa48263bc672fd972e7e8b7b99854780d8783a2c7302abc04562454c5426124e7fe8
7
+ data.tar.gz: 23d1f3e8ad43ae1cee040194b97d30f8291b7e0e3c5d313af6a6737b50e0ffedb3fd65ebd701af1243bf3dd5dfbdc06f88954f2873d77eac191768ecec4bf143
data/VERSIONS.md CHANGED
@@ -5,4 +5,5 @@
5
5
  | 0.1.0 | 3.3.3
6
6
  | 0.1.1 | 3.3.3
7
7
  | 0.2.0 | 3.4.0
8
+ | 0.2.1 | 3.4.1
8
9
 
@@ -1,5 +1,5 @@
1
1
  module Tabulator
2
2
  module Rails
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -3035,7 +3035,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3035
3035
 
3036
3036
  //trigger rerender of table in current position
3037
3037
 
3038
- RowManager.prototype.reRenderInPosition = function (rowCount) {
3038
+ RowManager.prototype.reRenderInPosition = function () {
3039
3039
 
3040
3040
  if (this.getRenderMode() == "virtual") {
3041
3041
 
@@ -3226,6 +3226,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3226
3226
 
3227
3227
  position = position || 0;
3228
3228
 
3229
+ offset = offset || 0;
3230
+
3229
3231
  if (!position) {
3230
3232
 
3231
3233
  self._clearVirtualDom();
@@ -3662,9 +3664,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3662
3664
  this._simpleRender();
3663
3665
  } else {
3664
3666
 
3665
- var pos = Math.floor(this.element.scrollTop() / this.element[0].scrollHeight * this.displayRowsCount);
3666
-
3667
- this._virtualRenderFill(pos);
3667
+ this.reRenderInPosition();
3668
3668
 
3669
3669
  this.scrollHorizontal(left);
3670
3670
  }
@@ -16366,6 +16366,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16366
16366
 
16367
16367
  integer: function integer(cell, value, parameters) {
16368
16368
 
16369
+ if (value === "" || value === null || typeof value === "undefined") {
16370
+
16371
+ return true;
16372
+ }
16373
+
16369
16374
  value = Number(value);
16370
16375
 
16371
16376
  return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
@@ -16376,6 +16381,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16376
16381
 
16377
16382
  float: function float(cell, value, parameters) {
16378
16383
 
16384
+ if (value === "" || value === null || typeof value === "undefined") {
16385
+
16386
+ return true;
16387
+ }
16388
+
16379
16389
  value = Number(value);
16380
16390
 
16381
16391
  return typeof value === 'number' && isFinite(value) && value % 1 !== 0;;
@@ -16386,6 +16396,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16386
16396
 
16387
16397
  numeric: function numeric(cell, value, parameters) {
16388
16398
 
16399
+ if (value === "" || value === null || typeof value === "undefined") {
16400
+
16401
+ return true;
16402
+ }
16403
+
16389
16404
  return !isNaN(value);
16390
16405
  },
16391
16406
 
@@ -16394,6 +16409,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16394
16409
 
16395
16410
  string: function string(cell, value, parameters) {
16396
16411
 
16412
+ if (value === "" || value === null || typeof value === "undefined") {
16413
+
16414
+ return true;
16415
+ }
16416
+
16397
16417
  return isNaN(value);
16398
16418
  },
16399
16419
 
@@ -16402,6 +16422,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16402
16422
 
16403
16423
  max: function max(cell, value, parameters) {
16404
16424
 
16425
+ if (value === "" || value === null || typeof value === "undefined") {
16426
+
16427
+ return true;
16428
+ }
16429
+
16405
16430
  return parseFloat(value) <= parameters;
16406
16431
  },
16407
16432
 
@@ -16410,6 +16435,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16410
16435
 
16411
16436
  min: function min(cell, value, parameters) {
16412
16437
 
16438
+ if (value === "" || value === null || typeof value === "undefined") {
16439
+
16440
+ return true;
16441
+ }
16442
+
16413
16443
  return parseFloat(value) >= parameters;
16414
16444
  },
16415
16445
 
@@ -16418,6 +16448,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16418
16448
 
16419
16449
  minLength: function minLength(cell, value, parameters) {
16420
16450
 
16451
+ if (value === "" || value === null || typeof value === "undefined") {
16452
+
16453
+ return true;
16454
+ }
16455
+
16421
16456
  return String(value).length >= parameters;
16422
16457
  },
16423
16458
 
@@ -16426,6 +16461,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16426
16461
 
16427
16462
  maxLength: function maxLength(cell, value, parameters) {
16428
16463
 
16464
+ if (value === "" || value === null || typeof value === "undefined") {
16465
+
16466
+ return true;
16467
+ }
16468
+
16429
16469
  return String(value).length <= parameters;
16430
16470
  },
16431
16471
 
@@ -16434,6 +16474,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16434
16474
 
16435
16475
  in: function _in(cell, value, parameters) {
16436
16476
 
16477
+ if (value === "" || value === null || typeof value === "undefined") {
16478
+
16479
+ return true;
16480
+ }
16481
+
16437
16482
  if (typeof parameters == "string") {
16438
16483
 
16439
16484
  parameters = parameters.split("|");
@@ -16447,6 +16492,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16447
16492
 
16448
16493
  regex: function regex(cell, value, parameters) {
16449
16494
 
16495
+ if (value === "" || value === null || typeof value === "undefined") {
16496
+
16497
+ return true;
16498
+ }
16499
+
16450
16500
  var reg = new RegExp(parameters);
16451
16501
 
16452
16502
  return reg.test(value);
@@ -16457,6 +16507,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16457
16507
 
16458
16508
  unique: function unique(cell, value, parameters) {
16459
16509
 
16510
+ if (value === "" || value === null || typeof value === "undefined") {
16511
+
16512
+ return true;
16513
+ }
16514
+
16460
16515
  var unique = true;
16461
16516
 
16462
16517
  var cellData = cell.getData();
@@ -16484,7 +16539,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16484
16539
 
16485
16540
  required: function required(cell, value, parameters) {
16486
16541
 
16487
- return value !== "" & value !== null && typeof value != "undefined";
16542
+ return value !== "" & value !== null && typeof value !== "undefined";
16488
16543
  }
16489
16544
 
16490
16545
  };
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: 0.2.0
4
+ version: 0.2.1
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-02-23 00:00:00.000000000 Z
11
+ date: 2018-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler