@easyquery/ui 7.1.2-rc04 → 7.1.2-rc07

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * EasyQuery.JS Community 7.1.2-rc04 (https://korzh.com/easyquery/javascript)
2
+ * EasyQuery.JS Community 7.1.2-rc07 (https://korzh.com/easyquery/javascript)
3
3
  * Copyright 2021 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.1.2-rc04 (https://korzh.com/easyquery/javascript)
2
+ * EasyQuery.JS Community 7.1.2-rc07 (https://korzh.com/easyquery/javascript)
3
3
  * Copyright 2021 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.1.2-rc04 (https://korzh.com/easyquery/javascript)
2
+ * EasyQuery.JS Community 7.1.2-rc07 (https://korzh.com/easyquery/javascript)
3
3
  * Copyright 2021 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.1.2-rc04 (https://korzh.com/easyquery/javascript)
2
+ * EasyQuery.JS Community 7.1.2-rc07 (https://korzh.com/easyquery/javascript)
3
3
  * Copyright 2021 Korzh.com. All rights reserved.
4
4
  *
5
5
  * EasyQuery.JS commercial licenses may be obtained at
@@ -9382,7 +9382,8 @@ var simple_column_renderer_SimpleColumnRendererCP = /** @class */ (function (_su
9382
9382
  _this.panel.showEntitiesMenu({
9383
9383
  anchor: ev.target,
9384
9384
  selectedIds: null,
9385
- itemSelectedCallback: _this.baseExpressionItemSelectedCallback.bind(_this)
9385
+ itemSelectedCallback: _this.baseExpressionItemSelectedCallback.bind(_this),
9386
+ itemFilterCallback: function (item) { return item.id !== '__AddAll__'; }
9386
9387
  });
9387
9388
  return false;
9388
9389
  })
@@ -9950,7 +9951,6 @@ var columns_panel_ColumnsPanel = /** @class */ (function (_super) {
9950
9951
  buttons: null,
9951
9952
  alwaysShowButtons: false,
9952
9953
  accentActiveColumn: true,
9953
- menuSearchBoxAfter: 30,
9954
9954
  allowDragDrop: true,
9955
9955
  menuOptions: {
9956
9956
  showSearchBoxAfter: 30,
@@ -9963,7 +9963,8 @@ var columns_panel_ColumnsPanel = /** @class */ (function (_super) {
9963
9963
  sortEntities: false,
9964
9964
  columnRenderedCallback: null,
9965
9965
  customExpressionText: 0,
9966
- allowHiddenColumns: false
9966
+ allowHiddenColumns: false,
9967
+ showAddAllForEntity: false
9967
9968
  };
9968
9969
  _this.landingSlot = Object(lib_public_api["i" /* domel */])('div')
9969
9970
  .addClass(_this.cssPrefix + "-col-landing-slot")
@@ -10082,8 +10083,13 @@ var columns_panel_ColumnsPanel = /** @class */ (function (_super) {
10082
10083
  anchor: e.target,
10083
10084
  selectedIds: null,
10084
10085
  itemSelectedCallback: function (data, items) {
10085
- var attrid = data.id;
10086
- _this.addNewColumn(attrid);
10086
+ if (data.id === '__AddAll__' && data.extra && Array.isArray(data.extra.ids)) {
10087
+ data.extra.ids.forEach(function (attrId) { return _this.addNewColumn(attrId); });
10088
+ }
10089
+ else {
10090
+ var attrid = data.id;
10091
+ _this.addNewColumn(attrid);
10092
+ }
10087
10093
  return false;
10088
10094
  }
10089
10095
  });
@@ -10456,6 +10462,24 @@ var columns_panel_ColumnsPanel = /** @class */ (function (_super) {
10456
10462
  var query = this.getQuery();
10457
10463
  return query.isEx() && this.options.allowCustomExpressions;
10458
10464
  };
10465
+ ColumnsPanel.prototype.addAllColumnsToEntitiesList = function (list) {
10466
+ var _this = this;
10467
+ var attrIds = list.filter(function (item) { return !item.isEntity; }).map(function (item) { return item.id; });
10468
+ if (attrIds.length > 0) {
10469
+ list.unshift({
10470
+ id: '__AddAll__',
10471
+ text: public_api["g" /* i18n */].getText('AddAllForEntityText'),
10472
+ extra: {
10473
+ ids: attrIds
10474
+ }
10475
+ });
10476
+ }
10477
+ list.forEach(function (item) {
10478
+ if (item.items) {
10479
+ _this.addAllColumnsToEntitiesList(item.items);
10480
+ }
10481
+ });
10482
+ };
10459
10483
  ColumnsPanel.prototype.createEntitiesMenu = function () {
10460
10484
  var model = this.getContext().getModel();
10461
10485
  if (!model || model.isEmpty())
@@ -10465,6 +10489,10 @@ var columns_panel_ColumnsPanel = /** @class */ (function (_super) {
10465
10489
  menuId += '-EntitiesMenu';
10466
10490
  }
10467
10491
  var entitiesList = model.getEntitiesTree({ addUIC: false, addUIR: true, addUIS: false, attrPlacement: this.options.attrPlacement, sortEntities: this.options.sortEntities });
10492
+ // add [Add all columns] items
10493
+ if (this.options.showAddAllForEntity) {
10494
+ this.addAllColumnsToEntitiesList(entitiesList);
10495
+ }
10468
10496
  var options = {
10469
10497
  id: menuId,
10470
10498
  items: entitiesList,
@@ -11340,7 +11368,6 @@ var columns_bar_ColumnsBar = /** @class */ (function (_super) {
11340
11368
  titleElementFormat: null,
11341
11369
  alwaysShowButtons: false,
11342
11370
  accentActiveColumn: true,
11343
- menuSearchBoxAfter: 30,
11344
11371
  allowDragDrop: true,
11345
11372
  menuOptions: {
11346
11373
  showSearchBoxAfter: 30,
@@ -21421,11 +21448,11 @@ var report_view_ReportView = /** @class */ (function (_super) {
21421
21448
  _this.syncReportOnChange = true;
21422
21449
  _this.fetchDataOnChange = false;
21423
21450
  _this._reportSaveTemplate = "<div id=\"kdlg-dialog-form\" class=\"kfrm-form\">\n <div class=\"kfrm-fields label-above\">\n <label for=\"kdlg-dialog-form-input\" id=\"kdlg-dialog-form-content\"></label>\n <input type=\"text\" name=\"kdlg-dialog-form-input\" id=\"kdlg-dialog-form-input\" />\n <label for=\"kdlg-dialog-form-textarea\" id=\"kdlg-dialog-form-desc-label\"></label>\n <textarea type=\"text\" name=\"kdlg-dialog-form-textarea\" id=\"kdlg-dialog-form-textarea\"></textarea>\n </div>\n </div>";
21424
- var self = _this;
21425
- _this.exportButtonClickHandler = function (e) {
21426
- if (!this.classList.contains(self.disabledClass)) {
21427
- var format = this.getAttribute("data-format");
21428
- self.getContext().exportResult({ format: format });
21451
+ _this.context.useStoredQueryOnFetch = true;
21452
+ _this.exportButtonClickHandler = function (srcElement, e) {
21453
+ if (!srcElement.classList.contains(_this.disabledClass)) {
21454
+ var format = srcElement.getAttribute("data-format");
21455
+ _this.context.exportResult({ format: format });
21429
21456
  }
21430
21457
  };
21431
21458
  _this.clearReportButtonClickHandler = _this.clearReportButtonClick.bind(_this);
@@ -22226,6 +22253,7 @@ function addEasyQueryUITexts() {
22226
22253
  SortHeaderSorting: 'Sorting',
22227
22254
  StrAddColumns: 'Add columns',
22228
22255
  CustomExpression: 'Custom Expression',
22256
+ AddAllForEntityText: '[Add all attributes]',
22229
22257
  CmdMoveToStart: 'Move to start',
22230
22258
  CmdMoveRight: 'Move right',
22231
22259
  CmdMoveLeft: 'Move left',