@ezeep/ezeep-js 1.0.202 → 1.0.205

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.
@@ -33232,7 +33232,7 @@ let EzpPrinting = class {
33232
33232
  async checkAuth() {
33233
33233
  const printService = new EzpPrintService(this.redirecturi, this.clientid);
33234
33234
  let accessToken = authStore.state.accessToken;
33235
- printService.getConfig(authStore.state.accessToken)
33235
+ await printService.getConfig(authStore.state.accessToken)
33236
33236
  .then((response) => {
33237
33237
  if (response.ok) {
33238
33238
  authStore.state.isAuthorized = true;
@@ -33252,7 +33252,7 @@ let EzpPrinting = class {
33252
33252
  authStore.state.accessToken = accessToken;
33253
33253
  }
33254
33254
  if (localStorage.getItem('isAuthorized')) {
33255
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33255
+ authStore.state.isAuthorized = (localStorage.getItem('isAuthorized')) === 'true';
33256
33256
  }
33257
33257
  return authStore.state.isAuthorized;
33258
33258
  }
@@ -33285,9 +33285,7 @@ let EzpPrinting = class {
33285
33285
  }
33286
33286
  sendCodeToParentWindow();
33287
33287
  initi18n(this.language);
33288
- this.checkAuth().then(() => {
33289
- this.authOpen = !authStore.state.isAuthorized;
33290
- });
33288
+ this.checkAuth();
33291
33289
  }
33292
33290
  componentDidLoad() {
33293
33291
  this.refreshTokensPeriodically(1800);
@@ -135,7 +135,7 @@ export class EzpPrinting {
135
135
  async checkAuth() {
136
136
  const printService = new EzpPrintService(this.redirecturi, this.clientid);
137
137
  let accessToken = authStore.state.accessToken;
138
- printService.getConfig(authStore.state.accessToken)
138
+ await printService.getConfig(authStore.state.accessToken)
139
139
  .then((response) => {
140
140
  if (response.ok) {
141
141
  authStore.state.isAuthorized = true;
@@ -155,7 +155,7 @@ export class EzpPrinting {
155
155
  authStore.state.accessToken = accessToken;
156
156
  }
157
157
  if (localStorage.getItem('isAuthorized')) {
158
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
158
+ authStore.state.isAuthorized = (localStorage.getItem('isAuthorized')) === 'true';
159
159
  }
160
160
  return authStore.state.isAuthorized;
161
161
  }
@@ -188,9 +188,7 @@ export class EzpPrinting {
188
188
  }
189
189
  sendCodeToParentWindow();
190
190
  initi18n(this.language);
191
- this.checkAuth().then(() => {
192
- this.authOpen = !authStore.state.isAuthorized;
193
- });
191
+ this.checkAuth();
194
192
  }
195
193
  componentDidLoad() {
196
194
  this.refreshTokensPeriodically(1800);
@@ -33257,7 +33257,7 @@ let EzpPrinting$1 = class extends HTMLElement {
33257
33257
  async checkAuth() {
33258
33258
  const printService = new EzpPrintService(this.redirecturi, this.clientid);
33259
33259
  let accessToken = authStore.state.accessToken;
33260
- printService.getConfig(authStore.state.accessToken)
33260
+ await printService.getConfig(authStore.state.accessToken)
33261
33261
  .then((response) => {
33262
33262
  if (response.ok) {
33263
33263
  authStore.state.isAuthorized = true;
@@ -33277,7 +33277,7 @@ let EzpPrinting$1 = class extends HTMLElement {
33277
33277
  authStore.state.accessToken = accessToken;
33278
33278
  }
33279
33279
  if (localStorage.getItem('isAuthorized')) {
33280
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33280
+ authStore.state.isAuthorized = (localStorage.getItem('isAuthorized')) === 'true';
33281
33281
  }
33282
33282
  return authStore.state.isAuthorized;
33283
33283
  }
@@ -33310,9 +33310,7 @@ let EzpPrinting$1 = class extends HTMLElement {
33310
33310
  }
33311
33311
  sendCodeToParentWindow();
33312
33312
  initi18n(this.language);
33313
- this.checkAuth().then(() => {
33314
- this.authOpen = !authStore.state.isAuthorized;
33315
- });
33313
+ this.checkAuth();
33316
33314
  }
33317
33315
  componentDidLoad() {
33318
33316
  this.refreshTokensPeriodically(1800);
@@ -33228,7 +33228,7 @@ let EzpPrinting = class {
33228
33228
  async checkAuth() {
33229
33229
  const printService = new EzpPrintService(this.redirecturi, this.clientid);
33230
33230
  let accessToken = authStore.state.accessToken;
33231
- printService.getConfig(authStore.state.accessToken)
33231
+ await printService.getConfig(authStore.state.accessToken)
33232
33232
  .then((response) => {
33233
33233
  if (response.ok) {
33234
33234
  authStore.state.isAuthorized = true;
@@ -33248,7 +33248,7 @@ let EzpPrinting = class {
33248
33248
  authStore.state.accessToken = accessToken;
33249
33249
  }
33250
33250
  if (localStorage.getItem('isAuthorized')) {
33251
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33251
+ authStore.state.isAuthorized = (localStorage.getItem('isAuthorized')) === 'true';
33252
33252
  }
33253
33253
  return authStore.state.isAuthorized;
33254
33254
  }
@@ -33281,9 +33281,7 @@ let EzpPrinting = class {
33281
33281
  }
33282
33282
  sendCodeToParentWindow();
33283
33283
  initi18n(this.language);
33284
- this.checkAuth().then(() => {
33285
- this.authOpen = !authStore.state.isAuthorized;
33286
- });
33284
+ this.checkAuth();
33287
33285
  }
33288
33286
  componentDidLoad() {
33289
33287
  this.refreshTokensPeriodically(1800);