@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
@@ -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
@@ -20499,10 +20499,14 @@ var QueryNameWidget = /** @class */ (function (_super) {
20499
20499
  var _this = _super.call(this, slot) || this;
20500
20500
  _this.queryEventCallbackId = null;
20501
20501
  _this.group = external_easyqueryCore_.WidgetGroup.Query | external_easyqueryCore_.WidgetGroup.QueryStatus;
20502
+ _this.nameTemplate = '{name}';
20502
20503
  return _this;
20503
20504
  }
20504
20505
  QueryNameWidget.prototype.init = function (context, options) {
20505
20506
  _super.prototype.init.call(this, context, options);
20507
+ if (options && options.nameTemplate) {
20508
+ this.nameTemplate = options.nameTemplate;
20509
+ }
20506
20510
  this.destroyCore();
20507
20511
  this.attachQueryObserver();
20508
20512
  };
@@ -20547,10 +20551,15 @@ var QueryNameWidget = /** @class */ (function (_super) {
20547
20551
  this.slot.appendChild(this.tooltipSlot);
20548
20552
  }
20549
20553
  // Update
20550
- var queryName = this.context.getQuery().getName();
20551
- this.nameSlot.textContent = queryName;
20552
- this.tooltipSlot.textContent = queryName;
20553
- this.asteriskSlot.style.visibility = this.context.getQuery().isModified() ? "visible" : "hidden";
20554
+ var query = this.context.getQuery();
20555
+ var queryName = query.getName();
20556
+ var queryDescription = query.getDescription() || '';
20557
+ var text = this.nameTemplate
20558
+ .replace('{name}', queryName)
20559
+ .replace('{description}', queryDescription);
20560
+ this.nameSlot.textContent = text;
20561
+ this.tooltipSlot.textContent = text;
20562
+ this.asteriskSlot.style.visibility = query.isModified() ? "visible" : "hidden";
20554
20563
  };
20555
20564
  QueryNameWidget.prototype.clear = function () {
20556
20565
  this.slot.innerHTML = "";
@@ -22511,7 +22520,6 @@ var ReportView = /** @class */ (function (_super) {
22511
22520
  var target = e.target;
22512
22521
  var rid = target.getAttribute('data-rid');
22513
22522
  _this.loadReport(rid);
22514
- _this.setActiveReport(rid);
22515
22523
  });
22516
22524
  ul.appendChild(li);
22517
22525
  };