@easyquery/ui 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.community.js +500 -536
- package/dist/browser/eq.community.js.map +1 -1
- package/dist/browser/eq.community.min.js +1 -1
- package/dist/browser/eq.community.min.js.map +1 -1
- package/dist/browser/eq.core.css +1 -1
- package/dist/browser/eq.view.css +1 -1
- package/dist/bundles/easyquery.ui.js +389 -491
- package/dist/bundles/easyquery.ui.js.map +1 -1
- package/dist/bundles/easyquery.ui.min.js +1 -1
- package/dist/bundles/easyquery.ui.min.js.map +1 -1
- package/dist/lib/public_api.d.ts +5 -5
- package/dist/lib/public_api.js +5 -5
- package/dist/lib/public_api.js.map +1 -1
- package/dist/lib/views/view.js +1 -6
- package/dist/lib/views/view.js.map +1 -1
- package/dist/lib/widgets/columns_bar.d.ts +2 -4
- package/dist/lib/widgets/columns_bar.js +35 -76
- package/dist/lib/widgets/columns_bar.js.map +1 -1
- package/dist/lib/widgets/columns_panel.d.ts +2 -4
- package/dist/lib/widgets/columns_panel.js +47 -67
- package/dist/lib/widgets/columns_panel.js.map +1 -1
- package/dist/lib/widgets/easy_grid_widget.d.ts +0 -3
- package/dist/lib/widgets/easy_grid_widget.js +4 -65
- package/dist/lib/widgets/easy_grid_widget.js.map +1 -1
- package/dist/lib/widgets/entities_panel.js +4 -9
- package/dist/lib/widgets/entities_panel.js.map +1 -1
- package/dist/lib/widgets/renderers/columnsbar/aggrfunc_column_renderer_cb.d.ts +9 -0
- package/dist/lib/widgets/renderers/columnsbar/{aggrfunc_column_renderer.js → aggrfunc_column_renderer_cb.js} +6 -19
- package/dist/lib/widgets/renderers/columnsbar/aggrfunc_column_renderer_cb.js.map +1 -0
- package/dist/lib/widgets/renderers/columnsbar/{simple_column_renderer.d.ts → attr_column_renderer_cb.d.ts} +4 -2
- package/dist/lib/widgets/renderers/columnsbar/{simple_column_renderer.js → attr_column_renderer_cb.js} +22 -16
- package/dist/lib/widgets/renderers/columnsbar/attr_column_renderer_cb.js.map +1 -0
- package/dist/lib/widgets/renderers/columnsbar/column_renderer_cb.d.ts +1 -5
- package/dist/lib/widgets/renderers/columnsbar/column_renderer_cb.js +3 -22
- package/dist/lib/widgets/renderers/columnsbar/column_renderer_cb.js.map +1 -1
- package/dist/lib/widgets/renderers/columnsbar/editable_column_renderer_cb.d.ts +22 -0
- package/dist/lib/widgets/renderers/columnsbar/editable_column_renderer_cb.js +102 -0
- package/dist/lib/widgets/renderers/columnsbar/editable_column_renderer_cb.js.map +1 -0
- package/dist/lib/widgets/renderers/columnspanel/{aggrfunc_column_renderer.d.ts → aggrfunc_column_renderer_cp.d.ts} +3 -4
- package/dist/lib/widgets/renderers/columnspanel/{aggrfunc_column_renderer.js → aggrfunc_column_renderer_cp.js} +7 -15
- package/dist/lib/widgets/renderers/columnspanel/aggrfunc_column_renderer_cp.js.map +1 -0
- package/dist/lib/widgets/renderers/columnspanel/{simple_column_renderer.d.ts → attr_column_renderer_cp.d.ts} +4 -1
- package/dist/lib/widgets/renderers/columnspanel/{simple_column_renderer.js → attr_column_renderer_cp.js} +31 -19
- package/dist/lib/widgets/renderers/columnspanel/attr_column_renderer_cp.js.map +1 -0
- package/dist/lib/widgets/renderers/columnspanel/column_renderer_cp.d.ts +1 -6
- package/dist/lib/widgets/renderers/columnspanel/column_renderer_cp.js +1 -20
- package/dist/lib/widgets/renderers/columnspanel/column_renderer_cp.js.map +1 -1
- package/dist/lib/widgets/renderers/columnspanel/{customsql_column_renderer.d.ts → editable_column_renderer_cp.d.ts} +19 -7
- package/dist/lib/widgets/renderers/columnspanel/{customsql_column_renderer.js → editable_column_renderer_cp.js} +88 -50
- package/dist/lib/widgets/renderers/columnspanel/editable_column_renderer_cp.js.map +1 -0
- package/dist/lib/widgets/renderers/querypanel/condition_renderer.js.map +1 -1
- package/dist/lib/widgets/renderers/sortingbar/{column_renderer_sp.d.ts → column_renderer_sb.d.ts} +0 -3
- package/dist/lib/widgets/renderers/sortingbar/{column_renderer_sp.js → column_renderer_sb.js} +2 -14
- package/dist/lib/widgets/renderers/sortingbar/column_renderer_sb.js.map +1 -0
- package/dist/lib/widgets/sorting_bar.d.ts +0 -1
- package/dist/lib/widgets/sorting_bar.js +19 -43
- package/dist/lib/widgets/sorting_bar.js.map +1 -1
- package/package.json +4 -4
- package/dist/lib/widgets/renderers/columnsbar/aggrfunc_column_renderer.d.ts +0 -11
- package/dist/lib/widgets/renderers/columnsbar/aggrfunc_column_renderer.js.map +0 -1
- package/dist/lib/widgets/renderers/columnsbar/simple_column_renderer.js.map +0 -1
- package/dist/lib/widgets/renderers/columnspanel/aggrfunc_column_renderer.js.map +0 -1
- package/dist/lib/widgets/renderers/columnspanel/customsql_column_renderer.js.map +0 -1
- package/dist/lib/widgets/renderers/columnspanel/simple_column_renderer.js.map +0 -1
- package/dist/lib/widgets/renderers/sortingbar/column_renderer_sp.js.map +0 -1
|
@@ -142,7 +142,7 @@ function makeElementMaximizable(element) {
|
|
|
142
142
|
|
|
143
143
|
/***/ }),
|
|
144
144
|
|
|
145
|
-
/***/
|
|
145
|
+
/***/ 902:
|
|
146
146
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
147
147
|
|
|
148
148
|
|
|
@@ -302,39 +302,6 @@ var HttpRequest = /** @class */ (function () {
|
|
|
302
302
|
}());
|
|
303
303
|
|
|
304
304
|
//# sourceMappingURL=http_request.js.map
|
|
305
|
-
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/string_utils.js
|
|
306
|
-
function repeatString(str, times) {
|
|
307
|
-
var result = "";
|
|
308
|
-
for (var i = 0; i < times; i++) {
|
|
309
|
-
result += str;
|
|
310
|
-
}
|
|
311
|
-
return result;
|
|
312
|
-
}
|
|
313
|
-
function reverseString(str) {
|
|
314
|
-
return str.split("").reverse().join("");
|
|
315
|
-
}
|
|
316
|
-
function strEndsWith(str, symbol) {
|
|
317
|
-
return str && str.lastIndexOf(symbol) == (str.length - symbol.length);
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Adds two paths and returns the result
|
|
321
|
-
* Correctly processes leading and trailing slashes
|
|
322
|
-
* @param path1
|
|
323
|
-
* @param path2
|
|
324
|
-
*/
|
|
325
|
-
function combinePath(path1, path2) {
|
|
326
|
-
var result = path1;
|
|
327
|
-
if (result != null && result.length > 0) {
|
|
328
|
-
if (result.charAt(result.length - 1) != '/')
|
|
329
|
-
result += "/";
|
|
330
|
-
result += path2;
|
|
331
|
-
}
|
|
332
|
-
else {
|
|
333
|
-
result = path2;
|
|
334
|
-
}
|
|
335
|
-
return result;
|
|
336
|
-
}
|
|
337
|
-
//# sourceMappingURL=string_utils.js.map
|
|
338
305
|
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/i18n/i18n.js
|
|
339
306
|
|
|
340
307
|
|
|
@@ -808,7 +775,6 @@ var i18n;
|
|
|
808
775
|
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/core/dist/lib/utils/utils.js
|
|
809
776
|
|
|
810
777
|
|
|
811
|
-
|
|
812
778
|
var utils;
|
|
813
779
|
(function (utils) {
|
|
814
780
|
function getAllDataTypes() {
|
|
@@ -1131,27 +1097,26 @@ var utils;
|
|
|
1131
1097
|
if (prfx && prfx.length > 0) {
|
|
1132
1098
|
prfx += "-";
|
|
1133
1099
|
}
|
|
1134
|
-
//adding
|
|
1135
|
-
var
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
//
|
|
1141
|
-
var
|
|
1142
|
-
return prfx +
|
|
1100
|
+
//adding 3 random symbols
|
|
1101
|
+
var randCharPart = symbols[getRandomInt(0, symbols.length)] +
|
|
1102
|
+
symbols[getRandomInt(0, symbols.length)] +
|
|
1103
|
+
symbols[getRandomInt(0, symbols.length)];
|
|
1104
|
+
var randInt = getRandomInt(0, 10000);
|
|
1105
|
+
//generating main ID part
|
|
1106
|
+
//it's a 36-base representation of some random number based on current value of ticks
|
|
1107
|
+
var ticksNum36 = intToNumBase(getNowTicks() - magicTicks - randInt);
|
|
1108
|
+
return prfx + randCharPart + ticksNum36;
|
|
1143
1109
|
}
|
|
1144
1110
|
utils.generateId = generateId;
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1147
|
-
var
|
|
1148
|
-
var buffer = repeatString("", i);
|
|
1111
|
+
function intToNumBase(value, targetBase) {
|
|
1112
|
+
if (targetBase === void 0) { targetBase = 36; }
|
|
1113
|
+
var buffer = '';
|
|
1149
1114
|
var rest = value;
|
|
1150
1115
|
do {
|
|
1151
|
-
buffer =
|
|
1116
|
+
buffer = symbols[rest % targetBase] + buffer;
|
|
1152
1117
|
rest = Math.floor(rest /= targetBase);
|
|
1153
1118
|
} while (rest > 0);
|
|
1154
|
-
return
|
|
1119
|
+
return buffer;
|
|
1155
1120
|
}
|
|
1156
1121
|
function squeezeMoniker(str, maxlen) {
|
|
1157
1122
|
var parts = str.split('-');
|
|
@@ -1188,8 +1153,8 @@ var utils;
|
|
|
1188
1153
|
return str;
|
|
1189
1154
|
}
|
|
1190
1155
|
}
|
|
1191
|
-
function replaceAtString(str, index,
|
|
1192
|
-
return str.
|
|
1156
|
+
function replaceAtString(str, index, replacement) {
|
|
1157
|
+
return str.substring(0, index) + replacement + str.substring(index + replacement.length);
|
|
1193
1158
|
}
|
|
1194
1159
|
function getRandomInt(min, max) {
|
|
1195
1160
|
return Math.floor(Math.random() * (max - min)) + min;
|
|
@@ -3070,8 +3035,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3070
3035
|
|
|
3071
3036
|
// UNUSED EXPORTS: AutoResizeColumns, Calendar, CellRendererType, DFMT_REGEX, DateTimePicker, DefaultCalendar, DefaultDialog, DefaultDialogSet, DefaultProgressDialog, DefaultTimePicker, DialogFooterAlignment, DomInputElementBuilder, DomSelectElementBuilder, DomTextAreaElementBuilder, DragManager, EqDragEvent, GridCellRendererStore, GridColumn, GridColumnAlign, GridColumnList, TimePicker, browserUtils, dialogs, eqCssMobile, eqCssPrefix, getDocSize, mask, wrapInner
|
|
3072
3037
|
|
|
3073
|
-
// EXTERNAL MODULE: ../../easydata/easydata.js/packs/core/dist/lib/public_api.js +
|
|
3074
|
-
var public_api = __webpack_require__(
|
|
3038
|
+
// EXTERNAL MODULE: ../../easydata/easydata.js/packs/core/dist/lib/public_api.js + 20 modules
|
|
3039
|
+
var public_api = __webpack_require__(902);
|
|
3075
3040
|
// EXTERNAL MODULE: ../../easydata/easydata.js/packs/ui/dist/lib/utils/browser_utils.js
|
|
3076
3041
|
var browser_utils = __webpack_require__(789);
|
|
3077
3042
|
;// CONCATENATED MODULE: ../../easydata/easydata.js/packs/ui/dist/lib/utils/ui-utils.js
|
|
@@ -6936,6 +6901,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6936
6901
|
AggrSettingsDialog: function() { return /* reexport */ AggrSettingsDialog; },
|
|
6937
6902
|
AggrSettingsRenderer: function() { return /* reexport */ AggrSettingsRenderer; },
|
|
6938
6903
|
AggregationBar: function() { return /* reexport */ AggregationBar; },
|
|
6904
|
+
AttrColumnRendererCB: function() { return /* reexport */ AttrColumnRendererCB; },
|
|
6905
|
+
AttrColumnRendererCP: function() { return /* reexport */ AttrColumnRendererCP; },
|
|
6939
6906
|
AttributeExpressionRenderer: function() { return /* reexport */ AttributeExpressionRenderer; },
|
|
6940
6907
|
BaseElementRenderer: function() { return /* reexport */ BaseElementRenderer; },
|
|
6941
6908
|
ChartFacet: function() { return /* reexport */ ChartFacet; },
|
|
@@ -6951,6 +6918,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6951
6918
|
ConditionGroupRenderer: function() { return /* reexport */ ConditionGroupRenderer; },
|
|
6952
6919
|
ConditionGroupRowRenderer: function() { return /* reexport */ ConditionGroupRowRenderer; },
|
|
6953
6920
|
ConditionRenderer: function() { return /* reexport */ ConditionRenderer; },
|
|
6921
|
+
ConstColumnRendererCP: function() { return /* reexport */ ConstColumnRendererCP; },
|
|
6954
6922
|
CustomListExpressionRenderer: function() { return /* reexport */ CustomListExpressionRenderer; },
|
|
6955
6923
|
CustomSqlColumnRendererCP: function() { return /* reexport */ CustomSqlColumnRendererCP; },
|
|
6956
6924
|
DataFilterView: function() { return /* reexport */ DataFilterView; },
|
|
@@ -6982,8 +6950,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6982
6950
|
ReportView: function() { return /* reexport */ ReportView; },
|
|
6983
6951
|
ResultFacet: function() { return /* reexport */ ResultFacet; },
|
|
6984
6952
|
ResultFacetsPanel: function() { return /* reexport */ ResultFacetsPanel; },
|
|
6985
|
-
SimpleColumnRendererCB: function() { return /* reexport */ SimpleColumnRendererCB; },
|
|
6986
|
-
SimpleColumnRendererCP: function() { return /* reexport */ SimpleColumnRendererCP; },
|
|
6987
6953
|
SimpleConditionRenderer: function() { return /* reexport */ SimpleConditionRenderer; },
|
|
6988
6954
|
SortingBar: function() { return /* reexport */ SortingBar; },
|
|
6989
6955
|
SqlListExpressionRenderer: function() { return /* reexport */ SqlListExpressionRenderer; },
|
|
@@ -6995,8 +6961,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6995
6961
|
dropdown: function() { return /* reexport */ dropdown; }
|
|
6996
6962
|
});
|
|
6997
6963
|
|
|
6998
|
-
// EXTERNAL MODULE: ../../easydata/easydata.js/packs/core/dist/lib/public_api.js +
|
|
6999
|
-
var public_api = __webpack_require__(
|
|
6964
|
+
// EXTERNAL MODULE: ../../easydata/easydata.js/packs/core/dist/lib/public_api.js + 20 modules
|
|
6965
|
+
var public_api = __webpack_require__(902);
|
|
7000
6966
|
// EXTERNAL MODULE: external "easyqueryCore"
|
|
7001
6967
|
var external_easyqueryCore_ = __webpack_require__(388);
|
|
7002
6968
|
// EXTERNAL MODULE: ../../easydata/easydata.js/packs/ui/dist/lib/public_api.js + 17 modules
|
|
@@ -7108,7 +7074,6 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
7108
7074
|
autoClearSelection: true,
|
|
7109
7075
|
entityRenderedCallback: null,
|
|
7110
7076
|
attributeRenderedCallback: null,
|
|
7111
|
-
columnTitleFormat: '{attr}'
|
|
7112
7077
|
};
|
|
7113
7078
|
if (options) {
|
|
7114
7079
|
public_api/* utils.assignDeep */.P6.assignDeep(this.options, options);
|
|
@@ -7237,10 +7202,8 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
7237
7202
|
if (model.checkAttrProperty(attrId, "useInResult")) {
|
|
7238
7203
|
if (checkbox.checked) {
|
|
7239
7204
|
var attr = model.getAttributeById(attrId);
|
|
7240
|
-
var caption = model.getAttributeText(attr, _this.options.columnTitleFormat);
|
|
7241
7205
|
var column = query.addColumn({
|
|
7242
|
-
attribute: attr
|
|
7243
|
-
caption: caption
|
|
7206
|
+
attribute: attr
|
|
7244
7207
|
});
|
|
7245
7208
|
query.fireColumnsChangedEvent(external_easyqueryCore_.QueryChangeAction.Add, column);
|
|
7246
7209
|
}
|
|
@@ -7249,7 +7212,7 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
7249
7212
|
.filter(function (col) { return col.expr.tag === external_easyqueryCore_.ExprTag.EntityAttribute
|
|
7250
7213
|
&& col.expr.value === attrId; });
|
|
7251
7214
|
if (columns.length > 0) {
|
|
7252
|
-
query.removeColumn(columns[0]
|
|
7215
|
+
query.removeColumn(columns[0]);
|
|
7253
7216
|
query.fireColumnsChangedEvent(external_easyqueryCore_.QueryChangeAction.Delete, columns[0]);
|
|
7254
7217
|
}
|
|
7255
7218
|
}
|
|
@@ -7463,11 +7426,9 @@ var EntitiesPanel = /** @class */ (function (_super) {
|
|
|
7463
7426
|
for (var _i = 0, attrList_3 = attrList; _i < attrList_3.length; _i++) {
|
|
7464
7427
|
var attrId_1 = attrList_3[_i];
|
|
7465
7428
|
var attr = model.getAttributeById(attrId_1);
|
|
7466
|
-
var caption = model.getAttributeText(attr, _this.options.columnTitleFormat);
|
|
7467
7429
|
query.addColumn({
|
|
7468
|
-
attribute: attr
|
|
7469
|
-
|
|
7470
|
-
});
|
|
7430
|
+
attribute: attr
|
|
7431
|
+
}, true);
|
|
7471
7432
|
}
|
|
7472
7433
|
query.fireChangedEvent();
|
|
7473
7434
|
if (_this.options.autoClearSelection) {
|
|
@@ -9020,7 +8981,6 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
9020
8981
|
});
|
|
9021
8982
|
ColumnRendererCP.prototype.render = function () {
|
|
9022
8983
|
var _this = this;
|
|
9023
|
-
this.baseAttr = this.getAttribute();
|
|
9024
8984
|
if (this.getButtonsToShow().indexOf("sorting") >= 0 && this.columnEnabled) {
|
|
9025
8985
|
this.sortingButton = this.renderSoringButton(this.column.sorting);
|
|
9026
8986
|
if (this.column.sorting !== external_easyqueryCore_.SortDirection.None) {
|
|
@@ -9143,15 +9103,8 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
9143
9103
|
ColumnRendererCP.prototype.refresh = function () {
|
|
9144
9104
|
this.render();
|
|
9145
9105
|
};
|
|
9146
|
-
ColumnRendererCP.prototype.getAttribute = function () {
|
|
9147
|
-
var model = this.panel.getContext().getModel();
|
|
9148
|
-
return model.getAttributeByIdSafe(this.column.expr.value);
|
|
9149
|
-
};
|
|
9150
9106
|
ColumnRendererCP.prototype.renderCaptionBlock = function () {
|
|
9151
9107
|
var _this = this;
|
|
9152
|
-
if (!this.column.caption || this.column.caption == '') {
|
|
9153
|
-
this.column.caption = this.getDefaultColumnCaption();
|
|
9154
|
-
}
|
|
9155
9108
|
var builder = (0,lib_public_api/* domel */.uC)('div')
|
|
9156
9109
|
.addClass("".concat(this.cssPrefix, "-colelement"), "".concat(this.cssPrefix, "-captionelement"))
|
|
9157
9110
|
.addClass(browser_utils/* browserUtils.getMobileCssClass */.z.getMobileCssClass());
|
|
@@ -9354,17 +9307,6 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
9354
9307
|
} }); })
|
|
9355
9308
|
.toDOM();
|
|
9356
9309
|
};
|
|
9357
|
-
ColumnRendererCP.prototype.getDefaultColumnCaption = function () {
|
|
9358
|
-
return this.getDefaultTitleText(this.baseAttr);
|
|
9359
|
-
};
|
|
9360
|
-
ColumnRendererCP.prototype.getDefaultTitleText = function (attr) {
|
|
9361
|
-
return this.getAttributeCaption(attr, this.panel.options.titleElementFormat);
|
|
9362
|
-
};
|
|
9363
|
-
ColumnRendererCP.prototype.getAttributeCaption = function (attr, format) {
|
|
9364
|
-
format = format || this.panel.options.attrElementFormat;
|
|
9365
|
-
var model = this.panel.getContext().getModel();
|
|
9366
|
-
return model.getAttributeText(attr, format);
|
|
9367
|
-
};
|
|
9368
9310
|
ColumnRendererCP.prototype.getClassesToAdd = function () {
|
|
9369
9311
|
var result = "";
|
|
9370
9312
|
result += this.columnEnabled ? '' : " ".concat(this.cssPrefix, "-disabled");
|
|
@@ -9595,7 +9537,7 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
9595
9537
|
switch (action) {
|
|
9596
9538
|
case ColumnAction.Delete:
|
|
9597
9539
|
var curQuery = this.column.getQuery();
|
|
9598
|
-
curQuery.removeColumn(this.column
|
|
9540
|
+
curQuery.removeColumn(this.column);
|
|
9599
9541
|
curQuery.fireColumnsChangedEvent(external_easyqueryCore_.QueryChangeAction.Delete, this.column);
|
|
9600
9542
|
break;
|
|
9601
9543
|
case ColumnAction.Enable:
|
|
@@ -9789,8 +9731,8 @@ var ColumnRendererCP = /** @class */ (function () {
|
|
|
9789
9731
|
}());
|
|
9790
9732
|
|
|
9791
9733
|
|
|
9792
|
-
;// CONCATENATED MODULE: ./src/widgets/renderers/columnspanel/
|
|
9793
|
-
var
|
|
9734
|
+
;// CONCATENATED MODULE: ./src/widgets/renderers/columnspanel/attr_column_renderer_cp.ts
|
|
9735
|
+
var attr_column_renderer_cp_extends = (undefined && undefined.__extends) || (function () {
|
|
9794
9736
|
var extendStatics = function (d, b) {
|
|
9795
9737
|
extendStatics = Object.setPrototypeOf ||
|
|
9796
9738
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -9810,15 +9752,15 @@ var simple_column_renderer_extends = (undefined && undefined.__extends) || (func
|
|
|
9810
9752
|
|
|
9811
9753
|
|
|
9812
9754
|
|
|
9813
|
-
var
|
|
9814
|
-
|
|
9815
|
-
function
|
|
9755
|
+
var AttrColumnRendererCP = /** @class */ (function (_super) {
|
|
9756
|
+
attr_column_renderer_cp_extends(AttrColumnRendererCP, _super);
|
|
9757
|
+
function AttrColumnRendererCP() {
|
|
9816
9758
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
9817
9759
|
}
|
|
9818
|
-
|
|
9760
|
+
AttrColumnRendererCP.prototype.getClassesToAdd = function () {
|
|
9819
9761
|
return "".concat(_super.prototype.getClassesToAdd.call(this), " ").concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr");
|
|
9820
9762
|
};
|
|
9821
|
-
|
|
9763
|
+
AttrColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
9822
9764
|
var _this = this;
|
|
9823
9765
|
return (0,lib_public_api/* domel */.uC)("div")
|
|
9824
9766
|
.addClass("".concat(this.cssPrefix, "-expr-block"))
|
|
@@ -9829,9 +9771,14 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
9829
9771
|
.addChildElement(_this.renderBaseExpression()); })
|
|
9830
9772
|
.toDOM();
|
|
9831
9773
|
};
|
|
9832
|
-
|
|
9774
|
+
AttrColumnRendererCP.prototype.getAttribute = function () {
|
|
9775
|
+
var model = this.panel.getContext().getModel();
|
|
9776
|
+
return model.getAttributeByIdSafe(this.column.expr.value);
|
|
9777
|
+
};
|
|
9778
|
+
AttrColumnRendererCP.prototype.renderBaseExpression = function () {
|
|
9833
9779
|
var _this = this;
|
|
9834
|
-
var
|
|
9780
|
+
var baseAttr = this.getAttribute();
|
|
9781
|
+
var attrCaption = this.panel.getContext().getAttributeTitle(baseAttr);
|
|
9835
9782
|
if (this.isEditable()) {
|
|
9836
9783
|
return (0,lib_public_api/* domel */.uC)('a')
|
|
9837
9784
|
.attr('href', 'javascript:void(0)')
|
|
@@ -9854,14 +9801,21 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
9854
9801
|
.title(attrCaption)
|
|
9855
9802
|
.toDOM();
|
|
9856
9803
|
};
|
|
9857
|
-
|
|
9804
|
+
AttrColumnRendererCP.prototype.baseExpressionItemSelectedCallback = function (data, item) {
|
|
9858
9805
|
var attrid = data.id;
|
|
9859
|
-
this.
|
|
9860
|
-
|
|
9806
|
+
var context = this.panel.getContext();
|
|
9807
|
+
var attr = context.getModel().getAttributeById(attrid);
|
|
9808
|
+
this.updateBaseAttr(attr);
|
|
9809
|
+
this.column.caption = context.getDefaultColumnCaption(this.column);
|
|
9861
9810
|
this.fireColumnChanged();
|
|
9862
9811
|
return false;
|
|
9863
9812
|
};
|
|
9864
|
-
|
|
9813
|
+
AttrColumnRendererCP.prototype.updateBaseAttr = function (attr) {
|
|
9814
|
+
this.column.expr.setValue(attr.id, true);
|
|
9815
|
+
this.column.expr.baseAttrId = attr.id;
|
|
9816
|
+
this.column.expr.dataType = attr.dataType;
|
|
9817
|
+
};
|
|
9818
|
+
AttrColumnRendererCP.prototype.getUIS = function () {
|
|
9865
9819
|
var arg = this.column.expr.args[0];
|
|
9866
9820
|
if (arg) {
|
|
9867
9821
|
var model = this.panel.getContext().getModel();
|
|
@@ -9871,7 +9825,7 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
9871
9825
|
return true;
|
|
9872
9826
|
}
|
|
9873
9827
|
};
|
|
9874
|
-
|
|
9828
|
+
AttrColumnRendererCP.prototype.changeTypeHandler = function (ev) {
|
|
9875
9829
|
var _this = this;
|
|
9876
9830
|
this.keepShowingButtons = true;
|
|
9877
9831
|
this.functionMenu.showMenu({
|
|
@@ -9889,7 +9843,7 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
9889
9843
|
}
|
|
9890
9844
|
});
|
|
9891
9845
|
};
|
|
9892
|
-
|
|
9846
|
+
AttrColumnRendererCP.prototype.changeTypeToCustomSql = function () {
|
|
9893
9847
|
var _this = this;
|
|
9894
9848
|
var query = this.column.getQuery();
|
|
9895
9849
|
query.changeColumnType(this.column, external_easyqueryCore_.ExprTag.CustomSql);
|
|
@@ -9902,12 +9856,12 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
9902
9856
|
}, 500);
|
|
9903
9857
|
this.fireColumnChanged();
|
|
9904
9858
|
};
|
|
9905
|
-
|
|
9859
|
+
AttrColumnRendererCP.prototype.changeTypeToAggr = function (funcId) {
|
|
9906
9860
|
var query = this.column.getQuery();
|
|
9907
9861
|
query.changeColumnType(this.column, external_easyqueryCore_.ExprTag.AggregateFunction, { funcId: funcId });
|
|
9908
9862
|
this.fireColumnChanged();
|
|
9909
9863
|
};
|
|
9910
|
-
|
|
9864
|
+
AttrColumnRendererCP.prototype.processExtraButtonMenuItems = function (action, evt) {
|
|
9911
9865
|
if (action === "CUSTOMSQL") {
|
|
9912
9866
|
this.changeTypeToCustomSql();
|
|
9913
9867
|
}
|
|
@@ -9916,7 +9870,7 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
9916
9870
|
}
|
|
9917
9871
|
return true;
|
|
9918
9872
|
};
|
|
9919
|
-
|
|
9873
|
+
AttrColumnRendererCP.prototype.getExtraButtonMenuItems = function () {
|
|
9920
9874
|
var items = [];
|
|
9921
9875
|
var funcs = this.panel.getContext().getModel().getAggrFunctions();
|
|
9922
9876
|
var toInclude = true;
|
|
@@ -9967,12 +9921,12 @@ var SimpleColumnRendererCP = /** @class */ (function (_super) {
|
|
|
9967
9921
|
items: items
|
|
9968
9922
|
}];
|
|
9969
9923
|
};
|
|
9970
|
-
return
|
|
9924
|
+
return AttrColumnRendererCP;
|
|
9971
9925
|
}(ColumnRendererCP));
|
|
9972
9926
|
|
|
9973
9927
|
|
|
9974
|
-
;// CONCATENATED MODULE: ./src/widgets/renderers/columnspanel/
|
|
9975
|
-
var
|
|
9928
|
+
;// CONCATENATED MODULE: ./src/widgets/renderers/columnspanel/aggrfunc_column_renderer_cp.ts
|
|
9929
|
+
var aggrfunc_column_renderer_cp_extends = (undefined && undefined.__extends) || (function () {
|
|
9976
9930
|
var extendStatics = function (d, b) {
|
|
9977
9931
|
extendStatics = Object.setPrototypeOf ||
|
|
9978
9932
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -9995,7 +9949,7 @@ var aggrfunc_column_renderer_extends = (undefined && undefined.__extends) || (fu
|
|
|
9995
9949
|
|
|
9996
9950
|
|
|
9997
9951
|
var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
9998
|
-
|
|
9952
|
+
aggrfunc_column_renderer_cp_extends(AggrFuncColumnRendererCP, _super);
|
|
9999
9953
|
function AggrFuncColumnRendererCP() {
|
|
10000
9954
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
10001
9955
|
_this.displayFormatParser = new DisplayFormatParser();
|
|
@@ -10010,10 +9964,6 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10010
9964
|
.getModel()
|
|
10011
9965
|
.getAttributeByIdSafe(this.column.expr.args[0].value);
|
|
10012
9966
|
};
|
|
10013
|
-
AggrFuncColumnRendererCP.prototype.getDefaultColumnCaption = function () {
|
|
10014
|
-
return this.getDefaultTitleText(this.baseAttr) + ' '
|
|
10015
|
-
+ this.panel.getContext().getModel().getAggrFunctionCaption(this.column.expr.func);
|
|
10016
|
-
};
|
|
10017
9967
|
AggrFuncColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
10018
9968
|
var _this = this;
|
|
10019
9969
|
var model = this.panel.getContext().getModel();
|
|
@@ -10098,14 +10048,6 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10098
10048
|
}
|
|
10099
10049
|
return button;
|
|
10100
10050
|
};
|
|
10101
|
-
AggrFuncColumnRendererCP.prototype.baseExpressionItemSelectedCallback = function (data, item) {
|
|
10102
|
-
var attrid = data.id;
|
|
10103
|
-
//this.column.expr.args[0].id = attrid;
|
|
10104
|
-
this.column.expr.args[0].setValue(attrid, true);
|
|
10105
|
-
this.column.caption = '';
|
|
10106
|
-
this.fireColumnChanged();
|
|
10107
|
-
return false;
|
|
10108
|
-
};
|
|
10109
10051
|
AggrFuncColumnRendererCP.prototype.changeTypeToSimple = function () {
|
|
10110
10052
|
var query = this.column.getQuery();
|
|
10111
10053
|
query.changeColumnType(this.column, external_easyqueryCore_.ExprTag.EntityAttribute);
|
|
@@ -10132,6 +10074,10 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10132
10074
|
}
|
|
10133
10075
|
return result;
|
|
10134
10076
|
};
|
|
10077
|
+
AggrFuncColumnRendererCP.prototype.updateBaseAttr = function (attr) {
|
|
10078
|
+
this.column.expr.args[0].setValue(attr.id, true);
|
|
10079
|
+
this.column.expr.baseAttrId = attr.id;
|
|
10080
|
+
};
|
|
10135
10081
|
AggrFuncColumnRendererCP.prototype.changeTypeHandler = function (ev) {
|
|
10136
10082
|
this.changeTypeToSimple();
|
|
10137
10083
|
};
|
|
@@ -10150,11 +10096,11 @@ var AggrFuncColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10150
10096
|
}];
|
|
10151
10097
|
};
|
|
10152
10098
|
return AggrFuncColumnRendererCP;
|
|
10153
|
-
}(
|
|
10099
|
+
}(AttrColumnRendererCP));
|
|
10154
10100
|
|
|
10155
10101
|
|
|
10156
|
-
;// CONCATENATED MODULE: ./src/widgets/renderers/columnspanel/
|
|
10157
|
-
var
|
|
10102
|
+
;// CONCATENATED MODULE: ./src/widgets/renderers/columnspanel/editable_column_renderer_cp.ts
|
|
10103
|
+
var editable_column_renderer_cp_extends = (undefined && undefined.__extends) || (function () {
|
|
10158
10104
|
var extendStatics = function (d, b) {
|
|
10159
10105
|
extendStatics = Object.setPrototypeOf ||
|
|
10160
10106
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -10175,51 +10121,25 @@ var customsql_column_renderer_extends = (undefined && undefined.__extends) || (f
|
|
|
10175
10121
|
|
|
10176
10122
|
|
|
10177
10123
|
|
|
10178
|
-
var
|
|
10179
|
-
|
|
10180
|
-
function
|
|
10124
|
+
var EditableColumnRendererCP = /** @class */ (function (_super) {
|
|
10125
|
+
editable_column_renderer_cp_extends(EditableColumnRendererCP, _super);
|
|
10126
|
+
function EditableColumnRendererCP() {
|
|
10181
10127
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
10182
10128
|
_this.dataTypeMenu = null;
|
|
10183
10129
|
return _this;
|
|
10184
10130
|
}
|
|
10185
|
-
|
|
10131
|
+
EditableColumnRendererCP.prototype.renderEnabledButton = function () {
|
|
10186
10132
|
var elem = _super.prototype.renderEnabledButton.call(this);
|
|
10187
10133
|
var child = elem.children[0];
|
|
10188
10134
|
child.title = public_api/* i18n.getText */.ag.getText('CmdToggleEnableCustom');
|
|
10189
10135
|
return elem;
|
|
10190
10136
|
};
|
|
10191
10137
|
;
|
|
10192
|
-
|
|
10138
|
+
EditableColumnRendererCP.prototype.getClassesToAdd = function () {
|
|
10193
10139
|
return "".concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr") + _super.prototype.getClassesToAdd.call(this);
|
|
10194
10140
|
};
|
|
10195
|
-
|
|
10196
|
-
get: function () {
|
|
10197
|
-
return this.panel.areCustomExpressionsAllowed() ? this.column.enabled : false;
|
|
10198
|
-
},
|
|
10199
|
-
set: function (value) {
|
|
10200
|
-
if (this.panel.areCustomExpressionsAllowed()) {
|
|
10201
|
-
this.column.enabled = value;
|
|
10202
|
-
}
|
|
10203
|
-
else {
|
|
10204
|
-
this.column.enabled = false;
|
|
10205
|
-
}
|
|
10206
|
-
},
|
|
10207
|
-
enumerable: false,
|
|
10208
|
-
configurable: true
|
|
10209
|
-
});
|
|
10210
|
-
CustomSqlColumnRendererCP.prototype.renderColumnTypeButton = function () {
|
|
10211
|
-
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
10212
|
-
if (button) {
|
|
10213
|
-
button.firstElementChild.classList.add('aggregated');
|
|
10214
|
-
button.firstElementChild.setAttribute('title', public_api/* i18n.getText */.ag.getText('ButtonToSimple'));
|
|
10215
|
-
}
|
|
10216
|
-
return button;
|
|
10217
|
-
};
|
|
10218
|
-
CustomSqlColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
10141
|
+
EditableColumnRendererCP.prototype.renderExpressionBlock = function () {
|
|
10219
10142
|
var _this = this;
|
|
10220
|
-
if (!this.column.caption || this.column.caption == '') {
|
|
10221
|
-
this.column.caption = this.getDefaultColumnCaption();
|
|
10222
|
-
}
|
|
10223
10143
|
var exprBlock = (0,lib_public_api/* domel */.uC)("div")
|
|
10224
10144
|
.addClass("".concat(this.cssPrefix, "-expr-block"))
|
|
10225
10145
|
.addClass(browser_utils/* browserUtils.getMobileCssClass */.z.getMobileCssClass())
|
|
@@ -10249,7 +10169,7 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10249
10169
|
)
|
|
10250
10170
|
.addChild('input', function (b) { return b
|
|
10251
10171
|
.hide()
|
|
10252
|
-
.value(_this.
|
|
10172
|
+
.value(_this.getColumnValue())
|
|
10253
10173
|
.on('blur keydown', function (ev) {
|
|
10254
10174
|
var isEndEvent = false;
|
|
10255
10175
|
var save = true;
|
|
@@ -10274,12 +10194,13 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10274
10194
|
aEl.style.removeProperty('display');
|
|
10275
10195
|
inputEl.style.display = 'none';
|
|
10276
10196
|
}
|
|
10277
|
-
|
|
10278
|
-
|
|
10197
|
+
var colVal = _this.getColumnValue();
|
|
10198
|
+
if (save && colVal !== inputEl.value) {
|
|
10199
|
+
_this.setColumnValue(inputEl.value);
|
|
10279
10200
|
_this.fireColumnChanged();
|
|
10280
10201
|
}
|
|
10281
10202
|
else {
|
|
10282
|
-
inputEl.value =
|
|
10203
|
+
inputEl.value = colVal;
|
|
10283
10204
|
}
|
|
10284
10205
|
_this.element.removeAttribute(lib_public_api/* eqDragManager.DRAG_DISABLED_ATTR */.Yy.DRAG_DISABLED_ATTR);
|
|
10285
10206
|
}
|
|
@@ -10332,31 +10253,30 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10332
10253
|
}
|
|
10333
10254
|
return exprBlock;
|
|
10334
10255
|
};
|
|
10335
|
-
|
|
10256
|
+
EditableColumnRendererCP.prototype.changeTypeToSimple = function () {
|
|
10336
10257
|
var query = this.column.getQuery();
|
|
10337
10258
|
query.changeColumnType(this.column, external_easyqueryCore_.ExprTag.EntityAttribute);
|
|
10338
10259
|
this.fireColumnChanged();
|
|
10339
10260
|
};
|
|
10340
|
-
|
|
10341
|
-
return
|
|
10261
|
+
EditableColumnRendererCP.prototype.getColumnValue = function () {
|
|
10262
|
+
return '';
|
|
10342
10263
|
};
|
|
10343
|
-
|
|
10344
|
-
return this.column.expr.sql;
|
|
10264
|
+
EditableColumnRendererCP.prototype.setColumnValue = function (value) {
|
|
10345
10265
|
};
|
|
10346
|
-
|
|
10266
|
+
EditableColumnRendererCP.prototype.getUIS = function () {
|
|
10347
10267
|
return true;
|
|
10348
10268
|
};
|
|
10349
|
-
|
|
10269
|
+
EditableColumnRendererCP.prototype.changeTypeHandler = function (ev) {
|
|
10350
10270
|
this.changeTypeToSimple();
|
|
10351
10271
|
};
|
|
10352
|
-
|
|
10272
|
+
EditableColumnRendererCP.prototype.processExtraButtonMenuItems = function (action, evt) {
|
|
10353
10273
|
this.changeTypeToSimple();
|
|
10354
10274
|
return true;
|
|
10355
10275
|
};
|
|
10356
|
-
|
|
10276
|
+
EditableColumnRendererCP.prototype.createFunctionMenu = function () {
|
|
10357
10277
|
// Nothing TO DO
|
|
10358
10278
|
};
|
|
10359
|
-
|
|
10279
|
+
EditableColumnRendererCP.prototype.getExtraButtonMenuItems = function () {
|
|
10360
10280
|
return [{
|
|
10361
10281
|
id: '__group',
|
|
10362
10282
|
text: public_api/* i18n.getText */.ag.getText('ColTypeGroup'),
|
|
@@ -10366,7 +10286,7 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10366
10286
|
}]
|
|
10367
10287
|
}];
|
|
10368
10288
|
};
|
|
10369
|
-
|
|
10289
|
+
EditableColumnRendererCP.prototype.createDataTypeMenu = function () {
|
|
10370
10290
|
var items = [];
|
|
10371
10291
|
for (var typeItem in public_api/* DataType */.g) {
|
|
10372
10292
|
if (!isNaN(Number(typeItem))) {
|
|
@@ -10389,8 +10309,72 @@ var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
|
10389
10309
|
};
|
|
10390
10310
|
this.dataTypeMenu = new PopupMenu(menuOptions);
|
|
10391
10311
|
};
|
|
10312
|
+
return EditableColumnRendererCP;
|
|
10313
|
+
}(AttrColumnRendererCP));
|
|
10314
|
+
var CustomSqlColumnRendererCP = /** @class */ (function (_super) {
|
|
10315
|
+
editable_column_renderer_cp_extends(CustomSqlColumnRendererCP, _super);
|
|
10316
|
+
function CustomSqlColumnRendererCP() {
|
|
10317
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
10318
|
+
}
|
|
10319
|
+
Object.defineProperty(CustomSqlColumnRendererCP.prototype, "columnEnabled", {
|
|
10320
|
+
get: function () {
|
|
10321
|
+
return this.panel.areCustomExpressionsAllowed() ? this.column.enabled : false;
|
|
10322
|
+
},
|
|
10323
|
+
set: function (value) {
|
|
10324
|
+
if (this.panel.areCustomExpressionsAllowed()) {
|
|
10325
|
+
this.column.enabled = value;
|
|
10326
|
+
}
|
|
10327
|
+
else {
|
|
10328
|
+
this.column.enabled = false;
|
|
10329
|
+
}
|
|
10330
|
+
},
|
|
10331
|
+
enumerable: false,
|
|
10332
|
+
configurable: true
|
|
10333
|
+
});
|
|
10334
|
+
CustomSqlColumnRendererCP.prototype.renderColumnTypeButton = function () {
|
|
10335
|
+
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
10336
|
+
if (button) {
|
|
10337
|
+
button.firstElementChild.classList.add('aggregated');
|
|
10338
|
+
button.firstElementChild.setAttribute('title', public_api/* i18n.getText */.ag.getText('ButtonToSimple'));
|
|
10339
|
+
}
|
|
10340
|
+
return button;
|
|
10341
|
+
};
|
|
10342
|
+
CustomSqlColumnRendererCP.prototype.getColumnValue = function () {
|
|
10343
|
+
return this.column.expr.sql;
|
|
10344
|
+
};
|
|
10345
|
+
CustomSqlColumnRendererCP.prototype.setColumnValue = function (value) {
|
|
10346
|
+
this.column.expr.sql = value;
|
|
10347
|
+
};
|
|
10348
|
+
CustomSqlColumnRendererCP.prototype.getDefaultValue = function () {
|
|
10349
|
+
return this.column.expr.sql;
|
|
10350
|
+
};
|
|
10392
10351
|
return CustomSqlColumnRendererCP;
|
|
10393
|
-
}(
|
|
10352
|
+
}(EditableColumnRendererCP));
|
|
10353
|
+
|
|
10354
|
+
var ConstColumnRendererCP = /** @class */ (function (_super) {
|
|
10355
|
+
editable_column_renderer_cp_extends(ConstColumnRendererCP, _super);
|
|
10356
|
+
function ConstColumnRendererCP() {
|
|
10357
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
10358
|
+
}
|
|
10359
|
+
ConstColumnRendererCP.prototype.renderColumnTypeButton = function () {
|
|
10360
|
+
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
10361
|
+
if (button) {
|
|
10362
|
+
button.firstElementChild.classList.add('aggregated');
|
|
10363
|
+
button.firstElementChild.setAttribute('title', public_api/* i18n.getText */.ag.getText('ButtonToSimple'));
|
|
10364
|
+
}
|
|
10365
|
+
return button;
|
|
10366
|
+
};
|
|
10367
|
+
ConstColumnRendererCP.prototype.getColumnValue = function () {
|
|
10368
|
+
return this.column.expr.value;
|
|
10369
|
+
};
|
|
10370
|
+
ConstColumnRendererCP.prototype.setColumnValue = function (value) {
|
|
10371
|
+
this.column.expr.setValue(value);
|
|
10372
|
+
};
|
|
10373
|
+
ConstColumnRendererCP.prototype.getDefaultValue = function () {
|
|
10374
|
+
return this.column.expr.value;
|
|
10375
|
+
};
|
|
10376
|
+
return ConstColumnRendererCP;
|
|
10377
|
+
}(EditableColumnRendererCP));
|
|
10394
10378
|
|
|
10395
10379
|
|
|
10396
10380
|
;// CONCATENATED MODULE: ./src/widgets/columns_panel.ts
|
|
@@ -10639,7 +10623,15 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
10639
10623
|
var index = query.getColumns().indexOf(column);
|
|
10640
10624
|
var newEl = _this.addColumnElement(column, index);
|
|
10641
10625
|
if (isFocusInside) {
|
|
10642
|
-
newEl.querySelector(
|
|
10626
|
+
var focusElem = newEl.querySelector('a');
|
|
10627
|
+
if (focusElem) {
|
|
10628
|
+
try {
|
|
10629
|
+
focusElem.focus();
|
|
10630
|
+
}
|
|
10631
|
+
catch (_a) {
|
|
10632
|
+
//do nothing
|
|
10633
|
+
}
|
|
10634
|
+
}
|
|
10643
10635
|
}
|
|
10644
10636
|
};
|
|
10645
10637
|
if (Array.isArray(columns)) {
|
|
@@ -10739,7 +10731,13 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
10739
10731
|
};
|
|
10740
10732
|
ColumnsPanel.prototype.setOptions = function (options) {
|
|
10741
10733
|
public_api/* utils.assignDeep */.P6.assignDeep(this.options, options);
|
|
10742
|
-
this.
|
|
10734
|
+
this.context.options.allowCustomExpressions = options.allowCustomExpressions;
|
|
10735
|
+
if (options.attrElementFormat) {
|
|
10736
|
+
this.context.options.attributeFormat = options.attrElementFormat;
|
|
10737
|
+
}
|
|
10738
|
+
if (options.titleElementFormat) {
|
|
10739
|
+
this.context.options.columnTitleFormat = options.titleElementFormat;
|
|
10740
|
+
}
|
|
10743
10741
|
if (browser_utils/* browserUtils.isMobileMode */.z.isMobileMode()) {
|
|
10744
10742
|
this.options.buttons = ["menu"];
|
|
10745
10743
|
this.options.showHeader = false;
|
|
@@ -10828,66 +10826,36 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
10828
10826
|
.data("show-buttons", "");
|
|
10829
10827
|
}
|
|
10830
10828
|
};
|
|
10831
|
-
ColumnsPanel.prototype.addNewColumn = function (
|
|
10832
|
-
var _this = this;
|
|
10829
|
+
ColumnsPanel.prototype.addNewColumn = function (attrs, index) {
|
|
10833
10830
|
var model = this.getContext().getModel();
|
|
10834
10831
|
var query = this.getQuery();
|
|
10835
|
-
|
|
10836
|
-
var
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
attribute = model.getAttributeById(attrid);
|
|
10844
|
-
if (!attribute || !attribute.useInResult) {
|
|
10845
|
-
return null;
|
|
10846
|
-
}
|
|
10847
|
-
}
|
|
10848
|
-
else
|
|
10849
|
-
return null;
|
|
10850
|
-
}
|
|
10851
|
-
var column = query.createColumn();
|
|
10852
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
10853
|
-
column.sorting = external_easyqueryCore_.SortDirection.None;
|
|
10854
|
-
column.sortIndex = -1;
|
|
10855
|
-
column.expr.tag = external_easyqueryCore_.ExprTag.EntityAttribute;
|
|
10856
|
-
column.expr.kind = external_easyqueryCore_.DataKind.Attribute;
|
|
10857
|
-
column.expr.dataType = attribute.dataType;
|
|
10858
|
-
column.expr.setValue(attrid, true);
|
|
10859
|
-
column.params.concat(attribute.params);
|
|
10860
|
-
return column;
|
|
10861
|
-
};
|
|
10862
|
-
var colToAdd, col;
|
|
10863
|
-
if (Array.isArray(attrId)) {
|
|
10864
|
-
colToAdd = [];
|
|
10865
|
-
for (var i = 0; i < attrId.length; i++) {
|
|
10866
|
-
col = getColumnByAttrId(attrId[i]);
|
|
10832
|
+
if (Array.isArray(attrs)) {
|
|
10833
|
+
var col = null;
|
|
10834
|
+
var cols = [];
|
|
10835
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
10836
|
+
col = query.addColumn({
|
|
10837
|
+
attributeId: attrs[i],
|
|
10838
|
+
index: index
|
|
10839
|
+
}, true);
|
|
10867
10840
|
if (col) {
|
|
10868
|
-
|
|
10841
|
+
cols.push(col);
|
|
10869
10842
|
}
|
|
10870
10843
|
}
|
|
10844
|
+
query.fireChangedEvent({
|
|
10845
|
+
part: external_easyqueryCore_.QueryChangePart.Columns,
|
|
10846
|
+
action: external_easyqueryCore_.QueryChangeAction.Add,
|
|
10847
|
+
changee: cols,
|
|
10848
|
+
source: this
|
|
10849
|
+
});
|
|
10850
|
+
return cols;
|
|
10871
10851
|
}
|
|
10872
|
-
else
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
var query = this.getQuery();
|
|
10879
|
-
if (!query) {
|
|
10880
|
-
return;
|
|
10881
|
-
}
|
|
10882
|
-
if (Array.isArray(column))
|
|
10883
|
-
column = this.checkColumnsArray(column);
|
|
10884
|
-
else
|
|
10885
|
-
column = this.checkColumn(column);
|
|
10886
|
-
if (!column || (Array.isArray(column) && column.length == 0)) {
|
|
10887
|
-
return;
|
|
10852
|
+
else {
|
|
10853
|
+
var col = query.addColumn({
|
|
10854
|
+
attributeId: attrs,
|
|
10855
|
+
index: index
|
|
10856
|
+
});
|
|
10857
|
+
return col;
|
|
10888
10858
|
}
|
|
10889
|
-
query.addColumnObj(column, index, self);
|
|
10890
|
-
query.fireColumnsChangedEvent(external_easyqueryCore_.QueryChangeAction.Add, column);
|
|
10891
10859
|
};
|
|
10892
10860
|
//adds one column to the panel on the specified position
|
|
10893
10861
|
ColumnsPanel.prototype.addColumnElement = function (column, index) {
|
|
@@ -10937,23 +10905,19 @@ var ColumnsPanel = /** @class */ (function (_super) {
|
|
|
10937
10905
|
}
|
|
10938
10906
|
return col;
|
|
10939
10907
|
};
|
|
10940
|
-
ColumnsPanel.prototype.getDefaultColumnCaption = function (attr) {
|
|
10941
|
-
var format = this.options.titleElementFormat || this.options.attrElementFormat;
|
|
10942
|
-
var model = this.getContext().getModel();
|
|
10943
|
-
return model.getAttributeText(attr, format);
|
|
10944
|
-
};
|
|
10945
10908
|
ColumnsPanel.prototype.getColumnsBlock = function () {
|
|
10946
10909
|
return this.columnsBlock;
|
|
10947
10910
|
};
|
|
10948
10911
|
ColumnsPanel.prototype.getColumnRenderer = function (column, slot) {
|
|
10949
10912
|
switch (column.expr.tag) {
|
|
10913
|
+
case external_easyqueryCore_.ExprTag.Constant:
|
|
10914
|
+
return new ConstColumnRendererCP(this, column, slot);
|
|
10950
10915
|
case external_easyqueryCore_.ExprTag.AggregateFunction:
|
|
10951
10916
|
return new AggrFuncColumnRendererCP(this, column, slot);
|
|
10952
10917
|
case external_easyqueryCore_.ExprTag.CustomSql:
|
|
10953
10918
|
return new CustomSqlColumnRendererCP(this, column, slot);
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
return new SimpleColumnRendererCP(this, column, slot);
|
|
10919
|
+
default:
|
|
10920
|
+
return new AttrColumnRendererCP(this, column, slot);
|
|
10957
10921
|
}
|
|
10958
10922
|
return null;
|
|
10959
10923
|
};
|
|
@@ -11162,7 +11126,6 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
11162
11126
|
});
|
|
11163
11127
|
ColumnRendererCB.prototype.render = function () {
|
|
11164
11128
|
var _this = this;
|
|
11165
|
-
this.baseAttr = this.getAttribute();
|
|
11166
11129
|
var builder = (0,lib_public_api/* domel */.uC)('div');
|
|
11167
11130
|
builder.data('id', this.column.id);
|
|
11168
11131
|
if (this.element) {
|
|
@@ -11219,10 +11182,6 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
11219
11182
|
ColumnRendererCB.prototype.refresh = function () {
|
|
11220
11183
|
this.render();
|
|
11221
11184
|
};
|
|
11222
|
-
ColumnRendererCB.prototype.getAttribute = function () {
|
|
11223
|
-
var model = this.bar.getContext().getModel();
|
|
11224
|
-
return model.getAttributeByIdSafe(this.column.expr.value);
|
|
11225
|
-
};
|
|
11226
11185
|
ColumnRendererCB.prototype.isEditable = function () {
|
|
11227
11186
|
return this.column.enabled && !this.column.isReadOnly();
|
|
11228
11187
|
};
|
|
@@ -11237,19 +11196,13 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
11237
11196
|
};
|
|
11238
11197
|
ColumnRendererCB.prototype.renderCaptionBlock = function () {
|
|
11239
11198
|
var _this = this;
|
|
11240
|
-
|
|
11241
|
-
this.column.caption = this.getDefaultCaption();
|
|
11242
|
-
}
|
|
11243
|
-
var model = this.column.getModel();
|
|
11244
|
-
var caption = this.baseAttr !== model.nullAttribute
|
|
11245
|
-
? this.column.caption
|
|
11246
|
-
: model.getAttributeText(model.nullAttribute, '{attr}');
|
|
11199
|
+
var caption = this.column.caption;
|
|
11247
11200
|
if (!this.isEditable()) {
|
|
11248
11201
|
return (0,lib_public_api/* domel */.uC)('div')
|
|
11249
11202
|
.addClass("".concat(this.cssPrefix, "-colelement"), "".concat(this.cssPrefix, "-captionelement"))
|
|
11250
11203
|
.addClass(browser_utils/* browserUtils.getMobileCssClass */.z.getMobileCssClass())
|
|
11251
11204
|
.addChild('div', function (b) { return b
|
|
11252
|
-
.title(
|
|
11205
|
+
.title(caption)
|
|
11253
11206
|
.text(caption)
|
|
11254
11207
|
.attr('tabIndex', '0'); })
|
|
11255
11208
|
.toDOM();
|
|
@@ -11422,7 +11375,7 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
11422
11375
|
ColumnRendererCB.prototype.buttonDeleteClickHandler = function (ev) {
|
|
11423
11376
|
ev.stopPropagation();
|
|
11424
11377
|
var query = this.bar.getQuery();
|
|
11425
|
-
query.removeColumn(this.column
|
|
11378
|
+
query.removeColumn(this.column);
|
|
11426
11379
|
query.fireColumnsChangedEvent(external_easyqueryCore_.QueryChangeAction.Delete, this.column);
|
|
11427
11380
|
return false;
|
|
11428
11381
|
};
|
|
@@ -11441,14 +11394,6 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
11441
11394
|
} })
|
|
11442
11395
|
.toDOM();
|
|
11443
11396
|
};
|
|
11444
|
-
ColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
11445
|
-
return this.getDefaultTitleText(this.baseAttr);
|
|
11446
|
-
};
|
|
11447
|
-
ColumnRendererCB.prototype.getDefaultTitleText = function (attr) {
|
|
11448
|
-
var format = this.bar.options.titleElementFormat || this.bar.options.attrElementFormat;
|
|
11449
|
-
var model = this.bar.getContext().getModel();
|
|
11450
|
-
return model.getAttributeText(attr, format);
|
|
11451
|
-
};
|
|
11452
11397
|
ColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
11453
11398
|
var result = "";
|
|
11454
11399
|
result += this.column.enabled ? '' : " ".concat(this.cssPrefix, "-disabled");
|
|
@@ -11687,8 +11632,8 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
11687
11632
|
}());
|
|
11688
11633
|
|
|
11689
11634
|
|
|
11690
|
-
;// CONCATENATED MODULE: ./src/widgets/renderers/columnsbar/
|
|
11691
|
-
var
|
|
11635
|
+
;// CONCATENATED MODULE: ./src/widgets/renderers/columnsbar/attr_column_renderer_cb.ts
|
|
11636
|
+
var attr_column_renderer_cb_extends = (undefined && undefined.__extends) || (function () {
|
|
11692
11637
|
var extendStatics = function (d, b) {
|
|
11693
11638
|
extendStatics = Object.setPrototypeOf ||
|
|
11694
11639
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -11706,23 +11651,29 @@ var columnsbar_simple_column_renderer_extends = (undefined && undefined.__extend
|
|
|
11706
11651
|
|
|
11707
11652
|
|
|
11708
11653
|
|
|
11709
|
-
var
|
|
11710
|
-
|
|
11711
|
-
function
|
|
11654
|
+
var AttrColumnRendererCB = /** @class */ (function (_super) {
|
|
11655
|
+
attr_column_renderer_cb_extends(AttrColumnRendererCB, _super);
|
|
11656
|
+
function AttrColumnRendererCB() {
|
|
11712
11657
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11713
11658
|
}
|
|
11714
|
-
|
|
11659
|
+
AttrColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
11715
11660
|
return "".concat(_super.prototype.getClassesToAdd.call(this), " ").concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr");
|
|
11716
11661
|
};
|
|
11717
|
-
|
|
11662
|
+
AttrColumnRendererCB.prototype.baseExpressionItemSelectedCallback = function (data, item) {
|
|
11718
11663
|
var attrid = data.id;
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
this.
|
|
11722
|
-
this.
|
|
11664
|
+
var context = this.bar.getContext();
|
|
11665
|
+
var attr = context.getModel().getAttributeById(attrid);
|
|
11666
|
+
this.updateBaseAttr(attr);
|
|
11667
|
+
this.column.caption = context.getDefaultColumnCaption(this.column);
|
|
11723
11668
|
this.fireColumnChanged();
|
|
11669
|
+
return false;
|
|
11724
11670
|
};
|
|
11725
|
-
|
|
11671
|
+
AttrColumnRendererCB.prototype.updateBaseAttr = function (attr) {
|
|
11672
|
+
this.column.expr.setValue(attr.id, true);
|
|
11673
|
+
this.column.expr.baseAttrId = attr.id;
|
|
11674
|
+
this.column.expr.dataType = attr.dataType;
|
|
11675
|
+
};
|
|
11676
|
+
AttrColumnRendererCB.prototype.getUIS = function () {
|
|
11726
11677
|
var arg = this.column.expr.args[0];
|
|
11727
11678
|
if (arg) {
|
|
11728
11679
|
var model = this.bar.getContext().getModel();
|
|
@@ -11732,17 +11683,17 @@ var SimpleColumnRendererCB = /** @class */ (function (_super) {
|
|
|
11732
11683
|
return true;
|
|
11733
11684
|
}
|
|
11734
11685
|
};
|
|
11735
|
-
|
|
11686
|
+
AttrColumnRendererCB.prototype.changeTypeToCustomSql = function () {
|
|
11736
11687
|
var query = this.column.getQuery();
|
|
11737
11688
|
query.changeColumnType(this.column, external_easyqueryCore_.ExprTag.CustomSql);
|
|
11738
11689
|
this.fireColumnChanged();
|
|
11739
11690
|
};
|
|
11740
|
-
|
|
11691
|
+
AttrColumnRendererCB.prototype.changeTypeToAggr = function (funcId) {
|
|
11741
11692
|
var query = this.column.getQuery();
|
|
11742
11693
|
query.changeColumnType(this.column, external_easyqueryCore_.ExprTag.AggregateFunction, { funcId: funcId });
|
|
11743
11694
|
this.fireColumnChanged();
|
|
11744
11695
|
};
|
|
11745
|
-
|
|
11696
|
+
AttrColumnRendererCB.prototype.changeColumnTypeHandler = function (ev) {
|
|
11746
11697
|
var _this = this;
|
|
11747
11698
|
this.functionMenu.showMenu({
|
|
11748
11699
|
anchor: ev.target,
|
|
@@ -11764,12 +11715,12 @@ var SimpleColumnRendererCB = /** @class */ (function (_super) {
|
|
|
11764
11715
|
}
|
|
11765
11716
|
});
|
|
11766
11717
|
};
|
|
11767
|
-
return
|
|
11718
|
+
return AttrColumnRendererCB;
|
|
11768
11719
|
}(ColumnRendererCB));
|
|
11769
11720
|
|
|
11770
11721
|
|
|
11771
|
-
;// CONCATENATED MODULE: ./src/widgets/renderers/columnsbar/
|
|
11772
|
-
var
|
|
11722
|
+
;// CONCATENATED MODULE: ./src/widgets/renderers/columnsbar/aggrfunc_column_renderer_cb.ts
|
|
11723
|
+
var aggrfunc_column_renderer_cb_extends = (undefined && undefined.__extends) || (function () {
|
|
11773
11724
|
var extendStatics = function (d, b) {
|
|
11774
11725
|
extendStatics = Object.setPrototypeOf ||
|
|
11775
11726
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -11788,23 +11739,13 @@ var columnsbar_aggrfunc_column_renderer_extends = (undefined && undefined.__exte
|
|
|
11788
11739
|
|
|
11789
11740
|
|
|
11790
11741
|
var AggrFuncColumnRendererCB = /** @class */ (function (_super) {
|
|
11791
|
-
|
|
11742
|
+
aggrfunc_column_renderer_cb_extends(AggrFuncColumnRendererCB, _super);
|
|
11792
11743
|
function AggrFuncColumnRendererCB() {
|
|
11793
11744
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11794
11745
|
}
|
|
11795
11746
|
AggrFuncColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
11796
11747
|
return "".concat(_super.prototype.getClassesToAdd.call(this), " ").concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-aggr");
|
|
11797
11748
|
};
|
|
11798
|
-
AggrFuncColumnRendererCB.prototype.getAttribute = function () {
|
|
11799
|
-
return this.bar
|
|
11800
|
-
.getContext()
|
|
11801
|
-
.getModel()
|
|
11802
|
-
.getAttributeByIdSafe(this.column.expr.args[0].value);
|
|
11803
|
-
};
|
|
11804
|
-
AggrFuncColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
11805
|
-
return this.getDefaultTitleText(this.baseAttr) + ' '
|
|
11806
|
-
+ this.bar.getContext().getModel().getAggrFunctionCaption(this.column.expr.func);
|
|
11807
|
-
};
|
|
11808
11749
|
AggrFuncColumnRendererCB.prototype.renderColumnTypeButton = function () {
|
|
11809
11750
|
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
11810
11751
|
if (button) {
|
|
@@ -11813,12 +11754,9 @@ var AggrFuncColumnRendererCB = /** @class */ (function (_super) {
|
|
|
11813
11754
|
}
|
|
11814
11755
|
return button;
|
|
11815
11756
|
};
|
|
11816
|
-
AggrFuncColumnRendererCB.prototype.
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
this.column.expr.args[0].setValue(attrid, true);
|
|
11820
|
-
this.column.caption = '';
|
|
11821
|
-
this.fireColumnChanged();
|
|
11757
|
+
AggrFuncColumnRendererCB.prototype.updateBaseAttr = function (attr) {
|
|
11758
|
+
this.column.expr.args[0].setValue(attr.id, true);
|
|
11759
|
+
this.column.expr.baseAttrId = attr.id;
|
|
11822
11760
|
};
|
|
11823
11761
|
AggrFuncColumnRendererCB.prototype.changeTypeToSimple = function () {
|
|
11824
11762
|
var query = this.column.getQuery();
|
|
@@ -11829,7 +11767,110 @@ var AggrFuncColumnRendererCB = /** @class */ (function (_super) {
|
|
|
11829
11767
|
this.changeTypeToSimple();
|
|
11830
11768
|
};
|
|
11831
11769
|
return AggrFuncColumnRendererCB;
|
|
11832
|
-
}(
|
|
11770
|
+
}(AttrColumnRendererCB));
|
|
11771
|
+
|
|
11772
|
+
|
|
11773
|
+
;// CONCATENATED MODULE: ./src/widgets/renderers/columnsbar/editable_column_renderer_cb.ts
|
|
11774
|
+
var editable_column_renderer_cb_extends = (undefined && undefined.__extends) || (function () {
|
|
11775
|
+
var extendStatics = function (d, b) {
|
|
11776
|
+
extendStatics = Object.setPrototypeOf ||
|
|
11777
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
11778
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
11779
|
+
return extendStatics(d, b);
|
|
11780
|
+
};
|
|
11781
|
+
return function (d, b) {
|
|
11782
|
+
if (typeof b !== "function" && b !== null)
|
|
11783
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11784
|
+
extendStatics(d, b);
|
|
11785
|
+
function __() { this.constructor = d; }
|
|
11786
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
11787
|
+
};
|
|
11788
|
+
})();
|
|
11789
|
+
|
|
11790
|
+
|
|
11791
|
+
var EditableColumnRendererCB = /** @class */ (function (_super) {
|
|
11792
|
+
editable_column_renderer_cb_extends(EditableColumnRendererCB, _super);
|
|
11793
|
+
function EditableColumnRendererCB() {
|
|
11794
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11795
|
+
}
|
|
11796
|
+
EditableColumnRendererCB.prototype.getClassesToAdd = function () {
|
|
11797
|
+
return "".concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr") + _super.prototype.getClassesToAdd.call(this);
|
|
11798
|
+
};
|
|
11799
|
+
EditableColumnRendererCB.prototype.renderColumnTypeButton = function () {
|
|
11800
|
+
var button = _super.prototype.renderColumnTypeButton.call(this);
|
|
11801
|
+
if (button) {
|
|
11802
|
+
button.classList.add('aggregated');
|
|
11803
|
+
button.title = external_easyqueryCore_.i18n.getText('ButtonToSimple');
|
|
11804
|
+
}
|
|
11805
|
+
return button;
|
|
11806
|
+
};
|
|
11807
|
+
EditableColumnRendererCB.prototype.changeTypeToSimple = function () {
|
|
11808
|
+
var query = this.column.getQuery();
|
|
11809
|
+
query.changeColumnType(this.column, external_easyqueryCore_.ExprTag.EntityAttribute);
|
|
11810
|
+
this.fireColumnChanged();
|
|
11811
|
+
};
|
|
11812
|
+
EditableColumnRendererCB.prototype.getColumnValue = function () {
|
|
11813
|
+
return '';
|
|
11814
|
+
};
|
|
11815
|
+
EditableColumnRendererCB.prototype.setColumnValue = function (value) {
|
|
11816
|
+
};
|
|
11817
|
+
EditableColumnRendererCB.prototype.getUIS = function () {
|
|
11818
|
+
return true;
|
|
11819
|
+
};
|
|
11820
|
+
EditableColumnRendererCB.prototype.changeColumnTypeHandler = function (ev) {
|
|
11821
|
+
this.changeTypeToSimple();
|
|
11822
|
+
};
|
|
11823
|
+
return EditableColumnRendererCB;
|
|
11824
|
+
}(ColumnRendererCB));
|
|
11825
|
+
|
|
11826
|
+
var CustomSqlColumnRendererCB = /** @class */ (function (_super) {
|
|
11827
|
+
editable_column_renderer_cb_extends(CustomSqlColumnRendererCB, _super);
|
|
11828
|
+
function CustomSqlColumnRendererCB() {
|
|
11829
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11830
|
+
}
|
|
11831
|
+
Object.defineProperty(CustomSqlColumnRendererCB.prototype, "columnEnabled", {
|
|
11832
|
+
get: function () {
|
|
11833
|
+
return this.bar.areCustomExpressionsAllowed() ? this.column.enabled : false;
|
|
11834
|
+
},
|
|
11835
|
+
set: function (value) {
|
|
11836
|
+
if (this.bar.areCustomExpressionsAllowed()) {
|
|
11837
|
+
this.column.enabled = value;
|
|
11838
|
+
}
|
|
11839
|
+
else {
|
|
11840
|
+
this.column.enabled = false;
|
|
11841
|
+
}
|
|
11842
|
+
},
|
|
11843
|
+
enumerable: false,
|
|
11844
|
+
configurable: true
|
|
11845
|
+
});
|
|
11846
|
+
CustomSqlColumnRendererCB.prototype.getColumnValue = function () {
|
|
11847
|
+
return this.column.expr.sql;
|
|
11848
|
+
};
|
|
11849
|
+
CustomSqlColumnRendererCB.prototype.setColumnValue = function (value) {
|
|
11850
|
+
this.column.expr.sql = value;
|
|
11851
|
+
};
|
|
11852
|
+
CustomSqlColumnRendererCB.prototype.getDefaultValue = function () {
|
|
11853
|
+
return this.column.expr.sql;
|
|
11854
|
+
};
|
|
11855
|
+
return CustomSqlColumnRendererCB;
|
|
11856
|
+
}(EditableColumnRendererCB));
|
|
11857
|
+
|
|
11858
|
+
var ConstColumnRendererCB = /** @class */ (function (_super) {
|
|
11859
|
+
editable_column_renderer_cb_extends(ConstColumnRendererCB, _super);
|
|
11860
|
+
function ConstColumnRendererCB() {
|
|
11861
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11862
|
+
}
|
|
11863
|
+
ConstColumnRendererCB.prototype.getColumnValue = function () {
|
|
11864
|
+
return this.column.expr.value;
|
|
11865
|
+
};
|
|
11866
|
+
ConstColumnRendererCB.prototype.setColumnValue = function (value) {
|
|
11867
|
+
this.column.expr.setValue(value);
|
|
11868
|
+
};
|
|
11869
|
+
ConstColumnRendererCB.prototype.getDefaultValue = function () {
|
|
11870
|
+
return this.column.expr.value;
|
|
11871
|
+
};
|
|
11872
|
+
return ConstColumnRendererCB;
|
|
11873
|
+
}(EditableColumnRendererCB));
|
|
11833
11874
|
|
|
11834
11875
|
|
|
11835
11876
|
;// CONCATENATED MODULE: ./src/widgets/columns_bar.ts
|
|
@@ -11857,6 +11898,7 @@ var columns_bar_extends = (undefined && undefined.__extends) || (function () {
|
|
|
11857
11898
|
|
|
11858
11899
|
|
|
11859
11900
|
|
|
11901
|
+
|
|
11860
11902
|
var ColumnsBar = /** @class */ (function (_super) {
|
|
11861
11903
|
columns_bar_extends(ColumnsBar, _super);
|
|
11862
11904
|
function ColumnsBar(slot, customQuery) {
|
|
@@ -11871,8 +11913,6 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
11871
11913
|
allowDuplicates: true,
|
|
11872
11914
|
allowCustomExpressions: false,
|
|
11873
11915
|
allowSorting: true,
|
|
11874
|
-
attrElementFormat: '{entity} {attr}',
|
|
11875
|
-
titleElementFormat: null,
|
|
11876
11916
|
alwaysShowButtons: false,
|
|
11877
11917
|
accentActiveColumn: true,
|
|
11878
11918
|
allowDragDrop: true,
|
|
@@ -11925,6 +11965,12 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
11925
11965
|
var _this = this;
|
|
11926
11966
|
_super.prototype.init.call(this, context, options);
|
|
11927
11967
|
this.setOptions(options);
|
|
11968
|
+
if (options.attrElementFormat) {
|
|
11969
|
+
this.context.options.attributeFormat = options.attrElementFormat;
|
|
11970
|
+
}
|
|
11971
|
+
if (options.titleElementFormat) {
|
|
11972
|
+
this.context.options.columnTitleFormat = options.titleElementFormat;
|
|
11973
|
+
}
|
|
11928
11974
|
this.detachQueryObserver();
|
|
11929
11975
|
this.attachQueryObserver();
|
|
11930
11976
|
lib_public_api/* eqDragManager.removeDropContainer */.Yy.removeDropContainer(this.slot);
|
|
@@ -12055,6 +12101,7 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
12055
12101
|
};
|
|
12056
12102
|
ColumnsBar.prototype.setOptions = function (options) {
|
|
12057
12103
|
this.options = public_api/* utils.assignDeep */.P6.assignDeep(this.options, options);
|
|
12104
|
+
this.getContext().options.allowCustomExpressions = options.allowCustomExpressions;
|
|
12058
12105
|
};
|
|
12059
12106
|
ColumnsBar.prototype.showLandingSlot = function (pageX, pageY) {
|
|
12060
12107
|
var elements = this.columnsBlock.querySelectorAll("[class*=".concat(this.cssPrefix, "-row]"));
|
|
@@ -12306,64 +12353,41 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
12306
12353
|
};
|
|
12307
12354
|
ColumnsBar.prototype.getColumnRenderer = function (column, slot) {
|
|
12308
12355
|
switch (column.expr.tag) {
|
|
12356
|
+
case external_easyqueryCore_.ExprTag.Constant:
|
|
12357
|
+
return new ConstColumnRendererCB(this, column, slot);
|
|
12309
12358
|
case external_easyqueryCore_.ExprTag.AggregateFunction:
|
|
12310
12359
|
return new AggrFuncColumnRendererCB(this, column, slot);
|
|
12311
12360
|
case external_easyqueryCore_.ExprTag.CustomSql:
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
return new SimpleColumnRendererCB(this, column, slot);
|
|
12361
|
+
return new CustomSqlColumnRendererCB(this, column, slot);
|
|
12362
|
+
default:
|
|
12363
|
+
return new AttrColumnRendererCB(this, column, slot);
|
|
12316
12364
|
}
|
|
12317
12365
|
return null;
|
|
12318
12366
|
};
|
|
12319
|
-
ColumnsBar.prototype.addNewColumn = function (
|
|
12320
|
-
var _this = this;
|
|
12367
|
+
ColumnsBar.prototype.addNewColumn = function (attrs, index) {
|
|
12321
12368
|
var model = this.getContext().getModel();
|
|
12322
12369
|
var query = this.getQuery();
|
|
12323
|
-
|
|
12324
|
-
var
|
|
12325
|
-
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
attribute = model.getAttributeById(attrid);
|
|
12332
|
-
if (!attribute || !attribute.useInResult) {
|
|
12333
|
-
return null;
|
|
12334
|
-
}
|
|
12335
|
-
}
|
|
12336
|
-
else
|
|
12337
|
-
return null;
|
|
12338
|
-
}
|
|
12339
|
-
var column = query.createColumn();
|
|
12340
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
12341
|
-
column.sorting = external_easyqueryCore_.SortDirection.None;
|
|
12342
|
-
column.sortIndex = -1;
|
|
12343
|
-
column.expr.tag = external_easyqueryCore_.ExprTag.EntityAttribute;
|
|
12344
|
-
column.expr.kind = external_easyqueryCore_.DataKind.Attribute;
|
|
12345
|
-
column.expr.dataType = attribute.dataType;
|
|
12346
|
-
column.expr.setValue(attrid, true);
|
|
12347
|
-
column.params.concat(attribute.params);
|
|
12348
|
-
return column;
|
|
12349
|
-
};
|
|
12350
|
-
if (!this.getQuery()) {
|
|
12351
|
-
return;
|
|
12352
|
-
}
|
|
12353
|
-
var colToAdd, col;
|
|
12354
|
-
if (Array.isArray(attrId)) {
|
|
12355
|
-
colToAdd = [];
|
|
12356
|
-
for (var i = 0; i < attrId.length; i++) {
|
|
12357
|
-
col = getColumnByAttrId(attrId[i]);
|
|
12370
|
+
if (Array.isArray(attrs)) {
|
|
12371
|
+
var col = null;
|
|
12372
|
+
var cols = [];
|
|
12373
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
12374
|
+
col = query.addColumn({
|
|
12375
|
+
attributeId: attrs[i],
|
|
12376
|
+
index: index
|
|
12377
|
+
}, true);
|
|
12358
12378
|
if (col) {
|
|
12359
|
-
|
|
12379
|
+
cols.push(col);
|
|
12360
12380
|
}
|
|
12361
12381
|
}
|
|
12382
|
+
return cols;
|
|
12383
|
+
}
|
|
12384
|
+
else {
|
|
12385
|
+
var col = query.addColumn({
|
|
12386
|
+
attributeId: attrs,
|
|
12387
|
+
index: index
|
|
12388
|
+
});
|
|
12389
|
+
return col;
|
|
12362
12390
|
}
|
|
12363
|
-
else
|
|
12364
|
-
colToAdd = getColumnByAttrId(attrId);
|
|
12365
|
-
this.addColumn(colToAdd, index);
|
|
12366
|
-
return colToAdd;
|
|
12367
12391
|
};
|
|
12368
12392
|
ColumnsBar.prototype.toggleColumnPicked = function (column) {
|
|
12369
12393
|
var el;
|
|
@@ -12388,25 +12412,6 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
12388
12412
|
.data("show-buttons", "");
|
|
12389
12413
|
}
|
|
12390
12414
|
};
|
|
12391
|
-
ColumnsBar.prototype.addColumn = function (column, index) {
|
|
12392
|
-
var query = this.getQuery();
|
|
12393
|
-
if (!query) {
|
|
12394
|
-
return;
|
|
12395
|
-
}
|
|
12396
|
-
if (Array.isArray(column))
|
|
12397
|
-
column = this.checkColumnsArray(column);
|
|
12398
|
-
else
|
|
12399
|
-
column = this.checkColumn(column);
|
|
12400
|
-
if (!column || (Array.isArray(column) && column.length == 0)) {
|
|
12401
|
-
return;
|
|
12402
|
-
}
|
|
12403
|
-
query.addColumnObj(column, index, self);
|
|
12404
|
-
query.fireChangedEvent({
|
|
12405
|
-
part: external_easyqueryCore_.QueryChangePart.Columns,
|
|
12406
|
-
action: external_easyqueryCore_.QueryChangeAction.Add,
|
|
12407
|
-
changee: column
|
|
12408
|
-
});
|
|
12409
|
-
};
|
|
12410
12415
|
//adds one column to the bar on the specified position
|
|
12411
12416
|
ColumnsBar.prototype.addColumnElement = function (column, index) {
|
|
12412
12417
|
var rows = this.columnsBlock.querySelectorAll("[class*=".concat(this.cssPrefix, "-row]"));
|
|
@@ -12449,11 +12454,6 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
12449
12454
|
}
|
|
12450
12455
|
return col;
|
|
12451
12456
|
};
|
|
12452
|
-
ColumnsBar.prototype.getDefaultColumnCaption = function (attr) {
|
|
12453
|
-
var format = this.options.titleElementFormat || this.options.attrElementFormat;
|
|
12454
|
-
var model = this.getContext().getModel();
|
|
12455
|
-
return model.getAttributeText(attr, format);
|
|
12456
|
-
};
|
|
12457
12457
|
ColumnsBar.prototype.getColumnsBlock = function () {
|
|
12458
12458
|
return this.columnsBlock;
|
|
12459
12459
|
};
|
|
@@ -12555,13 +12555,13 @@ var ColumnsBar = /** @class */ (function (_super) {
|
|
|
12555
12555
|
};
|
|
12556
12556
|
ColumnsBar.prototype.areCustomExpressionsAllowed = function () {
|
|
12557
12557
|
var query = this.getQuery();
|
|
12558
|
-
return query.isEx() && this.options.allowCustomExpressions;
|
|
12558
|
+
return query.isEx() && this.getContext().options.allowCustomExpressions;
|
|
12559
12559
|
};
|
|
12560
12560
|
ColumnsBar.globalCounter = 0;
|
|
12561
12561
|
return ColumnsBar;
|
|
12562
12562
|
}(external_easyqueryCore_.Widget));
|
|
12563
12563
|
|
|
12564
|
-
;// CONCATENATED MODULE: ./src/widgets/renderers/sortingbar/
|
|
12564
|
+
;// CONCATENATED MODULE: ./src/widgets/renderers/sortingbar/column_renderer_sb.ts
|
|
12565
12565
|
|
|
12566
12566
|
|
|
12567
12567
|
|
|
@@ -12585,7 +12585,6 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
12585
12585
|
});
|
|
12586
12586
|
ColumnRendererSB.prototype.render = function () {
|
|
12587
12587
|
var _this = this;
|
|
12588
|
-
this.baseAttr = this.getAttribute();
|
|
12589
12588
|
var builder = (0,lib_public_api/* domel */.uC)('div');
|
|
12590
12589
|
builder.data('id', this.column.id);
|
|
12591
12590
|
if (this.element) {
|
|
@@ -12636,9 +12635,6 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
12636
12635
|
};
|
|
12637
12636
|
ColumnRendererSB.prototype.renderCaptionBlock = function () {
|
|
12638
12637
|
var _this = this;
|
|
12639
|
-
if (!this.column.caption || this.column.caption == '') {
|
|
12640
|
-
this.column.caption = this.getDefaultCaption();
|
|
12641
|
-
}
|
|
12642
12638
|
function getArrow(sd) {
|
|
12643
12639
|
switch (sd) {
|
|
12644
12640
|
case external_easyqueryCore_.SortDirection.Ascending:
|
|
@@ -12708,7 +12704,7 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
12708
12704
|
if (data.id == 'None' || data.id == "Ascending" || data.id == "Descending") {
|
|
12709
12705
|
var query = _this.bar.getContext().getQuery();
|
|
12710
12706
|
if (_this.column.isJustSorted() && data.id == 'None') {
|
|
12711
|
-
query.removeColumn(_this.column
|
|
12707
|
+
query.removeColumn(_this.column);
|
|
12712
12708
|
query.fireColumnsChangedEvent(external_easyqueryCore_.QueryChangeAction.Delete, _this.column, true);
|
|
12713
12709
|
}
|
|
12714
12710
|
else {
|
|
@@ -12727,14 +12723,6 @@ var ColumnRendererSB = /** @class */ (function () {
|
|
|
12727
12723
|
});
|
|
12728
12724
|
return false;
|
|
12729
12725
|
};
|
|
12730
|
-
ColumnRendererSB.prototype.getDefaultCaption = function () {
|
|
12731
|
-
return this.getDefaultTitleText(this.baseAttr);
|
|
12732
|
-
};
|
|
12733
|
-
ColumnRendererSB.prototype.getDefaultTitleText = function (attr) {
|
|
12734
|
-
var format = this.bar.options.titleElementFormat || this.bar.options.attrElementFormat;
|
|
12735
|
-
var model = this.bar.getContext().getModel();
|
|
12736
|
-
return model.getAttributeText(attr, format);
|
|
12737
|
-
};
|
|
12738
12726
|
ColumnRendererSB.prototype.getClassesToAdd = function () {
|
|
12739
12727
|
return "".concat(this.cssPrefix, "-row ").concat(this.cssPrefix, "-row-column-entattr");
|
|
12740
12728
|
};
|
|
@@ -12776,8 +12764,6 @@ var SortingBar = /** @class */ (function (_super) {
|
|
|
12776
12764
|
var _this = _super.call(this, slot) || this;
|
|
12777
12765
|
_this.options = {
|
|
12778
12766
|
showAddRow: true,
|
|
12779
|
-
attrElementFormat: '{entity} {attr}',
|
|
12780
|
-
titleElementFormat: null,
|
|
12781
12767
|
allowDragDrop: true,
|
|
12782
12768
|
menuOptions: {
|
|
12783
12769
|
showSearchBoxAfter: 30,
|
|
@@ -12821,6 +12807,12 @@ var SortingBar = /** @class */ (function (_super) {
|
|
|
12821
12807
|
var _this = this;
|
|
12822
12808
|
_super.prototype.init.call(this, context, options);
|
|
12823
12809
|
this.setOptions(options);
|
|
12810
|
+
if (options.attrElementFormat) {
|
|
12811
|
+
this.context.options.attributeFormat = options.attrElementFormat;
|
|
12812
|
+
}
|
|
12813
|
+
if (options.titleElementFormat) {
|
|
12814
|
+
this.context.options.columnTitleFormat = options.titleElementFormat;
|
|
12815
|
+
}
|
|
12824
12816
|
this.destroyCore();
|
|
12825
12817
|
this.attachQueryObserver();
|
|
12826
12818
|
lib_public_api/* eqDragManager.removeDropContainer */.Yy.removeDropContainer(this.slot);
|
|
@@ -12973,48 +12965,20 @@ var SortingBar = /** @class */ (function (_super) {
|
|
|
12973
12965
|
});
|
|
12974
12966
|
};
|
|
12975
12967
|
SortingBar.prototype.addNewColumn = function (attrId) {
|
|
12976
|
-
var _this = this;
|
|
12977
12968
|
var model = this.getModel();
|
|
12978
12969
|
var query = this.getQuery();
|
|
12979
|
-
var
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
}
|
|
12984
|
-
if (!attribute.useInSorting) {
|
|
12985
|
-
if (attribute.lookupAttr) {
|
|
12986
|
-
attrid = attribute.lookupAttr;
|
|
12987
|
-
attribute = model.getAttributeById(attrid);
|
|
12988
|
-
if (!attribute || !attribute.useInSorting) {
|
|
12989
|
-
return null;
|
|
12990
|
-
}
|
|
12991
|
-
}
|
|
12992
|
-
else
|
|
12993
|
-
return null;
|
|
12994
|
-
}
|
|
12995
|
-
var column = query.createColumn(true);
|
|
12996
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
12997
|
-
column._sorting = external_easyqueryCore_.SortDirection.Ascending;
|
|
12998
|
-
//column.sortIndex = this.getQuery().getColumnSortIndex(column);
|
|
12999
|
-
column.expr.tag = external_easyqueryCore_.ExprTag.EntityAttribute;
|
|
13000
|
-
column.expr.dataType = attribute.dataType;
|
|
13001
|
-
//column.expr.id = attrid;
|
|
13002
|
-
column.expr.setValue(attrid, true);
|
|
13003
|
-
column.params.concat(attribute.params);
|
|
13004
|
-
return column;
|
|
13005
|
-
};
|
|
13006
|
-
if (!this.getQuery()) {
|
|
13007
|
-
return;
|
|
13008
|
-
}
|
|
13009
|
-
var newCol = getColumnByAttrId(attrId);
|
|
13010
|
-
return this.getQuery().addColumn({
|
|
13011
|
-
column: newCol
|
|
12970
|
+
var col = query.addColumn({
|
|
12971
|
+
attributeId: attrId,
|
|
12972
|
+
justsorted: true,
|
|
12973
|
+
sorting: external_easyqueryCore_.SortDirection.Ascending
|
|
13012
12974
|
});
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
12975
|
+
query.fireChangedEvent({
|
|
12976
|
+
part: external_easyqueryCore_.QueryChangePart.SortingColumns,
|
|
12977
|
+
action: external_easyqueryCore_.QueryChangeAction.Add,
|
|
12978
|
+
changee: col,
|
|
12979
|
+
source: this
|
|
12980
|
+
});
|
|
12981
|
+
return col;
|
|
13018
12982
|
};
|
|
13019
12983
|
SortingBar.prototype.renderColumn = function (column, elem) {
|
|
13020
12984
|
var renderer = new ColumnRendererSB(this, column, elem);
|
|
@@ -16736,78 +16700,17 @@ var EasyGridWidget = /** @class */ (function (_super) {
|
|
|
16736
16700
|
}
|
|
16737
16701
|
};
|
|
16738
16702
|
EasyGridWidget.prototype.addNewColumn = function (attrId) {
|
|
16739
|
-
var _this = this;
|
|
16740
|
-
var model = this.getContext().getModel();
|
|
16741
|
-
var query = this.getContext().getQuery();
|
|
16742
|
-
var getColumnByAttrId = function (attrid) {
|
|
16743
|
-
var attribute = model.getAttributeById(attrid);
|
|
16744
|
-
if (!attribute) {
|
|
16745
|
-
return null;
|
|
16746
|
-
}
|
|
16747
|
-
if (!attribute.useInSorting) {
|
|
16748
|
-
if (attribute.lookupAttr) {
|
|
16749
|
-
attrid = attribute.lookupAttr;
|
|
16750
|
-
attribute = model.getAttributeById(attrid);
|
|
16751
|
-
if (!attribute || !attribute.useInSorting) {
|
|
16752
|
-
return null;
|
|
16753
|
-
}
|
|
16754
|
-
}
|
|
16755
|
-
else
|
|
16756
|
-
return null;
|
|
16757
|
-
}
|
|
16758
|
-
var column = query.createColumn();
|
|
16759
|
-
column.caption = _this.getDefaultColumnCaption(attribute);
|
|
16760
|
-
column.sorting = external_easyqueryCore_.SortDirection.None;
|
|
16761
|
-
column.sortIndex = -1;
|
|
16762
|
-
column.expr.tag = external_easyqueryCore_.ExprTag.EntityAttribute;
|
|
16763
|
-
//column.expr.id = attrid;
|
|
16764
|
-
column.expr.setValue(attrid, true);
|
|
16765
|
-
column.params.concat(attribute.params);
|
|
16766
|
-
return column;
|
|
16767
|
-
};
|
|
16768
|
-
if (!this.getContext().getQuery()) {
|
|
16769
|
-
return;
|
|
16770
|
-
}
|
|
16771
|
-
return this.addColumn(getColumnByAttrId(attrId));
|
|
16772
|
-
};
|
|
16773
|
-
EasyGridWidget.prototype.getDefaultColumnCaption = function (attr) {
|
|
16774
|
-
var format = this.options.titleElementFormat || this.options.attrElementFormat;
|
|
16775
16703
|
var model = this.getContext().getModel();
|
|
16776
|
-
return model.getAttributeText(attr, format);
|
|
16777
|
-
};
|
|
16778
|
-
EasyGridWidget.prototype.addColumn = function (column) {
|
|
16779
16704
|
var query = this.getContext().getQuery();
|
|
16780
|
-
|
|
16781
|
-
|
|
16782
|
-
}
|
|
16783
|
-
column = this.checkColumn(column);
|
|
16784
|
-
if (!column) {
|
|
16785
|
-
return;
|
|
16786
|
-
}
|
|
16787
|
-
column = query.addColumn({
|
|
16788
|
-
caption: column.caption,
|
|
16789
|
-
attributeId: column.expr.value,
|
|
16790
|
-
sorting: column.sorting,
|
|
16791
|
-
sortIndex: column.sortIndex
|
|
16705
|
+
var col = query.addColumn({
|
|
16706
|
+
attributeId: attrId
|
|
16792
16707
|
});
|
|
16793
16708
|
query.fireChangedEvent({
|
|
16794
16709
|
part: external_easyqueryCore_.QueryChangePart.Columns,
|
|
16795
16710
|
action: external_easyqueryCore_.QueryChangeAction.Add,
|
|
16796
|
-
changee:
|
|
16711
|
+
changee: col,
|
|
16797
16712
|
source: this
|
|
16798
16713
|
});
|
|
16799
|
-
return column;
|
|
16800
|
-
};
|
|
16801
|
-
EasyGridWidget.prototype.checkColumn = function (col) {
|
|
16802
|
-
var query = this.getContext().getQuery();
|
|
16803
|
-
var columns = query.getColumns();
|
|
16804
|
-
var colJson = JSON.stringify(col.expr.saveToData());
|
|
16805
|
-
for (var i = 0; i < columns.length; i++) {
|
|
16806
|
-
var qcolJson = JSON.stringify(columns[i].expr.saveToData());
|
|
16807
|
-
if (qcolJson === colJson) {
|
|
16808
|
-
return null;
|
|
16809
|
-
}
|
|
16810
|
-
}
|
|
16811
16714
|
return col;
|
|
16812
16715
|
};
|
|
16813
16716
|
return EasyGridWidget;
|
|
@@ -20754,12 +20657,7 @@ var View = /** @class */ (function () {
|
|
|
20754
20657
|
}
|
|
20755
20658
|
// map columnTitleFormat option to widgets that have similar option
|
|
20756
20659
|
if (options.columnTitleFormat) {
|
|
20757
|
-
options.
|
|
20758
|
-
options.widgets.entitiesPanel.columnTitleFormat = options.widgets.entitiesPanel.columnTitleFormat || options.columnTitleFormat;
|
|
20759
|
-
options.widgets.columnsBar = options.widgets.columnsBar || {};
|
|
20760
|
-
options.widgets.columnsBar.titleElementFormat = options.widgets.columnsBar.titleElementFormat || options.columnTitleFormat;
|
|
20761
|
-
options.widgets.columnsPanel = options.widgets.columnsPanel || {};
|
|
20762
|
-
options.widgets.columnsPanel.titleElementFormat = options.widgets.columnsPanel.titleElementFormat || options.columnTitleFormat;
|
|
20660
|
+
this.context.options.columnTitleFormat = options.columnTitleFormat;
|
|
20763
20661
|
}
|
|
20764
20662
|
//to support old paging options (should be removed in the next versions)
|
|
20765
20663
|
options.widgets.easyGrid.paging =
|