@ezeep/ezeep-js 1.0.187 → 1.0.190

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.
@@ -33117,6 +33117,13 @@ let EzpPrinting = class {
33117
33117
  this.onlyGetSasUri = false;
33118
33118
  this.noDocumentOpen = false;
33119
33119
  }
33120
+ /** Watchers */
33121
+ watchFileData(newValue, oldValue) {
33122
+ if (newValue !== oldValue && newValue.length > 0) {
33123
+ const uint8array = new TextEncoder().encode(newValue);
33124
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33125
+ }
33126
+ }
33120
33127
  /**
33121
33128
  *
33122
33129
  * Listeners
@@ -33262,11 +33269,6 @@ let EzpPrinting = class {
33262
33269
  else {
33263
33270
  printStore.state.printApiHostUrl = config.printingApiHostUrl;
33264
33271
  }
33265
- if (this.filedata) {
33266
- const uint8array = new TextEncoder().encode(this.filedata);
33267
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33268
- console.log(this.file);
33269
- }
33270
33272
  sendCodeToParentWindow();
33271
33273
  initi18n(this.language);
33272
33274
  this.checkAuth();
@@ -33284,6 +33286,9 @@ let EzpPrinting = class {
33284
33286
  ? this.systemAppearance
33285
33287
  : userStore.state.appearance}` }, this.trigger === 'custom' ? (index.h("slot", null)) : this.trigger === 'file' ? (index.h("ezp-upload", null)) : (this.trigger === 'button' && (index.h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))), this.authOpen ? (index.h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin, trigger: this.trigger, code: this.code })) : this.printOpen ? (index.h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, file: this.file, hidemenu: this.hidemenu })) : this.noDocumentOpen ? (index.h("ezp-dialog", { heading: i18next.t('no_document_dialog.heading'), description: i18next.t('no_document_dialog.description'), action: i18next.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : null));
33286
33288
  }
33289
+ static get watchers() { return {
33290
+ "filedata": ["watchFileData"]
33291
+ }; }
33287
33292
  };
33288
33293
  EzpPrinting.style = ezpPrintingCss;
33289
33294
 
@@ -1,4 +1,4 @@
1
- import { Component, Host, State, Listen, Method, h, Prop } from '@stencil/core';
1
+ import { Component, Host, State, Listen, Method, h, Prop, Watch } from '@stencil/core';
2
2
  import authStore, { EzpAuthorizationService, sendCodeToParentWindow } from '../../services/auth';
3
3
  import printStore, { EzpPrintService } from '../../services/print';
4
4
  import userStore from '../../services/user';
@@ -23,6 +23,13 @@ export class EzpPrinting {
23
23
  this.onlyGetSasUri = false;
24
24
  this.noDocumentOpen = false;
25
25
  }
26
+ /** Watchers */
27
+ watchFileData(newValue, oldValue) {
28
+ if (newValue !== oldValue && newValue.length > 0) {
29
+ const uint8array = new TextEncoder().encode(newValue);
30
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
31
+ }
32
+ }
26
33
  /**
27
34
  *
28
35
  * Listeners
@@ -168,11 +175,6 @@ export class EzpPrinting {
168
175
  else {
169
176
  printStore.state.printApiHostUrl = config.printingApiHostUrl;
170
177
  }
171
- if (this.filedata) {
172
- const uint8array = new TextEncoder().encode(this.filedata);
173
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
174
- console.log(this.file);
175
- }
176
178
  sendCodeToParentWindow();
177
179
  initi18n(this.language);
178
180
  this.checkAuth();
@@ -585,6 +587,10 @@ export class EzpPrinting {
585
587
  }
586
588
  }
587
589
  }; }
590
+ static get watchers() { return [{
591
+ "propName": "filedata",
592
+ "methodName": "watchFileData"
593
+ }]; }
588
594
  static get listeners() { return [{
589
595
  "name": "printCancel",
590
596
  "method": "listenPrintCancel",
@@ -33142,6 +33142,13 @@ let EzpPrinting$1 = class extends HTMLElement {
33142
33142
  this.onlyGetSasUri = false;
33143
33143
  this.noDocumentOpen = false;
33144
33144
  }
33145
+ /** Watchers */
33146
+ watchFileData(newValue, oldValue) {
33147
+ if (newValue !== oldValue && newValue.length > 0) {
33148
+ const uint8array = new TextEncoder().encode(newValue);
33149
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33150
+ }
33151
+ }
33145
33152
  /**
33146
33153
  *
33147
33154
  * Listeners
@@ -33287,11 +33294,6 @@ let EzpPrinting$1 = class extends HTMLElement {
33287
33294
  else {
33288
33295
  printStore.state.printApiHostUrl = config.printingApiHostUrl;
33289
33296
  }
33290
- if (this.filedata) {
33291
- const uint8array = new TextEncoder().encode(this.filedata);
33292
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33293
- console.log(this.file);
33294
- }
33295
33297
  sendCodeToParentWindow();
33296
33298
  initi18n(this.language);
33297
33299
  this.checkAuth();
@@ -33309,6 +33311,9 @@ let EzpPrinting$1 = class extends HTMLElement {
33309
33311
  ? this.systemAppearance
33310
33312
  : userStore.state.appearance}` }, this.trigger === 'custom' ? (h("slot", null)) : this.trigger === 'file' ? (h("ezp-upload", null)) : (this.trigger === 'button' && (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))), this.authOpen ? (h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin, trigger: this.trigger, code: this.code })) : this.printOpen ? (h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, file: this.file, hidemenu: this.hidemenu })) : this.noDocumentOpen ? (h("ezp-dialog", { heading: i18next.t('no_document_dialog.heading'), description: i18next.t('no_document_dialog.description'), action: i18next.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : null));
33311
33313
  }
33314
+ static get watchers() { return {
33315
+ "filedata": ["watchFileData"]
33316
+ }; }
33312
33317
  static get style() { return ezpPrintingCss; }
33313
33318
  };
33314
33319
 
@@ -33113,6 +33113,13 @@ let EzpPrinting = class {
33113
33113
  this.onlyGetSasUri = false;
33114
33114
  this.noDocumentOpen = false;
33115
33115
  }
33116
+ /** Watchers */
33117
+ watchFileData(newValue, oldValue) {
33118
+ if (newValue !== oldValue && newValue.length > 0) {
33119
+ const uint8array = new TextEncoder().encode(newValue);
33120
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33121
+ }
33122
+ }
33116
33123
  /**
33117
33124
  *
33118
33125
  * Listeners
@@ -33258,11 +33265,6 @@ let EzpPrinting = class {
33258
33265
  else {
33259
33266
  printStore.state.printApiHostUrl = config.printingApiHostUrl;
33260
33267
  }
33261
- if (this.filedata) {
33262
- const uint8array = new TextEncoder().encode(this.filedata);
33263
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33264
- console.log(this.file);
33265
- }
33266
33268
  sendCodeToParentWindow();
33267
33269
  initi18n(this.language);
33268
33270
  this.checkAuth();
@@ -33280,6 +33282,9 @@ let EzpPrinting = class {
33280
33282
  ? this.systemAppearance
33281
33283
  : userStore.state.appearance}` }, this.trigger === 'custom' ? (h("slot", null)) : this.trigger === 'file' ? (h("ezp-upload", null)) : (this.trigger === 'button' && (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))), this.authOpen ? (h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin, trigger: this.trigger, code: this.code })) : this.printOpen ? (h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, file: this.file, hidemenu: this.hidemenu })) : this.noDocumentOpen ? (h("ezp-dialog", { heading: i18next.t('no_document_dialog.heading'), description: i18next.t('no_document_dialog.description'), action: i18next.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : null));
33282
33284
  }
33285
+ static get watchers() { return {
33286
+ "filedata": ["watchFileData"]
33287
+ }; }
33283
33288
  };
33284
33289
  EzpPrinting.style = ezpPrintingCss;
33285
33290