@easyquery/enterprise 7.2.4-rc03 → 7.2.4-rc05
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 +501 -537
- package/dist/browser/eq.enterprise.js.map +1 -1
- package/dist/browser/eq.enterprise.min.js +1 -1
- package/dist/browser/eq.enterprise.min.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.js +17 -52
- package/dist/bundles/easyquery.enterprise.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.min.js +1 -1
- package/dist/bundles/easyquery.enterprise.min.js.map +1 -1
- package/dist/lib/license/lc-dialog.js +1 -1
- package/dist/lib/license/lc-dialog.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Enterprise 7.2.4-
|
|
2
|
+
* EasyQuery.JS Enterprise 7.2.4-rc05 (https://korzh.com/easyquery/javascript)
|
|
3
3
|
* Copyright 2023 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
@@ -1368,39 +1368,6 @@ var HttpRequest = /** @class */ (function () {
|
|
|
1368
1368
|
}());
|
|
1369
1369
|
|
|
1370
1370
|
//# sourceMappingURL=http_request.js.map
|
|
1371
|
-
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/string_utils.js
|
|
1372
|
-
function repeatString(str, times) {
|
|
1373
|
-
var result = "";
|
|
1374
|
-
for (var i = 0; i < times; i++) {
|
|
1375
|
-
result += str;
|
|
1376
|
-
}
|
|
1377
|
-
return result;
|
|
1378
|
-
}
|
|
1379
|
-
function reverseString(str) {
|
|
1380
|
-
return str.split("").reverse().join("");
|
|
1381
|
-
}
|
|
1382
|
-
function strEndsWith(str, symbol) {
|
|
1383
|
-
return str && str.lastIndexOf(symbol) == (str.length - symbol.length);
|
|
1384
|
-
}
|
|
1385
|
-
/**
|
|
1386
|
-
* Adds two paths and returns the result
|
|
1387
|
-
* Correctly processes leading and trailing slashes
|
|
1388
|
-
* @param path1
|
|
1389
|
-
* @param path2
|
|
1390
|
-
*/
|
|
1391
|
-
function combinePath(path1, path2) {
|
|
1392
|
-
var result = path1;
|
|
1393
|
-
if (result != null && result.length > 0) {
|
|
1394
|
-
if (result.charAt(result.length - 1) != '/')
|
|
1395
|
-
result += "/";
|
|
1396
|
-
result += path2;
|
|
1397
|
-
}
|
|
1398
|
-
else {
|
|
1399
|
-
result = path2;
|
|
1400
|
-
}
|
|
1401
|
-
return result;
|
|
1402
|
-
}
|
|
1403
|
-
//# sourceMappingURL=string_utils.js.map
|
|
1404
1371
|
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/i18n/i18n.js
|
|
1405
1372
|
|
|
1406
1373
|
|
|
@@ -1874,7 +1841,6 @@ var i18n;
|
|
|
1874
1841
|
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/utils.js
|
|
1875
1842
|
|
|
1876
1843
|
|
|
1877
|
-
|
|
1878
1844
|
var utils;
|
|
1879
1845
|
(function (utils) {
|
|
1880
1846
|
function getAllDataTypes() {
|
|
@@ -2197,27 +2163,26 @@ var utils;
|
|
|
2197
2163
|
if (prfx && prfx.length > 0) {
|
|
2198
2164
|
prfx += "-";
|
|
2199
2165
|
}
|
|
2200
|
-
//adding
|
|
2201
|
-
var
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
//
|
|
2207
|
-
var
|
|
2208
|
-
return prfx +
|
|
2166
|
+
//adding 3 random symbols
|
|
2167
|
+
var randCharPart = symbols[getRandomInt(0, symbols.length)] +
|
|
2168
|
+
symbols[getRandomInt(0, symbols.length)] +
|
|
2169
|
+
symbols[getRandomInt(0, symbols.length)];
|
|
2170
|
+
var randInt = getRandomInt(0, 10000);
|
|
2171
|
+
//generating main ID part
|
|
2172
|
+
//it's a 36-base representation of some random number based on current value of ticks
|
|
2173
|
+
var ticksNum36 = intToNumBase(getNowTicks() - magicTicks - randInt);
|
|
2174
|
+
return prfx + randCharPart + ticksNum36;
|
|
2209
2175
|
}
|
|
2210
2176
|
utils.generateId = generateId;
|
|
2211
|
-
function
|
|
2212
|
-
|
|
2213
|
-
var
|
|
2214
|
-
var buffer = repeatString("", i);
|
|
2177
|
+
function intToNumBase(value, targetBase) {
|
|
2178
|
+
if (targetBase === void 0) { targetBase = 36; }
|
|
2179
|
+
var buffer = '';
|
|
2215
2180
|
var rest = value;
|
|
2216
2181
|
do {
|
|
2217
|
-
buffer =
|
|
2182
|
+
buffer = symbols[rest % targetBase] + buffer;
|
|
2218
2183
|
rest = Math.floor(rest /= targetBase);
|
|
2219
2184
|
} while (rest > 0);
|
|
2220
|
-
return
|
|
2185
|
+
return buffer;
|
|
2221
2186
|
}
|
|
2222
2187
|
function squeezeMoniker(str, maxlen) {
|
|
2223
2188
|
var parts = str.split('-');
|
|
@@ -2254,8 +2219,8 @@ var utils;
|
|
|
2254
2219
|
return str;
|
|
2255
2220
|
}
|
|
2256
2221
|
}
|
|
2257
|
-
function replaceAtString(str, index,
|
|
2258
|
-
return str.
|
|
2222
|
+
function replaceAtString(str, index, replacement) {
|
|
2223
|
+
return str.substring(0, index) + replacement + str.substring(index + replacement.length);
|
|
2259
2224
|
}
|
|
2260
2225
|
function getRandomInt(min, max) {
|
|
2261
2226
|
return Math.floor(Math.random() * (max - min)) + min;
|
|
@@ -4034,6 +3999,35 @@ var EventEmitter = /** @class */ (function () {
|
|
|
4034
3999
|
}());
|
|
4035
4000
|
|
|
4036
4001
|
//# sourceMappingURL=event_emitter.js.map
|
|
4002
|
+
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/string_utils.js
|
|
4003
|
+
function repeatString(str, times) {
|
|
4004
|
+
return str.repeat(times);
|
|
4005
|
+
}
|
|
4006
|
+
function reverseString(str) {
|
|
4007
|
+
return str.split("").reverse().join("");
|
|
4008
|
+
}
|
|
4009
|
+
function strEndsWith(str, symbol) {
|
|
4010
|
+
return str && str.lastIndexOf(symbol) == (str.length - symbol.length);
|
|
4011
|
+
}
|
|
4012
|
+
/**
|
|
4013
|
+
* Adds two paths and returns the result
|
|
4014
|
+
* Correctly processes leading and trailing slashes
|
|
4015
|
+
* @param path1
|
|
4016
|
+
* @param path2
|
|
4017
|
+
*/
|
|
4018
|
+
function combinePath(path1, path2) {
|
|
4019
|
+
var result = path1;
|
|
4020
|
+
if (result != null && result.length > 0) {
|
|
4021
|
+
if (result.charAt(result.length - 1) != '/')
|
|
4022
|
+
result += "/";
|
|
4023
|
+
result += path2;
|
|
4024
|
+
}
|
|
4025
|
+
else {
|
|
4026
|
+
result = path2;
|
|
4027
|
+
}
|
|
4028
|
+
return result;
|
|
4029
|
+
}
|
|
4030
|
+
//# sourceMappingURL=string_utils.js.map
|
|
4037
4031
|
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/liquid.js
|
|
4038
4032
|
var liquid;
|
|
4039
4033
|
(function (liquid) {
|
|
@@ -13143,6 +13137,8 @@ __webpack_require__.d(lib_public_api_namespaceObject, {
|
|
|
13143
13137
|
AggrSettingsDialog: () => (AggrSettingsDialog),
|
|
13144
13138
|
AggrSettingsRenderer: () => (AggrSettingsRenderer),
|
|
13145
13139
|
AggregationBar: () => (AggregationBar),
|
|
13140
|
+
AttrColumnRendererCB: () => (AttrColumnRendererCB),
|
|
13141
|
+
AttrColumnRendererCP: () => (AttrColumnRendererCP),
|
|
13146
13142
|
AttributeExpressionRenderer: () => (AttributeExpressionRenderer),
|
|
13147
13143
|
BaseElementRenderer: () => (BaseElementRenderer),
|
|
13148
13144
|
ChartFacet: () => (ChartFacet),
|
|
@@ -13158,6 +13154,7 @@ __webpack_require__.d(lib_public_api_namespaceObject, {
|
|
|
13158
13154
|
ConditionGroupRenderer: () => (ConditionGroupRenderer),
|
|
13159
13155
|
ConditionGroupRowRenderer: () => (ConditionGroupRowRenderer),
|
|
13160
13156
|
ConditionRenderer: () => (ConditionRenderer),
|
|
13157
|
+
ConstColumnRendererCP: () => (ConstColumnRendererCP),
|
|
13161
13158
|
CustomListExpressionRenderer: () => (CustomListExpressionRenderer),
|
|
13162
13159
|
CustomSqlColumnRendererCP: () => (CustomSqlColumnRendererCP),
|
|
13163
13160
|
DataFilterView: () => (DataFilterView),
|
|
@@ -13189,8 +13186,6 @@ __webpack_require__.d(lib_public_api_namespaceObject, {
|
|
|
13189
13186
|
ReportView: () => (ReportView),
|
|
13190
13187
|
ResultFacet: () => (ResultFacet),
|
|
13191
13188
|
ResultFacetsPanel: () => (ResultFacetsPanel),
|
|
13192
|
-
SimpleColumnRendererCB: () => (SimpleColumnRendererCB),
|
|
13193
|
-
SimpleColumnRendererCP: () => (SimpleColumnRendererCP),
|
|
13194
13189
|
SimpleConditionRenderer: () => (SimpleConditionRenderer),
|
|
13195
13190
|
SortingBar: () => (SortingBar),
|
|
13196
13191
|
SqlListExpressionRenderer: () => (SqlListExpressionRenderer),
|
|
@@ -15968,7 +15963,7 @@ var Query = /** @class */ (function () {
|
|
|
15968
15963
|
throw new InvalidQueryError(entityAttrNotExistError + column.expr.args[0].value);
|
|
15969
15964
|
}
|
|
15970
15965
|
}
|
|
15971
|
-
else if (column.expr.tag
|
|
15966
|
+
else if (column.expr.tag === ExprTag.Unknown) {
|
|
15972
15967
|
throw new InvalidQueryError(wrongExprTag + column.expr.tag);
|
|
15973
15968
|
}
|
|
15974
15969
|
}
|
|
@@ -16451,7 +16446,6 @@ var Query = /** @class */ (function () {
|
|
|
16451
16446
|
}
|
|
16452
16447
|
public_api.utils.moveArrayItem(this.sortedColumns, colIdx, index);
|
|
16453
16448
|
this.fixupSortingIndices();
|
|
16454
|
-
this.fireColumnsChangedEvent(QueryChangeAction.All);
|
|
16455
16449
|
};
|
|
16456
16450
|
Query.prototype.getColumnSorting = function (col) {
|
|
16457
16451
|
var idx = this.getColumnSortIndex(col);
|
|
@@ -16478,7 +16472,6 @@ var Query = /** @class */ (function () {
|
|
|
16478
16472
|
}
|
|
16479
16473
|
}
|
|
16480
16474
|
this.adjustColumnsSorting();
|
|
16481
|
-
this.fireColumnsChangedEvent(QueryChangeAction.Modify, col, col.isJustSorted());
|
|
16482
16475
|
};
|
|
16483
16476
|
Query.prototype.fixupSortingIndices = function () {
|
|
16484
16477
|
this.sortedColumns.forEach(function (col, index) {
|
|
@@ -16527,10 +16520,8 @@ var Query = /** @class */ (function () {
|
|
|
16527
16520
|
* sortIndex: SortDirection.Ascending
|
|
16528
16521
|
* }});
|
|
16529
16522
|
*/
|
|
16530
|
-
Query.prototype.addColumn = function (descriptor,
|
|
16531
|
-
|
|
16532
|
-
// ? this.justsorted
|
|
16533
|
-
// : this.columns;
|
|
16523
|
+
Query.prototype.addColumn = function (descriptor, silent) {
|
|
16524
|
+
if (silent === void 0) { silent = false; }
|
|
16534
16525
|
var newColumn;
|
|
16535
16526
|
if (descriptor.column) {
|
|
16536
16527
|
newColumn = descriptor.column;
|
|
@@ -16547,10 +16538,10 @@ var Query = /** @class */ (function () {
|
|
|
16547
16538
|
throw new Error("Incorrect attribute id (".concat(descriptor.attributeId, "): addColumn"));
|
|
16548
16539
|
}
|
|
16549
16540
|
}
|
|
16550
|
-
else {
|
|
16551
|
-
throw new Error('Not enought data for addColumn operation.
|
|
16541
|
+
else if (typeof descriptor.constValue === 'undefined' && !descriptor.customSql) {
|
|
16542
|
+
throw new Error('Not enought data for addColumn operation. One of the following options must be defined: attribute, attributeId, constValue or customSlq');
|
|
16552
16543
|
}
|
|
16553
|
-
if (!attr.useInResult) {
|
|
16544
|
+
if (attr && !attr.useInResult) {
|
|
16554
16545
|
if (attr.lookupAttr) {
|
|
16555
16546
|
attr = this.model.getAttributeById(attr.lookupAttr);
|
|
16556
16547
|
}
|
|
@@ -16558,22 +16549,29 @@ var Query = /** @class */ (function () {
|
|
|
16558
16549
|
throw new Error("Can't use this attribute for a column");
|
|
16559
16550
|
}
|
|
16560
16551
|
}
|
|
16561
|
-
if (descriptor.aggrFuncId && descriptor.
|
|
16552
|
+
if (descriptor.aggrFuncId && descriptor.customSql) {
|
|
16562
16553
|
console.warn("Column cannot be created using aggrFuncId and customSql at the same time. " +
|
|
16563
16554
|
"cusomSql will be used.");
|
|
16564
16555
|
}
|
|
16565
|
-
if (descriptor.
|
|
16556
|
+
if (typeof descriptor.constValue !== 'undefined') {
|
|
16557
|
+
newColumn.expr.tag = ExprTag.Constant;
|
|
16558
|
+
newColumn.expr.setValue(descriptor.constValue);
|
|
16559
|
+
newColumn.expr.kind = DataKind.Scalar;
|
|
16560
|
+
newColumn.expr.dataType = descriptor.constType || public_api.DataType.String;
|
|
16561
|
+
}
|
|
16562
|
+
else if (descriptor.customSql) {
|
|
16566
16563
|
newColumn.caption = 'Custom SQL Column';
|
|
16567
16564
|
newColumn.expr.tag = ExprTag.CustomSql;
|
|
16568
|
-
newColumn.expr.
|
|
16569
|
-
newColumn.expr.sql = descriptor.cusomtSql;
|
|
16565
|
+
newColumn.expr.sql = descriptor.customSql;
|
|
16570
16566
|
newColumn.expr.kind = DataKind.Query;
|
|
16571
16567
|
newColumn.expr.dataType = public_api.DataType.Unknown;
|
|
16568
|
+
newColumn.expr.baseAttrId = descriptor.attributeId;
|
|
16569
|
+
if (!this.context.options.allowCustomExpressions) {
|
|
16570
|
+
newColumn.enabled = false;
|
|
16571
|
+
}
|
|
16572
16572
|
}
|
|
16573
16573
|
else if (descriptor.aggrFuncId) {
|
|
16574
16574
|
var funcId = descriptor.aggrFuncId;
|
|
16575
|
-
newColumn.caption = attr.caption + ' '
|
|
16576
|
-
+ this.model.getAggrFunctionCaption(descriptor.aggrFuncId);
|
|
16577
16575
|
newColumn.expr.tag = ExprTag.AggregateFunction;
|
|
16578
16576
|
newColumn.expr.func = descriptor.aggrFuncId;
|
|
16579
16577
|
newColumn.expr.kind = DataKind.Scalar;
|
|
@@ -16582,16 +16580,18 @@ var Query = /** @class */ (function () {
|
|
|
16582
16580
|
var arg = new Expression(newColumn);
|
|
16583
16581
|
arg.setValue(attr.id, true);
|
|
16584
16582
|
arg.tag = ExprTag.EntityAttribute;
|
|
16583
|
+
arg.kind = DataKind.Attribute;
|
|
16585
16584
|
arg.dataType = attr.dataType;
|
|
16586
16585
|
newColumn.expr.args.push(arg);
|
|
16587
16586
|
}
|
|
16588
16587
|
else {
|
|
16589
|
-
newColumn.caption = attr.caption;
|
|
16590
16588
|
newColumn.expr.setValue(attr.id, true);
|
|
16591
16589
|
newColumn.expr.tag = ExprTag.EntityAttribute;
|
|
16590
|
+
newColumn.expr.kind = DataKind.Attribute;
|
|
16592
16591
|
newColumn.expr.dataType = attr.dataType;
|
|
16592
|
+
newColumn.params.concat(attr.params);
|
|
16593
16593
|
}
|
|
16594
|
-
newColumn.caption = descriptor.caption || newColumn
|
|
16594
|
+
newColumn.caption = descriptor.caption || this.context.getDefaultColumnCaption(newColumn);
|
|
16595
16595
|
newColumn._sorting = descriptor.sorting || SortDirection.None;
|
|
16596
16596
|
newColumn._sortIndex = descriptor.sortIndex || -1;
|
|
16597
16597
|
newColumn.enabled = public_api.utils.getIfDefined(descriptor.enabled, true);
|
|
@@ -16607,7 +16607,9 @@ var Query = /** @class */ (function () {
|
|
|
16607
16607
|
}
|
|
16608
16608
|
}
|
|
16609
16609
|
this.setColumnSorting(newColumn, newColumn._sorting);
|
|
16610
|
-
|
|
16610
|
+
if (!silent) {
|
|
16611
|
+
this.fireColumnsChangedEvent(QueryChangeAction.Add, newColumn, justsorted);
|
|
16612
|
+
}
|
|
16611
16613
|
return newColumn;
|
|
16612
16614
|
};
|
|
16613
16615
|
/**
|
|
@@ -16661,9 +16663,6 @@ var Query = /** @class */ (function () {
|
|
|
16661
16663
|
if (column.isJustSorted())
|
|
16662
16664
|
return;
|
|
16663
16665
|
args = args || {};
|
|
16664
|
-
column.caption = (typeof args.caption !== 'undefined')
|
|
16665
|
-
? args.caption
|
|
16666
|
-
: '';
|
|
16667
16666
|
if (tag === ExprTag.AggregateFunction) {
|
|
16668
16667
|
if (!args.funcId)
|
|
16669
16668
|
throw Error('"funcId" argument is not defined');
|
|
@@ -16701,22 +16700,24 @@ var Query = /** @class */ (function () {
|
|
|
16701
16700
|
|| column.expr.tag === ExprTag.ParentEntityAttribute) {
|
|
16702
16701
|
return;
|
|
16703
16702
|
}
|
|
16704
|
-
var
|
|
16705
|
-
? column.expr.
|
|
16706
|
-
: column.expr.
|
|
16707
|
-
var attr =
|
|
16703
|
+
var attrId = (column.expr.tag == ExprTag.AggregateFunction)
|
|
16704
|
+
? column.expr.args[0].value
|
|
16705
|
+
: column.expr.baseAttrId;
|
|
16706
|
+
var attr = attrId
|
|
16707
|
+
? this.model.getAttributeById(attrId)
|
|
16708
|
+
: this.model.getFirstUICAttr();
|
|
16708
16709
|
var expr = new Expression(column);
|
|
16709
16710
|
expr.tag = ExprTag.EntityAttribute;
|
|
16710
|
-
expr.dataType = attr
|
|
16711
|
-
expr.setValue(
|
|
16711
|
+
expr.dataType = attr.dataType;
|
|
16712
|
+
expr.setValue(attr.id, true);
|
|
16712
16713
|
column.expr = expr;
|
|
16713
16714
|
}
|
|
16715
|
+
column.caption = this.context.getDefaultColumnCaption(column);
|
|
16714
16716
|
};
|
|
16715
16717
|
/**
|
|
16716
16718
|
* Moves the column with specified index to another position.
|
|
16717
16719
|
* @param index1 The index of the column that should be moved.
|
|
16718
16720
|
* @param index2 The index of the position the column should be moved to
|
|
16719
|
-
* @param author The author
|
|
16720
16721
|
*/
|
|
16721
16722
|
Query.prototype.moveColumn = function (index1, index2) {
|
|
16722
16723
|
var columns = this.getColumns();
|
|
@@ -16726,12 +16727,8 @@ var Query = /** @class */ (function () {
|
|
|
16726
16727
|
/**
|
|
16727
16728
|
* Removes the column.
|
|
16728
16729
|
* @param column The column to be removed.
|
|
16729
|
-
* @param author The author
|
|
16730
16730
|
*/
|
|
16731
|
-
Query.prototype.removeColumn = function (column
|
|
16732
|
-
// const columns = (column.isJustSorted())
|
|
16733
|
-
// ? this.getJustSortedColumns()
|
|
16734
|
-
// : this.getColumns();
|
|
16731
|
+
Query.prototype.removeColumn = function (column) {
|
|
16735
16732
|
public_api.utils.removeArrayItem(this.columns, column);
|
|
16736
16733
|
public_api.utils.removeArrayItem(this.sortedColumns, column);
|
|
16737
16734
|
};
|
|
@@ -16992,7 +16989,9 @@ var Query = /** @class */ (function () {
|
|
|
16992
16989
|
var expr = cond.expressions[part.index];
|
|
16993
16990
|
if (expr.kind == DataKind.Attribute || expr.tag == ExprTag.EntityAttribute) {
|
|
16994
16991
|
var attr = model.getAttributeById(expr.value);
|
|
16995
|
-
|
|
16992
|
+
if (attr != null) {
|
|
16993
|
+
txt = model.getAttributeText(attr, "{entity} {attr}");
|
|
16994
|
+
}
|
|
16996
16995
|
}
|
|
16997
16996
|
else {
|
|
16998
16997
|
txt = expr.getText();
|
|
@@ -17848,13 +17847,6 @@ var InMemoryModelStorage = /** @class */ (function () {
|
|
|
17848
17847
|
}());
|
|
17849
17848
|
|
|
17850
17849
|
//# sourceMappingURL=model_storage.js.map
|
|
17851
|
-
;// CONCATENATED MODULE: ../core/dist/lib/main/action.js
|
|
17852
|
-
var EqActionResult;
|
|
17853
|
-
(function (EqActionResult) {
|
|
17854
|
-
EqActionResult[EqActionResult["Error"] = 0] = "Error";
|
|
17855
|
-
EqActionResult[EqActionResult["Success"] = 1] = "Success";
|
|
17856
|
-
})(EqActionResult || (EqActionResult = {}));
|
|
17857
|
-
//# sourceMappingURL=action.js.map
|
|
17858
17850
|
;// CONCATENATED MODULE: ../core/dist/lib/eqs/eqs_exporter.js
|
|
17859
17851
|
|
|
17860
17852
|
var EqServerExporter = /** @class */ (function () {
|
|
@@ -17916,6 +17908,13 @@ var EqServerExporter = /** @class */ (function () {
|
|
|
17916
17908
|
}());
|
|
17917
17909
|
|
|
17918
17910
|
//# sourceMappingURL=eqs_exporter.js.map
|
|
17911
|
+
;// CONCATENATED MODULE: ../core/dist/lib/main/action.js
|
|
17912
|
+
var EqActionResult;
|
|
17913
|
+
(function (EqActionResult) {
|
|
17914
|
+
EqActionResult[EqActionResult["Error"] = 0] = "Error";
|
|
17915
|
+
EqActionResult[EqActionResult["Success"] = 1] = "Success";
|
|
17916
|
+
})(EqActionResult || (EqActionResult = {}));
|
|
17917
|
+
//# sourceMappingURL=action.js.map
|
|
17919
17918
|
;// CONCATENATED MODULE: ../core/dist/lib/main/context.js
|
|
17920
17919
|
var context_assign = (undefined && undefined.__assign) || function () {
|
|
17921
17920
|
context_assign = Object.assign || function(t) {
|
|
@@ -17953,7 +17952,9 @@ var EqContext = /** @class */ (function () {
|
|
|
17953
17952
|
function EqContext() {
|
|
17954
17953
|
var _this = this;
|
|
17955
17954
|
this.options = {
|
|
17956
|
-
syncSortOrderWithColumnsOrder: true
|
|
17955
|
+
syncSortOrderWithColumnsOrder: true,
|
|
17956
|
+
attributeFormat: '{entity} {attr}',
|
|
17957
|
+
columnTitleFormat: null //means it will be the same as attributeFormat
|
|
17957
17958
|
};
|
|
17958
17959
|
this.servicesInitialized = false;
|
|
17959
17960
|
this.internalListCache = {};
|
|
@@ -19372,6 +19373,37 @@ var EqContext = /** @class */ (function () {
|
|
|
19372
19373
|
});
|
|
19373
19374
|
}
|
|
19374
19375
|
};
|
|
19376
|
+
EqContext.prototype.getAttributeTitle = function (attr) {
|
|
19377
|
+
var format = this.options.attributeFormat;
|
|
19378
|
+
return this.getModel().getAttributeText(attr, format);
|
|
19379
|
+
};
|
|
19380
|
+
EqContext.prototype.getColumnTitle = function (attr) {
|
|
19381
|
+
var format = this.options.columnTitleFormat || this.options.attributeFormat;
|
|
19382
|
+
return this.getModel().getAttributeText(attr, format);
|
|
19383
|
+
};
|
|
19384
|
+
EqContext.prototype.getDefaultColumnCaption = function (column) {
|
|
19385
|
+
var attr;
|
|
19386
|
+
var model = this.getModel();
|
|
19387
|
+
switch (column.expr.tag) {
|
|
19388
|
+
case ExprTag.Constant:
|
|
19389
|
+
return "Contant Column";
|
|
19390
|
+
case ExprTag.CustomSql:
|
|
19391
|
+
return "SQL Column";
|
|
19392
|
+
case ExprTag.ParentColumn:
|
|
19393
|
+
return "Parent Column";
|
|
19394
|
+
case ExprTag.Query:
|
|
19395
|
+
return "Query Column";
|
|
19396
|
+
case ExprTag.EntityAttribute:
|
|
19397
|
+
case ExprTag.ParentEntityAttribute:
|
|
19398
|
+
attr = model.getAttributeById(column.expr.value);
|
|
19399
|
+
return this.getColumnTitle(attr);
|
|
19400
|
+
case ExprTag.AggregateFunction:
|
|
19401
|
+
attr = model.getAttributeById(column.expr.args[0].value);
|
|
19402
|
+
return this.getColumnTitle(attr) + ' ' + model.getAggrFunctionCaption(column.expr.func);
|
|
19403
|
+
default:
|
|
19404
|
+
return 'Column';
|
|
19405
|
+
}
|
|
19406
|
+
};
|
|
19375
19407
|
return EqContext;
|
|
19376
19408
|
}());
|
|
19377
19409
|
|
|
@@ -19691,7 +19723,6 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
19691
19723
|
autoClearSelection: true,
|
|
19692
19724
|
entityRenderedCallback: null,
|
|
19693
19725
|
attributeRenderedCallback: null,
|
|
19694
|
-
columnTitleFormat: '{attr}'
|
|
19695
19726
|
};
|
|
19696
19727
|
if (options) {
|
|
19697
19728
|
public_api.utils.assignDeep(this.options, options);
|
|
@@ -19820,10 +19851,8 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
19820
19851
|
if (model.checkAttrProperty(attrId, "useInResult")) {
|
|
19821
19852
|
if (checkbox.checked) {
|
|
19822
19853
|
var attr = model.getAttributeById(attrId);
|
|
19823
|
-
var caption = model.getAttributeText(attr, _this.options.columnTitleFormat);
|
|
19824
19854
|
var column = query.addColumn({
|
|
19825
|
-
attribute: attr
|
|
19826
|
-
caption: caption
|
|
19855
|
+
attribute: attr
|
|
19827
19856
|
});
|
|
19828
19857
|
query.fireColumnsChangedEvent(QueryChangeAction.Add, column);
|
|
19829
19858
|
}
|
|
@@ -19832,7 +19861,7 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
19832
19861
|
.filter(function (col) { return col.expr.tag === ExprTag.EntityAttribute
|
|
19833
19862
|
&& col.expr.value === attrId; });
|
|
19834
19863
|
if (columns.length > 0) {
|
|
19835
|
-
query.removeColumn(columns[0]
|
|
19864
|
+
query.removeColumn(columns[0]);
|
|
19836
19865
|
query.fireColumnsChangedEvent(QueryChangeAction.Delete, columns[0]);
|
|
19837
19866
|
}
|
|
19838
19867
|
}
|
|
@@ -20046,11 +20075,9 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
20046
20075
|
for (var _i = 0, attrList_3 = attrList; _i < attrList_3.length; _i++) {
|
|
20047
20076
|
var attrId_1 = attrList_3[_i];
|
|
20048
20077
|
var attr = model.getAttributeById(attrId_1);
|
|
20049
|
-
var caption = model.getAttributeText(attr, _this.options.columnTitleFormat);
|
|
20050
20078
|
query.addColumn({
|
|
20051
|
-
attribute: attr
|
|
20052
|
-
|
|
20053
|
-
});
|
|
20079
|
+
attribute: attr
|
|
20080
|
+
}, true);
|
|
20054
20081
|
}
|
|
20055
20082
|
query.fireChangedEvent();
|
|
20056
20083
|
if (_this.options.autoClearSelection) {
|
|
@@ -21603,7 +21630,6 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
21603
21630
|
});
|
|
21604
21631
|
ColumnRendererCP.prototype.render = function () {
|
|
21605
21632
|
var _this = this;
|
|
21606
|
-
this.baseAttr = this.getAttribute();
|
|
21607
21633
|
if (this.getButtonsToShow().indexOf("sorting") >= 0 && this.columnEnabled) {
|
|
21608
21634
|
this.sortingButton = this.renderSoringButton(this.column.sorting);
|
|
21609
21635
|
if (this.column.sorting !== SortDirection.None) {
|
|
@@ -21726,15 +21752,8 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
21726
21752
|
ColumnRendererCP.prototype.refresh = function () {
|
|
21727
21753
|
this.render();
|
|
21728
21754
|
};
|
|
21729
|
-
ColumnRendererCP.prototype.getAttribute = function () {
|
|
21730
|
-
var model = this.panel.getContext().getModel();
|
|
21731
|
-
return model.getAttributeByIdSafe(this.column.expr.value);
|
|
21732
|
-
};
|
|
21733
21755
|
ColumnRendererCP.prototype.renderCaptionBlock = function () {
|
|
21734
21756
|
var _this = this;
|
|
21735
|
-
if (!this.column.caption || this.column.caption == '') {
|
|
21736
|
-
this.column.caption = this.getDefaultColumnCaption();
|
|
21737
|
-
}
|
|
21738
21757
|
var builder = (0,lib_public_api.domel)('div')
|
|
21739
21758
|
.addClass("".concat(this.cssPrefix, "-colelement"), "".concat(this.cssPrefix, "-captionelement"))
|
|
21740
21759
|
.addClass(browser_utils/* browserUtils.getMobileCssClass */.z.getMobileCssClass());
|
|
@@ -21937,17 +21956,6 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
21937
21956
|
} }); })
|
|
21938
21957
|
.toDOM();
|
|
21939
21958
|
};
|
|
21940
|
-
ColumnRendererCP.prototype.getDefaultColumnCaption = function () {
|
|
21941
|
-
return this.getDefaultTitleText(this.baseAttr);
|
|
21942
|
-
};
|
|
21943
|
-
ColumnRendererCP.prototype.getDefaultTitleText = function (attr) {
|
|
21944
|
-
return this.getAttributeCaption(attr, this.panel.options.titleElementFormat);
|
|
21945
|
-
};
|
|
21946
|
-
ColumnRendererCP.prototype.getAttributeCaption = function (attr, format) {
|
|
21947
|
-
format = format || this.panel.options.attrElementFormat;
|
|
21948
|
-
var model = this.panel.getContext().getModel();
|
|
21949
|
-
return model.getAttributeText(attr, format);
|
|
21950
|
-
};
|
|
21951
21959
|
ColumnRendererCP.prototype.getClassesToAdd = function () {
|
|
21952
21960
|
var result = "";
|
|
21953
21961
|
result += this.columnEnabled ? '' : " ".concat(this.cssPrefix, "-disabled");
|
|
@@ -22178,7 +22186,7 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
22178
22186
|
switch (action) {
|
|
22179
22187
|
case ColumnAction.Delete:
|
|
22180
22188
|
var curQuery = this.column.getQuery();
|
|
22181
|
-
curQuery.removeColumn(this.column
|
|
22189
|
+
curQuery.removeColumn(this.column);
|
|
22182
22190
|
curQuery.fireColumnsChangedEvent(QueryChangeAction.Delete, this.column);
|
|
22183
22191
|
break;
|
|
22184
22192
|
case ColumnAction.Enable:
|
|
@@ -22372,8 +22380,8 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
22372
22380
|
}());
|
|
22373
22381
|
|
|
22374
22382
|
//# sourceMappingURL=column_renderer_cp.js.map
|
|
22375
|
-
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnspanel/
|
|
22376
|
-
var
|
|
22383
|
+
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnspanel/attr_column_renderer_cp.js
|
|
22384
|
+
var attr_column_renderer_cp_extends = (undefined && undefined.__extends) || (function () {
|
|
22377
22385
|
var extendStatics = function (d, b) {
|
|
22378
22386
|
extendStatics = Object.setPrototypeOf ||
|
|
22379
22387
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -22393,15 +22401,15 @@ var simple_column_renderer_extends = (undefined && undefined.__extends) || (func
|
|
|
22393
22401
|
|
|
22394
22402
|
|
|
22395
22403
|
|
|
22396
|
-
var
|
|
22397
|
-
|
|
22398
|
-
function
|
|
22404
|
+
var AttrColumnRendererCP = /** @class */ (function (_super) {
|
|
22405
|
+
attr_column_renderer_cp_extends(AttrColumnRendererCP, _super);
|
|
22406
|
+
function AttrColumnRendererCP() {
|
|
22399
22407
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
22400
22408
|
}
|
|
22401
|
-
|
|
22409
|
+
AttrColumnRendererCP.prototype.getClassesToAdd = function () {
|
|
22402
22410
|
return "".concat(_super.prototype.getClassesToAdd.call(this), " ").concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr");
|
|
22403
22411
|
};
|
|
22404
|
-
|
|
22412
|
+
AttrColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
22405
22413
|
var _this = this;
|
|
22406
22414
|
return (0,lib_public_api.domel)("div")
|
|
22407
22415
|
.addClass("".concat(this.cssPrefix, "-expr-block"))
|
|
@@ -22412,9 +22420,14 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22412
22420
|
.addChildElement(_this.renderBaseExpression()); })
|
|
22413
22421
|
.toDOM();
|
|
22414
22422
|
};
|
|
22415
|
-
|
|
22423
|
+
AttrColumnRendererCP.prototype.getAttribute = function () {
|
|
22424
|
+
var model = this.panel.getContext().getModel();
|
|
22425
|
+
return model.getAttributeByIdSafe(this.column.expr.value);
|
|
22426
|
+
};
|
|
22427
|
+
AttrColumnRendererCP.prototype.renderBaseExpression = function () {
|
|
22416
22428
|
var _this = this;
|
|
22417
|
-
var
|
|
22429
|
+
var baseAttr = this.getAttribute();
|
|
22430
|
+
var attrCaption = this.panel.getContext().getAttributeTitle(baseAttr);
|
|
22418
22431
|
if (this.isEditable()) {
|
|
22419
22432
|
return (0,lib_public_api.domel)('a')
|
|
22420
22433
|
.attr('href', 'javascript:void(0)')
|
|
@@ -22437,14 +22450,21 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22437
22450
|
.title(attrCaption)
|
|
22438
22451
|
.toDOM();
|
|
22439
22452
|
};
|
|
22440
|
-
|
|
22453
|
+
AttrColumnRendererCP.prototype.baseExpressionItemSelectedCallback = function (data, item) {
|
|
22441
22454
|
var attrid = data.id;
|
|
22442
|
-
this.
|
|
22443
|
-
|
|
22455
|
+
var context = this.panel.getContext();
|
|
22456
|
+
var attr = context.getModel().getAttributeById(attrid);
|
|
22457
|
+
this.updateBaseAttr(attr);
|
|
22458
|
+
this.column.caption = context.getDefaultColumnCaption(this.column);
|
|
22444
22459
|
this.fireColumnChanged();
|
|
22445
22460
|
return false;
|
|
22446
22461
|
};
|
|
22447
|
-
|
|
22462
|
+
AttrColumnRendererCP.prototype.updateBaseAttr = function (attr) {
|
|
22463
|
+
this.column.expr.setValue(attr.id, true);
|
|
22464
|
+
this.column.expr.baseAttrId = attr.id;
|
|
22465
|
+
this.column.expr.dataType = attr.dataType;
|
|
22466
|
+
};
|
|
22467
|
+
AttrColumnRendererCP.prototype.getUIS = function () {
|
|
22448
22468
|
var arg = this.column.expr.args[0];
|
|
22449
22469
|
if (arg) {
|
|
22450
22470
|
var model = this.panel.getContext().getModel();
|
|
@@ -22454,7 +22474,7 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22454
22474
|
return true;
|
|
22455
22475
|
}
|
|
22456
22476
|
};
|
|
22457
|
-
|
|
22477
|
+
AttrColumnRendererCP.prototype.changeTypeHandler = function (ev) {
|
|
22458
22478
|
var _this = this;
|
|
22459
22479
|
this.keepShowingButtons = true;
|
|
22460
22480
|
this.functionMenu.showMenu({
|
|
@@ -22472,7 +22492,7 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22472
22492
|
}
|
|
22473
22493
|
});
|
|
22474
22494
|
};
|
|
22475
|
-
|
|
22495
|
+
AttrColumnRendererCP.prototype.changeTypeToCustomSql = function () {
|
|
22476
22496
|
var _this = this;
|
|
22477
22497
|
var query = this.column.getQuery();
|
|
22478
22498
|
query.changeColumnType(this.column, ExprTag.CustomSql);
|
|
@@ -22485,12 +22505,12 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22485
22505
|
}, 500);
|
|
22486
22506
|
this.fireColumnChanged();
|
|
22487
22507
|
};
|
|
22488
|
-
|
|
22508
|
+
AttrColumnRendererCP.prototype.changeTypeToAggr = function (funcId) {
|
|
22489
22509
|
var query = this.column.getQuery();
|
|
22490
22510
|
query.changeColumnType(this.column, ExprTag.AggregateFunction, { funcId: funcId });
|
|
22491
22511
|
this.fireColumnChanged();
|
|
22492
22512
|
};
|
|
22493
|
-
|
|
22513
|
+
AttrColumnRendererCP.prototype.processExtraButtonMenuItems = function (action, evt) {
|
|
22494
22514
|
if (action === "CUSTOMSQL") {
|
|
22495
22515
|
this.changeTypeToCustomSql();
|
|
22496
22516
|
}
|
|
@@ -22499,7 +22519,7 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22499
22519
|
}
|
|
22500
22520
|
return true;
|
|
22501
22521
|
};
|
|
22502
|
-
|
|
22522
|
+
AttrColumnRendererCP.prototype.getExtraButtonMenuItems = function () {
|
|
22503
22523
|
var items = [];
|
|
22504
22524
|
var funcs = this.panel.getContext().getModel().getAggrFunctions();
|
|
22505
22525
|
var toInclude = true;
|
|
@@ -22550,12 +22570,12 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22550
22570
|
items: items
|
|
22551
22571
|
}];
|
|
22552
22572
|
};
|
|
22553
|
-
return
|
|
22573
|
+
return AttrColumnRendererCP;
|
|
22554
22574
|
}(ColumnRendererCP));
|
|
22555
22575
|
|
|
22556
|
-
//# sourceMappingURL=
|
|
22557
|
-
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnspanel/
|
|
22558
|
-
var
|
|
22576
|
+
//# sourceMappingURL=attr_column_renderer_cp.js.map
|
|
22577
|
+
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnspanel/aggrfunc_column_renderer_cp.js
|
|
22578
|
+
var aggrfunc_column_renderer_cp_extends = (undefined && undefined.__extends) || (function () {
|
|
22559
22579
|
var extendStatics = function (d, b) {
|
|
22560
22580
|
extendStatics = Object.setPrototypeOf ||
|
|
22561
22581
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -22578,7 +22598,7 @@ var aggrfunc_column_renderer_extends = (undefined && undefined.__extends) || (fu
|
|
|
22578
22598
|
|
|
22579
22599
|
|
|
22580
22600
|
var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
22581
|
-
|
|
22601
|
+
aggrfunc_column_renderer_cp_extends(AggrFuncColumnRendererCP, _super);
|
|
22582
22602
|
function AggrFuncColumnRendererCP() {
|
|
22583
22603
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22584
22604
|
_this.displayFormatParser = new DisplayFormatParser();
|
|
@@ -22593,10 +22613,6 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22593
22613
|
.getModel()
|
|
22594
22614
|
.getAttributeByIdSafe(this.column.expr.args[0].value);
|
|
22595
22615
|
};
|
|
22596
|
-
AggrFuncColumnRendererCP.prototype.getDefaultColumnCaption = function () {
|
|
22597
|
-
return this.getDefaultTitleText(this.baseAttr) + ' '
|
|
22598
|
-
+ this.panel.getContext().getModel().getAggrFunctionCaption(this.column.expr.func);
|
|
22599
|
-
};
|
|
22600
22616
|
AggrFuncColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
22601
22617
|
var _this = this;
|
|
22602
22618
|
var model = this.panel.getContext().getModel();
|
|
@@ -22681,14 +22697,6 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22681
22697
|
}
|
|
22682
22698
|
return button;
|
|
22683
22699
|
};
|
|
22684
|
-
AggrFuncColumnRendererCP.prototype.baseExpressionItemSelectedCallback = function (data, item) {
|
|
22685
|
-
var attrid = data.id;
|
|
22686
|
-
//this.column.expr.args[0].id = attrid;
|
|
22687
|
-
this.column.expr.args[0].setValue(attrid, true);
|
|
22688
|
-
this.column.caption = '';
|
|
22689
|
-
this.fireColumnChanged();
|
|
22690
|
-
return false;
|
|
22691
|
-
};
|
|
22692
22700
|
AggrFuncColumnRendererCP.prototype.changeTypeToSimple = function () {
|
|
22693
22701
|
var query = this.column.getQuery();
|
|
22694
22702
|
query.changeColumnType(this.column, ExprTag.EntityAttribute);
|
|
@@ -22715,6 +22723,10 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22715
22723
|
}
|
|
22716
22724
|
return result;
|
|
22717
22725
|
};
|
|
22726
|
+
AggrFuncColumnRendererCP.prototype.updateBaseAttr = function (attr) {
|
|
22727
|
+
this.column.expr.args[0].setValue(attr.id, true);
|
|
22728
|
+
this.column.expr.baseAttrId = attr.id;
|
|
22729
|
+
};
|
|
22718
22730
|
AggrFuncColumnRendererCP.prototype.changeTypeHandler = function (ev) {
|
|
22719
22731
|
this.changeTypeToSimple();
|
|
22720
22732
|
};
|
|
@@ -22733,11 +22745,11 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22733
22745
|
}];
|
|
22734
22746
|
};
|
|
22735
22747
|
return AggrFuncColumnRendererCP;
|
|
22736
|
-
}(
|
|
22748
|
+
}(AttrColumnRendererCP));
|
|
22737
22749
|
|
|
22738
|
-
//# sourceMappingURL=
|
|
22739
|
-
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnspanel/
|
|
22740
|
-
var
|
|
22750
|
+
//# sourceMappingURL=aggrfunc_column_renderer_cp.js.map
|
|
22751
|
+
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnspanel/editable_column_renderer_cp.js
|
|
22752
|
+
var editable_column_renderer_cp_extends = (undefined && undefined.__extends) || (function () {
|
|
22741
22753
|
var extendStatics = function (d, b) {
|
|
22742
22754
|
extendStatics = Object.setPrototypeOf ||
|
|
22743
22755
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -22758,51 +22770,25 @@ var customsql_column_renderer_extends = (undefined && undefined.__extends) || (f
|
|
|
22758
22770
|
|
|
22759
22771
|
|
|
22760
22772
|
|
|
22761
|
-
var
|
|
22762
|
-
|
|
22763
|
-
function
|
|
22773
|
+
var EditableColumnRendererCP = /** @class */ (function (_super) {
|
|
22774
|
+
editable_column_renderer_cp_extends(EditableColumnRendererCP, _super);
|
|
22775
|
+
function EditableColumnRendererCP() {
|
|
22764
22776
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22765
22777
|
_this.dataTypeMenu = null;
|
|
22766
22778
|
return _this;
|
|
22767
22779
|
}
|
|
22768
|
-
|
|
22780
|
+
EditableColumnRendererCP.prototype.renderEnabledButton = function () {
|
|
22769
22781
|
var elem = _super.prototype.renderEnabledButton.call(this);
|
|
22770
22782
|
var child = elem.children[0];
|
|
22771
22783
|
child.title = public_api.i18n.getText('CmdToggleEnableCustom');
|
|
22772
22784
|
return elem;
|
|
22773
22785
|
};
|
|
22774
22786
|
;
|
|
22775
|
-
|
|
22787
|
+
EditableColumnRendererCP.prototype.getClassesToAdd = function () {
|
|
22776
22788
|
return "".concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr") + _super.prototype.getClassesToAdd.call(this);
|
|
22777
22789
|
};
|
|
22778
|
-
|
|
22779
|
-
get: function () {
|
|
22780
|
-
return this.panel.areCustomExpressionsAllowed() ? this.column.enabled : false;
|
|
22781
|
-
},
|
|
22782
|
-
set: function (value) {
|
|
22783
|
-
if (this.panel.areCustomExpressionsAllowed()) {
|
|
22784
|
-
this.column.enabled = value;
|
|
22785
|
-
}
|
|
22786
|
-
else {
|
|
22787
|
-
this.column.enabled = false;
|
|
22788
|
-
}
|
|
22789
|
-
},
|
|
22790
|
-
enumerable: false,
|
|
22791
|
-
configurable: true
|
|
22792
|
-
});
|
|
22793
|
-
CustomSqlColumnRendererCP.prototype.renderColumnTypeButton = function () {
|
|
22794
|
-
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
22795
|
-
if (button) {
|
|
22796
|
-
button.firstElementChild.classList.add('aggregated');
|
|
22797
|
-
button.firstElementChild.setAttribute('title', public_api.i18n.getText('ButtonToSimple'));
|
|
22798
|
-
}
|
|
22799
|
-
return button;
|
|
22800
|
-
};
|
|
22801
|
-
CustomSqlColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
22790
|
+
EditableColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
22802
22791
|
var _this = this;
|
|
22803
|
-
if (!this.column.caption || this.column.caption == '') {
|
|
22804
|
-
this.column.caption = this.getDefaultColumnCaption();
|
|
22805
|
-
}
|
|
22806
22792
|
var exprBlock = (0,lib_public_api.domel)("div")
|
|
22807
22793
|
.addClass("".concat(this.cssPrefix, "-expr-block"))
|
|
22808
22794
|
.addClass(browser_utils/* browserUtils.getMobileCssClass */.z.getMobileCssClass())
|
|
@@ -22832,7 +22818,7 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22832
22818
|
)
|
|
22833
22819
|
.addChild('input', function (b) { return b
|
|
22834
22820
|
.hide()
|
|
22835
|
-
.value(_this.
|
|
22821
|
+
.value(_this.getColumnValue())
|
|
22836
22822
|
.on('blur keydown', function (ev) {
|
|
22837
22823
|
var isEndEvent = false;
|
|
22838
22824
|
var save = true;
|
|
@@ -22857,12 +22843,13 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22857
22843
|
aEl.style.removeProperty('display');
|
|
22858
22844
|
inputEl.style.display = 'none';
|
|
22859
22845
|
}
|
|
22860
|
-
|
|
22861
|
-
|
|
22846
|
+
var colVal = _this.getColumnValue();
|
|
22847
|
+
if (save && colVal !== inputEl.value) {
|
|
22848
|
+
_this.setColumnValue(inputEl.value);
|
|
22862
22849
|
_this.fireColumnChanged();
|
|
22863
22850
|
}
|
|
22864
22851
|
else {
|
|
22865
|
-
inputEl.value =
|
|
22852
|
+
inputEl.value = colVal;
|
|
22866
22853
|
}
|
|
22867
22854
|
_this.element.removeAttribute(lib_public_api.eqDragManager.DRAG_DISABLED_ATTR);
|
|
22868
22855
|
}
|
|
@@ -22915,31 +22902,30 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22915
22902
|
}
|
|
22916
22903
|
return exprBlock;
|
|
22917
22904
|
};
|
|
22918
|
-
|
|
22905
|
+
EditableColumnRendererCP.prototype.changeTypeToSimple = function () {
|
|
22919
22906
|
var query = this.column.getQuery();
|
|
22920
22907
|
query.changeColumnType(this.column, ExprTag.EntityAttribute);
|
|
22921
22908
|
this.fireColumnChanged();
|
|
22922
22909
|
};
|
|
22923
|
-
|
|
22924
|
-
return
|
|
22910
|
+
EditableColumnRendererCP.prototype.getColumnValue = function () {
|
|
22911
|
+
return '';
|
|
22925
22912
|
};
|
|
22926
|
-
|
|
22927
|
-
return this.column.expr.sql;
|
|
22913
|
+
EditableColumnRendererCP.prototype.setColumnValue = function (value) {
|
|
22928
22914
|
};
|
|
22929
|
-
|
|
22915
|
+
EditableColumnRendererCP.prototype.getUIS = function () {
|
|
22930
22916
|
return true;
|
|
22931
22917
|
};
|
|
22932
|
-
|
|
22918
|
+
EditableColumnRendererCP.prototype.changeTypeHandler = function (ev) {
|
|
22933
22919
|
this.changeTypeToSimple();
|
|
22934
22920
|
};
|
|
22935
|
-
|
|
22921
|
+
EditableColumnRendererCP.prototype.processExtraButtonMenuItems = function (action, evt) {
|
|
22936
22922
|
this.changeTypeToSimple();
|
|
22937
22923
|
return true;
|
|
22938
22924
|
};
|
|
22939
|
-
|
|
22925
|
+
EditableColumnRendererCP.prototype.createFunctionMenu = function () {
|
|
22940
22926
|
// Nothing TO DO
|
|
22941
22927
|
};
|
|
22942
|
-
|
|
22928
|
+
EditableColumnRendererCP.prototype.getExtraButtonMenuItems = function () {
|
|
22943
22929
|
return [{
|
|
22944
22930
|
id: '__group',
|
|
22945
22931
|
text: public_api.i18n.getText('ColTypeGroup'),
|
|
@@ -22949,7 +22935,7 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22949
22935
|
}]
|
|
22950
22936
|
}];
|
|
22951
22937
|
};
|
|
22952
|
-
|
|
22938
|
+
EditableColumnRendererCP.prototype.createDataTypeMenu = function () {
|
|
22953
22939
|
var items = [];
|
|
22954
22940
|
for (var typeItem in public_api.DataType) {
|
|
22955
22941
|
if (!isNaN(Number(typeItem))) {
|
|
@@ -22972,10 +22958,74 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
22972
22958
|
};
|
|
22973
22959
|
this.dataTypeMenu = new PopupMenu(menuOptions);
|
|
22974
22960
|
};
|
|
22961
|
+
return EditableColumnRendererCP;
|
|
22962
|
+
}(AttrColumnRendererCP));
|
|
22963
|
+
var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
22964
|
+
editable_column_renderer_cp_extends(CustomSqlColumnRendererCP, _super);
|
|
22965
|
+
function CustomSqlColumnRendererCP() {
|
|
22966
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22967
|
+
}
|
|
22968
|
+
Object.defineProperty(CustomSqlColumnRendererCP.prototype, "columnEnabled", {
|
|
22969
|
+
get: function () {
|
|
22970
|
+
return this.panel.areCustomExpressionsAllowed() ? this.column.enabled : false;
|
|
22971
|
+
},
|
|
22972
|
+
set: function (value) {
|
|
22973
|
+
if (this.panel.areCustomExpressionsAllowed()) {
|
|
22974
|
+
this.column.enabled = value;
|
|
22975
|
+
}
|
|
22976
|
+
else {
|
|
22977
|
+
this.column.enabled = false;
|
|
22978
|
+
}
|
|
22979
|
+
},
|
|
22980
|
+
enumerable: false,
|
|
22981
|
+
configurable: true
|
|
22982
|
+
});
|
|
22983
|
+
CustomSqlColumnRendererCP.prototype.renderColumnTypeButton = function () {
|
|
22984
|
+
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
22985
|
+
if (button) {
|
|
22986
|
+
button.firstElementChild.classList.add('aggregated');
|
|
22987
|
+
button.firstElementChild.setAttribute('title', public_api.i18n.getText('ButtonToSimple'));
|
|
22988
|
+
}
|
|
22989
|
+
return button;
|
|
22990
|
+
};
|
|
22991
|
+
CustomSqlColumnRendererCP.prototype.getColumnValue = function () {
|
|
22992
|
+
return this.column.expr.sql;
|
|
22993
|
+
};
|
|
22994
|
+
CustomSqlColumnRendererCP.prototype.setColumnValue = function (value) {
|
|
22995
|
+
this.column.expr.sql = value;
|
|
22996
|
+
};
|
|
22997
|
+
CustomSqlColumnRendererCP.prototype.getDefaultValue = function () {
|
|
22998
|
+
return this.column.expr.sql;
|
|
22999
|
+
};
|
|
22975
23000
|
return CustomSqlColumnRendererCP;
|
|
22976
|
-
}(
|
|
23001
|
+
}(EditableColumnRendererCP));
|
|
23002
|
+
|
|
23003
|
+
var ConstColumnRendererCP = /** @class */ (function (_super) {
|
|
23004
|
+
editable_column_renderer_cp_extends(ConstColumnRendererCP, _super);
|
|
23005
|
+
function ConstColumnRendererCP() {
|
|
23006
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
23007
|
+
}
|
|
23008
|
+
ConstColumnRendererCP.prototype.renderColumnTypeButton = function () {
|
|
23009
|
+
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
23010
|
+
if (button) {
|
|
23011
|
+
button.firstElementChild.classList.add('aggregated');
|
|
23012
|
+
button.firstElementChild.setAttribute('title', public_api.i18n.getText('ButtonToSimple'));
|
|
23013
|
+
}
|
|
23014
|
+
return button;
|
|
23015
|
+
};
|
|
23016
|
+
ConstColumnRendererCP.prototype.getColumnValue = function () {
|
|
23017
|
+
return this.column.expr.value;
|
|
23018
|
+
};
|
|
23019
|
+
ConstColumnRendererCP.prototype.setColumnValue = function (value) {
|
|
23020
|
+
this.column.expr.setValue(value);
|
|
23021
|
+
};
|
|
23022
|
+
ConstColumnRendererCP.prototype.getDefaultValue = function () {
|
|
23023
|
+
return this.column.expr.value;
|
|
23024
|
+
};
|
|
23025
|
+
return ConstColumnRendererCP;
|
|
23026
|
+
}(EditableColumnRendererCP));
|
|
22977
23027
|
|
|
22978
|
-
//# sourceMappingURL=
|
|
23028
|
+
//# sourceMappingURL=editable_column_renderer_cp.js.map
|
|
22979
23029
|
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/columns_panel.js
|
|
22980
23030
|
var columns_panel_extends = (undefined && undefined.__extends) || (function () {
|
|
22981
23031
|
var extendStatics = function (d, b) {
|
|
@@ -23222,7 +23272,15 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
23222
23272
|
var index = query.getColumns().indexOf(column);
|
|
23223
23273
|
var newEl = _this.addColumnElement(column, index);
|
|
23224
23274
|
if (isFocusInside) {
|
|
23225
|
-
newEl.querySelector(
|
|
23275
|
+
var focusElem = newEl.querySelector('a');
|
|
23276
|
+
if (focusElem) {
|
|
23277
|
+
try {
|
|
23278
|
+
focusElem.focus();
|
|
23279
|
+
}
|
|
23280
|
+
catch (_a) {
|
|
23281
|
+
//do nothing
|
|
23282
|
+
}
|
|
23283
|
+
}
|
|
23226
23284
|
}
|
|
23227
23285
|
};
|
|
23228
23286
|
if (Array.isArray(columns)) {
|
|
@@ -23322,7 +23380,13 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
23322
23380
|
};
|
|
23323
23381
|
ColumnsPanel.prototype.setOptions = function (options) {
|
|
23324
23382
|
public_api.utils.assignDeep(this.options, options);
|
|
23325
|
-
this.
|
|
23383
|
+
this.context.options.allowCustomExpressions = options.allowCustomExpressions;
|
|
23384
|
+
if (options.attrElementFormat) {
|
|
23385
|
+
this.context.options.attributeFormat = options.attrElementFormat;
|
|
23386
|
+
}
|
|
23387
|
+
if (options.titleElementFormat) {
|
|
23388
|
+
this.context.options.columnTitleFormat = options.titleElementFormat;
|
|
23389
|
+
}
|
|
23326
23390
|
if (browser_utils/* browserUtils.isMobileMode */.z.isMobileMode()) {
|
|
23327
23391
|
this.options.buttons = ["menu"];
|
|
23328
23392
|
this.options.showHeader = false;
|
|
@@ -23411,66 +23475,36 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
23411
23475
|
.data("show-buttons", "");
|
|
23412
23476
|
}
|
|
23413
23477
|
};
|
|
23414
|
-
ColumnsPanel.prototype.addNewColumn = function (
|
|
23415
|
-
var _this = this;
|
|
23478
|
+
ColumnsPanel.prototype.addNewColumn = function (attrs, index) {
|
|
23416
23479
|
var model = this.getContext().getModel();
|
|
23417
23480
|
var query = this.getQuery();
|
|
23418
|
-
|
|
23419
|
-
var
|
|
23420
|
-
|
|
23421
|
-
|
|
23422
|
-
|
|
23423
|
-
|
|
23424
|
-
|
|
23425
|
-
|
|
23426
|
-
attribute = model.getAttributeById(attrid);
|
|
23427
|
-
if (!attribute || !attribute.useInResult) {
|
|
23428
|
-
return null;
|
|
23429
|
-
}
|
|
23430
|
-
}
|
|
23431
|
-
else
|
|
23432
|
-
return null;
|
|
23433
|
-
}
|
|
23434
|
-
var column = query.createColumn();
|
|
23435
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
23436
|
-
column.sorting = SortDirection.None;
|
|
23437
|
-
column.sortIndex = -1;
|
|
23438
|
-
column.expr.tag = ExprTag.EntityAttribute;
|
|
23439
|
-
column.expr.kind = DataKind.Attribute;
|
|
23440
|
-
column.expr.dataType = attribute.dataType;
|
|
23441
|
-
column.expr.setValue(attrid, true);
|
|
23442
|
-
column.params.concat(attribute.params);
|
|
23443
|
-
return column;
|
|
23444
|
-
};
|
|
23445
|
-
var colToAdd, col;
|
|
23446
|
-
if (Array.isArray(attrId)) {
|
|
23447
|
-
colToAdd = [];
|
|
23448
|
-
for (var i = 0; i < attrId.length; i++) {
|
|
23449
|
-
col = getColumnByAttrId(attrId[i]);
|
|
23481
|
+
if (Array.isArray(attrs)) {
|
|
23482
|
+
var col = null;
|
|
23483
|
+
var cols = [];
|
|
23484
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
23485
|
+
col = query.addColumn({
|
|
23486
|
+
attributeId: attrs[i],
|
|
23487
|
+
index: index
|
|
23488
|
+
}, true);
|
|
23450
23489
|
if (col) {
|
|
23451
|
-
|
|
23490
|
+
cols.push(col);
|
|
23452
23491
|
}
|
|
23453
23492
|
}
|
|
23493
|
+
query.fireChangedEvent({
|
|
23494
|
+
part: QueryChangePart.Columns,
|
|
23495
|
+
action: QueryChangeAction.Add,
|
|
23496
|
+
changee: cols,
|
|
23497
|
+
source: this
|
|
23498
|
+
});
|
|
23499
|
+
return cols;
|
|
23454
23500
|
}
|
|
23455
|
-
else
|
|
23456
|
-
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
|
|
23460
|
-
|
|
23461
|
-
var query = this.getQuery();
|
|
23462
|
-
if (!query) {
|
|
23463
|
-
return;
|
|
23464
|
-
}
|
|
23465
|
-
if (Array.isArray(column))
|
|
23466
|
-
column = this.checkColumnsArray(column);
|
|
23467
|
-
else
|
|
23468
|
-
column = this.checkColumn(column);
|
|
23469
|
-
if (!column || (Array.isArray(column) && column.length == 0)) {
|
|
23470
|
-
return;
|
|
23501
|
+
else {
|
|
23502
|
+
var col = query.addColumn({
|
|
23503
|
+
attributeId: attrs,
|
|
23504
|
+
index: index
|
|
23505
|
+
});
|
|
23506
|
+
return col;
|
|
23471
23507
|
}
|
|
23472
|
-
query.addColumnObj(column, index, self);
|
|
23473
|
-
query.fireColumnsChangedEvent(QueryChangeAction.Add, column);
|
|
23474
23508
|
};
|
|
23475
23509
|
//adds one column to the panel on the specified position
|
|
23476
23510
|
ColumnsPanel.prototype.addColumnElement = function (column, index) {
|
|
@@ -23520,23 +23554,19 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
23520
23554
|
}
|
|
23521
23555
|
return col;
|
|
23522
23556
|
};
|
|
23523
|
-
ColumnsPanel.prototype.getDefaultColumnCaption = function (attr) {
|
|
23524
|
-
var format = this.options.titleElementFormat || this.options.attrElementFormat;
|
|
23525
|
-
var model = this.getContext().getModel();
|
|
23526
|
-
return model.getAttributeText(attr, format);
|
|
23527
|
-
};
|
|
23528
23557
|
ColumnsPanel.prototype.getColumnsBlock = function () {
|
|
23529
23558
|
return this.columnsBlock;
|
|
23530
23559
|
};
|
|
23531
23560
|
ColumnsPanel.prototype.getColumnRenderer = function (column, slot) {
|
|
23532
23561
|
switch (column.expr.tag) {
|
|
23562
|
+
case ExprTag.Constant:
|
|
23563
|
+
return new ConstColumnRendererCP(this, column, slot);
|
|
23533
23564
|
case ExprTag.AggregateFunction:
|
|
23534
23565
|
return new AggrFuncColumnRendererCP(this, column, slot);
|
|
23535
23566
|
case ExprTag.CustomSql:
|
|
23536
23567
|
return new CustomSqlColumnRendererCP(this, column, slot);
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
return new SimpleColumnRendererCP(this, column, slot);
|
|
23568
|
+
default:
|
|
23569
|
+
return new AttrColumnRendererCP(this, column, slot);
|
|
23540
23570
|
}
|
|
23541
23571
|
return null;
|
|
23542
23572
|
};
|
|
@@ -23745,7 +23775,6 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
23745
23775
|
});
|
|
23746
23776
|
ColumnRendererCB.prototype.render = function () {
|
|
23747
23777
|
var _this = this;
|
|
23748
|
-
this.baseAttr = this.getAttribute();
|
|
23749
23778
|
var builder = (0,lib_public_api.domel)('div');
|
|
23750
23779
|
builder.data('id', this.column.id);
|
|
23751
23780
|
if (this.element) {
|
|
@@ -23802,10 +23831,6 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
23802
23831
|
ColumnRendererCB.prototype.refresh = function () {
|
|
23803
23832
|
this.render();
|
|
23804
23833
|
};
|
|
23805
|
-
ColumnRendererCB.prototype.getAttribute = function () {
|
|
23806
|
-
var model = this.bar.getContext().getModel();
|
|
23807
|
-
return model.getAttributeByIdSafe(this.column.expr.value);
|
|
23808
|
-
};
|
|
23809
23834
|
ColumnRendererCB.prototype.isEditable = function () {
|
|
23810
23835
|
return this.column.enabled && !this.column.isReadOnly();
|
|
23811
23836
|
};
|
|
@@ -23820,19 +23845,13 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
23820
23845
|
};
|
|
23821
23846
|
ColumnRendererCB.prototype.renderCaptionBlock = function () {
|
|
23822
23847
|
var _this = this;
|
|
23823
|
-
|
|
23824
|
-
this.column.caption = this.getDefaultCaption();
|
|
23825
|
-
}
|
|
23826
|
-
var model = this.column.getModel();
|
|
23827
|
-
var caption = this.baseAttr !== model.nullAttribute
|
|
23828
|
-
? this.column.caption
|
|
23829
|
-
: model.getAttributeText(model.nullAttribute, '{attr}');
|
|
23848
|
+
var caption = this.column.caption;
|
|
23830
23849
|
if (!this.isEditable()) {
|
|
23831
23850
|
return (0,lib_public_api.domel)('div')
|
|
23832
23851
|
.addClass("".concat(this.cssPrefix, "-colelement"), "".concat(this.cssPrefix, "-captionelement"))
|
|
23833
23852
|
.addClass(browser_utils/* browserUtils.getMobileCssClass */.z.getMobileCssClass())
|
|
23834
23853
|
.addChild('div', function (b) { return b
|
|
23835
|
-
.title(
|
|
23854
|
+
.title(caption)
|
|
23836
23855
|
.text(caption)
|
|
23837
23856
|
.attr('tabIndex', '0'); })
|
|
23838
23857
|
.toDOM();
|
|
@@ -24005,7 +24024,7 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
24005
24024
|
ColumnRendererCB.prototype.buttonDeleteClickHandler = function (ev) {
|
|
24006
24025
|
ev.stopPropagation();
|
|
24007
24026
|
var query = this.bar.getQuery();
|
|
24008
|
-
query.removeColumn(this.column
|
|
24027
|
+
query.removeColumn(this.column);
|
|
24009
24028
|
query.fireColumnsChangedEvent(QueryChangeAction.Delete, this.column);
|
|
24010
24029
|
return false;
|
|
24011
24030
|
};
|
|
@@ -24024,14 +24043,6 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
24024
24043
|
} })
|
|
24025
24044
|
.toDOM();
|
|
24026
24045
|
};
|
|
24027
|
-
ColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
24028
|
-
return this.getDefaultTitleText(this.baseAttr);
|
|
24029
|
-
};
|
|
24030
|
-
ColumnRendererCB.prototype.getDefaultTitleText = function (attr) {
|
|
24031
|
-
var format = this.bar.options.titleElementFormat || this.bar.options.attrElementFormat;
|
|
24032
|
-
var model = this.bar.getContext().getModel();
|
|
24033
|
-
return model.getAttributeText(attr, format);
|
|
24034
|
-
};
|
|
24035
24046
|
ColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
24036
24047
|
var result = "";
|
|
24037
24048
|
result += this.column.enabled ? '' : " ".concat(this.cssPrefix, "-disabled");
|
|
@@ -24270,8 +24281,8 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
24270
24281
|
}());
|
|
24271
24282
|
|
|
24272
24283
|
//# sourceMappingURL=column_renderer_cb.js.map
|
|
24273
|
-
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnsbar/
|
|
24274
|
-
var
|
|
24284
|
+
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnsbar/attr_column_renderer_cb.js
|
|
24285
|
+
var attr_column_renderer_cb_extends = (undefined && undefined.__extends) || (function () {
|
|
24275
24286
|
var extendStatics = function (d, b) {
|
|
24276
24287
|
extendStatics = Object.setPrototypeOf ||
|
|
24277
24288
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -24289,23 +24300,29 @@ var columnsbar_simple_column_renderer_extends = (undefined && undefined.__extend
|
|
|
24289
24300
|
|
|
24290
24301
|
|
|
24291
24302
|
|
|
24292
|
-
var
|
|
24293
|
-
|
|
24294
|
-
function
|
|
24303
|
+
var AttrColumnRendererCB = /** @class */ (function (_super) {
|
|
24304
|
+
attr_column_renderer_cb_extends(AttrColumnRendererCB, _super);
|
|
24305
|
+
function AttrColumnRendererCB() {
|
|
24295
24306
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
24296
24307
|
}
|
|
24297
|
-
|
|
24308
|
+
AttrColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
24298
24309
|
return "".concat(_super.prototype.getClassesToAdd.call(this), " ").concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr");
|
|
24299
24310
|
};
|
|
24300
|
-
|
|
24311
|
+
AttrColumnRendererCB.prototype.baseExpressionItemSelectedCallback = function (data, item) {
|
|
24301
24312
|
var attrid = data.id;
|
|
24302
|
-
|
|
24303
|
-
|
|
24304
|
-
this.
|
|
24305
|
-
this.
|
|
24313
|
+
var context = this.bar.getContext();
|
|
24314
|
+
var attr = context.getModel().getAttributeById(attrid);
|
|
24315
|
+
this.updateBaseAttr(attr);
|
|
24316
|
+
this.column.caption = context.getDefaultColumnCaption(this.column);
|
|
24306
24317
|
this.fireColumnChanged();
|
|
24318
|
+
return false;
|
|
24319
|
+
};
|
|
24320
|
+
AttrColumnRendererCB.prototype.updateBaseAttr = function (attr) {
|
|
24321
|
+
this.column.expr.setValue(attr.id, true);
|
|
24322
|
+
this.column.expr.baseAttrId = attr.id;
|
|
24323
|
+
this.column.expr.dataType = attr.dataType;
|
|
24307
24324
|
};
|
|
24308
|
-
|
|
24325
|
+
AttrColumnRendererCB.prototype.getUIS = function () {
|
|
24309
24326
|
var arg = this.column.expr.args[0];
|
|
24310
24327
|
if (arg) {
|
|
24311
24328
|
var model = this.bar.getContext().getModel();
|
|
@@ -24315,17 +24332,17 @@ var SimpleColumnRendererCB = /** @class */ (function (_super) {
|
|
|
24315
24332
|
return true;
|
|
24316
24333
|
}
|
|
24317
24334
|
};
|
|
24318
|
-
|
|
24335
|
+
AttrColumnRendererCB.prototype.changeTypeToCustomSql = function () {
|
|
24319
24336
|
var query = this.column.getQuery();
|
|
24320
24337
|
query.changeColumnType(this.column, ExprTag.CustomSql);
|
|
24321
24338
|
this.fireColumnChanged();
|
|
24322
24339
|
};
|
|
24323
|
-
|
|
24340
|
+
AttrColumnRendererCB.prototype.changeTypeToAggr = function (funcId) {
|
|
24324
24341
|
var query = this.column.getQuery();
|
|
24325
24342
|
query.changeColumnType(this.column, ExprTag.AggregateFunction, { funcId: funcId });
|
|
24326
24343
|
this.fireColumnChanged();
|
|
24327
24344
|
};
|
|
24328
|
-
|
|
24345
|
+
AttrColumnRendererCB.prototype.changeColumnTypeHandler = function (ev) {
|
|
24329
24346
|
var _this = this;
|
|
24330
24347
|
this.functionMenu.showMenu({
|
|
24331
24348
|
anchor: ev.target,
|
|
@@ -24347,12 +24364,12 @@ var SimpleColumnRendererCB = /** @class */ (function (_super) {
|
|
|
24347
24364
|
}
|
|
24348
24365
|
});
|
|
24349
24366
|
};
|
|
24350
|
-
return
|
|
24367
|
+
return AttrColumnRendererCB;
|
|
24351
24368
|
}(ColumnRendererCB));
|
|
24352
24369
|
|
|
24353
|
-
//# sourceMappingURL=
|
|
24354
|
-
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnsbar/
|
|
24355
|
-
var
|
|
24370
|
+
//# sourceMappingURL=attr_column_renderer_cb.js.map
|
|
24371
|
+
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnsbar/aggrfunc_column_renderer_cb.js
|
|
24372
|
+
var aggrfunc_column_renderer_cb_extends = (undefined && undefined.__extends) || (function () {
|
|
24356
24373
|
var extendStatics = function (d, b) {
|
|
24357
24374
|
extendStatics = Object.setPrototypeOf ||
|
|
24358
24375
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -24371,23 +24388,13 @@ var columnsbar_aggrfunc_column_renderer_extends = (undefined && undefined.__exte
|
|
|
24371
24388
|
|
|
24372
24389
|
|
|
24373
24390
|
var AggrFuncColumnRendererCB = /** @class */ (function (_super) {
|
|
24374
|
-
|
|
24391
|
+
aggrfunc_column_renderer_cb_extends(AggrFuncColumnRendererCB, _super);
|
|
24375
24392
|
function AggrFuncColumnRendererCB() {
|
|
24376
24393
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
24377
24394
|
}
|
|
24378
24395
|
AggrFuncColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
24379
24396
|
return "".concat(_super.prototype.getClassesToAdd.call(this), " ").concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-aggr");
|
|
24380
24397
|
};
|
|
24381
|
-
AggrFuncColumnRendererCB.prototype.getAttribute = function () {
|
|
24382
|
-
return this.bar
|
|
24383
|
-
.getContext()
|
|
24384
|
-
.getModel()
|
|
24385
|
-
.getAttributeByIdSafe(this.column.expr.args[0].value);
|
|
24386
|
-
};
|
|
24387
|
-
AggrFuncColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
24388
|
-
return this.getDefaultTitleText(this.baseAttr) + ' '
|
|
24389
|
-
+ this.bar.getContext().getModel().getAggrFunctionCaption(this.column.expr.func);
|
|
24390
|
-
};
|
|
24391
24398
|
AggrFuncColumnRendererCB.prototype.renderColumnTypeButton = function () {
|
|
24392
24399
|
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
24393
24400
|
if (button) {
|
|
@@ -24396,12 +24403,9 @@ var AggrFuncColumnRendererCB = /** @class */ (function (_super) {
|
|
|
24396
24403
|
}
|
|
24397
24404
|
return button;
|
|
24398
24405
|
};
|
|
24399
|
-
AggrFuncColumnRendererCB.prototype.
|
|
24400
|
-
|
|
24401
|
-
|
|
24402
|
-
this.column.expr.args[0].setValue(attrid, true);
|
|
24403
|
-
this.column.caption = '';
|
|
24404
|
-
this.fireColumnChanged();
|
|
24406
|
+
AggrFuncColumnRendererCB.prototype.updateBaseAttr = function (attr) {
|
|
24407
|
+
this.column.expr.args[0].setValue(attr.id, true);
|
|
24408
|
+
this.column.expr.baseAttrId = attr.id;
|
|
24405
24409
|
};
|
|
24406
24410
|
AggrFuncColumnRendererCB.prototype.changeTypeToSimple = function () {
|
|
24407
24411
|
var query = this.column.getQuery();
|
|
@@ -24412,9 +24416,112 @@ var AggrFuncColumnRendererCB = /** @class */ (function (_super) {
|
|
|
24412
24416
|
this.changeTypeToSimple();
|
|
24413
24417
|
};
|
|
24414
24418
|
return AggrFuncColumnRendererCB;
|
|
24415
|
-
}(
|
|
24419
|
+
}(AttrColumnRendererCB));
|
|
24420
|
+
|
|
24421
|
+
//# sourceMappingURL=aggrfunc_column_renderer_cb.js.map
|
|
24422
|
+
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/columnsbar/editable_column_renderer_cb.js
|
|
24423
|
+
var editable_column_renderer_cb_extends = (undefined && undefined.__extends) || (function () {
|
|
24424
|
+
var extendStatics = function (d, b) {
|
|
24425
|
+
extendStatics = Object.setPrototypeOf ||
|
|
24426
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24427
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
24428
|
+
return extendStatics(d, b);
|
|
24429
|
+
};
|
|
24430
|
+
return function (d, b) {
|
|
24431
|
+
if (typeof b !== "function" && b !== null)
|
|
24432
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
24433
|
+
extendStatics(d, b);
|
|
24434
|
+
function __() { this.constructor = d; }
|
|
24435
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
24436
|
+
};
|
|
24437
|
+
})();
|
|
24438
|
+
|
|
24439
|
+
|
|
24440
|
+
var EditableColumnRendererCB = /** @class */ (function (_super) {
|
|
24441
|
+
editable_column_renderer_cb_extends(EditableColumnRendererCB, _super);
|
|
24442
|
+
function EditableColumnRendererCB() {
|
|
24443
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24444
|
+
}
|
|
24445
|
+
EditableColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
24446
|
+
return "".concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr") + _super.prototype.getClassesToAdd.call(this);
|
|
24447
|
+
};
|
|
24448
|
+
EditableColumnRendererCB.prototype.renderColumnTypeButton = function () {
|
|
24449
|
+
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
24450
|
+
if (button) {
|
|
24451
|
+
button.classList.add('aggregated');
|
|
24452
|
+
button.title = public_api.i18n.getText('ButtonToSimple');
|
|
24453
|
+
}
|
|
24454
|
+
return button;
|
|
24455
|
+
};
|
|
24456
|
+
EditableColumnRendererCB.prototype.changeTypeToSimple = function () {
|
|
24457
|
+
var query = this.column.getQuery();
|
|
24458
|
+
query.changeColumnType(this.column, ExprTag.EntityAttribute);
|
|
24459
|
+
this.fireColumnChanged();
|
|
24460
|
+
};
|
|
24461
|
+
EditableColumnRendererCB.prototype.getColumnValue = function () {
|
|
24462
|
+
return '';
|
|
24463
|
+
};
|
|
24464
|
+
EditableColumnRendererCB.prototype.setColumnValue = function (value) {
|
|
24465
|
+
};
|
|
24466
|
+
EditableColumnRendererCB.prototype.getUIS = function () {
|
|
24467
|
+
return true;
|
|
24468
|
+
};
|
|
24469
|
+
EditableColumnRendererCB.prototype.changeColumnTypeHandler = function (ev) {
|
|
24470
|
+
this.changeTypeToSimple();
|
|
24471
|
+
};
|
|
24472
|
+
return EditableColumnRendererCB;
|
|
24473
|
+
}(ColumnRendererCB));
|
|
24416
24474
|
|
|
24417
|
-
|
|
24475
|
+
var CustomSqlColumnRendererCB = /** @class */ (function (_super) {
|
|
24476
|
+
editable_column_renderer_cb_extends(CustomSqlColumnRendererCB, _super);
|
|
24477
|
+
function CustomSqlColumnRendererCB() {
|
|
24478
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24479
|
+
}
|
|
24480
|
+
Object.defineProperty(CustomSqlColumnRendererCB.prototype, "columnEnabled", {
|
|
24481
|
+
get: function () {
|
|
24482
|
+
return this.bar.areCustomExpressionsAllowed() ? this.column.enabled : false;
|
|
24483
|
+
},
|
|
24484
|
+
set: function (value) {
|
|
24485
|
+
if (this.bar.areCustomExpressionsAllowed()) {
|
|
24486
|
+
this.column.enabled = value;
|
|
24487
|
+
}
|
|
24488
|
+
else {
|
|
24489
|
+
this.column.enabled = false;
|
|
24490
|
+
}
|
|
24491
|
+
},
|
|
24492
|
+
enumerable: false,
|
|
24493
|
+
configurable: true
|
|
24494
|
+
});
|
|
24495
|
+
CustomSqlColumnRendererCB.prototype.getColumnValue = function () {
|
|
24496
|
+
return this.column.expr.sql;
|
|
24497
|
+
};
|
|
24498
|
+
CustomSqlColumnRendererCB.prototype.setColumnValue = function (value) {
|
|
24499
|
+
this.column.expr.sql = value;
|
|
24500
|
+
};
|
|
24501
|
+
CustomSqlColumnRendererCB.prototype.getDefaultValue = function () {
|
|
24502
|
+
return this.column.expr.sql;
|
|
24503
|
+
};
|
|
24504
|
+
return CustomSqlColumnRendererCB;
|
|
24505
|
+
}(EditableColumnRendererCB));
|
|
24506
|
+
|
|
24507
|
+
var ConstColumnRendererCB = /** @class */ (function (_super) {
|
|
24508
|
+
editable_column_renderer_cb_extends(ConstColumnRendererCB, _super);
|
|
24509
|
+
function ConstColumnRendererCB() {
|
|
24510
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24511
|
+
}
|
|
24512
|
+
ConstColumnRendererCB.prototype.getColumnValue = function () {
|
|
24513
|
+
return this.column.expr.value;
|
|
24514
|
+
};
|
|
24515
|
+
ConstColumnRendererCB.prototype.setColumnValue = function (value) {
|
|
24516
|
+
this.column.expr.setValue(value);
|
|
24517
|
+
};
|
|
24518
|
+
ConstColumnRendererCB.prototype.getDefaultValue = function () {
|
|
24519
|
+
return this.column.expr.value;
|
|
24520
|
+
};
|
|
24521
|
+
return ConstColumnRendererCB;
|
|
24522
|
+
}(EditableColumnRendererCB));
|
|
24523
|
+
|
|
24524
|
+
//# sourceMappingURL=editable_column_renderer_cb.js.map
|
|
24418
24525
|
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/columns_bar.js
|
|
24419
24526
|
var columns_bar_extends = (undefined && undefined.__extends) || (function () {
|
|
24420
24527
|
var extendStatics = function (d, b) {
|
|
@@ -24440,6 +24547,7 @@ var columns_bar_extends = (undefined && undefined.__extends) || (function () {
|
|
|
24440
24547
|
|
|
24441
24548
|
|
|
24442
24549
|
|
|
24550
|
+
|
|
24443
24551
|
var ColumnsBar = /** @class */ (function (_super) {
|
|
24444
24552
|
columns_bar_extends(ColumnsBar, _super);
|
|
24445
24553
|
function ColumnsBar(slot, customQuery) {
|
|
@@ -24454,8 +24562,6 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
24454
24562
|
allowDuplicates: true,
|
|
24455
24563
|
allowCustomExpressions: false,
|
|
24456
24564
|
allowSorting: true,
|
|
24457
|
-
attrElementFormat: '{entity} {attr}',
|
|
24458
|
-
titleElementFormat: null,
|
|
24459
24565
|
alwaysShowButtons: false,
|
|
24460
24566
|
accentActiveColumn: true,
|
|
24461
24567
|
allowDragDrop: true,
|
|
@@ -24508,6 +24614,12 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
24508
24614
|
var _this = this;
|
|
24509
24615
|
_super.prototype.init.call(this, context, options);
|
|
24510
24616
|
this.setOptions(options);
|
|
24617
|
+
if (options.attrElementFormat) {
|
|
24618
|
+
this.context.options.attributeFormat = options.attrElementFormat;
|
|
24619
|
+
}
|
|
24620
|
+
if (options.titleElementFormat) {
|
|
24621
|
+
this.context.options.columnTitleFormat = options.titleElementFormat;
|
|
24622
|
+
}
|
|
24511
24623
|
this.detachQueryObserver();
|
|
24512
24624
|
this.attachQueryObserver();
|
|
24513
24625
|
lib_public_api.eqDragManager.removeDropContainer(this.slot);
|
|
@@ -24638,6 +24750,7 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
24638
24750
|
};
|
|
24639
24751
|
ColumnsBar.prototype.setOptions = function (options) {
|
|
24640
24752
|
this.options = public_api.utils.assignDeep(this.options, options);
|
|
24753
|
+
this.getContext().options.allowCustomExpressions = options.allowCustomExpressions;
|
|
24641
24754
|
};
|
|
24642
24755
|
ColumnsBar.prototype.showLandingSlot = function (pageX, pageY) {
|
|
24643
24756
|
var elements = this.columnsBlock.querySelectorAll("[class*=".concat(this.cssPrefix, "-row]"));
|
|
@@ -24889,64 +25002,41 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
24889
25002
|
};
|
|
24890
25003
|
ColumnsBar.prototype.getColumnRenderer = function (column, slot) {
|
|
24891
25004
|
switch (column.expr.tag) {
|
|
25005
|
+
case ExprTag.Constant:
|
|
25006
|
+
return new ConstColumnRendererCB(this, column, slot);
|
|
24892
25007
|
case ExprTag.AggregateFunction:
|
|
24893
25008
|
return new AggrFuncColumnRendererCB(this, column, slot);
|
|
24894
25009
|
case ExprTag.CustomSql:
|
|
24895
|
-
|
|
24896
|
-
|
|
24897
|
-
|
|
24898
|
-
return new SimpleColumnRendererCB(this, column, slot);
|
|
25010
|
+
return new CustomSqlColumnRendererCB(this, column, slot);
|
|
25011
|
+
default:
|
|
25012
|
+
return new AttrColumnRendererCB(this, column, slot);
|
|
24899
25013
|
}
|
|
24900
25014
|
return null;
|
|
24901
25015
|
};
|
|
24902
|
-
ColumnsBar.prototype.addNewColumn = function (
|
|
24903
|
-
var _this = this;
|
|
25016
|
+
ColumnsBar.prototype.addNewColumn = function (attrs, index) {
|
|
24904
25017
|
var model = this.getContext().getModel();
|
|
24905
25018
|
var query = this.getQuery();
|
|
24906
|
-
|
|
24907
|
-
var
|
|
24908
|
-
|
|
24909
|
-
|
|
24910
|
-
|
|
24911
|
-
|
|
24912
|
-
|
|
24913
|
-
|
|
24914
|
-
attribute = model.getAttributeById(attrid);
|
|
24915
|
-
if (!attribute || !attribute.useInResult) {
|
|
24916
|
-
return null;
|
|
24917
|
-
}
|
|
24918
|
-
}
|
|
24919
|
-
else
|
|
24920
|
-
return null;
|
|
24921
|
-
}
|
|
24922
|
-
var column = query.createColumn();
|
|
24923
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
24924
|
-
column.sorting = SortDirection.None;
|
|
24925
|
-
column.sortIndex = -1;
|
|
24926
|
-
column.expr.tag = ExprTag.EntityAttribute;
|
|
24927
|
-
column.expr.kind = DataKind.Attribute;
|
|
24928
|
-
column.expr.dataType = attribute.dataType;
|
|
24929
|
-
column.expr.setValue(attrid, true);
|
|
24930
|
-
column.params.concat(attribute.params);
|
|
24931
|
-
return column;
|
|
24932
|
-
};
|
|
24933
|
-
if (!this.getQuery()) {
|
|
24934
|
-
return;
|
|
24935
|
-
}
|
|
24936
|
-
var colToAdd, col;
|
|
24937
|
-
if (Array.isArray(attrId)) {
|
|
24938
|
-
colToAdd = [];
|
|
24939
|
-
for (var i = 0; i < attrId.length; i++) {
|
|
24940
|
-
col = getColumnByAttrId(attrId[i]);
|
|
25019
|
+
if (Array.isArray(attrs)) {
|
|
25020
|
+
var col = null;
|
|
25021
|
+
var cols = [];
|
|
25022
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
25023
|
+
col = query.addColumn({
|
|
25024
|
+
attributeId: attrs[i],
|
|
25025
|
+
index: index
|
|
25026
|
+
}, true);
|
|
24941
25027
|
if (col) {
|
|
24942
|
-
|
|
25028
|
+
cols.push(col);
|
|
24943
25029
|
}
|
|
24944
25030
|
}
|
|
25031
|
+
return cols;
|
|
25032
|
+
}
|
|
25033
|
+
else {
|
|
25034
|
+
var col = query.addColumn({
|
|
25035
|
+
attributeId: attrs,
|
|
25036
|
+
index: index
|
|
25037
|
+
});
|
|
25038
|
+
return col;
|
|
24945
25039
|
}
|
|
24946
|
-
else
|
|
24947
|
-
colToAdd = getColumnByAttrId(attrId);
|
|
24948
|
-
this.addColumn(colToAdd, index);
|
|
24949
|
-
return colToAdd;
|
|
24950
25040
|
};
|
|
24951
25041
|
ColumnsBar.prototype.toggleColumnPicked = function (column) {
|
|
24952
25042
|
var el;
|
|
@@ -24971,25 +25061,6 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
24971
25061
|
.data("show-buttons", "");
|
|
24972
25062
|
}
|
|
24973
25063
|
};
|
|
24974
|
-
ColumnsBar.prototype.addColumn = function (column, index) {
|
|
24975
|
-
var query = this.getQuery();
|
|
24976
|
-
if (!query) {
|
|
24977
|
-
return;
|
|
24978
|
-
}
|
|
24979
|
-
if (Array.isArray(column))
|
|
24980
|
-
column = this.checkColumnsArray(column);
|
|
24981
|
-
else
|
|
24982
|
-
column = this.checkColumn(column);
|
|
24983
|
-
if (!column || (Array.isArray(column) && column.length == 0)) {
|
|
24984
|
-
return;
|
|
24985
|
-
}
|
|
24986
|
-
query.addColumnObj(column, index, self);
|
|
24987
|
-
query.fireChangedEvent({
|
|
24988
|
-
part: QueryChangePart.Columns,
|
|
24989
|
-
action: QueryChangeAction.Add,
|
|
24990
|
-
changee: column
|
|
24991
|
-
});
|
|
24992
|
-
};
|
|
24993
25064
|
//adds one column to the bar on the specified position
|
|
24994
25065
|
ColumnsBar.prototype.addColumnElement = function (column, index) {
|
|
24995
25066
|
var rows = this.columnsBlock.querySelectorAll("[class*=".concat(this.cssPrefix, "-row]"));
|
|
@@ -25032,11 +25103,6 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
25032
25103
|
}
|
|
25033
25104
|
return col;
|
|
25034
25105
|
};
|
|
25035
|
-
ColumnsBar.prototype.getDefaultColumnCaption = function (attr) {
|
|
25036
|
-
var format = this.options.titleElementFormat || this.options.attrElementFormat;
|
|
25037
|
-
var model = this.getContext().getModel();
|
|
25038
|
-
return model.getAttributeText(attr, format);
|
|
25039
|
-
};
|
|
25040
25106
|
ColumnsBar.prototype.getColumnsBlock = function () {
|
|
25041
25107
|
return this.columnsBlock;
|
|
25042
25108
|
};
|
|
@@ -25138,13 +25204,13 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
25138
25204
|
};
|
|
25139
25205
|
ColumnsBar.prototype.areCustomExpressionsAllowed = function () {
|
|
25140
25206
|
var query = this.getQuery();
|
|
25141
|
-
return query.isEx() && this.options.allowCustomExpressions;
|
|
25207
|
+
return query.isEx() && this.getContext().options.allowCustomExpressions;
|
|
25142
25208
|
};
|
|
25143
25209
|
ColumnsBar.globalCounter = 0;
|
|
25144
25210
|
return ColumnsBar;
|
|
25145
25211
|
}(Widget));
|
|
25146
25212
|
//# sourceMappingURL=columns_bar.js.map
|
|
25147
|
-
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/sortingbar/
|
|
25213
|
+
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/renderers/sortingbar/column_renderer_sb.js
|
|
25148
25214
|
|
|
25149
25215
|
|
|
25150
25216
|
|
|
@@ -25168,7 +25234,6 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
25168
25234
|
});
|
|
25169
25235
|
ColumnRendererSB.prototype.render = function () {
|
|
25170
25236
|
var _this = this;
|
|
25171
|
-
this.baseAttr = this.getAttribute();
|
|
25172
25237
|
var builder = (0,lib_public_api.domel)('div');
|
|
25173
25238
|
builder.data('id', this.column.id);
|
|
25174
25239
|
if (this.element) {
|
|
@@ -25219,9 +25284,6 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
25219
25284
|
};
|
|
25220
25285
|
ColumnRendererSB.prototype.renderCaptionBlock = function () {
|
|
25221
25286
|
var _this = this;
|
|
25222
|
-
if (!this.column.caption || this.column.caption == '') {
|
|
25223
|
-
this.column.caption = this.getDefaultCaption();
|
|
25224
|
-
}
|
|
25225
25287
|
function getArrow(sd) {
|
|
25226
25288
|
switch (sd) {
|
|
25227
25289
|
case SortDirection.Ascending:
|
|
@@ -25291,7 +25353,7 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
25291
25353
|
if (data.id == 'None' || data.id == "Ascending" || data.id == "Descending") {
|
|
25292
25354
|
var query = _this.bar.getContext().getQuery();
|
|
25293
25355
|
if (_this.column.isJustSorted() && data.id == 'None') {
|
|
25294
|
-
query.removeColumn(_this.column
|
|
25356
|
+
query.removeColumn(_this.column);
|
|
25295
25357
|
query.fireColumnsChangedEvent(QueryChangeAction.Delete, _this.column, true);
|
|
25296
25358
|
}
|
|
25297
25359
|
else {
|
|
@@ -25310,14 +25372,6 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
25310
25372
|
});
|
|
25311
25373
|
return false;
|
|
25312
25374
|
};
|
|
25313
|
-
ColumnRendererSB.prototype.getDefaultCaption = function () {
|
|
25314
|
-
return this.getDefaultTitleText(this.baseAttr);
|
|
25315
|
-
};
|
|
25316
|
-
ColumnRendererSB.prototype.getDefaultTitleText = function (attr) {
|
|
25317
|
-
var format = this.bar.options.titleElementFormat || this.bar.options.attrElementFormat;
|
|
25318
|
-
var model = this.bar.getContext().getModel();
|
|
25319
|
-
return model.getAttributeText(attr, format);
|
|
25320
|
-
};
|
|
25321
25375
|
ColumnRendererSB.prototype.getClassesToAdd = function () {
|
|
25322
25376
|
return "".concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr");
|
|
25323
25377
|
};
|
|
@@ -25329,7 +25383,7 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
25329
25383
|
return ColumnRendererSB;
|
|
25330
25384
|
}());
|
|
25331
25385
|
|
|
25332
|
-
//# sourceMappingURL=
|
|
25386
|
+
//# sourceMappingURL=column_renderer_sb.js.map
|
|
25333
25387
|
;// CONCATENATED MODULE: ../ui/dist/lib/widgets/sorting_bar.js
|
|
25334
25388
|
var sorting_bar_extends = (undefined && undefined.__extends) || (function () {
|
|
25335
25389
|
var extendStatics = function (d, b) {
|
|
@@ -25359,8 +25413,6 @@ var SortingBar = /** @class */ (function (_super) {
|
|
|
25359
25413
|
var _this = _super.call(this, slot) || this;
|
|
25360
25414
|
_this.options = {
|
|
25361
25415
|
showAddRow: true,
|
|
25362
|
-
attrElementFormat: '{entity} {attr}',
|
|
25363
|
-
titleElementFormat: null,
|
|
25364
25416
|
allowDragDrop: true,
|
|
25365
25417
|
menuOptions: {
|
|
25366
25418
|
showSearchBoxAfter: 30,
|
|
@@ -25404,6 +25456,12 @@ var SortingBar = /** @class */ (function (_super) {
|
|
|
25404
25456
|
var _this = this;
|
|
25405
25457
|
_super.prototype.init.call(this, context, options);
|
|
25406
25458
|
this.setOptions(options);
|
|
25459
|
+
if (options.attrElementFormat) {
|
|
25460
|
+
this.context.options.attributeFormat = options.attrElementFormat;
|
|
25461
|
+
}
|
|
25462
|
+
if (options.titleElementFormat) {
|
|
25463
|
+
this.context.options.columnTitleFormat = options.titleElementFormat;
|
|
25464
|
+
}
|
|
25407
25465
|
this.destroyCore();
|
|
25408
25466
|
this.attachQueryObserver();
|
|
25409
25467
|
lib_public_api.eqDragManager.removeDropContainer(this.slot);
|
|
@@ -25556,48 +25614,20 @@ var SortingBar = /** @class */ (function (_super) {
|
|
|
25556
25614
|
});
|
|
25557
25615
|
};
|
|
25558
25616
|
SortingBar.prototype.addNewColumn = function (attrId) {
|
|
25559
|
-
var _this = this;
|
|
25560
25617
|
var model = this.getModel();
|
|
25561
25618
|
var query = this.getQuery();
|
|
25562
|
-
var
|
|
25563
|
-
|
|
25564
|
-
|
|
25565
|
-
|
|
25566
|
-
}
|
|
25567
|
-
if (!attribute.useInSorting) {
|
|
25568
|
-
if (attribute.lookupAttr) {
|
|
25569
|
-
attrid = attribute.lookupAttr;
|
|
25570
|
-
attribute = model.getAttributeById(attrid);
|
|
25571
|
-
if (!attribute || !attribute.useInSorting) {
|
|
25572
|
-
return null;
|
|
25573
|
-
}
|
|
25574
|
-
}
|
|
25575
|
-
else
|
|
25576
|
-
return null;
|
|
25577
|
-
}
|
|
25578
|
-
var column = query.createColumn(true);
|
|
25579
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
25580
|
-
column._sorting = SortDirection.Ascending;
|
|
25581
|
-
//column.sortIndex = this.getQuery().getColumnSortIndex(column);
|
|
25582
|
-
column.expr.tag = ExprTag.EntityAttribute;
|
|
25583
|
-
column.expr.dataType = attribute.dataType;
|
|
25584
|
-
//column.expr.id = attrid;
|
|
25585
|
-
column.expr.setValue(attrid, true);
|
|
25586
|
-
column.params.concat(attribute.params);
|
|
25587
|
-
return column;
|
|
25588
|
-
};
|
|
25589
|
-
if (!this.getQuery()) {
|
|
25590
|
-
return;
|
|
25591
|
-
}
|
|
25592
|
-
var newCol = getColumnByAttrId(attrId);
|
|
25593
|
-
return this.getQuery().addColumn({
|
|
25594
|
-
column: newCol
|
|
25619
|
+
var col = query.addColumn({
|
|
25620
|
+
attributeId: attrId,
|
|
25621
|
+
justsorted: true,
|
|
25622
|
+
sorting: SortDirection.Ascending
|
|
25595
25623
|
});
|
|
25596
|
-
|
|
25597
|
-
|
|
25598
|
-
|
|
25599
|
-
|
|
25600
|
-
|
|
25624
|
+
query.fireChangedEvent({
|
|
25625
|
+
part: QueryChangePart.SortingColumns,
|
|
25626
|
+
action: QueryChangeAction.Add,
|
|
25627
|
+
changee: col,
|
|
25628
|
+
source: this
|
|
25629
|
+
});
|
|
25630
|
+
return col;
|
|
25601
25631
|
};
|
|
25602
25632
|
SortingBar.prototype.renderColumn = function (column, elem) {
|
|
25603
25633
|
var renderer = new ColumnRendererSB(this, column, elem);
|
|
@@ -29319,78 +29349,17 @@ var EasyGridWidget = /** @class */ (function (_super) {
|
|
|
29319
29349
|
}
|
|
29320
29350
|
};
|
|
29321
29351
|
EasyGridWidget.prototype.addNewColumn = function (attrId) {
|
|
29322
|
-
var _this = this;
|
|
29323
29352
|
var model = this.getContext().getModel();
|
|
29324
29353
|
var query = this.getContext().getQuery();
|
|
29325
|
-
var
|
|
29326
|
-
|
|
29327
|
-
if (!attribute) {
|
|
29328
|
-
return null;
|
|
29329
|
-
}
|
|
29330
|
-
if (!attribute.useInSorting) {
|
|
29331
|
-
if (attribute.lookupAttr) {
|
|
29332
|
-
attrid = attribute.lookupAttr;
|
|
29333
|
-
attribute = model.getAttributeById(attrid);
|
|
29334
|
-
if (!attribute || !attribute.useInSorting) {
|
|
29335
|
-
return null;
|
|
29336
|
-
}
|
|
29337
|
-
}
|
|
29338
|
-
else
|
|
29339
|
-
return null;
|
|
29340
|
-
}
|
|
29341
|
-
var column = query.createColumn();
|
|
29342
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
29343
|
-
column.sorting = SortDirection.None;
|
|
29344
|
-
column.sortIndex = -1;
|
|
29345
|
-
column.expr.tag = ExprTag.EntityAttribute;
|
|
29346
|
-
//column.expr.id = attrid;
|
|
29347
|
-
column.expr.setValue(attrid, true);
|
|
29348
|
-
column.params.concat(attribute.params);
|
|
29349
|
-
return column;
|
|
29350
|
-
};
|
|
29351
|
-
if (!this.getContext().getQuery()) {
|
|
29352
|
-
return;
|
|
29353
|
-
}
|
|
29354
|
-
return this.addColumn(getColumnByAttrId(attrId));
|
|
29355
|
-
};
|
|
29356
|
-
EasyGridWidget.prototype.getDefaultColumnCaption = function (attr) {
|
|
29357
|
-
var format = this.options.titleElementFormat || this.options.attrElementFormat;
|
|
29358
|
-
var model = this.getContext().getModel();
|
|
29359
|
-
return model.getAttributeText(attr, format);
|
|
29360
|
-
};
|
|
29361
|
-
EasyGridWidget.prototype.addColumn = function (column) {
|
|
29362
|
-
var query = this.getContext().getQuery();
|
|
29363
|
-
if (!query) {
|
|
29364
|
-
return;
|
|
29365
|
-
}
|
|
29366
|
-
column = this.checkColumn(column);
|
|
29367
|
-
if (!column) {
|
|
29368
|
-
return;
|
|
29369
|
-
}
|
|
29370
|
-
column = query.addColumn({
|
|
29371
|
-
caption: column.caption,
|
|
29372
|
-
attributeId: column.expr.value,
|
|
29373
|
-
sorting: column.sorting,
|
|
29374
|
-
sortIndex: column.sortIndex
|
|
29354
|
+
var col = query.addColumn({
|
|
29355
|
+
attributeId: attrId
|
|
29375
29356
|
});
|
|
29376
29357
|
query.fireChangedEvent({
|
|
29377
29358
|
part: QueryChangePart.Columns,
|
|
29378
29359
|
action: QueryChangeAction.Add,
|
|
29379
|
-
changee:
|
|
29360
|
+
changee: col,
|
|
29380
29361
|
source: this
|
|
29381
29362
|
});
|
|
29382
|
-
return column;
|
|
29383
|
-
};
|
|
29384
|
-
EasyGridWidget.prototype.checkColumn = function (col) {
|
|
29385
|
-
var query = this.getContext().getQuery();
|
|
29386
|
-
var columns = query.getColumns();
|
|
29387
|
-
var colJson = JSON.stringify(col.expr.saveToData());
|
|
29388
|
-
for (var i = 0; i < columns.length; i++) {
|
|
29389
|
-
var qcolJson = JSON.stringify(columns[i].expr.saveToData());
|
|
29390
|
-
if (qcolJson === colJson) {
|
|
29391
|
-
return null;
|
|
29392
|
-
}
|
|
29393
|
-
}
|
|
29394
29363
|
return col;
|
|
29395
29364
|
};
|
|
29396
29365
|
return EasyGridWidget;
|
|
@@ -33340,12 +33309,7 @@ var View = /** @class */ (function () {
|
|
|
33340
33309
|
}
|
|
33341
33310
|
// map columnTitleFormat option to widgets that have similar option
|
|
33342
33311
|
if (options.columnTitleFormat) {
|
|
33343
|
-
options.
|
|
33344
|
-
options.widgets.entitiesPanel.columnTitleFormat = options.widgets.entitiesPanel.columnTitleFormat || options.columnTitleFormat;
|
|
33345
|
-
options.widgets.columnsBar = options.widgets.columnsBar || {};
|
|
33346
|
-
options.widgets.columnsBar.titleElementFormat = options.widgets.columnsBar.titleElementFormat || options.columnTitleFormat;
|
|
33347
|
-
options.widgets.columnsPanel = options.widgets.columnsPanel || {};
|
|
33348
|
-
options.widgets.columnsPanel.titleElementFormat = options.widgets.columnsPanel.titleElementFormat || options.columnTitleFormat;
|
|
33312
|
+
this.context.options.columnTitleFormat = options.columnTitleFormat;
|
|
33349
33313
|
}
|
|
33350
33314
|
//to support old paging options (should be removed in the next versions)
|
|
33351
33315
|
options.widgets.easyGrid.paging =
|
|
@@ -36528,7 +36492,7 @@ function strIsEmpty(str) {
|
|
|
36528
36492
|
else
|
|
36529
36493
|
return true;
|
|
36530
36494
|
}
|
|
36531
|
-
var baseLicApiUrl = 'https://korzh.com/api/license';
|
|
36495
|
+
var baseLicApiUrl = 'https://account.korzh.com/api/license';
|
|
36532
36496
|
//const baseLicApiUrl = 'https://localhost:44301/api/license';
|
|
36533
36497
|
var eqVersion = '7.2';
|
|
36534
36498
|
var LCDialog = /** @class */ (function () {
|