@ezeep/ezeep-js 1.0.237 → 1.0.238

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 (29) hide show
  1. package/dist/cjs/ezeep.cjs.js +1 -1
  2. package/dist/cjs/ezp-auth_15.cjs.entry.js +214 -107
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +204 -95
  5. package/dist/collection/components/ezp-printing/ezp-printing.js +6 -5
  6. package/dist/collection/components/ezp-upload/ezp-upload.js +13 -11
  7. package/dist/custom-elements/index.js +217 -110
  8. package/dist/directives/proxies.ts +2 -2
  9. package/dist/esm/ezeep.js +1 -1
  10. package/dist/esm/ezp-auth_15.entry.js +214 -107
  11. package/dist/esm/loader.js +1 -1
  12. package/dist/esm-es5/ezeep.js +1 -1
  13. package/dist/esm-es5/ezp-auth_15.entry.js +3 -3
  14. package/dist/esm-es5/loader.js +1 -1
  15. package/dist/ezeep/ezeep.esm.js +1 -1
  16. package/dist/ezeep/{p-7b589922.entry.js → p-0aba6822.entry.js} +2 -2
  17. package/dist/ezeep/p-84bd195a.system.js +1 -1
  18. package/dist/ezeep/{p-62b9b554.system.entry.js → p-dba5d7b7.system.entry.js} +3 -3
  19. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +10 -3
  20. package/dist/types/components/ezp-printing/ezp-printing.d.ts +1 -1
  21. package/dist/types/components/ezp-upload/ezp-upload.d.ts +1 -1
  22. package/dist/types/components.d.ts +2 -2
  23. package/package.json +1 -1
  24. package/www/build/ezeep.esm.js +1 -1
  25. package/www/build/{p-7b589922.entry.js → p-0aba6822.entry.js} +2 -2
  26. package/www/build/p-84bd195a.system.js +1 -1
  27. package/www/build/{p-62b9b554.system.entry.js → p-dba5d7b7.system.entry.js} +3 -3
  28. package/www/data/locales/de.json +3 -3
  29. package/www/data/locales/en.json +3 -3
