@ezeep/ezeep-js 1.0.219 → 1.0.221

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.
@@ -3147,19 +3147,20 @@ class EzpAuthorizationService {
3147
3147
  });
3148
3148
  }
3149
3149
  revokeRefreshToken() {
3150
- fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
3151
- credentials: 'include',
3152
- headers: {
3153
- Authorization: 'Basic ' + btoa(this.clientID + ':'),
3154
- 'Content-Type': 'application/x-www-form-urlencoded',
3155
- },
3156
- method: 'POST',
3157
- body: encodeFormData({
3158
- token: authStore.state.refreshToken,
3159
- }),
3160
- }).catch((error) => {
3161
- console.log(error);
3162
- });
3150
+ if (authStore.state.refreshToken)
3151
+ fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
3152
+ credentials: 'include',
3153
+ headers: {
3154
+ Authorization: 'Basic ' + btoa(this.clientID + ':'),
3155
+ 'Content-Type': 'application/x-www-form-urlencoded',
3156
+ },
3157
+ method: 'POST',
3158
+ body: encodeFormData({
3159
+ token: authStore.state.refreshToken,
3160
+ }),
3161
+ }).catch((error) => {
3162
+ console.log(error);
3163
+ });
3163
3164
  }
3164
3165
  }
3165
3166
  const authStore = createStore({
@@ -32987,6 +32988,10 @@ let EzpPrinterSelection = class {
32987
32988
  this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
32988
32989
  this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
32989
32990
  }
32991
+ else {
32992
+ this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats[0].Name;
32993
+ this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats[0].Id;
32994
+ }
32990
32995
  }
32991
32996
  /**
32992
32997
  *
@@ -345,6 +345,10 @@ export class EzpPrinterSelection {
345
345
  this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
346
346
  this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
347
347
  }
348
+ else {
349
+ this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats[0].Name;
350
+ this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats[0].Id;
351
+ }
348
352
  }
349
353
  /**
350
354
  *
@@ -100,19 +100,20 @@ export class EzpAuthorizationService {
100
100
  });
101
101
  }
102
102
  revokeRefreshToken() {
103
- fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
104
- credentials: 'include',
105
- headers: {
106
- Authorization: 'Basic ' + btoa(this.clientID + ':'),
107
- 'Content-Type': 'application/x-www-form-urlencoded',
108
- },
109
- method: 'POST',
110
- body: encodeFormData({
111
- token: authStore.state.refreshToken,
112
- }),
113
- }).catch((error) => {
114
- console.log(error);
115
- });
103
+ if (authStore.state.refreshToken)
104
+ fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
105
+ credentials: 'include',
106
+ headers: {
107
+ Authorization: 'Basic ' + btoa(this.clientID + ':'),
108
+ 'Content-Type': 'application/x-www-form-urlencoded',
109
+ },
110
+ method: 'POST',
111
+ body: encodeFormData({
112
+ token: authStore.state.refreshToken,
113
+ }),
114
+ }).catch((error) => {
115
+ console.log(error);
116
+ });
116
117
  }
117
118
  }
118
119
  const authStore = createStore({
@@ -3156,19 +3156,20 @@ class EzpAuthorizationService {
3156
3156
  });
3157
3157
  }
3158
3158
  revokeRefreshToken() {
3159
- fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
3160
- credentials: 'include',
3161
- headers: {
3162
- Authorization: 'Basic ' + btoa(this.clientID + ':'),
3163
- 'Content-Type': 'application/x-www-form-urlencoded',
3164
- },
3165
- method: 'POST',
3166
- body: encodeFormData({
3167
- token: authStore.state.refreshToken,
3168
- }),
3169
- }).catch((error) => {
3170
- console.log(error);
3171
- });
3159
+ if (authStore.state.refreshToken)
3160
+ fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
3161
+ credentials: 'include',
3162
+ headers: {
3163
+ Authorization: 'Basic ' + btoa(this.clientID + ':'),
3164
+ 'Content-Type': 'application/x-www-form-urlencoded',
3165
+ },
3166
+ method: 'POST',
3167
+ body: encodeFormData({
3168
+ token: authStore.state.refreshToken,
3169
+ }),
3170
+ }).catch((error) => {
3171
+ console.log(error);
3172
+ });
3172
3173
  }
3173
3174
  }
3174
3175
  const authStore = createStore({
@@ -33010,6 +33011,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33010
33011
  this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
33011
33012
  this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
33012
33013
  }
33014
+ else {
33015
+ this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats[0].Name;
33016
+ this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats[0].Id;
33017
+ }
33013
33018
  }
33014
33019
  /**
33015
33020
  *
@@ -3143,19 +3143,20 @@ class EzpAuthorizationService {
3143
3143
  });
3144
3144
  }
3145
3145
  revokeRefreshToken() {
3146
- fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
3147
- credentials: 'include',
3148
- headers: {
3149
- Authorization: 'Basic ' + btoa(this.clientID + ':'),
3150
- 'Content-Type': 'application/x-www-form-urlencoded',
3151
- },
3152
- method: 'POST',
3153
- body: encodeFormData({
3154
- token: authStore.state.refreshToken,
3155
- }),
3156
- }).catch((error) => {
3157
- console.log(error);
3158
- });
3146
+ if (authStore.state.refreshToken)
3147
+ fetch(`https://${this.oauthUrl}/oauth/revoke/`, {
3148
+ credentials: 'include',
3149
+ headers: {
3150
+ Authorization: 'Basic ' + btoa(this.clientID + ':'),
3151
+ 'Content-Type': 'application/x-www-form-urlencoded',
3152
+ },
3153
+ method: 'POST',
3154
+ body: encodeFormData({
3155
+ token: authStore.state.refreshToken,
3156
+ }),
3157
+ }).catch((error) => {
3158
+ console.log(error);
3159
+ });
3159
3160
  }
3160
3161
  }
3161
3162
  const authStore = createStore({
@@ -32983,6 +32984,10 @@ let EzpPrinterSelection = class {
32983
32984
  this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
32984
32985
  this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
32985
32986
  }
32987
+ else {
32988
+ this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats[0].Name;
32989
+ this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats[0].Id;
32990
+ }
32986
32991
  }
32987
32992
  /**
32988
32993
  *