@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.
- package/dist/browser/eq.enterprise.js +70 -44
- package/dist/browser/eq.enterprise.js.map +1 -1
- package/dist/browser/eq.enterprise.min.js +2 -2
- package/dist/browser/eq.enterprise.min.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.js +40 -36
- package/dist/bundles/easyquery.enterprise.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.min.js +1 -1
- package/dist/bundles/easyquery.enterprise.min.js.map +1 -1
- package/dist/lib/extensions.js +1 -1
- package/dist/lib/utils/lcv.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Enterprise 7.2.0-
|
|
2
|
+
* EasyQuery.JS Enterprise 7.2.0-rc02 (https://korzh.com/easyquery/javascript)
|
|
3
3
|
* Copyright 2021 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
@@ -2408,7 +2408,7 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
2408
2408
|
this.queryFileLoader = null;
|
|
2409
2409
|
this.aggrCalculator = null;
|
|
2410
2410
|
this.httpClient = new public_api["HttpClient"]();
|
|
2411
|
-
this.httpClient.defaultHeaders['x-eqjs-version'] = '7.
|
|
2411
|
+
this.httpClient.defaultHeaders['x-eqjs-version'] = '7.2.0';
|
|
2412
2412
|
this.modelResolver = function (_) { return new data_model["a" /* DataModel */](); };
|
|
2413
2413
|
this.queryResolver = function (context) { return new query_query["b" /* Query */](context.getModel()); };
|
|
2414
2414
|
this.modelLoaderResolver = function (context) { return new EqServerModelLoader(context); };
|
|
@@ -11260,6 +11260,11 @@ var ResultFacet = /** @class */ (function () {
|
|
|
11260
11260
|
var resultTable = context.resultTable;
|
|
11261
11261
|
return (resultTable.getCachedCount() == resultTable.getTotal());
|
|
11262
11262
|
};
|
|
11263
|
+
ResultFacet.prototype.showErrorMessage = function (message) {
|
|
11264
|
+
this.displayMessageDiv.innerHTML = message;
|
|
11265
|
+
this.displayMessageDiv.classList.add(this.cssPrefix + "-error-message");
|
|
11266
|
+
Object(_easydata_ui__WEBPACK_IMPORTED_MODULE_1__["domel"])(this.displayMessageDiv).show();
|
|
11267
|
+
};
|
|
11263
11268
|
ResultFacet.prototype.showUnableDisplayMessage = function (message) {
|
|
11264
11269
|
var context = this.getContext();
|
|
11265
11270
|
var resultTable = context.resultTable;
|
|
@@ -15283,7 +15288,7 @@ var EasyGridWidget = /** @class */ (function (_super) {
|
|
|
15283
15288
|
_super.prototype.init.call(this, context, options);
|
|
15284
15289
|
var gridOptions = __assign(__assign({}, options), { slot: this.slot, dataTable: context.resultTable });
|
|
15285
15290
|
this.options = _easydata_core__WEBPACK_IMPORTED_MODULE_1__["utils"].assign(this.options, options);
|
|
15286
|
-
gridOptions.
|
|
15291
|
+
gridOptions.onPlusButtonClick = function (ev) { return _this.addColumnClickHandler(ev); };
|
|
15287
15292
|
gridOptions.onColumnMoved = function (ev) { return _this.columnMovedHandler(ev); };
|
|
15288
15293
|
if (gridOptions.aggregates) {
|
|
15289
15294
|
this.hasCustomTotalsSettings = true;
|
|
@@ -25851,21 +25856,25 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
25851
25856
|
PivotTableFacet.prototype.init = function (slot) {
|
|
25852
25857
|
var _this = this;
|
|
25853
25858
|
_super.prototype.init.call(this, slot);
|
|
25859
|
+
this.options.maxRowCount = this.options.maxRowCount || 500;
|
|
25860
|
+
this.options.viewportRowsCount = this.options.viewportRowsCount || 50;
|
|
25854
25861
|
this.grid = new _easydata_ui__WEBPACK_IMPORTED_MODULE_0__["EasyGrid"]({
|
|
25855
25862
|
slot: this.contentDiv,
|
|
25856
25863
|
dataTable: this.pivotTable,
|
|
25857
25864
|
paging: {
|
|
25858
|
-
enabled: false
|
|
25865
|
+
enabled: false,
|
|
25866
|
+
pageSize: this.options.maxRowCount
|
|
25859
25867
|
},
|
|
25868
|
+
viewportRowsCount: this.options.viewportRowsCount,
|
|
25860
25869
|
useRowNumeration: false,
|
|
25861
|
-
|
|
25870
|
+
showPlusButton: false,
|
|
25862
25871
|
allowDragDrop: false,
|
|
25863
25872
|
onGetCellRenderer: function (column, defaultRenderer) {
|
|
25864
25873
|
if (column.dataColumn) {
|
|
25865
25874
|
if (column.dataColumn.id == "total") {
|
|
25866
25875
|
return function (value, column, cell, rowEl) {
|
|
25867
25876
|
defaultRenderer(value, column, cell, rowEl);
|
|
25868
|
-
cell.
|
|
25877
|
+
cell.classList.add('pivot-cell-total');
|
|
25869
25878
|
};
|
|
25870
25879
|
}
|
|
25871
25880
|
if (_this.settings.totalsRow) {
|
|
@@ -26126,6 +26135,18 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
26126
26135
|
PivotTableFacet.prototype.refreshCore = function () {
|
|
26127
26136
|
this.updatePivotData();
|
|
26128
26137
|
if (this.grid) {
|
|
26138
|
+
var dataSize = this.pivotTable.getTotal();
|
|
26139
|
+
var maxRow = this.grid.options.paging.pageSize;
|
|
26140
|
+
if (dataSize > maxRow) {
|
|
26141
|
+
this.contentDiv.classList.remove('pivot-grid-with-totals');
|
|
26142
|
+
this.showErrorMessage(_easydata_core__WEBPACK_IMPORTED_MODULE_1__["i18n"].getText('Facets', 'ErrTooMuchData'));
|
|
26143
|
+
}
|
|
26144
|
+
if (this.options.viewportRowsCount > dataSize) {
|
|
26145
|
+
this.grid.options.viewportRowsCount = dataSize;
|
|
26146
|
+
}
|
|
26147
|
+
else {
|
|
26148
|
+
this.grid.options.viewportRowsCount = this.options.viewportRowsCount;
|
|
26149
|
+
}
|
|
26129
26150
|
this.grid.refresh();
|
|
26130
26151
|
}
|
|
26131
26152
|
};
|
|
@@ -26300,10 +26321,10 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
26300
26321
|
total_row.push(totalByCol);
|
|
26301
26322
|
}
|
|
26302
26323
|
this.pivotTable.addRow(total_row);
|
|
26303
|
-
this.contentDiv.classList.add('pivot-grid-totals
|
|
26324
|
+
this.contentDiv.classList.add('pivot-grid-with-totals');
|
|
26304
26325
|
}
|
|
26305
26326
|
else {
|
|
26306
|
-
this.contentDiv.classList.remove('pivot-grid-totals
|
|
26327
|
+
this.contentDiv.classList.remove('pivot-grid-with-totals');
|
|
26307
26328
|
}
|
|
26308
26329
|
};
|
|
26309
26330
|
PivotTableFacet.prototype.calcAggrFunc = function (func, options) {
|
|
@@ -31871,7 +31892,7 @@ var EasyGrid = /** @class */ (function () {
|
|
|
31871
31892
|
default: 60
|
|
31872
31893
|
}
|
|
31873
31894
|
},
|
|
31874
|
-
|
|
31895
|
+
showPlusButton: false,
|
|
31875
31896
|
viewportRowsCount: null,
|
|
31876
31897
|
showActiveRow: true
|
|
31877
31898
|
};
|
|
@@ -31970,8 +31991,8 @@ var EasyGrid = /** @class */ (function () {
|
|
|
31970
31991
|
if (options.onRowDbClick) {
|
|
31971
31992
|
this.addEventListener('rowDbClick', options.onRowDbClick);
|
|
31972
31993
|
}
|
|
31973
|
-
if (options.
|
|
31974
|
-
this.addEventListener('
|
|
31994
|
+
if (options.onPlusButtonClick) {
|
|
31995
|
+
this.addEventListener('plusButtonClick', options.onPlusButtonClick);
|
|
31975
31996
|
}
|
|
31976
31997
|
if (options.onColumnChanged) {
|
|
31977
31998
|
this.addEventListener('columnChanged', options.onColumnChanged);
|
|
@@ -32057,7 +32078,7 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32057
32078
|
};
|
|
32058
32079
|
EasyGrid.prototype.render = function () {
|
|
32059
32080
|
var _this = this;
|
|
32060
|
-
if (!this.hasData() && !this.options.
|
|
32081
|
+
if (!this.hasData() && !this.options.showPlusButton)
|
|
32061
32082
|
return;
|
|
32062
32083
|
this.containerInitialHeight = this.slot.clientHeight;
|
|
32063
32084
|
this.rootDiv = document.createElement('div');
|
|
@@ -32105,14 +32126,14 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32105
32126
|
var firstRow = _this.bodyCellContainerDiv.firstElementChild;
|
|
32106
32127
|
var rowHeight = firstRow ? firstRow.offsetHeight : DEFAULT_ROW_HEIGHT;
|
|
32107
32128
|
var rowCount = _this.options.viewportRowsCount; // || DEFAULT_ROW_COUNT;
|
|
32108
|
-
var
|
|
32109
|
-
Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])(_this.
|
|
32110
|
-
.setStyle('height',
|
|
32129
|
+
var viewportHeight_1 = rowHeight * rowCount;
|
|
32130
|
+
Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])(_this.bodyViewportDiv)
|
|
32131
|
+
.setStyle('height', viewportHeight_1 + "px");
|
|
32111
32132
|
setTimeout(function () {
|
|
32112
32133
|
var sbHeight = _this.bodyViewportDiv.offsetHeight - _this.bodyViewportDiv.clientHeight;
|
|
32113
|
-
|
|
32114
|
-
Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])(_this.
|
|
32115
|
-
.setStyle('height',
|
|
32134
|
+
viewportHeight_1 = viewportHeight_1 + sbHeight;
|
|
32135
|
+
Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])(_this.bodyViewportDiv)
|
|
32136
|
+
.setStyle('height', viewportHeight_1 + "px");
|
|
32116
32137
|
resolve();
|
|
32117
32138
|
}, 100);
|
|
32118
32139
|
return;
|
|
@@ -32159,7 +32180,7 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32159
32180
|
_this.headerRowDiv.appendChild(hd);
|
|
32160
32181
|
if (column.isRowNum) {
|
|
32161
32182
|
Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])(hd)
|
|
32162
|
-
.addChildElement(_this.
|
|
32183
|
+
.addChildElement(_this.renderHeaderButtons());
|
|
32163
32184
|
}
|
|
32164
32185
|
});
|
|
32165
32186
|
var containerWidth = this.getContainerWidth();
|
|
@@ -32498,23 +32519,26 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32498
32519
|
var pageInfoDiv = Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])('div')
|
|
32499
32520
|
.addClass(this.cssPrefix + "-page-info")
|
|
32500
32521
|
.toDOM();
|
|
32501
|
-
var
|
|
32502
|
-
|
|
32503
|
-
|
|
32504
|
-
|
|
32505
|
-
|
|
32506
|
-
|
|
32507
|
-
|
|
32508
|
-
|
|
32509
|
-
var
|
|
32510
|
-
|
|
32511
|
-
|
|
32512
|
-
|
|
32513
|
-
|
|
32514
|
-
|
|
32515
|
-
|
|
32516
|
-
.
|
|
32517
|
-
|
|
32522
|
+
var rowCount = this.dataTable.getTotal();
|
|
32523
|
+
if (rowCount > 0) {
|
|
32524
|
+
var fistPageRecordNum = count
|
|
32525
|
+
? (this.pagination.page - 1) * this.pagination.pageSize + 1
|
|
32526
|
+
: 0;
|
|
32527
|
+
var lastPageRecordNum = count
|
|
32528
|
+
? fistPageRecordNum + count - 1
|
|
32529
|
+
: 0;
|
|
32530
|
+
var totalStr = this.dataTable.getTotal().toString();
|
|
32531
|
+
if (this.dataTable.elasticChunks) {
|
|
32532
|
+
var count_1 = this.dataTable.getCachedCount();
|
|
32533
|
+
var total = this.dataTable.getTotal();
|
|
32534
|
+
if (count_1 !== total)
|
|
32535
|
+
totalStr = '?';
|
|
32536
|
+
}
|
|
32537
|
+
pageInfoDiv.innerHTML = _easydata_core__WEBPACK_IMPORTED_MODULE_0__["i18n"].getText('GridPageInfo')
|
|
32538
|
+
.replace('{FirstPageRecordNum}', "<span>" + fistPageRecordNum.toString() + "</span>")
|
|
32539
|
+
.replace('{LastPageRecordNum}', "<span>" + lastPageRecordNum.toString() + "</span>")
|
|
32540
|
+
.replace('{Total}', "<span>" + totalStr + "</span>");
|
|
32541
|
+
}
|
|
32518
32542
|
return pageInfoDiv;
|
|
32519
32543
|
};
|
|
32520
32544
|
EasyGrid.prototype.showProgress = function () {
|
|
@@ -32609,7 +32633,8 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32609
32633
|
var _this = this;
|
|
32610
32634
|
var paginateDiv = document.createElement('div');
|
|
32611
32635
|
paginateDiv.className = this.cssPrefix + "-pagination-wrapper";
|
|
32612
|
-
|
|
32636
|
+
var rowCount = this.dataTable.getTotal();
|
|
32637
|
+
if (this.options.paging && this.options.paging.enabled && rowCount > 0) {
|
|
32613
32638
|
var prefix_1 = this.paginationOptions.useBootstrap ? '' : this.cssPrefix + "-";
|
|
32614
32639
|
var buttonClickHandler_1 = function (ev) {
|
|
32615
32640
|
var element = ev.target;
|
|
@@ -32735,18 +32760,18 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32735
32760
|
EasyGrid.prototype.removeEventListener = function (eventType, handlerId) {
|
|
32736
32761
|
this.eventEmitter.unsubscribe(eventType, handlerId);
|
|
32737
32762
|
};
|
|
32738
|
-
EasyGrid.prototype.
|
|
32763
|
+
EasyGrid.prototype.renderHeaderButtons = function () {
|
|
32739
32764
|
var _this = this;
|
|
32740
|
-
if (this.options.
|
|
32765
|
+
if (this.options.showPlusButton) {
|
|
32741
32766
|
return Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])('div')
|
|
32742
|
-
.addClass(this.cssPrefix + "-
|
|
32743
|
-
.title(this.options.
|
|
32767
|
+
.addClass(this.cssPrefix + "-header-btn-plus")
|
|
32768
|
+
.title(this.options.plusButtonTitle || 'Add')
|
|
32744
32769
|
.addChild('a', function (builder) { return builder
|
|
32745
32770
|
.attr('href', 'javascript:void(0)')
|
|
32746
32771
|
.on('click', function (e) {
|
|
32747
32772
|
e.preventDefault();
|
|
32748
32773
|
_this.fireEvent({
|
|
32749
|
-
type: '
|
|
32774
|
+
type: 'plusButtonClick',
|
|
32750
32775
|
sourceEvent: e
|
|
32751
32776
|
});
|
|
32752
32777
|
}); })
|
|
@@ -37158,6 +37183,7 @@ function addEasyQueryUITexts() {
|
|
|
37158
37183
|
TabNameLabel: 'Tab name',
|
|
37159
37184
|
ErrQueryChanged: 'FAILED TO DISPLAY. QUERY WAS CHANGED',
|
|
37160
37185
|
ErrNotEnoughData: "We can't display the graph because not all data for this query is loaded. \n The total number of records: {totalRecs}, currently loaded: {cachedRecs}. \n You can [download the result]. Please note: this may take some time and consume a lot of memory.",
|
|
37186
|
+
ErrTooMuchData: 'Too much data. The grid is not able to display it',
|
|
37161
37187
|
Chart: {
|
|
37162
37188
|
FacetTitle: 'Chart',
|
|
37163
37189
|
DlgTitle: 'Chart settings',
|
|
@@ -37335,7 +37361,7 @@ if (!Array.prototype.findIndex) {
|
|
|
37335
37361
|
//# sourceMappingURL=public_api.js.map
|
|
37336
37362
|
// CONCATENATED MODULE: ./dist/lib/utils/lcv.js
|
|
37337
37363
|
var majVer = 7;
|
|
37338
|
-
var minVer =
|
|
37364
|
+
var minVer = 2;
|
|
37339
37365
|
var magics = [45, 128, 231];
|
|
37340
37366
|
Math.trunc = Math.trunc || function (x) {
|
|
37341
37367
|
if (isNaN(x)) {
|
|
@@ -37894,7 +37920,7 @@ function showLCDialog() {
|
|
|
37894
37920
|
break;
|
|
37895
37921
|
default:
|
|
37896
37922
|
title = "Invalid key for EasyQuery!";
|
|
37897
|
-
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.
|
|
37923
|
+
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.";
|
|
37898
37924
|
buttonTitle = 'Get key';
|
|
37899
37925
|
buttonUrl = 'https://korzh.com/account';
|
|
37900
37926
|
break;
|