@easyquery/enterprise 7.2.5 → 7.3.0-rc01

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.
@@ -827,12 +827,12 @@ class LCDialog {
827
827
  startPageOnSubmit(dlg) {
828
828
  const emailInput = document.getElementById('eqAuthEmail');
829
829
  const nameInput = document.getElementById('eqAuthName');
830
- const authEmail = emailInput.value;
831
- const authName = nameInput.value;
830
+ this.authEmail = emailInput.value;
831
+ this.authName = nameInput.value;
832
832
  dlg.disableButtons();
833
833
  this.http.post(core.equtils.combinePath(baseLicApiUrl, 'get-code'), {
834
- email: authEmail,
835
- name: authName,
834
+ email: this.authEmail,
835
+ name: this.authName,
836
836
  data: {
837
837
  ptag: this.context.backendInfo.type,
838
838
  apptype: this.context.backendInfo.subType,
@@ -842,7 +842,7 @@ class LCDialog {
842
842
  if (result.status !== 0) {
843
843
  throw new Error(result.message);
844
844
  }
845
- const dlg = this.dialogSet.openNext({ email: authEmail });
845
+ const dlg = this.dialogSet.openNext({ email: this.authEmail });
846
846
  setTimeout(() => {
847
847
  this.validateForm(dlg);
848
848
  const codeInput = document.getElementById('eqAuthCode');
@@ -852,7 +852,7 @@ class LCDialog {
852
852
  }, 200);
853
853
  })
854
854
  .catch(error => {
855
- dlg.showAlert(error.message, "error", true);
855
+ dlg.showAlert('Error: ' + error.message, "error", true);
856
856
  dlg.enableButtons();
857
857
  });
858
858
  return false;
@@ -863,6 +863,7 @@ class LCDialog {
863
863
  dlg.disableButtons();
864
864
  this.http.post(core.equtils.combinePath(baseLicApiUrl, 'get-key'), {
865
865
  token: authCode,
866
+ email: this.authEmail,
866
867
  ptag: this.context.backendInfo.type,
867
868
  version: eqVersion
868
869
  }, { dataType: 'json' })
@@ -899,7 +900,11 @@ class LCDialog {
899
900
  }
900
901
  })
901
902
  .catch(error => {
902
- dlg.showAlert(error.message, "error", true);
903
+ //quick fix for 7.2.5 (must be removed after fixing of HttpResponseError in EasyData)
904
+ if (!error.message) {
905
+ error.message = 'Invalid or expired code. Please re-submit your request.';
906
+ }
907
+ dlg.showAlert('Error: ' + error.message, "error", true);
903
908
  dlg.enableButtons();
904
909
  });
905
910
  return false;
@@ -825,12 +825,12 @@ class LCDialog {
825
825
  startPageOnSubmit(dlg) {
826
826
  const emailInput = document.getElementById('eqAuthEmail');
827
827
  const nameInput = document.getElementById('eqAuthName');
828
- const authEmail = emailInput.value;
829
- const authName = nameInput.value;
828
+ this.authEmail = emailInput.value;
829
+ this.authName = nameInput.value;
830
830
  dlg.disableButtons();
831
831
  this.http.post(equtils.combinePath(baseLicApiUrl, 'get-code'), {
832
- email: authEmail,
833
- name: authName,
832
+ email: this.authEmail,
833
+ name: this.authName,
834
834
  data: {
835
835
  ptag: this.context.backendInfo.type,
836
836
  apptype: this.context.backendInfo.subType,
@@ -840,7 +840,7 @@ class LCDialog {
840
840
  if (result.status !== 0) {
841
841
  throw new Error(result.message);
842
842
  }
843
- const dlg = this.dialogSet.openNext({ email: authEmail });
843
+ const dlg = this.dialogSet.openNext({ email: this.authEmail });
844
844
  setTimeout(() => {
845
845
  this.validateForm(dlg);
846
846
  const codeInput = document.getElementById('eqAuthCode');
@@ -850,7 +850,7 @@ class LCDialog {
850
850
  }, 200);
851
851
  })
852
852
  .catch(error => {
853
- dlg.showAlert(error.message, "error", true);
853
+ dlg.showAlert('Error: ' + error.message, "error", true);
854
854
  dlg.enableButtons();
855
855
  });
856
856
  return false;
@@ -861,6 +861,7 @@ class LCDialog {
861
861
  dlg.disableButtons();
862
862
  this.http.post(equtils.combinePath(baseLicApiUrl, 'get-key'), {
863
863
  token: authCode,
864
+ email: this.authEmail,
864
865
  ptag: this.context.backendInfo.type,
865
866
  version: eqVersion
866
867
  }, { dataType: 'json' })
@@ -897,7 +898,11 @@ class LCDialog {
897
898
  }
898
899
  })
899
900
  .catch(error => {
900
- dlg.showAlert(error.message, "error", true);
901
+ //quick fix for 7.2.5 (must be removed after fixing of HttpResponseError in EasyData)
902
+ if (!error.message) {
903
+ error.message = 'Invalid or expired code. Please re-submit your request.';
904
+ }
905
+ dlg.showAlert('Error: ' + error.message, "error", true);
901
906
  dlg.enableButtons();
902
907
  });
903
908
  return false;
@@ -4,6 +4,8 @@ export declare class LCDialog {
4
4
  private dialogSet;
5
5
  private http;
6
6
  private context;
7
+ private authName;
8
+ private authEmail;
7
9
  constructor(context: EqContext);
8
10
  show(): void;
9
11
  protected isValidForm(form: HTMLElement): boolean | RegExpMatchArray;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyquery/enterprise",
3
- "version": "7.2.5",
3
+ "version": "7.3.0-rc01",
4
4
  "description": "EasyQuery.JS Enterprise",
5
5
  "types": "./dist/types/public_api.d.ts",
6
6
  "main": "./dist/easyquery.enterprise.cjs.js",
@@ -27,10 +27,8 @@
27
27
  "bugs": "https://korzh.com/support",
28
28
  "license": "SEE LICENSE IN LICENSE.txt",
29
29
  "peerDependencies": {
30
- "@easydata/core": "^1.4.21",
31
- "@easydata/ui": "^1.4.21",
32
- "@easyquery/core": "^7.2.5",
33
- "@easyquery/ui": "^7.2.5"
30
+ "@easyquery/core": "^7.3.0-rc01",
31
+ "@easyquery/ui": "^7.3.0-rc01"
34
32
  },
35
33
  "files": [
36
34
  "dist"