@ezeep/ezeep-js 1.0.188 → 1.0.189

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
+ watchFileData(newValue, oldValue) {
33121
+ if (newValue !== oldValue && newValue.length > 0) {
33122
+ const uint8array = new TextEncoder().encode(newValue);
33123
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33124
+ console.log(this.file);
33125
+ }
33126
+ }
33120
33127
  /**
33121
33128
  *
33122
33129
  * Listeners
@@ -33264,11 +33271,6 @@ let EzpPrinting = class {
33264
33271
  }
33265
33272
  console.log(this.filedata);
33266
33273
  console.log(this.filename);
33267
- if (this.filedata) {
33268
- const uint8array = new TextEncoder().encode(this.filedata);
33269
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33270
- console.log(this.file);
33271
- }
33272
33274
  sendCodeToParentWindow();
33273
33275
  initi18n(this.language);
33274
33276
  this.checkAuth();
@@ -33286,6 +33288,9 @@ let EzpPrinting = class {
33286
33288
  ? this.systemAppearance
33287
33289
  : 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));
33288
33290
  }
33291
+ static get watchers() { return {
33292
+ "filedata": ["watchFileData"]
33293
+ }; }
33289
33294
  };
33290
33295
  EzpPrinting.style = ezpPrintingCss;
33291
33296
 
@@ -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
+ watchFileData(newValue, oldValue) {
27
+ if (newValue !== oldValue && newValue.length > 0) {
28
+ const uint8array = new TextEncoder().encode(newValue);
29
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
30
+ console.log(this.file);
31
+ }
32
+ }
26
33
  /**
27
34
  *
28
35
  * Listeners
@@ -170,11 +177,6 @@ export class EzpPrinting {
170
177
  }
171
178
  console.log(this.filedata);
172
179
  console.log(this.filename);
173
- if (this.filedata) {
174
- const uint8array = new TextEncoder().encode(this.filedata);
175
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
176
- console.log(this.file);
177
- }
178
180
  sendCodeToParentWindow();
179
181
  initi18n(this.language);
180
182
  this.checkAuth();
@@ -587,6 +589,10 @@ export class EzpPrinting {
587
589
  }
588
590
  }
589
591
  }; }
592
+ static get watchers() { return [{
593
+ "propName": "filedata",
594
+ "methodName": "watchFileData"
595
+ }]; }
590
596
  static get listeners() { return [{
591
597
  "name": "printCancel",
592
598
  "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
+ watchFileData(newValue, oldValue) {
33146
+ if (newValue !== oldValue && newValue.length > 0) {
33147
+ const uint8array = new TextEncoder().encode(newValue);
33148
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33149
+ console.log(this.file);
33150
+ }
33151
+ }
33145
33152
  /**
33146
33153
  *
33147
33154
  * Listeners
@@ -33289,11 +33296,6 @@ let EzpPrinting$1 = class extends HTMLElement {
33289
33296
  }
33290
33297
  console.log(this.filedata);
33291
33298
  console.log(this.filename);
33292
- if (this.filedata) {
33293
- const uint8array = new TextEncoder().encode(this.filedata);
33294
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33295
- console.log(this.file);
33296
- }
33297
33299
  sendCodeToParentWindow();
33298
33300
  initi18n(this.language);
33299
33301
  this.checkAuth();
@@ -33311,6 +33313,9 @@ let EzpPrinting$1 = class extends HTMLElement {
33311
33313
  ? this.systemAppearance
33312
33314
  : 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));
33313
33315
  }
33316
+ static get watchers() { return {
33317
+ "filedata": ["watchFileData"]
33318
+ }; }
33314
33319
  static get style() { return ezpPrintingCss; }
33315
33320
  };
33316
33321
 
@@ -33113,6 +33113,13 @@ let EzpPrinting = class {
33113
33113
  this.onlyGetSasUri = false;
33114
33114
  this.noDocumentOpen = false;
33115
33115
  }
33116
+ watchFileData(newValue, oldValue) {
33117
+ if (newValue !== oldValue && newValue.length > 0) {
33118
+ const uint8array = new TextEncoder().encode(newValue);
33119
+ this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33120
+ console.log(this.file);
33121
+ }
33122
+ }
33116
33123
  /**
33117
33124
  *
33118
33125
  * Listeners
@@ -33260,11 +33267,6 @@ let EzpPrinting = class {
33260
33267
  }
33261
33268
  console.log(this.filedata);
33262
33269
  console.log(this.filename);
33263
- if (this.filedata) {
33264
- const uint8array = new TextEncoder().encode(this.filedata);
33265
- this.file = new File([uint8array], this.filename, { type: 'application/pdf' });
33266
- console.log(this.file);
33267
- }
33268
33270
  sendCodeToParentWindow();
33269
33271
  initi18n(this.language);
33270
33272
  this.checkAuth();
@@ -33282,6 +33284,9 @@ let EzpPrinting = class {
33282
33284
  ? this.systemAppearance
33283
33285
  : 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));
33284
33286
  }
33287
+ static get watchers() { return {
33288
+ "filedata": ["watchFileData"]
33289
+ }; }
33285
33290
  };
33286
33291
  EzpPrinting.style = ezpPrintingCss;
33287
33292