tabulator-rails 1.0.1 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0ea88e2dcd988d60d59fac156404506dd09eac8
4
- data.tar.gz: 245e68f64c5fc435f86752f175d19f1b6e4a0ea2
3
+ metadata.gz: 9d9ba54a0b7b041814550f14b5c4c2373d80e66a
4
+ data.tar.gz: 389fc778bece7522dacb9826bd5f81f767ceca5e
5
5
  SHA512:
6
- metadata.gz: c75079f166bf09a6f3f19bbf9e3d04638becb428c995e2094212a9e07f916f139baf1913df832b85f2b31f2d1e40b02daa9fd54f0d00af00cafdcb45ab62f24a
7
- data.tar.gz: 02012fd3bb210ee53793f5c7bd209c207d8d80894151ffbec648ee838c179e3624b7a04cd6c4b1b47e419501776f9c603a407d389d012799959489797f3a94e6
6
+ metadata.gz: 0d44184c280ddaa780175ca8a27949823cc0d2e2db8b314417d525821fb4b060fc1e7b13fe508ccf3d8f282c88149c63a601f73954d6561bbf1d6b9590f9bce7
7
+ data.tar.gz: d125d49d39a32ab3f1655cebcb35eda07d2893006b48d2300ab76cbda113634e29154c324f6e3226f546f833b8af7022f625ed8ac21aad092aac6bb312d48e06
data/VERSIONS.md CHANGED
@@ -17,3 +17,4 @@
17
17
  | 0.3.3 | 3.5.3
18
18
  | 1.0.0 | 4.0.0
19
19
  | 1.0.1 | 4.0.1
20
+ | 1.0.2 | 4.0.2
@@ -1,5 +1,5 @@
1
1
  module Tabulator
2
2
  module Rails
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -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.0.1 (c) Oliver Folkerd */
3
+ /* Tabulator v4.0.2 (c) Oliver Folkerd */
4
4
 
5
5
  ;(function (global, factory) {
6
6
  if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') {
@@ -445,7 +445,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
445
445
 
446
446
  var match = self.columns.find(function (column) {
447
447
 
448
- return column.element.is(subject);
448
+ return column.element === subject;
449
449
  });
450
450
 
451
451
  return match || false;
@@ -2508,7 +2508,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2508
2508
 
2509
2509
  var match = self.rows.find(function (row) {
2510
2510
 
2511
- return row.element.is(subject);
2511
+ return row.element === subject;
2512
2512
  });
2513
2513
 
2514
2514
  return match || false;
@@ -4749,7 +4749,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4749
4749
  Row.prototype.calcHeight = function () {
4750
4750
 
4751
4751
  var maxHeight = 0,
4752
- minHeight = this.element.clientHeight;
4752
+ minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;
4753
4753
 
4754
4754
  this.cells.forEach(function (cell) {
4755
4755
 
@@ -5993,7 +5993,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5993
5993
 
5994
5994
  FooterManager.prototype.deactivate = function (force) {
5995
5995
 
5996
- if (this.element.is(":empty") || force) {
5996
+ if (!this.element.firstChild || force) {
5997
5997
 
5998
5998
  if (!this.external) {
5999
5999
 
@@ -9213,36 +9213,47 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
9213
9213
  });
9214
9214
  };
9215
9215
 
9216
- Ajax.prototype.serializeParams = function (data, prefix) {
9216
+ Ajax.prototype.generateParamsList = function (data, prefix) {
9217
9217
  var self = this,
9218
- output = [],
9219
- encoded = [];
9218
+ output = [];
9220
9219
 
9221
9220
  prefix = prefix || "";
9222
9221
 
9223
9222
  if (Array.isArray(data)) {
9224
-
9225
9223
  data.forEach(function (item, i) {
9226
- output = output.concat(self.serializeParams(item, prefix ? prefix + "[" + i + "]" : i));
9224
+ output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i));
9227
9225
  });
9228
9226
  } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === "object") {
9229
-
9230
9227
  for (var key in data) {
9231
- output = output.concat(self.serializeParams(data[key], prefix ? prefix + "[" + key + "]" : key));
9228
+ output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key));
9232
9229
  }
9233
9230
  } else {
9234
- output.push({ key: prefix, val: data });
9231
+ output.push({ key: prefix, value: data });
9235
9232
  }
9236
9233
 
9237
- if (prefix) {
9238
- return output;
9239
- } else {
9240
- output.forEach(function (item) {
9241
- encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.val));
9242
- });
9234
+ return output;
9235
+ };
9243
9236
 
9244
- return encoded.join("&");
9245
- }
9237
+ Ajax.prototype.serializeParams = function (params) {
9238
+ var output = this.generateParamsList(params),
9239
+ encoded = [];
9240
+
9241
+ output.forEach(function (item) {
9242
+ encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value));
9243
+ });
9244
+
9245
+ return encoded.join("&");
9246
+ };
9247
+
9248
+ Ajax.prototype.formDataParams = function (params) {
9249
+ var output = this.generateParamsList(params),
9250
+ form = new FormData();
9251
+
9252
+ output.forEach(function (item) {
9253
+ form.append(item.key, item.value);
9254
+ });
9255
+
9256
+ return form;
9246
9257
  };
