@ezeep/ezeep-js 1.0.193 → 1.0.196

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.
@@ -33185,7 +33185,7 @@ let EzpPrinting = class {
33185
33185
  *
33186
33186
  */
33187
33187
  async open() {
33188
- if (authStore.state.isAuthorized && this.trigger === 'file') {
33188
+ if (authStore.state.isAuthorized) {
33189
33189
  this.authOpen = true;
33190
33190
  if (this.filename) {
33191
33191
  this.printOpen = true;
@@ -33228,14 +33228,6 @@ 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
- if (accessToken === '') {
33232
- accessToken = localStorage.getItem('access_token');
33233
- authStore.state.accessToken = accessToken;
33234
- }
33235
- if (localStorage.getItem('isAuthorized')) {
33236
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33237
- this.authOpen = !authStore.state.isAuthorized;
33238
- }
33239
33231
  printService.getConfig(authStore.state.accessToken)
33240
33232
  .then((response) => {
33241
33233
  if (response.ok) {
@@ -33247,7 +33239,16 @@ let EzpPrinting = class {
33247
33239
  })
33248
33240
  .catch(() => {
33249
33241
  authStore.state.isAuthorized = false;
33242
+ return false;
33250
33243
  });
33244
+ if (accessToken === '') {
33245
+ accessToken = localStorage.getItem('access_token');
33246
+ authStore.state.accessToken = accessToken;
33247
+ }
33248
+ if (localStorage.getItem('isAuthorized')) {
33249
+ authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33250
+ this.authOpen = !authStore.state.isAuthorized;
33251
+ }
33251
33252
  return authStore.state.isAuthorized;
33252
33253
  }
33253
33254
  refreshTokensPeriodically(seconds) {
@@ -88,7 +88,7 @@ export class EzpPrinting {
88
88
  *
89
89
  */
90
90
  async open() {
91
- if (authStore.state.isAuthorized && this.trigger === 'file') {
91
+ if (authStore.state.isAuthorized) {
92
92
  this.authOpen = true;
93
93
  if (this.filename) {
94
94
  this.printOpen = true;
@@ -131,14 +131,6 @@ export class EzpPrinting {
131
131
  async checkAuth() {
132
132
  const printService = new EzpPrintService(this.redirecturi, this.clientid);
133
133
  let accessToken = authStore.state.accessToken;
134
- if (accessToken === '') {
135
- accessToken = localStorage.getItem('access_token');
136
- authStore.state.accessToken = accessToken;
137
- }
138
- if (localStorage.getItem('isAuthorized')) {
139
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
140
- this.authOpen = !authStore.state.isAuthorized;
141
- }
142
134
  printService.getConfig(authStore.state.accessToken)
143
135
  .then((response) => {
144
136
  if (response.ok) {
@@ -150,7 +142,16 @@ export class EzpPrinting {
150
142
  })
151
143
  .catch(() => {
152
144
  authStore.state.isAuthorized = false;
145
+ return false;
153
146
  });
147
+ if (accessToken === '') {
148
+ accessToken = localStorage.getItem('access_token');
149
+ authStore.state.accessToken = accessToken;
150
+ }
151
+ if (localStorage.getItem('isAuthorized')) {
152
+ authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
153
+ this.authOpen = !authStore.state.isAuthorized;
154
+ }
154
155
  return authStore.state.isAuthorized;
155
156
  }
156
157
  refreshTokensPeriodically(seconds) {
@@ -33210,7 +33210,7 @@ let EzpPrinting$1 = class extends HTMLElement {
33210
33210
  *
33211
33211
  */
33212
33212
  async open() {
33213
- if (authStore.state.isAuthorized && this.trigger === 'file') {
33213
+ if (authStore.state.isAuthorized) {
33214
33214
  this.authOpen = true;
33215
33215
  if (this.filename) {
33216
33216
  this.printOpen = true;
@@ -33253,14 +33253,6 @@ let EzpPrinting$1 = class extends HTMLElement {
33253
33253
  async checkAuth() {
33254
33254
  const printService = new EzpPrintService(this.redirecturi, this.clientid);
33255
33255
  let accessToken = authStore.state.accessToken;
33256
- if (accessToken === '') {
33257
- accessToken = localStorage.getItem('access_token');
33258
- authStore.state.accessToken = accessToken;
33259
- }
33260
- if (localStorage.getItem('isAuthorized')) {
33261
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33262
- this.authOpen = !authStore.state.isAuthorized;
33263
- }
33264
33256
  printService.getConfig(authStore.state.accessToken)
33265
33257
  .then((response) => {
33266
33258
  if (response.ok) {
@@ -33272,7 +33264,16 @@ let EzpPrinting$1 = class extends HTMLElement {
33272
33264
  })
33273
33265
  .catch(() => {
33274
33266
  authStore.state.isAuthorized = false;
33267
+ return false;
33275
33268
  });
33269
+ if (accessToken === '') {
33270
+ accessToken = localStorage.getItem('access_token');
33271
+ authStore.state.accessToken = accessToken;
33272
+ }
33273
+ if (localStorage.getItem('isAuthorized')) {
33274
+ authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33275
+ this.authOpen = !authStore.state.isAuthorized;
33276
+ }
33276
33277
  return authStore.state.isAuthorized;
33277
33278
  }
33278
33279
  refreshTokensPeriodically(seconds) {
@@ -33181,7 +33181,7 @@ let EzpPrinting = class {
33181
33181
  *
33182
33182
  */
33183
33183
  async open() {
33184
- if (authStore.state.isAuthorized && this.trigger === 'file') {
33184
+ if (authStore.state.isAuthorized) {
33185
33185
  this.authOpen = true;
33186
33186
  if (this.filename) {
33187
33187
  this.printOpen = true;
@@ -33224,14 +33224,6 @@ let EzpPrinting = class {
33224
33224
  async checkAuth() {
33225
33225
  const printService = new EzpPrintService(this.redirecturi, this.clientid);
33226
33226
  let accessToken = authStore.state.accessToken;
33227
- if (accessToken === '') {
33228
- accessToken = localStorage.getItem('access_token');
33229
- authStore.state.accessToken = accessToken;
33230
- }
33231
- if (localStorage.getItem('isAuthorized')) {
33232
- authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33233
- this.authOpen = !authStore.state.isAuthorized;
33234
- }
33235
33227
  printService.getConfig(authStore.state.accessToken)
33236
33228
  .then((response) => {
33237
33229
  if (response.ok) {
@@ -33243,7 +33235,16 @@ let EzpPrinting = class {
33243
33235
  })
33244
33236
  .catch(() => {
33245
33237
  authStore.state.isAuthorized = false;
33238
+ return false;
33246
33239
  });
33240
+ if (accessToken === '') {
33241
+ accessToken = localStorage.getItem('access_token');
33242
+ authStore.state.accessToken = accessToken;
33243
+ }
33244
+ if (localStorage.getItem('isAuthorized')) {
33245
+ authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
33246
+ this.authOpen = !authStore.state.isAuthorized;
33247
+ }
33247
33248
  return authStore.state.isAuthorized;
33248
33249
  }
33249
33250
  refreshTokensPeriodically(seconds) {