@easyquery/enterprise 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 Enterprise 7.2.4-rc05 (https://korzh.com/easyquery/javascript)
2
+ * EasyQuery.JS Enterprise 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
@@ -33151,10 +33151,14 @@ var QueryNameWidget = /** @class */ (function (_super) {
33151
33151
  var _this = _super.call(this, slot) || this;
33152
33152
  _this.queryEventCallbackId = null;
33153
33153
  _this.group = WidgetGroup.Query | WidgetGroup.QueryStatus;
33154
+ _this.nameTemplate = '{name}';
33154
33155
  return _this;
33155
33156
  }
33156
33157
  QueryNameWidget.prototype.init = function (context, options) {
33157
33158
  _super.prototype.init.call(this, context, options);
33159
+ if (options && options.nameTemplate) {
33160
+ this.nameTemplate = options.nameTemplate;
33161
+ }
33158
33162
  this.destroyCore();
33159
33163
  this.attachQueryObserver();
33160
33164
  };
@@ -33199,10 +33203,15 @@ var QueryNameWidget = /** @class */ (function (_super) {
33199
33203
  this.slot.appendChild(this.tooltipSlot);
33200
33204
  }
33201
33205
  // Update
33202
- var queryName = this.context.getQuery().getName();
33203
- this.nameSlot.textContent = queryName;
33204
- this.tooltipSlot.textContent = queryName;
33205
- this.asteriskSlot.style.visibility = this.context.getQuery().isModified() ? "visible" : "hidden";
33206
+ var query = this.context.getQuery();
33207
+ var queryName = query.getName();
33208
+ var queryDescription = query.getDescription() || '';
33209
+ var text = this.nameTemplate
33210
+ .replace('{name}', queryName)
33211
+ .replace('{description}', queryDescription);
33212
+ this.nameSlot.textContent = text;
33213
+ this.tooltipSlot.textContent = text;
33214
+ this.asteriskSlot.style.visibility = query.isModified() ? "visible" : "hidden";
33206
33215
  };
33207
33216
  QueryNameWidget.prototype.clear = function () {
33208
33217
  this.slot.innerHTML = "";
@@ -35164,7 +35173,6 @@ var ReportView = /** @class */ (function (_super) {
35164
35173
  var target = e.target;
35165
35174
  var rid = target.getAttribute('data-rid');
35166
35175
  _this.loadReport(rid);
35167
- _this.setActiveReport(rid);
35168
35176
  });
35169
35177
  ul.appendChild(li);
35170
35178
  };
@@ -35729,6 +35737,7 @@ Math.trunc = Math.trunc || function (x) {
35729
35737
  };
35730
35738
  var lcv = {
35731
35739
  __kt: 0,
35740
+ versionNum: '' + majVer + '.' + minVer,
35732
35741
  ck: function (key) {
35733
35742
  if (!key || !key.length) {
35734
35743
  this.__kt = -3;
@@ -36485,6 +36494,7 @@ var DataTableAggregatesCalculator = /** @class */ (function () {
36485
36494
 
36486
36495
 
36487
36496
 
36497
+
36488
36498
  function strIsEmpty(str) {
36489
36499
  if (str) {
36490
36500
  return str.trim() === '';
@@ -36493,8 +36503,7 @@ function strIsEmpty(str) {
36493
36503
  return true;
36494
36504
  }
36495
36505
  var baseLicApiUrl = 'https://account.korzh.com/api/license';
36496
- //const baseLicApiUrl = 'https://localhost:44301/api/license';
36497
- var eqVersion = '7.2';
36506
+ var eqVersion = lcv.versionNum;
36498
36507
  var LCDialog = /** @class */ (function () {
36499
36508
  function LCDialog(context) {
36500
36509
  this.http = new public_api.HttpClient();
@@ -36540,7 +36549,6 @@ var LCDialog = /** @class */ (function () {
36540
36549
  },
36541
36550
  ]);
36542
36551
  var dialog1 = this.dialogSet.open(0);
36543
- //dialog1.getRootElement();
36544
36552
  setTimeout(function () {
36545
36553
  _this.validateForm(dialog1);
36546
36554
  var emailInput = document.getElementById('eqAuthEmail');
@@ -36650,10 +36658,9 @@ var LCDialog = /** @class */ (function () {
36650
36658
  var form;
36651
36659
  var formBuilder = (0,lib_public_api.domel)('div');
36652
36660
  formBuilder.addChild('div', function (b) { return b
36653
- .html('<div style="font-size:1.2em">You have successfully completed the registration process.</div>' +
36654
- '<div style="font-size:1.2em">Please restart your web application to get the key applied.</div>'); });
36661
+ .html('<div style="font-size:1.2em">You have successfully completed the registration.</div>' + '{{message}}'); });
36655
36662
  form = formBuilder.toDOM();
36656
- return form;
36663
+ return form.outerHTML;
36657
36664
  };
36658
36665
  LCDialog.prototype.buildFailurePage = function () {
36659
36666
  var form;
@@ -36715,7 +36722,13 @@ var LCDialog = /** @class */ (function () {
36715
36722
  version: eqVersion,
36716
36723
  key: result.key
36717
36724
  }, { dataType: 'json' })
36718
- .then(function (_) { return _this.dialogSet.openNext(); });
36725
+ .then(function (_) { return _this.dialogSet.open(2, {
36726
+ message: '<div style="font-size:1.2em">Please restart your web application to get the key applied.</div>'
36727
+ }); }, function (_) { return _this.dialogSet.open(2, {
36728
+ message: '<div style="font-size:1.2em">' +
36729
+ 'Please visit <a href="https://account.korzh.com">your account page on Korzh.com</a> to get the key ' +
36730
+ 'and then add it to the <i>appsettings.json</i> file (in the <i>EasyQuery/LicenseKey</i> option).</div>'
36731
+ }); });
36719
36732
  break;
36720
36733
  case 2:
36721
36734
  _this.dialogSet.open(3, {
@@ -36725,8 +36738,8 @@ var LCDialog = /** @class */ (function () {
36725
36738
  break;
36726
36739
  case 3:
36727
36740
  _this.dialogSet.open(3, {
36728
- message: '<div style="font-size:1.2em">Your purchased license for EasyQuery has expired.</div>' +
36729
- '<div style="font-size:1.2em">You need to <a href="https://korzh.com/account">renew the subscription</a> to get a valid license.</div>'
36741
+ message: '<div style="font-size:1.2em">The maintenance subscription for your EasyQuery license has expired.</div>' +
36742
+ '<div style="font-size:1.2em">You need to <a href="https://account.korzh.com">renew the subscription</a> to get a valid license.</div>'
36730
36743
  });
36731
36744
  break;
36732
36745
  default:
@@ -36742,54 +36755,54 @@ var LCDialog = /** @class */ (function () {
36742
36755
  return LCDialog;
36743
36756
  }());
36744
36757
 
36745
- function showNoLicenseAlert(lcv) {
36746
- var title, body, buttonTitle, buttonUrl;
36747
- switch (lcv.__kt) {
36748
- case 1:
36749
- title = 'EasyQuery trial has expired';
36750
- body = "Your trial period for EasyQuery has expired. \n\tYou can send a request to <a href=\"https://korzh.com/account\">extend your trial</a> or <a href=\"https://korzh.com/easyquery/licensing\">buy a license</a> to get rid of all limitations.";
36751
- buttonTitle = 'Buy a license';
36752
- buttonUrl = 'https://korzh.com/easyquery/licensing';
36753
- break;
36754
- case -3:
36755
- title = 'No license key for EasyQuery';
36756
- body = "Please <a href=\"https://korzh.com/easyquery#get-started\">register for a trial</a> \n\tor <a href=\"https://korzh.com/easyquery/licensing\">purchase a license</a> to get a proper product key. <br />\n\tIf you already have a key, please follow <a href=\"https://korzh.com/easyquery/docs/getting-started/product-key\">this guide</a> to apply it.";
36757
- buttonTitle = 'Register trial';
36758
- buttonUrl = 'https://korzh.com/easyquery#get-started';
36759
- break;
36760
- default:
36761
- title = "Invalid key for EasyQuery!";
36762
- body = "The EasyQuery product key is either invalid or was issued for a different version of the library.\n The version you are using now is 7.2,\n\tso please <a href=\"https://korzh.com/account\">login to your account</a> to get a proper key for version 7.2.";
36763
- buttonTitle = 'Get key';
36764
- buttonUrl = 'https://korzh.com/account';
36765
- break;
36758
+ function showNoLicenseAlert(context) {
36759
+ if (lcv.__kt == -3) {
36760
+ var lcd = new LCDialog(context);
36761
+ lcd.show();
36766
36762
  }
36767
- var ds = new lib_public_api.DefaultDialogService();
36768
- var dlg = ds.open({
36769
- closable: false,
36770
- cancelable: false,
36771
- submitable: false,
36772
- title: title,
36773
- body: body
36774
- });
36775
- var footer = dlg.getRootElement().querySelector('footer');
36776
- (0,lib_public_api.domel)(footer)
36777
- .removeClass('align-right')
36778
- .setStyle('justify-content', 'center')
36779
- .addChild('button', function (b) { return b
36780
- .addClass('kfrm-button', 'is-info')
36781
- .addText(buttonTitle)
36782
- .on('click', function (e) {
36783
- window.location.href = buttonUrl;
36784
- }); });
36785
- if (lcv.__kt == 1) {
36763
+ else {
36764
+ var title = void 0, body = void 0, buttonTitle_1, buttonUrl_1;
36765
+ switch (lcv.__kt) {
36766
+ case 1:
36767
+ title = 'EasyQuery trial has expired';
36768
+ body = "Your trial period for EasyQuery has expired. \n You can <a href=\"https://korzh.com/support\">submit a request to extend your trial</a> or <a href=\"https://korzh.com/easyquery#licensing\">buy a license</a> to get rid of all limitations.";
36769
+ buttonTitle_1 = 'Buy a license';
36770
+ buttonUrl_1 = '#licensing';
36771
+ break;
36772
+ default:
36773
+ title = "Invalid key for EasyQuery!";
36774
+ body = "The EasyQuery product key is either invalid or was issued for a different version of the library.\n The version you are using now is ".concat(eqVersion, ",\n so please <a href=\"https://account.korzh.com\">login to your account</a> to get a proper key for version ").concat(eqVersion);
36775
+ buttonTitle_1 = 'Get key';
36776
+ buttonUrl_1 = 'https://account.korzh.com';
36777
+ break;
36778
+ }
36779
+ var ds = new lib_public_api.DefaultDialogService();
36780
+ var dlg = ds.open({
36781
+ closable: false,
36782
+ cancelable: false,
36783
+ submitable: false,
36784
+ title: title,
36785
+ body: body
36786
+ });
36787
+ var footer = dlg.getRootElement().querySelector('footer');
36786
36788
  (0,lib_public_api.domel)(footer)
36789
+ .removeClass('align-right')
36790
+ .setStyle('justify-content', 'center')
36787
36791
  .addChild('button', function (b) { return b
36788
- .addClass('kfrm-button')
36789
- .addText('Extend trial')
36792
+ .addClass('kfrm-button', 'is-info')
36793
+ .addText(buttonTitle_1)
36790
36794
  .on('click', function (e) {
36791
- window.location.href = 'https://korzh.com/account';
36795
+ window.location.href = buttonUrl_1;
36792
36796
  }); });
36797
+ if (lcv.__kt == 1) {
36798
+ (0,lib_public_api.domel)(footer)
36799
+ .addChild('button', function (b) { return b
36800
+ .addClass('kfrm-button')
36801
+ .addText('Extend trial')
36802
+ .on('click', function (e) {
36803
+ window.location.href = 'https://account.korzh.com';
36804
+ }); });
36805
+ }
36793
36806
  }
36794
36807
  }
36795
36808
  //# sourceMappingURL=lc-dialog.js.map
@@ -36808,7 +36821,7 @@ EqContext.prototype.setLicenseKeyEndpoint = function (endpoint) {
36808
36821
  };
36809
36822
  EqContext.prototype.useEnterprise = function (keyOrInitCallback) {
36810
36823
  var _this = this;
36811
- var func = function (key, showAlert) {
36824
+ var func = function (key) {
36812
36825
  lcv.ck(key);
36813
36826
  if (lcv.__kt > 1) {
36814
36827
  var services = _this.getServices();
@@ -36827,24 +36840,18 @@ EqContext.prototype.useEnterprise = function (keyOrInitCallback) {
36827
36840
  }
36828
36841
  }
36829
36842
  else {
36830
- if (showAlert) {
36831
- showNoLicenseAlert(lcv);
36832
- }
36833
- else {
36834
- var lcd = new LCDialog(_this);
36835
- lcd.show();
36836
- }
36843
+ showNoLicenseAlert(_this);
36837
36844
  }
36838
36845
  };
36839
36846
  if (typeof (keyOrInitCallback) === "string") {
36840
- func(keyOrInitCallback, true);
36847
+ func(keyOrInitCallback);
36841
36848
  }
36842
36849
  else if (typeof (keyOrInitCallback) === "function") {
36843
36850
  var http_1 = this.getServices().getHttpClient();
36844
36851
  var url_1 = equtils.combinePath(this.getBaseEndpoint(), 'lck2');
36845
36852
  http_1.get(url_1)
36846
36853
  .then(function (result) {
36847
- func(result.key.split("").reverse().join(""), false);
36854
+ func(result.key.split("").reverse().join(""));
36848
36855
  _this.useBackend({
36849
36856
  type: result.backendType,
36850
36857
  subType: result.appType
@@ -36855,7 +36862,7 @@ EqContext.prototype.useEnterprise = function (keyOrInitCallback) {
36855
36862
  url_1 = equtils.combinePath(_this.getBaseEndpoint(), 'lck');
36856
36863
  http_1.get(url_1)
36857
36864
  .then(function (result) {
36858
- func(result.split("").reverse().join(""), false);
36865
+ func(result.split("").reverse().join(""));
36859
36866
  keyOrInitCallback();
36860
36867
  })
36861
36868
  .catch(function (error) { return _this.throwError({