@datarailsshared/dr_renderer 1.2.316-dragons → 1.2.318-rocket

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.316-dragons",
3
+ "version": "1.2.318-rocket",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -91,7 +91,6 @@ let initDRPivotTable = function($, window, document) {
91
91
 
92
92
  DRPivotData.prototype.arrSort = function(attrs) {
93
93
  var a, sortersArr;
94
- const sortByValueAttrs = this.sortByValueAttrs;
95
94
  sortersArr = (function() {
96
95
  var l, len1, results;
97
96
  results = [];
@@ -101,21 +100,11 @@ let initDRPivotTable = function($, window, document) {
101
100
  }
102
101
  return results;
103
102
  }).call(this);
104
-
105
103
  return function(a, b) {
106
104
  var comparison, i, sorter;
107
105
  for (i in sortersArr) {
108
- const index = parseInt(i);
109
- sorter = sortersArr[index];
110
- if (sortByValueAttrs.indexOf(attrs[index]) !== -1) {
111
-
112
- // For case current Field attrs[index] is sorted by value we are concatenating values passed to sorter function
113
- // Concatenation is done from first field in a block (first axis or first series) until current field index.
114
- // Cause for this case sorting will be as list of these concatenated strings (which is prepared in getSortingByValueOrderList)
115
- comparison = sorter(a.slice(0, index + 1).join(','), b.slice(0, index + 1).join(','));
116
- } else {
117
- comparison = sorter(a[index], b[index]);
118
- }
106
+ sorter = sortersArr[i];
107
+ comparison = sorter(a[i], b[i]);
119
108
  if (comparison !== 0) {
120
109
  return comparison;
121
110
  }
@@ -198,7 +187,7 @@ let initDRPivotTable = function($, window, document) {
198
187
  let flatRowKey = rowKey.join(delim);
199
188
  let flatColKey = colKey.join(delim);
200
189
 
201
- if (this.keysLength === rowKey.length + colKey.length && !this.isKeysSortingDoneOnBackendSide) {
190
+ if (this.keysLength === rowKey.length + colKey.length) {
202
191
  if (!this.rowKeys.some(rKey => rKey.join(delim) === flatRowKey)) {
203
192
  this.rowKeys.push(rowKey);
204
193
  }