@ezeep/ezeep-js 1.0.240 → 1.0.241
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.
- package/dist/cjs/ezeep.cjs.js +1 -1
- package/dist/cjs/ezp-auth_15.cjs.entry.js +58 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +59 -10
- package/dist/custom-elements/index.js +59 -11
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_15.entry.js +58 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/{p-d2371955.system.entry.js → p-816cb3ae.system.entry.js} +3 -3
- package/dist/ezeep/p-84bd195a.system.js +1 -1
- package/dist/ezeep/{p-c6949ecf.entry.js → p-cf66aca1.entry.js} +2 -2
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +1 -0
- package/package.json +1 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/{p-d2371955.system.entry.js → p-816cb3ae.system.entry.js} +3 -3
- package/www/build/p-84bd195a.system.js +1 -1
- package/www/build/{p-c6949ecf.entry.js → p-cf66aca1.entry.js} +2 -2
package/dist/cjs/ezeep.cjs.js
CHANGED
|
@@ -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],"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);
|
|
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],"hubDriverError":[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
|
});
|
|
@@ -32815,6 +32815,7 @@ let EzpPrinterSelection = class {
|
|
|
32815
32815
|
this.printFailed = false;
|
|
32816
32816
|
this.notSupported = false;
|
|
32817
32817
|
this.noPrinters = false;
|
|
32818
|
+
this.hubDriverError = false;
|
|
32818
32819
|
this.userMenuOpen = false;
|
|
32819
32820
|
this.printStopped = false;
|
|
32820
32821
|
this.selectedPrinterConfig = {
|
|
@@ -32864,6 +32865,7 @@ let EzpPrinterSelection = class {
|
|
|
32864
32865
|
this.failedFiles = [];
|
|
32865
32866
|
this.successfulFiles = [];
|
|
32866
32867
|
this.partialSuccess = false;
|
|
32868
|
+
this.hubDriverError = false;
|
|
32867
32869
|
this.printCancel.emit();
|
|
32868
32870
|
};
|
|
32869
32871
|
this.validateData = (data) => {
|
|
@@ -32883,6 +32885,7 @@ let EzpPrinterSelection = class {
|
|
|
32883
32885
|
this.failedFiles = [];
|
|
32884
32886
|
this.successfulFiles = [];
|
|
32885
32887
|
this.partialSuccess = false;
|
|
32888
|
+
this.hubDriverError = false;
|
|
32886
32889
|
// we have to initialse this obj with empty strings to display the select component
|
|
32887
32890
|
// but don't want to send any attributes with empty strings to the API
|
|
32888
32891
|
if (this.selectedPrinterConfig.Trays &&
|
|
@@ -32923,7 +32926,13 @@ let EzpPrinterSelection = class {
|
|
|
32923
32926
|
this.printFailed = true;
|
|
32924
32927
|
this.printProcessing = false;
|
|
32925
32928
|
}
|
|
32926
|
-
if (
|
|
32929
|
+
else if (this.selectedPrinter.is_queue &&
|
|
32930
|
+
(data.code === 412 || data.code === 500 || data.code === 503)) {
|
|
32931
|
+
// Hub printer specific errors - likely driver not assigned
|
|
32932
|
+
this.hubDriverError = true;
|
|
32933
|
+
this.printProcessing = false;
|
|
32934
|
+
}
|
|
32935
|
+
else if (data.jobid) {
|
|
32927
32936
|
printStore.state.jobID = data.jobid;
|
|
32928
32937
|
poll({
|
|
32929
32938
|
fn: this.printService.getPrintStatus,
|
|
@@ -32932,18 +32941,36 @@ let EzpPrinterSelection = class {
|
|
|
32932
32941
|
maxAttempts: this.MAX_POLL_ATTEMPTS,
|
|
32933
32942
|
}).catch((err) => {
|
|
32934
32943
|
console.warn(err);
|
|
32935
|
-
this
|
|
32944
|
+
// Check if this is a hub printer and the error might be driver-related
|
|
32945
|
+
if (this.selectedPrinter.is_queue) {
|
|
32946
|
+
this.hubDriverError = true;
|
|
32947
|
+
}
|
|
32948
|
+
else {
|
|
32949
|
+
this.printFailed = true;
|
|
32950
|
+
}
|
|
32936
32951
|
this.printProcessing = false;
|
|
32937
32952
|
});
|
|
32938
32953
|
}
|
|
32939
32954
|
else {
|
|
32940
|
-
|
|
32955
|
+
// No job ID returned - check if it's a hub printer
|
|
32956
|
+
if (this.selectedPrinter.is_queue) {
|
|
32957
|
+
this.hubDriverError = true;
|
|
32958
|
+
}
|
|
32959
|
+
else {
|
|
32960
|
+
this.printFailed = true;
|
|
32961
|
+
}
|
|
32941
32962
|
this.printProcessing = false;
|
|
32942
32963
|
}
|
|
32943
32964
|
})
|
|
32944
32965
|
.catch((error) => {
|
|
32945
32966
|
console.log(error);
|
|
32946
|
-
this
|
|
32967
|
+
// Check if this is a hub printer and the error might be driver-related
|
|
32968
|
+
if (this.selectedPrinter.is_queue) {
|
|
32969
|
+
this.hubDriverError = true;
|
|
32970
|
+
}
|
|
32971
|
+
else {
|
|
32972
|
+
this.printFailed = true;
|
|
32973
|
+
}
|
|
32947
32974
|
this.printProcessing = false;
|
|
32948
32975
|
});
|
|
32949
32976
|
}
|
|
@@ -33005,12 +33032,12 @@ let EzpPrinterSelection = class {
|
|
|
33005
33032
|
this.printCancel.emit();
|
|
33006
33033
|
break;
|
|
33007
33034
|
case 'print-failed':
|
|
33008
|
-
this.printProcessing = false;
|
|
33009
33035
|
this.printFailed = false;
|
|
33010
|
-
this.failedFiles = [];
|
|
33011
|
-
this.successfulFiles = [];
|
|
33012
33036
|
break;
|
|
33013
|
-
case '
|
|
33037
|
+
case 'hub-driver-error':
|
|
33038
|
+
this.hubDriverError = false;
|
|
33039
|
+
break;
|
|
33040
|
+
case 'not-supported':
|
|
33014
33041
|
this.noPrinters = false;
|
|
33015
33042
|
break;
|
|
33016
33043
|
}
|
|
@@ -33025,6 +33052,11 @@ let EzpPrinterSelection = class {
|
|
|
33025
33052
|
this.printProcessing = false;
|
|
33026
33053
|
this.handlePrint();
|
|
33027
33054
|
break;
|
|
33055
|
+
case 'hub-driver-error':
|
|
33056
|
+
this.hubDriverError = false;
|
|
33057
|
+
this.printProcessing = false;
|
|
33058
|
+
this.handlePrint();
|
|
33059
|
+
break;
|
|
33028
33060
|
}
|
|
33029
33061
|
}
|
|
33030
33062
|
getPropertiesFromLocalStorage() {
|
|
@@ -33162,7 +33194,13 @@ let EzpPrinterSelection = class {
|
|
|
33162
33194
|
catch (error) {
|
|
33163
33195
|
console.error(`Error processing file ${file.name}:`, error);
|
|
33164
33196
|
this.failedFiles.push(file.name);
|
|
33165
|
-
//
|
|
33197
|
+
// Check if this is a hub driver error
|
|
33198
|
+
if (error.message && error.message.includes('Hub printer driver error')) {
|
|
33199
|
+
this.hubDriverError = true;
|
|
33200
|
+
this.printProcessing = false;
|
|
33201
|
+
return; // Stop processing other files if it's a hub driver issue
|
|
33202
|
+
}
|
|
33203
|
+
// Continue with the next file
|
|
33166
33204
|
}
|
|
33167
33205
|
}
|
|
33168
33206
|
// Determine final status based on results
|
|
@@ -33202,6 +33240,11 @@ let EzpPrinterSelection = class {
|
|
|
33202
33240
|
if (data.code === 804) {
|
|
33203
33241
|
throw new Error(`Print failed for file: ${file.name}`);
|
|
33204
33242
|
}
|
|
33243
|
+
// Check for hub printer driver errors
|
|
33244
|
+
if (this.selectedPrinter.is_queue &&
|
|
33245
|
+
(data.code === 412 || data.code === 500 || data.code === 503)) {
|
|
33246
|
+
throw new Error(`Hub printer driver error for file: ${file.name}`);
|
|
33247
|
+
}
|
|
33205
33248
|
if (data.jobid) {
|
|
33206
33249
|
printStore.state.jobID = data.jobid;
|
|
33207
33250
|
// Wait for this print job to complete before processing the next file
|
|
@@ -33238,6 +33281,11 @@ let EzpPrinterSelection = class {
|
|
|
33238
33281
|
// Failure
|
|
33239
33282
|
throw new Error('Print job failed: ' + (data.jobstatusstring || data.jobstatus));
|
|
33240
33283
|
}
|
|
33284
|
+
else if (this.selectedPrinter.is_queue &&
|
|
33285
|
+
(data.jobstatus === 412 || data.jobstatus === 500 || data.jobstatus === 503)) {
|
|
33286
|
+
// Hub printer driver error
|
|
33287
|
+
throw new Error('Hub printer driver error: ' + (data.jobstatusstring || data.jobstatus));
|
|
33288
|
+
}
|
|
33241
33289
|
else {
|
|
33242
33290
|
// Unknown status, treat as failure for safety
|
|
33243
33291
|
throw new Error('Unknown print job status: ' + data.jobstatus);
|
|
@@ -33404,7 +33452,7 @@ let EzpPrinterSelection = class {
|
|
|
33404
33452
|
? this.partialSuccess
|
|
33405
33453
|
? `${i18next.t('printer_selection.print_success')} (${this.successfulFiles.length}/${this.totalFiles} ${i18next.t('printer_selection.files')} - ${this.failedFiles.length} failed`
|
|
33406
33454
|
: `${i18next.t('printer_selection.print_success')} (${this.totalFiles} ${i18next.t('printer_selection.files')})`
|
|
33407
|
-
: 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
|
|
33455
|
+
: 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.hubDriverError ? (index.h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "hub-driver-error", close: true, 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
|
|
33408
33456
|
? this.files && this.files.length > 1
|
|
33409
33457
|
? i18next.t('printer_selection.files_selected', { count: this.files.length })
|
|
33410
33458
|
: this.filename
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -16,7 +16,7 @@ const defineCustomElements = (win, options) => {
|
|
|
16
16
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
17
17
|
return patchEsm().then(() => {
|
|
18
18
|
appGlobals.globalScripts();
|
|
19
|
-
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);
|
|
19
|
+
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],"hubDriverError":[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);
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -48,6 +48,7 @@ export class EzpPrinterSelection {
|
|
|
48
48
|
this.printFailed = false;
|
|
49
49
|
this.notSupported = false;
|
|
50
50
|
this.noPrinters = false;
|
|
51
|
+
this.hubDriverError = false;
|
|
51
52
|
this.userMenuOpen = false;
|
|
52
53
|
this.printStopped = false;
|
|
53
54
|
this.selectedPrinterConfig = {
|
|
@@ -97,6 +98,7 @@ export class EzpPrinterSelection {
|
|
|
97
98
|
this.failedFiles = [];
|
|
98
99
|
this.successfulFiles = [];
|
|
99
100
|
this.partialSuccess = false;
|
|
101
|
+
this.hubDriverError = false;
|
|
100
102
|
this.printCancel.emit();
|
|
101
103
|
};
|
|
102
104
|
this.validateData = (data) => {
|
|
@@ -116,6 +118,7 @@ export class EzpPrinterSelection {
|
|
|
116
118
|
this.failedFiles = [];
|
|
117
119
|
this.successfulFiles = [];
|
|
118
120
|
this.partialSuccess = false;
|
|
121
|
+
this.hubDriverError = false;
|
|
119
122
|
// we have to initialse this obj with empty strings to display the select component
|
|
120
123
|
// but don't want to send any attributes with empty strings to the API
|
|
121
124
|
if (this.selectedPrinterConfig.Trays &&
|
|
@@ -156,7 +159,13 @@ export class EzpPrinterSelection {
|
|
|
156
159
|
this.printFailed = true;
|
|
157
160
|
this.printProcessing = false;
|
|
158
161
|
}
|
|
159
|
-
if (
|
|
162
|
+
else if (this.selectedPrinter.is_queue &&
|
|
163
|
+
(data.code === 412 || data.code === 500 || data.code === 503)) {
|
|
164
|
+
// Hub printer specific errors - likely driver not assigned
|
|
165
|
+
this.hubDriverError = true;
|
|
166
|
+
this.printProcessing = false;
|
|
167
|
+
}
|
|
168
|
+
else if (data.jobid) {
|
|
160
169
|
printStore.state.jobID = data.jobid;
|
|
161
170
|
poll({
|
|
162
171
|
fn: this.printService.getPrintStatus,
|
|
@@ -165,18 +174,36 @@ export class EzpPrinterSelection {
|
|
|
165
174
|
maxAttempts: this.MAX_POLL_ATTEMPTS,
|
|
166
175
|
}).catch((err) => {
|
|
167
176
|
console.warn(err);
|
|
168
|
-
this
|
|
177
|
+
// Check if this is a hub printer and the error might be driver-related
|
|
178
|
+
if (this.selectedPrinter.is_queue) {
|
|
179
|
+
this.hubDriverError = true;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
this.printFailed = true;
|
|
183
|
+
}
|
|
169
184
|
this.printProcessing = false;
|
|
170
185
|
});
|
|
171
186
|
}
|
|
172
187
|
else {
|
|
173
|
-
|
|
188
|
+
// No job ID returned - check if it's a hub printer
|
|
189
|
+
if (this.selectedPrinter.is_queue) {
|
|
190
|
+
this.hubDriverError = true;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
this.printFailed = true;
|
|
194
|
+
}
|
|
174
195
|
this.printProcessing = false;
|
|
175
196
|
}
|
|
176
197
|
})
|
|
177
198
|
.catch((error) => {
|
|
178
199
|
console.log(error);
|
|
179
|
-
this
|
|
200
|
+
// Check if this is a hub printer and the error might be driver-related
|
|
201
|
+
if (this.selectedPrinter.is_queue) {
|
|
202
|
+
this.hubDriverError = true;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.printFailed = true;
|
|
206
|
+
}
|
|
180
207
|
this.printProcessing = false;
|
|
181
208
|
});
|
|
182
209
|
}
|
|
@@ -238,12 +265,12 @@ export class EzpPrinterSelection {
|
|
|
238
265
|
this.printCancel.emit();
|
|
239
266
|
break;
|
|
240
267
|
case 'print-failed':
|
|
241
|
-
this.printProcessing = false;
|
|
242
268
|
this.printFailed = false;
|
|
243
|
-
this.failedFiles = [];
|
|
244
|
-
this.successfulFiles = [];
|
|
245
269
|
break;
|
|
246
|
-
case '
|
|
270
|
+
case 'hub-driver-error':
|
|
271
|
+
this.hubDriverError = false;
|
|
272
|
+
break;
|
|
273
|
+
case 'not-supported':
|
|
247
274
|
this.noPrinters = false;
|
|
248
275
|
break;
|
|
249
276
|
}
|
|
@@ -258,6 +285,11 @@ export class EzpPrinterSelection {
|
|
|
258
285
|
this.printProcessing = false;
|
|
259
286
|
this.handlePrint();
|
|
260
287
|
break;
|
|
288
|
+
case 'hub-driver-error':
|
|
289
|
+
this.hubDriverError = false;
|
|
290
|
+
this.printProcessing = false;
|
|
291
|
+
this.handlePrint();
|
|
292
|
+
break;
|
|
261
293
|
}
|
|
262
294
|
}
|
|
263
295
|
getPropertiesFromLocalStorage() {
|
|
@@ -397,7 +429,13 @@ export class EzpPrinterSelection {
|
|
|
397
429
|
catch (error) {
|
|
398
430
|
console.error(`Error processing file ${file.name}:`, error);
|
|
399
431
|
this.failedFiles.push(file.name);
|
|
400
|
-
//
|
|
432
|
+
// Check if this is a hub driver error
|
|
433
|
+
if (error.message && error.message.includes('Hub printer driver error')) {
|
|
434
|
+
this.hubDriverError = true;
|
|
435
|
+
this.printProcessing = false;
|
|
436
|
+
return; // Stop processing other files if it's a hub driver issue
|
|
437
|
+
}
|
|
438
|
+
// Continue with the next file
|
|
401
439
|
}
|
|
402
440
|
}
|
|
403
441
|
// Determine final status based on results
|
|
@@ -437,6 +475,11 @@ export class EzpPrinterSelection {
|
|
|
437
475
|
if (data.code === 804) {
|
|
438
476
|
throw new Error(`Print failed for file: ${file.name}`);
|
|
439
477
|
}
|
|
478
|
+
// Check for hub printer driver errors
|
|
479
|
+
if (this.selectedPrinter.is_queue &&
|
|
480
|
+
(data.code === 412 || data.code === 500 || data.code === 503)) {
|
|
481
|
+
throw new Error(`Hub printer driver error for file: ${file.name}`);
|
|
482
|
+
}
|
|
440
483
|
if (data.jobid) {
|
|
441
484
|
printStore.state.jobID = data.jobid;
|
|
442
485
|
// Wait for this print job to complete before processing the next file
|
|
@@ -473,6 +516,11 @@ export class EzpPrinterSelection {
|
|
|
473
516
|
// Failure
|
|
474
517
|
throw new Error('Print job failed: ' + (data.jobstatusstring || data.jobstatus));
|
|
475
518
|
}
|
|
519
|
+
else if (this.selectedPrinter.is_queue &&
|
|
520
|
+
(data.jobstatus === 412 || data.jobstatus === 500 || data.jobstatus === 503)) {
|
|
521
|
+
// Hub printer driver error
|
|
522
|
+
throw new Error('Hub printer driver error: ' + (data.jobstatusstring || data.jobstatus));
|
|
523
|
+
}
|
|
476
524
|
else {
|
|
477
525
|
// Unknown status, treat as failure for safety
|
|
478
526
|
throw new Error('Unknown print job status: ' + data.jobstatus);
|
|
@@ -641,7 +689,7 @@ export class EzpPrinterSelection {
|
|
|
641
689
|
? this.partialSuccess
|
|
642
690
|
? `${i18next.t('printer_selection.print_success')} (${this.successfulFiles.length}/${this.totalFiles} ${i18next.t('printer_selection.files')} - ${this.failedFiles.length} failed`
|
|
643
691
|
: `${i18next.t('printer_selection.print_success')} (${this.totalFiles} ${i18next.t('printer_selection.files')})`
|
|
644
|
-
: i18next.t('printer_selection.print_success'), instance: "print-success", close: true })) : this.printFailed ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "print-failed", close: true, retry: true })) : this.notSupported ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.not_supported'), instance: "not-supported", retry: true })) : this.noPrinters ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.no_printers'), instance: "no-printers", close: true })) : null)),
|
|
692
|
+
: i18next.t('printer_selection.print_success'), instance: "print-success", close: true })) : this.printFailed ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "print-failed", close: true, retry: true })) : this.notSupported ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.not_supported'), instance: "not-supported", retry: true })) : this.hubDriverError ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "hub-driver-error", close: true, retry: true })) : this.noPrinters ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.no_printers'), instance: "no-printers", close: true })) : null)),
|
|
645
693
|
!this.hideheader && (h("div", { id: "header" },
|
|
646
694
|
h("ezp-label", { weight: "heavy", text: i18next.t('printer_selection.print') + `${!this.notSupported ? ':' : ''}` }),
|
|
647
695
|
h("ezp-label", { text: !this.notSupported
|
|
@@ -925,6 +973,7 @@ export class EzpPrinterSelection {
|
|
|
925
973
|
"printFailed": {},
|
|
926
974
|
"notSupported": {},
|
|
927
975
|
"noPrinters": {},
|
|
976
|
+
"hubDriverError": {},
|
|
928
977
|
"userMenuOpen": {},
|
|
929
978
|
"printStopped": {},
|
|
930
979
|
"userName": {},
|
|
@@ -32840,6 +32840,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32840
32840
|
this.printFailed = false;
|
|
32841
32841
|
this.notSupported = false;
|
|
32842
32842
|
this.noPrinters = false;
|
|
32843
|
+
this.hubDriverError = false;
|
|
32843
32844
|
this.userMenuOpen = false;
|
|
32844
32845
|
this.printStopped = false;
|
|
32845
32846
|
this.selectedPrinterConfig = {
|
|
@@ -32889,6 +32890,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32889
32890
|
this.failedFiles = [];
|
|
32890
32891
|
this.successfulFiles = [];
|
|
32891
32892
|
this.partialSuccess = false;
|
|
32893
|
+
this.hubDriverError = false;
|
|
32892
32894
|
this.printCancel.emit();
|
|
32893
32895
|
};
|
|
32894
32896
|
this.validateData = (data) => {
|
|
@@ -32908,6 +32910,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32908
32910
|
this.failedFiles = [];
|
|
32909
32911
|
this.successfulFiles = [];
|
|
32910
32912
|
this.partialSuccess = false;
|
|
32913
|
+
this.hubDriverError = false;
|
|
32911
32914
|
// we have to initialse this obj with empty strings to display the select component
|
|
32912
32915
|
// but don't want to send any attributes with empty strings to the API
|
|
32913
32916
|
if (this.selectedPrinterConfig.Trays &&
|
|
@@ -32948,7 +32951,13 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32948
32951
|
this.printFailed = true;
|
|
32949
32952
|
this.printProcessing = false;
|
|
32950
32953
|
}
|
|
32951
|
-
if (
|
|
32954
|
+
else if (this.selectedPrinter.is_queue &&
|
|
32955
|
+
(data.code === 412 || data.code === 500 || data.code === 503)) {
|
|
32956
|
+
// Hub printer specific errors - likely driver not assigned
|
|
32957
|
+
this.hubDriverError = true;
|
|
32958
|
+
this.printProcessing = false;
|
|
32959
|
+
}
|
|
32960
|
+
else if (data.jobid) {
|
|
32952
32961
|
printStore.state.jobID = data.jobid;
|
|
32953
32962
|
poll({
|
|
32954
32963
|
fn: this.printService.getPrintStatus,
|
|
@@ -32957,18 +32966,36 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32957
32966
|
maxAttempts: this.MAX_POLL_ATTEMPTS,
|
|
32958
32967
|
}).catch((err) => {
|
|
32959
32968
|
console.warn(err);
|
|
32960
|
-
this
|
|
32969
|
+
// Check if this is a hub printer and the error might be driver-related
|
|
32970
|
+
if (this.selectedPrinter.is_queue) {
|
|
32971
|
+
this.hubDriverError = true;
|
|
32972
|
+
}
|
|
32973
|
+
else {
|
|
32974
|
+
this.printFailed = true;
|
|
32975
|
+
}
|
|
32961
32976
|
this.printProcessing = false;
|
|
32962
32977
|
});
|
|
32963
32978
|
}
|
|
32964
32979
|
else {
|
|
32965
|
-
|
|
32980
|
+
// No job ID returned - check if it's a hub printer
|
|
32981
|
+
if (this.selectedPrinter.is_queue) {
|
|
32982
|
+
this.hubDriverError = true;
|
|
32983
|
+
}
|
|
32984
|
+
else {
|
|
32985
|
+
this.printFailed = true;
|
|
32986
|
+
}
|
|
32966
32987
|
this.printProcessing = false;
|
|
32967
32988
|
}
|
|
32968
32989
|
})
|
|
32969
32990
|
.catch((error) => {
|
|
32970
32991
|
console.log(error);
|
|
32971
|
-
this
|
|
32992
|
+
// Check if this is a hub printer and the error might be driver-related
|
|
32993
|
+
if (this.selectedPrinter.is_queue) {
|
|
32994
|
+
this.hubDriverError = true;
|
|
32995
|
+
}
|
|
32996
|
+
else {
|
|
32997
|
+
this.printFailed = true;
|
|
32998
|
+
}
|
|
32972
32999
|
this.printProcessing = false;
|
|
32973
33000
|
});
|
|
32974
33001
|
}
|
|
@@ -33030,12 +33057,12 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33030
33057
|
this.printCancel.emit();
|
|
33031
33058
|
break;
|
|
33032
33059
|
case 'print-failed':
|
|
33033
|
-
this.printProcessing = false;
|
|
33034
33060
|
this.printFailed = false;
|
|
33035
|
-
this.failedFiles = [];
|
|
33036
|
-
this.successfulFiles = [];
|
|
33037
33061
|
break;
|
|
33038
|
-
case '
|
|
33062
|
+
case 'hub-driver-error':
|
|
33063
|
+
this.hubDriverError = false;
|
|
33064
|
+
break;
|
|
33065
|
+
case 'not-supported':
|
|
33039
33066
|
this.noPrinters = false;
|
|
33040
33067
|
break;
|
|
33041
33068
|
}
|
|
@@ -33050,6 +33077,11 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33050
33077
|
this.printProcessing = false;
|
|
33051
33078
|
this.handlePrint();
|
|
33052
33079
|
break;
|
|
33080
|
+
case 'hub-driver-error':
|
|
33081
|
+
this.hubDriverError = false;
|
|
33082
|
+
this.printProcessing = false;
|
|
33083
|
+
this.handlePrint();
|
|
33084
|
+
break;
|
|
33053
33085
|
}
|
|
33054
33086
|
}
|
|
33055
33087
|
getPropertiesFromLocalStorage() {
|
|
@@ -33187,7 +33219,13 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33187
33219
|
catch (error) {
|
|
33188
33220
|
console.error(`Error processing file ${file.name}:`, error);
|
|
33189
33221
|
this.failedFiles.push(file.name);
|
|
33190
|
-
//
|
|
33222
|
+
// Check if this is a hub driver error
|
|
33223
|
+
if (error.message && error.message.includes('Hub printer driver error')) {
|
|
33224
|
+
this.hubDriverError = true;
|
|
33225
|
+
this.printProcessing = false;
|
|
33226
|
+
return; // Stop processing other files if it's a hub driver issue
|
|
33227
|
+
}
|
|
33228
|
+
// Continue with the next file
|
|
33191
33229
|
}
|
|
33192
33230
|
}
|
|
33193
33231
|
// Determine final status based on results
|
|
@@ -33227,6 +33265,11 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33227
33265
|
if (data.code === 804) {
|
|
33228
33266
|
throw new Error(`Print failed for file: ${file.name}`);
|
|
33229
33267
|
}
|
|
33268
|
+
// Check for hub printer driver errors
|
|
33269
|
+
if (this.selectedPrinter.is_queue &&
|
|
33270
|
+
(data.code === 412 || data.code === 500 || data.code === 503)) {
|
|
33271
|
+
throw new Error(`Hub printer driver error for file: ${file.name}`);
|
|
33272
|
+
}
|
|
33230
33273
|
if (data.jobid) {
|
|
33231
33274
|
printStore.state.jobID = data.jobid;
|
|
33232
33275
|
// Wait for this print job to complete before processing the next file
|
|
@@ -33263,6 +33306,11 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33263
33306
|
// Failure
|
|
33264
33307
|
throw new Error('Print job failed: ' + (data.jobstatusstring || data.jobstatus));
|
|
33265
33308
|
}
|
|
33309
|
+
else if (this.selectedPrinter.is_queue &&
|
|
33310
|
+
(data.jobstatus === 412 || data.jobstatus === 500 || data.jobstatus === 503)) {
|
|
33311
|
+
// Hub printer driver error
|
|
33312
|
+
throw new Error('Hub printer driver error: ' + (data.jobstatusstring || data.jobstatus));
|
|
33313
|
+
}
|
|
33266
33314
|
else {
|
|
33267
33315
|
// Unknown status, treat as failure for safety
|
|
33268
33316
|
throw new Error('Unknown print job status: ' + data.jobstatus);
|
|
@@ -33429,7 +33477,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33429
33477
|
? this.partialSuccess
|
|
33430
33478
|
? `${i18next.t('printer_selection.print_success')} (${this.successfulFiles.length}/${this.totalFiles} ${i18next.t('printer_selection.files')} - ${this.failedFiles.length} failed`
|
|
33431
33479
|
: `${i18next.t('printer_selection.print_success')} (${this.totalFiles} ${i18next.t('printer_selection.files')})`
|
|
33432
|
-
: i18next.t('printer_selection.print_success'), instance: "print-success", close: true })) : this.printFailed ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "print-failed", close: true, retry: true })) : this.notSupported ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.not_supported'), instance: "not-supported", retry: true })) : this.noPrinters ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.no_printers'), instance: "no-printers", close: true })) : null)), !this.hideheader && (h("div", { id: "header" }, h("ezp-label", { weight: "heavy", text: i18next.t('printer_selection.print') + `${!this.notSupported ? ':' : ''}` }), h("ezp-label", { text: !this.notSupported
|
|
33480
|
+
: i18next.t('printer_selection.print_success'), instance: "print-success", close: true })) : this.printFailed ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "print-failed", close: true, retry: true })) : this.notSupported ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.not_supported'), instance: "not-supported", retry: true })) : this.hubDriverError ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.print_failed'), instance: "hub-driver-error", close: true, retry: true })) : this.noPrinters ? (h("ezp-status", { icon: "exclamation-mark", description: i18next.t('printer_selection.no_printers'), instance: "no-printers", close: true })) : null)), !this.hideheader && (h("div", { id: "header" }, h("ezp-label", { weight: "heavy", text: i18next.t('printer_selection.print') + `${!this.notSupported ? ':' : ''}` }), h("ezp-label", { text: !this.notSupported
|
|
33433
33481
|
? this.files && this.files.length > 1
|
|
33434
33482
|
? i18next.t('printer_selection.files_selected', { count: this.files.length })
|
|
33435
33483
|
: this.filename
|
|
@@ -34241,7 +34289,7 @@ const EzpIcon = /*@__PURE__*/proxyCustomElement(EzpIcon$1, [1,"ezp-icon",{"name"
|
|
|
34241
34289
|
const EzpIconButton = /*@__PURE__*/proxyCustomElement(EzpIconButton$1, [1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}]);
|
|
34242
34290
|
const EzpInput = /*@__PURE__*/proxyCustomElement(EzpInput$1, [1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}]);
|
|
34243
34291
|
const EzpLabel = /*@__PURE__*/proxyCustomElement(EzpLabel$1, [1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]);
|
|
34244
|
-
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],"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"]]]);
|
|
34292
|
+
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],"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],"hubDriverError":[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"]]]);
|
|
34245
34293
|
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],"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]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]]);
|
|
34246
34294
|
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]}]);
|
|
34247
34295
|
const EzpStatus = /*@__PURE__*/proxyCustomElement(EzpStatus$1, [1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}]);
|
package/dist/esm/ezeep.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
17
|
globalScripts();
|
|
18
|
-
return bootstrapLazy([["ezp-auth_15",[[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);
|
|
18
|
+
return bootstrapLazy([["ezp-auth_15",[[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],"hubDriverError":[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);
|
|
19
19
|
});
|