@ezeep/ezeep-js 1.0.243 → 1.0.246
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 +34 -17
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-auth/ezp-auth.css +12 -0
- package/dist/collection/components/ezp-auth/ezp-auth.js +18 -1
- package/dist/collection/components/ezp-printing/ezp-printing.js +31 -11
- package/dist/collection/components/ezp-upload/ezp-upload.js +6 -4
- package/dist/custom-elements/index.js +35 -18
- package/dist/directives/proxies.ts +4 -2
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_15.entry.js +34 -17
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-84bd195a.system.js +1 -1
- package/dist/ezeep/{p-8a941755.system.entry.js → p-f7f8ddf7.system.entry.js} +2 -2
- package/dist/ezeep/{p-69f14876.entry.js → p-f82070bb.entry.js} +2 -2
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +1 -0
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +1 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-84bd195a.system.js +1 -1
- package/www/build/{p-8a941755.system.entry.js → p-f7f8ddf7.system.entry.js} +2 -2
- package/www/build/{p-69f14876.entry.js → p-f82070bb.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],"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
|
+
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,"userCancel","listenUserCancel"],[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
|
});
|
|
@@ -3247,13 +3247,14 @@ function sendCodeToParentWindow() {
|
|
|
3247
3247
|
}
|
|
3248
3248
|
}
|
|
3249
3249
|
|
|
3250
|
-
const ezpAuthCss = ":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}";
|
|
3250
|
+
const ezpAuthCss = ":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}.auth-actions{display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.auth-actions ezp-text-button{-ms-flex:1;flex:1;max-width:calc(50% - var(--ezp-spacing-3) / 2)}";
|
|
3251
3251
|
|
|
3252
3252
|
let EzpAuth = class {
|
|
3253
3253
|
constructor(hostRef) {
|
|
3254
3254
|
index.registerInstance(this, hostRef);
|
|
3255
3255
|
this.authCancel = index.createEvent(this, "authCancel", 7);
|
|
3256
3256
|
this.authSuccess = index.createEvent(this, "authSuccess", 7);
|
|
3257
|
+
this.userCancel = index.createEvent(this, "userCancel", 7);
|
|
3257
3258
|
this.oauthPopupWindow = null;
|
|
3258
3259
|
this.previousUrl = null;
|
|
3259
3260
|
}
|
|
@@ -3329,7 +3330,7 @@ let EzpAuth = class {
|
|
|
3329
3330
|
}
|
|
3330
3331
|
}
|
|
3331
3332
|
render() {
|
|
3332
|
-
return (index.h(index.Host, null, this.hidelogin && this.trigger === 'button' ? (index.h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (index.h("ezp-text-button", { type: "button", level: "primary", onClick: () => this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login'), label: i18next.t('button_actions.select_printer') })) : (index.h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
3333
|
+
return (index.h(index.Host, null, this.hidelogin && this.trigger === 'button' ? (index.h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (index.h("div", { class: "auth-actions" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: () => this.userCancel.emit(), label: i18next.t('button_actions.cancel') }), index.h("ezp-text-button", { type: "button", level: "primary", onClick: () => this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login'), label: i18next.t('button_actions.select_printer') }))) : (index.h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
3333
3334
|
}
|
|
3334
3335
|
};
|
|
3335
3336
|
EzpAuth.style = ezpAuthCss;
|
|
@@ -33673,6 +33674,15 @@ let EzpPrinting = class {
|
|
|
33673
33674
|
/** Description... */
|
|
33674
33675
|
listenPrintCancel() {
|
|
33675
33676
|
this.printOpen = false;
|
|
33677
|
+
// Clear the selected files and reset the upload component
|
|
33678
|
+
this.files = [];
|
|
33679
|
+
this.filename = '';
|
|
33680
|
+
// Emit printCancel to reset the upload component
|
|
33681
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
33682
|
+
bubbles: true,
|
|
33683
|
+
detail: {},
|
|
33684
|
+
});
|
|
33685
|
+
document.dispatchEvent(printCancelEvent);
|
|
33676
33686
|
this.printFinished.emit();
|
|
33677
33687
|
}
|
|
33678
33688
|
/** Description... */
|
|
@@ -33686,6 +33696,19 @@ let EzpPrinting = class {
|
|
|
33686
33696
|
this.authOpen = false;
|
|
33687
33697
|
this.checkAuth();
|
|
33688
33698
|
}
|
|
33699
|
+
listenUserCancel() {
|
|
33700
|
+
this.authOpen = false;
|
|
33701
|
+
// Clear the selected files and reset the upload component
|
|
33702
|
+
this.files = [];
|
|
33703
|
+
this.filename = '';
|
|
33704
|
+
// Emit printCancel to reset the upload component
|
|
33705
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
33706
|
+
bubbles: true,
|
|
33707
|
+
detail: {},
|
|
33708
|
+
});
|
|
33709
|
+
document.dispatchEvent(printCancelEvent);
|
|
33710
|
+
this.checkAuth();
|
|
33711
|
+
}
|
|
33689
33712
|
listenAuthSuccess() {
|
|
33690
33713
|
if (this.onlyGetSasUri) {
|
|
33691
33714
|
this.printOpen = false;
|
|
@@ -33722,17 +33745,9 @@ let EzpPrinting = class {
|
|
|
33722
33745
|
*
|
|
33723
33746
|
*/
|
|
33724
33747
|
async open() {
|
|
33725
|
-
|
|
33726
|
-
|
|
33727
|
-
|
|
33728
|
-
}
|
|
33729
|
-
else {
|
|
33730
|
-
this.noDocumentOpen = true;
|
|
33731
|
-
}
|
|
33732
|
-
}
|
|
33733
|
-
else {
|
|
33734
|
-
this.authOpen = true;
|
|
33735
|
-
}
|
|
33748
|
+
// Always show auth dialog when files are uploaded to give users cancel option
|
|
33749
|
+
// Even if already authenticated, show the auth component for consistency
|
|
33750
|
+
this.authOpen = true;
|
|
33736
33751
|
}
|
|
33737
33752
|
async logOut() {
|
|
33738
33753
|
this.auth.revokeRefreshToken();
|
|
@@ -34188,8 +34203,9 @@ let EzpUpload = class {
|
|
|
34188
34203
|
*/
|
|
34189
34204
|
this.handleInput = () => {
|
|
34190
34205
|
const files = Array.from(this.input.files);
|
|
34191
|
-
|
|
34192
|
-
this.
|
|
34206
|
+
// Add new files to existing selection instead of replacing
|
|
34207
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
34208
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
34193
34209
|
};
|
|
34194
34210
|
}
|
|
34195
34211
|
/**
|
|
@@ -34213,8 +34229,9 @@ let EzpUpload = class {
|
|
|
34213
34229
|
event.preventDefault();
|
|
34214
34230
|
this.dragging = false;
|
|
34215
34231
|
const files = Array.from(event.dataTransfer.files);
|
|
34216
|
-
|
|
34217
|
-
this.
|
|
34232
|
+
// Add new files to existing selection instead of replacing
|
|
34233
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
34234
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
34218
34235
|
}
|
|
34219
34236
|
listenPrintCancel() {
|
|
34220
34237
|
this.form.reset();
|
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],"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
|
+
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,"userCancel","listenUserCancel"],[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
|
|
|
@@ -7,4 +7,16 @@
|
|
|
7
7
|
--ezp-theme-solid: var(--ezp-accent-cyan-solid);
|
|
8
8
|
--ezp-theme-translucent: var(--ezp-accent-cyan-translucent);
|
|
9
9
|
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.auth-actions {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--ezp-spacing-3);
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
.auth-actions ezp-text-button {
|
|
20
|
+
flex: 1;
|
|
21
|
+
max-width: calc(50% - var(--ezp-spacing-3) / 2);
|
|
10
22
|
}
|
|
@@ -79,7 +79,9 @@ export class EzpAuth {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
return (h(Host, null, this.hidelogin && this.trigger === 'button' ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (h("
|
|
82
|
+
return (h(Host, null, this.hidelogin && this.trigger === 'button' ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (h("div", { class: "auth-actions" },
|
|
83
|
+
h("ezp-text-button", { type: "button", level: "secondary", onClick: () => this.userCancel.emit(), label: i18next.t('button_actions.cancel') }),
|
|
84
|
+
h("ezp-text-button", { type: "button", level: "primary", onClick: () => this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login'), label: i18next.t('button_actions.select_printer') }))) : (h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
83
85
|
}
|
|
84
86
|
static get is() { return "ezp-auth"; }
|
|
85
87
|
static get encapsulation() { return "shadow"; }
|
|
@@ -215,6 +217,21 @@ export class EzpAuth {
|
|
|
215
217
|
"resolved": "any",
|
|
216
218
|
"references": {}
|
|
217
219
|
}
|
|
220
|
+
}, {
|
|
221
|
+
"method": "userCancel",
|
|
222
|
+
"name": "userCancel",
|
|
223
|
+
"bubbles": true,
|
|
224
|
+
"cancelable": true,
|
|
225
|
+
"composed": true,
|
|
226
|
+
"docs": {
|
|
227
|
+
"tags": [],
|
|
228
|
+
"text": ""
|
|
229
|
+
},
|
|
230
|
+
"complexType": {
|
|
231
|
+
"original": "any",
|
|
232
|
+
"resolved": "any",
|
|
233
|
+
"references": {}
|
|
234
|
+
}
|
|
218
235
|
}]; }
|
|
219
236
|
static get listeners() { return [{
|
|
220
237
|
"name": "dialogAction",
|
|
@@ -60,6 +60,15 @@ export class EzpPrinting {
|
|
|
60
60
|
/** Description... */
|
|
61
61
|
listenPrintCancel() {
|
|
62
62
|
this.printOpen = false;
|
|
63
|
+
// Clear the selected files and reset the upload component
|
|
64
|
+
this.files = [];
|
|
65
|
+
this.filename = '';
|
|
66
|
+
// Emit printCancel to reset the upload component
|
|
67
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
68
|
+
bubbles: true,
|
|
69
|
+
detail: {},
|
|
70
|
+
});
|
|
71
|
+
document.dispatchEvent(printCancelEvent);
|
|
63
72
|
this.printFinished.emit();
|
|
64
73
|
}
|
|
65
74
|
/** Description... */
|
|
@@ -73,6 +82,19 @@ export class EzpPrinting {
|
|
|
73
82
|
this.authOpen = false;
|
|
74
83
|
this.checkAuth();
|
|
75
84
|
}
|
|
85
|
+
listenUserCancel() {
|
|
86
|
+
this.authOpen = false;
|
|
87
|
+
// Clear the selected files and reset the upload component
|
|
88
|
+
this.files = [];
|
|
89
|
+
this.filename = '';
|
|
90
|
+
// Emit printCancel to reset the upload component
|
|
91
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
92
|
+
bubbles: true,
|
|
93
|
+
detail: {},
|
|
94
|
+
});
|
|
95
|
+
document.dispatchEvent(printCancelEvent);
|
|
96
|
+
this.checkAuth();
|
|
97
|
+
}
|
|
76
98
|
listenAuthSuccess() {
|
|
77
99
|
if (this.onlyGetSasUri) {
|
|
78
100
|
this.printOpen = false;
|
|
@@ -109,17 +131,9 @@ export class EzpPrinting {
|
|
|
109
131
|
*
|
|
110
132
|
*/
|
|
111
133
|
async open() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
this.noDocumentOpen = true;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
this.authOpen = true;
|
|
122
|
-
}
|
|
134
|
+
// Always show auth dialog when files are uploaded to give users cancel option
|
|
135
|
+
// Even if already authenticated, show the auth component for consistency
|
|
136
|
+
this.authOpen = true;
|
|
123
137
|
}
|
|
124
138
|
async logOut() {
|
|
125
139
|
this.auth.revokeRefreshToken();
|
|
@@ -714,6 +728,12 @@ export class EzpPrinting {
|
|
|
714
728
|
"target": undefined,
|
|
715
729
|
"capture": false,
|
|
716
730
|
"passive": false
|
|
731
|
+
}, {
|
|
732
|
+
"name": "userCancel",
|
|
733
|
+
"method": "listenUserCancel",
|
|
734
|
+
"target": undefined,
|
|
735
|
+
"capture": false,
|
|
736
|
+
"passive": false
|
|
717
737
|
}, {
|
|
718
738
|
"name": "authSuccess",
|
|
719
739
|
"method": "listenAuthSuccess",
|
|
@@ -16,8 +16,9 @@ export class EzpUpload {
|
|
|
16
16
|
*/
|
|
17
17
|
this.handleInput = () => {
|
|
18
18
|
const files = Array.from(this.input.files);
|
|
19
|
-
|
|
20
|
-
this.
|
|
19
|
+
// Add new files to existing selection instead of replacing
|
|
20
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
21
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
@@ -41,8 +42,9 @@ export class EzpUpload {
|
|
|
41
42
|
event.preventDefault();
|
|
42
43
|
this.dragging = false;
|
|
43
44
|
const files = Array.from(event.dataTransfer.files);
|
|
44
|
-
|
|
45
|
-
this.
|
|
45
|
+
// Add new files to existing selection instead of replacing
|
|
46
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
47
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
46
48
|
}
|
|
47
49
|
listenPrintCancel() {
|
|
48
50
|
this.form.reset();
|
|
@@ -3256,7 +3256,7 @@ function sendCodeToParentWindow() {
|
|
|
3256
3256
|
}
|
|
3257
3257
|
}
|
|
3258
3258
|
|
|
3259
|
-
const ezpAuthCss = ":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}";
|
|
3259
|
+
const ezpAuthCss = ":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}.auth-actions{display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.auth-actions ezp-text-button{-ms-flex:1;flex:1;max-width:calc(50% - var(--ezp-spacing-3) / 2)}";
|
|
3260
3260
|
|
|
3261
3261
|
let EzpAuth$1 = class extends HTMLElement {
|
|
3262
3262
|
constructor() {
|
|
@@ -3265,6 +3265,7 @@ let EzpAuth$1 = class extends HTMLElement {
|
|
|
3265
3265
|
this.__attachShadow();
|
|
3266
3266
|
this.authCancel = createEvent(this, "authCancel", 7);
|
|
3267
3267
|
this.authSuccess = createEvent(this, "authSuccess", 7);
|
|
3268
|
+
this.userCancel = createEvent(this, "userCancel", 7);
|
|
3268
3269
|
this.oauthPopupWindow = null;
|
|
3269
3270
|
this.previousUrl = null;
|
|
3270
3271
|
}
|
|
@@ -3340,7 +3341,7 @@ let EzpAuth$1 = class extends HTMLElement {
|
|
|
3340
3341
|
}
|
|
3341
3342
|
}
|
|
3342
3343
|
render() {
|
|
3343
|
-
return (h(Host, null, this.hidelogin && this.trigger === 'button' ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (h("ezp-text-button", { type: "button", level: "primary", onClick: () => this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login'), label: i18next.t('button_actions.select_printer') })) : (h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
3344
|
+
return (h(Host, null, this.hidelogin && this.trigger === 'button' ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (h("div", { class: "auth-actions" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: () => this.userCancel.emit(), label: i18next.t('button_actions.cancel') }), h("ezp-text-button", { type: "button", level: "primary", onClick: () => this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login'), label: i18next.t('button_actions.select_printer') }))) : (h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
3344
3345
|
}
|
|
3345
3346
|
static get style() { return ezpAuthCss; }
|
|
3346
3347
|
};
|
|
@@ -33700,6 +33701,15 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33700
33701
|
/** Description... */
|
|
33701
33702
|
listenPrintCancel() {
|
|
33702
33703
|
this.printOpen = false;
|
|
33704
|
+
// Clear the selected files and reset the upload component
|
|
33705
|
+
this.files = [];
|
|
33706
|
+
this.filename = '';
|
|
33707
|
+
// Emit printCancel to reset the upload component
|
|
33708
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
33709
|
+
bubbles: true,
|
|
33710
|
+
detail: {},
|
|
33711
|
+
});
|
|
33712
|
+
document.dispatchEvent(printCancelEvent);
|
|
33703
33713
|
this.printFinished.emit();
|
|
33704
33714
|
}
|
|
33705
33715
|
/** Description... */
|
|
@@ -33713,6 +33723,19 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33713
33723
|
this.authOpen = false;
|
|
33714
33724
|
this.checkAuth();
|
|
33715
33725
|
}
|
|
33726
|
+
listenUserCancel() {
|
|
33727
|
+
this.authOpen = false;
|
|
33728
|
+
// Clear the selected files and reset the upload component
|
|
33729
|
+
this.files = [];
|
|
33730
|
+
this.filename = '';
|
|
33731
|
+
// Emit printCancel to reset the upload component
|
|
33732
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
33733
|
+
bubbles: true,
|
|
33734
|
+
detail: {},
|
|
33735
|
+
});
|
|
33736
|
+
document.dispatchEvent(printCancelEvent);
|
|
33737
|
+
this.checkAuth();
|
|
33738
|
+
}
|
|
33716
33739
|
listenAuthSuccess() {
|
|
33717
33740
|
if (this.onlyGetSasUri) {
|
|
33718
33741
|
this.printOpen = false;
|
|
@@ -33749,17 +33772,9 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33749
33772
|
*
|
|
33750
33773
|
*/
|
|
33751
33774
|
async open() {
|
|
33752
|
-
|
|
33753
|
-
|
|
33754
|
-
|
|
33755
|
-
}
|
|
33756
|
-
else {
|
|
33757
|
-
this.noDocumentOpen = true;
|
|
33758
|
-
}
|
|
33759
|
-
}
|
|
33760
|
-
else {
|
|
33761
|
-
this.authOpen = true;
|
|
33762
|
-
}
|
|
33775
|
+
// Always show auth dialog when files are uploaded to give users cancel option
|
|
33776
|
+
// Even if already authenticated, show the auth component for consistency
|
|
33777
|
+
this.authOpen = true;
|
|
33763
33778
|
}
|
|
33764
33779
|
async logOut() {
|
|
33765
33780
|
this.auth.revokeRefreshToken();
|
|
@@ -34225,8 +34240,9 @@ let EzpUpload$1 = class extends HTMLElement {
|
|
|
34225
34240
|
*/
|
|
34226
34241
|
this.handleInput = () => {
|
|
34227
34242
|
const files = Array.from(this.input.files);
|
|
34228
|
-
|
|
34229
|
-
this.
|
|
34243
|
+
// Add new files to existing selection instead of replacing
|
|
34244
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
34245
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
34230
34246
|
};
|
|
34231
34247
|
}
|
|
34232
34248
|
/**
|
|
@@ -34250,8 +34266,9 @@ let EzpUpload$1 = class extends HTMLElement {
|
|
|
34250
34266
|
event.preventDefault();
|
|
34251
34267
|
this.dragging = false;
|
|
34252
34268
|
const files = Array.from(event.dataTransfer.files);
|
|
34253
|
-
|
|
34254
|
-
this.
|
|
34269
|
+
// Add new files to existing selection instead of replacing
|
|
34270
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
34271
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
34255
34272
|
}
|
|
34256
34273
|
listenPrintCancel() {
|
|
34257
34274
|
this.form.reset();
|
|
@@ -34375,7 +34392,7 @@ const EzpIconButton = /*@__PURE__*/proxyCustomElement(EzpIconButton$1, [1,"ezp-i
|
|
|
34375
34392
|
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]}]);
|
|
34376
34393
|
const EzpLabel = /*@__PURE__*/proxyCustomElement(EzpLabel$1, [1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]);
|
|
34377
34394
|
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"]]]);
|
|
34378
|
-
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"]]]);
|
|
34395
|
+
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,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]]);
|
|
34379
34396
|
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]}]);
|
|
34380
34397
|
const EzpStatus = /*@__PURE__*/proxyCustomElement(EzpStatus$1, [1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}]);
|
|
34381
34398
|
const EzpStepper = /*@__PURE__*/proxyCustomElement(EzpStepper$1, [1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}]);
|
|
@@ -15,18 +15,20 @@ export declare interface EzpAuth extends Components.EzpAuth {}
|
|
|
15
15
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
16
|
template: '<ng-content></ng-content>',
|
|
17
17
|
inputs: ['clientID', 'code', 'hidelogin', 'redirectURI', 'trigger'],
|
|
18
|
-
outputs: ['authCancel', 'authSuccess']
|
|
18
|
+
outputs: ['authCancel', 'authSuccess', 'userCancel']
|
|
19
19
|
})
|
|
20
20
|
export class EzpAuth {
|
|
21
21
|
/** */
|
|
22
22
|
authCancel!: EventEmitter<CustomEvent<MouseEvent>>;
|
|
23
23
|
/** */
|
|
24
24
|
authSuccess!: EventEmitter<CustomEvent<any>>;
|
|
25
|
+
/** */
|
|
26
|
+
userCancel!: EventEmitter<CustomEvent<any>>;
|
|
25
27
|
protected el: HTMLElement;
|
|
26
28
|
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
27
29
|
c.detach();
|
|
28
30
|
this.el = r.nativeElement;
|
|
29
|
-
proxyOutputs(this, this.el, ['authCancel', 'authSuccess']);
|
|
31
|
+
proxyOutputs(this, this.el, ['authCancel', 'authSuccess', 'userCancel']);
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
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],"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);
|
|
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,"userCancel","listenUserCancel"],[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
|
});
|
|
@@ -3243,13 +3243,14 @@ function sendCodeToParentWindow() {
|
|
|
3243
3243
|
}
|
|
3244
3244
|
}
|
|
3245
3245
|
|
|
3246
|
-
const ezpAuthCss = ":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}";
|
|
3246
|
+
const ezpAuthCss = ":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}.auth-actions{display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.auth-actions ezp-text-button{-ms-flex:1;flex:1;max-width:calc(50% - var(--ezp-spacing-3) / 2)}";
|
|
3247
3247
|
|
|
3248
3248
|
let EzpAuth = class {
|
|
3249
3249
|
constructor(hostRef) {
|
|
3250
3250
|
registerInstance(this, hostRef);
|
|
3251
3251
|
this.authCancel = createEvent(this, "authCancel", 7);
|
|
3252
3252
|
this.authSuccess = createEvent(this, "authSuccess", 7);
|
|
3253
|
+
this.userCancel = createEvent(this, "userCancel", 7);
|
|
3253
3254
|
this.oauthPopupWindow = null;
|
|
3254
3255
|
this.previousUrl = null;
|
|
3255
3256
|
}
|
|
@@ -3325,7 +3326,7 @@ let EzpAuth = class {
|
|
|
3325
3326
|
}
|
|
3326
3327
|
}
|
|
3327
3328
|
render() {
|
|
3328
|
-
return (h(Host, null, this.hidelogin && this.trigger === 'button' ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (h("ezp-text-button", { type: "button", level: "primary", onClick: () => this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login'), label: i18next.t('button_actions.select_printer') })) : (h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
3329
|
+
return (h(Host, null, this.hidelogin && this.trigger === 'button' ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : this.hidelogin && this.trigger === 'file' ? (h("div", { class: "auth-actions" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: () => this.userCancel.emit(), label: i18next.t('button_actions.cancel') }), h("ezp-text-button", { type: "button", level: "primary", onClick: () => this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login'), label: i18next.t('button_actions.select_printer') }))) : (h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
3329
3330
|
}
|
|
3330
3331
|
};
|
|
3331
3332
|
EzpAuth.style = ezpAuthCss;
|
|
@@ -33669,6 +33670,15 @@ let EzpPrinting = class {
|
|
|
33669
33670
|
/** Description... */
|
|
33670
33671
|
listenPrintCancel() {
|
|
33671
33672
|
this.printOpen = false;
|
|
33673
|
+
// Clear the selected files and reset the upload component
|
|
33674
|
+
this.files = [];
|
|
33675
|
+
this.filename = '';
|
|
33676
|
+
// Emit printCancel to reset the upload component
|
|
33677
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
33678
|
+
bubbles: true,
|
|
33679
|
+
detail: {},
|
|
33680
|
+
});
|
|
33681
|
+
document.dispatchEvent(printCancelEvent);
|
|
33672
33682
|
this.printFinished.emit();
|
|
33673
33683
|
}
|
|
33674
33684
|
/** Description... */
|
|
@@ -33682,6 +33692,19 @@ let EzpPrinting = class {
|
|
|
33682
33692
|
this.authOpen = false;
|
|
33683
33693
|
this.checkAuth();
|
|
33684
33694
|
}
|
|
33695
|
+
listenUserCancel() {
|
|
33696
|
+
this.authOpen = false;
|
|
33697
|
+
// Clear the selected files and reset the upload component
|
|
33698
|
+
this.files = [];
|
|
33699
|
+
this.filename = '';
|
|
33700
|
+
// Emit printCancel to reset the upload component
|
|
33701
|
+
const printCancelEvent = new CustomEvent('printCancel', {
|
|
33702
|
+
bubbles: true,
|
|
33703
|
+
detail: {},
|
|
33704
|
+
});
|
|
33705
|
+
document.dispatchEvent(printCancelEvent);
|
|
33706
|
+
this.checkAuth();
|
|
33707
|
+
}
|
|
33685
33708
|
listenAuthSuccess() {
|
|
33686
33709
|
if (this.onlyGetSasUri) {
|
|
33687
33710
|
this.printOpen = false;
|
|
@@ -33718,17 +33741,9 @@ let EzpPrinting = class {
|
|
|
33718
33741
|
*
|
|
33719
33742
|
*/
|
|
33720
33743
|
async open() {
|
|
33721
|
-
|
|
33722
|
-
|
|
33723
|
-
|
|
33724
|
-
}
|
|
33725
|
-
else {
|
|
33726
|
-
this.noDocumentOpen = true;
|
|
33727
|
-
}
|
|
33728
|
-
}
|
|
33729
|
-
else {
|
|
33730
|
-
this.authOpen = true;
|
|
33731
|
-
}
|
|
33744
|
+
// Always show auth dialog when files are uploaded to give users cancel option
|
|
33745
|
+
// Even if already authenticated, show the auth component for consistency
|
|
33746
|
+
this.authOpen = true;
|
|
33732
33747
|
}
|
|
33733
33748
|
async logOut() {
|
|
33734
33749
|
this.auth.revokeRefreshToken();
|
|
@@ -34184,8 +34199,9 @@ let EzpUpload = class {
|
|
|
34184
34199
|
*/
|
|
34185
34200
|
this.handleInput = () => {
|
|
34186
34201
|
const files = Array.from(this.input.files);
|
|
34187
|
-
|
|
34188
|
-
this.
|
|
34202
|
+
// Add new files to existing selection instead of replacing
|
|
34203
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
34204
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
34189
34205
|
};
|
|
34190
34206
|
}
|
|
34191
34207
|
/**
|
|
@@ -34209,8 +34225,9 @@ let EzpUpload = class {
|
|
|
34209
34225
|
event.preventDefault();
|
|
34210
34226
|
this.dragging = false;
|
|
34211
34227
|
const files = Array.from(event.dataTransfer.files);
|
|
34212
|
-
|
|
34213
|
-
this.
|
|
34228
|
+
// Add new files to existing selection instead of replacing
|
|
34229
|
+
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
34230
|
+
this.uploadFile.emit(this.selectedFiles);
|
|
34214
34231
|
}
|
|
34215
34232
|
listenPrintCancel() {
|
|
34216
34233
|
this.form.reset();
|