9247
9258
 
9248
9259
  //send ajax request
@@ -9349,18 +9360,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
9349
9360
 
9350
9361
  //default ajax config object
9351
9362
  Ajax.prototype.defaultConfig = {
9352
- method: "GET",
9353
- headers: {
9354
- "Content-Type": "application/json; charset=utf-8"
9355
- }
9363
+ method: "GET"
9356
9364
  };
9357
9365
 
9358
9366
  Ajax.prototype.defaultURLGenerator = function (url, config, params) {
9359
9367
  if (params) {
9360
- if (!config.method || config.method == "get") {
9368
+ if (!config.method || config.method.toLowerCase() == "get") {
9361
9369
  url += "?" + this.serializeParams(params);
9362
9370
  } else {
9363
- config.body = JSON.stringify(params);
9371
+ config.body = this.formDataParams(params);
9364
9372
  }
9365
9373
  }
9366
9374
 
@@ -12362,7 +12370,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
12362
12370
  };
12363
12371
 
12364
12372
  Format.prototype.emptyToSpace = function (value) {
12365
- return value === null ? "&nbsp" : value;
12373
+ return value === null || typeof value === "undefined" ? "&nbsp" : value;
12366
12374
  };
12367
12375
 
12368
12376
  //get formatter for cell
@@ -12794,7 +12802,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
12794
12802
  el = document.createElement("div");
12795
12803
 
12796
12804
  function toggleList(isOpen) {
12797
- var collapse = cell.getRow().getElement().getElementsByClassName(".tabulator-responsive-collapse")[0];
12805
+ var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];
12806
+
12798
12807
  open = isOpen;
12799
12808
 
12800
12809
  if (open) {
@@ -12803,6 +12812,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
12803
12812
  collapse.style.display = '';
12804
12813
  }
12805
12814
  } else {
12815
+ el.classList.remove("open");
12806
12816
  if (collapse) {
12807
12817
  collapse.style.display = 'none';
12808
12818
  }
@@ -13648,7 +13658,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
13648
13658
  this.initialized = false;
13649
13659
  this.height = 0;
13650
13660
 
13651
- if (this.element.is(":visible")) {
13661
+ if (Tabulator.prototype.helpers.elVisible(this.element)) {
13652
13662
  this.initialize(true);
13653
13663
  }
13654
13664
  };
@@ -1,4 +1,4 @@
1
- /* Tabulator v4.0.1 (c) Oliver Folkerd */
1
+ /* Tabulator v4.0.2 (c) Oliver Folkerd */
2
2
  .tabulator {
3
3
  position: relative;
4
4
  border: 1px solid #999;
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.0.1
4
+ version: 1.0.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-07 00:00:00.000000000 Z
11
+ date: 2018-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler