@ezeep/ezeep-js 1.0.201 → 1.0.202

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.
@@ -33238,13 +33238,13 @@ let EzpPrinting = class {
33238
33238
  authStore.state.isAuthorized = true;
33239
33239
  }
33240
33240
  if (!response.ok) {
33241
- authStore.state.isAuthorized = true;
33241
+ authStore.state.isAuthorized = false;
33242
33242
  throw new Error('http status ' + response.status);
33243
33243
  }
33244
33244
  })
33245
33245
  .catch(() => {
33246
33246
  authStore.state.isAuthorized = false;
33247
- localStorage.setItem('isAuthorized', 'false');
33247
+ localStorage.setItem('isAuthorized', authStore.state.isAuthorized.toString());
33248
33248
  return false;
33249
33249
  });
33250
33250
  if (accessToken === '') {
@@ -33253,7 +33253,6 @@ let EzpPrinting = class {
33253
33253
  }
33254
33254
  if (localStorage.getItem('isAuthorized')) {
33255
33255
  authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33256
- this.authOpen = !authStore.state.isAuthorized;
33257
33256
  }
33258
33257
  return authStore.state.isAuthorized;
33259
33258
  }
@@ -33286,7 +33285,9 @@ let EzpPrinting = class {
33286
33285
  }
33287
33286
  sendCodeToParentWindow();
33288
33287
  initi18n(this.language);
33289
- this.checkAuth();
33288
+ this.checkAuth().then(() => {
33289
+ this.authOpen = !authStore.state.isAuthorized;
33290
+ });
33290
33291
  }
33291
33292
  componentDidLoad() {
33292
33293
  this.refreshTokensPeriodically(1800);
@@ -141,13 +141,13 @@ export class EzpPrinting {
141
141
  authStore.state.isAuthorized = true;
142
142
  }
143
143
  if (!response.ok) {
144
- authStore.state.isAuthorized = true;
144
+ authStore.state.isAuthorized = false;
145
145
  throw new Error('http status ' + response.status);
146
146
  }
147
147
  })
148
148
  .catch(() => {
149
149
  authStore.state.isAuthorized = false;
150
- localStorage.setItem('isAuthorized', 'false');
150
+ localStorage.setItem('isAuthorized', authStore.state.isAuthorized.toString());
151
151
  return false;
152
152
  });
153
153
  if (accessToken === '') {
@@ -156,7 +156,6 @@ export class EzpPrinting {
156
156
  }
157
157
  if (localStorage.getItem('isAuthorized')) {
158
158
  authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
159
- this.authOpen = !authStore.state.isAuthorized;
160
159
  }
161
160
  return authStore.state.isAuthorized;
162
161
  }
@@ -189,7 +188,9 @@ export class EzpPrinting {
189
188
  }
190
189
  sendCodeToParentWindow();
191
190
  initi18n(this.language);
192
- this.checkAuth();
191
+ this.checkAuth().then(() => {
192
+ this.authOpen = !authStore.state.isAuthorized;
193
+ });
193
194
  }
194
195
  componentDidLoad() {
195
196
  this.refreshTokensPeriodically(1800);
@@ -33263,13 +33263,13 @@ let EzpPrinting$1 = class extends HTMLElement {
33263
33263
  authStore.state.isAuthorized = true;
33264
33264
  }
33265
33265
  if (!response.ok) {
33266
- authStore.state.isAuthorized = true;
33266
+ authStore.state.isAuthorized = false;
33267
33267
  throw new Error('http status ' + response.status);
33268
33268
  }
33269
33269
  })
33270
33270
  .catch(() => {
33271
33271
  authStore.state.isAuthorized = false;
33272
- localStorage.setItem('isAuthorized', 'false');
33272
+ localStorage.setItem('isAuthorized', authStore.state.isAuthorized.toString());
33273
33273
  return false;
33274
33274
  });
33275
33275
  if (accessToken === '') {
@@ -33278,7 +33278,6 @@ let EzpPrinting$1 = class extends HTMLElement {
33278
33278
  }
33279
33279
  if (localStorage.getItem('isAuthorized')) {
33280
33280
  authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33281
- this.authOpen = !authStore.state.isAuthorized;
33282
33281
  }
33283
33282
  return authStore.state.isAuthorized;
33284
33283
  }
@@ -33311,7 +33310,9 @@ let EzpPrinting$1 = class extends HTMLElement {
33311
33310
  }
33312
33311
  sendCodeToParentWindow();
33313
33312
  initi18n(this.language);
33314
- this.checkAuth();
33313
+ this.checkAuth().then(() => {
33314
+ this.authOpen = !authStore.state.isAuthorized;
33315
+ });
33315
33316
  }
33316
33317
  componentDidLoad() {
33317
33318
  this.refreshTokensPeriodically(1800);
@@ -33234,13 +33234,13 @@ let EzpPrinting = class {
33234
33234
  authStore.state.isAuthorized = true;
33235
33235
  }
33236
33236
  if (!response.ok) {
33237
- authStore.state.isAuthorized = true;
33237
+ authStore.state.isAuthorized = false;
33238
33238
  throw new Error('http status ' + response.status);
33239
33239
  }
33240
33240
  })
33241
33241
  .catch(() => {
33242
33242
  authStore.state.isAuthorized = false;
33243
- localStorage.setItem('isAuthorized', 'false');
33243
+ localStorage.setItem('isAuthorized', authStore.state.isAuthorized.toString());
33244
33244
  return false;
33245
33245
  });
33246
33246
  if (accessToken === '') {
@@ -33249,7 +33249,6 @@ let EzpPrinting = class {
33249
33249
  }
33250
33250
  if (localStorage.getItem('isAuthorized')) {
33251
33251
  authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33252
- this.authOpen = !authStore.state.isAuthorized;
33253
33252
  }
33254
33253
  return authStore.state.isAuthorized;
33255
33254
  }
@@ -33282,7 +33281,9 @@ let EzpPrinting = class {
33282
33281
  }
33283
33282
  sendCodeToParentWindow();
33284
33283
  initi18n(this.language);
33285
- this.checkAuth();
33284
+ this.checkAuth().then(() => {
33285
+ this.authOpen = !authStore.state.isAuthorized;
33286
+ });
33286
33287
  }
33287
33288
  componentDidLoad() {
33288
33289
  this.refreshTokensPeriodically(1800);