@ezeep/ezeep-js 1.0.149 → 1.0.155

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.
Files changed (55) hide show
  1. package/dist/cjs/ezeep.cjs.js +3 -3
  2. package/dist/cjs/ezp-auth_14.cjs.entry.js +118 -67
  3. package/dist/cjs/{index-62fc857c.js → index-d547be4e.js} +23 -0
  4. package/dist/cjs/loader.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/components/ezp-auth/ezp-auth.js +1 -3
  7. package/dist/collection/components/ezp-dialog/ezp-dialog.js +0 -2
  8. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +87 -52
  9. package/dist/collection/components/ezp-printing/ezp-printing.js +24 -3
  10. package/dist/collection/components/ezp-status/ezp-status.js +0 -2
  11. package/dist/collection/components/ezp-upload/ezp-upload.js +0 -2
  12. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +0 -2
  13. package/dist/collection/services/auth.js +2 -0
  14. package/dist/collection/utils/utils.js +20 -8
  15. package/dist/custom-elements/index.js +119 -68
  16. package/dist/directives/proxies.ts +2 -2
  17. package/dist/esm/ezeep.js +3 -3
  18. package/dist/esm/ezp-auth_14.entry.js +118 -67
  19. package/dist/esm/{index-265d8cca.js → index-485041ac.js} +23 -0
  20. package/dist/esm/loader.js +3 -3
  21. package/dist/esm/polyfills/css-shim.js +1 -1
  22. package/dist/esm-es5/ezeep.js +1 -1
  23. package/dist/esm-es5/ezp-auth_14.entry.js +3 -3
  24. package/dist/esm-es5/index-485041ac.js +1 -0
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/ezeep/ezeep.esm.js +1 -1
  27. package/dist/ezeep/ezeep.js +1 -1
  28. package/dist/ezeep/p-0b51d725.system.entry.js +21 -0
  29. package/dist/ezeep/{p-a7b7b386.entry.js → p-b6ec69dc.entry.js} +2 -2
  30. package/dist/ezeep/p-cc2bb341.system.js +1 -0
  31. package/dist/ezeep/p-d4dae139.system.js +1 -0
  32. package/dist/ezeep/{p-f3065800.js → p-fa808a39.js} +0 -0
  33. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +1 -1
  34. package/dist/types/components/ezp-printing/ezp-printing.d.ts +1 -0
  35. package/dist/types/components.d.ts +2 -0
  36. package/dist/types/stencil-public-runtime.d.ts +6 -4
  37. package/dist/types/utils/utils.d.ts +1 -1
  38. package/package.json +2 -2
  39. package/readme.md +5 -2
  40. package/www/build/ezeep.esm.js +1 -1
  41. package/www/build/ezeep.js +1 -1
  42. package/www/build/p-0b51d725.system.entry.js +21 -0
  43. package/www/build/{p-a7b7b386.entry.js → p-b6ec69dc.entry.js} +2 -2
  44. package/www/build/p-cc2bb341.system.js +1 -0
  45. package/www/build/p-d4dae139.system.js +1 -0
  46. package/www/build/{p-f3065800.js → p-fa808a39.js} +0 -0
  47. package/www/data/locales/en.json +6 -1
  48. package/www/index.html +1 -1
  49. package/dist/esm-es5/index-265d8cca.js +0 -1
  50. package/dist/ezeep/p-98ec6965.system.js +0 -1
  51. package/dist/ezeep/p-a1b0d17a.system.entry.js +0 -21
  52. package/dist/ezeep/p-f89804ee.system.js +0 -1
  53. package/www/build/p-98ec6965.system.js +0 -1
  54. package/www/build/p-a1b0d17a.system.entry.js +0 -21
  55. package/www/build/p-f89804ee.system.js +0 -1