@@ -17,5 +17,5 @@ const patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(options => {
19
19
  appGlobals.globalScripts();
20
- return index.bootstrapLazy([["ezp-auth_15.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[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],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[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],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[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],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"filename":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[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-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[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);
20
+ return index.bootstrapLazy([["ezp-auth_15.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"files":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"files":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[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],"paperid":[32],"currentFileIndex":[32],"totalFiles":[32],"failedFiles":[32],"successfulFiles":[32],"partialSuccess":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[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],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"selectedFiles":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[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-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[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);
21
21
  });
@@ -2890,11 +2890,11 @@ const button_actions$1 = {
2890
2890
  select_printer: "Wähle Drucker"
2891
2891
  };
2892
2892
  const upload$1 = {
2893
- description: "Ziehe eine Datei hier in den Browser ",
2893
+ description: "Ziehe Dateien hier in den Browser ",
2894
2894
  meta_leading: "oder",
2895
- meta_select: "wähle eine Datei aus",
2895
+ meta_select: "wähle Dateien aus",
2896
2896
  meta_trailing: "um mit ezeep Blue zu drucken.",
2897
- selected_file: "Ausgewählte Datei:"
2897
+ selected_files: "Ausgewählte Dateien:"
2898
2898
  };
2899
2899
  const user_menu$1 = {
2900
2900
  theme: "Farbschema",
@@ -2973,11 +2973,11 @@ const button_actions = {
2973
2973
  select_printer: "Select Printer"
2974
2974
  };
2975
2975
  const upload = {
2976
- description: "Drop a file here into the browser ",
2976
+ description: "Drop files here into the browser ",
2977
2977
  meta_leading: "or",
2978
- meta_select: "select a file",
2978
+ meta_select: "select files",
2979
2979
  meta_trailing: "to print with ezeep Blue.",
2980
- selected_file: "Selected File:"
2980
+ selected_files: "Selected Files:"
2981
2981
  };
2982
2982
  const user_menu = {
2983
2983
  theme: "Color theme",
@@ -32770,7 +32770,6 @@ let EzpPrinterSelection = class {
32770
32770
  this.printCancel = index.createEvent(this, "printCancel", 7);
32771
32771
  this.printSubmit = index.createEvent(this, "printSubmit", 7);
32772
32772
  this.logout = index.createEvent(this, "logout", 7);
32773
- this.sasUri = '';
32774
32773
  this.fileExtension = '';
32775
32774
  this.duplexOptions = [
32776
32775
  {
@@ -32794,7 +32793,7 @@ let EzpPrinterSelection = class {
32794
32793
  {
32795
32794
  id: 2,
32796
32795
  title: i18next.t('printer_selection.color_grayscale'),
32797
- }
32796
+ },
32798
32797
  ];
32799
32798
  this.hidemenu = false;
32800
32799
  this.hideheader = false;
@@ -32821,14 +32820,14 @@ let EzpPrinterSelection = class {
32821
32820
  Paper: '',
32822
32821
  Orientation: '',
32823
32822
  Resolution: '',
32824
- Tray: ''
32823
+ Tray: '',
32825
32824
  },
32826
32825
  OrientationsSupported: [],
32827
32826
  PaperFormats: [],
32828
32827
  Resolutions: [],
32829
32828
  DuplexSupported: false,
32830
32829
  Color: false,
32831
- Trays: []
32830
+ Trays: [],
32832
32831
  };
32833
32832
  // needs to be initialised with empty strings
32834
32833
  this.selectedProperties = {
@@ -32846,6 +32845,11 @@ let EzpPrinterSelection = class {
32846
32845
  trayname: '',
32847
32846
  PageRanges: '',
32848
32847
  };
32848
+ this.currentFileIndex = 0;
32849
+ this.totalFiles = 0;
32850
+ this.failedFiles = [];
32851
+ this.successfulFiles = [];
32852
+ this.partialSuccess = false;
32849
32853
  /**
32850
32854
  *
32851
32855
  * Private methods
@@ -32853,6 +32857,9 @@ let EzpPrinterSelection = class {
32853
32857
  */
32854
32858
  /** Description... */
32855
32859
  this.handleCancel = () => {
32860
+ this.failedFiles = [];
32861
+ this.successfulFiles = [];
32862
+ this.partialSuccess = false;
32856
32863
  this.printCancel.emit();
32857
32864
  };
32858
32865
  this.validateData = (data) => {
@@ -32869,9 +32876,14 @@ let EzpPrinterSelection = class {
32869
32876
  this.handlePrint = async () => {
32870
32877
  this.printButton.blur();
32871
32878
  this.printProcessing = true;
32879
+ this.failedFiles = [];
32880
+ this.successfulFiles = [];
32881
+ this.partialSuccess = false;
32872
32882
  // we have to initialse this obj with empty strings to display the select component
32873
32883
  // but don't want to send any attributes with empty strings to the API
32874
- if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
32884
+ if (this.selectedPrinterConfig.Trays &&
32885
+ this.selectedPrinterConfig.Trays.length >= 0 &&
32886
+ this.selectedPrinterConfig.Trays[0] == null) {
32875
32887
  delete this.selectedProperties.trayname;
32876
32888
  delete this.selectedProperties.defaultSource;
32877
32889
  }
@@ -32931,8 +32943,8 @@ let EzpPrinterSelection = class {
32931
32943
  this.printProcessing = false;
32932
32944
  });
32933
32945
  }
32934
- if (this.file) {
32935
- await this.handleFiles(this.file, cleanPrintProperties);
32946
+ if (this.files && this.files.length > 0) {
32947
+ await this.handleFiles(this.files, cleanPrintProperties);
32936
32948
  }
32937
32949
  localStorage.setItem('properties', JSON.stringify(this.selectedProperties));
32938
32950
  localStorage.setItem('printer', JSON.stringify(this.selectedPrinter));
@@ -32980,11 +32992,16 @@ let EzpPrinterSelection = class {
32980
32992
  switch (event.detail) {
32981
32993
  case 'print-success':
32982
32994
  this.printSuccess = false;
32995
+ this.partialSuccess = false;
32996
+ this.failedFiles = [];
32997
+ this.successfulFiles = [];
32983
32998
  this.printCancel.emit();
32984
32999
  break;
32985
33000
  case 'print-failed':
32986
33001
  this.printProcessing = false;
32987
33002
  this.printFailed = false;
33003
+ this.failedFiles = [];
33004
+ this.successfulFiles = [];
32988
33005
  break;
32989
33006
  case 'no-printers':
32990
33007
  this.noPrinters = false;
@@ -33044,18 +33061,23 @@ let EzpPrinterSelection = class {
33044
33061
  .then((data) => {
33045
33062
  var _a, _b, _c, _d, _e, _f, _g;
33046
33063
  this.selectedPrinterConfig = Object.assign(Object.assign({}, this.selectedPrinterConfig), data[0]);
33047
- this.selectedProperties.color = ((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Color) == "color" ? true : false;
33064
+ this.selectedProperties.color =
33065
+ ((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Color) == 'color' ? true : false;
33048
33066
  this.selectedProperties.orientation = (_b = this.selectedPrinterConfig.Default) === null || _b === void 0 ? void 0 : _b.Orientation;
33049
33067
  this.selectedProperties.resolution = (_c = this.selectedPrinterConfig.Default) === null || _c === void 0 ? void 0 : _c.Resolution;
33050
- let defaultPaper = (_d = this.selectedPrinterConfig.PaperFormats) === null || _d === void 0 ? void 0 : _d.find(obj => obj.Default === true);
33068
+ let defaultPaper = (_d = this.selectedPrinterConfig.PaperFormats) === null || _d === void 0 ? void 0 : _d.find((obj) => obj.Default === true);
33051
33069
  this.selectedProperties.paper = defaultPaper === null || defaultPaper === void 0 ? void 0 : defaultPaper.Name;
33052
33070
  this.selectedProperties.paperid = defaultPaper === null || defaultPaper === void 0 ? void 0 : defaultPaper.Id;
33053
- let defaultSource = (_e = this.selectedPrinterConfig.Trays) === null || _e === void 0 ? void 0 : _e.find(obj => obj.Default === true);
33054
- if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null) {
33071
+ let defaultSource = (_e = this.selectedPrinterConfig.Trays) === null || _e === void 0 ? void 0 : _e.find((obj) => obj.Default === true);
33072
+ if (this.selectedPrinterConfig.Trays &&
33073
+ this.selectedPrinterConfig.Trays.length >= 1 &&
33074
+ this.selectedPrinterConfig.Trays[0] != null) {
33055
33075
  this.selectedProperties.trayname = defaultSource === null || defaultSource === void 0 ? void 0 : defaultSource.Name;
33056
33076
  this.selectedProperties.defaultSource = defaultSource === null || defaultSource === void 0 ? void 0 : defaultSource.Index;
33057
33077
  }
33058
- if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
33078
+ if (this.selectedPrinterConfig.Trays &&
33079
+ this.selectedPrinterConfig.Trays.length >= 0 &&
33080
+ this.selectedPrinterConfig.Trays[0] == null) {
33059
33081
  delete this.selectedProperties.trayname;
33060
33082
  delete this.selectedProperties.defaultSource;
33061
33083
  }
@@ -33066,7 +33088,8 @@ let EzpPrinterSelection = class {
33066
33088
  // this.setDefaultPaperFormat()
33067
33089
  break;
33068
33090
  case 'color':
33069
- this.selectedProperties.color = eventDetails.title == i18next.t('printer_selection.color_color') ? true : false;
33091
+ this.selectedProperties.color =
33092
+ eventDetails.title == i18next.t('printer_selection.color_color') ? true : false;
33070
33093
  break;
33071
33094
  case 'orientation':
33072
33095
  this.selectedProperties.orientation = eventDetails.id;
@@ -33085,11 +33108,15 @@ let EzpPrinterSelection = class {
33085
33108
  this.selectedProperties.paperwidth = eventDetails.value;
33086
33109
  break;
33087
33110
  case 'tray':
33088
- if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
33111
+ if (this.selectedPrinterConfig.Trays &&
33112
+ this.selectedPrinterConfig.Trays.length >= 0 &&
33113
+ this.selectedPrinterConfig.Trays[0] == null) {
33089
33114
  delete this.selectedProperties.trayname;
33090
33115
  delete this.selectedProperties.defaultSource;
33091
33116
  }
33092
- if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null) {
33117
+ if (this.selectedPrinterConfig.Trays &&
33118
+ this.selectedPrinterConfig.Trays.length >= 1 &&
33119
+ this.selectedPrinterConfig.Trays[0] != null) {
33093
33120
  this.selectedProperties.trayname = eventDetails.title;
33094
33121
  this.selectedProperties.defaultSource = eventDetails.id;
33095
33122
  }
@@ -33099,9 +33126,9 @@ let EzpPrinterSelection = class {
33099
33126
  this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
33100
33127
  break;
33101
33128
  case 'duplex':
33102
- if (eventDetails.title == i18next.t('printer_selection.duplex_none')
33103
- || eventDetails.title == i18next.t('printer_selection.duplex_long')
33104
- || eventDetails.title == i18next.t('printer_selection.duplex_short')) {
33129
+ if (eventDetails.title == i18next.t('printer_selection.duplex_none') ||
33130
+ eventDetails.title == i18next.t('printer_selection.duplex_long') ||
33131
+ eventDetails.title == i18next.t('printer_selection.duplex_short')) {
33105
33132
  this.selectedProperties.duplex = true;
33106
33133
  }
33107
33134
  else {
@@ -33112,59 +33139,107 @@ let EzpPrinterSelection = class {
33112
33139
  }
33113
33140
  this.setPaperid();
33114
33141
  }
33115
- async handleFiles(file, printPorperties) {
33142
+ async handleFiles(files, printPorperties) {
33143
+ this.totalFiles = files.length;
33144
+ this.currentFileIndex = 0;
33145
+ this.failedFiles = [];
33146
+ this.successfulFiles = [];
33147
+ // Process each file individually
33148
+ for (let i = 0; i < files.length; i++) {
33149
+ this.currentFileIndex = i;
33150
+ const file = files[i];
33151
+ try {
33152
+ await this.processSingleFile(file, printPorperties);
33153
+ this.successfulFiles.push(file.name);
33154
+ }
33155
+ catch (error) {
33156
+ console.error(`Error processing file ${file.name}:`, error);
33157
+ this.failedFiles.push(file.name);
33158
+ // Continue with the next file instead of stopping
33159
+ }
33160
+ }
33161
+ // Determine final status based on results
33162
+ if (this.failedFiles.length === 0) {
33163
+ // All files processed successfully
33164
+ this.printSuccess = true;
33165
+ this.partialSuccess = false;
33166
+ this.printProcessing = false;
33167
+ }
33168
+ else if (this.successfulFiles.length === 0) {
33169
+ // All files failed
33170
+ this.printFailed = true;
33171
+ this.partialSuccess = false;
33172
+ this.printProcessing = false;
33173
+ }
33174
+ else {
33175
+ // Some files succeeded, some failed - show partial success
33176
+ this.printSuccess = true;
33177
+ this.partialSuccess = true;
33178
+ this.printProcessing = false;
33179
+ }
33180
+ }
33181
+ async processSingleFile(file, printProperties) {
33116
33182
  this.preparingUpload = true;
33117
33183
  const response = await this.printService.prepareFileUpload(authStore.state.accessToken);
33118
33184
  this.preparingUpload = false;
33119
- this.fileid = response.fileid;
33120
- this.sasUri = response.sasUri;
33121
- this.filetype = this.fileExtension;
33122
- let res;
33185
+ const fileid = response.fileid;
33186
+ const sasUri = response.sasUri;
33187
+ const filetype = this.getFileExtension(file.name);
33123
33188
  this.uploading = true;
33124
33189
  try {
33125
- res = await this.printService.uploadBlobFiles(this.sasUri, file);
33126
- }
33127
- catch (error) {
33128
- this.printProcessing = false;
33129
- this.printFailed = true;
33130
- }
33131
- this.uploading = false;
33132
- if (res._response.status === 201) {
33133
- this.printService
33134
- .printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, printPorperties, this.filename)
33135
- .then((data) => {
33190
+ // Upload the file
33191
+ const res = await this.printService.uploadBlobFiles(sasUri, file);
33192
+ if (res._response.status === 201) {
33193
+ // Print the file
33194
+ const data = await this.printService.printByFileID(authStore.state.accessToken, fileid, filetype, this.selectedPrinter.id, printProperties, file.name);
33136
33195
  if (data.code === 804) {
33137
- this.printFailed = true;
33138
- this.printProcessing = false;
33196
+ throw new Error(`Print failed for file: ${file.name}`);
33139
33197
  }
33140
33198
  if (data.jobid) {
33141
33199
  printStore.state.jobID = data.jobid;
33142
- poll({
33143
- fn: this.printService.getPrintStatus,
33144
- validate: this.validateData,
33145
- interval: this.POLL_INTERVAL,
33146
- maxAttempts: this.MAX_POLL_ATTEMPTS,
33147
- }).catch((err) => {
33148
- console.log(err);
33149
- this.printFailed = true;
33150
- this.printProcessing = false;
33151
- });
33200
+ // Wait for this print job to complete before processing the next file
33201
+ await this.waitForPrintCompletion();
33152
33202
  }
33153
33203
  else {
33154
- this.printFailed = true;
33155
- this.printProcessing = false;
33204
+ throw new Error(`No job ID returned for file: ${file.name}`);
33156
33205
  }
33157
- })
33158
- .catch((error) => {
33159
- console.log(error);
33160
- this.printFailed = true;
33161
- this.printProcessing = false;
33162
- });
33206
+ }
33207
+ else {
33208
+ throw new Error(`Upload failed for file: ${file.name}`);
33209
+ }
33163
33210
  }
33164
- else {
33165
- this.printFailed = true;
33166
- this.printProcessing = false;
33211
+ catch (error) {
33212
+ this.uploading = false;
33213
+ throw error;
33167
33214
  }
33215
+ this.uploading = false;
33216
+ }
33217
+ async waitForPrintCompletion() {
33218
+ return new Promise((resolve, reject) => {
33219
+ const poll = async () => {
33220
+ try {
33221
+ const data = await this.printService.getPrintStatus();
33222
+ if (data.jobstatus === 0) {
33223
+ resolve();
33224
+ }
33225
+ else if (data.jobstatus === 1) {
33226
+ // Still processing, continue polling
33227
+ setTimeout(poll, this.POLL_INTERVAL);
33228
+ }
33229
+ else {
33230
+ reject(new Error('Print job failed'));
33231
+ }
33232
+ }
33233
+ catch (error) {
33234
+ reject(error);
33235
+ }
33236
+ };
33237
+ poll();
33238
+ });
33239
+ }
33240
+ getFileExtension(filename) {
33241
+ const extension = filename.split('.').pop();
33242
+ return extension ? extension.toLowerCase() : '';
33168
33243
  }
33169
33244
  setDefaultPaperFormat() {
33170
33245
  var _a, _b, _c, _d, _e;
@@ -33215,18 +33290,23 @@ let EzpPrinterSelection = class {
33215
33290
  .then((data) => {
33216
33291
  var _a, _b, _c, _d, _e, _f, _g;
33217
33292
  this.selectedPrinterConfig = data[0];
33218
- this.selectedProperties.color = ((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Color) == "color" ? true : false;
33293
+ this.selectedProperties.color =
33294
+ ((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Color) == 'color' ? true : false;
33219
33295
  this.selectedProperties.orientation = (_b = this.selectedPrinterConfig.Default) === null || _b === void 0 ? void 0 : _b.Orientation;
33220
33296
  this.selectedProperties.resolution = (_c = this.selectedPrinterConfig.Default) === null || _c === void 0 ? void 0 : _c.Resolution;
33221
- let defaultPaper = (_d = this.selectedPrinterConfig.PaperFormats) === null || _d === void 0 ? void 0 : _d.find(obj => obj.Default === true);
33297
+ let defaultPaper = (_d = this.selectedPrinterConfig.PaperFormats) === null || _d === void 0 ? void 0 : _d.find((obj) => obj.Default === true);
33222
33298
  this.selectedProperties.paper = defaultPaper === null || defaultPaper === void 0 ? void 0 : defaultPaper.Name;
33223
33299
  this.selectedProperties.paperid = defaultPaper === null || defaultPaper === void 0 ? void 0 : defaultPaper.Id;
33224
- let defaultSource = (_e = this.selectedPrinterConfig.Trays) === null || _e === void 0 ? void 0 : _e.find(obj => obj.Default === true);
33225
- if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null) {
33300
+ let defaultSource = (_e = this.selectedPrinterConfig.Trays) === null || _e === void 0 ? void 0 : _e.find((obj) => obj.Default === true);
33301
+ if (this.selectedPrinterConfig.Trays &&
33302
+ this.selectedPrinterConfig.Trays.length >= 1 &&
33303
+ this.selectedPrinterConfig.Trays[0] != null) {
33226
33304
  this.selectedProperties.trayname = defaultSource === null || defaultSource === void 0 ? void 0 : defaultSource.Name;
33227
33305
  this.selectedProperties.defaultSource = defaultSource === null || defaultSource === void 0 ? void 0 : defaultSource.Index;
33228
33306
  }
33229
- if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
33307
+ if (this.selectedPrinterConfig.Trays &&
33308
+ this.selectedPrinterConfig.Trays.length >= 0 &&
33309
+ this.selectedPrinterConfig.Trays[0] == null) {
33230
33310
  delete this.selectedProperties.trayname;
33231
33311
  delete this.selectedProperties.defaultSource;
33232
33312
  }
@@ -33248,10 +33328,12 @@ let EzpPrinterSelection = class {
33248
33328
  .then((printerConfig) => {
33249
33329
  this.printerConfig = printerConfig;
33250
33330
  });
33251
- if (this.file) {
33252
- await this.validateFileType(this.filename).then((valid) => {
33253
- this.notSupported = !valid ? true : false;
33254
- });
33331
+ if (this.files && this.files.length > 0) {
33332
+ // Validate all files
33333
+ const validationPromises = this.files.map((file) => this.validateFileType(file.name));
33334
+ const validationResults = await Promise.all(validationPromises);
33335
+ const allValid = validationResults.every((valid) => valid);
33336
+ this.notSupported = !allValid;
33255
33337
  }
33256
33338
  this.loading = false;
33257
33339
  }
@@ -33262,11 +33344,25 @@ let EzpPrinterSelection = class {
33262
33344
  */
33263
33345
  render() {
33264
33346
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
33265
- return this.loading ? (index.h("ezp-status", { processing: true, description: i18next.t('printer_selection.loading'), instance: "loading" })) : (index.h(index.Host, { class: { seamless: this.seamless } }, index.h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && (index.h(index.Fragment, null, this.printProcessing ? (index.h("ezp-status", { processing: true, description: this.preparingUpload
33266
- ? i18next.t('printer_selection.prepare_upload')
33267
- : this.uploading
33268
- ? i18next.t('printer_selection.uploading')
33269
- : i18next.t('printer_selection.print_processing'), instance: "print-processing", cancel: true })) : this.selectedPrinter.is_queue && this.printSuccess ? (index.h("ezp-status", { icon: "checkmark-alt", description: i18next.t('printer_selection.pull_print_success'), instance: "print-success", close: true })) : this.printSuccess ? (index.h("ezp-status", { icon: "checkmark-alt", description: i18next.t('printer_selection.print_success'), instance: "print-success", close: true })) : this.printFailed ? (index.h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "print-failed", close: true, retry: true })) : this.notSupported ? (index.h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.not_supported'), instance: "not-supported", retry: true })) : this.noPrinters ? (index.h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.no_printers'), instance: "no-printers", close: true })) : null)), !this.hideheader && (index.h("div", { id: "header" }, index.h("ezp-label", { weight: "heavy", text: i18next.t('printer_selection.print') + `${!this.notSupported ? ':' : ''}` }), index.h("ezp-label", { text: !this.notSupported ? this.filename : '', ellipsis: true }), !this.hidemenu && (index.h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })))), index.h("div", { id: "body" }, index.h("div", { id: "printer" }, index.h("ezp-select", { label: i18next.t('printer_selection.printer'), icon: "printer", placeholder: this.printers.length > 0
33347
+ return this.loading ? (index.h("ezp-status", { processing: true, description: i18next.t('printer_selection.loading'), instance: "loading" })) : (index.h(index.Host, { class: { seamless: this.seamless } }, index.h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && (index.h(index.Fragment, null, this.printProcessing ? (index.h("ezp-status", { processing: true, description: this.totalFiles > 1
33348
+ ? `${i18next.t('printer_selection.print_processing')} (${this.currentFileIndex + 1}/${this.totalFiles})`
33349
+ : this.preparingUpload
33350
+ ? i18next.t('printer_selection.prepare_upload')
33351
+ : this.uploading
33352
+ ? i18next.t('printer_selection.uploading')
33353
+ : i18next.t('printer_selection.print_processing'), instance: "print-processing", cancel: true })) : this.selectedPrinter.is_queue && this.printSuccess ? (index.h("ezp-status", { icon: "checkmark-alt", description: this.totalFiles > 1
33354
+ ? this.failedFiles.length > 0
33355
+ ? `${i18next.t('printer_selection.pull_print_success')} (${this.successfulFiles.length}/${this.totalFiles} files)`
33356
+ : `${i18next.t('printer_selection.pull_print_success')} (${this.totalFiles} files)`
33357
+ : i18next.t('printer_selection.pull_print_success'), instance: "print-success", close: true })) : this.printSuccess ? (index.h("ezp-status", { icon: this.partialSuccess ? 'exclamation-mark' : 'checkmark-alt', description: this.totalFiles > 1
33358
+ ? this.partialSuccess
33359
+ ? `${i18next.t('printer_selection.print_success')} (${this.successfulFiles.length}/${this.totalFiles} files) - ${this.failedFiles.length} failed`
33360
+ : `${i18next.t('printer_selection.print_success')} (${this.totalFiles} files)`
33361
+ : i18next.t('printer_selection.print_success'), instance: "print-success", close: true })) : this.printFailed ? (index.h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "print-failed", close: true, retry: true })) : this.notSupported ? (index.h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.not_supported'), instance: "not-supported", retry: true })) : this.noPrinters ? (index.h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.no_printers'), instance: "no-printers", close: true })) : null)), !this.hideheader && (index.h("div", { id: "header" }, index.h("ezp-label", { weight: "heavy", text: i18next.t('printer_selection.print') + `${!this.notSupported ? ':' : ''}` }), index.h("ezp-label", { text: !this.notSupported
33362
+ ? this.files && this.files.length > 1
33363
+ ? `${this.files.length} files selected`
33364
+ : this.filename
33365
+ : '', ellipsis: true }), !this.hidemenu && (index.h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })))), index.h("div", { id: "body" }, index.h("div", { id: "printer" }, index.h("ezp-select", { label: i18next.t('printer_selection.printer'), icon: "printer", placeholder: this.printers.length > 0
33270
33366
  ? i18next.t('printer_selection.select_printer')
33271
33367
  : i18next.t('printer_selection.no_printers'), toggleFlow: "vertical", optionFlow: "vertical", options: this.printers.map((printer) => ({
33272
33368
  id: printer.id,
@@ -33278,27 +33374,29 @@ let EzpPrinterSelection = class {
33278
33374
  id: option.id,
33279
33375
  title: option.title,
33280
33376
  meta: '',
33281
- type: 'color'
33282
- })), preSelected: this.selectedPrinter.id
33283
- && ((_b = this.selectedPrinterConfig.Default) === null || _b === void 0 ? void 0 : _b.Color) == "color"
33377
+ type: 'color',
33378
+ })), preSelected: this.selectedPrinter.id && ((_b = this.selectedPrinterConfig.Default) === null || _b === void 0 ? void 0 : _b.Color) == 'color'
33284
33379
  ? i18next.t('printer_selection.color_color')
33285
33380
  : i18next.t('printer_selection.color_grayscale'), disabled: !this.selectedPrinterConfig.ColorSupported }), index.h("ezp-select", { label: i18next.t('printer_selection.duplex'), icon: "duplex", placeholder: i18next.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: (_c = this.duplexOptions) === null || _c === void 0 ? void 0 : _c.map((option) => ({
33286
33381
  id: option.id,
33287
33382
  title: option.title,
33288
33383
  meta: '',
33289
33384
  type: 'duplex',
33290
- })), preSelected: this.selectedPrinter.id && ((_d = this.selectedPrinterConfig.Default) === null || _d === void 0 ? void 0 : _d.Duplex) == "duplex_simplex"
33385
+ })), preSelected: this.selectedPrinter.id &&
33386
+ ((_d = this.selectedPrinterConfig.Default) === null || _d === void 0 ? void 0 : _d.Duplex) == 'duplex_simplex'
33291
33387
  ? i18next.t('printer_selection.duplex_none')
33292
- : ((_e = this.selectedPrinterConfig.Default) === null || _e === void 0 ? void 0 : _e.Duplex) == "duplex_vertical"
33388
+ : ((_e = this.selectedPrinterConfig.Default) === null || _e === void 0 ? void 0 : _e.Duplex) == 'duplex_vertical'
33293
33389
  ? i18next.t('printer_selection.duplex_long')
33294
- : ((_f = this.selectedPrinterConfig.Default) === null || _f === void 0 ? void 0 : _f.Duplex) == "duplex_horizontal"
33390
+ : ((_f = this.selectedPrinterConfig.Default) === null || _f === void 0 ? void 0 : _f.Duplex) == 'duplex_horizontal'
33295
33391
  ? i18next.t('printer_selection.duplex_short')
33296
- : null, disabled: !this.selectedPrinterConfig.DuplexSupported }), index.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 && this.selectedPrinterConfig.PaperFormats.map((format) => ({
33297
- id: format.Id,
33298
- title: format.Name,
33299
- meta: `${format.XRes} x ${format.YRes}`,
33300
- type: 'format',
33301
- })), preSelected: this.selectedPrinter.id && ((_g = this.selectedPrinterConfig.PaperFormats) === null || _g === void 0 ? void 0 : _g.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper); }))
33392
+ : null, disabled: !this.selectedPrinterConfig.DuplexSupported }), index.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 &&
33393
+ this.selectedPrinterConfig.PaperFormats.map((format) => ({
33394
+ id: format.Id,
33395
+ title: format.Name,
33396
+ meta: `${format.XRes} x ${format.YRes}`,
33397
+ type: 'format',
33398
+ })), preSelected: this.selectedPrinter.id &&
33399
+ ((_g = this.selectedPrinterConfig.PaperFormats) === null || _g === void 0 ? void 0 : _g.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper); }))
33302
33400
  ? (_h = this.selectedPrinterConfig.Default) === null || _h === void 0 ? void 0 : _h.Paper
33303
33401
  : null, disabled: !(((_j = this.selectedPrinterConfig.PaperFormats) === null || _j === void 0 ? void 0 : _j.length) > 0) }), this.paperid == PAPER_ID ? (index.h(index.Fragment, null, index.h("ezp-input", { icon: "width", suffix: "mm", value: this.selectedProperties.paperwidth, eventType: "width", type: "number", label: i18next.t('printer_selection.width') }), index.h("ezp-input", { icon: "height", suffix: "mm", value: this.selectedProperties.paperlength, eventType: "length", type: "number", label: i18next.t('printer_selection.length') }))) : null, index.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) => ({
33304
33402
  id: index + 1,
@@ -33310,14 +33408,20 @@ let EzpPrinterSelection = class {
33310
33408
  title: option,
33311
33409
  meta: '',
33312
33410
  type: 'quality',
33313
- })), preSelected: this.selectedPrinter.id && ((_l = this.selectedPrinterConfig.Resolutions) === null || _l === void 0 ? void 0 : _l.includes(this.selectedPrinterConfig.Default.Resolution))
33411
+ })), preSelected: this.selectedPrinter.id &&
33412
+ ((_l = this.selectedPrinterConfig.Resolutions) === null || _l === void 0 ? void 0 : _l.includes(this.selectedPrinterConfig.Default.Resolution))
33314
33413
  ? this.selectedPrinterConfig.Default.Resolution
33315
- : null, disabled: !(((_m = this.selectedPrinterConfig.Resolutions) === null || _m === void 0 ? void 0 : _m.length) > 0) }), this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null ? (index.h("ezp-select", { label: i18next.t('printer_selection.trays'), icon: "trays", placeholder: i18next.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays.map((trays) => ({
33316
- title: trays.Name,
33317
- id: trays.Index,
33318
- meta: '',
33319
- type: 'tray',
33320
- })), preSelected: this.selectedPrinter.id && ((_o = this.selectedPrinterConfig.Trays) === null || _o === void 0 ? void 0 : _o.find((el) => el.Name.includes(this.selectedPrinterConfig.Default.Tray)))
33414
+ : null, disabled: !(((_m = this.selectedPrinterConfig.Resolutions) === null || _m === void 0 ? void 0 : _m.length) > 0) }), this.selectedPrinterConfig.Trays &&
33415
+ this.selectedPrinterConfig.Trays.length >= 1 &&
33416
+ this.selectedPrinterConfig.Trays[0] != null ? (index.h("ezp-select", { label: i18next.t('printer_selection.trays'), icon: "trays", placeholder: i18next.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays &&
33417
+ this.selectedPrinterConfig.Trays.length >= 1 &&
33418
+ this.selectedPrinterConfig.Trays.map((trays) => ({
33419
+ title: trays.Name,
33420
+ id: trays.Index,
33421
+ meta: '',
33422
+ type: 'tray',
33423
+ })), preSelected: this.selectedPrinter.id &&
33424
+ ((_o = this.selectedPrinterConfig.Trays) === null || _o === void 0 ? void 0 : _o.find((el) => el.Name.includes(this.selectedPrinterConfig.Default.Tray)))
33321
33425
  ? this.selectedPrinterConfig.Default.Tray
33322
33426
  : null })) : null, index.h("ezp-input", { icon: "paper_range", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: i18next.t('printer_selection.page_ranges') })), index.h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel'), class: "action", id: "cancel" }), index.h("ezp-text-button", { disabled: this.selectedPrinter.id === '' || this.printProcessing || this.pageRangeInvalid, type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print'), ref: (button) => (this.printButton = button), class: "action", id: "print" })), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
33323
33427
  }
@@ -33354,6 +33458,7 @@ let EzpPrinting = class {
33354
33458
  this.authOpen = false;
33355
33459
  this.onlyGetSasUri = false;
33356
33460
  this.noDocumentOpen = false;
33461
+ this.files = [];
33357
33462
  }
33358
33463
  /** Watchers */
33359
33464
  watchFileData(newValue, oldValue) {
@@ -33363,7 +33468,7 @@ let EzpPrinting = class {
33363
33468
  for (let i = 0; i < newValue.length; i++) {
33364
33469
  array[i] = newValue.charCodeAt(i);
33365
33470
  }
33366
- this.file = new File([array], this.filename);
33471
+ this.files = [new File([array], this.filename)];
33367
33472
  }
33368
33473
  }
33369
33474
  watchFilename(newValue, oldValue) {
@@ -33415,8 +33520,8 @@ let EzpPrinting = class {
33415
33520
  }
33416
33521
  }
33417
33522
  listenUploadFile(event) {
33418
- this.filename = event.detail[0].name;
33419
- this.file = event.detail[0];
33523
+ this.files = event.detail;
33524
+ this.filename = this.files.length > 0 ? this.files[0].name : '';
33420
33525
  this.open();
33421
33526
  }
33422
33527
  listenDialogClose(event) {
@@ -33547,7 +33652,7 @@ let EzpPrinting = class {
33547
33652
  render() {
33548
33653
  return (index.h(index.Host, { class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
33549
33654
  ? this.systemAppearance
33550
- : userStore.state.appearance} ${this.seamless ? 'seamless' : ''}` }, 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, hideheader: this.hideheader, seamless: this.seamless })) : 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));
33655
+ : userStore.state.appearance} ${this.seamless ? 'seamless' : ''}` }, 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, files: this.files, hidemenu: this.hidemenu, hideheader: this.hideheader, seamless: this.seamless })) : 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));
33551
33656
  }
33552
33657
  static get watchers() { return {
33553
33658
  "filedata": ["watchFileData"],
@@ -33895,7 +34000,7 @@ let EzpUpload = class {
33895
34000
  * States
33896
34001
  *
33897
34002
  */
33898
- this.filename = '';
34003
+ this.selectedFiles = [];
33899
34004
  this.dragging = false;
33900
34005
  /**
33901
34006
  *
@@ -33903,8 +34008,9 @@ let EzpUpload = class {
33903
34008
  *
33904
34009
  */
33905
34010
  this.handleInput = () => {
33906
- this.filename = this.input.files[0].name;
33907
- this.uploadFile.emit(this.input.files);
34011
+ const files = Array.from(this.input.files);
34012
+ this.selectedFiles = files;
34013
+ this.uploadFile.emit(files);
33908
34014
  };
33909
34015
  }
33910
34016
  /**
@@ -33927,12 +34033,13 @@ let EzpUpload = class {
33927
34033
  event.stopPropagation();
33928
34034
  event.preventDefault();
33929
34035
  this.dragging = false;
33930
- this.filename = event.dataTransfer.files[0].name;
33931
- this.uploadFile.emit(event.dataTransfer.files);
34036
+ const files = Array.from(event.dataTransfer.files);
34037
+ this.selectedFiles = files;
34038
+ this.uploadFile.emit(files);
33932
34039
  }
33933
34040
  listenPrintCancel() {
33934
34041
  this.form.reset();
33935
- this.filename = '';
34042
+ this.selectedFiles = [];
33936
34043
  }
33937
34044
  /**
33938
34045
  *
@@ -33940,7 +34047,7 @@ let EzpUpload = class {
33940
34047
  *
33941
34048
  */
33942
34049
  render() {
33943
- return (index.h(index.Host, { class: { dragging: this.dragging } }, index.h("form", { id: "form", ref: (form) => (this.form = form) }, index.h("div", { id: "header" }, index.h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), index.h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), index.h("div", { id: "meta" }, index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), index.h("label", { htmlFor: "input", id: "select" }, index.h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), index.h("input", { type: "file", name: "input", id: "input", ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.filename != '' && (index.h(index.Fragment, null, index.h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_file') }), index.h("ezp-label", { level: "tertiary", text: this.filename })))))));
34050
+ return (index.h(index.Host, { class: { dragging: this.dragging } }, index.h("form", { id: "form", ref: (form) => (this.form = form) }, index.h("div", { id: "header" }, index.h("ezp-icon", { name: "drag-drop", size: "huge", framed: true }), index.h("ezp-label", { weight: "strong", text: i18next.t('upload.description') }), index.h("div", { id: "meta" }, index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_leading') }), index.h("label", { htmlFor: "input", id: "select" }, index.h("ezp-label", { level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), index.h("input", { type: "file", name: "input", id: "input", multiple: true, ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("ezp-label", { level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (index.h(index.Fragment, null, index.h("ezp-label", { level: "secondary", text: i18next.t('upload.selected_files') }), this.selectedFiles.map((file, index$1) => (index.h("ezp-label", { key: index$1, level: "tertiary", text: file.name })))))))));
33944
34051
  }
33945
34052
  };
33946
34053
  EzpUpload.style = ezpUploadCss;