@easyquery/enterprise 7.2.4-rc04 → 7.2.4

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.
@@ -183,6 +183,7 @@ Math.trunc = Math.trunc || function (x) {
183
183
  };
184
184
  var lcv = {
185
185
  __kt: 0,
186
+ versionNum: '' + majVer + '.' + minVer,
186
187
  ck: function (key) {
187
188
  if (!key || !key.length) {
188
189
  this.__kt = -3;
@@ -7486,6 +7487,7 @@ var dialogs = new DefaultDialogService();
7486
7487
 
7487
7488
 
7488
7489
 
7490
+
7489
7491
  function strIsEmpty(str) {
7490
7492
  if (str) {
7491
7493
  return str.trim() === '';
@@ -7494,8 +7496,7 @@ function strIsEmpty(str) {
7494
7496
  return true;
7495
7497
  }
7496
7498
  var baseLicApiUrl = 'https://account.korzh.com/api/license';
7497
- //const baseLicApiUrl = 'https://localhost:44301/api/license';
7498
- var eqVersion = '7.2';
7499
+ var eqVersion = lcv.versionNum;
7499
7500
  var LCDialog = /** @class */ (function () {
7500
7501
  function LCDialog(context) {
7501
7502
  this.http = new HttpClient();
@@ -7541,7 +7542,6 @@ var LCDialog = /** @class */ (function () {
7541
7542
  },
7542
7543
  ]);
7543
7544
  var dialog1 = this.dialogSet.open(0);
7544
- //dialog1.getRootElement();
7545
7545
  setTimeout(function () {
7546
7546
  _this.validateForm(dialog1);
7547
7547
  var emailInput = document.getElementById('eqAuthEmail');
@@ -7651,10 +7651,9 @@ var LCDialog = /** @class */ (function () {
7651
7651
  var form;
7652
7652
  var formBuilder = domel('div');
7653
7653
  formBuilder.addChild('div', function (b) { return b
7654
- .html('<div style="font-size:1.2em">You have successfully completed the registration process.</div>' +
7655
- '<div style="font-size:1.2em">Please restart your web application to get the key applied.</div>'); });
7654
+ .html('<div style="font-size:1.2em">You have successfully completed the registration.</div>' + '{{message}}'); });
7656
7655
  form = formBuilder.toDOM();
7657
- return form;
7656
+ return form.outerHTML;
7658
7657
  };
7659
7658
  LCDialog.prototype.buildFailurePage = function () {
7660
7659
  var form;
@@ -7716,7 +7715,13 @@ var LCDialog = /** @class */ (function () {
7716
7715
  version: eqVersion,
7717
7716
  key: result.key
7718
7717
  }, { dataType: 'json' })
7719
- .then(function (_) { return _this.dialogSet.openNext(); });
7718
+ .then(function (_) { return _this.dialogSet.open(2, {
7719
+ message: '<div style="font-size:1.2em">Please restart your web application to get the key applied.</div>'
7720
+ }); }, function (_) { return _this.dialogSet.open(2, {
7721
+ message: '<div style="font-size:1.2em">' +
7722
+ 'Please visit <a href="https://account.korzh.com">your account page on Korzh.com</a> to get the key ' +
7723
+ 'and then add it to the <i>appsettings.json</i> file (in the <i>EasyQuery/LicenseKey</i> option).</div>'
7724
+ }); });
7720
7725
  break;
7721
7726
  case 2:
7722
7727
  _this.dialogSet.open(3, {
@@ -7726,8 +7731,8 @@ var LCDialog = /** @class */ (function () {
7726
7731
  break;
7727
7732
  case 3:
7728
7733
  _this.dialogSet.open(3, {
7729
- message: '<div style="font-size:1.2em">Your purchased license for EasyQuery has expired.</div>' +
7730
- '<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>'
7734
+ message: '<div style="font-size:1.2em">The maintenance subscription for your EasyQuery license has expired.</div>' +
7735
+ '<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>'
7731
7736
  });
7732
7737
  break;
7733
7738
  default:
@@ -7743,54 +7748,54 @@ var LCDialog = /** @class */ (function () {
7743
7748
  return LCDialog;
7744
7749
  }());
7745
7750
 
7746
- function showNoLicenseAlert(lcv) {
7747
- var title, body, buttonTitle, buttonUrl;
7748
- switch (lcv.__kt) {
7749
- case 1:
7750
- title = 'EasyQuery trial has expired';
7751
- 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.";
7752
- buttonTitle = 'Buy a license';
7753
- buttonUrl = 'https://korzh.com/easyquery/licensing';
7754
- break;
7755
- case -3:
7756
- title = 'No license key for EasyQuery';
7757
- 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.";
7758
- buttonTitle = 'Register trial';
7759
- buttonUrl = 'https://korzh.com/easyquery#get-started';
7760
- break;
7761
- default:
7762
- title = "Invalid key for EasyQuery!";
7763
- 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.";
7764
- buttonTitle = 'Get key';
7765
- buttonUrl = 'https://korzh.com/account';
7766
- break;
7751
+ function showNoLicenseAlert(context) {
7752
+ if (lcv.__kt == -3) {
7753
+ var lcd = new LCDialog(context);
7754
+ lcd.show();
7767
7755
  }
7768
- var ds = new DefaultDialogService();
7769
- var dlg = ds.open({
7770
- closable: false,
7771
- cancelable: false,
7772
- submitable: false,
7773
- title: title,
7774
- body: body
7775
- });
7776
- var footer = dlg.getRootElement().querySelector('footer');
7777
- domel(footer)
7778
- .removeClass('align-right')
7779
- .setStyle('justify-content', 'center')
7780
- .addChild('button', function (b) { return b
7781
- .addClass('kfrm-button', 'is-info')
7782
- .addText(buttonTitle)
7783
- .on('click', function (e) {
7784
- window.location.href = buttonUrl;
7785
- }); });
7786
- if (lcv.__kt == 1) {
7756
+ else {
7757
+ var title = void 0, body = void 0, buttonTitle_1, buttonUrl_1;
7758
+ switch (lcv.__kt) {
7759
+ case 1:
7760
+ title = 'EasyQuery trial has expired';
7761
+ 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.";
7762
+ buttonTitle_1 = 'Buy a license';
7763
+ buttonUrl_1 = '#licensing';
7764
+ break;
7765
+ default:
7766
+ title = "Invalid key for EasyQuery!";
7767
+ 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);
7768
+ buttonTitle_1 = 'Get key';
7769
+ buttonUrl_1 = 'https://account.korzh.com';
7770
+ break;
7771
+ }
7772
+ var ds = new DefaultDialogService();
7773
+ var dlg = ds.open({
7774
+ closable: false,
7775
+ cancelable: false,
7776
+ submitable: false,
7777
+ title: title,
7778
+ body: body
7779
+ });
7780
+ var footer = dlg.getRootElement().querySelector('footer');
7787
7781
  domel(footer)
7782
+ .removeClass('align-right')
7783
+ .setStyle('justify-content', 'center')
7788
7784
  .addChild('button', function (b) { return b
7789
- .addClass('kfrm-button')
7790
- .addText('Extend trial')
7785
+ .addClass('kfrm-button', 'is-info')
7786
+ .addText(buttonTitle_1)
7791
7787
  .on('click', function (e) {
7792
- window.location.href = 'https://korzh.com/account';
7788
+ window.location.href = buttonUrl_1;
7793
7789
  }); });
7790
+ if (lcv.__kt == 1) {
7791
+ domel(footer)
7792
+ .addChild('button', function (b) { return b
7793
+ .addClass('kfrm-button')
7794
+ .addText('Extend trial')
7795
+ .on('click', function (e) {
7796
+ window.location.href = 'https://account.korzh.com';
7797
+ }); });
7798
+ }
7794
7799
  }
7795
7800
  }
7796
7801
 
@@ -7809,7 +7814,7 @@ external_easyqueryCore_.EqContext.prototype.setLicenseKeyEndpoint = function (en
7809
7814
  };
7810
7815
  external_easyqueryCore_.EqContext.prototype.useEnterprise = function (keyOrInitCallback) {
7811
7816
  var _this = this;
7812
- var func = function (key, showAlert) {
7817
+ var func = function (key) {
7813
7818
  lcv.ck(key);
7814
7819
  if (lcv.__kt > 1) {
7815
7820
  var services = _this.getServices();
@@ -7828,24 +7833,18 @@ external_easyqueryCore_.EqContext.prototype.useEnterprise = function (keyOrInitC
7828
7833
  }
7829
7834
  }
7830
7835
  else {
7831
- if (showAlert) {
7832
- showNoLicenseAlert(lcv);
7833
- }
7834
- else {
7835
- var lcd = new LCDialog(_this);
7836
- lcd.show();
7837
- }
7836
+ showNoLicenseAlert(_this);
7838
7837
  }
7839
7838
  };
7840
7839
  if (typeof (keyOrInitCallback) === "string") {
7841
- func(keyOrInitCallback, true);
7840
+ func(keyOrInitCallback);
7842
7841
  }
7843
7842
  else if (typeof (keyOrInitCallback) === "function") {
7844
7843
  var http_1 = this.getServices().getHttpClient();
7845
7844
  var url_1 = external_easyqueryCore_.equtils.combinePath(this.getBaseEndpoint(), 'lck2');
7846
7845
  http_1.get(url_1)
7847
7846
  .then(function (result) {
7848
- func(result.key.split("").reverse().join(""), false);
7847
+ func(result.key.split("").reverse().join(""));
7849
7848
  _this.useBackend({
7850
7849
  type: result.backendType,
7851
7850
  subType: result.appType
@@ -7856,7 +7855,7 @@ external_easyqueryCore_.EqContext.prototype.useEnterprise = function (keyOrInitC
7856
7855
  url_1 = external_easyqueryCore_.equtils.combinePath(_this.getBaseEndpoint(), 'lck');
7857
7856
  http_1.get(url_1)
7858
7857
  .then(function (result) {
7859
- func(result.split("").reverse().join(""), false);
7858
+ func(result.split("").reverse().join(""));
7860
7859
  keyOrInitCallback();
7861
7860
  })
7862
7861
  .catch(function (error) { return _this.throwError({