@@ -2935,6 +2935,9 @@ const printer_selection = {
2935
2935
  orientation: "Orientation",
2936
2936
  size: "Paper Size",
2937
2937
  duplex: "Double-sided",
2938
+ duplex_none: "None",
2939
+ duplex_long: "Long edge binding",
2940
+ duplex_short: "Short edge binding",
2938
2941
  quality: "Print Quality",
2939
2942
  select_printer: "Select a printer",
2940
2943
  select_color: "Select Color/Grayscale",
@@ -2947,7 +2950,8 @@ const printer_selection = {
2947
2950
  orientation_portrait: "Portrait",
2948
2951
  orientation_landscape: "Landscape",
2949
2952
  unknown_location: "Unknown location",
2950
- no_printers: "No printers found."
2953
+ no_printers: "No printers found.",
2954
+ copies: "Copies"
2951
2955
  };
2952
2956
  const button_actions = {
2953
2957
  login: "Sign In",
@@ -2986,7 +2990,7 @@ function encodeFormData(data) {
2986
2990
  .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
2987
2991
  .join('&');
2988
2992
  }
2989
- function initi18n() {
2993
+ function initi18n(language) {
2990
2994
  const resources = {
2991
2995
  en: {
2992
2996
  translation: translationsEN,
@@ -2995,13 +2999,25 @@ function initi18n() {
2995
2999
  translation: translationsDE,
2996
3000
  },
2997
3001
  };
2998
- i18next.init({
2999
- resources,
3000
- lng: navigator.language,
3001
- // allow keys to be phrases having `:`, `.`
3002
- nsSeparator: false,
3003
- fallbackLng: 'en',
3004
- });
3002
+ // override browserlanguage if language is provided
3003
+ if (language != '') {
3004
+ i18next.init({
3005
+ resources,
3006
+ lng: language,
3007
+ // allow keys to be phrases having `:`, `.`
3008
+ nsSeparator: false,
3009
+ fallbackLng: 'en',
3010
+ });
3011
+ }
3012
+ else {
3013
+ i18next.init({
3014
+ resources,
3015
+ lng: navigator.language,
3016
+ // allow keys to be phrases having `:`, `.`
3017
+ nsSeparator: false,
3018
+ fallbackLng: 'en',
3019
+ });
3020
+ }
3005
3021
  }
3006
3022
  const poll = async ({ fn, validate, interval, maxAttempts }) => {
3007
3023
  let attempts = 0;
@@ -3069,6 +3085,7 @@ class EzpAuthorizationService {
3069
3085
  }
3070
3086
  getAccessToken() {
3071
3087
  return fetch(this.accessTokenURL, {
3088
+ credentials: 'include',
3072
3089
  headers: {
3073
3090
  Authorization: 'Basic ' + btoa(this.clientID + ':'),
3074
3091
  'Content-Type': 'application/x-www-form-urlencoded',
@@ -3102,6 +3119,7 @@ class EzpAuthorizationService {
3102
3119
  }
3103
3120
  refreshTokens() {
3104
3121
  fetch(this.accessTokenURL, {
3122
+ credentials: 'include',
3105
3123
  headers: {
3106
3124
  Authorization: 'Basic ' + btoa(this.clientID + ':'),
3107
3125
  'Content-Type': 'application/x-www-form-urlencoded',
@@ -3204,13 +3222,12 @@ let EzpAuth$1 = class extends HTMLElement {
3204
3222
  }
3205
3223
  receiveMessage(event) {
3206
3224
  this.auth.code = event.data;
3207
- this.auth.getAccessToken().finally(() => {
3225
+ this.auth.getAccessToken().then(() => {
3208
3226
  this.authCancel.emit();
3209
3227
  this.authSuccess.emit();
3210
3228
  });
3211
3229
  }
3212
3230
  async componentWillLoad() {
3213
- initi18n();
3214
3231
  this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
3215
3232
  if (authStore.state.isAuthorized === false) {
3216
3233
  this.auth.generateCodeVerifier();
@@ -3284,7 +3301,6 @@ let EzpDialog$1 = class extends HTMLElement {
3284
3301
  *
3285
3302
  */
3286
3303
  componentWillLoad() {
3287
- initi18n();
3288
3304
  }
3289
3305
  /**
3290
3306
  *
@@ -32706,15 +32722,15 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32706
32722
  this.duplexOptions = [
32707
32723
  {
32708
32724
  id: 1,
32709
- title: 'None',
32725
+ title: i18next.t('printer_selection.duplex_none'),
32710
32726
  },
32711
32727
  {
32712
32728
  id: 2,
32713
- title: 'Long edge binding',
32729
+ title: i18next.t('printer_selection.duplex_long'),
32714
32730
  },
32715
32731
  {
32716
32732
  id: 3,
32717
- title: 'Short edge binding',
32733
+ title: i18next.t('printer_selection.duplex_short'),
32718
32734
  },
32719
32735
  ];
32720
32736
  this.hidemenu = false;
@@ -32752,16 +32768,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32752
32768
  copies: '',
32753
32769
  resolution: '',
32754
32770
  };
32755
- this.previouslySelectedProperties = {
32756
- paper: '',
32757
- paperid: '',
32758
- color: false,
32759
- duplex: false,
32760
- duplexmode: '',
32761
- orientation: '',
32762
- copies: '',
32763
- resolution: '',
32764
- };
32765
32771
  /**
32766
32772
  *
32767
32773
  * Private methods
@@ -32806,6 +32812,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32806
32812
  }
32807
32813
  })
32808
32814
  .then((data) => {
32815
+ if (data.code === 804) {
32816
+ this.printFailed = true;
32817
+ this.printProcessing = false;
32818
+ }
32809
32819
  if (data.jobid) {
32810
32820
  printStore.state.jobID = data.jobid;
32811
32821
  poll({
@@ -32815,15 +32825,19 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32815
32825
  maxAttempts: 10,
32816
32826
  }).catch((err) => {
32817
32827
  console.warn(err);
32828
+ this.printFailed = true;
32829
+ this.printProcessing = false;
32818
32830
  });
32819
32831
  }
32820
32832
  else {
32821
32833
  this.printFailed = true;
32834
+ this.printProcessing = false;
32822
32835
  }
32823
32836
  })
32824
32837
  .catch((error) => {
32825
32838
  console.log(error);
32826
32839
  this.printFailed = true;
32840
+ this.printProcessing = false;
32827
32841
  });
32828
32842
  }
32829
32843
  if (this.file) {
@@ -32831,7 +32845,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32831
32845
  }
32832
32846
  localStorage.setItem('properties', JSON.stringify(this.selectedProperties));
32833
32847
  localStorage.setItem('printer', JSON.stringify(this.selectedPrinter));
32834
- localStorage.setItem('previouslySelectedProperties', JSON.stringify(this.previouslySelectedProperties));
32835
32848
  this.printStopped = false;
32836
32849
  };
32837
32850
  this.handleUserMenu = () => {
@@ -32903,9 +32916,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32903
32916
  else {
32904
32917
  this.selectedPrinter = { id: '', location: '', name: '' };
32905
32918
  }
32906
- if (localStorage.getItem('previouslySelectedProperties')) {
32907
- this.previouslySelectedProperties = JSON.parse(localStorage.getItem('previouslySelectedProperties'));
32908
- }
32909
32919
  }
32910
32920
  getUserInfo() {
32911
32921
  const userService = new EzpUserService();
@@ -32922,24 +32932,20 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32922
32932
  await this.printService
32923
32933
  .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
32924
32934
  .then((data) => (this.selectedPrinterConfig = data[0]));
32935
+ this.setDefaultPaperFormat();
32925
32936
  break;
32926
32937
  case 'color':
32927
32938
  this.selectedProperties.color = !!eventDetails.id;
32928
- this.previouslySelectedProperties.color = eventDetails.title;
32929
32939
  break;
32930
32940
  case 'orientation':
32931
32941
  this.selectedProperties.orientation = eventDetails.id;
32932
- this.previouslySelectedProperties.orientation = eventDetails.title;
32933
32942
  break;
32934
32943
  case 'format':
32935
32944
  this.selectedProperties.paper = eventDetails.title;
32936
32945
  this.selectedProperties.paperid = eventDetails.id;
32937
- this.previouslySelectedProperties.paper = eventDetails.title;
32938
- this.previouslySelectedProperties.paperid = eventDetails.id;
32939
32946
  break;
32940
32947
  case 'quality':
32941
32948
  this.selectedProperties.resolution = eventDetails.title;
32942
- this.previouslySelectedProperties.resolution = eventDetails.title;
32943
32949
  break;
32944
32950
  case 'duplex':
32945
32951
  if (eventDetails.title === 'None') {
@@ -32949,7 +32955,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32949
32955
  this.selectedProperties.duplex = true;
32950
32956
  }
32951
32957
  this.selectedProperties.duplexmode = eventDetails.id;
32952
- this.previouslySelectedProperties.duplexmode = eventDetails.id;
32953
32958
  break;
32954
32959
  }
32955
32960
  }
@@ -32974,6 +32979,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32974
32979
  this.printService
32975
32980
  .printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
32976
32981
  .then((data) => {
32982
+ if (data.code === 804) {
32983
+ this.printFailed = true;
32984
+ this.printProcessing = false;
32985
+ }
32977
32986
  if (data.jobid) {
32978
32987
  printStore.state.jobID = data.jobid;
32979
32988
  poll({
@@ -32984,21 +32993,40 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
32984
32993
  }).catch((err) => {
32985
32994
  console.log(err);
32986
32995
  this.printFailed = true;
32996
+ this.printProcessing = false;
32987
32997
  });
32988
32998
  }
32989
32999
  else {
32990
33000
  this.printFailed = true;
33001
+ this.printProcessing = false;
32991
33002
  }
32992
33003
  })
32993
33004
  .catch((error) => {
32994
33005
  console.log(error);
32995
33006
  this.printFailed = true;
33007
+ this.printProcessing = false;
32996
33008
  });
32997
33009
  }
32998
33010
  else {
32999
33011
  this.printFailed = true;
33012
+ this.printProcessing = false;
33000
33013
  }
33001
33014
  }
33015
+ setDefaultPaperFormat() {
33016
+ let format;
33017
+ const language = navigator.language;
33018
+ if (language === 'en-US') {
33019
+ format = 'Letter';
33020
+ }
33021
+ else if (language === 'my') {
33022
+ format = 'Letter';
33023
+ }
33024
+ else {
33025
+ format = 'A4';
33026
+ }
33027
+ this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Name;
33028
+ this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Id;
33029
+ }
33002
33030
  /**
33003
33031
  *
33004
33032
  * Lifecycle methods
@@ -33006,11 +33034,19 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33006
33034
  */
33007
33035
  /** Description... */
33008
33036
  async componentWillLoad() {
33009
- initi18n();
33010
33037
  this.loading = true;
33011
33038
  this.getPropertiesFromLocalStorage();
33012
33039
  this.getUserInfo();
33013
33040
  this.printService = new EzpPrintService(this.redirectURI, this.clientID);
33041
+ // if printer is stored from previous print, get the config to enable property selection
33042
+ if (this.selectedPrinter.id != '') {
33043
+ await this.printService
33044
+ .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
33045
+ .then((data) => (this.selectedPrinterConfig = data[0]));
33046
+ if (this.selectedProperties.paper === '') {
33047
+ this.setDefaultPaperFormat();
33048
+ }
33049
+ }
33014
33050
  await (await this.printService.getConfig(authStore.state.accessToken))
33015
33051
  .json()
33016
33052
  .then((response) => {
@@ -33055,7 +33091,9 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33055
33091
  ? printer.location
33056
33092
  : i18next.t('printer_selection.unknown_location'),
33057
33093
  type: 'printer',
33058
- })), preSelected: this.selectedPrinter ? this.selectedPrinter.name : null, disabled: !(this.printers.length > 0) })), h("div", { id: "options" }, h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Color
33094
+ })),
33095
+ // preSelected={this.selectedPrinter ? this.selectedPrinter.name : null}
33096
+ disabled: !(this.printers.length > 0) })), h("div", { id: "options" }, h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Color
33059
33097
  ? [
33060
33098
  {
33061
33099
  id: 1,
@@ -33079,11 +33117,25 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33079
33117
  },
33080
33118
  ],
33081
33119
  // preSelected={
33082
- // this.previouslySelectedProperties.color
33083
- // ? this.previouslySelectedProperties.color
33084
- // : this.selectedPrinterConfig.Color
33085
- // ? i18next.t('printer_selection.color_grayscale')
33086
- // : null
33120
+ // this.selectedProperties.color ?
33121
+ // [
33122
+ // {
33123
+ // id: 1,
33124
+ // title: i18next.t('printer_selection.color'),
33125
+ // meta: '',
33126
+ // type: 'color',
33127
+ // },
33128
+ // ]
33129
+ // : !this.selectedProperties.color ?
33130
+ // [
33131
+ // {
33132
+ // id: 0,
33133
+ // title: i18next.t('printer_selection.color_grayscale'),
33134
+ // meta: '',
33135
+ // type: 'color',
33136
+ // },
33137
+ // ]
33138
+ // : null
33087
33139
  // }
33088
33140
  disabled: !this.selectedPrinterConfig.Color }), h("ezp-select", { label: i18next.t('printer_selection.duplex'), icon: "duplex", placeholder: i18next.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: this.duplexOptions.map((option) => ({
33089
33141
  id: option.id,
@@ -33092,10 +33144,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33092
33144
  type: 'duplex',
33093
33145
  })),
33094
33146
  // preSelected={
33095
- // this.previouslySelectedProperties.duplex
33096
- // ? this.previouslySelectedProperties.duplex
33097
- // : this.selectedPrinterConfig.DuplexSupported
33098
- // ? 'None'
33147
+ // this.selectedProperties.duplex
33148
+ // ? this.selectedProperties.duplex
33149
+ // // : this.selectedPrinterConfig.DuplexSupported
33150
+ // // ? 'None'
33099
33151
  // : null
33100
33152
  // }
33101
33153
  disabled: !this.selectedPrinterConfig.DuplexSupported }), h("ezp-select", { label: i18next.t('printer_selection.size'), icon: "size", placeholder: i18next.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats.map((format) => ({
@@ -33105,10 +33157,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33105
33157
  type: 'format',
33106
33158
  })),
33107
33159
  // preSelected={
33108
- // this.previouslySelectedProperties.paper
33109
- // ? this.previouslySelectedProperties.paper
33110
- // : this.selectedPrinterConfig.PaperFormats.length > 0
33111
- // ? this.selectedPrinterConfig.PaperFormats[0].Name
33160
+ // this.selectedProperties.paper
33161
+ // ? this.selectedProperties.paper
33162
+ // // : this.selectedPrinterConfig.PaperFormats.length > 0
33163
+ // // ? this.selectedPrinterConfig.PaperFormats[0].Name
33112
33164
  // : null
33113
33165
  // }
33114
33166
  disabled: !(this.selectedPrinterConfig.PaperFormats.length > 0) }), h("ezp-select", { label: i18next.t('printer_selection.orientation'), icon: "orientation", placeholder: i18next.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.OrientationsSupported.map((orientation, index) => ({
@@ -33118,12 +33170,12 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33118
33170
  type: 'orientation',
33119
33171
  })),
33120
33172
  // preSelected={
33121
- // this.previouslySelectedProperties.orientation
33122
- // ? this.previouslySelectedProperties.orientation
33123
- // : this.selectedPrinterConfig.OrientationsSupported.length > 0
33124
- // ? i18next.t(
33125
- // `printer_selection.orientation_${this.selectedPrinterConfig.OrientationsSupported[0]}`
33126
- // )
33173
+ // this.selectedProperties.orientation
33174
+ // ? this.selectedProperties.orientation
33175
+ // // : this.selectedPrinterConfig.OrientationsSupported.length > 0
33176
+ // // ? i18next.t(
33177
+ // // `printer_selection.orientation_${this.selectedPrinterConfig.OrientationsSupported[0]}`
33178
+ // // )
33127
33179
  // : null
33128
33180
  // }
33129
33181
  disabled: !(this.selectedPrinterConfig.OrientationsSupported.length > 0) }), h("ezp-select", { label: i18next.t('printer_selection.quality'), icon: "quality", placeholder: i18next.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Resolutions.map((option, index) => ({
@@ -33133,13 +33185,13 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
33133
33185
  type: 'quality',
33134
33186
  })),
33135
33187
  // preSelected={
33136
- // this.previouslySelectedProperties.resolution
33137
- // ? this.previouslySelectedProperties.resolution
33138
- // : this.selectedPrinterConfig.Resolutions.length > 0
33139
- // ? this.selectedPrinterConfig.Resolutions[0]
33188
+ // this.selectedProperties.resolution
33189
+ // ? this.selectedProperties.resolution
33190
+ // // : this.selectedPrinterConfig.Resolutions.length > 0
33191
+ // // ? this.selectedPrinterConfig.Resolutions[0]
33140
33192
  // : null
33141
33193
  // }
33142
- disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), h("ezp-stepper", { label: "Copies", max: 10, icon: "copies" })), h("div", { id: "footer" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel') }), h("ezp-text-button", { disabled: this.selectedPrinter.id === '', type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print') })), !this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
33194
+ disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })), h("div", { id: "footer" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel') }), h("ezp-text-button", { disabled: this.selectedPrinter.id === '', type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print') })), !this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
33143
33195
  }
33144
33196
  static get style() { return ezpPrinterSelectionCss; }
33145
33197
  };
