@easyquery/enterprise 7.2.0-rc01 → 7.2.0-rc02

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.
@@ -4417,7 +4417,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
4417
4417
  default: 60
4418
4418
  }
4419
4419
  },
4420
- addColumns: false,
4420
+ showPlusButton: false,
4421
4421
  viewportRowsCount: null,
4422
4422
  showActiveRow: true
4423
4423
  };
@@ -4516,8 +4516,8 @@ var easy_grid_EasyGrid = /** @class */ (function () {
4516
4516
  if (options.onRowDbClick) {
4517
4517
  this.addEventListener('rowDbClick', options.onRowDbClick);
4518
4518
  }
4519
- if (options.onAddColumnClick) {
4520
- this.addEventListener('addColumnClick', options.onAddColumnClick);
4519
+ if (options.onPlusButtonClick) {
4520
+ this.addEventListener('plusButtonClick', options.onPlusButtonClick);
4521
4521
  }
4522
4522
  if (options.onColumnChanged) {
4523
4523
  this.addEventListener('columnChanged', options.onColumnChanged);
@@ -4603,7 +4603,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
4603
4603
  };
4604
4604
  EasyGrid.prototype.render = function () {
4605
4605
  var _this = this;
4606
- if (!this.hasData() && !this.options.addColumns)
4606
+ if (!this.hasData() && !this.options.showPlusButton)
4607
4607
  return;
4608
4608
  this.containerInitialHeight = this.slot.clientHeight;
4609
4609
  this.rootDiv = document.createElement('div');
@@ -4651,14 +4651,14 @@ var easy_grid_EasyGrid = /** @class */ (function () {
4651
4651
  var firstRow = _this.bodyCellContainerDiv.firstElementChild;
4652
4652
  var rowHeight = firstRow ? firstRow.offsetHeight : DEFAULT_ROW_HEIGHT;
4653
4653
  var rowCount = _this.options.viewportRowsCount; // || DEFAULT_ROW_COUNT;
4654
- var bodyHeight_1 = rowHeight * rowCount;
4655
- domel(_this.bodyDiv)
4656
- .setStyle('height', bodyHeight_1 + "px");
4654
+ var viewportHeight_1 = rowHeight * rowCount;
4655
+ domel(_this.bodyViewportDiv)
4656
+ .setStyle('height', viewportHeight_1 + "px");
4657
4657
  setTimeout(function () {
4658
4658
  var sbHeight = _this.bodyViewportDiv.offsetHeight - _this.bodyViewportDiv.clientHeight;
4659
- bodyHeight_1 = bodyHeight_1 + sbHeight;
4660
- domel(_this.bodyDiv)
4661
- .setStyle('height', bodyHeight_1 + "px");
4659
+ viewportHeight_1 = viewportHeight_1 + sbHeight;
4660
+ domel(_this.bodyViewportDiv)
4661
+ .setStyle('height', viewportHeight_1 + "px");
4662
4662
  resolve();
4663
4663
  }, 100);
4664
4664
  return;
@@ -4705,7 +4705,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
4705
4705
  _this.headerRowDiv.appendChild(hd);
4706
4706
  if (column.isRowNum) {
4707
4707
  domel(hd)
4708
- .addChildElement(_this.renderAddColumnButton());
4708
+ .addChildElement(_this.renderHeaderButtons());
4709
4709
  }
4710
4710
  });
4711
4711
  var containerWidth = this.getContainerWidth();
@@ -5044,23 +5044,26 @@ var easy_grid_EasyGrid = /** @class */ (function () {
5044
5044
  var pageInfoDiv = domel('div')
5045
5045
  .addClass(this.cssPrefix + "-page-info")
5046
5046
  .toDOM();
5047
- var fistPageRecordNum = count
5048
- ? (this.pagination.page - 1) * this.pagination.pageSize + 1
5049
- : 0;
5050
- var lastPageRecordNum = count
5051
- ? fistPageRecordNum + count - 1
5052
- : 0;
5053
- var totalStr = this.dataTable.getTotal().toString();
5054
- if (this.dataTable.elasticChunks) {
5055
- var count_1 = this.dataTable.getCachedCount();
5056
- var total = this.dataTable.getTotal();
5057
- if (count_1 !== total)
5058
- totalStr = '?';
5059
- }
5060
- pageInfoDiv.innerHTML = i18n_i18n.getText('GridPageInfo')
5061
- .replace('{FirstPageRecordNum}', "<span>" + fistPageRecordNum.toString() + "</span>")
5062
- .replace('{LastPageRecordNum}', "<span>" + lastPageRecordNum.toString() + "</span>")
5063
- .replace('{Total}', "<span>" + totalStr + "</span>");
5047
+ var rowCount = this.dataTable.getTotal();
5048
+ if (rowCount > 0) {
5049
+ var fistPageRecordNum = count
5050
+ ? (this.pagination.page - 1) * this.pagination.pageSize + 1
5051
+ : 0;
5052
+ var lastPageRecordNum = count
5053
+ ? fistPageRecordNum + count - 1
5054
+ : 0;
5055
+ var totalStr = this.dataTable.getTotal().toString();
5056
+ if (this.dataTable.elasticChunks) {
5057
+ var count_1 = this.dataTable.getCachedCount();
5058
+ var total = this.dataTable.getTotal();
5059
+ if (count_1 !== total)
5060
+ totalStr = '?';
5061
+ }
5062
+ pageInfoDiv.innerHTML = i18n_i18n.getText('GridPageInfo')
5063
+ .replace('{FirstPageRecordNum}', "<span>" + fistPageRecordNum.toString() + "</span>")
5064
+ .replace('{LastPageRecordNum}', "<span>" + lastPageRecordNum.toString() + "</span>")
5065
+ .replace('{Total}', "<span>" + totalStr + "</span>");
5066
+ }
5064
5067
  return pageInfoDiv;
5065
5068
  };
5066
5069
  EasyGrid.prototype.showProgress = function () {
@@ -5155,7 +5158,8 @@ var easy_grid_EasyGrid = /** @class */ (function () {
5155
5158
  var _this = this;
5156
5159
  var paginateDiv = document.createElement('div');
5157
5160
  paginateDiv.className = this.cssPrefix + "-pagination-wrapper";
5158
- if (this.options.paging && this.options.paging.enabled) {
5161
+ var rowCount = this.dataTable.getTotal();
5162
+ if (this.options.paging && this.options.paging.enabled && rowCount > 0) {
5159
5163
  var prefix_1 = this.paginationOptions.useBootstrap ? '' : this.cssPrefix + "-";
5160
5164
  var buttonClickHandler_1 = function (ev) {
5161
5165
  var element = ev.target;
@@ -5281,18 +5285,18 @@ var easy_grid_EasyGrid = /** @class */ (function () {
5281
5285
  EasyGrid.prototype.removeEventListener = function (eventType, handlerId) {
5282
5286
  this.eventEmitter.unsubscribe(eventType, handlerId);
5283
5287
  };
5284
- EasyGrid.prototype.renderAddColumnButton = function () {
5288
+ EasyGrid.prototype.renderHeaderButtons = function () {
5285
5289
  var _this = this;
5286
- if (this.options.addColumns) {
5290
+ if (this.options.showPlusButton) {
5287
5291
  return domel('div')
5288
- .addClass(this.cssPrefix + "-addrow")
5289
- .title(this.options.addColumnsTitle || 'Add column')
5292
+ .addClass(this.cssPrefix + "-header-btn-plus")
5293
+ .title(this.options.plusButtonTitle || 'Add')
5290
5294
  .addChild('a', function (builder) { return builder
5291
5295
  .attr('href', 'javascript:void(0)')
5292
5296
  .on('click', function (e) {
5293
5297
  e.preventDefault();
5294
5298
  _this.fireEvent({
5295
- type: 'addColumnClick',
5299
+ type: 'plusButtonClick',
5296
5300
  sourceEvent: e
5297
5301
  });
5298
5302
  }); })
@@ -6695,7 +6699,7 @@ var dialogs = new DefaultDialogService();
6695
6699
  //# sourceMappingURL=public_api.js.map
6696
6700
  // CONCATENATED MODULE: ./src/utils/lcv.ts
6697
6701
  var majVer = 7;
6698
- var minVer = 1;
6702
+ var minVer = 2;
6699
6703
  var magics = [45, 128, 231];
6700
6704
  Math.trunc = Math.trunc || function (x) {
6701
6705
  if (isNaN(x)) {
@@ -7520,7 +7524,7 @@ function showLCDialog() {
7520
7524
  break;
7521
7525
  default:
7522
7526
  title = "Invalid key for EasyQuery!";
7523
- body = "The EasyQuery product key is either invalid or was issued for a different version of the library.\n The version you are using now is 7.1,\n\tso please <a href=\"https://korzh.com/account\">login to your account</a> to get a proper key for version 7.1.";
7527
+ body = "The EasyQuery product key is either invalid or was issued for a different version of the library.\n The version you are using now is 7.2,\n\tso please <a href=\"https://korzh.com/account\">login to your account</a> to get a proper key for version 7.2.";
7524
7528
  buttonTitle = 'Get key';
7525
7529
  buttonUrl = 'https://korzh.com/account';
7526
7530
  break;