@easyquery/ui 7.2.0-rc01 → 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/aggr-settings.css +6 -6
- package/dist/assets/css/easyfacets.css +13 -3
- package/dist/browser/eq.community.css.map +1 -1
- package/dist/browser/eq.community.js +554 -426
- package/dist/browser/eq.community.js.map +1 -1
- package/dist/browser/eq.community.min.js +3 -3
- package/dist/browser/eq.community.min.js.map +1 -1
- package/dist/browser/eq.core.css +25 -15
- package/dist/browser/eq.core.min.css +3 -3
- package/dist/browser/eq.view.css +2 -2
- package/dist/browser/eq.view.min.css +2 -2
- package/dist/bundles/easyquery.ui.js +142 -88
- 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 +3 -3
- package/dist/lib/dialog/aggr_settings_dialog.js.map +1 -1
- package/dist/lib/extensions.js +1 -1
- package/dist/lib/facets/pivot_table_facet.js +49 -10
- package/dist/lib/facets/pivot_table_facet.js.map +1 -1
- package/dist/lib/facets/result_facet.d.ts +1 -0
- package/dist/lib/facets/result_facet.js +5 -0
- package/dist/lib/facets/result_facet.js.map +1 -1
- package/dist/lib/i18n/text_resources.js +2 -0
- package/dist/lib/i18n/text_resources.js.map +1 -1
- package/dist/lib/views/data_filter_view.d.ts +1 -0
- package/dist/lib/views/data_filter_view.js +3 -1
- package/dist/lib/views/data_filter_view.js.map +1 -1
- package/dist/lib/views/html_data_filter_view.js +3 -1
- package/dist/lib/views/html_data_filter_view.js.map +1 -1
- package/dist/lib/views/report_view.d.ts +3 -3
- package/dist/lib/views/report_view.js +15 -10
- package/dist/lib/views/report_view.js.map +1 -1
- package/dist/lib/views/view.js +4 -0
- package/dist/lib/views/view.js.map +1 -1
- package/dist/lib/views/view_options.d.ts +2 -1
- package/dist/lib/widgets/columns_bar.js.map +1 -1
- package/dist/lib/widgets/easy_grid_widget.js +1 -16
- package/dist/lib/widgets/easy_grid_widget.js.map +1 -1
- package/dist/lib/widgets/renderers/aggr_settings/aggr_settings_renderer.js +4 -4
- package/dist/lib/widgets/renderers/aggr_settings/aggr_settings_renderer.js.map +1 -1
- package/dist/lib/widgets/renderers/columnsbar/aggrfunc_column_renderer.js +0 -1
- package/dist/lib/widgets/renderers/columnsbar/aggrfunc_column_renderer.js.map +1 -1
- package/dist/lib/widgets/renderers/columnsbar/column_renderer_cb.js +0 -1
- package/dist/lib/widgets/renderers/columnsbar/column_renderer_cb.js.map +1 -1
- package/dist/lib/widgets/result_facets_panel.js +3 -0
- package/dist/lib/widgets/result_facets_panel.js.map +1 -1
- package/package.json +4 -4
package/dist/browser/eq.view.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Community 7.2.0-
|
|
3
|
-
* Copyright
|
|
2
|
+
* EasyQuery.JS Community 7.2.0-rc05 (https://korzh.com/easyquery/javascript)
|
|
3
|
+
* Copyright 2022 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
6
6
|
* https://korzh.com/easyquery/javascript#LIC or as a part of
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Community 7.2.0-
|
|
3
|
-
* Copyright
|
|
2
|
+
* EasyQuery.JS Community 7.2.0-rc05 (https://korzh.com/easyquery/javascript)
|
|
3
|
+
* Copyright 2022 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
6
6
|
* https://korzh.com/easyquery/javascript#LIC or as a part of
|
|
@@ -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);
|
|
@@ -2659,6 +2660,7 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
|
|
|
2659
2660
|
this.cachedRows = [];
|
|
2660
2661
|
this.total = 0;
|
|
2661
2662
|
this.needTotal = !this._elasticChunks;
|
|
2663
|
+
this.fireUpdated();
|
|
2662
2664
|
};
|
|
2663
2665
|
EasyDataTable.prototype.createRow = function (dataOrRow) {
|
|
2664
2666
|
var _this = this;
|
|
@@ -4342,7 +4344,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4342
4344
|
pageSizeItems: [20, 30, 50, 100, 200]
|
|
4343
4345
|
},
|
|
4344
4346
|
columnWidths: {
|
|
4345
|
-
autoResize: AutoResizeColumns.
|
|
4347
|
+
autoResize: AutoResizeColumns.Always,
|
|
4346
4348
|
stringColumns: {
|
|
4347
4349
|
min: 100,
|
|
4348
4350
|
max: 500,
|
|
@@ -4370,7 +4372,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4370
4372
|
default: 60
|
|
4371
4373
|
}
|
|
4372
4374
|
},
|
|
4373
|
-
|
|
4375
|
+
showPlusButton: false,
|
|
4374
4376
|
viewportRowsCount: null,
|
|
4375
4377
|
showActiveRow: true
|
|
4376
4378
|
};
|
|
@@ -4469,8 +4471,8 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4469
4471
|
if (options.onRowDbClick) {
|
|
4470
4472
|
this.addEventListener('rowDbClick', options.onRowDbClick);
|
|
4471
4473
|
}
|
|
4472
|
-
if (options.
|
|
4473
|
-
this.addEventListener('
|
|
4474
|
+
if (options.onPlusButtonClick) {
|
|
4475
|
+
this.addEventListener('plusButtonClick', options.onPlusButtonClick);
|
|
4474
4476
|
}
|
|
4475
4477
|
if (options.onColumnChanged) {
|
|
4476
4478
|
this.addEventListener('columnChanged', options.onColumnChanged);
|
|
@@ -4556,7 +4558,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4556
4558
|
};
|
|
4557
4559
|
EasyGrid.prototype.render = function () {
|
|
4558
4560
|
var _this = this;
|
|
4559
|
-
if (!this.hasData() && !this.options.
|
|
4561
|
+
if (!this.hasData() && !this.options.showPlusButton)
|
|
4560
4562
|
return;
|
|
4561
4563
|
this.containerInitialHeight = this.slot.clientHeight;
|
|
4562
4564
|
this.rootDiv = document.createElement('div');
|
|
@@ -4580,9 +4582,6 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4580
4582
|
.then(function () {
|
|
4581
4583
|
_this.firstRender = false;
|
|
4582
4584
|
_this.rowsOnPagePromise = null;
|
|
4583
|
-
if (needAutoResize) {
|
|
4584
|
-
_this.resizeColumns();
|
|
4585
|
-
}
|
|
4586
4585
|
});
|
|
4587
4586
|
}
|
|
4588
4587
|
else {
|
|
@@ -4604,14 +4603,14 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4604
4603
|
var firstRow = _this.bodyCellContainerDiv.firstElementChild;
|
|
4605
4604
|
var rowHeight = firstRow ? firstRow.offsetHeight : DEFAULT_ROW_HEIGHT;
|
|
4606
4605
|
var rowCount = _this.options.viewportRowsCount; // || DEFAULT_ROW_COUNT;
|
|
4607
|
-
var
|
|
4608
|
-
domel(_this.
|
|
4609
|
-
.setStyle('height',
|
|
4606
|
+
var viewportHeight_1 = rowHeight * rowCount;
|
|
4607
|
+
domel(_this.bodyViewportDiv)
|
|
4608
|
+
.setStyle('height', viewportHeight_1 + "px");
|
|
4610
4609
|
setTimeout(function () {
|
|
4611
4610
|
var sbHeight = _this.bodyViewportDiv.offsetHeight - _this.bodyViewportDiv.clientHeight;
|
|
4612
|
-
|
|
4613
|
-
domel(_this.
|
|
4614
|
-
.setStyle('height',
|
|
4611
|
+
viewportHeight_1 = viewportHeight_1 + sbHeight;
|
|
4612
|
+
domel(_this.bodyViewportDiv)
|
|
4613
|
+
.setStyle('height', viewportHeight_1 + "px");
|
|
4615
4614
|
resolve();
|
|
4616
4615
|
}, 100);
|
|
4617
4616
|
return;
|
|
@@ -4658,7 +4657,7 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4658
4657
|
_this.headerRowDiv.appendChild(hd);
|
|
4659
4658
|
if (column.isRowNum) {
|
|
4660
4659
|
domel(hd)
|
|
4661
|
-
.addChildElement(_this.
|
|
4660
|
+
.addChildElement(_this.renderHeaderButtons());
|
|
4662
4661
|
}
|
|
4663
4662
|
});
|
|
4664
4663
|
var containerWidth = this.getContainerWidth();
|
|
@@ -4755,9 +4754,15 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4755
4754
|
_this.updateTotalsState(groups_1, row, true);
|
|
4756
4755
|
}
|
|
4757
4756
|
}
|
|
4758
|
-
var
|
|
4759
|
-
|
|
4760
|
-
.
|
|
4757
|
+
var needAutoResize = _this.options.columnWidths.autoResize !== AutoResizeColumns.Never;
|
|
4758
|
+
if (needAutoResize) {
|
|
4759
|
+
_this.resizeColumns();
|
|
4760
|
+
}
|
|
4761
|
+
else {
|
|
4762
|
+
var containerWidth = _this.getContainerWidth();
|
|
4763
|
+
domel(_this.bodyCellContainerDiv)
|
|
4764
|
+
.setStyle('width', containerWidth + "px");
|
|
4765
|
+
}
|
|
4761
4766
|
return rowsToRender;
|
|
4762
4767
|
})
|
|
4763
4768
|
.catch(function (error) { console.error(error); return 0; });
|
|
@@ -4997,23 +5002,26 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
4997
5002
|
var pageInfoDiv = domel('div')
|
|
4998
5003
|
.addClass(this.cssPrefix + "-page-info")
|
|
4999
5004
|
.toDOM();
|
|
5000
|
-
var
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
var
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
.
|
|
5016
|
-
|
|
5005
|
+
var rowCount = this.dataTable.getTotal();
|
|
5006
|
+
if (rowCount > 0) {
|
|
5007
|
+
var fistPageRecordNum = count
|
|
5008
|
+
? (this.pagination.page - 1) * this.pagination.pageSize + 1
|
|
5009
|
+
: 0;
|
|
5010
|
+
var lastPageRecordNum = count
|
|
5011
|
+
? fistPageRecordNum + count - 1
|
|
5012
|
+
: 0;
|
|
5013
|
+
var totalStr = this.dataTable.getTotal().toString();
|
|
5014
|
+
if (this.dataTable.elasticChunks) {
|
|
5015
|
+
var count_1 = this.dataTable.getCachedCount();
|
|
5016
|
+
var total = this.dataTable.getTotal();
|
|
5017
|
+
if (count_1 !== total)
|
|
5018
|
+
totalStr = '?';
|
|
5019
|
+
}
|
|
5020
|
+
pageInfoDiv.innerHTML = public_api["g" /* i18n */].getText('GridPageInfo')
|
|
5021
|
+
.replace('{FirstPageRecordNum}', "<span>" + fistPageRecordNum.toString() + "</span>")
|
|
5022
|
+
.replace('{LastPageRecordNum}', "<span>" + lastPageRecordNum.toString() + "</span>")
|
|
5023
|
+
.replace('{Total}', "<span>" + totalStr + "</span>");
|
|
5024
|
+
}
|
|
5017
5025
|
return pageInfoDiv;
|
|
5018
5026
|
};
|
|
5019
5027
|
EasyGrid.prototype.showProgress = function () {
|
|
@@ -5108,7 +5116,8 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
5108
5116
|
var _this = this;
|
|
5109
5117
|
var paginateDiv = document.createElement('div');
|
|
5110
5118
|
paginateDiv.className = this.cssPrefix + "-pagination-wrapper";
|
|
5111
|
-
|
|
5119
|
+
var rowCount = this.dataTable.getTotal();
|
|
5120
|
+
if (this.options.paging && this.options.paging.enabled && rowCount > 0) {
|
|
5112
5121
|
var prefix_1 = this.paginationOptions.useBootstrap ? '' : this.cssPrefix + "-";
|
|
5113
5122
|
var buttonClickHandler_1 = function (ev) {
|
|
5114
5123
|
var element = ev.target;
|
|
@@ -5234,18 +5243,18 @@ var easy_grid_EasyGrid = /** @class */ (function () {
|
|
|
5234
5243
|
EasyGrid.prototype.removeEventListener = function (eventType, handlerId) {
|
|
5235
5244
|
this.eventEmitter.unsubscribe(eventType, handlerId);
|
|
5236
5245
|
};
|
|
5237
|
-
EasyGrid.prototype.
|
|
5246
|
+
EasyGrid.prototype.renderHeaderButtons = function () {
|
|
5238
5247
|
var _this = this;
|
|
5239
|
-
if (this.options.
|
|
5248
|
+
if (this.options.showPlusButton) {
|
|
5240
5249
|
return domel('div')
|
|
5241
|
-
.addClass(this.cssPrefix + "-
|
|
5242
|
-
.title(this.options.
|
|
5250
|
+
.addClass(this.cssPrefix + "-header-btn-plus")
|
|
5251
|
+
.title(this.options.plusButtonTitle || 'Add')
|
|
5243
5252
|
.addChild('a', function (builder) { return builder
|
|
5244
5253
|
.attr('href', 'javascript:void(0)')
|
|
5245
5254
|
.on('click', function (e) {
|
|
5246
5255
|
e.preventDefault();
|
|
5247
5256
|
_this.fireEvent({
|
|
5248
|
-
type: '
|
|
5257
|
+
type: 'plusButtonClick',
|
|
5249
5258
|
sourceEvent: e
|
|
5250
5259
|
});
|
|
5251
5260
|
}); })
|
|
@@ -11323,7 +11332,6 @@ var column_renderer_cb_ColumnRendererCB = /** @class */ (function () {
|
|
|
11323
11332
|
.toDOM();
|
|
11324
11333
|
};
|
|
11325
11334
|
ColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
11326
|
-
console.log('Calling getDefaultCaption() BASE');
|
|
11327
11335
|
return this.getDefaultTitleText(this.baseAttr);
|
|
11328
11336
|
};
|
|
11329
11337
|
ColumnRendererCB.prototype.getDefaultTitleText = function (attr) {
|
|
@@ -11680,7 +11688,6 @@ var aggrfunc_column_renderer_AggrFuncColumnRendererCB = /** @class */ (function
|
|
|
11680
11688
|
.getAttributeByIdSafe(this.column.expr.args[0].value);
|
|
11681
11689
|
};
|
|
11682
11690
|
AggrFuncColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
11683
|
-
console.log('Calling getDefaultCaption() AGGR');
|
|
11684
11691
|
return this.getDefaultTitleText(this.baseAttr) + ' '
|
|
11685
11692
|
+ this.bar.getContext().getModel().getAggrFunctionCaption(this.column.expr.func);
|
|
11686
11693
|
};
|
|
@@ -16402,7 +16409,7 @@ var easy_grid_widget_EasyGridWidget = /** @class */ (function (_super) {
|
|
|
16402
16409
|
_super.prototype.init.call(this, context, options);
|
|
16403
16410
|
var gridOptions = __assign(__assign({}, options), { slot: this.slot, dataTable: context.resultTable });
|
|
16404
16411
|
this.options = public_api["i" /* utils */].assign(this.options, options);
|
|
16405
|
-
gridOptions.
|
|
16412
|
+
gridOptions.onPlusButtonClick = function (ev) { return _this.addColumnClickHandler(ev); };
|
|
16406
16413
|
gridOptions.onColumnMoved = function (ev) { return _this.columnMovedHandler(ev); };
|
|
16407
16414
|
if (gridOptions.aggregates) {
|
|
16408
16415
|
this.hasCustomTotalsSettings = true;
|
|
@@ -16428,21 +16435,6 @@ var easy_grid_widget_EasyGridWidget = /** @class */ (function (_super) {
|
|
|
16428
16435
|
this.grid.refresh();
|
|
16429
16436
|
};
|
|
16430
16437
|
EasyGridWidget.prototype.attachQueryObserver = function () {
|
|
16431
|
-
var _this = this;
|
|
16432
|
-
var query = this.getQuery();
|
|
16433
|
-
this.queryEventCallbackId = query.addChangedCallback(function (event) {
|
|
16434
|
-
//if something has changed, and that change is related to columns
|
|
16435
|
-
var edata = event.data;
|
|
16436
|
-
if (!edata || (edata.part != external_easyqueryCore_["QueryChangePart"].Columns && edata.part != external_easyqueryCore_["QueryChangePart"].All)) {
|
|
16437
|
-
return;
|
|
16438
|
-
}
|
|
16439
|
-
if (event.data.source == _this) {
|
|
16440
|
-
_this.grid.refresh();
|
|
16441
|
-
}
|
|
16442
|
-
else {
|
|
16443
|
-
_this.refresh();
|
|
16444
|
-
}
|
|
16445
|
-
});
|
|
16446
16438
|
};
|
|
16447
16439
|
EasyGridWidget.prototype.destroyCore = function () {
|
|
16448
16440
|
this.detachQueryObserver();
|
|
@@ -17105,6 +17097,11 @@ var result_facet_ResultFacet = /** @class */ (function () {
|
|
|
17105
17097
|
var resultTable = context.resultTable;
|
|
17106
17098
|
return (resultTable.getCachedCount() == resultTable.getTotal());
|
|
17107
17099
|
};
|
|
17100
|
+
ResultFacet.prototype.showErrorMessage = function (message) {
|
|
17101
|
+
this.displayMessageDiv.innerHTML = message;
|
|
17102
|
+
this.displayMessageDiv.classList.add(this.cssPrefix + "-error-message");
|
|
17103
|
+
Object(lib_public_api["i" /* domel */])(this.displayMessageDiv).show();
|
|
17104
|
+
};
|
|
17108
17105
|
ResultFacet.prototype.showUnableDisplayMessage = function (message) {
|
|
17109
17106
|
var context = this.getContext();
|
|
17110
17107
|
var resultTable = context.resultTable;
|
|
@@ -18183,6 +18180,12 @@ var AggrFunc;
|
|
|
18183
18180
|
AggrFunc["Max"] = "MAX";
|
|
18184
18181
|
AggrFunc["Count"] = "COUNT";
|
|
18185
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 = {}));
|
|
18186
18189
|
var DFMT_REGEX = /{0:(.*?)}/g;
|
|
18187
18190
|
var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
18188
18191
|
pivot_table_facet_extends(PivotTableFacet, _super);
|
|
@@ -18196,21 +18199,25 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18196
18199
|
PivotTableFacet.prototype.init = function (slot) {
|
|
18197
18200
|
var _this = this;
|
|
18198
18201
|
_super.prototype.init.call(this, slot);
|
|
18202
|
+
this.options.maxRowCount = this.options.maxRowCount || 500;
|
|
18203
|
+
this.options.viewportRowsCount = this.options.viewportRowsCount || 50;
|
|
18199
18204
|
this.grid = new lib_public_api["e" /* EasyGrid */]({
|
|
18200
18205
|
slot: this.contentDiv,
|
|
18201
18206
|
dataTable: this.pivotTable,
|
|
18202
18207
|
paging: {
|
|
18203
|
-
enabled: false
|
|
18208
|
+
enabled: false,
|
|
18209
|
+
pageSize: this.options.maxRowCount
|
|
18204
18210
|
},
|
|
18211
|
+
viewportRowsCount: this.options.viewportRowsCount,
|
|
18205
18212
|
useRowNumeration: false,
|
|
18206
|
-
|
|
18213
|
+
showPlusButton: false,
|
|
18207
18214
|
allowDragDrop: false,
|
|
18208
18215
|
onGetCellRenderer: function (column, defaultRenderer) {
|
|
18209
18216
|
if (column.dataColumn) {
|
|
18210
18217
|
if (column.dataColumn.id == "total") {
|
|
18211
18218
|
return function (value, column, cell, rowEl) {
|
|
18212
18219
|
defaultRenderer(value, column, cell, rowEl);
|
|
18213
|
-
cell.
|
|
18220
|
+
cell.classList.add('pivot-cell-total');
|
|
18214
18221
|
};
|
|
18215
18222
|
}
|
|
18216
18223
|
if (_this.settings.totalsRow) {
|
|
@@ -18267,9 +18274,10 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18267
18274
|
}
|
|
18268
18275
|
return csb;
|
|
18269
18276
|
};
|
|
18270
|
-
PivotTableFacet.prototype.createColumnsSelectBuilder = function (allowedTypes, colName) {
|
|
18277
|
+
PivotTableFacet.prototype.createColumnsSelectBuilder = function (allowedTypes, colName, formFieldType) {
|
|
18271
18278
|
var dataTable = this.getContextDataTable();
|
|
18272
18279
|
var csb = Object(lib_public_api["i" /* domel */])('select');
|
|
18280
|
+
var firstNumericColIndex = null;
|
|
18273
18281
|
var _loop_2 = function (i) {
|
|
18274
18282
|
var column = dataTable.columns.get(i);
|
|
18275
18283
|
var colLabel = column.label;
|
|
@@ -18277,6 +18285,9 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18277
18285
|
var colId = column.id;
|
|
18278
18286
|
if (allowedTypes && allowedTypes.indexOf(colType) < 0)
|
|
18279
18287
|
return "continue";
|
|
18288
|
+
if (firstNumericColIndex === null && public_api["i" /* utils */].isNumericType(colType)) {
|
|
18289
|
+
firstNumericColIndex = i;
|
|
18290
|
+
}
|
|
18280
18291
|
csb.addChild('option', function (b) {
|
|
18281
18292
|
b
|
|
18282
18293
|
.attr('value', colId)
|
|
@@ -18298,7 +18309,20 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18298
18309
|
}
|
|
18299
18310
|
}
|
|
18300
18311
|
else {
|
|
18301
|
-
|
|
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
|
+
}
|
|
18302
18326
|
}
|
|
18303
18327
|
}
|
|
18304
18328
|
return csb;
|
|
@@ -18343,7 +18367,7 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18343
18367
|
.addChild('div', function (b) { return b
|
|
18344
18368
|
.addClass('kfrm-select')
|
|
18345
18369
|
.attr('name', 'column_field')
|
|
18346
|
-
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.colName)
|
|
18370
|
+
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.colName, FormFieldType.ColumnField)
|
|
18347
18371
|
.id('pivotTableColFieldSelector')
|
|
18348
18372
|
.toDOM()); })
|
|
18349
18373
|
.addChild('button', function (b) { return b
|
|
@@ -18365,7 +18389,7 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18365
18389
|
.addChild('div', function (b) { return b
|
|
18366
18390
|
.addClass('kfrm-select')
|
|
18367
18391
|
.attr('name', 'row_field')
|
|
18368
|
-
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.rowName)
|
|
18392
|
+
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.rowName, FormFieldType.RowField)
|
|
18369
18393
|
.id('pivotTableRowFieldSelector')
|
|
18370
18394
|
.toDOM()); });
|
|
18371
18395
|
current = getCurrent();
|
|
@@ -18385,7 +18409,7 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18385
18409
|
.addChild('div', function (b) { return b
|
|
18386
18410
|
.addClass('kfrm-select')
|
|
18387
18411
|
.attr('name', 'data_column')
|
|
18388
|
-
.addChildElement(_this.createColumnsSelectBuilder(fieldTypes, settings.fieldName)
|
|
18412
|
+
.addChildElement(_this.createColumnsSelectBuilder(fieldTypes, settings.fieldName, FormFieldType.CellData)
|
|
18389
18413
|
.on('change', function (ev) {
|
|
18390
18414
|
var colId = ev.target.value;
|
|
18391
18415
|
_this.validateSelectedField(colId);
|
|
@@ -18471,6 +18495,18 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18471
18495
|
PivotTableFacet.prototype.refreshCore = function () {
|
|
18472
18496
|
this.updatePivotData();
|
|
18473
18497
|
if (this.grid) {
|
|
18498
|
+
var dataSize = this.pivotTable.getTotal();
|
|
18499
|
+
var maxRow = this.grid.options.paging.pageSize;
|
|
18500
|
+
if (dataSize > maxRow) {
|
|
18501
|
+
this.contentDiv.classList.remove('pivot-grid-with-totals');
|
|
18502
|
+
this.showErrorMessage(public_api["g" /* i18n */].getText('Facets', 'ErrTooMuchData'));
|
|
18503
|
+
}
|
|
18504
|
+
if (this.options.viewportRowsCount > dataSize) {
|
|
18505
|
+
this.grid.options.viewportRowsCount = dataSize;
|
|
18506
|
+
}
|
|
18507
|
+
else {
|
|
18508
|
+
this.grid.options.viewportRowsCount = this.options.viewportRowsCount;
|
|
18509
|
+
}
|
|
18474
18510
|
this.grid.refresh();
|
|
18475
18511
|
}
|
|
18476
18512
|
};
|
|
@@ -18645,10 +18681,10 @@ var pivot_table_facet_PivotTableFacet = /** @class */ (function (_super) {
|
|
|
18645
18681
|
total_row.push(totalByCol);
|
|
18646
18682
|
}
|
|
18647
18683
|
this.pivotTable.addRow(total_row);
|
|
18648
|
-
this.contentDiv.classList.add('pivot-grid-totals
|
|
18684
|
+
this.contentDiv.classList.add('pivot-grid-with-totals');
|
|
18649
18685
|
}
|
|
18650
18686
|
else {
|
|
18651
|
-
this.contentDiv.classList.remove('pivot-grid-totals
|
|
18687
|
+
this.contentDiv.classList.remove('pivot-grid-with-totals');
|
|
18652
18688
|
}
|
|
18653
18689
|
};
|
|
18654
18690
|
PivotTableFacet.prototype.calcAggrFunc = function (func, options) {
|
|
@@ -19023,6 +19059,9 @@ var result_facets_panel_ResultFacetsPanel = /** @class */ (function (_super) {
|
|
|
19023
19059
|
ResultFacetsPanel.prototype.attachQueryObserver = function () {
|
|
19024
19060
|
var _this = this;
|
|
19025
19061
|
var query = this.getQuery();
|
|
19062
|
+
if (this.queryEventCallbackId) {
|
|
19063
|
+
query.removeChangedCallback(this.queryEventCallbackId);
|
|
19064
|
+
}
|
|
19026
19065
|
this.queryEventCallbackId = query.addChangedCallback(function (event) {
|
|
19027
19066
|
//if something has changed, and that change is related to columns
|
|
19028
19067
|
var edata = event.data;
|
|
@@ -19646,10 +19685,10 @@ var aggr_settings_renderer_AggrSettingsRenderer = /** @class */ (function () {
|
|
|
19646
19685
|
b.on('change', _this.countsCheckboxChangeHandler.bind(_this));
|
|
19647
19686
|
})
|
|
19648
19687
|
.addChild('span', function (b) { return b
|
|
19649
|
-
.addClass('slider round'); })
|
|
19688
|
+
.addClass('slider round'); })
|
|
19650
19689
|
.addChild('span', function (b) { return b
|
|
19651
19690
|
.addClass('switch-text')
|
|
19652
|
-
.addText(external_easyqueryCore_["i18n"].getText('AggrSettings', 'GroupCountsLabel')); }); })
|
|
19691
|
+
.addText(external_easyqueryCore_["i18n"].getText('AggrSettings', 'GroupCountsLabel')); }); }); })
|
|
19653
19692
|
.addChild('div', function (b) { return b
|
|
19654
19693
|
.addClass(_this.cssPrefix + "-grandtotals")
|
|
19655
19694
|
.addChild('label', function (b) { return b
|
|
@@ -19662,10 +19701,10 @@ var aggr_settings_renderer_AggrSettingsRenderer = /** @class */ (function () {
|
|
|
19662
19701
|
b.on('change', _this.grandCheckboxChangeHandler.bind(_this));
|
|
19663
19702
|
})
|
|
19664
19703
|
.addChild('span', function (b) { return b
|
|
19665
|
-
.addClass('slider round'); })
|
|
19704
|
+
.addClass('slider round'); })
|
|
19666
19705
|
.addChild('span', function (b) { return b
|
|
19667
19706
|
.addClass('switch-text')
|
|
19668
|
-
.addText(external_easyqueryCore_["i18n"].getText('AggrSettings', 'GrandTotalsLabel')); }); });
|
|
19707
|
+
.addText(external_easyqueryCore_["i18n"].getText('AggrSettings', 'GrandTotalsLabel')); }); }); });
|
|
19669
19708
|
var groups = this.slot.querySelectorAll("." + this.cssPrefix + "-group");
|
|
19670
19709
|
groups.forEach(function (el) {
|
|
19671
19710
|
Object(lib_public_api["i" /* domel */])(el)
|
|
@@ -19953,7 +19992,7 @@ var aggr_settings_dialog_AggrSettingsDialog = /** @class */ (function () {
|
|
|
19953
19992
|
var ds = _this.context.getServices().getDialogService();
|
|
19954
19993
|
_this.body = _this.renderBody();
|
|
19955
19994
|
var dlg = ds.open({
|
|
19956
|
-
title: '
|
|
19995
|
+
title: external_easyqueryCore_["i18n"].getText('AggrSettings', 'AggrDialogTitle'),
|
|
19957
19996
|
body: _this.body,
|
|
19958
19997
|
onSubmit: function () {
|
|
19959
19998
|
if (_this.query.enableAggregation && !_this.renderer.isValid())
|
|
@@ -20014,10 +20053,10 @@ var aggr_settings_dialog_AggrSettingsDialog = /** @class */ (function () {
|
|
|
20014
20053
|
b.on('change', _this.enableAggrCheckBoxChangeHandler.bind(_this));
|
|
20015
20054
|
})
|
|
20016
20055
|
.addChild('span', function (b) { return b
|
|
20017
|
-
.addClass('slider round'); })
|
|
20056
|
+
.addClass('slider round'); })
|
|
20018
20057
|
.addChild('span', function (b) { return b
|
|
20019
20058
|
.addClass('switch-text')
|
|
20020
|
-
.addText(external_easyqueryCore_["i18n"].getText('AggrSettings', 'EnableAggrLabel')); }); })
|
|
20059
|
+
.addText(external_easyqueryCore_["i18n"].getText('AggrSettings', 'EnableAggrLabel')); }); }); })
|
|
20021
20060
|
.addChild('div', function (b) { return b
|
|
20022
20061
|
.id('AggrSettingsComponent'); });
|
|
20023
20062
|
return b.toDOM();
|
|
@@ -20652,6 +20691,10 @@ var view_View = /** @class */ (function () {
|
|
|
20652
20691
|
View.prototype.fetchData = function (options) {
|
|
20653
20692
|
var _this = this;
|
|
20654
20693
|
options = options || { refresh: true };
|
|
20694
|
+
this.context.clearResult();
|
|
20695
|
+
//don't run fetch if the query is empty
|
|
20696
|
+
if (this.context.getQuery().isEmpty() && !this.resultOptions.fetchEmptyQueries)
|
|
20697
|
+
return;
|
|
20655
20698
|
this.showResultSpinner();
|
|
20656
20699
|
this.context.fetchData({
|
|
20657
20700
|
elasticPaging: options.elasticPaging,
|
|
@@ -21661,7 +21704,9 @@ var data_filter_view_extends = (undefined && undefined.__extends) || (function (
|
|
|
21661
21704
|
var data_filter_view_DataFilterView = /** @class */ (function (_super) {
|
|
21662
21705
|
data_filter_view_extends(DataFilterView, _super);
|
|
21663
21706
|
function DataFilterView() {
|
|
21664
|
-
|
|
21707
|
+
var _this = _super.call(this) || this;
|
|
21708
|
+
_this.resultOptions.fetchEmptyQueries = true;
|
|
21709
|
+
return _this;
|
|
21665
21710
|
}
|
|
21666
21711
|
DataFilterView.prototype.initOptions = function (options) {
|
|
21667
21712
|
var _this = this;
|
|
@@ -21739,7 +21784,9 @@ var html_data_filter_view_extends = (undefined && undefined.__extends) || (funct
|
|
|
21739
21784
|
var html_data_filter_view_HtmlDataFilterView = /** @class */ (function (_super) {
|
|
21740
21785
|
html_data_filter_view_extends(HtmlDataFilterView, _super);
|
|
21741
21786
|
function HtmlDataFilterView() {
|
|
21742
|
-
|
|
21787
|
+
var _this = _super.call(this) || this;
|
|
21788
|
+
_this.resultOptions.fetchEmptyQueries = true;
|
|
21789
|
+
return _this;
|
|
21743
21790
|
}
|
|
21744
21791
|
/**
|
|
21745
21792
|
* Creates the widget that represents Grid Widget.
|
|
@@ -21809,7 +21856,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
21809
21856
|
_this.loadReportButtonClickHandler = _this.loadReportButtonClick.bind(_this);
|
|
21810
21857
|
_this.saveReportButtonClickHandler = _this.saveReportButtonClick.bind(_this);
|
|
21811
21858
|
_this.removeReportButtonClickHandler = _this.removeReportButtonClick.bind(_this);
|
|
21812
|
-
_this.
|
|
21859
|
+
_this.reloadReportDataButtonClickHandler = _this.reloadReportDataButtonClick.bind(_this);
|
|
21813
21860
|
browser_utils["a" /* browserUtils */].onMobileModeChanged(function (_) {
|
|
21814
21861
|
document.location.reload();
|
|
21815
21862
|
});
|
|
@@ -21896,7 +21943,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
21896
21943
|
var loadReportButton = "LoadReportButton";
|
|
21897
21944
|
var saveReportButton = "SaveReportButton";
|
|
21898
21945
|
var removeReportButton = "RemoveReportButton";
|
|
21899
|
-
var
|
|
21946
|
+
var reloadReportDataButton = "ReloadReportDataButton";
|
|
21900
21947
|
var resultCountSpan = "ResultCount";
|
|
21901
21948
|
var exportButtons = "ResultExportButtons";
|
|
21902
21949
|
var exportClass = this.exportClass;
|
|
@@ -21908,7 +21955,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
21908
21955
|
loadReportButton = options.slots.loadReportButton || loadReportButton;
|
|
21909
21956
|
saveReportButton = options.slots.saveReportButton || saveReportButton;
|
|
21910
21957
|
removeReportButton = options.slots.removeReportButton || removeReportButton;
|
|
21911
|
-
|
|
21958
|
+
reloadReportDataButton = options.slots.reloadReportDataButton || reloadReportDataButton;
|
|
21912
21959
|
exportClass = options.slots.exportClass || exportClass;
|
|
21913
21960
|
}
|
|
21914
21961
|
this.exportButtons = this.domRoots.reduce(function (elems, root) {
|
|
@@ -21955,10 +22002,14 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
21955
22002
|
this.removeReportButton.addEventListener('click', this.removeReportButtonClickHandler);
|
|
21956
22003
|
}
|
|
21957
22004
|
}
|
|
21958
|
-
if (!this.
|
|
21959
|
-
this.
|
|
21960
|
-
|
|
21961
|
-
|
|
22005
|
+
if (!this.reloadReportDataButton) {
|
|
22006
|
+
this.reloadReportDataButton = this.resolveElement(reloadReportDataButton);
|
|
22007
|
+
//OBSOLETE: remove the next 3 lines. We just support the old default button ID here
|
|
22008
|
+
if (!this.reloadReportDataButton) {
|
|
22009
|
+
this.reloadReportDataButton = this.resolveElement('UpdateReportButton');
|
|
22010
|
+
}
|
|
22011
|
+
if (this.reloadReportDataButton) {
|
|
22012
|
+
this.reloadReportDataButton.addEventListener('click', this.reloadReportDataButtonClickHandler);
|
|
21962
22013
|
}
|
|
21963
22014
|
}
|
|
21964
22015
|
this.reportListSlot = document.getElementById('ReportList');
|
|
@@ -22036,6 +22087,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
22036
22087
|
var query = self.context.getQuery();
|
|
22037
22088
|
var reportLoaded = function () {
|
|
22038
22089
|
_this.renderReportProps();
|
|
22090
|
+
_this.context.resultTable.clear();
|
|
22039
22091
|
query.fireChangedEvent({
|
|
22040
22092
|
part: external_easyqueryCore_["QueryChangePart"].All,
|
|
22041
22093
|
noSync: true,
|
|
@@ -22262,8 +22314,8 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
22262
22314
|
this.removeReportButton.removeEventListener('click', this.removeReportButtonClickHandler);
|
|
22263
22315
|
this.removeReportButton = null;
|
|
22264
22316
|
}
|
|
22265
|
-
if (this.
|
|
22266
|
-
this.
|
|
22317
|
+
if (this.reloadReportDataButton) {
|
|
22318
|
+
this.reloadReportDataButton.removeEventListener('click', this.reloadReportDataButtonClickHandler);
|
|
22267
22319
|
this.removeReportButton = null;
|
|
22268
22320
|
}
|
|
22269
22321
|
if (this.reportListSlot) {
|
|
@@ -22364,7 +22416,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
22364
22416
|
/**
|
|
22365
22417
|
* The handler of the "Update" button click.
|
|
22366
22418
|
*/
|
|
22367
|
-
ReportView.prototype.
|
|
22419
|
+
ReportView.prototype.reloadReportDataButtonClick = function () {
|
|
22368
22420
|
this.fetchData();
|
|
22369
22421
|
};
|
|
22370
22422
|
/**
|
|
@@ -22668,6 +22720,7 @@ function addEasyQueryUITexts() {
|
|
|
22668
22720
|
TabNameLabel: 'Tab name',
|
|
22669
22721
|
ErrQueryChanged: 'FAILED TO DISPLAY. QUERY WAS CHANGED',
|
|
22670
22722
|
ErrNotEnoughData: "We can't display the graph because not all data for this query is loaded. \n The total number of records: {totalRecs}, currently loaded: {cachedRecs}. \n You can [download the result]. Please note: this may take some time and consume a lot of memory.",
|
|
22723
|
+
ErrTooMuchData: 'Too much data. The grid is not able to display it',
|
|
22671
22724
|
Chart: {
|
|
22672
22725
|
FacetTitle: 'Chart',
|
|
22673
22726
|
DlgTitle: 'Chart settings',
|
|
@@ -22710,6 +22763,7 @@ function addEasyQueryUITexts() {
|
|
|
22710
22763
|
UnaggrBtn: 'Remove column aggregation',
|
|
22711
22764
|
GrandTotalsLabel: 'Show grand totals',
|
|
22712
22765
|
GroupCountsLabel: 'Show record count for groups',
|
|
22766
|
+
AggrDialogTitle: 'Aggregation/grouping',
|
|
22713
22767
|
EnableAggrLabel: 'Enable aggregation',
|
|
22714
22768
|
SelectedError: 'Complete the action with selected column(s)',
|
|
22715
22769
|
NoGroupsOrAggrError: 'Add at least one group or aggregation',
|