@@ -33158,9 +33210,11 @@ let EzpPrinting$1 = class extends HTMLElement {
33158
33210
  super();
33159
33211
  this.__registerHost();
33160
33212
  this.__attachShadow();
33213
+ this.filename = '';
33161
33214
  this.hidemenu = false;
33162
33215
  this.theme = 'cyan';
33163
33216
  this.appearance = 'system';
33217
+ this.language = '';
33164
33218
  /**
33165
33219
  *
33166
33220
  * States
@@ -33189,7 +33243,7 @@ let EzpPrinting$1 = class extends HTMLElement {
33189
33243
  this.authOpen = false;
33190
33244
  }
33191
33245
  listenAuthSuccess() {
33192
- if (this.filename) {
33246
+ if (this.filename != '') {
33193
33247
  this.printOpen = true;
33194
33248
  }
33195
33249
  else {
@@ -33275,7 +33329,7 @@ let EzpPrinting$1 = class extends HTMLElement {
33275
33329
  else {
33276
33330
  printStore.state.printApiHostUrl = config.printingApiHostUrl;
33277
33331
  }
33278
- initi18n();
33332
+ initi18n(this.language);
33279
33333
  sendCodeToParentWindow();
33280
33334
  this.checkAuth();
33281
33335
  }
@@ -33478,7 +33532,6 @@ let EzpStatus$1 = class extends HTMLElement {
33478
33532
  *
33479
33533
  */
33480
33534
  componentWillLoad() {
33481
- initi18n();
33482
33535
  }
33483
33536
  /**
33484
33537
  *
@@ -33665,7 +33718,6 @@ let EzpUpload$1 = class extends HTMLElement {
33665
33718
  *
33666
33719
  */
33667
33720
  componentWillLoad() {
33668
- initi18n();
33669
33721
  }
33670
33722
  /**
33671
33723
  *
@@ -33749,7 +33801,6 @@ let EzpUserMenu$1 = class extends HTMLElement {
33749
33801
  *
33750
33802
  */
33751
33803
  componentWillLoad() {
33752
- initi18n();
33753
33804
  this.container = this.component.closest('[data-backdrop-surface]');
33754
33805
  this.backdrop.addEventListener('backdropHideStart', () => {
33755
33806
  this.open = false;
@@ -33780,8 +33831,8 @@ const EzpDialog = /*@__PURE__*/proxyCustomElement(EzpDialog$1, [1,"ezp-dialog",{
33780
33831
  const EzpIcon = /*@__PURE__*/proxyCustomElement(EzpIcon$1, [1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}]);
33781
33832
  const EzpIconButton = /*@__PURE__*/proxyCustomElement(EzpIconButton$1, [1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}]);
33782
33833
  const EzpLabel = /*@__PURE__*/proxyCustomElement(EzpLabel$1, [1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]);
33783
- const EzpPrinterSelection = /*@__PURE__*/proxyCustomElement(EzpPrinterSelection$1, [1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"previouslySelectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]]);
33784
- const EzpPrinting = /*@__PURE__*/proxyCustomElement(EzpPrinting$1, [1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]]);
33834
+ const EzpPrinterSelection = /*@__PURE__*/proxyCustomElement(EzpPrinterSelection$1, [1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]]);
33835
+ const EzpPrinting = /*@__PURE__*/proxyCustomElement(EzpPrinting$1, [1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]]);
33785
33836
  const EzpSelect = /*@__PURE__*/proxyCustomElement(EzpSelect$1, [1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}]);
33786
33837
  const EzpStatus = /*@__PURE__*/proxyCustomElement(EzpStatus$1, [1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}]);
33787
33838
  const EzpStepper = /*@__PURE__*/proxyCustomElement(EzpStepper$1, [1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}]);
@@ -166,14 +166,14 @@ export class EzpPrinterSelection {
166
166
 
167
167
  export declare interface EzpPrinting extends Components.EzpPrinting {}
168
168
  @ProxyCmp({
169
- inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'printapihosturl', 'redirecturi', 'theme', 'trigger'],
169
+ inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'language', 'printapihosturl', 'redirecturi', 'theme', 'trigger'],
170
170
  methods: ['open']
171
171
  })
172
172
  @Component({
173
173
  selector: 'ezp-printing',
174
174
  changeDetection: ChangeDetectionStrategy.OnPush,
175
175
  template: '<ng-content></ng-content>',
176
- inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'printapihosturl', 'redirecturi', 'theme', 'trigger']
176
+ inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'language', 'printapihosturl', 'redirecturi', 'theme', 'trigger']
177
177
  })
178
178
  export class EzpPrinting {
179
179
  protected el: HTMLElement;
package/dist/esm/ezeep.js CHANGED
@@ -1,8 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-265d8cca.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-485041ac.js';
2
2
  import { g as globalScripts } from './app-globals-28960cbc.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Browser v2.11.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v2.14.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  const patchBrowser = () => {
8
8
  const importMeta = import.meta.url;
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
 
16
16
  patchBrowser().then(options => {
17
17
  globalScripts();
18
- return bootstrapLazy([["ezp-auth_14",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"previouslySelectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
18
+ return bootstrapLazy([["ezp-auth_14",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
19
19
  });