@easyquery/enterprise 7.1.2-rc07 → 7.2.0-rc01
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 +4136 -3544
- 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.LICENSE.txt +0 -2
- package/dist/browser/eq.enterprise.min.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.js +951 -427
- 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.LICENSE.txt +0 -2
- package/dist/bundles/easyquery.enterprise.min.js.map +1 -1
- package/dist/lib/data/data_table_aggr_calculator.d.ts +46 -0
- package/dist/lib/data/data_table_aggr_calculator.js +164 -0
- package/dist/lib/data/data_table_aggr_calculator.js.map +1 -0
- package/dist/lib/data/eqs_aggr_calculator.d.ts +4 -1
- package/dist/lib/data/eqs_aggr_calculator.js +23 -12
- package/dist/lib/data/eqs_aggr_calculator.js.map +1 -1
- package/dist/lib/extensions.js +2 -2
- package/dist/lib/extensions.js.map +1 -1
- package/package.json +6 -8
|
@@ -180,12 +180,21 @@ var browserUtils;
|
|
|
180
180
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
181
181
|
|
|
182
182
|
"use strict";
|
|
183
|
+
// ESM COMPAT FLAG
|
|
183
184
|
__webpack_require__.r(__webpack_exports__);
|
|
184
185
|
|
|
186
|
+
// EXPORTS
|
|
187
|
+
__webpack_require__.d(__webpack_exports__, "EqServerAggregatesCalculator", function() { return /* reexport */ eqs_aggr_calculator_EqServerAggregatesCalculator; });
|
|
188
|
+
__webpack_require__.d(__webpack_exports__, "QueryEx", function() { return /* reexport */ query_ex_QueryEx; });
|
|
189
|
+
__webpack_require__.d(__webpack_exports__, "QueryColumnEx", function() { return /* reexport */ query_column_ex_QueryColumnEx; });
|
|
190
|
+
__webpack_require__.d(__webpack_exports__, "ConditionEx", function() { return /* reexport */ condition_ex_ConditionEx; });
|
|
191
|
+
__webpack_require__.d(__webpack_exports__, "DataModelEx", function() { return /* reexport */ model_ex_DataModelEx; });
|
|
192
|
+
__webpack_require__.d(__webpack_exports__, "EqServerQueryStorage", function() { return /* reexport */ EqServerQueryStorage; });
|
|
193
|
+
|
|
185
194
|
// EXTERNAL MODULE: external "easyqueryCore"
|
|
186
195
|
var external_easyqueryCore_ = __webpack_require__(0);
|
|
187
196
|
|
|
188
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
197
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/types/data_type.js
|
|
189
198
|
/** Represents the common types of the data. */
|
|
190
199
|
var DataType;
|
|
191
200
|
(function (DataType) {
|
|
@@ -232,7 +241,7 @@ var DataType;
|
|
|
232
241
|
DataType[DataType["Geography"] = 19] = "Geography";
|
|
233
242
|
})(DataType || (DataType = {}));
|
|
234
243
|
//# sourceMappingURL=data_type.js.map
|
|
235
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
244
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/types/entity_attr_kind.js
|
|
236
245
|
var EntityAttrKind;
|
|
237
246
|
(function (EntityAttrKind) {
|
|
238
247
|
EntityAttrKind[EntityAttrKind["Data"] = 0] = "Data";
|
|
@@ -240,7 +249,7 @@ var EntityAttrKind;
|
|
|
240
249
|
EntityAttrKind[EntityAttrKind["Lookup"] = 2] = "Lookup";
|
|
241
250
|
})(EntityAttrKind || (EntityAttrKind = {}));
|
|
242
251
|
//# sourceMappingURL=entity_attr_kind.js.map
|
|
243
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
252
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/types/editor_tag.js
|
|
244
253
|
var EditorTag = {
|
|
245
254
|
/** Unknown tag value */
|
|
246
255
|
Unknown: "Unknown",
|
|
@@ -256,7 +265,7 @@ var EditorTag = {
|
|
|
256
265
|
File: "FILE"
|
|
257
266
|
};
|
|
258
267
|
//# sourceMappingURL=editor_tag.js.map
|
|
259
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
268
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/http/http_method.js
|
|
260
269
|
var HttpMethod;
|
|
261
270
|
(function (HttpMethod) {
|
|
262
271
|
HttpMethod["Trace"] = "TRACE";
|
|
@@ -267,7 +276,7 @@ var HttpMethod;
|
|
|
267
276
|
HttpMethod["Delete"] = "DELETE";
|
|
268
277
|
})(HttpMethod || (HttpMethod = {}));
|
|
269
278
|
//# sourceMappingURL=http_method.js.map
|
|
270
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
279
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/http/http_request.js
|
|
271
280
|
var HttpRequest = /** @class */ (function () {
|
|
272
281
|
function HttpRequest(xhr, descriptor) {
|
|
273
282
|
this.xhr = xhr;
|
|
@@ -326,7 +335,7 @@ var HttpRequest = /** @class */ (function () {
|
|
|
326
335
|
}());
|
|
327
336
|
|
|
328
337
|
//# sourceMappingURL=http_request.js.map
|
|
329
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
338
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/utils/string_utils.js
|
|
330
339
|
function repeatString(str, times) {
|
|
331
340
|
var result = "";
|
|
332
341
|
for (var i = 0; i < times; i++) {
|
|
@@ -359,7 +368,7 @@ function combinePath(path1, path2) {
|
|
|
359
368
|
return result;
|
|
360
369
|
}
|
|
361
370
|
//# sourceMappingURL=string_utils.js.map
|
|
362
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
371
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/i18n/i18n.js
|
|
363
372
|
|
|
364
373
|
|
|
365
374
|
/**
|
|
@@ -828,14 +837,14 @@ var i18n_i18n;
|
|
|
828
837
|
}
|
|
829
838
|
})(i18n_i18n || (i18n_i18n = {}));
|
|
830
839
|
//# sourceMappingURL=i18n.js.map
|
|
831
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
840
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/utils/utils.js
|
|
832
841
|
|
|
833
842
|
|
|
834
843
|
|
|
835
844
|
var utils_utils;
|
|
836
845
|
(function (utils) {
|
|
837
846
|
function getAllDataTypes() {
|
|
838
|
-
return Object.values(DataType);
|
|
847
|
+
return Object.values(DataType).filter(function (item) { return typeof item === "number"; });
|
|
839
848
|
}
|
|
840
849
|
utils.getAllDataTypes = getAllDataTypes;
|
|
841
850
|
function getDateDataTypes() {
|
|
@@ -843,12 +852,16 @@ var utils_utils;
|
|
|
843
852
|
}
|
|
844
853
|
utils.getDateDataTypes = getDateDataTypes;
|
|
845
854
|
function getStringDataTypes() {
|
|
846
|
-
return [DataType.String, DataType.Memo];
|
|
855
|
+
return [DataType.String, DataType.Memo, DataType.FixedChar];
|
|
847
856
|
}
|
|
848
857
|
utils.getStringDataTypes = getStringDataTypes;
|
|
849
858
|
var _numericTypes = [DataType.Byte, DataType.Word, DataType.Int32,
|
|
850
|
-
DataType.Int64, DataType.Float, DataType.Currency];
|
|
851
|
-
|
|
859
|
+
DataType.Int64, DataType.Float, DataType.Currency, DataType.Autoinc];
|
|
860
|
+
function getNumericDataTypes() {
|
|
861
|
+
return _numericTypes;
|
|
862
|
+
}
|
|
863
|
+
utils.getNumericDataTypes = getNumericDataTypes;
|
|
864
|
+
var _intTypes = [DataType.Byte, DataType.Word, DataType.Int32, DataType.Int64, DataType.Autoinc];
|
|
852
865
|
//-------------- object functions -------------------
|
|
853
866
|
/**
|
|
854
867
|
* Copy the content of all objests passed in `args` parameters into `target`
|
|
@@ -913,7 +926,7 @@ var utils_utils;
|
|
|
913
926
|
hashSet.set(sourceVal, target[key]);
|
|
914
927
|
}
|
|
915
928
|
else {
|
|
916
|
-
if (typeof target[key] == 'undefined') {
|
|
929
|
+
if (typeof target[key] == 'undefined' || target[key] == null) {
|
|
917
930
|
target[key] = Object.create(Object.getPrototypeOf(sourceVal));
|
|
918
931
|
}
|
|
919
932
|
hashSet.set(sourceVal, target[key]);
|
|
@@ -1217,10 +1230,10 @@ var utils_utils;
|
|
|
1217
1230
|
return (621355968e9 + (new Date()).getTime() * 1e4);
|
|
1218
1231
|
}
|
|
1219
1232
|
function safeParseInt(str) {
|
|
1220
|
-
var
|
|
1221
|
-
if (
|
|
1222
|
-
throw "
|
|
1223
|
-
return
|
|
1233
|
+
var res = parseInt(str);
|
|
1234
|
+
if (isNaN(res))
|
|
1235
|
+
throw "\"" + str + "\" is not a valid number";
|
|
1236
|
+
return res;
|
|
1224
1237
|
}
|
|
1225
1238
|
function getDaysInMonth(month, year) {
|
|
1226
1239
|
return new Date(year, month + 1, 0).getDate();
|
|
@@ -1230,10 +1243,10 @@ var utils_utils;
|
|
|
1230
1243
|
function strToDateTime(value, format) {
|
|
1231
1244
|
if (!value || value.length == 0)
|
|
1232
1245
|
return new Date();
|
|
1233
|
-
var
|
|
1246
|
+
var normalizedValue = value.replace(/[^a-zA-Z0-9_]/g, '-');
|
|
1234
1247
|
var normalizedFormat = format.replace(/[^a-zA-Z0-9_]/g, '-');
|
|
1235
1248
|
var formatItems = normalizedFormat.split('-');
|
|
1236
|
-
var dateItems =
|
|
1249
|
+
var dateItems = normalizedValue.split('-');
|
|
1237
1250
|
var monthIndex = formatItems.indexOf("MM");
|
|
1238
1251
|
var dayIndex = formatItems.indexOf("dd");
|
|
1239
1252
|
var yearIndex = formatItems.indexOf("yyyy");
|
|
@@ -1242,41 +1255,58 @@ var utils_utils;
|
|
|
1242
1255
|
var secondsIndex = formatItems.indexOf("ss");
|
|
1243
1256
|
var today = new Date();
|
|
1244
1257
|
try {
|
|
1245
|
-
var year = yearIndex > -1 && yearIndex < dateItems.length
|
|
1246
|
-
|
|
1258
|
+
var year = yearIndex > -1 && yearIndex < dateItems.length
|
|
1259
|
+
? safeParseInt(dateItems[yearIndex])
|
|
1260
|
+
: today.getFullYear();
|
|
1261
|
+
var month = monthIndex > -1 && monthIndex < dateItems.length
|
|
1262
|
+
? safeParseInt(dateItems[monthIndex]) - 1
|
|
1263
|
+
: today.getMonth() - 1;
|
|
1247
1264
|
if (month > 11)
|
|
1248
1265
|
throw '';
|
|
1249
|
-
var day = dayIndex > -1 && dayIndex < dateItems.length
|
|
1266
|
+
var day = dayIndex > -1 && dayIndex < dateItems.length
|
|
1267
|
+
? safeParseInt(dateItems[dayIndex])
|
|
1268
|
+
: today.getDate();
|
|
1250
1269
|
if (day > getDaysInMonth(month, year))
|
|
1251
1270
|
throw '';
|
|
1252
|
-
var hour = hourIndex > -1 && hourIndex < dateItems.length
|
|
1271
|
+
var hour = hourIndex > -1 && hourIndex < dateItems.length
|
|
1272
|
+
? safeParseInt(dateItems[hourIndex])
|
|
1273
|
+
: 0;
|
|
1253
1274
|
if (hour > 23)
|
|
1254
1275
|
throw '';
|
|
1255
|
-
var minute = minutesIndex > -1 && minutesIndex < dateItems.length
|
|
1276
|
+
var minute = minutesIndex > -1 && minutesIndex < dateItems.length
|
|
1277
|
+
? safeParseInt(dateItems[minutesIndex])
|
|
1278
|
+
: 0;
|
|
1256
1279
|
if (minute > 59)
|
|
1257
1280
|
throw '';
|
|
1258
|
-
var second = secondsIndex > -1 && secondsIndex < dateItems.length
|
|
1281
|
+
var second = secondsIndex > -1 && secondsIndex < dateItems.length
|
|
1282
|
+
? safeParseInt(dateItems[secondsIndex])
|
|
1283
|
+
: 0;
|
|
1259
1284
|
if (second > 59)
|
|
1260
1285
|
throw '';
|
|
1261
1286
|
return new Date(year, month, day, hour, minute, second);
|
|
1262
1287
|
}
|
|
1263
1288
|
catch (_a) {
|
|
1264
|
-
throw "
|
|
1289
|
+
throw value + " is not a valid date.";
|
|
1265
1290
|
}
|
|
1266
1291
|
}
|
|
1267
1292
|
utils.strToDateTime = strToDateTime;
|
|
1268
1293
|
function strToTime(str) {
|
|
1269
1294
|
var timeItems = str.split(':');
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1295
|
+
try {
|
|
1296
|
+
var hour = timeItems.length > 0 ? safeParseInt(timeItems[0]) : 0;
|
|
1297
|
+
if (hour > 23)
|
|
1298
|
+
throw '';
|
|
1299
|
+
var minute = timeItems.length > 1 ? safeParseInt(timeItems[1]) : 0;
|
|
1300
|
+
if (minute > 59)
|
|
1301
|
+
throw '';
|
|
1302
|
+
var second = timeItems.length > 1 ? safeParseInt(timeItems[1]) : 0;
|
|
1303
|
+
if (second > 59)
|
|
1304
|
+
throw '';
|
|
1305
|
+
return new Date(0, 0, 0, hour, minute, second);
|
|
1306
|
+
}
|
|
1307
|
+
catch (_a) {
|
|
1308
|
+
throw str + " is not a valid time.";
|
|
1309
|
+
}
|
|
1280
1310
|
}
|
|
1281
1311
|
utils.strToTime = strToTime;
|
|
1282
1312
|
var DT_FORMAT_RGEX = /\[([^\]]+)]|y{4}|M{1,4}|d{1,2}|H{1,2}|h{1,2}|m{2}|s{2}|t{2}/g;
|
|
@@ -1328,7 +1358,7 @@ var utils_utils;
|
|
|
1328
1358
|
utils.numberToStr = numberToStr;
|
|
1329
1359
|
})(utils_utils || (utils_utils = {}));
|
|
1330
1360
|
//# sourceMappingURL=utils.js.map
|
|
1331
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
1361
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/http/http_action_result.js
|
|
1332
1362
|
var HttpActionResult = /** @class */ (function () {
|
|
1333
1363
|
function HttpActionResult(request, promise) {
|
|
1334
1364
|
this.request = request;
|
|
@@ -1353,7 +1383,7 @@ var HttpActionResult = /** @class */ (function () {
|
|
|
1353
1383
|
}());
|
|
1354
1384
|
|
|
1355
1385
|
//# sourceMappingURL=http_action_result.js.map
|
|
1356
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
1386
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/http/http_client.js
|
|
1357
1387
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1358
1388
|
var extendStatics = function (d, b) {
|
|
1359
1389
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -1425,7 +1455,7 @@ var http_client_HttpClient = /** @class */ (function () {
|
|
|
1425
1455
|
var desc = {
|
|
1426
1456
|
method: method,
|
|
1427
1457
|
url: url,
|
|
1428
|
-
headers: __assign({}, this.defaultHeaders, options.headers || {}),
|
|
1458
|
+
headers: __assign(__assign({}, this.defaultHeaders), options.headers || {}),
|
|
1429
1459
|
queryParams: options.queryParams || {},
|
|
1430
1460
|
data: data
|
|
1431
1461
|
};
|
|
@@ -1453,7 +1483,7 @@ var http_client_HttpClient = /** @class */ (function () {
|
|
|
1453
1483
|
}
|
|
1454
1484
|
var responseContentType = xhr.getResponseHeader('Content-Type') || '';
|
|
1455
1485
|
var status = xhr.status;
|
|
1456
|
-
if (status >=
|
|
1486
|
+
if (status >= 400) {
|
|
1457
1487
|
var rtPromise = (xhr.responseType === 'arraybuffer'
|
|
1458
1488
|
|| xhr.responseType === 'blob')
|
|
1459
1489
|
? HttpClient.decodeArrayBuffer(xhr.response)
|
|
@@ -1495,7 +1525,7 @@ var http_client_HttpClient = /** @class */ (function () {
|
|
|
1495
1525
|
}());
|
|
1496
1526
|
|
|
1497
1527
|
//# sourceMappingURL=http_client.js.map
|
|
1498
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
1528
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/meta/meta_entity.js
|
|
1499
1529
|
|
|
1500
1530
|
|
|
1501
1531
|
|
|
@@ -1505,6 +1535,8 @@ var http_client_HttpClient = /** @class */ (function () {
|
|
|
1505
1535
|
var MetaEntity = /** @class */ (function () {
|
|
1506
1536
|
/** The default constructor. */
|
|
1507
1537
|
function MetaEntity(parent) {
|
|
1538
|
+
/** Returns false if this entity is read-only */
|
|
1539
|
+
this.isEditable = true;
|
|
1508
1540
|
this.name = "";
|
|
1509
1541
|
this.caption = "";
|
|
1510
1542
|
this.description = "";
|
|
@@ -1524,6 +1556,8 @@ var MetaEntity = /** @class */ (function () {
|
|
|
1524
1556
|
this.captionPlural = dto.namePlur;
|
|
1525
1557
|
this.caption = dto.name;
|
|
1526
1558
|
this.description = dto.desc;
|
|
1559
|
+
if (typeof (dto.ied) !== 'undefined')
|
|
1560
|
+
this.isEditable = dto.ied;
|
|
1527
1561
|
this.subEntities = new Array();
|
|
1528
1562
|
if (dto.ents) {
|
|
1529
1563
|
for (var i = 0; i < dto.ents.length; i++) {
|
|
@@ -1567,6 +1601,12 @@ var MetaEntity = /** @class */ (function () {
|
|
|
1567
1601
|
};
|
|
1568
1602
|
internalProcessEntity(this);
|
|
1569
1603
|
};
|
|
1604
|
+
MetaEntity.prototype.getFirstPrimaryAttr = function () {
|
|
1605
|
+
return this.getPrimaryAttrs()[0];
|
|
1606
|
+
};
|
|
1607
|
+
MetaEntity.prototype.getPrimaryAttrs = function () {
|
|
1608
|
+
return this.attributes.filter(function (attr) { return attr.isPrimaryKey; });
|
|
1609
|
+
};
|
|
1570
1610
|
return MetaEntity;
|
|
1571
1611
|
}());
|
|
1572
1612
|
|
|
@@ -1627,7 +1667,7 @@ var meta_entity_MetaEntityAttr = /** @class */ (function () {
|
|
|
1627
1667
|
}());
|
|
1628
1668
|
|
|
1629
1669
|
//# sourceMappingURL=meta_entity.js.map
|
|
1630
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
1670
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/meta/value_editor.js
|
|
1631
1671
|
|
|
1632
1672
|
|
|
1633
1673
|
/**
|
|
@@ -1693,7 +1733,7 @@ var value_editor_ValueEditor = /** @class */ (function () {
|
|
|
1693
1733
|
}());
|
|
1694
1734
|
|
|
1695
1735
|
//# sourceMappingURL=value_editor.js.map
|
|
1696
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
1736
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/meta/meta_data.js
|
|
1697
1737
|
|
|
1698
1738
|
|
|
1699
1739
|
|
|
@@ -2185,9 +2225,9 @@ var meta_data_MetaData = /** @class */ (function () {
|
|
|
2185
2225
|
}());
|
|
2186
2226
|
|
|
2187
2227
|
//# sourceMappingURL=meta_data.js.map
|
|
2188
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2189
|
-
var
|
|
2190
|
-
|
|
2228
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/data/aggr_settings.js
|
|
2229
|
+
var aggr_settings_assign = (undefined && undefined.__assign) || function () {
|
|
2230
|
+
aggr_settings_assign = Object.assign || function(t) {
|
|
2191
2231
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2192
2232
|
s = arguments[i];
|
|
2193
2233
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -2195,7 +2235,7 @@ var aggr_calculator_assign = (undefined && undefined.__assign) || function () {
|
|
|
2195
2235
|
}
|
|
2196
2236
|
return t;
|
|
2197
2237
|
};
|
|
2198
|
-
return
|
|
2238
|
+
return aggr_settings_assign.apply(this, arguments);
|
|
2199
2239
|
};
|
|
2200
2240
|
/**
|
|
2201
2241
|
* Defines aggregations settings for the current context.
|
|
@@ -2208,16 +2248,32 @@ var AggregationSettings = /** @class */ (function () {
|
|
|
2208
2248
|
this.groups = [];
|
|
2209
2249
|
this.useGrandTotals = false;
|
|
2210
2250
|
this.useRecordCount = false;
|
|
2211
|
-
this.
|
|
2251
|
+
this._caseSensitiveGroups = false;
|
|
2212
2252
|
this.COUNT_FIELD_NAME = 'GRPRECCNT';
|
|
2213
2253
|
}
|
|
2254
|
+
Object.defineProperty(AggregationSettings.prototype, "caseSensitiveGroups", {
|
|
2255
|
+
get: function () {
|
|
2256
|
+
return this._caseSensitiveGroups;
|
|
2257
|
+
},
|
|
2258
|
+
set: function (value) {
|
|
2259
|
+
this._caseSensitiveGroups = value;
|
|
2260
|
+
this.updateCompareProc();
|
|
2261
|
+
},
|
|
2262
|
+
enumerable: true,
|
|
2263
|
+
configurable: true
|
|
2264
|
+
});
|
|
2265
|
+
AggregationSettings.prototype.updateCompareProc = function () {
|
|
2266
|
+
this.compareValues = this._caseSensitiveGroups
|
|
2267
|
+
? this.strictCompare
|
|
2268
|
+
: this.caseInsensitiveCompare;
|
|
2269
|
+
};
|
|
2214
2270
|
AggregationSettings.prototype.addGroup = function (settings) {
|
|
2215
2271
|
var cols = settings.columns || this.colStore.getColumnIds(settings.from, settings.to);
|
|
2216
2272
|
if (!this.colStore.validateColumns(cols))
|
|
2217
2273
|
throw "Invalid columns: " + cols;
|
|
2218
2274
|
if (this.hasColumnsInUse(cols))
|
|
2219
2275
|
throw "Can't add same columns to different groups/aggregates";
|
|
2220
|
-
this.groups.push(
|
|
2276
|
+
this.groups.push(aggr_settings_assign({ columns: cols }, settings));
|
|
2221
2277
|
return this;
|
|
2222
2278
|
};
|
|
2223
2279
|
AggregationSettings.prototype.addAggregateColumn = function (colIndexOrId, funcId) {
|
|
@@ -2242,7 +2298,7 @@ var AggregationSettings = /** @class */ (function () {
|
|
|
2242
2298
|
var cols = [];
|
|
2243
2299
|
var mappedGrops = this.groups.map(function (grp) {
|
|
2244
2300
|
cols = cols.concat(grp.columns);
|
|
2245
|
-
return
|
|
2301
|
+
return aggr_settings_assign(aggr_settings_assign({}, grp), { columns: Array.from(cols), aggregates: Array.from(_this.aggregates) });
|
|
2246
2302
|
});
|
|
2247
2303
|
return mappedGrops;
|
|
2248
2304
|
};
|
|
@@ -2334,11 +2390,36 @@ var AggregationSettings = /** @class */ (function () {
|
|
|
2334
2390
|
}
|
|
2335
2391
|
}
|
|
2336
2392
|
};
|
|
2393
|
+
AggregationSettings.prototype.buildGroupKey = function (group, row) {
|
|
2394
|
+
var caseInsensitive = !this.caseSensitiveGroups;
|
|
2395
|
+
var result = {};
|
|
2396
|
+
if (group) {
|
|
2397
|
+
for (var _i = 0, _a = group.columns; _i < _a.length; _i++) {
|
|
2398
|
+
var colId = _a[_i];
|
|
2399
|
+
var keyVal = row.getValue(colId);
|
|
2400
|
+
if (caseInsensitive && typeof (keyVal) === 'string') {
|
|
2401
|
+
keyVal = keyVal.toLowerCase();
|
|
2402
|
+
}
|
|
2403
|
+
result[colId] = keyVal;
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
return result;
|
|
2407
|
+
};
|
|
2408
|
+
//returns true if value1 == value2
|
|
2409
|
+
AggregationSettings.prototype.strictCompare = function (value1, value2) {
|
|
2410
|
+
return value1 === value2;
|
|
2411
|
+
};
|
|
2412
|
+
//makes a case insensative comparision of two values and return true if there are equal
|
|
2413
|
+
AggregationSettings.prototype.caseInsensitiveCompare = function (value1, value2) {
|
|
2414
|
+
var val1 = (typeof value1 === 'string') ? value1.toLowerCase() : value1;
|
|
2415
|
+
var val2 = (typeof value2 === 'string') ? value2.toLowerCase() : value2;
|
|
2416
|
+
return val1 === val2;
|
|
2417
|
+
};
|
|
2337
2418
|
return AggregationSettings;
|
|
2338
2419
|
}());
|
|
2339
2420
|
|
|
2340
|
-
//# sourceMappingURL=
|
|
2341
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2421
|
+
//# sourceMappingURL=aggr_settings.js.map
|
|
2422
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/data/data_column.js
|
|
2342
2423
|
|
|
2343
2424
|
|
|
2344
2425
|
var ColumnAlignment;
|
|
@@ -2364,6 +2445,8 @@ var data_column_DataColumn = /** @class */ (function () {
|
|
|
2364
2445
|
this.displayFormat = desc.dfmt;
|
|
2365
2446
|
this.groupFooterColumnTemplate = desc.gfct;
|
|
2366
2447
|
this.style = desc.style || {};
|
|
2448
|
+
this.description = desc.description;
|
|
2449
|
+
this.calculatedWidth = 0;
|
|
2367
2450
|
}
|
|
2368
2451
|
return DataColumn;
|
|
2369
2452
|
}());
|
|
@@ -2403,9 +2486,10 @@ var data_column_DataColumnList = /** @class */ (function () {
|
|
|
2403
2486
|
.map(function (col, index) { return index; });
|
|
2404
2487
|
};
|
|
2405
2488
|
DataColumnList.prototype.put = function (index, col) {
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2489
|
+
if (index >= 0 && index < this.count) {
|
|
2490
|
+
this.items[index] = col;
|
|
2491
|
+
this.updateDateColumnIdx();
|
|
2492
|
+
}
|
|
2409
2493
|
};
|
|
2410
2494
|
DataColumnList.prototype.move = function (col, newIndex) {
|
|
2411
2495
|
var oldIndex = this.items.indexOf(col);
|
|
@@ -2415,8 +2499,12 @@ var data_column_DataColumnList = /** @class */ (function () {
|
|
|
2415
2499
|
}
|
|
2416
2500
|
};
|
|
2417
2501
|
DataColumnList.prototype.get = function (index) {
|
|
2418
|
-
|
|
2419
|
-
|
|
2502
|
+
if (index >= 0 && index < this.count) {
|
|
2503
|
+
return this.items[index];
|
|
2504
|
+
}
|
|
2505
|
+
else {
|
|
2506
|
+
return null;
|
|
2507
|
+
}
|
|
2420
2508
|
};
|
|
2421
2509
|
DataColumnList.prototype.getIndex = function (id) {
|
|
2422
2510
|
return this.mapper[id];
|
|
@@ -2445,7 +2533,7 @@ var data_column_DataColumnList = /** @class */ (function () {
|
|
|
2445
2533
|
}());
|
|
2446
2534
|
|
|
2447
2535
|
//# sourceMappingURL=data_column.js.map
|
|
2448
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2536
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/data/data_row.js
|
|
2449
2537
|
var DataRow = /** @class */ (function () {
|
|
2450
2538
|
function DataRow(columns, values) {
|
|
2451
2539
|
this.columns = columns;
|
|
@@ -2491,7 +2579,7 @@ var DataRow = /** @class */ (function () {
|
|
|
2491
2579
|
}());
|
|
2492
2580
|
|
|
2493
2581
|
//# sourceMappingURL=data_row.js.map
|
|
2494
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2582
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/data/easy_data_table.js
|
|
2495
2583
|
|
|
2496
2584
|
|
|
2497
2585
|
|
|
@@ -2500,16 +2588,23 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2500
2588
|
function EasyDataTable(options) {
|
|
2501
2589
|
this._chunkSize = 1000;
|
|
2502
2590
|
this._elasticChunks = false;
|
|
2503
|
-
|
|
2504
|
-
this.chunkMap = {};
|
|
2591
|
+
this.cachedRows = [];
|
|
2505
2592
|
this.total = 0;
|
|
2506
2593
|
this.loader = null;
|
|
2507
2594
|
this.needTotal = true;
|
|
2595
|
+
this.isInMemory = false;
|
|
2508
2596
|
options = options || {};
|
|
2509
2597
|
this._chunkSize = options.chunkSize || this._chunkSize;
|
|
2510
2598
|
this._elasticChunks = options.elasticChunks || this._elasticChunks;
|
|
2511
2599
|
this.loader = options.loader;
|
|
2600
|
+
if (typeof options.inMemory !== 'undefined') {
|
|
2601
|
+
this.isInMemory = options.inMemory;
|
|
2602
|
+
}
|
|
2603
|
+
if (this.isInMemory) {
|
|
2604
|
+
this.needTotal = false;
|
|
2605
|
+
}
|
|
2512
2606
|
this._columns = new data_column_DataColumnList();
|
|
2607
|
+
this.onUpdate = options.onUpdate;
|
|
2513
2608
|
if (options.columns) {
|
|
2514
2609
|
for (var _i = 0, _a = options.columns; _i < _a.length; _i++) {
|
|
2515
2610
|
var colDesc = _a[_i];
|
|
@@ -2540,7 +2635,7 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2540
2635
|
this._chunkSize = value;
|
|
2541
2636
|
this.total = 0;
|
|
2542
2637
|
this.needTotal = !this.elasticChunks;
|
|
2543
|
-
this.
|
|
2638
|
+
this.cachedRows = [];
|
|
2544
2639
|
},
|
|
2545
2640
|
enumerable: true,
|
|
2546
2641
|
configurable: true
|
|
@@ -2553,7 +2648,7 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2553
2648
|
this._elasticChunks = value;
|
|
2554
2649
|
this.total = 0;
|
|
2555
2650
|
this.needTotal = !this.elasticChunks;
|
|
2556
|
-
this.
|
|
2651
|
+
this.cachedRows = [];
|
|
2557
2652
|
},
|
|
2558
2653
|
enumerable: true,
|
|
2559
2654
|
configurable: true
|
|
@@ -2581,22 +2676,12 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2581
2676
|
endIndex = this.total;
|
|
2582
2677
|
}
|
|
2583
2678
|
}
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
var allChunksCached = true;
|
|
2587
|
-
for (var i = lbChunk; i <= ubChunk; i++) {
|
|
2588
|
-
if (!this.chunkMap[i]) {
|
|
2589
|
-
allChunksCached = false;
|
|
2590
|
-
break;
|
|
2591
|
-
}
|
|
2679
|
+
if (this.isInMemory && endIndex > this.cachedRows.length) {
|
|
2680
|
+
endIndex = this.cachedRows.length;
|
|
2592
2681
|
}
|
|
2682
|
+
var allChunksCached = endIndex <= this.cachedRows.length;
|
|
2593
2683
|
if (allChunksCached) {
|
|
2594
|
-
|
|
2595
|
-
for (var i = lbChunk; i <= ubChunk; i++) {
|
|
2596
|
-
resultArr = resultArr.concat(this.chunkMap[i].rows);
|
|
2597
|
-
}
|
|
2598
|
-
var firstChunkOffset = this.chunkMap[lbChunk].offset;
|
|
2599
|
-
return Promise.resolve(resultArr.slice(fromIndex - firstChunkOffset, endIndex - firstChunkOffset));
|
|
2684
|
+
return Promise.resolve(this.cachedRows.slice(fromIndex, endIndex));
|
|
2600
2685
|
}
|
|
2601
2686
|
//if loader is not defined
|
|
2602
2687
|
if (!this.loader) {
|
|
@@ -2607,53 +2692,34 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2607
2692
|
if (this.needTotal) {
|
|
2608
2693
|
this.needTotal = false;
|
|
2609
2694
|
}
|
|
2610
|
-
var
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2695
|
+
var offset = this.cachedRows.length;
|
|
2696
|
+
var limit = endIndex - offset;
|
|
2697
|
+
if (limit < this._chunkSize) {
|
|
2698
|
+
limit = this._chunkSize;
|
|
2699
|
+
}
|
|
2700
|
+
var resultPromise = this.loader.loadChunk({
|
|
2701
|
+
offset: offset,
|
|
2615
2702
|
limit: limit,
|
|
2616
2703
|
needTotal: needTotal
|
|
2617
2704
|
})
|
|
2618
2705
|
.then(function (result) {
|
|
2619
|
-
var chunks = result.table.getCachedChunks();
|
|
2620
2706
|
if (needTotal) {
|
|
2621
2707
|
_this.total = result.total;
|
|
2622
|
-
if (endIndex > _this.total) {
|
|
2623
|
-
endIndex = _this.total;
|
|
2624
|
-
}
|
|
2625
2708
|
}
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
_this.chunkMap[index] = {
|
|
2630
|
-
offset: index * _this._chunkSize,
|
|
2631
|
-
rows: chunk.rows
|
|
2632
|
-
};
|
|
2633
|
-
index++;
|
|
2709
|
+
Array.prototype.push.apply(_this.cachedRows, result.table.getCachedRows());
|
|
2710
|
+
if (endIndex > _this.cachedRows.length) {
|
|
2711
|
+
endIndex = _this.cachedRows.length;
|
|
2634
2712
|
}
|
|
2635
2713
|
if (_this.elasticChunks) {
|
|
2636
2714
|
var count_1 = result.table.getCachedCount();
|
|
2637
|
-
if (count_1
|
|
2638
|
-
|
|
2639
|
-
if (count_1 === limit) {
|
|
2640
|
-
chunk.rows.splice(chunk.rows.length - 1, 1);
|
|
2641
|
-
if (chunk.rows.length == 0) {
|
|
2642
|
-
delete _this.chunkMap[index - 1];
|
|
2643
|
-
}
|
|
2644
|
-
}
|
|
2645
|
-
if (count_1 < limit) {
|
|
2646
|
-
_this.total = _this.getCachedCount();
|
|
2647
|
-
}
|
|
2715
|
+
if (count_1 < limit) {
|
|
2716
|
+
_this.total = _this.cachedRows.length;
|
|
2648
2717
|
}
|
|
2649
2718
|
}
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
resultArr = resultArr.concat(_this.chunkMap[i].rows);
|
|
2653
|
-
}
|
|
2654
|
-
var firstChunkOffset = _this.chunkMap[lbChunk].offset;
|
|
2655
|
-
return resultArr.slice(fromIndex - firstChunkOffset, endIndex - firstChunkOffset);
|
|
2719
|
+
_this.fireUpdated();
|
|
2720
|
+
return _this.cachedRows.slice(fromIndex, endIndex);
|
|
2656
2721
|
});
|
|
2722
|
+
return resultPromise;
|
|
2657
2723
|
};
|
|
2658
2724
|
EasyDataTable.prototype.getRow = function (index) {
|
|
2659
2725
|
return this.getRows({ offset: index, limit: 1 })
|
|
@@ -2665,14 +2731,13 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2665
2731
|
EasyDataTable.prototype.setTotal = function (total) {
|
|
2666
2732
|
this.total = total;
|
|
2667
2733
|
this.needTotal = false;
|
|
2668
|
-
this.chunkMap = {};
|
|
2669
2734
|
};
|
|
2670
2735
|
EasyDataTable.prototype.getCachedCount = function () {
|
|
2671
|
-
return this.
|
|
2736
|
+
return this.cachedRows.length;
|
|
2672
2737
|
};
|
|
2673
2738
|
EasyDataTable.prototype.clear = function () {
|
|
2674
2739
|
this.columns.clear();
|
|
2675
|
-
this.
|
|
2740
|
+
this.cachedRows = [];
|
|
2676
2741
|
this.total = 0;
|
|
2677
2742
|
this.needTotal = !this._elasticChunks;
|
|
2678
2743
|
};
|
|
@@ -2705,60 +2770,33 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2705
2770
|
}
|
|
2706
2771
|
return null;
|
|
2707
2772
|
};
|
|
2708
|
-
EasyDataTable.prototype.addRow = function (
|
|
2773
|
+
EasyDataTable.prototype.addRow = function (rowOrValues) {
|
|
2709
2774
|
var newRow;
|
|
2710
|
-
if (Array.isArray(
|
|
2775
|
+
if (Array.isArray(rowOrValues)) {
|
|
2776
|
+
var values = rowOrValues;
|
|
2711
2777
|
var dateIdx = this._columns.getDateColumnIndexes();
|
|
2712
2778
|
if (dateIdx.length > 0) {
|
|
2713
2779
|
for (var _i = 0, dateIdx_1 = dateIdx; _i < dateIdx_1.length; _i++) {
|
|
2714
2780
|
var idx = dateIdx_1[_i];
|
|
2715
|
-
if (
|
|
2716
|
-
|
|
2781
|
+
if (values[idx]) {
|
|
2782
|
+
values[idx] = this.mapDate(values[idx], this._columns.get(idx).type);
|
|
2717
2783
|
}
|
|
2718
2784
|
}
|
|
2719
2785
|
}
|
|
2720
|
-
newRow = new DataRow(this._columns,
|
|
2786
|
+
newRow = new DataRow(this._columns, values);
|
|
2721
2787
|
}
|
|
2722
2788
|
else {
|
|
2723
|
-
newRow = this.createRow(
|
|
2724
|
-
}
|
|
2725
|
-
var lastChunk = this.getLastChunk();
|
|
2726
|
-
if (!lastChunk || lastChunk.rows.length >= this._chunkSize) {
|
|
2727
|
-
lastChunk = this.createChunk();
|
|
2789
|
+
newRow = this.createRow(rowOrValues);
|
|
2728
2790
|
}
|
|
2729
|
-
|
|
2791
|
+
this.cachedRows.push(newRow);
|
|
2730
2792
|
var cachedTotal = this.getCachedCount();
|
|
2731
2793
|
if (cachedTotal > this.total) {
|
|
2732
2794
|
this.total = cachedTotal;
|
|
2733
2795
|
}
|
|
2734
2796
|
return newRow;
|
|
2735
2797
|
};
|
|
2736
|
-
EasyDataTable.prototype.createChunk = function (index) {
|
|
2737
|
-
if (typeof index == 'undefined') {
|
|
2738
|
-
index = this.getLastChunkIndex() + 1;
|
|
2739
|
-
}
|
|
2740
|
-
var chunk = { offset: index * this._chunkSize, rows: [] };
|
|
2741
|
-
this.chunkMap[index] = chunk;
|
|
2742
|
-
return chunk;
|
|
2743
|
-
};
|
|
2744
|
-
EasyDataTable.prototype.getLastChunkIndex = function () {
|
|
2745
|
-
var keys = Object.keys(this.chunkMap);
|
|
2746
|
-
return keys.length > 0
|
|
2747
|
-
? parseInt(keys[keys.length - 1])
|
|
2748
|
-
: -1;
|
|
2749
|
-
};
|
|
2750
|
-
EasyDataTable.prototype.getLastChunk = function () {
|
|
2751
|
-
var index = this.getLastChunkIndex();
|
|
2752
|
-
return index > -1
|
|
2753
|
-
? this.chunkMap[index]
|
|
2754
|
-
: null;
|
|
2755
|
-
};
|
|
2756
2798
|
EasyDataTable.prototype.getCachedRows = function () {
|
|
2757
|
-
return this.
|
|
2758
|
-
.reduce(function (acc, v) { return acc.concat(v.rows); }, []);
|
|
2759
|
-
};
|
|
2760
|
-
EasyDataTable.prototype.getCachedChunks = function () {
|
|
2761
|
-
return Object.values(this.chunkMap);
|
|
2799
|
+
return this.cachedRows;
|
|
2762
2800
|
};
|
|
2763
2801
|
EasyDataTable.prototype.totalIsKnown = function () {
|
|
2764
2802
|
if (this.elasticChunks) {
|
|
@@ -2767,11 +2805,16 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2767
2805
|
}
|
|
2768
2806
|
return !this.needTotal;
|
|
2769
2807
|
};
|
|
2808
|
+
EasyDataTable.prototype.fireUpdated = function () {
|
|
2809
|
+
if (this.onUpdate) {
|
|
2810
|
+
this.onUpdate(this);
|
|
2811
|
+
}
|
|
2812
|
+
};
|
|
2770
2813
|
return EasyDataTable;
|
|
2771
2814
|
}());
|
|
2772
2815
|
|
|
2773
2816
|
//# sourceMappingURL=easy_data_table.js.map
|
|
2774
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2817
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/utils/easy_guid.js
|
|
2775
2818
|
/**
|
|
2776
2819
|
* EasyData representation of GUID.
|
|
2777
2820
|
*/
|
|
@@ -2792,7 +2835,7 @@ var EasyGuid = /** @class */ (function () {
|
|
|
2792
2835
|
}());
|
|
2793
2836
|
|
|
2794
2837
|
//# sourceMappingURL=easy_guid.js.map
|
|
2795
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2838
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/event/event_emitter.js
|
|
2796
2839
|
|
|
2797
2840
|
/**
|
|
2798
2841
|
* The representation of event emitter.
|
|
@@ -2918,11 +2961,27 @@ var event_emitter_EventEmitter = /** @class */ (function () {
|
|
|
2918
2961
|
}());
|
|
2919
2962
|
|
|
2920
2963
|
//# sourceMappingURL=event_emitter.js.map
|
|
2921
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2964
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/utils/liquid.js
|
|
2965
|
+
var liquid;
|
|
2966
|
+
(function (liquid) {
|
|
2967
|
+
function renderLiquidTemplate(template, vars) {
|
|
2968
|
+
var result = template;
|
|
2969
|
+
if (vars) {
|
|
2970
|
+
for (var v in vars) {
|
|
2971
|
+
var liquidVarRegexp = new RegExp('\{\{' + v + '\}\}', 'g');
|
|
2972
|
+
result = result.replace(liquidVarRegexp, vars[v]);
|
|
2973
|
+
}
|
|
2974
|
+
}
|
|
2975
|
+
return result;
|
|
2976
|
+
}
|
|
2977
|
+
liquid.renderLiquidTemplate = renderLiquidTemplate;
|
|
2978
|
+
})(liquid || (liquid = {}));
|
|
2979
|
+
//# sourceMappingURL=liquid.js.map
|
|
2980
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/i18n/load_default_locale_settings.js
|
|
2922
2981
|
|
|
2923
2982
|
i18n_i18n.resetLocales();
|
|
2924
2983
|
//# sourceMappingURL=load_default_locale_settings.js.map
|
|
2925
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
2984
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/public_api.js
|
|
2926
2985
|
//types
|
|
2927
2986
|
|
|
2928
2987
|
|
|
@@ -2935,7 +2994,6 @@ i18n_i18n.resetLocales();
|
|
|
2935
2994
|
|
|
2936
2995
|
|
|
2937
2996
|
|
|
2938
|
-
//data
|
|
2939
2997
|
|
|
2940
2998
|
|
|
2941
2999
|
|
|
@@ -2949,6 +3007,7 @@ i18n_i18n.resetLocales();
|
|
|
2949
3007
|
|
|
2950
3008
|
|
|
2951
3009
|
|
|
3010
|
+
|
|
2952
3011
|
if (typeof Object.values !== 'function') {
|
|
2953
3012
|
Object.values = function (obj) {
|
|
2954
3013
|
return Object.keys(obj).map(function (key) { return obj[key]; });
|
|
@@ -2966,10 +3025,10 @@ if (typeof Math.trunc !== 'function') {
|
|
|
2966
3025
|
};
|
|
2967
3026
|
}
|
|
2968
3027
|
//# sourceMappingURL=public_api.js.map
|
|
2969
|
-
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
3028
|
+
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/utils/browser_utils.js
|
|
2970
3029
|
var browser_utils = __webpack_require__(1);
|
|
2971
3030
|
|
|
2972
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
3031
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/utils/ui-utils.js
|
|
2973
3032
|
|
|
2974
3033
|
/**
|
|
2975
3034
|
* Wraps all the elements inside "parent" by "wrapper" element
|
|
@@ -3197,7 +3256,7 @@ function slideUp(target, duration, callback) {
|
|
|
3197
3256
|
var eqCssPrefix = 'eqjs';
|
|
3198
3257
|
var eqCssMobile = 'eqjs-mobile';
|
|
3199
3258
|
//# sourceMappingURL=ui-utils.js.map
|
|
3200
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
3259
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/utils/mask.js
|
|
3201
3260
|
function mask(input, maskPattern) {
|
|
3202
3261
|
var d = { 9: '[0-9]', a: '[a-z]' };
|
|
3203
3262
|
var mask = maskPattern.split('');
|
|
@@ -3294,7 +3353,7 @@ function mask(input, maskPattern) {
|
|
|
3294
3353
|
input.addEventListener('focus', inputHandler);
|
|
3295
3354
|
}
|
|
3296
3355
|
//# sourceMappingURL=mask.js.map
|
|
3297
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
3356
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/utils/dom_elem_builder.js
|
|
3298
3357
|
var dom_elem_builder_extends = (undefined && undefined.__extends) || (function () {
|
|
3299
3358
|
var extendStatics = function (d, b) {
|
|
3300
3359
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -3308,6 +3367,13 @@ var dom_elem_builder_extends = (undefined && undefined.__extends) || (function (
|
|
|
3308
3367
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3309
3368
|
};
|
|
3310
3369
|
})();
|
|
3370
|
+
var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
|
|
3371
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3372
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
3373
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
3374
|
+
r[k] = a[j];
|
|
3375
|
+
return r;
|
|
3376
|
+
};
|
|
3311
3377
|
|
|
3312
3378
|
var DomElementBuilder = /** @class */ (function () {
|
|
3313
3379
|
function DomElementBuilder(tag, parent) {
|
|
@@ -3378,7 +3444,7 @@ var DomElementBuilder = /** @class */ (function () {
|
|
|
3378
3444
|
classNames[_i - 1] = arguments[_i];
|
|
3379
3445
|
}
|
|
3380
3446
|
if (className) {
|
|
3381
|
-
var fullList = className.trim().split(" ")
|
|
3447
|
+
var fullList = __spreadArrays(className.trim().split(" "), classNames);
|
|
3382
3448
|
for (var i = 0; i < fullList.length; i++)
|
|
3383
3449
|
this.element.classList.add(fullList[i]);
|
|
3384
3450
|
}
|
|
@@ -3390,7 +3456,7 @@ var DomElementBuilder = /** @class */ (function () {
|
|
|
3390
3456
|
classNames[_i - 1] = arguments[_i];
|
|
3391
3457
|
}
|
|
3392
3458
|
if (className) {
|
|
3393
|
-
var fullList = className.trim().split(" ")
|
|
3459
|
+
var fullList = __spreadArrays(className.trim().split(" "), classNames);
|
|
3394
3460
|
for (var i = 0; i < fullList.length; i++)
|
|
3395
3461
|
this.element.classList.remove(fullList[i]);
|
|
3396
3462
|
}
|
|
@@ -3590,7 +3656,7 @@ function domel(tag, parent) {
|
|
|
3590
3656
|
return new DomElementBuilder(tag, parent);
|
|
3591
3657
|
}
|
|
3592
3658
|
//# sourceMappingURL=dom_elem_builder.js.map
|
|
3593
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
3659
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/utils/drag_manager.js
|
|
3594
3660
|
|
|
3595
3661
|
|
|
3596
3662
|
|
|
@@ -3957,7 +4023,15 @@ var drag_manager_DragManager = /** @class */ (function () {
|
|
|
3957
4023
|
//global variable
|
|
3958
4024
|
var eqDragManager = new drag_manager_DragManager();
|
|
3959
4025
|
//# sourceMappingURL=drag_manager.js.map
|
|
3960
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
4026
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/grid/easy_grid_options.js
|
|
4027
|
+
var AutoResizeColumns;
|
|
4028
|
+
(function (AutoResizeColumns) {
|
|
4029
|
+
AutoResizeColumns[AutoResizeColumns["Always"] = 0] = "Always";
|
|
4030
|
+
AutoResizeColumns[AutoResizeColumns["Once"] = 1] = "Once";
|
|
4031
|
+
AutoResizeColumns[AutoResizeColumns["Never"] = 2] = "Never";
|
|
4032
|
+
})(AutoResizeColumns || (AutoResizeColumns = {}));
|
|
4033
|
+
//# sourceMappingURL=easy_grid_options.js.map
|
|
4034
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/grid/easy_grid_cell_renderer.js
|
|
3961
4035
|
|
|
3962
4036
|
|
|
3963
4037
|
|
|
@@ -4105,16 +4179,10 @@ var easy_grid_cell_renderer_GridCellRendererStore = /** @class */ (function () {
|
|
|
4105
4179
|
}());
|
|
4106
4180
|
|
|
4107
4181
|
//# sourceMappingURL=easy_grid_cell_renderer.js.map
|
|
4108
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
4182
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/grid/easy_grid_columns.js
|
|
4109
4183
|
|
|
4110
4184
|
|
|
4111
|
-
var DEFAULT_WIDTH = 150;
|
|
4112
|
-
var DEFAULT_WIDTH_NUMBER = 120;
|
|
4113
|
-
var DEFAULT_WIDTH_DATE = 200;
|
|
4114
|
-
var DEFAULT_WIDTH_BOOL = 80;
|
|
4115
4185
|
var DEFAULT_WIDTH_STRING = 250;
|
|
4116
|
-
var MIN_WIDTH_STRING = 100;
|
|
4117
|
-
var MAX_WIDTH_STRING = 500;
|
|
4118
4186
|
var ROW_NUM_WIDTH = 60;
|
|
4119
4187
|
var GridColumnAlign;
|
|
4120
4188
|
(function (GridColumnAlign) {
|
|
@@ -4139,36 +4207,25 @@ var easy_grid_columns_GridColumn = /** @class */ (function () {
|
|
|
4139
4207
|
function GridColumn(column, grid, isRowNum) {
|
|
4140
4208
|
if (isRowNum === void 0) { isRowNum = false; }
|
|
4141
4209
|
this._label = null;
|
|
4210
|
+
this._description = null;
|
|
4142
4211
|
//public left: number;
|
|
4143
4212
|
this.align = GridColumnAlign.NONE;
|
|
4144
4213
|
this.isVisible = true;
|
|
4145
4214
|
this.isRowNum = false;
|
|
4146
4215
|
this.dataColumn = column;
|
|
4147
4216
|
this.grid = grid;
|
|
4217
|
+
var widthOptions = grid.options.columnWidths || {};
|
|
4148
4218
|
if (column) {
|
|
4149
4219
|
if (column.style.alignment) {
|
|
4150
4220
|
this.align = MapAlignment(column.style.alignment);
|
|
4151
4221
|
}
|
|
4152
|
-
|
|
4153
|
-
var cellType = this.grid.cellRendererStore.getCellType(coltype);
|
|
4154
|
-
switch (cellType) {
|
|
4155
|
-
case CellRendererType.NUMBER:
|
|
4156
|
-
this.width = DEFAULT_WIDTH_NUMBER;
|
|
4157
|
-
break;
|
|
4158
|
-
case CellRendererType.DATETIME:
|
|
4159
|
-
this.width = DEFAULT_WIDTH_DATE;
|
|
4160
|
-
break;
|
|
4161
|
-
case CellRendererType.BOOL:
|
|
4162
|
-
this.width = DEFAULT_WIDTH_BOOL;
|
|
4163
|
-
break;
|
|
4164
|
-
default:
|
|
4165
|
-
this.width = DEFAULT_WIDTH_STRING;
|
|
4166
|
-
}
|
|
4222
|
+
this.width = (widthOptions && widthOptions[this.type]) ? widthOptions[this.type].default : DEFAULT_WIDTH_STRING;
|
|
4167
4223
|
this.cellRenderer = this.grid.cellRendererStore.getDefaultRenderer(column.type);
|
|
4224
|
+
this._description = column.description;
|
|
4168
4225
|
}
|
|
4169
4226
|
else if (isRowNum) {
|
|
4170
4227
|
this.isRowNum = true;
|
|
4171
|
-
this.width = ROW_NUM_WIDTH;
|
|
4228
|
+
this.width = (widthOptions && widthOptions.rowNumColumn) ? widthOptions.rowNumColumn.default : ROW_NUM_WIDTH;
|
|
4172
4229
|
this._label = '';
|
|
4173
4230
|
this.cellRenderer = this.grid.cellRendererStore.getDefaultRendererByType(CellRendererType.NUMBER);
|
|
4174
4231
|
}
|
|
@@ -4187,6 +4244,14 @@ var easy_grid_columns_GridColumn = /** @class */ (function () {
|
|
|
4187
4244
|
configurable: true
|
|
4188
4245
|
});
|
|
4189
4246
|
;
|
|
4247
|
+
Object.defineProperty(GridColumn.prototype, "description", {
|
|
4248
|
+
/** Get column description. */
|
|
4249
|
+
get: function () {
|
|
4250
|
+
return this._description;
|
|
4251
|
+
},
|
|
4252
|
+
enumerable: true,
|
|
4253
|
+
configurable: true
|
|
4254
|
+
});
|
|
4190
4255
|
Object.defineProperty(GridColumn.prototype, "type", {
|
|
4191
4256
|
get: function () {
|
|
4192
4257
|
return this.dataColumn ? this.dataColumn.type : null;
|
|
@@ -4206,9 +4271,10 @@ var easy_grid_columns_GridColumnList = /** @class */ (function () {
|
|
|
4206
4271
|
GridColumnList.prototype.sync = function (columnList, hasRowNumCol) {
|
|
4207
4272
|
if (hasRowNumCol === void 0) { hasRowNumCol = true; }
|
|
4208
4273
|
this.clear();
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4274
|
+
var rowNumCol = new easy_grid_columns_GridColumn(null, this.grid, true);
|
|
4275
|
+
this.add(rowNumCol);
|
|
4276
|
+
if (!hasRowNumCol) {
|
|
4277
|
+
rowNumCol.isVisible = false;
|
|
4212
4278
|
}
|
|
4213
4279
|
if (columnList) {
|
|
4214
4280
|
for (var _i = 0, _a = columnList.getItems(); _i < _a.length; _i++) {
|
|
@@ -4270,7 +4336,7 @@ var easy_grid_columns_GridColumnList = /** @class */ (function () {
|
|
|
4270
4336
|
}());
|
|
4271
4337
|
|
|
4272
4338
|
//# sourceMappingURL=easy_grid_columns.js.map
|
|
4273
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
4339
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/grid/easy_grid.js
|
|
4274
4340
|
var easy_grid_assign = (undefined && undefined.__assign) || function () {
|
|
4275
4341
|
easy_grid_assign = Object.assign || function(t) {
|
|
4276
4342
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -4282,6 +4348,14 @@ var easy_grid_assign = (undefined && undefined.__assign) || function () {
|
|
|
4282
4348
|
};
|
|
4283
4349
|
return easy_grid_assign.apply(this, arguments);
|
|
4284
4350
|
};
|
|
4351
|
+
var easy_grid_spreadArrays = (undefined && undefined.__spreadArrays) || function () {
|
|
4352
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
4353
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
4354
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
4355
|
+
r[k] = a[j];
|
|
4356
|
+
return r;
|
|
4357
|
+
};
|
|
4358
|
+
|
|
4285
4359
|
|
|
4286
4360
|
|
|
4287
4361
|
|
|
@@ -4314,6 +4388,35 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4314
4388
|
pageSize: 30,
|
|
4315
4389
|
pageSizeItems: [20, 30, 50, 100, 200]
|
|
4316
4390
|
},
|
|
4391
|
+
columnWidths: {
|
|
4392
|
+
autoResize: AutoResizeColumns.Once,
|
|
4393
|
+
stringColumns: {
|
|
4394
|
+
min: 100,
|
|
4395
|
+
max: 500,
|
|
4396
|
+
default: 250
|
|
4397
|
+
},
|
|
4398
|
+
numberColumns: {
|
|
4399
|
+
min: 60,
|
|
4400
|
+
default: 120
|
|
4401
|
+
},
|
|
4402
|
+
boolColumns: {
|
|
4403
|
+
min: 50,
|
|
4404
|
+
default: 80
|
|
4405
|
+
},
|
|
4406
|
+
dateColumns: {
|
|
4407
|
+
min: 80,
|
|
4408
|
+
default: 200
|
|
4409
|
+
},
|
|
4410
|
+
otherColumns: {
|
|
4411
|
+
min: 100,
|
|
4412
|
+
max: 500,
|
|
4413
|
+
default: 250
|
|
4414
|
+
},
|
|
4415
|
+
rowNumColumn: {
|
|
4416
|
+
min: 40,
|
|
4417
|
+
default: 60
|
|
4418
|
+
}
|
|
4419
|
+
},
|
|
4317
4420
|
addColumns: false,
|
|
4318
4421
|
viewportRowsCount: null,
|
|
4319
4422
|
showActiveRow: true
|
|
@@ -4321,7 +4424,6 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4321
4424
|
this.rowsOnPagePromise = null;
|
|
4322
4425
|
this.containerInitialHeight = 0;
|
|
4323
4426
|
this.firstRender = true;
|
|
4324
|
-
this.compareValues = this.strictCompare;
|
|
4325
4427
|
this.prevRowTotals = null;
|
|
4326
4428
|
this.landingIndex = -1;
|
|
4327
4429
|
this.landingSlot = domel('div')
|
|
@@ -4333,7 +4435,8 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4333
4435
|
if (options && options.paging) {
|
|
4334
4436
|
options.paging = utils_utils.assign(this.defaultDataGridOptions.paging, options.paging);
|
|
4335
4437
|
}
|
|
4336
|
-
this.options =
|
|
4438
|
+
this.options = this.mergeOptions(options);
|
|
4439
|
+
this.processColumnWidthsOptions();
|
|
4337
4440
|
if (!this.options.slot)
|
|
4338
4441
|
throw Error('"slot" parameter is required to initialize EasyDataGrid');
|
|
4339
4442
|
if (!this.options.dataTable)
|
|
@@ -4345,6 +4448,42 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4345
4448
|
this.setSlot(this.options.slot);
|
|
4346
4449
|
this.init(this.options);
|
|
4347
4450
|
}
|
|
4451
|
+
EasyGrid.prototype.mergeOptions = function (options) {
|
|
4452
|
+
var colWidthOptions = utils_utils.assignDeep({}, this.defaultDataGridOptions.columnWidths, options.columnWidths);
|
|
4453
|
+
var pagingOptions = utils_utils.assignDeep({}, this.defaultDataGridOptions.paging, options.paging);
|
|
4454
|
+
var result = utils_utils.assign({}, this.defaultDataGridOptions, options);
|
|
4455
|
+
result.columnWidths = colWidthOptions;
|
|
4456
|
+
result.paging = pagingOptions;
|
|
4457
|
+
return result;
|
|
4458
|
+
};
|
|
4459
|
+
EasyGrid.prototype.processColumnWidthsOptions = function () {
|
|
4460
|
+
var widthOptions = this.options.columnWidths;
|
|
4461
|
+
if (!widthOptions)
|
|
4462
|
+
return;
|
|
4463
|
+
//string columns
|
|
4464
|
+
utils_utils.getStringDataTypes().forEach(function (dataType) {
|
|
4465
|
+
widthOptions[dataType] = easy_grid_assign(easy_grid_assign({}, widthOptions.stringColumns), widthOptions[dataType]);
|
|
4466
|
+
});
|
|
4467
|
+
//numeric columns
|
|
4468
|
+
utils_utils.getNumericDataTypes().forEach(function (dataType) {
|
|
4469
|
+
widthOptions[dataType] = easy_grid_assign(easy_grid_assign({}, widthOptions.numberColumns), widthOptions[dataType]);
|
|
4470
|
+
});
|
|
4471
|
+
//bool columns
|
|
4472
|
+
widthOptions[DataType.Bool] = easy_grid_assign(easy_grid_assign({}, widthOptions.boolColumns), widthOptions[DataType.Bool]);
|
|
4473
|
+
//date columns
|
|
4474
|
+
utils_utils.getDateDataTypes().forEach(function (dataType) {
|
|
4475
|
+
widthOptions[dataType] = easy_grid_assign(easy_grid_assign({}, widthOptions.dateColumns), widthOptions[dataType]);
|
|
4476
|
+
});
|
|
4477
|
+
//other columns
|
|
4478
|
+
var knownTypes = easy_grid_spreadArrays(utils_utils.getStringDataTypes(), utils_utils.getNumericDataTypes(), utils_utils.getDateDataTypes(), [
|
|
4479
|
+
DataType.Bool
|
|
4480
|
+
]);
|
|
4481
|
+
utils_utils.getAllDataTypes().forEach(function (dataType) {
|
|
4482
|
+
if (!(dataType in knownTypes)) {
|
|
4483
|
+
widthOptions[dataType] = easy_grid_assign(easy_grid_assign({}, widthOptions.otherColumns), widthOptions[dataType]);
|
|
4484
|
+
}
|
|
4485
|
+
});
|
|
4486
|
+
};
|
|
4348
4487
|
EasyGrid.prototype.setSlot = function (slot) {
|
|
4349
4488
|
if (typeof slot === 'string') {
|
|
4350
4489
|
if (slot.length) {
|
|
@@ -4481,18 +4620,27 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4481
4620
|
gridContainer.classList.add(this.cssPrefix + "-container");
|
|
4482
4621
|
gridContainer.appendChild(this.rootDiv);
|
|
4483
4622
|
this.slot.appendChild(gridContainer);
|
|
4623
|
+
var needAutoResize = this.options.columnWidths.autoResize !== AutoResizeColumns.Never;
|
|
4484
4624
|
if (this.rowsOnPagePromise) {
|
|
4485
4625
|
this.rowsOnPagePromise
|
|
4486
4626
|
.then(function () { return _this.updateHeight(); })
|
|
4487
4627
|
.then(function () {
|
|
4488
4628
|
_this.firstRender = false;
|
|
4489
4629
|
_this.rowsOnPagePromise = null;
|
|
4630
|
+
if (needAutoResize) {
|
|
4631
|
+
_this.resizeColumns();
|
|
4632
|
+
}
|
|
4490
4633
|
});
|
|
4491
4634
|
}
|
|
4492
4635
|
else {
|
|
4493
4636
|
setTimeout(function () {
|
|
4494
|
-
_this.updateHeight()
|
|
4495
|
-
|
|
4637
|
+
_this.updateHeight()
|
|
4638
|
+
.then(function () {
|
|
4639
|
+
_this.firstRender = false;
|
|
4640
|
+
if (needAutoResize) {
|
|
4641
|
+
_this.resizeColumns();
|
|
4642
|
+
}
|
|
4643
|
+
});
|
|
4496
4644
|
}, 100);
|
|
4497
4645
|
}
|
|
4498
4646
|
};
|
|
@@ -4529,6 +4677,12 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4529
4677
|
}
|
|
4530
4678
|
});
|
|
4531
4679
|
};
|
|
4680
|
+
EasyGrid.prototype.getContainerWidth = function () {
|
|
4681
|
+
return this.columns.getItems()
|
|
4682
|
+
.filter(function (col) { return col.isVisible; })
|
|
4683
|
+
.map(function (col) { return col.width; })
|
|
4684
|
+
.reduce(function (sum, current) { return sum + current; });
|
|
4685
|
+
};
|
|
4532
4686
|
EasyGrid.prototype.renderHeader = function () {
|
|
4533
4687
|
var _this = this;
|
|
4534
4688
|
this.headerDiv = domel('div')
|
|
@@ -4554,7 +4708,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4554
4708
|
.addChildElement(_this.renderAddColumnButton());
|
|
4555
4709
|
}
|
|
4556
4710
|
});
|
|
4557
|
-
var containerWidth = this.
|
|
4711
|
+
var containerWidth = this.getContainerWidth();
|
|
4558
4712
|
domel(this.headerCellContainerDiv)
|
|
4559
4713
|
.setStyle('width', containerWidth + "px");
|
|
4560
4714
|
};
|
|
@@ -4565,7 +4719,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4565
4719
|
var _this = this;
|
|
4566
4720
|
var colBuilder = domel('div')
|
|
4567
4721
|
.addClass(this.cssPrefix + "-header-cell")
|
|
4568
|
-
.data('col-idx', "" +
|
|
4722
|
+
.data('col-idx', "" + index)
|
|
4569
4723
|
.setStyle('width', column.width + "px");
|
|
4570
4724
|
if (column.dataColumn) {
|
|
4571
4725
|
colBuilder
|
|
@@ -4579,6 +4733,11 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4579
4733
|
.addClass(this.cssPrefix + "-header-cell-label")
|
|
4580
4734
|
.text(column.label);
|
|
4581
4735
|
}
|
|
4736
|
+
if (column.description) {
|
|
4737
|
+
domel('div', colDiv)
|
|
4738
|
+
.addClass('question-mark')
|
|
4739
|
+
.title(column.description);
|
|
4740
|
+
}
|
|
4582
4741
|
if (this.options.allowDragDrop) {
|
|
4583
4742
|
eqDragManager.registerDraggableItem({
|
|
4584
4743
|
element: colDiv,
|
|
@@ -4598,14 +4757,6 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4598
4757
|
}
|
|
4599
4758
|
return colDiv;
|
|
4600
4759
|
};
|
|
4601
|
-
EasyGrid.prototype.strictCompare = function (value1, value2) {
|
|
4602
|
-
return value1 !== value2;
|
|
4603
|
-
};
|
|
4604
|
-
EasyGrid.prototype.caseInsensitiveCompare = function (value1, value2) {
|
|
4605
|
-
var val1 = (typeof value1 === 'string') ? value1.toLowerCase() : value1;
|
|
4606
|
-
var val2 = (typeof value2 === 'string') ? value2.toLowerCase() : value2;
|
|
4607
|
-
return val1 !== val2;
|
|
4608
|
-
};
|
|
4609
4760
|
EasyGrid.prototype.renderBody = function () {
|
|
4610
4761
|
var _this = this;
|
|
4611
4762
|
this.bodyDiv = domel('div')
|
|
@@ -4619,10 +4770,6 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4619
4770
|
.addClass(this.cssPrefix + "-cell-container")
|
|
4620
4771
|
.toDOM();
|
|
4621
4772
|
var showAggrs = this.canShowAggregates();
|
|
4622
|
-
this.compareValues = this.caseInsensitiveCompare;
|
|
4623
|
-
if (showAggrs && this.options.aggregates.settings.caseSensitiveGroups) {
|
|
4624
|
-
this.compareValues = this.strictCompare;
|
|
4625
|
-
}
|
|
4626
4773
|
if (this.dataTable) {
|
|
4627
4774
|
this.showProgress();
|
|
4628
4775
|
this.rowsOnPagePromise = this.getRowsToRender()
|
|
@@ -4632,15 +4779,22 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4632
4779
|
//prevent double rendering (bad solution, we have to figure out how to avoid this behavior properly)
|
|
4633
4780
|
_this.bodyCellContainerDiv.innerHTML = '';
|
|
4634
4781
|
_this.prevRowTotals = null;
|
|
4782
|
+
var rowsToRender = 0;
|
|
4635
4783
|
if (rows.length) {
|
|
4636
4784
|
var groups_1 = showAggrs
|
|
4637
4785
|
? _this.options.aggregates.settings.getGroups()
|
|
4638
4786
|
: [];
|
|
4787
|
+
rowsToRender = (rows.length < _this.pagination.pageSize)
|
|
4788
|
+
? rows.length
|
|
4789
|
+
: _this.pagination.pageSize;
|
|
4639
4790
|
rows.forEach(function (row, index) {
|
|
4640
4791
|
if (showAggrs)
|
|
4641
4792
|
_this.updateTotalsState(groups_1, row);
|
|
4642
|
-
|
|
4643
|
-
|
|
4793
|
+
//we don't actually render the last row
|
|
4794
|
+
if (index < rowsToRender) {
|
|
4795
|
+
var tr = _this.renderRow(row, index);
|
|
4796
|
+
_this.bodyCellContainerDiv.appendChild(tr);
|
|
4797
|
+
}
|
|
4644
4798
|
});
|
|
4645
4799
|
var showGrandTotalsOnEachPage = _this.options.aggregates && _this.options.aggregates.showGrandTotalsOnEachPage;
|
|
4646
4800
|
if (showAggrs && (_this.isLastPage() || showGrandTotalsOnEachPage)) {
|
|
@@ -4648,11 +4802,10 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4648
4802
|
_this.updateTotalsState(groups_1, row, true);
|
|
4649
4803
|
}
|
|
4650
4804
|
}
|
|
4651
|
-
var containerWidth = _this.
|
|
4652
|
-
.map(function (column) { return column.width; }).reduce(function (sum, current) { return sum + current; });
|
|
4805
|
+
var containerWidth = _this.getContainerWidth();
|
|
4653
4806
|
domel(_this.bodyCellContainerDiv)
|
|
4654
4807
|
.setStyle('width', containerWidth + "px");
|
|
4655
|
-
return
|
|
4808
|
+
return rowsToRender;
|
|
4656
4809
|
})
|
|
4657
4810
|
.catch(function (error) { console.error(error); return 0; });
|
|
4658
4811
|
}
|
|
@@ -4660,7 +4813,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4660
4813
|
domel(_this.headerViewportDiv)
|
|
4661
4814
|
.setStyle('margin-left', "-" + _this.bodyViewportDiv.scrollLeft + "px");
|
|
4662
4815
|
});
|
|
4663
|
-
this.bodyViewportDiv.addEventListener('keydown', this.
|
|
4816
|
+
this.bodyViewportDiv.addEventListener('keydown', this.onViewportKeydown.bind(this));
|
|
4664
4817
|
};
|
|
4665
4818
|
EasyGrid.prototype.isLastPage = function () {
|
|
4666
4819
|
if (this.dataTable.elasticChunks) {
|
|
@@ -4686,7 +4839,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4686
4839
|
var group = groups[level - 1];
|
|
4687
4840
|
for (var _i = 0, _a = group.columns; _i < _a.length; _i++) {
|
|
4688
4841
|
var col = _a[_i];
|
|
4689
|
-
if (
|
|
4842
|
+
if (!aggrSettings.compareValues(this.prevRowTotals.getValue(col), newRow.getValue(col))) {
|
|
4690
4843
|
changeLevel = level;
|
|
4691
4844
|
break;
|
|
4692
4845
|
}
|
|
@@ -4747,8 +4900,8 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4747
4900
|
});
|
|
4748
4901
|
var aggrContainer = this.options.aggregates.calculator.getAggrContainer();
|
|
4749
4902
|
var aggrCols = aggrSettings.getAggregates().map(function (c) { return c.colId; });
|
|
4750
|
-
var key =
|
|
4751
|
-
aggrContainer.
|
|
4903
|
+
var key = aggrSettings.buildGroupKey(group, row);
|
|
4904
|
+
aggrContainer.getAggregateData(level, key)
|
|
4752
4905
|
.then(function (values) {
|
|
4753
4906
|
for (var _i = 0, aggrCols_1 = aggrCols; _i < aggrCols_1.length; _i++) {
|
|
4754
4907
|
var aggrColId = aggrCols_1[_i];
|
|
@@ -4789,34 +4942,20 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4789
4942
|
}
|
|
4790
4943
|
}
|
|
4791
4944
|
if (groupFooterTemplate) {
|
|
4792
|
-
var cellDiv_1 = _this.renderCell(column,
|
|
4945
|
+
var cellDiv_1 = _this.renderCell(column, index, val, rowElement);
|
|
4793
4946
|
var innerCell = cellDiv_1.firstChild;
|
|
4794
4947
|
val = innerCell.innerHTML;
|
|
4795
4948
|
val = _this.applyGroupColumnTemplate(groupFooterTemplate, val, values[aggrSettings.COUNT_FIELD_NAME]);
|
|
4796
4949
|
}
|
|
4797
4950
|
}
|
|
4798
|
-
var cellDiv = _this.renderCell(column,
|
|
4951
|
+
var cellDiv = _this.renderCell(column, index, val, rowElement);
|
|
4799
4952
|
rowElement.appendChild(cellDiv);
|
|
4800
4953
|
});
|
|
4801
4954
|
})
|
|
4802
4955
|
.catch(function (error) { return console.error(error); });
|
|
4803
4956
|
return rowElement;
|
|
4804
4957
|
};
|
|
4805
|
-
EasyGrid.prototype.
|
|
4806
|
-
var aggrSettings = this.options.aggregates.settings;
|
|
4807
|
-
var caseInsensitive = aggrSettings && !aggrSettings.caseSensitiveGroups;
|
|
4808
|
-
var result = {};
|
|
4809
|
-
for (var _i = 0, _a = group.columns; _i < _a.length; _i++) {
|
|
4810
|
-
var colId = _a[_i];
|
|
4811
|
-
var keyVal = row.getValue(colId);
|
|
4812
|
-
if (caseInsensitive) {
|
|
4813
|
-
keyVal = keyVal.toLowerCase();
|
|
4814
|
-
}
|
|
4815
|
-
result[colId] = keyVal;
|
|
4816
|
-
}
|
|
4817
|
-
return result;
|
|
4818
|
-
};
|
|
4819
|
-
EasyGrid.prototype.onVieportKeydown = function (ev) {
|
|
4958
|
+
EasyGrid.prototype.onViewportKeydown = function (ev) {
|
|
4820
4959
|
if (this.options.showActiveRow) {
|
|
4821
4960
|
var rowCount = this.bodyCellContainerDiv.querySelectorAll("." + this.cssPrefix + "-row").length;
|
|
4822
4961
|
var newValue = void 0;
|
|
@@ -4870,13 +5009,17 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4870
5009
|
}
|
|
4871
5010
|
}
|
|
4872
5011
|
};
|
|
5012
|
+
/** Returns a promise with the list of the rows to render on one page.
|
|
5013
|
+
* The list contains pageSize+1 row to make it possible
|
|
5014
|
+
* to render the totals row (if it appears to be on the edge between pages)
|
|
5015
|
+
*/
|
|
4873
5016
|
EasyGrid.prototype.getRowsToRender = function () {
|
|
4874
5017
|
if (this.options.paging.enabled === false) {
|
|
4875
5018
|
return Promise.resolve(this.dataTable.getCachedRows());
|
|
4876
5019
|
}
|
|
4877
5020
|
return this.dataTable.getRows({
|
|
4878
|
-
|
|
4879
|
-
|
|
5021
|
+
offset: (this.pagination.page - 1) * this.pagination.pageSize,
|
|
5022
|
+
limit: this.pagination.pageSize + 1
|
|
4880
5023
|
})
|
|
4881
5024
|
.catch(function (error) {
|
|
4882
5025
|
console.error(error);
|
|
@@ -4972,13 +5115,13 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4972
5115
|
if (this.options.showActiveRow && index == this.activeRowIndex) {
|
|
4973
5116
|
rowBuilder.addClass(this.cssPrefix + "-row-active");
|
|
4974
5117
|
}
|
|
4975
|
-
this.columns.getItems().forEach(function (column) {
|
|
5118
|
+
this.columns.getItems().forEach(function (column, index) {
|
|
4976
5119
|
if (!column.isVisible) {
|
|
4977
5120
|
return;
|
|
4978
5121
|
}
|
|
4979
5122
|
var colindex = column.isRowNum ? -1 : _this.dataTable.columns.getIndex(column.dataColumn.id);
|
|
4980
5123
|
var val = column.isRowNum ? indexGlobal + 1 : row.getValue(colindex);
|
|
4981
|
-
rowElement.appendChild(_this.renderCell(column,
|
|
5124
|
+
rowElement.appendChild(_this.renderCell(column, index, val, rowElement));
|
|
4982
5125
|
});
|
|
4983
5126
|
return rowElement;
|
|
4984
5127
|
};
|
|
@@ -5250,11 +5393,102 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
5250
5393
|
EasyGrid.prototype.focus = function () {
|
|
5251
5394
|
this.bodyViewportDiv.focus();
|
|
5252
5395
|
};
|
|
5396
|
+
EasyGrid.prototype.resizeColumns = function () {
|
|
5397
|
+
if (this.options.columnWidths.autoResize === AutoResizeColumns.Never)
|
|
5398
|
+
return;
|
|
5399
|
+
var containerWidth = this.bodyCellContainerDiv.style.width;
|
|
5400
|
+
this.bodyCellContainerDiv.style.visibility = 'hidden';
|
|
5401
|
+
this.bodyCellContainerDiv.style.width = '1px';
|
|
5402
|
+
//this.headerRowDiv.style.visibility = 'hidden';
|
|
5403
|
+
this.headerRowDiv.style.width = '1px';
|
|
5404
|
+
var sumWidth = 0;
|
|
5405
|
+
var columns = this.columns.getItems();
|
|
5406
|
+
var headerCells = this.headerCellContainerDiv.querySelectorAll("." + this.cssPrefix + "-header-cell");
|
|
5407
|
+
var headerIdx = 0;
|
|
5408
|
+
var _loop_1 = function (idx) {
|
|
5409
|
+
var column = columns[idx];
|
|
5410
|
+
if (!column.isVisible)
|
|
5411
|
+
return "continue";
|
|
5412
|
+
var calculatedWidth = this_1.options.columnWidths.autoResize !== AutoResizeColumns.Always && column.dataColumn
|
|
5413
|
+
? column.dataColumn.calculatedWidth
|
|
5414
|
+
: 0;
|
|
5415
|
+
var cellValues = this_1.bodyCellContainerDiv.querySelectorAll("." + this_1.cssPrefix + "-cell[data-col-idx=\"" + idx + "\"] > ." + this_1.cssPrefix + "-cell-value");
|
|
5416
|
+
var maxWidth = 0;
|
|
5417
|
+
if (calculatedWidth > 0) {
|
|
5418
|
+
sumWidth += calculatedWidth;
|
|
5419
|
+
column.width = calculatedWidth;
|
|
5420
|
+
cellValues.forEach(function (value) {
|
|
5421
|
+
value.parentElement.style.width = calculatedWidth + "px";
|
|
5422
|
+
});
|
|
5423
|
+
headerCells[headerIdx].style.width = calculatedWidth + "px";
|
|
5424
|
+
}
|
|
5425
|
+
else {
|
|
5426
|
+
if (cellValues.length == 0) {
|
|
5427
|
+
headerCells[headerIdx].style.width = null;
|
|
5428
|
+
headerCells[headerIdx].style.whiteSpace = 'nowrap';
|
|
5429
|
+
}
|
|
5430
|
+
maxWidth = headerCells[headerIdx].offsetWidth;
|
|
5431
|
+
if (cellValues.length > 0) {
|
|
5432
|
+
cellValues.forEach(function (value) {
|
|
5433
|
+
value.parentElement.style.width = null;
|
|
5434
|
+
var width = value.parentElement.offsetWidth;
|
|
5435
|
+
if (width > maxWidth) {
|
|
5436
|
+
maxWidth = width;
|
|
5437
|
+
}
|
|
5438
|
+
});
|
|
5439
|
+
maxWidth += 3;
|
|
5440
|
+
var maxOption = column.isRowNum
|
|
5441
|
+
? this_1.options.columnWidths.rowNumColumn.max || 500
|
|
5442
|
+
: this_1.options.columnWidths[column.dataColumn.type].max || 2000;
|
|
5443
|
+
var minOption = column.isRowNum
|
|
5444
|
+
? this_1.options.columnWidths.rowNumColumn.min || 0
|
|
5445
|
+
: this_1.options.columnWidths[column.dataColumn.type].min || 20;
|
|
5446
|
+
if (maxWidth > maxOption) {
|
|
5447
|
+
maxWidth = maxOption;
|
|
5448
|
+
}
|
|
5449
|
+
if (maxWidth < minOption) {
|
|
5450
|
+
maxWidth = minOption;
|
|
5451
|
+
}
|
|
5452
|
+
if (utils_utils.isNumericType(column.type)) {
|
|
5453
|
+
//increase the calculated width in 1.3 times for numeric columns
|
|
5454
|
+
maxWidth = Math.round(maxWidth * 1.3);
|
|
5455
|
+
}
|
|
5456
|
+
sumWidth += maxWidth;
|
|
5457
|
+
column.width = maxWidth;
|
|
5458
|
+
cellValues.forEach(function (value) {
|
|
5459
|
+
value.parentElement.style.width = maxWidth + "px";
|
|
5460
|
+
});
|
|
5461
|
+
headerCells[headerIdx].style.width = maxWidth + "px";
|
|
5462
|
+
if (column.dataColumn) {
|
|
5463
|
+
column.dataColumn.calculatedWidth = maxWidth;
|
|
5464
|
+
}
|
|
5465
|
+
}
|
|
5466
|
+
else {
|
|
5467
|
+
sumWidth += maxWidth;
|
|
5468
|
+
}
|
|
5469
|
+
}
|
|
5470
|
+
headerIdx++;
|
|
5471
|
+
};
|
|
5472
|
+
var this_1 = this;
|
|
5473
|
+
for (var idx = 0; idx < this.columns.count; idx++) {
|
|
5474
|
+
_loop_1(idx);
|
|
5475
|
+
}
|
|
5476
|
+
if (sumWidth > 0) {
|
|
5477
|
+
this.bodyCellContainerDiv.style.width = sumWidth + "px";
|
|
5478
|
+
this.headerCellContainerDiv.style.width = sumWidth + "px";
|
|
5479
|
+
}
|
|
5480
|
+
else {
|
|
5481
|
+
this.bodyCellContainerDiv.style.width = containerWidth;
|
|
5482
|
+
this.headerCellContainerDiv.style.width = containerWidth;
|
|
5483
|
+
}
|
|
5484
|
+
this.bodyCellContainerDiv.style.visibility = null;
|
|
5485
|
+
this.headerRowDiv.removeAttribute('style');
|
|
5486
|
+
};
|
|
5253
5487
|
return EasyGrid;
|
|
5254
5488
|
}());
|
|
5255
5489
|
|
|
5256
5490
|
//# sourceMappingURL=easy_grid.js.map
|
|
5257
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
5491
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/datetimepicker/calendar.js
|
|
5258
5492
|
var Calendar = /** @class */ (function () {
|
|
5259
5493
|
function Calendar(slot, options) {
|
|
5260
5494
|
this.slot = slot;
|
|
@@ -5285,7 +5519,7 @@ var Calendar = /** @class */ (function () {
|
|
|
5285
5519
|
}());
|
|
5286
5520
|
|
|
5287
5521
|
//# sourceMappingURL=calendar.js.map
|
|
5288
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
5522
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/datetimepicker/date_time_picker.js
|
|
5289
5523
|
|
|
5290
5524
|
var date_time_picker_DateTimePicker = /** @class */ (function () {
|
|
5291
5525
|
function DateTimePicker(options) {
|
|
@@ -5393,7 +5627,7 @@ var date_time_picker_DateTimePicker = /** @class */ (function () {
|
|
|
5393
5627
|
}());
|
|
5394
5628
|
|
|
5395
5629
|
//# sourceMappingURL=date_time_picker.js.map
|
|
5396
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
5630
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/datetimepicker/default_calendar.js
|
|
5397
5631
|
var default_calendar_extends = (undefined && undefined.__extends) || (function () {
|
|
5398
5632
|
var extendStatics = function (d, b) {
|
|
5399
5633
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5657,7 +5891,7 @@ var default_calendar_DefaultCalendar = /** @class */ (function (_super) {
|
|
|
5657
5891
|
}(Calendar));
|
|
5658
5892
|
|
|
5659
5893
|
//# sourceMappingURL=default_calendar.js.map
|
|
5660
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
5894
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/datetimepicker/time_picker.js
|
|
5661
5895
|
var TimePicker = /** @class */ (function () {
|
|
5662
5896
|
function TimePicker(slot, options) {
|
|
5663
5897
|
this.slot = slot;
|
|
@@ -5685,7 +5919,7 @@ var TimePicker = /** @class */ (function () {
|
|
|
5685
5919
|
}());
|
|
5686
5920
|
|
|
5687
5921
|
//# sourceMappingURL=time_picker.js.map
|
|
5688
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
5922
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/datetimepicker/default_time_picker.js
|
|
5689
5923
|
var default_time_picker_extends = (undefined && undefined.__extends) || (function () {
|
|
5690
5924
|
var extendStatics = function (d, b) {
|
|
5691
5925
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5767,7 +6001,7 @@ var default_time_picker_DefaultTimePicker = /** @class */ (function (_super) {
|
|
|
5767
6001
|
}(TimePicker));
|
|
5768
6002
|
|
|
5769
6003
|
//# sourceMappingURL=default_time_picker.js.map
|
|
5770
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
6004
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/datetimepicker/default_date_time_picker.js
|
|
5771
6005
|
var default_date_time_picker_extends = (undefined && undefined.__extends) || (function () {
|
|
5772
6006
|
var extendStatics = function (d, b) {
|
|
5773
6007
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5895,7 +6129,15 @@ var default_date_time_picker_DefaultDateTimePicker = /** @class */ (function (_s
|
|
|
5895
6129
|
}(date_time_picker_DateTimePicker));
|
|
5896
6130
|
|
|
5897
6131
|
//# sourceMappingURL=default_date_time_picker.js.map
|
|
5898
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
6132
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/dialogs/dialog_service.js
|
|
6133
|
+
var DialogFooterAlignment;
|
|
6134
|
+
(function (DialogFooterAlignment) {
|
|
6135
|
+
DialogFooterAlignment[DialogFooterAlignment["Left"] = 1] = "Left";
|
|
6136
|
+
DialogFooterAlignment[DialogFooterAlignment["Center"] = 2] = "Center";
|
|
6137
|
+
DialogFooterAlignment[DialogFooterAlignment["Right"] = 3] = "Right";
|
|
6138
|
+
})(DialogFooterAlignment || (DialogFooterAlignment = {}));
|
|
6139
|
+
//# sourceMappingURL=dialog_service.js.map
|
|
6140
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/dialogs/default_dialog_service.js
|
|
5899
6141
|
var default_dialog_service_extends = (undefined && undefined.__extends) || (function () {
|
|
5900
6142
|
var extendStatics = function (d, b) {
|
|
5901
6143
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5911,6 +6153,7 @@ var default_dialog_service_extends = (undefined && undefined.__extends) || (func
|
|
|
5911
6153
|
})();
|
|
5912
6154
|
|
|
5913
6155
|
|
|
6156
|
+
|
|
5914
6157
|
var default_dialog_service_cssPrefix = "kdlg";
|
|
5915
6158
|
var DefaultDialogService = /** @class */ (function () {
|
|
5916
6159
|
function DefaultDialogService() {
|
|
@@ -5994,17 +6237,20 @@ var DefaultDialogService = /** @class */ (function () {
|
|
|
5994
6237
|
_this.open(options);
|
|
5995
6238
|
});
|
|
5996
6239
|
};
|
|
5997
|
-
DefaultDialogService.prototype.open = function (options) {
|
|
6240
|
+
DefaultDialogService.prototype.open = function (options, data) {
|
|
5998
6241
|
var _this = this;
|
|
6242
|
+
var dialog = new default_dialog_service_DefaultDialog(options, data);
|
|
5999
6243
|
var onDestroy = options.onDestroy;
|
|
6000
|
-
options.onDestroy = function () {
|
|
6244
|
+
options.onDestroy = function (dlg) {
|
|
6001
6245
|
_this.untrack(dlg);
|
|
6002
|
-
onDestroy && onDestroy();
|
|
6246
|
+
onDestroy && onDestroy(dlg);
|
|
6003
6247
|
};
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6248
|
+
dialog.open();
|
|
6249
|
+
this.track(dialog);
|
|
6250
|
+
return dialog;
|
|
6251
|
+
};
|
|
6252
|
+
DefaultDialogService.prototype.createSet = function (options) {
|
|
6253
|
+
return new DefaultDialogSet(options, this);
|
|
6008
6254
|
};
|
|
6009
6255
|
DefaultDialogService.prototype.untrack = function (dlg) {
|
|
6010
6256
|
var index = DefaultDialogService.openDialogs.indexOf(dlg);
|
|
@@ -6017,15 +6263,15 @@ var DefaultDialogService = /** @class */ (function () {
|
|
|
6017
6263
|
};
|
|
6018
6264
|
DefaultDialogService.prototype.openProgress = function (options) {
|
|
6019
6265
|
var _this = this;
|
|
6266
|
+
var dialog = new default_dialog_service_DefaultProgressDialog(options);
|
|
6020
6267
|
var onDestroy = options.onDestroy;
|
|
6021
|
-
options.onDestroy = function () {
|
|
6268
|
+
options.onDestroy = function (dlg) {
|
|
6022
6269
|
_this.untrack(dlg);
|
|
6023
|
-
onDestroy && onDestroy();
|
|
6270
|
+
onDestroy && onDestroy(dlg);
|
|
6024
6271
|
};
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
return dlg;
|
|
6272
|
+
dialog.open();
|
|
6273
|
+
this.track(dialog);
|
|
6274
|
+
return dialog;
|
|
6029
6275
|
};
|
|
6030
6276
|
DefaultDialogService.prototype.getAllDialogs = function () {
|
|
6031
6277
|
return Array.from(DefaultDialogService.openDialogs);
|
|
@@ -6041,11 +6287,11 @@ var DefaultDialogService = /** @class */ (function () {
|
|
|
6041
6287
|
}());
|
|
6042
6288
|
|
|
6043
6289
|
var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
6044
|
-
function DefaultDialog(options) {
|
|
6290
|
+
function DefaultDialog(options, data) {
|
|
6045
6291
|
var _this = this;
|
|
6046
6292
|
this.options = options;
|
|
6047
|
-
this.submitHandler = function () {
|
|
6048
|
-
if (_this.options.onSubmit && _this.options.onSubmit() === false) {
|
|
6293
|
+
this.submitHandler = function (token) {
|
|
6294
|
+
if (_this.options.onSubmit && _this.options.onSubmit(_this, token) === false) {
|
|
6049
6295
|
return false;
|
|
6050
6296
|
}
|
|
6051
6297
|
_this.destroy();
|
|
@@ -6053,7 +6299,7 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6053
6299
|
};
|
|
6054
6300
|
this.cancelHandler = function () {
|
|
6055
6301
|
if (_this.options.onCancel) {
|
|
6056
|
-
_this.options.onCancel();
|
|
6302
|
+
_this.options.onCancel(_this);
|
|
6057
6303
|
}
|
|
6058
6304
|
_this.destroy();
|
|
6059
6305
|
};
|
|
@@ -6068,11 +6314,12 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6068
6314
|
}
|
|
6069
6315
|
return true;
|
|
6070
6316
|
};
|
|
6071
|
-
|
|
6317
|
+
this.dialogId = utils_utils.generateId('dlg');
|
|
6318
|
+
this.data = data;
|
|
6072
6319
|
this.slot =
|
|
6073
6320
|
domel('div', document.body)
|
|
6074
6321
|
.attr('tab-index', '-1')
|
|
6075
|
-
.data('dialog-id',
|
|
6322
|
+
.data('dialog-id', this.dialogId)
|
|
6076
6323
|
.addClass(default_dialog_service_cssPrefix + "-modal", 'is-active')
|
|
6077
6324
|
.focus()
|
|
6078
6325
|
.addChild('div', function (b) { return b
|
|
@@ -6093,36 +6340,68 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6093
6340
|
_this.cancelHandler();
|
|
6094
6341
|
})
|
|
6095
6342
|
.focus(); });
|
|
6343
|
+
})
|
|
6344
|
+
.addChild('div', function (b) {
|
|
6345
|
+
b.addClass(default_dialog_service_cssPrefix + "-alert-container");
|
|
6346
|
+
_this.alertElement = b.toDOM();
|
|
6096
6347
|
})
|
|
6097
6348
|
.addChild('section', function (b) {
|
|
6098
6349
|
_this.bodyElement = b
|
|
6099
6350
|
.addClass(default_dialog_service_cssPrefix + "-body")
|
|
6100
6351
|
.toDOM();
|
|
6101
6352
|
if (typeof options.body === 'string') {
|
|
6102
|
-
|
|
6353
|
+
var html = liquid.renderLiquidTemplate(options.body, data);
|
|
6354
|
+
b.addHtml(html);
|
|
6103
6355
|
}
|
|
6104
6356
|
else {
|
|
6105
6357
|
b.addChildElement(options.body);
|
|
6106
6358
|
}
|
|
6107
6359
|
})
|
|
6108
|
-
.addChild('div', function (b) { return _this.alertElement = b
|
|
6109
|
-
.addClass(default_dialog_service_cssPrefix + "-alert-container")
|
|
6110
|
-
.toDOM(); })
|
|
6111
6360
|
.addChild('footer', function (b) {
|
|
6361
|
+
var alignClass = null;
|
|
6362
|
+
if (options.footerAlignment && options.footerAlignment == DialogFooterAlignment.Center) {
|
|
6363
|
+
alignClass = 'align-center';
|
|
6364
|
+
}
|
|
6365
|
+
else {
|
|
6366
|
+
alignClass = 'align-right';
|
|
6367
|
+
}
|
|
6112
6368
|
_this.footerElement = b
|
|
6113
|
-
.addClass(default_dialog_service_cssPrefix + "-footer"
|
|
6369
|
+
.addClass(default_dialog_service_cssPrefix + "-footer")
|
|
6114
6370
|
.toDOM();
|
|
6371
|
+
b.addClass(alignClass);
|
|
6115
6372
|
if (options.submitable === false)
|
|
6116
6373
|
return;
|
|
6117
|
-
b.addChild('button', function (
|
|
6118
|
-
.
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6374
|
+
b.addChild('button', function (bb) {
|
|
6375
|
+
bb.id(_this.dialogId + '-btn-submit')
|
|
6376
|
+
.addClass('kfrm-button', 'is-info')
|
|
6377
|
+
.addText(options.submitButtonText || i18n_i18n.getText('ButtonOK'));
|
|
6378
|
+
if (options.recaptchaSiteKey) {
|
|
6379
|
+
bb.data('sitekey', options.recaptchaSiteKey);
|
|
6380
|
+
bb.addClass('g-recaptcha');
|
|
6381
|
+
bb.on('click', function (e) {
|
|
6382
|
+
if (grecaptcha) {
|
|
6383
|
+
grecaptcha.ready(function () {
|
|
6384
|
+
grecaptcha.execute(options.recaptchaSiteKey, { action: 'submit' })
|
|
6385
|
+
.then(function (token) {
|
|
6386
|
+
_this.submitHandler(token);
|
|
6387
|
+
});
|
|
6388
|
+
});
|
|
6389
|
+
}
|
|
6390
|
+
else {
|
|
6391
|
+
_this.submitHandler();
|
|
6392
|
+
}
|
|
6393
|
+
});
|
|
6394
|
+
}
|
|
6395
|
+
else {
|
|
6396
|
+
bb.on('click', function (e) {
|
|
6397
|
+
_this.submitHandler();
|
|
6398
|
+
});
|
|
6399
|
+
}
|
|
6400
|
+
bb.focus();
|
|
6401
|
+
});
|
|
6124
6402
|
if (options.cancelable !== false)
|
|
6125
|
-
b.addChild('button', function (
|
|
6403
|
+
b.addChild('button', function (bb) { return bb
|
|
6404
|
+
.id(_this.dialogId + '-btn-cancel')
|
|
6126
6405
|
.addClass('kfrm-button')
|
|
6127
6406
|
.addText(options.cancelButtonText || i18n_i18n.getText('ButtonCancel'))
|
|
6128
6407
|
.on('click', function (e) {
|
|
@@ -6132,12 +6411,22 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6132
6411
|
.toDOM(); })
|
|
6133
6412
|
.toDOM();
|
|
6134
6413
|
}
|
|
6414
|
+
DefaultDialog.prototype.getData = function () {
|
|
6415
|
+
return this.data;
|
|
6416
|
+
};
|
|
6135
6417
|
DefaultDialog.prototype.getRootElement = function () {
|
|
6136
6418
|
return this.slot;
|
|
6137
6419
|
};
|
|
6420
|
+
DefaultDialog.prototype.getSubmitButtonElement = function () {
|
|
6421
|
+
return document.getElementById(this.dialogId + '-btn-submit');
|
|
6422
|
+
};
|
|
6423
|
+
DefaultDialog.prototype.getCancelButtonElement = function () {
|
|
6424
|
+
return document.getElementById(this.dialogId + '-btn-cancel');
|
|
6425
|
+
};
|
|
6138
6426
|
DefaultDialog.prototype.open = function () {
|
|
6427
|
+
var _this = this;
|
|
6139
6428
|
if (this.options.beforeOpen) {
|
|
6140
|
-
this.options.beforeOpen();
|
|
6429
|
+
this.options.beforeOpen(this);
|
|
6141
6430
|
}
|
|
6142
6431
|
domel(this.slot).show();
|
|
6143
6432
|
if (this.options.arrangeParents) {
|
|
@@ -6158,6 +6447,19 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6158
6447
|
if (this.options.submitOnEnter) {
|
|
6159
6448
|
window.addEventListener('keydown', this.keydownHandler, false);
|
|
6160
6449
|
}
|
|
6450
|
+
//clear alert on change in any input element
|
|
6451
|
+
this.slot.querySelectorAll('input')
|
|
6452
|
+
.forEach(function (element) {
|
|
6453
|
+
return element.addEventListener('input', function () {
|
|
6454
|
+
_this.clearAlert();
|
|
6455
|
+
if (_this.options.onInput) {
|
|
6456
|
+
_this.options.onInput(_this);
|
|
6457
|
+
}
|
|
6458
|
+
});
|
|
6459
|
+
});
|
|
6460
|
+
if (this.options.onShow) {
|
|
6461
|
+
this.options.onShow(this);
|
|
6462
|
+
}
|
|
6161
6463
|
};
|
|
6162
6464
|
DefaultDialog.prototype.submit = function () {
|
|
6163
6465
|
this.submitHandler();
|
|
@@ -6197,6 +6499,9 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6197
6499
|
this.alertElement.innerHTML = '';
|
|
6198
6500
|
};
|
|
6199
6501
|
DefaultDialog.prototype.destroy = function () {
|
|
6502
|
+
var elem = document.querySelectorAll("[data-dialog-id=\"" + this.dialogId + "\"]");
|
|
6503
|
+
if (elem.length <= 0)
|
|
6504
|
+
return;
|
|
6200
6505
|
if (this.options.arrangeParents) {
|
|
6201
6506
|
this.arrangeParents(false);
|
|
6202
6507
|
}
|
|
@@ -6205,7 +6510,7 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6205
6510
|
window.removeEventListener('keydown', this.keydownHandler, false);
|
|
6206
6511
|
}
|
|
6207
6512
|
if (this.options.onDestroy) {
|
|
6208
|
-
this.options.onDestroy();
|
|
6513
|
+
this.options.onDestroy(this);
|
|
6209
6514
|
}
|
|
6210
6515
|
};
|
|
6211
6516
|
DefaultDialog.prototype.isActiveDialog = function () {
|
|
@@ -6233,7 +6538,7 @@ var default_dialog_service_DefaultDialog = /** @class */ (function () {
|
|
|
6233
6538
|
|
|
6234
6539
|
var default_dialog_service_DefaultProgressDialog = /** @class */ (function (_super) {
|
|
6235
6540
|
default_dialog_service_extends(DefaultProgressDialog, _super);
|
|
6236
|
-
function DefaultProgressDialog(options) {
|
|
6541
|
+
function DefaultProgressDialog(options, data) {
|
|
6237
6542
|
var _this = this;
|
|
6238
6543
|
var contentElement;
|
|
6239
6544
|
var progressElement;
|
|
@@ -6268,7 +6573,7 @@ var default_dialog_service_DefaultProgressDialog = /** @class */ (function (_sup
|
|
|
6268
6573
|
cancelable: false,
|
|
6269
6574
|
closable: false,
|
|
6270
6575
|
onDestroy: options.onDestroy
|
|
6271
|
-
}) || this;
|
|
6576
|
+
}, data) || this;
|
|
6272
6577
|
_this.contentElement = contentElement;
|
|
6273
6578
|
_this.progressElement = progressElement;
|
|
6274
6579
|
return _this;
|
|
@@ -6297,8 +6602,55 @@ var default_dialog_service_DefaultProgressDialog = /** @class */ (function (_sup
|
|
|
6297
6602
|
return DefaultProgressDialog;
|
|
6298
6603
|
}(default_dialog_service_DefaultDialog));
|
|
6299
6604
|
|
|
6605
|
+
var DefaultDialogSet = /** @class */ (function () {
|
|
6606
|
+
function DefaultDialogSet(options, dialogService) {
|
|
6607
|
+
this.options = options;
|
|
6608
|
+
this.dialogService = dialogService;
|
|
6609
|
+
this.currentDialog = null;
|
|
6610
|
+
this.currentIndex = 0;
|
|
6611
|
+
this.options = options;
|
|
6612
|
+
this.dialogService = dialogService;
|
|
6613
|
+
}
|
|
6614
|
+
DefaultDialogSet.prototype.getCurrent = function () {
|
|
6615
|
+
return this.currentDialog;
|
|
6616
|
+
};
|
|
6617
|
+
DefaultDialogSet.prototype.openNext = function (data) {
|
|
6618
|
+
return this.open(this.currentIndex + 1, data);
|
|
6619
|
+
};
|
|
6620
|
+
DefaultDialogSet.prototype.openPrev = function (data) {
|
|
6621
|
+
return this.open(this.currentIndex - 1, data);
|
|
6622
|
+
};
|
|
6623
|
+
DefaultDialogSet.prototype.open = function (page, data) {
|
|
6624
|
+
if (page < 0) {
|
|
6625
|
+
this.currentIndex = 0;
|
|
6626
|
+
}
|
|
6627
|
+
else if (page >= this.options.length) {
|
|
6628
|
+
this.currentIndex = this.options.length - 1;
|
|
6629
|
+
}
|
|
6630
|
+
else {
|
|
6631
|
+
this.currentIndex = page;
|
|
6632
|
+
}
|
|
6633
|
+
if (this.currentDialog) {
|
|
6634
|
+
try {
|
|
6635
|
+
this.currentDialog.close();
|
|
6636
|
+
}
|
|
6637
|
+
catch (e) { }
|
|
6638
|
+
}
|
|
6639
|
+
var dlgOptions = this.options[this.currentIndex];
|
|
6640
|
+
this.currentDialog = this.dialogService.open(dlgOptions, data);
|
|
6641
|
+
return this.currentDialog;
|
|
6642
|
+
};
|
|
6643
|
+
DefaultDialogSet.prototype.close = function () {
|
|
6644
|
+
if (this.currentDialog) {
|
|
6645
|
+
this.currentDialog.close();
|
|
6646
|
+
this.currentDialog = null;
|
|
6647
|
+
}
|
|
6648
|
+
};
|
|
6649
|
+
return DefaultDialogSet;
|
|
6650
|
+
}());
|
|
6651
|
+
|
|
6300
6652
|
//# sourceMappingURL=default_dialog_service.js.map
|
|
6301
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
6653
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/i18n/text_resources.js
|
|
6302
6654
|
|
|
6303
6655
|
function addEasyDataUITexts() {
|
|
6304
6656
|
i18n_i18n.updateDefaultTexts({
|
|
@@ -6313,11 +6665,12 @@ function addEasyDataUITexts() {
|
|
|
6313
6665
|
}
|
|
6314
6666
|
addEasyDataUITexts();
|
|
6315
6667
|
//# sourceMappingURL=text_resources.js.map
|
|
6316
|
-
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/
|
|
6668
|
+
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/public_api.js
|
|
6317
6669
|
// grid
|
|
6318
6670
|
|
|
6319
6671
|
|
|
6320
6672
|
|
|
6673
|
+
|
|
6321
6674
|
//datetimepicker
|
|
6322
6675
|
|
|
6323
6676
|
|
|
@@ -6335,6 +6688,7 @@ addEasyDataUITexts();
|
|
|
6335
6688
|
|
|
6336
6689
|
|
|
6337
6690
|
|
|
6691
|
+
|
|
6338
6692
|
// export dialogs to use outside of context as global
|
|
6339
6693
|
var dialogs = new DefaultDialogService();
|
|
6340
6694
|
|
|
@@ -6929,167 +7283,168 @@ var model_ex_DataModelEx = /** @class */ (function (_super) {
|
|
|
6929
7283
|
}(external_easyqueryCore_["DataModel"]));
|
|
6930
7284
|
|
|
6931
7285
|
|
|
6932
|
-
// CONCATENATED MODULE: ./src/data/
|
|
6933
|
-
var eqs_aggr_calculator_assign = (undefined && undefined.__assign) || function () {
|
|
6934
|
-
eqs_aggr_calculator_assign = Object.assign || function(t) {
|
|
6935
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6936
|
-
s = arguments[i];
|
|
6937
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6938
|
-
t[p] = s[p];
|
|
6939
|
-
}
|
|
6940
|
-
return t;
|
|
6941
|
-
};
|
|
6942
|
-
return eqs_aggr_calculator_assign.apply(this, arguments);
|
|
6943
|
-
};
|
|
7286
|
+
// CONCATENATED MODULE: ./src/data/data_table_aggr_calculator.ts
|
|
6944
7287
|
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
function EqAggregatesCalculator(context) {
|
|
7288
|
+
var data_table_aggr_calculator_DataTableAggregatesCalculator = /** @class */ (function () {
|
|
7289
|
+
function DataTableAggregatesCalculator(context) {
|
|
6948
7290
|
this.context = context;
|
|
7291
|
+
//stores current totals by level (group) number
|
|
7292
|
+
this.levelsTotals = [];
|
|
7293
|
+
this.prevRow = null;
|
|
6949
7294
|
this.aggrContainer = new external_easyqueryCore_["EqAggregatesContainer"](context);
|
|
6950
7295
|
}
|
|
6951
|
-
|
|
7296
|
+
DataTableAggregatesCalculator.prototype.getAggrContainer = function () {
|
|
6952
7297
|
return this.aggrContainer;
|
|
6953
7298
|
};
|
|
6954
|
-
|
|
7299
|
+
DataTableAggregatesCalculator.prototype.initObjects = function () {
|
|
7300
|
+
var _this = this;
|
|
7301
|
+
this.aggrSettings = this.context.getQuery().getAggregationSettings();
|
|
7302
|
+
this.groups = this.aggrSettings.getGroups();
|
|
7303
|
+
this.aggregates = this.aggrSettings.getAggregates();
|
|
7304
|
+
this.aggrColIds = this.aggrSettings.getAggregates().map(function (a) { return a.colId; });
|
|
7305
|
+
this.aggrCols = this.context.resultTable.columns.getItems()
|
|
7306
|
+
.filter(function (col) { return _this.aggrColIds.indexOf(col.id) >= 0; });
|
|
7307
|
+
this.levelsTotals = [];
|
|
7308
|
+
this.prevRow = null;
|
|
7309
|
+
};
|
|
7310
|
+
DataTableAggregatesCalculator.prototype.createColumnAggregatesObject = function () {
|
|
7311
|
+
return {
|
|
7312
|
+
sum: 0,
|
|
7313
|
+
min: Number.MAX_VALUE,
|
|
7314
|
+
max: Number.MIN_VALUE
|
|
7315
|
+
};
|
|
7316
|
+
};
|
|
7317
|
+
DataTableAggregatesCalculator.prototype.calculate = function (options) {
|
|
7318
|
+
this.initObjects();
|
|
6955
7319
|
this.aggrContainer.clear();
|
|
6956
7320
|
options = options || {};
|
|
6957
7321
|
options.maxLevel = options.maxLevel >= 0
|
|
6958
7322
|
? options.maxLevel : 0;
|
|
6959
|
-
var
|
|
6960
|
-
var
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
var aggrColIds = settings.getAggregates().map(function (a) { return a.colId; });
|
|
6965
|
-
var aggrCols = query.getColumns()
|
|
6966
|
-
.filter(function (col) { return aggrColIds.indexOf(col.id) >= 0; });
|
|
6967
|
-
var _loop_1 = function (col) {
|
|
6968
|
-
query.changeColumnType(col, external_easyqueryCore_["ExprTag"].AggregateFunction, { funcId: aggregates.filter(function (a) { return a.colId == col.id; })[0].funcId });
|
|
6969
|
-
};
|
|
6970
|
-
for (var _i = 0, aggrCols_1 = aggrCols; _i < aggrCols_1.length; _i++) {
|
|
6971
|
-
var col = aggrCols_1[_i];
|
|
6972
|
-
_loop_1(col);
|
|
7323
|
+
var levelNumber = this.groups.length + 1; //number of groups plus grand totals
|
|
7324
|
+
for (var levelIndex = 0; levelIndex < levelNumber; levelIndex++) {
|
|
7325
|
+
var levelTotals = { count: 0, columns: {} };
|
|
7326
|
+
this.resetLevelTotals(levelTotals);
|
|
7327
|
+
this.levelsTotals.push(levelTotals);
|
|
6973
7328
|
}
|
|
6974
|
-
|
|
6975
|
-
var
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
var col = queryCols_1[_a];
|
|
6979
|
-
col.setHidden(true);
|
|
7329
|
+
var allRows = this.context.resultTable.getCachedRows();
|
|
7330
|
+
for (var _i = 0, allRows_1 = allRows; _i < allRows_1.length; _i++) {
|
|
7331
|
+
var row = allRows_1[_i];
|
|
7332
|
+
this.processDataRow(row);
|
|
6980
7333
|
}
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
col['_id'] = settings.COUNT_FIELD_NAME;
|
|
6985
|
-
var sqlText = 'COUNT(*)';
|
|
6986
|
-
var customSqlExpr = new external_easyqueryCore_["Expression"](col);
|
|
6987
|
-
customSqlExpr.tag = external_easyqueryCore_["ExprTag"].CustomSql;
|
|
6988
|
-
customSqlExpr.sql = sqlText;
|
|
6989
|
-
customSqlExpr.baseAttrId = null;
|
|
6990
|
-
col.expr = customSqlExpr;
|
|
6991
|
-
query.getColumns().push(col);
|
|
7334
|
+
//flusing the totals for all group levels
|
|
7335
|
+
for (var levelIndex = 1; levelIndex < levelNumber; levelIndex++) {
|
|
7336
|
+
this.flushLevelTotals(levelIndex);
|
|
6992
7337
|
}
|
|
6993
|
-
if
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
level: 0,
|
|
6997
|
-
groupName: 'Grand Totals',
|
|
6998
|
-
resultObtainedCallback: options.resultObtained,
|
|
6999
|
-
errorOccurredCallback: options.errorOccurred
|
|
7000
|
-
}));
|
|
7001
|
-
}
|
|
7002
|
-
var groups = settings.getGroups();
|
|
7003
|
-
for (var level = 1; level <= groups.length; level++) {
|
|
7004
|
-
var group = groups[level - 1];
|
|
7005
|
-
for (var _b = 0, queryCols_2 = queryCols; _b < queryCols_2.length; _b++) {
|
|
7006
|
-
var col = queryCols_2[_b];
|
|
7007
|
-
col.setHidden(group.columns.indexOf(col.id) < 0);
|
|
7008
|
-
}
|
|
7009
|
-
levelPromises.push(this.processLevel({
|
|
7010
|
-
query: query,
|
|
7011
|
-
level: level,
|
|
7012
|
-
groupName: group.name,
|
|
7013
|
-
resultObtainedCallback: options.resultObtained,
|
|
7014
|
-
errorOccurredCallback: options.errorOccurred
|
|
7015
|
-
}));
|
|
7338
|
+
//flusing the grand totals (if they are turned on)
|
|
7339
|
+
if (this.aggrSettings.hasGrandTotals()) {
|
|
7340
|
+
this.flushLevelTotals(0);
|
|
7016
7341
|
}
|
|
7017
|
-
return Promise.
|
|
7018
|
-
.then(function () { return; })
|
|
7019
|
-
.catch(function (error) { return console.error(error); });
|
|
7342
|
+
return Promise.resolve();
|
|
7020
7343
|
};
|
|
7021
|
-
|
|
7022
|
-
var
|
|
7023
|
-
|
|
7024
|
-
.
|
|
7025
|
-
var fetchOptions = {
|
|
7026
|
-
aux: true,
|
|
7027
|
-
query: options.query
|
|
7028
|
-
};
|
|
7029
|
-
if (this.context.debugMode) {
|
|
7030
|
-
fetchOptions.debug = "Fetching group data. Group: '" + options.groupName + "', level: " + options.level;
|
|
7344
|
+
DataTableAggregatesCalculator.prototype.resetLevelTotals = function (rowTotals) {
|
|
7345
|
+
for (var _i = 0, _a = this.aggrCols; _i < _a.length; _i++) {
|
|
7346
|
+
var aggrCol = _a[_i];
|
|
7347
|
+
rowTotals.columns[aggrCol.id] = this.createColumnAggregatesObject();
|
|
7031
7348
|
}
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
var
|
|
7038
|
-
|
|
7039
|
-
var col = _a[_i];
|
|
7040
|
-
dataTable.columns.add(col);
|
|
7041
|
-
}
|
|
7042
|
-
for (var _b = 0, _c = resultSet.rows; _b < _c.length; _b++) {
|
|
7043
|
-
var row = _c[_b];
|
|
7044
|
-
dataTable.addRow(row);
|
|
7045
|
-
}
|
|
7046
|
-
var levelData = _this.buildLevelData(options.level, dataTable);
|
|
7047
|
-
_this.aggrContainer.setAggregates(options.level, levelData);
|
|
7048
|
-
if (options.resultObtainedCallback) {
|
|
7049
|
-
options.resultObtainedCallback(result, options.level);
|
|
7349
|
+
rowTotals.count = 0;
|
|
7350
|
+
};
|
|
7351
|
+
DataTableAggregatesCalculator.prototype.processDataRow = function (row) {
|
|
7352
|
+
var levelIndexChanged = this.checkLevelChange(row);
|
|
7353
|
+
if (levelIndexChanged >= 0) {
|
|
7354
|
+
for (var levelIndex_1 = levelIndexChanged; levelIndex_1 < this.levelsTotals.length; levelIndex_1++) {
|
|
7355
|
+
this.flushLevelTotals(levelIndex_1);
|
|
7050
7356
|
}
|
|
7051
|
-
}
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7357
|
+
}
|
|
7358
|
+
if (this.aggrSettings.hasGrandTotals()) {
|
|
7359
|
+
this.updateLevelTotals(0, row);
|
|
7360
|
+
}
|
|
7361
|
+
var levelIndex = 1;
|
|
7362
|
+
for (var _i = 0, _a = this.groups; _i < _a.length; _i++) {
|
|
7363
|
+
var group = _a[_i];
|
|
7364
|
+
this.updateLevelTotals(levelIndex, row);
|
|
7365
|
+
levelIndex++;
|
|
7366
|
+
}
|
|
7367
|
+
this.prevRow = row;
|
|
7368
|
+
};
|
|
7369
|
+
/** Checks if the values in group columns were changed
|
|
7370
|
+
and return the level number they were */
|
|
7371
|
+
DataTableAggregatesCalculator.prototype.checkLevelChange = function (row) {
|
|
7372
|
+
if (this.prevRow == null)
|
|
7373
|
+
return -1;
|
|
7374
|
+
for (var groupIndex = 0; groupIndex < this.groups.length; groupIndex++) {
|
|
7375
|
+
var group = this.groups[groupIndex];
|
|
7376
|
+
for (var _i = 0, _a = group.columns; _i < _a.length; _i++) {
|
|
7377
|
+
var colId = _a[_i];
|
|
7378
|
+
var value = row.getValue(colId);
|
|
7379
|
+
var prevValue = this.prevRow.getValue(colId);
|
|
7380
|
+
if (!this.aggrSettings.compareValues(prevValue, value)) {
|
|
7381
|
+
return groupIndex + 1;
|
|
7382
|
+
}
|
|
7055
7383
|
}
|
|
7056
|
-
}
|
|
7057
|
-
return
|
|
7384
|
+
}
|
|
7385
|
+
return -1;
|
|
7058
7386
|
};
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
var
|
|
7065
|
-
|
|
7066
|
-
|
|
7387
|
+
/** Saves the current values in levelData for the specified level to AggregateContainer
|
|
7388
|
+
and then reset the data row for that level
|
|
7389
|
+
*/
|
|
7390
|
+
DataTableAggregatesCalculator.prototype.flushLevelTotals = function (levelIndex) {
|
|
7391
|
+
var levelTotals = this.levelsTotals[levelIndex];
|
|
7392
|
+
var group = levelIndex > 0 ? this.groups[levelIndex - 1] : null;
|
|
7393
|
+
var groupKey = this.aggrSettings.buildGroupKey(group, this.prevRow);
|
|
7394
|
+
var groupTotals = {};
|
|
7395
|
+
for (var _i = 0, _a = this.aggregates; _i < _a.length; _i++) {
|
|
7396
|
+
var aggr = _a[_i];
|
|
7397
|
+
var columnTotals = levelTotals.columns[aggr.colId];
|
|
7398
|
+
switch (aggr.funcId) {
|
|
7399
|
+
case "SUM":
|
|
7400
|
+
groupTotals[aggr.colId] = columnTotals.sum;
|
|
7401
|
+
break;
|
|
7402
|
+
case "AVG":
|
|
7403
|
+
groupTotals[aggr.colId] = columnTotals.sum / levelTotals.count;
|
|
7404
|
+
break;
|
|
7405
|
+
case "COUNT":
|
|
7406
|
+
case "CNTDST":
|
|
7407
|
+
groupTotals[aggr.colId] = levelTotals.count;
|
|
7408
|
+
break;
|
|
7409
|
+
case "MIN":
|
|
7410
|
+
groupTotals[aggr.colId] = columnTotals.min;
|
|
7411
|
+
break;
|
|
7412
|
+
case "MAX":
|
|
7413
|
+
groupTotals[aggr.colId] = columnTotals.max;
|
|
7414
|
+
break;
|
|
7415
|
+
}
|
|
7067
7416
|
}
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7417
|
+
if (this.aggrSettings.hasRecordCount()) {
|
|
7418
|
+
groupTotals[this.aggrSettings.COUNT_FIELD_NAME] = levelTotals.count;
|
|
7419
|
+
}
|
|
7420
|
+
this.aggrContainer.updateAggregateData(levelIndex, groupKey, groupTotals);
|
|
7421
|
+
this.resetLevelTotals(levelTotals);
|
|
7422
|
+
};
|
|
7423
|
+
/** Updates the totals by values in the current DataRow
|
|
7424
|
+
* and according to the specified aggregate
|
|
7425
|
+
*/
|
|
7426
|
+
DataTableAggregatesCalculator.prototype.updateLevelTotals = function (levelIndex, row) {
|
|
7427
|
+
var levelTotals = this.levelsTotals[levelIndex];
|
|
7428
|
+
levelTotals.count += 1;
|
|
7429
|
+
for (var _i = 0, _a = this.aggregates; _i < _a.length; _i++) {
|
|
7430
|
+
var aggr = _a[_i];
|
|
7431
|
+
var value = row.getValue(aggr.colId);
|
|
7432
|
+
var columnTotals = levelTotals.columns[aggr.colId];
|
|
7433
|
+
columnTotals.sum += value;
|
|
7434
|
+
if (value < columnTotals.min) {
|
|
7435
|
+
columnTotals.min = value;
|
|
7083
7436
|
}
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
value[valueCol] = row.getValue(valueCol);
|
|
7437
|
+
if (value > columnTotals.max) {
|
|
7438
|
+
columnTotals.max = value;
|
|
7087
7439
|
}
|
|
7088
|
-
data.set(JSON.stringify(key), value);
|
|
7089
7440
|
}
|
|
7090
|
-
return data;
|
|
7091
7441
|
};
|
|
7092
|
-
|
|
7442
|
+
DataTableAggregatesCalculator.prototype.needRecalculation = function () {
|
|
7443
|
+
return true;
|
|
7444
|
+
};
|
|
7445
|
+
DataTableAggregatesCalculator.prototype.reset = function () {
|
|
7446
|
+
};
|
|
7447
|
+
return DataTableAggregatesCalculator;
|
|
7093
7448
|
}());
|
|
7094
7449
|
|
|
7095
7450
|
|
|
@@ -7115,7 +7470,7 @@ external_easyqueryCore_["EqContext"].prototype.useEnterprise = function (keyOrIn
|
|
|
7115
7470
|
services.registerDataModelResolver(function (context) { return new model_ex_DataModelEx(); });
|
|
7116
7471
|
services.registerQueryResolver(function (context) { return new query_ex_QueryEx(context.getModel()); });
|
|
7117
7472
|
services.registerQueryStorageResolver(function (context) { return new EqServerQueryStorage(context); });
|
|
7118
|
-
services.registerAggregatesCalculator(function (context) { return new
|
|
7473
|
+
services.registerAggregatesCalculator(function (context) { return new data_table_aggr_calculator_DataTableAggregatesCalculator(context); });
|
|
7119
7474
|
if (lcv.__kt === 2) {
|
|
7120
7475
|
console.warn('EasyQuery.JS is working in the TRIAL MODE!\n'
|
|
7121
7476
|
+ 'Please order a license (https://korzh.com/eq) to get a proper product key.');
|
|
@@ -7244,13 +7599,182 @@ function hideTrialWM() {
|
|
|
7244
7599
|
}
|
|
7245
7600
|
}
|
|
7246
7601
|
|
|
7602
|
+
// CONCATENATED MODULE: ./src/data/eqs_aggr_calculator.ts
|
|
7603
|
+
var eqs_aggr_calculator_assign = (undefined && undefined.__assign) || function () {
|
|
7604
|
+
eqs_aggr_calculator_assign = Object.assign || function(t) {
|
|
7605
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7606
|
+
s = arguments[i];
|
|
7607
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7608
|
+
t[p] = s[p];
|
|
7609
|
+
}
|
|
7610
|
+
return t;
|
|
7611
|
+
};
|
|
7612
|
+
return eqs_aggr_calculator_assign.apply(this, arguments);
|
|
7613
|
+
};
|
|
7614
|
+
|
|
7615
|
+
|
|
7616
|
+
var eqs_aggr_calculator_EqServerAggregatesCalculator = /** @class */ (function () {
|
|
7617
|
+
function EqServerAggregatesCalculator(context) {
|
|
7618
|
+
this.context = context;
|
|
7619
|
+
this._needRecalculation = true;
|
|
7620
|
+
this.aggrContainer = new external_easyqueryCore_["EqAggregatesContainer"](context);
|
|
7621
|
+
}
|
|
7622
|
+
EqServerAggregatesCalculator.prototype.getAggrContainer = function () {
|
|
7623
|
+
return this.aggrContainer;
|
|
7624
|
+
};
|
|
7625
|
+
EqServerAggregatesCalculator.prototype.calculate = function (options) {
|
|
7626
|
+
this._needRecalculation = false;
|
|
7627
|
+
this.aggrContainer.clear();
|
|
7628
|
+
options = options || {};
|
|
7629
|
+
options.maxLevel = options.maxLevel >= 0
|
|
7630
|
+
? options.maxLevel : 0;
|
|
7631
|
+
var levelPromises = [];
|
|
7632
|
+
var query = this.context.createQuery();
|
|
7633
|
+
query.loadFromData(this.context.getQuery().toJSONData());
|
|
7634
|
+
var settings = this.context.getQuery().getAggregationSettings();
|
|
7635
|
+
var aggregates = settings.getAggregates();
|
|
7636
|
+
var aggrColIds = settings.getAggregates().map(function (a) { return a.colId; });
|
|
7637
|
+
var aggrCols = query.getColumns()
|
|
7638
|
+
.filter(function (col) { return aggrColIds.indexOf(col.id) >= 0; });
|
|
7639
|
+
var _loop_1 = function (col) {
|
|
7640
|
+
query.changeColumnType(col, external_easyqueryCore_["ExprTag"].AggregateFunction, { funcId: aggregates.filter(function (a) { return a.colId == col.id; })[0].funcId });
|
|
7641
|
+
};
|
|
7642
|
+
for (var _i = 0, aggrCols_1 = aggrCols; _i < aggrCols_1.length; _i++) {
|
|
7643
|
+
var col = aggrCols_1[_i];
|
|
7644
|
+
_loop_1(col);
|
|
7645
|
+
}
|
|
7646
|
+
//get all non-aggregate columns
|
|
7647
|
+
var queryCols = query.getColumns()
|
|
7648
|
+
.filter(function (c) { return c.expr.tag !== external_easyqueryCore_["ExprTag"].AggregateFunction; });
|
|
7649
|
+
for (var _a = 0, queryCols_1 = queryCols; _a < queryCols_1.length; _a++) {
|
|
7650
|
+
var col = queryCols_1[_a];
|
|
7651
|
+
col.setHidden(true);
|
|
7652
|
+
}
|
|
7653
|
+
if (settings.hasRecordCount()) {
|
|
7654
|
+
var col = query.createColumn();
|
|
7655
|
+
col.caption = settings.COUNT_FIELD_NAME;
|
|
7656
|
+
col['_id'] = settings.COUNT_FIELD_NAME;
|
|
7657
|
+
var sqlText = 'COUNT(*)';
|
|
7658
|
+
var customSqlExpr = new external_easyqueryCore_["Expression"](col);
|
|
7659
|
+
customSqlExpr.tag = external_easyqueryCore_["ExprTag"].CustomSql;
|
|
7660
|
+
customSqlExpr.sql = sqlText;
|
|
7661
|
+
customSqlExpr.baseAttrId = null;
|
|
7662
|
+
col.expr = customSqlExpr;
|
|
7663
|
+
query.getColumns().push(col);
|
|
7664
|
+
}
|
|
7665
|
+
if (settings.hasGrandTotals()) {
|
|
7666
|
+
levelPromises.push(this.processLevel({
|
|
7667
|
+
query: query,
|
|
7668
|
+
level: 0,
|
|
7669
|
+
groupName: 'Grand Totals',
|
|
7670
|
+
resultObtainedCallback: options.resultObtained,
|
|
7671
|
+
errorOccurredCallback: options.errorOccurred
|
|
7672
|
+
}));
|
|
7673
|
+
}
|
|
7674
|
+
var groups = settings.getGroups();
|
|
7675
|
+
for (var level = 1; level <= groups.length; level++) {
|
|
7676
|
+
var group = groups[level - 1];
|
|
7677
|
+
for (var _b = 0, queryCols_2 = queryCols; _b < queryCols_2.length; _b++) {
|
|
7678
|
+
var col = queryCols_2[_b];
|
|
7679
|
+
col.setHidden(group.columns.indexOf(col.id) < 0);
|
|
7680
|
+
}
|
|
7681
|
+
levelPromises.push(this.processLevel({
|
|
7682
|
+
query: query,
|
|
7683
|
+
level: level,
|
|
7684
|
+
groupName: group.name,
|
|
7685
|
+
resultObtainedCallback: options.resultObtained,
|
|
7686
|
+
errorOccurredCallback: options.errorOccurred
|
|
7687
|
+
}));
|
|
7688
|
+
}
|
|
7689
|
+
return Promise.all(levelPromises)
|
|
7690
|
+
.then(function () {
|
|
7691
|
+
return;
|
|
7692
|
+
})
|
|
7693
|
+
.catch(function (error) { return console.error(error); });
|
|
7694
|
+
};
|
|
7695
|
+
EqServerAggregatesCalculator.prototype.processLevel = function (options) {
|
|
7696
|
+
var _this = this;
|
|
7697
|
+
var fetcher = this.context.getServices()
|
|
7698
|
+
.getDataFetcher();
|
|
7699
|
+
var fetchOptions = {
|
|
7700
|
+
aux: true,
|
|
7701
|
+
query: options.query
|
|
7702
|
+
};
|
|
7703
|
+
if (this.context.debugMode) {
|
|
7704
|
+
fetchOptions.debug = "Fetching group data. Group: '" + options.groupName + "', level: " + options.level;
|
|
7705
|
+
}
|
|
7706
|
+
var resultPromise = fetcher.fetchData(fetchOptions)
|
|
7707
|
+
.then(function (result) {
|
|
7708
|
+
var dataTable = new easy_data_table_EasyDataTable({
|
|
7709
|
+
elasticChunks: true
|
|
7710
|
+
});
|
|
7711
|
+
var resultSet = result.resultSet;
|
|
7712
|
+
for (var _i = 0, _a = resultSet.cols; _i < _a.length; _i++) {
|
|
7713
|
+
var col = _a[_i];
|
|
7714
|
+
dataTable.columns.add(col);
|
|
7715
|
+
}
|
|
7716
|
+
for (var _b = 0, _c = resultSet.rows; _b < _c.length; _b++) {
|
|
7717
|
+
var row = _c[_b];
|
|
7718
|
+
dataTable.addRow(row);
|
|
7719
|
+
}
|
|
7720
|
+
var levelData = _this.buildLevelData(options.level, dataTable);
|
|
7721
|
+
console.log('Level', options.level, levelData);
|
|
7722
|
+
_this.aggrContainer.setAggregateData(options.level, levelData);
|
|
7723
|
+
if (options.resultObtainedCallback) {
|
|
7724
|
+
options.resultObtainedCallback(result, options.level);
|
|
7725
|
+
}
|
|
7726
|
+
})
|
|
7727
|
+
.catch(function (error) {
|
|
7728
|
+
if (options.errorOccurredCallback) {
|
|
7729
|
+
options.errorOccurredCallback(eqs_aggr_calculator_assign(eqs_aggr_calculator_assign({}, error), { level: options.level }));
|
|
7730
|
+
}
|
|
7731
|
+
});
|
|
7732
|
+
return resultPromise;
|
|
7733
|
+
};
|
|
7734
|
+
EqServerAggregatesCalculator.prototype.buildLevelData = function (level, dataTable) {
|
|
7735
|
+
var aggrSettings = this.context.getQuery().getAggregationSettings();
|
|
7736
|
+
var keyColumns = level > 0
|
|
7737
|
+
? aggrSettings.getGroups()[level - 1].columns
|
|
7738
|
+
: [];
|
|
7739
|
+
var valueColumns = aggrSettings.getAggregates().map(function (a) { return a.colId; });
|
|
7740
|
+
if (aggrSettings.hasRecordCount()) {
|
|
7741
|
+
valueColumns.push(aggrSettings.COUNT_FIELD_NAME);
|
|
7742
|
+
}
|
|
7743
|
+
var data = new Map();
|
|
7744
|
+
for (var _i = 0, _a = dataTable.getCachedRows(); _i < _a.length; _i++) {
|
|
7745
|
+
var row = _a[_i];
|
|
7746
|
+
var key = {};
|
|
7747
|
+
var value = {};
|
|
7748
|
+
for (var _b = 0, keyColumns_1 = keyColumns; _b < keyColumns_1.length; _b++) {
|
|
7749
|
+
var keyCol = keyColumns_1[_b];
|
|
7750
|
+
var colIdx = dataTable.columns.getIndex(keyCol);
|
|
7751
|
+
if (colIdx >= 0) {
|
|
7752
|
+
var keyVal = row.getValue(keyCol);
|
|
7753
|
+
if (!aggrSettings.caseSensitiveGroups && typeof (keyVal) === 'string') {
|
|
7754
|
+
keyVal = keyVal.toLowerCase();
|
|
7755
|
+
}
|
|
7756
|
+
key[keyCol] = keyVal;
|
|
7757
|
+
}
|
|
7758
|
+
}
|
|
7759
|
+
for (var _c = 0, valueColumns_1 = valueColumns; _c < valueColumns_1.length; _c++) {
|
|
7760
|
+
var valueCol = valueColumns_1[_c];
|
|
7761
|
+
value[valueCol] = row.getValue(valueCol);
|
|
7762
|
+
}
|
|
7763
|
+
data.set(JSON.stringify(key), value);
|
|
7764
|
+
}
|
|
7765
|
+
return data;
|
|
7766
|
+
};
|
|
7767
|
+
EqServerAggregatesCalculator.prototype.needRecalculation = function () {
|
|
7768
|
+
return this._needRecalculation;
|
|
7769
|
+
};
|
|
7770
|
+
EqServerAggregatesCalculator.prototype.reset = function () {
|
|
7771
|
+
this._needRecalculation = true;
|
|
7772
|
+
};
|
|
7773
|
+
return EqServerAggregatesCalculator;
|
|
7774
|
+
}());
|
|
7775
|
+
|
|
7776
|
+
|
|
7247
7777
|
// CONCATENATED MODULE: ./src/public_api.ts
|
|
7248
|
-
/* concated harmony reexport EqAggregatesCalculator */__webpack_require__.d(__webpack_exports__, "EqAggregatesCalculator", function() { return eqs_aggr_calculator_EqAggregatesCalculator; });
|
|
7249
|
-
/* concated harmony reexport QueryEx */__webpack_require__.d(__webpack_exports__, "QueryEx", function() { return query_ex_QueryEx; });
|
|
7250
|
-
/* concated harmony reexport QueryColumnEx */__webpack_require__.d(__webpack_exports__, "QueryColumnEx", function() { return query_column_ex_QueryColumnEx; });
|
|
7251
|
-
/* concated harmony reexport ConditionEx */__webpack_require__.d(__webpack_exports__, "ConditionEx", function() { return condition_ex_ConditionEx; });
|
|
7252
|
-
/* concated harmony reexport DataModelEx */__webpack_require__.d(__webpack_exports__, "DataModelEx", function() { return model_ex_DataModelEx; });
|
|
7253
|
-
/* concated harmony reexport EqServerQueryStorage */__webpack_require__.d(__webpack_exports__, "EqServerQueryStorage", function() { return EqServerQueryStorage; });
|
|
7254
7778
|
|
|
7255
7779
|
|
|
7256
7780
|
|