@easyquery/ui 7.2.0-rc04 → 7.2.0-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/assets/css/easyfacets.css +2 -2
- package/dist/browser/eq.community.css.map +1 -1
- package/dist/browser/eq.community.js +73 -40
- package/dist/browser/eq.community.js.map +1 -1
- package/dist/browser/eq.community.min.js +2 -2
- package/dist/browser/eq.community.min.js.map +1 -1
- package/dist/browser/eq.core.css +3 -3
- package/dist/browser/eq.core.min.css +2 -2
- package/dist/browser/eq.view.css +1 -1
- package/dist/browser/eq.view.min.css +1 -1
- package/dist/bundles/easyquery.ui.js +31 -21
- 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/dialog/aggr_settings_dialog.js +1 -1
- package/dist/lib/dialog/aggr_settings_dialog.js.map +1 -1
- package/dist/lib/facets/pivot_table_facet.js +28 -5
- package/dist/lib/facets/pivot_table_facet.js.map +1 -1
- package/dist/lib/i18n/text_resources.js +1 -0
- package/dist/lib/i18n/text_resources.js.map +1 -1
- package/dist/lib/widgets/easy_grid_widget.js +0 -15
- package/dist/lib/widgets/easy_grid_widget.js.map +1 -1
- package/package.json +2 -2
package/dist/browser/eq.view.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Community 7.2.0-
|
|
2
|
+
* EasyQuery.JS Community 7.2.0-rc05 (https://korzh.com/easyquery/javascript)
|
|
3
3
|
* Copyright 2022 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Community 7.2.0-
|
|
2
|
+
* EasyQuery.JS Community 7.2.0-rc05 (https://korzh.com/easyquery/javascript)
|
|
3
3
|
* Copyright 2022 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
@@ -1567,6 +1567,7 @@ var meta_entity_MetaEntityAttr = /** @class */ (function () {
|
|
|
1567
1567
|
this.lookupEntity = dto.lent;
|
|
1568
1568
|
this.dataAttr = dto.dattr;
|
|
1569
1569
|
this.lookupDataAttr = dto.ldattr;
|
|
1570
|
+
this.defaultValue = dto.defVal;
|
|
1570
1571
|
this.isNullable = utils_utils.getIfDefined(dto.nul, this.isNullable);
|
|
1571
1572
|
this.isEditable = utils_utils.getIfDefined(dto.ied, this.isEditable);
|
|
1572
1573
|
this.showOnView = utils_utils.getIfDefined(dto.ivis || dto.sov, this.showOnView);
|
|
@@ -16434,21 +16435,6 @@ var easy_grid_widget_EasyGridWidget = /** @class */ (function (_super) {
|
|
|
16434
16435
|
this.grid.refresh();
|
|
16435
16436
|
};
|
|
16436
16437
|
EasyGridWidget.prototype.attachQueryObserver = function () {
|
|
16437
|
-
var _this = this;
|
|
16438
|
-
var query = this.getQuery();
|
|
16439
|
-
this.queryEventCallbackId = query.addChangedCallback(function (event) {
|
|
16440
|
-
//if something has changed, and that change is related to columns
|
|
16441
|
-
var edata = event.data;
|
|
16442
|
-
if (!edata || (edata.part != external_easyqueryCore_["QueryChangePart"].Columns && edata.part != external_easyqueryCore_["QueryChangePart"].All)) {
|
|
16443
|
-
return;
|
|
16444
|
-
}
|
|
16445
|
-
if (event.data.source == _this) {
|
|
16446
|
-
_this.grid.refresh();
|
|
16447
|
-
}
|
|
16448
|
-
else {
|
|
16449
|
-
_this.refresh();
|
|
16450
|
-
}
|
|
16451
|
-
});
|
|
16452
16438
|
};
|
|
16453
16439
|
EasyGridWidget.prototype.destroyCore = function () {
|
|
16454
16440
|
this.detachQueryObserver();
|
|
@@ -18194,6 +18180,12 @@ var AggrFunc;
|
|
|
18194
18180
|
AggrFunc["Max"] = "MAX";
|
|
18195
18181
|
AggrFunc["Count"] = "COUNT";
|
|
18196
18182
|
})(AggrFunc || (AggrFunc = {}));
|
|
18183
|
+
var FormFieldType;
|
|
18184
|
+
(function (FormFieldType) {
|
|
18185
|
+
FormFieldType[FormFieldType["ColumnField"] = 0] = "ColumnField";
|
|
18186
|
+
FormFieldType[FormFieldType["RowField"] = 1] = "RowField";
|
|
18187
|
+
FormFieldType[FormFieldType["CellData"] = 2] = "CellData";
|
|
18188
|
+
})(FormFieldType || (FormFieldType = {}));
|
|
18197
18189
|
var DFMT_REGEX = /{0:(.*?)}/g;
|
|
18198
18190
|
var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
18199
18191
|
pivot_table_facet_extends(PivotTableFacet, _super);
|
|
@@ -18282,9 +18274,10 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18282
18274
|
}
|
|
18283
18275
|
return csb;
|
|
18284
18276
|
};
|
|
18285
|
-
PivotTableFacet.prototype.createColumnsSelectBuilder = function (allowedTypes, colName) {
|
|
18277
|
+
PivotTableFacet.prototype.createColumnsSelectBuilder = function (allowedTypes, colName, formFieldType) {
|
|
18286
18278
|
var dataTable = this.getContextDataTable();
|
|
18287
18279
|
var csb = Object(lib_public_api["i" /* domel */])('select');
|
|
18280
|
+
var firstNumericColIndex = null;
|
|
18288
18281
|
var _loop_2 = function (i) {
|
|
18289
18282
|
var column = dataTable.columns.get(i);
|
|
18290
18283
|
var colLabel = column.label;
|
|
@@ -18292,6 +18285,9 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18292
18285
|
var colId = column.id;
|
|
18293
18286
|
if (allowedTypes && allowedTypes.indexOf(colType) < 0)
|
|
18294
18287
|
return "continue";
|
|
18288
|
+
if (firstNumericColIndex === null && public_api["i" /* utils */].isNumericType(colType)) {
|
|
18289
|
+
firstNumericColIndex = i;
|
|
18290
|
+
}
|
|
18295
18291
|
csb.addChild('option', function (b) {
|
|
18296
18292
|
b
|
|
18297
18293
|
.attr('value', colId)
|
|
@@ -18313,7 +18309,20 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18313
18309
|
}
|
|
18314
18310
|
}
|
|
18315
18311
|
else {
|
|
18316
|
-
|
|
18312
|
+
switch (formFieldType) {
|
|
18313
|
+
case FormFieldType.ColumnField: {
|
|
18314
|
+
csb.toDOM().value = options[0].value;
|
|
18315
|
+
break;
|
|
18316
|
+
}
|
|
18317
|
+
case FormFieldType.RowField: {
|
|
18318
|
+
csb.toDOM().value = options.length > 1 ? options[1].value : options[0].value;
|
|
18319
|
+
break;
|
|
18320
|
+
}
|
|
18321
|
+
case FormFieldType.CellData: {
|
|
18322
|
+
csb.toDOM().value = firstNumericColIndex === null ? options[0].value : options[firstNumericColIndex].value;
|
|
18323
|
+
break;
|
|
18324
|
+
}
|
|
18325
|
+
}
|
|
18317
18326
|
}
|
|
18318
18327
|
}
|
|
18319
18328
|
return csb;
|
|
@@ -18358,7 +18367,7 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18358
18367
|
.addChild('div', function (b) { return b
|
|
18359
18368
|
.addClass('kfrm-select')
|
|
18360
18369
|
.attr('name', 'column_field')
|
|
18361
|
-
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.colName)
|
|
18370
|
+
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.colName, FormFieldType.ColumnField)
|
|
18362
18371
|
.id('pivotTableColFieldSelector')
|
|
18363
18372
|
.toDOM()); })
|
|
18364
18373
|
.addChild('button', function (b) { return b
|
|
@@ -18380,7 +18389,7 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18380
18389
|
.addChild('div', function (b) { return b
|
|
18381
18390
|
.addClass('kfrm-select')
|
|
18382
18391
|
.attr('name', 'row_field')
|
|
18383
|
-
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.rowName)
|
|
18392
|
+
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.rowName, FormFieldType.RowField)
|
|
18384
18393
|
.id('pivotTableRowFieldSelector')
|
|
18385
18394
|
.toDOM()); });
|
|
18386
18395
|
current = getCurrent();
|
|
@@ -18400,7 +18409,7 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18400
18409
|
.addChild('div', function (b) { return b
|
|
18401
18410
|
.addClass('kfrm-select')
|
|
18402
18411
|
.attr('name', 'data_column')
|
|
18403
|
-
.addChildElement(_this.createColumnsSelectBuilder(fieldTypes, settings.fieldName)
|
|
18412
|
+
.addChildElement(_this.createColumnsSelectBuilder(fieldTypes, settings.fieldName, FormFieldType.CellData)
|
|
18404
18413
|
.on('change', function (ev) {
|
|
18405
18414
|
var colId = ev.target.value;
|
|
18406
18415
|
_this.validateSelectedField(colId);
|
|
@@ -19983,7 +19992,7 @@ var aggr_settings_dialog_AggrSettingsDialog = /** @class */ (function () {
|
|
|
19983
19992
|
var ds = _this.context.getServices().getDialogService();
|
|
19984
19993
|
_this.body = _this.renderBody();
|
|
19985
19994
|
var dlg = ds.open({
|
|
19986
|
-
title: '
|
|
19995
|
+
title: external_easyqueryCore_["i18n"].getText('AggrSettings', 'AggrDialogTitle'),
|
|
19987
19996
|
body: _this.body,
|
|
19988
19997
|
onSubmit: function () {
|
|
19989
19998
|
if (_this.query.enableAggregation && !_this.renderer.isValid())
|
|
@@ -22754,6 +22763,7 @@ function addEasyQueryUITexts() {
|
|
|
22754
22763
|
UnaggrBtn: 'Remove column aggregation',
|
|
22755
22764
|
GrandTotalsLabel: 'Show grand totals',
|
|
22756
22765
|
GroupCountsLabel: 'Show record count for groups',
|
|
22766
|
+
AggrDialogTitle: 'Aggregation/grouping',
|
|
22757
22767
|
EnableAggrLabel: 'Enable aggregation',
|
|
22758
22768
|
SelectedError: 'Complete the action with selected column(s)',
|
|
22759
22769
|
NoGroupsOrAggrError: 'Add at least one group or aggregation',
|