@cubejs-client/core 0.34.37 → 0.35.0

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.
@@ -333,8 +333,10 @@ function movePivotItem(pivotConfig, sourceIndex, destinationIndex, sourceAxis, d
333
333
 
334
334
  if (id === 'measures') {
335
335
  destinationIndex = lastIndex + 1;
336
- } else if (destinationIndex >= lastIndex && nextPivotConfig[destinationAxis][lastIndex] === 'measures') {
336
+ } else if (sourceAxis === destinationAxis && destinationIndex >= lastIndex && nextPivotConfig[destinationAxis][lastIndex] === 'measures') {
337
337
  destinationIndex = lastIndex - 1;
338
+ } else if (sourceAxis !== destinationAxis && destinationIndex > lastIndex && nextPivotConfig[destinationAxis][lastIndex] === 'measures') {
339
+ destinationIndex = lastIndex;
338
340
  }
339
341
 
340
342
  nextPivotConfig[sourceAxis].splice(sourceIndex, 1);
@@ -1783,9 +1785,9 @@ function mutexPromise(promise) {
1783
1785
  }());
1784
1786
  }
1785
1787
 
1786
- var CubejsApi = /*#__PURE__*/function () {
1787
- function CubejsApi(apiToken, options) {
1788
- _classCallCheck__default['default'](this, CubejsApi);
1788
+ var CubeApi = /*#__PURE__*/function () {
1789
+ function CubeApi(apiToken, options) {
1790
+ _classCallCheck__default['default'](this, CubeApi);
1789
1791
 
1790
1792
  if (apiToken !== null && !Array.isArray(apiToken) && _typeof__default['default'](apiToken) === 'object') {
1791
1793
  options = apiToken;
@@ -1815,7 +1817,7 @@ var CubejsApi = /*#__PURE__*/function () {
1815
1817
  this.updateAuthorizationPromise = null;
1816
1818
  }
1817
1819
 
1818
- _createClass__default['default'](CubejsApi, [{
1820
+ _createClass__default['default'](CubeApi, [{
1819
1821
  key: "request",
1820
1822
  value: function request(method, params) {
1821
1823
  return this.transport.request(method, _objectSpread({
@@ -2435,15 +2437,14 @@ var CubejsApi = /*#__PURE__*/function () {
2435
2437
  }
2436
2438
  }]);
2437
2439
 
2438
- return CubejsApi;
2440
+ return CubeApi;
2439
2441
  }();
2440
2442
 
2441
2443
  var index = (function (apiToken, options) {
2442
- return new CubejsApi(apiToken, options);
2444
+ return new CubeApi(apiToken, options);
2443
2445
  });
2444
2446
 
2445
- exports.CubeApi = CubejsApi;
2446
- exports.CubejsApi = CubejsApi;
2447
+ exports.CubeApi = CubeApi;
2447
2448
  exports.DEFAULT_GRANULARITY = DEFAULT_GRANULARITY;
2448
2449
  exports.GRANULARITIES = GRANULARITIES;
2449
2450
  exports.HttpTransport = HttpTransport;