@easyquery/ui 7.2.4-rc05 → 7.2.5-beta01

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.2.4-rc05 (https://korzh.com/easyquery/javascript)
2
+ * EasyQuery.JS Community 7.2.5-beta01 (https://korzh.com/easyquery/javascript)
3
3
  * Copyright 2023 Korzh.com. All rights reserved.
4
4
  *
5
5
  * EasyQuery.JS commercial licenses may be obtained at
@@ -32060,10 +32060,14 @@ var QueryNameWidget = /** @class */ (function (_super) {
32060
32060
  var _this = _super.call(this, slot) || this;
32061
32061
  _this.queryEventCallbackId = null;
32062
32062
  _this.group = WidgetGroup.Query | WidgetGroup.QueryStatus;
32063
+ _this.nameTemplate = '{name}';
32063
32064
  return _this;
32064
32065
  }
32065
32066
  QueryNameWidget.prototype.init = function (context, options) {
32066
32067
  _super.prototype.init.call(this, context, options);
32068
+ if (options && options.nameTemplate) {
32069
+ this.nameTemplate = options.nameTemplate;
32070
+ }
32067
32071
  this.destroyCore();
32068
32072
  this.attachQueryObserver();
32069
32073
  };
@@ -32108,10 +32112,15 @@ var QueryNameWidget = /** @class */ (function (_super) {
32108
32112
  this.slot.appendChild(this.tooltipSlot);
32109
32113
  }
32110
32114
  // Update
32111
- var queryName = this.context.getQuery().getName();
32112
- this.nameSlot.textContent = queryName;
32113
- this.tooltipSlot.textContent = queryName;
32114
- this.asteriskSlot.style.visibility = this.context.getQuery().isModified() ? "visible" : "hidden";
32115
+ var query = this.context.getQuery();
32116
+ var queryName = query.getName();
32117
+ var queryDescription = query.getDescription() || '';
32118
+ var text = this.nameTemplate
32119
+ .replace('{name}', queryName)
32120
+ .replace('{description}', queryDescription);
32121
+ this.nameSlot.textContent = text;
32122
+ this.tooltipSlot.textContent = text;
32123
+ this.asteriskSlot.style.visibility = query.isModified() ? "visible" : "hidden";
32115
32124
  };
32116
32125
  QueryNameWidget.prototype.clear = function () {
32117
32126
  this.slot.innerHTML = "";
@@ -34073,7 +34082,6 @@ var ReportView = /** @class */ (function (_super) {
34073
34082
  var target = e.target;
34074
34083
  var rid = target.getAttribute('data-rid');
34075
34084
  _this.loadReport(rid);
34076
- _this.setActiveReport(rid);
34077
34085
  });
34078
34086
  ul.appendChild(li);
34079
34087
  };