@ezeep/ezeep-js 1.0.186 → 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
@@ -33262,10 +33269,8 @@ 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
- }
33272
+ console.log(this.filedata);
33273
+ console.log(this.filename);
33269
33274
  sendCodeToParentWindow();
33270
33275
  initi18n(this.language);
33271
33276
  this.checkAuth();
@@ -33283,6 +33288,9 @@ let EzpPrinting = class {
33283
33288
  ? this.systemAppearance
33284
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));
33285
33290
  }
33291
+ static get watchers() { return {
33292
+ "filedata": ["watchFileData"]
33293
+ }; }
33286
33294
  };
33287
33295
  EzpPrinting.style = ezpPrintingCss;
33288
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
@@ -168,10 +175,8 @@ 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
- }
178
+ console.log(this.filedata);
179
+ console.log(this.filename);
175
180
  sendCodeToParentWindow();
176
181
  initi18n(this.language);
177
182
  this.checkAuth();
@@ -584,6 +589,10 @@ export class EzpPrinting {
584
589
  }
585
590
  }
586
591
  }; }
592
+ static get watchers() { return [{
593
+ "propName": "filedata",
594
+ "methodName": "watchFileData"
595
+ }]; }
587
596
  static get listeners() { return [{
588
597
  "name": "printCancel",
589
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
@@ -33287,10 +33294,8 @@ 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
- }
33297
+ console.log(this.filedata);
33298
+ console.log(this.filename);
33294
33299
  sendCodeToParentWindow();
33295
33300
  initi18n(this.language);
33296
33301
  this.checkAuth();
@@ -33308,6 +33313,9 @@ let EzpPrinting$1 = class extends HTMLElement {
33308
33313
  ? this.systemAppearance
33309
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));
33310
33315
  }
33316
+ static get watchers() { return {
33317
+ "filedata": ["watchFileData"]
33318
+ }; }
33311
33319
  static get style() { return ezpPrintingCss; }
33312
33320
  };
33313
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
@@ -33258,10 +33265,8 @@ 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
- }
33268
+ console.log(this.filedata);
33269
+ console.log(this.filename);
33265
33270
  sendCodeToParentWindow();
33266
33271
  initi18n(this.language);
33267
33272
  this.checkAuth();
@@ -33279,6 +33284,9 @@ let EzpPrinting = class {
33279
33284
  ? this.systemAppearance
33280
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));
33281
33286
  }
33287
+ static get watchers() { return {
33288
+ "filedata": ["watchFileData"]
33289
+ }; }
33282
33290
  };
33283
33291
  EzpPrinting.style = ezpPrintingCss;
33284
33292