@easyquery/enterprise 7.2.3-rc01 → 7.2.3-rc03
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 +36 -29
- package/dist/browser/eq.enterprise.js.map +1 -1
- package/dist/browser/eq.enterprise.min.js +3 -3
- package/dist/browser/eq.enterprise.min.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.js +31 -24
- 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/data/data_table_aggr_calculator.d.ts +1 -0
- package/dist/lib/data/data_table_aggr_calculator.js +16 -18
- package/dist/lib/data/data_table_aggr_calculator.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Enterprise 7.2.3-
|
|
3
|
-
* Copyright
|
|
2
|
+
* EasyQuery.JS Enterprise 7.2.3-rc03 (https://korzh.com/easyquery/javascript)
|
|
3
|
+
* Copyright 2023 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
6
6
|
* https://korzh.com/easyquery/javascript#LIC or as a part of
|
|
@@ -1056,13 +1056,22 @@ var AggregationSettings = /** @class */ (function () {
|
|
|
1056
1056
|
};
|
|
1057
1057
|
//returns true if value1 == value2
|
|
1058
1058
|
AggregationSettings.prototype.strictCompare = function (value1, value2) {
|
|
1059
|
-
|
|
1059
|
+
if (value1 instanceof Date) {
|
|
1060
|
+
return value1.getTime() === value2.getTime();
|
|
1061
|
+
}
|
|
1062
|
+
else
|
|
1063
|
+
return value1 === value2;
|
|
1060
1064
|
};
|
|
1061
1065
|
//makes a case insensative comparision of two values and return true if there are equal
|
|
1062
1066
|
AggregationSettings.prototype.caseInsensitiveCompare = function (value1, value2) {
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1067
|
+
if (value1 instanceof Date) {
|
|
1068
|
+
return value1.getTime() === value2.getTime();
|
|
1069
|
+
}
|
|
1070
|
+
else {
|
|
1071
|
+
var val1 = (typeof value1 === 'string') ? value1.toLowerCase() : value1;
|
|
1072
|
+
var val2 = (typeof value2 === 'string') ? value2.toLowerCase() : value2;
|
|
1073
|
+
return val1 === val2;
|
|
1074
|
+
}
|
|
1066
1075
|
};
|
|
1067
1076
|
return AggregationSettings;
|
|
1068
1077
|
}());
|
|
@@ -16101,13 +16110,13 @@ var ChartWidget = /** @class */ (function (_super) {
|
|
|
16101
16110
|
mainDiv.appendChild(contentDiv);
|
|
16102
16111
|
};
|
|
16103
16112
|
/**
|
|
16104
|
-
* Clears chart.
|
|
16113
|
+
* Clears the chart.
|
|
16105
16114
|
*/
|
|
16106
16115
|
ChartWidget.prototype.clear = function () {
|
|
16107
16116
|
this.element.innerHTML = '';
|
|
16108
16117
|
};
|
|
16109
16118
|
/**
|
|
16110
|
-
* Draws chart with delay.
|
|
16119
|
+
* Draws chart with a delay.
|
|
16111
16120
|
* @param delay The delay.
|
|
16112
16121
|
*/
|
|
16113
16122
|
ChartWidget.prototype.drawChart = function (delay) {
|
|
@@ -16121,7 +16130,7 @@ var ChartWidget = /** @class */ (function (_super) {
|
|
|
16121
16130
|
}
|
|
16122
16131
|
};
|
|
16123
16132
|
/**
|
|
16124
|
-
*
|
|
16133
|
+
* Inititializes the settings div.
|
|
16125
16134
|
*/
|
|
16126
16135
|
ChartWidget.prototype.initSettingsDiv = function () {
|
|
16127
16136
|
var _this = this;
|
|
@@ -32514,8 +32523,8 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32514
32523
|
this.prevRowTotals = newRow;
|
|
32515
32524
|
};
|
|
32516
32525
|
EasyGrid.prototype.applyGroupColumnTemplate = function (template, value, count) {
|
|
32517
|
-
var result = template.replace(/{{\s*GroupValue\s*}}/g, value ? "
|
|
32518
|
-
result = result.replace(/{{\s*GroupCount\s*}}/g, count ? "
|
|
32526
|
+
var result = template.replace(/{{\s*GroupValue\s*}}/g, value ? "" + value : '-');
|
|
32527
|
+
result = result.replace(/{{\s*GroupCount\s*}}/g, count ? "" + count : '-');
|
|
32519
32528
|
return result;
|
|
32520
32529
|
};
|
|
32521
32530
|
EasyGrid.prototype.renderTotalsRow = function (level, row) {
|
|
@@ -35393,24 +35402,7 @@ var DataTableAggregatesCalculator = /** @class */ (function () {
|
|
|
35393
35402
|
for (var _i = 0, _a = this.aggregates; _i < _a.length; _i++) {
|
|
35394
35403
|
var aggr = _a[_i];
|
|
35395
35404
|
var columnTotals = levelTotals.columns[aggr.colId];
|
|
35396
|
-
|
|
35397
|
-
case "SUM":
|
|
35398
|
-
groupTotals[aggr.colId] = columnTotals.sum;
|
|
35399
|
-
break;
|
|
35400
|
-
case "AVG":
|
|
35401
|
-
groupTotals[aggr.colId] = columnTotals.sum / levelTotals.count;
|
|
35402
|
-
break;
|
|
35403
|
-
case "COUNT":
|
|
35404
|
-
case "CNTDST":
|
|
35405
|
-
groupTotals[aggr.colId] = levelTotals.count;
|
|
35406
|
-
break;
|
|
35407
|
-
case "MIN":
|
|
35408
|
-
groupTotals[aggr.colId] = columnTotals.min;
|
|
35409
|
-
break;
|
|
35410
|
-
case "MAX":
|
|
35411
|
-
groupTotals[aggr.colId] = columnTotals.max;
|
|
35412
|
-
break;
|
|
35413
|
-
}
|
|
35405
|
+
groupTotals[aggr.colId] = this.applyAggrFunc(aggr.funcId, columnTotals, levelTotals);
|
|
35414
35406
|
}
|
|
35415
35407
|
if (this.aggrSettings.hasRecordCount()) {
|
|
35416
35408
|
groupTotals[this.aggrSettings.COUNT_FIELD_NAME] = levelTotals.count;
|
|
@@ -35418,6 +35410,21 @@ var DataTableAggregatesCalculator = /** @class */ (function () {
|
|
|
35418
35410
|
this.aggrContainer.updateAggregateData(levelIndex, groupKey, groupTotals);
|
|
35419
35411
|
this.resetLevelTotals(levelTotals);
|
|
35420
35412
|
};
|
|
35413
|
+
DataTableAggregatesCalculator.prototype.applyAggrFunc = function (funcId, columnTotals, levelTotals) {
|
|
35414
|
+
switch (funcId) {
|
|
35415
|
+
case "SUM":
|
|
35416
|
+
return columnTotals.sum;
|
|
35417
|
+
case "AVG":
|
|
35418
|
+
return columnTotals.sum / levelTotals.count;
|
|
35419
|
+
case "COUNT":
|
|
35420
|
+
case "CNTDST":
|
|
35421
|
+
return levelTotals.count;
|
|
35422
|
+
case "MIN":
|
|
35423
|
+
return columnTotals.min;
|
|
35424
|
+
case "MAX":
|
|
35425
|
+
return columnTotals.max;
|
|
35426
|
+
}
|
|
35427
|
+
};
|
|
35421
35428
|
/** Updates the totals by values in the current DataRow
|
|
35422
35429
|
* and according to the specified aggregate
|
|
35423
35430
|
*/
|